/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "n5Qe"); /******/ }) /************************************************************************/ /******/ ({ /***/ "+00f": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.decode = exports.parse = __webpack_require__("J6GP"); exports.encode = exports.stringify = __webpack_require__("bvhO"); /***/ }), /***/ "+CtU": /***/ (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; /***/ }), /***/ "+D2p": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("4hqW"); /***/ }), /***/ "+Lv/": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "+UAC": /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__("VcL+"), baseKeysIn = __webpack_require__("9FAS"), isArrayLike = __webpack_require__("LN6c"); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /***/ "+VwJ": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "+bWy": /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__("yEjJ"); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /***/ "/0+/": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2014-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. * * @providesModule warning */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var __DEV__ = "production" !== 'production'; var warning = function() {}; if (__DEV__) { var printWarning = function printWarning(format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} } warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (!condition) { printWarning.apply(null, [format].concat(args)); } }; } module.exports = warning; /***/ }), /***/ "/sXU": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = function() {}; if (false) { warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (format.length < 10 || (/^[s\W]*$/).test(format)) { throw new Error( 'The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format ); } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch(x) {} } }; } module.exports = warning; /***/ }), /***/ "/u/u": /***/ (function(module, exports) { /** * Delegate to handle a media query being matched and unmatched. * * @param {object} options * @param {function} options.match callback for when the media query is matched * @param {function} [options.unmatch] callback for when the media query is unmatched * @param {function} [options.setup] one-time callback triggered the first time a query is matched * @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched? * @constructor */ function QueryHandler(options) { this.options = options; !options.deferSetup && this.setup(); } QueryHandler.prototype = { constructor : QueryHandler, /** * coordinates setup of the handler * * @function */ setup : function() { if(this.options.setup) { this.options.setup(); } this.initialised = true; }, /** * coordinates setup and triggering of the handler * * @function */ on : function() { !this.initialised && this.setup(); this.options.match && this.options.match(); }, /** * coordinates the unmatch event for the handler * * @function */ off : function() { this.options.unmatch && this.options.unmatch(); }, /** * called when a handler is to be destroyed. * delegates to the destroy or unmatch callbacks, depending on availability. * * @function */ destroy : function() { this.options.destroy ? this.options.destroy() : this.off(); }, /** * determines equality by reference. * if object is supplied compare options, if function, compare match callback * * @function * @param {object || function} [target] the target for comparison */ equals : function(target) { return this.options === target || this.options.match === target; } }; module.exports = QueryHandler; /***/ }), /***/ "/wuY": /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__("NB7d")('keys'); var uid = __webpack_require__("X6va"); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /***/ "/z8I": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _EventBaseObject = __webpack_require__("M4O7"); var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); var _objectAssign = __webpack_require__("J4Nk"); var _objectAssign2 = _interopRequireDefault(_objectAssign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * @ignore * event object for dom * @author yiminghe@gmail.com */ var TRUE = true; var FALSE = false; var commonProps = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'currentTarget', 'eventPhase', 'metaKey', 'shiftKey', 'target', 'timeStamp', 'view', 'type']; function isNullOrUndefined(w) { return w === null || w === undefined; } var eventNormalizers = [{ reg: /^key/, props: ['char', 'charCode', 'key', 'keyCode', 'which'], fix: function fix(event, nativeEvent) { if (isNullOrUndefined(event.which)) { event.which = !isNullOrUndefined(nativeEvent.charCode) ? nativeEvent.charCode : nativeEvent.keyCode; } // add metaKey to non-Mac browsers (use ctrl for PC 's and Meta for Macs) if (event.metaKey === undefined) { event.metaKey = event.ctrlKey; } } }, { reg: /^touch/, props: ['touches', 'changedTouches', 'targetTouches'] }, { reg: /^hashchange$/, props: ['newURL', 'oldURL'] }, { reg: /^gesturechange$/i, props: ['rotation', 'scale'] }, { reg: /^(mousewheel|DOMMouseScroll)$/, props: [], fix: function fix(event, nativeEvent) { var deltaX = void 0; var deltaY = void 0; var delta = void 0; var wheelDelta = nativeEvent.wheelDelta; var axis = nativeEvent.axis; var wheelDeltaY = nativeEvent.wheelDeltaY; var wheelDeltaX = nativeEvent.wheelDeltaX; var detail = nativeEvent.detail; // ie/webkit if (wheelDelta) { delta = wheelDelta / 120; } // gecko if (detail) { // press control e.detail == 1 else e.detail == 3 delta = 0 - (detail % 3 === 0 ? detail / 3 : detail); } // Gecko if (axis !== undefined) { if (axis === event.HORIZONTAL_AXIS) { deltaY = 0; deltaX = 0 - delta; } else if (axis === event.VERTICAL_AXIS) { deltaX = 0; deltaY = delta; } } // Webkit if (wheelDeltaY !== undefined) { deltaY = wheelDeltaY / 120; } if (wheelDeltaX !== undefined) { deltaX = -1 * wheelDeltaX / 120; } // 默认 deltaY (ie) if (!deltaX && !deltaY) { deltaY = delta; } if (deltaX !== undefined) { /** * deltaX of mousewheel event * @property deltaX * @member Event.DomEvent.Object */ event.deltaX = deltaX; } if (deltaY !== undefined) { /** * deltaY of mousewheel event * @property deltaY * @member Event.DomEvent.Object */ event.deltaY = deltaY; } if (delta !== undefined) { /** * delta of mousewheel event * @property delta * @member Event.DomEvent.Object */ event.delta = delta; } } }, { reg: /^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i, props: ['buttons', 'clientX', 'clientY', 'button', 'offsetX', 'relatedTarget', 'which', 'fromElement', 'toElement', 'offsetY', 'pageX', 'pageY', 'screenX', 'screenY'], fix: function fix(event, nativeEvent) { var eventDoc = void 0; var doc = void 0; var body = void 0; var target = event.target; var button = nativeEvent.button; // Calculate pageX/Y if missing and clientX/Y available if (target && isNullOrUndefined(event.pageX) && !isNullOrUndefined(nativeEvent.clientX)) { eventDoc = target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = nativeEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = nativeEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // which for click: 1 === left; 2 === middle; 3 === right // do not use button if (!event.which && button !== undefined) { if (button & 1) { event.which = 1; } else if (button & 2) { event.which = 3; } else if (button & 4) { event.which = 2; } else { event.which = 0; } } // add relatedTarget, if necessary if (!event.relatedTarget && event.fromElement) { event.relatedTarget = event.fromElement === target ? event.toElement : event.fromElement; } return event; } }]; function retTrue() { return TRUE; } function retFalse() { return FALSE; } function DomEventObject(nativeEvent) { var type = nativeEvent.type; var isNative = typeof nativeEvent.stopPropagation === 'function' || typeof nativeEvent.cancelBubble === 'boolean'; _EventBaseObject2["default"].call(this); this.nativeEvent = nativeEvent; // in case dom event has been mark as default prevented by lower dom node var isDefaultPrevented = retFalse; if ('defaultPrevented' in nativeEvent) { isDefaultPrevented = nativeEvent.defaultPrevented ? retTrue : retFalse; } else if ('getPreventDefault' in nativeEvent) { // https://bugzilla.mozilla.org/show_bug.cgi?id=691151 isDefaultPrevented = nativeEvent.getPreventDefault() ? retTrue : retFalse; } else if ('returnValue' in nativeEvent) { isDefaultPrevented = nativeEvent.returnValue === FALSE ? retTrue : retFalse; } this.isDefaultPrevented = isDefaultPrevented; var fixFns = []; var fixFn = void 0; var l = void 0; var prop = void 0; var props = commonProps.concat(); eventNormalizers.forEach(function (normalizer) { if (type.match(normalizer.reg)) { props = props.concat(normalizer.props); if (normalizer.fix) { fixFns.push(normalizer.fix); } } }); l = props.length; // clone properties of the original event object while (l) { prop = props[--l]; this[prop] = nativeEvent[prop]; } // fix target property, if necessary if (!this.target && isNative) { this.target = nativeEvent.srcElement || document; // srcElement might not be defined either } // check if target is a text node (safari) if (this.target && this.target.nodeType === 3) { this.target = this.target.parentNode; } l = fixFns.length; while (l) { fixFn = fixFns[--l]; fixFn(this, nativeEvent); } this.timeStamp = nativeEvent.timeStamp || Date.now(); } var EventBaseObjectProto = _EventBaseObject2["default"].prototype; (0, _objectAssign2["default"])(DomEventObject.prototype, EventBaseObjectProto, { constructor: DomEventObject, preventDefault: function preventDefault() { var e = this.nativeEvent; // if preventDefault exists run it on the original event if (e.preventDefault) { e.preventDefault(); } else { // otherwise set the returnValue property of the original event to FALSE (IE) e.returnValue = FALSE; } EventBaseObjectProto.preventDefault.call(this); }, stopPropagation: function stopPropagation() { var e = this.nativeEvent; // if stopPropagation exists run it on the original event if (e.stopPropagation) { e.stopPropagation(); } else { // otherwise set the cancelBubble property of the original event to TRUE (IE) e.cancelBubble = TRUE; } EventBaseObjectProto.stopPropagation.call(this); } }); exports["default"] = DomEventObject; module.exports = exports['default']; /***/ }), /***/ "0421": /***/ (function(module, exports, __webpack_require__) { var _typeof = __webpack_require__("b9XL"); var assertThisInitialized = __webpack_require__("E7HD"); function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return assertThisInitialized(self); } module.exports = _possibleConstructorReturn; /***/ }), /***/ "0WCH": /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ "0fcM": /***/ (function(module, exports) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } module.exports = _classCallCheck; /***/ }), /***/ "0pJf": /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__("MIhM"); /** * Gets the timestamp of the number of milliseconds that have elapsed since * the Unix epoch (1 January 1970 00:00:00 UTC). * * @static * @memberOf _ * @since 2.4.0 * @category Date * @returns {number} Returns the timestamp. * @example * * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); * // => Logs the number of milliseconds it took for the deferred invocation. */ var now = function() { return root.Date.now(); }; module.exports = now; /***/ }), /***/ "11Ut": /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__("Gfzd").f; var has = __webpack_require__("yS17"); var TAG = __webpack_require__("Ug9I")('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /***/ "1QDr": /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__("Ku7I"); function scrollIntoView(elem, container, config) { config = config || {}; // document 归一化到 window if (container.nodeType === 9) { container = util.getWindow(container); } var allowHorizontalScroll = config.allowHorizontalScroll; var onlyScrollIfNeeded = config.onlyScrollIfNeeded; var alignWithTop = config.alignWithTop; var alignWithLeft = config.alignWithLeft; var offsetTop = config.offsetTop || 0; var offsetLeft = config.offsetLeft || 0; var offsetBottom = config.offsetBottom || 0; var offsetRight = config.offsetRight || 0; allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll; var isWin = util.isWindow(container); var elemOffset = util.offset(elem); var eh = util.outerHeight(elem); var ew = util.outerWidth(elem); var containerOffset = undefined; var ch = undefined; var cw = undefined; var containerScroll = undefined; var diffTop = undefined; var diffBottom = undefined; var win = undefined; var winScroll = undefined; var ww = undefined; var wh = undefined; if (isWin) { win = container; wh = util.height(win); ww = util.width(win); winScroll = { left: util.scrollLeft(win), top: util.scrollTop(win) }; // elem 相对 container 可视视窗的距离 diffTop = { left: elemOffset.left - winScroll.left - offsetLeft, top: elemOffset.top - winScroll.top - offsetTop }; diffBottom = { left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight, top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom }; containerScroll = winScroll; } else { containerOffset = util.offset(container); ch = container.clientHeight; cw = container.clientWidth; containerScroll = { left: container.scrollLeft, top: container.scrollTop }; // elem 相对 container 可视视窗的距离 // 注意边框, offset 是边框到根节点 diffTop = { left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft, top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop }; diffBottom = { left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight, top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom }; } if (diffTop.top < 0 || diffBottom.top > 0) { // 强制向上 if (alignWithTop === true) { util.scrollTop(container, containerScroll.top + diffTop.top); } else if (alignWithTop === false) { util.scrollTop(container, containerScroll.top + diffBottom.top); } else { // 自动调整 if (diffTop.top < 0) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } else { if (!onlyScrollIfNeeded) { alignWithTop = alignWithTop === undefined ? true : !!alignWithTop; if (alignWithTop) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } if (allowHorizontalScroll) { if (diffTop.left < 0 || diffBottom.left > 0) { // 强制向上 if (alignWithLeft === true) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else if (alignWithLeft === false) { util.scrollLeft(container, containerScroll.left + diffBottom.left); } else { // 自动调整 if (diffTop.left < 0) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } else { if (!onlyScrollIfNeeded) { alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft; if (alignWithLeft) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } } } module.exports = scrollIntoView; /***/ }), /***/ "1RxS": /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__("FTXF"); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /***/ "1ipW": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("dXs8"); /***/ }), /***/ "1kq3": /***/ (function(module, exports) { module.exports = true; /***/ }), /***/ "1n8/": /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__("awqi"); } else { module.exports = require('./cjs/react.development.js'); } /***/ }), /***/ "1qpN": /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__("q3B8"); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /***/ "2Axb": /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__("EiMJ"); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /***/ "2L2L": /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__("e5TX"), isLength = __webpack_require__("GmNU"), isObjectLike = __webpack_require__("OuyB"); /** `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; /***/ }), /***/ "2NNl": /***/ (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; /***/ }), /***/ "2Tdb": /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__("d05+"), eq = __webpack_require__("LIpy"); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue; /***/ }), /***/ "2U7Q": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getFakeChartData; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment__ = __webpack_require__("a2/B"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_moment__); // mock data var visitData = []; var beginDay = new Date().getTime(); var fakeY = [7, 5, 4, 2, 4, 7, 5, 6, 5, 9, 6, 3, 1, 5, 3, 6, 5]; for (var i = 0; i < fakeY.length; i += 1) { visitData.push({ x: __WEBPACK_IMPORTED_MODULE_0_moment___default()(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'), y: fakeY[i] }); } var visitData2 = []; var fakeY2 = [1, 6, 4, 8, 3, 7, 2]; for (var _i = 0; _i < fakeY2.length; _i += 1) { visitData2.push({ x: __WEBPACK_IMPORTED_MODULE_0_moment___default()(new Date(beginDay + 1000 * 60 * 60 * 24 * _i)).format('YYYY-MM-DD'), y: fakeY2[_i] }); } var salesData = []; for (var _i2 = 0; _i2 < 12; _i2 += 1) { salesData.push({ x: "".concat(_i2 + 1, "\u6708"), y: Math.floor(Math.random() * 1000) + 200 }); } var searchData = []; for (var _i3 = 0; _i3 < 50; _i3 += 1) { searchData.push({ index: _i3 + 1, keyword: "\u641C\u7D22\u5173\u952E\u8BCD-".concat(_i3), count: Math.floor(Math.random() * 1000), range: Math.floor(Math.random() * 100), status: Math.floor(Math.random() * 10 % 2) }); } var salesTypeData = [{ x: '家用电器', y: 4544 }, { x: '食用酒水', y: 3321 }, { x: '个护健康', y: 3113 }, { x: '服饰箱包', y: 2341 }, { x: '母婴产品', y: 1231 }, { x: '其他', y: 1231 }]; var salesTypeDataOnline = [{ x: '家用电器', y: 244 }, { x: '食用酒水', y: 321 }, { x: '个护健康', y: 311 }, { x: '服饰箱包', y: 41 }, { x: '母婴产品', y: 121 }, { x: '其他', y: 111 }]; var salesTypeDataOffline = [{ x: '家用电器', y: 99 }, { x: '个护健康', y: 188 }, { x: '服饰箱包', y: 344 }, { x: '母婴产品', y: 255 }, { x: '其他', y: 65 }]; var offlineData = []; for (var _i4 = 0; _i4 < 10; _i4 += 1) { offlineData.push({ name: "\u95E8\u5E97".concat(_i4), cvr: Math.ceil(Math.random() * 9) / 10 }); } var offlineChartData = []; for (var _i5 = 0; _i5 < 20; _i5 += 1) { offlineChartData.push({ x: new Date().getTime() + 1000 * 60 * 30 * _i5, y1: Math.floor(Math.random() * 100) + 10, y2: Math.floor(Math.random() * 100) + 10 }); } var radarOriginData = [{ name: '个人', ref: 10, koubei: 8, output: 4, contribute: 5, hot: 7 }, { name: '团队', ref: 3, koubei: 9, output: 6, contribute: 3, hot: 1 }, { name: '部门', ref: 4, koubei: 1, output: 6, contribute: 5, hot: 7 }]; // var radarData = []; var radarTitleMap = { ref: '引用', koubei: '口碑', output: '产量', contribute: '贡献', hot: '热度' }; radarOriginData.forEach(function (item) { Object.keys(item).forEach(function (key) { if (key !== 'name') { radarData.push({ name: item.name, label: radarTitleMap[key], value: item[key] }); } }); }); var getFakeChartData = { visitData: visitData, visitData2: visitData2, salesData: salesData, searchData: searchData, offlineData: offlineData, offlineChartData: offlineChartData, salesTypeData: salesTypeData, salesTypeDataOnline: salesTypeDataOnline, salesTypeDataOffline: salesTypeDataOffline, radarData: radarData }; /* unused harmony default export */ var _unused_webpack_default_export = ({ getFakeChartData: getFakeChartData }); /***/ }), /***/ "2ibm": /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__("p/0c"), isSymbol = __webpack_require__("bgO7"); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /***/ "2mwf": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("c2zY")('observable'); /***/ }), /***/ "3Dq6": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = __webpack_require__("1QDr"); /***/ }), /***/ "3til": /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__("pK4Y"), isObjectLike = __webpack_require__("OuyB"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /***/ "3v7p": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("htFH"); var $Object = __webpack_require__("zKeE").Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); }; /***/ }), /***/ "3w4y": /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__("wppe"), arrayMap = __webpack_require__("BblM"), isArray = __webpack_require__("p/0c"), isSymbol = __webpack_require__("bgO7"); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /***/ "3zRh": /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__("g31e"); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /***/ "4/4o": /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /***/ "49I8": /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__("Xk23"), stackClear = __webpack_require__("4y4D"), stackDelete = __webpack_require__("TpjK"), stackGet = __webpack_require__("skbs"), stackHas = __webpack_require__("9ocJ"), stackSet = __webpack_require__("fwYF"); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /***/ "49SQ": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("hHLa"); var $Object = __webpack_require__("zKeE").Object; module.exports = function getOwnPropertyDescriptor(it, key) { return $Object.getOwnPropertyDescriptor(it, key); }; /***/ }), /***/ "4hqW": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("Aa2f"); module.exports = __webpack_require__("zKeE").Object.getOwnPropertySymbols; /***/ }), /***/ "4y4D": /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__("Xk23"); /** * 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; /***/ }), /***/ "5D9O": /***/ (function(module, exports, __webpack_require__) { /** * 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. */ if (false) { var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var isValidElement = function(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__("wVGV")(); } /***/ }), /***/ "5U5Y": /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__("yeiR"); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /***/ "5YsI": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { isString: function(arg) { return typeof(arg) === 'string'; }, isObject: function(arg) { return typeof(arg) === 'object' && arg !== null; }, isNull: function(arg) { return arg === null; }, isNullOrUndefined: function(arg) { return arg == null; } }; /***/ }), /***/ "6MLN": /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__("wLcK")(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "6kQO": /***/ (function(module, exports, __webpack_require__) { // the whatwg-fetch polyfill installs the fetch() function // on the global object (window or self) // // Return that as the export for use in Webpack, Browserify etc. __webpack_require__("MCp7"); module.exports = self.fetch.bind(self); /***/ }), /***/ "6t7t": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("nFDa"), __esModule: true }; /***/ }), /***/ "7AqT": /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__("ZHvQ"); var ITERATOR = __webpack_require__("Ug9I")('iterator'); var Iterators = __webpack_require__("dhak"); module.exports = __webpack_require__("zKeE").getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /***/ "85ue": /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__("ZC1a"); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /***/ "89El": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: 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 defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = getPrototypeOf && getPrototypeOf(Object); 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)); } for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } return targetComponent; } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ "92s5": /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__("dtkN"), keysIn = __webpack_require__("+UAC"); /** * 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; /***/ }), /***/ "9FAS": /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__("u9vI"), isPrototype = __webpack_require__("nhsl"), nativeKeysIn = __webpack_require__("uy4o"); /** 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; /***/ }), /***/ "9Qea": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_mockjs__ = __webpack_require__("eMAQ"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_mockjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mockjs__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mock_rule__ = __webpack_require__("IMUl"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mock_api__ = __webpack_require__("mCGg"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mock_chart__ = __webpack_require__("2U7Q"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mock_profile__ = __webpack_require__("YShb"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mock_notices__ = __webpack_require__("ZJYB"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_roadhog_api_doc__ = __webpack_require__("dKQ/"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_roadhog_api_doc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_roadhog_api_doc__); // 是否禁用代理 const noProxy = process.env.NO_PROXY === 'true'; // 代码中会兼容本地 service mock 以及部署站点的静态数据 const proxy = { // 支持值为 Object 和 Array 'GET /api/currentUser': { $desc: '获取当前用户接口', $params: { pageSize: { desc: '分页', exp: 2, }, }, $body: { name: 'Serati Ma', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', userid: '00000001', notifyCount: 12, }, }, // GET POST 可省略 'GET /api/users': [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sidney No. 1 Lake Park', }, ], 'GET /api/project/notice': __WEBPACK_IMPORTED_MODULE_2__mock_api__["c" /* getNotice */], 'GET /api/activities': __WEBPACK_IMPORTED_MODULE_2__mock_api__["a" /* getActivities */], 'GET /api/rule': __WEBPACK_IMPORTED_MODULE_1__mock_rule__["a" /* getRule */], 'POST /api/rule': { $params: { pageSize: { desc: '分页', exp: 2, }, }, $body: __WEBPACK_IMPORTED_MODULE_1__mock_rule__["b" /* postRule */], }, 'POST /api/forms': (req, res) => { res.send({ message: 'Ok' }); }, 'GET /api/tags': __WEBPACK_IMPORTED_MODULE_0_mockjs___default.a.mock({ 'list|100': [{ name: '@city', 'value|1-100': 150, 'type|0-2': 1 }], }), 'GET /api/fake_list': __WEBPACK_IMPORTED_MODULE_2__mock_api__["b" /* getFakeList */], 'GET /api/fake_chart_data': __WEBPACK_IMPORTED_MODULE_3__mock_chart__["a" /* getFakeChartData */], 'GET /api/profile/basic': __WEBPACK_IMPORTED_MODULE_4__mock_profile__["b" /* getProfileBasicData */], 'GET /api/profile/advanced': __WEBPACK_IMPORTED_MODULE_4__mock_profile__["a" /* getProfileAdvancedData */], 'POST /api/login/account': (req, res) => { const { password, userName, type } = req.body; if (password === '888888' && userName === 'admin') { res.send({ status: 'ok', type, currentAuthority: 'admin', }); return; } if (password === '123456' && userName === 'user') { res.send({ status: 'ok', type, currentAuthority: 'user', }); return; } res.send({ status: 'error', type, currentAuthority: 'guest', }); }, 'POST /api/register': (req, res) => { res.send({ status: 'ok', currentAuthority: 'user' }); }, 'GET /api/notices': __WEBPACK_IMPORTED_MODULE_5__mock_notices__["a" /* getNotices */], 'GET /api/500': (req, res) => { res.status(500).send({ timestamp: 1513932555104, status: 500, error: 'error', message: 'error', path: '/base/category/list', }); }, 'GET /api/404': (req, res) => { res.status(404).send({ timestamp: 1513932643431, status: 404, error: 'Not Found', message: 'No message available', path: '/base/category/list/2121212', }); }, 'GET /api/403': (req, res) => { res.status(403).send({ timestamp: 1513932555104, status: 403, error: 'Unauthorized', message: 'Unauthorized', path: '/base/category/list', }); }, 'GET /api/401': (req, res) => { res.status(401).send({ timestamp: 1513932555104, status: 401, error: 'Unauthorized', message: 'Unauthorized', path: '/base/category/list', }); }, }; /* harmony default export */ __webpack_exports__["a"] = (noProxy ? {} : Object(__WEBPACK_IMPORTED_MODULE_6_roadhog_api_doc__["delay"])(proxy, 1000)); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__("FN88"))) /***/ }), /***/ "9kxq": /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__("BxvP"); var document = __webpack_require__("i1Q6").document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /***/ "9ocJ": /***/ (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; /***/ }), /***/ "9qb7": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames () { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if (typeof module !== 'undefined' && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { window.classNames = classNames; } }()); /***/ }), /***/ "A+gr": /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /***/ "A8RV": /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__("3w4y"); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /***/ "A9HP": /***/ (function(module, exports, __webpack_require__) { var MediaQuery = __webpack_require__("fp05"); var Util = __webpack_require__("gozI"); var each = Util.each; var isFunction = Util.isFunction; var isArray = Util.isArray; /** * Allows for registration of query handlers. * Manages the query handler's state and is responsible for wiring up browser events * * @constructor */ function MediaQueryDispatch () { if(!window.matchMedia) { throw new Error('matchMedia not present, legacy browsers require a polyfill'); } this.queries = {}; this.browserIsIncapable = !window.matchMedia('only all').matches; } MediaQueryDispatch.prototype = { constructor : MediaQueryDispatch, /** * Registers a handler for the given media query * * @param {string} q the media query * @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers * @param {function} options.match fired when query matched * @param {function} [options.unmatch] fired when a query is no longer matched * @param {function} [options.setup] fired when handler first triggered * @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched * @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers */ register : function(q, options, shouldDegrade) { var queries = this.queries, isUnconditional = shouldDegrade && this.browserIsIncapable; if(!queries[q]) { queries[q] = new MediaQuery(q, isUnconditional); } //normalise to object in an array if(isFunction(options)) { options = { match : options }; } if(!isArray(options)) { options = [options]; } each(options, function(handler) { if (isFunction(handler)) { handler = { match : handler }; } queries[q].addHandler(handler); }); return this; }, /** * unregisters a query and all it's handlers, or a specific handler for a query * * @param {string} q the media query to target * @param {object || function} [handler] specific handler to unregister */ unregister : function(q, handler) { var query = this.queries[q]; if(query) { if(handler) { query.removeHandler(handler); } else { query.clear(); delete this.queries[q]; } } return this; } }; module.exports = MediaQueryDispatch; /***/ }), /***/ "Aa2f": /***/ (function(module, exports, __webpack_require__) { "use strict"; // ECMAScript 6 symbols shim var global = __webpack_require__("i1Q6"); var has = __webpack_require__("yS17"); var DESCRIPTORS = __webpack_require__("6MLN"); var $export = __webpack_require__("vSO4"); var redefine = __webpack_require__("gojl"); var META = __webpack_require__("e8vu").KEY; var $fails = __webpack_require__("wLcK"); var shared = __webpack_require__("NB7d"); var setToStringTag = __webpack_require__("11Ut"); var uid = __webpack_require__("X6va"); var wks = __webpack_require__("Ug9I"); var wksExt = __webpack_require__("ZxII"); var wksDefine = __webpack_require__("c2zY"); var enumKeys = __webpack_require__("ycyv"); var isArray = __webpack_require__("ayXv"); var anObject = __webpack_require__("zotD"); var isObject = __webpack_require__("BxvP"); var toIObject = __webpack_require__("Wyka"); var toPrimitive = __webpack_require__("EKwp"); var createDesc = __webpack_require__("0WCH"); var _create = __webpack_require__("TNJq"); var gOPNExt = __webpack_require__("rMkZ"); var $GOPD = __webpack_require__("sxPs"); var $DP = __webpack_require__("Gfzd"); var $keys = __webpack_require__("knrM"); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function'; var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function () { return _create(dP({}, 'a', { get: function () { return dP(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (it, key, D) { var protoDesc = gOPD(ObjectProto, key); if (protoDesc) delete ObjectProto[key]; dP(it, key, D); if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); } : dP; var wrap = function (tag) { var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { return typeof it == 'symbol'; } : function (it) { return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D) { if (it === ObjectProto) $defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if (has(AllSymbols, key)) { if (!D.enumerable) { if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; D = _create(D, { enumerable: createDesc(0, false) }); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P) { anObject(it); var keys = enumKeys(P = toIObject(P)); var i = 0; var l = keys.length; var key; while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P) { return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key) { var E = isEnum.call(this, key = toPrimitive(key, true)); if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { it = toIObject(it); key = toPrimitive(key, true); if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; var D = gOPD(it, key); if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it) { var names = gOPN(toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { var IS_OP = it === ObjectProto; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if (!USE_NATIVE) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function (value) { if (this === ObjectProto) $set.call(OPSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__("Ni5N").f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__("z7R8").f = $propertyIsEnumerable; __webpack_require__("Ocr3").f = $getOwnPropertySymbols; if (DESCRIPTORS && !__webpack_require__("1kq3")) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function (name) { return wrap(wks(name)); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); for (var es6Symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__("akPY")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }), /***/ "Ag0p": /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__("FTXF"); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /***/ "AkAO": /***/ (function(module, exports, __webpack_require__) { var _Object$setPrototypeOf = __webpack_require__("1ipW"); function _setPrototypeOf(o, p) { module.exports = _setPrototypeOf = _Object$setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } module.exports = _setPrototypeOf; /***/ }), /***/ "Aq8W": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("dXs8"), __esModule: true }; /***/ }), /***/ "Asjh": /***/ (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 ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /***/ "Awbb": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "B9Lq": /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__("yS17"); var toIObject = __webpack_require__("Wyka"); var arrayIndexOf = __webpack_require__("LNnS")(false); var IE_PROTO = __webpack_require__("/wuY")('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /***/ "BblM": /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /***/ "BtHH": /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__("mbLO"); var $getPrototypeOf = __webpack_require__("HHE0"); __webpack_require__("cOHw")('getPrototypeOf', function () { return function getPrototypeOf(it) { return $getPrototypeOf(toObject(it)); }; }); /***/ }), /***/ "Bw2v": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "BxvP": /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /***/ "C8N4": /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__("1RxS"), hashDelete = __webpack_require__("qBl2"), hashGet = __webpack_require__("hClK"), hashHas = __webpack_require__("YIaf"), hashSet = __webpack_require__("Ag0p"); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /***/ "CD/B": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("nFDa"); /***/ }), /***/ "COf8": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("OYXR"); var global = __webpack_require__("i1Q6"); var hide = __webpack_require__("akPY"); var Iterators = __webpack_require__("dhak"); var TO_STRING_TAG = __webpack_require__("Ug9I")('toStringTag'); var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /***/ "CXf5": /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__("4/4o"); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /***/ "CXfR": /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__("u9vI"), now = __webpack_require__("0pJf"), toNumber = __webpack_require__("iS0Z"); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * Creates a debounced function that delays invoking `func` until after `wait` * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. * Provide `options` to indicate whether `func` should be invoked on the * leading and/or trailing edge of the `wait` timeout. The `func` is invoked * with the last arguments provided to the debounced function. Subsequent * calls to the debounced function return the result of the last `func` * invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the debounced function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to debounce. * @param {number} [wait=0] The number of milliseconds to delay. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=false] * Specify invoking on the leading edge of the timeout. * @param {number} [options.maxWait] * The maximum time `func` is allowed to be delayed before it's invoked. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new debounced function. * @example * * // Avoid costly calculations while the window size is in flux. * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); * * // Invoke `sendMail` when clicked, debouncing subsequent calls. * jQuery(element).on('click', _.debounce(sendMail, 300, { * 'leading': true, * 'trailing': false * })); * * // Ensure `batchLog` is invoked once after 1 second of debounced calls. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); * var source = new EventSource('/stream'); * jQuery(source).on('message', debounced); * * // Cancel the trailing debounced invocation. * jQuery(window).on('popstate', debounced.cancel); */ function debounce(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject(options)) { leading = !!options.leading; maxing = 'maxWait' in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = 'trailing' in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = undefined; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { // Reset any `maxWait` timer. lastInvokeTime = time; // Start the timer for the trailing edge. timerId = setTimeout(timerExpired, wait); // Invoke the leading edge. return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } // Restart the timer. timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been // debounced at least once. if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = undefined; return result; } function cancel() { if (timerId !== undefined) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { return timerId === undefined ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === undefined) { return leadingEdge(lastCallTime); } if (maxing) { // Handle invocations in a tight loop. timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } module.exports = debounce; /***/ }), /***/ "E5Ce": /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__("ShN9"); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /***/ "E7HD": /***/ (function(module, exports) { function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } module.exports = _assertThisInitialized; /***/ }), /***/ "EKwp": /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__("BxvP"); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ "ES04": /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__("e5TX"), getPrototype = __webpack_require__("CXf5"), isObjectLike = __webpack_require__("OuyB"); /** `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; /***/ }), /***/ "Ef3f": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("ky2m"); /***/ }), /***/ "EiMJ": /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__("wtMJ"); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /***/ "Ewuv": /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__("yEjJ"); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /***/ "FFZn": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("3v7p"), __esModule: true }; /***/ }), /***/ "FIMm": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { /** Detect free variables */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; var freeModule = typeof module == 'object' && module && !module.nodeType && module; var freeGlobal = typeof global == 'object' && global; if ( freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal ) { root = freeGlobal; } /** * The `punycode` object. * @name punycode * @type Object */ var punycode, /** Highest positive signed 32-bit float value */ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 /** Bootstring parameters */ base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, // 0x80 delimiter = '-', // '\x2D' /** Regular expressions */ regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators /** Error messages */ errors = { 'overflow': 'Overflow: input needs wider integers to process', 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', 'invalid-input': 'Invalid input' }, /** Convenience shortcuts */ baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, /** Temporary variable */ key; /*--------------------------------------------------------------------------*/ /** * A generic error utility function. * @private * @param {String} type The error type. * @returns {Error} Throws a `RangeError` with the applicable error message. */ function error(type) { throw new RangeError(errors[type]); } /** * A generic `Array#map` utility function. * @private * @param {Array} array The array to iterate over. * @param {Function} callback The function that gets called for every array * item. * @returns {Array} A new array of values returned by the callback function. */ function map(array, fn) { var length = array.length; var result = []; while (length--) { result[length] = fn(array[length]); } return result; } /** * A simple `Array#map`-like wrapper to work with domain name strings or email * addresses. * @private * @param {String} domain The domain name or email address. * @param {Function} callback The function that gets called for every * character. * @returns {Array} A new string of characters returned by the callback * function. */ function mapDomain(string, fn) { var parts = string.split('@'); var result = ''; if (parts.length > 1) { // In email addresses, only the domain name should be punycoded. Leave // the local part (i.e. everything up to `@`) intact. result = parts[0] + '@'; string = parts[1]; } // Avoid `split(regex)` for IE8 compatibility. See #17. string = string.replace(regexSeparators, '\x2E'); var labels = string.split('.'); var encoded = map(labels, fn).join('.'); return result + encoded; } /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. * @see `punycode.ucs2.encode` * @see * @memberOf punycode.ucs2 * @name decode * @param {String} string The Unicode input string (UCS-2). * @returns {Array} The new array of code points. */ function ucs2decode(string) { var output = [], counter = 0, length = string.length, value, extra; while (counter < length) { value = string.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // high surrogate, and there is a next character extra = string.charCodeAt(counter++); if ((extra & 0xFC00) == 0xDC00) { // low surrogate output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // unmatched surrogate; only append this code unit, in case the next // code unit is the high surrogate of a surrogate pair output.push(value); counter--; } } else { output.push(value); } } return output; } /** * Creates a string based on an array of numeric code points. * @see `punycode.ucs2.decode` * @memberOf punycode.ucs2 * @name encode * @param {Array} codePoints The array of numeric code points. * @returns {String} The new Unicode string (UCS-2). */ function ucs2encode(array) { return map(array, function(value) { var output = ''; if (value > 0xFFFF) { value -= 0x10000; output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); value = 0xDC00 | value & 0x3FF; } output += stringFromCharCode(value); return output; }).join(''); } /** * Converts a basic code point into a digit/integer. * @see `digitToBasic()` * @private * @param {Number} codePoint The basic numeric code point value. * @returns {Number} The numeric value of a basic code point (for use in * representing integers) in the range `0` to `base - 1`, or `base` if * the code point does not represent a value. */ function basicToDigit(codePoint) { if (codePoint - 48 < 10) { return codePoint - 22; } if (codePoint - 65 < 26) { return codePoint - 65; } if (codePoint - 97 < 26) { return codePoint - 97; } return base; } /** * Converts a digit/integer into a basic code point. * @see `basicToDigit()` * @private * @param {Number} digit The numeric value of a basic code point. * @returns {Number} The basic code point whose value (when used for * representing integers) is `digit`, which needs to be in the range * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is * used; else, the lowercase form is used. The behavior is undefined * if `flag` is non-zero and `digit` has no uppercase form. */ function digitToBasic(digit, flag) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); } /** * Bias adaptation function as per section 3.4 of RFC 3492. * https://tools.ietf.org/html/rfc3492#section-3.4 * @private */ function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); } /** * Converts a Punycode string of ASCII-only symbols to a string of Unicode * symbols. * @memberOf punycode * @param {String} input The Punycode string of ASCII-only symbols. * @returns {String} The resulting string of Unicode symbols. */ function decode(input) { // Don't use UCS-2 var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, /** Cached calculation results */ baseMinusT; // Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the first basic code points to the output. basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } for (j = 0; j < basic; ++j) { // if it's not a basic code point if (input.charCodeAt(j) >= 0x80) { error('not-basic'); } output.push(input.charCodeAt(j)); } // Main decoding loop: start just after the last delimiter if any basic code // points were copied; start at the beginning otherwise. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { // `index` is the index of the next character to be consumed. // Decode a generalized variable-length integer into `delta`, // which gets added to `i`. The overflow checking is easier // if we increase `i` as we go, then subtract off its starting // value at the end to obtain `delta`. for (oldi = i, w = 1, k = base; /* no condition */; k += base) { if (index >= inputLength) { error('invalid-input'); } digit = basicToDigit(input.charCodeAt(index++)); if (digit >= base || digit > floor((maxInt - i) / w)) { error('overflow'); } i += digit * w; t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); if (digit < t) { break; } baseMinusT = base - t; if (w > floor(maxInt / baseMinusT)) { error('overflow'); } w *= baseMinusT; } out = output.length + 1; bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`, // incrementing `n` each time, so we'll fix that now: if (floor(i / out) > maxInt - n) { error('overflow'); } n += floor(i / out); i %= out; // Insert `n` at position `i` of the output output.splice(i++, 0, n); } return ucs2encode(output); } /** * Converts a string of Unicode symbols (e.g. a domain name label) to a * Punycode string of ASCII-only symbols. * @memberOf punycode * @param {String} input The string of Unicode symbols. * @returns {String} The resulting Punycode string of ASCII-only symbols. */ function encode(input) { var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], /** `inputLength` will hold the number of code points in `input`. */ inputLength, /** Cached calculation results */ handledCPCountPlusOne, baseMinusT, qMinusT; // Convert the input in UCS-2 to Unicode input = ucs2decode(input); // Cache the length inputLength = input.length; // Initialize the state n = initialN; delta = 0; bias = initialBias; // Handle the basic code points for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < 0x80) { output.push(stringFromCharCode(currentValue)); } } handledCPCount = basicLength = output.length; // `handledCPCount` is the number of code points that have been handled; // `basicLength` is the number of basic code points. // Finish the basic string - if it is not empty - with a delimiter if (basicLength) { output.push(delimiter); } // Main encoding loop: while (handledCPCount < inputLength) { // All non-basic code points < n have been handled already. Find the next // larger one: for (m = maxInt, j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue >= n && currentValue < m) { m = currentValue; } } // Increase `delta` enough to advance the decoder's state to , // but guard against overflow handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { error('overflow'); } delta += (m - n) * handledCPCountPlusOne; n = m; for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < n && ++delta > maxInt) { error('overflow'); } if (currentValue == n) { // Represent delta as a generalized variable-length integer for (q = delta, k = base; /* no condition */; k += base) { t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); if (q < t) { break; } qMinusT = q - t; baseMinusT = base - t; output.push( stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) ); q = floor(qMinusT / baseMinusT); } output.push(stringFromCharCode(digitToBasic(q, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); delta = 0; ++handledCPCount; } } ++delta; ++n; } return output.join(''); } /** * Converts a Punycode string representing a domain name or an email address * to Unicode. Only the Punycoded parts of the input will be converted, i.e. * it doesn't matter if you call it on a string that has already been * converted to Unicode. * @memberOf punycode * @param {String} input The Punycoded domain name or email address to * convert to Unicode. * @returns {String} The Unicode representation of the given Punycode * string. */ function toUnicode(input) { return mapDomain(input, function(string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; }); } /** * Converts a Unicode string representing a domain name or an email address to * Punycode. Only the non-ASCII parts of the domain name will be converted, * i.e. it doesn't matter if you call it with a domain that's already in * ASCII. * @memberOf punycode * @param {String} input The domain name or email address to convert, as a * Unicode string. * @returns {String} The Punycode representation of the given domain name or * email address. */ function toASCII(input) { return mapDomain(input, function(string) { return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; }); } /*--------------------------------------------------------------------------*/ /** Define the public API */ punycode = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ 'version': '1.4.1', /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see * @memberOf punycode * @type Object */ 'ucs2': { 'decode': ucs2decode, 'encode': ucs2encode }, 'decode': decode, 'encode': encode, 'toASCII': toASCII, 'toUnicode': toUnicode }; /** Expose `punycode` */ // Some AMD build optimizers, like r.js, check for specific condition patterns // like the following: if ( true ) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return punycode; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (freeExports && freeModule) { if (module.exports == freeExports) { // in Node.js, io.js, or RingoJS v0.8.0+ freeModule.exports = punycode; } else { // in Narwhal or RingoJS v0.7.0- for (key in punycode) { punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); } } } else { // in Rhino or a web browser root.punycode = punycode; } }(this)); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("l262")(module), __webpack_require__("h6ac"))) /***/ }), /***/ "FIbo": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"apiDoc":"apiDoc___1oXEp","apiItem":"apiItem___23BRD","apiItemTitle":"apiItemTitle___ccFSc","apiItemOperator":"apiItemOperator___1S8kj","apiItemDocs":"apiItemDocs___2Irkl"}; /***/ }), /***/ "FN88": /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /***/ "FTXF": /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__("bViC"); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /***/ "FwQQ": /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__("LN6c"), isObjectLike = __webpack_require__("OuyB"); /** * 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; /***/ }), /***/ "G3gK": /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__("ZC1a"); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /***/ "Gfzd": /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__("zotD"); var IE8_DOM_DEFINE = __webpack_require__("R6c1"); var toPrimitive = __webpack_require__("EKwp"); var dP = Object.defineProperty; exports.f = __webpack_require__("6MLN") ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /***/ "GmNU": /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /***/ "GyB/": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__("6t7t"); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__("ibPW"); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /***/ "HHE0": /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__("yS17"); var toObject = __webpack_require__("mbLO"); var IE_PROTO = __webpack_require__("/wuY")('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /***/ "HHEV": /***/ (function(module, exports, __webpack_require__) { "use strict"; var has = Object.prototype.hasOwnProperty; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); var compactQueue = function compactQueue(queue) { var obj; while (queue.length) { var item = queue.pop(); obj = item.obj[item.prop]; if (Array.isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== 'undefined') { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } return obj; }; var arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; var merge = function merge(target, source, options) { if (!source) { return target; } if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); } else if (typeof target === 'object') { if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (Array.isArray(target) && !Array.isArray(source)) { mergeTarget = arrayToObject(target, options); } if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { if (target[i] && typeof target[i] === 'object') { target[i] = merge(target[i], item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; var assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; var decode = function (str) { try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { return str; } }; var encode = function encode(str) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = typeof str === 'string' ? str : String(str); var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; var compact = function compact(value) { var queue = [{ obj: { o: value }, prop: 'o' }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { queue.push({ obj: obj, prop: key }); refs.push(val); } } } return compactQueue(queue); }; var isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; var isBuffer = function isBuffer(obj) { if (obj === null || typeof obj === 'undefined') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; module.exports = { arrayToObject: arrayToObject, assign: assign, compact: compact, decode: decode, encode: encode, isBuffer: isBuffer, isRegExp: isRegExp, merge: merge }; /***/ }), /***/ "IAnx": /***/ (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__("1n8/"); var factory = __webpack_require__("mdfe"); 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 ); /***/ }), /***/ "ID6i": /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /***/ "IMUl": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = getRule; /* harmony export (immutable) */ __webpack_exports__["b"] = postRule; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_url__ = __webpack_require__("Mej7"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_url___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_url__); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } // mock tableListDataSource var tableListDataSource = []; for (var i = 0; i < 46; i += 1) { tableListDataSource.push({ key: i, disabled: i % 6 === 0, href: 'https://ant.design', avatar: ['https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'][i % 2], no: "TradeCode ".concat(i), title: "\u4E00\u4E2A\u4EFB\u52A1\u540D\u79F0 ".concat(i), owner: '曲丽丽', description: '这是一段描述', callNo: Math.floor(Math.random() * 1000), status: Math.floor(Math.random() * 10) % 4, updatedAt: new Date("2017-07-".concat(Math.floor(i / 2) + 1)), createdAt: new Date("2017-07-".concat(Math.floor(i / 2) + 1)), progress: Math.ceil(Math.random() * 100) }); } function getRule(req, res, u) { var url = u; if (!url || Object.prototype.toString.call(url) !== '[object String]') { url = req.url; // eslint-disable-line } var params = Object(__WEBPACK_IMPORTED_MODULE_0_url__["parse"])(url, true).query; var dataSource = _toConsumableArray(tableListDataSource); if (params.sorter) { var s = params.sorter.split('_'); dataSource = dataSource.sort(function (prev, next) { if (s[1] === 'descend') { return next[s[0]] - prev[s[0]]; } return prev[s[0]] - next[s[0]]; }); } if (params.status) { var status = params.status.split(','); var filterDataSource = []; status.forEach(function (s) { filterDataSource = filterDataSource.concat(_toConsumableArray(dataSource).filter(function (data) { return parseInt(data.status, 10) === parseInt(s[0], 10); })); }); dataSource = filterDataSource; } if (params.no) { dataSource = dataSource.filter(function (data) { return data.no.indexOf(params.no) > -1; }); } var pageSize = 10; if (params.pageSize) { pageSize = params.pageSize * 1; } var result = { list: dataSource, pagination: { total: dataSource.length, pageSize: pageSize, current: parseInt(params.currentPage, 10) || 1 } }; if (res && res.json) { res.json(result); } else { return result; } } function postRule(req, res, u, b) { var url = u; if (!url || Object.prototype.toString.call(url) !== '[object String]') { url = req.url; // eslint-disable-line } var body = b && b.body || req.body; var method = body.method, no = body.no, description = body.description; switch (method) { /* eslint no-case-declarations:0 */ case 'delete': tableListDataSource = tableListDataSource.filter(function (item) { return no.indexOf(item.no) === -1; }); break; case 'post': var _i = Math.ceil(Math.random() * 10000); tableListDataSource.unshift({ key: _i, href: 'https://ant.design', avatar: ['https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'][_i % 2], no: "TradeCode ".concat(_i), title: "\u4E00\u4E2A\u4EFB\u52A1\u540D\u79F0 ".concat(_i), owner: '曲丽丽', description: description, callNo: Math.floor(Math.random() * 1000), status: Math.floor(Math.random() * 10) % 2, updatedAt: new Date(), createdAt: new Date(), progress: Math.ceil(Math.random() * 100) }); break; default: break; } var result = { list: tableListDataSource, pagination: { total: tableListDataSource.length } }; if (res && res.json) { res.json(result); } else { return result; } } /* unused harmony default export */ var _unused_webpack_default_export = ({ getRule: getRule, postRule: postRule }); /***/ }), /***/ "IxO8": /***/ (function(module, exports, __webpack_require__) { var _Object$defineProperty = __webpack_require__("OPWY"); 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; } module.exports = _defineProperty; /***/ }), /***/ "J4Nk": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /***/ "J6GP": /***/ (function(module, exports, __webpack_require__) { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // If obj.hasOwnProperty has been overridden, then calling // obj.hasOwnProperty(prop) will break. // See: https://github.com/joyent/node/issues/1707 function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = function(qs, sep, eq, options) { sep = sep || '&'; eq = eq || '='; var obj = {}; if (typeof qs !== 'string' || qs.length === 0) { return obj; } var regexp = /\+/g; qs = qs.split(sep); var maxKeys = 1000; if (options && typeof options.maxKeys === 'number') { maxKeys = options.maxKeys; } var len = qs.length; // maxKeys <= 0 means that we should not limit keys count if (maxKeys > 0 && len > maxKeys) { len = maxKeys; } for (var i = 0; i < len; ++i) { var x = qs[i].replace(regexp, '%20'), idx = x.indexOf(eq), kstr, vstr, k, v; if (idx >= 0) { kstr = x.substr(0, idx); vstr = x.substr(idx + 1); } else { kstr = x; vstr = ''; } k = decodeURIComponent(kstr); v = decodeURIComponent(vstr); if (!hasOwnProperty(obj, k)) { obj[k] = v; } else if (isArray(obj[k])) { obj[k].push(v); } else { obj[k] = [obj[k], v]; } } return obj; }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; /***/ }), /***/ "Jpv1": /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /***/ "K9uV": /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__("bViC"), root = __webpack_require__("MIhM"); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /***/ "KJil": /***/ (function(module, exports, __webpack_require__) { /** * lodash 3.1.2 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ var getNative = __webpack_require__("PhnU"), isArguments = __webpack_require__("X7qz"), isArray = __webpack_require__("x+C/"); /** Used to detect unsigned integer values. */ var reIsUint = /^\d+$/; /** Used for native method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /* Native method references for those with the same name as other `lodash` methods. */ var nativeKeys = getNative(Object, 'keys'); /** * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } /** * Gets the "length" property value of `object`. * * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) * that affects Safari on at least iOS 8.1-8.3 ARM64. * * @private * @param {Object} object The object to query. * @returns {*} Returns the "length" value. */ var getLength = baseProperty('length'); /** * Checks if `value` is array-like. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. */ function isArrayLike(value) { return value != null && isLength(getLength(value)); } /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; length = length == null ? MAX_SAFE_INTEGER : length; return value > -1 && value % 1 == 0 && value < length; } /** * Checks if `value` is a valid array-like length. * * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * A fallback implementation of `Object.keys` which creates an array of the * own enumerable property names of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function shimKeys(object) { var props = keysIn(object), propsLength = props.length, length = propsLength && object.length; var allowIndexes = !!length && isLength(length) && (isArray(object) || isArguments(object)); var index = -1, result = []; while (++index < propsLength) { var key = props[index]; if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { result.push(key); } } return result; } /** * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(1); * // => false */ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; return !!value && (type == 'object' || type == 'function'); } /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) * for more details. * * @static * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ var keys = !nativeKeys ? shimKeys : function(object) { var Ctor = object == null ? undefined : object.constructor; if ((typeof Ctor == 'function' && Ctor.prototype === object) || (typeof object != 'function' && isArrayLike(object))) { return shimKeys(object); } return isObject(object) ? nativeKeys(object) : []; }; /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { if (object == null) { return []; } if (!isObject(object)) { object = Object(object); } var length = object.length; length = (length && isLength(length) && (isArray(object) || isArguments(object)) && length) || 0; var Ctor = object.constructor, index = -1, isProto = typeof Ctor == 'function' && Ctor.prototype === object, result = Array(length), skipIndexes = length > 0; while (++index < length) { result[index] = (index + ''); } for (var key in object) { if (!(skipIndexes && isIndex(key, length)) && !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = keys; /***/ }), /***/ "KRxT": /***/ (function(module, exports, __webpack_require__) { var baseSetToString = __webpack_require__("UJWv"), shortOut = __webpack_require__("2NNl"); /** * 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; /***/ }), /***/ "KW17": /***/ (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 canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); /** * Simple, lightweight module assisting with the detection and context of * Worker. Helps avoid circular dependencies and allows code to reason about * whether or not they are in a Worker, even if they never include the main * `ReactWorker` dependency. */ var ExecutionEnvironment = { canUseDOM: canUseDOM, canUseWorkers: typeof Worker !== 'undefined', canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), canUseViewport: canUseDOM && !!window.screen, isInWorker: !canUseDOM // For now, this is true - might change in the future. }; module.exports = ExecutionEnvironment; /***/ }), /***/ "Kbq2": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "Ku7I": /***/ (function(module, exports, __webpack_require__) { "use strict"; 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 ? "symbol" : typeof obj; }; var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; function getClientPosition(elem) { var box = undefined; var x = undefined; var y = undefined; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } function _getComputedStyle(elem, name, computedStyle_) { var val = ''; var d = elem.ownerDocument; var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } var getComputedStyleX = undefined; if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = undefined; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = undefined; var j = undefined; var i = undefined; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = undefined; if (prop === 'border') { cssProp = prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj != null && obj == obj.window; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, extra) { if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue == null || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue == null || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } if (borderBoxValueOrIsBorderBox) { var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle); return val + (extra === BORDER_INDEX ? 0 : padding); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay(elem) { var val = undefined; var args = arguments; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value += 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, val) { if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); // 设置 elem 相对 elem.ownerDocument 的坐标 function setOffset(elem, offset) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var old = getOffset(elem); var ret = {}; var current = undefined; var key = undefined; for (key in offset) { if (offset.hasOwnProperty(key)) { current = parseFloat(css(elem, key)) || 0; ret[key] = current + offset[key] - old[key]; } } css(elem, ret); } module.exports = _extends({ getWindow: function getWindow(node) { var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, offset: function offset(el, value) { if (typeof value !== 'undefined') { setOffset(el, value); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var ret = {}; for (var i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (var i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, scrollLeft: function scrollLeft(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollLeft(w); } window.scrollTo(v, getScrollTop(w)); } else { if (v === undefined) { return w.scrollLeft; } w.scrollLeft = v; } }, scrollTop: function scrollTop(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollTop(w); } window.scrollTo(getScrollLeft(w), v); } else { if (v === undefined) { return w.scrollTop; } w.scrollTop = v; } }, viewportWidth: 0, viewportHeight: 0 }, domUtils); /***/ }), /***/ "KxjL": /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /***/ "Ky5l": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("Aa2f"); __webpack_require__("tuDi"); __webpack_require__("c6mp"); __webpack_require__("2mwf"); module.exports = __webpack_require__("zKeE").Symbol; /***/ }), /***/ "LIpy": /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /***/ "LN6c": /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__("dRuq"), isLength = __webpack_require__("GmNU"); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /***/ "LNnS": /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__("Wyka"); var toLength = __webpack_require__("S7IM"); var toAbsoluteIndex = __webpack_require__("Zwq5"); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /***/ "Lli7": /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__("Ug9I")('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; }; /***/ }), /***/ "M4O7": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * @ignore * base event object for custom and dom event. * @author yiminghe@gmail.com */ function returnFalse() { return false; } function returnTrue() { return true; } function EventBaseObject() { this.timeStamp = Date.now(); this.target = undefined; this.currentTarget = undefined; } EventBaseObject.prototype = { isEventObject: 1, constructor: EventBaseObject, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function preventDefault() { this.isDefaultPrevented = returnTrue; }, stopPropagation: function stopPropagation() { this.isPropagationStopped = returnTrue; }, stopImmediatePropagation: function stopImmediatePropagation() { this.isImmediatePropagationStopped = returnTrue; // fixed 1.2 // call stopPropagation implicitly this.stopPropagation(); }, halt: function halt(immediate) { if (immediate) { this.stopImmediatePropagation(); } else { this.stopPropagation(); } this.preventDefault(); } }; exports["default"] = EventBaseObject; module.exports = exports['default']; /***/ }), /***/ "MCp7": /***/ (function(module, exports) { (function(self) { 'use strict'; if (self.fetch) { return } var support = { searchParams: 'URLSearchParams' in self, iterable: 'Symbol' in self && 'iterator' in Symbol, blob: 'FileReader' in self && 'Blob' in self && (function() { try { new Blob() return true } catch(e) { return false } })(), formData: 'FormData' in self, arrayBuffer: 'ArrayBuffer' in self } if (support.arrayBuffer) { var viewClasses = [ '[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]' ] var isDataView = function(obj) { return obj && DataView.prototype.isPrototypeOf(obj) } var isArrayBufferView = ArrayBuffer.isView || function(obj) { return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 } } function normalizeName(name) { if (typeof name !== 'string') { name = String(name) } if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) { throw new TypeError('Invalid character in header field name') } return name.toLowerCase() } function normalizeValue(value) { if (typeof value !== 'string') { value = String(value) } return value } // Build a destructive iterator for the value list function iteratorFor(items) { var iterator = { next: function() { var value = items.shift() return {done: value === undefined, value: value} } } if (support.iterable) { iterator[Symbol.iterator] = function() { return iterator } } return iterator } function Headers(headers) { this.map = {} if (headers instanceof Headers) { headers.forEach(function(value, name) { this.append(name, value) }, this) } else if (Array.isArray(headers)) { headers.forEach(function(header) { this.append(header[0], header[1]) }, this) } else if (headers) { Object.getOwnPropertyNames(headers).forEach(function(name) { this.append(name, headers[name]) }, this) } } Headers.prototype.append = function(name, value) { name = normalizeName(name) value = normalizeValue(value) var oldValue = this.map[name] this.map[name] = oldValue ? oldValue+','+value : value } Headers.prototype['delete'] = function(name) { delete this.map[normalizeName(name)] } Headers.prototype.get = function(name) { name = normalizeName(name) return this.has(name) ? this.map[name] : null } Headers.prototype.has = function(name) { return this.map.hasOwnProperty(normalizeName(name)) } Headers.prototype.set = function(name, value) { this.map[normalizeName(name)] = normalizeValue(value) } Headers.prototype.forEach = function(callback, thisArg) { for (var name in this.map) { if (this.map.hasOwnProperty(name)) { callback.call(thisArg, this.map[name], name, this) } } } Headers.prototype.keys = function() { var items = [] this.forEach(function(value, name) { items.push(name) }) return iteratorFor(items) } Headers.prototype.values = function() { var items = [] this.forEach(function(value) { items.push(value) }) return iteratorFor(items) } Headers.prototype.entries = function() { var items = [] this.forEach(function(value, name) { items.push([name, value]) }) return iteratorFor(items) } if (support.iterable) { Headers.prototype[Symbol.iterator] = Headers.prototype.entries } function consumed(body) { if (body.bodyUsed) { return Promise.reject(new TypeError('Already read')) } body.bodyUsed = true } function fileReaderReady(reader) { return new Promise(function(resolve, reject) { reader.onload = function() { resolve(reader.result) } reader.onerror = function() { reject(reader.error) } }) } function readBlobAsArrayBuffer(blob) { var reader = new FileReader() var promise = fileReaderReady(reader) reader.readAsArrayBuffer(blob) return promise } function readBlobAsText(blob) { var reader = new FileReader() var promise = fileReaderReady(reader) reader.readAsText(blob) return promise } function readArrayBufferAsText(buf) { var view = new Uint8Array(buf) var chars = new Array(view.length) for (var i = 0; i < view.length; i++) { chars[i] = String.fromCharCode(view[i]) } return chars.join('') } function bufferClone(buf) { if (buf.slice) { return buf.slice(0) } else { var view = new Uint8Array(buf.byteLength) view.set(new Uint8Array(buf)) return view.buffer } } function Body() { this.bodyUsed = false this._initBody = function(body) { this._bodyInit = body if (!body) { this._bodyText = '' } else if (typeof body === 'string') { this._bodyText = body } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { this._bodyBlob = body } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { this._bodyFormData = body } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { this._bodyText = body.toString() } else if (support.arrayBuffer && support.blob && isDataView(body)) { this._bodyArrayBuffer = bufferClone(body.buffer) // IE 10-11 can't handle a DataView body. this._bodyInit = new Blob([this._bodyArrayBuffer]) } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { this._bodyArrayBuffer = bufferClone(body) } else { throw new Error('unsupported BodyInit type') } if (!this.headers.get('content-type')) { if (typeof body === 'string') { this.headers.set('content-type', 'text/plain;charset=UTF-8') } else if (this._bodyBlob && this._bodyBlob.type) { this.headers.set('content-type', this._bodyBlob.type) } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8') } } } if (support.blob) { this.blob = function() { var rejected = consumed(this) if (rejected) { return rejected } if (this._bodyBlob) { return Promise.resolve(this._bodyBlob) } else if (this._bodyArrayBuffer) { return Promise.resolve(new Blob([this._bodyArrayBuffer])) } else if (this._bodyFormData) { throw new Error('could not read FormData body as blob') } else { return Promise.resolve(new Blob([this._bodyText])) } } this.arrayBuffer = function() { if (this._bodyArrayBuffer) { return consumed(this) || Promise.resolve(this._bodyArrayBuffer) } else { return this.blob().then(readBlobAsArrayBuffer) } } } this.text = function() { var rejected = consumed(this) if (rejected) { return rejected } if (this._bodyBlob) { return readBlobAsText(this._bodyBlob) } else if (this._bodyArrayBuffer) { return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) } else if (this._bodyFormData) { throw new Error('could not read FormData body as text') } else { return Promise.resolve(this._bodyText) } } if (support.formData) { this.formData = function() { return this.text().then(decode) } } this.json = function() { return this.text().then(JSON.parse) } return this } // HTTP methods whose capitalization should be normalized var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] function normalizeMethod(method) { var upcased = method.toUpperCase() return (methods.indexOf(upcased) > -1) ? upcased : method } function Request(input, options) { options = options || {} var body = options.body if (input instanceof Request) { if (input.bodyUsed) { throw new TypeError('Already read') } this.url = input.url this.credentials = input.credentials if (!options.headers) { this.headers = new Headers(input.headers) } this.method = input.method this.mode = input.mode if (!body && input._bodyInit != null) { body = input._bodyInit input.bodyUsed = true } } else { this.url = String(input) } this.credentials = options.credentials || this.credentials || 'omit' if (options.headers || !this.headers) { this.headers = new Headers(options.headers) } this.method = normalizeMethod(options.method || this.method || 'GET') this.mode = options.mode || this.mode || null this.referrer = null if ((this.method === 'GET' || this.method === 'HEAD') && body) { throw new TypeError('Body not allowed for GET or HEAD requests') } this._initBody(body) } Request.prototype.clone = function() { return new Request(this, { body: this._bodyInit }) } function decode(body) { var form = new FormData() body.trim().split('&').forEach(function(bytes) { if (bytes) { var split = bytes.split('=') var name = split.shift().replace(/\+/g, ' ') var value = split.join('=').replace(/\+/g, ' ') form.append(decodeURIComponent(name), decodeURIComponent(value)) } }) return form } function parseHeaders(rawHeaders) { var headers = new Headers() // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space // https://tools.ietf.org/html/rfc7230#section-3.2 var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ') preProcessedHeaders.split(/\r?\n/).forEach(function(line) { var parts = line.split(':') var key = parts.shift().trim() if (key) { var value = parts.join(':').trim() headers.append(key, value) } }) return headers } Body.call(Request.prototype) function Response(bodyInit, options) { if (!options) { options = {} } this.type = 'default' this.status = options.status === undefined ? 200 : options.status this.ok = this.status >= 200 && this.status < 300 this.statusText = 'statusText' in options ? options.statusText : 'OK' this.headers = new Headers(options.headers) this.url = options.url || '' this._initBody(bodyInit) } Body.call(Response.prototype) Response.prototype.clone = function() { return new Response(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new Headers(this.headers), url: this.url }) } Response.error = function() { var response = new Response(null, {status: 0, statusText: ''}) response.type = 'error' return response } var redirectStatuses = [301, 302, 303, 307, 308] Response.redirect = function(url, status) { if (redirectStatuses.indexOf(status) === -1) { throw new RangeError('Invalid status code') } return new Response(null, {status: status, headers: {location: url}}) } self.Headers = Headers self.Request = Request self.Response = Response self.fetch = function(input, init) { return new Promise(function(resolve, reject) { var request = new Request(input, init) var xhr = new XMLHttpRequest() xhr.onload = function() { var options = { status: xhr.status, statusText: xhr.statusText, headers: parseHeaders(xhr.getAllResponseHeaders() || '') } options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') var body = 'response' in xhr ? xhr.response : xhr.responseText resolve(new Response(body, options)) } xhr.onerror = function() { reject(new TypeError('Network request failed')) } xhr.ontimeout = function() { reject(new TypeError('Network request failed')) } xhr.open(request.method, request.url, true) if (request.credentials === 'include') { xhr.withCredentials = true } else if (request.credentials === 'omit') { xhr.withCredentials = false } if ('responseType' in xhr && support.blob) { xhr.responseType = 'blob' } request.headers.forEach(function(value, name) { xhr.setRequestHeader(name, value) }) xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) }) } self.fetch.polyfill = true })(typeof self !== 'undefined' ? self : this); /***/ }), /***/ "MIhM": /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__("j3D9"); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /***/ "Mej7": /***/ (function(module, exports, __webpack_require__) { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var punycode = __webpack_require__("FIMm"); var util = __webpack_require__("5YsI"); exports.parse = urlParse; exports.resolve = urlResolve; exports.resolveObject = urlResolveObject; exports.format = urlFormat; exports.Url = Url; function Url() { this.protocol = null; this.slashes = null; this.auth = null; this.host = null; this.port = null; this.hostname = null; this.hash = null; this.search = null; this.query = null; this.pathname = null; this.path = null; this.href = null; } // Reference: RFC 3986, RFC 1808, RFC 2396 // define these here so at least they only have to be // compiled once on the first module load. var protocolPattern = /^([a-z0-9.+-]+:)/i, portPattern = /:[0-9]*$/, // Special case for a simple path URL simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, // RFC 2396: characters reserved for delimiting URLs. // We actually just auto-escape these. delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], // RFC 2396: characters not allowed for various reasons. unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), // Allowed by RFCs, but cause of XSS attacks. Always escape these. autoEscape = ['\''].concat(unwise), // Characters that are never ever allowed in a hostname. // Note that any invalid chars are also handled, but these // are the ones that are *expected* to be seen, so we fast-path // them. nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), hostEndingChars = ['/', '?', '#'], hostnameMaxLen = 255, hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, // protocols that can allow "unsafe" and "unwise" chars. unsafeProtocol = { 'javascript': true, 'javascript:': true }, // protocols that never have a hostname. hostlessProtocol = { 'javascript': true, 'javascript:': true }, // protocols that always contain a // bit. slashedProtocol = { 'http': true, 'https': true, 'ftp': true, 'gopher': true, 'file': true, 'http:': true, 'https:': true, 'ftp:': true, 'gopher:': true, 'file:': true }, querystring = __webpack_require__("+00f"); function urlParse(url, parseQueryString, slashesDenoteHost) { if (url && util.isObject(url) && url instanceof Url) return url; var u = new Url; u.parse(url, parseQueryString, slashesDenoteHost); return u; } Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { if (!util.isString(url)) { throw new TypeError("Parameter 'url' must be a string, not " + typeof url); } // Copy chrome, IE, opera backslash-handling behavior. // Back slashes before the query string get converted to forward slashes // See: https://code.google.com/p/chromium/issues/detail?id=25916 var queryIndex = url.indexOf('?'), splitter = (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', uSplit = url.split(splitter), slashRegex = /\\/g; uSplit[0] = uSplit[0].replace(slashRegex, '/'); url = uSplit.join(splitter); var rest = url; // trim before proceeding. // This is to support parse stuff like " http://foo.com \n" rest = rest.trim(); if (!slashesDenoteHost && url.split('#').length === 1) { // Try fast path regexp var simplePath = simplePathPattern.exec(rest); if (simplePath) { this.path = rest; this.href = rest; this.pathname = simplePath[1]; if (simplePath[2]) { this.search = simplePath[2]; if (parseQueryString) { this.query = querystring.parse(this.search.substr(1)); } else { this.query = this.search.substr(1); } } else if (parseQueryString) { this.search = ''; this.query = {}; } return this; } } var proto = protocolPattern.exec(rest); if (proto) { proto = proto[0]; var lowerProto = proto.toLowerCase(); this.protocol = lowerProto; rest = rest.substr(proto.length); } // figure out if it's got a host // user@server is *always* interpreted as a hostname, and url // resolution will treat //foo/bar as host=foo,path=bar because that's // how the browser resolves relative URLs. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { var slashes = rest.substr(0, 2) === '//'; if (slashes && !(proto && hostlessProtocol[proto])) { rest = rest.substr(2); this.slashes = true; } } if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) { // there's a hostname. // the first instance of /, ?, ;, or # ends the host. // // If there is an @ in the hostname, then non-host chars *are* allowed // to the left of the last @ sign, unless some host-ending character // comes *before* the @-sign. // URLs are obnoxious. // // ex: // http://a@b@c/ => user:a@b host:c // http://a@b?@c => user:a host:c path:/?@c // v0.12 TODO(isaacs): This is not quite how Chrome does things. // Review our test case against browsers more comprehensively. // find the first instance of any hostEndingChars var hostEnd = -1; for (var i = 0; i < hostEndingChars.length; i++) { var hec = rest.indexOf(hostEndingChars[i]); if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; } // at this point, either we have an explicit point where the // auth portion cannot go past, or the last @ char is the decider. var auth, atSign; if (hostEnd === -1) { // atSign can be anywhere. atSign = rest.lastIndexOf('@'); } else { // atSign must be in auth portion. // http://a@b/c@d => host:b auth:a path:/c@d atSign = rest.lastIndexOf('@', hostEnd); } // Now we have a portion which is definitely the auth. // Pull that off. if (atSign !== -1) { auth = rest.slice(0, atSign); rest = rest.slice(atSign + 1); this.auth = decodeURIComponent(auth); } // the host is the remaining to the left of the first non-host char hostEnd = -1; for (var i = 0; i < nonHostChars.length; i++) { var hec = rest.indexOf(nonHostChars[i]); if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; } // if we still have not hit it, then the entire thing is a host. if (hostEnd === -1) hostEnd = rest.length; this.host = rest.slice(0, hostEnd); rest = rest.slice(hostEnd); // pull out port. this.parseHost(); // we've indicated that there is a hostname, // so even if it's empty, it has to be present. this.hostname = this.hostname || ''; // if hostname begins with [ and ends with ] // assume that it's an IPv6 address. var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; // validate a little. if (!ipv6Hostname) { var hostparts = this.hostname.split(/\./); for (var i = 0, l = hostparts.length; i < l; i++) { var part = hostparts[i]; if (!part) continue; if (!part.match(hostnamePartPattern)) { var newpart = ''; for (var j = 0, k = part.length; j < k; j++) { if (part.charCodeAt(j) > 127) { // we replace non-ASCII char with a temporary placeholder // we need this to make sure size of hostname is not // broken by replacing non-ASCII by nothing newpart += 'x'; } else { newpart += part[j]; } } // we test again with ASCII char only if (!newpart.match(hostnamePartPattern)) { var validParts = hostparts.slice(0, i); var notHost = hostparts.slice(i + 1); var bit = part.match(hostnamePartStart); if (bit) { validParts.push(bit[1]); notHost.unshift(bit[2]); } if (notHost.length) { rest = '/' + notHost.join('.') + rest; } this.hostname = validParts.join('.'); break; } } } } if (this.hostname.length > hostnameMaxLen) { this.hostname = ''; } else { // hostnames are always lower case. this.hostname = this.hostname.toLowerCase(); } if (!ipv6Hostname) { // IDNA Support: Returns a punycoded representation of "domain". // It only converts parts of the domain name that // have non-ASCII characters, i.e. it doesn't matter if // you call it with a domain that already is ASCII-only. this.hostname = punycode.toASCII(this.hostname); } var p = this.port ? ':' + this.port : ''; var h = this.hostname || ''; this.host = h + p; this.href += this.host; // strip [ and ] from the hostname // the host field still retains them, though if (ipv6Hostname) { this.hostname = this.hostname.substr(1, this.hostname.length - 2); if (rest[0] !== '/') { rest = '/' + rest; } } } // now rest is set to the post-host stuff. // chop off any delim chars. if (!unsafeProtocol[lowerProto]) { // First, make 100% sure that any "autoEscape" chars get // escaped, even if encodeURIComponent doesn't think they // need to be. for (var i = 0, l = autoEscape.length; i < l; i++) { var ae = autoEscape[i]; if (rest.indexOf(ae) === -1) continue; var esc = encodeURIComponent(ae); if (esc === ae) { esc = escape(ae); } rest = rest.split(ae).join(esc); } } // chop off from the tail first. var hash = rest.indexOf('#'); if (hash !== -1) { // got a fragment string. this.hash = rest.substr(hash); rest = rest.slice(0, hash); } var qm = rest.indexOf('?'); if (qm !== -1) { this.search = rest.substr(qm); this.query = rest.substr(qm + 1); if (parseQueryString) { this.query = querystring.parse(this.query); } rest = rest.slice(0, qm); } else if (parseQueryString) { // no query string, but parseQueryString still requested this.search = ''; this.query = {}; } if (rest) this.pathname = rest; if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { this.pathname = '/'; } //to support http.request if (this.pathname || this.search) { var p = this.pathname || ''; var s = this.search || ''; this.path = p + s; } // finally, reconstruct the href based on what has been validated. this.href = this.format(); return this; }; // format a parsed object into a url string function urlFormat(obj) { // ensure it's an object, and not a string url. // If it's an obj, this is a no-op. // this way, you can call url_format() on strings // to clean up potentially wonky urls. if (util.isString(obj)) obj = urlParse(obj); if (!(obj instanceof Url)) return Url.prototype.format.call(obj); return obj.format(); } Url.prototype.format = function() { var auth = this.auth || ''; if (auth) { auth = encodeURIComponent(auth); auth = auth.replace(/%3A/i, ':'); auth += '@'; } var protocol = this.protocol || '', pathname = this.pathname || '', hash = this.hash || '', host = false, query = ''; if (this.host) { host = auth + this.host; } else if (this.hostname) { host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']'); if (this.port) { host += ':' + this.port; } } if (this.query && util.isObject(this.query) && Object.keys(this.query).length) { query = querystring.stringify(this.query); } var search = this.search || (query && ('?' + query)) || ''; if (protocol && protocol.substr(-1) !== ':') protocol += ':'; // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. // unless they had them to begin with. if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { host = '//' + (host || ''); if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; } else if (!host) { host = ''; } if (hash && hash.charAt(0) !== '#') hash = '#' + hash; if (search && search.charAt(0) !== '?') search = '?' + search; pathname = pathname.replace(/[?#]/g, function(match) { return encodeURIComponent(match); }); search = search.replace('#', '%23'); return protocol + host + pathname + search + hash; }; function urlResolve(source, relative) { return urlParse(source, false, true).resolve(relative); } Url.prototype.resolve = function(relative) { return this.resolveObject(urlParse(relative, false, true)).format(); }; function urlResolveObject(source, relative) { if (!source) return relative; return urlParse(source, false, true).resolveObject(relative); } Url.prototype.resolveObject = function(relative) { if (util.isString(relative)) { var rel = new Url(); rel.parse(relative, false, true); relative = rel; } var result = new Url(); var tkeys = Object.keys(this); for (var tk = 0; tk < tkeys.length; tk++) { var tkey = tkeys[tk]; result[tkey] = this[tkey]; } // hash is always overridden, no matter what. // even href="" will remove it. result.hash = relative.hash; // if the relative url is empty, then there's nothing left to do here. if (relative.href === '') { result.href = result.format(); return result; } // hrefs like //foo/bar always cut to the protocol. if (relative.slashes && !relative.protocol) { // take everything except the protocol from relative var rkeys = Object.keys(relative); for (var rk = 0; rk < rkeys.length; rk++) { var rkey = rkeys[rk]; if (rkey !== 'protocol') result[rkey] = relative[rkey]; } //urlParse appends trailing / to urls like http://www.example.com if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { result.path = result.pathname = '/'; } result.href = result.format(); return result; } if (relative.protocol && relative.protocol !== result.protocol) { // if it's a known url protocol, then changing // the protocol does weird things // first, if it's not file:, then we MUST have a host, // and if there was a path // to begin with, then we MUST have a path. // if it is file:, then the host is dropped, // because that's known to be hostless. // anything else is assumed to be absolute. if (!slashedProtocol[relative.protocol]) { var keys = Object.keys(relative); for (var v = 0; v < keys.length; v++) { var k = keys[v]; result[k] = relative[k]; } result.href = result.format(); return result; } result.protocol = relative.protocol; if (!relative.host && !hostlessProtocol[relative.protocol]) { var relPath = (relative.pathname || '').split('/'); while (relPath.length && !(relative.host = relPath.shift())); if (!relative.host) relative.host = ''; if (!relative.hostname) relative.hostname = ''; if (relPath[0] !== '') relPath.unshift(''); if (relPath.length < 2) relPath.unshift(''); result.pathname = relPath.join('/'); } else { result.pathname = relative.pathname; } result.search = relative.search; result.query = relative.query; result.host = relative.host || ''; result.auth = relative.auth; result.hostname = relative.hostname || relative.host; result.port = relative.port; // to support http.request if (result.pathname || result.search) { var p = result.pathname || ''; var s = result.search || ''; result.path = p + s; } result.slashes = result.slashes || relative.slashes; result.href = result.format(); return result; } var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), isRelAbs = ( relative.host || relative.pathname && relative.pathname.charAt(0) === '/' ), mustEndAbs = (isRelAbs || isSourceAbs || (result.host && relative.pathname)), removeAllDots = mustEndAbs, srcPath = result.pathname && result.pathname.split('/') || [], relPath = relative.pathname && relative.pathname.split('/') || [], psychotic = result.protocol && !slashedProtocol[result.protocol]; // if the url is a non-slashed url, then relative // links like ../.. should be able // to crawl up to the hostname, as well. This is strange. // result.protocol has already been set by now. // Later on, put the first path part into the host field. if (psychotic) { result.hostname = ''; result.port = null; if (result.host) { if (srcPath[0] === '') srcPath[0] = result.host; else srcPath.unshift(result.host); } result.host = ''; if (relative.protocol) { relative.hostname = null; relative.port = null; if (relative.host) { if (relPath[0] === '') relPath[0] = relative.host; else relPath.unshift(relative.host); } relative.host = null; } mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); } if (isRelAbs) { // it's absolute. result.host = (relative.host || relative.host === '') ? relative.host : result.host; result.hostname = (relative.hostname || relative.hostname === '') ? relative.hostname : result.hostname; result.search = relative.search; result.query = relative.query; srcPath = relPath; // fall through to the dot-handling below. } else if (relPath.length) { // it's relative // throw away the existing file, and take the new path instead. if (!srcPath) srcPath = []; srcPath.pop(); srcPath = srcPath.concat(relPath); result.search = relative.search; result.query = relative.query; } else if (!util.isNullOrUndefined(relative.search)) { // just pull out the search. // like href='?foo'. // Put this after the other two cases because it simplifies the booleans if (psychotic) { result.hostname = result.host = srcPath.shift(); //occationaly the auth can get stuck only in host //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; if (authInHost) { result.auth = authInHost.shift(); result.host = result.hostname = authInHost.shift(); } } result.search = relative.search; result.query = relative.query; //to support http.request if (!util.isNull(result.pathname) || !util.isNull(result.search)) { result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); } result.href = result.format(); return result; } if (!srcPath.length) { // no path at all. easy. // we've already handled the other stuff above. result.pathname = null; //to support http.request if (result.search) { result.path = '/' + result.search; } else { result.path = null; } result.href = result.format(); return result; } // if a url ENDs in . or .., then it must get a trailing slash. // however, if it ends in anything else non-slashy, // then it must NOT get a trailing slash. var last = srcPath.slice(-1)[0]; var hasTrailingSlash = ( (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === ''); // strip single dots, resolve double dots to parent dir // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = srcPath.length; i >= 0; i--) { last = srcPath[i]; if (last === '.') { srcPath.splice(i, 1); } else if (last === '..') { srcPath.splice(i, 1); up++; } else if (up) { srcPath.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (!mustEndAbs && !removeAllDots) { for (; up--; up) { srcPath.unshift('..'); } } if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { srcPath.unshift(''); } if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { srcPath.push(''); } var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/'); // put the host back if (psychotic) { result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; //occationaly the auth can get stuck only in host //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; if (authInHost) { result.auth = authInHost.shift(); result.host = result.hostname = authInHost.shift(); } } mustEndAbs = mustEndAbs || (result.host && srcPath.length); if (mustEndAbs && !isAbsolute) { srcPath.unshift(''); } if (!srcPath.length) { result.pathname = null; result.path = null; } else { result.pathname = srcPath.join('/'); } //to support request.http if (!util.isNull(result.pathname) || !util.isNull(result.search)) { result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); } result.auth = relative.auth || result.auth; result.slashes = result.slashes || relative.slashes; result.href = result.format(); return result; }; Url.prototype.parseHost = function() { var host = this.host; var port = portPattern.exec(host); if (port) { port = port[0]; if (port !== ':') { this.port = port.substr(1); } host = host.substr(0, host.length - port.length); } if (host) this.hostname = host; }; /***/ }), /***/ "Mkgn": /***/ (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; /***/ }), /***/ "MpYs": /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /***/ "N484": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ctx = __webpack_require__("3zRh"); var $export = __webpack_require__("vSO4"); var toObject = __webpack_require__("mbLO"); var call = __webpack_require__("hEIm"); var isArrayIter = __webpack_require__("af0K"); var toLength = __webpack_require__("S7IM"); var createProperty = __webpack_require__("vUQk"); var getIterFn = __webpack_require__("7AqT"); $export($export.S + $export.F * !__webpack_require__("Lli7")(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var length, result, step, iterator; if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for (result = new C(length); length > index; index++) { createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }), /***/ "NB7d": /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__("zKeE"); var global = __webpack_require__("i1Q6"); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__("1kq3") ? 'pure' : 'global', copyright: '© 2018 Denis Pushkarev (zloirock.ru)' }); /***/ }), /***/ "NKHc": /***/ (function(module, exports, __webpack_require__) { "use strict"; function checkDCE() { /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' ) { return; } if (false) { // This branch is unreachable because this function is only called // in production, but the condition is true only in development. // Therefore if the branch is still here, dead code elimination wasn't // properly applied. // Don't change the message. React DevTools relies on it. Also make sure // this message doesn't occur elsewhere in this function, or it will cause // a false positive. throw new Error('^_^'); } try { // Verify that the code above has been dead code eliminated (DCE'd). __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); } catch (err) { // DevTools shouldn't crash React, no matter what. // We should still report in case we break this code. console.error(err); } } if (true) { // DCE check should happen before ReactDOM bundle executes so that // DevTools can report bad minification during injection. checkDCE(); module.exports = __webpack_require__("i17t"); } else { module.exports = require('./cjs/react-dom.development.js'); } /***/ }), /***/ "Ni5N": /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__("B9Lq"); var hiddenKeys = __webpack_require__("KxjL").concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), /***/ "Nk5W": /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /***/ "O35A": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("i+u+"); __webpack_require__("N484"); module.exports = __webpack_require__("zKeE").Array.from; /***/ }), /***/ "OE08": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("6kQO"); /***/ }), /***/ "OFf3": /***/ (function(module, exports, __webpack_require__) { "use strict"; var stringify = __webpack_require__("SZfA"); var parse = __webpack_require__("r1+p"); var formats = __webpack_require__("mdM2"); module.exports = { formats: formats, parse: parse, stringify: stringify }; /***/ }), /***/ "OPWY": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("3v7p"); /***/ }), /***/ "OYXR": /***/ (function(module, exports, __webpack_require__) { "use strict"; var addToUnscopables = __webpack_require__("ID6i"); var step = __webpack_require__("xwD+"); var Iterators = __webpack_require__("dhak"); var toIObject = __webpack_require__("Wyka"); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__("uRfg")(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /***/ "Ocr3": /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ "OnvE": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "OuyB": /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /***/ "P8NW": /***/ (function(module, exports, __webpack_require__) { var _Object$defineProperty = __webpack_require__("OPWY"); 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; } module.exports = _createClass; /***/ }), /***/ "PBPf": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__("j3D9"); /** 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; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("l262")(module))) /***/ }), /***/ "PDcB": /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) var toObject = __webpack_require__("mbLO"); var $keys = __webpack_require__("knrM"); __webpack_require__("cOHw")('keys', function () { return function keys(it) { return $keys(toObject(it)); }; }); /***/ }), /***/ "PYZb": /***/ (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; /***/ }), /***/ "PhnU": /***/ (function(module, exports) { /** * lodash 3.9.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ /** `Object#toString` result references. */ var funcTag = '[object Function]'; /** Used to detect host constructors (Safari > 5). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** * Checks if `value` is object-like. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. */ function isObjectLike(value) { return !!value && typeof value == 'object'; } /** Used for native method references. */ var objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var fnToString = Function.prototype.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objToString = objectProto.toString; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = object == null ? undefined : object[key]; return isNative(value) ? value : undefined; } /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in older versions of Chrome and Safari which return 'function' for regexes // and Safari 8 equivalents which return 'object' for typed array constructors. return isObject(value) && objToString.call(value) == funcTag; } /** * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(1); * // => false */ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; return !!value && (type == 'object' || type == 'function'); } /** * Checks if `value` is a native function. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, else `false`. * @example * * _.isNative(Array.prototype.push); * // => true * * _.isNative(_); * // => false */ function isNative(value) { if (value == null) { return false; } if (isFunction(value)) { return reIsNative.test(fnToString.call(value)); } return isObjectLike(value) && reIsHostCtor.test(value); } module.exports = getNative; /***/ }), /***/ "PlPR": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__("1n8/"); var _react2 = _interopRequireDefault(_react); var _PropTypes = __webpack_require__("hDW8"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Provider = function (_Component) { _inherits(Provider, _Component); function Provider() { _classCallCheck(this, Provider); return _possibleConstructorReturn(this, (Provider.__proto__ || Object.getPrototypeOf(Provider)).apply(this, arguments)); } _createClass(Provider, [{ key: 'getChildContext', value: function getChildContext() { return { miniStore: this.props.store }; } }, { key: 'render', value: function render() { return _react.Children.only(this.props.children); } }]); return Provider; }(_react.Component); Provider.propTypes = { store: _PropTypes.storeShape.isRequired }; Provider.childContextTypes = { miniStore: _PropTypes.storeShape.isRequired }; exports.default = Provider; /***/ }), /***/ "PnXa": /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /***/ "Q17y": /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__("zKeE"); var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); module.exports = function stringify(it) { // eslint-disable-line no-unused-vars return $JSON.stringify.apply($JSON, arguments); }; /***/ }), /***/ "Q38I": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = addEventListener; var _EventObject = __webpack_require__("/z8I"); var _EventObject2 = _interopRequireDefault(_EventObject); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function addEventListener(target, eventType, callback) { function wrapCallback(e) { var ne = new _EventObject2["default"](e); callback.call(target, ne); } if (target.addEventListener) { target.addEventListener(eventType, wrapCallback, false); return { remove: function remove() { target.removeEventListener(eventType, wrapCallback, false); } }; } else if (target.attachEvent) { target.attachEvent('on' + eventType, wrapCallback); return { remove: function remove() { target.detachEvent('on' + eventType, wrapCallback); } }; } } module.exports = exports['default']; /***/ }), /***/ "R62e": /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__("LIpy"), isArrayLike = __webpack_require__("LN6c"), isIndex = __webpack_require__("A+gr"), isObject = __webpack_require__("u9vI"); /** * 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; /***/ }), /***/ "R6c1": /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__("6MLN") && !__webpack_require__("wLcK")(function () { return Object.defineProperty(__webpack_require__("9kxq")('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "RQ0L": /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__("bgO7"); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /***/ "RiJr": /***/ (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. * * @typechecks */ var isNode = __webpack_require__("kKLW"); /** * @param {*} object The object to check. * @return {boolean} Whether or not the object is a DOM text node. */ function isTextNode(object) { return isNode(object) && object.nodeType == 3; } module.exports = isTextNode; /***/ }), /***/ "S7IM": /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__("MpYs"); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /***/ "SZfA": /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__("HHEV"); var formats = __webpack_require__("mdM2"); var arrayPrefixGenerators = { brackets: function brackets(prefix) { // eslint-disable-line func-name-matching return prefix + '[]'; }, indices: function indices(prefix, key) { // eslint-disable-line func-name-matching return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { // eslint-disable-line func-name-matching return prefix; } }; var toISO = Date.prototype.toISOString; var defaults = { delimiter: '&', encode: true, encoder: utils.encode, encodeValuesOnly: false, serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var stringify = function stringify( // eslint-disable-line func-name-matching object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly ) { var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; } obj = ''; } if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (Array.isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } if (Array.isArray(obj)) { values = values.concat(stringify( obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } else { values = values.concat(stringify( obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } } return values; }; module.exports = function (object, opts) { var obj = object; var options = opts ? utils.assign({}, opts) : {}; if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; var sort = typeof options.sort === 'function' ? options.sort : null; var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; if (typeof options.format === 'undefined') { options.format = formats['default']; } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { throw new TypeError('Unknown format option provided.'); } var formatter = formats.formatters[options.format]; var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (Array.isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (options.arrayFormat in arrayPrefixGenerators) { arrayFormat = options.arrayFormat; } else if ('indices' in options) { arrayFormat = options.indices ? 'indices' : 'repeat'; } else { arrayFormat = 'indices'; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (!objKeys) { objKeys = Object.keys(obj); } if (sort) { objKeys.sort(sort); } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } keys = keys.concat(stringify( obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode ? encoder : null, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } var joined = keys.join(delimiter); var prefix = options.addQueryPrefix === true ? '?' : ''; return joined.length > 0 ? prefix + joined : ''; }; /***/ }), /***/ "ShN9": /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /***/ "T4f3": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__("gc0D"); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || 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; }; /***/ }), /***/ "TNJq": /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__("zotD"); var dPs = __webpack_require__("gjjs"); var enumBugKeys = __webpack_require__("KxjL"); var IE_PROTO = __webpack_require__("/wuY")('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__("9kxq")('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__("ebIA").appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /***/ "TgjC": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "Tnr5": /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__("p/0c"), isKey = __webpack_require__("2ibm"), stringToPath = __webpack_require__("jXGU"), toString = __webpack_require__("A8RV"); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /***/ "TpjK": /***/ (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; /***/ }), /***/ "U72i": /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ "UJE0": /***/ (function(module, exports, __webpack_require__) { var _Object$getPrototypeOf = __webpack_require__("Ef3f"); function _getPrototypeOf(o) { module.exports = _getPrototypeOf = _Object$getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); } module.exports = _getPrototypeOf; /***/ }), /***/ "UJWv": /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__("WMV8"), defineProperty = __webpack_require__("kAdy"), identity = __webpack_require__("Jpv1"); /** * 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; /***/ }), /***/ "UNlL": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "UQex": /***/ (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. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; /***/ }), /***/ "UY82": /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__("ZC1a"); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /***/ "Ug9I": /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__("NB7d")('wks'); var uid = __webpack_require__("X6va"); var Symbol = __webpack_require__("i1Q6").Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /***/ "V9pB": /***/ (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; }; exports.default = create; function create(initialState) { var state = initialState; var listeners = []; function setState(partial) { state = _extends({}, state, partial); for (var i = 0; i < listeners.length; i++) { listeners[i](); } } function getState() { return state; } function subscribe(listener) { listeners.push(listener); return function unsubscribe() { var index = listeners.indexOf(listener); listeners.splice(index, 1); }; } return { setState: setState, getState: getState, subscribe: subscribe }; } /***/ }), /***/ "VOrx": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__("GyB/"); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /***/ "VaGT": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.create = exports.connect = exports.Provider = undefined; var _Provider2 = __webpack_require__("PlPR"); var _Provider3 = _interopRequireDefault(_Provider2); var _connect2 = __webpack_require__("zKbo"); var _connect3 = _interopRequireDefault(_connect2); var _create2 = __webpack_require__("V9pB"); var _create3 = _interopRequireDefault(_create2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.Provider = _Provider3.default; exports.connect = _connect3.default; exports.create = _create3.default; /***/ }), /***/ "VcL+": /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__("r8MY"), isArguments = __webpack_require__("3til"), isArray = __webpack_require__("p/0c"), isBuffer = __webpack_require__("iyC2"), isIndex = __webpack_require__("A+gr"), isTypedArray = __webpack_require__("kwIb"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /***/ "VuZO": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("O35A"), __esModule: true }; /***/ }), /***/ "WMV8": /***/ (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; /***/ }), /***/ "WqwZ": /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__("49I8"), assignMergeValue = __webpack_require__("2Tdb"), baseFor = __webpack_require__("mduf"), baseMergeDeep = __webpack_require__("XsjK"), isObject = __webpack_require__("u9vI"), keysIn = __webpack_require__("+UAC"), safeGet = __webpack_require__("vW3g"); /** * 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) { if (isObject(srcValue)) { stack || (stack = new Stack); 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; /***/ }), /***/ "Wyka": /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__("E5Ce"); var defined = __webpack_require__("U72i"); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /***/ "X6va": /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /***/ "X7qz": /***/ (function(module, exports) { /** * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ function isArguments(value) { // Safari 8.1 makes `arguments.callee` enumerable in strict mode. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); } /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } /** * 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); } /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return !!value && (type == 'object' || type == 'function'); } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return !!value && typeof value == 'object'; } module.exports = isArguments; /***/ }), /***/ "XJYD": /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /***/ "XeWd": /***/ (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. * * @typechecks */ /* eslint-disable fb-www/typeof-undefined */ /** * Same as document.activeElement but wraps in a try-catch block. In IE it is * not safe to call document.activeElement if there is nothing focused. * * The activeElement will be null only if the document or document body is not * yet defined. * * @param {?DOMDocument} doc Defaults to current document. * @return {?DOMElement} */ function getActiveElement(doc) /*?DOMElement*/{ doc = doc || (typeof document !== 'undefined' ? document : undefined); if (typeof doc === 'undefined') { return null; } try { return doc.activeElement || doc.body; } catch (e) { return doc.body; } } module.exports = getActiveElement; /***/ }), /***/ "Xk23": /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__("s9iF"), listCacheDelete = __webpack_require__("+bWy"), listCacheGet = __webpack_require__("Ewuv"), listCacheHas = __webpack_require__("xDQX"), listCacheSet = __webpack_require__("h0zV"); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /***/ "Xos8": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__("FFZn"); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /***/ "XsjK": /***/ (function(module, exports, __webpack_require__) { var assignMergeValue = __webpack_require__("2Tdb"), cloneBuffer = __webpack_require__("s4SJ"), cloneTypedArray = __webpack_require__("jXAN"), copyArray = __webpack_require__("Mkgn"), initCloneObject = __webpack_require__("qE2F"), isArguments = __webpack_require__("3til"), isArray = __webpack_require__("p/0c"), isArrayLikeObject = __webpack_require__("FwQQ"), isBuffer = __webpack_require__("iyC2"), isFunction = __webpack_require__("dRuq"), isObject = __webpack_require__("u9vI"), isPlainObject = __webpack_require__("ES04"), isTypedArray = __webpack_require__("kwIb"), safeGet = __webpack_require__("vW3g"), toPlainObject = __webpack_require__("92s5"); /** * 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) || (srcIndex && 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; /***/ }), /***/ "YD0x": /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__("vSO4"); $export($export.S + $export.F, 'Object', { assign: __webpack_require__("uj5A") }); /***/ }), /***/ "YIaf": /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__("FTXF"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /***/ "YShb": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getProfileBasicData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getProfileAdvancedData; }); var basicGoods = [{ id: '1234561', name: '矿泉水 550ml', barcode: '12421432143214321', price: '2.00', num: '1', amount: '2.00' }, { id: '1234562', name: '凉茶 300ml', barcode: '12421432143214322', price: '3.00', num: '2', amount: '6.00' }, { id: '1234563', name: '好吃的薯片', barcode: '12421432143214323', price: '7.00', num: '4', amount: '28.00' }, { id: '1234564', name: '特别好吃的蛋卷', barcode: '12421432143214324', price: '8.50', num: '3', amount: '25.50' }]; var basicProgress = [{ key: '1', time: '2017-10-01 14:10', rate: '联系客户', status: 'processing', operator: '取货员 ID1234', cost: '5mins' }, { key: '2', time: '2017-10-01 14:05', rate: '取货员出发', status: 'success', operator: '取货员 ID1234', cost: '1h' }, { key: '3', time: '2017-10-01 13:05', rate: '取货员接单', status: 'success', operator: '取货员 ID1234', cost: '5mins' }, { key: '4', time: '2017-10-01 13:00', rate: '申请审批通过', status: 'success', operator: '系统', cost: '1h' }, { key: '5', time: '2017-10-01 12:00', rate: '发起退货申请', status: 'success', operator: '用户', cost: '5mins' }]; var advancedOperation1 = [{ key: 'op1', type: '订购关系生效', name: '曲丽丽', status: 'agree', updatedAt: '2017-10-03 19:23:12', memo: '-' }, { key: 'op2', type: '财务复审', name: '付小小', status: 'reject', updatedAt: '2017-10-03 19:23:12', memo: '不通过原因' }, { key: 'op3', type: '部门初审', name: '周毛毛', status: 'agree', updatedAt: '2017-10-03 19:23:12', memo: '-' }, { key: 'op4', type: '提交订单', name: '林东东', status: 'agree', updatedAt: '2017-10-03 19:23:12', memo: '很棒' }, { key: 'op5', type: '创建订单', name: '汗牙牙', status: 'agree', updatedAt: '2017-10-03 19:23:12', memo: '-' }]; var advancedOperation2 = [{ key: 'op1', type: '订购关系生效', name: '曲丽丽', status: 'agree', updatedAt: '2017-10-03 19:23:12', memo: '-' }]; var advancedOperation3 = [{ key: 'op1', type: '创建订单', name: '汗牙牙', status: 'agree', updatedAt: '2017-10-03 19:23:12', memo: '-' }]; var getProfileBasicData = { basicGoods: basicGoods, basicProgress: basicProgress }; var getProfileAdvancedData = { advancedOperation1: advancedOperation1, advancedOperation2: advancedOperation2, advancedOperation3: advancedOperation3 }; /* unused harmony default export */ var _unused_webpack_default_export = ({ getProfileBasicData: getProfileBasicData, getProfileAdvancedData: getProfileAdvancedData }); /***/ }), /***/ "ZC1a": /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__("XJYD"); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /***/ "ZHvQ": /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__("ShN9"); var TAG = __webpack_require__("Ug9I")('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /***/ "ZJYB": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getNotices; }); var getNotices = function getNotices(req, res) { res.json([{ id: '000000001', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', title: '你收到了 14 份新周报', datetime: '2017-08-09', type: '通知' }, { id: '000000002', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png', title: '你推荐的 曲妮妮 已通过第三轮面试', datetime: '2017-08-08', type: '通知' }, { id: '000000003', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png', title: '这种模板可以区分多种通知类型', datetime: '2017-08-07', read: true, type: '通知' }, { id: '000000004', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', title: '左侧图标用于区分不同的类型', datetime: '2017-08-07', type: '通知' }, { id: '000000005', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', title: '内容不要超过两行字,超出时自动截断', datetime: '2017-08-07', type: '通知' }, { id: '000000006', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', title: '曲丽丽 评论了你', description: '描述信息描述信息描述信息', datetime: '2017-08-07', type: '消息' }, { id: '000000007', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', title: '朱偏右 回复了你', description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像', datetime: '2017-08-07', type: '消息' }, { id: '000000008', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', title: '标题', description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像', datetime: '2017-08-07', type: '消息' }, { id: '000000009', title: '任务名称', description: '任务需要在 2017-01-12 20:00 前启动', extra: '未开始', status: 'todo', type: '待办' }, { id: '000000010', title: '第三方紧急代码变更', description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务', extra: '马上到期', status: 'urgent', type: '待办' }, { id: '000000011', title: '信息安全考试', description: '指派竹尔于 2017-01-09 前完成更新并发布', extra: '已耗时 8 天', status: 'doing', type: '待办' }, { id: '000000012', title: 'ABCD 版本发布', description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务', extra: '进行中', status: 'processing', type: '待办' }]); }; /* unused harmony default export */ var _unused_webpack_default_export = ({ getNotices: getNotices }); /***/ }), /***/ "ZKjc": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__("Aq8W"); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__("yeEC"); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__("GyB/"); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /***/ "ZWPf": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "ZaKr": /***/ (function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__("BxvP"); var anObject = __webpack_require__("zotD"); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = __webpack_require__("3zRh")(Function.call, __webpack_require__("sxPs").f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }), /***/ "Zwq5": /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__("MpYs"); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /***/ "ZxII": /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__("Ug9I"); /***/ }), /***/ "a+zQ": /***/ (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; /***/ }), /***/ "a2/B": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js ;(function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory() }(this, (function () { 'use strict'; var hookCallback; function hooks () { return hookCallback.apply(null, arguments); } // This is done to register the method called with moment() // without creating circular dependencies. function setHookCallback (callback) { hookCallback = callback; } function isArray(input) { return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; } function isObject(input) { // IE8 will treat undefined and null as object if it wasn't for // input != null return input != null && Object.prototype.toString.call(input) === '[object Object]'; } function isObjectEmpty(obj) { if (Object.getOwnPropertyNames) { return (Object.getOwnPropertyNames(obj).length === 0); } else { var k; for (k in obj) { if (obj.hasOwnProperty(k)) { return false; } } return true; } } function isUndefined(input) { return input === void 0; } function isNumber(input) { return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; } function isDate(input) { return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; } function map(arr, fn) { var res = [], i; for (i = 0; i < arr.length; ++i) { res.push(fn(arr[i], i)); } return res; } function hasOwnProp(a, b) { return Object.prototype.hasOwnProperty.call(a, b); } function extend(a, b) { for (var i in b) { if (hasOwnProp(b, i)) { a[i] = b[i]; } } if (hasOwnProp(b, 'toString')) { a.toString = b.toString; } if (hasOwnProp(b, 'valueOf')) { a.valueOf = b.valueOf; } return a; } function createUTC (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, true).utc(); } function defaultParsingFlags() { // We need to deep clone this object. return { empty : false, unusedTokens : [], unusedInput : [], overflow : -2, charsLeftOver : 0, nullInput : false, invalidMonth : null, invalidFormat : false, userInvalidated : false, iso : false, parsedDateParts : [], meridiem : null, rfc2822 : false, weekdayMismatch : false }; } function getParsingFlags(m) { if (m._pf == null) { m._pf = defaultParsingFlags(); } return m._pf; } var some; if (Array.prototype.some) { some = Array.prototype.some; } else { some = function (fun) { var t = Object(this); var len = t.length >>> 0; for (var i = 0; i < len; i++) { if (i in t && fun.call(this, t[i], i, t)) { return true; } } return false; }; } function isValid(m) { if (m._isValid == null) { var flags = getParsingFlags(m); var parsedParts = some.call(flags.parsedDateParts, function (i) { return i != null; }); var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || (flags.meridiem && parsedParts)); if (m._strict) { isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; } if (Object.isFrozen == null || !Object.isFrozen(m)) { m._isValid = isNowValid; } else { return isNowValid; } } return m._isValid; } function createInvalid (flags) { var m = createUTC(NaN); if (flags != null) { extend(getParsingFlags(m), flags); } else { getParsingFlags(m).userInvalidated = true; } return m; } // Plugins that add properties should also add the key here (null value), // so we can properly clone ourselves. var momentProperties = hooks.momentProperties = []; function copyConfig(to, from) { var i, prop, val; if (!isUndefined(from._isAMomentObject)) { to._isAMomentObject = from._isAMomentObject; } if (!isUndefined(from._i)) { to._i = from._i; } if (!isUndefined(from._f)) { to._f = from._f; } if (!isUndefined(from._l)) { to._l = from._l; } if (!isUndefined(from._strict)) { to._strict = from._strict; } if (!isUndefined(from._tzm)) { to._tzm = from._tzm; } if (!isUndefined(from._isUTC)) { to._isUTC = from._isUTC; } if (!isUndefined(from._offset)) { to._offset = from._offset; } if (!isUndefined(from._pf)) { to._pf = getParsingFlags(from); } if (!isUndefined(from._locale)) { to._locale = from._locale; } if (momentProperties.length > 0) { for (i = 0; i < momentProperties.length; i++) { prop = momentProperties[i]; val = from[prop]; if (!isUndefined(val)) { to[prop] = val; } } } return to; } var updateInProgress = false; // Moment prototype object function Moment(config) { copyConfig(this, config); this._d = new Date(config._d != null ? config._d.getTime() : NaN); if (!this.isValid()) { this._d = new Date(NaN); } // Prevent infinite loop in case updateOffset creates new moment // objects. if (updateInProgress === false) { updateInProgress = true; hooks.updateOffset(this); updateInProgress = false; } } function isMoment (obj) { return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); } function absFloor (number) { if (number < 0) { // -0 -> 0 return Math.ceil(number) || 0; } else { return Math.floor(number); } } function toInt(argumentForCoercion) { var coercedNumber = +argumentForCoercion, value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { value = absFloor(coercedNumber); } return value; } // compare two arrays, return the number of differences function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { diffs++; } } return diffs + lengthDiff; } function warn(msg) { if (hooks.suppressDeprecationWarnings === false && (typeof console !== 'undefined') && console.warn) { console.warn('Deprecation warning: ' + msg); } } function deprecate(msg, fn) { var firstTime = true; return extend(function () { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(null, msg); } if (firstTime) { var args = []; var arg; for (var i = 0; i < arguments.length; i++) { arg = ''; if (typeof arguments[i] === 'object') { arg += '\n[' + i + '] '; for (var key in arguments[0]) { arg += key + ': ' + arguments[0][key] + ', '; } arg = arg.slice(0, -2); // Remove trailing comma and space } else { arg = arguments[i]; } args.push(arg); } warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); firstTime = false; } return fn.apply(this, arguments); }, fn); } var deprecations = {}; function deprecateSimple(name, msg) { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(name, msg); } if (!deprecations[name]) { warn(msg); deprecations[name] = true; } } hooks.suppressDeprecationWarnings = false; hooks.deprecationHandler = null; function isFunction(input) { return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; } function set (config) { var prop, i; for (i in config) { prop = config[i]; if (isFunction(prop)) { this[i] = prop; } else { this['_' + i] = prop; } } this._config = config; // Lenient ordinal parsing accepts just a number in addition to // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. // TODO: Remove "ordinalParse" fallback in next major release. this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + (/\d{1,2}/).source); } function mergeConfigs(parentConfig, childConfig) { var res = extend({}, parentConfig), prop; for (prop in childConfig) { if (hasOwnProp(childConfig, prop)) { if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { res[prop] = {}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); } else if (childConfig[prop] != null) { res[prop] = childConfig[prop]; } else { delete res[prop]; } } } for (prop in parentConfig) { if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { // make sure changes to properties don't modify parent config res[prop] = extend({}, res[prop]); } } return res; } function Locale(config) { if (config != null) { this.set(config); } } var keys; if (Object.keys) { keys = Object.keys; } else { keys = function (obj) { var i, res = []; for (i in obj) { if (hasOwnProp(obj, i)) { res.push(i); } } return res; }; } var defaultCalendar = { sameDay : '[Today at] LT', nextDay : '[Tomorrow at] LT', nextWeek : 'dddd [at] LT', lastDay : '[Yesterday at] LT', lastWeek : '[Last] dddd [at] LT', sameElse : 'L' }; function calendar (key, mom, now) { var output = this._calendar[key] || this._calendar['sameElse']; return isFunction(output) ? output.call(mom, now) : output; } var defaultLongDateFormat = { LTS : 'h:mm:ss A', LT : 'h:mm A', L : 'MM/DD/YYYY', LL : 'MMMM D, YYYY', LLL : 'MMMM D, YYYY h:mm A', LLLL : 'dddd, MMMM D, YYYY h:mm A' }; function longDateFormat (key) { var format = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()]; if (format || !formatUpper) { return format; } this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { return val.slice(1); }); return this._longDateFormat[key]; } var defaultInvalidDate = 'Invalid date'; function invalidDate () { return this._invalidDate; } var defaultOrdinal = '%d'; var defaultDayOfMonthOrdinalParse = /\d{1,2}/; function ordinal (number) { return this._ordinal.replace('%d', number); } var defaultRelativeTime = { future : 'in %s', past : '%s ago', s : 'a few seconds', ss : '%d seconds', m : 'a minute', mm : '%d minutes', h : 'an hour', hh : '%d hours', d : 'a day', dd : '%d days', M : 'a month', MM : '%d months', y : 'a year', yy : '%d years' }; function relativeTime (number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; return (isFunction(output)) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture (diff, output) { var format = this._relativeTime[diff > 0 ? 'future' : 'past']; return isFunction(format) ? format(output) : format.replace(/%s/i, output); } var aliases = {}; function addUnitAlias (unit, shorthand) { var lowerCase = unit.toLowerCase(); aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; } function normalizeUnits(units) { return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; } function normalizeObjectUnits(inputObject) { var normalizedInput = {}, normalizedProp, prop; for (prop in inputObject) { if (hasOwnProp(inputObject, prop)) { normalizedProp = normalizeUnits(prop); if (normalizedProp) { normalizedInput[normalizedProp] = inputObject[prop]; } } } return normalizedInput; } var priorities = {}; function addUnitPriority(unit, priority) { priorities[unit] = priority; } function getPrioritizedUnits(unitsObj) { var units = []; for (var u in unitsObj) { units.push({unit: u, priority: priorities[u]}); } units.sort(function (a, b) { return a.priority - b.priority; }); return units; } function zeroFill(number, targetLength, forceSign) { var absNumber = '' + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign = number >= 0; return (sign ? (forceSign ? '+' : '') : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; } var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; var formatFunctions = {}; var formatTokenFunctions = {}; // token: 'M' // padded: ['MM', 2] // ordinal: 'Mo' // callback: function () { this.month() + 1 } function addFormatToken (token, padded, ordinal, callback) { var func = callback; if (typeof callback === 'string') { func = function () { return this[callback](); }; } if (token) { formatTokenFunctions[token] = func; } if (padded) { formatTokenFunctions[padded[0]] = function () { return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; } if (ordinal) { formatTokenFunctions[ordinal] = function () { return this.localeData().ordinal(func.apply(this, arguments), token); }; } } function removeFormattingTokens(input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|\]$/g, ''); } return input.replace(/\\/g, ''); } function makeFormatFunction(format) { var array = format.match(formattingTokens), i, length; for (i = 0, length = array.length; i < length; i++) { if (formatTokenFunctions[array[i]]) { array[i] = formatTokenFunctions[array[i]]; } else { array[i] = removeFormattingTokens(array[i]); } } return function (mom) { var output = '', i; for (i = 0; i < length; i++) { output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; } return output; }; } // format date using native date object function formatMoment(m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); } format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); } function expandFormat(format, locale) { var i = 5; function replaceLongDateFormatTokens(input) { return locale.longDateFormat(input) || input; } localFormattingTokens.lastIndex = 0; while (i >= 0 && localFormattingTokens.test(format)) { format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); localFormattingTokens.lastIndex = 0; i -= 1; } return format; } var match1 = /\d/; // 0 - 9 var match2 = /\d\d/; // 00 - 99 var match3 = /\d{3}/; // 000 - 999 var match4 = /\d{4}/; // 0000 - 9999 var match6 = /[+-]?\d{6}/; // -999999 - 999999 var match1to2 = /\d\d?/; // 0 - 99 var match3to4 = /\d\d\d\d?/; // 999 - 9999 var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 var match1to3 = /\d{1,3}/; // 0 - 999 var match1to4 = /\d{1,4}/; // 0 - 9999 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 var matchUnsigned = /\d+/; // 0 - inf var matchSigned = /[+-]?\d+/; // -inf - inf var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 // any word (or two) characters or numbers including two/three word month in arabic. // includes scottish gaelic two word and hyphenated months var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; var regexes = {}; function addRegexToken (token, regex, strictRegex) { regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { return (isStrict && strictRegex) ? strictRegex : regex; }; } function getParseRegexForToken (token, config) { if (!hasOwnProp(regexes, token)) { return new RegExp(unescapeFormat(token)); } return regexes[token](config._strict, config._locale); } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function unescapeFormat(s) { return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })); } function regexEscape(s) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } var tokens = {}; function addParseToken (token, callback) { var i, func = callback; if (typeof token === 'string') { token = [token]; } if (isNumber(callback)) { func = function (input, array) { array[callback] = toInt(input); }; } for (i = 0; i < token.length; i++) { tokens[token[i]] = func; } } function addWeekParseToken (token, callback) { addParseToken(token, function (input, array, config, token) { config._w = config._w || {}; callback(input, config._w, config, token); }); } function addTimeToArrayFromToken(token, input, config) { if (input != null && hasOwnProp(tokens, token)) { tokens[token](input, config._a, config, token); } } var YEAR = 0; var MONTH = 1; var DATE = 2; var HOUR = 3; var MINUTE = 4; var SECOND = 5; var MILLISECOND = 6; var WEEK = 7; var WEEKDAY = 8; // FORMATTING addFormatToken('Y', 0, 0, function () { var y = this.year(); return y <= 9999 ? '' + y : '+' + y; }); addFormatToken(0, ['YY', 2], 0, function () { return this.year() % 100; }); addFormatToken(0, ['YYYY', 4], 0, 'year'); addFormatToken(0, ['YYYYY', 5], 0, 'year'); addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES addUnitAlias('year', 'y'); // PRIORITIES addUnitPriority('year', 1); // PARSING addRegexToken('Y', matchSigned); addRegexToken('YY', match1to2, match2); addRegexToken('YYYY', match1to4, match4); addRegexToken('YYYYY', match1to6, match6); addRegexToken('YYYYYY', match1to6, match6); addParseToken(['YYYYY', 'YYYYYY'], YEAR); addParseToken('YYYY', function (input, array) { array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); }); addParseToken('YY', function (input, array) { array[YEAR] = hooks.parseTwoDigitYear(input); }); addParseToken('Y', function (input, array) { array[YEAR] = parseInt(input, 10); }); // HELPERS function daysInYear(year) { return isLeapYear(year) ? 366 : 365; } function isLeapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } // HOOKS hooks.parseTwoDigitYear = function (input) { return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); }; // MOMENTS var getSetYear = makeGetSet('FullYear', true); function getIsLeapYear () { return isLeapYear(this.year()); } function makeGetSet (unit, keepTime) { return function (value) { if (value != null) { set$1(this, unit, value); hooks.updateOffset(this, keepTime); return this; } else { return get(this, unit); } }; } function get (mom, unit) { return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; } function set$1 (mom, unit, value) { if (mom.isValid() && !isNaN(value)) { if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); } else { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); } } } // MOMENTS function stringGet (units) { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](); } return this; } function stringSet (units, value) { if (typeof units === 'object') { units = normalizeObjectUnits(units); var prioritized = getPrioritizedUnits(units); for (var i = 0; i < prioritized.length; i++) { this[prioritized[i].unit](units[prioritized[i].unit]); } } else { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](value); } } return this; } function mod(n, x) { return ((n % x) + x) % x; } var indexOf; if (Array.prototype.indexOf) { indexOf = Array.prototype.indexOf; } else { indexOf = function (o) { // I know var i; for (i = 0; i < this.length; ++i) { if (this[i] === o) { return i; } } return -1; }; } function daysInMonth(year, month) { if (isNaN(year) || isNaN(month)) { return NaN; } var modMonth = mod(month, 12); year += (month - modMonth) / 12; return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); } // FORMATTING addFormatToken('M', ['MM', 2], 'Mo', function () { return this.month() + 1; }); addFormatToken('MMM', 0, 0, function (format) { return this.localeData().monthsShort(this, format); }); addFormatToken('MMMM', 0, 0, function (format) { return this.localeData().months(this, format); }); // ALIASES addUnitAlias('month', 'M'); // PRIORITY addUnitPriority('month', 8); // PARSING addRegexToken('M', match1to2); addRegexToken('MM', match1to2, match2); addRegexToken('MMM', function (isStrict, locale) { return locale.monthsShortRegex(isStrict); }); addRegexToken('MMMM', function (isStrict, locale) { return locale.monthsRegex(isStrict); }); addParseToken(['M', 'MM'], function (input, array) { array[MONTH] = toInt(input) - 1; }); addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. if (month != null) { array[MONTH] = month; } else { getParsingFlags(config).invalidMonth = input; } }); // LOCALES var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); function localeMonths (m, format) { if (!m) { return isArray(this._months) ? this._months : this._months['standalone']; } return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; } var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); function localeMonthsShort (m, format) { if (!m) { return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; } return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; } function handleStrictParse(monthName, format, strict) { var i, ii, mom, llc = monthName.toLocaleLowerCase(); if (!this._monthsParse) { // this is not used this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; for (i = 0; i < 12; ++i) { mom = createUTC([2000, i]); this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } } } function localeMonthsParse (monthName, format, strict) { var i, mom, regex; if (this._monthsParseExact) { return handleStrictParse.call(this, monthName, format, strict); } if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; } // TODO: add sorting // Sorting makes sure if one month (or abbr) is a prefix of another // see sorting in computeMonthsParse for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = createUTC([2000, i]); if (strict && !this._longMonthsParse[i]) { this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); } if (!strict && !this._monthsParse[i]) { regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { return i; } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { return i; } else if (!strict && this._monthsParse[i].test(monthName)) { return i; } } } // MOMENTS function setMonth (mom, value) { var dayOfMonth; if (!mom.isValid()) { // No op return mom; } if (typeof value === 'string') { if (/^\d+$/.test(value)) { value = toInt(value); } else { value = mom.localeData().monthsParse(value); // TODO: Another silent failure? if (!isNumber(value)) { return mom; } } } dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); return mom; } function getSetMonth (value) { if (value != null) { setMonth(this, value); hooks.updateOffset(this, true); return this; } else { return get(this, 'Month'); } } function getDaysInMonth () { return daysInMonth(this.year(), this.month()); } var defaultMonthsShortRegex = matchWord; function monthsShortRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsShortStrictRegex; } else { return this._monthsShortRegex; } } else { if (!hasOwnProp(this, '_monthsShortRegex')) { this._monthsShortRegex = defaultMonthsShortRegex; } return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; } } var defaultMonthsRegex = matchWord; function monthsRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsStrictRegex; } else { return this._monthsRegex; } } else { if (!hasOwnProp(this, '_monthsRegex')) { this._monthsRegex = defaultMonthsRegex; } return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } } function computeMonthsParse () { function cmpLenRev(a, b) { return b.length - a.length; } var shortPieces = [], longPieces = [], mixedPieces = [], i, mom; for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = createUTC([2000, i]); shortPieces.push(this.monthsShort(mom, '')); longPieces.push(this.months(mom, '')); mixedPieces.push(this.months(mom, '')); mixedPieces.push(this.monthsShort(mom, '')); } // Sorting makes sure if one month (or abbr) is a prefix of another it // will match the longer piece. shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 12; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); } for (i = 0; i < 24; i++) { mixedPieces[i] = regexEscape(mixedPieces[i]); } this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); } function createDate (y, m, d, h, M, s, ms) { // can't just apply() to create a date: // https://stackoverflow.com/q/181348 var date = new Date(y, m, d, h, M, s, ms); // the date constructor remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { date.setFullYear(y); } return date; } function createUTCDate (y) { var date = new Date(Date.UTC.apply(null, arguments)); // the Date.UTC function remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { date.setUTCFullYear(y); } return date; } // start-of-first-week - start-of-year function firstWeekOffset(year, dow, doy) { var // first-week day -- which january is always in the first week (4 for iso, 1 for other) fwd = 7 + dow - doy, // first-week day local weekday -- which local weekday is fwd fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; return -fwdlw + fwd - 1; } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday function dayOfYearFromWeeks(year, week, weekday, dow, doy) { var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; if (dayOfYear <= 0) { resYear = year - 1; resDayOfYear = daysInYear(resYear) + dayOfYear; } else if (dayOfYear > daysInYear(year)) { resYear = year + 1; resDayOfYear = dayOfYear - daysInYear(year); } else { resYear = year; resDayOfYear = dayOfYear; } return { year: resYear, dayOfYear: resDayOfYear }; } function weekOfYear(mom, dow, doy) { var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; if (week < 1) { resYear = mom.year() - 1; resWeek = week + weeksInYear(resYear, dow, doy); } else if (week > weeksInYear(mom.year(), dow, doy)) { resWeek = week - weeksInYear(mom.year(), dow, doy); resYear = mom.year() + 1; } else { resYear = mom.year(); resWeek = week; } return { week: resWeek, year: resYear }; } function weeksInYear(year, dow, doy) { var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy); return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } // FORMATTING addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES addUnitAlias('week', 'w'); addUnitAlias('isoWeek', 'W'); // PRIORITIES addUnitPriority('week', 5); addUnitPriority('isoWeek', 5); // PARSING addRegexToken('w', match1to2); addRegexToken('ww', match1to2, match2); addRegexToken('W', match1to2); addRegexToken('WW', match1to2, match2); addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { week[token.substr(0, 1)] = toInt(input); }); // HELPERS // LOCALES function localeWeek (mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; } var defaultLocaleWeek = { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 1st is the first week of the year. }; function localeFirstDayOfWeek () { return this._week.dow; } function localeFirstDayOfYear () { return this._week.doy; } // MOMENTS function getSetWeek (input) { var week = this.localeData().week(this); return input == null ? week : this.add((input - week) * 7, 'd'); } function getSetISOWeek (input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add((input - week) * 7, 'd'); } // FORMATTING addFormatToken('d', 0, 'do', 'day'); addFormatToken('dd', 0, 0, function (format) { return this.localeData().weekdaysMin(this, format); }); addFormatToken('ddd', 0, 0, function (format) { return this.localeData().weekdaysShort(this, format); }); addFormatToken('dddd', 0, 0, function (format) { return this.localeData().weekdays(this, format); }); addFormatToken('e', 0, 0, 'weekday'); addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES addUnitAlias('day', 'd'); addUnitAlias('weekday', 'e'); addUnitAlias('isoWeekday', 'E'); // PRIORITY addUnitPriority('day', 11); addUnitPriority('weekday', 11); addUnitPriority('isoWeekday', 11); // PARSING addRegexToken('d', match1to2); addRegexToken('e', match1to2); addRegexToken('E', match1to2); addRegexToken('dd', function (isStrict, locale) { return locale.weekdaysMinRegex(isStrict); }); addRegexToken('ddd', function (isStrict, locale) { return locale.weekdaysShortRegex(isStrict); }); addRegexToken('dddd', function (isStrict, locale) { return locale.weekdaysRegex(isStrict); }); addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid if (weekday != null) { week.d = weekday; } else { getParsingFlags(config).invalidWeekday = input; } }); addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { week[token] = toInt(input); }); // HELPERS function parseWeekday(input, locale) { if (typeof input !== 'string') { return input; } if (!isNaN(input)) { return parseInt(input, 10); } input = locale.weekdaysParse(input); if (typeof input === 'number') { return input; } return null; } function parseIsoWeekday(input, locale) { if (typeof input === 'string') { return locale.weekdaysParse(input) % 7 || 7; } return isNaN(input) ? null : input; } // LOCALES var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); function localeWeekdays (m, format) { if (!m) { return isArray(this._weekdays) ? this._weekdays : this._weekdays['standalone']; } return isArray(this._weekdays) ? this._weekdays[m.day()] : this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; } var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); function localeWeekdaysShort (m) { return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; } var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); function localeWeekdaysMin (m) { return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; } function handleStrictParse$1(weekdayName, format, strict) { var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); if (!this._weekdaysParse) { this._weekdaysParse = []; this._shortWeekdaysParse = []; this._minWeekdaysParse = []; for (i = 0; i < 7; ++i) { mom = createUTC([2000, 1]).day(i); this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } } } function localeWeekdaysParse (weekdayName, format, strict) { var i, mom, regex; if (this._weekdaysParseExact) { return handleStrictParse$1.call(this, weekdayName, format, strict); } if (!this._weekdaysParse) { this._weekdaysParse = []; this._minWeekdaysParse = []; this._shortWeekdaysParse = []; this._fullWeekdaysParse = []; } for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { return i; } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { return i; } } } // MOMENTS function getSetDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (input != null) { input = parseWeekday(input, this.localeData()); return this.add(input - day, 'd'); } else { return day; } } function getSetLocaleDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; return input == null ? weekday : this.add(input - weekday, 'd'); } function getSetISODayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } // behaves the same as moment#day except // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) // as a setter, sunday should belong to the previous week. if (input != null) { var weekday = parseIsoWeekday(input, this.localeData()); return this.day(this.day() % 7 ? weekday : weekday - 7); } else { return this.day() || 7; } } var defaultWeekdaysRegex = matchWord; function weekdaysRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysStrictRegex; } else { return this._weekdaysRegex; } } else { if (!hasOwnProp(this, '_weekdaysRegex')) { this._weekdaysRegex = defaultWeekdaysRegex; } return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; } } var defaultWeekdaysShortRegex = matchWord; function weekdaysShortRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysShortStrictRegex; } else { return this._weekdaysShortRegex; } } else { if (!hasOwnProp(this, '_weekdaysShortRegex')) { this._weekdaysShortRegex = defaultWeekdaysShortRegex; } return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; } } var defaultWeekdaysMinRegex = matchWord; function weekdaysMinRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysMinStrictRegex; } else { return this._weekdaysMinRegex; } } else { if (!hasOwnProp(this, '_weekdaysMinRegex')) { this._weekdaysMinRegex = defaultWeekdaysMinRegex; } return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; } } function computeWeekdaysParse () { function cmpLenRev(a, b) { return b.length - a.length; } var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp; for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = createUTC([2000, 1]).day(i); minp = this.weekdaysMin(mom, ''); shortp = this.weekdaysShort(mom, ''); longp = this.weekdays(mom, ''); minPieces.push(minp); shortPieces.push(shortp); longPieces.push(longp); mixedPieces.push(minp); mixedPieces.push(shortp); mixedPieces.push(longp); } // Sorting makes sure if one weekday (or abbr) is a prefix of another it // will match the longer piece. minPieces.sort(cmpLenRev); shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 7; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); mixedPieces[i] = regexEscape(mixedPieces[i]); } this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._weekdaysShortRegex = this._weekdaysRegex; this._weekdaysMinRegex = this._weekdaysRegex; this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); } // FORMATTING function hFormat() { return this.hours() % 12 || 12; } function kFormat() { return this.hours() || 24; } addFormatToken('H', ['HH', 2], 0, 'hour'); addFormatToken('h', ['hh', 2], 0, hFormat); addFormatToken('k', ['kk', 2], 0, kFormat); addFormatToken('hmm', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); }); addFormatToken('hmmss', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); addFormatToken('Hmm', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2); }); addFormatToken('Hmmss', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); function meridiem (token, lowercase) { addFormatToken(token, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); }); } meridiem('a', true); meridiem('A', false); // ALIASES addUnitAlias('hour', 'h'); // PRIORITY addUnitPriority('hour', 13); // PARSING function matchMeridiem (isStrict, locale) { return locale._meridiemParse; } addRegexToken('a', matchMeridiem); addRegexToken('A', matchMeridiem); addRegexToken('H', match1to2); addRegexToken('h', match1to2); addRegexToken('k', match1to2); addRegexToken('HH', match1to2, match2); addRegexToken('hh', match1to2, match2); addRegexToken('kk', match1to2, match2); addRegexToken('hmm', match3to4); addRegexToken('hmmss', match5to6); addRegexToken('Hmm', match3to4); addRegexToken('Hmmss', match5to6); addParseToken(['H', 'HH'], HOUR); addParseToken(['k', 'kk'], function (input, array, config) { var kInput = toInt(input); array[HOUR] = kInput === 24 ? 0 : kInput; }); addParseToken(['a', 'A'], function (input, array, config) { config._isPm = config._locale.isPM(input); config._meridiem = input; }); addParseToken(['h', 'hh'], function (input, array, config) { array[HOUR] = toInt(input); getParsingFlags(config).bigHour = true; }); addParseToken('hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); getParsingFlags(config).bigHour = true; }); addParseToken('hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); getParsingFlags(config).bigHour = true; }); addParseToken('Hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); }); addParseToken('Hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); }); // LOCALES function localeIsPM (input) { // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays // Using charAt should be more compatible. return ((input + '').toLowerCase().charAt(0) === 'p'); } var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; function localeMeridiem (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'pm' : 'PM'; } else { return isLower ? 'am' : 'AM'; } } // MOMENTS // Setting the hour should keep the time, because the user explicitly // specified which hour they want. So trying to maintain the same hour (in // a new timezone) makes sense. Adding/subtracting hours does not follow // this rule. var getSetHour = makeGetSet('Hours', true); var baseConfig = { calendar: defaultCalendar, longDateFormat: defaultLongDateFormat, invalidDate: defaultInvalidDate, ordinal: defaultOrdinal, dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, relativeTime: defaultRelativeTime, months: defaultLocaleMonths, monthsShort: defaultLocaleMonthsShort, week: defaultLocaleWeek, weekdays: defaultLocaleWeekdays, weekdaysMin: defaultLocaleWeekdaysMin, weekdaysShort: defaultLocaleWeekdaysShort, meridiemParse: defaultLocaleMeridiemParse }; // internal storage for locale config files var locales = {}; var localeFamilies = {}; var globalLocale; function normalizeLocale(key) { return key ? key.toLowerCase().replace('_', '-') : key; } // pick the locale from the array // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root function chooseLocale(names) { var i = 0, j, next, locale, split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return globalLocale; } function loadLocale(name) { var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node if (!locales[name] && (typeof module !== 'undefined') && module && module.exports) { try { oldLocale = globalLocale._abbr; var aliasedRequire = require; !(function webpackMissingModule() { var e = new Error("Cannot find module \"./locale\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()); getSetGlobalLocale(oldLocale); } catch (e) {} } return locales[name]; } // This function will load locale and then set the global locale. If // no arguments are passed in, it will simply return the current global // locale key. function getSetGlobalLocale (key, values) { var data; if (key) { if (isUndefined(values)) { data = getLocale(key); } else { data = defineLocale(key, values); } if (data) { // moment.duration._locale = moment._locale = data; globalLocale = data; } else { if ((typeof console !== 'undefined') && console.warn) { //warn user if arguments are passed but the locale could not be set console.warn('Locale ' + key + ' not found. Did you forget to load it?'); } } } return globalLocale._abbr; } function defineLocale (name, config) { if (config !== null) { var locale, parentConfig = baseConfig; config.abbr = name; if (locales[name] != null) { deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); parentConfig = locales[name]._config; } else if (config.parentLocale != null) { if (locales[config.parentLocale] != null) { parentConfig = locales[config.parentLocale]._config; } else { locale = loadLocale(config.parentLocale); if (locale != null) { parentConfig = locale._config; } else { if (!localeFamilies[config.parentLocale]) { localeFamilies[config.parentLocale] = []; } localeFamilies[config.parentLocale].push({ name: name, config: config }); return null; } } } locales[name] = new Locale(mergeConfigs(parentConfig, config)); if (localeFamilies[name]) { localeFamilies[name].forEach(function (x) { defineLocale(x.name, x.config); }); } // backwards compat for now: also set the locale // make sure we set the locale AFTER all child locales have been // created, so we won't end up with the child locale set. getSetGlobalLocale(name); return locales[name]; } else { // useful for testing delete locales[name]; return null; } } function updateLocale(name, config) { if (config != null) { var locale, tmpLocale, parentConfig = baseConfig; // MERGE tmpLocale = loadLocale(name); if (tmpLocale != null) { parentConfig = tmpLocale._config; } config = mergeConfigs(parentConfig, config); locale = new Locale(config); locale.parentLocale = locales[name]; locales[name] = locale; // backwards compat for now: also set the locale getSetGlobalLocale(name); } else { // pass null for config to unupdate, useful for tests if (locales[name] != null) { if (locales[name].parentLocale != null) { locales[name] = locales[name].parentLocale; } else if (locales[name] != null) { delete locales[name]; } } } return locales[name]; } // returns locale data function getLocale (key) { var locale; if (key && key._locale && key._locale._abbr) { key = key._locale._abbr; } if (!key) { return globalLocale; } if (!isArray(key)) { //short-circuit everything else locale = loadLocale(key); if (locale) { return locale; } key = [key]; } return chooseLocale(key); } function listLocales() { return keys(locales); } function checkOverflow (m) { var overflow; var a = m._a; if (a && getParsingFlags(m).overflow === -2) { overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; } if (getParsingFlags(m)._overflowWeeks && overflow === -1) { overflow = WEEK; } if (getParsingFlags(m)._overflowWeekday && overflow === -1) { overflow = WEEKDAY; } getParsingFlags(m).overflow = overflow; } return m; } // Pick the first defined of two or three arguments. function defaults(a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; } function currentDateArray(config) { // hooks is actually the exported moment object var nowValue = new Date(hooks.now()); if (config._useUTC) { return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; } return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; } // convert an array to a date. // the array should mirror the parameters below // note: all values past the year are optional and will default to the lowest possible value. // [year, month, day , hour, minute, second, millisecond] function configFromArray (config) { var i, date, input = [], currentDate, expectedWeekday, yearToUse; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } //if the day of the year is set, figure out what it is if (config._dayOfYear != null) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } // Check for 24:00:00.000 if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { config._nextDay = true; config._a[HOUR] = 0; } config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } // check for mismatching day of week if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { getParsingFlags(config).weekdayMismatch = true; } } function dayOfYearFromWeekInfo(config) { var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; w = config._w; if (w.GG != null || w.W != null || w.E != null) { dow = 1; doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on // how we interpret now (local, utc, fixed offset). So create // a now version of current config (take local/utc/offset flags, and // create now). weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); week = defaults(w.W, 1); weekday = defaults(w.E, 1); if (weekday < 1 || weekday > 7) { weekdayOverflow = true; } } else { dow = config._locale._week.dow; doy = config._locale._week.doy; var curWeek = weekOfYear(createLocal(), dow, doy); weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. week = defaults(w.w, curWeek.week); if (w.d != null) { // weekday -- low day numbers are considered next week weekday = w.d; if (weekday < 0 || weekday > 6) { weekdayOverflow = true; } } else if (w.e != null) { // local weekday -- counting starts from begining of week weekday = w.e + dow; if (w.e < 0 || w.e > 6) { weekdayOverflow = true; } } else { // default to begining of week weekday = dow; } } if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { getParsingFlags(config)._overflowWeeks = true; } else if (weekdayOverflow != null) { getParsingFlags(config)._overflowWeekday = true; } else { temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); config._a[YEAR] = temp.year; config._dayOfYear = temp.dayOfYear; } } // iso 8601 regex // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; var isoDates = [ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/] ]; // iso time formats and regexes var isoTimes = [ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/] ]; var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format function configFromISO(config) { var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { // match[2] should be 'T' or space timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } } config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { var result = [ untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10) ]; if (secondStr) { result.push(parseInt(secondStr, 10)); } return result; } function untruncateYear(yearStr) { var year = parseInt(yearStr, 10); if (year <= 49) { return 2000 + year; } else if (year <= 999) { return 1900 + year; } return year; } function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) { if (weekdayStr) { // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); if (weekdayProvided !== weekdayActual) { getParsingFlags(config).weekdayMismatch = true; config._isValid = false; return false; } } return true; } var obsOffsets = { UT: 0, GMT: 0, EDT: -4 * 60, EST: -5 * 60, CDT: -5 * 60, CST: -6 * 60, MDT: -6 * 60, MST: -7 * 60, PDT: -7 * 60, PST: -8 * 60 }; function calculateOffset(obsOffset, militaryOffset, numOffset) { if (obsOffset) { return obsOffsets[obsOffset]; } else if (militaryOffset) { // the only allowed military tz is Z return 0; } else { var hm = parseInt(numOffset, 10); var m = hm % 100, h = (hm - m) / 100; return h * 60 + m; } } // date and time from ref 2822 format function configFromRFC2822(config) { var match = rfc2822.exec(preprocessRFC2822(config._i)); if (match) { var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); if (!checkWeekday(match[1], parsedArray, config)) { return; } config._a = parsedArray; config._tzm = calculateOffset(match[8], match[9], match[10]); config._d = createUTCDate.apply(null, config._a); config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); getParsingFlags(config).rfc2822 = true; } else { config._isValid = false; } } // date from iso format or fallback function configFromString(config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; } configFromISO(config); if (config._isValid === false) { delete config._isValid; } else { return; } configFromRFC2822(config); if (config._isValid === false) { delete config._isValid; } else { return; } // Final attempt, use Input Fallback hooks.createFromInputFallback(config); } hooks.createFromInputFallback = deprecate( 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } ); // constant that refers to the ISO standard hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form hooks.RFC_2822 = function () {}; // date from string and format string function configFromStringAndFormat(config) { // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === hooks.ISO_8601) { configFromISO(config); return; } if (config._f === hooks.RFC_2822) { configFromRFC2822(config); return; } config._a = []; getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, // 'regex', getParseRegexForToken(token, config)); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; } getParsingFlags(config).parsedDateParts = config._a.slice(0); getParsingFlags(config).meridiem = config._meridiem; // handle meridiem config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); } function meridiemFixWrap (locale, hour, meridiem) { var isPm; if (meridiem == null) { // nothing to do return hour; } if (locale.meridiemHour != null) { return locale.meridiemHour(hour, meridiem); } else if (locale.isPM != null) { // Fallback isPm = locale.isPM(meridiem); if (isPm && hour < 12) { hour += 12; } if (!isPm && hour === 12) { hour = 0; } return hour; } else { // this is not supposed to happen return hour; } } // date from string and array of format strings function configFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (!isValid(tempConfig)) { continue; } // if there is any input that was not parsed add a penalty for that format currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } extend(config, bestMoment || tempConfig); } function configFromObject(config) { if (config._d) { return; } var i = normalizeObjectUnits(config._i); config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { return obj && parseInt(obj, 10); }); configFromArray(config); } function createFromConfig (config) { var res = new Moment(checkOverflow(prepareConfig(config))); if (res._nextDay) { // Adding is smart enough around DST res.add(1, 'd'); res._nextDay = undefined; } return res; } function prepareConfig (config) { var input = config._i, format = config._f; config._locale = config._locale || getLocale(config._l); if (input === null || (format === undefined && input === '')) { return createInvalid({nullInput: true}); } if (typeof input === 'string') { config._i = input = config._locale.preparse(input); } if (isMoment(input)) { return new Moment(checkOverflow(input)); } else if (isDate(input)) { config._d = input; } else if (isArray(format)) { configFromStringAndArray(config); } else if (format) { configFromStringAndFormat(config); } else { configFromInput(config); } if (!isValid(config)) { config._d = null; } return config; } function configFromInput(config) { var input = config._i; if (isUndefined(input)) { config._d = new Date(hooks.now()); } else if (isDate(input)) { config._d = new Date(input.valueOf()); } else if (typeof input === 'string') { configFromString(config); } else if (isArray(input)) { config._a = map(input.slice(0), function (obj) { return parseInt(obj, 10); }); configFromArray(config); } else if (isObject(input)) { configFromObject(config); } else if (isNumber(input)) { // from milliseconds config._d = new Date(input); } else { hooks.createFromInputFallback(config); } } function createLocalOrUTC (input, format, locale, strict, isUTC) { var c = {}; if (locale === true || locale === false) { strict = locale; locale = undefined; } if ((isObject(input) && isObjectEmpty(input)) || (isArray(input) && input.length === 0)) { input = undefined; } // object construction must be done this way. // https://github.com/moment/moment/issues/1423 c._isAMomentObject = true; c._useUTC = c._isUTC = isUTC; c._l = locale; c._i = input; c._f = format; c._strict = strict; return createFromConfig(c); } function createLocal (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, false); } var prototypeMin = deprecate( 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other < this ? this : other; } else { return createInvalid(); } } ); var prototypeMax = deprecate( 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other > this ? this : other; } else { return createInvalid(); } } ); // Pick a moment m from moments so that m[fn](other) is true for all // other. This relies on the function fn to be transitive. // // moments should either be an array of moment objects or an array, whose // first element is an array of moment objects. function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; } // TODO: Use [].sort instead? function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); } function max () { var args = [].slice.call(arguments, 0); return pickBy('isAfter', args); } var now = function () { return Date.now ? Date.now() : +(new Date()); }; var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; function isDurationValid(m) { for (var key in m) { if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { return false; } } var unitHasDecimal = false; for (var i = 0; i < ordering.length; ++i) { if (m[ordering[i]]) { if (unitHasDecimal) { return false; // only allow non-integers for smallest unit } if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { unitHasDecimal = true; } } } return true; } function isValid$1() { return this._isValid; } function createInvalid$1() { return createDuration(NaN); } function Duration (duration) { var normalizedInput = normalizeObjectUnits(duration), years = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months = normalizedInput.month || 0, weeks = normalizedInput.week || 0, days = normalizedInput.day || 0, hours = normalizedInput.hour || 0, minutes = normalizedInput.minute || 0, seconds = normalizedInput.second || 0, milliseconds = normalizedInput.millisecond || 0; this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 minutes * 6e4 + // 1000 * 60 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 // Because of dateAddRemove treats 24 hours as different from a // day when working around DST, we need to store them separately this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing // which months you are are talking about, so we have to store // it separately. this._months = +months + quarters * 3 + years * 12; this._data = {}; this._locale = getLocale(); this._bubble(); } function isDuration (obj) { return obj instanceof Duration; } function absRound (number) { if (number < 0) { return Math.round(-1 * number) * -1; } else { return Math.round(number); } } // FORMATTING function offset (token, separator) { addFormatToken(token, 0, 0, function () { var offset = this.utcOffset(); var sign = '+'; if (offset < 0) { offset = -offset; sign = '-'; } return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); }); } offset('Z', ':'); offset('ZZ', ''); // PARSING addRegexToken('Z', matchShortOffset); addRegexToken('ZZ', matchShortOffset); addParseToken(['Z', 'ZZ'], function (input, array, config) { config._useUTC = true; config._tzm = offsetFromString(matchShortOffset, input); }); // HELPERS // timezone chunker // '+10:00' > ['10', '00'] // '-1530' > ['-15', '30'] var chunkOffset = /([\+\-]|\d\d)/gi; function offsetFromString(matcher, string) { var matches = (string || '').match(matcher); if (matches === null) { return null; } var chunk = matches[matches.length - 1] || []; var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; var minutes = +(parts[1] * 60) + toInt(parts[2]); return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; } // Return a moment from input, that is local/utc/zone equivalent to model. function cloneWithOffset(input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. res._d.setTime(res._d.valueOf() + diff); hooks.updateOffset(res, false); return res; } else { return createLocal(input).local(); } } function getDateOffset (m) { // On Firefox.24 Date#getTimezoneOffset returns a floating point. // https://github.com/moment/moment/pull/1871 return -Math.round(m._d.getTimezoneOffset() / 15) * 15; } // HOOKS // This function will be called whenever a moment is mutated. // It is intended to keep the offset in sync with the timezone. hooks.updateOffset = function () {}; // MOMENTS // keepLocalTime = true means only change the timezone, without // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset // +0200, so we adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour) // from the actual represented time. That is why we call updateOffset // a second time. In case it wants us to change the offset again // _changeInProgress == true case, then we have to adjust, because // there is no such time in the given timezone. function getSetOffset (input, keepLocalTime, keepMinutes) { var offset = this._offset || 0, localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); if (input === null) { return this; } } else if (Math.abs(input) < 16 && !keepMinutes) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { addSubtract(this, createDuration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } } function getSetZone (input, keepLocalTime) { if (input != null) { if (typeof input !== 'string') { input = -input; } this.utcOffset(input, keepLocalTime); return this; } else { return -this.utcOffset(); } } function setOffsetToUTC (keepLocalTime) { return this.utcOffset(0, keepLocalTime); } function setOffsetToLocal (keepLocalTime) { if (this._isUTC) { this.utcOffset(0, keepLocalTime); this._isUTC = false; if (keepLocalTime) { this.subtract(getDateOffset(this), 'm'); } } return this; } function setOffsetToParsedOffset () { if (this._tzm != null) { this.utcOffset(this._tzm, false, true); } else if (typeof this._i === 'string') { var tZone = offsetFromString(matchOffset, this._i); if (tZone != null) { this.utcOffset(tZone); } else { this.utcOffset(0, true); } } return this; } function hasAlignedHourOffset (input) { if (!this.isValid()) { return false; } input = input ? createLocal(input).utcOffset() : 0; return (this.utcOffset() - input) % 60 === 0; } function isDaylightSavingTime () { return ( this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() ); } function isDaylightSavingTimeShifted () { if (!isUndefined(this._isDSTShifted)) { return this._isDSTShifted; } var c = {}; copyConfig(c, this); c = prepareConfig(c); if (c._a) { var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; } else { this._isDSTShifted = false; } return this._isDSTShifted; } function isLocal () { return this.isValid() ? !this._isUTC : false; } function isUtcOffset () { return this.isValid() ? this._isUTC : false; } function isUtc () { return this.isValid() ? this._isUTC && this._offset === 0 : false; } // ASP.NET json date format regex var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere // and further modified to allow for strings containing both week and day var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function createDuration (input, key) { var duration = input, // matching against regexp is expensive, do it on demand match = null, sign, ret, diffRes; if (isDuration(input)) { duration = { ms : input._milliseconds, d : input._days, M : input._months }; } else if (isNumber(input)) { duration = {}; if (key) { duration[key] = input; } else { duration.milliseconds = input; } } else if (!!(match = aspNetRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; duration = { y : 0, d : toInt(match[DATE]) * sign, h : toInt(match[HOUR]) * sign, m : toInt(match[MINUTE]) * sign, s : toInt(match[SECOND]) * sign, ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match }; } else if (!!(match = isoRegex.exec(input))) { sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1; duration = { y : parseIso(match[2], sign), M : parseIso(match[3], sign), w : parseIso(match[4], sign), d : parseIso(match[5], sign), h : parseIso(match[6], sign), m : parseIso(match[7], sign), s : parseIso(match[8], sign) }; } else if (duration == null) {// checks for null or undefined duration = {}; } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); duration = {}; duration.ms = diffRes.milliseconds; duration.M = diffRes.months; } ret = new Duration(duration); if (isDuration(input) && hasOwnProp(input, '_locale')) { ret._locale = input._locale; } return ret; } createDuration.fn = Duration.prototype; createDuration.invalid = createInvalid$1; function parseIso (inp, sign) { // We'd normally use ~~inp for this, but unfortunately it also // converts floats to ints. // inp may be undefined, so careful calling replace on it. var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it return (isNaN(res) ? 0 : res) * sign; } function positiveMomentsDifference(base, other) { var res = {milliseconds: 0, months: 0}; res.months = other.month() - base.month() + (other.year() - base.year()) * 12; if (base.clone().add(res.months, 'M').isAfter(other)) { --res.months; } res.milliseconds = +other - +(base.clone().add(res.months, 'M')); return res; } function momentsDifference(base, other) { var res; if (!(base.isValid() && other.isValid())) { return {milliseconds: 0, months: 0}; } other = cloneWithOffset(other, base); if (base.isBefore(other)) { res = positiveMomentsDifference(base, other); } else { res = positiveMomentsDifference(other, base); res.milliseconds = -res.milliseconds; res.months = -res.months; } return res; } // TODO: remove 'name' arg after deprecation is removed function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); tmp = val; val = period; period = tmp; } val = typeof val === 'string' ? +val : val; dur = createDuration(val, period); addSubtract(this, dur, direction); return this; }; } function addSubtract (mom, duration, isAdding, updateOffset) { var milliseconds = duration._milliseconds, days = absRound(duration._days), months = absRound(duration._months); if (!mom.isValid()) { // No op return; } updateOffset = updateOffset == null ? true : updateOffset; if (months) { setMonth(mom, get(mom, 'Month') + months * isAdding); } if (days) { set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); } if (milliseconds) { mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); } if (updateOffset) { hooks.updateOffset(mom, days || months); } } var add = createAdder(1, 'add'); var subtract = createAdder(-1, 'subtract'); function getCalendarFormat(myMoment, now) { var diff = myMoment.diff(now, 'days', true); return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; } function calendar$1 (time, formats) { // We want to compare the start of today, vs this. // Getting start-of-today depends on whether we're local/utc/offset or not. var now = time || createLocal(), sod = cloneWithOffset(now, this).startOf('day'), format = hooks.calendarFormat(this, sod) || 'sameElse'; var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); return this.format(output || this.localeData().calendar(format, this, createLocal(now))); } function clone () { return new Moment(this); } function isAfter (input, units) { var localInput = isMoment(input) ? input : createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); if (units === 'millisecond') { return this.valueOf() > localInput.valueOf(); } else { return localInput.valueOf() < this.clone().startOf(units).valueOf(); } } function isBefore (input, units) { var localInput = isMoment(input) ? input : createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); if (units === 'millisecond') { return this.valueOf() < localInput.valueOf(); } else { return this.clone().endOf(units).valueOf() < localInput.valueOf(); } } function isBetween (from, to, units, inclusivity) { inclusivity = inclusivity || '()'; return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units)); } function isSame (input, units) { var localInput = isMoment(input) ? input : createLocal(input), inputMs; if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units || 'millisecond'); if (units === 'millisecond') { return this.valueOf() === localInput.valueOf(); } else { inputMs = localInput.valueOf(); return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); } } function isSameOrAfter (input, units) { return this.isSame(input, units) || this.isAfter(input,units); } function isSameOrBefore (input, units) { return this.isSame(input, units) || this.isBefore(input,units); } function diff (input, units, asFloat) { var that, zoneDelta, output; if (!this.isValid()) { return NaN; } that = cloneWithOffset(input, this); if (!that.isValid()) { return NaN; } zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; units = normalizeUnits(units); switch (units) { case 'year': output = monthDiff(this, that) / 12; break; case 'month': output = monthDiff(this, that); break; case 'quarter': output = monthDiff(this, that) / 3; break; case 'second': output = (this - that) / 1e3; break; // 1000 case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst default: output = this - that; } return asFloat ? output : absFloor(output); } function monthDiff (a, b) { // difference in months var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), // b is in (anchor - 1 month, anchor + 1 month) anchor = a.clone().add(wholeMonthDiff, 'months'), anchor2, adjust; if (b - anchor < 0) { anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor - anchor2); } else { anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor2 - anchor); } //check for negative zero, return zero if negative zero return -(wholeMonthDiff + adjust) || 0; } hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; function toString () { return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); } function toISOString(keepOffset) { if (!this.isValid()) { return null; } var utc = keepOffset !== true; var m = utc ? this.clone().utc() : this; if (m.year() < 0 || m.year() > 9999) { return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); } if (isFunction(Date.prototype.toISOString)) { // native implementation is ~50x faster, use it when we can if (utc) { return this.toDate().toISOString(); } else { return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); } } return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); } /** * Return a human readable representation of a moment that can * also be evaluated to get a new moment which is the same * * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects */ function inspect () { if (!this.isValid()) { return 'moment.invalid(/* ' + this._i + ' */)'; } var func = 'moment'; var zone = ''; if (!this.isLocal()) { func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; zone = 'Z'; } var prefix = '[' + func + '("]'; var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; var datetime = '-MM-DD[T]HH:mm:ss.SSS'; var suffix = zone + '[")]'; return this.format(prefix + year + datetime + suffix); } function format (inputString) { if (!inputString) { inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; } var output = formatMoment(this, inputString); return this.localeData().postformat(output); } function from (time, withoutSuffix) { if (this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid())) { return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function fromNow (withoutSuffix) { return this.from(createLocal(), withoutSuffix); } function to (time, withoutSuffix) { if (this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid())) { return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function toNow (withoutSuffix) { return this.to(createLocal(), withoutSuffix); } // If passed a locale key, it will set the locale for this // instance. Otherwise, it will return the locale configuration // variables for this instance. function locale (key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } } var lang = deprecate( 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { if (key === undefined) { return this.localeData(); } else { return this.locale(key); } } ); function localeData () { return this._locale; } function startOf (units) { units = normalizeUnits(units); // the following switch intentionally omits break keywords // to utilize falling through the cases. switch (units) { case 'year': this.month(0); /* falls through */ case 'quarter': case 'month': this.date(1); /* falls through */ case 'week': case 'isoWeek': case 'day': case 'date': this.hours(0); /* falls through */ case 'hour': this.minutes(0); /* falls through */ case 'minute': this.seconds(0); /* falls through */ case 'second': this.milliseconds(0); } // weeks are a special case if (units === 'week') { this.weekday(0); } if (units === 'isoWeek') { this.isoWeekday(1); } // quarters are also special if (units === 'quarter') { this.month(Math.floor(this.month() / 3) * 3); } return this; } function endOf (units) { units = normalizeUnits(units); if (units === undefined || units === 'millisecond') { return this; } // 'date' is an alias for 'day', so it should be considered as such. if (units === 'date') { units = 'day'; } return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); } function valueOf () { return this._d.valueOf() - ((this._offset || 0) * 60000); } function unix () { return Math.floor(this.valueOf() / 1000); } function toDate () { return new Date(this.valueOf()); } function toArray () { var m = this; return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; } function toObject () { var m = this; return { years: m.year(), months: m.month(), date: m.date(), hours: m.hours(), minutes: m.minutes(), seconds: m.seconds(), milliseconds: m.milliseconds() }; } function toJSON () { // new Date(NaN).toJSON() === null return this.isValid() ? this.toISOString() : null; } function isValid$2 () { return isValid(this); } function parsingFlags () { return extend({}, getParsingFlags(this)); } function invalidAt () { return getParsingFlags(this).overflow; } function creationData() { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict }; } // FORMATTING addFormatToken(0, ['gg', 2], 0, function () { return this.weekYear() % 100; }); addFormatToken(0, ['GG', 2], 0, function () { return this.isoWeekYear() % 100; }); function addWeekYearFormatToken (token, getter) { addFormatToken(0, [token, token.length], 0, getter); } addWeekYearFormatToken('gggg', 'weekYear'); addWeekYearFormatToken('ggggg', 'weekYear'); addWeekYearFormatToken('GGGG', 'isoWeekYear'); addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES addUnitAlias('weekYear', 'gg'); addUnitAlias('isoWeekYear', 'GG'); // PRIORITY addUnitPriority('weekYear', 1); addUnitPriority('isoWeekYear', 1); // PARSING addRegexToken('G', matchSigned); addRegexToken('g', matchSigned); addRegexToken('GG', match1to2, match2); addRegexToken('gg', match1to2, match2); addRegexToken('GGGG', match1to4, match4); addRegexToken('gggg', match1to4, match4); addRegexToken('GGGGG', match1to6, match6); addRegexToken('ggggg', match1to6, match6); addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { week[token.substr(0, 2)] = toInt(input); }); addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { week[token] = hooks.parseTwoDigitYear(input); }); // MOMENTS function getSetWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); } function getSetISOWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); } function getISOWeeksInYear () { return weeksInYear(this.year(), 1, 4); } function getWeeksInYear () { var weekInfo = this.localeData()._week; return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } function getSetWeekYearHelper(input, week, weekday, dow, doy) { var weeksTarget; if (input == null) { return weekOfYear(this, dow, doy).year; } else { weeksTarget = weeksInYear(input, dow, doy); if (week > weeksTarget) { week = weeksTarget; } return setWeekAll.call(this, input, week, weekday, dow, doy); } } function setWeekAll(weekYear, week, weekday, dow, doy) { var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); this.year(date.getUTCFullYear()); this.month(date.getUTCMonth()); this.date(date.getUTCDate()); return this; } // FORMATTING addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES addUnitAlias('quarter', 'Q'); // PRIORITY addUnitPriority('quarter', 7); // PARSING addRegexToken('Q', match1); addParseToken('Q', function (input, array) { array[MONTH] = (toInt(input) - 1) * 3; }); // MOMENTS function getSetQuarter (input) { return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); } // FORMATTING addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES addUnitAlias('date', 'D'); // PRIORITY addUnitPriority('date', 9); // PARSING addRegexToken('D', match1to2); addRegexToken('DD', match1to2, match2); addRegexToken('Do', function (isStrict, locale) { // TODO: Remove "ordinalParse" fallback in next major release. return isStrict ? (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : locale._dayOfMonthOrdinalParseLenient; }); addParseToken(['D', 'DD'], DATE); addParseToken('Do', function (input, array) { array[DATE] = toInt(input.match(match1to2)[0]); }); // MOMENTS var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES addUnitAlias('dayOfYear', 'DDD'); // PRIORITY addUnitPriority('dayOfYear', 4); // PARSING addRegexToken('DDD', match1to3); addRegexToken('DDDD', match3); addParseToken(['DDD', 'DDDD'], function (input, array, config) { config._dayOfYear = toInt(input); }); // HELPERS // MOMENTS function getSetDayOfYear (input) { var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); } // FORMATTING addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES addUnitAlias('minute', 'm'); // PRIORITY addUnitPriority('minute', 14); // PARSING addRegexToken('m', match1to2); addRegexToken('mm', match1to2, match2); addParseToken(['m', 'mm'], MINUTE); // MOMENTS var getSetMinute = makeGetSet('Minutes', false); // FORMATTING addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES addUnitAlias('second', 's'); // PRIORITY addUnitPriority('second', 15); // PARSING addRegexToken('s', match1to2); addRegexToken('ss', match1to2, match2); addParseToken(['s', 'ss'], SECOND); // MOMENTS var getSetSecond = makeGetSet('Seconds', false); // FORMATTING addFormatToken('S', 0, 0, function () { return ~~(this.millisecond() / 100); }); addFormatToken(0, ['SS', 2], 0, function () { return ~~(this.millisecond() / 10); }); addFormatToken(0, ['SSS', 3], 0, 'millisecond'); addFormatToken(0, ['SSSS', 4], 0, function () { return this.millisecond() * 10; }); addFormatToken(0, ['SSSSS', 5], 0, function () { return this.millisecond() * 100; }); addFormatToken(0, ['SSSSSS', 6], 0, function () { return this.millisecond() * 1000; }); addFormatToken(0, ['SSSSSSS', 7], 0, function () { return this.millisecond() * 10000; }); addFormatToken(0, ['SSSSSSSS', 8], 0, function () { return this.millisecond() * 100000; }); addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { return this.millisecond() * 1000000; }); // ALIASES addUnitAlias('millisecond', 'ms'); // PRIORITY addUnitPriority('millisecond', 16); // PARSING addRegexToken('S', match1to3, match1); addRegexToken('SS', match1to3, match2); addRegexToken('SSS', match1to3, match3); var token; for (token = 'SSSS'; token.length <= 9; token += 'S') { addRegexToken(token, matchUnsigned); } function parseMs(input, array) { array[MILLISECOND] = toInt(('0.' + input) * 1000); } for (token = 'S'; token.length <= 9; token += 'S') { addParseToken(token, parseMs); } // MOMENTS var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING addFormatToken('z', 0, 0, 'zoneAbbr'); addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS function getZoneAbbr () { return this._isUTC ? 'UTC' : ''; } function getZoneName () { return this._isUTC ? 'Coordinated Universal Time' : ''; } var proto = Moment.prototype; proto.add = add; proto.calendar = calendar$1; proto.clone = clone; proto.diff = diff; proto.endOf = endOf; proto.format = format; proto.from = from; proto.fromNow = fromNow; proto.to = to; proto.toNow = toNow; proto.get = stringGet; proto.invalidAt = invalidAt; proto.isAfter = isAfter; proto.isBefore = isBefore; proto.isBetween = isBetween; proto.isSame = isSame; proto.isSameOrAfter = isSameOrAfter; proto.isSameOrBefore = isSameOrBefore; proto.isValid = isValid$2; proto.lang = lang; proto.locale = locale; proto.localeData = localeData; proto.max = prototypeMax; proto.min = prototypeMin; proto.parsingFlags = parsingFlags; proto.set = stringSet; proto.startOf = startOf; proto.subtract = subtract; proto.toArray = toArray; proto.toObject = toObject; proto.toDate = toDate; proto.toISOString = toISOString; proto.inspect = inspect; proto.toJSON = toJSON; proto.toString = toString; proto.unix = unix; proto.valueOf = valueOf; proto.creationData = creationData; proto.year = getSetYear; proto.isLeapYear = getIsLeapYear; proto.weekYear = getSetWeekYear; proto.isoWeekYear = getSetISOWeekYear; proto.quarter = proto.quarters = getSetQuarter; proto.month = getSetMonth; proto.daysInMonth = getDaysInMonth; proto.week = proto.weeks = getSetWeek; proto.isoWeek = proto.isoWeeks = getSetISOWeek; proto.weeksInYear = getWeeksInYear; proto.isoWeeksInYear = getISOWeeksInYear; proto.date = getSetDayOfMonth; proto.day = proto.days = getSetDayOfWeek; proto.weekday = getSetLocaleDayOfWeek; proto.isoWeekday = getSetISODayOfWeek; proto.dayOfYear = getSetDayOfYear; proto.hour = proto.hours = getSetHour; proto.minute = proto.minutes = getSetMinute; proto.second = proto.seconds = getSetSecond; proto.millisecond = proto.milliseconds = getSetMillisecond; proto.utcOffset = getSetOffset; proto.utc = setOffsetToUTC; proto.local = setOffsetToLocal; proto.parseZone = setOffsetToParsedOffset; proto.hasAlignedHourOffset = hasAlignedHourOffset; proto.isDST = isDaylightSavingTime; proto.isLocal = isLocal; proto.isUtcOffset = isUtcOffset; proto.isUtc = isUtc; proto.isUTC = isUtc; proto.zoneAbbr = getZoneAbbr; proto.zoneName = getZoneName; proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); function createUnix (input) { return createLocal(input * 1000); } function createInZone () { return createLocal.apply(null, arguments).parseZone(); } function preParsePostFormat (string) { return string; } var proto$1 = Locale.prototype; proto$1.calendar = calendar; proto$1.longDateFormat = longDateFormat; proto$1.invalidDate = invalidDate; proto$1.ordinal = ordinal; proto$1.preparse = preParsePostFormat; proto$1.postformat = preParsePostFormat; proto$1.relativeTime = relativeTime; proto$1.pastFuture = pastFuture; proto$1.set = set; proto$1.months = localeMonths; proto$1.monthsShort = localeMonthsShort; proto$1.monthsParse = localeMonthsParse; proto$1.monthsRegex = monthsRegex; proto$1.monthsShortRegex = monthsShortRegex; proto$1.week = localeWeek; proto$1.firstDayOfYear = localeFirstDayOfYear; proto$1.firstDayOfWeek = localeFirstDayOfWeek; proto$1.weekdays = localeWeekdays; proto$1.weekdaysMin = localeWeekdaysMin; proto$1.weekdaysShort = localeWeekdaysShort; proto$1.weekdaysParse = localeWeekdaysParse; proto$1.weekdaysRegex = weekdaysRegex; proto$1.weekdaysShortRegex = weekdaysShortRegex; proto$1.weekdaysMinRegex = weekdaysMinRegex; proto$1.isPM = localeIsPM; proto$1.meridiem = localeMeridiem; function get$1 (format, index, field, setter) { var locale = getLocale(); var utc = createUTC().set(setter, index); return locale[field](utc, format); } function listMonthsImpl (format, index, field) { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; if (index != null) { return get$1(format, index, field, 'month'); } var i; var out = []; for (i = 0; i < 12; i++) { out[i] = get$1(format, i, field, 'month'); } return out; } // () // (5) // (fmt, 5) // (fmt) // (true) // (true, 5) // (true, fmt, 5) // (true, fmt) function listWeekdaysImpl (localeSorted, format, index, field) { if (typeof localeSorted === 'boolean') { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } else { format = localeSorted; index = format; localeSorted = false; if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } var locale = getLocale(), shift = localeSorted ? locale._week.dow : 0; if (index != null) { return get$1(format, (index + shift) % 7, field, 'day'); } var i; var out = []; for (i = 0; i < 7; i++) { out[i] = get$1(format, (i + shift) % 7, field, 'day'); } return out; } function listMonths (format, index) { return listMonthsImpl(format, index, 'months'); } function listMonthsShort (format, index) { return listMonthsImpl(format, index, 'monthsShort'); } function listWeekdays (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); } function listWeekdaysShort (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); } function listWeekdaysMin (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); } getSetGlobalLocale('en', { dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal : function (number) { var b = number % 10, output = (toInt(number % 100 / 10) === 1) ? 'th' : (b === 1) ? 'st' : (b === 2) ? 'nd' : (b === 3) ? 'rd' : 'th'; return number + output; } }); // Side effect imports hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); var mathAbs = Math.abs; function abs () { var data = this._data; this._milliseconds = mathAbs(this._milliseconds); this._days = mathAbs(this._days); this._months = mathAbs(this._months); data.milliseconds = mathAbs(data.milliseconds); data.seconds = mathAbs(data.seconds); data.minutes = mathAbs(data.minutes); data.hours = mathAbs(data.hours); data.months = mathAbs(data.months); data.years = mathAbs(data.years); return this; } function addSubtract$1 (duration, input, value, direction) { var other = createDuration(input, value); duration._milliseconds += direction * other._milliseconds; duration._days += direction * other._days; duration._months += direction * other._months; return duration._bubble(); } // supports only 2.0-style add(1, 's') or add(duration) function add$1 (input, value) { return addSubtract$1(this, input, value, 1); } // supports only 2.0-style subtract(1, 's') or subtract(duration) function subtract$1 (input, value) { return addSubtract$1(this, input, value, -1); } function absCeil (number) { if (number < 0) { return Math.floor(number); } else { return Math.ceil(number); } } function bubble () { var milliseconds = this._milliseconds; var days = this._days; var months = this._months; var data = this._data; var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first // check: https://github.com/moment/moment/issues/2166 if (!((milliseconds >= 0 && days >= 0 && months >= 0) || (milliseconds <= 0 && days <= 0 && months <= 0))) { milliseconds += absCeil(monthsToDays(months) + days) * 864e5; days = 0; months = 0; } // The following code bubbles up values, see the tests for // examples of what that means. data.milliseconds = milliseconds % 1000; seconds = absFloor(milliseconds / 1000); data.seconds = seconds % 60; minutes = absFloor(seconds / 60); data.minutes = minutes % 60; hours = absFloor(minutes / 60); data.hours = hours % 24; days += absFloor(hours / 24); // convert days to months monthsFromDays = absFloor(daysToMonths(days)); months += monthsFromDays; days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year years = absFloor(months / 12); months %= 12; data.days = days; data.months = months; data.years = years; return this; } function daysToMonths (days) { // 400 years have 146097 days (taking into account leap year rules) // 400 years have 12 months === 4800 return days * 4800 / 146097; } function monthsToDays (months) { // the reverse of daysToMonths return months * 146097 / 4800; } function as (units) { if (!this.isValid()) { return NaN; } var days; var months; var milliseconds = this._milliseconds; units = normalizeUnits(units); if (units === 'month' || units === 'year') { days = this._days + milliseconds / 864e5; months = this._months + daysToMonths(days); return units === 'month' ? months : months / 12; } else { // handle milliseconds separately because of floating point math errors (issue #1867) days = this._days + Math.round(monthsToDays(this._months)); switch (units) { case 'week' : return days / 7 + milliseconds / 6048e5; case 'day' : return days + milliseconds / 864e5; case 'hour' : return days * 24 + milliseconds / 36e5; case 'minute' : return days * 1440 + milliseconds / 6e4; case 'second' : return days * 86400 + milliseconds / 1000; // Math.floor prevents floating point math errors here case 'millisecond': return Math.floor(days * 864e5) + milliseconds; default: throw new Error('Unknown unit ' + units); } } } // TODO: Use this.as('ms')? function valueOf$1 () { if (!this.isValid()) { return NaN; } return ( this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6 ); } function makeAs (alias) { return function () { return this.as(alias); }; } var asMilliseconds = makeAs('ms'); var asSeconds = makeAs('s'); var asMinutes = makeAs('m'); var asHours = makeAs('h'); var asDays = makeAs('d'); var asWeeks = makeAs('w'); var asMonths = makeAs('M'); var asYears = makeAs('y'); function clone$1 () { return createDuration(this); } function get$2 (units) { units = normalizeUnits(units); return this.isValid() ? this[units + 's']() : NaN; } function makeGetter(name) { return function () { return this.isValid() ? this._data[name] : NaN; }; } var milliseconds = makeGetter('milliseconds'); var seconds = makeGetter('seconds'); var minutes = makeGetter('minutes'); var hours = makeGetter('hours'); var days = makeGetter('days'); var months = makeGetter('months'); var years = makeGetter('years'); function weeks () { return absFloor(this.days() / 7); } var round = Math.round; var thresholds = { ss: 44, // a few seconds to seconds s : 45, // seconds to minute m : 45, // minutes to hour h : 22, // hours to day d : 26, // days to month M : 11 // months to year }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); } function relativeTime$1 (posNegDuration, withoutSuffix, locale) { var duration = createDuration(posNegDuration).abs(); var seconds = round(duration.as('s')); var minutes = round(duration.as('m')); var hours = round(duration.as('h')); var days = round(duration.as('d')); var months = round(duration.as('M')); var years = round(duration.as('y')); var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; a[2] = withoutSuffix; a[3] = +posNegDuration > 0; a[4] = locale; return substituteTimeAgo.apply(null, a); } // This function allows you to set the rounding function for relative time strings function getSetRelativeTimeRounding (roundingFunction) { if (roundingFunction === undefined) { return round; } if (typeof(roundingFunction) === 'function') { round = roundingFunction; return true; } return false; } // This function allows you to set a threshold for relative time strings function getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; } thresholds[threshold] = limit; if (threshold === 's') { thresholds.ss = limit - 1; } return true; } function humanize (withSuffix) { if (!this.isValid()) { return this.localeData().invalidDate(); } var locale = this.localeData(); var output = relativeTime$1(this, !withSuffix, locale); if (withSuffix) { output = locale.pastFuture(+this, output); } return locale.postformat(output); } var abs$1 = Math.abs; function sign(x) { return ((x > 0) - (x < 0)) || +x; } function toISOString$1() { // for ISO strings we do not use the normal bubbling rules: // * milliseconds bubble up until they become hours // * days do not bubble at all // * months bubble up until they become years // This is because there is no context-free conversion between hours and days // (think of clock changes) // and also not between days and months (28-31 days per month) if (!this.isValid()) { return this.localeData().invalidDate(); } var seconds = abs$1(this._milliseconds) / 1000; var days = abs$1(this._days); var months = abs$1(this._months); var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour minutes = absFloor(seconds / 60); hours = absFloor(minutes / 60); seconds %= 60; minutes %= 60; // 12 months -> 1 year years = absFloor(months / 12); months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js var Y = years; var M = months; var D = days; var h = hours; var m = minutes; var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; var total = this.asSeconds(); if (!total) { // this is the same as C#'s (Noda) and python (isodate)... // but not other JS (goog.date) return 'P0D'; } var totalSign = total < 0 ? '-' : ''; var ymSign = sign(this._months) !== sign(total) ? '-' : ''; var daysSign = sign(this._days) !== sign(total) ? '-' : ''; var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + ((h || m || s) ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); } var proto$2 = Duration.prototype; proto$2.isValid = isValid$1; proto$2.abs = abs; proto$2.add = add$1; proto$2.subtract = subtract$1; proto$2.as = as; proto$2.asMilliseconds = asMilliseconds; proto$2.asSeconds = asSeconds; proto$2.asMinutes = asMinutes; proto$2.asHours = asHours; proto$2.asDays = asDays; proto$2.asWeeks = asWeeks; proto$2.asMonths = asMonths; proto$2.asYears = asYears; proto$2.valueOf = valueOf$1; proto$2._bubble = bubble; proto$2.clone = clone$1; proto$2.get = get$2; proto$2.milliseconds = milliseconds; proto$2.seconds = seconds; proto$2.minutes = minutes; proto$2.hours = hours; proto$2.days = days; proto$2.weeks = weeks; proto$2.months = months; proto$2.years = years; proto$2.humanize = humanize; proto$2.toISOString = toISOString$1; proto$2.toString = toISOString$1; proto$2.toJSON = toISOString$1; proto$2.locale = locale; proto$2.localeData = localeData; proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); proto$2.lang = lang; // Side effect imports // FORMATTING addFormatToken('X', 0, 0, 'unix'); addFormatToken('x', 0, 0, 'valueOf'); // PARSING addRegexToken('x', matchSigned); addRegexToken('X', matchTimestamp); addParseToken('X', function (input, array, config) { config._d = new Date(parseFloat(input, 10) * 1000); }); addParseToken('x', function (input, array, config) { config._d = new Date(toInt(input)); }); // Side effect imports hooks.version = '2.22.2'; setHookCallback(createLocal); hooks.fn = proto; hooks.min = min; hooks.max = max; hooks.now = now; hooks.utc = createUTC; hooks.unix = createUnix; hooks.months = listMonths; hooks.isDate = isDate; hooks.locale = getSetGlobalLocale; hooks.invalid = createInvalid; hooks.duration = createDuration; hooks.isMoment = isMoment; hooks.weekdays = listWeekdays; hooks.parseZone = createInZone; hooks.localeData = getLocale; hooks.isDuration = isDuration; hooks.monthsShort = listMonthsShort; hooks.weekdaysMin = listWeekdaysMin; hooks.defineLocale = defineLocale; hooks.updateLocale = updateLocale; hooks.locales = listLocales; hooks.weekdaysShort = listWeekdaysShort; hooks.normalizeUnits = normalizeUnits; hooks.relativeTimeRounding = getSetRelativeTimeRounding; hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; hooks.calendarFormat = getCalendarFormat; hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats hooks.HTML5_FMT = { DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // DATE: 'YYYY-MM-DD', // TIME: 'HH:mm', // TIME_SECONDS: 'HH:mm:ss', // TIME_MS: 'HH:mm:ss.SSS', // WEEK: 'YYYY-[W]WW', // MONTH: 'YYYY-MM' // }; return hooks; }))); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("l262")(module))) /***/ }), /***/ "af0K": /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__("dhak"); var ITERATOR = __webpack_require__("Ug9I")('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /***/ "akPY": /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__("Gfzd"); var createDesc = __webpack_require__("0WCH"); module.exports = __webpack_require__("6MLN") ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ "awqi": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.4.2 * react.production.min.js * * 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 k=__webpack_require__("J4Nk"),n=__webpack_require__("wRU+"),p=__webpack_require__("+CtU"),q=__webpack_require__("UQex"),r="function"===typeof Symbol&&Symbol.for,t=r?Symbol.for("react.element"):60103,u=r?Symbol.for("react.portal"):60106,v=r?Symbol.for("react.fragment"):60107,w=r?Symbol.for("react.strict_mode"):60108,x=r?Symbol.for("react.profiler"):60114,y=r?Symbol.for("react.provider"):60109,z=r?Symbol.for("react.context"):60110,A=r?Symbol.for("react.async_mode"):60111,B= r?Symbol.for("react.forward_ref"):60112;r&&Symbol.for("react.timeout");var C="function"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;cP.length&&P.push(a)} function S(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /***/ "bvhO": /***/ (function(module, exports, __webpack_require__) { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var stringifyPrimitive = function(v) { switch (typeof v) { case 'string': return v; case 'boolean': return v ? 'true' : 'false'; case 'number': return isFinite(v) ? v : ''; default: return ''; } }; module.exports = function(obj, sep, eq, name) { sep = sep || '&'; eq = eq || '='; if (obj === null) { obj = undefined; } if (typeof obj === 'object') { return map(objectKeys(obj), function(k) { var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; if (isArray(obj[k])) { return map(obj[k], function(v) { return ks + encodeURIComponent(stringifyPrimitive(v)); }).join(sep); } else { return ks + encodeURIComponent(stringifyPrimitive(obj[k])); } }).join(sep); } if (!name) return ''; return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; function map (xs, f) { if (xs.map) return xs.map(f); var res = []; for (var i = 0; i < xs.length; i++) { res.push(f(xs[i], i)); } return res; } var objectKeys = Object.keys || function (obj) { var res = []; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); } return res; }; /***/ }), /***/ "c2zY": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("i1Q6"); var core = __webpack_require__("zKeE"); var LIBRARY = __webpack_require__("1kq3"); var wksExt = __webpack_require__("ZxII"); var defineProperty = __webpack_require__("Gfzd").f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /***/ "c6mp": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("c2zY")('asyncIterator'); /***/ }), /***/ "cDyG": /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__("ZC1a"); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /***/ "cOHw": /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__("vSO4"); var core = __webpack_require__("zKeE"); var fails = __webpack_require__("wLcK"); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /***/ "cjsw": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("yOG5"); var $Object = __webpack_require__("zKeE").Object; module.exports = function create(P, D) { return $Object.create(P, D); }; /***/ }), /***/ "d05+": /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__("kAdy"); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /***/ "d4H2": /***/ (function(module, exports, __webpack_require__) { var setPrototypeOf = __webpack_require__("AkAO"); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) setPrototypeOf(subClass, superClass); } module.exports = _inherits; /***/ }), /***/ "dACh": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /***/ "dKQ/": /***/ (function(module, exports) { var format = function (mockData) { return delay(mockData, 0); }; var delay = function (proxy, timer) { var mockApi = {}; Object.keys(proxy).forEach(function(key) { var result = proxy[key].$body || proxy[key]; if (Object.prototype.toString.call(result) === '[object String]' && /^http/.test(result)) { mockApi[key] = proxy[key]; } else { mockApi[key] = function (req, res) { var foo; if (Object.prototype.toString.call(result) === '[object Function]') { foo = result; } else { foo = function (req, res) { res.json(result); }; } setTimeout(function() { foo(req, res); }, timer); }; } }); mockApi.__mockData = proxy; return mockApi; }; module.exports.delay = delay; module.exports.format = format; /***/ }), /***/ "dRuq": /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__("e5TX"), isObject = __webpack_require__("u9vI"); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /***/ "dXs8": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("b1tA"); module.exports = __webpack_require__("zKeE").Object.setPrototypeOf; /***/ }), /***/ "dh0Z": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "dhak": /***/ (function(module, exports) { module.exports = {}; /***/ }), /***/ "dtkN": /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__("p/s9"), baseAssignValue = __webpack_require__("d05+"); /** * 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; /***/ }), /***/ "dvrd": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "e5TX": /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__("wppe"), getRawTag = __webpack_require__("uiOY"), objectToString = __webpack_require__("lPmd"); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /***/ "e8vu": /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__("X6va")('meta'); var isObject = __webpack_require__("BxvP"); var has = __webpack_require__("yS17"); var setDesc = __webpack_require__("Gfzd").f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__("wLcK")(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /***/ "eMAQ": /***/ (function(module, exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { if(true) module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["Mock"] = factory(); else root["Mock"] = factory(); })(this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { /* global require, module, window */ var Handler = __webpack_require__(1) var Util = __webpack_require__(3) var Random = __webpack_require__(5) var RE = __webpack_require__(20) var toJSONSchema = __webpack_require__(23) var valid = __webpack_require__(25) var XHR if (typeof window !== 'undefined') XHR = __webpack_require__(27) /*! Mock - 模拟请求 & 模拟数据 https://github.com/nuysoft/Mock 墨智 mozhi.gyy@taobao.com nuysoft@gmail.com */ var Mock = { Handler: Handler, Random: Random, Util: Util, XHR: XHR, RE: RE, toJSONSchema: toJSONSchema, valid: valid, heredoc: Util.heredoc, setup: function(settings) { return XHR.setup(settings) }, _mocked: {} } Mock.version = '1.0.1-beta3' // 避免循环依赖 if (XHR) XHR.Mock = Mock /* * Mock.mock( template ) * Mock.mock( function() ) * Mock.mock( rurl, template ) * Mock.mock( rurl, function(options) ) * Mock.mock( rurl, rtype, template ) * Mock.mock( rurl, rtype, function(options) ) 根据数据模板生成模拟数据。 */ Mock.mock = function(rurl, rtype, template) { // Mock.mock(template) if (arguments.length === 1) { return Handler.gen(rurl) } // Mock.mock(rurl, template) if (arguments.length === 2) { template = rtype rtype = undefined } // 拦截 XHR if (XHR) window.XMLHttpRequest = XHR Mock._mocked[rurl + (rtype || '')] = { rurl: rurl, rtype: rtype, template: template } return Mock } module.exports = Mock /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { /* ## Handler 处理数据模板。 * Handler.gen( template, name?, context? ) 入口方法。 * Data Template Definition, DTD 处理数据模板定义。 * Handler.array( options ) * Handler.object( options ) * Handler.number( options ) * Handler.boolean( options ) * Handler.string( options ) * Handler.function( options ) * Handler.regexp( options ) 处理路径(相对和绝对)。 * Handler.getValueByKeyPath( key, options ) * Data Placeholder Definition, DPD 处理数据占位符定义 * Handler.placeholder( placeholder, context, templateContext, options ) */ var Constant = __webpack_require__(2) var Util = __webpack_require__(3) var Parser = __webpack_require__(4) var Random = __webpack_require__(5) var RE = __webpack_require__(20) var Handler = { extend: Util.extend } /* template 属性值(即数据模板) name 属性名 context 数据上下文,生成后的数据 templateContext 模板上下文, Handle.gen(template, name, options) context currentContext, templateCurrentContext, path, templatePath root, templateRoot */ Handler.gen = function(template, name, context) { /* jshint -W041 */ name = name == undefined ? '' : (name + '') context = context || {} context = { // 当前访问路径,只有属性名,不包括生成规则 path: context.path || [Constant.GUID], templatePath: context.templatePath || [Constant.GUID++], // 最终属性值的上下文 currentContext: context.currentContext, // 属性值模板的上下文 templateCurrentContext: context.templateCurrentContext || template, // 最终值的根 root: context.root || context.currentContext, // 模板的根 templateRoot: context.templateRoot || context.templateCurrentContext || template } // console.log('path:', context.path.join('.'), template) var rule = Parser.parse(name) var type = Util.type(template) var data if (Handler[type]) { data = Handler[type]({ // 属性值类型 type: type, // 属性值模板 template: template, // 属性名 + 生成规则 name: name, // 属性名 parsedName: name ? name.replace(Constant.RE_KEY, '$1') : name, // 解析后的生成规则 rule: rule, // 相关上下文 context: context }) if (!context.root) context.root = data return data } return template } Handler.extend({ array: function(options) { var result = [], i, ii; // 'name|1': [] // 'name|count': [] // 'name|min-max': [] if (options.template.length === 0) return result // 'arr': [{ 'email': '@EMAIL' }, { 'email': '@EMAIL' }] if (!options.rule.parameters) { for (i = 0; i < options.template.length; i++) { options.context.path.push(i) options.context.templatePath.push(i) result.push( Handler.gen(options.template[i], i, { path: options.context.path, templatePath: options.context.templatePath, currentContext: result, templateCurrentContext: options.template, root: options.context.root || result, templateRoot: options.context.templateRoot || options.template }) ) options.context.path.pop() options.context.templatePath.pop() } } else { // 'method|1': ['GET', 'POST', 'HEAD', 'DELETE'] if (options.rule.min === 1 && options.rule.max === undefined) { // fix #17 options.context.path.push(options.name) options.context.templatePath.push(options.name) result = Random.pick( Handler.gen(options.template, undefined, { path: options.context.path, templatePath: options.context.templatePath, currentContext: result, templateCurrentContext: options.template, root: options.context.root || result, templateRoot: options.context.templateRoot || options.template }) ) options.context.path.pop() options.context.templatePath.pop() } else { // 'data|+1': [{}, {}] if (options.rule.parameters[2]) { options.template.__order_index = options.template.__order_index || 0 options.context.path.push(options.name) options.context.templatePath.push(options.name) result = Handler.gen(options.template, undefined, { path: options.context.path, templatePath: options.context.templatePath, currentContext: result, templateCurrentContext: options.template, root: options.context.root || result, templateRoot: options.context.templateRoot || options.template })[ options.template.__order_index % options.template.length ] options.template.__order_index += +options.rule.parameters[2] options.context.path.pop() options.context.templatePath.pop() } else { // 'data|1-10': [{}] for (i = 0; i < options.rule.count; i++) { // 'data|1-10': [{}, {}] for (ii = 0; ii < options.template.length; ii++) { options.context.path.push(result.length) options.context.templatePath.push(ii) result.push( Handler.gen(options.template[ii], result.length, { path: options.context.path, templatePath: options.context.templatePath, currentContext: result, templateCurrentContext: options.template, root: options.context.root || result, templateRoot: options.context.templateRoot || options.template }) ) options.context.path.pop() options.context.templatePath.pop() } } } } } return result }, object: function(options) { var result = {}, keys, fnKeys, key, parsedKey, inc, i; // 'obj|min-max': {} /* jshint -W041 */ if (options.rule.min != undefined) { keys = Util.keys(options.template) keys = Random.shuffle(keys) keys = keys.slice(0, options.rule.count) for (i = 0; i < keys.length; i++) { key = keys[i] parsedKey = key.replace(Constant.RE_KEY, '$1') options.context.path.push(parsedKey) options.context.templatePath.push(key) result[parsedKey] = Handler.gen(options.template[key], key, { path: options.context.path, templatePath: options.context.templatePath, currentContext: result, templateCurrentContext: options.template, root: options.context.root || result, templateRoot: options.context.templateRoot || options.template }) options.context.path.pop() options.context.templatePath.pop() } } else { // 'obj': {} keys = [] fnKeys = [] // #25 改变了非函数属性的顺序,查找起来不方便 for (key in options.template) { (typeof options.template[key] === 'function' ? fnKeys : keys).push(key) } keys = keys.concat(fnKeys) /* 会改变非函数属性的顺序 keys = Util.keys(options.template) keys.sort(function(a, b) { var afn = typeof options.template[a] === 'function' var bfn = typeof options.template[b] === 'function' if (afn === bfn) return 0 if (afn && !bfn) return 1 if (!afn && bfn) return -1 }) */ for (i = 0; i < keys.length; i++) { key = keys[i] parsedKey = key.replace(Constant.RE_KEY, '$1') options.context.path.push(parsedKey) options.context.templatePath.push(key) result[parsedKey] = Handler.gen(options.template[key], key, { path: options.context.path, templatePath: options.context.templatePath, currentContext: result, templateCurrentContext: options.template, root: options.context.root || result, templateRoot: options.context.templateRoot || options.template }) options.context.path.pop() options.context.templatePath.pop() // 'id|+1': 1 inc = key.match(Constant.RE_KEY) if (inc && inc[2] && Util.type(options.template[key]) === 'number') { options.template[key] += parseInt(inc[2], 10) } } } return result }, number: function(options) { var result, parts; if (options.rule.decimal) { // float options.template += '' parts = options.template.split('.') // 'float1|.1-10': 10, // 'float2|1-100.1-10': 1, // 'float3|999.1-10': 1, // 'float4|.3-10': 123.123, parts[0] = options.rule.range ? options.rule.count : parts[0] parts[1] = (parts[1] || '').slice(0, options.rule.dcount) while (parts[1].length < options.rule.dcount) { parts[1] += ( // 最后一位不能为 0:如果最后一位为 0,会被 JS 引擎忽略掉。 (parts[1].length < options.rule.dcount - 1) ? Random.character('number') : Random.character('123456789') ) } result = parseFloat(parts.join('.'), 10) } else { // integer // 'grade1|1-100': 1, result = options.rule.range && !options.rule.parameters[2] ? options.rule.count : options.template } return result }, boolean: function(options) { var result; // 'prop|multiple': false, 当前值是相反值的概率倍数 // 'prop|probability-probability': false, 当前值与相反值的概率 result = options.rule.parameters ? Random.bool(options.rule.min, options.rule.max, options.template) : options.template return result }, string: function(options) { var result = '', i, placeholders, ph, phed; if (options.template.length) { // 'foo': '★', /* jshint -W041 */ if (options.rule.count == undefined) { result += options.template } // 'star|1-5': '★', for (i = 0; i < options.rule.count; i++) { result += options.template } // 'email|1-10': '@EMAIL, ', placeholders = result.match(Constant.RE_PLACEHOLDER) || [] // A-Z_0-9 > \w_ for (i = 0; i < placeholders.length; i++) { ph = placeholders[i] // 遇到转义斜杠,不需要解析占位符 if (/^\\/.test(ph)) { placeholders.splice(i--, 1) continue } phed = Handler.placeholder(ph, options.context.currentContext, options.context.templateCurrentContext, options) // 只有一个占位符,并且没有其他字符 if (placeholders.length === 1 && ph === result && typeof phed !== typeof result) { // result = phed break if (Util.isNumeric(phed)) { result = parseFloat(phed, 10) break } if (/^(true|false)$/.test(phed)) { result = phed === 'true' ? true : phed === 'false' ? false : phed // 已经是布尔值 break } } result = result.replace(ph, phed) } } else { // 'ASCII|1-10': '', // 'ASCII': '', result = options.rule.range ? Random.string(options.rule.count) : options.template } return result }, 'function': function(options) { // ( context, options ) return options.template.call(options.context.currentContext, options) }, 'regexp': function(options) { var source = '' // 'name': /regexp/, /* jshint -W041 */ if (options.rule.count == undefined) { source += options.template.source // regexp.source } // 'name|1-5': /regexp/, for (var i = 0; i < options.rule.count; i++) { source += options.template.source } return RE.Handler.gen( RE.Parser.parse( source ) ) } }) Handler.extend({ _all: function() { var re = {}; for (var key in Random) re[key.toLowerCase()] = key return re }, // 处理占位符,转换为最终值 placeholder: function(placeholder, obj, templateContext, options) { // console.log(options.context.path) // 1 key, 2 params Constant.RE_PLACEHOLDER.exec('') var parts = Constant.RE_PLACEHOLDER.exec(placeholder), key = parts && parts[1], lkey = key && key.toLowerCase(), okey = this._all()[lkey], params = parts && parts[2] || '' var pathParts = this.splitPathToArray(key) // 解析占位符的参数 try { // 1. 尝试保持参数的类型 /* #24 [Window Firefox 30.0 引用 占位符 抛错](https://github.com/nuysoft/Mock/issues/24) [BX9056: 各浏览器下 window.eval 方法的执行上下文存在差异](http://www.w3help.org/zh-cn/causes/BX9056) 应该属于 Window Firefox 30.0 的 BUG */ /* jshint -W061 */ params = eval('(function(){ return [].splice.call(arguments, 0 ) })(' + params + ')') } catch (error) { // 2. 如果失败,只能解析为字符串 // console.error(error) // if (error instanceof ReferenceError) params = parts[2].split(/,\s*/); // else throw error params = parts[2].split(/,\s*/) } // 占位符优先引用数据模板中的属性 if (obj && (key in obj)) return obj[key] // @index @key // if (Constant.RE_INDEX.test(key)) return +options.name // if (Constant.RE_KEY.test(key)) return options.name // 绝对路径 or 相对路径 if ( key.charAt(0) === '/' || pathParts.length > 1 ) return this.getValueByKeyPath(key, options) // 递归引用数据模板中的属性 if (templateContext && (typeof templateContext === 'object') && (key in templateContext) && (placeholder !== templateContext[key]) // fix #15 避免自己依赖自己 ) { // 先计算被引用的属性值 templateContext[key] = Handler.gen(templateContext[key], key, { currentContext: obj, templateCurrentContext: templateContext }) return templateContext[key] } // 如果未找到,则原样返回 if (!(key in Random) && !(lkey in Random) && !(okey in Random)) return placeholder // 递归解析参数中的占位符 for (var i = 0; i < params.length; i++) { Constant.RE_PLACEHOLDER.exec('') if (Constant.RE_PLACEHOLDER.test(params[i])) { params[i] = Handler.placeholder(params[i], obj, templateContext, options) } } var handle = Random[key] || Random[lkey] || Random[okey] switch (Util.type(handle)) { case 'array': // 自动从数组中取一个,例如 @areas return Random.pick(handle) case 'function': // 执行占位符方法(大多数情况) handle.options = options var re = handle.apply(Random, params) if (re === undefined) re = '' // 因为是在字符串中,所以默认为空字符串。 delete handle.options return re } }, getValueByKeyPath: function(key, options) { var originalKey = key var keyPathParts = this.splitPathToArray(key) var absolutePathParts = [] // 绝对路径 if (key.charAt(0) === '/') { absolutePathParts = [options.context.path[0]].concat( this.normalizePath(keyPathParts) ) } else { // 相对路径 if (keyPathParts.length > 1) { absolutePathParts = options.context.path.slice(0) absolutePathParts.pop() absolutePathParts = this.normalizePath( absolutePathParts.concat(keyPathParts) ) } } key = keyPathParts[keyPathParts.length - 1] var currentContext = options.context.root var templateCurrentContext = options.context.templateRoot for (var i = 1; i < absolutePathParts.length - 1; i++) { currentContext = currentContext[absolutePathParts[i]] templateCurrentContext = templateCurrentContext[absolutePathParts[i]] } // 引用的值已经计算好 if (currentContext && (key in currentContext)) return currentContext[key] // 尚未计算,递归引用数据模板中的属性 if (templateCurrentContext && (typeof templateCurrentContext === 'object') && (key in templateCurrentContext) && (originalKey !== templateCurrentContext[key]) // fix #15 避免自己依赖自己 ) { // 先计算被引用的属性值 templateCurrentContext[key] = Handler.gen(templateCurrentContext[key], key, { currentContext: currentContext, templateCurrentContext: templateCurrentContext }) return templateCurrentContext[key] } }, // https://github.com/kissyteam/kissy/blob/master/src/path/src/path.js normalizePath: function(pathParts) { var newPathParts = [] for (var i = 0; i < pathParts.length; i++) { switch (pathParts[i]) { case '..': newPathParts.pop() break case '.': break default: newPathParts.push(pathParts[i]) } } return newPathParts }, splitPathToArray: function(path) { var parts = path.split(/\/+/); if (!parts[parts.length - 1]) parts = parts.slice(0, -1) if (!parts[0]) parts = parts.slice(1) return parts; } }) module.exports = Handler /***/ }, /* 2 */ /***/ function(module, exports) { /* ## Constant 常量集合。 */ /* RE_KEY 'name|min-max': value 'name|count': value 'name|min-max.dmin-dmax': value 'name|min-max.dcount': value 'name|count.dmin-dmax': value 'name|count.dcount': value 'name|+step': value 1 name, 2 step, 3 range [ min, max ], 4 drange [ dmin, dmax ] RE_PLACEHOLDER placeholder(*) [正则查看工具](http://www.regexper.com/) #26 生成规则 支持 负数,例如 number|-100-100 */ module.exports = { GUID: 1, RE_KEY: /(.+)\|(?:\+(\d+)|([\+\-]?\d+-?[\+\-]?\d*)?(?:\.(\d+-?\d*))?)/, RE_RANGE: /([\+\-]?\d+)-?([\+\-]?\d+)?/, RE_PLACEHOLDER: /\\*@([^@#%&()\?\s]+)(?:\((.*?)\))?/g // /\\*@([^@#%&()\?\s\/\.]+)(?:\((.*?)\))?/g // RE_INDEX: /^index$/, // RE_KEY: /^key$/ } /***/ }, /* 3 */ /***/ function(module, exports) { /* ## Utilities */ var Util = {} Util.extend = function extend() { var target = arguments[0] || {}, i = 1, length = arguments.length, options, name, src, copy, clone if (length === 1) { target = this i = 0 } for (; i < length; i++) { options = arguments[i] if (!options) continue for (name in options) { src = target[name] copy = options[name] if (target === copy) continue if (copy === undefined) continue if (Util.isArray(copy) || Util.isObject(copy)) { if (Util.isArray(copy)) clone = src && Util.isArray(src) ? src : [] if (Util.isObject(copy)) clone = src && Util.isObject(src) ? src : {} target[name] = Util.extend(clone, copy) } else { target[name] = copy } } } return target } Util.each = function each(obj, iterator, context) { var i, key if (this.type(obj) === 'number') { for (i = 0; i < obj; i++) { iterator(i, i) } } else if (obj.length === +obj.length) { for (i = 0; i < obj.length; i++) { if (iterator.call(context, obj[i], i, obj) === false) break } } else { for (key in obj) { if (iterator.call(context, obj[key], key, obj) === false) break } } } Util.type = function type(obj) { return (obj === null || obj === undefined) ? String(obj) : Object.prototype.toString.call(obj).match(/\[object (\w+)\]/)[1].toLowerCase() } Util.each('String Object Array RegExp Function'.split(' '), function(value) { Util['is' + value] = function(obj) { return Util.type(obj) === value.toLowerCase() } }) Util.isObjectOrArray = function(value) { return Util.isObject(value) || Util.isArray(value) } Util.isNumeric = function(value) { return !isNaN(parseFloat(value)) && isFinite(value) } Util.keys = function(obj) { var keys = []; for (var key in obj) { if (obj.hasOwnProperty(key)) keys.push(key) } return keys; } Util.values = function(obj) { var values = []; for (var key in obj) { if (obj.hasOwnProperty(key)) values.push(obj[key]) } return values; } /* ### Mock.heredoc(fn) * Mock.heredoc(fn) 以直观、安全的方式书写(多行)HTML 模板。 **使用示例**如下所示: var tpl = Mock.heredoc(function() { /*! {{email}}{{age}} *\/ }) **相关阅读** * [Creating multiline strings in JavaScript](http://stackoverflow.com/questions/805107/creating-multiline-strings-in-javascript)、 */ Util.heredoc = function heredoc(fn) { // 1. 移除起始的 function(){ /*! // 2. 移除末尾的 */ } // 3. 移除起始和末尾的空格 return fn.toString() .replace(/^[^\/]+\/\*!?/, '') .replace(/\*\/[^\/]+$/, '') .replace(/^[\s\xA0]+/, '').replace(/[\s\xA0]+$/, '') // .trim() } Util.noop = function() {} module.exports = Util /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { /* ## Parser 解析数据模板(属性名部分)。 * Parser.parse( name ) ```json { parameters: [ name, inc, range, decimal ], rnage: [ min , max ], min: min, max: max, count : count, decimal: decimal, dmin: dmin, dmax: dmax, dcount: dcount } ``` */ var Constant = __webpack_require__(2) var Random = __webpack_require__(5) /* jshint -W041 */ module.exports = { parse: function(name) { name = name == undefined ? '' : (name + '') var parameters = (name || '').match(Constant.RE_KEY) var range = parameters && parameters[3] && parameters[3].match(Constant.RE_RANGE) var min = range && range[1] && parseInt(range[1], 10) // || 1 var max = range && range[2] && parseInt(range[2], 10) // || 1 // repeat || min-max || 1 // var count = range ? !range[2] && parseInt(range[1], 10) || Random.integer(min, max) : 1 var count = range ? !range[2] ? parseInt(range[1], 10) : Random.integer(min, max) : undefined var decimal = parameters && parameters[4] && parameters[4].match(Constant.RE_RANGE) var dmin = decimal && decimal[1] && parseInt(decimal[1], 10) // || 0, var dmax = decimal && decimal[2] && parseInt(decimal[2], 10) // || 0, // int || dmin-dmax || 0 var dcount = decimal ? !decimal[2] && parseInt(decimal[1], 10) || Random.integer(dmin, dmax) : undefined var result = { // 1 name, 2 inc, 3 range, 4 decimal parameters: parameters, // 1 min, 2 max range: range, min: min, max: max, // min-max count: count, // 是否有 decimal decimal: decimal, dmin: dmin, dmax: dmax, // dmin-dimax dcount: dcount } for (var r in result) { if (result[r] != undefined) return result } return {} } } /***/ }, /* 5 */ /***/ function(module, exports, __webpack_require__) { /* ## Mock.Random 工具类,用于生成各种随机数据。 */ var Util = __webpack_require__(3) var Random = { extend: Util.extend } Random.extend(__webpack_require__(6)) Random.extend(__webpack_require__(7)) Random.extend(__webpack_require__(8)) Random.extend(__webpack_require__(10)) Random.extend(__webpack_require__(13)) Random.extend(__webpack_require__(15)) Random.extend(__webpack_require__(16)) Random.extend(__webpack_require__(17)) Random.extend(__webpack_require__(14)) Random.extend(__webpack_require__(19)) module.exports = Random /***/ }, /* 6 */ /***/ function(module, exports) { /* ## Basics */ module.exports = { // 返回一个随机的布尔值。 boolean: function(min, max, cur) { if (cur !== undefined) { min = typeof min !== 'undefined' && !isNaN(min) ? parseInt(min, 10) : 1 max = typeof max !== 'undefined' && !isNaN(max) ? parseInt(max, 10) : 1 return Math.random() > 1.0 / (min + max) * min ? !cur : cur } return Math.random() >= 0.5 }, bool: function(min, max, cur) { return this.boolean(min, max, cur) }, // 返回一个随机的自然数(大于等于 0 的整数)。 natural: function(min, max) { min = typeof min !== 'undefined' ? parseInt(min, 10) : 0 max = typeof max !== 'undefined' ? parseInt(max, 10) : 9007199254740992 // 2^53 return Math.round(Math.random() * (max - min)) + min }, // 返回一个随机的整数。 integer: function(min, max) { min = typeof min !== 'undefined' ? parseInt(min, 10) : -9007199254740992 max = typeof max !== 'undefined' ? parseInt(max, 10) : 9007199254740992 // 2^53 return Math.round(Math.random() * (max - min)) + min }, int: function(min, max) { return this.integer(min, max) }, // 返回一个随机的浮点数。 float: function(min, max, dmin, dmax) { dmin = dmin === undefined ? 0 : dmin dmin = Math.max(Math.min(dmin, 17), 0) dmax = dmax === undefined ? 17 : dmax dmax = Math.max(Math.min(dmax, 17), 0) var ret = this.integer(min, max) + '.'; for (var i = 0, dcount = this.natural(dmin, dmax); i < dcount; i++) { ret += ( // 最后一位不能为 0:如果最后一位为 0,会被 JS 引擎忽略掉。 (i < dcount - 1) ? this.character('number') : this.character('123456789') ) } return parseFloat(ret, 10) }, // 返回一个随机字符。 character: function(pool) { var pools = { lower: 'abcdefghijklmnopqrstuvwxyz', upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', number: '0123456789', symbol: '!@#$%^&*()[]' } pools.alpha = pools.lower + pools.upper pools['undefined'] = pools.lower + pools.upper + pools.number + pools.symbol pool = pools[('' + pool).toLowerCase()] || pool return pool.charAt(this.natural(0, pool.length - 1)) }, char: function(pool) { return this.character(pool) }, // 返回一个随机字符串。 string: function(pool, min, max) { var len switch (arguments.length) { case 0: // () len = this.natural(3, 7) break case 1: // ( length ) len = pool pool = undefined break case 2: // ( pool, length ) if (typeof arguments[0] === 'string') { len = min } else { // ( min, max ) len = this.natural(pool, min) pool = undefined } break case 3: len = this.natural(min, max) break } var text = '' for (var i = 0; i < len; i++) { text += this.character(pool) } return text }, str: function( /*pool, min, max*/ ) { return this.string.apply(this, arguments) }, // 返回一个整型数组。 range: function(start, stop, step) { // range( stop ) if (arguments.length <= 1) { stop = start || 0; start = 0; } // range( start, stop ) step = arguments[2] || 1; start = +start stop = +stop step = +step var len = Math.max(Math.ceil((stop - start) / step), 0); var idx = 0; var range = new Array(len); while (idx < len) { range[idx++] = start; start += step; } return range; } } /***/ }, /* 7 */ /***/ function(module, exports) { /* ## Date */ var patternLetters = { yyyy: 'getFullYear', yy: function(date) { return ('' + date.getFullYear()).slice(2) }, y: 'yy', MM: function(date) { var m = date.getMonth() + 1 return m < 10 ? '0' + m : m }, M: function(date) { return date.getMonth() + 1 }, dd: function(date) { var d = date.getDate() return d < 10 ? '0' + d : d }, d: 'getDate', HH: function(date) { var h = date.getHours() return h < 10 ? '0' + h : h }, H: 'getHours', hh: function(date) { var h = date.getHours() % 12 return h < 10 ? '0' + h : h }, h: function(date) { return date.getHours() % 12 }, mm: function(date) { var m = date.getMinutes() return m < 10 ? '0' + m : m }, m: 'getMinutes', ss: function(date) { var s = date.getSeconds() return s < 10 ? '0' + s : s }, s: 'getSeconds', SS: function(date) { var ms = date.getMilliseconds() return ms < 10 && '00' + ms || ms < 100 && '0' + ms || ms }, S: 'getMilliseconds', A: function(date) { return date.getHours() < 12 ? 'AM' : 'PM' }, a: function(date) { return date.getHours() < 12 ? 'am' : 'pm' }, T: 'getTime' } module.exports = { // 日期占位符集合。 _patternLetters: patternLetters, // 日期占位符正则。 _rformat: new RegExp((function() { var re = [] for (var i in patternLetters) re.push(i) return '(' + re.join('|') + ')' })(), 'g'), // 格式化日期。 _formatDate: function(date, format) { return format.replace(this._rformat, function creatNewSubString($0, flag) { return typeof patternLetters[flag] === 'function' ? patternLetters[flag](date) : patternLetters[flag] in patternLetters ? creatNewSubString($0, patternLetters[flag]) : date[patternLetters[flag]]() }) }, // 生成一个随机的 Date 对象。 _randomDate: function(min, max) { // min, max min = min === undefined ? new Date(0) : min max = max === undefined ? new Date() : max return new Date(Math.random() * (max.getTime() - min.getTime())) }, // 返回一个随机的日期字符串。 date: function(format) { format = format || 'yyyy-MM-dd' return this._formatDate(this._randomDate(), format) }, // 返回一个随机的时间字符串。 time: function(format) { format = format || 'HH:mm:ss' return this._formatDate(this._randomDate(), format) }, // 返回一个随机的日期和时间字符串。 datetime: function(format) { format = format || 'yyyy-MM-dd HH:mm:ss' return this._formatDate(this._randomDate(), format) }, // 返回当前的日期和时间字符串。 now: function(unit, format) { // now(unit) now(format) if (arguments.length === 1) { // now(format) if (!/year|month|day|hour|minute|second|week/.test(unit)) { format = unit unit = '' } } unit = (unit || '').toLowerCase() format = format || 'yyyy-MM-dd HH:mm:ss' var date = new Date() /* jshint -W086 */ // 参考自 http://momentjs.cn/docs/#/manipulating/start-of/ switch (unit) { case 'year': date.setMonth(0) case 'month': date.setDate(1) case 'week': case 'day': date.setHours(0) case 'hour': date.setMinutes(0) case 'minute': date.setSeconds(0) case 'second': date.setMilliseconds(0) } switch (unit) { case 'week': date.setDate(date.getDate() - date.getDay()) } return this._formatDate(date, format) } } /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {/* global document */ /* ## Image */ module.exports = { // 常见的广告宽高 _adSize: [ '300x250', '250x250', '240x400', '336x280', '180x150', '720x300', '468x60', '234x60', '88x31', '120x90', '120x60', '120x240', '125x125', '728x90', '160x600', '120x600', '300x600' ], // 常见的屏幕宽高 _screenSize: [ '320x200', '320x240', '640x480', '800x480', '800x480', '1024x600', '1024x768', '1280x800', '1440x900', '1920x1200', '2560x1600' ], // 常见的视频宽高 _videoSize: ['720x480', '768x576', '1280x720', '1920x1080'], /* 生成一个随机的图片地址。 替代图片源 http://fpoimg.com/ 参考自 http://rensanning.iteye.com/blog/1933310 http://code.tutsplus.com/articles/the-top-8-placeholders-for-web-designers--net-19485 */ image: function(size, background, foreground, format, text) { // Random.image( size, background, foreground, text ) if (arguments.length === 4) { text = format format = undefined } // Random.image( size, background, text ) if (arguments.length === 3) { text = foreground foreground = undefined } // Random.image() if (!size) size = this.pick(this._adSize) if (background && ~background.indexOf('#')) background = background.slice(1) if (foreground && ~foreground.indexOf('#')) foreground = foreground.slice(1) // http://dummyimage.com/600x400/cc00cc/470047.png&text=hello return 'http://dummyimage.com/' + size + (background ? '/' + background : '') + (foreground ? '/' + foreground : '') + (format ? '.' + format : '') + (text ? '&text=' + text : '') }, img: function() { return this.image.apply(this, arguments) }, /* BrandColors http://brandcolors.net/ A collection of major brand color codes curated by Galen Gidman. 大牌公司的颜色集合 // 获取品牌和颜色 $('h2').each(function(index, item){ item = $(item) console.log('\'' + item.text() + '\'', ':', '\'' + item.next().text() + '\'', ',') }) */ _brandColors: { '4ormat': '#fb0a2a', '500px': '#02adea', 'About.me (blue)': '#00405d', 'About.me (yellow)': '#ffcc33', 'Addvocate': '#ff6138', 'Adobe': '#ff0000', 'Aim': '#fcd20b', 'Amazon': '#e47911', 'Android': '#a4c639', 'Angie\'s List': '#7fbb00', 'AOL': '#0060a3', 'Atlassian': '#003366', 'Behance': '#053eff', 'Big Cartel': '#97b538', 'bitly': '#ee6123', 'Blogger': '#fc4f08', 'Boeing': '#0039a6', 'Booking.com': '#003580', 'Carbonmade': '#613854', 'Cheddar': '#ff7243', 'Code School': '#3d4944', 'Delicious': '#205cc0', 'Dell': '#3287c1', 'Designmoo': '#e54a4f', 'Deviantart': '#4e6252', 'Designer News': '#2d72da', 'Devour': '#fd0001', 'DEWALT': '#febd17', 'Disqus (blue)': '#59a3fc', 'Disqus (orange)': '#db7132', 'Dribbble': '#ea4c89', 'Dropbox': '#3d9ae8', 'Drupal': '#0c76ab', 'Dunked': '#2a323a', 'eBay': '#89c507', 'Ember': '#f05e1b', 'Engadget': '#00bdf6', 'Envato': '#528036', 'Etsy': '#eb6d20', 'Evernote': '#5ba525', 'Fab.com': '#dd0017', 'Facebook': '#3b5998', 'Firefox': '#e66000', 'Flickr (blue)': '#0063dc', 'Flickr (pink)': '#ff0084', 'Forrst': '#5b9a68', 'Foursquare': '#25a0ca', 'Garmin': '#007cc3', 'GetGlue': '#2d75a2', 'Gimmebar': '#f70078', 'GitHub': '#171515', 'Google Blue': '#0140ca', 'Google Green': '#16a61e', 'Google Red': '#dd1812', 'Google Yellow': '#fcca03', 'Google+': '#dd4b39', 'Grooveshark': '#f77f00', 'Groupon': '#82b548', 'Hacker News': '#ff6600', 'HelloWallet': '#0085ca', 'Heroku (light)': '#c7c5e6', 'Heroku (dark)': '#6567a5', 'HootSuite': '#003366', 'Houzz': '#73ba37', 'HTML5': '#ec6231', 'IKEA': '#ffcc33', 'IMDb': '#f3ce13', 'Instagram': '#3f729b', 'Intel': '#0071c5', 'Intuit': '#365ebf', 'Kickstarter': '#76cc1e', 'kippt': '#e03500', 'Kodery': '#00af81', 'LastFM': '#c3000d', 'LinkedIn': '#0e76a8', 'Livestream': '#cf0005', 'Lumo': '#576396', 'Mixpanel': '#a086d3', 'Meetup': '#e51937', 'Nokia': '#183693', 'NVIDIA': '#76b900', 'Opera': '#cc0f16', 'Path': '#e41f11', 'PayPal (dark)': '#1e477a', 'PayPal (light)': '#3b7bbf', 'Pinboard': '#0000e6', 'Pinterest': '#c8232c', 'PlayStation': '#665cbe', 'Pocket': '#ee4056', 'Prezi': '#318bff', 'Pusha': '#0f71b4', 'Quora': '#a82400', 'QUOTE.fm': '#66ceff', 'Rdio': '#008fd5', 'Readability': '#9c0000', 'Red Hat': '#cc0000', 'Resource': '#7eb400', 'Rockpack': '#0ba6ab', 'Roon': '#62b0d9', 'RSS': '#ee802f', 'Salesforce': '#1798c1', 'Samsung': '#0c4da2', 'Shopify': '#96bf48', 'Skype': '#00aff0', 'Snagajob': '#f47a20', 'Softonic': '#008ace', 'SoundCloud': '#ff7700', 'Space Box': '#f86960', 'Spotify': '#81b71a', 'Sprint': '#fee100', 'Squarespace': '#121212', 'StackOverflow': '#ef8236', 'Staples': '#cc0000', 'Status Chart': '#d7584f', 'Stripe': '#008cdd', 'StudyBlue': '#00afe1', 'StumbleUpon': '#f74425', 'T-Mobile': '#ea0a8e', 'Technorati': '#40a800', 'The Next Web': '#ef4423', 'Treehouse': '#5cb868', 'Trulia': '#5eab1f', 'Tumblr': '#34526f', 'Twitch.tv': '#6441a5', 'Twitter': '#00acee', 'TYPO3': '#ff8700', 'Ubuntu': '#dd4814', 'Ustream': '#3388ff', 'Verizon': '#ef1d1d', 'Vimeo': '#86c9ef', 'Vine': '#00a478', 'Virb': '#06afd8', 'Virgin Media': '#cc0000', 'Wooga': '#5b009c', 'WordPress (blue)': '#21759b', 'WordPress (orange)': '#d54e21', 'WordPress (grey)': '#464646', 'Wunderlist': '#2b88d9', 'XBOX': '#9bc848', 'XING': '#126567', 'Yahoo!': '#720e9e', 'Yandex': '#ffcc00', 'Yelp': '#c41200', 'YouTube': '#c4302b', 'Zalongo': '#5498dc', 'Zendesk': '#78a300', 'Zerply': '#9dcc7a', 'Zootool': '#5e8b1d' }, _brandNames: function() { var brands = []; for (var b in this._brandColors) { brands.push(b) } return brands }, /* 生成一段随机的 Base64 图片编码。 https://github.com/imsky/holder Holder renders image placeholders entirely on the client side. dataImageHolder: function(size) { return 'holder.js/' + size }, */ dataImage: function(size, text) { var canvas if (typeof document !== 'undefined') { canvas = document.createElement('canvas') } else { /* https://github.com/Automattic/node-canvas npm install canvas --save 安装问题: * http://stackoverflow.com/questions/22953206/gulp-issues-with-cario-install-command-not-found-when-trying-to-installing-canva * https://github.com/Automattic/node-canvas/issues/415 * https://github.com/Automattic/node-canvas/wiki/_pages PS:node-canvas 的安装过程实在是太繁琐了,所以不放入 package.json 的 dependencies。 */ var Canvas = module.require('canvas') canvas = new Canvas() } var ctx = canvas && canvas.getContext && canvas.getContext("2d") if (!canvas || !ctx) return '' if (!size) size = this.pick(this._adSize) text = text !== undefined ? text : size size = size.split('x') var width = parseInt(size[0], 10), height = parseInt(size[1], 10), background = this._brandColors[this.pick(this._brandNames())], foreground = '#FFF', text_height = 14, font = 'sans-serif'; canvas.width = width canvas.height = height ctx.textAlign = 'center' ctx.textBaseline = 'middle' ctx.fillStyle = background ctx.fillRect(0, 0, width, height) ctx.fillStyle = foreground ctx.font = 'bold ' + text_height + 'px ' + font ctx.fillText(text, (width / 2), (height / 2), width) return canvas.toDataURL('image/png') } } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)(module))) /***/ }, /* 9 */ /***/ function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default module.children = []; module.webpackPolyfill = 1; } return module; } /***/ }, /* 10 */ /***/ function(module, exports, __webpack_require__) { /* ## Color http://llllll.li/randomColor/ A color generator for JavaScript. randomColor generates attractive colors by default. More specifically, randomColor produces bright colors with a reasonably high saturation. This makes randomColor particularly useful for data visualizations and generative art. http://randomcolour.com/ var bg_colour = Math.floor(Math.random() * 16777215).toString(16); bg_colour = "#" + ("000000" + bg_colour).slice(-6); document.bgColor = bg_colour; http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ Creating random colors is actually more difficult than it seems. The randomness itself is easy, but aesthetically pleasing randomness is more difficult. https://github.com/devongovett/color-generator http://www.paulirish.com/2009/random-hex-color-code-snippets/ Random Hex Color Code Generator in JavaScript http://chancejs.com/#color chance.color() // => '#79c157' chance.color({format: 'hex'}) // => '#d67118' chance.color({format: 'shorthex'}) // => '#60f' chance.color({format: 'rgb'}) // => 'rgb(110,52,164)' http://tool.c7sky.com/webcolor 网页设计常用色彩搭配表 https://github.com/One-com/one-color An OO-based JavaScript color parser/computation toolkit with support for RGB, HSV, HSL, CMYK, and alpha channels. API 很赞 https://github.com/harthur/color JavaScript color conversion and manipulation library https://github.com/leaverou/css-colors Share & convert CSS colors http://leaverou.github.io/css-colors/#slategray Type a CSS color keyword, #hex, hsl(), rgba(), whatever: 色调 hue http://baike.baidu.com/view/23368.htm 色调指的是一幅画中画面色彩的总体倾向,是大的色彩效果。 饱和度 saturation http://baike.baidu.com/view/189644.htm 饱和度是指色彩的鲜艳程度,也称色彩的纯度。饱和度取决于该色中含色成分和消色成分(灰色)的比例。含色成分越大,饱和度越大;消色成分越大,饱和度越小。 亮度 brightness http://baike.baidu.com/view/34773.htm 亮度是指发光体(反光体)表面发光(反光)强弱的物理量。 照度 luminosity 物体被照亮的程度,采用单位面积所接受的光通量来表示,表示单位为勒[克斯](Lux,lx) ,即 1m / m2 。 http://stackoverflow.com/questions/1484506/random-color-generator-in-javascript var letters = '0123456789ABCDEF'.split('') var color = '#' for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)] } return color // 随机生成一个无脑的颜色,格式为 '#RRGGBB'。 // _brainlessColor() var color = Math.floor( Math.random() * (16 * 16 * 16 * 16 * 16 * 16 - 1) ).toString(16) color = "#" + ("000000" + color).slice(-6) return color.toUpperCase() */ var Convert = __webpack_require__(11) var DICT = __webpack_require__(12) module.exports = { // 随机生成一个有吸引力的颜色,格式为 '#RRGGBB'。 color: function(name) { if (name || DICT[name]) return DICT[name].nicer return this.hex() }, // #DAC0DE hex: function() { var hsv = this._goldenRatioColor() var rgb = Convert.hsv2rgb(hsv) var hex = Convert.rgb2hex(rgb[0], rgb[1], rgb[2]) return hex }, // rgb(128,255,255) rgb: function() { var hsv = this._goldenRatioColor() var rgb = Convert.hsv2rgb(hsv) return 'rgb(' + parseInt(rgb[0], 10) + ', ' + parseInt(rgb[1], 10) + ', ' + parseInt(rgb[2], 10) + ')' }, // rgba(128,255,255,0.3) rgba: function() { var hsv = this._goldenRatioColor() var rgb = Convert.hsv2rgb(hsv) return 'rgba(' + parseInt(rgb[0], 10) + ', ' + parseInt(rgb[1], 10) + ', ' + parseInt(rgb[2], 10) + ', ' + Math.random().toFixed(2) + ')' }, // hsl(300,80%,90%) hsl: function() { var hsv = this._goldenRatioColor() var hsl = Convert.hsv2hsl(hsv) return 'hsl(' + parseInt(hsl[0], 10) + ', ' + parseInt(hsl[1], 10) + ', ' + parseInt(hsl[2], 10) + ')' }, // http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ // https://github.com/devongovett/color-generator/blob/master/index.js // 随机生成一个有吸引力的颜色。 _goldenRatioColor: function(saturation, value) { this._goldenRatio = 0.618033988749895 this._hue = this._hue || Math.random() this._hue += this._goldenRatio this._hue %= 1 if (typeof saturation !== "number") saturation = 0.5; if (typeof value !== "number") value = 0.95; return [ this._hue * 360, saturation * 100, value * 100 ] } } /***/ }, /* 11 */ /***/ function(module, exports) { /* ## Color Convert http://blog.csdn.net/idfaya/article/details/6770414 颜色空间RGB与HSV(HSL)的转换 */ // https://github.com/harthur/color-convert/blob/master/conversions.js module.exports = { rgb2hsl: function rgb2hsl(rgb) { var r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), delta = max - min, h, s, l; if (max == min) h = 0; else if (r == max) h = (g - b) / delta; else if (g == max) h = 2 + (b - r) / delta; else if (b == max) h = 4 + (r - g) / delta; h = Math.min(h * 60, 360); if (h < 0) h += 360; l = (min + max) / 2; if (max == min) s = 0; else if (l <= 0.5) s = delta / (max + min); else s = delta / (2 - max - min); return [h, s * 100, l * 100]; }, rgb2hsv: function rgb2hsv(rgb) { var r = rgb[0], g = rgb[1], b = rgb[2], min = Math.min(r, g, b), max = Math.max(r, g, b), delta = max - min, h, s, v; if (max === 0) s = 0; else s = (delta / max * 1000) / 10; if (max == min) h = 0; else if (r == max) h = (g - b) / delta; else if (g == max) h = 2 + (b - r) / delta; else if (b == max) h = 4 + (r - g) / delta; h = Math.min(h * 60, 360); if (h < 0) h += 360; v = ((max / 255) * 1000) / 10; return [h, s, v]; }, hsl2rgb: function hsl2rgb(hsl) { var h = hsl[0] / 360, s = hsl[1] / 100, l = hsl[2] / 100, t1, t2, t3, rgb, val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) t2 = l * (1 + s); else t2 = l + s - l * s; t1 = 2 * l - t2; rgb = [0, 0, 0]; for (var i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) t3++; if (t3 > 1) t3--; if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3; else if (2 * t3 < 1) val = t2; else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; else val = t1; rgb[i] = val * 255; } return rgb; }, hsl2hsv: function hsl2hsv(hsl) { var h = hsl[0], s = hsl[1] / 100, l = hsl[2] / 100, sv, v; l *= 2; s *= (l <= 1) ? l : 2 - l; v = (l + s) / 2; sv = (2 * s) / (l + s); return [h, sv * 100, v * 100]; }, hsv2rgb: function hsv2rgb(hsv) { var h = hsv[0] / 60 var s = hsv[1] / 100 var v = hsv[2] / 100 var hi = Math.floor(h) % 6 var f = h - Math.floor(h) var p = 255 * v * (1 - s) var q = 255 * v * (1 - (s * f)) var t = 255 * v * (1 - (s * (1 - f))) v = 255 * v switch (hi) { case 0: return [v, t, p] case 1: return [q, v, p] case 2: return [p, v, t] case 3: return [p, q, v] case 4: return [t, p, v] case 5: return [v, p, q] } }, hsv2hsl: function hsv2hsl(hsv) { var h = hsv[0], s = hsv[1] / 100, v = hsv[2] / 100, sl, l; l = (2 - s) * v; sl = s * v; sl /= (l <= 1) ? l : 2 - l; l /= 2; return [h, sl * 100, l * 100]; }, // http://www.140byt.es/keywords/color rgb2hex: function( a, // red, as a number from 0 to 255 b, // green, as a number from 0 to 255 c // blue, as a number from 0 to 255 ) { return "#" + ((256 + a << 8 | b) << 8 | c).toString(16).slice(1) }, hex2rgb: function( a // take a "#xxxxxx" hex string, ) { a = '0x' + a.slice(1).replace(a.length > 4 ? a : /./g, '$&$&') | 0; return [a >> 16, a >> 8 & 255, a & 255] } } /***/ }, /* 12 */ /***/ function(module, exports) { /* ## Color 字典数据 字典数据来源 [A nicer color palette for the web](http://clrs.cc/) */ module.exports = { // name value nicer navy: { value: '#000080', nicer: '#001F3F' }, blue: { value: '#0000ff', nicer: '#0074D9' }, aqua: { value: '#00ffff', nicer: '#7FDBFF' }, teal: { value: '#008080', nicer: '#39CCCC' }, olive: { value: '#008000', nicer: '#3D9970' }, green: { value: '#008000', nicer: '#2ECC40' }, lime: { value: '#00ff00', nicer: '#01FF70' }, yellow: { value: '#ffff00', nicer: '#FFDC00' }, orange: { value: '#ffa500', nicer: '#FF851B' }, red: { value: '#ff0000', nicer: '#FF4136' }, maroon: { value: '#800000', nicer: '#85144B' }, fuchsia: { value: '#ff00ff', nicer: '#F012BE' }, purple: { value: '#800080', nicer: '#B10DC9' }, silver: { value: '#c0c0c0', nicer: '#DDDDDD' }, gray: { value: '#808080', nicer: '#AAAAAA' }, black: { value: '#000000', nicer: '#111111' }, white: { value: '#FFFFFF', nicer: '#FFFFFF' } } /***/ }, /* 13 */ /***/ function(module, exports, __webpack_require__) { /* ## Text http://www.lipsum.com/ */ var Basic = __webpack_require__(6) var Helper = __webpack_require__(14) function range(defaultMin, defaultMax, min, max) { return min === undefined ? Basic.natural(defaultMin, defaultMax) : // () max === undefined ? min : // ( len ) Basic.natural(parseInt(min, 10), parseInt(max, 10)) // ( min, max ) } module.exports = { // 随机生成一段文本。 paragraph: function(min, max) { var len = range(3, 7, min, max) var result = [] for (var i = 0; i < len; i++) { result.push(this.sentence()) } return result.join(' ') }, // cparagraph: function(min, max) { var len = range(3, 7, min, max) var result = [] for (var i = 0; i < len; i++) { result.push(this.csentence()) } return result.join('') }, // 随机生成一个句子,第一个单词的首字母大写。 sentence: function(min, max) { var len = range(12, 18, min, max) var result = [] for (var i = 0; i < len; i++) { result.push(this.word()) } return Helper.capitalize(result.join(' ')) + '.' }, // 随机生成一个中文句子。 csentence: function(min, max) { var len = range(12, 18, min, max) var result = [] for (var i = 0; i < len; i++) { result.push(this.cword()) } return result.join('') + '。' }, // 随机生成一个单词。 word: function(min, max) { var len = range(3, 10, min, max) var result = ''; for (var i = 0; i < len; i++) { result += Basic.character('lower') } return result }, // 随机生成一个或多个汉字。 cword: function(pool, min, max) { // 最常用的 500 个汉字 http://baike.baidu.com/view/568436.htm var DICT_KANZI = '的一是在不了有和人这中大为上个国我以要他时来用们生到作地于出就分对成会可主发年动同工也能下过子说产种面而方后多定行学法所民得经十三之进着等部度家电力里如水化高自二理起小物现实加量都两体制机当使点从业本去把性好应开它合还因由其些然前外天政四日那社义事平形相全表间样与关各重新线内数正心反你明看原又么利比或但质气第向道命此变条只没结解问意建月公无系军很情者最立代想已通并提直题党程展五果料象员革位入常文总次品式活设及管特件长求老头基资边流路级少图山统接知较将组见计别她手角期根论运农指几九区强放决西被干做必战先回则任取据处队南给色光门即保治北造百规热领七海口东导器压志世金增争济阶油思术极交受联什认六共权收证改清己美再采转更单风切打白教速花带安场身车例真务具万每目至达走积示议声报斗完类八离华名确才科张信马节话米整空元况今集温传土许步群广石记需段研界拉林律叫且究观越织装影算低持音众书布复容儿须际商非验连断深难近矿千周委素技备半办青省列习响约支般史感劳便团往酸历市克何除消构府称太准精值号率族维划选标写存候毛亲快效斯院查江型眼王按格养易置派层片始却专状育厂京识适属圆包火住调满县局照参红细引听该铁价严龙飞' var len switch (arguments.length) { case 0: // () pool = DICT_KANZI len = 1 break case 1: // ( pool ) if (typeof arguments[0] === 'string') { len = 1 } else { // ( length ) len = pool pool = DICT_KANZI } break case 2: // ( pool, length ) if (typeof arguments[0] === 'string') { len = min } else { // ( min, max ) len = this.natural(pool, min) pool = DICT_KANZI } break case 3: len = this.natural(min, max) break } var result = '' for (var i = 0; i < len; i++) { result += pool.charAt(this.natural(0, pool.length - 1)) } return result }, // 随机生成一句标题,其中每个单词的首字母大写。 title: function(min, max) { var len = range(3, 7, min, max) var result = [] for (var i = 0; i < len; i++) { result.push(this.capitalize(this.word())) } return result.join(' ') }, // 随机生成一句中文标题。 ctitle: function(min, max) { var len = range(3, 7, min, max) var result = [] for (var i = 0; i < len; i++) { result.push(this.cword()) } return result.join('') } } /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { /* ## Helpers */ var Util = __webpack_require__(3) module.exports = { // 把字符串的第一个字母转换为大写。 capitalize: function(word) { return (word + '').charAt(0).toUpperCase() + (word + '').substr(1) }, // 把字符串转换为大写。 upper: function(str) { return (str + '').toUpperCase() }, // 把字符串转换为小写。 lower: function(str) { return (str + '').toLowerCase() }, // 从数组中随机选取一个元素,并返回。 pick: function pick(arr, min, max) { // pick( item1, item2 ... ) if (!Util.isArray(arr)) { arr = [].slice.call(arguments) min = 1 max = 1 } else { // pick( [ item1, item2 ... ] ) if (min === undefined) min = 1 // pick( [ item1, item2 ... ], count ) if (max === undefined) max = min } if (min === 1 && max === 1) return arr[this.natural(0, arr.length - 1)] // pick( [ item1, item2 ... ], min, max ) return this.shuffle(arr, min, max) // 通过参数个数判断方法签名,扩展性太差!#90 // switch (arguments.length) { // case 1: // // pick( [ item1, item2 ... ] ) // return arr[this.natural(0, arr.length - 1)] // case 2: // // pick( [ item1, item2 ... ], count ) // max = min // /* falls through */ // case 3: // // pick( [ item1, item2 ... ], min, max ) // return this.shuffle(arr, min, max) // } }, /* 打乱数组中元素的顺序,并返回。 Given an array, scramble the order and return it. 其他的实现思路: // https://code.google.com/p/jslibs/wiki/JavascriptTips result = result.sort(function() { return Math.random() - 0.5 }) */ shuffle: function shuffle(arr, min, max) { arr = arr || [] var old = arr.slice(0), result = [], index = 0, length = old.length; for (var i = 0; i < length; i++) { index = this.natural(0, old.length - 1) result.push(old[index]) old.splice(index, 1) } switch (arguments.length) { case 0: case 1: return result case 2: max = min /* falls through */ case 3: min = parseInt(min, 10) max = parseInt(max, 10) return result.slice(0, this.natural(min, max)) } }, /* * Random.order(item, item) * Random.order([item, item ...]) 顺序获取数组中的元素 [JSON导入数组支持数组数据录入](https://github.com/thx/RAP/issues/22) 不支持单独调用! */ order: function order(array) { order.cache = order.cache || {} if (arguments.length > 1) array = [].slice.call(arguments, 0) // options.context.path/templatePath var options = order.options var templatePath = options.context.templatePath.join('.') var cache = ( order.cache[templatePath] = order.cache[templatePath] || { index: 0, array: array } ) return cache.array[cache.index++ % cache.array.length] } } /***/ }, /* 15 */ /***/ function(module, exports) { /* ## Name [Beyond the Top 1000 Names](http://www.ssa.gov/oact/babynames/limits.html) */ module.exports = { // 随机生成一个常见的英文名。 first: function() { var names = [ // male "James", "John", "Robert", "Michael", "William", "David", "Richard", "Charles", "Joseph", "Thomas", "Christopher", "Daniel", "Paul", "Mark", "Donald", "George", "Kenneth", "Steven", "Edward", "Brian", "Ronald", "Anthony", "Kevin", "Jason", "Matthew", "Gary", "Timothy", "Jose", "Larry", "Jeffrey", "Frank", "Scott", "Eric" ].concat([ // female "Mary", "Patricia", "Linda", "Barbara", "Elizabeth", "Jennifer", "Maria", "Susan", "Margaret", "Dorothy", "Lisa", "Nancy", "Karen", "Betty", "Helen", "Sandra", "Donna", "Carol", "Ruth", "Sharon", "Michelle", "Laura", "Sarah", "Kimberly", "Deborah", "Jessica", "Shirley", "Cynthia", "Angela", "Melissa", "Brenda", "Amy", "Anna" ]) return this.pick(names) // or this.capitalize(this.word()) }, // 随机生成一个常见的英文姓。 last: function() { var names = [ "Smith", "Johnson", "Williams", "Brown", "Jones", "Miller", "Davis", "Garcia", "Rodriguez", "Wilson", "Martinez", "Anderson", "Taylor", "Thomas", "Hernandez", "Moore", "Martin", "Jackson", "Thompson", "White", "Lopez", "Lee", "Gonzalez", "Harris", "Clark", "Lewis", "Robinson", "Walker", "Perez", "Hall", "Young", "Allen" ] return this.pick(names) // or this.capitalize(this.word()) }, // 随机生成一个常见的英文姓名。 name: function(middle) { return this.first() + ' ' + (middle ? this.first() + ' ' : '') + this.last() }, /* 随机生成一个常见的中文姓。 [世界常用姓氏排行](http://baike.baidu.com/view/1719115.htm) [玄派网 - 网络小说创作辅助平台](http://xuanpai.sinaapp.com/) */ cfirst: function() { var names = ( '王 李 张 刘 陈 杨 赵 黄 周 吴 ' + '徐 孙 胡 朱 高 林 何 郭 马 罗 ' + '梁 宋 郑 谢 韩 唐 冯 于 董 萧 ' + '程 曹 袁 邓 许 傅 沈 曾 彭 吕 ' + '苏 卢 蒋 蔡 贾 丁 魏 薛 叶 阎 ' + '余 潘 杜 戴 夏 锺 汪 田 任 姜 ' + '范 方 石 姚 谭 廖 邹 熊 金 陆 ' + '郝 孔 白 崔 康 毛 邱 秦 江 史 ' + '顾 侯 邵 孟 龙 万 段 雷 钱 汤 ' + '尹 黎 易 常 武 乔 贺 赖 龚 文' ).split(' ') return this.pick(names) }, /* 随机生成一个常见的中文名。 [中国最常见名字前50名_三九算命网](http://www.name999.net/xingming/xingshi/20131004/48.html) */ clast: function() { var names = ( '伟 芳 娜 秀英 敏 静 丽 强 磊 军 ' + '洋 勇 艳 杰 娟 涛 明 超 秀兰 霞 ' + '平 刚 桂英' ).split(' ') return this.pick(names) }, // 随机生成一个常见的中文姓名。 cname: function() { return this.cfirst() + this.clast() } } /***/ }, /* 16 */ /***/ function(module, exports) { /* ## Web */ module.exports = { /* 随机生成一个 URL。 [URL 规范](http://www.w3.org/Addressing/URL/url-spec.txt) http Hypertext Transfer Protocol ftp File Transfer protocol gopher The Gopher protocol mailto Electronic mail address mid Message identifiers for electronic mail cid Content identifiers for MIME body part news Usenet news nntp Usenet news for local NNTP access only prospero Access using the prospero protocols telnet rlogin tn3270 Reference to interactive sessions wais Wide Area Information Servers */ url: function(protocol, host) { return (protocol || this.protocol()) + '://' + // protocol? (host || this.domain()) + // host? '/' + this.word() }, // 随机生成一个 URL 协议。 protocol: function() { return this.pick( // 协议簇 'http ftp gopher mailto mid cid news nntp prospero telnet rlogin tn3270 wais'.split(' ') ) }, // 随机生成一个域名。 domain: function(tld) { return this.word() + '.' + (tld || this.tld()) }, /* 随机生成一个顶级域名。 国际顶级域名 international top-level domain-names, iTLDs 国家顶级域名 national top-level domainnames, nTLDs [域名后缀大全](http://www.163ns.com/zixun/post/4417.html) */ tld: function() { // Top Level Domain return this.pick( ( // 域名后缀 'com net org edu gov int mil cn ' + // 国内域名 'com.cn net.cn gov.cn org.cn ' + // 中文国内域名 '中国 中国互联.公司 中国互联.网络 ' + // 新国际域名 'tel biz cc tv info name hk mobi asia cd travel pro museum coop aero ' + // 世界各国域名后缀 'ad ae af ag ai al am an ao aq ar as at au aw az ba bb bd be bf bg bh bi bj bm bn bo br bs bt bv bw by bz ca cc cf cg ch ci ck cl cm cn co cq cr cu cv cx cy cz de dj dk dm do dz ec ee eg eh es et ev fi fj fk fm fo fr ga gb gd ge gf gh gi gl gm gn gp gr gt gu gw gy hk hm hn hr ht hu id ie il in io iq ir is it jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc li lk lr ls lt lu lv ly ma mc md mg mh ml mm mn mo mp mq mr ms mt mv mw mx my mz na nc ne nf ng ni nl no np nr nt nu nz om qa pa pe pf pg ph pk pl pm pn pr pt pw py re ro ru rw sa sb sc sd se sg sh si sj sk sl sm sn so sr st su sy sz tc td tf tg th tj tk tm tn to tp tr tt tv tw tz ua ug uk us uy va vc ve vg vn vu wf ws ye yu za zm zr zw' ).split(' ') ) }, // 随机生成一个邮件地址。 email: function(domain) { return this.character('lower') + '.' + this.word() + '@' + ( domain || (this.word() + '.' + this.tld()) ) // return this.character('lower') + '.' + this.last().toLowerCase() + '@' + this.last().toLowerCase() + '.' + this.tld() // return this.word() + '@' + (domain || this.domain()) }, // 随机生成一个 IP 地址。 ip: function() { return this.natural(0, 255) + '.' + this.natural(0, 255) + '.' + this.natural(0, 255) + '.' + this.natural(0, 255) } } /***/ }, /* 17 */ /***/ function(module, exports, __webpack_require__) { /* ## Address */ var DICT = __webpack_require__(18) var REGION = ['东北', '华北', '华东', '华中', '华南', '西南', '西北'] module.exports = { // 随机生成一个大区。 region: function() { return this.pick(REGION) }, // 随机生成一个(中国)省(或直辖市、自治区、特别行政区)。 province: function() { return this.pick(DICT).name }, // 随机生成一个(中国)市。 city: function(prefix) { var province = this.pick(DICT) var city = this.pick(province.children) return prefix ? [province.name, city.name].join(' ') : city.name }, // 随机生成一个(中国)县。 county: function(prefix) { var province = this.pick(DICT) var city = this.pick(province.children) var county = this.pick(city.children) || { name: '-' } return prefix ? [province.name, city.name, county.name].join(' ') : county.name }, // 随机生成一个邮政编码(六位数字)。 zip: function(len) { var zip = '' for (var i = 0; i < (len || 6); i++) zip += this.natural(0, 9) return zip } // address: function() {}, // phone: function() {}, // areacode: function() {}, // street: function() {}, // street_suffixes: function() {}, // street_suffix: function() {}, // states: function() {}, // state: function() {}, } /***/ }, /* 18 */ /***/ function(module, exports) { /* ## Address 字典数据 字典数据来源 http://www.atatech.org/articles/30028?rnd=254259856 国标 省(市)级行政区划码表 华北 北京市 天津市 河北省 山西省 内蒙古自治区 东北 辽宁省 吉林省 黑龙江省 华东 上海市 江苏省 浙江省 安徽省 福建省 江西省 山东省 华南 广东省 广西壮族自治区 海南省 华中 河南省 湖北省 湖南省 西南 重庆市 四川省 贵州省 云南省 西藏自治区 西北 陕西省 甘肃省 青海省 宁夏回族自治区 新疆维吾尔自治区 港澳台 香港特别行政区 澳门特别行政区 台湾省 **排序** ```js var map = {} _.each(_.keys(REGIONS),function(id){ map[id] = REGIONS[ID] }) JSON.stringify(map) ``` */ var DICT = { "110000": "北京", "110100": "北京市", "110101": "东城区", "110102": "西城区", "110105": "朝阳区", "110106": "丰台区", "110107": "石景山区", "110108": "海淀区", "110109": "门头沟区", "110111": "房山区", "110112": "通州区", "110113": "顺义区", "110114": "昌平区", "110115": "大兴区", "110116": "怀柔区", "110117": "平谷区", "110228": "密云县", "110229": "延庆县", "110230": "其它区", "120000": "天津", "120100": "天津市", "120101": "和平区", "120102": "河东区", "120103": "河西区", "120104": "南开区", "120105": "河北区", "120106": "红桥区", "120110": "东丽区", "120111": "西青区", "120112": "津南区", "120113": "北辰区", "120114": "武清区", "120115": "宝坻区", "120116": "滨海新区", "120221": "宁河县", "120223": "静海县", "120225": "蓟县", "120226": "其它区", "130000": "河北省", "130100": "石家庄市", "130102": "长安区", "130103": "桥东区", "130104": "桥西区", "130105": "新华区", "130107": "井陉矿区", "130108": "裕华区", "130121": "井陉县", "130123": "正定县", "130124": "栾城县", "130125": "行唐县", "130126": "灵寿县", "130127": "高邑县", "130128": "深泽县", "130129": "赞皇县", "130130": "无极县", "130131": "平山县", "130132": "元氏县", "130133": "赵县", "130181": "辛集市", "130182": "藁城市", "130183": "晋州市", "130184": "新乐市", "130185": "鹿泉市", "130186": "其它区", "130200": "唐山市", "130202": "路南区", "130203": "路北区", "130204": "古冶区", "130205": "开平区", "130207": "丰南区", "130208": "丰润区", "130223": "滦县", "130224": "滦南县", "130225": "乐亭县", "130227": "迁西县", "130229": "玉田县", "130230": "曹妃甸区", "130281": "遵化市", "130283": "迁安市", "130284": "其它区", "130300": "秦皇岛市", "130302": "海港区", "130303": "山海关区", "130304": "北戴河区", "130321": "青龙满族自治县", "130322": "昌黎县", "130323": "抚宁县", "130324": "卢龙县", "130398": "其它区", "130400": "邯郸市", "130402": "邯山区", "130403": "丛台区", "130404": "复兴区", "130406": "峰峰矿区", "130421": "邯郸县", "130423": "临漳县", "130424": "成安县", "130425": "大名县", "130426": "涉县", "130427": "磁县", "130428": "肥乡县", "130429": "永年县", "130430": "邱县", "130431": "鸡泽县", "130432": "广平县", "130433": "馆陶县", "130434": "魏县", "130435": "曲周县", "130481": "武安市", "130482": "其它区", "130500": "邢台市", "130502": "桥东区", "130503": "桥西区", "130521": "邢台县", "130522": "临城县", "130523": "内丘县", "130524": "柏乡县", "130525": "隆尧县", "130526": "任县", "130527": "南和县", "130528": "宁晋县", "130529": "巨鹿县", "130530": "新河县", "130531": "广宗县", "130532": "平乡县", "130533": "威县", "130534": "清河县", "130535": "临西县", "130581": "南宫市", "130582": "沙河市", "130583": "其它区", "130600": "保定市", "130602": "新市区", "130603": "北市区", "130604": "南市区", "130621": "满城县", "130622": "清苑县", "130623": "涞水县", "130624": "阜平县", "130625": "徐水县", "130626": "定兴县", "130627": "唐县", "130628": "高阳县", "130629": "容城县", "130630": "涞源县", "130631": "望都县", "130632": "安新县", "130633": "易县", "130634": "曲阳县", "130635": "蠡县", "130636": "顺平县", "130637": "博野县", "130638": "雄县", "130681": "涿州市", "130682": "定州市", "130683": "安国市", "130684": "高碑店市", "130699": "其它区", "130700": "张家口市", "130702": "桥东区", "130703": "桥西区", "130705": "宣化区", "130706": "下花园区", "130721": "宣化县", "130722": "张北县", "130723": "康保县", "130724": "沽源县", "130725": "尚义县", "130726": "蔚县", "130727": "阳原县", "130728": "怀安县", "130729": "万全县", "130730": "怀来县", "130731": "涿鹿县", "130732": "赤城县", "130733": "崇礼县", "130734": "其它区", "130800": "承德市", "130802": "双桥区", "130803": "双滦区", "130804": "鹰手营子矿区", "130821": "承德县", "130822": "兴隆县", "130823": "平泉县", "130824": "滦平县", "130825": "隆化县", "130826": "丰宁满族自治县", "130827": "宽城满族自治县", "130828": "围场满族蒙古族自治县", "130829": "其它区", "130900": "沧州市", "130902": "新华区", "130903": "运河区", "130921": "沧县", "130922": "青县", "130923": "东光县", "130924": "海兴县", "130925": "盐山县", "130926": "肃宁县", "130927": "南皮县", "130928": "吴桥县", "130929": "献县", "130930": "孟村回族自治县", "130981": "泊头市", "130982": "任丘市", "130983": "黄骅市", "130984": "河间市", "130985": "其它区", "131000": "廊坊市", "131002": "安次区", "131003": "广阳区", "131022": "固安县", "131023": "永清县", "131024": "香河县", "131025": "大城县", "131026": "文安县", "131028": "大厂回族自治县", "131081": "霸州市", "131082": "三河市", "131083": "其它区", "131100": "衡水市", "131102": "桃城区", "131121": "枣强县", "131122": "武邑县", "131123": "武强县", "131124": "饶阳县", "131125": "安平县", "131126": "故城县", "131127": "景县", "131128": "阜城县", "131181": "冀州市", "131182": "深州市", "131183": "其它区", "140000": "山西省", "140100": "太原市", "140105": "小店区", "140106": "迎泽区", "140107": "杏花岭区", "140108": "尖草坪区", "140109": "万柏林区", "140110": "晋源区", "140121": "清徐县", "140122": "阳曲县", "140123": "娄烦县", "140181": "古交市", "140182": "其它区", "140200": "大同市", "140202": "城区", "140203": "矿区", "140211": "南郊区", "140212": "新荣区", "140221": "阳高县", "140222": "天镇县", "140223": "广灵县", "140224": "灵丘县", "140225": "浑源县", "140226": "左云县", "140227": "大同县", "140228": "其它区", "140300": "阳泉市", "140302": "城区", "140303": "矿区", "140311": "郊区", "140321": "平定县", "140322": "盂县", "140323": "其它区", "140400": "长治市", "140421": "长治县", "140423": "襄垣县", "140424": "屯留县", "140425": "平顺县", "140426": "黎城县", "140427": "壶关县", "140428": "长子县", "140429": "武乡县", "140430": "沁县", "140431": "沁源县", "140481": "潞城市", "140482": "城区", "140483": "郊区", "140485": "其它区", "140500": "晋城市", "140502": "城区", "140521": "沁水县", "140522": "阳城县", "140524": "陵川县", "140525": "泽州县", "140581": "高平市", "140582": "其它区", "140600": "朔州市", "140602": "朔城区", "140603": "平鲁区", "140621": "山阴县", "140622": "应县", "140623": "右玉县", "140624": "怀仁县", "140625": "其它区", "140700": "晋中市", "140702": "榆次区", "140721": "榆社县", "140722": "左权县", "140723": "和顺县", "140724": "昔阳县", "140725": "寿阳县", "140726": "太谷县", "140727": "祁县", "140728": "平遥县", "140729": "灵石县", "140781": "介休市", "140782": "其它区", "140800": "运城市", "140802": "盐湖区", "140821": "临猗县", "140822": "万荣县", "140823": "闻喜县", "140824": "稷山县", "140825": "新绛县", "140826": "绛县", "140827": "垣曲县", "140828": "夏县", "140829": "平陆县", "140830": "芮城县", "140881": "永济市", "140882": "河津市", "140883": "其它区", "140900": "忻州市", "140902": "忻府区", "140921": "定襄县", "140922": "五台县", "140923": "代县", "140924": "繁峙县", "140925": "宁武县", "140926": "静乐县", "140927": "神池县", "140928": "五寨县", "140929": "岢岚县", "140930": "河曲县", "140931": "保德县", "140932": "偏关县", "140981": "原平市", "140982": "其它区", "141000": "临汾市", "141002": "尧都区", "141021": "曲沃县", "141022": "翼城县", "141023": "襄汾县", "141024": "洪洞县", "141025": "古县", "141026": "安泽县", "141027": "浮山县", "141028": "吉县", "141029": "乡宁县", "141030": "大宁县", "141031": "隰县", "141032": "永和县", "141033": "蒲县", "141034": "汾西县", "141081": "侯马市", "141082": "霍州市", "141083": "其它区", "141100": "吕梁市", "141102": "离石区", "141121": "文水县", "141122": "交城县", "141123": "兴县", "141124": "临县", "141125": "柳林县", "141126": "石楼县", "141127": "岚县", "141128": "方山县", "141129": "中阳县", "141130": "交口县", "141181": "孝义市", "141182": "汾阳市", "141183": "其它区", "150000": "内蒙古自治区", "150100": "呼和浩特市", "150102": "新城区", "150103": "回民区", "150104": "玉泉区", "150105": "赛罕区", "150121": "土默特左旗", "150122": "托克托县", "150123": "和林格尔县", "150124": "清水河县", "150125": "武川县", "150126": "其它区", "150200": "包头市", "150202": "东河区", "150203": "昆都仑区", "150204": "青山区", "150205": "石拐区", "150206": "白云鄂博矿区", "150207": "九原区", "150221": "土默特右旗", "150222": "固阳县", "150223": "达尔罕茂明安联合旗", "150224": "其它区", "150300": "乌海市", "150302": "海勃湾区", "150303": "海南区", "150304": "乌达区", "150305": "其它区", "150400": "赤峰市", "150402": "红山区", "150403": "元宝山区", "150404": "松山区", "150421": "阿鲁科尔沁旗", "150422": "巴林左旗", "150423": "巴林右旗", "150424": "林西县", "150425": "克什克腾旗", "150426": "翁牛特旗", "150428": "喀喇沁旗", "150429": "宁城县", "150430": "敖汉旗", "150431": "其它区", "150500": "通辽市", "150502": "科尔沁区", "150521": "科尔沁左翼中旗", "150522": "科尔沁左翼后旗", "150523": "开鲁县", "150524": "库伦旗", "150525": "奈曼旗", "150526": "扎鲁特旗", "150581": "霍林郭勒市", "150582": "其它区", "150600": "鄂尔多斯市", "150602": "东胜区", "150621": "达拉特旗", "150622": "准格尔旗", "150623": "鄂托克前旗", "150624": "鄂托克旗", "150625": "杭锦旗", "150626": "乌审旗", "150627": "伊金霍洛旗", "150628": "其它区", "150700": "呼伦贝尔市", "150702": "海拉尔区", "150703": "扎赉诺尔区", "150721": "阿荣旗", "150722": "莫力达瓦达斡尔族自治旗", "150723": "鄂伦春自治旗", "150724": "鄂温克族自治旗", "150725": "陈巴尔虎旗", "150726": "新巴尔虎左旗", "150727": "新巴尔虎右旗", "150781": "满洲里市", "150782": "牙克石市", "150783": "扎兰屯市", "150784": "额尔古纳市", "150785": "根河市", "150786": "其它区", "150800": "巴彦淖尔市", "150802": "临河区", "150821": "五原县", "150822": "磴口县", "150823": "乌拉特前旗", "150824": "乌拉特中旗", "150825": "乌拉特后旗", "150826": "杭锦后旗", "150827": "其它区", "150900": "乌兰察布市", "150902": "集宁区", "150921": "卓资县", "150922": "化德县", "150923": "商都县", "150924": "兴和县", "150925": "凉城县", "150926": "察哈尔右翼前旗", "150927": "察哈尔右翼中旗", "150928": "察哈尔右翼后旗", "150929": "四子王旗", "150981": "丰镇市", "150982": "其它区", "152200": "兴安盟", "152201": "乌兰浩特市", "152202": "阿尔山市", "152221": "科尔沁右翼前旗", "152222": "科尔沁右翼中旗", "152223": "扎赉特旗", "152224": "突泉县", "152225": "其它区", "152500": "锡林郭勒盟", "152501": "二连浩特市", "152502": "锡林浩特市", "152522": "阿巴嘎旗", "152523": "苏尼特左旗", "152524": "苏尼特右旗", "152525": "东乌珠穆沁旗", "152526": "西乌珠穆沁旗", "152527": "太仆寺旗", "152528": "镶黄旗", "152529": "正镶白旗", "152530": "正蓝旗", "152531": "多伦县", "152532": "其它区", "152900": "阿拉善盟", "152921": "阿拉善左旗", "152922": "阿拉善右旗", "152923": "额济纳旗", "152924": "其它区", "210000": "辽宁省", "210100": "沈阳市", "210102": "和平区", "210103": "沈河区", "210104": "大东区", "210105": "皇姑区", "210106": "铁西区", "210111": "苏家屯区", "210112": "东陵区", "210113": "新城子区", "210114": "于洪区", "210122": "辽中县", "210123": "康平县", "210124": "法库县", "210181": "新民市", "210184": "沈北新区", "210185": "其它区", "210200": "大连市", "210202": "中山区", "210203": "西岗区", "210204": "沙河口区", "210211": "甘井子区", "210212": "旅顺口区", "210213": "金州区", "210224": "长海县", "210281": "瓦房店市", "210282": "普兰店市", "210283": "庄河市", "210298": "其它区", "210300": "鞍山市", "210302": "铁东区", "210303": "铁西区", "210304": "立山区", "210311": "千山区", "210321": "台安县", "210323": "岫岩满族自治县", "210381": "海城市", "210382": "其它区", "210400": "抚顺市", "210402": "新抚区", "210403": "东洲区", "210404": "望花区", "210411": "顺城区", "210421": "抚顺县", "210422": "新宾满族自治县", "210423": "清原满族自治县", "210424": "其它区", "210500": "本溪市", "210502": "平山区", "210503": "溪湖区", "210504": "明山区", "210505": "南芬区", "210521": "本溪满族自治县", "210522": "桓仁满族自治县", "210523": "其它区", "210600": "丹东市", "210602": "元宝区", "210603": "振兴区", "210604": "振安区", "210624": "宽甸满族自治县", "210681": "东港市", "210682": "凤城市", "210683": "其它区", "210700": "锦州市", "210702": "古塔区", "210703": "凌河区", "210711": "太和区", "210726": "黑山县", "210727": "义县", "210781": "凌海市", "210782": "北镇市", "210783": "其它区", "210800": "营口市", "210802": "站前区", "210803": "西市区", "210804": "鲅鱼圈区", "210811": "老边区", "210881": "盖州市", "210882": "大石桥市", "210883": "其它区", "210900": "阜新市", "210902": "海州区", "210903": "新邱区", "210904": "太平区", "210905": "清河门区", "210911": "细河区", "210921": "阜新蒙古族自治县", "210922": "彰武县", "210923": "其它区", "211000": "辽阳市", "211002": "白塔区", "211003": "文圣区", "211004": "宏伟区", "211005": "弓长岭区", "211011": "太子河区", "211021": "辽阳县", "211081": "灯塔市", "211082": "其它区", "211100": "盘锦市", "211102": "双台子区", "211103": "兴隆台区", "211121": "大洼县", "211122": "盘山县", "211123": "其它区", "211200": "铁岭市", "211202": "银州区", "211204": "清河区", "211221": "铁岭县", "211223": "西丰县", "211224": "昌图县", "211281": "调兵山市", "211282": "开原市", "211283": "其它区", "211300": "朝阳市", "211302": "双塔区", "211303": "龙城区", "211321": "朝阳县", "211322": "建平县", "211324": "喀喇沁左翼蒙古族自治县", "211381": "北票市", "211382": "凌源市", "211383": "其它区", "211400": "葫芦岛市", "211402": "连山区", "211403": "龙港区", "211404": "南票区", "211421": "绥中县", "211422": "建昌县", "211481": "兴城市", "211482": "其它区", "220000": "吉林省", "220100": "长春市", "220102": "南关区", "220103": "宽城区", "220104": "朝阳区", "220105": "二道区", "220106": "绿园区", "220112": "双阳区", "220122": "农安县", "220181": "九台市", "220182": "榆树市", "220183": "德惠市", "220188": "其它区", "220200": "吉林市", "220202": "昌邑区", "220203": "龙潭区", "220204": "船营区", "220211": "丰满区", "220221": "永吉县", "220281": "蛟河市", "220282": "桦甸市", "220283": "舒兰市", "220284": "磐石市", "220285": "其它区", "220300": "四平市", "220302": "铁西区", "220303": "铁东区", "220322": "梨树县", "220323": "伊通满族自治县", "220381": "公主岭市", "220382": "双辽市", "220383": "其它区", "220400": "辽源市", "220402": "龙山区", "220403": "西安区", "220421": "东丰县", "220422": "东辽县", "220423": "其它区", "220500": "通化市", "220502": "东昌区", "220503": "二道江区", "220521": "通化县", "220523": "辉南县", "220524": "柳河县", "220581": "梅河口市", "220582": "集安市", "220583": "其它区", "220600": "白山市", "220602": "浑江区", "220621": "抚松县", "220622": "靖宇县", "220623": "长白朝鲜族自治县", "220625": "江源区", "220681": "临江市", "220682": "其它区", "220700": "松原市", "220702": "宁江区", "220721": "前郭尔罗斯蒙古族自治县", "220722": "长岭县", "220723": "乾安县", "220724": "扶余市", "220725": "其它区", "220800": "白城市", "220802": "洮北区", "220821": "镇赉县", "220822": "通榆县", "220881": "洮南市", "220882": "大安市", "220883": "其它区", "222400": "延边朝鲜族自治州", "222401": "延吉市", "222402": "图们市", "222403": "敦化市", "222404": "珲春市", "222405": "龙井市", "222406": "和龙市", "222424": "汪清县", "222426": "安图县", "222427": "其它区", "230000": "黑龙江省", "230100": "哈尔滨市", "230102": "道里区", "230103": "南岗区", "230104": "道外区", "230106": "香坊区", "230108": "平房区", "230109": "松北区", "230111": "呼兰区", "230123": "依兰县", "230124": "方正县", "230125": "宾县", "230126": "巴彦县", "230127": "木兰县", "230128": "通河县", "230129": "延寿县", "230181": "阿城区", "230182": "双城市", "230183": "尚志市", "230184": "五常市", "230186": "其它区", "230200": "齐齐哈尔市", "230202": "龙沙区", "230203": "建华区", "230204": "铁锋区", "230205": "昂昂溪区", "230206": "富拉尔基区", "230207": "碾子山区", "230208": "梅里斯达斡尔族区", "230221": "龙江县", "230223": "依安县", "230224": "泰来县", "230225": "甘南县", "230227": "富裕县", "230229": "克山县", "230230": "克东县", "230231": "拜泉县", "230281": "讷河市", "230282": "其它区", "230300": "鸡西市", "230302": "鸡冠区", "230303": "恒山区", "230304": "滴道区", "230305": "梨树区", "230306": "城子河区", "230307": "麻山区", "230321": "鸡东县", "230381": "虎林市", "230382": "密山市", "230383": "其它区", "230400": "鹤岗市", "230402": "向阳区", "230403": "工农区", "230404": "南山区", "230405": "兴安区", "230406": "东山区", "230407": "兴山区", "230421": "萝北县", "230422": "绥滨县", "230423": "其它区", "230500": "双鸭山市", "230502": "尖山区", "230503": "岭东区", "230505": "四方台区", "230506": "宝山区", "230521": "集贤县", "230522": "友谊县", "230523": "宝清县", "230524": "饶河县", "230525": "其它区", "230600": "大庆市", "230602": "萨尔图区", "230603": "龙凤区", "230604": "让胡路区", "230605": "红岗区", "230606": "大同区", "230621": "肇州县", "230622": "肇源县", "230623": "林甸县", "230624": "杜尔伯特蒙古族自治县", "230625": "其它区", "230700": "伊春市", "230702": "伊春区", "230703": "南岔区", "230704": "友好区", "230705": "西林区", "230706": "翠峦区", "230707": "新青区", "230708": "美溪区", "230709": "金山屯区", "230710": "五营区", "230711": "乌马河区", "230712": "汤旺河区", "230713": "带岭区", "230714": "乌伊岭区", "230715": "红星区", "230716": "上甘岭区", "230722": "嘉荫县", "230781": "铁力市", "230782": "其它区", "230800": "佳木斯市", "230803": "向阳区", "230804": "前进区", "230805": "东风区", "230811": "郊区", "230822": "桦南县", "230826": "桦川县", "230828": "汤原县", "230833": "抚远县", "230881": "同江市", "230882": "富锦市", "230883": "其它区", "230900": "七台河市", "230902": "新兴区", "230903": "桃山区", "230904": "茄子河区", "230921": "勃利县", "230922": "其它区", "231000": "牡丹江市", "231002": "东安区", "231003": "阳明区", "231004": "爱民区", "231005": "西安区", "231024": "东宁县", "231025": "林口县", "231081": "绥芬河市", "231083": "海林市", "231084": "宁安市", "231085": "穆棱市", "231086": "其它区", "231100": "黑河市", "231102": "爱辉区", "231121": "嫩江县", "231123": "逊克县", "231124": "孙吴县", "231181": "北安市", "231182": "五大连池市", "231183": "其它区", "231200": "绥化市", "231202": "北林区", "231221": "望奎县", "231222": "兰西县", "231223": "青冈县", "231224": "庆安县", "231225": "明水县", "231226": "绥棱县", "231281": "安达市", "231282": "肇东市", "231283": "海伦市", "231284": "其它区", "232700": "大兴安岭地区", "232702": "松岭区", "232703": "新林区", "232704": "呼中区", "232721": "呼玛县", "232722": "塔河县", "232723": "漠河县", "232724": "加格达奇区", "232725": "其它区", "310000": "上海", "310100": "上海市", "310101": "黄浦区", "310104": "徐汇区", "310105": "长宁区", "310106": "静安区", "310107": "普陀区", "310108": "闸北区", "310109": "虹口区", "310110": "杨浦区", "310112": "闵行区", "310113": "宝山区", "310114": "嘉定区", "310115": "浦东新区", "310116": "金山区", "310117": "松江区", "310118": "青浦区", "310120": "奉贤区", "310230": "崇明县", "310231": "其它区", "320000": "江苏省", "320100": "南京市", "320102": "玄武区", "320104": "秦淮区", "320105": "建邺区", "320106": "鼓楼区", "320111": "浦口区", "320113": "栖霞区", "320114": "雨花台区", "320115": "江宁区", "320116": "六合区", "320124": "溧水区", "320125": "高淳区", "320126": "其它区", "320200": "无锡市", "320202": "崇安区", "320203": "南长区", "320204": "北塘区", "320205": "锡山区", "320206": "惠山区", "320211": "滨湖区", "320281": "江阴市", "320282": "宜兴市", "320297": "其它区", "320300": "徐州市", "320302": "鼓楼区", "320303": "云龙区", "320305": "贾汪区", "320311": "泉山区", "320321": "丰县", "320322": "沛县", "320323": "铜山区", "320324": "睢宁县", "320381": "新沂市", "320382": "邳州市", "320383": "其它区", "320400": "常州市", "320402": "天宁区", "320404": "钟楼区", "320405": "戚墅堰区", "320411": "新北区", "320412": "武进区", "320481": "溧阳市", "320482": "金坛市", "320483": "其它区", "320500": "苏州市", "320505": "虎丘区", "320506": "吴中区", "320507": "相城区", "320508": "姑苏区", "320581": "常熟市", "320582": "张家港市", "320583": "昆山市", "320584": "吴江区", "320585": "太仓市", "320596": "其它区", "320600": "南通市", "320602": "崇川区", "320611": "港闸区", "320612": "通州区", "320621": "海安县", "320623": "如东县", "320681": "启东市", "320682": "如皋市", "320684": "海门市", "320694": "其它区", "320700": "连云港市", "320703": "连云区", "320705": "新浦区", "320706": "海州区", "320721": "赣榆县", "320722": "东海县", "320723": "灌云县", "320724": "灌南县", "320725": "其它区", "320800": "淮安市", "320802": "清河区", "320803": "淮安区", "320804": "淮阴区", "320811": "清浦区", "320826": "涟水县", "320829": "洪泽县", "320830": "盱眙县", "320831": "金湖县", "320832": "其它区", "320900": "盐城市", "320902": "亭湖区", "320903": "盐都区", "320921": "响水县", "320922": "滨海县", "320923": "阜宁县", "320924": "射阳县", "320925": "建湖县", "320981": "东台市", "320982": "大丰市", "320983": "其它区", "321000": "扬州市", "321002": "广陵区", "321003": "邗江区", "321023": "宝应县", "321081": "仪征市", "321084": "高邮市", "321088": "江都区", "321093": "其它区", "321100": "镇江市", "321102": "京口区", "321111": "润州区", "321112": "丹徒区", "321181": "丹阳市", "321182": "扬中市", "321183": "句容市", "321184": "其它区", "321200": "泰州市", "321202": "海陵区", "321203": "高港区", "321281": "兴化市", "321282": "靖江市", "321283": "泰兴市", "321284": "姜堰区", "321285": "其它区", "321300": "宿迁市", "321302": "宿城区", "321311": "宿豫区", "321322": "沭阳县", "321323": "泗阳县", "321324": "泗洪县", "321325": "其它区", "330000": "浙江省", "330100": "杭州市", "330102": "上城区", "330103": "下城区", "330104": "江干区", "330105": "拱墅区", "330106": "西湖区", "330108": "滨江区", "330109": "萧山区", "330110": "余杭区", "330122": "桐庐县", "330127": "淳安县", "330182": "建德市", "330183": "富阳市", "330185": "临安市", "330186": "其它区", "330200": "宁波市", "330203": "海曙区", "330204": "江东区", "330205": "江北区", "330206": "北仑区", "330211": "镇海区", "330212": "鄞州区", "330225": "象山县", "330226": "宁海县", "330281": "余姚市", "330282": "慈溪市", "330283": "奉化市", "330284": "其它区", "330300": "温州市", "330302": "鹿城区", "330303": "龙湾区", "330304": "瓯海区", "330322": "洞头县", "330324": "永嘉县", "330326": "平阳县", "330327": "苍南县", "330328": "文成县", "330329": "泰顺县", "330381": "瑞安市", "330382": "乐清市", "330383": "其它区", "330400": "嘉兴市", "330402": "南湖区", "330411": "秀洲区", "330421": "嘉善县", "330424": "海盐县", "330481": "海宁市", "330482": "平湖市", "330483": "桐乡市", "330484": "其它区", "330500": "湖州市", "330502": "吴兴区", "330503": "南浔区", "330521": "德清县", "330522": "长兴县", "330523": "安吉县", "330524": "其它区", "330600": "绍兴市", "330602": "越城区", "330621": "绍兴县", "330624": "新昌县", "330681": "诸暨市", "330682": "上虞市", "330683": "嵊州市", "330684": "其它区", "330700": "金华市", "330702": "婺城区", "330703": "金东区", "330723": "武义县", "330726": "浦江县", "330727": "磐安县", "330781": "兰溪市", "330782": "义乌市", "330783": "东阳市", "330784": "永康市", "330785": "其它区", "330800": "衢州市", "330802": "柯城区", "330803": "衢江区", "330822": "常山县", "330824": "开化县", "330825": "龙游县", "330881": "江山市", "330882": "其它区", "330900": "舟山市", "330902": "定海区", "330903": "普陀区", "330921": "岱山县", "330922": "嵊泗县", "330923": "其它区", "331000": "台州市", "331002": "椒江区", "331003": "黄岩区", "331004": "路桥区", "331021": "玉环县", "331022": "三门县", "331023": "天台县", "331024": "仙居县", "331081": "温岭市", "331082": "临海市", "331083": "其它区", "331100": "丽水市", "331102": "莲都区", "331121": "青田县", "331122": "缙云县", "331123": "遂昌县", "331124": "松阳县", "331125": "云和县", "331126": "庆元县", "331127": "景宁畲族自治县", "331181": "龙泉市", "331182": "其它区", "340000": "安徽省", "340100": "合肥市", "340102": "瑶海区", "340103": "庐阳区", "340104": "蜀山区", "340111": "包河区", "340121": "长丰县", "340122": "肥东县", "340123": "肥西县", "340192": "其它区", "340200": "芜湖市", "340202": "镜湖区", "340203": "弋江区", "340207": "鸠江区", "340208": "三山区", "340221": "芜湖县", "340222": "繁昌县", "340223": "南陵县", "340224": "其它区", "340300": "蚌埠市", "340302": "龙子湖区", "340303": "蚌山区", "340304": "禹会区", "340311": "淮上区", "340321": "怀远县", "340322": "五河县", "340323": "固镇县", "340324": "其它区", "340400": "淮南市", "340402": "大通区", "340403": "田家庵区", "340404": "谢家集区", "340405": "八公山区", "340406": "潘集区", "340421": "凤台县", "340422": "其它区", "340500": "马鞍山市", "340503": "花山区", "340504": "雨山区", "340506": "博望区", "340521": "当涂县", "340522": "其它区", "340600": "淮北市", "340602": "杜集区", "340603": "相山区", "340604": "烈山区", "340621": "濉溪县", "340622": "其它区", "340700": "铜陵市", "340702": "铜官山区", "340703": "狮子山区", "340711": "郊区", "340721": "铜陵县", "340722": "其它区", "340800": "安庆市", "340802": "迎江区", "340803": "大观区", "340811": "宜秀区", "340822": "怀宁县", "340823": "枞阳县", "340824": "潜山县", "340825": "太湖县", "340826": "宿松县", "340827": "望江县", "340828": "岳西县", "340881": "桐城市", "340882": "其它区", "341000": "黄山市", "341002": "屯溪区", "341003": "黄山区", "341004": "徽州区", "341021": "歙县", "341022": "休宁县", "341023": "黟县", "341024": "祁门县", "341025": "其它区", "341100": "滁州市", "341102": "琅琊区", "341103": "南谯区", "341122": "来安县", "341124": "全椒县", "341125": "定远县", "341126": "凤阳县", "341181": "天长市", "341182": "明光市", "341183": "其它区", "341200": "阜阳市", "341202": "颍州区", "341203": "颍东区", "341204": "颍泉区", "341221": "临泉县", "341222": "太和县", "341225": "阜南县", "341226": "颍上县", "341282": "界首市", "341283": "其它区", "341300": "宿州市", "341302": "埇桥区", "341321": "砀山县", "341322": "萧县", "341323": "灵璧县", "341324": "泗县", "341325": "其它区", "341400": "巢湖市", "341421": "庐江县", "341422": "无为县", "341423": "含山县", "341424": "和县", "341500": "六安市", "341502": "金安区", "341503": "裕安区", "341521": "寿县", "341522": "霍邱县", "341523": "舒城县", "341524": "金寨县", "341525": "霍山县", "341526": "其它区", "341600": "亳州市", "341602": "谯城区", "341621": "涡阳县", "341622": "蒙城县", "341623": "利辛县", "341624": "其它区", "341700": "池州市", "341702": "贵池区", "341721": "东至县", "341722": "石台县", "341723": "青阳县", "341724": "其它区", "341800": "宣城市", "341802": "宣州区", "341821": "郎溪县", "341822": "广德县", "341823": "泾县", "341824": "绩溪县", "341825": "旌德县", "341881": "宁国市", "341882": "其它区", "350000": "福建省", "350100": "福州市", "350102": "鼓楼区", "350103": "台江区", "350104": "仓山区", "350105": "马尾区", "350111": "晋安区", "350121": "闽侯县", "350122": "连江县", "350123": "罗源县", "350124": "闽清县", "350125": "永泰县", "350128": "平潭县", "350181": "福清市", "350182": "长乐市", "350183": "其它区", "350200": "厦门市", "350203": "思明区", "350205": "海沧区", "350206": "湖里区", "350211": "集美区", "350212": "同安区", "350213": "翔安区", "350214": "其它区", "350300": "莆田市", "350302": "城厢区", "350303": "涵江区", "350304": "荔城区", "350305": "秀屿区", "350322": "仙游县", "350323": "其它区", "350400": "三明市", "350402": "梅列区", "350403": "三元区", "350421": "明溪县", "350423": "清流县", "350424": "宁化县", "350425": "大田县", "350426": "尤溪县", "350427": "沙县", "350428": "将乐县", "350429": "泰宁县", "350430": "建宁县", "350481": "永安市", "350482": "其它区", "350500": "泉州市", "350502": "鲤城区", "350503": "丰泽区", "350504": "洛江区", "350505": "泉港区", "350521": "惠安县", "350524": "安溪县", "350525": "永春县", "350526": "德化县", "350527": "金门县", "350581": "石狮市", "350582": "晋江市", "350583": "南安市", "350584": "其它区", "350600": "漳州市", "350602": "芗城区", "350603": "龙文区", "350622": "云霄县", "350623": "漳浦县", "350624": "诏安县", "350625": "长泰县", "350626": "东山县", "350627": "南靖县", "350628": "平和县", "350629": "华安县", "350681": "龙海市", "350682": "其它区", "350700": "南平市", "350702": "延平区", "350721": "顺昌县", "350722": "浦城县", "350723": "光泽县", "350724": "松溪县", "350725": "政和县", "350781": "邵武市", "350782": "武夷山市", "350783": "建瓯市", "350784": "建阳市", "350785": "其它区", "350800": "龙岩市", "350802": "新罗区", "350821": "长汀县", "350822": "永定县", "350823": "上杭县", "350824": "武平县", "350825": "连城县", "350881": "漳平市", "350882": "其它区", "350900": "宁德市", "350902": "蕉城区", "350921": "霞浦县", "350922": "古田县", "350923": "屏南县", "350924": "寿宁县", "350925": "周宁县", "350926": "柘荣县", "350981": "福安市", "350982": "福鼎市", "350983": "其它区", "360000": "江西省", "360100": "南昌市", "360102": "东湖区", "360103": "西湖区", "360104": "青云谱区", "360105": "湾里区", "360111": "青山湖区", "360121": "南昌县", "360122": "新建县", "360123": "安义县", "360124": "进贤县", "360128": "其它区", "360200": "景德镇市", "360202": "昌江区", "360203": "珠山区", "360222": "浮梁县", "360281": "乐平市", "360282": "其它区", "360300": "萍乡市", "360302": "安源区", "360313": "湘东区", "360321": "莲花县", "360322": "上栗县", "360323": "芦溪县", "360324": "其它区", "360400": "九江市", "360402": "庐山区", "360403": "浔阳区", "360421": "九江县", "360423": "武宁县", "360424": "修水县", "360425": "永修县", "360426": "德安县", "360427": "星子县", "360428": "都昌县", "360429": "湖口县", "360430": "彭泽县", "360481": "瑞昌市", "360482": "其它区", "360483": "共青城市", "360500": "新余市", "360502": "渝水区", "360521": "分宜县", "360522": "其它区", "360600": "鹰潭市", "360602": "月湖区", "360622": "余江县", "360681": "贵溪市", "360682": "其它区", "360700": "赣州市", "360702": "章贡区", "360721": "赣县", "360722": "信丰县", "360723": "大余县", "360724": "上犹县", "360725": "崇义县", "360726": "安远县", "360727": "龙南县", "360728": "定南县", "360729": "全南县", "360730": "宁都县", "360731": "于都县", "360732": "兴国县", "360733": "会昌县", "360734": "寻乌县", "360735": "石城县", "360781": "瑞金市", "360782": "南康市", "360783": "其它区", "360800": "吉安市", "360802": "吉州区", "360803": "青原区", "360821": "吉安县", "360822": "吉水县", "360823": "峡江县", "360824": "新干县", "360825": "永丰县", "360826": "泰和县", "360827": "遂川县", "360828": "万安县", "360829": "安福县", "360830": "永新县", "360881": "井冈山市", "360882": "其它区", "360900": "宜春市", "360902": "袁州区", "360921": "奉新县", "360922": "万载县", "360923": "上高县", "360924": "宜丰县", "360925": "靖安县", "360926": "铜鼓县", "360981": "丰城市", "360982": "樟树市", "360983": "高安市", "360984": "其它区", "361000": "抚州市", "361002": "临川区", "361021": "南城县", "361022": "黎川县", "361023": "南丰县", "361024": "崇仁县", "361025": "乐安县", "361026": "宜黄县", "361027": "金溪县", "361028": "资溪县", "361029": "东乡县", "361030": "广昌县", "361031": "其它区", "361100": "上饶市", "361102": "信州区", "361121": "上饶县", "361122": "广丰县", "361123": "玉山县", "361124": "铅山县", "361125": "横峰县", "361126": "弋阳县", "361127": "余干县", "361128": "鄱阳县", "361129": "万年县", "361130": "婺源县", "361181": "德兴市", "361182": "其它区", "370000": "山东省", "370100": "济南市", "370102": "历下区", "370103": "市中区", "370104": "槐荫区", "370105": "天桥区", "370112": "历城区", "370113": "长清区", "370124": "平阴县", "370125": "济阳县", "370126": "商河县", "370181": "章丘市", "370182": "其它区", "370200": "青岛市", "370202": "市南区", "370203": "市北区", "370211": "黄岛区", "370212": "崂山区", "370213": "李沧区", "370214": "城阳区", "370281": "胶州市", "370282": "即墨市", "370283": "平度市", "370285": "莱西市", "370286": "其它区", "370300": "淄博市", "370302": "淄川区", "370303": "张店区", "370304": "博山区", "370305": "临淄区", "370306": "周村区", "370321": "桓台县", "370322": "高青县", "370323": "沂源县", "370324": "其它区", "370400": "枣庄市", "370402": "市中区", "370403": "薛城区", "370404": "峄城区", "370405": "台儿庄区", "370406": "山亭区", "370481": "滕州市", "370482": "其它区", "370500": "东营市", "370502": "东营区", "370503": "河口区", "370521": "垦利县", "370522": "利津县", "370523": "广饶县", "370591": "其它区", "370600": "烟台市", "370602": "芝罘区", "370611": "福山区", "370612": "牟平区", "370613": "莱山区", "370634": "长岛县", "370681": "龙口市", "370682": "莱阳市", "370683": "莱州市", "370684": "蓬莱市", "370685": "招远市", "370686": "栖霞市", "370687": "海阳市", "370688": "其它区", "370700": "潍坊市", "370702": "潍城区", "370703": "寒亭区", "370704": "坊子区", "370705": "奎文区", "370724": "临朐县", "370725": "昌乐县", "370781": "青州市", "370782": "诸城市", "370783": "寿光市", "370784": "安丘市", "370785": "高密市", "370786": "昌邑市", "370787": "其它区", "370800": "济宁市", "370802": "市中区", "370811": "任城区", "370826": "微山县", "370827": "鱼台县", "370828": "金乡县", "370829": "嘉祥县", "370830": "汶上县", "370831": "泗水县", "370832": "梁山县", "370881": "曲阜市", "370882": "兖州市", "370883": "邹城市", "370884": "其它区", "370900": "泰安市", "370902": "泰山区", "370903": "岱岳区", "370921": "宁阳县", "370923": "东平县", "370982": "新泰市", "370983": "肥城市", "370984": "其它区", "371000": "威海市", "371002": "环翠区", "371081": "文登市", "371082": "荣成市", "371083": "乳山市", "371084": "其它区", "371100": "日照市", "371102": "东港区", "371103": "岚山区", "371121": "五莲县", "371122": "莒县", "371123": "其它区", "371200": "莱芜市", "371202": "莱城区", "371203": "钢城区", "371204": "其它区", "371300": "临沂市", "371302": "兰山区", "371311": "罗庄区", "371312": "河东区", "371321": "沂南县", "371322": "郯城县", "371323": "沂水县", "371324": "苍山县", "371325": "费县", "371326": "平邑县", "371327": "莒南县", "371328": "蒙阴县", "371329": "临沭县", "371330": "其它区", "371400": "德州市", "371402": "德城区", "371421": "陵县", "371422": "宁津县", "371423": "庆云县", "371424": "临邑县", "371425": "齐河县", "371426": "平原县", "371427": "夏津县", "371428": "武城县", "371481": "乐陵市", "371482": "禹城市", "371483": "其它区", "371500": "聊城市", "371502": "东昌府区", "371521": "阳谷县", "371522": "莘县", "371523": "茌平县", "371524": "东阿县", "371525": "冠县", "371526": "高唐县", "371581": "临清市", "371582": "其它区", "371600": "滨州市", "371602": "滨城区", "371621": "惠民县", "371622": "阳信县", "371623": "无棣县", "371624": "沾化县", "371625": "博兴县", "371626": "邹平县", "371627": "其它区", "371700": "菏泽市", "371702": "牡丹区", "371721": "曹县", "371722": "单县", "371723": "成武县", "371724": "巨野县", "371725": "郓城县", "371726": "鄄城县", "371727": "定陶县", "371728": "东明县", "371729": "其它区", "410000": "河南省", "410100": "郑州市", "410102": "中原区", "410103": "二七区", "410104": "管城回族区", "410105": "金水区", "410106": "上街区", "410108": "惠济区", "410122": "中牟县", "410181": "巩义市", "410182": "荥阳市", "410183": "新密市", "410184": "新郑市", "410185": "登封市", "410188": "其它区", "410200": "开封市", "410202": "龙亭区", "410203": "顺河回族区", "410204": "鼓楼区", "410205": "禹王台区", "410211": "金明区", "410221": "杞县", "410222": "通许县", "410223": "尉氏县", "410224": "开封县", "410225": "兰考县", "410226": "其它区", "410300": "洛阳市", "410302": "老城区", "410303": "西工区", "410304": "瀍河回族区", "410305": "涧西区", "410306": "吉利区", "410307": "洛龙区", "410322": "孟津县", "410323": "新安县", "410324": "栾川县", "410325": "嵩县", "410326": "汝阳县", "410327": "宜阳县", "410328": "洛宁县", "410329": "伊川县", "410381": "偃师市", "410400": "平顶山市", "410402": "新华区", "410403": "卫东区", "410404": "石龙区", "410411": "湛河区", "410421": "宝丰县", "410422": "叶县", "410423": "鲁山县", "410425": "郏县", "410481": "舞钢市", "410482": "汝州市", "410483": "其它区", "410500": "安阳市", "410502": "文峰区", "410503": "北关区", "410505": "殷都区", "410506": "龙安区", "410522": "安阳县", "410523": "汤阴县", "410526": "滑县", "410527": "内黄县", "410581": "林州市", "410582": "其它区", "410600": "鹤壁市", "410602": "鹤山区", "410603": "山城区", "410611": "淇滨区", "410621": "浚县", "410622": "淇县", "410623": "其它区", "410700": "新乡市", "410702": "红旗区", "410703": "卫滨区", "410704": "凤泉区", "410711": "牧野区", "410721": "新乡县", "410724": "获嘉县", "410725": "原阳县", "410726": "延津县", "410727": "封丘县", "410728": "长垣县", "410781": "卫辉市", "410782": "辉县市", "410783": "其它区", "410800": "焦作市", "410802": "解放区", "410803": "中站区", "410804": "马村区", "410811": "山阳区", "410821": "修武县", "410822": "博爱县", "410823": "武陟县", "410825": "温县", "410881": "济源市", "410882": "沁阳市", "410883": "孟州市", "410884": "其它区", "410900": "濮阳市", "410902": "华龙区", "410922": "清丰县", "410923": "南乐县", "410926": "范县", "410927": "台前县", "410928": "濮阳县", "410929": "其它区", "411000": "许昌市", "411002": "魏都区", "411023": "许昌县", "411024": "鄢陵县", "411025": "襄城县", "411081": "禹州市", "411082": "长葛市", "411083": "其它区", "411100": "漯河市", "411102": "源汇区", "411103": "郾城区", "411104": "召陵区", "411121": "舞阳县", "411122": "临颍县", "411123": "其它区", "411200": "三门峡市", "411202": "湖滨区", "411221": "渑池县", "411222": "陕县", "411224": "卢氏县", "411281": "义马市", "411282": "灵宝市", "411283": "其它区", "411300": "南阳市", "411302": "宛城区", "411303": "卧龙区", "411321": "南召县", "411322": "方城县", "411323": "西峡县", "411324": "镇平县", "411325": "内乡县", "411326": "淅川县", "411327": "社旗县", "411328": "唐河县", "411329": "新野县", "411330": "桐柏县", "411381": "邓州市", "411382": "其它区", "411400": "商丘市", "411402": "梁园区", "411403": "睢阳区", "411421": "民权县", "411422": "睢县", "411423": "宁陵县", "411424": "柘城县", "411425": "虞城县", "411426": "夏邑县", "411481": "永城市", "411482": "其它区", "411500": "信阳市", "411502": "浉河区", "411503": "平桥区", "411521": "罗山县", "411522": "光山县", "411523": "新县", "411524": "商城县", "411525": "固始县", "411526": "潢川县", "411527": "淮滨县", "411528": "息县", "411529": "其它区", "411600": "周口市", "411602": "川汇区", "411621": "扶沟县", "411622": "西华县", "411623": "商水县", "411624": "沈丘县", "411625": "郸城县", "411626": "淮阳县", "411627": "太康县", "411628": "鹿邑县", "411681": "项城市", "411682": "其它区", "411700": "驻马店市", "411702": "驿城区", "411721": "西平县", "411722": "上蔡县", "411723": "平舆县", "411724": "正阳县", "411725": "确山县", "411726": "泌阳县", "411727": "汝南县", "411728": "遂平县", "411729": "新蔡县", "411730": "其它区", "420000": "湖北省", "420100": "武汉市", "420102": "江岸区", "420103": "江汉区", "420104": "硚口区", "420105": "汉阳区", "420106": "武昌区", "420107": "青山区", "420111": "洪山区", "420112": "东西湖区", "420113": "汉南区", "420114": "蔡甸区", "420115": "江夏区", "420116": "黄陂区", "420117": "新洲区", "420118": "其它区", "420200": "黄石市", "420202": "黄石港区", "420203": "西塞山区", "420204": "下陆区", "420205": "铁山区", "420222": "阳新县", "420281": "大冶市", "420282": "其它区", "420300": "十堰市", "420302": "茅箭区", "420303": "张湾区", "420321": "郧县", "420322": "郧西县", "420323": "竹山县", "420324": "竹溪县", "420325": "房县", "420381": "丹江口市", "420383": "其它区", "420500": "宜昌市", "420502": "西陵区", "420503": "伍家岗区", "420504": "点军区", "420505": "猇亭区", "420506": "夷陵区", "420525": "远安县", "420526": "兴山县", "420527": "秭归县", "420528": "长阳土家族自治县", "420529": "五峰土家族自治县", "420581": "宜都市", "420582": "当阳市", "420583": "枝江市", "420584": "其它区", "420600": "襄阳市", "420602": "襄城区", "420606": "樊城区", "420607": "襄州区", "420624": "南漳县", "420625": "谷城县", "420626": "保康县", "420682": "老河口市", "420683": "枣阳市", "420684": "宜城市", "420685": "其它区", "420700": "鄂州市", "420702": "梁子湖区", "420703": "华容区", "420704": "鄂城区", "420705": "其它区", "420800": "荆门市", "420802": "东宝区", "420804": "掇刀区", "420821": "京山县", "420822": "沙洋县", "420881": "钟祥市", "420882": "其它区", "420900": "孝感市", "420902": "孝南区", "420921": "孝昌县", "420922": "大悟县", "420923": "云梦县", "420981": "应城市", "420982": "安陆市", "420984": "汉川市", "420985": "其它区", "421000": "荆州市", "421002": "沙市区", "421003": "荆州区", "421022": "公安县", "421023": "监利县", "421024": "江陵县", "421081": "石首市", "421083": "洪湖市", "421087": "松滋市", "421088": "其它区", "421100": "黄冈市", "421102": "黄州区", "421121": "团风县", "421122": "红安县", "421123": "罗田县", "421124": "英山县", "421125": "浠水县", "421126": "蕲春县", "421127": "黄梅县", "421181": "麻城市", "421182": "武穴市", "421183": "其它区", "421200": "咸宁市", "421202": "咸安区", "421221": "嘉鱼县", "421222": "通城县", "421223": "崇阳县", "421224": "通山县", "421281": "赤壁市", "421283": "其它区", "421300": "随州市", "421302": "曾都区", "421321": "随县", "421381": "广水市", "421382": "其它区", "422800": "恩施土家族苗族自治州", "422801": "恩施市", "422802": "利川市", "422822": "建始县", "422823": "巴东县", "422825": "宣恩县", "422826": "咸丰县", "422827": "来凤县", "422828": "鹤峰县", "422829": "其它区", "429004": "仙桃市", "429005": "潜江市", "429006": "天门市", "429021": "神农架林区", "430000": "湖南省", "430100": "长沙市", "430102": "芙蓉区", "430103": "天心区", "430104": "岳麓区", "430105": "开福区", "430111": "雨花区", "430121": "长沙县", "430122": "望城区", "430124": "宁乡县", "430181": "浏阳市", "430182": "其它区", "430200": "株洲市", "430202": "荷塘区", "430203": "芦淞区", "430204": "石峰区", "430211": "天元区", "430221": "株洲县", "430223": "攸县", "430224": "茶陵县", "430225": "炎陵县", "430281": "醴陵市", "430282": "其它区", "430300": "湘潭市", "430302": "雨湖区", "430304": "岳塘区", "430321": "湘潭县", "430381": "湘乡市", "430382": "韶山市", "430383": "其它区", "430400": "衡阳市", "430405": "珠晖区", "430406": "雁峰区", "430407": "石鼓区", "430408": "蒸湘区", "430412": "南岳区", "430421": "衡阳县", "430422": "衡南县", "430423": "衡山县", "430424": "衡东县", "430426": "祁东县", "430481": "耒阳市", "430482": "常宁市", "430483": "其它区", "430500": "邵阳市", "430502": "双清区", "430503": "大祥区", "430511": "北塔区", "430521": "邵东县", "430522": "新邵县", "430523": "邵阳县", "430524": "隆回县", "430525": "洞口县", "430527": "绥宁县", "430528": "新宁县", "430529": "城步苗族自治县", "430581": "武冈市", "430582": "其它区", "430600": "岳阳市", "430602": "岳阳楼区", "430603": "云溪区", "430611": "君山区", "430621": "岳阳县", "430623": "华容县", "430624": "湘阴县", "430626": "平江县", "430681": "汨罗市", "430682": "临湘市", "430683": "其它区", "430700": "常德市", "430702": "武陵区", "430703": "鼎城区", "430721": "安乡县", "430722": "汉寿县", "430723": "澧县", "430724": "临澧县", "430725": "桃源县", "430726": "石门县", "430781": "津市市", "430782": "其它区", "430800": "张家界市", "430802": "永定区", "430811": "武陵源区", "430821": "慈利县", "430822": "桑植县", "430823": "其它区", "430900": "益阳市", "430902": "资阳区", "430903": "赫山区", "430921": "南县", "430922": "桃江县", "430923": "安化县", "430981": "沅江市", "430982": "其它区", "431000": "郴州市", "431002": "北湖区", "431003": "苏仙区", "431021": "桂阳县", "431022": "宜章县", "431023": "永兴县", "431024": "嘉禾县", "431025": "临武县", "431026": "汝城县", "431027": "桂东县", "431028": "安仁县", "431081": "资兴市", "431082": "其它区", "431100": "永州市", "431102": "零陵区", "431103": "冷水滩区", "431121": "祁阳县", "431122": "东安县", "431123": "双牌县", "431124": "道县", "431125": "江永县", "431126": "宁远县", "431127": "蓝山县", "431128": "新田县", "431129": "江华瑶族自治县", "431130": "其它区", "431200": "怀化市", "431202": "鹤城区", "431221": "中方县", "431222": "沅陵县", "431223": "辰溪县", "431224": "溆浦县", "431225": "会同县", "431226": "麻阳苗族自治县", "431227": "新晃侗族自治县", "431228": "芷江侗族自治县", "431229": "靖州苗族侗族自治县", "431230": "通道侗族自治县", "431281": "洪江市", "431282": "其它区", "431300": "娄底市", "431302": "娄星区", "431321": "双峰县", "431322": "新化县", "431381": "冷水江市", "431382": "涟源市", "431383": "其它区", "433100": "湘西土家族苗族自治州", "433101": "吉首市", "433122": "泸溪县", "433123": "凤凰县", "433124": "花垣县", "433125": "保靖县", "433126": "古丈县", "433127": "永顺县", "433130": "龙山县", "433131": "其它区", "440000": "广东省", "440100": "广州市", "440103": "荔湾区", "440104": "越秀区", "440105": "海珠区", "440106": "天河区", "440111": "白云区", "440112": "黄埔区", "440113": "番禺区", "440114": "花都区", "440115": "南沙区", "440116": "萝岗区", "440183": "增城市", "440184": "从化市", "440189": "其它区", "440200": "韶关市", "440203": "武江区", "440204": "浈江区", "440205": "曲江区", "440222": "始兴县", "440224": "仁化县", "440229": "翁源县", "440232": "乳源瑶族自治县", "440233": "新丰县", "440281": "乐昌市", "440282": "南雄市", "440283": "其它区", "440300": "深圳市", "440303": "罗湖区", "440304": "福田区", "440305": "南山区", "440306": "宝安区", "440307": "龙岗区", "440308": "盐田区", "440309": "其它区", "440320": "光明新区", "440321": "坪山新区", "440322": "大鹏新区", "440323": "龙华新区", "440400": "珠海市", "440402": "香洲区", "440403": "斗门区", "440404": "金湾区", "440488": "其它区", "440500": "汕头市", "440507": "龙湖区", "440511": "金平区", "440512": "濠江区", "440513": "潮阳区", "440514": "潮南区", "440515": "澄海区", "440523": "南澳县", "440524": "其它区", "440600": "佛山市", "440604": "禅城区", "440605": "南海区", "440606": "顺德区", "440607": "三水区", "440608": "高明区", "440609": "其它区", "440700": "江门市", "440703": "蓬江区", "440704": "江海区", "440705": "新会区", "440781": "台山市", "440783": "开平市", "440784": "鹤山市", "440785": "恩平市", "440786": "其它区", "440800": "湛江市", "440802": "赤坎区", "440803": "霞山区", "440804": "坡头区", "440811": "麻章区", "440823": "遂溪县", "440825": "徐闻县", "440881": "廉江市", "440882": "雷州市", "440883": "吴川市", "440884": "其它区", "440900": "茂名市", "440902": "茂南区", "440903": "茂港区", "440923": "电白县", "440981": "高州市", "440982": "化州市", "440983": "信宜市", "440984": "其它区", "441200": "肇庆市", "441202": "端州区", "441203": "鼎湖区", "441223": "广宁县", "441224": "怀集县", "441225": "封开县", "441226": "德庆县", "441283": "高要市", "441284": "四会市", "441285": "其它区", "441300": "惠州市", "441302": "惠城区", "441303": "惠阳区", "441322": "博罗县", "441323": "惠东县", "441324": "龙门县", "441325": "其它区", "441400": "梅州市", "441402": "梅江区", "441421": "梅县", "441422": "大埔县", "441423": "丰顺县", "441424": "五华县", "441426": "平远县", "441427": "蕉岭县", "441481": "兴宁市", "441482": "其它区", "441500": "汕尾市", "441502": "城区", "441521": "海丰县", "441523": "陆河县", "441581": "陆丰市", "441582": "其它区", "441600": "河源市", "441602": "源城区", "441621": "紫金县", "441622": "龙川县", "441623": "连平县", "441624": "和平县", "441625": "东源县", "441626": "其它区", "441700": "阳江市", "441702": "江城区", "441721": "阳西县", "441723": "阳东县", "441781": "阳春市", "441782": "其它区", "441800": "清远市", "441802": "清城区", "441821": "佛冈县", "441823": "阳山县", "441825": "连山壮族瑶族自治县", "441826": "连南瑶族自治县", "441827": "清新区", "441881": "英德市", "441882": "连州市", "441883": "其它区", "441900": "东莞市", "442000": "中山市", "442101": "东沙群岛", "445100": "潮州市", "445102": "湘桥区", "445121": "潮安区", "445122": "饶平县", "445186": "其它区", "445200": "揭阳市", "445202": "榕城区", "445221": "揭东区", "445222": "揭西县", "445224": "惠来县", "445281": "普宁市", "445285": "其它区", "445300": "云浮市", "445302": "云城区", "445321": "新兴县", "445322": "郁南县", "445323": "云安县", "445381": "罗定市", "445382": "其它区", "450000": "广西壮族自治区", "450100": "南宁市", "450102": "兴宁区", "450103": "青秀区", "450105": "江南区", "450107": "西乡塘区", "450108": "良庆区", "450109": "邕宁区", "450122": "武鸣县", "450123": "隆安县", "450124": "马山县", "450125": "上林县", "450126": "宾阳县", "450127": "横县", "450128": "其它区", "450200": "柳州市", "450202": "城中区", "450203": "鱼峰区", "450204": "柳南区", "450205": "柳北区", "450221": "柳江县", "450222": "柳城县", "450223": "鹿寨县", "450224": "融安县", "450225": "融水苗族自治县", "450226": "三江侗族自治县", "450227": "其它区", "450300": "桂林市", "450302": "秀峰区", "450303": "叠彩区", "450304": "象山区", "450305": "七星区", "450311": "雁山区", "450321": "阳朔县", "450322": "临桂区", "450323": "灵川县", "450324": "全州县", "450325": "兴安县", "450326": "永福县", "450327": "灌阳县", "450328": "龙胜各族自治县", "450329": "资源县", "450330": "平乐县", "450331": "荔浦县", "450332": "恭城瑶族自治县", "450333": "其它区", "450400": "梧州市", "450403": "万秀区", "450405": "长洲区", "450406": "龙圩区", "450421": "苍梧县", "450422": "藤县", "450423": "蒙山县", "450481": "岑溪市", "450482": "其它区", "450500": "北海市", "450502": "海城区", "450503": "银海区", "450512": "铁山港区", "450521": "合浦县", "450522": "其它区", "450600": "防城港市", "450602": "港口区", "450603": "防城区", "450621": "上思县", "450681": "东兴市", "450682": "其它区", "450700": "钦州市", "450702": "钦南区", "450703": "钦北区", "450721": "灵山县", "450722": "浦北县", "450723": "其它区", "450800": "贵港市", "450802": "港北区", "450803": "港南区", "450804": "覃塘区", "450821": "平南县", "450881": "桂平市", "450882": "其它区", "450900": "玉林市", "450902": "玉州区", "450903": "福绵区", "450921": "容县", "450922": "陆川县", "450923": "博白县", "450924": "兴业县", "450981": "北流市", "450982": "其它区", "451000": "百色市", "451002": "右江区", "451021": "田阳县", "451022": "田东县", "451023": "平果县", "451024": "德保县", "451025": "靖西县", "451026": "那坡县", "451027": "凌云县", "451028": "乐业县", "451029": "田林县", "451030": "西林县", "451031": "隆林各族自治县", "451032": "其它区", "451100": "贺州市", "451102": "八步区", "451119": "平桂管理区", "451121": "昭平县", "451122": "钟山县", "451123": "富川瑶族自治县", "451124": "其它区", "451200": "河池市", "451202": "金城江区", "451221": "南丹县", "451222": "天峨县", "451223": "凤山县", "451224": "东兰县", "451225": "罗城仫佬族自治县", "451226": "环江毛南族自治县", "451227": "巴马瑶族自治县", "451228": "都安瑶族自治县", "451229": "大化瑶族自治县", "451281": "宜州市", "451282": "其它区", "451300": "来宾市", "451302": "兴宾区", "451321": "忻城县", "451322": "象州县", "451323": "武宣县", "451324": "金秀瑶族自治县", "451381": "合山市", "451382": "其它区", "451400": "崇左市", "451402": "江州区", "451421": "扶绥县", "451422": "宁明县", "451423": "龙州县", "451424": "大新县", "451425": "天等县", "451481": "凭祥市", "451482": "其它区", "460000": "海南省", "460100": "海口市", "460105": "秀英区", "460106": "龙华区", "460107": "琼山区", "460108": "美兰区", "460109": "其它区", "460200": "三亚市", "460300": "三沙市", "460321": "西沙群岛", "460322": "南沙群岛", "460323": "中沙群岛的岛礁及其海域", "469001": "五指山市", "469002": "琼海市", "469003": "儋州市", "469005": "文昌市", "469006": "万宁市", "469007": "东方市", "469025": "定安县", "469026": "屯昌县", "469027": "澄迈县", "469028": "临高县", "469030": "白沙黎族自治县", "469031": "昌江黎族自治县", "469033": "乐东黎族自治县", "469034": "陵水黎族自治县", "469035": "保亭黎族苗族自治县", "469036": "琼中黎族苗族自治县", "471005": "其它区", "500000": "重庆", "500100": "重庆市", "500101": "万州区", "500102": "涪陵区", "500103": "渝中区", "500104": "大渡口区", "500105": "江北区", "500106": "沙坪坝区", "500107": "九龙坡区", "500108": "南岸区", "500109": "北碚区", "500110": "万盛区", "500111": "双桥区", "500112": "渝北区", "500113": "巴南区", "500114": "黔江区", "500115": "长寿区", "500222": "綦江区", "500223": "潼南县", "500224": "铜梁县", "500225": "大足区", "500226": "荣昌县", "500227": "璧山县", "500228": "梁平县", "500229": "城口县", "500230": "丰都县", "500231": "垫江县", "500232": "武隆县", "500233": "忠县", "500234": "开县", "500235": "云阳县", "500236": "奉节县", "500237": "巫山县", "500238": "巫溪县", "500240": "石柱土家族自治县", "500241": "秀山土家族苗族自治县", "500242": "酉阳土家族苗族自治县", "500243": "彭水苗族土家族自治县", "500381": "江津区", "500382": "合川区", "500383": "永川区", "500384": "南川区", "500385": "其它区", "510000": "四川省", "510100": "成都市", "510104": "锦江区", "510105": "青羊区", "510106": "金牛区", "510107": "武侯区", "510108": "成华区", "510112": "龙泉驿区", "510113": "青白江区", "510114": "新都区", "510115": "温江区", "510121": "金堂县", "510122": "双流县", "510124": "郫县", "510129": "大邑县", "510131": "蒲江县", "510132": "新津县", "510181": "都江堰市", "510182": "彭州市", "510183": "邛崃市", "510184": "崇州市", "510185": "其它区", "510300": "自贡市", "510302": "自流井区", "510303": "贡井区", "510304": "大安区", "510311": "沿滩区", "510321": "荣县", "510322": "富顺县", "510323": "其它区", "510400": "攀枝花市", "510402": "东区", "510403": "西区", "510411": "仁和区", "510421": "米易县", "510422": "盐边县", "510423": "其它区", "510500": "泸州市", "510502": "江阳区", "510503": "纳溪区", "510504": "龙马潭区", "510521": "泸县", "510522": "合江县", "510524": "叙永县", "510525": "古蔺县", "510526": "其它区", "510600": "德阳市", "510603": "旌阳区", "510623": "中江县", "510626": "罗江县", "510681": "广汉市", "510682": "什邡市", "510683": "绵竹市", "510684": "其它区", "510700": "绵阳市", "510703": "涪城区", "510704": "游仙区", "510722": "三台县", "510723": "盐亭县", "510724": "安县", "510725": "梓潼县", "510726": "北川羌族自治县", "510727": "平武县", "510781": "江油市", "510782": "其它区", "510800": "广元市", "510802": "利州区", "510811": "昭化区", "510812": "朝天区", "510821": "旺苍县", "510822": "青川县", "510823": "剑阁县", "510824": "苍溪县", "510825": "其它区", "510900": "遂宁市", "510903": "船山区", "510904": "安居区", "510921": "蓬溪县", "510922": "射洪县", "510923": "大英县", "510924": "其它区", "511000": "内江市", "511002": "市中区", "511011": "东兴区", "511024": "威远县", "511025": "资中县", "511028": "隆昌县", "511029": "其它区", "511100": "乐山市", "511102": "市中区", "511111": "沙湾区", "511112": "五通桥区", "511113": "金口河区", "511123": "犍为县", "511124": "井研县", "511126": "夹江县", "511129": "沐川县", "511132": "峨边彝族自治县", "511133": "马边彝族自治县", "511181": "峨眉山市", "511182": "其它区", "511300": "南充市", "511302": "顺庆区", "511303": "高坪区", "511304": "嘉陵区", "511321": "南部县", "511322": "营山县", "511323": "蓬安县", "511324": "仪陇县", "511325": "西充县", "511381": "阆中市", "511382": "其它区", "511400": "眉山市", "511402": "东坡区", "511421": "仁寿县", "511422": "彭山县", "511423": "洪雅县", "511424": "丹棱县", "511425": "青神县", "511426": "其它区", "511500": "宜宾市", "511502": "翠屏区", "511521": "宜宾县", "511522": "南溪区", "511523": "江安县", "511524": "长宁县", "511525": "高县", "511526": "珙县", "511527": "筠连县", "511528": "兴文县", "511529": "屏山县", "511530": "其它区", "511600": "广安市", "511602": "广安区", "511603": "前锋区", "511621": "岳池县", "511622": "武胜县", "511623": "邻水县", "511681": "华蓥市", "511683": "其它区", "511700": "达州市", "511702": "通川区", "511721": "达川区", "511722": "宣汉县", "511723": "开江县", "511724": "大竹县", "511725": "渠县", "511781": "万源市", "511782": "其它区", "511800": "雅安市", "511802": "雨城区", "511821": "名山区", "511822": "荥经县", "511823": "汉源县", "511824": "石棉县", "511825": "天全县", "511826": "芦山县", "511827": "宝兴县", "511828": "其它区", "511900": "巴中市", "511902": "巴州区", "511903": "恩阳区", "511921": "通江县", "511922": "南江县", "511923": "平昌县", "511924": "其它区", "512000": "资阳市", "512002": "雁江区", "512021": "安岳县", "512022": "乐至县", "512081": "简阳市", "512082": "其它区", "513200": "阿坝藏族羌族自治州", "513221": "汶川县", "513222": "理县", "513223": "茂县", "513224": "松潘县", "513225": "九寨沟县", "513226": "金川县", "513227": "小金县", "513228": "黑水县", "513229": "马尔康县", "513230": "壤塘县", "513231": "阿坝县", "513232": "若尔盖县", "513233": "红原县", "513234": "其它区", "513300": "甘孜藏族自治州", "513321": "康定县", "513322": "泸定县", "513323": "丹巴县", "513324": "九龙县", "513325": "雅江县", "513326": "道孚县", "513327": "炉霍县", "513328": "甘孜县", "513329": "新龙县", "513330": "德格县", "513331": "白玉县", "513332": "石渠县", "513333": "色达县", "513334": "理塘县", "513335": "巴塘县", "513336": "乡城县", "513337": "稻城县", "513338": "得荣县", "513339": "其它区", "513400": "凉山彝族自治州", "513401": "西昌市", "513422": "木里藏族自治县", "513423": "盐源县", "513424": "德昌县", "513425": "会理县", "513426": "会东县", "513427": "宁南县", "513428": "普格县", "513429": "布拖县", "513430": "金阳县", "513431": "昭觉县", "513432": "喜德县", "513433": "冕宁县", "513434": "越西县", "513435": "甘洛县", "513436": "美姑县", "513437": "雷波县", "513438": "其它区", "520000": "贵州省", "520100": "贵阳市", "520102": "南明区", "520103": "云岩区", "520111": "花溪区", "520112": "乌当区", "520113": "白云区", "520121": "开阳县", "520122": "息烽县", "520123": "修文县", "520151": "观山湖区", "520181": "清镇市", "520182": "其它区", "520200": "六盘水市", "520201": "钟山区", "520203": "六枝特区", "520221": "水城县", "520222": "盘县", "520223": "其它区", "520300": "遵义市", "520302": "红花岗区", "520303": "汇川区", "520321": "遵义县", "520322": "桐梓县", "520323": "绥阳县", "520324": "正安县", "520325": "道真仡佬族苗族自治县", "520326": "务川仡佬族苗族自治县", "520327": "凤冈县", "520328": "湄潭县", "520329": "余庆县", "520330": "习水县", "520381": "赤水市", "520382": "仁怀市", "520383": "其它区", "520400": "安顺市", "520402": "西秀区", "520421": "平坝县", "520422": "普定县", "520423": "镇宁布依族苗族自治县", "520424": "关岭布依族苗族自治县", "520425": "紫云苗族布依族自治县", "520426": "其它区", "522200": "铜仁市", "522201": "碧江区", "522222": "江口县", "522223": "玉屏侗族自治县", "522224": "石阡县", "522225": "思南县", "522226": "印江土家族苗族自治县", "522227": "德江县", "522228": "沿河土家族自治县", "522229": "松桃苗族自治县", "522230": "万山区", "522231": "其它区", "522300": "黔西南布依族苗族自治州", "522301": "兴义市", "522322": "兴仁县", "522323": "普安县", "522324": "晴隆县", "522325": "贞丰县", "522326": "望谟县", "522327": "册亨县", "522328": "安龙县", "522329": "其它区", "522400": "毕节市", "522401": "七星关区", "522422": "大方县", "522423": "黔西县", "522424": "金沙县", "522425": "织金县", "522426": "纳雍县", "522427": "威宁彝族回族苗族自治县", "522428": "赫章县", "522429": "其它区", "522600": "黔东南苗族侗族自治州", "522601": "凯里市", "522622": "黄平县", "522623": "施秉县", "522624": "三穗县", "522625": "镇远县", "522626": "岑巩县", "522627": "天柱县", "522628": "锦屏县", "522629": "剑河县", "522630": "台江县", "522631": "黎平县", "522632": "榕江县", "522633": "从江县", "522634": "雷山县", "522635": "麻江县", "522636": "丹寨县", "522637": "其它区", "522700": "黔南布依族苗族自治州", "522701": "都匀市", "522702": "福泉市", "522722": "荔波县", "522723": "贵定县", "522725": "瓮安县", "522726": "独山县", "522727": "平塘县", "522728": "罗甸县", "522729": "长顺县", "522730": "龙里县", "522731": "惠水县", "522732": "三都水族自治县", "522733": "其它区", "530000": "云南省", "530100": "昆明市", "530102": "五华区", "530103": "盘龙区", "530111": "官渡区", "530112": "西山区", "530113": "东川区", "530121": "呈贡区", "530122": "晋宁县", "530124": "富民县", "530125": "宜良县", "530126": "石林彝族自治县", "530127": "嵩明县", "530128": "禄劝彝族苗族自治县", "530129": "寻甸回族彝族自治县", "530181": "安宁市", "530182": "其它区", "530300": "曲靖市", "530302": "麒麟区", "530321": "马龙县", "530322": "陆良县", "530323": "师宗县", "530324": "罗平县", "530325": "富源县", "530326": "会泽县", "530328": "沾益县", "530381": "宣威市", "530382": "其它区", "530400": "玉溪市", "530402": "红塔区", "530421": "江川县", "530422": "澄江县", "530423": "通海县", "530424": "华宁县", "530425": "易门县", "530426": "峨山彝族自治县", "530427": "新平彝族傣族自治县", "530428": "元江哈尼族彝族傣族自治县", "530429": "其它区", "530500": "保山市", "530502": "隆阳区", "530521": "施甸县", "530522": "腾冲县", "530523": "龙陵县", "530524": "昌宁县", "530525": "其它区", "530600": "昭通市", "530602": "昭阳区", "530621": "鲁甸县", "530622": "巧家县", "530623": "盐津县", "530624": "大关县", "530625": "永善县", "530626": "绥江县", "530627": "镇雄县", "530628": "彝良县", "530629": "威信县", "530630": "水富县", "530631": "其它区", "530700": "丽江市", "530702": "古城区", "530721": "玉龙纳西族自治县", "530722": "永胜县", "530723": "华坪县", "530724": "宁蒗彝族自治县", "530725": "其它区", "530800": "普洱市", "530802": "思茅区", "530821": "宁洱哈尼族彝族自治县", "530822": "墨江哈尼族自治县", "530823": "景东彝族自治县", "530824": "景谷傣族彝族自治县", "530825": "镇沅彝族哈尼族拉祜族自治县", "530826": "江城哈尼族彝族自治县", "530827": "孟连傣族拉祜族佤族自治县", "530828": "澜沧拉祜族自治县", "530829": "西盟佤族自治县", "530830": "其它区", "530900": "临沧市", "530902": "临翔区", "530921": "凤庆县", "530922": "云县", "530923": "永德县", "530924": "镇康县", "530925": "双江拉祜族佤族布朗族傣族自治县", "530926": "耿马傣族佤族自治县", "530927": "沧源佤族自治县", "530928": "其它区", "532300": "楚雄彝族自治州", "532301": "楚雄市", "532322": "双柏县", "532323": "牟定县", "532324": "南华县", "532325": "姚安县", "532326": "大姚县", "532327": "永仁县", "532328": "元谋县", "532329": "武定县", "532331": "禄丰县", "532332": "其它区", "532500": "红河哈尼族彝族自治州", "532501": "个旧市", "532502": "开远市", "532522": "蒙自市", "532523": "屏边苗族自治县", "532524": "建水县", "532525": "石屏县", "532526": "弥勒市", "532527": "泸西县", "532528": "元阳县", "532529": "红河县", "532530": "金平苗族瑶族傣族自治县", "532531": "绿春县", "532532": "河口瑶族自治县", "532533": "其它区", "532600": "文山壮族苗族自治州", "532621": "文山市", "532622": "砚山县", "532623": "西畴县", "532624": "麻栗坡县", "532625": "马关县", "532626": "丘北县", "532627": "广南县", "532628": "富宁县", "532629": "其它区", "532800": "西双版纳傣族自治州", "532801": "景洪市", "532822": "勐海县", "532823": "勐腊县", "532824": "其它区", "532900": "大理白族自治州", "532901": "大理市", "532922": "漾濞彝族自治县", "532923": "祥云县", "532924": "宾川县", "532925": "弥渡县", "532926": "南涧彝族自治县", "532927": "巍山彝族回族自治县", "532928": "永平县", "532929": "云龙县", "532930": "洱源县", "532931": "剑川县", "532932": "鹤庆县", "532933": "其它区", "533100": "德宏傣族景颇族自治州", "533102": "瑞丽市", "533103": "芒市", "533122": "梁河县", "533123": "盈江县", "533124": "陇川县", "533125": "其它区", "533300": "怒江傈僳族自治州", "533321": "泸水县", "533323": "福贡县", "533324": "贡山独龙族怒族自治县", "533325": "兰坪白族普米族自治县", "533326": "其它区", "533400": "迪庆藏族自治州", "533421": "香格里拉县", "533422": "德钦县", "533423": "维西傈僳族自治县", "533424": "其它区", "540000": "西藏自治区", "540100": "拉萨市", "540102": "城关区", "540121": "林周县", "540122": "当雄县", "540123": "尼木县", "540124": "曲水县", "540125": "堆龙德庆县", "540126": "达孜县", "540127": "墨竹工卡县", "540128": "其它区", "542100": "昌都地区", "542121": "昌都县", "542122": "江达县", "542123": "贡觉县", "542124": "类乌齐县", "542125": "丁青县", "542126": "察雅县", "542127": "八宿县", "542128": "左贡县", "542129": "芒康县", "542132": "洛隆县", "542133": "边坝县", "542134": "其它区", "542200": "山南地区", "542221": "乃东县", "542222": "扎囊县", "542223": "贡嘎县", "542224": "桑日县", "542225": "琼结县", "542226": "曲松县", "542227": "措美县", "542228": "洛扎县", "542229": "加查县", "542231": "隆子县", "542232": "错那县", "542233": "浪卡子县", "542234": "其它区", "542300": "日喀则地区", "542301": "日喀则市", "542322": "南木林县", "542323": "江孜县", "542324": "定日县", "542325": "萨迦县", "542326": "拉孜县", "542327": "昂仁县", "542328": "谢通门县", "542329": "白朗县", "542330": "仁布县", "542331": "康马县", "542332": "定结县", "542333": "仲巴县", "542334": "亚东县", "542335": "吉隆县", "542336": "聂拉木县", "542337": "萨嘎县", "542338": "岗巴县", "542339": "其它区", "542400": "那曲地区", "542421": "那曲县", "542422": "嘉黎县", "542423": "比如县", "542424": "聂荣县", "542425": "安多县", "542426": "申扎县", "542427": "索县", "542428": "班戈县", "542429": "巴青县", "542430": "尼玛县", "542431": "其它区", "542432": "双湖县", "542500": "阿里地区", "542521": "普兰县", "542522": "札达县", "542523": "噶尔县", "542524": "日土县", "542525": "革吉县", "542526": "改则县", "542527": "措勤县", "542528": "其它区", "542600": "林芝地区", "542621": "林芝县", "542622": "工布江达县", "542623": "米林县", "542624": "墨脱县", "542625": "波密县", "542626": "察隅县", "542627": "朗县", "542628": "其它区", "610000": "陕西省", "610100": "西安市", "610102": "新城区", "610103": "碑林区", "610104": "莲湖区", "610111": "灞桥区", "610112": "未央区", "610113": "雁塔区", "610114": "阎良区", "610115": "临潼区", "610116": "长安区", "610122": "蓝田县", "610124": "周至县", "610125": "户县", "610126": "高陵县", "610127": "其它区", "610200": "铜川市", "610202": "王益区", "610203": "印台区", "610204": "耀州区", "610222": "宜君县", "610223": "其它区", "610300": "宝鸡市", "610302": "渭滨区", "610303": "金台区", "610304": "陈仓区", "610322": "凤翔县", "610323": "岐山县", "610324": "扶风县", "610326": "眉县", "610327": "陇县", "610328": "千阳县", "610329": "麟游县", "610330": "凤县", "610331": "太白县", "610332": "其它区", "610400": "咸阳市", "610402": "秦都区", "610403": "杨陵区", "610404": "渭城区", "610422": "三原县", "610423": "泾阳县", "610424": "乾县", "610425": "礼泉县", "610426": "永寿县", "610427": "彬县", "610428": "长武县", "610429": "旬邑县", "610430": "淳化县", "610431": "武功县", "610481": "兴平市", "610482": "其它区", "610500": "渭南市", "610502": "临渭区", "610521": "华县", "610522": "潼关县", "610523": "大荔县", "610524": "合阳县", "610525": "澄城县", "610526": "蒲城县", "610527": "白水县", "610528": "富平县", "610581": "韩城市", "610582": "华阴市", "610583": "其它区", "610600": "延安市", "610602": "宝塔区", "610621": "延长县", "610622": "延川县", "610623": "子长县", "610624": "安塞县", "610625": "志丹县", "610626": "吴起县", "610627": "甘泉县", "610628": "富县", "610629": "洛川县", "610630": "宜川县", "610631": "黄龙县", "610632": "黄陵县", "610633": "其它区", "610700": "汉中市", "610702": "汉台区", "610721": "南郑县", "610722": "城固县", "610723": "洋县", "610724": "西乡县", "610725": "勉县", "610726": "宁强县", "610727": "略阳县", "610728": "镇巴县", "610729": "留坝县", "610730": "佛坪县", "610731": "其它区", "610800": "榆林市", "610802": "榆阳区", "610821": "神木县", "610822": "府谷县", "610823": "横山县", "610824": "靖边县", "610825": "定边县", "610826": "绥德县", "610827": "米脂县", "610828": "佳县", "610829": "吴堡县", "610830": "清涧县", "610831": "子洲县", "610832": "其它区", "610900": "安康市", "610902": "汉滨区", "610921": "汉阴县", "610922": "石泉县", "610923": "宁陕县", "610924": "紫阳县", "610925": "岚皋县", "610926": "平利县", "610927": "镇坪县", "610928": "旬阳县", "610929": "白河县", "610930": "其它区", "611000": "商洛市", "611002": "商州区", "611021": "洛南县", "611022": "丹凤县", "611023": "商南县", "611024": "山阳县", "611025": "镇安县", "611026": "柞水县", "611027": "其它区", "620000": "甘肃省", "620100": "兰州市", "620102": "城关区", "620103": "七里河区", "620104": "西固区", "620105": "安宁区", "620111": "红古区", "620121": "永登县", "620122": "皋兰县", "620123": "榆中县", "620124": "其它区", "620200": "嘉峪关市", "620300": "金昌市", "620302": "金川区", "620321": "永昌县", "620322": "其它区", "620400": "白银市", "620402": "白银区", "620403": "平川区", "620421": "靖远县", "620422": "会宁县", "620423": "景泰县", "620424": "其它区", "620500": "天水市", "620502": "秦州区", "620503": "麦积区", "620521": "清水县", "620522": "秦安县", "620523": "甘谷县", "620524": "武山县", "620525": "张家川回族自治县", "620526": "其它区", "620600": "武威市", "620602": "凉州区", "620621": "民勤县", "620622": "古浪县", "620623": "天祝藏族自治县", "620624": "其它区", "620700": "张掖市", "620702": "甘州区", "620721": "肃南裕固族自治县", "620722": "民乐县", "620723": "临泽县", "620724": "高台县", "620725": "山丹县", "620726": "其它区", "620800": "平凉市", "620802": "崆峒区", "620821": "泾川县", "620822": "灵台县", "620823": "崇信县", "620824": "华亭县", "620825": "庄浪县", "620826": "静宁县", "620827": "其它区", "620900": "酒泉市", "620902": "肃州区", "620921": "金塔县", "620922": "瓜州县", "620923": "肃北蒙古族自治县", "620924": "阿克塞哈萨克族自治县", "620981": "玉门市", "620982": "敦煌市", "620983": "其它区", "621000": "庆阳市", "621002": "西峰区", "621021": "庆城县", "621022": "环县", "621023": "华池县", "621024": "合水县", "621025": "正宁县", "621026": "宁县", "621027": "镇原县", "621028": "其它区", "621100": "定西市", "621102": "安定区", "621121": "通渭县", "621122": "陇西县", "621123": "渭源县", "621124": "临洮县", "621125": "漳县", "621126": "岷县", "621127": "其它区", "621200": "陇南市", "621202": "武都区", "621221": "成县", "621222": "文县", "621223": "宕昌县", "621224": "康县", "621225": "西和县", "621226": "礼县", "621227": "徽县", "621228": "两当县", "621229": "其它区", "622900": "临夏回族自治州", "622901": "临夏市", "622921": "临夏县", "622922": "康乐县", "622923": "永靖县", "622924": "广河县", "622925": "和政县", "622926": "东乡族自治县", "622927": "积石山保安族东乡族撒拉族自治县", "622928": "其它区", "623000": "甘南藏族自治州", "623001": "合作市", "623021": "临潭县", "623022": "卓尼县", "623023": "舟曲县", "623024": "迭部县", "623025": "玛曲县", "623026": "碌曲县", "623027": "夏河县", "623028": "其它区", "630000": "青海省", "630100": "西宁市", "630102": "城东区", "630103": "城中区", "630104": "城西区", "630105": "城北区", "630121": "大通回族土族自治县", "630122": "湟中县", "630123": "湟源县", "630124": "其它区", "632100": "海东市", "632121": "平安县", "632122": "民和回族土族自治县", "632123": "乐都区", "632126": "互助土族自治县", "632127": "化隆回族自治县", "632128": "循化撒拉族自治县", "632129": "其它区", "632200": "海北藏族自治州", "632221": "门源回族自治县", "632222": "祁连县", "632223": "海晏县", "632224": "刚察县", "632225": "其它区", "632300": "黄南藏族自治州", "632321": "同仁县", "632322": "尖扎县", "632323": "泽库县", "632324": "河南蒙古族自治县", "632325": "其它区", "632500": "海南藏族自治州", "632521": "共和县", "632522": "同德县", "632523": "贵德县", "632524": "兴海县", "632525": "贵南县", "632526": "其它区", "632600": "果洛藏族自治州", "632621": "玛沁县", "632622": "班玛县", "632623": "甘德县", "632624": "达日县", "632625": "久治县", "632626": "玛多县", "632627": "其它区", "632700": "玉树藏族自治州", "632721": "玉树市", "632722": "杂多县", "632723": "称多县", "632724": "治多县", "632725": "囊谦县", "632726": "曲麻莱县", "632727": "其它区", "632800": "海西蒙古族藏族自治州", "632801": "格尔木市", "632802": "德令哈市", "632821": "乌兰县", "632822": "都兰县", "632823": "天峻县", "632824": "其它区", "640000": "宁夏回族自治区", "640100": "银川市", "640104": "兴庆区", "640105": "西夏区", "640106": "金凤区", "640121": "永宁县", "640122": "贺兰县", "640181": "灵武市", "640182": "其它区", "640200": "石嘴山市", "640202": "大武口区", "640205": "惠农区", "640221": "平罗县", "640222": "其它区", "640300": "吴忠市", "640302": "利通区", "640303": "红寺堡区", "640323": "盐池县", "640324": "同心县", "640381": "青铜峡市", "640382": "其它区", "640400": "固原市", "640402": "原州区", "640422": "西吉县", "640423": "隆德县", "640424": "泾源县", "640425": "彭阳县", "640426": "其它区", "640500": "中卫市", "640502": "沙坡头区", "640521": "中宁县", "640522": "海原县", "640523": "其它区", "650000": "新疆维吾尔自治区", "650100": "乌鲁木齐市", "650102": "天山区", "650103": "沙依巴克区", "650104": "新市区", "650105": "水磨沟区", "650106": "头屯河区", "650107": "达坂城区", "650109": "米东区", "650121": "乌鲁木齐县", "650122": "其它区", "650200": "克拉玛依市", "650202": "独山子区", "650203": "克拉玛依区", "650204": "白碱滩区", "650205": "乌尔禾区", "650206": "其它区", "652100": "吐鲁番地区", "652101": "吐鲁番市", "652122": "鄯善县", "652123": "托克逊县", "652124": "其它区", "652200": "哈密地区", "652201": "哈密市", "652222": "巴里坤哈萨克自治县", "652223": "伊吾县", "652224": "其它区", "652300": "昌吉回族自治州", "652301": "昌吉市", "652302": "阜康市", "652323": "呼图壁县", "652324": "玛纳斯县", "652325": "奇台县", "652327": "吉木萨尔县", "652328": "木垒哈萨克自治县", "652329": "其它区", "652700": "博尔塔拉蒙古自治州", "652701": "博乐市", "652702": "阿拉山口市", "652722": "精河县", "652723": "温泉县", "652724": "其它区", "652800": "巴音郭楞蒙古自治州", "652801": "库尔勒市", "652822": "轮台县", "652823": "尉犁县", "652824": "若羌县", "652825": "且末县", "652826": "焉耆回族自治县", "652827": "和静县", "652828": "和硕县", "652829": "博湖县", "652830": "其它区", "652900": "阿克苏地区", "652901": "阿克苏市", "652922": "温宿县", "652923": "库车县", "652924": "沙雅县", "652925": "新和县", "652926": "拜城县", "652927": "乌什县", "652928": "阿瓦提县", "652929": "柯坪县", "652930": "其它区", "653000": "克孜勒苏柯尔克孜自治州", "653001": "阿图什市", "653022": "阿克陶县", "653023": "阿合奇县", "653024": "乌恰县", "653025": "其它区", "653100": "喀什地区", "653101": "喀什市", "653121": "疏附县", "653122": "疏勒县", "653123": "英吉沙县", "653124": "泽普县", "653125": "莎车县", "653126": "叶城县", "653127": "麦盖提县", "653128": "岳普湖县", "653129": "伽师县", "653130": "巴楚县", "653131": "塔什库尔干塔吉克自治县", "653132": "其它区", "653200": "和田地区", "653201": "和田市", "653221": "和田县", "653222": "墨玉县", "653223": "皮山县", "653224": "洛浦县", "653225": "策勒县", "653226": "于田县", "653227": "民丰县", "653228": "其它区", "654000": "伊犁哈萨克自治州", "654002": "伊宁市", "654003": "奎屯市", "654021": "伊宁县", "654022": "察布查尔锡伯自治县", "654023": "霍城县", "654024": "巩留县", "654025": "新源县", "654026": "昭苏县", "654027": "特克斯县", "654028": "尼勒克县", "654029": "其它区", "654200": "塔城地区", "654201": "塔城市", "654202": "乌苏市", "654221": "额敏县", "654223": "沙湾县", "654224": "托里县", "654225": "裕民县", "654226": "和布克赛尔蒙古自治县", "654227": "其它区", "654300": "阿勒泰地区", "654301": "阿勒泰市", "654321": "布尔津县", "654322": "富蕴县", "654323": "福海县", "654324": "哈巴河县", "654325": "青河县", "654326": "吉木乃县", "654327": "其它区", "659001": "石河子市", "659002": "阿拉尔市", "659003": "图木舒克市", "659004": "五家渠市", "710000": "台湾", "710100": "台北市", "710101": "中正区", "710102": "大同区", "710103": "中山区", "710104": "松山区", "710105": "大安区", "710106": "万华区", "710107": "信义区", "710108": "士林区", "710109": "北投区", "710110": "内湖区", "710111": "南港区", "710112": "文山区", "710113": "其它区", "710200": "高雄市", "710201": "新兴区", "710202": "前金区", "710203": "芩雅区", "710204": "盐埕区", "710205": "鼓山区", "710206": "旗津区", "710207": "前镇区", "710208": "三民区", "710209": "左营区", "710210": "楠梓区", "710211": "小港区", "710212": "其它区", "710241": "苓雅区", "710242": "仁武区", "710243": "大社区", "710244": "冈山区", "710245": "路竹区", "710246": "阿莲区", "710247": "田寮区", "710248": "燕巢区", "710249": "桥头区", "710250": "梓官区", "710251": "弥陀区", "710252": "永安区", "710253": "湖内区", "710254": "凤山区", "710255": "大寮区", "710256": "林园区", "710257": "鸟松区", "710258": "大树区", "710259": "旗山区", "710260": "美浓区", "710261": "六龟区", "710262": "内门区", "710263": "杉林区", "710264": "甲仙区", "710265": "桃源区", "710266": "那玛夏区", "710267": "茂林区", "710268": "茄萣区", "710300": "台南市", "710301": "中西区", "710302": "东区", "710303": "南区", "710304": "北区", "710305": "安平区", "710306": "安南区", "710307": "其它区", "710339": "永康区", "710340": "归仁区", "710341": "新化区", "710342": "左镇区", "710343": "玉井区", "710344": "楠西区", "710345": "南化区", "710346": "仁德区", "710347": "关庙区", "710348": "龙崎区", "710349": "官田区", "710350": "麻豆区", "710351": "佳里区", "710352": "西港区", "710353": "七股区", "710354": "将军区", "710355": "学甲区", "710356": "北门区", "710357": "新营区", "710358": "后壁区", "710359": "白河区", "710360": "东山区", "710361": "六甲区", "710362": "下营区", "710363": "柳营区", "710364": "盐水区", "710365": "善化区", "710366": "大内区", "710367": "山上区", "710368": "新市区", "710369": "安定区", "710400": "台中市", "710401": "中区", "710402": "东区", "710403": "南区", "710404": "西区", "710405": "北区", "710406": "北屯区", "710407": "西屯区", "710408": "南屯区", "710409": "其它区", "710431": "太平区", "710432": "大里区", "710433": "雾峰区", "710434": "乌日区", "710435": "丰原区", "710436": "后里区", "710437": "石冈区", "710438": "东势区", "710439": "和平区", "710440": "新社区", "710441": "潭子区", "710442": "大雅区", "710443": "神冈区", "710444": "大肚区", "710445": "沙鹿区", "710446": "龙井区", "710447": "梧栖区", "710448": "清水区", "710449": "大甲区", "710450": "外埔区", "710451": "大安区", "710500": "金门县", "710507": "金沙镇", "710508": "金湖镇", "710509": "金宁乡", "710510": "金城镇", "710511": "烈屿乡", "710512": "乌坵乡", "710600": "南投县", "710614": "南投市", "710615": "中寮乡", "710616": "草屯镇", "710617": "国姓乡", "710618": "埔里镇", "710619": "仁爱乡", "710620": "名间乡", "710621": "集集镇", "710622": "水里乡", "710623": "鱼池乡", "710624": "信义乡", "710625": "竹山镇", "710626": "鹿谷乡", "710700": "基隆市", "710701": "仁爱区", "710702": "信义区", "710703": "中正区", "710704": "中山区", "710705": "安乐区", "710706": "暖暖区", "710707": "七堵区", "710708": "其它区", "710800": "新竹市", "710801": "东区", "710802": "北区", "710803": "香山区", "710804": "其它区", "710900": "嘉义市", "710901": "东区", "710902": "西区", "710903": "其它区", "711100": "新北市", "711130": "万里区", "711131": "金山区", "711132": "板桥区", "711133": "汐止区", "711134": "深坑区", "711135": "石碇区", "711136": "瑞芳区", "711137": "平溪区", "711138": "双溪区", "711139": "贡寮区", "711140": "新店区", "711141": "坪林区", "711142": "乌来区", "711143": "永和区", "711144": "中和区", "711145": "土城区", "711146": "三峡区", "711147": "树林区", "711148": "莺歌区", "711149": "三重区", "711150": "新庄区", "711151": "泰山区", "711152": "林口区", "711153": "芦洲区", "711154": "五股区", "711155": "八里区", "711156": "淡水区", "711157": "三芝区", "711158": "石门区", "711200": "宜兰县", "711214": "宜兰市", "711215": "头城镇", "711216": "礁溪乡", "711217": "壮围乡", "711218": "员山乡", "711219": "罗东镇", "711220": "三星乡", "711221": "大同乡", "711222": "五结乡", "711223": "冬山乡", "711224": "苏澳镇", "711225": "南澳乡", "711226": "钓鱼台", "711300": "新竹县", "711314": "竹北市", "711315": "湖口乡", "711316": "新丰乡", "711317": "新埔镇", "711318": "关西镇", "711319": "芎林乡", "711320": "宝山乡", "711321": "竹东镇", "711322": "五峰乡", "711323": "横山乡", "711324": "尖石乡", "711325": "北埔乡", "711326": "峨眉乡", "711400": "桃园县", "711414": "中坜市", "711415": "平镇市", "711416": "龙潭乡", "711417": "杨梅市", "711418": "新屋乡", "711419": "观音乡", "711420": "桃园市", "711421": "龟山乡", "711422": "八德市", "711423": "大溪镇", "711424": "复兴乡", "711425": "大园乡", "711426": "芦竹乡", "711500": "苗栗县", "711519": "竹南镇", "711520": "头份镇", "711521": "三湾乡", "711522": "南庄乡", "711523": "狮潭乡", "711524": "后龙镇", "711525": "通霄镇", "711526": "苑里镇", "711527": "苗栗市", "711528": "造桥乡", "711529": "头屋乡", "711530": "公馆乡", "711531": "大湖乡", "711532": "泰安乡", "711533": "铜锣乡", "711534": "三义乡", "711535": "西湖乡", "711536": "卓兰镇", "711700": "彰化县", "711727": "彰化市", "711728": "芬园乡", "711729": "花坛乡", "711730": "秀水乡", "711731": "鹿港镇", "711732": "福兴乡", "711733": "线西乡", "711734": "和美镇", "711735": "伸港乡", "711736": "员林镇", "711737": "社头乡", "711738": "永靖乡", "711739": "埔心乡", "711740": "溪湖镇", "711741": "大村乡", "711742": "埔盐乡", "711743": "田中镇", "711744": "北斗镇", "711745": "田尾乡", "711746": "埤头乡", "711747": "溪州乡", "711748": "竹塘乡", "711749": "二林镇", "711750": "大城乡", "711751": "芳苑乡", "711752": "二水乡", "711900": "嘉义县", "711919": "番路乡", "711920": "梅山乡", "711921": "竹崎乡", "711922": "阿里山乡", "711923": "中埔乡", "711924": "大埔乡", "711925": "水上乡", "711926": "鹿草乡", "711927": "太保市", "711928": "朴子市", "711929": "东石乡", "711930": "六脚乡", "711931": "新港乡", "711932": "民雄乡", "711933": "大林镇", "711934": "溪口乡", "711935": "义竹乡", "711936": "布袋镇", "712100": "云林县", "712121": "斗南镇", "712122": "大埤乡", "712123": "虎尾镇", "712124": "土库镇", "712125": "褒忠乡", "712126": "东势乡", "712127": "台西乡", "712128": "仑背乡", "712129": "麦寮乡", "712130": "斗六市", "712131": "林内乡", "712132": "古坑乡", "712133": "莿桐乡", "712134": "西螺镇", "712135": "二仑乡", "712136": "北港镇", "712137": "水林乡", "712138": "口湖乡", "712139": "四湖乡", "712140": "元长乡", "712400": "屏东县", "712434": "屏东市", "712435": "三地门乡", "712436": "雾台乡", "712437": "玛家乡", "712438": "九如乡", "712439": "里港乡", "712440": "高树乡", "712441": "盐埔乡", "712442": "长治乡", "712443": "麟洛乡", "712444": "竹田乡", "712445": "内埔乡", "712446": "万丹乡", "712447": "潮州镇", "712448": "泰武乡", "712449": "来义乡", "712450": "万峦乡", "712451": "崁顶乡", "712452": "新埤乡", "712453": "南州乡", "712454": "林边乡", "712455": "东港镇", "712456": "琉球乡", "712457": "佳冬乡", "712458": "新园乡", "712459": "枋寮乡", "712460": "枋山乡", "712461": "春日乡", "712462": "狮子乡", "712463": "车城乡", "712464": "牡丹乡", "712465": "恒春镇", "712466": "满州乡", "712500": "台东县", "712517": "台东市", "712518": "绿岛乡", "712519": "兰屿乡", "712520": "延平乡", "712521": "卑南乡", "712522": "鹿野乡", "712523": "关山镇", "712524": "海端乡", "712525": "池上乡", "712526": "东河乡", "712527": "成功镇", "712528": "长滨乡", "712529": "金峰乡", "712530": "大武乡", "712531": "达仁乡", "712532": "太麻里乡", "712600": "花莲县", "712615": "花莲市", "712616": "新城乡", "712617": "太鲁阁", "712618": "秀林乡", "712619": "吉安乡", "712620": "寿丰乡", "712621": "凤林镇", "712622": "光复乡", "712623": "丰滨乡", "712624": "瑞穗乡", "712625": "万荣乡", "712626": "玉里镇", "712627": "卓溪乡", "712628": "富里乡", "712700": "澎湖县", "712707": "马公市", "712708": "西屿乡", "712709": "望安乡", "712710": "七美乡", "712711": "白沙乡", "712712": "湖西乡", "712800": "连江县", "712805": "南竿乡", "712806": "北竿乡", "712807": "莒光乡", "712808": "东引乡", "810000": "香港特别行政区", "810100": "香港岛", "810101": "中西区", "810102": "湾仔", "810103": "东区", "810104": "南区", "810200": "九龙", "810201": "九龙城区", "810202": "油尖旺区", "810203": "深水埗区", "810204": "黄大仙区", "810205": "观塘区", "810300": "新界", "810301": "北区", "810302": "大埔区", "810303": "沙田区", "810304": "西贡区", "810305": "元朗区", "810306": "屯门区", "810307": "荃湾区", "810308": "葵青区", "810309": "离岛区", "820000": "澳门特别行政区", "820100": "澳门半岛", "820200": "离岛", "990000": "海外", "990100": "海外" } // id pid/parentId name children function tree(list) { var mapped = {} for (var i = 0, item; i < list.length; i++) { item = list[i] if (!item || !item.id) continue mapped[item.id] = item } var result = [] for (var ii = 0; ii < list.length; ii++) { item = list[ii] if (!item) continue /* jshint -W041 */ if (item.pid == undefined && item.parentId == undefined) { result.push(item) continue } var parent = mapped[item.pid] || mapped[item.parentId] if (!parent) continue if (!parent.children) parent.children = [] parent.children.push(item) } return result } var DICT_FIXED = function() { var fixed = [] for (var id in DICT) { var pid = id.slice(2, 6) === '0000' ? undefined : id.slice(4, 6) == '00' ? (id.slice(0, 2) + '0000') : id.slice(0, 4) + '00' fixed.push({ id: id, pid: pid, name: DICT[id] }) } return tree(fixed) }() module.exports = DICT_FIXED /***/ }, /* 19 */ /***/ function(module, exports, __webpack_require__) { /* ## Miscellaneous */ var DICT = __webpack_require__(18) module.exports = { // Dice d4: function() { return this.natural(1, 4) }, d6: function() { return this.natural(1, 6) }, d8: function() { return this.natural(1, 8) }, d12: function() { return this.natural(1, 12) }, d20: function() { return this.natural(1, 20) }, d100: function() { return this.natural(1, 100) }, /* 随机生成一个 GUID。 http://www.broofa.com/2008/09/javascript-uuid-function/ [UUID 规范](http://www.ietf.org/rfc/rfc4122.txt) UUIDs (Universally Unique IDentifier) GUIDs (Globally Unique IDentifier) The formal definition of the UUID string representation is provided by the following ABNF [7]: UUID = time-low "-" time-mid "-" time-high-and-version "-" clock-seq-and-reserved clock-seq-low "-" node time-low = 4hexOctet time-mid = 2hexOctet time-high-and-version = 2hexOctet clock-seq-and-reserved = hexOctet clock-seq-low = hexOctet node = 6hexOctet hexOctet = hexDigit hexDigit hexDigit = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / "a" / "b" / "c" / "d" / "e" / "f" / "A" / "B" / "C" / "D" / "E" / "F" https://github.com/victorquinn/chancejs/blob/develop/chance.js#L1349 */ guid: function() { var pool = "abcdefABCDEF1234567890", guid = this.string(pool, 8) + '-' + this.string(pool, 4) + '-' + this.string(pool, 4) + '-' + this.string(pool, 4) + '-' + this.string(pool, 12); return guid }, uuid: function() { return this.guid() }, /* 随机生成一个 18 位身份证。 [身份证](http://baike.baidu.com/view/1697.htm#4) 地址码 6 + 出生日期码 8 + 顺序码 3 + 校验码 1 [《中华人民共和国行政区划代码》国家标准(GB/T2260)](http://zhidao.baidu.com/question/1954561.html) */ id: function() { var id, sum = 0, rank = [ "7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2" ], last = [ "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2" ] id = this.pick(DICT).id + this.date('yyyyMMdd') + this.string('number', 3) for (var i = 0; i < id.length; i++) { sum += id[i] * rank[i]; } id += last[sum % 11]; return id }, /* 生成一个全局的自增整数。 类似自增主键(auto increment primary key)。 */ increment: function() { var key = 0 return function(step) { return key += (+step || 1) // step? } }(), inc: function(step) { return this.increment(step) } } /***/ }, /* 20 */ /***/ function(module, exports, __webpack_require__) { var Parser = __webpack_require__(21) var Handler = __webpack_require__(22) module.exports = { Parser: Parser, Handler: Handler } /***/ }, /* 21 */ /***/ function(module, exports) { // https://github.com/nuysoft/regexp // forked from https://github.com/ForbesLindesay/regexp function parse(n) { if ("string" != typeof n) { var l = new TypeError("The regexp to parse must be represented as a string."); throw l; } return index = 1, cgs = {}, parser.parse(n); } function Token(n) { this.type = n, this.offset = Token.offset(), this.text = Token.text(); } function Alternate(n, l) { Token.call(this, "alternate"), this.left = n, this.right = l; } function Match(n) { Token.call(this, "match"), this.body = n.filter(Boolean); } function Group(n, l) { Token.call(this, n), this.body = l; } function CaptureGroup(n) { Group.call(this, "capture-group"), this.index = cgs[this.offset] || (cgs[this.offset] = index++), this.body = n; } function Quantified(n, l) { Token.call(this, "quantified"), this.body = n, this.quantifier = l; } function Quantifier(n, l) { Token.call(this, "quantifier"), this.min = n, this.max = l, this.greedy = !0; } function CharSet(n, l) { Token.call(this, "charset"), this.invert = n, this.body = l; } function CharacterRange(n, l) { Token.call(this, "range"), this.start = n, this.end = l; } function Literal(n) { Token.call(this, "literal"), this.body = n, this.escaped = this.body != this.text; } function Unicode(n) { Token.call(this, "unicode"), this.code = n.toUpperCase(); } function Hex(n) { Token.call(this, "hex"), this.code = n.toUpperCase(); } function Octal(n) { Token.call(this, "octal"), this.code = n.toUpperCase(); } function BackReference(n) { Token.call(this, "back-reference"), this.code = n.toUpperCase(); } function ControlCharacter(n) { Token.call(this, "control-character"), this.code = n.toUpperCase(); } var parser = function() { function n(n, l) { function u() { this.constructor = n; } u.prototype = l.prototype, n.prototype = new u(); } function l(n, l, u, t, r) { function e(n, l) { function u(n) { function l(n) { return n.charCodeAt(0).toString(16).toUpperCase(); } return n.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\x08/g, "\\b").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\f/g, "\\f").replace(/\r/g, "\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(n) { return "\\x0" + l(n); }).replace(/[\x10-\x1F\x80-\xFF]/g, function(n) { return "\\x" + l(n); }).replace(/[\u0180-\u0FFF]/g, function(n) { return "\\u0" + l(n); }).replace(/[\u1080-\uFFFF]/g, function(n) { return "\\u" + l(n); }); } var t, r; switch (n.length) { case 0: t = "end of input"; break; case 1: t = n[0]; break; default: t = n.slice(0, -1).join(", ") + " or " + n[n.length - 1]; } return r = l ? '"' + u(l) + '"' : "end of input", "Expected " + t + " but " + r + " found."; } this.expected = n, this.found = l, this.offset = u, this.line = t, this.column = r, this.name = "SyntaxError", this.message = e(n, l); } function u(n) { function u() { return n.substring(Lt, qt); } function t() { return Lt; } function r(l) { function u(l, u, t) { var r, e; for (r = u; t > r; r++) e = n.charAt(r), "\n" === e ? (l.seenCR || l.line++, l.column = 1, l.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (l.line++, l.column = 1, l.seenCR = !0) : (l.column++, l.seenCR = !1); } return Mt !== l && (Mt > l && (Mt = 0, Dt = { line: 1, column: 1, seenCR: !1 }), u(Dt, Mt, l), Mt = l), Dt; } function e(n) { Ht > qt || (qt > Ht && (Ht = qt, Ot = []), Ot.push(n)); } function o(n) { var l = 0; for (n.sort(); l < n.length; ) n[l - 1] === n[l] ? n.splice(l, 1) : l++; } function c() { var l, u, t, r, o; return l = qt, u = i(), null !== u ? (t = qt, 124 === n.charCodeAt(qt) ? (r = fl, qt++) : (r = null, 0 === Wt && e(sl)), null !== r ? (o = c(), null !== o ? (r = [ r, o ], t = r) : (qt = t, t = il)) : (qt = t, t = il), null === t && (t = al), null !== t ? (Lt = l, u = hl(u, t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il), l; } function i() { var n, l, u, t, r; if (n = qt, l = f(), null === l && (l = al), null !== l) if (u = qt, Wt++, t = d(), Wt--, null === t ? u = al : (qt = u, u = il), null !== u) { for (t = [], r = h(), null === r && (r = a()); null !== r; ) t.push(r), r = h(), null === r && (r = a()); null !== t ? (r = s(), null === r && (r = al), null !== r ? (Lt = n, l = dl(l, t, r), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il); } else qt = n, n = il; else qt = n, n = il; return n; } function a() { var n; return n = x(), null === n && (n = Q(), null === n && (n = B())), n; } function f() { var l, u; return l = qt, 94 === n.charCodeAt(qt) ? (u = pl, qt++) : (u = null, 0 === Wt && e(vl)), null !== u && (Lt = l, u = wl()), null === u ? (qt = l, l = u) : l = u, l; } function s() { var l, u; return l = qt, 36 === n.charCodeAt(qt) ? (u = Al, qt++) : (u = null, 0 === Wt && e(Cl)), null !== u && (Lt = l, u = gl()), null === u ? (qt = l, l = u) : l = u, l; } function h() { var n, l, u; return n = qt, l = a(), null !== l ? (u = d(), null !== u ? (Lt = n, l = bl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il), n; } function d() { var n, l, u; return Wt++, n = qt, l = p(), null !== l ? (u = k(), null === u && (u = al), null !== u ? (Lt = n, l = Tl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il), Wt--, null === n && (l = null, 0 === Wt && e(kl)), n; } function p() { var n; return n = v(), null === n && (n = w(), null === n && (n = A(), null === n && (n = C(), null === n && (n = g(), null === n && (n = b()))))), n; } function v() { var l, u, t, r, o, c; return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), null !== u ? (t = T(), null !== t ? (44 === n.charCodeAt(qt) ? (r = ml, qt++) : (r = null, 0 === Wt && e(Rl)), null !== r ? (o = T(), null !== o ? (125 === n.charCodeAt(qt) ? (c = Fl, qt++) : (c = null, 0 === Wt && e(Ql)), null !== c ? (Lt = l, u = Sl(t, o), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; } function w() { var l, u, t, r; return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), null !== u ? (t = T(), null !== t ? (n.substr(qt, 2) === Ul ? (r = Ul, qt += 2) : (r = null, 0 === Wt && e(El)), null !== r ? (Lt = l, u = Gl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; } function A() { var l, u, t, r; return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), null !== u ? (t = T(), null !== t ? (125 === n.charCodeAt(qt) ? (r = Fl, qt++) : (r = null, 0 === Wt && e(Ql)), null !== r ? (Lt = l, u = Bl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; } function C() { var l, u; return l = qt, 43 === n.charCodeAt(qt) ? (u = jl, qt++) : (u = null, 0 === Wt && e($l)), null !== u && (Lt = l, u = ql()), null === u ? (qt = l, l = u) : l = u, l; } function g() { var l, u; return l = qt, 42 === n.charCodeAt(qt) ? (u = Ll, qt++) : (u = null, 0 === Wt && e(Ml)), null !== u && (Lt = l, u = Dl()), null === u ? (qt = l, l = u) : l = u, l; } function b() { var l, u; return l = qt, 63 === n.charCodeAt(qt) ? (u = Hl, qt++) : (u = null, 0 === Wt && e(Ol)), null !== u && (Lt = l, u = Wl()), null === u ? (qt = l, l = u) : l = u, l; } function k() { var l; return 63 === n.charCodeAt(qt) ? (l = Hl, qt++) : (l = null, 0 === Wt && e(Ol)), l; } function T() { var l, u, t; if (l = qt, u = [], zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(Il)), null !== t) for (;null !== t; ) u.push(t), zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(Il)); else u = il; return null !== u && (Lt = l, u = Jl(u)), null === u ? (qt = l, l = u) : l = u, l; } function x() { var l, u, t, r; return l = qt, 40 === n.charCodeAt(qt) ? (u = Kl, qt++) : (u = null, 0 === Wt && e(Nl)), null !== u ? (t = R(), null === t && (t = F(), null === t && (t = m(), null === t && (t = y()))), null !== t ? (41 === n.charCodeAt(qt) ? (r = Pl, qt++) : (r = null, 0 === Wt && e(Vl)), null !== r ? (Lt = l, u = Xl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; } function y() { var n, l; return n = qt, l = c(), null !== l && (Lt = n, l = Yl(l)), null === l ? (qt = n, n = l) : n = l, n; } function m() { var l, u, t; return l = qt, n.substr(qt, 2) === Zl ? (u = Zl, qt += 2) : (u = null, 0 === Wt && e(_l)), null !== u ? (t = c(), null !== t ? (Lt = l, u = nu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il), l; } function R() { var l, u, t; return l = qt, n.substr(qt, 2) === lu ? (u = lu, qt += 2) : (u = null, 0 === Wt && e(uu)), null !== u ? (t = c(), null !== t ? (Lt = l, u = tu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il), l; } function F() { var l, u, t; return l = qt, n.substr(qt, 2) === ru ? (u = ru, qt += 2) : (u = null, 0 === Wt && e(eu)), null !== u ? (t = c(), null !== t ? (Lt = l, u = ou(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il), l; } function Q() { var l, u, t, r, o; if (Wt++, l = qt, 91 === n.charCodeAt(qt) ? (u = iu, qt++) : (u = null, 0 === Wt && e(au)), null !== u) if (94 === n.charCodeAt(qt) ? (t = pl, qt++) : (t = null, 0 === Wt && e(vl)), null === t && (t = al), null !== t) { for (r = [], o = S(), null === o && (o = U()); null !== o; ) r.push(o), o = S(), null === o && (o = U()); null !== r ? (93 === n.charCodeAt(qt) ? (o = fu, qt++) : (o = null, 0 === Wt && e(su)), null !== o ? (Lt = l, u = hu(t, r), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il); } else qt = l, l = il; else qt = l, l = il; return Wt--, null === l && (u = null, 0 === Wt && e(cu)), l; } function S() { var l, u, t, r; return Wt++, l = qt, u = U(), null !== u ? (45 === n.charCodeAt(qt) ? (t = pu, qt++) : (t = null, 0 === Wt && e(vu)), null !== t ? (r = U(), null !== r ? (Lt = l, u = wu(u, r), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), Wt--, null === l && (u = null, 0 === Wt && e(du)), l; } function U() { var n, l; return Wt++, n = G(), null === n && (n = E()), Wt--, null === n && (l = null, 0 === Wt && e(Au)), n; } function E() { var l, u; return l = qt, Cu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(gu)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, l; } function G() { var n; return n = L(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), null === n && (n = X(), null === n && (n = _(), null === n && (n = nl(), null === n && (n = ll(), null === n && (n = ul(), null === n && (n = tl()))))))))))))))))), n; } function B() { var n; return n = j(), null === n && (n = q(), null === n && (n = $())), n; } function j() { var l, u; return l = qt, 46 === n.charCodeAt(qt) ? (u = ku, qt++) : (u = null, 0 === Wt && e(Tu)), null !== u && (Lt = l, u = xu()), null === u ? (qt = l, l = u) : l = u, l; } function $() { var l, u; return Wt++, l = qt, mu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(Ru)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, Wt--, null === l && (u = null, 0 === Wt && e(yu)), l; } function q() { var n; return n = M(), null === n && (n = D(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), null === n && (n = X(), null === n && (n = Z(), null === n && (n = _(), null === n && (n = nl(), null === n && (n = ll(), null === n && (n = ul(), null === n && (n = tl()))))))))))))))))))), n; } function L() { var l, u; return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), null !== u && (Lt = l, u = Su()), null === u ? (qt = l, l = u) : l = u, l; } function M() { var l, u; return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), null !== u && (Lt = l, u = Uu()), null === u ? (qt = l, l = u) : l = u, l; } function D() { var l, u; return l = qt, n.substr(qt, 2) === Eu ? (u = Eu, qt += 2) : (u = null, 0 === Wt && e(Gu)), null !== u && (Lt = l, u = Bu()), null === u ? (qt = l, l = u) : l = u, l; } function H() { var l, u; return l = qt, n.substr(qt, 2) === ju ? (u = ju, qt += 2) : (u = null, 0 === Wt && e($u)), null !== u && (Lt = l, u = qu()), null === u ? (qt = l, l = u) : l = u, l; } function O() { var l, u; return l = qt, n.substr(qt, 2) === Lu ? (u = Lu, qt += 2) : (u = null, 0 === Wt && e(Mu)), null !== u && (Lt = l, u = Du()), null === u ? (qt = l, l = u) : l = u, l; } function W() { var l, u; return l = qt, n.substr(qt, 2) === Hu ? (u = Hu, qt += 2) : (u = null, 0 === Wt && e(Ou)), null !== u && (Lt = l, u = Wu()), null === u ? (qt = l, l = u) : l = u, l; } function z() { var l, u; return l = qt, n.substr(qt, 2) === zu ? (u = zu, qt += 2) : (u = null, 0 === Wt && e(Iu)), null !== u && (Lt = l, u = Ju()), null === u ? (qt = l, l = u) : l = u, l; } function I() { var l, u; return l = qt, n.substr(qt, 2) === Ku ? (u = Ku, qt += 2) : (u = null, 0 === Wt && e(Nu)), null !== u && (Lt = l, u = Pu()), null === u ? (qt = l, l = u) : l = u, l; } function J() { var l, u; return l = qt, n.substr(qt, 2) === Vu ? (u = Vu, qt += 2) : (u = null, 0 === Wt && e(Xu)), null !== u && (Lt = l, u = Yu()), null === u ? (qt = l, l = u) : l = u, l; } function K() { var l, u; return l = qt, n.substr(qt, 2) === Zu ? (u = Zu, qt += 2) : (u = null, 0 === Wt && e(_u)), null !== u && (Lt = l, u = nt()), null === u ? (qt = l, l = u) : l = u, l; } function N() { var l, u; return l = qt, n.substr(qt, 2) === lt ? (u = lt, qt += 2) : (u = null, 0 === Wt && e(ut)), null !== u && (Lt = l, u = tt()), null === u ? (qt = l, l = u) : l = u, l; } function P() { var l, u; return l = qt, n.substr(qt, 2) === rt ? (u = rt, qt += 2) : (u = null, 0 === Wt && e(et)), null !== u && (Lt = l, u = ot()), null === u ? (qt = l, l = u) : l = u, l; } function V() { var l, u; return l = qt, n.substr(qt, 2) === ct ? (u = ct, qt += 2) : (u = null, 0 === Wt && e(it)), null !== u && (Lt = l, u = at()), null === u ? (qt = l, l = u) : l = u, l; } function X() { var l, u; return l = qt, n.substr(qt, 2) === ft ? (u = ft, qt += 2) : (u = null, 0 === Wt && e(st)), null !== u && (Lt = l, u = ht()), null === u ? (qt = l, l = u) : l = u, l; } function Y() { var l, u, t; return l = qt, n.substr(qt, 2) === dt ? (u = dt, qt += 2) : (u = null, 0 === Wt && e(pt)), null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), null !== t ? (Lt = l, u = wt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il), l; } function Z() { var l, u, t; return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), null !== u ? (gt.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(bt)), null !== t ? (Lt = l, u = kt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il), l; } function _() { var l, u, t, r; if (l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), null !== u) { if (t = [], yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)), null !== r) for (;null !== r; ) t.push(r), yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)); else t = il; null !== t ? (Lt = l, u = Rt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il); } else qt = l, l = il; return l; } function nl() { var l, u, t, r; if (l = qt, n.substr(qt, 2) === Ft ? (u = Ft, qt += 2) : (u = null, 0 === Wt && e(Qt)), null !== u) { if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)); else t = il; null !== t ? (Lt = l, u = Et(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il); } else qt = l, l = il; return l; } function ll() { var l, u, t, r; if (l = qt, n.substr(qt, 2) === Gt ? (u = Gt, qt += 2) : (u = null, 0 === Wt && e(Bt)), null !== u) { if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)); else t = il; null !== t ? (Lt = l, u = jt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il); } else qt = l, l = il; return l; } function ul() { var l, u; return l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), null !== u && (Lt = l, u = $t()), null === u ? (qt = l, l = u) : l = u, l; } function tl() { var l, u, t; return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), null !== t ? (Lt = l, u = bu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il), l; } var rl, el = arguments.length > 1 ? arguments[1] : {}, ol = { regexp: c }, cl = c, il = null, al = "", fl = "|", sl = '"|"', hl = function(n, l) { return l ? new Alternate(n, l[1]) : n; }, dl = function(n, l, u) { return new Match([ n ].concat(l).concat([ u ])); }, pl = "^", vl = '"^"', wl = function() { return new Token("start"); }, Al = "$", Cl = '"$"', gl = function() { return new Token("end"); }, bl = function(n, l) { return new Quantified(n, l); }, kl = "Quantifier", Tl = function(n, l) { return l && (n.greedy = !1), n; }, xl = "{", yl = '"{"', ml = ",", Rl = '","', Fl = "}", Ql = '"}"', Sl = function(n, l) { return new Quantifier(n, l); }, Ul = ",}", El = '",}"', Gl = function(n) { return new Quantifier(n, 1/0); }, Bl = function(n) { return new Quantifier(n, n); }, jl = "+", $l = '"+"', ql = function() { return new Quantifier(1, 1/0); }, Ll = "*", Ml = '"*"', Dl = function() { return new Quantifier(0, 1/0); }, Hl = "?", Ol = '"?"', Wl = function() { return new Quantifier(0, 1); }, zl = /^[0-9]/, Il = "[0-9]", Jl = function(n) { return +n.join(""); }, Kl = "(", Nl = '"("', Pl = ")", Vl = '")"', Xl = function(n) { return n; }, Yl = function(n) { return new CaptureGroup(n); }, Zl = "?:", _l = '"?:"', nu = function(n) { return new Group("non-capture-group", n); }, lu = "?=", uu = '"?="', tu = function(n) { return new Group("positive-lookahead", n); }, ru = "?!", eu = '"?!"', ou = function(n) { return new Group("negative-lookahead", n); }, cu = "CharacterSet", iu = "[", au = '"["', fu = "]", su = '"]"', hu = function(n, l) { return new CharSet(!!n, l); }, du = "CharacterRange", pu = "-", vu = '"-"', wu = function(n, l) { return new CharacterRange(n, l); }, Au = "Character", Cu = /^[^\\\]]/, gu = "[^\\\\\\]]", bu = function(n) { return new Literal(n); }, ku = ".", Tu = '"."', xu = function() { return new Token("any-character"); }, yu = "Literal", mu = /^[^|\\\/.[()?+*$\^]/, Ru = "[^|\\\\\\/.[()?+*$\\^]", Fu = "\\b", Qu = '"\\\\b"', Su = function() { return new Token("backspace"); }, Uu = function() { return new Token("word-boundary"); }, Eu = "\\B", Gu = '"\\\\B"', Bu = function() { return new Token("non-word-boundary"); }, ju = "\\d", $u = '"\\\\d"', qu = function() { return new Token("digit"); }, Lu = "\\D", Mu = '"\\\\D"', Du = function() { return new Token("non-digit"); }, Hu = "\\f", Ou = '"\\\\f"', Wu = function() { return new Token("form-feed"); }, zu = "\\n", Iu = '"\\\\n"', Ju = function() { return new Token("line-feed"); }, Ku = "\\r", Nu = '"\\\\r"', Pu = function() { return new Token("carriage-return"); }, Vu = "\\s", Xu = '"\\\\s"', Yu = function() { return new Token("white-space"); }, Zu = "\\S", _u = '"\\\\S"', nt = function() { return new Token("non-white-space"); }, lt = "\\t", ut = '"\\\\t"', tt = function() { return new Token("tab"); }, rt = "\\v", et = '"\\\\v"', ot = function() { return new Token("vertical-tab"); }, ct = "\\w", it = '"\\\\w"', at = function() { return new Token("word"); }, ft = "\\W", st = '"\\\\W"', ht = function() { return new Token("non-word"); }, dt = "\\c", pt = '"\\\\c"', vt = "any character", wt = function(n) { return new ControlCharacter(n); }, At = "\\", Ct = '"\\\\"', gt = /^[1-9]/, bt = "[1-9]", kt = function(n) { return new BackReference(n); }, Tt = "\\0", xt = '"\\\\0"', yt = /^[0-7]/, mt = "[0-7]", Rt = function(n) { return new Octal(n.join("")); }, Ft = "\\x", Qt = '"\\\\x"', St = /^[0-9a-fA-F]/, Ut = "[0-9a-fA-F]", Et = function(n) { return new Hex(n.join("")); }, Gt = "\\u", Bt = '"\\\\u"', jt = function(n) { return new Unicode(n.join("")); }, $t = function() { return new Token("null-character"); }, qt = 0, Lt = 0, Mt = 0, Dt = { line: 1, column: 1, seenCR: !1 }, Ht = 0, Ot = [], Wt = 0; if ("startRule" in el) { if (!(el.startRule in ol)) throw new Error("Can't start parsing from rule \"" + el.startRule + '".'); cl = ol[el.startRule]; } if (Token.offset = t, Token.text = u, rl = cl(), null !== rl && qt === n.length) return rl; throw o(Ot), Lt = Math.max(qt, Ht), new l(Ot, Lt < n.length ? n.charAt(Lt) : null, Lt, r(Lt).line, r(Lt).column); } return n(l, Error), { SyntaxError: l, parse: u }; }(), index = 1, cgs = {}; module.exports = parser /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { /* ## RegExp Handler https://github.com/ForbesLindesay/regexp https://github.com/dmajda/pegjs http://www.regexper.com/ 每个节点的结构 { type: '', offset: number, text: '', body: {}, escaped: true/false } type 可选值 alternate | 选择 match 匹配 capture-group () 捕获组 non-capture-group (?:...) 非捕获组 positive-lookahead (?=p) 零宽正向先行断言 negative-lookahead (?!p) 零宽负向先行断言 quantified a* 重复节点 quantifier * 量词 charset [] 字符集 range {m, n} 范围 literal a 直接量字符 unicode \uxxxx Unicode hex \x 十六进制 octal 八进制 back-reference \n 反向引用 control-character \cX 控制字符 // Token start ^ 开头 end $ 结尾 any-character . 任意字符 backspace [\b] 退格直接量 word-boundary \b 单词边界 non-word-boundary \B 非单词边界 digit \d ASCII 数字,[0-9] non-digit \D 非 ASCII 数字,[^0-9] form-feed \f 换页符 line-feed \n 换行符 carriage-return \r 回车符 white-space \s 空白符 non-white-space \S 非空白符 tab \t 制表符 vertical-tab \v 垂直制表符 word \w ASCII 字符,[a-zA-Z0-9] non-word \W 非 ASCII 字符,[^a-zA-Z0-9] null-character \o NUL 字符 */ var Util = __webpack_require__(3) var Random = __webpack_require__(5) /* */ var Handler = { extend: Util.extend } // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_code_chart /*var ASCII_CONTROL_CODE_CHART = { '@': ['\u0000'], A: ['\u0001'], B: ['\u0002'], C: ['\u0003'], D: ['\u0004'], E: ['\u0005'], F: ['\u0006'], G: ['\u0007', '\a'], H: ['\u0008', '\b'], I: ['\u0009', '\t'], J: ['\u000A', '\n'], K: ['\u000B', '\v'], L: ['\u000C', '\f'], M: ['\u000D', '\r'], N: ['\u000E'], O: ['\u000F'], P: ['\u0010'], Q: ['\u0011'], R: ['\u0012'], S: ['\u0013'], T: ['\u0014'], U: ['\u0015'], V: ['\u0016'], W: ['\u0017'], X: ['\u0018'], Y: ['\u0019'], Z: ['\u001A'], '[': ['\u001B', '\e'], '\\': ['\u001C'], ']': ['\u001D'], '^': ['\u001E'], '_': ['\u001F'] }*/ // ASCII printable code chart // var LOWER = 'abcdefghijklmnopqrstuvwxyz' // var UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' // var NUMBER = '0123456789' // var SYMBOL = ' !"#$%&\'()*+,-./' + ':;<=>?@' + '[\\]^_`' + '{|}~' var LOWER = ascii(97, 122) var UPPER = ascii(65, 90) var NUMBER = ascii(48, 57) var OTHER = ascii(32, 47) + ascii(58, 64) + ascii(91, 96) + ascii(123, 126) // 排除 95 _ ascii(91, 94) + ascii(96, 96) var PRINTABLE = ascii(32, 126) var SPACE = ' \f\n\r\t\v\u00A0\u2028\u2029' var CHARACTER_CLASSES = { '\\w': LOWER + UPPER + NUMBER + '_', // ascii(95, 95) '\\W': OTHER.replace('_', ''), '\\s': SPACE, '\\S': function() { var result = PRINTABLE for (var i = 0; i < SPACE.length; i++) { result = result.replace(SPACE[i], '') } return result }(), '\\d': NUMBER, '\\D': LOWER + UPPER + OTHER } function ascii(from, to) { var result = '' for (var i = from; i <= to; i++) { result += String.fromCharCode(i) } return result } // var ast = RegExpParser.parse(regexp.source) Handler.gen = function(node, result, cache) { cache = cache || { guid: 1 } return Handler[node.type] ? Handler[node.type](node, result, cache) : Handler.token(node, result, cache) } Handler.extend({ /* jshint unused:false */ token: function(node, result, cache) { switch (node.type) { case 'start': case 'end': return '' case 'any-character': return Random.character() case 'backspace': return '' case 'word-boundary': // TODO return '' case 'non-word-boundary': // TODO break case 'digit': return Random.pick( NUMBER.split('') ) case 'non-digit': return Random.pick( (LOWER + UPPER + OTHER).split('') ) case 'form-feed': break case 'line-feed': return node.body || node.text case 'carriage-return': break case 'white-space': return Random.pick( SPACE.split('') ) case 'non-white-space': return Random.pick( (LOWER + UPPER + NUMBER).split('') ) case 'tab': break case 'vertical-tab': break case 'word': // \w [a-zA-Z0-9] return Random.pick( (LOWER + UPPER + NUMBER).split('') ) case 'non-word': // \W [^a-zA-Z0-9] return Random.pick( OTHER.replace('_', '').split('') ) case 'null-character': break } return node.body || node.text }, /* { type: 'alternate', offset: 0, text: '', left: { boyd: [] }, right: { boyd: [] } } */ alternate: function(node, result, cache) { // node.left/right {} return this.gen( Random.boolean() ? node.left : node.right, result, cache ) }, /* { type: 'match', offset: 0, text: '', body: [] } */ match: function(node, result, cache) { result = '' // node.body [] for (var i = 0; i < node.body.length; i++) { result += this.gen(node.body[i], result, cache) } return result }, // () 'capture-group': function(node, result, cache) { // node.body {} result = this.gen(node.body, result, cache) cache[cache.guid++] = result return result }, // (?:...) 'non-capture-group': function(node, result, cache) { // node.body {} return this.gen(node.body, result, cache) }, // (?=p) 'positive-lookahead': function(node, result, cache) { // node.body return this.gen(node.body, result, cache) }, // (?!p) 'negative-lookahead': function(node, result, cache) { // node.body return '' }, /* { type: 'quantified', offset: 3, text: 'c*', body: { type: 'literal', offset: 3, text: 'c', body: 'c', escaped: false }, quantifier: { type: 'quantifier', offset: 4, text: '*', min: 0, max: Infinity, greedy: true } } */ quantified: function(node, result, cache) { result = '' // node.quantifier {} var count = this.quantifier(node.quantifier); // node.body {} for (var i = 0; i < count; i++) { result += this.gen(node.body, result, cache) } return result }, /* quantifier: { type: 'quantifier', offset: 4, text: '*', min: 0, max: Infinity, greedy: true } */ quantifier: function(node, result, cache) { var min = Math.max(node.min, 0) var max = isFinite(node.max) ? node.max : min + Random.integer(3, 7) return Random.integer(min, max) }, /* */ charset: function(node, result, cache) { // node.invert if (node.invert) return this['invert-charset'](node, result, cache) // node.body [] var literal = Random.pick(node.body) return this.gen(literal, result, cache) }, 'invert-charset': function(node, result, cache) { var pool = PRINTABLE for (var i = 0, item; i < node.body.length; i++) { item = node.body[i] switch (item.type) { case 'literal': pool = pool.replace(item.body, '') break case 'range': var min = this.gen(item.start, result, cache).charCodeAt() var max = this.gen(item.end, result, cache).charCodeAt() for (var ii = min; ii <= max; ii++) { pool = pool.replace(String.fromCharCode(ii), '') } /* falls through */ default: var characters = CHARACTER_CLASSES[item.text] if (characters) { for (var iii = 0; iii <= characters.length; iii++) { pool = pool.replace(characters[iii], '') } } } } return Random.pick(pool.split('')) }, range: function(node, result, cache) { // node.start, node.end var min = this.gen(node.start, result, cache).charCodeAt() var max = this.gen(node.end, result, cache).charCodeAt() return String.fromCharCode( Random.integer(min, max) ) }, literal: function(node, result, cache) { return node.escaped ? node.body : node.text }, // Unicode \u unicode: function(node, result, cache) { return String.fromCharCode( parseInt(node.code, 16) ) }, // 十六进制 \xFF hex: function(node, result, cache) { return String.fromCharCode( parseInt(node.code, 16) ) }, // 八进制 \0 octal: function(node, result, cache) { return String.fromCharCode( parseInt(node.code, 8) ) }, // 反向引用 'back-reference': function(node, result, cache) { return cache[node.code] || '' }, /* http://en.wikipedia.org/wiki/C0_and_C1_control_codes */ CONTROL_CHARACTER_MAP: function() { var CONTROL_CHARACTER = '@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^ _'.split(' ') var CONTROL_CHARACTER_UNICODE = '\u0000 \u0001 \u0002 \u0003 \u0004 \u0005 \u0006 \u0007 \u0008 \u0009 \u000A \u000B \u000C \u000D \u000E \u000F \u0010 \u0011 \u0012 \u0013 \u0014 \u0015 \u0016 \u0017 \u0018 \u0019 \u001A \u001B \u001C \u001D \u001E \u001F'.split(' ') var map = {} for (var i = 0; i < CONTROL_CHARACTER.length; i++) { map[CONTROL_CHARACTER[i]] = CONTROL_CHARACTER_UNICODE[i] } return map }(), 'control-character': function(node, result, cache) { return this.CONTROL_CHARACTER_MAP[node.code] } }) module.exports = Handler /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(24) /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { /* ## toJSONSchema 把 Mock.js 风格的数据模板转换成 JSON Schema。 > [JSON Schema](http://json-schema.org/) */ var Constant = __webpack_require__(2) var Util = __webpack_require__(3) var Parser = __webpack_require__(4) function toJSONSchema(template, name, path /* Internal Use Only */ ) { // type rule properties items path = path || [] var result = { name: typeof name === 'string' ? name.replace(Constant.RE_KEY, '$1') : name, template: template, type: Util.type(template), // 可能不准确,例如 { 'name|1': [{}, {} ...] } rule: Parser.parse(name) } result.path = path.slice(0) result.path.push(name === undefined ? 'ROOT' : result.name) switch (result.type) { case 'array': result.items = [] Util.each(template, function(value, index) { result.items.push( toJSONSchema(value, index, result.path) ) }) break case 'object': result.properties = [] Util.each(template, function(value, name) { result.properties.push( toJSONSchema(value, name, result.path) ) }) break } return result } module.exports = toJSONSchema /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(26) /***/ }, /* 26 */ /***/ function(module, exports, __webpack_require__) { /* ## valid(template, data) 校验真实数据 data 是否与数据模板 template 匹配。 实现思路: 1. 解析规则。 先把数据模板 template 解析为更方便机器解析的 JSON-Schame name 属性名 type 属性值类型 template 属性值模板 properties 对象属性数组 items 数组元素数组 rule 属性值生成规则 2. 递归验证规则。 然后用 JSON-Schema 校验真实数据,校验项包括属性名、值类型、值、值生成规则。 提示信息 https://github.com/fge/json-schema-validator/blob/master/src/main/resources/com/github/fge/jsonschema/validator/validation.properties [JSON-Schama validator](http://json-schema-validator.herokuapp.com/) [Regexp Demo](http://demos.forbeslindesay.co.uk/regexp/) */ var Constant = __webpack_require__(2) var Util = __webpack_require__(3) var toJSONSchema = __webpack_require__(23) function valid(template, data) { var schema = toJSONSchema(template) var result = Diff.diff(schema, data) for (var i = 0; i < result.length; i++) { // console.log(template, data) // console.warn(Assert.message(result[i])) } return result } /* ## name 有生成规则:比较解析后的 name 无生成规则:直接比较 ## type 无类型转换:直接比较 有类型转换:先试着解析 template,然后再检查? ## value vs. template 基本类型 无生成规则:直接比较 有生成规则: number min-max.dmin-dmax min-max.dcount count.dmin-dmax count.dcount +step 整数部分 小数部分 boolean string min-max count ## properties 对象 有生成规则:检测期望的属性个数,继续递归 无生成规则:检测全部的属性个数,继续递归 ## items 数组 有生成规则: `'name|1': [{}, {} ...]` 其中之一,继续递归 `'name|+1': [{}, {} ...]` 顺序检测,继续递归 `'name|min-max': [{}, {} ...]` 检测个数,继续递归 `'name|count': [{}, {} ...]` 检测个数,继续递归 无生成规则:检测全部的元素个数,继续递归 */ var Diff = { diff: function diff(schema, data, name /* Internal Use Only */ ) { var result = [] // 先检测名称 name 和类型 type,如果匹配,才有必要继续检测 if ( this.name(schema, data, name, result) && this.type(schema, data, name, result) ) { this.value(schema, data, name, result) this.properties(schema, data, name, result) this.items(schema, data, name, result) } return result }, /* jshint unused:false */ name: function(schema, data, name, result) { var length = result.length Assert.equal('name', schema.path, name + '', schema.name + '', result) return result.length === length }, type: function(schema, data, name, result) { var length = result.length switch (schema.type) { case 'string': // 跳过含有『占位符』的属性值,因为『占位符』返回值的类型可能和模板不一致,例如 '@int' 会返回一个整形值 if (schema.template.match(Constant.RE_PLACEHOLDER)) return true break case 'array': if (schema.rule.parameters) { // name|count: array if (schema.rule.min !== undefined && schema.rule.max === undefined) { // 跳过 name|1: array,因为最终值的类型(很可能)不是数组,也不一定与 `array` 中的类型一致 if (schema.rule.count === 1) return true } // 跳过 name|+inc: array if (schema.rule.parameters[2]) return true } break case 'function': // 跳过 `'name': function`,因为函数可以返回任何类型的值。 return true } Assert.equal('type', schema.path, Util.type(data), schema.type, result) return result.length === length }, value: function(schema, data, name, result) { var length = result.length var rule = schema.rule var templateType = schema.type if (templateType === 'object' || templateType === 'array' || templateType === 'function') return true // 无生成规则 if (!rule.parameters) { switch (templateType) { case 'regexp': Assert.match('value', schema.path, data, schema.template, result) return result.length === length case 'string': // 同样跳过含有『占位符』的属性值,因为『占位符』的返回值会通常会与模板不一致 if (schema.template.match(Constant.RE_PLACEHOLDER)) return result.length === length break } Assert.equal('value', schema.path, data, schema.template, result) return result.length === length } // 有生成规则 var actualRepeatCount switch (templateType) { case 'number': var parts = (data + '').split('.') parts[0] = +parts[0] // 整数部分 // |min-max if (rule.min !== undefined && rule.max !== undefined) { Assert.greaterThanOrEqualTo('value', schema.path, parts[0], Math.min(rule.min, rule.max), result) // , 'numeric instance is lower than the required minimum (minimum: {expected}, found: {actual})') Assert.lessThanOrEqualTo('value', schema.path, parts[0], Math.max(rule.min, rule.max), result) } // |count if (rule.min !== undefined && rule.max === undefined) { Assert.equal('value', schema.path, parts[0], rule.min, result, '[value] ' + name) } // 小数部分 if (rule.decimal) { // |dmin-dmax if (rule.dmin !== undefined && rule.dmax !== undefined) { Assert.greaterThanOrEqualTo('value', schema.path, parts[1].length, rule.dmin, result) Assert.lessThanOrEqualTo('value', schema.path, parts[1].length, rule.dmax, result) } // |dcount if (rule.dmin !== undefined && rule.dmax === undefined) { Assert.equal('value', schema.path, parts[1].length, rule.dmin, result) } } break case 'boolean': break case 'string': // 'aaa'.match(/a/g) actualRepeatCount = data.match(new RegExp(schema.template, 'g')) actualRepeatCount = actualRepeatCount ? actualRepeatCount.length : 0 // |min-max if (rule.min !== undefined && rule.max !== undefined) { Assert.greaterThanOrEqualTo('repeat count', schema.path, actualRepeatCount, rule.min, result) Assert.lessThanOrEqualTo('repeat count', schema.path, actualRepeatCount, rule.max, result) } // |count if (rule.min !== undefined && rule.max === undefined) { Assert.equal('repeat count', schema.path, actualRepeatCount, rule.min, result) } break case 'regexp': actualRepeatCount = data.match(new RegExp(schema.template.source.replace(/^\^|\$$/g, ''), 'g')) actualRepeatCount = actualRepeatCount ? actualRepeatCount.length : 0 // |min-max if (rule.min !== undefined && rule.max !== undefined) { Assert.greaterThanOrEqualTo('repeat count', schema.path, actualRepeatCount, rule.min, result) Assert.lessThanOrEqualTo('repeat count', schema.path, actualRepeatCount, rule.max, result) } // |count if (rule.min !== undefined && rule.max === undefined) { Assert.equal('repeat count', schema.path, actualRepeatCount, rule.min, result) } break } return result.length === length }, properties: function(schema, data, name, result) { var length = result.length var rule = schema.rule var keys = Util.keys(data) if (!schema.properties) return // 无生成规则 if (!schema.rule.parameters) { Assert.equal('properties length', schema.path, keys.length, schema.properties.length, result) } else { // 有生成规则 // |min-max if (rule.min !== undefined && rule.max !== undefined) { Assert.greaterThanOrEqualTo('properties length', schema.path, keys.length, Math.min(rule.min, rule.max), result) Assert.lessThanOrEqualTo('properties length', schema.path, keys.length, Math.max(rule.min, rule.max), result) } // |count if (rule.min !== undefined && rule.max === undefined) { // |1, |>1 if (rule.count !== 1) Assert.equal('properties length', schema.path, keys.length, rule.min, result) } } if (result.length !== length) return false for (var i = 0; i < keys.length; i++) { result.push.apply( result, this.diff( function() { var property Util.each(schema.properties, function(item /*, index*/ ) { if (item.name === keys[i]) property = item }) return property || schema.properties[i] }(), data[keys[i]], keys[i] ) ) } return result.length === length }, items: function(schema, data, name, result) { var length = result.length if (!schema.items) return var rule = schema.rule // 无生成规则 if (!schema.rule.parameters) { Assert.equal('items length', schema.path, data.length, schema.items.length, result) } else { // 有生成规则 // |min-max if (rule.min !== undefined && rule.max !== undefined) { Assert.greaterThanOrEqualTo('items', schema.path, data.length, (Math.min(rule.min, rule.max) * schema.items.length), result, '[{utype}] array is too short: {path} must have at least {expected} elements but instance has {actual} elements') Assert.lessThanOrEqualTo('items', schema.path, data.length, (Math.max(rule.min, rule.max) * schema.items.length), result, '[{utype}] array is too long: {path} must have at most {expected} elements but instance has {actual} elements') } // |count if (rule.min !== undefined && rule.max === undefined) { // |1, |>1 if (rule.count === 1) return result.length === length else Assert.equal('items length', schema.path, data.length, (rule.min * schema.items.length), result) } // |+inc if (rule.parameters[2]) return result.length === length } if (result.length !== length) return false for (var i = 0; i < data.length; i++) { result.push.apply( result, this.diff( schema.items[i % schema.items.length], data[i], i % schema.items.length ) ) } return result.length === length } } /* 完善、友好的提示信息 Equal, not equal to, greater than, less than, greater than or equal to, less than or equal to 路径 验证类型 描述 Expect path.name is less than or equal to expected, but path.name is actual. Expect path.name is less than or equal to expected, but path.name is actual. Expect path.name is greater than or equal to expected, but path.name is actual. */ var Assert = { message: function(item) { return (item.message || '[{utype}] Expect {path}\'{ltype} {action} {expected}, but is {actual}') .replace('{utype}', item.type.toUpperCase()) .replace('{ltype}', item.type.toLowerCase()) .replace('{path}', Util.isArray(item.path) && item.path.join('.') || item.path) .replace('{action}', item.action) .replace('{expected}', item.expected) .replace('{actual}', item.actual) }, equal: function(type, path, actual, expected, result, message) { if (actual === expected) return true switch (type) { case 'type': // 正则模板 === 字符串最终值 if (expected === 'regexp' && actual === 'string') return true break } var item = { path: path, type: type, actual: actual, expected: expected, action: 'is equal to', message: message } item.message = Assert.message(item) result.push(item) return false }, // actual matches expected match: function(type, path, actual, expected, result, message) { if (expected.test(actual)) return true var item = { path: path, type: type, actual: actual, expected: expected, action: 'matches', message: message } item.message = Assert.message(item) result.push(item) return false }, notEqual: function(type, path, actual, expected, result, message) { if (actual !== expected) return true var item = { path: path, type: type, actual: actual, expected: expected, action: 'is not equal to', message: message } item.message = Assert.message(item) result.push(item) return false }, greaterThan: function(type, path, actual, expected, result, message) { if (actual > expected) return true var item = { path: path, type: type, actual: actual, expected: expected, action: 'is greater than', message: message } item.message = Assert.message(item) result.push(item) return false }, lessThan: function(type, path, actual, expected, result, message) { if (actual < expected) return true var item = { path: path, type: type, actual: actual, expected: expected, action: 'is less to', message: message } item.message = Assert.message(item) result.push(item) return false }, greaterThanOrEqualTo: function(type, path, actual, expected, result, message) { if (actual >= expected) return true var item = { path: path, type: type, actual: actual, expected: expected, action: 'is greater than or equal to', message: message } item.message = Assert.message(item) result.push(item) return false }, lessThanOrEqualTo: function(type, path, actual, expected, result, message) { if (actual <= expected) return true var item = { path: path, type: type, actual: actual, expected: expected, action: 'is less than or equal to', message: message } item.message = Assert.message(item) result.push(item) return false } } valid.Diff = Diff valid.Assert = Assert module.exports = valid /***/ }, /* 27 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(28) /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { /* global window, document, location, Event, setTimeout */ /* ## MockXMLHttpRequest 期望的功能: 1. 完整地覆盖原生 XHR 的行为 2. 完整地模拟原生 XHR 的行为 3. 在发起请求时,自动检测是否需要拦截 4. 如果不必拦截,则执行原生 XHR 的行为 5. 如果需要拦截,则执行虚拟 XHR 的行为 6. 兼容 XMLHttpRequest 和 ActiveXObject new window.XMLHttpRequest() new window.ActiveXObject("Microsoft.XMLHTTP") 关键方法的逻辑: * new 此时尚无法确定是否需要拦截,所以创建原生 XHR 对象是必须的。 * open 此时可以取到 URL,可以决定是否进行拦截。 * send 此时已经确定了请求方式。 规范: http://xhr.spec.whatwg.org/ http://www.w3.org/TR/XMLHttpRequest2/ 参考实现: https://github.com/philikon/MockHttpRequest/blob/master/lib/mock.js https://github.com/trek/FakeXMLHttpRequest/blob/master/fake_xml_http_request.js https://github.com/ilinsky/xmlhttprequest/blob/master/XMLHttpRequest.js https://github.com/firebug/firebug-lite/blob/master/content/lite/xhr.js https://github.com/thx/RAP/blob/master/lab/rap.plugin.xinglie.js **需不需要全面重写 XMLHttpRequest?** http://xhr.spec.whatwg.org/#interface-xmlhttprequest 关键属性 readyState、status、statusText、response、responseText、responseXML 是 readonly,所以,试图通过修改这些状态,来模拟响应是不可行的。 因此,唯一的办法是模拟整个 XMLHttpRequest,就像 jQuery 对事件模型的封装。 // Event handlers onloadstart loadstart onprogress progress onabort abort onerror error onload load ontimeout timeout onloadend loadend onreadystatechange readystatechange */ var Util = __webpack_require__(3) // 备份原生 XMLHttpRequest window._XMLHttpRequest = window.XMLHttpRequest window._ActiveXObject = window.ActiveXObject /* PhantomJS TypeError: '[object EventConstructor]' is not a constructor (evaluating 'new Event("readystatechange")') https://github.com/bluerail/twitter-bootstrap-rails-confirm/issues/18 https://github.com/ariya/phantomjs/issues/11289 */ try { new window.Event('custom') } catch (exception) { window.Event = function(type, bubbles, cancelable, detail) { var event = document.createEvent('CustomEvent') // MUST be 'CustomEvent' event.initCustomEvent(type, bubbles, cancelable, detail) return event } } var XHR_STATES = { // The object has been constructed. UNSENT: 0, // The open() method has been successfully invoked. OPENED: 1, // All redirects (if any) have been followed and all HTTP headers of the response have been received. HEADERS_RECEIVED: 2, // The response's body is being received. LOADING: 3, // The data transfer has been completed or something went wrong during the transfer (e.g. infinite redirects). DONE: 4 } var XHR_EVENTS = 'readystatechange loadstart progress abort error load timeout loadend'.split(' ') var XHR_REQUEST_PROPERTIES = 'timeout withCredentials'.split(' ') var XHR_RESPONSE_PROPERTIES = 'readyState responseURL status statusText responseType response responseText responseXML'.split(' ') // https://github.com/trek/FakeXMLHttpRequest/blob/master/fake_xml_http_request.js#L32 var HTTP_STATUS_CODES = { 100: "Continue", 101: "Switching Protocols", 200: "OK", 201: "Created", 202: "Accepted", 203: "Non-Authoritative Information", 204: "No Content", 205: "Reset Content", 206: "Partial Content", 300: "Multiple Choice", 301: "Moved Permanently", 302: "Found", 303: "See Other", 304: "Not Modified", 305: "Use Proxy", 307: "Temporary Redirect", 400: "Bad Request", 401: "Unauthorized", 402: "Payment Required", 403: "Forbidden", 404: "Not Found", 405: "Method Not Allowed", 406: "Not Acceptable", 407: "Proxy Authentication Required", 408: "Request Timeout", 409: "Conflict", 410: "Gone", 411: "Length Required", 412: "Precondition Failed", 413: "Request Entity Too Large", 414: "Request-URI Too Long", 415: "Unsupported Media Type", 416: "Requested Range Not Satisfiable", 417: "Expectation Failed", 422: "Unprocessable Entity", 500: "Internal Server Error", 501: "Not Implemented", 502: "Bad Gateway", 503: "Service Unavailable", 504: "Gateway Timeout", 505: "HTTP Version Not Supported" } /* MockXMLHttpRequest */ function MockXMLHttpRequest() { // 初始化 custom 对象,用于存储自定义属性 this.custom = { events: {}, requestHeaders: {}, responseHeaders: {} } } MockXMLHttpRequest._settings = { timeout: '10-100', /* timeout: 50, timeout: '10-100', */ } MockXMLHttpRequest.setup = function(settings) { Util.extend(MockXMLHttpRequest._settings, settings) return MockXMLHttpRequest._settings } Util.extend(MockXMLHttpRequest, XHR_STATES) Util.extend(MockXMLHttpRequest.prototype, XHR_STATES) // 标记当前对象为 MockXMLHttpRequest MockXMLHttpRequest.prototype.mock = true // 是否拦截 Ajax 请求 MockXMLHttpRequest.prototype.match = false // 初始化 Request 相关的属性和方法 Util.extend(MockXMLHttpRequest.prototype, { // https://xhr.spec.whatwg.org/#the-open()-method // Sets the request method, request URL, and synchronous flag. open: function(method, url, async, username, password) { var that = this Util.extend(this.custom, { method: method, url: url, async: typeof async === 'boolean' ? async : true, username: username, password: password, options: { url: url, type: method } }) this.custom.timeout = function(timeout) { if (typeof timeout === 'number') return timeout if (typeof timeout === 'string' && !~timeout.indexOf('-')) return parseInt(timeout, 10) if (typeof timeout === 'string' && ~timeout.indexOf('-')) { var tmp = timeout.split('-') var min = parseInt(tmp[0], 10) var max = parseInt(tmp[1], 10) return Math.round(Math.random() * (max - min)) + min } }(MockXMLHttpRequest._settings.timeout) // 查找与请求参数匹配的数据模板 var item = find(this.custom.options) function handle(event) { // 同步属性 NativeXMLHttpRequest => MockXMLHttpRequest for (var i = 0; i < XHR_RESPONSE_PROPERTIES.length; i++) { try { that[XHR_RESPONSE_PROPERTIES[i]] = xhr[XHR_RESPONSE_PROPERTIES[i]] } catch (e) {} } // 触发 MockXMLHttpRequest 上的同名事件 that.dispatchEvent(new Event(event.type /*, false, false, that*/ )) } // 如果未找到匹配的数据模板,则采用原生 XHR 发送请求。 if (!item) { // 创建原生 XHR 对象,调用原生 open(),监听所有原生事件 var xhr = createNativeXMLHttpRequest() this.custom.xhr = xhr // 初始化所有事件,用于监听原生 XHR 对象的事件 for (var i = 0; i < XHR_EVENTS.length; i++) { xhr.addEventListener(XHR_EVENTS[i], handle) } // xhr.open() if (username) xhr.open(method, url, async, username, password) else xhr.open(method, url, async) // 同步属性 MockXMLHttpRequest => NativeXMLHttpRequest for (var j = 0; j < XHR_REQUEST_PROPERTIES.length; j++) { try { xhr[XHR_REQUEST_PROPERTIES[j]] = that[XHR_REQUEST_PROPERTIES[j]] } catch (e) {} } return } // 找到了匹配的数据模板,开始拦截 XHR 请求 this.match = true this.custom.template = item this.readyState = MockXMLHttpRequest.OPENED this.dispatchEvent(new Event('readystatechange' /*, false, false, this*/ )) }, // https://xhr.spec.whatwg.org/#the-setrequestheader()-method // Combines a header in author request headers. setRequestHeader: function(name, value) { // 原生 XHR if (!this.match) { this.custom.xhr.setRequestHeader(name, value) return } // 拦截 XHR var requestHeaders = this.custom.requestHeaders if (requestHeaders[name]) requestHeaders[name] += ',' + value else requestHeaders[name] = value }, timeout: 0, withCredentials: false, upload: {}, // https://xhr.spec.whatwg.org/#the-send()-method // Initiates the request. send: function send(data) { var that = this this.custom.options.body = data // 原生 XHR if (!this.match) { this.custom.xhr.send(data) return } // 拦截 XHR // X-Requested-With header this.setRequestHeader('X-Requested-With', 'MockXMLHttpRequest') // loadstart The fetch initiates. this.dispatchEvent(new Event('loadstart' /*, false, false, this*/ )) if (this.custom.async) setTimeout(done, this.custom.timeout) // 异步 else done() // 同步 function done() { that.readyState = MockXMLHttpRequest.HEADERS_RECEIVED that.dispatchEvent(new Event('readystatechange' /*, false, false, that*/ )) that.readyState = MockXMLHttpRequest.LOADING that.dispatchEvent(new Event('readystatechange' /*, false, false, that*/ )) that.status = 200 that.statusText = HTTP_STATUS_CODES[200] // fix #92 #93 by @qddegtya that.response = that.responseText = JSON.stringify( convert(that.custom.template, that.custom.options), null, 4 ) that.readyState = MockXMLHttpRequest.DONE that.dispatchEvent(new Event('readystatechange' /*, false, false, that*/ )) that.dispatchEvent(new Event('load' /*, false, false, that*/ )); that.dispatchEvent(new Event('loadend' /*, false, false, that*/ )); } }, // https://xhr.spec.whatwg.org/#the-abort()-method // Cancels any network activity. abort: function abort() { // 原生 XHR if (!this.match) { this.custom.xhr.abort() return } // 拦截 XHR this.readyState = MockXMLHttpRequest.UNSENT this.dispatchEvent(new Event('abort', false, false, this)) this.dispatchEvent(new Event('error', false, false, this)) } }) // 初始化 Response 相关的属性和方法 Util.extend(MockXMLHttpRequest.prototype, { responseURL: '', status: MockXMLHttpRequest.UNSENT, statusText: '', // https://xhr.spec.whatwg.org/#the-getresponseheader()-method getResponseHeader: function(name) { // 原生 XHR if (!this.match) { return this.custom.xhr.getResponseHeader(name) } // 拦截 XHR return this.custom.responseHeaders[name.toLowerCase()] }, // https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method // http://www.utf8-chartable.de/ getAllResponseHeaders: function() { // 原生 XHR if (!this.match) { return this.custom.xhr.getAllResponseHeaders() } // 拦截 XHR var responseHeaders = this.custom.responseHeaders var headers = '' for (var h in responseHeaders) { if (!responseHeaders.hasOwnProperty(h)) continue headers += h + ': ' + responseHeaders[h] + '\r\n' } return headers }, overrideMimeType: function( /*mime*/ ) {}, responseType: '', // '', 'text', 'arraybuffer', 'blob', 'document', 'json' response: null, responseText: '', responseXML: null }) // EventTarget Util.extend(MockXMLHttpRequest.prototype, { addEventListener: function addEventListener(type, handle) { var events = this.custom.events if (!events[type]) events[type] = [] events[type].push(handle) }, removeEventListener: function removeEventListener(type, handle) { var handles = this.custom.events[type] || [] for (var i = 0; i < handles.length; i++) { if (handles[i] === handle) { handles.splice(i--, 1) } } }, dispatchEvent: function dispatchEvent(event) { var handles = this.custom.events[event.type] || [] for (var i = 0; i < handles.length; i++) { handles[i].call(this, event) } var ontype = 'on' + event.type if (this[ontype]) this[ontype](event) } }) // Inspired by jQuery function createNativeXMLHttpRequest() { var isLocal = function() { var rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/ var rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/ var ajaxLocation = location.href var ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [] return rlocalProtocol.test(ajaxLocParts[1]) }() return window.ActiveXObject ? (!isLocal && createStandardXHR() || createActiveXHR()) : createStandardXHR() function createStandardXHR() { try { return new window._XMLHttpRequest(); } catch (e) {} } function createActiveXHR() { try { return new window._ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } // 查找与请求参数匹配的数据模板:URL,Type function find(options) { for (var sUrlType in MockXMLHttpRequest.Mock._mocked) { var item = MockXMLHttpRequest.Mock._mocked[sUrlType] if ( (!item.rurl || match(item.rurl, options.url)) && (!item.rtype || match(item.rtype, options.type.toLowerCase())) ) { // console.log('[mock]', options.url, '>', item.rurl) return item } } function match(expected, actual) { if (Util.type(expected) === 'string') { return expected === actual } if (Util.type(expected) === 'regexp') { return expected.test(actual) } } } // 数据模板 => 响应数据 function convert(item, options) { return Util.isFunction(item.template) ? item.template(options) : MockXMLHttpRequest.Mock.mock(item.template) } module.exports = MockXMLHttpRequest /***/ } /******/ ]) }); ; /***/ }), /***/ "eOjq": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("PDcB"); module.exports = __webpack_require__("zKeE").Object.keys; /***/ }), /***/ "ebIA": /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__("i1Q6").document; module.exports = document && document.documentElement; /***/ }), /***/ "ecOS": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "ek1V": /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies */ var matches = __webpack_require__("u5Za"); /** * @param element {Element} * @param selector {String} * @param context {Element} * @return {Element} */ module.exports = function (element, selector, context) { context = context || document; // guard against orphans element = { parentNode: element }; while ((element = element.parentNode) && element !== context) { if (matches(element, selector)) { return element; } } }; /***/ }), /***/ "epr4": /***/ (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 isTextNode = __webpack_require__("RiJr"); /*eslint-disable no-bitwise */ /** * Checks if a given DOM node contains or is another DOM node. */ function containsNode(outerNode, innerNode) { if (!outerNode || !innerNode) { return false; } else if (outerNode === innerNode) { return true; } else if (isTextNode(outerNode)) { return false; } else if (isTextNode(innerNode)) { return containsNode(outerNode, innerNode.parentNode); } else if ('contains' in outerNode) { return outerNode.contains(innerNode); } else if (outerNode.compareDocumentPosition) { return !!(outerNode.compareDocumentPosition(innerNode) & 16); } else { return false; } } module.exports = containsNode; /***/ }), /***/ "f4Fl": /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__("Jpv1"), overRest = __webpack_require__("qXFa"), setToString = __webpack_require__("KRxT"); /** * 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; /***/ }), /***/ "fp05": /***/ (function(module, exports, __webpack_require__) { var QueryHandler = __webpack_require__("/u/u"); var each = __webpack_require__("gozI").each; /** * Represents a single media query, manages it's state and registered handlers for this query * * @constructor * @param {string} query the media query string * @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design */ function MediaQuery(query, isUnconditional) { this.query = query; this.isUnconditional = isUnconditional; this.handlers = []; this.mql = window.matchMedia(query); var self = this; this.listener = function(mql) { // Chrome passes an MediaQueryListEvent object, while other browsers pass MediaQueryList directly self.mql = mql.currentTarget || mql; self.assess(); }; this.mql.addListener(this.listener); } MediaQuery.prototype = { constuctor : MediaQuery, /** * add a handler for this query, triggering if already active * * @param {object} handler * @param {function} handler.match callback for when query is activated * @param {function} [handler.unmatch] callback for when query is deactivated * @param {function} [handler.setup] callback for immediate execution when a query handler is registered * @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched? */ addHandler : function(handler) { var qh = new QueryHandler(handler); this.handlers.push(qh); this.matches() && qh.on(); }, /** * removes the given handler from the collection, and calls it's destroy methods * * @param {object || function} handler the handler to remove */ removeHandler : function(handler) { var handlers = this.handlers; each(handlers, function(h, i) { if(h.equals(handler)) { h.destroy(); return !handlers.splice(i,1); //remove from array and exit each early } }); }, /** * Determine whether the media query should be considered a match * * @return {Boolean} true if media query can be considered a match, false otherwise */ matches : function() { return this.mql.matches || this.isUnconditional; }, /** * Clears all handlers and unbinds events */ clear : function() { each(this.handlers, function(handler) { handler.destroy(); }); this.mql.removeListener(this.listener); this.handlers.length = 0; //clear array }, /* * Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match */ assess : function() { var action = this.matches() ? 'on' : 'off'; each(this.handlers, function(handler) { handler[action](); }); } }; module.exports = MediaQuery; /***/ }), /***/ "fwAU": /***/ (function(module, exports, __webpack_require__) { var _Object$getOwnPropertyDescriptor = __webpack_require__("o5Xk"); var _Object$getOwnPropertySymbols = __webpack_require__("+D2p"); var _Object$keys = __webpack_require__("o+hE"); var defineProperty = __webpack_require__("IxO8"); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = _Object$keys(source); if (typeof _Object$getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(_Object$getOwnPropertySymbols(source).filter(function (sym) { return _Object$getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { defineProperty(target, key, source[key]); }); } return target; } module.exports = _objectSpread; /***/ }), /***/ "fwYF": /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__("Xk23"), Map = __webpack_require__("K9uV"), MapCache = __webpack_require__("wtMJ"); /** 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; /***/ }), /***/ "g31e": /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /***/ "g55O": /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /***/ "gQDI": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "ga8q": /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__("u9vI"); /** 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; /***/ }), /***/ "gc0D": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("vcHl"), __esModule: true }; /***/ }), /***/ "gjjs": /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__("Gfzd"); var anObject = __webpack_require__("zotD"); var getKeys = __webpack_require__("knrM"); module.exports = __webpack_require__("6MLN") ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /***/ "gk5i": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("Ky5l"); /***/ }), /***/ "gmQJ": /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__("f4Fl"), isIterateeCall = __webpack_require__("R62e"); /** * 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; /***/ }), /***/ "gojl": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("akPY"); /***/ }), /***/ "gozI": /***/ (function(module, exports) { /** * Helper function for iterating over a collection * * @param collection * @param fn */ function each(collection, fn) { var i = 0, length = collection.length, cont; for(i; i < length; i++) { cont = fn(collection[i], i); if(cont === false) { break; //allow early exit } } } /** * Helper function for determining whether target object is an array * * @param target the object under test * @return {Boolean} true if array, false otherwise */ function isArray(target) { return Object.prototype.toString.apply(target) === '[object Array]'; } /** * Helper function for determining whether target object is a function * * @param target the object under test * @return {Boolean} true if function, false otherwise */ function isFunction(target) { return typeof target === 'function'; } module.exports = { isFunction : isFunction, isArray : isArray, each : each }; /***/ }), /***/ "h0zV": /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__("yEjJ"); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /***/ "h6ac": /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /***/ "hClK": /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__("FTXF"); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /***/ "hDW8": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.storeShape = undefined; var _propTypes = __webpack_require__("5D9O"); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var storeShape = exports.storeShape = _propTypes2.default.shape({ subscribe: _propTypes2.default.func.isRequired, setState: _propTypes2.default.func.isRequired, getState: _propTypes2.default.func.isRequired }); /***/ }), /***/ "hEIm": /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__("zotD"); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /***/ "hHLa": /***/ (function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = __webpack_require__("Wyka"); var $getOwnPropertyDescriptor = __webpack_require__("sxPs").f; __webpack_require__("cOHw")('getOwnPropertyDescriptor', function () { return function getOwnPropertyDescriptor(it, key) { return $getOwnPropertyDescriptor(toIObject(it), key); }; }); /***/ }), /***/ "htFH": /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__("vSO4"); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__("6MLN"), 'Object', { defineProperty: __webpack_require__("Gfzd").f }); /***/ }), /***/ "i+u+": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__("lytE")(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__("uRfg")(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /***/ "i17t": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.4.2 * react-dom.production.min.js * * 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. */ /* Modernizr 3.0.0pre (Custom Build) | MIT */ var aa=__webpack_require__("wRU+"),ba=__webpack_require__("1n8/"),m=__webpack_require__("KW17"),p=__webpack_require__("J4Nk"),v=__webpack_require__("UQex"),da=__webpack_require__("XeWd"),ea=__webpack_require__("lyLi"),fa=__webpack_require__("epr4"),ha=__webpack_require__("+CtU"); function A(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;dthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&"CompositionEvent"in window,xb=null;m.canUseDOM&&"documentMode"in document&&(xb=document.documentMode); var yb=m.canUseDOM&&"TextEvent"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart", captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Cb=!1; function Db(a,b){switch(a){case "keyup":return-1!==vb.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function Eb(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case "compositionend":return Eb(b);case "keypress":if(32!==b.which)return null;Cb=!0;return Ab;case "textInput":return a=b.data,a===Ab&&Cb?null:a;default:return null}} function Hb(a,b){if(Fb)return"compositionend"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={}; "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)}); ["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)}); ["capture","download"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});["cols","rows","size","span"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});["rowSpan","start"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()} "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Ec, Fc);J[b]=new I(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});J.tabIndex=new I("tabIndex",1,!1,"tabindex",null); function Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}} var Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd="_reactListenersID"+(""+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a} function Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} var Wd=m.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Yd=null,Zd=null,$d=null,ae=!1; function be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;"selectionStart"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type="select",a.target=Yd,Ya(a),a)} var ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A("93"),b=b[0]),c=""+b),null==c&&(c=""));a._wrapperState={initialValue:""+c}} function Ee(a,b){var c=b.value;null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}; function He(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ie(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?He(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} var Je=void 0,Ke=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||"innerHTML"in a)a.innerHTML=b;else{Je=Je||document.createElement("div");Je.innerHTML=""+b+"";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}); function Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} var Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0, stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=["Webkit","ms","Moz","O"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})}); function Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--");var e=c;var f=b[c];e=null==f||"boolean"===typeof f||""===f?"":d||"number"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(""+f).trim():f+"px";"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); function Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A("137",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:A("61")),null!=b.style&&"object"!==typeof b.style?A("62",c()):void 0)} function Re(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var Se=v.thatReturns(""); function Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\x3c/script>",a=a.removeChild(a.firstChild)):a="string"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)} function We(a,b,c,d){var e=Re(b,c);switch(b){case "iframe":case "object":K("load",a);var f=c;break;case "video":case "audio":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current} function sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)} function vf(a,b,c){of.current!==ha?A("168"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if("function"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A("108",uc(a)||"Unknown",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0} function yf(a,b){var c=a.stateNode;c?void 0:A("169");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)} function zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null} function Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d} function Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if("function"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if("string"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch("object"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A("130",null==d? d:typeof d,"")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b} function Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}} function Jf(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){"function"===typeof Gf&&Gf(a)}function Lf(a){"function"===typeof Hf&&Hf(a)}var Mf=!1; function Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}} function Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c} function Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)} function Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b} function Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e="function"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d} function Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null=== g&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}} function Wf(a,b){"function"!==typeof a?A("191",a):void 0;a.call(b)} function Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect} function Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A("174"):void 0;return a} function jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,"");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)} var qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!== b&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return"function"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0} function sg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)} function tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;"function"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);"function"===typeof c.getDerivedStateFromProps||"function"===typeof d.getSnapshotBeforeUpdate||"function"!==typeof d.UNSAFE_componentWillMount&&"function"!==typeof d.componentWillMount||(c=d.state,"function"===typeof d.componentWillMount&& d.componentWillMount(),"function"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));"function"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray; function vg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A("110"):void 0,d=c.stateNode);d?void 0:A("147",a);var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}"string"!==typeof a?A("148"):void 0;c._owner?void 0:A("254",a)}return a} function wg(a,b){"textarea"!==a.type&&A("31","[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"")} function xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e, t);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null=== t?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n="object"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children, a.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return= a,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A("152",h.displayName||h.name||"Component")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c} function Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}} function Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)} function Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child} function Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)} function Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f= e.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}} function Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h="function"===typeof d._calculateChangedBits?d._calculateChangedBits(k, h):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A("153"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child} function Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A("155"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;"object"===typeof d&&null!==d&&"function"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,"function"=== typeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!== g.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h="function"===typeof r||"function"===typeof d.getSnapshotBeforeUpdate)||"function"!==typeof d.UNSAFE_componentWillReceiveProps&&"function"!==typeof d.componentWillReceiveProps|| (k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?("function"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||"function"!==typeof d.UNSAFE_componentWillMount&&"function"!==typeof d.componentWillMount||("function"===typeof d.componentWillMount&&d.componentWillMount(),"function"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),"function"===typeof d.componentDidMount&& (b.effectTag|=4)):("function"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):("function"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h="function"===typeof r||"function"===typeof d.getSnapshotBeforeUpdate)||"function"!==typeof d.UNSAFE_componentWillReceiveProps&&"function"!==typeof d.componentWillReceiveProps|| (f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?("function"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||"function"!==typeof d.UNSAFE_componentWillUpdate&&"function"!==typeof d.componentWillUpdate||("function"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),"function"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),"function"===typeof d.componentDidUpdate&& (b.effectTag|=4),"function"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),"function"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):("function"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),"function"!==typeof d.getSnapshotBeforeUpdate|| f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e, b.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps, null;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c= b.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a= R(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A("156")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)}; function Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode? A("166"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode= a}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if("string"!==typeof c)return null===b.stateNode?A("166"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A("167"); default:A("156")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null} function ah(a){"function"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if("function"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag} function dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A("160");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A("161")}c.effectTag&16&&(Le(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b; if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null=== e.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}} function bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A("160"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e? (f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}} function eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A("162"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A("163")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c} function hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&"function"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:""})});return c} function jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&"function"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)} function kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null; function wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1} function xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&& (null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a} function pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A("185")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2} function Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})} function Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A("253"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()} function $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft, top:l.scrollTop});"function"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0} function gh(a){null===X?A("246"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A("246"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A("187"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}} function fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}} function hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A("170");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A("171")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d} function ii(a){var b=a._reactInternalFiber;void 0===b&&("function"===typeof a.render?A("188"):A("268",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}} function li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))} var mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li}; function oi(a,b,c){var d=3 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /***/ "ibPW": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("Ky5l"), __esModule: true }; /***/ }), /***/ "iyC2": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__("MIhM"), stubFalse = __webpack_require__("PYZb"); /** 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; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("l262")(module))) /***/ }), /***/ "j3D9": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("h6ac"))) /***/ }), /***/ "jXAN": /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__("zb3a"); /** * 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; /***/ }), /***/ "jXGU": /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__("2Axb"); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /***/ "jaTa": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "jx4H": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__("FFZn"); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = 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; (0, _defineProperty2.default)(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /***/ }), /***/ "kAdy": /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__("bViC"); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /***/ "kKLW": /***/ (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. * * @typechecks */ /** * @param {*} object The object to check. * @return {boolean} Whether or not the object is a DOM node. */ function isNode(object) { var doc = object ? object.ownerDocument || object : document; var defaultView = doc.defaultView || window; return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); } module.exports = isNode; /***/ }), /***/ "knrM": /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__("B9Lq"); var enumBugKeys = __webpack_require__("KxjL"); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /***/ "kwIb": /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__("2L2L"), baseUnary = __webpack_require__("PnXa"), nodeUtil = __webpack_require__("PBPf"); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /***/ "ky2m": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("BtHH"); module.exports = __webpack_require__("zKeE").Object.getPrototypeOf; /***/ }), /***/ "kyq/": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fetchKeys = __webpack_require__("KJil"); module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (ret !== void 0) { return !!ret; } if (objA === objB) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = fetchKeys(objA); var keysB = fetchKeys(objB); var len = keysA.length; if (len !== keysB.length) { return false; } compareContext = compareContext || null; // Test for A's keys different from B. var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); for (var i = 0; i < len; i++) { var key = keysA[i]; if (!bHasOwnProperty(key)) { return false; } var valueA = objA[key]; var valueB = objB[key]; var _ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; if (_ret === false || _ret === void 0 && valueA !== valueB) { return false; } } return true; }; /***/ }), /***/ "l262": /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /***/ "lBq7": /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__("C8N4"), ListCache = __webpack_require__("Xk23"), Map = __webpack_require__("K9uV"); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /***/ "lPmd": /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /***/ "lyLi": /***/ (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. * * @typechecks * */ /*eslint-disable no-self-compare */ var hasOwnProperty = Object.prototype.hasOwnProperty; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 // Added the nonzero y check to make Flow happy, but it is redundant return x !== 0 || y !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /** * Performs equality by iterating through keys on an object and returning false * when any key has values which are not strictly equal between the arguments. * Returns true when the values of all keys are strictly equal. */ function shallowEqual(objA, objB) { if (is(objA, objB)) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. for (var i = 0; i < keysA.length; i++) { if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { return false; } } return true; } module.exports = shallowEqual; /***/ }), /***/ "lytE": /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__("MpYs"); var defined = __webpack_require__("U72i"); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /***/ "m+xf": /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies. */ try { var index = __webpack_require__("v5sI"); } catch (err) { var index = __webpack_require__("v5sI"); } /** * Whitespace regexp. */ var re = /\s+/; /** * toString reference. */ var toString = Object.prototype.toString; /** * Wrap `el` in a `ClassList`. * * @param {Element} el * @return {ClassList} * @api public */ module.exports = function(el){ return new ClassList(el); }; /** * Initialize a new ClassList for `el`. * * @param {Element} el * @api private */ function ClassList(el) { if (!el || !el.nodeType) { throw new Error('A DOM element reference is required'); } this.el = el; this.list = el.classList; } /** * Add class `name` if not already present. * * @param {String} name * @return {ClassList} * @api public */ ClassList.prototype.add = function(name){ // classList if (this.list) { this.list.add(name); return this; } // fallback var arr = this.array(); var i = index(arr, name); if (!~i) arr.push(name); this.el.className = arr.join(' '); return this; }; /** * Remove class `name` when present, or * pass a regular expression to remove * any which match. * * @param {String|RegExp} name * @return {ClassList} * @api public */ ClassList.prototype.remove = function(name){ if ('[object RegExp]' == toString.call(name)) { return this.removeMatching(name); } // classList if (this.list) { this.list.remove(name); return this; } // fallback var arr = this.array(); var i = index(arr, name); if (~i) arr.splice(i, 1); this.el.className = arr.join(' '); return this; }; /** * Remove all classes matching `re`. * * @param {RegExp} re * @return {ClassList} * @api private */ ClassList.prototype.removeMatching = function(re){ var arr = this.array(); for (var i = 0; i < arr.length; i++) { if (re.test(arr[i])) { this.remove(arr[i]); } } return this; }; /** * Toggle class `name`, can force state via `force`. * * For browsers that support classList, but do not support `force` yet, * the mistake will be detected and corrected. * * @param {String} name * @param {Boolean} force * @return {ClassList} * @api public */ ClassList.prototype.toggle = function(name, force){ // classList if (this.list) { if ("undefined" !== typeof force) { if (force !== this.list.toggle(name, force)) { this.list.toggle(name); // toggle again to correct } } else { this.list.toggle(name); } return this; } // fallback if ("undefined" !== typeof force) { if (!force) { this.remove(name); } else { this.add(name); } } else { if (this.has(name)) { this.remove(name); } else { this.add(name); } } return this; }; /** * Return an array of classes. * * @return {Array} * @api public */ ClassList.prototype.array = function(){ var className = this.el.getAttribute('class') || ''; var str = className.replace(/^\s+|\s+$/g, ''); var arr = str.split(re); if ('' === arr[0]) arr.shift(); return arr; }; /** * Check if class `name` is present. * * @param {String} name * @return {ClassList} * @api public */ ClassList.prototype.has = ClassList.prototype.contains = function(name){ return this.list ? this.list.contains(name) : !! ~index(this.array(), name); }; /***/ }), /***/ "mCGg": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export fakeList */ /* harmony export (immutable) */ __webpack_exports__["b"] = getFakeList; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getNotice; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getActivities; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_url__ = __webpack_require__("Mej7"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_url___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_url__); var titles = ['Alipay', 'Angular', 'Ant Design', 'Ant Design Pro', 'Bootstrap', 'React', 'Vue', 'Webpack']; var avatars = ['https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png', // Alipay 'https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png', // Angular 'https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png', // Ant Design 'https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png', // Ant Design Pro 'https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png', // Bootstrap 'https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png', // React 'https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png', // Vue 'https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png']; var avatars2 = ['https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'https://gw.alipayobjects.com/zos/rmsportal/cnrhVkzwxjPwAaCfPbdc.png', 'https://gw.alipayobjects.com/zos/rmsportal/gaOngJwsRYRaVAuXXcmB.png', 'https://gw.alipayobjects.com/zos/rmsportal/ubnKSIfAJTxIgXOKlciN.png', 'https://gw.alipayobjects.com/zos/rmsportal/WhxKECPNujWoWEFNdnJE.png', 'https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png', 'https://gw.alipayobjects.com/zos/rmsportal/psOgztMplJMGpVEqfcgF.png', 'https://gw.alipayobjects.com/zos/rmsportal/ZpBqSxLxVEXfcUNoPKrz.png', 'https://gw.alipayobjects.com/zos/rmsportal/laiEnJdGHVOhJrUShBaJ.png', 'https://gw.alipayobjects.com/zos/rmsportal/UrQsqscbKEpNuJcvBZBu.png']; var covers = ['https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png', 'https://gw.alipayobjects.com/zos/rmsportal/iZBVOIhGJiAnhplqjvZW.png', 'https://gw.alipayobjects.com/zos/rmsportal/uVZonEtjWwmUZPBQfycs.png', 'https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png']; var desc = ['那是一种内在的东西, 他们到达不了,也无法触及的', '希望是一个好东西,也许是最好的,好东西是不会消亡的', '生命就像一盒巧克力,结果往往出人意料', '城镇中有那么多的酒馆,她却偏偏走进了我的酒馆', '那时候我只会想自己想要什么,从不想自己拥有什么']; var user = ['付小小', '曲丽丽', '林东东', '周星星', '吴加好', '朱偏右', '鱼酱', '乐哥', '谭小仪', '仲尼']; function fakeList(count) { var list = []; for (var i = 0; i < count; i += 1) { list.push({ id: "fake-list-".concat(i), owner: user[i % 10], title: titles[i % 8], avatar: avatars[i % 8], cover: parseInt(i / 4, 10) % 2 === 0 ? covers[i % 4] : covers[3 - i % 4], status: ['active', 'exception', 'normal'][i % 3], percent: Math.ceil(Math.random() * 50) + 50, logo: avatars[i % 8], href: 'https://ant.design', updatedAt: new Date(new Date().getTime() - 1000 * 60 * 60 * 2 * i), createdAt: new Date(new Date().getTime() - 1000 * 60 * 60 * 2 * i), subDescription: desc[i % 5], description: '在中台产品的研发过程中,会出现不同的设计规范和实现方式,但其中往往存在很多类似的页面和组件,这些类似的组件会被抽离成一套标准规范。', activeUser: Math.ceil(Math.random() * 100000) + 100000, newUser: Math.ceil(Math.random() * 1000) + 1000, star: Math.ceil(Math.random() * 100) + 100, like: Math.ceil(Math.random() * 100) + 100, message: Math.ceil(Math.random() * 10) + 10, content: '段落示意:蚂蚁金服设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。蚂蚁金服设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。', members: [{ avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png', name: '曲丽丽' }, { avatar: 'https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png', name: '王昭君' }, { avatar: 'https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png', name: '董娜娜' }] }); } return list; } function getFakeList(req, res, u) { var url = u; if (!url || Object.prototype.toString.call(url) !== '[object String]') { url = req.url; // eslint-disable-line } var params = Object(__WEBPACK_IMPORTED_MODULE_0_url__["parse"])(url, true).query; var count = params.count * 1 || 20; var result = fakeList(count); if (res && res.json) { res.json(result); } else { return result; } } var getNotice = [{ id: 'xxx1', title: titles[0], logo: avatars[0], description: '那是一种内在的东西,他们到达不了,也无法触及的', updatedAt: new Date(), member: '科学搬砖组', href: '', memberLink: '' }, { id: 'xxx2', title: titles[1], logo: avatars[1], description: '希望是一个好东西,也许是最好的,好东西是不会消亡的', updatedAt: new Date('2017-07-24'), member: '全组都是吴彦祖', href: '', memberLink: '' }, { id: 'xxx3', title: titles[2], logo: avatars[2], description: '城镇中有那么多的酒馆,她却偏偏走进了我的酒馆', updatedAt: new Date(), member: '中二少女团', href: '', memberLink: '' }, { id: 'xxx4', title: titles[3], logo: avatars[3], description: '那时候我只会想自己想要什么,从不想自己拥有什么', updatedAt: new Date('2017-07-23'), member: '程序员日常', href: '', memberLink: '' }, { id: 'xxx5', title: titles[4], logo: avatars[4], description: '凛冬将至', updatedAt: new Date('2017-07-23'), member: '高逼格设计天团', href: '', memberLink: '' }, { id: 'xxx6', title: titles[5], logo: avatars[5], description: '生命就像一盒巧克力,结果往往出人意料', updatedAt: new Date('2017-07-23'), member: '骗你来学计算机', href: '', memberLink: '' }]; var getActivities = [{ id: 'trend-1', updatedAt: new Date(), user: { name: '曲丽丽', avatar: avatars2[0] }, group: { name: '高逼格设计天团', link: 'http://github.com/' }, project: { name: '六月迭代', link: 'http://github.com/' }, template: '在 @{group} 新建项目 @{project}' }, { id: 'trend-2', updatedAt: new Date(), user: { name: '付小小', avatar: avatars2[1] }, group: { name: '高逼格设计天团', link: 'http://github.com/' }, project: { name: '六月迭代', link: 'http://github.com/' }, template: '在 @{group} 新建项目 @{project}' }, { id: 'trend-3', updatedAt: new Date(), user: { name: '林东东', avatar: avatars2[2] }, group: { name: '中二少女团', link: 'http://github.com/' }, project: { name: '六月迭代', link: 'http://github.com/' }, template: '在 @{group} 新建项目 @{project}' }, { id: 'trend-4', updatedAt: new Date(), user: { name: '周星星', avatar: avatars2[4] }, project: { name: '5 月日常迭代', link: 'http://github.com/' }, template: '将 @{project} 更新至已发布状态' }, { id: 'trend-5', updatedAt: new Date(), user: { name: '朱偏右', avatar: avatars2[3] }, project: { name: '工程效能', link: 'http://github.com/' }, comment: { name: '留言', link: 'http://github.com/' }, template: '在 @{project} 发布了 @{comment}' }, { id: 'trend-6', updatedAt: new Date(), user: { name: '乐哥', avatar: avatars2[5] }, group: { name: '程序员日常', link: 'http://github.com/' }, project: { name: '品牌迭代', link: 'http://github.com/' }, template: '在 @{group} 新建项目 @{project}' }]; /* unused harmony default export */ var _unused_webpack_default_export = ({ getNotice: getNotice, getActivities: getActivities, getFakeList: getFakeList }); /***/ }), /***/ "mYpx": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__("VuZO"); 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); } }; /***/ }), /***/ "mbLO": /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__("U72i"); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /***/ "mdM2": /***/ (function(module, exports, __webpack_require__) { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; module.exports = { 'default': 'RFC3986', formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return value; } }, RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; /***/ }), /***/ "mdfe": /***/ (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__("J4Nk"); var emptyObject = __webpack_require__("+CtU"); var _invariant = __webpack_require__("wRU+"); 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; /***/ }), /***/ "mduf": /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__("oVe7"); /** * 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; /***/ }), /***/ "n5Qe": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ../node_modules/antd/es/style/index.less var es_style = __webpack_require__("UNlL"); var style_default = /*#__PURE__*/__webpack_require__.n(es_style); // EXTERNAL MODULE: ../node_modules/antd/es/modal/style/index.less var modal_style = __webpack_require__("Kbq2"); var modal_style_default = /*#__PURE__*/__webpack_require__.n(modal_style); // EXTERNAL MODULE: ../node_modules/antd/es/button/style/index.less var button_style = __webpack_require__("ZWPf"); var button_style_default = /*#__PURE__*/__webpack_require__.n(button_style); // CONCATENATED MODULE: ../node_modules/antd/es/button/style/index.js // CONCATENATED MODULE: ../node_modules/antd/es/modal/style/index.js // style dependencies // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/extends.js var helpers_extends = __webpack_require__("T4f3"); var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__("dACh"); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/createClass.js var createClass = __webpack_require__("jx4H"); var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("VOrx"); var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn); // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/inherits.js var inherits = __webpack_require__("ZKjc"); var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits); // EXTERNAL MODULE: ../node_modules/react/index.js var react = __webpack_require__("1n8/"); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ../node_modules/react-dom/index.js var react_dom = __webpack_require__("NKHc"); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // CONCATENATED MODULE: ../node_modules/rc-util/es/KeyCode.js /** * @ignore * some key-codes definition and utils from closure-library * @author yiminghe@gmail.com */ var KeyCode = { /** * MAC_ENTER */ MAC_ENTER: 3, /** * BACKSPACE */ BACKSPACE: 8, /** * TAB */ TAB: 9, /** * NUMLOCK on FF/Safari Mac */ NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac /** * ENTER */ ENTER: 13, /** * SHIFT */ SHIFT: 16, /** * CTRL */ CTRL: 17, /** * ALT */ ALT: 18, /** * PAUSE */ PAUSE: 19, /** * CAPS_LOCK */ CAPS_LOCK: 20, /** * ESC */ ESC: 27, /** * SPACE */ SPACE: 32, /** * PAGE_UP */ PAGE_UP: 33, // also NUM_NORTH_EAST /** * PAGE_DOWN */ PAGE_DOWN: 34, // also NUM_SOUTH_EAST /** * END */ END: 35, // also NUM_SOUTH_WEST /** * HOME */ HOME: 36, // also NUM_NORTH_WEST /** * LEFT */ LEFT: 37, // also NUM_WEST /** * UP */ UP: 38, // also NUM_NORTH /** * RIGHT */ RIGHT: 39, // also NUM_EAST /** * DOWN */ DOWN: 40, // also NUM_SOUTH /** * PRINT_SCREEN */ PRINT_SCREEN: 44, /** * INSERT */ INSERT: 45, // also NUM_INSERT /** * DELETE */ DELETE: 46, // also NUM_DELETE /** * ZERO */ ZERO: 48, /** * ONE */ ONE: 49, /** * TWO */ TWO: 50, /** * THREE */ THREE: 51, /** * FOUR */ FOUR: 52, /** * FIVE */ FIVE: 53, /** * SIX */ SIX: 54, /** * SEVEN */ SEVEN: 55, /** * EIGHT */ EIGHT: 56, /** * NINE */ NINE: 57, /** * QUESTION_MARK */ QUESTION_MARK: 63, // needs localization /** * A */ A: 65, /** * B */ B: 66, /** * C */ C: 67, /** * D */ D: 68, /** * E */ E: 69, /** * F */ F: 70, /** * G */ G: 71, /** * H */ H: 72, /** * I */ I: 73, /** * J */ J: 74, /** * K */ K: 75, /** * L */ L: 76, /** * M */ M: 77, /** * N */ N: 78, /** * O */ O: 79, /** * P */ P: 80, /** * Q */ Q: 81, /** * R */ R: 82, /** * S */ S: 83, /** * T */ T: 84, /** * U */ U: 85, /** * V */ V: 86, /** * W */ W: 87, /** * X */ X: 88, /** * Y */ Y: 89, /** * Z */ Z: 90, /** * META */ META: 91, // WIN_KEY_LEFT /** * WIN_KEY_RIGHT */ WIN_KEY_RIGHT: 92, /** * CONTEXT_MENU */ CONTEXT_MENU: 93, /** * NUM_ZERO */ NUM_ZERO: 96, /** * NUM_ONE */ NUM_ONE: 97, /** * NUM_TWO */ NUM_TWO: 98, /** * NUM_THREE */ NUM_THREE: 99, /** * NUM_FOUR */ NUM_FOUR: 100, /** * NUM_FIVE */ NUM_FIVE: 101, /** * NUM_SIX */ NUM_SIX: 102, /** * NUM_SEVEN */ NUM_SEVEN: 103, /** * NUM_EIGHT */ NUM_EIGHT: 104, /** * NUM_NINE */ NUM_NINE: 105, /** * NUM_MULTIPLY */ NUM_MULTIPLY: 106, /** * NUM_PLUS */ NUM_PLUS: 107, /** * NUM_MINUS */ NUM_MINUS: 109, /** * NUM_PERIOD */ NUM_PERIOD: 110, /** * NUM_DIVISION */ NUM_DIVISION: 111, /** * F1 */ F1: 112, /** * F2 */ F2: 113, /** * F3 */ F3: 114, /** * F4 */ F4: 115, /** * F5 */ F5: 116, /** * F6 */ F6: 117, /** * F7 */ F7: 118, /** * F8 */ F8: 119, /** * F9 */ F9: 120, /** * F10 */ F10: 121, /** * F11 */ F11: 122, /** * F12 */ F12: 123, /** * NUMLOCK */ NUMLOCK: 144, /** * SEMICOLON */ SEMICOLON: 186, // needs localization /** * DASH */ DASH: 189, // needs localization /** * EQUALS */ EQUALS: 187, // needs localization /** * COMMA */ COMMA: 188, // needs localization /** * PERIOD */ PERIOD: 190, // needs localization /** * SLASH */ SLASH: 191, // needs localization /** * APOSTROPHE */ APOSTROPHE: 192, // needs localization /** * SINGLE_QUOTE */ SINGLE_QUOTE: 222, // needs localization /** * OPEN_SQUARE_BRACKET */ OPEN_SQUARE_BRACKET: 219, // needs localization /** * BACKSLASH */ BACKSLASH: 220, // needs localization /** * CLOSE_SQUARE_BRACKET */ CLOSE_SQUARE_BRACKET: 221, // needs localization /** * WIN_KEY */ WIN_KEY: 224, /** * MAC_FF_META */ MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91 /** * WIN_IME */ WIN_IME: 229 }; /* whether text and modified key is entered at the same time. */ KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) { var keyCode = e.keyCode; if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) { return false; } // The following keys are quite harmless, even in combination with // CTRL, ALT or SHIFT. switch (keyCode) { case KeyCode.ALT: case KeyCode.CAPS_LOCK: case KeyCode.CONTEXT_MENU: case KeyCode.CTRL: case KeyCode.DOWN: case KeyCode.END: case KeyCode.ESC: case KeyCode.HOME: case KeyCode.INSERT: case KeyCode.LEFT: case KeyCode.MAC_FF_META: case KeyCode.META: case KeyCode.NUMLOCK: case KeyCode.NUM_CENTER: case KeyCode.PAGE_DOWN: case KeyCode.PAGE_UP: case KeyCode.PAUSE: case KeyCode.PRINT_SCREEN: case KeyCode.RIGHT: case KeyCode.SHIFT: case KeyCode.UP: case KeyCode.WIN_KEY: case KeyCode.WIN_KEY_RIGHT: return false; default: return true; } }; /* whether character is entered. */ KeyCode.isCharacterKey = function isCharacterKey(keyCode) { if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) { return true; } if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) { return true; } if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) { return true; } // Safari sends zero key code for non-latin characters. if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) { return true; } switch (keyCode) { case KeyCode.SPACE: case KeyCode.QUESTION_MARK: case KeyCode.NUM_PLUS: case KeyCode.NUM_MINUS: case KeyCode.NUM_PERIOD: case KeyCode.NUM_DIVISION: case KeyCode.SEMICOLON: case KeyCode.DASH: case KeyCode.EQUALS: case KeyCode.COMMA: case KeyCode.PERIOD: case KeyCode.SLASH: case KeyCode.APOSTROPHE: case KeyCode.SINGLE_QUOTE: case KeyCode.OPEN_SQUARE_BRACKET: case KeyCode.BACKSLASH: case KeyCode.CLOSE_SQUARE_BRACKET: return true; default: return false; } }; /* harmony default export */ var es_KeyCode = (KeyCode); // CONCATENATED MODULE: ../node_modules/rc-util/es/Dom/contains.js function contains(root, n) { var node = n; while (node) { if (node === root) { return true; } node = node.parentNode; } return false; } // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/defineProperty.js var defineProperty = __webpack_require__("Xos8"); var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); // EXTERNAL MODULE: ../node_modules/prop-types/index.js var prop_types = __webpack_require__("5D9O"); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // CONCATENATED MODULE: ../node_modules/rc-animate/es/ChildrenUtils.js function toArrayChildren(children) { var ret = []; react_default.a.Children.forEach(children, function (child) { ret.push(child); }); return ret; } function findChildInChildrenByKey(children, key) { var ret = null; if (children) { children.forEach(function (child) { if (ret) { return; } if (child && child.key === key) { ret = child; } }); } return ret; } function findShownChildInChildrenByKey(children, key, showProp) { var ret = null; if (children) { children.forEach(function (child) { if (child && child.key === key && child.props[showProp]) { if (ret) { throw new Error('two child with same key for children'); } ret = child; } }); } return ret; } function findHiddenChildInChildrenByKey(children, key, showProp) { var found = 0; if (children) { children.forEach(function (child) { if (found) { return; } found = child && child.key === key && !child.props[showProp]; }); } return found; } function isSameChildren(c1, c2, showProp) { var same = c1.length === c2.length; if (same) { c1.forEach(function (child, index) { var child2 = c2[index]; if (child && child2) { if (child && !child2 || !child && child2) { same = false; } else if (child.key !== child2.key) { same = false; } else if (showProp && child.props[showProp] !== child2.props[showProp]) { same = false; } } }); } return same; } function mergeChildren(prev, next) { var ret = []; // For each key of `next`, the list of keys to insert before that key in // the combined list var nextChildrenPending = {}; var pendingChildren = []; prev.forEach(function (child) { if (child && findChildInChildrenByKey(next, child.key)) { if (pendingChildren.length) { nextChildrenPending[child.key] = pendingChildren; pendingChildren = []; } } else { pendingChildren.push(child); } }); next.forEach(function (child) { if (child && nextChildrenPending.hasOwnProperty(child.key)) { ret = ret.concat(nextChildrenPending[child.key]); } ret.push(child); }); ret = ret.concat(pendingChildren); return ret; } // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/typeof.js var helpers_typeof = __webpack_require__("GyB/"); var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof); // CONCATENATED MODULE: ../node_modules/css-animation/es/Event.js var EVENT_NAME_MAP = { transitionend: { transition: 'transitionend', WebkitTransition: 'webkitTransitionEnd', MozTransition: 'mozTransitionEnd', OTransition: 'oTransitionEnd', msTransition: 'MSTransitionEnd' }, animationend: { animation: 'animationend', WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'mozAnimationEnd', OAnimation: 'oAnimationEnd', msAnimation: 'MSAnimationEnd' } }; var endEvents = []; function detectEvents() { var testEl = document.createElement('div'); var style = testEl.style; if (!('AnimationEvent' in window)) { delete EVENT_NAME_MAP.animationend.animation; } if (!('TransitionEvent' in window)) { delete EVENT_NAME_MAP.transitionend.transition; } for (var baseEventName in EVENT_NAME_MAP) { if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) { var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { endEvents.push(baseEvents[styleName]); break; } } } } } if (typeof window !== 'undefined' && typeof document !== 'undefined') { detectEvents(); } function addEventListener(node, eventName, eventListener) { node.addEventListener(eventName, eventListener, false); } function removeEventListener(node, eventName, eventListener) { node.removeEventListener(eventName, eventListener, false); } var TransitionEvents = { addEndEventListener: function addEndEventListener(node, eventListener) { if (endEvents.length === 0) { window.setTimeout(eventListener, 0); return; } endEvents.forEach(function (endEvent) { addEventListener(node, endEvent, eventListener); }); }, endEvents: endEvents, removeEndEventListener: function removeEndEventListener(node, eventListener) { if (endEvents.length === 0) { return; } endEvents.forEach(function (endEvent) { removeEventListener(node, endEvent, eventListener); }); } }; /* harmony default export */ var Event = (TransitionEvents); // EXTERNAL MODULE: ../node_modules/component-classes/index.js var component_classes = __webpack_require__("m+xf"); var component_classes_default = /*#__PURE__*/__webpack_require__.n(component_classes); // CONCATENATED MODULE: ../node_modules/css-animation/es/index.js var isCssAnimationSupported = Event.endEvents.length !== 0; var capitalPrefixes = ['Webkit', 'Moz', 'O', // ms is special .... ! 'ms']; var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', '']; function getStyleProperty(node, name) { // old ff need null, https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle var style = window.getComputedStyle(node, null); var ret = ''; for (var i = 0; i < prefixes.length; i++) { ret = style.getPropertyValue(prefixes[i] + name); if (ret) { break; } } return ret; } function fixBrowserByTimeout(node) { if (isCssAnimationSupported) { var transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0; var transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0; var animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0; var animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0; var time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay); // sometimes, browser bug node.rcEndAnimTimeout = setTimeout(function () { node.rcEndAnimTimeout = null; if (node.rcEndListener) { node.rcEndListener(); } }, time * 1000 + 200); } } function clearBrowserBugTimeout(node) { if (node.rcEndAnimTimeout) { clearTimeout(node.rcEndAnimTimeout); node.rcEndAnimTimeout = null; } } var es_cssAnimation = function cssAnimation(node, transitionName, endCallback) { var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : typeof_default()(transitionName)) === 'object'; var className = nameIsObj ? transitionName.name : transitionName; var activeClassName = nameIsObj ? transitionName.active : transitionName + '-active'; var end = endCallback; var start = void 0; var active = void 0; var nodeClasses = component_classes_default()(node); if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') { end = endCallback.end; start = endCallback.start; active = endCallback.active; } if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); nodeClasses.remove(className); nodeClasses.remove(activeClassName); Event.removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional end is used for informing an owner of // a leave animation and telling it to remove the child. if (end) { end(); } }; Event.addEndEventListener(node, node.rcEndListener); if (start) { start(); } nodeClasses.add(className); node.rcAnimTimeout = setTimeout(function () { node.rcAnimTimeout = null; nodeClasses.add(activeClassName); if (active) { setTimeout(active, 0); } fixBrowserByTimeout(node); // 30ms for firefox }, 30); return { stop: function stop() { if (node.rcEndListener) { node.rcEndListener(); } } }; }; es_cssAnimation.style = function (node, style, callback) { if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); Event.removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional callback is used for informing an owner of // a leave animation and telling it to remove the child. if (callback) { callback(); } }; Event.addEndEventListener(node, node.rcEndListener); node.rcAnimTimeout = setTimeout(function () { for (var s in style) { if (style.hasOwnProperty(s)) { node.style[s] = style[s]; } } node.rcAnimTimeout = null; fixBrowserByTimeout(node); }, 0); }; es_cssAnimation.setTransition = function (node, p, value) { var property = p; var v = value; if (value === undefined) { v = property; property = ''; } property = property || ''; capitalPrefixes.forEach(function (prefix) { node.style[prefix + 'Transition' + property] = v; }); }; es_cssAnimation.isCssAnimationSupported = isCssAnimationSupported; /* harmony default export */ var es = (es_cssAnimation); // CONCATENATED MODULE: ../node_modules/rc-animate/es/util.js var util = { isAppearSupported: function isAppearSupported(props) { return props.transitionName && props.transitionAppear || props.animation.appear; }, isEnterSupported: function isEnterSupported(props) { return props.transitionName && props.transitionEnter || props.animation.enter; }, isLeaveSupported: function isLeaveSupported(props) { return props.transitionName && props.transitionLeave || props.animation.leave; }, allowAppearCallback: function allowAppearCallback(props) { return props.transitionAppear || props.animation.appear; }, allowEnterCallback: function allowEnterCallback(props) { return props.transitionEnter || props.animation.enter; }, allowLeaveCallback: function allowLeaveCallback(props) { return props.transitionLeave || props.animation.leave; } }; /* harmony default export */ var es_util = (util); // CONCATENATED MODULE: ../node_modules/rc-animate/es/AnimateChild.js var transitionMap = { enter: 'transitionEnter', appear: 'transitionAppear', leave: 'transitionLeave' }; var AnimateChild_AnimateChild = function (_React$Component) { inherits_default()(AnimateChild, _React$Component); function AnimateChild() { classCallCheck_default()(this, AnimateChild); return possibleConstructorReturn_default()(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).apply(this, arguments)); } createClass_default()(AnimateChild, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.stop(); } }, { key: 'componentWillEnter', value: function componentWillEnter(done) { if (es_util.isEnterSupported(this.props)) { this.transition('enter', done); } else { done(); } } }, { key: 'componentWillAppear', value: function componentWillAppear(done) { if (es_util.isAppearSupported(this.props)) { this.transition('appear', done); } else { done(); } } }, { key: 'componentWillLeave', value: function componentWillLeave(done) { if (es_util.isLeaveSupported(this.props)) { this.transition('leave', done); } else { // always sync, do not interupt with react component life cycle // update hidden -> animate hidden -> // didUpdate -> animate leave -> unmount (if animate is none) done(); } } }, { key: 'transition', value: function transition(animationType, finishCallback) { var _this2 = this; var node = react_dom_default.a.findDOMNode(this); var props = this.props; var transitionName = props.transitionName; var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : typeof_default()(transitionName)) === 'object'; this.stop(); var end = function end() { _this2.stopper = null; finishCallback(); }; if ((isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType; var activeName = name + '-active'; if (nameIsObj && transitionName[animationType + 'Active']) { activeName = transitionName[animationType + 'Active']; } this.stopper = es(node, { name: name, active: activeName }, end); } else { this.stopper = props.animation[animationType](node, end); } } }, { key: 'stop', value: function stop() { var stopper = this.stopper; if (stopper) { this.stopper = null; stopper.stop(); } } }, { key: 'render', value: function render() { return this.props.children; } }]); return AnimateChild; }(react_default.a.Component); AnimateChild_AnimateChild.propTypes = { children: prop_types_default.a.any }; /* harmony default export */ var es_AnimateChild = (AnimateChild_AnimateChild); // CONCATENATED MODULE: ../node_modules/rc-animate/es/Animate.js var defaultKey = 'rc_animate_' + Date.now(); function getChildrenFromProps(props) { var children = props.children; if (react_default.a.isValidElement(children)) { if (!children.key) { return react_default.a.cloneElement(children, { key: defaultKey }); } } return children; } function noop() {} var Animate_Animate = function (_React$Component) { inherits_default()(Animate, _React$Component); // eslint-disable-line function Animate(props) { classCallCheck_default()(this, Animate); var _this = possibleConstructorReturn_default()(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props)); Animate__initialiseProps.call(_this); _this.currentlyAnimatingKeys = {}; _this.keysToEnter = []; _this.keysToLeave = []; _this.state = { children: toArrayChildren(getChildrenFromProps(props)) }; _this.childrenRefs = {}; return _this; } createClass_default()(Animate, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; var showProp = this.props.showProp; var children = this.state.children; if (showProp) { children = children.filter(function (child) { return !!child.props[showProp]; }); } children.forEach(function (child) { if (child) { _this2.performAppear(child.key); } }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var _this3 = this; this.nextProps = nextProps; var nextChildren = toArrayChildren(getChildrenFromProps(nextProps)); var props = this.props; // exclusive needs immediate response if (props.exclusive) { Object.keys(this.currentlyAnimatingKeys).forEach(function (key) { _this3.stop(key); }); } var showProp = props.showProp; var currentlyAnimatingKeys = this.currentlyAnimatingKeys; // last props children if exclusive var currentChildren = props.exclusive ? toArrayChildren(getChildrenFromProps(props)) : this.state.children; // in case destroy in showProp mode var newChildren = []; if (showProp) { currentChildren.forEach(function (currentChild) { var nextChild = currentChild && findChildInChildrenByKey(nextChildren, currentChild.key); var newChild = void 0; if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { newChild = react_default.a.cloneElement(nextChild || currentChild, defineProperty_default()({}, showProp, true)); } else { newChild = nextChild; } if (newChild) { newChildren.push(newChild); } }); nextChildren.forEach(function (nextChild) { if (!nextChild || !findChildInChildrenByKey(currentChildren, nextChild.key)) { newChildren.push(nextChild); } }); } else { newChildren = mergeChildren(currentChildren, nextChildren); } // need render to avoid update this.setState({ children: newChildren }); nextChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasPrev = child && findChildInChildrenByKey(currentChildren, key); if (showProp) { var showInNext = child.props[showProp]; if (hasPrev) { var showInNow = findShownChildInChildrenByKey(currentChildren, key, showProp); if (!showInNow && showInNext) { _this3.keysToEnter.push(key); } } else if (showInNext) { _this3.keysToEnter.push(key); } } else if (!hasPrev) { _this3.keysToEnter.push(key); } }); currentChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasNext = child && findChildInChildrenByKey(nextChildren, key); if (showProp) { var showInNow = child.props[showProp]; if (hasNext) { var showInNext = findShownChildInChildrenByKey(nextChildren, key, showProp); if (!showInNext && showInNow) { _this3.keysToLeave.push(key); } } else if (showInNow) { _this3.keysToLeave.push(key); } } else if (!hasNext) { _this3.keysToLeave.push(key); } }); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { var keysToEnter = this.keysToEnter; this.keysToEnter = []; keysToEnter.forEach(this.performEnter); var keysToLeave = this.keysToLeave; this.keysToLeave = []; keysToLeave.forEach(this.performLeave); } }, { key: 'isValidChildByKey', value: function isValidChildByKey(currentChildren, key) { var showProp = this.props.showProp; if (showProp) { return findShownChildInChildrenByKey(currentChildren, key, showProp); } return findChildInChildrenByKey(currentChildren, key); } }, { key: 'stop', value: function stop(key) { delete this.currentlyAnimatingKeys[key]; var component = this.childrenRefs[key]; if (component) { component.stop(); } } }, { key: 'render', value: function render() { var _this4 = this; var props = this.props; this.nextProps = props; var stateChildren = this.state.children; var children = null; if (stateChildren) { children = stateChildren.map(function (child) { if (child === null || child === undefined) { return child; } if (!child.key) { throw new Error('must set key for children'); } return react_default.a.createElement( es_AnimateChild, { key: child.key, ref: function ref(node) { return _this4.childrenRefs[child.key] = node; }, animation: props.animation, transitionName: props.transitionName, transitionEnter: props.transitionEnter, transitionAppear: props.transitionAppear, transitionLeave: props.transitionLeave }, child ); }); } var Component = props.component; if (Component) { var passedProps = props; if (typeof Component === 'string') { passedProps = extends_default()({ className: props.className, style: props.style }, props.componentProps); } return react_default.a.createElement( Component, passedProps, children ); } return children[0] || null; } }]); return Animate; }(react_default.a.Component); Animate_Animate.isAnimate = true; Animate_Animate.propTypes = { component: prop_types_default.a.any, componentProps: prop_types_default.a.object, animation: prop_types_default.a.object, transitionName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), transitionEnter: prop_types_default.a.bool, transitionAppear: prop_types_default.a.bool, exclusive: prop_types_default.a.bool, transitionLeave: prop_types_default.a.bool, onEnd: prop_types_default.a.func, onEnter: prop_types_default.a.func, onLeave: prop_types_default.a.func, onAppear: prop_types_default.a.func, showProp: prop_types_default.a.string }; Animate_Animate.defaultProps = { animation: {}, component: 'span', componentProps: {}, transitionEnter: true, transitionLeave: true, transitionAppear: false, onEnd: noop, onEnter: noop, onLeave: noop, onAppear: noop }; var Animate__initialiseProps = function _initialiseProps() { var _this5 = this; this.performEnter = function (key) { // may already remove by exclusive if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter')); } }; this.performAppear = function (key) { if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear')); } }; this.handleDoneAdding = function (key, type) { var props = _this5.props; delete _this5.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this5.nextProps) { return; } var currentChildren = toArrayChildren(getChildrenFromProps(props)); if (!_this5.isValidChildByKey(currentChildren, key)) { // exclusive will not need this _this5.performLeave(key); } else { if (type === 'appear') { if (es_util.allowAppearCallback(props)) { props.onAppear(key); props.onEnd(key, true); } } else { if (es_util.allowEnterCallback(props)) { props.onEnter(key); props.onEnd(key, true); } } } }; this.performLeave = function (key) { // may already remove by exclusive if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key)); } }; this.handleDoneLeaving = function (key) { var props = _this5.props; delete _this5.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this5.nextProps) { return; } var currentChildren = toArrayChildren(getChildrenFromProps(props)); // in case state change is too fast if (_this5.isValidChildByKey(currentChildren, key)) { _this5.performEnter(key); } else { var end = function end() { if (es_util.allowLeaveCallback(props)) { props.onLeave(key); props.onEnd(key, false); } }; if (!isSameChildren(_this5.state.children, currentChildren, props.showProp)) { _this5.setState({ children: currentChildren }, end); } else { end(); } } }; }; /* harmony default export */ var es_Animate = (Animate_Animate); // CONCATENATED MODULE: ../node_modules/rc-dialog/es/LazyRenderBox.js var LazyRenderBox_LazyRenderBox = function (_React$Component) { inherits_default()(LazyRenderBox, _React$Component); function LazyRenderBox() { classCallCheck_default()(this, LazyRenderBox); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return !!nextProps.hiddenClassName || !!nextProps.visible; }; LazyRenderBox.prototype.render = function render() { var className = this.props.className; if (!!this.props.hiddenClassName && !this.props.visible) { className += " " + this.props.hiddenClassName; } var props = extends_default()({}, this.props); delete props.hiddenClassName; delete props.visible; props.className = className; return react["createElement"]("div", extends_default()({}, props)); }; return LazyRenderBox; }(react["Component"]); /* harmony default export */ var es_LazyRenderBox = (LazyRenderBox_LazyRenderBox); // CONCATENATED MODULE: ../node_modules/rc-util/es/getScrollBarSize.js var cached = void 0; function getScrollBarSize(fresh) { if (fresh || cached === undefined) { var inner = document.createElement('div'); inner.style.width = '100%'; inner.style.height = '200px'; var outer = document.createElement('div'); var outerStyle = outer.style; outerStyle.position = 'absolute'; outerStyle.top = 0; outerStyle.left = 0; outerStyle.pointerEvents = 'none'; outerStyle.visibility = 'hidden'; outerStyle.width = '200px'; outerStyle.height = '150px'; outerStyle.overflow = 'hidden'; outer.appendChild(inner); document.body.appendChild(outer); var widthContained = inner.offsetWidth; outer.style.overflow = 'scroll'; var widthScroll = inner.offsetWidth; if (widthContained === widthScroll) { widthScroll = outer.clientWidth; } document.body.removeChild(outer); cached = widthContained - widthScroll; } return cached; } // CONCATENATED MODULE: ../node_modules/rc-dialog/es/Dialog.js var uuid = 0; var openCount = 0; /* eslint react/no-is-mounted:0 */ function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; ret = d.documentElement[method]; if (typeof ret !== 'number') { ret = d.body[method]; } } return ret; } function setTransformOrigin(node, value) { var style = node.style; ['Webkit', 'Moz', 'Ms', 'ms'].forEach(function (prefix) { style[prefix + 'TransformOrigin'] = value; }); style['transformOrigin'] = value; } function Dialog_offset(el) { var rect = el.getBoundingClientRect(); var pos = { left: rect.left, top: rect.top }; var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScroll(w); pos.top += getScroll(w, true); return pos; } var Dialog_Dialog = function (_React$Component) { inherits_default()(Dialog, _React$Component); function Dialog() { classCallCheck_default()(this, Dialog); var _this = possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); _this.onAnimateLeave = function () { var afterClose = _this.props.afterClose; // need demo? // https://github.com/react-component/dialog/pull/28 if (_this.wrap) { _this.wrap.style.display = 'none'; } _this.inTransition = false; _this.removeScrollingEffect(); if (afterClose) { afterClose(); } }; _this.onMaskClick = function (e) { // android trigger click on open (fastclick??) if (Date.now() - _this.openTime < 300) { return; } if (e.target === e.currentTarget) { _this.close(e); } }; _this.onKeyDown = function (e) { var props = _this.props; if (props.keyboard && e.keyCode === es_KeyCode.ESC) { e.stopPropagation(); _this.close(e); return; } // keep focus inside dialog if (props.visible) { if (e.keyCode === es_KeyCode.TAB) { var activeElement = document.activeElement; var dialogRoot = _this.wrap; if (e.shiftKey) { if (activeElement === dialogRoot) { _this.sentinel.focus(); } } else if (activeElement === _this.sentinel) { dialogRoot.focus(); } } } }; _this.getDialogElement = function () { var props = _this.props; var closable = props.closable; var prefixCls = props.prefixCls; var dest = {}; if (props.width !== undefined) { dest.width = props.width; } if (props.height !== undefined) { dest.height = props.height; } var footer = void 0; if (props.footer) { footer = react["createElement"]("div", { className: prefixCls + '-footer', ref: _this.saveRef('footer') }, props.footer); } var header = void 0; if (props.title) { header = react["createElement"]("div", { className: prefixCls + '-header', ref: _this.saveRef('header') }, react["createElement"]("div", { className: prefixCls + '-title', id: _this.titleId }, props.title)); } var closer = void 0; if (closable) { closer = react["createElement"]("button", { onClick: _this.close, "aria-label": "Close", className: prefixCls + '-close' }, react["createElement"]("span", { className: prefixCls + '-close-x' })); } var style = extends_default()({}, props.style, dest); var transitionName = _this.getTransitionName(); var dialogElement = react["createElement"](es_LazyRenderBox, { key: "dialog-element", role: "document", ref: _this.saveRef('dialog'), style: style, className: prefixCls + ' ' + (props.className || ''), visible: props.visible }, react["createElement"]("div", { className: prefixCls + '-content' }, closer, header, react["createElement"]("div", extends_default()({ className: prefixCls + '-body', style: props.bodyStyle, ref: _this.saveRef('body') }, props.bodyProps), props.children), footer), react["createElement"]("div", { tabIndex: 0, ref: _this.saveRef('sentinel'), style: { width: 0, height: 0, overflow: 'hidden' } }, "sentinel")); return react["createElement"](es_Animate, { key: "dialog", showProp: "visible", onLeave: _this.onAnimateLeave, transitionName: transitionName, component: "", transitionAppear: true }, props.visible || !props.destroyOnClose ? dialogElement : null); }; _this.getZIndexStyle = function () { var style = {}; var props = _this.props; if (props.zIndex !== undefined) { style.zIndex = props.zIndex; } return style; }; _this.getWrapStyle = function () { return extends_default()({}, _this.getZIndexStyle(), _this.props.wrapStyle); }; _this.getMaskStyle = function () { return extends_default()({}, _this.getZIndexStyle(), _this.props.maskStyle); }; _this.getMaskElement = function () { var props = _this.props; var maskElement = void 0; if (props.mask) { var maskTransition = _this.getMaskTransitionName(); maskElement = react["createElement"](es_LazyRenderBox, extends_default()({ style: _this.getMaskStyle(), key: "mask", className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }, props.maskProps)); if (maskTransition) { maskElement = react["createElement"](es_Animate, { key: "mask", showProp: "visible", transitionAppear: true, component: "", transitionName: maskTransition }, maskElement); } } return maskElement; }; _this.getMaskTransitionName = function () { var props = _this.props; var transitionName = props.maskTransitionName; var animation = props.maskAnimation; if (!transitionName && animation) { transitionName = props.prefixCls + '-' + animation; } return transitionName; }; _this.getTransitionName = function () { var props = _this.props; var transitionName = props.transitionName; var animation = props.animation; if (!transitionName && animation) { transitionName = props.prefixCls + '-' + animation; } return transitionName; }; _this.setScrollbar = function () { if (_this.bodyIsOverflowing && _this.scrollbarWidth !== undefined) { document.body.style.paddingRight = _this.scrollbarWidth + 'px'; } }; _this.addScrollingEffect = function () { openCount++; if (openCount !== 1) { return; } _this.checkScrollbar(); _this.setScrollbar(); document.body.style.overflow = 'hidden'; // this.adjustDialog(); }; _this.removeScrollingEffect = function () { openCount--; if (openCount !== 0) { return; } document.body.style.overflow = ''; _this.resetScrollbar(); // this.resetAdjustments(); }; _this.close = function (e) { var onClose = _this.props.onClose; if (onClose) { onClose(e); } }; _this.checkScrollbar = function () { var fullWindowWidth = window.innerWidth; if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 var documentElementRect = document.documentElement.getBoundingClientRect(); fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left); } _this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth; if (_this.bodyIsOverflowing) { _this.scrollbarWidth = getScrollBarSize(); } }; _this.resetScrollbar = function () { document.body.style.paddingRight = ''; }; _this.adjustDialog = function () { if (_this.wrap && _this.scrollbarWidth !== undefined) { var modalIsOverflowing = _this.wrap.scrollHeight > document.documentElement.clientHeight; _this.wrap.style.paddingLeft = (!_this.bodyIsOverflowing && modalIsOverflowing ? _this.scrollbarWidth : '') + 'px'; _this.wrap.style.paddingRight = (_this.bodyIsOverflowing && !modalIsOverflowing ? _this.scrollbarWidth : '') + 'px'; } }; _this.resetAdjustments = function () { if (_this.wrap) { _this.wrap.style.paddingLeft = _this.wrap.style.paddingLeft = ''; } }; _this.saveRef = function (name) { return function (node) { _this[name] = node; }; }; return _this; } Dialog.prototype.componentWillMount = function componentWillMount() { this.inTransition = false; this.titleId = 'rcDialogTitle' + uuid++; }; Dialog.prototype.componentDidMount = function componentDidMount() { this.componentDidUpdate({}); }; Dialog.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { var props = this.props; var mousePosition = this.props.mousePosition; if (props.visible) { // first show if (!prevProps.visible) { this.openTime = Date.now(); this.addScrollingEffect(); this.tryFocus(); var dialogNode = react_dom["findDOMNode"](this.dialog); if (mousePosition) { var elOffset = Dialog_offset(dialogNode); setTransformOrigin(dialogNode, mousePosition.x - elOffset.left + 'px ' + (mousePosition.y - elOffset.top) + 'px'); } else { setTransformOrigin(dialogNode, ''); } } } else if (prevProps.visible) { this.inTransition = true; if (props.mask && this.lastOutSideFocusNode) { try { this.lastOutSideFocusNode.focus(); } catch (e) { this.lastOutSideFocusNode = null; } this.lastOutSideFocusNode = null; } } }; Dialog.prototype.componentWillUnmount = function componentWillUnmount() { if (this.props.visible || this.inTransition) { this.removeScrollingEffect(); } }; Dialog.prototype.tryFocus = function tryFocus() { if (!contains(this.wrap, document.activeElement)) { this.lastOutSideFocusNode = document.activeElement; this.wrap.focus(); } }; Dialog.prototype.render = function render() { var props = this.props; var prefixCls = props.prefixCls, maskClosable = props.maskClosable; var style = this.getWrapStyle(); // clear hide display // and only set display after async anim, not here for hide if (props.visible) { style.display = null; } return react["createElement"]("div", null, this.getMaskElement(), react["createElement"]("div", extends_default()({ tabIndex: -1, onKeyDown: this.onKeyDown, className: prefixCls + '-wrap ' + (props.wrapClassName || ''), ref: this.saveRef('wrap'), onClick: maskClosable ? this.onMaskClick : undefined, role: "dialog", "aria-labelledby": props.title ? this.titleId : null, style: style }, props.wrapProps), this.getDialogElement())); }; return Dialog; }(react["Component"]); /* harmony default export */ var es_Dialog = (Dialog_Dialog); Dialog_Dialog.defaultProps = { className: '', mask: true, visible: false, keyboard: true, closable: true, maskClosable: true, destroyOnClose: false, prefixCls: 'rc-dialog' }; // CONCATENATED MODULE: ../node_modules/rc-util/es/ContainerRender.js var ContainerRender_ContainerRender = function (_React$Component) { inherits_default()(ContainerRender, _React$Component); function ContainerRender() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, ContainerRender); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = ContainerRender.__proto__ || Object.getPrototypeOf(ContainerRender)).call.apply(_ref, [this].concat(args))), _this), _this.removeContainer = function () { if (_this.container) { react_dom_default.a.unmountComponentAtNode(_this.container); _this.container.parentNode.removeChild(_this.container); _this.container = null; } }, _this.renderComponent = function (props, ready) { var _this$props = _this.props, visible = _this$props.visible, getComponent = _this$props.getComponent, forceRender = _this$props.forceRender, getContainer = _this$props.getContainer, parent = _this$props.parent; if (visible || parent._component || forceRender) { if (!_this.container) { _this.container = getContainer(); } react_dom_default.a.unstable_renderSubtreeIntoContainer(parent, getComponent(props), _this.container, function callback() { if (ready) { ready.call(this); } }); } }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(ContainerRender, [{ key: 'componentDidMount', value: function componentDidMount() { if (this.props.autoMount) { this.renderComponent(); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { if (this.props.autoMount) { this.renderComponent(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.props.autoDestroy) { this.removeContainer(); } } }, { key: 'render', value: function render() { return this.props.children({ renderComponent: this.renderComponent, removeContainer: this.removeContainer }); } }]); return ContainerRender; }(react_default.a.Component); ContainerRender_ContainerRender.propTypes = { autoMount: prop_types_default.a.bool, autoDestroy: prop_types_default.a.bool, visible: prop_types_default.a.bool, forceRender: prop_types_default.a.bool, parent: prop_types_default.a.any, getComponent: prop_types_default.a.func.isRequired, getContainer: prop_types_default.a.func.isRequired, children: prop_types_default.a.func.isRequired }; ContainerRender_ContainerRender.defaultProps = { autoMount: true, autoDestroy: true, forceRender: false }; /* harmony default export */ var es_ContainerRender = (ContainerRender_ContainerRender); // CONCATENATED MODULE: ../node_modules/rc-util/es/Portal.js var Portal_Portal = function (_React$Component) { inherits_default()(Portal, _React$Component); function Portal() { classCallCheck_default()(this, Portal); return possibleConstructorReturn_default()(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments)); } createClass_default()(Portal, [{ key: 'componentDidMount', value: function componentDidMount() { this.createContainer(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { var didUpdate = this.props.didUpdate; if (didUpdate) { didUpdate(prevProps); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.removeContainer(); } }, { key: 'createContainer', value: function createContainer() { this._container = this.props.getContainer(); this.forceUpdate(); } }, { key: 'removeContainer', value: function removeContainer() { if (this._container) { this._container.parentNode.removeChild(this._container); } } }, { key: 'render', value: function render() { if (this._container) { return react_dom_default.a.createPortal(this.props.children, this._container); } return null; } }]); return Portal; }(react_default.a.Component); Portal_Portal.propTypes = { getContainer: prop_types_default.a.func.isRequired, children: prop_types_default.a.node.isRequired, didUpdate: prop_types_default.a.func }; /* harmony default export */ var es_Portal = (Portal_Portal); // CONCATENATED MODULE: ../node_modules/rc-dialog/es/DialogWrap.js var IS_REACT_16 = 'createPortal' in react_dom; var DialogWrap_DialogWrap = function (_React$Component) { inherits_default()(DialogWrap, _React$Component); function DialogWrap() { classCallCheck_default()(this, DialogWrap); var _this = possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); _this.saveDialog = function (node) { _this._component = node; }; _this.getComponent = function () { var extra = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return react["createElement"](es_Dialog, extends_default()({ ref: _this.saveDialog }, _this.props, extra, { key: "dialog" })); }; // fix issue #10656 /* * Custom container should not be return, because in the Portal component, it will remove the * return container element here, if the custom container is the only child of it's component, * like issue #10656, It will has a conflict with removeChild method in react-dom. * So here should add a child (div element) to custom container. * */ _this.getContainer = function () { var container = document.createElement('div'); if (_this.props.getContainer) { _this.props.getContainer().appendChild(container); } else { document.body.appendChild(container); } return container; }; return _this; } DialogWrap.prototype.shouldComponentUpdate = function shouldComponentUpdate(_ref) { var visible = _ref.visible; return !!(this.props.visible || visible); }; DialogWrap.prototype.componentWillUnmount = function componentWillUnmount() { if (IS_REACT_16) { return; } if (this.props.visible) { this.renderComponent({ afterClose: this.removeContainer, onClose: function onClose() {}, visible: false }); } else { this.removeContainer(); } }; DialogWrap.prototype.render = function render() { var _this2 = this; var visible = this.props.visible; var portal = null; if (!IS_REACT_16) { return react["createElement"](es_ContainerRender, { parent: this, visible: visible, autoDestroy: false, getComponent: this.getComponent, getContainer: this.getContainer }, function (_ref2) { var renderComponent = _ref2.renderComponent, removeContainer = _ref2.removeContainer; _this2.renderComponent = renderComponent; _this2.removeContainer = removeContainer; return null; }); } if (visible || this._component) { portal = react["createElement"](es_Portal, { getContainer: this.getContainer }, this.getComponent()); } return portal; }; return DialogWrap; }(react["Component"]); DialogWrap_DialogWrap.defaultProps = { visible: false }; /* harmony default export */ var es_DialogWrap = (DialogWrap_DialogWrap); // EXTERNAL MODULE: ../node_modules/add-dom-event-listener/lib/index.js var lib = __webpack_require__("Q38I"); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // CONCATENATED MODULE: ../node_modules/rc-util/es/Dom/addEventListener.js function addEventListenerWrap(target, eventType, cb) { /* eslint camelcase: 2 */ var callback = react_dom_default.a.unstable_batchedUpdates ? function run(e) { react_dom_default.a.unstable_batchedUpdates(cb, e); } : cb; return lib_default()(target, eventType, callback); } // EXTERNAL MODULE: ../node_modules/classnames/index.js var classnames = __webpack_require__("9qb7"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ../node_modules/omit.js/es/index.js function omit(obj, fields) { var shallowCopy = extends_default()({}, obj); for (var i = 0; i < fields.length; i++) { var key = fields[i]; delete shallowCopy[key]; } return shallowCopy; } /* harmony default export */ var omit_js_es = (omit); // CONCATENATED MODULE: ../node_modules/antd/es/icon/index.js var icon_Icon = function Icon(props) { var type = props.type, _props$className = props.className, className = _props$className === undefined ? '' : _props$className, spin = props.spin; var classString = classnames_default()(defineProperty_default()({ anticon: true, 'anticon-spin': !!spin || type === 'loading' }, 'anticon-' + type, true), className); return react["createElement"]('i', extends_default()({}, omit_js_es(props, ['type', 'spin']), { className: classString })); }; /* harmony default export */ var es_icon = (icon_Icon); // CONCATENATED MODULE: ../node_modules/antd/es/button/button.js var __rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/; var isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar); function isString(str) { return typeof str === 'string'; } // Insert one space between two chinese characters automatically. function insertSpace(child, needInserted) { // Check the child if is undefined or null. if (child == null) { return; } var SPACE = needInserted ? ' ' : ''; // strictNullChecks oops. if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) { return react["cloneElement"](child, {}, child.props.children.split('').join(SPACE)); } if (typeof child === 'string') { if (isTwoCNChar(child)) { child = child.split('').join(SPACE); } return react["createElement"]( 'span', null, child ); } return child; } var button_Button = function (_React$Component) { inherits_default()(Button, _React$Component); function Button(props) { classCallCheck_default()(this, Button); var _this = possibleConstructorReturn_default()(this, (Button.__proto__ || Object.getPrototypeOf(Button)).call(this, props)); _this.handleClick = function (e) { // Add click effect _this.setState({ clicked: true }); clearTimeout(_this.timeout); _this.timeout = window.setTimeout(function () { return _this.setState({ clicked: false }); }, 500); var onClick = _this.props.onClick; if (onClick) { onClick(e); } }; _this.state = { loading: props.loading, clicked: false, hasTwoCNChar: false }; return _this; } createClass_default()(Button, [{ key: 'componentDidMount', value: function componentDidMount() { this.fixTwoCNChar(); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var _this2 = this; var currentLoading = this.props.loading; var loading = nextProps.loading; if (currentLoading) { clearTimeout(this.delayTimeout); } if (typeof loading !== 'boolean' && loading && loading.delay) { this.delayTimeout = window.setTimeout(function () { return _this2.setState({ loading: loading }); }, loading.delay); } else { this.setState({ loading: loading }); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { this.fixTwoCNChar(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.timeout) { clearTimeout(this.timeout); } if (this.delayTimeout) { clearTimeout(this.delayTimeout); } } }, { key: 'fixTwoCNChar', value: function fixTwoCNChar() { // Fix for HOC usage like var node = Object(react_dom["findDOMNode"])(this); var buttonText = node.textContent || node.innerText; if (this.isNeedInserted() && isTwoCNChar(buttonText)) { if (!this.state.hasTwoCNChar) { this.setState({ hasTwoCNChar: true }); } } else if (this.state.hasTwoCNChar) { this.setState({ hasTwoCNChar: false }); } } }, { key: 'isNeedInserted', value: function isNeedInserted() { var _props = this.props, icon = _props.icon, children = _props.children; return react["Children"].count(children) === 1 && !icon; } }, { key: 'render', value: function render() { var _classNames, _this3 = this; var _a = this.props, type = _a.type, shape = _a.shape, size = _a.size, className = _a.className, children = _a.children, icon = _a.icon, prefixCls = _a.prefixCls, ghost = _a.ghost, _loadingProp = _a.loading, rest = __rest(_a, ["type", "shape", "size", "className", "children", "icon", "prefixCls", "ghost", "loading"]);var _state = this.state, loading = _state.loading, clicked = _state.clicked, hasTwoCNChar = _state.hasTwoCNChar; // large => lg // small => sm var sizeCls = ''; switch (size) { case 'large': sizeCls = 'lg'; break; case 'small': sizeCls = 'sm'; default: break; } var classes = classnames_default()(prefixCls, className, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-' + type, type), defineProperty_default()(_classNames, prefixCls + '-' + shape, shape), defineProperty_default()(_classNames, prefixCls + '-' + sizeCls, sizeCls), defineProperty_default()(_classNames, prefixCls + '-icon-only', !children && icon), defineProperty_default()(_classNames, prefixCls + '-loading', loading), defineProperty_default()(_classNames, prefixCls + '-clicked', clicked), defineProperty_default()(_classNames, prefixCls + '-background-ghost', ghost), defineProperty_default()(_classNames, prefixCls + '-two-chinese-chars', hasTwoCNChar), _classNames)); var iconType = loading ? 'loading' : icon; var iconNode = iconType ? react["createElement"](es_icon, { type: iconType }) : null; var kids = children || children === 0 ? react["Children"].map(children, function (child) { return insertSpace(child, _this3.isNeedInserted()); }) : null; if ('href' in rest) { return react["createElement"]( 'a', extends_default()({}, rest, { className: classes, onClick: this.handleClick }), iconNode, kids ); } else { // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`. var htmlType = rest.htmlType, otherProps = __rest(rest, ["htmlType"]); return react["createElement"]( 'button', extends_default()({}, otherProps, { type: htmlType || 'button', className: classes, onClick: this.handleClick }), iconNode, kids ); } } }]); return Button; }(react["Component"]); /* harmony default export */ var button_button = (button_Button); button_Button.__ANT_BUTTON = true; button_Button.defaultProps = { prefixCls: 'ant-btn', loading: false, ghost: false }; button_Button.propTypes = { type: prop_types_default.a.string, shape: prop_types_default.a.oneOf(['circle', 'circle-outline']), size: prop_types_default.a.oneOf(['large', 'default', 'small']), htmlType: prop_types_default.a.oneOf(['submit', 'button', 'reset']), onClick: prop_types_default.a.func, loading: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object]), className: prop_types_default.a.string, icon: prop_types_default.a.string }; // CONCATENATED MODULE: ../node_modules/antd/es/button/button-group.js var button_group___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var button_group_ButtonGroup = function ButtonGroup(props) { var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === undefined ? 'ant-btn-group' : _props$prefixCls, size = props.size, className = props.className, others = button_group___rest(props, ["prefixCls", "size", "className"]); // large => lg // small => sm var sizeCls = ''; switch (size) { case 'large': sizeCls = 'lg'; break; case 'small': sizeCls = 'sm'; default: break; } var classes = classnames_default()(prefixCls, defineProperty_default()({}, prefixCls + '-' + sizeCls, sizeCls), className); return react["createElement"]('div', extends_default()({}, others, { className: classes })); }; /* harmony default export */ var button_group = (button_group_ButtonGroup); // CONCATENATED MODULE: ../node_modules/antd/es/button/index.js button_button.Group = button_group; /* harmony default export */ var es_button = (button_button); // CONCATENATED MODULE: ../node_modules/antd/es/locale-provider/LocaleReceiver.js var LocaleReceiver_LocaleReceiver = function (_React$Component) { inherits_default()(LocaleReceiver, _React$Component); function LocaleReceiver() { classCallCheck_default()(this, LocaleReceiver); return possibleConstructorReturn_default()(this, (LocaleReceiver.__proto__ || Object.getPrototypeOf(LocaleReceiver)).apply(this, arguments)); } createClass_default()(LocaleReceiver, [{ key: 'getLocale', value: function getLocale() { var _props = this.props, componentName = _props.componentName, defaultLocale = _props.defaultLocale; var antLocale = this.context.antLocale; var localeFromContext = antLocale && antLocale[componentName]; return extends_default()({}, typeof defaultLocale === 'function' ? defaultLocale() : defaultLocale, localeFromContext || {}); } }, { key: 'getLocaleCode', value: function getLocaleCode() { var antLocale = this.context.antLocale; var localeCode = antLocale && antLocale.locale; // Had use LocaleProvide but didn't set locale if (antLocale && antLocale.exist && !localeCode) { return 'en-us'; } return localeCode; } }, { key: 'render', value: function render() { return this.props.children(this.getLocale(), this.getLocaleCode()); } }]); return LocaleReceiver; }(react["Component"]); /* harmony default export */ var locale_provider_LocaleReceiver = (LocaleReceiver_LocaleReceiver); LocaleReceiver_LocaleReceiver.contextTypes = { antLocale: prop_types_default.a.object }; // CONCATENATED MODULE: ../node_modules/rc-pagination/es/locale/en_US.js /* harmony default export */ var en_US = ({ // Options.jsx items_per_page: '/ page', jump_to: 'Goto', jump_to_confirm: 'confirm', page: '', // Pagination.jsx prev_page: 'Previous Page', next_page: 'Next Page', prev_5: 'Previous 5 Pages', next_5: 'Next 5 Pages', prev_3: 'Previous 3 Pages', next_3: 'Next 3 Pages' }); // CONCATENATED MODULE: ../node_modules/rc-calendar/es/locale/en_US.js /* harmony default export */ var locale_en_US = ({ today: 'Today', now: 'Now', backToToday: 'Back to today', ok: 'Ok', clear: 'Clear', month: 'Month', year: 'Year', timeSelect: 'select time', dateSelect: 'select date', weekSelect: 'Choose a week', monthSelect: 'Choose a month', yearSelect: 'Choose a year', decadeSelect: 'Choose a decade', yearFormat: 'YYYY', dateFormat: 'M/D/YYYY', dayFormat: 'D', dateTimeFormat: 'M/D/YYYY HH:mm:ss', monthBeforeYear: true, previousMonth: 'Previous month (PageUp)', nextMonth: 'Next month (PageDown)', previousYear: 'Last year (Control + left)', nextYear: 'Next year (Control + right)', previousDecade: 'Last decade', nextDecade: 'Next decade', previousCentury: 'Last century', nextCentury: 'Next century' }); // CONCATENATED MODULE: ../node_modules/antd/es/time-picker/locale/en_US.js var en_US_locale = { placeholder: 'Select time' }; /* harmony default export */ var time_picker_locale_en_US = (en_US_locale); // CONCATENATED MODULE: ../node_modules/antd/es/date-picker/locale/en_US.js // Merge into a locale object var locale_en_US_locale = { lang: extends_default()({ placeholder: 'Select date', rangePlaceholder: ['Start date', 'End date'] }, locale_en_US), timePickerLocale: extends_default()({}, time_picker_locale_en_US) }; // All settings at: // https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json /* harmony default export */ var date_picker_locale_en_US = (locale_en_US_locale); // CONCATENATED MODULE: ../node_modules/antd/es/calendar/locale/en_US.js /* harmony default export */ var calendar_locale_en_US = (date_picker_locale_en_US); // CONCATENATED MODULE: ../node_modules/antd/es/locale-provider/default.js /* harmony default export */ var locale_provider_default = ({ locale: 'en', Pagination: en_US, DatePicker: date_picker_locale_en_US, TimePicker: time_picker_locale_en_US, Calendar: calendar_locale_en_US, Table: { filterTitle: 'Filter menu', filterConfirm: 'OK', filterReset: 'Reset', emptyText: 'No data', selectAll: 'Select current page', selectInvert: 'Invert current page' }, Modal: { okText: 'OK', cancelText: 'Cancel', justOkText: 'OK' }, Popconfirm: { okText: 'OK', cancelText: 'Cancel' }, Transfer: { titles: ['', ''], notFoundContent: 'Not Found', searchPlaceholder: 'Search here', itemUnit: 'item', itemsUnit: 'items' }, Select: { notFoundContent: 'Not Found' }, Upload: { uploading: 'Uploading...', removeFile: 'Remove file', uploadError: 'Upload error', previewFile: 'Preview file' } }); // CONCATENATED MODULE: ../node_modules/antd/es/modal/locale.js var locale_runtimeLocale = extends_default()({}, locale_provider_default.Modal); function changeConfirmLocale(newLocale) { if (newLocale) { locale_runtimeLocale = extends_default()({}, locale_runtimeLocale, newLocale); } else { locale_runtimeLocale = extends_default()({}, locale_provider_default.Modal); } } function getConfirmLocale() { return locale_runtimeLocale; } // CONCATENATED MODULE: ../node_modules/antd/es/modal/Modal.js var Modal_mousePosition = void 0; var mousePositionEventBinded = void 0; var Modal_Modal = function (_React$Component) { inherits_default()(Modal, _React$Component); function Modal() { classCallCheck_default()(this, Modal); var _this = possibleConstructorReturn_default()(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).apply(this, arguments)); _this.handleCancel = function (e) { var onCancel = _this.props.onCancel; if (onCancel) { onCancel(e); } }; _this.handleOk = function (e) { var onOk = _this.props.onOk; if (onOk) { onOk(e); } }; _this.renderFooter = function (locale) { var _this$props = _this.props, okText = _this$props.okText, okType = _this$props.okType, cancelText = _this$props.cancelText, confirmLoading = _this$props.confirmLoading; return react["createElement"]( 'div', null, react["createElement"]( es_button, extends_default()({ onClick: _this.handleCancel }, _this.props.cancelButtonProps), cancelText || locale.cancelText ), react["createElement"]( es_button, extends_default()({ type: okType, loading: confirmLoading, onClick: _this.handleOk }, _this.props.okButtonProps), okText || locale.okText ) ); }; return _this; } createClass_default()(Modal, [{ key: 'componentDidMount', value: function componentDidMount() { if (mousePositionEventBinded) { return; } // 只有点击事件支持从鼠标位置动画展开 addEventListenerWrap(document.documentElement, 'click', function (e) { Modal_mousePosition = { x: e.pageX, y: e.pageY }; // 100ms 内发生过点击事件,则从点击位置动画展示 // 否则直接 zoom 展示 // 这样可以兼容非点击方式展开 setTimeout(function () { return Modal_mousePosition = null; }, 100); }); mousePositionEventBinded = true; } }, { key: 'render', value: function render() { var _props = this.props, footer = _props.footer, visible = _props.visible; var defaultFooter = react["createElement"]( locale_provider_LocaleReceiver, { componentName: 'Modal', defaultLocale: getConfirmLocale() }, this.renderFooter ); return react["createElement"](es_DialogWrap, extends_default()({}, this.props, { footer: footer === undefined ? defaultFooter : footer, visible: visible, mousePosition: Modal_mousePosition, onClose: this.handleCancel })); } }]); return Modal; }(react["Component"]); /* harmony default export */ var modal_Modal = (Modal_Modal); Modal_Modal.defaultProps = { prefixCls: 'ant-modal', width: 520, transitionName: 'zoom', maskTransitionName: 'fade', confirmLoading: false, visible: false, okType: 'primary', okButtonDisabled: false, cancelButtonDisabled: false }; Modal_Modal.propTypes = { prefixCls: prop_types_default.a.string, onOk: prop_types_default.a.func, onCancel: prop_types_default.a.func, okText: prop_types_default.a.node, cancelText: prop_types_default.a.node, width: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]), confirmLoading: prop_types_default.a.bool, visible: prop_types_default.a.bool, align: prop_types_default.a.object, footer: prop_types_default.a.node, title: prop_types_default.a.node, closable: prop_types_default.a.bool }; // CONCATENATED MODULE: ../node_modules/antd/es/modal/ActionButton.js var ActionButton_ActionButton = function (_React$Component) { inherits_default()(ActionButton, _React$Component); function ActionButton(props) { classCallCheck_default()(this, ActionButton); var _this = possibleConstructorReturn_default()(this, (ActionButton.__proto__ || Object.getPrototypeOf(ActionButton)).call(this, props)); _this.onClick = function () { var _this$props = _this.props, actionFn = _this$props.actionFn, closeModal = _this$props.closeModal; if (actionFn) { var ret = void 0; if (actionFn.length) { ret = actionFn(closeModal); } else { ret = actionFn(); if (!ret) { closeModal(); } } if (ret && ret.then) { _this.setState({ loading: true }); ret.then(function () { // It's unnecessary to set loading=false, for the Modal will be unmounted after close. // this.setState({ loading: false }); closeModal.apply(undefined, arguments); }, function () { // See: https://github.com/ant-design/ant-design/issues/6183 _this.setState({ loading: false }); }); } } else { closeModal(); } }; _this.state = { loading: false }; return _this; } createClass_default()(ActionButton, [{ key: 'componentDidMount', value: function componentDidMount() { if (this.props.autoFocus) { var $this = react_dom["findDOMNode"](this); this.timeoutId = setTimeout(function () { return $this.focus(); }); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { clearTimeout(this.timeoutId); } }, { key: 'render', value: function render() { var _props = this.props, type = _props.type, children = _props.children; var loading = this.state.loading; return react["createElement"]( es_button, { type: type, onClick: this.onClick, loading: loading }, children ); } }]); return ActionButton; }(react["Component"]); /* harmony default export */ var modal_ActionButton = (ActionButton_ActionButton); // CONCATENATED MODULE: ../node_modules/antd/es/modal/confirm.js var confirm__this = this; var confirm_IS_REACT_16 = !!react_dom["createPortal"]; var confirm_ConfirmDialog = function ConfirmDialog(props) { var onCancel = props.onCancel, onOk = props.onOk, close = props.close, zIndex = props.zIndex, afterClose = props.afterClose, visible = props.visible, keyboard = props.keyboard; var iconType = props.iconType || 'question-circle'; var okType = props.okType || 'primary'; var prefixCls = props.prefixCls || 'ant-confirm'; // 默认为 true,保持向下兼容 var okCancel = 'okCancel' in props ? props.okCancel : true; var width = props.width || 416; var style = props.style || {}; // 默认为 false,保持旧版默认行为 var maskClosable = props.maskClosable === undefined ? false : props.maskClosable; var runtimeLocale = getConfirmLocale(); var okText = props.okText || (okCancel ? runtimeLocale.okText : runtimeLocale.justOkText); var cancelText = props.cancelText || runtimeLocale.cancelText; var classString = classnames_default()(prefixCls, prefixCls + '-' + props.type, props.className); var cancelButton = okCancel && react["createElement"]( modal_ActionButton, { actionFn: onCancel, closeModal: close }, cancelText ); return react["createElement"]( modal_Modal, { className: classString, onCancel: close.bind(confirm__this, { triggerCancel: true }), visible: visible, title: '', transitionName: 'zoom', footer: '', maskTransitionName: 'fade', maskClosable: maskClosable, style: style, width: width, zIndex: zIndex, afterClose: afterClose, keyboard: keyboard }, react["createElement"]( 'div', { className: prefixCls + '-body-wrapper' }, react["createElement"]( 'div', { className: prefixCls + '-body' }, react["createElement"](es_icon, { type: iconType }), react["createElement"]( 'span', { className: prefixCls + '-title' }, props.title ), react["createElement"]( 'div', { className: prefixCls + '-content' }, props.content ) ), react["createElement"]( 'div', { className: prefixCls + '-btns' }, cancelButton, react["createElement"]( modal_ActionButton, { type: okType, actionFn: onOk, closeModal: close, autoFocus: true }, okText ) ) ) ); }; function confirm_confirm(config) { var div = document.createElement('div'); document.body.appendChild(div); function close() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (confirm_IS_REACT_16) { render(extends_default()({}, config, { close: close, visible: false, afterClose: destroy.bind.apply(destroy, [this].concat(args)) })); } else { destroy.apply(undefined, args); } } function destroy() { var unmountResult = react_dom["unmountComponentAtNode"](div); if (unmountResult && div.parentNode) { div.parentNode.removeChild(div); } for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var triggerCancel = args && args.length && args.some(function (param) { return param && param.triggerCancel; }); if (config.onCancel && triggerCancel) { config.onCancel.apply(config, args); } } function render(props) { react_dom["render"](react["createElement"](confirm_ConfirmDialog, props), div); } render(extends_default()({}, config, { visible: true, close: close })); return { destroy: close }; } // CONCATENATED MODULE: ../node_modules/antd/es/modal/index.js modal_Modal.info = function (props) { var config = extends_default()({ type: 'info', iconType: 'info-circle', okCancel: false }, props); return confirm_confirm(config); }; modal_Modal.success = function (props) { var config = extends_default()({ type: 'success', iconType: 'check-circle', okCancel: false }, props); return confirm_confirm(config); }; modal_Modal.error = function (props) { var config = extends_default()({ type: 'error', iconType: 'cross-circle', okCancel: false }, props); return confirm_confirm(config); }; modal_Modal.warning = modal_Modal.warn = function (props) { var config = extends_default()({ type: 'warning', iconType: 'exclamation-circle', okCancel: false }, props); return confirm_confirm(config); }; modal_Modal.confirm = function (props) { var config = extends_default()({ type: 'confirm', okCancel: true }, props); return confirm_confirm(config); }; /* harmony default export */ var modal = (modal_Modal); // EXTERNAL MODULE: ../node_modules/antd/es/card/style/index.less var card_style = __webpack_require__("Awbb"); var card_style_default = /*#__PURE__*/__webpack_require__.n(card_style); // EXTERNAL MODULE: ../node_modules/antd/es/tabs/style/index.less var tabs_style = __webpack_require__("TgjC"); var tabs_style_default = /*#__PURE__*/__webpack_require__.n(tabs_style); // CONCATENATED MODULE: ../node_modules/antd/es/tabs/style/index.js // CONCATENATED MODULE: ../node_modules/antd/es/card/style/index.js // style dependencies // CONCATENATED MODULE: ../node_modules/antd/es/card/Grid.js var Grid___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; /* harmony default export */ var Grid = (function (props) { var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === undefined ? 'ant-card' : _props$prefixCls, className = props.className, others = Grid___rest(props, ["prefixCls", "className"]); var classString = classnames_default()(prefixCls + '-grid', className); return react["createElement"]('div', extends_default()({}, others, { className: classString })); }); // CONCATENATED MODULE: ../node_modules/antd/es/card/Meta.js var Meta___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; /* harmony default export */ var Meta = (function (props) { var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === undefined ? 'ant-card' : _props$prefixCls, className = props.className, avatar = props.avatar, title = props.title, description = props.description, others = Meta___rest(props, ["prefixCls", "className", "avatar", "title", "description"]); var classString = classnames_default()(prefixCls + '-meta', className); var avatarDom = avatar ? react["createElement"]( 'div', { className: prefixCls + '-meta-avatar' }, avatar ) : null; var titleDom = title ? react["createElement"]( 'div', { className: prefixCls + '-meta-title' }, title ) : null; var descriptionDom = description ? react["createElement"]( 'div', { className: prefixCls + '-meta-description' }, description ) : null; var MetaDetail = titleDom || descriptionDom ? react["createElement"]( 'div', { className: prefixCls + '-meta-detail' }, titleDom, descriptionDom ) : null; return react["createElement"]( 'div', extends_default()({}, others, { className: classString }), avatarDom, MetaDetail ); }); // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("zCAL"); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/KeyCode.js /* harmony default export */ var rc_tabs_es_KeyCode = ({ /** * LEFT */ LEFT: 37, // also NUM_WEST /** * UP */ UP: 38, // also NUM_NORTH /** * RIGHT */ RIGHT: 39, // also NUM_EAST /** * DOWN */ DOWN: 40 // also NUM_SOUTH }); // EXTERNAL MODULE: ../node_modules/create-react-class/index.js var create_react_class = __webpack_require__("IAnx"); var create_react_class_default = /*#__PURE__*/__webpack_require__.n(create_react_class); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/utils.js function toArray(children) { // allow [c,[a,b]] var c = []; react_default.a.Children.forEach(children, function (child) { if (child) { c.push(child); } }); return c; } function getActiveIndex(children, activeKey) { var c = toArray(children); for (var i = 0; i < c.length; i++) { if (c[i].key === activeKey) { return i; } } return -1; } function getActiveKey(children, index) { var c = toArray(children); return c[index].key; } function setTransform(style, v) { style.transform = v; style.webkitTransform = v; style.mozTransform = v; } function isTransformSupported(style) { return 'transform' in style || 'webkitTransform' in style || 'MozTransform' in style; } function setTransition(style, v) { style.transition = v; style.webkitTransition = v; style.MozTransition = v; } function getTransformPropValue(v) { return { transform: v, WebkitTransform: v, MozTransform: v }; } function isVertical(tabBarPosition) { return tabBarPosition === 'left' || tabBarPosition === 'right'; } function getTransformByIndex(index, tabBarPosition) { var translate = isVertical(tabBarPosition) ? 'translateY' : 'translateX'; return translate + '(' + -index * 100 + '%) translateZ(0)'; } function getMarginStyle(index, tabBarPosition) { var marginDirection = isVertical(tabBarPosition) ? 'marginTop' : 'marginLeft'; return defineProperty_default()({}, marginDirection, -index * 100 + '%'); } function utils_getStyle(el, property) { return +getComputedStyle(el).getPropertyValue(property).replace('px', ''); } function setPxStyle(el, value, vertical) { value = vertical ? '0px, ' + value + 'px, 0px' : value + 'px, 0px, 0px'; setTransform(el.style, 'translate3d(' + value + ')'); } function getDataAttr(props) { return Object.keys(props).reduce(function (prev, key) { if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') { prev[key] = props[key]; } return prev; }, {}); } // CONCATENATED MODULE: ../node_modules/rc-tabs/es/TabPane.js var TabPane = create_react_class_default()({ displayName: 'TabPane', propTypes: { className: prop_types_default.a.string, active: prop_types_default.a.bool, style: prop_types_default.a.any, destroyInactiveTabPane: prop_types_default.a.bool, forceRender: prop_types_default.a.bool, placeholder: prop_types_default.a.node }, getDefaultProps: function getDefaultProps() { return { placeholder: null }; }, render: function render() { var _classnames; var _props = this.props, className = _props.className, destroyInactiveTabPane = _props.destroyInactiveTabPane, active = _props.active, forceRender = _props.forceRender, rootPrefixCls = _props.rootPrefixCls, style = _props.style, children = _props.children, placeholder = _props.placeholder, restProps = objectWithoutProperties_default()(_props, ['className', 'destroyInactiveTabPane', 'active', 'forceRender', 'rootPrefixCls', 'style', 'children', 'placeholder']); this._isActived = this._isActived || active; var prefixCls = rootPrefixCls + '-tabpane'; var cls = classnames_default()((_classnames = {}, defineProperty_default()(_classnames, prefixCls, 1), defineProperty_default()(_classnames, prefixCls + '-inactive', !active), defineProperty_default()(_classnames, prefixCls + '-active', active), defineProperty_default()(_classnames, className, className), _classnames)); var isRender = destroyInactiveTabPane ? active : this._isActived; return react_default.a.createElement( 'div', extends_default()({ style: style, role: 'tabpanel', 'aria-hidden': active ? 'false' : 'true', className: cls }, getDataAttr(restProps)), isRender || forceRender ? children : placeholder ); } }); /* harmony default export */ var es_TabPane = (TabPane); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/Tabs.js function Tabs_noop() {} function getDefaultActiveKey(props) { var activeKey = void 0; react_default.a.Children.forEach(props.children, function (child) { if (child && !activeKey && !child.props.disabled) { activeKey = child.key; } }); return activeKey; } function activeKeyIsValid(props, key) { var keys = react_default.a.Children.map(props.children, function (child) { return child && child.key; }); return keys.indexOf(key) >= 0; } var Tabs_Tabs = function (_React$Component) { inherits_default()(Tabs, _React$Component); function Tabs(props) { classCallCheck_default()(this, Tabs); var _this = possibleConstructorReturn_default()(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, props)); Tabs__initialiseProps.call(_this); var activeKey = void 0; if ('activeKey' in props) { activeKey = props.activeKey; } else if ('defaultActiveKey' in props) { activeKey = props.defaultActiveKey; } else { activeKey = getDefaultActiveKey(props); } _this.state = { activeKey: activeKey }; return _this; } createClass_default()(Tabs, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if ('activeKey' in nextProps) { this.setState({ activeKey: nextProps.activeKey }); } else if (!activeKeyIsValid(nextProps, this.state.activeKey)) { // https://github.com/ant-design/ant-design/issues/7093 this.setState({ activeKey: getDefaultActiveKey(nextProps) }); } } }, { key: 'render', value: function render() { var _classnames; var props = this.props; var prefixCls = props.prefixCls, navWrapper = props.navWrapper, tabBarPosition = props.tabBarPosition, className = props.className, renderTabContent = props.renderTabContent, renderTabBar = props.renderTabBar, destroyInactiveTabPane = props.destroyInactiveTabPane, restProps = objectWithoutProperties_default()(props, ['prefixCls', 'navWrapper', 'tabBarPosition', 'className', 'renderTabContent', 'renderTabBar', 'destroyInactiveTabPane']); var cls = classnames_default()((_classnames = {}, defineProperty_default()(_classnames, prefixCls, 1), defineProperty_default()(_classnames, prefixCls + '-' + tabBarPosition, 1), defineProperty_default()(_classnames, className, !!className), _classnames)); this.tabBar = renderTabBar(); var contents = [react_default.a.cloneElement(this.tabBar, { prefixCls: prefixCls, navWrapper: navWrapper, key: 'tabBar', onKeyDown: this.onNavKeyDown, tabBarPosition: tabBarPosition, onTabClick: this.onTabClick, panels: props.children, activeKey: this.state.activeKey }), react_default.a.cloneElement(renderTabContent(), { prefixCls: prefixCls, tabBarPosition: tabBarPosition, activeKey: this.state.activeKey, destroyInactiveTabPane: destroyInactiveTabPane, children: props.children, onChange: this.setActiveKey, key: 'tabContent' })]; if (tabBarPosition === 'bottom') { contents.reverse(); } return react_default.a.createElement( 'div', extends_default()({ className: cls, style: props.style }, getDataAttr(restProps)), contents ); } }]); return Tabs; }(react_default.a.Component); var Tabs__initialiseProps = function _initialiseProps() { var _this2 = this; this.onTabClick = function (activeKey, e) { if (_this2.tabBar.props.onTabClick) { _this2.tabBar.props.onTabClick(activeKey, e); } _this2.setActiveKey(activeKey); }; this.onNavKeyDown = function (e) { var eventKeyCode = e.keyCode; if (eventKeyCode === rc_tabs_es_KeyCode.RIGHT || eventKeyCode === rc_tabs_es_KeyCode.DOWN) { e.preventDefault(); var nextKey = _this2.getNextActiveKey(true); _this2.onTabClick(nextKey); } else if (eventKeyCode === rc_tabs_es_KeyCode.LEFT || eventKeyCode === rc_tabs_es_KeyCode.UP) { e.preventDefault(); var previousKey = _this2.getNextActiveKey(false); _this2.onTabClick(previousKey); } }; this.setActiveKey = function (activeKey) { if (_this2.state.activeKey !== activeKey) { if (!('activeKey' in _this2.props)) { _this2.setState({ activeKey: activeKey }); } _this2.props.onChange(activeKey); } }; this.getNextActiveKey = function (next) { var activeKey = _this2.state.activeKey; var children = []; react_default.a.Children.forEach(_this2.props.children, function (c) { if (c && !c.props.disabled) { if (next) { children.push(c); } else { children.unshift(c); } } }); var length = children.length; var ret = length && children[0].key; children.forEach(function (child, i) { if (child.key === activeKey) { if (i === length - 1) { ret = children[0].key; } else { ret = children[i + 1].key; } } }); return ret; }; }; /* harmony default export */ var es_Tabs = (Tabs_Tabs); Tabs_Tabs.propTypes = { destroyInactiveTabPane: prop_types_default.a.bool, renderTabBar: prop_types_default.a.func.isRequired, renderTabContent: prop_types_default.a.func.isRequired, navWrapper: prop_types_default.a.func, onChange: prop_types_default.a.func, children: prop_types_default.a.any, prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, tabBarPosition: prop_types_default.a.string, style: prop_types_default.a.object, activeKey: prop_types_default.a.string, defaultActiveKey: prop_types_default.a.string }; Tabs_Tabs.defaultProps = { prefixCls: 'rc-tabs', destroyInactiveTabPane: false, onChange: Tabs_noop, navWrapper: function navWrapper(arg) { return arg; }, tabBarPosition: 'top', style: {} }; Tabs_Tabs.TabPane = es_TabPane; // CONCATENATED MODULE: ../node_modules/rc-tabs/es/TabContent.js var TabContent = create_react_class_default()({ displayName: 'TabContent', propTypes: { animated: prop_types_default.a.bool, animatedWithMargin: prop_types_default.a.bool, prefixCls: prop_types_default.a.string, children: prop_types_default.a.any, activeKey: prop_types_default.a.string, style: prop_types_default.a.any, tabBarPosition: prop_types_default.a.string }, getDefaultProps: function getDefaultProps() { return { animated: true }; }, getTabPanes: function getTabPanes() { var props = this.props; var activeKey = props.activeKey; var children = props.children; var newChildren = []; react_default.a.Children.forEach(children, function (child) { if (!child) { return; } var key = child.key; var active = activeKey === key; newChildren.push(react_default.a.cloneElement(child, { active: active, destroyInactiveTabPane: props.destroyInactiveTabPane, rootPrefixCls: props.prefixCls })); }); return newChildren; }, render: function render() { var _classnames; var props = this.props; var prefixCls = props.prefixCls, children = props.children, activeKey = props.activeKey, tabBarPosition = props.tabBarPosition, animated = props.animated, animatedWithMargin = props.animatedWithMargin; var style = props.style; var classes = classnames_default()((_classnames = {}, defineProperty_default()(_classnames, prefixCls + '-content', true), defineProperty_default()(_classnames, animated ? prefixCls + '-content-animated' : prefixCls + '-content-no-animated', true), _classnames)); if (animated) { var activeIndex = getActiveIndex(children, activeKey); if (activeIndex !== -1) { var animatedStyle = animatedWithMargin ? getMarginStyle(activeIndex, tabBarPosition) : getTransformPropValue(getTransformByIndex(activeIndex, tabBarPosition)); style = extends_default()({}, style, animatedStyle); } else { style = extends_default()({}, style, { display: 'none' }); } } return react_default.a.createElement( 'div', { className: classes, style: style }, this.getTabPanes() ); } }); /* harmony default export */ var es_TabContent = (TabContent); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/index.js /* harmony default export */ var rc_tabs_es = (es_Tabs); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/InkTabBarMixin.js var isDev = "production" !== 'production'; function InkTabBarMixin_getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function InkTabBarMixin_offset(elem) { var box = void 0; var x = void 0; var y = void 0; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; box = elem.getBoundingClientRect(); x = box.left; y = box.top; x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; var w = doc.defaultView || doc.parentWindow; x += InkTabBarMixin_getScroll(w); y += InkTabBarMixin_getScroll(w, true); return { left: x, top: y }; } function _componentDidUpdate(component, init) { var styles = component.props.styles; var rootNode = component.root; var wrapNode = component.nav || rootNode; var containerOffset = InkTabBarMixin_offset(wrapNode); var inkBarNode = component.inkBar; var activeTab = component.activeTab; var inkBarNodeStyle = inkBarNode.style; var tabBarPosition = component.props.tabBarPosition; if (init) { // prevent mount animation inkBarNodeStyle.display = 'none'; } if (activeTab) { var tabNode = activeTab; var tabOffset = InkTabBarMixin_offset(tabNode); var transformSupported = isTransformSupported(inkBarNodeStyle); if (tabBarPosition === 'top' || tabBarPosition === 'bottom') { var left = tabOffset.left - containerOffset.left; var width = tabNode.offsetWidth; // If tabNode'width width equal to wrapNode'width when tabBarPosition is top or bottom // It means no css working, then ink bar should not have width until css is loaded // Fix https://github.com/ant-design/ant-design/issues/7564 if (width === rootNode.offsetWidth) { width = 0; } else if (styles.inkBar && styles.inkBar.width !== undefined) { width = parseFloat(styles.inkBar.width, 10); if (width) { left = left + (tabNode.offsetWidth - width) / 2; } } // use 3d gpu to optimize render if (transformSupported) { setTransform(inkBarNodeStyle, 'translate3d(' + left + 'px,0,0)'); inkBarNodeStyle.width = width + 'px'; inkBarNodeStyle.height = ''; } else { inkBarNodeStyle.left = left + 'px'; inkBarNodeStyle.top = ''; inkBarNodeStyle.bottom = ''; inkBarNodeStyle.right = wrapNode.offsetWidth - left - width + 'px'; } } else { var top = tabOffset.top - containerOffset.top; var height = tabNode.offsetHeight; if (styles.inkBar && styles.inkBar.height !== undefined) { height = parseFloat(styles.inkBar.height, 10); if (height) { top = top + (tabNode.offsetHeight - height) / 2; } } if (transformSupported) { setTransform(inkBarNodeStyle, 'translate3d(0,' + top + 'px,0)'); inkBarNodeStyle.height = height + 'px'; inkBarNodeStyle.width = ''; } else { inkBarNodeStyle.left = ''; inkBarNodeStyle.right = ''; inkBarNodeStyle.top = top + 'px'; inkBarNodeStyle.bottom = wrapNode.offsetHeight - top - height + 'px'; } } } inkBarNodeStyle.display = activeTab ? 'block' : 'none'; } /* harmony default export */ var InkTabBarMixin = ({ getDefaultProps: function getDefaultProps() { return { inkBarAnimated: true }; }, componentDidUpdate: function componentDidUpdate() { _componentDidUpdate(this); }, componentDidMount: function componentDidMount() { var _this = this; if (isDev) { // https://github.com/ant-design/ant-design/issues/8678 this.timeout = setTimeout(function () { _componentDidUpdate(_this, true); }, 0); } else { _componentDidUpdate(this, true); } }, componentWillUnmount: function componentWillUnmount() { clearTimeout(this.timeout); }, getInkBarNode: function getInkBarNode() { var _classnames; var _props = this.props, prefixCls = _props.prefixCls, styles = _props.styles, inkBarAnimated = _props.inkBarAnimated; var className = prefixCls + '-ink-bar'; var classes = classnames_default()((_classnames = {}, defineProperty_default()(_classnames, className, true), defineProperty_default()(_classnames, inkBarAnimated ? className + '-animated' : className + '-no-animated', true), _classnames)); return react_default.a.createElement('div', { style: styles.inkBar, className: classes, key: 'inkBar', ref: this.saveRef('inkBar') }); } }); // EXTERNAL MODULE: ../node_modules/lodash/debounce.js var debounce = __webpack_require__("CXfR"); var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/ScrollableTabBarMixin.js /* harmony default export */ var ScrollableTabBarMixin = ({ getDefaultProps: function getDefaultProps() { return { scrollAnimated: true, onPrevClick: function onPrevClick() {}, onNextClick: function onNextClick() {} }; }, getInitialState: function getInitialState() { this.offset = 0; return { next: false, prev: false }; }, componentDidMount: function componentDidMount() { var _this = this; this.componentDidUpdate(); this.debouncedResize = debounce_default()(function () { _this.setNextPrev(); _this.scrollToActiveTab(); }, 200); this.resizeEvent = addEventListenerWrap(window, 'resize', this.debouncedResize); }, componentDidUpdate: function componentDidUpdate(prevProps) { var props = this.props; if (prevProps && prevProps.tabBarPosition !== props.tabBarPosition) { this.setOffset(0); return; } var nextPrev = this.setNextPrev(); if (this.isNextPrevShown(this.state) !== this.isNextPrevShown(nextPrev)) { this.setState({}, this.scrollToActiveTab); } else if (!prevProps || props.activeKey !== prevProps.activeKey) { this.scrollToActiveTab(); } }, componentWillUnmount: function componentWillUnmount() { if (this.resizeEvent) { this.resizeEvent.remove(); } if (this.debouncedResize && this.debouncedResize.cancel) { this.debouncedResize.cancel(); } }, setNextPrev: function setNextPrev() { var navNode = this.nav; var navNodeWH = this.getScrollWH(navNode); var containerWH = this.getOffsetWH(this.container); var navWrapNodeWH = this.getOffsetWH(this.navWrap); var offset = this.offset; var minOffset = containerWH - navNodeWH; var _state = this.state, next = _state.next, prev = _state.prev; if (minOffset >= 0) { next = false; this.setOffset(0, false); offset = 0; } else if (minOffset < offset) { next = true; } else { next = false; var realOffset = navWrapNodeWH - navNodeWH; this.setOffset(realOffset, false); offset = realOffset; } if (offset < 0) { prev = true; } else { prev = false; } this.setNext(next); this.setPrev(prev); return { next: next, prev: prev }; }, getOffsetWH: function getOffsetWH(node) { var tabBarPosition = this.props.tabBarPosition; var prop = 'offsetWidth'; if (tabBarPosition === 'left' || tabBarPosition === 'right') { prop = 'offsetHeight'; } return node[prop]; }, getScrollWH: function getScrollWH(node) { var tabBarPosition = this.props.tabBarPosition; var prop = 'scrollWidth'; if (tabBarPosition === 'left' || tabBarPosition === 'right') { prop = 'scrollHeight'; } return node[prop]; }, getOffsetLT: function getOffsetLT(node) { var tabBarPosition = this.props.tabBarPosition; var prop = 'left'; if (tabBarPosition === 'left' || tabBarPosition === 'right') { prop = 'top'; } return node.getBoundingClientRect()[prop]; }, setOffset: function setOffset(offset) { var checkNextPrev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var target = Math.min(0, offset); if (this.offset !== target) { this.offset = target; var navOffset = {}; var tabBarPosition = this.props.tabBarPosition; var navStyle = this.nav.style; var transformSupported = isTransformSupported(navStyle); if (tabBarPosition === 'left' || tabBarPosition === 'right') { if (transformSupported) { navOffset = { value: 'translate3d(0,' + target + 'px,0)' }; } else { navOffset = { name: 'top', value: target + 'px' }; } } else { if (transformSupported) { navOffset = { value: 'translate3d(' + target + 'px,0,0)' }; } else { navOffset = { name: 'left', value: target + 'px' }; } } if (transformSupported) { setTransform(navStyle, navOffset.value); } else { navStyle[navOffset.name] = navOffset.value; } if (checkNextPrev) { this.setNextPrev(); } } }, setPrev: function setPrev(v) { if (this.state.prev !== v) { this.setState({ prev: v }); } }, setNext: function setNext(v) { if (this.state.next !== v) { this.setState({ next: v }); } }, isNextPrevShown: function isNextPrevShown(state) { if (state) { return state.next || state.prev; } return this.state.next || this.state.prev; }, prevTransitionEnd: function prevTransitionEnd(e) { if (e.propertyName !== 'opacity') { return; } var container = this.container; this.scrollToActiveTab({ target: container, currentTarget: container }); }, scrollToActiveTab: function scrollToActiveTab(e) { var activeTab = this.activeTab, navWrap = this.navWrap; if (e && e.target !== e.currentTarget || !activeTab) { return; } var needToSroll = this.isNextPrevShown() && this.lastNextPrevShown; this.lastNextPrevShown = this.isNextPrevShown(); if (!needToSroll) { return; } var activeTabWH = this.getScrollWH(activeTab); var navWrapNodeWH = this.getOffsetWH(navWrap); var offset = this.offset; var wrapOffset = this.getOffsetLT(navWrap); var activeTabOffset = this.getOffsetLT(activeTab); if (wrapOffset > activeTabOffset) { offset += wrapOffset - activeTabOffset; this.setOffset(offset); } else if (wrapOffset + navWrapNodeWH < activeTabOffset + activeTabWH) { offset -= activeTabOffset + activeTabWH - (wrapOffset + navWrapNodeWH); this.setOffset(offset); } }, prev: function prev(e) { this.props.onPrevClick(e); var navWrapNode = this.navWrap; var navWrapNodeWH = this.getOffsetWH(navWrapNode); var offset = this.offset; this.setOffset(offset + navWrapNodeWH); }, next: function next(e) { this.props.onNextClick(e); var navWrapNode = this.navWrap; var navWrapNodeWH = this.getOffsetWH(navWrapNode); var offset = this.offset; this.setOffset(offset - navWrapNodeWH); }, getScrollBarNode: function getScrollBarNode(content) { var _classnames, _classnames2, _classnames3, _classnames4; var _state2 = this.state, next = _state2.next, prev = _state2.prev; var _props = this.props, prefixCls = _props.prefixCls, scrollAnimated = _props.scrollAnimated, navWrapper = _props.navWrapper; var showNextPrev = prev || next; var prevButton = react_default.a.createElement( 'span', { onClick: prev ? this.prev : null, unselectable: 'unselectable', className: classnames_default()((_classnames = {}, defineProperty_default()(_classnames, prefixCls + '-tab-prev', 1), defineProperty_default()(_classnames, prefixCls + '-tab-btn-disabled', !prev), defineProperty_default()(_classnames, prefixCls + '-tab-arrow-show', showNextPrev), _classnames)), onTransitionEnd: this.prevTransitionEnd }, react_default.a.createElement('span', { className: prefixCls + '-tab-prev-icon' }) ); var nextButton = react_default.a.createElement( 'span', { onClick: next ? this.next : null, unselectable: 'unselectable', className: classnames_default()((_classnames2 = {}, defineProperty_default()(_classnames2, prefixCls + '-tab-next', 1), defineProperty_default()(_classnames2, prefixCls + '-tab-btn-disabled', !next), defineProperty_default()(_classnames2, prefixCls + '-tab-arrow-show', showNextPrev), _classnames2)) }, react_default.a.createElement('span', { className: prefixCls + '-tab-next-icon' }) ); var navClassName = prefixCls + '-nav'; var navClasses = classnames_default()((_classnames3 = {}, defineProperty_default()(_classnames3, navClassName, true), defineProperty_default()(_classnames3, scrollAnimated ? navClassName + '-animated' : navClassName + '-no-animated', true), _classnames3)); return react_default.a.createElement( 'div', { className: classnames_default()((_classnames4 = {}, defineProperty_default()(_classnames4, prefixCls + '-nav-container', 1), defineProperty_default()(_classnames4, prefixCls + '-nav-container-scrolling', showNextPrev), _classnames4)), key: 'container', ref: this.saveRef('container') }, prevButton, nextButton, react_default.a.createElement( 'div', { className: prefixCls + '-nav-wrap', ref: this.saveRef('navWrap') }, react_default.a.createElement( 'div', { className: prefixCls + '-nav-scroll' }, react_default.a.createElement( 'div', { className: navClasses, ref: this.saveRef('nav') }, navWrapper(content) ) ) ) ); } }); // EXTERNAL MODULE: ../node_modules/warning/browser.js var browser = __webpack_require__("/sXU"); var browser_default = /*#__PURE__*/__webpack_require__.n(browser); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/TabBarMixin.js /* harmony default export */ var TabBarMixin = ({ getDefaultProps: function getDefaultProps() { return { styles: {} }; }, onTabClick: function onTabClick(key, e) { this.props.onTabClick(key, e); }, getTabs: function getTabs() { var _this = this; var _props = this.props, children = _props.panels, activeKey = _props.activeKey, prefixCls = _props.prefixCls, tabBarGutter = _props.tabBarGutter; var rst = []; react_default.a.Children.forEach(children, function (child, index) { if (!child) { return; } var key = child.key; var cls = activeKey === key ? prefixCls + '-tab-active' : ''; cls += ' ' + prefixCls + '-tab'; var events = {}; if (child.props.disabled) { cls += ' ' + prefixCls + '-tab-disabled'; } else { events = { onClick: function onClick(e) { return _this.onTabClick.call(_this, key, e); } }; } var ref = {}; if (activeKey === key) { ref.ref = _this.saveRef('activeTab'); } browser_default()('tab' in child.props, 'There must be `tab` property on children of Tabs.'); rst.push(react_default.a.createElement( 'div', extends_default()({ role: 'tab', 'aria-disabled': child.props.disabled ? 'true' : 'false', 'aria-selected': activeKey === key ? 'true' : 'false' }, events, { className: cls, key: key, style: { marginRight: tabBarGutter && index === children.length - 1 ? 0 : tabBarGutter } }, ref), child.props.tab )); }); return rst; }, getRootNode: function getRootNode(contents) { var _props2 = this.props, prefixCls = _props2.prefixCls, onKeyDown = _props2.onKeyDown, className = _props2.className, extraContent = _props2.extraContent, style = _props2.style, tabBarPosition = _props2.tabBarPosition, restProps = objectWithoutProperties_default()(_props2, ['prefixCls', 'onKeyDown', 'className', 'extraContent', 'style', 'tabBarPosition']); var cls = classnames_default()(prefixCls + '-bar', defineProperty_default()({}, className, !!className)); var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom'; var tabBarExtraContentStyle = topOrBottom ? { float: 'right' } : {}; var extraContentStyle = extraContent && extraContent.props ? extraContent.props.style : {}; var children = contents; if (extraContent) { children = [Object(react["cloneElement"])(extraContent, { key: 'extra', style: extends_default()({}, tabBarExtraContentStyle, extraContentStyle) }), Object(react["cloneElement"])(contents, { key: 'content' })]; children = topOrBottom ? children : children.reverse(); } return react_default.a.createElement( 'div', extends_default()({ role: 'tablist', className: cls, tabIndex: '0', ref: this.saveRef('root'), onKeyDown: onKeyDown, style: style }, getDataAttr(restProps)), children ); } }); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/RefMixin.js /* harmony default export */ var RefMixin = ({ saveRef: function saveRef(name) { var _this = this; return function (node) { _this[name] = node; }; } }); // CONCATENATED MODULE: ../node_modules/rc-tabs/es/ScrollableInkTabBar.js var ScrollableInkTabBar = create_react_class_default()({ displayName: 'ScrollableInkTabBar', mixins: [RefMixin, TabBarMixin, InkTabBarMixin, ScrollableTabBarMixin], render: function render() { var inkBarNode = this.getInkBarNode(); var tabs = this.getTabs(); var scrollbarNode = this.getScrollBarNode([inkBarNode, tabs]); return this.getRootNode(scrollbarNode); } }); /* harmony default export */ var es_ScrollableInkTabBar = (ScrollableInkTabBar); // EXTERNAL MODULE: ../node_modules/antd/node_modules/warning/warning.js var warning = __webpack_require__("/0+/"); var warning_default = /*#__PURE__*/__webpack_require__.n(warning); // CONCATENATED MODULE: ../node_modules/antd/es/_util/warning.js var warned = {}; /* harmony default export */ var _util_warning = (function (valid, message) { if (!valid && !warned[message]) { warning_default()(false, message); warned[message] = true; } }); // CONCATENATED MODULE: ../node_modules/antd/es/_util/isFlexSupported.js function isFlexSupported() { if (typeof window !== 'undefined' && window.document && window.document.documentElement) { var documentElement = window.document.documentElement; return 'flex' in documentElement.style || 'webkitFlex' in documentElement.style || 'Flex' in documentElement.style || 'msFlex' in documentElement.style; } return false; } // CONCATENATED MODULE: ../node_modules/antd/es/tabs/index.js var tabs_Tabs = function (_React$Component) { inherits_default()(Tabs, _React$Component); function Tabs() { classCallCheck_default()(this, Tabs); var _this = possibleConstructorReturn_default()(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).apply(this, arguments)); _this.createNewTab = function (targetKey) { var onEdit = _this.props.onEdit; if (onEdit) { onEdit(targetKey, 'add'); } }; _this.removeTab = function (targetKey, e) { e.stopPropagation(); if (!targetKey) { return; } var onEdit = _this.props.onEdit; if (onEdit) { onEdit(targetKey, 'remove'); } }; _this.handleChange = function (activeKey) { var onChange = _this.props.onChange; if (onChange) { onChange(activeKey); } }; return _this; } createClass_default()(Tabs, [{ key: 'componentDidMount', value: function componentDidMount() { var NO_FLEX = ' no-flex'; var tabNode = react_dom["findDOMNode"](this); if (tabNode && !isFlexSupported() && tabNode.className.indexOf(NO_FLEX) === -1) { tabNode.className += NO_FLEX; } } }, { key: 'render', value: function render() { var _classNames, _this2 = this; var _props = this.props, prefixCls = _props.prefixCls, _props$className = _props.className, className = _props$className === undefined ? '' : _props$className, size = _props.size, _props$type = _props.type, type = _props$type === undefined ? 'line' : _props$type, tabPosition = _props.tabPosition, children = _props.children, tabBarExtraContent = _props.tabBarExtraContent, tabBarStyle = _props.tabBarStyle, hideAdd = _props.hideAdd, onTabClick = _props.onTabClick, onPrevClick = _props.onPrevClick, onNextClick = _props.onNextClick, _props$animated = _props.animated, animated = _props$animated === undefined ? true : _props$animated, tabBarGutter = _props.tabBarGutter; var _ref = (typeof animated === 'undefined' ? 'undefined' : typeof_default()(animated)) === 'object' ? { inkBarAnimated: animated.inkBar, tabPaneAnimated: animated.tabPane } : { inkBarAnimated: animated, tabPaneAnimated: animated }, inkBarAnimated = _ref.inkBarAnimated, tabPaneAnimated = _ref.tabPaneAnimated; // card tabs should not have animation if (type !== 'line') { tabPaneAnimated = 'animated' in this.props ? tabPaneAnimated : false; } _util_warning(!(type.indexOf('card') >= 0 && (size === 'small' || size === 'large')), 'Tabs[type=card|editable-card] doesn\'t have small or large size, it\'s by designed.'); var cls = classnames_default()(className, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-vertical', tabPosition === 'left' || tabPosition === 'right'), defineProperty_default()(_classNames, prefixCls + '-' + size, !!size), defineProperty_default()(_classNames, prefixCls + '-card', type.indexOf('card') >= 0), defineProperty_default()(_classNames, prefixCls + '-' + type, true), defineProperty_default()(_classNames, prefixCls + '-no-animation', !tabPaneAnimated), _classNames)); // only card type tabs can be added and closed var childrenWithClose = []; if (type === 'editable-card') { childrenWithClose = []; react["Children"].forEach(children, function (child, index) { var closable = child.props.closable; closable = typeof closable === 'undefined' ? true : closable; var closeIcon = closable ? react["createElement"](es_icon, { type: 'close', onClick: function onClick(e) { return _this2.removeTab(child.key, e); } }) : null; childrenWithClose.push(react["cloneElement"](child, { tab: react["createElement"]( 'div', { className: closable ? undefined : prefixCls + '-tab-unclosable' }, child.props.tab, closeIcon ), key: child.key || index })); }); // Add new tab handler if (!hideAdd) { tabBarExtraContent = react["createElement"]( 'span', null, react["createElement"](es_icon, { type: 'plus', className: prefixCls + '-new-tab', onClick: this.createNewTab }), tabBarExtraContent ); } } tabBarExtraContent = tabBarExtraContent ? react["createElement"]( 'div', { className: prefixCls + '-extra-content' }, tabBarExtraContent ) : null; var renderTabBar = function renderTabBar() { return react["createElement"](es_ScrollableInkTabBar, { inkBarAnimated: inkBarAnimated, extraContent: tabBarExtraContent, onTabClick: onTabClick, onPrevClick: onPrevClick, onNextClick: onNextClick, style: tabBarStyle, tabBarGutter: tabBarGutter }); }; return react["createElement"]( rc_tabs_es, extends_default()({}, this.props, { className: cls, tabBarPosition: tabPosition, renderTabBar: renderTabBar, renderTabContent: function renderTabContent() { return react["createElement"](es_TabContent, { animated: tabPaneAnimated, animatedWithMargin: true }); }, onChange: this.handleChange }), childrenWithClose.length > 0 ? childrenWithClose : children ); } }]); return Tabs; }(react["Component"]); /* harmony default export */ var es_tabs = (tabs_Tabs); tabs_Tabs.TabPane = es_TabPane; tabs_Tabs.defaultProps = { prefixCls: 'ant-tabs', hideAdd: false }; // CONCATENATED MODULE: ../node_modules/antd/es/grid/row.js var row___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; // matchMedia polyfill for // https://github.com/WickyNilliams/enquire.js/issues/82 var enquire = void 0; if (typeof window !== 'undefined') { var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) { return { media: mediaQuery, matches: false, addListener: function addListener() {}, removeListener: function removeListener() {} }; }; window.matchMedia = window.matchMedia || matchMediaPolyfill; enquire = __webpack_require__("suKy"); } var responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs']; var responsiveMap = { xs: '(max-width: 575px)', sm: '(min-width: 576px)', md: '(min-width: 768px)', lg: '(min-width: 992px)', xl: '(min-width: 1200px)', xxl: '(min-width: 1600px)' }; var row_Row = function (_React$Component) { inherits_default()(Row, _React$Component); function Row() { classCallCheck_default()(this, Row); var _this = possibleConstructorReturn_default()(this, (Row.__proto__ || Object.getPrototypeOf(Row)).apply(this, arguments)); _this.state = { screens: {} }; return _this; } createClass_default()(Row, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; Object.keys(responsiveMap).map(function (screen) { return enquire.register(responsiveMap[screen], { match: function match() { if (typeof_default()(_this2.props.gutter) !== 'object') { return; } _this2.setState(function (prevState) { return { screens: extends_default()({}, prevState.screens, defineProperty_default()({}, screen, true)) }; }); }, unmatch: function unmatch() { if (typeof_default()(_this2.props.gutter) !== 'object') { return; } _this2.setState(function (prevState) { return { screens: extends_default()({}, prevState.screens, defineProperty_default()({}, screen, false)) }; }); }, // Keep a empty destory to avoid triggering unmatch when unregister destroy: function destroy() {} }); }); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { Object.keys(responsiveMap).map(function (screen) { return enquire.unregister(responsiveMap[screen]); }); } }, { key: 'getGutter', value: function getGutter() { var gutter = this.props.gutter; if ((typeof gutter === 'undefined' ? 'undefined' : typeof_default()(gutter)) === 'object') { for (var i = 0; i <= responsiveArray.length; i++) { var breakpoint = responsiveArray[i]; if (this.state.screens[breakpoint] && gutter[breakpoint] !== undefined) { return gutter[breakpoint]; } } } return gutter; } }, { key: 'render', value: function render() { var _classNames; var _a = this.props, type = _a.type, justify = _a.justify, align = _a.align, className = _a.className, style = _a.style, children = _a.children, _a$prefixCls = _a.prefixCls, prefixCls = _a$prefixCls === undefined ? 'ant-row' : _a$prefixCls, others = row___rest(_a, ["type", "justify", "align", "className", "style", "children", "prefixCls"]); var gutter = this.getGutter(); var classes = classnames_default()((_classNames = {}, defineProperty_default()(_classNames, prefixCls, !type), defineProperty_default()(_classNames, prefixCls + '-' + type, type), defineProperty_default()(_classNames, prefixCls + '-' + type + '-' + justify, type && justify), defineProperty_default()(_classNames, prefixCls + '-' + type + '-' + align, type && align), _classNames), className); var rowStyle = gutter > 0 ? extends_default()({ marginLeft: gutter / -2, marginRight: gutter / -2 }, style) : style; var cols = react["Children"].map(children, function (col) { if (!col) { return null; } if (col.props && gutter > 0) { return Object(react["cloneElement"])(col, { style: extends_default()({ paddingLeft: gutter / 2, paddingRight: gutter / 2 }, col.props.style) }); } return col; }); var otherProps = extends_default()({}, others); delete otherProps.gutter; return react["createElement"]( 'div', extends_default()({}, otherProps, { className: classes, style: rowStyle }), cols ); } }]); return Row; }(react["Component"]); /* harmony default export */ var grid_row = (row_Row); row_Row.defaultProps = { gutter: 0 }; row_Row.propTypes = { type: prop_types_default.a.string, align: prop_types_default.a.string, justify: prop_types_default.a.string, className: prop_types_default.a.string, children: prop_types_default.a.node, gutter: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.number]), prefixCls: prop_types_default.a.string }; // CONCATENATED MODULE: ../node_modules/antd/es/grid/col.js var col___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var stringOrNumber = prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]); var objectOrNumber = prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.number]); var col_Col = function (_React$Component) { inherits_default()(Col, _React$Component); function Col() { classCallCheck_default()(this, Col); return possibleConstructorReturn_default()(this, (Col.__proto__ || Object.getPrototypeOf(Col)).apply(this, arguments)); } createClass_default()(Col, [{ key: 'render', value: function render() { var _classNames; var props = this.props; var span = props.span, order = props.order, offset = props.offset, push = props.push, pull = props.pull, className = props.className, children = props.children, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === undefined ? 'ant-col' : _props$prefixCls, others = col___rest(props, ["span", "order", "offset", "push", "pull", "className", "children", "prefixCls"]); var sizeClassObj = {}; ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(function (size) { var _extends2; var sizeProps = {}; if (typeof props[size] === 'number') { sizeProps.span = props[size]; } else if (typeof_default()(props[size]) === 'object') { sizeProps = props[size] || {}; } delete others[size]; sizeClassObj = extends_default()({}, sizeClassObj, (_extends2 = {}, defineProperty_default()(_extends2, prefixCls + '-' + size + '-' + sizeProps.span, sizeProps.span !== undefined), defineProperty_default()(_extends2, prefixCls + '-' + size + '-order-' + sizeProps.order, sizeProps.order || sizeProps.order === 0), defineProperty_default()(_extends2, prefixCls + '-' + size + '-offset-' + sizeProps.offset, sizeProps.offset || sizeProps.offset === 0), defineProperty_default()(_extends2, prefixCls + '-' + size + '-push-' + sizeProps.push, sizeProps.push || sizeProps.push === 0), defineProperty_default()(_extends2, prefixCls + '-' + size + '-pull-' + sizeProps.pull, sizeProps.pull || sizeProps.pull === 0), _extends2)); }); var classes = classnames_default()((_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-' + span, span !== undefined), defineProperty_default()(_classNames, prefixCls + '-order-' + order, order), defineProperty_default()(_classNames, prefixCls + '-offset-' + offset, offset), defineProperty_default()(_classNames, prefixCls + '-push-' + push, push), defineProperty_default()(_classNames, prefixCls + '-pull-' + pull, pull), _classNames), className, sizeClassObj); return react["createElement"]( 'div', extends_default()({}, others, { className: classes }), children ); } }]); return Col; }(react["Component"]); /* harmony default export */ var grid_col = (col_Col); col_Col.propTypes = { span: stringOrNumber, order: stringOrNumber, offset: stringOrNumber, push: stringOrNumber, pull: stringOrNumber, className: prop_types_default.a.string, children: prop_types_default.a.node, xs: objectOrNumber, sm: objectOrNumber, md: objectOrNumber, lg: objectOrNumber, xl: objectOrNumber, xxl: objectOrNumber }; // CONCATENATED MODULE: ../node_modules/antd/es/grid/index.js // CONCATENATED MODULE: ../node_modules/antd/es/row/index.js /* harmony default export */ var es_row = (grid_row); // CONCATENATED MODULE: ../node_modules/antd/es/col/index.js /* harmony default export */ var es_col = (grid_col); // EXTERNAL MODULE: ../node_modules/babel-runtime/helpers/toConsumableArray.js var toConsumableArray = __webpack_require__("mYpx"); var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); // EXTERNAL MODULE: ../node_modules/raf/index.js var raf = __webpack_require__("oXMl"); var raf_default = /*#__PURE__*/__webpack_require__.n(raf); // CONCATENATED MODULE: ../node_modules/antd/es/_util/throttleByAnimationFrame.js function throttleByAnimationFrame(fn) { var requestId = void 0; var later = function later(args) { return function () { requestId = null; fn.apply(undefined, toConsumableArray_default()(args)); }; }; var throttled = function throttled() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (requestId == null) { requestId = raf_default()(later(args)); } }; throttled.cancel = function () { return raf_default.a.cancel(requestId); }; return throttled; } function throttleByAnimationFrameDecorator() { return function (target, key, descriptor) { var fn = descriptor.value; var definingProperty = false; return { configurable: true, get: function get() { if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) { return fn; } var boundFn = throttleByAnimationFrame(fn.bind(this)); definingProperty = true; Object.defineProperty(this, key, { value: boundFn, configurable: true, writable: true }); definingProperty = false; return boundFn; } }; }; } // CONCATENATED MODULE: ../node_modules/antd/es/card/index.js var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if ((typeof Reflect === "undefined" ? "undefined" : typeof_default()(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) { if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; }return c > 3 && r && Object.defineProperty(target, key, r), r; }; var card___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var card_Card = function (_React$Component) { inherits_default()(Card, _React$Component); function Card() { classCallCheck_default()(this, Card); var _this = possibleConstructorReturn_default()(this, (Card.__proto__ || Object.getPrototypeOf(Card)).apply(this, arguments)); _this.state = { widerPadding: false }; _this.updateWiderPaddingCalled = false; _this.onTabChange = function (key) { if (_this.props.onTabChange) { _this.props.onTabChange(key); } }; _this.saveRef = function (node) { _this.container = node; }; return _this; } createClass_default()(Card, [{ key: "componentDidMount", value: function componentDidMount() { this.updateWiderPadding(); this.resizeEvent = addEventListenerWrap(window, 'resize', this.updateWiderPadding); if ('noHovering' in this.props) { _util_warning(!this.props.noHovering, '`noHovering` of Card is deprecated, you can remove it safely or use `hoverable` instead.'); _util_warning(!!this.props.noHovering, '`noHovering={false}` of Card is deprecated, use `hoverable` instead.'); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.resizeEvent) { this.resizeEvent.remove(); } this.updateWiderPadding.cancel(); } }, { key: "updateWiderPadding", value: function updateWiderPadding() { var _this2 = this; if (!this.container) { return; } // 936 is a magic card width pixel number indicated by designer var WIDTH_BOUNDARY_PX = 936; if (this.container.offsetWidth >= WIDTH_BOUNDARY_PX && !this.state.widerPadding) { this.setState({ widerPadding: true }, function () { _this2.updateWiderPaddingCalled = true; // first render without css transition }); } if (this.container.offsetWidth < WIDTH_BOUNDARY_PX && this.state.widerPadding) { this.setState({ widerPadding: false }, function () { _this2.updateWiderPaddingCalled = true; // first render without css transition }); } } }, { key: "isContainGrid", value: function isContainGrid() { var containGrid = void 0; react["Children"].forEach(this.props.children, function (element) { if (element && element.type && element.type === Grid) { containGrid = true; } }); return containGrid; } }, { key: "getAction", value: function getAction(actions) { if (!actions || !actions.length) { return null; } var actionList = actions.map(function (action, index) { return react["createElement"]( "li", { style: { width: 100 / actions.length + "%" }, key: "action-" + index }, react["createElement"]( "span", null, action ) ); }); return actionList; } // For 2.x compatible }, { key: "getCompatibleHoverable", value: function getCompatibleHoverable() { var _props = this.props, noHovering = _props.noHovering, hoverable = _props.hoverable; if ('noHovering' in this.props) { return !noHovering || hoverable; } return !!hoverable; } }, { key: "render", value: function render() { var _classNames; var _a = this.props, _a$prefixCls = _a.prefixCls, prefixCls = _a$prefixCls === undefined ? 'ant-card' : _a$prefixCls, className = _a.className, extra = _a.extra, _a$bodyStyle = _a.bodyStyle, bodyStyle = _a$bodyStyle === undefined ? {} : _a$bodyStyle, noHovering = _a.noHovering, hoverable = _a.hoverable, title = _a.title, loading = _a.loading, _a$bordered = _a.bordered, bordered = _a$bordered === undefined ? true : _a$bordered, type = _a.type, cover = _a.cover, actions = _a.actions, tabList = _a.tabList, children = _a.children, activeTabKey = _a.activeTabKey, defaultActiveTabKey = _a.defaultActiveTabKey, others = card___rest(_a, ["prefixCls", "className", "extra", "bodyStyle", "noHovering", "hoverable", "title", "loading", "bordered", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey"]); var classString = classnames_default()(prefixCls, className, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + "-loading", loading), defineProperty_default()(_classNames, prefixCls + "-bordered", bordered), defineProperty_default()(_classNames, prefixCls + "-hoverable", this.getCompatibleHoverable()), defineProperty_default()(_classNames, prefixCls + "-wider-padding", this.state.widerPadding), defineProperty_default()(_classNames, prefixCls + "-padding-transition", this.updateWiderPaddingCalled), defineProperty_default()(_classNames, prefixCls + "-contain-grid", this.isContainGrid()), defineProperty_default()(_classNames, prefixCls + "-contain-tabs", tabList && tabList.length), defineProperty_default()(_classNames, prefixCls + "-type-" + type, !!type), _classNames)); var loadingBlockStyle = bodyStyle.padding === 0 || bodyStyle.padding === '0px' ? { padding: 24 } : undefined; var loadingBlock = react["createElement"]( "div", { className: prefixCls + "-loading-content", style: loadingBlockStyle }, react["createElement"]( es_row, { gutter: 8 }, react["createElement"]( es_col, { span: 22 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ) ), react["createElement"]( es_row, { gutter: 8 }, react["createElement"]( es_col, { span: 8 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ), react["createElement"]( es_col, { span: 15 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ) ), react["createElement"]( es_row, { gutter: 8 }, react["createElement"]( es_col, { span: 6 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ), react["createElement"]( es_col, { span: 18 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ) ), react["createElement"]( es_row, { gutter: 8 }, react["createElement"]( es_col, { span: 13 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ), react["createElement"]( es_col, { span: 9 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ) ), react["createElement"]( es_row, { gutter: 8 }, react["createElement"]( es_col, { span: 4 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ), react["createElement"]( es_col, { span: 3 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ), react["createElement"]( es_col, { span: 16 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ) ), react["createElement"]( es_row, { gutter: 8 }, react["createElement"]( es_col, { span: 8 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ), react["createElement"]( es_col, { span: 6 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ), react["createElement"]( es_col, { span: 8 }, react["createElement"]("div", { className: prefixCls + "-loading-block" }) ) ) ); var hasActiveTabKey = activeTabKey !== undefined; var extraProps = defineProperty_default()({}, hasActiveTabKey ? 'activeKey' : 'defaultActiveKey', hasActiveTabKey ? activeTabKey : defaultActiveTabKey); var head = void 0; var tabs = tabList && tabList.length ? react["createElement"]( es_tabs, extends_default()({}, extraProps, { className: prefixCls + "-head-tabs", size: "large", onChange: this.onTabChange }), tabList.map(function (item) { return react["createElement"](es_tabs.TabPane, { tab: item.tab, disabled: item.disabled, key: item.key }); }) ) : null; if (title || extra || tabs) { head = react["createElement"]( "div", { className: prefixCls + "-head" }, react["createElement"]( "div", { className: prefixCls + "-head-wrapper" }, title && react["createElement"]( "div", { className: prefixCls + "-head-title" }, title ), extra && react["createElement"]( "div", { className: prefixCls + "-extra" }, extra ) ), tabs ); } var coverDom = cover ? react["createElement"]( "div", { className: prefixCls + "-cover" }, cover ) : null; var body = react["createElement"]( "div", { className: prefixCls + "-body", style: bodyStyle }, loading ? loadingBlock : children ); var actionDom = actions && actions.length ? react["createElement"]( "ul", { className: prefixCls + "-actions" }, this.getAction(actions) ) : null; var divProps = omit_js_es(others, ['onTabChange']); return react["createElement"]( "div", extends_default()({}, divProps, { className: classString, ref: this.saveRef }), head, coverDom, body, actionDom ); } }]); return Card; }(react["Component"]); /* harmony default export */ var card = (card_Card); card_Card.Grid = Grid; card_Card.Meta = Meta; __decorate([throttleByAnimationFrameDecorator()], card_Card.prototype, "updateWiderPadding", null); // EXTERNAL MODULE: ../node_modules/antd/es/table/style/index.less var table_style = __webpack_require__("zFy8"); var table_style_default = /*#__PURE__*/__webpack_require__.n(table_style); // EXTERNAL MODULE: ../node_modules/antd/es/radio/style/index.less var radio_style = __webpack_require__("jaTa"); var radio_style_default = /*#__PURE__*/__webpack_require__.n(radio_style); // CONCATENATED MODULE: ../node_modules/antd/es/radio/style/index.js // EXTERNAL MODULE: ../node_modules/antd/es/checkbox/style/index.less var checkbox_style = __webpack_require__("ecOS"); var checkbox_style_default = /*#__PURE__*/__webpack_require__.n(checkbox_style); // CONCATENATED MODULE: ../node_modules/antd/es/checkbox/style/index.js // EXTERNAL MODULE: ../node_modules/antd/es/dropdown/style/index.less var dropdown_style = __webpack_require__("dvrd"); var dropdown_style_default = /*#__PURE__*/__webpack_require__.n(dropdown_style); // CONCATENATED MODULE: ../node_modules/antd/es/dropdown/style/index.js // style dependencies // EXTERNAL MODULE: ../node_modules/antd/es/spin/style/index.less var spin_style = __webpack_require__("q1lp"); var spin_style_default = /*#__PURE__*/__webpack_require__.n(spin_style); // CONCATENATED MODULE: ../node_modules/antd/es/spin/style/index.js // EXTERNAL MODULE: ../node_modules/antd/es/pagination/style/index.less var pagination_style = __webpack_require__("+VwJ"); var pagination_style_default = /*#__PURE__*/__webpack_require__.n(pagination_style); // EXTERNAL MODULE: ../node_modules/antd/es/select/style/index.less var select_style = __webpack_require__("OnvE"); var select_style_default = /*#__PURE__*/__webpack_require__.n(select_style); // EXTERNAL MODULE: ../node_modules/antd/es/input/style/index.less var input_style = __webpack_require__("dh0Z"); var input_style_default = /*#__PURE__*/__webpack_require__.n(input_style); // CONCATENATED MODULE: ../node_modules/antd/es/input/style/index.js // style dependencies // CONCATENATED MODULE: ../node_modules/antd/es/select/style/index.js // style dependencies // CONCATENATED MODULE: ../node_modules/antd/es/pagination/style/index.js // style dependencies // CONCATENATED MODULE: ../node_modules/antd/es/table/style/index.js // style dependencies // EXTERNAL MODULE: ../node_modules/shallowequal/index.js var shallowequal = __webpack_require__("pz6A"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // EXTERNAL MODULE: ../node_modules/mini-store/lib/index.js var mini_store_lib = __webpack_require__("VaGT"); var mini_store_lib_default = /*#__PURE__*/__webpack_require__.n(mini_store_lib); // EXTERNAL MODULE: ../node_modules/lodash/merge.js var merge = __webpack_require__("yubd"); var merge_default = /*#__PURE__*/__webpack_require__.n(merge); // CONCATENATED MODULE: ../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js /** * 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. */ function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } } function react_lifecycles_compat_es_componentWillReceiveProps(nextProps) { // Call this.constructor.gDSFP to support sub-classes. // Use the setState() updater to ensure state isn't stale in certain edge cases. function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; } // Binding "this" is important for shallow renderer support. this.setState(updater.bind(this)); } function componentWillUpdate(nextProps, nextState) { try { var prevProps = this.props; var prevState = this.state; this.props = nextProps; this.state = nextState; this.__reactInternalSnapshotFlag = true; this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate( prevProps, prevState ); } finally { this.props = prevProps; this.state = prevState; } } // React may warn about cWM/cWRP/cWU methods being deprecated. // Add a flag to suppress these warnings for this special case. componentWillMount.__suppressDeprecationWarning = true; react_lifecycles_compat_es_componentWillReceiveProps.__suppressDeprecationWarning = true; componentWillUpdate.__suppressDeprecationWarning = true; function polyfill(Component) { var prototype = Component.prototype; if (!prototype || !prototype.isReactComponent) { throw new Error('Can only polyfill class components'); } if ( typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function' ) { return Component; } // If new component APIs are defined, "unsafe" lifecycles won't be called. // Error if any of these lifecycles are present, // Because they would work differently between older and newer (16.3+) versions of React. var foundWillMountName = null; var foundWillReceivePropsName = null; var foundWillUpdateName = null; if (typeof prototype.componentWillMount === 'function') { foundWillMountName = 'componentWillMount'; } else if (typeof prototype.UNSAFE_componentWillMount === 'function') { foundWillMountName = 'UNSAFE_componentWillMount'; } if (typeof prototype.componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'componentWillReceiveProps'; } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; } if (typeof prototype.componentWillUpdate === 'function') { foundWillUpdateName = 'componentWillUpdate'; } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') { foundWillUpdateName = 'UNSAFE_componentWillUpdate'; } if ( foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null ) { var componentName = Component.displayName || Component.name; var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; throw Error( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks' ); } // React <= 16.2 does not support static getDerivedStateFromProps. // As a workaround, use cWM and cWRP to invoke the new static lifecycle. // Newer versions of React will ignore these lifecycles if gDSFP exists. if (typeof Component.getDerivedStateFromProps === 'function') { prototype.componentWillMount = componentWillMount; prototype.componentWillReceiveProps = react_lifecycles_compat_es_componentWillReceiveProps; } // React <= 16.2 does not support getSnapshotBeforeUpdate. // As a workaround, use cWU to invoke the new lifecycle. // Newer versions of React will ignore that lifecycle if gSBU exists. if (typeof prototype.getSnapshotBeforeUpdate === 'function') { if (typeof prototype.componentDidUpdate !== 'function') { throw new Error( 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype' ); } prototype.componentWillUpdate = componentWillUpdate; var componentDidUpdate = prototype.componentDidUpdate; prototype.componentDidUpdate = function componentDidUpdatePolyfill( prevProps, prevState, maybeSnapshot ) { // 16.3+ will not execute our will-update method; // It will pass a snapshot value to did-update though. // Older versions will require our polyfilled will-update value. // We need to handle both cases, but can't just check for the presence of "maybeSnapshot", // Because for <= 15.x versions this might be a "prevContext" object. // We also can't just check "__reactInternalSnapshot", // Because get-snapshot might return a falsy value. // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior. var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot; componentDidUpdate.call(this, prevProps, prevState, snapshot); }; } return Component; } // CONCATENATED MODULE: ../node_modules/rc-table/es/utils.js var scrollbarSize = void 0; // Measure scrollbar width for padding body during modal show/hide var scrollbarMeasure = { position: 'absolute', top: '-9999px', width: '50px', height: '50px', overflow: 'scroll' }; function measureScrollbar() { var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'vertical'; if (typeof document === 'undefined' || typeof window === 'undefined') { return 0; } if (scrollbarSize) { return scrollbarSize; } var scrollDiv = document.createElement('div'); Object.keys(scrollbarMeasure).forEach(function (scrollProp) { scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp]; }); document.body.appendChild(scrollDiv); var size = 0; if (direction === 'vertical') { size = scrollDiv.offsetWidth - scrollDiv.clientWidth; } else if (direction === 'horizontal') { size = scrollDiv.offsetHeight - scrollDiv.clientHeight; } document.body.removeChild(scrollDiv); scrollbarSize = size; return scrollbarSize; } function utils_debounce(func, wait, immediate) { var timeout = void 0; function debounceFunc() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var context = this; // https://fb.me/react-event-pooling if (args[0] && args[0].persist) { args[0].persist(); } var later = function later() { timeout = null; if (!immediate) { func.apply(context, args); } }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) { func.apply(context, args); } } debounceFunc.cancel = function cancel() { if (timeout) { clearTimeout(timeout); timeout = null; } }; return debounceFunc; } var utils_warned = {}; function warningOnce(condition, format, args) { if (!utils_warned[format]) { browser_default()(condition, format, args); utils_warned[format] = !condition; } } function remove(array, item) { var index = array.indexOf(item); var front = array.slice(0, index); var last = array.slice(index + 1, array.length); return front.concat(last); } // CONCATENATED MODULE: ../node_modules/rc-table/es/ColumnManager.js var ColumnManager_ColumnManager = function () { function ColumnManager(columns, elements) { classCallCheck_default()(this, ColumnManager); this._cached = {}; this.columns = columns || this.normalize(elements); } createClass_default()(ColumnManager, [{ key: 'isAnyColumnsFixed', value: function isAnyColumnsFixed() { var _this = this; return this._cache('isAnyColumnsFixed', function () { return _this.columns.some(function (column) { return !!column.fixed; }); }); } }, { key: 'isAnyColumnsLeftFixed', value: function isAnyColumnsLeftFixed() { var _this2 = this; return this._cache('isAnyColumnsLeftFixed', function () { return _this2.columns.some(function (column) { return column.fixed === 'left' || column.fixed === true; }); }); } }, { key: 'isAnyColumnsRightFixed', value: function isAnyColumnsRightFixed() { var _this3 = this; return this._cache('isAnyColumnsRightFixed', function () { return _this3.columns.some(function (column) { return column.fixed === 'right'; }); }); } }, { key: 'leftColumns', value: function leftColumns() { var _this4 = this; return this._cache('leftColumns', function () { return _this4.groupedColumns().filter(function (column) { return column.fixed === 'left' || column.fixed === true; }); }); } }, { key: 'rightColumns', value: function rightColumns() { var _this5 = this; return this._cache('rightColumns', function () { return _this5.groupedColumns().filter(function (column) { return column.fixed === 'right'; }); }); } }, { key: 'leafColumns', value: function leafColumns() { var _this6 = this; return this._cache('leafColumns', function () { return _this6._leafColumns(_this6.columns); }); } }, { key: 'leftLeafColumns', value: function leftLeafColumns() { var _this7 = this; return this._cache('leftLeafColumns', function () { return _this7._leafColumns(_this7.leftColumns()); }); } }, { key: 'rightLeafColumns', value: function rightLeafColumns() { var _this8 = this; return this._cache('rightLeafColumns', function () { return _this8._leafColumns(_this8.rightColumns()); }); } // add appropriate rowspan and colspan to column }, { key: 'groupedColumns', value: function groupedColumns() { var _this9 = this; return this._cache('groupedColumns', function () { var _groupColumns = function _groupColumns(columns) { var currentRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var parentColumn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var rows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; // track how many rows we got rows[currentRow] = rows[currentRow] || []; var grouped = []; var setRowSpan = function setRowSpan(column) { var rowSpan = rows.length - currentRow; if (column && !column.children && // parent columns are supposed to be one row rowSpan > 1 && (!column.rowSpan || column.rowSpan < rowSpan)) { column.rowSpan = rowSpan; } }; columns.forEach(function (column, index) { var newColumn = extends_default()({}, column); rows[currentRow].push(newColumn); parentColumn.colSpan = parentColumn.colSpan || 0; if (newColumn.children && newColumn.children.length > 0) { newColumn.children = _groupColumns(newColumn.children, currentRow + 1, newColumn, rows); parentColumn.colSpan += newColumn.colSpan; } else { parentColumn.colSpan++; } // update rowspan to all same row columns for (var i = 0; i < rows[currentRow].length - 1; ++i) { setRowSpan(rows[currentRow][i]); } // last column, update rowspan immediately if (index + 1 === columns.length) { setRowSpan(newColumn); } grouped.push(newColumn); }); return grouped; }; return _groupColumns(_this9.columns); }); } }, { key: 'normalize', value: function normalize(elements) { var _this10 = this; var columns = []; react_default.a.Children.forEach(elements, function (element) { if (!react_default.a.isValidElement(element)) { return; } var column = extends_default()({}, element.props); if (element.key) { column.key = element.key; } if (element.type.isTableColumnGroup) { column.children = _this10.normalize(column.children); } columns.push(column); }); return columns; } }, { key: 'reset', value: function reset(columns, elements) { this.columns = columns || this.normalize(elements); this._cached = {}; } }, { key: '_cache', value: function _cache(name, fn) { if (name in this._cached) { return this._cached[name]; } this._cached[name] = fn(); return this._cached[name]; } }, { key: '_leafColumns', value: function _leafColumns(columns) { var _this11 = this; var leafColumns = []; columns.forEach(function (column) { if (!column.children) { leafColumns.push(column); } else { leafColumns.push.apply(leafColumns, toConsumableArray_default()(_this11._leafColumns(column.children))); } }); return leafColumns; } }]); return ColumnManager; }(); /* harmony default export */ var es_ColumnManager = (ColumnManager_ColumnManager); // CONCATENATED MODULE: ../node_modules/rc-table/es/ColGroup.js function ColGroup(props, _ref) { var table = _ref.table; var _table$props = table.props, prefixCls = _table$props.prefixCls, expandIconAsCell = _table$props.expandIconAsCell; var fixed = props.fixed; var cols = []; if (expandIconAsCell && fixed !== 'right') { cols.push(react_default.a.createElement('col', { className: prefixCls + '-expand-icon-col', key: 'rc-table-expand-icon-col' })); } var leafColumns = void 0; if (fixed === 'left') { leafColumns = table.columnManager.leftLeafColumns(); } else if (fixed === 'right') { leafColumns = table.columnManager.rightLeafColumns(); } else { leafColumns = table.columnManager.leafColumns(); } cols = cols.concat(leafColumns.map(function (c) { return react_default.a.createElement('col', { key: c.key || c.dataIndex, style: { width: c.width, minWidth: c.width } }); })); return react_default.a.createElement( 'colgroup', null, cols ); } ColGroup.propTypes = { fixed: prop_types_default.a.string }; ColGroup.contextTypes = { table: prop_types_default.a.any }; // CONCATENATED MODULE: ../node_modules/rc-table/es/TableHeaderRow.js function TableHeaderRow(_ref) { var row = _ref.row, index = _ref.index, height = _ref.height, components = _ref.components, onHeaderRow = _ref.onHeaderRow; var HeaderRow = components.header.row; var HeaderCell = components.header.cell; var rowProps = onHeaderRow(row.map(function (cell) { return cell.column; }), index); var customStyle = rowProps ? rowProps.style : {}; var style = extends_default()({ height: height }, customStyle); return react_default.a.createElement( HeaderRow, extends_default()({}, rowProps, { style: style }), row.map(function (cell, i) { var column = cell.column, cellProps = objectWithoutProperties_default()(cell, ['column']); var customProps = column.onHeaderCell ? column.onHeaderCell(column) : {}; if (column.align) { customProps.style = extends_default()({}, customProps.style, { textAlign: column.align }); } return react_default.a.createElement(HeaderCell, extends_default()({}, cellProps, customProps, { key: column.key || column.dataIndex || i })); }) ); } TableHeaderRow.propTypes = { row: prop_types_default.a.array, index: prop_types_default.a.number, height: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), components: prop_types_default.a.any, onHeaderRow: prop_types_default.a.func }; function getRowHeight(state, props) { var fixedColumnsHeadRowsHeight = state.fixedColumnsHeadRowsHeight; var columns = props.columns, rows = props.rows, fixed = props.fixed; var headerHeight = fixedColumnsHeadRowsHeight[0]; if (!fixed) { return null; } if (headerHeight && columns) { if (headerHeight === 'auto') { return 'auto'; } return headerHeight / rows.length; } return null; } /* harmony default export */ var es_TableHeaderRow = (Object(mini_store_lib["connect"])(function (state, props) { return { height: getRowHeight(state, props) }; })(TableHeaderRow)); // CONCATENATED MODULE: ../node_modules/rc-table/es/TableHeader.js function getHeaderRows(columns) { var currentRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var rows = arguments[2]; rows = rows || []; rows[currentRow] = rows[currentRow] || []; columns.forEach(function (column) { if (column.rowSpan && rows.length < column.rowSpan) { while (rows.length < column.rowSpan) { rows.push([]); } } var cell = { key: column.key, className: column.className || '', children: column.title, column: column }; if (column.children) { getHeaderRows(column.children, currentRow + 1, rows); } if ('colSpan' in column) { cell.colSpan = column.colSpan; } if ('rowSpan' in column) { cell.rowSpan = column.rowSpan; } if (cell.colSpan !== 0) { rows[currentRow].push(cell); } }); return rows.filter(function (row) { return row.length > 0; }); } function TableHeader(props, _ref) { var table = _ref.table; var components = table.components; var _table$props = table.props, prefixCls = _table$props.prefixCls, showHeader = _table$props.showHeader, onHeaderRow = _table$props.onHeaderRow; var expander = props.expander, columns = props.columns, fixed = props.fixed; if (!showHeader) { return null; } var rows = getHeaderRows(columns); expander.renderExpandIndentCell(rows, fixed); var HeaderWrapper = components.header.wrapper; return react_default.a.createElement( HeaderWrapper, { className: prefixCls + '-thead' }, rows.map(function (row, index) { return react_default.a.createElement(es_TableHeaderRow, { key: index, index: index, fixed: fixed, columns: columns, rows: rows, row: row, components: components, onHeaderRow: onHeaderRow }); }) ); } TableHeader.propTypes = { fixed: prop_types_default.a.string, columns: prop_types_default.a.array.isRequired, expander: prop_types_default.a.object.isRequired, onHeaderRow: prop_types_default.a.func }; TableHeader.contextTypes = { table: prop_types_default.a.any }; // EXTERNAL MODULE: ../node_modules/lodash/get.js var get = __webpack_require__("5U5Y"); var get_default = /*#__PURE__*/__webpack_require__.n(get); // CONCATENATED MODULE: ../node_modules/rc-table/es/TableCell.js function isInvalidRenderCellText(text) { return text && !react_default.a.isValidElement(text) && Object.prototype.toString.call(text) === '[object Object]'; } var TableCell_TableCell = function (_React$Component) { inherits_default()(TableCell, _React$Component); function TableCell() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, TableCell); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = TableCell.__proto__ || Object.getPrototypeOf(TableCell)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (e) { var _this$props = _this.props, record = _this$props.record, onCellClick = _this$props.column.onCellClick; if (onCellClick) { onCellClick(record, e); } }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(TableCell, [{ key: 'render', value: function render() { var _props = this.props, record = _props.record, indentSize = _props.indentSize, prefixCls = _props.prefixCls, indent = _props.indent, index = _props.index, expandIcon = _props.expandIcon, column = _props.column, BodyCell = _props.component; var dataIndex = column.dataIndex, render = column.render, _column$className = column.className, className = _column$className === undefined ? '' : _column$className; // We should return undefined if no dataIndex is specified, but in order to // be compatible with object-path's behavior, we return the record object instead. var text = void 0; if (typeof dataIndex === 'number') { text = get_default()(record, dataIndex); } else if (!dataIndex || dataIndex.length === 0) { text = record; } else { text = get_default()(record, dataIndex); } var tdProps = {}; var colSpan = void 0; var rowSpan = void 0; if (render) { text = render(text, record, index); if (isInvalidRenderCellText(text)) { tdProps = text.props || tdProps; colSpan = tdProps.colSpan; rowSpan = tdProps.rowSpan; text = text.children; } } if (column.onCell) { tdProps = extends_default()({}, tdProps, column.onCell(record)); } // Fix https://github.com/ant-design/ant-design/issues/1202 if (isInvalidRenderCellText(text)) { text = null; } var indentText = expandIcon ? react_default.a.createElement('span', { style: { paddingLeft: indentSize * indent + 'px' }, className: prefixCls + '-indent indent-level-' + indent }) : null; if (rowSpan === 0 || colSpan === 0) { return null; } if (column.align) { tdProps.style = extends_default()({}, tdProps.style, { textAlign: column.align }); } return react_default.a.createElement( BodyCell, extends_default()({ className: className, onClick: this.handleClick }, tdProps), indentText, expandIcon, text ); } }]); return TableCell; }(react_default.a.Component); TableCell_TableCell.propTypes = { record: prop_types_default.a.object, prefixCls: prop_types_default.a.string, index: prop_types_default.a.number, indent: prop_types_default.a.number, indentSize: prop_types_default.a.number, column: prop_types_default.a.object, expandIcon: prop_types_default.a.node, component: prop_types_default.a.any }; /* harmony default export */ var es_TableCell = (TableCell_TableCell); // CONCATENATED MODULE: ../node_modules/rc-table/es/TableRow.js var TableRow_TableRow = function (_React$Component) { inherits_default()(TableRow, _React$Component); function TableRow(props) { classCallCheck_default()(this, TableRow); var _this = possibleConstructorReturn_default()(this, (TableRow.__proto__ || Object.getPrototypeOf(TableRow)).call(this, props)); _this.onRowClick = function (event) { var _this$props = _this.props, record = _this$props.record, index = _this$props.index, onRowClick = _this$props.onRowClick; if (onRowClick) { onRowClick(record, index, event); } }; _this.onRowDoubleClick = function (event) { var _this$props2 = _this.props, record = _this$props2.record, index = _this$props2.index, onRowDoubleClick = _this$props2.onRowDoubleClick; if (onRowDoubleClick) { onRowDoubleClick(record, index, event); } }; _this.onContextMenu = function (event) { var _this$props3 = _this.props, record = _this$props3.record, index = _this$props3.index, onRowContextMenu = _this$props3.onRowContextMenu; if (onRowContextMenu) { onRowContextMenu(record, index, event); } }; _this.onMouseEnter = function (event) { var _this$props4 = _this.props, record = _this$props4.record, index = _this$props4.index, onRowMouseEnter = _this$props4.onRowMouseEnter, onHover = _this$props4.onHover, rowKey = _this$props4.rowKey; onHover(true, rowKey); if (onRowMouseEnter) { onRowMouseEnter(record, index, event); } }; _this.onMouseLeave = function (event) { var _this$props5 = _this.props, record = _this$props5.record, index = _this$props5.index, onRowMouseLeave = _this$props5.onRowMouseLeave, onHover = _this$props5.onHover, rowKey = _this$props5.rowKey; onHover(false, rowKey); if (onRowMouseLeave) { onRowMouseLeave(record, index, event); } }; _this.shouldRender = props.visible; _this.state = {}; return _this; } createClass_default()(TableRow, [{ key: 'componentDidMount', value: function componentDidMount() { if (this.state.shouldRender) { this.saveRowRef(); } } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { return !!(this.props.visible || nextProps.visible); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { if (this.state.shouldRender && !this.rowRef) { this.saveRowRef(); } } }, { key: 'setExpanedRowHeight', value: function setExpanedRowHeight() { var _props = this.props, store = _props.store, rowKey = _props.rowKey; var _store$getState = store.getState(), expandedRowsHeight = _store$getState.expandedRowsHeight; var height = this.rowRef.getBoundingClientRect().height; expandedRowsHeight = extends_default()({}, expandedRowsHeight, defineProperty_default()({}, rowKey, height)); store.setState({ expandedRowsHeight: expandedRowsHeight }); } }, { key: 'setRowHeight', value: function setRowHeight() { var _props2 = this.props, store = _props2.store, rowKey = _props2.rowKey; var _store$getState2 = store.getState(), fixedColumnsBodyRowsHeight = _store$getState2.fixedColumnsBodyRowsHeight; var height = this.rowRef.getBoundingClientRect().height; store.setState({ fixedColumnsBodyRowsHeight: extends_default()({}, fixedColumnsBodyRowsHeight, defineProperty_default()({}, rowKey, height)) }); } }, { key: 'getStyle', value: function getStyle() { var _props3 = this.props, height = _props3.height, visible = _props3.visible; if (height && height !== this.style.height) { this.style = extends_default()({}, this.style, { height: height }); } if (!visible && !this.style.display) { this.style = extends_default()({}, this.style, { display: 'none' }); } return this.style; } }, { key: 'saveRowRef', value: function saveRowRef() { this.rowRef = react_dom_default.a.findDOMNode(this); var _props4 = this.props, isAnyColumnsFixed = _props4.isAnyColumnsFixed, fixed = _props4.fixed, expandedRow = _props4.expandedRow, ancestorKeys = _props4.ancestorKeys; if (!isAnyColumnsFixed) { return; } if (!fixed && expandedRow) { this.setExpanedRowHeight(); } if (!fixed && ancestorKeys.length >= 0) { this.setRowHeight(); } } }, { key: 'render', value: function render() { if (!this.state.shouldRender) { return null; } var _props5 = this.props, prefixCls = _props5.prefixCls, columns = _props5.columns, record = _props5.record, rowKey = _props5.rowKey, index = _props5.index, onRow = _props5.onRow, indent = _props5.indent, indentSize = _props5.indentSize, hovered = _props5.hovered, height = _props5.height, visible = _props5.visible, components = _props5.components, hasExpandIcon = _props5.hasExpandIcon, renderExpandIcon = _props5.renderExpandIcon, renderExpandIconCell = _props5.renderExpandIconCell; var BodyRow = components.body.row; var BodyCell = components.body.cell; var className = this.props.className; if (hovered) { className += ' ' + prefixCls + '-hover'; } var cells = []; renderExpandIconCell(cells); for (var i = 0; i < columns.length; i++) { var column = columns[i]; warningOnce(column.onCellClick === undefined, 'column[onCellClick] is deprecated, please use column[onCell] instead.'); cells.push(react_default.a.createElement(es_TableCell, { prefixCls: prefixCls, record: record, indentSize: indentSize, indent: indent, index: index, column: column, key: column.key || column.dataIndex, expandIcon: hasExpandIcon(i) && renderExpandIcon(), component: BodyCell })); } var rowClassName = (prefixCls + ' ' + className + ' ' + prefixCls + '-level-' + indent).trim(); var rowProps = onRow(record, index); var customStyle = rowProps ? rowProps.style : {}; var style = { height: height }; if (!visible) { style.display = 'none'; } style = extends_default()({}, style, customStyle); return react_default.a.createElement( BodyRow, extends_default()({ onClick: this.onRowClick, onDoubleClick: this.onRowDoubleClick, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onContextMenu: this.onContextMenu, className: rowClassName }, rowProps, { style: style, 'data-row-key': rowKey }), cells ); } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(nextProps, prevState) { if (prevState.visible || !prevState.visible && nextProps.visible) { return { shouldRender: true, visible: nextProps.visible }; } return { visible: nextProps.visible }; } }]); return TableRow; }(react_default.a.Component); TableRow_TableRow.propTypes = { onRow: prop_types_default.a.func, onRowClick: prop_types_default.a.func, onRowDoubleClick: prop_types_default.a.func, onRowContextMenu: prop_types_default.a.func, onRowMouseEnter: prop_types_default.a.func, onRowMouseLeave: prop_types_default.a.func, record: prop_types_default.a.object, prefixCls: prop_types_default.a.string, onHover: prop_types_default.a.func, columns: prop_types_default.a.array, height: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), index: prop_types_default.a.number, rowKey: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]).isRequired, className: prop_types_default.a.string, indent: prop_types_default.a.number, indentSize: prop_types_default.a.number, hasExpandIcon: prop_types_default.a.func, hovered: prop_types_default.a.bool.isRequired, visible: prop_types_default.a.bool.isRequired, store: prop_types_default.a.object.isRequired, fixed: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.bool]), renderExpandIcon: prop_types_default.a.func, renderExpandIconCell: prop_types_default.a.func, components: prop_types_default.a.any, expandedRow: prop_types_default.a.bool, isAnyColumnsFixed: prop_types_default.a.bool, ancestorKeys: prop_types_default.a.array.isRequired }; TableRow_TableRow.defaultProps = { onRow: function onRow() {}, onHover: function onHover() {}, hasExpandIcon: function hasExpandIcon() {}, renderExpandIcon: function renderExpandIcon() {}, renderExpandIconCell: function renderExpandIconCell() {} }; function TableRow_getRowHeight(state, props) { var expandedRowsHeight = state.expandedRowsHeight, fixedColumnsBodyRowsHeight = state.fixedColumnsBodyRowsHeight; var fixed = props.fixed, rowKey = props.rowKey; if (!fixed) { return null; } if (expandedRowsHeight[rowKey]) { return expandedRowsHeight[rowKey]; } if (fixedColumnsBodyRowsHeight[rowKey]) { return fixedColumnsBodyRowsHeight[rowKey]; } return null; } polyfill(TableRow_TableRow); /* harmony default export */ var es_TableRow = (Object(mini_store_lib["connect"])(function (state, props) { var currentHoverKey = state.currentHoverKey, expandedRowKeys = state.expandedRowKeys; var rowKey = props.rowKey, ancestorKeys = props.ancestorKeys; var visible = ancestorKeys.length === 0 || ancestorKeys.every(function (k) { return ~expandedRowKeys.indexOf(k); }); return { visible: visible, hovered: currentHoverKey === rowKey, height: TableRow_getRowHeight(state, props) }; })(TableRow_TableRow)); // CONCATENATED MODULE: ../node_modules/rc-table/es/ExpandIcon.js var ExpandIcon_ExpandIcon = function (_React$Component) { inherits_default()(ExpandIcon, _React$Component); function ExpandIcon() { classCallCheck_default()(this, ExpandIcon); return possibleConstructorReturn_default()(this, (ExpandIcon.__proto__ || Object.getPrototypeOf(ExpandIcon)).apply(this, arguments)); } createClass_default()(ExpandIcon, [{ key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { return !shallowequal_default()(nextProps, this.props); } }, { key: 'render', value: function render() { var _props = this.props, expandable = _props.expandable, prefixCls = _props.prefixCls, onExpand = _props.onExpand, needIndentSpaced = _props.needIndentSpaced, expanded = _props.expanded, record = _props.record; if (expandable) { var expandClassName = expanded ? 'expanded' : 'collapsed'; return react_default.a.createElement('span', { className: prefixCls + '-expand-icon ' + prefixCls + '-' + expandClassName, onClick: function onClick(e) { return onExpand(record, e); } }); } else if (needIndentSpaced) { return react_default.a.createElement('span', { className: prefixCls + '-expand-icon ' + prefixCls + '-spaced' }); } return null; } }]); return ExpandIcon; }(react_default.a.Component); ExpandIcon_ExpandIcon.propTypes = { record: prop_types_default.a.object, prefixCls: prop_types_default.a.string, expandable: prop_types_default.a.any, expanded: prop_types_default.a.bool, needIndentSpaced: prop_types_default.a.bool, onExpand: prop_types_default.a.func }; /* harmony default export */ var es_ExpandIcon = (ExpandIcon_ExpandIcon); // CONCATENATED MODULE: ../node_modules/rc-table/es/ExpandableRow.js var ExpandableRow_ExpandableRow = function (_React$Component) { inherits_default()(ExpandableRow, _React$Component); function ExpandableRow() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, ExpandableRow); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = ExpandableRow.__proto__ || Object.getPrototypeOf(ExpandableRow)).call.apply(_ref, [this].concat(args))), _this), _this.hasExpandIcon = function (columnIndex) { var expandRowByClick = _this.props.expandRowByClick; return !_this.expandIconAsCell && !expandRowByClick && columnIndex === _this.expandIconColumnIndex; }, _this.handleExpandChange = function (record, event) { var _this$props = _this.props, onExpandedChange = _this$props.onExpandedChange, expanded = _this$props.expanded, rowKey = _this$props.rowKey; if (_this.expandable) { onExpandedChange(!expanded, record, event, rowKey); } }, _this.handleRowClick = function (record, index, event) { var _this$props2 = _this.props, expandRowByClick = _this$props2.expandRowByClick, onRowClick = _this$props2.onRowClick; if (expandRowByClick) { _this.handleExpandChange(record, event); } if (onRowClick) { onRowClick(record, index, event); } }, _this.renderExpandIcon = function () { var _this$props3 = _this.props, prefixCls = _this$props3.prefixCls, expanded = _this$props3.expanded, record = _this$props3.record, needIndentSpaced = _this$props3.needIndentSpaced; return react_default.a.createElement(es_ExpandIcon, { expandable: _this.expandable, prefixCls: prefixCls, onExpand: _this.handleExpandChange, needIndentSpaced: needIndentSpaced, expanded: expanded, record: record }); }, _this.renderExpandIconCell = function (cells) { if (!_this.expandIconAsCell) { return; } var prefixCls = _this.props.prefixCls; cells.push(react_default.a.createElement( 'td', { className: prefixCls + '-expand-icon-cell', key: 'rc-table-expand-icon-cell' }, _this.renderExpandIcon() )); }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(ExpandableRow, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.handleDestroy(); } }, { key: 'handleDestroy', value: function handleDestroy() { var _props = this.props, onExpandedChange = _props.onExpandedChange, rowKey = _props.rowKey, record = _props.record; if (this.expandable) { onExpandedChange(false, record, null, rowKey, true); } } }, { key: 'render', value: function render() { var _props2 = this.props, childrenColumnName = _props2.childrenColumnName, expandedRowRender = _props2.expandedRowRender, indentSize = _props2.indentSize, record = _props2.record, fixed = _props2.fixed; this.expandIconAsCell = fixed !== 'right' ? this.props.expandIconAsCell : false; this.expandIconColumnIndex = fixed !== 'right' ? this.props.expandIconColumnIndex : -1; var childrenData = record[childrenColumnName]; this.expandable = !!(childrenData || expandedRowRender); var expandableRowProps = { indentSize: indentSize, onRowClick: this.handleRowClick, hasExpandIcon: this.hasExpandIcon, renderExpandIcon: this.renderExpandIcon, renderExpandIconCell: this.renderExpandIconCell }; return this.props.children(expandableRowProps); } }]); return ExpandableRow; }(react_default.a.Component); ExpandableRow_ExpandableRow.propTypes = { prefixCls: prop_types_default.a.string.isRequired, rowKey: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]).isRequired, fixed: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.bool]), record: prop_types_default.a.object.isRequired, indentSize: prop_types_default.a.number, needIndentSpaced: prop_types_default.a.bool.isRequired, expandRowByClick: prop_types_default.a.bool, expanded: prop_types_default.a.bool.isRequired, expandIconAsCell: prop_types_default.a.bool, expandIconColumnIndex: prop_types_default.a.number, childrenColumnName: prop_types_default.a.string, expandedRowRender: prop_types_default.a.func, onExpandedChange: prop_types_default.a.func.isRequired, onRowClick: prop_types_default.a.func, children: prop_types_default.a.func.isRequired }; /* harmony default export */ var es_ExpandableRow = (Object(mini_store_lib["connect"])(function (_ref2, _ref3) { var expandedRowKeys = _ref2.expandedRowKeys; var rowKey = _ref3.rowKey; return { expanded: !!~expandedRowKeys.indexOf(rowKey) }; })(ExpandableRow_ExpandableRow)); // CONCATENATED MODULE: ../node_modules/rc-table/es/BaseTable.js var BaseTable_BaseTable = function (_React$Component) { inherits_default()(BaseTable, _React$Component); function BaseTable() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, BaseTable); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = BaseTable.__proto__ || Object.getPrototypeOf(BaseTable)).call.apply(_ref, [this].concat(args))), _this), _this.handleRowHover = function (isHover, key) { _this.props.store.setState({ currentHoverKey: isHover ? key : null }); }, _this.renderRows = function (renderData, indent) { var rows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; var ancestorKeys = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; var table = _this.context.table; var columnManager = table.columnManager, components = table.components; var _table$props = table.props, prefixCls = _table$props.prefixCls, childrenColumnName = _table$props.childrenColumnName, rowClassName = _table$props.rowClassName, rowRef = _table$props.rowRef, onRowClick = _table$props.onRowClick, onRowDoubleClick = _table$props.onRowDoubleClick, onRowContextMenu = _table$props.onRowContextMenu, onRowMouseEnter = _table$props.onRowMouseEnter, onRowMouseLeave = _table$props.onRowMouseLeave, onRow = _table$props.onRow; var _this$props = _this.props, getRowKey = _this$props.getRowKey, fixed = _this$props.fixed, expander = _this$props.expander, isAnyColumnsFixed = _this$props.isAnyColumnsFixed; var _loop = function _loop(i) { var record = renderData[i]; var key = getRowKey(record, i); var className = typeof rowClassName === 'string' ? rowClassName : rowClassName(record, i, indent); var onHoverProps = {}; if (columnManager.isAnyColumnsFixed()) { onHoverProps.onHover = _this.handleRowHover; } var leafColumns = void 0; if (fixed === 'left') { leafColumns = columnManager.leftLeafColumns(); } else if (fixed === 'right') { leafColumns = columnManager.rightLeafColumns(); } else { leafColumns = _this.getColumns(columnManager.leafColumns()); } var rowPrefixCls = prefixCls + '-row'; var rowIndex = rows.filter(function (row) { return !row.props.expandedRow; }).length; var row = react_default.a.createElement( es_ExpandableRow, extends_default()({}, expander.props, { fixed: fixed, index: rowIndex, prefixCls: rowPrefixCls, record: record, key: key, rowKey: key, onRowClick: onRowClick, needIndentSpaced: expander.needIndentSpaced, onExpandedChange: expander.handleExpandChange }), function (expandableRow) { return (// eslint-disable-line react_default.a.createElement(es_TableRow, extends_default()({ fixed: fixed, indent: indent, className: className, record: record, index: rowIndex, prefixCls: rowPrefixCls, childrenColumnName: childrenColumnName, columns: leafColumns, onRow: onRow, onRowDoubleClick: onRowDoubleClick, onRowContextMenu: onRowContextMenu, onRowMouseEnter: onRowMouseEnter, onRowMouseLeave: onRowMouseLeave }, onHoverProps, { rowKey: key, ancestorKeys: ancestorKeys, ref: rowRef(record, i, indent), components: components, isAnyColumnsFixed: isAnyColumnsFixed }, expandableRow)) ); } ); rows.push(row); expander.renderRows(_this.renderRows, rows, record, i, indent, fixed, key, ancestorKeys); }; for (var i = 0; i < renderData.length; i++) { _loop(i); } return rows; }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(BaseTable, [{ key: 'getColumns', value: function getColumns(cols) { var _props = this.props, _props$columns = _props.columns, columns = _props$columns === undefined ? [] : _props$columns, fixed = _props.fixed; var table = this.context.table; var prefixCls = table.props.prefixCls; return (cols || columns).map(function (column) { return extends_default()({}, column, { className: !!column.fixed && !fixed ? classnames_default()(prefixCls + '-fixed-columns-in-body', column.className) : column.className }); }); } }, { key: 'render', value: function render() { var table = this.context.table; var components = table.components; var _table$props2 = table.props, prefixCls = _table$props2.prefixCls, scroll = _table$props2.scroll, data = _table$props2.data, getBodyWrapper = _table$props2.getBodyWrapper; var _props2 = this.props, expander = _props2.expander, tableClassName = _props2.tableClassName, hasHead = _props2.hasHead, hasBody = _props2.hasBody, fixed = _props2.fixed; var tableStyle = {}; if (!fixed && scroll.x) { // not set width, then use content fixed width if (scroll.x === true) { tableStyle.tableLayout = 'fixed'; } else { tableStyle.width = scroll.x; } } var Table = hasBody ? components.table : 'table'; var BodyWrapper = components.body.wrapper; var body = void 0; if (hasBody) { body = react_default.a.createElement( BodyWrapper, { className: prefixCls + '-tbody' }, this.renderRows(data, 0) ); if (getBodyWrapper) { body = getBodyWrapper(body); } } var columns = this.getColumns(); return react_default.a.createElement( Table, { className: tableClassName, style: tableStyle, key: 'table' }, react_default.a.createElement(ColGroup, { columns: columns, fixed: fixed }), hasHead && react_default.a.createElement(TableHeader, { expander: expander, columns: columns, fixed: fixed }), body ); } }]); return BaseTable; }(react_default.a.Component); BaseTable_BaseTable.propTypes = { fixed: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.bool]), columns: prop_types_default.a.array.isRequired, tableClassName: prop_types_default.a.string.isRequired, hasHead: prop_types_default.a.bool.isRequired, hasBody: prop_types_default.a.bool.isRequired, store: prop_types_default.a.object.isRequired, expander: prop_types_default.a.object.isRequired, getRowKey: prop_types_default.a.func, isAnyColumnsFixed: prop_types_default.a.bool }; BaseTable_BaseTable.contextTypes = { table: prop_types_default.a.any }; /* harmony default export */ var es_BaseTable = (Object(mini_store_lib["connect"])()(BaseTable_BaseTable)); // CONCATENATED MODULE: ../node_modules/rc-table/es/HeadTable.js function HeadTable(props, _ref) { var table = _ref.table; var _table$props = table.props, prefixCls = _table$props.prefixCls, scroll = _table$props.scroll, showHeader = _table$props.showHeader; var columns = props.columns, fixed = props.fixed, tableClassName = props.tableClassName, handleBodyScrollLeft = props.handleBodyScrollLeft, expander = props.expander; var saveRef = table.saveRef; var useFixedHeader = table.props.useFixedHeader; var headStyle = {}; if (scroll.y) { useFixedHeader = true; // Add negative margin bottom for scroll bar overflow bug var scrollbarWidth = measureScrollbar('horizontal'); if (scrollbarWidth > 0 && !fixed) { headStyle.marginBottom = '-' + scrollbarWidth + 'px'; headStyle.paddingBottom = '0px'; } } if (!useFixedHeader || !showHeader) { return null; } return react_default.a.createElement( 'div', { key: 'headTable', ref: fixed ? null : saveRef('headTable'), className: prefixCls + '-header', style: headStyle, onScroll: handleBodyScrollLeft }, react_default.a.createElement(es_BaseTable, { tableClassName: tableClassName, hasHead: true, hasBody: false, fixed: fixed, columns: columns, expander: expander }) ); } HeadTable.propTypes = { fixed: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.bool]), columns: prop_types_default.a.array.isRequired, tableClassName: prop_types_default.a.string.isRequired, handleBodyScrollLeft: prop_types_default.a.func.isRequired, expander: prop_types_default.a.object.isRequired }; HeadTable.contextTypes = { table: prop_types_default.a.any }; // CONCATENATED MODULE: ../node_modules/rc-table/es/BodyTable.js function BodyTable(props, _ref) { var table = _ref.table; var _table$props = table.props, prefixCls = _table$props.prefixCls, scroll = _table$props.scroll; var columns = props.columns, fixed = props.fixed, tableClassName = props.tableClassName, getRowKey = props.getRowKey, handleBodyScroll = props.handleBodyScroll, handleWheel = props.handleWheel, expander = props.expander, isAnyColumnsFixed = props.isAnyColumnsFixed; var saveRef = table.saveRef; var useFixedHeader = table.props.useFixedHeader; var bodyStyle = extends_default()({}, table.props.bodyStyle); var innerBodyStyle = {}; if (scroll.x || fixed) { bodyStyle.overflowX = bodyStyle.overflowX || 'scroll'; // Fix weired webkit render bug // https://github.com/ant-design/ant-design/issues/7783 bodyStyle.WebkitTransform = 'translate3d (0, 0, 0)'; } if (scroll.y) { // maxHeight will make fixed-Table scrolling not working // so we only set maxHeight to body-Table here if (fixed) { innerBodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y; innerBodyStyle.overflowY = bodyStyle.overflowY || 'scroll'; } else { bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y; } bodyStyle.overflowY = bodyStyle.overflowY || 'scroll'; useFixedHeader = true; // Add negative margin bottom for scroll bar overflow bug var scrollbarWidth = measureScrollbar(); if (scrollbarWidth > 0 && fixed) { bodyStyle.marginBottom = '-' + scrollbarWidth + 'px'; bodyStyle.paddingBottom = '0px'; } } var baseTable = react_default.a.createElement(es_BaseTable, { tableClassName: tableClassName, hasHead: !useFixedHeader, hasBody: true, fixed: fixed, columns: columns, expander: expander, getRowKey: getRowKey, isAnyColumnsFixed: isAnyColumnsFixed }); if (fixed && columns.length) { var refName = void 0; if (columns[0].fixed === 'left' || columns[0].fixed === true) { refName = 'fixedColumnsBodyLeft'; } else if (columns[0].fixed === 'right') { refName = 'fixedColumnsBodyRight'; } delete bodyStyle.overflowX; delete bodyStyle.overflowY; return react_default.a.createElement( 'div', { key: 'bodyTable', className: prefixCls + '-body-outer', style: extends_default()({}, bodyStyle) }, react_default.a.createElement( 'div', { className: prefixCls + '-body-inner', style: innerBodyStyle, ref: saveRef(refName), onWheel: handleWheel, onScroll: handleBodyScroll }, baseTable ) ); } return react_default.a.createElement( 'div', { key: 'bodyTable', className: prefixCls + '-body', style: bodyStyle, ref: saveRef('bodyTable'), onWheel: handleWheel, onScroll: handleBodyScroll }, baseTable ); } BodyTable.propTypes = { fixed: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.bool]), columns: prop_types_default.a.array.isRequired, tableClassName: prop_types_default.a.string.isRequired, handleWheel: prop_types_default.a.func.isRequired, handleBodyScroll: prop_types_default.a.func.isRequired, getRowKey: prop_types_default.a.func.isRequired, expander: prop_types_default.a.object.isRequired, isAnyColumnsFixed: prop_types_default.a.bool }; BodyTable.contextTypes = { table: prop_types_default.a.any }; // CONCATENATED MODULE: ../node_modules/rc-table/es/ExpandableTable.js var ExpandableTable_ExpandableTable = function (_React$Component) { inherits_default()(ExpandableTable, _React$Component); function ExpandableTable(props) { classCallCheck_default()(this, ExpandableTable); var _this = possibleConstructorReturn_default()(this, (ExpandableTable.__proto__ || Object.getPrototypeOf(ExpandableTable)).call(this, props)); ExpandableTable__initialiseProps.call(_this); var data = props.data, childrenColumnName = props.childrenColumnName, defaultExpandAllRows = props.defaultExpandAllRows, expandedRowKeys = props.expandedRowKeys, defaultExpandedRowKeys = props.defaultExpandedRowKeys, getRowKey = props.getRowKey; var finnalExpandedRowKeys = []; var rows = [].concat(toConsumableArray_default()(data)); if (defaultExpandAllRows) { for (var i = 0; i < rows.length; i++) { var row = rows[i]; finnalExpandedRowKeys.push(getRowKey(row, i)); rows = rows.concat(row[childrenColumnName] || []); } } else { finnalExpandedRowKeys = expandedRowKeys || defaultExpandedRowKeys; } _this.columnManager = props.columnManager; _this.store = props.store; _this.store.setState({ expandedRowsHeight: {}, expandedRowKeys: finnalExpandedRowKeys }); return _this; } createClass_default()(ExpandableTable, [{ key: 'componentDidUpdate', value: function componentDidUpdate() { if ('expandedRowKeys' in this.props) { this.store.setState({ expandedRowKeys: this.props.expandedRowKeys }); } } }, { key: 'renderExpandedRow', value: function renderExpandedRow(record, index, _render, className, ancestorKeys, indent, fixed) { var _this2 = this; var _props = this.props, prefixCls = _props.prefixCls, expandIconAsCell = _props.expandIconAsCell, indentSize = _props.indentSize; var parentKey = ancestorKeys[ancestorKeys.length - 1]; var rowKey = parentKey + '-extra-row'; var components = { body: { row: 'tr', cell: 'td' } }; var colCount = void 0; if (fixed === 'left') { colCount = this.columnManager.leftLeafColumns().length; } else if (fixed === 'right') { colCount = this.columnManager.rightLeafColumns().length; } else { colCount = this.columnManager.leafColumns().length; } var columns = [{ key: 'extra-row', render: function render() { var _store$getState = _this2.store.getState(), expandedRowKeys = _store$getState.expandedRowKeys; var expanded = !!~expandedRowKeys.indexOf(parentKey); return { props: { colSpan: colCount }, children: fixed !== 'right' ? _render(record, index, indent, expanded) : ' ' }; } }]; if (expandIconAsCell && fixed !== 'right') { columns.unshift({ key: 'expand-icon-placeholder', render: function render() { return null; } }); } return react_default.a.createElement(es_TableRow, { key: rowKey, columns: columns, className: className, rowKey: rowKey, ancestorKeys: ancestorKeys, prefixCls: prefixCls + '-expanded-row', indentSize: indentSize, indent: indent, fixed: fixed, components: components, expandedRow: true }); } }, { key: 'render', value: function render() { var _props2 = this.props, data = _props2.data, childrenColumnName = _props2.childrenColumnName, children = _props2.children; var needIndentSpaced = data.some(function (record) { return record[childrenColumnName]; }); return children({ props: this.props, needIndentSpaced: needIndentSpaced, renderRows: this.renderRows, handleExpandChange: this.handleExpandChange, renderExpandIndentCell: this.renderExpandIndentCell }); } }]); return ExpandableTable; }(react_default.a.Component); ExpandableTable_ExpandableTable.propTypes = { expandIconAsCell: prop_types_default.a.bool, expandedRowKeys: prop_types_default.a.array, expandedRowClassName: prop_types_default.a.func, defaultExpandAllRows: prop_types_default.a.bool, defaultExpandedRowKeys: prop_types_default.a.array, expandIconColumnIndex: prop_types_default.a.number, expandedRowRender: prop_types_default.a.func, childrenColumnName: prop_types_default.a.string, indentSize: prop_types_default.a.number, onExpand: prop_types_default.a.func, onExpandedRowsChange: prop_types_default.a.func, columnManager: prop_types_default.a.object.isRequired, store: prop_types_default.a.object.isRequired, prefixCls: prop_types_default.a.string.isRequired, data: prop_types_default.a.array, children: prop_types_default.a.func.isRequired, getRowKey: prop_types_default.a.func.isRequired }; ExpandableTable_ExpandableTable.defaultProps = { expandIconAsCell: false, expandedRowClassName: function expandedRowClassName() { return ''; }, expandIconColumnIndex: 0, defaultExpandAllRows: false, defaultExpandedRowKeys: [], childrenColumnName: 'children', indentSize: 15, onExpand: function onExpand() {}, onExpandedRowsChange: function onExpandedRowsChange() {} }; var ExpandableTable__initialiseProps = function _initialiseProps() { var _this3 = this; this.handleExpandChange = function (expanded, record, event, rowKey) { var destroy = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; if (event) { event.preventDefault(); event.stopPropagation(); } var _props3 = _this3.props, onExpandedRowsChange = _props3.onExpandedRowsChange, onExpand = _props3.onExpand; var _store$getState2 = _this3.store.getState(), expandedRowKeys = _store$getState2.expandedRowKeys; if (expanded) { // row was expaned expandedRowKeys = [].concat(toConsumableArray_default()(expandedRowKeys), [rowKey]); } else { // row was collapse var expandedRowIndex = expandedRowKeys.indexOf(rowKey); if (expandedRowIndex !== -1) { expandedRowKeys = remove(expandedRowKeys, rowKey); } } if (!_this3.props.expandedRowKeys) { _this3.store.setState({ expandedRowKeys: expandedRowKeys }); } onExpandedRowsChange(expandedRowKeys); if (!destroy) { onExpand(expanded, record); } }; this.renderExpandIndentCell = function (rows, fixed) { var _props4 = _this3.props, prefixCls = _props4.prefixCls, expandIconAsCell = _props4.expandIconAsCell; if (!expandIconAsCell || fixed === 'right' || !rows.length) { return; } var iconColumn = { key: 'rc-table-expand-icon-cell', className: prefixCls + '-expand-icon-th', title: '', rowSpan: rows.length }; rows[0].unshift(extends_default()({}, iconColumn, { column: iconColumn })); }; this.renderRows = function (renderRows, rows, record, index, indent, fixed, parentKey, ancestorKeys) { var _props5 = _this3.props, expandedRowClassName = _props5.expandedRowClassName, expandedRowRender = _props5.expandedRowRender, childrenColumnName = _props5.childrenColumnName; var childrenData = record[childrenColumnName]; var nextAncestorKeys = [].concat(toConsumableArray_default()(ancestorKeys), [parentKey]); var nextIndent = indent + 1; if (expandedRowRender) { rows.push(_this3.renderExpandedRow(record, index, expandedRowRender, expandedRowClassName(record, index, indent), nextAncestorKeys, nextIndent, fixed)); } if (childrenData) { renderRows(childrenData, nextIndent, rows, nextAncestorKeys); } }; }; polyfill(ExpandableTable_ExpandableTable); /* harmony default export */ var es_ExpandableTable = (Object(mini_store_lib["connect"])()(ExpandableTable_ExpandableTable)); // CONCATENATED MODULE: ../node_modules/rc-table/es/Table.js var Table_Table = function (_React$Component) { inherits_default()(Table, _React$Component); function Table(props) { classCallCheck_default()(this, Table); var _this = possibleConstructorReturn_default()(this, (Table.__proto__ || Object.getPrototypeOf(Table)).call(this, props)); _this.state = {}; _this.getRowKey = function (record, index) { var rowKey = _this.props.rowKey; var key = typeof rowKey === 'function' ? rowKey(record, index) : record[rowKey]; warningOnce(key !== undefined, 'Each record in table should have a unique `key` prop,' + 'or set `rowKey` to an unique primary key.'); return key === undefined ? index : key; }; _this.handleWindowResize = function () { _this.syncFixedTableRowHeight(); _this.setScrollPositionClassName(); }; _this.syncFixedTableRowHeight = function () { var tableRect = _this.tableNode.getBoundingClientRect(); // If tableNode's height less than 0, suppose it is hidden and don't recalculate rowHeight. // see: https://github.com/ant-design/ant-design/issues/4836 if (tableRect.height !== undefined && tableRect.height <= 0) { return; } var prefixCls = _this.props.prefixCls; var headRows = _this.headTable ? _this.headTable.querySelectorAll('thead') : _this.bodyTable.querySelectorAll('thead'); var bodyRows = _this.bodyTable.querySelectorAll('.' + prefixCls + '-row') || []; var fixedColumnsHeadRowsHeight = [].map.call(headRows, function (row) { return row.getBoundingClientRect().height || 'auto'; }); var state = _this.store.getState(); var fixedColumnsBodyRowsHeight = [].reduce.call(bodyRows, function (acc, row) { var rowKey = row.getAttribute('data-row-key'); var height = row.getBoundingClientRect().height || state.fixedColumnsBodyRowsHeight[rowKey] || 'auto'; acc[rowKey] = height; return acc; }, {}); if (shallowequal_default()(state.fixedColumnsHeadRowsHeight, fixedColumnsHeadRowsHeight) && shallowequal_default()(state.fixedColumnsBodyRowsHeight, fixedColumnsBodyRowsHeight)) { return; } _this.store.setState({ fixedColumnsHeadRowsHeight: fixedColumnsHeadRowsHeight, fixedColumnsBodyRowsHeight: fixedColumnsBodyRowsHeight }); }; _this.handleBodyScrollLeft = function (e) { // Fix https://github.com/ant-design/ant-design/issues/7635 if (e.currentTarget !== e.target) { return; } var target = e.target; var _this$props$scroll = _this.props.scroll, scroll = _this$props$scroll === undefined ? {} : _this$props$scroll; var headTable = _this.headTable, bodyTable = _this.bodyTable; if (target.scrollLeft !== _this.lastScrollLeft && scroll.x) { if (target === bodyTable && headTable) { headTable.scrollLeft = target.scrollLeft; } else if (target === headTable && bodyTable) { bodyTable.scrollLeft = target.scrollLeft; } _this.setScrollPositionClassName(); } // Remember last scrollLeft for scroll direction detecting. _this.lastScrollLeft = target.scrollLeft; }; _this.handleBodyScrollTop = function (e) { var target = e.target; // Fix https://github.com/ant-design/ant-design/issues/9033 if (e.currentTarget !== target) { return; } var _this$props$scroll2 = _this.props.scroll, scroll = _this$props$scroll2 === undefined ? {} : _this$props$scroll2; var headTable = _this.headTable, bodyTable = _this.bodyTable, fixedColumnsBodyLeft = _this.fixedColumnsBodyLeft, fixedColumnsBodyRight = _this.fixedColumnsBodyRight; if (target.scrollTop !== _this.lastScrollTop && scroll.y && target !== headTable) { var scrollTop = target.scrollTop; if (fixedColumnsBodyLeft && target !== fixedColumnsBodyLeft) { fixedColumnsBodyLeft.scrollTop = scrollTop; } if (fixedColumnsBodyRight && target !== fixedColumnsBodyRight) { fixedColumnsBodyRight.scrollTop = scrollTop; } if (bodyTable && target !== bodyTable) { bodyTable.scrollTop = scrollTop; } } // Remember last scrollTop for scroll direction detecting. _this.lastScrollTop = target.scrollTop; }; _this.handleBodyScroll = function (e) { _this.handleBodyScrollLeft(e); _this.handleBodyScrollTop(e); }; _this.handleWheel = function (event) { var _this$props$scroll3 = _this.props.scroll, scroll = _this$props$scroll3 === undefined ? {} : _this$props$scroll3; if (window.navigator.userAgent.match(/Trident\/7\./) && scroll.y) { event.preventDefault(); var wd = event.deltaY; var target = event.target; var bodyTable = _this.bodyTable, fixedColumnsBodyLeft = _this.fixedColumnsBodyLeft, fixedColumnsBodyRight = _this.fixedColumnsBodyRight; var scrollTop = 0; if (_this.lastScrollTop) { scrollTop = _this.lastScrollTop + wd; } else { scrollTop = wd; } if (fixedColumnsBodyLeft && target !== fixedColumnsBodyLeft) { fixedColumnsBodyLeft.scrollTop = scrollTop; } if (fixedColumnsBodyRight && target !== fixedColumnsBodyRight) { fixedColumnsBodyRight.scrollTop = scrollTop; } if (bodyTable && target !== bodyTable) { bodyTable.scrollTop = scrollTop; } } }; _this.saveRef = function (name) { return function (node) { _this[name] = node; }; }; ['onRowClick', 'onRowDoubleClick', 'onRowContextMenu', 'onRowMouseEnter', 'onRowMouseLeave'].forEach(function (name) { warningOnce(props[name] === undefined, name + ' is deprecated, please use onRow instead.'); }); warningOnce(props.getBodyWrapper === undefined, 'getBodyWrapper is deprecated, please use custom components instead.'); _this.columnManager = new es_ColumnManager(props.columns, props.children); _this.store = Object(mini_store_lib["create"])({ currentHoverKey: null, fixedColumnsHeadRowsHeight: [], fixedColumnsBodyRowsHeight: {} }); _this.setScrollPosition('left'); _this.debouncedWindowResize = utils_debounce(_this.handleWindowResize, 150); return _this; } createClass_default()(Table, [{ key: 'getChildContext', value: function getChildContext() { return { table: { props: this.props, columnManager: this.columnManager, saveRef: this.saveRef, components: merge_default()({ table: 'table', header: { wrapper: 'thead', row: 'tr', cell: 'th' }, body: { wrapper: 'tbody', row: 'tr', cell: 'td' } }, this.props.components) } }; } }, { key: 'componentDidMount', value: function componentDidMount() { if (this.columnManager.isAnyColumnsFixed()) { this.handleWindowResize(); this.resizeEvent = addEventListenerWrap(window, 'resize', this.debouncedWindowResize); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { if (this.columnManager.isAnyColumnsFixed()) { this.handleWindowResize(); if (!this.resizeEvent) { this.resizeEvent = addEventListenerWrap(window, 'resize', this.debouncedWindowResize); } } // when table changes to empty, reset scrollLeft if (prevProps.data.length > 0 && this.props.data.length === 0 && this.hasScrollX()) { this.resetScrollX(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.resizeEvent) { this.resizeEvent.remove(); } if (this.debouncedWindowResize) { this.debouncedWindowResize.cancel(); } } }, { key: 'setScrollPosition', value: function setScrollPosition(position) { this.scrollPosition = position; if (this.tableNode) { var prefixCls = this.props.prefixCls; if (position === 'both') { component_classes_default()(this.tableNode).remove(new RegExp('^' + prefixCls + '-scroll-position-.+$')).add(prefixCls + '-scroll-position-left').add(prefixCls + '-scroll-position-right'); } else { component_classes_default()(this.tableNode).remove(new RegExp('^' + prefixCls + '-scroll-position-.+$')).add(prefixCls + '-scroll-position-' + position); } } } }, { key: 'setScrollPositionClassName', value: function setScrollPositionClassName() { var node = this.bodyTable; var scrollToLeft = node.scrollLeft === 0; var scrollToRight = node.scrollLeft + 1 >= node.children[0].getBoundingClientRect().width - node.getBoundingClientRect().width; if (scrollToLeft && scrollToRight) { this.setScrollPosition('both'); } else if (scrollToLeft) { this.setScrollPosition('left'); } else if (scrollToRight) { this.setScrollPosition('right'); } else if (this.scrollPosition !== 'middle') { this.setScrollPosition('middle'); } } }, { key: 'resetScrollX', value: function resetScrollX() { if (this.headTable) { this.headTable.scrollLeft = 0; } if (this.bodyTable) { this.bodyTable.scrollLeft = 0; } } }, { key: 'hasScrollX', value: function hasScrollX() { var _props$scroll = this.props.scroll, scroll = _props$scroll === undefined ? {} : _props$scroll; return 'x' in scroll; } }, { key: 'renderMainTable', value: function renderMainTable() { var _props = this.props, scroll = _props.scroll, prefixCls = _props.prefixCls; var isAnyColumnsFixed = this.columnManager.isAnyColumnsFixed(); var scrollable = isAnyColumnsFixed || scroll.x || scroll.y; var table = [this.renderTable({ columns: this.columnManager.groupedColumns(), isAnyColumnsFixed: isAnyColumnsFixed }), this.renderEmptyText(), this.renderFooter()]; return scrollable ? react_default.a.createElement( 'div', { className: prefixCls + '-scroll' }, table ) : table; } }, { key: 'renderLeftFixedTable', value: function renderLeftFixedTable() { var prefixCls = this.props.prefixCls; return react_default.a.createElement( 'div', { className: prefixCls + '-fixed-left' }, this.renderTable({ columns: this.columnManager.leftColumns(), fixed: 'left' }) ); } }, { key: 'renderRightFixedTable', value: function renderRightFixedTable() { var prefixCls = this.props.prefixCls; return react_default.a.createElement( 'div', { className: prefixCls + '-fixed-right' }, this.renderTable({ columns: this.columnManager.rightColumns(), fixed: 'right' }) ); } }, { key: 'renderTable', value: function renderTable(options) { var columns = options.columns, fixed = options.fixed, isAnyColumnsFixed = options.isAnyColumnsFixed; var _props2 = this.props, prefixCls = _props2.prefixCls, _props2$scroll = _props2.scroll, scroll = _props2$scroll === undefined ? {} : _props2$scroll; var tableClassName = scroll.x || fixed ? prefixCls + '-fixed' : ''; var headTable = react_default.a.createElement(HeadTable, { key: 'head', columns: columns, fixed: fixed, tableClassName: tableClassName, handleBodyScrollLeft: this.handleBodyScrollLeft, expander: this.expander }); var bodyTable = react_default.a.createElement(BodyTable, { key: 'body', columns: columns, fixed: fixed, tableClassName: tableClassName, getRowKey: this.getRowKey, handleWheel: this.handleWheel, handleBodyScroll: this.handleBodyScroll, expander: this.expander, isAnyColumnsFixed: isAnyColumnsFixed }); return [headTable, bodyTable]; } }, { key: 'renderTitle', value: function renderTitle() { var _props3 = this.props, title = _props3.title, prefixCls = _props3.prefixCls; return title ? react_default.a.createElement( 'div', { className: prefixCls + '-title', key: 'title' }, title(this.props.data) ) : null; } }, { key: 'renderFooter', value: function renderFooter() { var _props4 = this.props, footer = _props4.footer, prefixCls = _props4.prefixCls; return footer ? react_default.a.createElement( 'div', { className: prefixCls + '-footer', key: 'footer' }, footer(this.props.data) ) : null; } }, { key: 'renderEmptyText', value: function renderEmptyText() { var _props5 = this.props, emptyText = _props5.emptyText, prefixCls = _props5.prefixCls, data = _props5.data; if (data.length) { return null; } var emptyClassName = prefixCls + '-placeholder'; return react_default.a.createElement( 'div', { className: emptyClassName, key: 'emptyText' }, typeof emptyText === 'function' ? emptyText() : emptyText ); } }, { key: 'render', value: function render() { var _this2 = this; var props = this.props; var prefixCls = props.prefixCls; if (this.state.columns) { this.columnManager.reset(props.columns); } else if (this.state.children) { this.columnManager.reset(null, props.children); } var className = props.prefixCls; if (props.className) { className += ' ' + props.className; } if (props.useFixedHeader || props.scroll && props.scroll.y) { className += ' ' + prefixCls + '-fixed-header'; } if (this.scrollPosition === 'both') { className += ' ' + prefixCls + '-scroll-position-left ' + prefixCls + '-scroll-position-right'; } else { className += ' ' + prefixCls + '-scroll-position-' + this.scrollPosition; } var hasLeftFixed = this.columnManager.isAnyColumnsLeftFixed(); var hasRightFixed = this.columnManager.isAnyColumnsRightFixed(); return react_default.a.createElement( mini_store_lib["Provider"], { store: this.store }, react_default.a.createElement( es_ExpandableTable, extends_default()({}, props, { columnManager: this.columnManager, getRowKey: this.getRowKey }), function (expander) { _this2.expander = expander; return react_default.a.createElement( 'div', { ref: _this2.saveRef('tableNode'), className: className, style: props.style, id: props.id }, _this2.renderTitle(), react_default.a.createElement( 'div', { className: prefixCls + '-content' }, _this2.renderMainTable(), hasLeftFixed && _this2.renderLeftFixedTable(), hasRightFixed && _this2.renderRightFixedTable() ) ); } ) ); } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(nextProps, prevState) { if (nextProps.columns && nextProps.columns !== prevState.columns) { return { columns: nextProps.columns, children: null }; } else if (nextProps.children !== prevState.children) { return { columns: null, children: nextProps.children }; } return null; } }]); return Table; }(react_default.a.Component); Table_Table.propTypes = extends_default()({ data: prop_types_default.a.array, useFixedHeader: prop_types_default.a.bool, columns: prop_types_default.a.array, prefixCls: prop_types_default.a.string, bodyStyle: prop_types_default.a.object, style: prop_types_default.a.object, rowKey: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.func]), rowClassName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.func]), onRow: prop_types_default.a.func, onHeaderRow: prop_types_default.a.func, onRowClick: prop_types_default.a.func, onRowDoubleClick: prop_types_default.a.func, onRowContextMenu: prop_types_default.a.func, onRowMouseEnter: prop_types_default.a.func, onRowMouseLeave: prop_types_default.a.func, showHeader: prop_types_default.a.bool, title: prop_types_default.a.func, id: prop_types_default.a.string, footer: prop_types_default.a.func, emptyText: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]), scroll: prop_types_default.a.object, rowRef: prop_types_default.a.func, getBodyWrapper: prop_types_default.a.func, children: prop_types_default.a.node, components: prop_types_default.a.shape({ table: prop_types_default.a.any, header: prop_types_default.a.shape({ wrapper: prop_types_default.a.any, row: prop_types_default.a.any, cell: prop_types_default.a.any }), body: prop_types_default.a.shape({ wrapper: prop_types_default.a.any, row: prop_types_default.a.any, cell: prop_types_default.a.any }) }) }, es_ExpandableTable.PropTypes); Table_Table.childContextTypes = { table: prop_types_default.a.any, components: prop_types_default.a.any }; Table_Table.defaultProps = { data: [], useFixedHeader: false, rowKey: 'key', rowClassName: function rowClassName() { return ''; }, onRow: function onRow() {}, onHeaderRow: function onHeaderRow() {}, prefixCls: 'rc-table', bodyStyle: {}, style: {}, showHeader: true, scroll: {}, rowRef: function rowRef() { return null; }, emptyText: function emptyText() { return 'No Data'; } }; polyfill(Table_Table); /* harmony default export */ var es_Table = (Table_Table); // CONCATENATED MODULE: ../node_modules/rc-table/es/Column.js function Column_Column() {} Column_Column.propTypes = { className: prop_types_default.a.string, colSpan: prop_types_default.a.number, title: prop_types_default.a.node, dataIndex: prop_types_default.a.string, width: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]), fixed: prop_types_default.a.oneOf([true, 'left', 'right']), render: prop_types_default.a.func, onCellClick: prop_types_default.a.func, onCell: prop_types_default.a.func, onHeaderCell: prop_types_default.a.func }; /* harmony default export */ var es_Column = (Column_Column); // CONCATENATED MODULE: ../node_modules/rc-table/es/ColumnGroup.js var ColumnGroup_ColumnGroup = function (_Component) { inherits_default()(ColumnGroup, _Component); function ColumnGroup() { classCallCheck_default()(this, ColumnGroup); return possibleConstructorReturn_default()(this, (ColumnGroup.__proto__ || Object.getPrototypeOf(ColumnGroup)).apply(this, arguments)); } return ColumnGroup; }(react["Component"]); ColumnGroup_ColumnGroup.isTableColumnGroup = true; ColumnGroup_ColumnGroup.propTypes = { title: prop_types_default.a.node }; /* harmony default export */ var es_ColumnGroup = (ColumnGroup_ColumnGroup); // CONCATENATED MODULE: ../node_modules/rc-table/es/index.js es_Table.Column = es_Column; es_Table.ColumnGroup = es_ColumnGroup; /* harmony default export */ var rc_table_es = (es_Table); // CONCATENATED MODULE: ../node_modules/rc-pagination/es/Pager.js var Pager_Pager = function Pager(props) { var prefixCls = props.rootPrefixCls + '-item'; var cls = prefixCls + ' ' + prefixCls + '-' + props.page; if (props.active) { cls = cls + ' ' + prefixCls + '-active'; } if (props.className) { cls = cls + ' ' + props.className; } var handleClick = function handleClick() { props.onClick(props.page); }; var handleKeyPress = function handleKeyPress(e) { props.onKeyPress(e, props.onClick, props.page); }; return react_default.a.createElement( 'li', { title: props.showTitle ? props.page : null, className: cls, onClick: handleClick, onKeyPress: handleKeyPress, tabIndex: '0' }, props.itemRender(props.page, 'page', react_default.a.createElement( 'a', null, props.page )) ); }; Pager_Pager.propTypes = { page: prop_types_default.a.number, active: prop_types_default.a.bool, last: prop_types_default.a.bool, locale: prop_types_default.a.object, className: prop_types_default.a.string, showTitle: prop_types_default.a.bool, rootPrefixCls: prop_types_default.a.string, onClick: prop_types_default.a.func, onKeyPress: prop_types_default.a.func, itemRender: prop_types_default.a.func }; /* harmony default export */ var es_Pager = (Pager_Pager); // CONCATENATED MODULE: ../node_modules/rc-pagination/es/KeyCode.js /* harmony default export */ var rc_pagination_es_KeyCode = ({ ZERO: 48, NINE: 57, NUMPAD_ZERO: 96, NUMPAD_NINE: 105, BACKSPACE: 8, DELETE: 46, ENTER: 13, ARROW_UP: 38, ARROW_DOWN: 40 }); // CONCATENATED MODULE: ../node_modules/rc-pagination/es/Options.js var Options_Options = function (_React$Component) { inherits_default()(Options, _React$Component); function Options(props) { classCallCheck_default()(this, Options); var _this = possibleConstructorReturn_default()(this, (Options.__proto__ || Object.getPrototypeOf(Options)).call(this, props)); _this.buildOptionText = function (value) { return value + ' ' + _this.props.locale.items_per_page; }; _this.changeSize = function (value) { _this.props.changeSize(Number(value)); }; _this.handleChange = function (e) { _this.setState({ goInputText: e.target.value }); }; _this.go = function (e) { var val = _this.state.goInputText; if (val === '') { return; } val = isNaN(val) ? _this.props.current : Number(val); if (e.keyCode === rc_pagination_es_KeyCode.ENTER || e.type === 'click') { _this.setState({ goInputText: '' }); _this.props.quickGo(val); } }; _this.state = { goInputText: '' }; return _this; } createClass_default()(Options, [{ key: 'render', value: function render() { var props = this.props; var state = this.state; var locale = props.locale; var prefixCls = props.rootPrefixCls + '-options'; var changeSize = props.changeSize; var quickGo = props.quickGo; var goButton = props.goButton; var buildOptionText = props.buildOptionText || this.buildOptionText; var Select = props.selectComponentClass; var changeSelect = null; var goInput = null; var gotoButton = null; if (!(changeSize || quickGo)) { return null; } if (changeSize && Select) { var Option = Select.Option; var pageSize = props.pageSize || props.pageSizeOptions[0]; var options = props.pageSizeOptions.map(function (opt, i) { return react_default.a.createElement( Option, { key: i, value: opt }, buildOptionText(opt) ); }); changeSelect = react_default.a.createElement( Select, { prefixCls: props.selectPrefixCls, showSearch: false, className: prefixCls + '-size-changer', optionLabelProp: 'children', dropdownMatchSelectWidth: false, value: pageSize.toString(), onChange: this.changeSize, getPopupContainer: function getPopupContainer(triggerNode) { return triggerNode.parentNode; } }, options ); } if (quickGo) { if (goButton) { if (typeof goButton === 'boolean') { gotoButton = react_default.a.createElement( 'button', { type: 'button', onClick: this.go, onKeyUp: this.go }, locale.jump_to_confirm ); } else { gotoButton = react_default.a.createElement( 'span', { onClick: this.go, onKeyUp: this.go }, goButton ); } } goInput = react_default.a.createElement( 'div', { className: prefixCls + '-quick-jumper' }, locale.jump_to, react_default.a.createElement('input', { type: 'text', value: state.goInputText, onChange: this.handleChange, onKeyUp: this.go }), locale.page, gotoButton ); } return react_default.a.createElement( 'li', { className: '' + prefixCls }, changeSelect, goInput ); } }]); return Options; }(react_default.a.Component); Options_Options.propTypes = { changeSize: prop_types_default.a.func, quickGo: prop_types_default.a.func, selectComponentClass: prop_types_default.a.func, current: prop_types_default.a.number, pageSizeOptions: prop_types_default.a.arrayOf(prop_types_default.a.string), pageSize: prop_types_default.a.number, buildOptionText: prop_types_default.a.func, locale: prop_types_default.a.object }; Options_Options.defaultProps = { pageSizeOptions: ['10', '20', '30', '40'] }; /* harmony default export */ var es_Options = (Options_Options); // CONCATENATED MODULE: ../node_modules/rc-pagination/es/locale/zh_CN.js /* harmony default export */ var zh_CN = ({ // Options.jsx items_per_page: '条/页', jump_to: '跳至', jump_to_confirm: '确定', page: '页', // Pagination.jsx prev_page: '上一页', next_page: '下一页', prev_5: '向前 5 页', next_5: '向后 5 页', prev_3: '向前 3 页', next_3: '向后 3 页' }); // CONCATENATED MODULE: ../node_modules/rc-pagination/es/Pagination.js function Pagination_noop() {} function isInteger(value) { return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; } function defaultItemRender(page, type, element) { return element; } var Pagination_Pagination = function (_React$Component) { inherits_default()(Pagination, _React$Component); function Pagination(props) { classCallCheck_default()(this, Pagination); var _this = possibleConstructorReturn_default()(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).call(this, props)); Pagination__initialiseProps.call(_this); var hasOnChange = props.onChange !== Pagination_noop; var hasCurrent = 'current' in props; if (hasCurrent && !hasOnChange) { console.warn('Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.'); // eslint-disable-line } var current = props.defaultCurrent; if ('current' in props) { current = props.current; } var pageSize = props.defaultPageSize; if ('pageSize' in props) { pageSize = props.pageSize; } _this.state = { current: current, currentInputValue: current, pageSize: pageSize }; return _this; } createClass_default()(Pagination, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if ('current' in nextProps) { this.setState({ current: nextProps.current, currentInputValue: nextProps.current }); } if ('pageSize' in nextProps) { var newState = {}; var current = this.state.current; var newCurrent = this.calculatePage(nextProps.pageSize); current = current > newCurrent ? newCurrent : current; if (!('current' in nextProps)) { newState.current = current; newState.currentInputValue = current; } newState.pageSize = nextProps.pageSize; this.setState(newState); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { // When current page change, fix focused style of prev item // A hacky solution of https://github.com/ant-design/ant-design/issues/8948 var prefixCls = this.props.prefixCls; if (prevState.current !== this.state.current && this.paginationNode) { var lastCurrentNode = this.paginationNode.querySelector('.' + prefixCls + '-item-' + prevState.current); if (lastCurrentNode && document.activeElement === lastCurrentNode) { lastCurrentNode.blur(); } } } }, { key: 'getJumpPrevPage', value: function getJumpPrevPage() { return Math.max(1, this.state.current - (this.props.showLessItems ? 3 : 5)); } }, { key: 'getJumpNextPage', value: function getJumpNextPage() { return Math.min(this.calculatePage(), this.state.current + (this.props.showLessItems ? 3 : 5)); } }, { key: 'getJumpPrevPage', value: function getJumpPrevPage() { return Math.max(1, this.state.current - (this.props.showLessItems ? 3 : 5)); } }, { key: 'getJumpNextPage', value: function getJumpNextPage() { return Math.min(this.calculatePage(), this.state.current + (this.props.showLessItems ? 3 : 5)); } }, { key: 'render', value: function render() { // When hideOnSinglePage is true and there is only 1 page, hide the pager if (this.props.hideOnSinglePage === true && this.props.total <= this.state.pageSize) { return null; } var props = this.props; var locale = props.locale; var prefixCls = props.prefixCls; var allPages = this.calculatePage(); var pagerList = []; var jumpPrev = null; var jumpNext = null; var firstPager = null; var lastPager = null; var gotoButton = null; var goButton = props.showQuickJumper && props.showQuickJumper.goButton; var pageBufferSize = props.showLessItems ? 1 : 2; var _state = this.state, current = _state.current, pageSize = _state.pageSize; var prevPage = current - 1 > 0 ? current - 1 : 0; var nextPage = current + 1 < allPages ? current + 1 : allPages; var dataOrAriaAttributeProps = Object.keys(props).reduce(function (prev, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { prev[key] = props[key]; } return prev; }, {}); if (props.simple) { if (goButton) { if (typeof goButton === 'boolean') { gotoButton = react_default.a.createElement( 'button', { type: 'button', onClick: this.handleGoTO, onKeyUp: this.handleGoTO }, locale.jump_to_confirm ); } else { gotoButton = react_default.a.createElement( 'span', { onClick: this.handleGoTO, onKeyUp: this.handleGoTO }, goButton ); } gotoButton = react_default.a.createElement( 'li', { title: props.showTitle ? '' + locale.jump_to + this.state.current + '/' + allPages : null, className: prefixCls + '-simple-pager' }, gotoButton ); } return react_default.a.createElement( 'ul', extends_default()({ className: prefixCls + ' ' + prefixCls + '-simple ' + props.className, style: props.style, ref: this.savePaginationNode }, dataOrAriaAttributeProps), react_default.a.createElement( 'li', { title: props.showTitle ? locale.prev_page : null, onClick: this.prev, tabIndex: this.hasPrev() ? 0 : null, onKeyPress: this.runIfEnterPrev, className: (this.hasPrev() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev', 'aria-disabled': !this.hasPrev() }, props.itemRender(prevPage, 'prev', react_default.a.createElement('a', { className: prefixCls + '-item-link' })) ), react_default.a.createElement( 'li', { title: props.showTitle ? this.state.current + '/' + allPages : null, className: prefixCls + '-simple-pager' }, react_default.a.createElement('input', { type: 'text', value: this.state.currentInputValue, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onChange: this.handleKeyUp, size: '3' }), react_default.a.createElement( 'span', { className: prefixCls + '-slash' }, '\uFF0F' ), allPages ), react_default.a.createElement( 'li', { title: props.showTitle ? locale.next_page : null, onClick: this.next, tabIndex: this.hasPrev() ? 0 : null, onKeyPress: this.runIfEnterNext, className: (this.hasNext() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next', 'aria-disabled': !this.hasNext() }, props.itemRender(nextPage, 'next', react_default.a.createElement('a', { className: prefixCls + '-item-link' })) ), gotoButton ); } if (allPages <= 5 + pageBufferSize * 2) { for (var i = 1; i <= allPages; i++) { var active = this.state.current === i; pagerList.push(react_default.a.createElement(es_Pager, { locale: locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: i, page: i, active: active, showTitle: props.showTitle, itemRender: props.itemRender })); } } else { var prevItemTitle = props.showLessItems ? locale.prev_3 : locale.prev_5; var nextItemTitle = props.showLessItems ? locale.next_3 : locale.next_5; if (props.showPrevNextJumpers) { jumpPrev = react_default.a.createElement( 'li', { title: props.showTitle ? prevItemTitle : null, key: 'prev', onClick: this.jumpPrev, tabIndex: '0', onKeyPress: this.runIfEnterJumpPrev, className: prefixCls + '-jump-prev' }, props.itemRender(this.getJumpPrevPage(), 'jump-prev', react_default.a.createElement('a', { className: prefixCls + '-item-link' })) ); jumpNext = react_default.a.createElement( 'li', { title: props.showTitle ? nextItemTitle : null, key: 'next', tabIndex: '0', onClick: this.jumpNext, onKeyPress: this.runIfEnterJumpNext, className: prefixCls + '-jump-next' }, props.itemRender(this.getJumpNextPage(), 'jump-next', react_default.a.createElement('a', { className: prefixCls + '-item-link' })) ); } lastPager = react_default.a.createElement(es_Pager, { locale: props.locale, last: true, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: allPages, page: allPages, active: false, showTitle: props.showTitle, itemRender: props.itemRender }); firstPager = react_default.a.createElement(es_Pager, { locale: props.locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: 1, page: 1, active: false, showTitle: props.showTitle, itemRender: props.itemRender }); var left = Math.max(1, current - pageBufferSize); var right = Math.min(current + pageBufferSize, allPages); if (current - 1 <= pageBufferSize) { right = 1 + pageBufferSize * 2; } if (allPages - current <= pageBufferSize) { left = allPages - pageBufferSize * 2; } for (var _i = left; _i <= right; _i++) { var _active = current === _i; pagerList.push(react_default.a.createElement(es_Pager, { locale: props.locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: _i, page: _i, active: _active, showTitle: props.showTitle, itemRender: props.itemRender })); } if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) { pagerList[0] = react_default.a.cloneElement(pagerList[0], { className: prefixCls + '-item-after-jump-prev' }); pagerList.unshift(jumpPrev); } if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) { pagerList[pagerList.length - 1] = react_default.a.cloneElement(pagerList[pagerList.length - 1], { className: prefixCls + '-item-before-jump-next' }); pagerList.push(jumpNext); } if (left !== 1) { pagerList.unshift(firstPager); } if (right !== allPages) { pagerList.push(lastPager); } } var totalText = null; if (props.showTotal) { totalText = react_default.a.createElement( 'li', { className: prefixCls + '-total-text' }, props.showTotal(props.total, [(current - 1) * pageSize + 1, current * pageSize > props.total ? props.total : current * pageSize]) ); } var prevDisabled = !this.hasPrev(); var nextDisabled = !this.hasNext(); return react_default.a.createElement( 'ul', extends_default()({ className: prefixCls + ' ' + props.className, style: props.style, unselectable: 'unselectable', ref: this.savePaginationNode }, dataOrAriaAttributeProps), totalText, react_default.a.createElement( 'li', { title: props.showTitle ? locale.prev_page : null, onClick: this.prev, tabIndex: prevDisabled ? null : 0, onKeyPress: this.runIfEnterPrev, className: (!prevDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev', 'aria-disabled': prevDisabled }, props.itemRender(prevPage, 'prev', react_default.a.createElement('a', { className: prefixCls + '-item-link' })) ), pagerList, react_default.a.createElement( 'li', { title: props.showTitle ? locale.next_page : null, onClick: this.next, tabIndex: nextDisabled ? null : 0, onKeyPress: this.runIfEnterNext, className: (!nextDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next', 'aria-disabled': nextDisabled }, props.itemRender(nextPage, 'next', react_default.a.createElement('a', { className: prefixCls + '-item-link' })) ), react_default.a.createElement(es_Options, { locale: props.locale, rootPrefixCls: prefixCls, selectComponentClass: props.selectComponentClass, selectPrefixCls: props.selectPrefixCls, changeSize: this.props.showSizeChanger ? this.changePageSize : null, current: this.state.current, pageSize: this.state.pageSize, pageSizeOptions: this.props.pageSizeOptions, quickGo: this.props.showQuickJumper ? this.handleChange : null, goButton: goButton }) ); } }]); return Pagination; }(react_default.a.Component); Pagination_Pagination.propTypes = { prefixCls: prop_types_default.a.string, current: prop_types_default.a.number, defaultCurrent: prop_types_default.a.number, total: prop_types_default.a.number, pageSize: prop_types_default.a.number, defaultPageSize: prop_types_default.a.number, onChange: prop_types_default.a.func, hideOnSinglePage: prop_types_default.a.bool, showSizeChanger: prop_types_default.a.bool, showLessItems: prop_types_default.a.bool, onShowSizeChange: prop_types_default.a.func, selectComponentClass: prop_types_default.a.func, showPrevNextJumpers: prop_types_default.a.bool, showQuickJumper: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object]), showTitle: prop_types_default.a.bool, pageSizeOptions: prop_types_default.a.arrayOf(prop_types_default.a.string), showTotal: prop_types_default.a.func, locale: prop_types_default.a.object, style: prop_types_default.a.object, itemRender: prop_types_default.a.func }; Pagination_Pagination.defaultProps = { defaultCurrent: 1, total: 0, defaultPageSize: 10, onChange: Pagination_noop, className: '', selectPrefixCls: 'rc-select', prefixCls: 'rc-pagination', selectComponentClass: null, hideOnSinglePage: false, showPrevNextJumpers: true, showQuickJumper: false, showSizeChanger: false, showLessItems: false, showTitle: true, onShowSizeChange: Pagination_noop, locale: zh_CN, style: {}, itemRender: defaultItemRender }; var Pagination__initialiseProps = function _initialiseProps() { var _this2 = this; this.savePaginationNode = function (node) { _this2.paginationNode = node; }; this.calculatePage = function (p) { var pageSize = p; if (typeof pageSize === 'undefined') { pageSize = _this2.state.pageSize; } return Math.floor((_this2.props.total - 1) / pageSize) + 1; }; this.isValid = function (page) { return isInteger(page) && page >= 1 && page !== _this2.state.current; }; this.handleKeyDown = function (e) { if (e.keyCode === rc_pagination_es_KeyCode.ARROW_UP || e.keyCode === rc_pagination_es_KeyCode.ARROW_DOWN) { e.preventDefault(); } }; this.handleKeyUp = function (e) { var inputValue = e.target.value; var currentInputValue = _this2.state.currentInputValue; var value = void 0; if (inputValue === '') { value = inputValue; } else if (isNaN(Number(inputValue))) { value = currentInputValue; } else { value = Number(inputValue); } if (value !== currentInputValue) { _this2.setState({ currentInputValue: value }); } if (e.keyCode === rc_pagination_es_KeyCode.ENTER) { _this2.handleChange(value); } else if (e.keyCode === rc_pagination_es_KeyCode.ARROW_UP) { _this2.handleChange(value - 1); } else if (e.keyCode === rc_pagination_es_KeyCode.ARROW_DOWN) { _this2.handleChange(value + 1); } }; this.changePageSize = function (size) { var current = _this2.state.current; var newCurrent = _this2.calculatePage(size); current = current > newCurrent ? newCurrent : current; // fix the issue: // Once 'total' is 0, 'current' in 'onShowSizeChange' is 0, which is not correct. if (newCurrent === 0) { current = _this2.state.current; } if (typeof size === 'number') { if (!('pageSize' in _this2.props)) { _this2.setState({ pageSize: size }); } if (!('current' in _this2.props)) { _this2.setState({ current: current, currentInputValue: current }); } } _this2.props.onShowSizeChange(current, size); }; this.handleChange = function (p) { var page = p; if (_this2.isValid(page)) { if (page > _this2.calculatePage()) { page = _this2.calculatePage(); } if (!('current' in _this2.props)) { _this2.setState({ current: page, currentInputValue: page }); } var pageSize = _this2.state.pageSize; _this2.props.onChange(page, pageSize); return page; } return _this2.state.current; }; this.prev = function () { if (_this2.hasPrev()) { _this2.handleChange(_this2.state.current - 1); } }; this.next = function () { if (_this2.hasNext()) { _this2.handleChange(_this2.state.current + 1); } }; this.jumpPrev = function () { _this2.handleChange(_this2.getJumpPrevPage()); }; this.jumpNext = function () { _this2.handleChange(_this2.getJumpNextPage()); }; this.hasPrev = function () { return _this2.state.current > 1; }; this.hasNext = function () { return _this2.state.current < _this2.calculatePage(); }; this.runIfEnter = function (event, callback) { for (var _len = arguments.length, restParams = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { restParams[_key - 2] = arguments[_key]; } if (event.key === 'Enter' || event.charCode === 13) { callback.apply(undefined, restParams); } }; this.runIfEnterPrev = function (e) { _this2.runIfEnter(e, _this2.prev); }; this.runIfEnterNext = function (e) { _this2.runIfEnter(e, _this2.next); }; this.runIfEnterJumpPrev = function (e) { _this2.runIfEnter(e, _this2.jumpPrev); }; this.runIfEnterJumpNext = function (e) { _this2.runIfEnter(e, _this2.jumpNext); }; this.handleGoTO = function (e) { if (e.keyCode === rc_pagination_es_KeyCode.ENTER || e.type === 'click') { _this2.handleChange(_this2.state.currentInputValue); } }; }; /* harmony default export */ var es_Pagination = (Pagination_Pagination); // CONCATENATED MODULE: ../node_modules/rc-pagination/es/index.js // CONCATENATED MODULE: ../node_modules/rc-util/es/Children/toArray.js function toArray_toArray(children) { var ret = []; react_default.a.Children.forEach(children, function (c) { ret.push(c); }); return ret; } // CONCATENATED MODULE: ../node_modules/rc-util/es/createChainedFunction.js /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @returns {function|null} */ function createChainedFunction() { var args = [].slice.call(arguments, 0); if (args.length === 1) { return args[0]; } return function chainedFunction() { for (var i = 0; i < args.length; i++) { if (args[i] && args[i].apply) { args[i].apply(this, arguments); } } }; } // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/util.js function util_noop() {} function getKeyFromChildrenIndex(child, menuEventKey, index) { var prefix = menuEventKey || ''; return child.key || prefix + 'item_' + index; } function getMenuIdFromSubMenuEventKey(eventKey) { return eventKey + '-menu-'; } function loopMenuItem(children, cb) { var index = -1; react_default.a.Children.forEach(children, function (c) { index++; if (c && c.type && c.type.isMenuItemGroup) { react_default.a.Children.forEach(c.props.children, function (c2) { index++; cb(c2, index); }); } else { cb(c, index); } }); } function loopMenuItemRecursively(children, keys, ret) { /* istanbul ignore if */ if (!children || ret.find) { return; } react_default.a.Children.forEach(children, function (c) { if (c) { var construct = c.type; if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) { return; } if (keys.indexOf(c.key) !== -1) { ret.find = true; } else if (c.props.children) { loopMenuItemRecursively(c.props.children, keys, ret); } } }); } var menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', // the following keys found need to be removed from test regression 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme']; // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/DOMWrap.js var DOMWrap_DOMWrap = function (_React$Component) { inherits_default()(DOMWrap, _React$Component); function DOMWrap() { classCallCheck_default()(this, DOMWrap); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } DOMWrap.prototype.render = function render() { var props = extends_default()({}, this.props); if (!props.visible) { props.className += ' ' + props.hiddenClassName; } var Tag = props.tag; delete props.tag; delete props.hiddenClassName; delete props.visible; return react_default.a.createElement(Tag, props); }; return DOMWrap; }(react_default.a.Component); DOMWrap_DOMWrap.propTypes = { tag: prop_types_default.a.string, hiddenClassName: prop_types_default.a.string, visible: prop_types_default.a.bool }; DOMWrap_DOMWrap.defaultProps = { tag: 'div', className: '' }; /* harmony default export */ var es_DOMWrap = (DOMWrap_DOMWrap); // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/SubPopupMenu.js function allDisabled(arr) { if (!arr.length) { return true; } return arr.every(function (c) { return !!c.props.disabled; }); } function updateActiveKey(store, menuId, activeKey) { var _extends2; var state = store.getState(); store.setState({ activeKey: extends_default()({}, state.activeKey, (_extends2 = {}, _extends2[menuId] = activeKey, _extends2)) }); } function getEventKey(props) { // when eventKey not available ,it's menu and return menu id '0-menu-' return props.eventKey || '0-menu-'; } function SubPopupMenu_getActiveKey(props, originalActiveKey) { var activeKey = originalActiveKey; var children = props.children, eventKey = props.eventKey; if (activeKey) { var found = void 0; loopMenuItem(children, function (c, i) { if (c && !c.props.disabled && activeKey === getKeyFromChildrenIndex(c, eventKey, i)) { found = true; } }); if (found) { return activeKey; } } activeKey = null; if (props.defaultActiveFirst) { loopMenuItem(children, function (c, i) { if (!activeKey && c && !c.props.disabled) { activeKey = getKeyFromChildrenIndex(c, eventKey, i); } }); return activeKey; } return activeKey; } function SubPopupMenu_saveRef(c) { if (c) { var index = this.instanceArray.indexOf(c); if (index !== -1) { // update component if it's already inside instanceArray this.instanceArray[index] = c; } else { // add component if it's not in instanceArray yet; this.instanceArray.push(c); } } } var SubPopupMenu_SubPopupMenu = function (_React$Component) { inherits_default()(SubPopupMenu, _React$Component); function SubPopupMenu(props) { var _extends3; classCallCheck_default()(this, SubPopupMenu); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); SubPopupMenu__initialiseProps.call(_this); props.store.setState({ activeKey: extends_default()({}, props.store.getState().activeKey, (_extends3 = {}, _extends3[props.eventKey] = SubPopupMenu_getActiveKey(props, props.activeKey), _extends3)) }); _this.instanceArray = []; return _this; } SubPopupMenu.prototype.componentDidMount = function componentDidMount() { // invoke customized ref to expose component to mixin if (this.props.manualRef) { this.props.manualRef(this); } }; SubPopupMenu.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible; }; SubPopupMenu.prototype.componentDidUpdate = function componentDidUpdate() { var props = this.props; var originalActiveKey = 'activeKey' in props ? props.activeKey : props.store.getState().activeKey[getEventKey(props)]; var activeKey = SubPopupMenu_getActiveKey(props, originalActiveKey); if (activeKey !== originalActiveKey) { updateActiveKey(props.store, getEventKey(props), activeKey); } }; // all keyboard events callbacks run from here at first SubPopupMenu.prototype.render = function render() { var _this2 = this; var props = objectWithoutProperties_default()(this.props, []); this.instanceArray = []; var className = classnames_default()(props.prefixCls, props.className, props.prefixCls + '-' + props.mode); var domProps = { className: className, // role could be 'select' and by default set to menu role: props.role || 'menu' }; if (props.id) { domProps.id = props.id; } if (props.focusable) { domProps.tabIndex = '0'; domProps.onKeyDown = this.onKeyDown; } var prefixCls = props.prefixCls, eventKey = props.eventKey, visible = props.visible; menuAllProps.forEach(function (key) { return delete props[key]; }); // Otherwise, the propagated click event will trigger another onClick delete props.onClick; return ( // ESLint is not smart enough to know that the type of `children` was checked. /* eslint-disable */ react_default.a.createElement( es_DOMWrap, extends_default()({}, props, { tag: 'ul', hiddenClassName: prefixCls + '-hidden', visible: visible }, domProps), react_default.a.Children.map(props.children, function (c, i) { return _this2.renderMenuItem(c, i, eventKey || '0-menu-'); }) ) /*eslint-enable */ ); }; return SubPopupMenu; }(react_default.a.Component); SubPopupMenu_SubPopupMenu.propTypes = { onSelect: prop_types_default.a.func, onClick: prop_types_default.a.func, onDeselect: prop_types_default.a.func, onOpenChange: prop_types_default.a.func, onDestroy: prop_types_default.a.func, openTransitionName: prop_types_default.a.string, openAnimation: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), openKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), visible: prop_types_default.a.bool, children: prop_types_default.a.any, parentMenu: prop_types_default.a.object, eventKey: prop_types_default.a.string, store: prop_types_default.a.shape({ getState: prop_types_default.a.func, setState: prop_types_default.a.func }), // adding in refactor focusable: prop_types_default.a.bool, multiple: prop_types_default.a.bool, style: prop_types_default.a.object, defaultActiveFirst: prop_types_default.a.bool, activeKey: prop_types_default.a.string, selectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultSelectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultOpenKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), level: prop_types_default.a.number, mode: prop_types_default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), triggerSubMenuAction: prop_types_default.a.oneOf(['click', 'hover']), inlineIndent: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]), manualRef: prop_types_default.a.func }; SubPopupMenu_SubPopupMenu.defaultProps = { prefixCls: 'rc-menu', className: '', mode: 'vertical', level: 1, inlineIndent: 24, visible: true, focusable: true, style: {}, manualRef: util_noop }; var SubPopupMenu__initialiseProps = function _initialiseProps() { var _this3 = this; this.onKeyDown = function (e, callback) { var keyCode = e.keyCode; var handled = void 0; _this3.getFlatInstanceArray().forEach(function (obj) { if (obj && obj.props.active && obj.onKeyDown) { handled = obj.onKeyDown(e); } }); if (handled) { return 1; } var activeItem = null; if (keyCode === es_KeyCode.UP || keyCode === es_KeyCode.DOWN) { activeItem = _this3.step(keyCode === es_KeyCode.UP ? -1 : 1); } if (activeItem) { e.preventDefault(); updateActiveKey(_this3.props.store, getEventKey(_this3.props), activeItem.props.eventKey); if (typeof callback === 'function') { callback(activeItem); } return 1; } }; this.onItemHover = function (e) { var key = e.key, hover = e.hover; updateActiveKey(_this3.props.store, getEventKey(_this3.props), hover ? key : null); }; this.onDeselect = function (selectInfo) { _this3.props.onDeselect(selectInfo); }; this.onSelect = function (selectInfo) { _this3.props.onSelect(selectInfo); }; this.onClick = function (e) { _this3.props.onClick(e); }; this.onOpenChange = function (e) { _this3.props.onOpenChange(e); }; this.onDestroy = function (key) { /* istanbul ignore next */ _this3.props.onDestroy(key); }; this.getFlatInstanceArray = function () { return _this3.instanceArray; }; this.getOpenTransitionName = function () { return _this3.props.openTransitionName; }; this.step = function (direction) { var children = _this3.getFlatInstanceArray(); var activeKey = _this3.props.store.getState().activeKey[getEventKey(_this3.props)]; var len = children.length; if (!len) { return null; } if (direction < 0) { children = children.concat().reverse(); } // find current activeIndex var activeIndex = -1; children.every(function (c, ci) { if (c && c.props.eventKey === activeKey) { activeIndex = ci; return false; } return true; }); if (!_this3.props.defaultActiveFirst && activeIndex !== -1 && allDisabled(children.slice(activeIndex, len - 1))) { return undefined; } var start = (activeIndex + 1) % len; var i = start; do { var child = children[i]; if (!child || child.props.disabled) { i = (i + 1) % len; } else { return child; } } while (i !== start); return null; }; this.renderCommonMenuItem = function (child, i, extraProps) { var state = _this3.props.store.getState(); var props = _this3.props; var key = getKeyFromChildrenIndex(child, props.eventKey, i); var childProps = child.props; var isActive = key === state.activeKey; var newChildProps = extends_default()({ mode: props.mode, level: props.level, inlineIndent: props.inlineIndent, renderMenuItem: _this3.renderMenuItem, rootPrefixCls: props.prefixCls, index: i, parentMenu: props.parentMenu, // customized ref function, need to be invoked manually in child's componentDidMount manualRef: childProps.disabled ? undefined : createChainedFunction(child.ref, SubPopupMenu_saveRef.bind(_this3)), eventKey: key, active: !childProps.disabled && isActive, multiple: props.multiple, onClick: function onClick(e) { (childProps.onClick || util_noop)(e); _this3.onClick(e); }, onItemHover: _this3.onItemHover, openTransitionName: _this3.getOpenTransitionName(), openAnimation: props.openAnimation, subMenuOpenDelay: props.subMenuOpenDelay, subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, onOpenChange: _this3.onOpenChange, onDeselect: _this3.onDeselect, onSelect: _this3.onSelect, builtinPlacements: props.builtinPlacements }, extraProps); if (props.mode === 'inline') { newChildProps.triggerSubMenuAction = 'click'; } return react_default.a.cloneElement(child, newChildProps); }; this.renderMenuItem = function (c, i, subMenuKey) { /* istanbul ignore if */ if (!c) { return null; } var state = _this3.props.store.getState(); var extraProps = { openKeys: state.openKeys, selectedKeys: state.selectedKeys, triggerSubMenuAction: _this3.props.triggerSubMenuAction, subMenuKey: subMenuKey }; return _this3.renderCommonMenuItem(c, i, extraProps); }; }; /* harmony default export */ var es_SubPopupMenu = (Object(mini_store_lib["connect"])()(SubPopupMenu_SubPopupMenu)); // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/Menu.js var Menu_Menu = function (_React$Component) { inherits_default()(Menu, _React$Component); function Menu(props) { classCallCheck_default()(this, Menu); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); Menu__initialiseProps.call(_this); _this.isRootMenu = true; var selectedKeys = props.defaultSelectedKeys; var openKeys = props.defaultOpenKeys; if ('selectedKeys' in props) { selectedKeys = props.selectedKeys || []; } if ('openKeys' in props) { openKeys = props.openKeys || []; } _this.store = Object(mini_store_lib["create"])({ selectedKeys: selectedKeys, openKeys: openKeys, activeKey: { '0-menu-': SubPopupMenu_getActiveKey(props, props.activeKey) } }); return _this; } Menu.prototype.componentDidMount = function componentDidMount() { this.updateMiniStore(); }; Menu.prototype.componentDidUpdate = function componentDidUpdate() { this.updateMiniStore(); }; // onKeyDown needs to be exposed as a instance method // e.g., in rc-select, we need to navigate menu item while // current active item is rc-select input box rather than the menu itself Menu.prototype.updateMiniStore = function updateMiniStore() { if ('selectedKeys' in this.props) { this.store.setState({ selectedKeys: this.props.selectedKeys || [] }); } if ('openKeys' in this.props) { this.store.setState({ openKeys: this.props.openKeys || [] }); } }; Menu.prototype.render = function render() { var _this2 = this; var props = objectWithoutProperties_default()(this.props, []); props.className += ' ' + props.prefixCls + '-root'; props = extends_default()({}, props, { onClick: this.onClick, onOpenChange: this.onOpenChange, onDeselect: this.onDeselect, onSelect: this.onSelect, openTransitionName: this.getOpenTransitionName(), parentMenu: this }); return react_default.a.createElement( mini_store_lib["Provider"], { store: this.store }, react_default.a.createElement( es_SubPopupMenu, extends_default()({}, props, { ref: function ref(c) { return _this2.innerMenu = c; } }), this.props.children ) ); }; return Menu; }(react_default.a.Component); Menu_Menu.propTypes = { defaultSelectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultActiveFirst: prop_types_default.a.bool, selectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultOpenKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), openKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), mode: prop_types_default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), getPopupContainer: prop_types_default.a.func, onClick: prop_types_default.a.func, onSelect: prop_types_default.a.func, onDeselect: prop_types_default.a.func, onDestroy: prop_types_default.a.func, openTransitionName: prop_types_default.a.string, openAnimation: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), subMenuOpenDelay: prop_types_default.a.number, subMenuCloseDelay: prop_types_default.a.number, forceSubMenuRender: prop_types_default.a.bool, triggerSubMenuAction: prop_types_default.a.string, level: prop_types_default.a.number, selectable: prop_types_default.a.bool, multiple: prop_types_default.a.bool, children: prop_types_default.a.any, className: prop_types_default.a.string, style: prop_types_default.a.object, activeKey: prop_types_default.a.string, prefixCls: prop_types_default.a.string, builtinPlacements: prop_types_default.a.object }; Menu_Menu.defaultProps = { selectable: true, onClick: util_noop, onSelect: util_noop, onOpenChange: util_noop, onDeselect: util_noop, defaultSelectedKeys: [], defaultOpenKeys: [], subMenuOpenDelay: 0.1, subMenuCloseDelay: 0.1, triggerSubMenuAction: 'hover', prefixCls: 'rc-menu', className: '', mode: 'vertical', style: {}, builtinPlacements: {} }; var Menu__initialiseProps = function _initialiseProps() { var _this3 = this; this.onSelect = function (selectInfo) { var props = _this3.props; if (props.selectable) { // root menu var selectedKeys = _this3.store.getState().selectedKeys; var selectedKey = selectInfo.key; if (props.multiple) { selectedKeys = selectedKeys.concat([selectedKey]); } else { selectedKeys = [selectedKey]; } if (!('selectedKeys' in props)) { _this3.store.setState({ selectedKeys: selectedKeys }); } props.onSelect(extends_default()({}, selectInfo, { selectedKeys: selectedKeys })); } }; this.onClick = function (e) { _this3.props.onClick(e); }; this.onKeyDown = function (e, callback) { _this3.innerMenu.getWrappedInstance().onKeyDown(e, callback); }; this.onOpenChange = function (event) { var props = _this3.props; var openKeys = _this3.store.getState().openKeys.concat(); var changed = false; var processSingle = function processSingle(e) { var oneChanged = false; if (e.open) { oneChanged = openKeys.indexOf(e.key) === -1; if (oneChanged) { openKeys.push(e.key); } } else { var index = openKeys.indexOf(e.key); oneChanged = index !== -1; if (oneChanged) { openKeys.splice(index, 1); } } changed = changed || oneChanged; }; if (Array.isArray(event)) { // batch change call event.forEach(processSingle); } else { processSingle(event); } if (changed) { if (!('openKeys' in _this3.props)) { _this3.store.setState({ openKeys: openKeys }); } props.onOpenChange(openKeys); } }; this.onDeselect = function (selectInfo) { var props = _this3.props; if (props.selectable) { var selectedKeys = _this3.store.getState().selectedKeys.concat(); var selectedKey = selectInfo.key; var index = selectedKeys.indexOf(selectedKey); if (index !== -1) { selectedKeys.splice(index, 1); } if (!('selectedKeys' in props)) { _this3.store.setState({ selectedKeys: selectedKeys }); } props.onDeselect(extends_default()({}, selectInfo, { selectedKeys: selectedKeys })); } }; this.getOpenTransitionName = function () { var props = _this3.props; var transitionName = props.openTransitionName; var animationName = props.openAnimation; if (!transitionName && typeof animationName === 'string') { transitionName = props.prefixCls + '-open-' + animationName; } return transitionName; }; }; /* harmony default export */ var es_Menu = (Menu_Menu); // CONCATENATED MODULE: ../node_modules/dom-align/es/propertyUtils.js var vendorPrefix = void 0; var jsCssMap = { Webkit: '-webkit-', Moz: '-moz-', // IE did it wrong again ... ms: '-ms-', O: '-o-' }; function getVendorPrefix() { if (vendorPrefix !== undefined) { return vendorPrefix; } vendorPrefix = ''; var style = document.createElement('p').style; var testProp = 'Transform'; for (var key in jsCssMap) { if (key + testProp in style) { vendorPrefix = key; } } return vendorPrefix; } function getTransitionName() { return getVendorPrefix() ? getVendorPrefix() + 'TransitionProperty' : 'transitionProperty'; } function getTransformName() { return getVendorPrefix() ? getVendorPrefix() + 'Transform' : 'transform'; } function setTransitionProperty(node, value) { var name = getTransitionName(); if (name) { node.style[name] = value; if (name !== 'transitionProperty') { node.style.transitionProperty = value; } } } function propertyUtils_setTransform(node, value) { var name = getTransformName(); if (name) { node.style[name] = value; if (name !== 'transform') { node.style.transform = value; } } } function getTransitionProperty(node) { return node.style.transitionProperty || node.style[getTransitionName()]; } function getTransformXY(node) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var matrix = transform.replace(/[^0-9\-.,]/g, '').split(','); return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) }; } return { x: 0, y: 0 }; } var matrix2d = /matrix\((.*)\)/; var matrix3d = /matrix3d\((.*)\)/; function setTransformXY(node, xy) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var arr = void 0; var match2d = transform.match(matrix2d); if (match2d) { match2d = match2d[1]; arr = match2d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[4] = xy.x; arr[5] = xy.y; propertyUtils_setTransform(node, 'matrix(' + arr.join(',') + ')'); } else { var match3d = transform.match(matrix3d)[1]; arr = match3d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[12] = xy.x; arr[13] = xy.y; propertyUtils_setTransform(node, 'matrix3d(' + arr.join(',') + ')'); } } else { propertyUtils_setTransform(node, 'translateX(' + xy.x + 'px) translateY(' + xy.y + 'px) translateZ(0)'); } } // CONCATENATED MODULE: ../node_modules/dom-align/es/utils.js 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 RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; var getComputedStyleX = void 0; // https://stackoverflow.com/a/3485654/3040605 function forceRelayout(elem) { var originalStyle = elem.style.display; elem.style.display = 'none'; elem.offsetHeight; // eslint-disable-line elem.style.display = originalStyle; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value = value + 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } function getClientPosition(elem) { var box = void 0; var x = void 0; var y = void 0; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function utils_getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return utils_getScroll(w); } function getScrollTop(w) { return utils_getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj !== null && obj !== undefined && obj == obj.window; } function getDocument(node) { if (isWindow(node)) { return node.document; } if (node.nodeType === 9) { return node; } return node.ownerDocument; } function _getComputedStyle(elem, name, cs) { var computedStyle = cs; var val = ''; var d = getDocument(elem); computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function getOffsetDirection(dir, option) { if (dir === 'left') { return option.useCssRight ? 'right' : dir; } return option.useCssBottom ? 'bottom' : dir; } function oppositeOffsetDirection(dir) { if (dir === 'left') { return 'right'; } else if (dir === 'right') { return 'left'; } else if (dir === 'top') { return 'bottom'; } else if (dir === 'bottom') { return 'top'; } } // 设置 elem 相对 elem.ownerDocument 的坐标 function setLeftTop(elem, offset, option) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var presetH = -999; var presetV = -999; var horizontalProperty = getOffsetDirection('left', option); var verticalProperty = getOffsetDirection('top', option); var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); if (horizontalProperty !== 'left') { presetH = 999; } if (verticalProperty !== 'top') { presetV = 999; } var originalTransition = ''; var originalOffset = getOffset(elem); if ('left' in offset || 'top' in offset) { originalTransition = getTransitionProperty(elem) || ''; setTransitionProperty(elem, 'none'); } if ('left' in offset) { elem.style[oppositeHorizontalProperty] = ''; elem.style[horizontalProperty] = presetH + 'px'; } if ('top' in offset) { elem.style[oppositeVerticalProperty] = ''; elem.style[verticalProperty] = presetV + 'px'; } // force relayout forceRelayout(elem); var old = getOffset(elem); var originalStyle = {}; for (var key in offset) { if (offset.hasOwnProperty(key)) { var dir = getOffsetDirection(key, option); var preset = key === 'left' ? presetH : presetV; var off = originalOffset[key] - old[key]; if (dir === key) { originalStyle[dir] = preset + off; } else { originalStyle[dir] = preset - off; } } } css(elem, originalStyle); // force relayout forceRelayout(elem); if ('left' in offset || 'top' in offset) { setTransitionProperty(elem, originalTransition); } var ret = {}; for (var _key in offset) { if (offset.hasOwnProperty(_key)) { var _dir = getOffsetDirection(_key, option); var _off = offset[_key] - originalOffset[_key]; if (_key === _dir) { ret[_dir] = originalStyle[_dir] + _off; } else { ret[_dir] = originalStyle[_dir] - _off; } } } css(elem, ret); } function utils_setTransform(elem, offset) { var originalOffset = getOffset(elem); var originalXY = getTransformXY(elem); var resultXY = { x: originalXY.x, y: originalXY.y }; if ('left' in offset) { resultXY.x = originalXY.x + offset.left - originalOffset.left; } if ('top' in offset) { resultXY.y = originalXY.y + offset.top - originalOffset.top; } setTransformXY(elem, resultXY); } function utils_setOffset(elem, offset, option) { if (option.ignoreShake) { var oriOffset = getOffset(elem); var oLeft = oriOffset.left.toFixed(0); var oTop = oriOffset.top.toFixed(0); var tLeft = offset.left.toFixed(0); var tTop = offset.top.toFixed(0); if (oLeft === tLeft && oTop === tTop) { return; } } if (option.useCssRight || option.useCssBottom) { setLeftTop(elem, offset, option); } else if (option.useCssTransform && getTransformName() in document.body.style) { utils_setTransform(elem, offset, option); } else { setLeftTop(elem, offset, option); } } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = void 0; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = void 0; var j = void 0; var i = void 0; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = void 0; if (prop === 'border') { cssProp = '' + prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, ex) { var extra = ex; if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } else if (borderBoxValueOrIsBorderBox) { if (extra === BORDER_INDEX) { return val; } return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle)); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay() { for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) { args[_key2] = arguments[_key2]; } var val = void 0; var elem = args[0]; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, v) { var val = v; if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); function mix(to, from) { for (var i in from) { if (from.hasOwnProperty(i)) { to[i] = from[i]; } } return to; } var utils = { getWindow: function getWindow(node) { if (node && node.document && node.setTimeout) { return node; } var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, getDocument: getDocument, offset: function offset(el, value, option) { if (typeof value !== 'undefined') { utils_setOffset(el, value, option || {}); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var i = void 0; var ret = {}; for (i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, mix: mix, getWindowScrollLeft: function getWindowScrollLeft(w) { return getScrollLeft(w); }, getWindowScrollTop: function getWindowScrollTop(w) { return getScrollTop(w); }, merge: function merge() { var ret = {}; for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) { args[_key3] = arguments[_key3]; } for (var i = 0; i < args.length; i++) { utils.mix(ret, args[i]); } return ret; }, viewportWidth: 0, viewportHeight: 0 }; mix(utils, domUtils); /* harmony default export */ var es_utils = (utils); // CONCATENATED MODULE: ../node_modules/dom-align/es/getOffsetParent.js /** * 得到会导致元素显示不全的祖先元素 */ function getOffsetParent(element) { if (es_utils.isWindow(element) || element.nodeType === 9) { return null; } // ie 这个也不是完全可行 /*
元素 6 高 100px 宽 50px
*/ // element.offsetParent does the right thing in ie7 and below. Return parent with layout! // In other browsers it only includes elements with position absolute, relative or // fixed, not elements with overflow set to auto or scroll. // if (UA.ie && ieMode < 8) { // return element.offsetParent; // } // 统一的 offsetParent 方法 var doc = es_utils.getDocument(element); var body = doc.body; var parent = void 0; var positionStyle = es_utils.css(element, 'position'); var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute'; if (!skipStatic) { return element.nodeName.toLowerCase() === 'html' ? null : element.parentNode; } for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) { positionStyle = es_utils.css(parent, 'position'); if (positionStyle !== 'static') { return parent; } } return null; } /* harmony default export */ var es_getOffsetParent = (getOffsetParent); // CONCATENATED MODULE: ../node_modules/dom-align/es/isAncestorFixed.js function isAncestorFixed(element) { if (es_utils.isWindow(element) || element.nodeType === 9) { return false; } var doc = es_utils.getDocument(element); var body = doc.body; var parent = null; for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) { var positionStyle = es_utils.css(parent, 'position'); if (positionStyle === 'fixed') { return true; } } return false; } // CONCATENATED MODULE: ../node_modules/dom-align/es/getVisibleRectForElement.js /** * 获得元素的显示部分的区域 */ function getVisibleRectForElement(element) { var visibleRect = { left: 0, right: Infinity, top: 0, bottom: Infinity }; var el = es_getOffsetParent(element); var doc = es_utils.getDocument(element); var win = doc.defaultView || doc.parentWindow; var body = doc.body; var documentElement = doc.documentElement; // Determine the size of the visible rect by climbing the dom accounting for // all scrollable containers. while (el) { // clientWidth is zero for inline block elements in ie. if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire // viewport. In some browsers, el.offsetParent may be // document.documentElement, so check for that too. el !== body && el !== documentElement && es_utils.css(el, 'overflow') !== 'visible') { var pos = es_utils.offset(el); // add border pos.left += el.clientLeft; pos.top += el.clientTop; visibleRect.top = Math.max(visibleRect.top, pos.top); visibleRect.right = Math.min(visibleRect.right, // consider area without scrollBar pos.left + el.clientWidth); visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight); visibleRect.left = Math.max(visibleRect.left, pos.left); } else if (el === body || el === documentElement) { break; } el = es_getOffsetParent(el); } // Set element position to fixed // make sure absolute element itself don't affect it's visible area // https://github.com/ant-design/ant-design/issues/7601 var originalPosition = null; if (!es_utils.isWindow(element) && element.nodeType !== 9) { originalPosition = element.style.position; var position = es_utils.css(element, 'position'); if (position === 'absolute') { element.style.position = 'fixed'; } } var scrollX = es_utils.getWindowScrollLeft(win); var scrollY = es_utils.getWindowScrollTop(win); var viewportWidth = es_utils.viewportWidth(win); var viewportHeight = es_utils.viewportHeight(win); var documentWidth = documentElement.scrollWidth; var documentHeight = documentElement.scrollHeight; // Reset element position after calculate the visible area if (element.style) { element.style.position = originalPosition; } if (isAncestorFixed(element)) { // Clip by viewport's size. visibleRect.left = Math.max(visibleRect.left, scrollX); visibleRect.top = Math.max(visibleRect.top, scrollY); visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth); visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight); } else { // Clip by document's size. var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth); visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth); var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight); visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight); } return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null; } /* harmony default export */ var es_getVisibleRectForElement = (getVisibleRectForElement); // CONCATENATED MODULE: ../node_modules/dom-align/es/adjustForViewport.js function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { var pos = es_utils.clone(elFuturePos); var size = { width: elRegion.width, height: elRegion.height }; if (overflow.adjustX && pos.left < visibleRect.left) { pos.left = visibleRect.left; } // Left edge inside and right edge outside viewport, try to resize it. if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) { size.width -= pos.left + size.width - visibleRect.right; } // Right edge outside viewport, try to move it. if (overflow.adjustX && pos.left + size.width > visibleRect.right) { // 保证左边界和可视区域左边界对齐 pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); } // Top edge outside viewport, try to move it. if (overflow.adjustY && pos.top < visibleRect.top) { pos.top = visibleRect.top; } // Top edge inside and bottom edge outside viewport, try to resize it. if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) { size.height -= pos.top + size.height - visibleRect.bottom; } // Bottom edge outside viewport, try to move it. if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { // 保证上边界和可视区域上边界对齐 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); } return es_utils.mix(pos, size); } /* harmony default export */ var es_adjustForViewport = (adjustForViewport); // CONCATENATED MODULE: ../node_modules/dom-align/es/getRegion.js function getRegion(node) { var offset = void 0; var w = void 0; var h = void 0; if (!es_utils.isWindow(node) && node.nodeType !== 9) { offset = es_utils.offset(node); w = es_utils.outerWidth(node); h = es_utils.outerHeight(node); } else { var win = es_utils.getWindow(node); offset = { left: es_utils.getWindowScrollLeft(win), top: es_utils.getWindowScrollTop(win) }; w = es_utils.viewportWidth(win); h = es_utils.viewportHeight(win); } offset.width = w; offset.height = h; return offset; } /* harmony default export */ var es_getRegion = (getRegion); // CONCATENATED MODULE: ../node_modules/dom-align/es/getAlignOffset.js /** * 获取 node 上的 align 对齐点 相对于页面的坐标 */ function getAlignOffset(region, align) { var V = align.charAt(0); var H = align.charAt(1); var w = region.width; var h = region.height; var x = region.left; var y = region.top; if (V === 'c') { y += h / 2; } else if (V === 'b') { y += h; } if (H === 'c') { x += w / 2; } else if (H === 'r') { x += w; } return { left: x, top: y }; } /* harmony default export */ var es_getAlignOffset = (getAlignOffset); // CONCATENATED MODULE: ../node_modules/dom-align/es/getElFuturePos.js function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { var p1 = es_getAlignOffset(refNodeRegion, points[1]); var p2 = es_getAlignOffset(elRegion, points[0]); var diff = [p2.left - p1.left, p2.top - p1.top]; return { left: elRegion.left - diff[0] + offset[0] - targetOffset[0], top: elRegion.top - diff[1] + offset[1] - targetOffset[1] }; } /* harmony default export */ var es_getElFuturePos = (getElFuturePos); // CONCATENATED MODULE: ../node_modules/dom-align/es/align/align.js /** * align dom node flexibly * @author yiminghe@gmail.com */ // http://yiminghe.iteye.com/blog/1124720 function isFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; } function isFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom; } function isCompleteFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left; } function isCompleteFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top; } function flip(points, reg, map) { var ret = []; es_utils.each(points, function (p) { ret.push(p.replace(reg, function (m) { return map[m]; })); }); return ret; } function flipOffset(offset, index) { offset[index] = -offset[index]; return offset; } function convertOffset(str, offsetLen) { var n = void 0; if (/%$/.test(str)) { n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen; } else { n = parseInt(str, 10); } return n || 0; } function normalizeOffset(offset, el) { offset[0] = convertOffset(offset[0], el.width); offset[1] = convertOffset(offset[1], el.height); } /** * @param el * @param tgtRegion 参照节点所占的区域: { left, top, width, height } * @param align */ function doAlign(el, tgtRegion, align, isTgtRegionVisible) { var points = align.points; var offset = align.offset || [0, 0]; var targetOffset = align.targetOffset || [0, 0]; var overflow = align.overflow; var source = align.source || el; offset = [].concat(offset); targetOffset = [].concat(targetOffset); overflow = overflow || {}; var newOverflowCfg = {}; var fail = 0; // 当前节点可以被放置的显示区域 var visibleRect = es_getVisibleRectForElement(source); // 当前节点所占的区域, left/top/width/height var elRegion = es_getRegion(source); // 将 offset 转换成数值,支持百分比 normalizeOffset(offset, elRegion); normalizeOffset(targetOffset, tgtRegion); // 当前节点将要被放置的位置 var elFuturePos = es_getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); // 当前节点将要所处的区域 var newElRegion = es_utils.merge(elRegion, elFuturePos); // 如果可视区域不能完全放置当前节点时允许调整 if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) { if (overflow.adjustX) { // 如果横向不能放下 if (isFailX(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var newPoints = flip(points, /[lr]/ig, { l: 'r', r: 'l' }); // 偏移量也反下 var newOffset = flipOffset(offset, 0); var newTargetOffset = flipOffset(targetOffset, 0); var newElFuturePos = es_getElFuturePos(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset); if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) { fail = 1; points = newPoints; offset = newOffset; targetOffset = newTargetOffset; } } } if (overflow.adjustY) { // 如果纵向不能放下 if (isFailY(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var _newPoints = flip(points, /[tb]/ig, { t: 'b', b: 't' }); // 偏移量也反下 var _newOffset = flipOffset(offset, 1); var _newTargetOffset = flipOffset(targetOffset, 1); var _newElFuturePos = es_getElFuturePos(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset); if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) { fail = 1; points = _newPoints; offset = _newOffset; targetOffset = _newTargetOffset; } } } // 如果失败,重新计算当前节点将要被放置的位置 if (fail) { elFuturePos = es_getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); es_utils.mix(newElRegion, elFuturePos); } var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect); var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect); // 检查反下后的位置是否可以放下了,如果仍然放不下: // 1. 复原修改过的定位参数 if (isStillFailX || isStillFailY) { points = align.points; offset = align.offset || [0, 0]; targetOffset = align.targetOffset || [0, 0]; } // 2. 只有指定了可以调整当前方向才调整 newOverflowCfg.adjustX = overflow.adjustX && isStillFailX; newOverflowCfg.adjustY = overflow.adjustY && isStillFailY; // 确实要调整,甚至可能会调整高度宽度 if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { newElRegion = es_adjustForViewport(elFuturePos, elRegion, visibleRect, newOverflowCfg); } } // need judge to in case set fixed with in css on height auto element if (newElRegion.width !== elRegion.width) { es_utils.css(source, 'width', es_utils.width(source) + newElRegion.width - elRegion.width); } if (newElRegion.height !== elRegion.height) { es_utils.css(source, 'height', es_utils.height(source) + newElRegion.height - elRegion.height); } // https://github.com/kissyteam/kissy/issues/190 // 相对于屏幕位置没变,而 left/top 变了 // 例如
es_utils.offset(source, { left: newElRegion.left, top: newElRegion.top }, { useCssRight: align.useCssRight, useCssBottom: align.useCssBottom, useCssTransform: align.useCssTransform, ignoreShake: align.ignoreShake }); return { points: points, offset: offset, targetOffset: targetOffset, overflow: newOverflowCfg }; } /* harmony default export */ var align_align = (doAlign); /** * 2012-04-26 yiminghe@gmail.com * - 优化智能对齐算法 * - 慎用 resizeXX * * 2011-07-13 yiminghe@gmail.com note: * - 增加智能对齐,以及大小调整选项 **/ // CONCATENATED MODULE: ../node_modules/dom-align/es/align/alignElement.js function isOutOfVisibleRect(target) { var visibleRect = es_getVisibleRectForElement(target); var targetRegion = es_getRegion(target); return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom; } function alignElement(el, refNode, align) { var target = align.target || refNode; var refNodeRegion = es_getRegion(target); var isTargetNotOutOfVisible = !isOutOfVisibleRect(target); return align_align(el, refNodeRegion, align, isTargetNotOutOfVisible); } alignElement.__getOffsetParent = es_getOffsetParent; alignElement.__getVisibleRectForElement = es_getVisibleRectForElement; /* harmony default export */ var align_alignElement = (alignElement); // CONCATENATED MODULE: ../node_modules/dom-align/es/align/alignPoint.js 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; }; /** * `tgtPoint`: { pageX, pageY } or { clientX, clientY }. * If client position provided, will internal convert to page position. */ function alignPoint_alignPoint(el, tgtPoint, align) { var pageX = void 0; var pageY = void 0; var doc = es_utils.getDocument(el); var win = doc.defaultView || doc.parentWindow; var scrollX = es_utils.getWindowScrollLeft(win); var scrollY = es_utils.getWindowScrollTop(win); var viewportWidth = es_utils.viewportWidth(win); var viewportHeight = es_utils.viewportHeight(win); if ('pageX' in tgtPoint) { pageX = tgtPoint.pageX; } else { pageX = scrollX + tgtPoint.clientX; } if ('pageY' in tgtPoint) { pageY = tgtPoint.pageY; } else { pageY = scrollY + tgtPoint.clientY; } var tgtRegion = { left: pageX, top: pageY, width: 0, height: 0 }; var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight; // Provide default target point var points = [align.points[0], 'cc']; return align_align(el, tgtRegion, _extends({}, align, { points: points }), pointInView); } /* harmony default export */ var align_alignPoint = (alignPoint_alignPoint); // CONCATENATED MODULE: ../node_modules/dom-align/es/index.js /* harmony default export */ var dom_align_es = (align_alignElement); // CONCATENATED MODULE: ../node_modules/rc-align/es/util.js function buffer(fn, ms) { var timer = void 0; function clear() { if (timer) { clearTimeout(timer); timer = null; } } function bufferFn() { clear(); timer = setTimeout(fn, ms); } bufferFn.clear = clear; return bufferFn; } function isSamePoint(prev, next) { if (prev === next) return true; if (!prev || !next) return false; if ('pageX' in next && 'pageY' in next) { return prev.pageX === next.pageX && prev.pageY === next.pageY; } if ('clientX' in next && 'clientY' in next) { return prev.clientX === next.clientX && prev.clientY === next.clientY; } return false; } function util_isWindow(obj) { return obj && typeof obj === 'object' && obj.window === obj; } // CONCATENATED MODULE: ../node_modules/rc-align/es/Align.js function getElement(func) { if (typeof func !== 'function' || !func) return null; return func(); } function getPoint(point) { if (typeof point !== 'object' || !point) return null; return point; } var Align_Align = function (_Component) { inherits_default()(Align, _Component); function Align() { var _temp, _this, _ret; classCallCheck_default()(this, Align); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.forceAlign = function () { var _this$props = _this.props, disabled = _this$props.disabled, target = _this$props.target, align = _this$props.align, onAlign = _this$props.onAlign; if (!disabled && target) { var source = react_dom_default.a.findDOMNode(_this); var result = void 0; var element = getElement(target); var point = getPoint(target); if (element) { result = align_alignElement(source, element, align); } else if (point) { result = align_alignPoint(source, point, align); } if (onAlign) { onAlign(source, result); } } }, _temp), possibleConstructorReturn_default()(_this, _ret); } Align.prototype.componentDidMount = function componentDidMount() { var props = this.props; // if parent ref not attached .... use document.getElementById this.forceAlign(); if (!props.disabled && props.monitorWindowResize) { this.startMonitorWindowResize(); } }; Align.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { var reAlign = false; var props = this.props; if (!props.disabled) { var source = react_dom_default.a.findDOMNode(this); var sourceRect = source ? source.getBoundingClientRect() : null; if (prevProps.disabled) { reAlign = true; } else { var lastElement = getElement(prevProps.target); var currentElement = getElement(props.target); var lastPoint = getPoint(prevProps.target); var currentPoint = getPoint(props.target); if (util_isWindow(lastElement) && util_isWindow(currentElement)) { // Skip if is window reAlign = false; } else if (lastElement !== currentElement || // Element change lastElement && !currentElement && currentPoint || // Change from element to point lastPoint && currentPoint && currentElement || // Change from point to element currentPoint && !isSamePoint(lastPoint, currentPoint)) { reAlign = true; } // If source element size changed var preRect = this.sourceRect || {}; if (!reAlign && source && (preRect.width !== sourceRect.width || preRect.height !== sourceRect.height)) { reAlign = true; } } this.sourceRect = sourceRect; } if (reAlign) { this.forceAlign(); } if (props.monitorWindowResize && !props.disabled) { this.startMonitorWindowResize(); } else { this.stopMonitorWindowResize(); } }; Align.prototype.componentWillUnmount = function componentWillUnmount() { this.stopMonitorWindowResize(); }; Align.prototype.startMonitorWindowResize = function startMonitorWindowResize() { if (!this.resizeHandler) { this.bufferMonitor = buffer(this.forceAlign, this.props.monitorBufferTime); this.resizeHandler = addEventListenerWrap(window, 'resize', this.bufferMonitor); } }; Align.prototype.stopMonitorWindowResize = function stopMonitorWindowResize() { if (this.resizeHandler) { this.bufferMonitor.clear(); this.resizeHandler.remove(); this.resizeHandler = null; } }; Align.prototype.render = function render() { var _this2 = this; var _props = this.props, childrenProps = _props.childrenProps, children = _props.children; var child = react_default.a.Children.only(children); if (childrenProps) { var newProps = {}; var propList = Object.keys(childrenProps); propList.forEach(function (prop) { newProps[prop] = _this2.props[childrenProps[prop]]; }); return react_default.a.cloneElement(child, newProps); } return child; }; return Align; }(react["Component"]); Align_Align.propTypes = { childrenProps: prop_types_default.a.object, align: prop_types_default.a.object.isRequired, target: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.shape({ clientX: prop_types_default.a.number, clientY: prop_types_default.a.number, pageX: prop_types_default.a.number, pageY: prop_types_default.a.number })]), onAlign: prop_types_default.a.func, monitorBufferTime: prop_types_default.a.number, monitorWindowResize: prop_types_default.a.bool, disabled: prop_types_default.a.bool, children: prop_types_default.a.any }; Align_Align.defaultProps = { target: function target() { return window; }, monitorBufferTime: 50, monitorWindowResize: false, disabled: false }; /* harmony default export */ var es_Align = (Align_Align); // CONCATENATED MODULE: ../node_modules/rc-align/es/index.js // export this package's api /* harmony default export */ var rc_align_es = (es_Align); // CONCATENATED MODULE: ../node_modules/rc-trigger/es/LazyRenderBox.js var es_LazyRenderBox_LazyRenderBox = function (_Component) { inherits_default()(LazyRenderBox, _Component); function LazyRenderBox() { classCallCheck_default()(this, LazyRenderBox); return possibleConstructorReturn_default()(this, _Component.apply(this, arguments)); } LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return nextProps.hiddenClassName || nextProps.visible; }; LazyRenderBox.prototype.render = function render() { var _props = this.props, hiddenClassName = _props.hiddenClassName, visible = _props.visible, props = objectWithoutProperties_default()(_props, ['hiddenClassName', 'visible']); if (hiddenClassName || react_default.a.Children.count(props.children) > 1) { if (!visible && hiddenClassName) { props.className += ' ' + hiddenClassName; } return react_default.a.createElement('div', props); } return react_default.a.Children.only(props.children); }; return LazyRenderBox; }(react["Component"]); es_LazyRenderBox_LazyRenderBox.propTypes = { children: prop_types_default.a.any, className: prop_types_default.a.string, visible: prop_types_default.a.bool, hiddenClassName: prop_types_default.a.string }; /* harmony default export */ var rc_trigger_es_LazyRenderBox = (es_LazyRenderBox_LazyRenderBox); // CONCATENATED MODULE: ../node_modules/rc-trigger/es/PopupInner.js var PopupInner_PopupInner = function (_Component) { inherits_default()(PopupInner, _Component); function PopupInner() { classCallCheck_default()(this, PopupInner); return possibleConstructorReturn_default()(this, _Component.apply(this, arguments)); } PopupInner.prototype.render = function render() { var props = this.props; var className = props.className; if (!props.visible) { className += ' ' + props.hiddenClassName; } return react_default.a.createElement( 'div', { className: className, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, style: props.style }, react_default.a.createElement( rc_trigger_es_LazyRenderBox, { className: props.prefixCls + '-content', visible: props.visible }, props.children ) ); }; return PopupInner; }(react["Component"]); PopupInner_PopupInner.propTypes = { hiddenClassName: prop_types_default.a.string, className: prop_types_default.a.string, prefixCls: prop_types_default.a.string, onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, children: prop_types_default.a.any }; /* harmony default export */ var es_PopupInner = (PopupInner_PopupInner); // CONCATENATED MODULE: ../node_modules/rc-trigger/es/utils.js function isPointsEq(a1, a2, isAlignPoint) { if (isAlignPoint) { return a1[0] === a2[0]; } return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return extends_default()({}, baseAlign, align); } function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) { var points = align.points; for (var placement in builtinPlacements) { if (builtinPlacements.hasOwnProperty(placement)) { if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) { return prefixCls + '-placement-' + placement; } } } return ''; } function utils_saveRef(name, component) { this[name] = component; } // CONCATENATED MODULE: ../node_modules/rc-trigger/es/Popup.js var Popup_Popup = function (_Component) { inherits_default()(Popup, _Component); function Popup(props) { classCallCheck_default()(this, Popup); var _this = possibleConstructorReturn_default()(this, _Component.call(this, props)); Popup__initialiseProps.call(_this); _this.state = { // Used for stretch stretchChecked: false, targetWidth: undefined, targetHeight: undefined }; _this.savePopupRef = utils_saveRef.bind(_this, 'popupInstance'); _this.saveAlignRef = utils_saveRef.bind(_this, 'alignInstance'); return _this; } Popup.prototype.componentDidMount = function componentDidMount() { this.rootNode = this.getPopupDomNode(); this.setStretchSize(); }; Popup.prototype.componentDidUpdate = function componentDidUpdate() { this.setStretchSize(); }; // Record size if stretch needed Popup.prototype.getPopupDomNode = function getPopupDomNode() { return react_dom_default.a.findDOMNode(this.popupInstance); }; // `target` on `rc-align` can accept as a function to get the bind element or a point. // ref: https://www.npmjs.com/package/rc-align Popup.prototype.getMaskTransitionName = function getMaskTransitionName() { var props = this.props; var transitionName = props.maskTransitionName; var animation = props.maskAnimation; if (!transitionName && animation) { transitionName = props.prefixCls + '-' + animation; } return transitionName; }; Popup.prototype.getTransitionName = function getTransitionName() { var props = this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = props.prefixCls + '-' + props.animation; } return transitionName; }; Popup.prototype.getClassName = function getClassName(currentAlignClassName) { return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName; }; Popup.prototype.getPopupElement = function getPopupElement() { var _this2 = this; var savePopupRef = this.savePopupRef; var _state = this.state, stretchChecked = _state.stretchChecked, targetHeight = _state.targetHeight, targetWidth = _state.targetWidth; var _props = this.props, align = _props.align, visible = _props.visible, prefixCls = _props.prefixCls, style = _props.style, getClassNameFromAlign = _props.getClassNameFromAlign, destroyPopupOnHide = _props.destroyPopupOnHide, stretch = _props.stretch, children = _props.children, onMouseEnter = _props.onMouseEnter, onMouseLeave = _props.onMouseLeave; var className = this.getClassName(this.currentAlignClassName || getClassNameFromAlign(align)); var hiddenClassName = prefixCls + '-hidden'; if (!visible) { this.currentAlignClassName = null; } var sizeStyle = {}; if (stretch) { // Stretch with target if (stretch.indexOf('height') !== -1) { sizeStyle.height = targetHeight; } else if (stretch.indexOf('minHeight') !== -1) { sizeStyle.minHeight = targetHeight; } if (stretch.indexOf('width') !== -1) { sizeStyle.width = targetWidth; } else if (stretch.indexOf('minWidth') !== -1) { sizeStyle.minWidth = targetWidth; } // Delay force align to makes ui smooth if (!stretchChecked) { sizeStyle.visibility = 'hidden'; setTimeout(function () { if (_this2.alignInstance) { _this2.alignInstance.forceAlign(); } }, 0); } } var newStyle = extends_default()({}, sizeStyle, style, this.getZIndexStyle()); var popupInnerProps = { className: className, prefixCls: prefixCls, ref: savePopupRef, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, style: newStyle }; if (destroyPopupOnHide) { return react_default.a.createElement( es_Animate, { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName() }, visible ? react_default.a.createElement( rc_align_es, { target: this.getAlignTarget(), key: 'popup', ref: this.saveAlignRef, monitorWindowResize: true, align: align, onAlign: this.onAlign }, react_default.a.createElement( es_PopupInner, extends_default()({ visible: true }, popupInnerProps), children ) ) : null ); } return react_default.a.createElement( es_Animate, { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName(), showProp: 'xVisible' }, react_default.a.createElement( rc_align_es, { target: this.getAlignTarget(), key: 'popup', ref: this.saveAlignRef, monitorWindowResize: true, xVisible: visible, childrenProps: { visible: 'xVisible' }, disabled: !visible, align: align, onAlign: this.onAlign }, react_default.a.createElement( es_PopupInner, extends_default()({ hiddenClassName: hiddenClassName }, popupInnerProps), children ) ) ); }; Popup.prototype.getZIndexStyle = function getZIndexStyle() { var style = {}; var props = this.props; if (props.zIndex !== undefined) { style.zIndex = props.zIndex; } return style; }; Popup.prototype.getMaskElement = function getMaskElement() { var props = this.props; var maskElement = void 0; if (props.mask) { var maskTransition = this.getMaskTransitionName(); maskElement = react_default.a.createElement(rc_trigger_es_LazyRenderBox, { style: this.getZIndexStyle(), key: 'mask', className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }); if (maskTransition) { maskElement = react_default.a.createElement( es_Animate, { key: 'mask', showProp: 'visible', transitionAppear: true, component: '', transitionName: maskTransition }, maskElement ); } } return maskElement; }; Popup.prototype.render = function render() { return react_default.a.createElement( 'div', null, this.getMaskElement(), this.getPopupElement() ); }; return Popup; }(react["Component"]); Popup_Popup.propTypes = { visible: prop_types_default.a.bool, style: prop_types_default.a.object, getClassNameFromAlign: prop_types_default.a.func, onAlign: prop_types_default.a.func, getRootDomNode: prop_types_default.a.func, onMouseEnter: prop_types_default.a.func, align: prop_types_default.a.any, destroyPopupOnHide: prop_types_default.a.bool, className: prop_types_default.a.string, prefixCls: prop_types_default.a.string, onMouseLeave: prop_types_default.a.func, stretch: prop_types_default.a.string, children: prop_types_default.a.node, point: prop_types_default.a.shape({ pageX: prop_types_default.a.number, pageY: prop_types_default.a.number }) }; var Popup__initialiseProps = function _initialiseProps() { var _this3 = this; this.onAlign = function (popupDomNode, align) { var props = _this3.props; var currentAlignClassName = props.getClassNameFromAlign(align); // FIX: https://github.com/react-component/trigger/issues/56 // FIX: https://github.com/react-component/tooltip/issues/79 if (_this3.currentAlignClassName !== currentAlignClassName) { _this3.currentAlignClassName = currentAlignClassName; popupDomNode.className = _this3.getClassName(currentAlignClassName); } props.onAlign(popupDomNode, align); }; this.setStretchSize = function () { var _props2 = _this3.props, stretch = _props2.stretch, getRootDomNode = _props2.getRootDomNode, visible = _props2.visible; var _state2 = _this3.state, stretchChecked = _state2.stretchChecked, targetHeight = _state2.targetHeight, targetWidth = _state2.targetWidth; if (!stretch || !visible) { if (stretchChecked) { _this3.setState({ stretchChecked: false }); } return; } var $ele = getRootDomNode(); if (!$ele) return; var height = $ele.offsetHeight; var width = $ele.offsetWidth; if (targetHeight !== height || targetWidth !== width || !stretchChecked) { _this3.setState({ stretchChecked: true, targetHeight: height, targetWidth: width }); } }; this.getTargetElement = function () { return _this3.props.getRootDomNode(); }; this.getAlignTarget = function () { var point = _this3.props.point; if (point) { return point; } return _this3.getTargetElement; }; }; /* harmony default export */ var es_Popup = (Popup_Popup); // CONCATENATED MODULE: ../node_modules/rc-trigger/es/index.js function es_noop() {} function returnEmptyString() { return ''; } function returnDocument() { return window.document; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu']; var es_IS_REACT_16 = !!react_dom["createPortal"]; var es_Trigger = function (_React$Component) { inherits_default()(Trigger, _React$Component); function Trigger(props) { classCallCheck_default()(this, Trigger); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); es__initialiseProps.call(_this); var popupVisible = void 0; if ('popupVisible' in props) { popupVisible = !!props.popupVisible; } else { popupVisible = !!props.defaultPopupVisible; } _this.prevPopupVisible = popupVisible; _this.state = { popupVisible: popupVisible }; return _this; } Trigger.prototype.componentWillMount = function componentWillMount() { var _this2 = this; ALL_HANDLERS.forEach(function (h) { _this2['fire' + h] = function (e) { _this2.fireEvents(h, e); }; }); }; Trigger.prototype.componentDidMount = function componentDidMount() { this.componentDidUpdate({}, { popupVisible: this.state.popupVisible }); }; Trigger.prototype.componentWillReceiveProps = function componentWillReceiveProps(_ref) { var popupVisible = _ref.popupVisible; if (popupVisible !== undefined) { this.setState({ popupVisible: popupVisible }); } }; Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) { var props = this.props; var state = this.state; var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() { if (prevState.popupVisible !== state.popupVisible) { props.afterPopupVisibleChange(state.popupVisible); } }; if (!es_IS_REACT_16) { this.renderComponent(null, triggerAfterPopupVisibleChange); } this.prevPopupVisible = prevState.popupVisible; // We must listen to `mousedown` or `touchstart`, edge case: // https://github.com/ant-design/ant-design/issues/5804 // https://github.com/react-component/calendar/issues/250 // https://github.com/react-component/trigger/issues/50 if (state.popupVisible) { var currentDocument = void 0; if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) { currentDocument = props.getDocument(); this.clickOutsideHandler = addEventListenerWrap(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile if (!this.touchOutsideHandler) { currentDocument = currentDocument || props.getDocument(); this.touchOutsideHandler = addEventListenerWrap(currentDocument, 'touchstart', this.onDocumentClick); } // close popup when trigger type contains 'onContextMenu' and document is scrolling. if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) { currentDocument = currentDocument || props.getDocument(); this.contextMenuOutsideHandler1 = addEventListenerWrap(currentDocument, 'scroll', this.onContextMenuClose); } // close popup when trigger type contains 'onContextMenu' and window is blur. if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) { this.contextMenuOutsideHandler2 = addEventListenerWrap(window, 'blur', this.onContextMenuClose); } return; } this.clearOutsideHandler(); }; Trigger.prototype.componentWillUnmount = function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); }; Trigger.prototype.getPopupDomNode = function getPopupDomNode() { // for test if (this._component && this._component.getPopupDomNode) { return this._component.getPopupDomNode(); } return null; }; Trigger.prototype.getPopupAlign = function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; }; /** * @param popupVisible Show or not the popup element * @param event SyntheticEvent, used for `pointAlign` */ Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible, event) { var alignPoint = this.props.alignPoint; this.clearDelayTimer(); if (this.state.popupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible }); } this.props.onPopupVisibleChange(popupVisible); } // Always record the point position since mouseEnterDelay will delay the show if (alignPoint && event) { this.setPoint(event); } }; Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS, event) { var _this3 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { var point = event ? { pageX: event.pageX, pageY: event.pageY } : null; this.delayTimer = setTimeout(function () { _this3.setPopupVisible(visible, point); _this3.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible, event); } }; Trigger.prototype.clearDelayTimer = function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } }; Trigger.prototype.clearOutsideHandler = function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.contextMenuOutsideHandler1) { this.contextMenuOutsideHandler1.remove(); this.contextMenuOutsideHandler1 = null; } if (this.contextMenuOutsideHandler2) { this.contextMenuOutsideHandler2.remove(); this.contextMenuOutsideHandler2 = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } }; Trigger.prototype.createTwoChains = function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this['fire' + event]; } return childPros[event] || props[event]; }; Trigger.prototype.isClickToShow = function isClickToShow() { var _props = this.props, action = _props.action, showAction = _props.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; }; Trigger.prototype.isContextMenuToShow = function isContextMenuToShow() { var _props2 = this.props, action = _props2.action, showAction = _props2.showAction; return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1; }; Trigger.prototype.isClickToHide = function isClickToHide() { var _props3 = this.props, action = _props3.action, hideAction = _props3.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; }; Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() { var _props4 = this.props, action = _props4.action, showAction = _props4.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; }; Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() { var _props5 = this.props, action = _props5.action, hideAction = _props5.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; }; Trigger.prototype.isFocusToShow = function isFocusToShow() { var _props6 = this.props, action = _props6.action, showAction = _props6.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; }; Trigger.prototype.isBlurToHide = function isBlurToHide() { var _props7 = this.props, action = _props7.action, hideAction = _props7.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; }; Trigger.prototype.forcePopupAlign = function forcePopupAlign() { if (this.state.popupVisible && this._component && this._component.alignInstance) { this._component.alignInstance.forceAlign(); } }; Trigger.prototype.fireEvents = function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } }; Trigger.prototype.close = function close() { this.setPopupVisible(false); }; Trigger.prototype.render = function render() { var _this4 = this; var popupVisible = this.state.popupVisible; var _props8 = this.props, children = _props8.children, forceRender = _props8.forceRender, alignPoint = _props8.alignPoint, className = _props8.className; var child = react_default.a.Children.only(children); var newChildProps = { key: 'trigger' }; if (this.isContextMenuToShow()) { newChildProps.onContextMenu = this.onContextMenu; } else { newChildProps.onContextMenu = this.createTwoChains('onContextMenu'); } if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; if (alignPoint) { newChildProps.onMouseMove = this.onMouseMove; } } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } var childrenClassName = classnames_default()(child && child.props && child.props.className, className); if (childrenClassName) { newChildProps.className = childrenClassName; } var trigger = react_default.a.cloneElement(child, newChildProps); if (!es_IS_REACT_16) { return react_default.a.createElement( es_ContainerRender, { parent: this, visible: popupVisible, autoMount: false, forceRender: forceRender, getComponent: this.getComponent, getContainer: this.getContainer }, function (_ref2) { var renderComponent = _ref2.renderComponent; _this4.renderComponent = renderComponent; return trigger; } ); } var portal = void 0; // prevent unmounting after it's rendered if (popupVisible || this._component || forceRender) { portal = react_default.a.createElement( es_Portal, { key: 'portal', getContainer: this.getContainer, didUpdate: this.handlePortalUpdate }, this.getComponent() ); } return [trigger, portal]; }; return Trigger; }(react_default.a.Component); es_Trigger.propTypes = { children: prop_types_default.a.any, action: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.arrayOf(prop_types_default.a.string)]), showAction: prop_types_default.a.any, hideAction: prop_types_default.a.any, getPopupClassNameFromAlign: prop_types_default.a.any, onPopupVisibleChange: prop_types_default.a.func, afterPopupVisibleChange: prop_types_default.a.func, popup: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]).isRequired, popupStyle: prop_types_default.a.object, prefixCls: prop_types_default.a.string, popupClassName: prop_types_default.a.string, className: prop_types_default.a.string, popupPlacement: prop_types_default.a.string, builtinPlacements: prop_types_default.a.object, popupTransitionName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), popupAnimation: prop_types_default.a.any, mouseEnterDelay: prop_types_default.a.number, mouseLeaveDelay: prop_types_default.a.number, zIndex: prop_types_default.a.number, focusDelay: prop_types_default.a.number, blurDelay: prop_types_default.a.number, getPopupContainer: prop_types_default.a.func, getDocument: prop_types_default.a.func, forceRender: prop_types_default.a.bool, destroyPopupOnHide: prop_types_default.a.bool, mask: prop_types_default.a.bool, maskClosable: prop_types_default.a.bool, onPopupAlign: prop_types_default.a.func, popupAlign: prop_types_default.a.object, popupVisible: prop_types_default.a.bool, defaultPopupVisible: prop_types_default.a.bool, maskTransitionName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), maskAnimation: prop_types_default.a.string, stretch: prop_types_default.a.string, alignPoint: prop_types_default.a.bool // Maybe we can support user pass position in the future }; es_Trigger.defaultProps = { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: es_noop, afterPopupVisibleChange: es_noop, onPopupAlign: es_noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; var es__initialiseProps = function _initialiseProps() { var _this5 = this; this.onMouseEnter = function (e) { var mouseEnterDelay = _this5.props.mouseEnterDelay; _this5.fireEvents('onMouseEnter', e); _this5.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e); }; this.onMouseMove = function (e) { _this5.fireEvents('onMouseMove', e); _this5.setPoint(e); }; this.onMouseLeave = function (e) { _this5.fireEvents('onMouseLeave', e); _this5.delaySetPopupVisible(false, _this5.props.mouseLeaveDelay); }; this.onPopupMouseEnter = function () { _this5.clearDelayTimer(); }; this.onPopupMouseLeave = function (e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && _this5._component && _this5._component.getPopupDomNode && contains(_this5._component.getPopupDomNode(), e.relatedTarget)) { return; } _this5.delaySetPopupVisible(false, _this5.props.mouseLeaveDelay); }; this.onFocus = function (e) { _this5.fireEvents('onFocus', e); // incase focusin and focusout _this5.clearDelayTimer(); if (_this5.isFocusToShow()) { _this5.focusTime = Date.now(); _this5.delaySetPopupVisible(true, _this5.props.focusDelay); } }; this.onMouseDown = function (e) { _this5.fireEvents('onMouseDown', e); _this5.preClickTime = Date.now(); }; this.onTouchStart = function (e) { _this5.fireEvents('onTouchStart', e); _this5.preTouchTime = Date.now(); }; this.onBlur = function (e) { _this5.fireEvents('onBlur', e); _this5.clearDelayTimer(); if (_this5.isBlurToHide()) { _this5.delaySetPopupVisible(false, _this5.props.blurDelay); } }; this.onContextMenu = function (e) { e.preventDefault(); _this5.fireEvents('onContextMenu', e); _this5.setPopupVisible(true, e); }; this.onContextMenuClose = function () { if (_this5.isContextMenuToShow()) { _this5.close(); } }; this.onClick = function (event) { _this5.fireEvents('onClick', event); // focus will trigger click if (_this5.focusTime) { var preTime = void 0; if (_this5.preClickTime && _this5.preTouchTime) { preTime = Math.min(_this5.preClickTime, _this5.preTouchTime); } else if (_this5.preClickTime) { preTime = _this5.preClickTime; } else if (_this5.preTouchTime) { preTime = _this5.preTouchTime; } if (Math.abs(preTime - _this5.focusTime) < 20) { return; } _this5.focusTime = 0; } _this5.preClickTime = 0; _this5.preTouchTime = 0; if (event && event.preventDefault) { event.preventDefault(); } var nextVisible = !_this5.state.popupVisible; if (_this5.isClickToHide() && !nextVisible || nextVisible && _this5.isClickToShow()) { _this5.setPopupVisible(!_this5.state.popupVisible, event); } }; this.onDocumentClick = function (event) { if (_this5.props.mask && !_this5.props.maskClosable) { return; } var target = event.target; var root = Object(react_dom["findDOMNode"])(_this5); var popupNode = _this5.getPopupDomNode(); if (!contains(root, target) && !contains(popupNode, target)) { _this5.close(); } }; this.getRootDomNode = function () { return Object(react_dom["findDOMNode"])(_this5); }; this.getPopupClassNameFromAlign = function (align) { var className = []; var _props9 = _this5.props, popupPlacement = _props9.popupPlacement, builtinPlacements = _props9.builtinPlacements, prefixCls = _props9.prefixCls, alignPoint = _props9.alignPoint, getPopupClassNameFromAlign = _props9.getPopupClassNameFromAlign; if (popupPlacement && builtinPlacements) { className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint)); } if (getPopupClassNameFromAlign) { className.push(getPopupClassNameFromAlign(align)); } return className.join(' '); }; this.getComponent = function () { var _props10 = _this5.props, prefixCls = _props10.prefixCls, destroyPopupOnHide = _props10.destroyPopupOnHide, popupClassName = _props10.popupClassName, action = _props10.action, onPopupAlign = _props10.onPopupAlign, popupAnimation = _props10.popupAnimation, popupTransitionName = _props10.popupTransitionName, popupStyle = _props10.popupStyle, mask = _props10.mask, maskAnimation = _props10.maskAnimation, maskTransitionName = _props10.maskTransitionName, zIndex = _props10.zIndex, popup = _props10.popup, stretch = _props10.stretch, alignPoint = _props10.alignPoint; var _state = _this5.state, popupVisible = _state.popupVisible, point = _state.point; var align = _this5.getPopupAlign(); var mouseProps = {}; if (_this5.isMouseEnterToShow()) { mouseProps.onMouseEnter = _this5.onPopupMouseEnter; } if (_this5.isMouseLeaveToHide()) { mouseProps.onMouseLeave = _this5.onPopupMouseLeave; } return react_default.a.createElement( es_Popup, extends_default()({ prefixCls: prefixCls, destroyPopupOnHide: destroyPopupOnHide, visible: popupVisible, point: alignPoint && point, className: popupClassName, action: action, align: align, onAlign: onPopupAlign, animation: popupAnimation, getClassNameFromAlign: _this5.getPopupClassNameFromAlign }, mouseProps, { stretch: stretch, getRootDomNode: _this5.getRootDomNode, style: popupStyle, mask: mask, zIndex: zIndex, transitionName: popupTransitionName, maskAnimation: maskAnimation, maskTransitionName: maskTransitionName, ref: _this5.savePopup }), typeof popup === 'function' ? popup() : popup ); }; this.getContainer = function () { var props = _this5.props; var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; var mountNode = props.getPopupContainer ? props.getPopupContainer(Object(react_dom["findDOMNode"])(_this5)) : props.getDocument().body; mountNode.appendChild(popupContainer); return popupContainer; }; this.setPoint = function (point) { var alignPoint = _this5.props.alignPoint; if (!alignPoint || !point) return; _this5.setState({ point: { pageX: point.pageX, pageY: point.pageY } }); }; this.handlePortalUpdate = function () { if (_this5.prevPopupVisible !== _this5.state.popupVisible) { _this5.props.afterPopupVisibleChange(_this5.state.popupVisible); } }; this.savePopup = function (node) { _this5._component = node; }; }; /* harmony default export */ var rc_trigger_es = (es_Trigger); // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/placements.js var placements_autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var placements = { topLeft: { points: ['bl', 'tl'], overflow: placements_autoAdjustOverflow, offset: [0, -7] }, bottomLeft: { points: ['tl', 'bl'], overflow: placements_autoAdjustOverflow, offset: [0, 7] }, leftTop: { points: ['tr', 'tl'], overflow: placements_autoAdjustOverflow, offset: [-4, 0] }, rightTop: { points: ['tl', 'tr'], overflow: placements_autoAdjustOverflow, offset: [4, 0] } }; /* harmony default export */ var es_placements = (placements); // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/SubMenu.js var guid = 0; var popupPlacementMap = { horizontal: 'bottomLeft', vertical: 'rightTop', 'vertical-left': 'rightTop', 'vertical-right': 'leftTop' }; var SubMenu_updateDefaultActiveFirst = function updateDefaultActiveFirst(store, eventKey, defaultActiveFirst) { var _extends2; var menuId = getMenuIdFromSubMenuEventKey(eventKey); var state = store.getState(); store.setState({ defaultActiveFirst: extends_default()({}, state.defaultActiveFirst, (_extends2 = {}, _extends2[menuId] = defaultActiveFirst, _extends2)) }); }; var SubMenu_SubMenu = function (_React$Component) { inherits_default()(SubMenu, _React$Component); function SubMenu(props) { classCallCheck_default()(this, SubMenu); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); SubMenu__initialiseProps.call(_this); var store = props.store; var eventKey = props.eventKey; var defaultActiveFirst = store.getState().defaultActiveFirst; _this.isRootMenu = false; var value = false; if (defaultActiveFirst) { value = defaultActiveFirst[eventKey]; } SubMenu_updateDefaultActiveFirst(store, eventKey, value); return _this; } SubMenu.prototype.componentDidMount = function componentDidMount() { this.componentDidUpdate(); }; SubMenu.prototype.componentDidUpdate = function componentDidUpdate() { var _this2 = this; var _props = this.props, mode = _props.mode, parentMenu = _props.parentMenu, manualRef = _props.manualRef; // invoke customized ref to expose component to mixin if (manualRef) { manualRef(this); } if (mode !== 'horizontal' || !parentMenu.isRootMenu || !this.props.isOpen) { return; } this.minWidthTimeout = setTimeout(function () { return _this2.adjustWidth(); }, 0); }; SubMenu.prototype.componentWillUnmount = function componentWillUnmount() { var _props2 = this.props, onDestroy = _props2.onDestroy, eventKey = _props2.eventKey; if (onDestroy) { onDestroy(eventKey); } /* istanbul ignore if */ if (this.minWidthTimeout) { clearTimeout(this.minWidthTimeout); } /* istanbul ignore if */ if (this.mouseenterTimeout) { clearTimeout(this.mouseenterTimeout); } }; SubMenu.prototype.renderChildren = function renderChildren(children) { var props = this.props; var baseProps = { mode: props.mode === 'horizontal' ? 'vertical' : props.mode, visible: this.props.isOpen, level: props.level + 1, inlineIndent: props.inlineIndent, focusable: false, onClick: this.onSubMenuClick, onSelect: this.onSelect, onDeselect: this.onDeselect, onDestroy: this.onDestroy, selectedKeys: props.selectedKeys, eventKey: props.eventKey + '-menu-', openKeys: props.openKeys, openTransitionName: props.openTransitionName, openAnimation: props.openAnimation, onOpenChange: this.onOpenChange, subMenuOpenDelay: props.subMenuOpenDelay, parentMenu: this, subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, triggerSubMenuAction: props.triggerSubMenuAction, builtinPlacements: props.builtinPlacements, defaultActiveFirst: props.store.getState().defaultActiveFirst[getMenuIdFromSubMenuEventKey(props.eventKey)], multiple: props.multiple, prefixCls: props.rootPrefixCls, id: this._menuId, manualRef: this.saveMenuInstance }; var haveRendered = this.haveRendered; this.haveRendered = true; this.haveOpened = this.haveOpened || baseProps.visible || baseProps.forceSubMenuRender; // never rendered not planning to, don't render if (!this.haveOpened) { return react_default.a.createElement('div', null); } // don't show transition on first rendering (no animation for opened menu) // show appear transition if it's not visible (not sure why) // show appear transition if it's not inline mode var transitionAppear = haveRendered || !baseProps.visible || !baseProps.mode === 'inline'; baseProps.className = ' ' + baseProps.prefixCls + '-sub'; var animProps = {}; if (baseProps.openTransitionName) { animProps.transitionName = baseProps.openTransitionName; } else if (typeof baseProps.openAnimation === 'object') { animProps.animation = extends_default()({}, baseProps.openAnimation); if (!transitionAppear) { delete animProps.animation.appear; } } return react_default.a.createElement( es_Animate, extends_default()({}, animProps, { showProp: 'visible', component: '', transitionAppear: transitionAppear }), react_default.a.createElement( es_SubPopupMenu, extends_default()({}, baseProps, { id: this._menuId }), children ) ); }; SubMenu.prototype.render = function render() { var _classNames; var props = extends_default()({}, this.props); var isOpen = props.isOpen; var prefixCls = this.getPrefixCls(); var isInlineMode = props.mode === 'inline'; var className = classnames_default()(prefixCls, prefixCls + '-' + props.mode, (_classNames = {}, _classNames[props.className] = !!props.className, _classNames[this.getOpenClassName()] = isOpen, _classNames[this.getActiveClassName()] = props.active || isOpen && !isInlineMode, _classNames[this.getDisabledClassName()] = props.disabled, _classNames[this.getSelectedClassName()] = this.isChildrenSelected(), _classNames)); if (!this._menuId) { if (props.eventKey) { this._menuId = props.eventKey + '$Menu'; } else { this._menuId = '$__$' + ++guid + '$Menu'; } } var mouseEvents = {}; var titleClickEvents = {}; var titleMouseEvents = {}; if (!props.disabled) { mouseEvents = { onMouseLeave: this.onMouseLeave, onMouseEnter: this.onMouseEnter }; // only works in title, not outer li titleClickEvents = { onClick: this.onTitleClick }; titleMouseEvents = { onMouseEnter: this.onTitleMouseEnter, onMouseLeave: this.onTitleMouseLeave }; } var style = {}; if (isInlineMode) { style.paddingLeft = props.inlineIndent * props.level; } var ariaOwns = {}; // only set aria-owns when menu is open // otherwise it would be an invalid aria-owns value // since corresponding node cannot be found if (this.props.isOpen) { ariaOwns = { 'aria-owns': this._menuId }; } var title = react_default.a.createElement( 'div', extends_default()({ ref: this.saveSubMenuTitle, style: style, className: prefixCls + '-title' }, titleMouseEvents, titleClickEvents, { 'aria-expanded': isOpen }, ariaOwns, { 'aria-haspopup': 'true', title: typeof props.title === 'string' ? props.title : undefined }), props.title, react_default.a.createElement('i', { className: prefixCls + '-arrow' }) ); var children = this.renderChildren(props.children); var getPopupContainer = props.parentMenu.isRootMenu ? props.parentMenu.props.getPopupContainer : function (triggerNode) { return triggerNode.parentNode; }; var popupPlacement = popupPlacementMap[props.mode]; var popupAlign = props.popupOffset ? { offset: props.popupOffset } : {}; var popupClassName = props.mode === 'inline' ? '' : props.popupClassName; var disabled = props.disabled, triggerSubMenuAction = props.triggerSubMenuAction, subMenuOpenDelay = props.subMenuOpenDelay, forceSubMenuRender = props.forceSubMenuRender, subMenuCloseDelay = props.subMenuCloseDelay, builtinPlacements = props.builtinPlacements; menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; return react_default.a.createElement( 'li', extends_default()({}, props, mouseEvents, { className: className, role: 'menuitem' }), isInlineMode && title, isInlineMode && children, !isInlineMode && react_default.a.createElement( rc_trigger_es, { prefixCls: prefixCls, popupClassName: prefixCls + '-popup ' + popupClassName, getPopupContainer: getPopupContainer, builtinPlacements: extends_default()({}, es_placements, builtinPlacements), popupPlacement: popupPlacement, popupVisible: isOpen, popupAlign: popupAlign, popup: children, action: disabled ? [] : [triggerSubMenuAction], mouseEnterDelay: subMenuOpenDelay, mouseLeaveDelay: subMenuCloseDelay, onPopupVisibleChange: this.onPopupVisibleChange, forceRender: forceSubMenuRender }, title ) ); }; return SubMenu; }(react_default.a.Component); SubMenu_SubMenu.propTypes = { parentMenu: prop_types_default.a.object, title: prop_types_default.a.node, children: prop_types_default.a.any, selectedKeys: prop_types_default.a.array, openKeys: prop_types_default.a.array, onClick: prop_types_default.a.func, onOpenChange: prop_types_default.a.func, rootPrefixCls: prop_types_default.a.string, eventKey: prop_types_default.a.string, multiple: prop_types_default.a.bool, active: prop_types_default.a.bool, // TODO: remove onItemHover: prop_types_default.a.func, onSelect: prop_types_default.a.func, triggerSubMenuAction: prop_types_default.a.string, onDeselect: prop_types_default.a.func, onDestroy: prop_types_default.a.func, onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, onTitleMouseEnter: prop_types_default.a.func, onTitleMouseLeave: prop_types_default.a.func, onTitleClick: prop_types_default.a.func, popupOffset: prop_types_default.a.array, isOpen: prop_types_default.a.bool, store: prop_types_default.a.object, mode: prop_types_default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), manualRef: prop_types_default.a.func }; SubMenu_SubMenu.defaultProps = { onMouseEnter: util_noop, onMouseLeave: util_noop, onTitleMouseEnter: util_noop, onTitleMouseLeave: util_noop, onTitleClick: util_noop, manualRef: util_noop, mode: 'vertical', title: '' }; var SubMenu__initialiseProps = function _initialiseProps() { var _this3 = this; this.onDestroy = function (key) { _this3.props.onDestroy(key); }; this.onKeyDown = function (e) { var keyCode = e.keyCode; var menu = _this3.menuInstance; var _props3 = _this3.props, isOpen = _props3.isOpen, store = _props3.store; if (keyCode === es_KeyCode.ENTER) { _this3.onTitleClick(e); SubMenu_updateDefaultActiveFirst(store, _this3.props.eventKey, true); return true; } if (keyCode === es_KeyCode.RIGHT) { if (isOpen) { menu.onKeyDown(e); } else { _this3.triggerOpenChange(true); // need to update current menu's defaultActiveFirst value SubMenu_updateDefaultActiveFirst(store, _this3.props.eventKey, true); } return true; } if (keyCode === es_KeyCode.LEFT) { var handled = void 0; if (isOpen) { handled = menu.onKeyDown(e); } else { return undefined; } if (!handled) { _this3.triggerOpenChange(false); handled = true; } return handled; } if (isOpen && (keyCode === es_KeyCode.UP || keyCode === es_KeyCode.DOWN)) { return menu.onKeyDown(e); } }; this.onOpenChange = function (e) { _this3.props.onOpenChange(e); }; this.onPopupVisibleChange = function (visible) { _this3.triggerOpenChange(visible, visible ? 'mouseenter' : 'mouseleave'); }; this.onMouseEnter = function (e) { var _props4 = _this3.props, key = _props4.eventKey, onMouseEnter = _props4.onMouseEnter, store = _props4.store; SubMenu_updateDefaultActiveFirst(store, _this3.props.eventKey, false); onMouseEnter({ key: key, domEvent: e }); }; this.onMouseLeave = function (e) { var _props5 = _this3.props, parentMenu = _props5.parentMenu, eventKey = _props5.eventKey, onMouseLeave = _props5.onMouseLeave; parentMenu.subMenuInstance = _this3; onMouseLeave({ key: eventKey, domEvent: e }); }; this.onTitleMouseEnter = function (domEvent) { var _props6 = _this3.props, key = _props6.eventKey, onItemHover = _props6.onItemHover, onTitleMouseEnter = _props6.onTitleMouseEnter; onItemHover({ key: key, hover: true }); onTitleMouseEnter({ key: key, domEvent: domEvent }); }; this.onTitleMouseLeave = function (e) { var _props7 = _this3.props, parentMenu = _props7.parentMenu, eventKey = _props7.eventKey, onItemHover = _props7.onItemHover, onTitleMouseLeave = _props7.onTitleMouseLeave; parentMenu.subMenuInstance = _this3; onItemHover({ key: eventKey, hover: false }); onTitleMouseLeave({ key: eventKey, domEvent: e }); }; this.onTitleClick = function (e) { var props = _this3.props; props.onTitleClick({ key: props.eventKey, domEvent: e }); if (props.triggerSubMenuAction === 'hover') { return; } _this3.triggerOpenChange(!props.isOpen, 'click'); SubMenu_updateDefaultActiveFirst(props.store, _this3.props.eventKey, false); }; this.onSubMenuClick = function (info) { _this3.props.onClick(_this3.addKeyPath(info)); }; this.onSelect = function (info) { _this3.props.onSelect(info); }; this.onDeselect = function (info) { _this3.props.onDeselect(info); }; this.getPrefixCls = function () { return _this3.props.rootPrefixCls + '-submenu'; }; this.getActiveClassName = function () { return _this3.getPrefixCls() + '-active'; }; this.getDisabledClassName = function () { return _this3.getPrefixCls() + '-disabled'; }; this.getSelectedClassName = function () { return _this3.getPrefixCls() + '-selected'; }; this.getOpenClassName = function () { return _this3.props.rootPrefixCls + '-submenu-open'; }; this.saveMenuInstance = function (c) { // children menu instance _this3.menuInstance = c; }; this.addKeyPath = function (info) { return extends_default()({}, info, { keyPath: (info.keyPath || []).concat(_this3.props.eventKey) }); }; this.triggerOpenChange = function (open, type) { var key = _this3.props.eventKey; var openChange = function openChange() { _this3.onOpenChange({ key: key, item: _this3, trigger: type, open: open }); }; if (type === 'mouseenter') { // make sure mouseenter happen after other menu item's mouseleave _this3.mouseenterTimeout = setTimeout(function () { openChange(); }, 0); } else { openChange(); } }; this.isChildrenSelected = function () { var ret = { find: false }; loopMenuItemRecursively(_this3.props.children, _this3.props.selectedKeys, ret); return ret.find; }; this.isOpen = function () { return _this3.props.openKeys.indexOf(_this3.props.eventKey) !== -1; }; this.adjustWidth = function () { /* istanbul ignore if */ if (!_this3.subMenuTitle || !_this3.menuInstance) { return; } var popupMenu = react_dom_default.a.findDOMNode(_this3.menuInstance); if (popupMenu.offsetWidth >= _this3.subMenuTitle.offsetWidth) { return; } /* istanbul ignore next */ popupMenu.style.minWidth = _this3.subMenuTitle.offsetWidth + 'px'; }; this.saveSubMenuTitle = function (subMenuTitle) { _this3.subMenuTitle = subMenuTitle; }; }; var connected = Object(mini_store_lib["connect"])(function (_ref, _ref2) { var openKeys = _ref.openKeys, activeKey = _ref.activeKey, selectedKeys = _ref.selectedKeys; var eventKey = _ref2.eventKey, subMenuKey = _ref2.subMenuKey; return { isOpen: openKeys.indexOf(eventKey) > -1, active: activeKey[subMenuKey] === eventKey, selectedKeys: selectedKeys }; })(SubMenu_SubMenu); connected.isSubMenu = true; /* harmony default export */ var es_SubMenu = (connected); // EXTERNAL MODULE: ../node_modules/dom-scroll-into-view/lib/index.js var dom_scroll_into_view_lib = __webpack_require__("3Dq6"); var dom_scroll_into_view_lib_default = /*#__PURE__*/__webpack_require__.n(dom_scroll_into_view_lib); // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/MenuItem.js /* eslint react/no-is-mounted:0 */ var MenuItem_MenuItem = function (_React$Component) { inherits_default()(MenuItem, _React$Component); function MenuItem(props) { classCallCheck_default()(this, MenuItem); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); _this.onKeyDown = function (e) { var keyCode = e.keyCode; if (keyCode === es_KeyCode.ENTER) { _this.onClick(e); return true; } }; _this.onMouseLeave = function (e) { var _this$props = _this.props, eventKey = _this$props.eventKey, onItemHover = _this$props.onItemHover, onMouseLeave = _this$props.onMouseLeave; onItemHover({ key: eventKey, hover: false }); onMouseLeave({ key: eventKey, domEvent: e }); }; _this.onMouseEnter = function (e) { var _this$props2 = _this.props, eventKey = _this$props2.eventKey, onItemHover = _this$props2.onItemHover, onMouseEnter = _this$props2.onMouseEnter; onItemHover({ key: eventKey, hover: true }); onMouseEnter({ key: eventKey, domEvent: e }); }; _this.onClick = function (e) { var _this$props3 = _this.props, eventKey = _this$props3.eventKey, multiple = _this$props3.multiple, onClick = _this$props3.onClick, onSelect = _this$props3.onSelect, onDeselect = _this$props3.onDeselect, isSelected = _this$props3.isSelected; var info = { key: eventKey, keyPath: [eventKey], item: _this, domEvent: e }; onClick(info); if (multiple) { if (isSelected) { onDeselect(info); } else { onSelect(info); } } else if (!isSelected) { onSelect(info); } }; return _this; } MenuItem.prototype.componentDidMount = function componentDidMount() { // invoke customized ref to expose component to mixin this.callRef(); }; MenuItem.prototype.componentDidUpdate = function componentDidUpdate() { if (this.props.active) { dom_scroll_into_view_lib_default()(react_dom_default.a.findDOMNode(this), react_dom_default.a.findDOMNode(this.props.parentMenu), { onlyScrollIfNeeded: true }); } this.callRef(); }; MenuItem.prototype.componentWillUnmount = function componentWillUnmount() { var props = this.props; if (props.onDestroy) { props.onDestroy(props.eventKey); } }; MenuItem.prototype.getPrefixCls = function getPrefixCls() { return this.props.rootPrefixCls + '-item'; }; MenuItem.prototype.getActiveClassName = function getActiveClassName() { return this.getPrefixCls() + '-active'; }; MenuItem.prototype.getSelectedClassName = function getSelectedClassName() { return this.getPrefixCls() + '-selected'; }; MenuItem.prototype.getDisabledClassName = function getDisabledClassName() { return this.getPrefixCls() + '-disabled'; }; MenuItem.prototype.callRef = function callRef() { if (this.props.manualRef) { this.props.manualRef(this); } }; MenuItem.prototype.render = function render() { var _classNames; var props = extends_default()({}, this.props); var className = classnames_default()(this.getPrefixCls(), props.className, (_classNames = {}, _classNames[this.getActiveClassName()] = !props.disabled && props.active, _classNames[this.getSelectedClassName()] = props.isSelected, _classNames[this.getDisabledClassName()] = props.disabled, _classNames)); var attrs = extends_default()({}, props.attribute, { title: props.title, className: className, // set to menuitem by default role: props.role || 'menuitem', 'aria-disabled': props.disabled }); if (props.role === 'option') { // overwrite to option attrs = extends_default()({}, attrs, { role: 'option', 'aria-selected': props.isSelected }); } else if (props.role === null || props.role === 'none') { // sometimes we want to specify role inside
  • element //
  • Link
  • would be a good example // in this case the role on
  • should be "none" to // remove the implied listitem role. // https://www.w3.org/TR/wai-aria-practices-1.1/examples/menubar/menubar-1/menubar-1.html attrs.role = 'none'; } // In case that onClick/onMouseLeave/onMouseEnter is passed down from owner var mouseEvent = { onClick: props.disabled ? null : this.onClick, onMouseLeave: props.disabled ? null : this.onMouseLeave, onMouseEnter: props.disabled ? null : this.onMouseEnter }; var style = extends_default()({}, props.style); if (props.mode === 'inline') { style.paddingLeft = props.inlineIndent * props.level; } menuAllProps.forEach(function (key) { return delete props[key]; }); return react_default.a.createElement( 'li', extends_default()({}, props, attrs, mouseEvent, { style: style }), props.children ); }; return MenuItem; }(react_default.a.Component); MenuItem_MenuItem.propTypes = { attribute: prop_types_default.a.object, rootPrefixCls: prop_types_default.a.string, eventKey: prop_types_default.a.string, active: prop_types_default.a.bool, children: prop_types_default.a.any, selectedKeys: prop_types_default.a.array, disabled: prop_types_default.a.bool, title: prop_types_default.a.string, onItemHover: prop_types_default.a.func, onSelect: prop_types_default.a.func, onClick: prop_types_default.a.func, onDeselect: prop_types_default.a.func, parentMenu: prop_types_default.a.object, onDestroy: prop_types_default.a.func, onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, multiple: prop_types_default.a.bool, isSelected: prop_types_default.a.bool, manualRef: prop_types_default.a.func }; MenuItem_MenuItem.defaultProps = { onSelect: util_noop, onMouseEnter: util_noop, onMouseLeave: util_noop, manualRef: util_noop }; MenuItem_MenuItem.isMenuItem = true; var MenuItem_connected = Object(mini_store_lib["connect"])(function (_ref, _ref2) { var activeKey = _ref.activeKey, selectedKeys = _ref.selectedKeys; var eventKey = _ref2.eventKey, subMenuKey = _ref2.subMenuKey; return { active: activeKey[subMenuKey] === eventKey, isSelected: selectedKeys.indexOf(eventKey) !== -1 }; })(MenuItem_MenuItem); /* harmony default export */ var es_MenuItem = (MenuItem_connected); // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/MenuItemGroup.js var MenuItemGroup_MenuItemGroup = function (_React$Component) { inherits_default()(MenuItemGroup, _React$Component); function MenuItemGroup() { var _temp, _this, _ret; classCallCheck_default()(this, MenuItemGroup); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.renderInnerMenuItem = function (item) { var _this$props = _this.props, renderMenuItem = _this$props.renderMenuItem, index = _this$props.index; return renderMenuItem(item, index, _this.props.subMenuKey); }, _temp), possibleConstructorReturn_default()(_this, _ret); } MenuItemGroup.prototype.render = function render() { var props = objectWithoutProperties_default()(this.props, []); var _props$className = props.className, className = _props$className === undefined ? '' : _props$className, rootPrefixCls = props.rootPrefixCls; var titleClassName = rootPrefixCls + '-item-group-title'; var listClassName = rootPrefixCls + '-item-group-list'; var title = props.title, children = props.children; menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; return react_default.a.createElement( 'li', extends_default()({}, props, { className: className + ' ' + rootPrefixCls + '-item-group' }), react_default.a.createElement( 'div', { className: titleClassName, title: typeof title === 'string' ? title : undefined }, title ), react_default.a.createElement( 'ul', { className: listClassName }, react_default.a.Children.map(children, this.renderInnerMenuItem) ) ); }; return MenuItemGroup; }(react_default.a.Component); MenuItemGroup_MenuItemGroup.propTypes = { renderMenuItem: prop_types_default.a.func, index: prop_types_default.a.number, className: prop_types_default.a.string, subMenuKey: prop_types_default.a.string, rootPrefixCls: prop_types_default.a.string }; MenuItemGroup_MenuItemGroup.defaultProps = { disabled: true }; MenuItemGroup_MenuItemGroup.isMenuItemGroup = true; /* harmony default export */ var es_MenuItemGroup = (MenuItemGroup_MenuItemGroup); // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/Divider.js var Divider_Divider = function (_React$Component) { inherits_default()(Divider, _React$Component); function Divider() { classCallCheck_default()(this, Divider); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } Divider.prototype.render = function render() { var _props = this.props, _props$className = _props.className, className = _props$className === undefined ? '' : _props$className, rootPrefixCls = _props.rootPrefixCls; return react_default.a.createElement('li', { className: className + ' ' + rootPrefixCls + '-item-divider' }); }; return Divider; }(react_default.a.Component); Divider_Divider.propTypes = { className: prop_types_default.a.string, rootPrefixCls: prop_types_default.a.string }; Divider_Divider.defaultProps = { // To fix keyboard UX. disabled: true }; /* harmony default export */ var es_Divider = (Divider_Divider); // CONCATENATED MODULE: ../node_modules/rc-select/node_modules/rc-menu/es/index.js /* harmony default export */ var rc_menu_es = (es_Menu); // CONCATENATED MODULE: ../node_modules/rc-select/es/Option.js var Option_Option = function (_React$Component) { inherits_default()(Option, _React$Component); function Option() { classCallCheck_default()(this, Option); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } return Option; }(react_default.a.Component); Option_Option.propTypes = { value: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]) }; Option_Option.isSelectOption = true; /* harmony default export */ var es_Option = (Option_Option); // CONCATENATED MODULE: ../node_modules/rc-select/es/util.js function toTitle(title) { if (typeof title === 'string') { return title; } return null; } function getValuePropValue(child) { if (!child) { return null; } var props = child.props; if ('value' in props) { return props.value; } if (child.key) { return child.key; } if (child.type && child.type.isSelectOptGroup && props.label) { return props.label; } throw new Error('Need at least a key or a value or a label (only for OptGroup) for ' + child); } function getPropValue(child, prop) { if (prop === 'value') { return getValuePropValue(child); } return child.props[prop]; } function isMultiple(props) { return props.multiple; } function isCombobox(props) { return props.combobox; } function isMultipleOrTags(props) { return props.multiple || props.tags; } function isMultipleOrTagsOrCombobox(props) { return isMultipleOrTags(props) || isCombobox(props); } function isSingleMode(props) { return !isMultipleOrTagsOrCombobox(props); } function util_toArray(value) { var ret = value; if (value === undefined) { ret = []; } else if (!Array.isArray(value)) { ret = [value]; } return ret; } function getMapKey(value) { return typeof value + '-' + value; } function preventDefaultEvent(e) { e.preventDefault(); } function findIndexInValueBySingleValue(value, singleValue) { var index = -1; for (var i = 0; i < value.length; i++) { if (value[i] === singleValue) { index = i; break; } } return index; } function getLabelFromPropsValue(value, key) { var label = void 0; value = util_toArray(value); for (var i = 0; i < value.length; i++) { if (value[i].key === key) { label = value[i].label; break; } } return label; } function getSelectKeys(menuItems, value) { if (value === null || value === undefined) { return []; } var selectedKeys = []; react_default.a.Children.forEach(menuItems, function (item) { if (item.type.isMenuItemGroup) { selectedKeys = selectedKeys.concat(getSelectKeys(item.props.children, value)); } else { var itemValue = getValuePropValue(item); var itemKey = item.key; if (findIndexInValueBySingleValue(value, itemValue) !== -1 && itemKey) { selectedKeys.push(itemKey); } } }); return selectedKeys; } var UNSELECTABLE_STYLE = { userSelect: 'none', WebkitUserSelect: 'none' }; var UNSELECTABLE_ATTRIBUTE = { unselectable: 'on' }; function findFirstMenuItem(children) { for (var i = 0; i < children.length; i++) { var child = children[i]; if (child.type.isMenuItemGroup) { var found = findFirstMenuItem(child.props.children); if (found) { return found; } } else if (!child.props.disabled) { return child; } } return null; } function includesSeparators(string, separators) { for (var i = 0; i < separators.length; ++i) { if (string.lastIndexOf(separators[i]) > 0) { return true; } } return false; } function splitBySeparators(string, separators) { var reg = new RegExp('[' + separators.join() + ']'); return string.split(reg).filter(function (token) { return token; }); } function defaultFilterFn(input, child) { if (child.props.disabled) { return false; } var value = util_toArray(getPropValue(child, this.props.optionFilterProp)).join(''); return value.toLowerCase().indexOf(input.toLowerCase()) > -1; } function validateOptionValue(value, props) { if (isSingleMode(props) || isMultiple(props)) { return; } if (typeof value !== 'string') { throw new Error('Invalid `value` of type `' + typeof value + '` supplied to Option, ' + 'expected `string` when `tags/combobox` is `true`.'); } } function util_saveRef(instance, name) { return function (node) { instance[name] = node; }; } // CONCATENATED MODULE: ../node_modules/rc-select/es/DropdownMenu.js var DropdownMenu_DropdownMenu = function (_React$Component) { inherits_default()(DropdownMenu, _React$Component); function DropdownMenu(props) { classCallCheck_default()(this, DropdownMenu); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); DropdownMenu__initialiseProps.call(_this); _this.lastInputValue = props.inputValue; _this.saveMenuRef = util_saveRef(_this, 'menuRef'); return _this; } DropdownMenu.prototype.componentDidMount = function componentDidMount() { this.scrollActiveItemToView(); this.lastVisible = this.props.visible; }; DropdownMenu.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { if (!nextProps.visible) { this.lastVisible = false; } // freeze when hide return nextProps.visible; }; DropdownMenu.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { var props = this.props; if (!prevProps.visible && props.visible) { this.scrollActiveItemToView(); } this.lastVisible = props.visible; this.lastInputValue = props.inputValue; }; DropdownMenu.prototype.renderMenu = function renderMenu() { var _this2 = this; var props = this.props; var menuItems = props.menuItems, defaultActiveFirstOption = props.defaultActiveFirstOption, value = props.value, prefixCls = props.prefixCls, multiple = props.multiple, onMenuSelect = props.onMenuSelect, inputValue = props.inputValue, firstActiveValue = props.firstActiveValue, backfillValue = props.backfillValue; if (menuItems && menuItems.length) { var menuProps = {}; if (multiple) { menuProps.onDeselect = props.onMenuDeselect; menuProps.onSelect = onMenuSelect; } else { menuProps.onClick = onMenuSelect; } var selectedKeys = getSelectKeys(menuItems, value); var activeKeyProps = {}; var clonedMenuItems = menuItems; if (selectedKeys.length || firstActiveValue) { if (props.visible && !this.lastVisible) { activeKeyProps.activeKey = selectedKeys[0] || firstActiveValue; } var foundFirst = false; // set firstActiveItem via cloning menus // for scroll into view var clone = function clone(item) { if (!foundFirst && selectedKeys.indexOf(item.key) !== -1 || !foundFirst && !selectedKeys.length && firstActiveValue.indexOf(item.key) !== -1) { foundFirst = true; return Object(react["cloneElement"])(item, { ref: function ref(_ref) { _this2.firstActiveItem = _ref; } }); } return item; }; clonedMenuItems = menuItems.map(function (item) { if (item.type.isMenuItemGroup) { var children = toArray_toArray(item.props.children).map(clone); return Object(react["cloneElement"])(item, {}, children); } return clone(item); }); } else { // Clear firstActiveItem when dropdown menu items was empty // Avoid `Unable to find node on an unmounted component` // https://github.com/ant-design/ant-design/issues/10774 this.firstActiveItem = null; } // clear activeKey when inputValue change var lastValue = value && value[value.length - 1]; if (inputValue !== this.lastInputValue && (!lastValue || lastValue !== backfillValue)) { activeKeyProps.activeKey = ''; } return react_default.a.createElement( rc_menu_es, extends_default()({ ref: this.saveMenuRef, style: this.props.dropdownMenuStyle, defaultActiveFirst: defaultActiveFirstOption, role: 'listbox' }, activeKeyProps, { multiple: multiple }, menuProps, { selectedKeys: selectedKeys, prefixCls: prefixCls + '-menu' }), clonedMenuItems ); } return null; }; DropdownMenu.prototype.render = function render() { var renderMenu = this.renderMenu(); return renderMenu ? react_default.a.createElement( 'div', { style: { overflow: 'auto' }, onFocus: this.props.onPopupFocus, onMouseDown: preventDefaultEvent, onScroll: this.props.onPopupScroll }, renderMenu ) : null; }; return DropdownMenu; }(react_default.a.Component); DropdownMenu_DropdownMenu.propTypes = { defaultActiveFirstOption: prop_types_default.a.bool, value: prop_types_default.a.any, dropdownMenuStyle: prop_types_default.a.object, multiple: prop_types_default.a.bool, onPopupFocus: prop_types_default.a.func, onPopupScroll: prop_types_default.a.func, onMenuDeSelect: prop_types_default.a.func, onMenuSelect: prop_types_default.a.func, prefixCls: prop_types_default.a.string, menuItems: prop_types_default.a.any, inputValue: prop_types_default.a.string, visible: prop_types_default.a.bool }; var DropdownMenu__initialiseProps = function _initialiseProps() { var _this3 = this; this.scrollActiveItemToView = function () { // scroll into view var itemComponent = Object(react_dom["findDOMNode"])(_this3.firstActiveItem); var props = _this3.props; if (itemComponent) { var scrollIntoViewOpts = { onlyScrollIfNeeded: true }; if ((!props.value || props.value.length === 0) && props.firstActiveValue) { scrollIntoViewOpts.alignWithTop = true; } dom_scroll_into_view_lib_default()(itemComponent, Object(react_dom["findDOMNode"])(_this3.menuRef), scrollIntoViewOpts); } }; }; /* harmony default export */ var es_DropdownMenu = (DropdownMenu_DropdownMenu); DropdownMenu_DropdownMenu.displayName = 'DropdownMenu'; // CONCATENATED MODULE: ../node_modules/rc-select/es/SelectTrigger.js rc_trigger_es.displayName = 'Trigger'; var BUILT_IN_PLACEMENTS = { bottomLeft: { points: ['tl', 'bl'], offset: [0, 4], overflow: { adjustX: 0, adjustY: 1 } }, topLeft: { points: ['bl', 'tl'], offset: [0, -4], overflow: { adjustX: 0, adjustY: 1 } } }; var SelectTrigger_SelectTrigger = function (_React$Component) { inherits_default()(SelectTrigger, _React$Component); function SelectTrigger(props) { classCallCheck_default()(this, SelectTrigger); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); SelectTrigger__initialiseProps.call(_this); _this.saveDropdownMenuRef = util_saveRef(_this, 'dropdownMenuRef'); _this.saveTriggerRef = util_saveRef(_this, 'triggerRef'); _this.state = { dropdownWidth: null }; return _this; } SelectTrigger.prototype.componentDidMount = function componentDidMount() { this.setDropdownWidth(); }; SelectTrigger.prototype.componentDidUpdate = function componentDidUpdate() { this.setDropdownWidth(); }; SelectTrigger.prototype.render = function render() { var _popupClassName; var _props = this.props, onPopupFocus = _props.onPopupFocus, props = objectWithoutProperties_default()(_props, ['onPopupFocus']); var multiple = props.multiple, visible = props.visible, inputValue = props.inputValue, dropdownAlign = props.dropdownAlign, disabled = props.disabled, showSearch = props.showSearch, dropdownClassName = props.dropdownClassName, dropdownStyle = props.dropdownStyle, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth; var dropdownPrefixCls = this.getDropdownPrefixCls(); var popupClassName = (_popupClassName = {}, _popupClassName[dropdownClassName] = !!dropdownClassName, _popupClassName[dropdownPrefixCls + '--' + (multiple ? 'multiple' : 'single')] = 1, _popupClassName); var popupElement = this.getDropdownElement({ menuItems: props.options, onPopupFocus: onPopupFocus, multiple: multiple, inputValue: inputValue, visible: visible }); var hideAction = void 0; if (disabled) { hideAction = []; } else if (isSingleMode(props) && !showSearch) { hideAction = ['click']; } else { hideAction = ['blur']; } var popupStyle = extends_default()({}, dropdownStyle); var widthProp = dropdownMatchSelectWidth ? 'width' : 'minWidth'; if (this.state.dropdownWidth) { popupStyle[widthProp] = this.state.dropdownWidth + 'px'; } return react_default.a.createElement( rc_trigger_es, extends_default()({}, props, { showAction: disabled ? [] : this.props.showAction, hideAction: hideAction, ref: this.saveTriggerRef, popupPlacement: 'bottomLeft', builtinPlacements: BUILT_IN_PLACEMENTS, prefixCls: dropdownPrefixCls, popupTransitionName: this.getDropdownTransitionName(), onPopupVisibleChange: props.onDropdownVisibleChange, popup: popupElement, popupAlign: dropdownAlign, popupVisible: visible, getPopupContainer: props.getPopupContainer, popupClassName: classnames_default()(popupClassName), popupStyle: popupStyle }), props.children ); }; return SelectTrigger; }(react_default.a.Component); SelectTrigger_SelectTrigger.propTypes = { onPopupFocus: prop_types_default.a.func, onPopupScroll: prop_types_default.a.func, dropdownMatchSelectWidth: prop_types_default.a.bool, dropdownAlign: prop_types_default.a.object, visible: prop_types_default.a.bool, disabled: prop_types_default.a.bool, showSearch: prop_types_default.a.bool, dropdownClassName: prop_types_default.a.string, multiple: prop_types_default.a.bool, inputValue: prop_types_default.a.string, filterOption: prop_types_default.a.any, options: prop_types_default.a.any, prefixCls: prop_types_default.a.string, popupClassName: prop_types_default.a.string, children: prop_types_default.a.any, showAction: prop_types_default.a.arrayOf(prop_types_default.a.string) }; var SelectTrigger__initialiseProps = function _initialiseProps() { var _this2 = this; this.setDropdownWidth = function () { var width = react_dom_default.a.findDOMNode(_this2).offsetWidth; if (width !== _this2.state.dropdownWidth) { _this2.setState({ dropdownWidth: width }); } }; this.getInnerMenu = function () { return _this2.dropdownMenuRef && _this2.dropdownMenuRef.menuRef; }; this.getPopupDOMNode = function () { return _this2.triggerRef.getPopupDomNode(); }; this.getDropdownElement = function (newProps) { var props = _this2.props; return react_default.a.createElement(es_DropdownMenu, extends_default()({ ref: _this2.saveDropdownMenuRef }, newProps, { prefixCls: _this2.getDropdownPrefixCls(), onMenuSelect: props.onMenuSelect, onMenuDeselect: props.onMenuDeselect, onPopupScroll: props.onPopupScroll, value: props.value, backfillValue: props.backfillValue, firstActiveValue: props.firstActiveValue, defaultActiveFirstOption: props.defaultActiveFirstOption, dropdownMenuStyle: props.dropdownMenuStyle })); }; this.getDropdownTransitionName = function () { var props = _this2.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = _this2.getDropdownPrefixCls() + '-' + props.animation; } return transitionName; }; this.getDropdownPrefixCls = function () { return _this2.props.prefixCls + '-dropdown'; }; }; /* harmony default export */ var es_SelectTrigger = (SelectTrigger_SelectTrigger); SelectTrigger_SelectTrigger.displayName = 'SelectTrigger'; // CONCATENATED MODULE: ../node_modules/rc-select/es/PropTypes.js function valueType(props, propName, componentName) { var basicType = prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]); var labelInValueShape = prop_types_default.a.shape({ key: basicType.isRequired, label: prop_types_default.a.node }); if (props.labelInValue) { var validate = prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(labelInValueShape), labelInValueShape]); var error = validate.apply(undefined, arguments); if (error) { return new Error('Invalid prop `' + propName + '` supplied to `' + componentName + '`, ' + ('when you set `labelInValue` to `true`, `' + propName + '` should in ') + 'shape of `{ key: string | number, label?: ReactNode }`.'); } } else if ((props.mode === 'multiple' || props.mode === 'tags' || props.multiple || props.tags) && props[propName] === '') { return new Error('Invalid prop `' + propName + '` of type `string` supplied to `' + componentName + '`, ' + 'expected `array` when `multiple` or `tags` is `true`.'); } else { var _validate = prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(basicType), basicType]); return _validate.apply(undefined, arguments); } } var SelectPropTypes = { defaultActiveFirstOption: prop_types_default.a.bool, multiple: prop_types_default.a.bool, filterOption: prop_types_default.a.any, children: prop_types_default.a.any, showSearch: prop_types_default.a.bool, disabled: prop_types_default.a.bool, allowClear: prop_types_default.a.bool, showArrow: prop_types_default.a.bool, tags: prop_types_default.a.bool, prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, transitionName: prop_types_default.a.string, optionLabelProp: prop_types_default.a.string, optionFilterProp: prop_types_default.a.string, animation: prop_types_default.a.string, choiceTransitionName: prop_types_default.a.string, onChange: prop_types_default.a.func, onBlur: prop_types_default.a.func, onFocus: prop_types_default.a.func, onSelect: prop_types_default.a.func, onSearch: prop_types_default.a.func, onPopupScroll: prop_types_default.a.func, onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, onInputKeyDown: prop_types_default.a.func, placeholder: prop_types_default.a.any, onDeselect: prop_types_default.a.func, labelInValue: prop_types_default.a.bool, value: valueType, defaultValue: valueType, dropdownStyle: prop_types_default.a.object, maxTagTextLength: prop_types_default.a.number, maxTagCount: prop_types_default.a.number, maxTagPlaceholder: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]), tokenSeparators: prop_types_default.a.arrayOf(prop_types_default.a.string), getInputElement: prop_types_default.a.func, showAction: prop_types_default.a.arrayOf(prop_types_default.a.string) }; // CONCATENATED MODULE: ../node_modules/rc-select/es/Select.js /* eslint func-names: 1 */ function Select_noop() {} function chaining() { for (var _len = arguments.length, fns = Array(_len), _key = 0; _key < _len; _key++) { fns[_key] = arguments[_key]; } return function () { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } // eslint-disable-line // eslint-disable-line for (var i = 0; i < fns.length; i++) { if (fns[i] && typeof fns[i] === 'function') { fns[i].apply(this, args); } } }; } var Select_Select = function (_React$Component) { inherits_default()(Select, _React$Component); function Select(props) { classCallCheck_default()(this, Select); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); Select__initialiseProps.call(_this); var optionsInfo = Select.getOptionsInfoFromProps(props); _this.state = { value: Select.getValueFromProps(props, true), // true: use default value inputValue: props.combobox ? Select.getInputValueForCombobox(props, optionsInfo, true // use default value ) : '', open: props.defaultOpen, optionsInfo: optionsInfo, // a flag for aviod redundant getOptionsInfoFromProps call skipBuildOptionsInfo: true }; _this.saveInputRef = util_saveRef(_this, 'inputRef'); _this.saveInputMirrorRef = util_saveRef(_this, 'inputMirrorRef'); _this.saveTopCtrlRef = util_saveRef(_this, 'topCtrlRef'); _this.saveSelectTriggerRef = util_saveRef(_this, 'selectTriggerRef'); _this.saveRootRef = util_saveRef(_this, 'rootRef'); _this.saveSelectionRef = util_saveRef(_this, 'selectionRef'); return _this; } Select.prototype.componentDidMount = function componentDidMount() { if (this.props.autoFocus) { this.focus(); } }; Select.prototype.componentDidUpdate = function componentDidUpdate() { if (isMultipleOrTags(this.props)) { var inputNode = this.getInputDOMNode(); var mirrorNode = this.getInputMirrorDOMNode(); if (inputNode.value) { inputNode.style.width = ''; inputNode.style.width = mirrorNode.clientWidth + 'px'; } else { inputNode.style.width = ''; } } this.forcePopupAlign(); }; Select.prototype.componentWillUnmount = function componentWillUnmount() { this.clearFocusTime(); this.clearBlurTime(); if (this.dropdownContainer) { react_dom_default.a.unmountComponentAtNode(this.dropdownContainer); document.body.removeChild(this.dropdownContainer); this.dropdownContainer = null; } }; // combobox ignore Select.prototype.focus = function focus() { if (isSingleMode(this.props)) { this.selectionRef.focus(); } else { this.getInputDOMNode().focus(); } }; Select.prototype.blur = function blur() { if (isSingleMode(this.props)) { this.selectionRef.blur(); } else { this.getInputDOMNode().blur(); } }; Select.prototype.renderClear = function renderClear() { var _props = this.props, prefixCls = _props.prefixCls, allowClear = _props.allowClear; var _state = this.state, value = _state.value, inputValue = _state.inputValue; var clear = react_default.a.createElement('span', extends_default()({ key: 'clear', onMouseDown: preventDefaultEvent, style: UNSELECTABLE_STYLE }, UNSELECTABLE_ATTRIBUTE, { className: prefixCls + '-selection__clear', onClick: this.onClearSelection })); if (!allowClear) { return null; } if (isCombobox(this.props)) { if (inputValue) { return clear; } return null; } if (inputValue || value.length) { return clear; } return null; }; Select.prototype.render = function render() { var _rootCls; var props = this.props; var multiple = isMultipleOrTags(props); var state = this.state; var className = props.className, disabled = props.disabled, prefixCls = props.prefixCls; var ctrlNode = this.renderTopControlNode(); var extraSelectionProps = {}; var open = this.state.open; if (open) { this._options = this.renderFilterOptions(); } var realOpen = this.getRealOpenState(); var options = this._options || []; if (!isMultipleOrTagsOrCombobox(props)) { extraSelectionProps = { onKeyDown: this.onKeyDown, tabIndex: props.disabled ? -1 : 0 }; } var rootCls = (_rootCls = {}, _rootCls[className] = !!className, _rootCls[prefixCls] = 1, _rootCls[prefixCls + '-open'] = open, _rootCls[prefixCls + '-focused'] = open || !!this._focused, _rootCls[prefixCls + '-combobox'] = isCombobox(props), _rootCls[prefixCls + '-disabled'] = disabled, _rootCls[prefixCls + '-enabled'] = !disabled, _rootCls[prefixCls + '-allow-clear'] = !!props.allowClear, _rootCls[prefixCls + '-no-arrow'] = !props.showArrow, _rootCls); return react_default.a.createElement( es_SelectTrigger, { onPopupFocus: this.onPopupFocus, onMouseEnter: this.props.onMouseEnter, onMouseLeave: this.props.onMouseLeave, dropdownAlign: props.dropdownAlign, dropdownClassName: props.dropdownClassName, dropdownMatchSelectWidth: props.dropdownMatchSelectWidth, defaultActiveFirstOption: props.defaultActiveFirstOption, dropdownMenuStyle: props.dropdownMenuStyle, transitionName: props.transitionName, animation: props.animation, prefixCls: props.prefixCls, dropdownStyle: props.dropdownStyle, combobox: props.combobox, showSearch: props.showSearch, options: options, multiple: multiple, disabled: disabled, visible: realOpen, inputValue: state.inputValue, value: state.value, backfillValue: state.backfillValue, firstActiveValue: props.firstActiveValue, onDropdownVisibleChange: this.onDropdownVisibleChange, getPopupContainer: props.getPopupContainer, onMenuSelect: this.onMenuSelect, onMenuDeselect: this.onMenuDeselect, onPopupScroll: props.onPopupScroll, showAction: props.showAction, ref: this.saveSelectTriggerRef }, react_default.a.createElement( 'div', { style: props.style, ref: this.saveRootRef, onBlur: this.onOuterBlur, onFocus: this.onOuterFocus, className: classnames_default()(rootCls) }, react_default.a.createElement( 'div', extends_default()({ ref: this.saveSelectionRef, key: 'selection', className: prefixCls + '-selection\n ' + prefixCls + '-selection--' + (multiple ? 'multiple' : 'single'), role: 'combobox', 'aria-autocomplete': 'list', 'aria-haspopup': 'true', 'aria-expanded': realOpen }, extraSelectionProps), ctrlNode, this.renderClear(), multiple || !props.showArrow ? null : react_default.a.createElement( 'span', extends_default()({ key: 'arrow', className: prefixCls + '-arrow', style: UNSELECTABLE_STYLE }, UNSELECTABLE_ATTRIBUTE, { onClick: this.onArrowClick }), react_default.a.createElement('b', null) ) ) ) ); }; return Select; }(react_default.a.Component); Select_Select.propTypes = SelectPropTypes; Select_Select.defaultProps = { prefixCls: 'rc-select', defaultOpen: false, labelInValue: false, defaultActiveFirstOption: true, showSearch: true, allowClear: false, placeholder: '', onChange: Select_noop, onFocus: Select_noop, onBlur: Select_noop, onSelect: Select_noop, onSearch: Select_noop, onDeselect: Select_noop, onInputKeyDown: Select_noop, showArrow: true, dropdownMatchSelectWidth: true, dropdownStyle: {}, dropdownMenuStyle: {}, optionFilterProp: 'value', optionLabelProp: 'value', notFoundContent: 'Not Found', backfill: false, showAction: ['click'], tokenSeparators: [], autoClearSearchValue: true }; Select_Select.getDerivedStateFromProps = function (nextProps, prevState) { var optionsInfo = prevState.skipBuildOptionsInfo ? prevState.optionsInfo : Select_Select.getOptionsInfoFromProps(nextProps, prevState); var newState = { optionsInfo: optionsInfo, skipBuildOptionsInfo: false }; if ('open' in nextProps) { newState.open = nextProps.open; } if ('value' in nextProps) { var value = Select_Select.getValueFromProps(nextProps); newState.value = value; if (nextProps.combobox) { newState.inputValue = Select_Select.getInputValueForCombobox(nextProps, optionsInfo); } } return newState; }; Select_Select.getOptionsFromChildren = function (children) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; react_default.a.Children.forEach(children, function (child) { if (!child) { return; } if (child.type.isSelectOptGroup) { Select_Select.getOptionsFromChildren(child.props.children, options); } else { options.push(child); } }); return options; }; Select_Select.getInputValueForCombobox = function (props, optionsInfo, useDefaultValue) { var value = []; if ('value' in props && !useDefaultValue) { value = util_toArray(props.value); } if ('defaultValue' in props && useDefaultValue) { value = util_toArray(props.defaultValue); } if (value.length) { value = value[0]; } else { return ''; } var label = value; if (props.labelInValue) { label = value.label; } else if (optionsInfo[getMapKey(value)]) { label = optionsInfo[getMapKey(value)].label; } if (label === undefined) { label = ''; } return label; }; Select_Select.getLabelFromOption = function (props, option) { return getPropValue(option, props.optionLabelProp); }; Select_Select.getOptionsInfoFromProps = function (props, preState) { var options = Select_Select.getOptionsFromChildren(props.children); var optionsInfo = {}; options.forEach(function (option) { var singleValue = getValuePropValue(option); optionsInfo[getMapKey(singleValue)] = { option: option, value: singleValue, label: Select_Select.getLabelFromOption(props, option), title: option.props.title }; }); if (preState) { // keep option info in pre state value. var oldOptionsInfo = preState.optionsInfo; var value = preState.value; value.forEach(function (v) { var key = getMapKey(v); if (!optionsInfo[key] && oldOptionsInfo[key] !== undefined) { optionsInfo[key] = oldOptionsInfo[key]; } }); } return optionsInfo; }; Select_Select.getValueFromProps = function (props, useDefaultValue) { var value = []; if ('value' in props && !useDefaultValue) { value = util_toArray(props.value); } if ('defaultValue' in props && useDefaultValue) { value = util_toArray(props.defaultValue); } if (props.labelInValue) { value = value.map(function (v) { return v.key; }); } return value; }; var Select__initialiseProps = function _initialiseProps() { var _this2 = this; this.onInputChange = function (event) { var tokenSeparators = _this2.props.tokenSeparators; var val = event.target.value; if (isMultipleOrTags(_this2.props) && tokenSeparators.length && includesSeparators(val, tokenSeparators)) { var nextValue = _this2.getValueByInput(val); if (nextValue !== undefined) { _this2.fireChange(nextValue); } _this2.setOpenState(false, true); _this2.setInputValue('', false); return; } _this2.setInputValue(val); _this2.setState({ open: true }); if (isCombobox(_this2.props)) { _this2.fireChange([val]); } }; this.onDropdownVisibleChange = function (open) { if (open && !_this2._focused) { _this2.clearBlurTime(); _this2.timeoutFocus(); _this2._focused = true; _this2.updateFocusClassName(); } _this2.setOpenState(open); }; this.onKeyDown = function (event) { var props = _this2.props; if (props.disabled) { return; } var keyCode = event.keyCode; if (_this2.state.open && !_this2.getInputDOMNode()) { _this2.onInputKeyDown(event); } else if (keyCode === es_KeyCode.ENTER || keyCode === es_KeyCode.DOWN) { _this2.setOpenState(true); event.preventDefault(); } }; this.onInputKeyDown = function (event) { var props = _this2.props; if (props.disabled) { return; } var state = _this2.state; var keyCode = event.keyCode; if (isMultipleOrTags(props) && !event.target.value && keyCode === es_KeyCode.BACKSPACE) { event.preventDefault(); var value = state.value; if (value.length) { _this2.removeSelected(value[value.length - 1]); } return; } if (keyCode === es_KeyCode.DOWN) { if (!state.open) { _this2.openIfHasChildren(); event.preventDefault(); event.stopPropagation(); return; } } else if (keyCode === es_KeyCode.ENTER && state.open) { // Aviod trigger form submit when select item // https://github.com/ant-design/ant-design/issues/10861 event.preventDefault(); } else if (keyCode === es_KeyCode.ESC) { if (state.open) { _this2.setOpenState(false); event.preventDefault(); event.stopPropagation(); } return; } if (state.open) { var menu = _this2.selectTriggerRef.getInnerMenu(); if (menu && menu.onKeyDown(event, _this2.handleBackfill)) { event.preventDefault(); event.stopPropagation(); } } }; this.onMenuSelect = function (_ref) { var item = _ref.item; if (!item) { return; } var value = _this2.state.value; var props = _this2.props; var selectedValue = getValuePropValue(item); var lastValue = value[value.length - 1]; _this2.fireSelect(selectedValue); if (isMultipleOrTags(props)) { if (findIndexInValueBySingleValue(value, selectedValue) !== -1) { return; } value = value.concat([selectedValue]); } else { if (lastValue && lastValue === selectedValue && selectedValue !== _this2.state.backfillValue) { _this2.setOpenState(false, true); return; } value = [selectedValue]; _this2.setOpenState(false, true); } _this2.fireChange(value); var inputValue = void 0; if (isCombobox(props)) { inputValue = getPropValue(item, props.optionLabelProp); } else { inputValue = ''; } if (props.autoClearSearchValue) { _this2.setInputValue(inputValue, false); } }; this.onMenuDeselect = function (_ref2) { var item = _ref2.item, domEvent = _ref2.domEvent; if (domEvent.type === 'click') { _this2.removeSelected(getValuePropValue(item)); } var props = _this2.props; if (props.autoClearSearchValue) { _this2.setInputValue('', false); } }; this.onArrowClick = function (e) { e.stopPropagation(); e.preventDefault(); if (!_this2.props.disabled) { _this2.setOpenState(!_this2.state.open, !_this2.state.open); } }; this.onPlaceholderClick = function () { if (_this2.getInputDOMNode()) { _this2.getInputDOMNode().focus(); } }; this.onOuterFocus = function (e) { if (_this2.props.disabled) { e.preventDefault(); return; } _this2.clearBlurTime(); if (!isMultipleOrTagsOrCombobox(_this2.props) && e.target === _this2.getInputDOMNode()) { return; } if (_this2._focused) { return; } _this2._focused = true; _this2.updateFocusClassName(); _this2.timeoutFocus(); }; this.onPopupFocus = function () { // fix ie scrollbar, focus element again _this2.maybeFocus(true, true); }; this.onOuterBlur = function (e) { if (_this2.props.disabled) { e.preventDefault(); return; } _this2.blurTimer = setTimeout(function () { _this2._focused = false; _this2.updateFocusClassName(); var props = _this2.props; var value = _this2.state.value; var inputValue = _this2.state.inputValue; if (isSingleMode(props) && props.showSearch && inputValue && props.defaultActiveFirstOption) { var options = _this2._options || []; if (options.length) { var firstOption = findFirstMenuItem(options); if (firstOption) { value = [getValuePropValue(firstOption)]; _this2.fireChange(value); } } } else if (isMultipleOrTags(props) && inputValue) { // why not use setState? _this2.state.inputValue = _this2.getInputDOMNode().value = ''; value = _this2.getValueByInput(inputValue); if (value !== undefined) { _this2.fireChange(value); } } props.onBlur(_this2.getVLForOnChange(value)); _this2.setOpenState(false); }, 10); }; this.onClearSelection = function (event) { var props = _this2.props; var state = _this2.state; if (props.disabled) { return; } var inputValue = state.inputValue, value = state.value; event.stopPropagation(); if (inputValue || value.length) { if (value.length) { _this2.fireChange([]); } _this2.setOpenState(false, true); if (inputValue) { _this2.setInputValue(''); } } }; this.onChoiceAnimationLeave = function () { _this2.forcePopupAlign(); }; this.getOptionInfoBySingleValue = function (value, optionsInfo) { var info = void 0; optionsInfo = optionsInfo || _this2.state.optionsInfo; if (optionsInfo[getMapKey(value)]) { info = optionsInfo[getMapKey(value)]; } if (info) { return info; } var defaultLabel = value; if (_this2.props.labelInValue) { var label = getLabelFromPropsValue(_this2.props.value, value); if (label !== undefined) { defaultLabel = label; } } var defaultInfo = { option: react_default.a.createElement( es_Option, { value: value, key: value }, value ), value: value, label: defaultLabel }; return defaultInfo; }; this.getOptionBySingleValue = function (value) { var _getOptionInfoBySingl = _this2.getOptionInfoBySingleValue(value), option = _getOptionInfoBySingl.option; return option; }; this.getOptionsBySingleValue = function (values) { return values.map(function (value) { return _this2.getOptionBySingleValue(value); }); }; this.getValueByLabel = function (label) { if (label === undefined) { return null; } var value = null; Object.keys(_this2.state.optionsInfo).forEach(function (key) { var info = _this2.state.optionsInfo[key]; if (util_toArray(info.label).join('') === label) { value = info.value; } }); return value; }; this.getVLBySingleValue = function (value) { if (_this2.props.labelInValue) { return { key: value, label: _this2.getLabelBySingleValue(value) }; } return value; }; this.getVLForOnChange = function (vls_) { var vls = vls_; if (vls !== undefined) { if (!_this2.props.labelInValue) { vls = vls.map(function (v) { return v; }); } else { vls = vls.map(function (vl) { return { key: vl, label: _this2.getLabelBySingleValue(vl) }; }); } return isMultipleOrTags(_this2.props) ? vls : vls[0]; } return vls; }; this.getLabelBySingleValue = function (value, optionsInfo) { var _getOptionInfoBySingl2 = _this2.getOptionInfoBySingleValue(value, optionsInfo), label = _getOptionInfoBySingl2.label; return label; }; this.getDropdownContainer = function () { if (!_this2.dropdownContainer) { _this2.dropdownContainer = document.createElement('div'); document.body.appendChild(_this2.dropdownContainer); } return _this2.dropdownContainer; }; this.getPlaceholderElement = function () { var props = _this2.props, state = _this2.state; var hidden = false; if (state.inputValue) { hidden = true; } if (state.value.length) { hidden = true; } if (isCombobox(props) && state.value.length === 1 && !state.value[0]) { hidden = false; } var placeholder = props.placeholder; if (placeholder) { return react_default.a.createElement( 'div', extends_default()({ onMouseDown: preventDefaultEvent, style: extends_default()({ display: hidden ? 'none' : 'block' }, UNSELECTABLE_STYLE) }, UNSELECTABLE_ATTRIBUTE, { onClick: _this2.onPlaceholderClick, className: props.prefixCls + '-selection__placeholder' }), placeholder ); } return null; }; this.getInputElement = function () { var _classnames; var props = _this2.props; var inputElement = props.getInputElement ? props.getInputElement() : react_default.a.createElement('input', { id: props.id, autoComplete: 'off' }); var inputCls = classnames_default()(inputElement.props.className, (_classnames = {}, _classnames[props.prefixCls + '-search__field'] = true, _classnames)); // https://github.com/ant-design/ant-design/issues/4992#issuecomment-281542159 // Add space to the end of the inputValue as the width measurement tolerance return react_default.a.createElement( 'div', { className: props.prefixCls + '-search__field__wrap' }, react_default.a.cloneElement(inputElement, { ref: _this2.saveInputRef, onChange: _this2.onInputChange, onKeyDown: chaining(_this2.onInputKeyDown, inputElement.props.onKeyDown, _this2.props.onInputKeyDown), value: _this2.state.inputValue, disabled: props.disabled, className: inputCls }), react_default.a.createElement( 'span', { ref: _this2.saveInputMirrorRef, className: props.prefixCls + '-search__field__mirror' }, _this2.state.inputValue, '\xA0' ) ); }; this.getInputDOMNode = function () { return _this2.topCtrlRef ? _this2.topCtrlRef.querySelector('input,textarea,div[contentEditable]') : _this2.inputRef; }; this.getInputMirrorDOMNode = function () { return _this2.inputMirrorRef; }; this.getPopupDOMNode = function () { return _this2.selectTriggerRef.getPopupDOMNode(); }; this.getPopupMenuComponent = function () { return _this2.selectTriggerRef.getInnerMenu(); }; this.setOpenState = function (open, needFocus) { var props = _this2.props, state = _this2.state; if (state.open === open) { _this2.maybeFocus(open, needFocus); return; } var nextState = { open: open, backfillValue: undefined }; // clear search input value when open is false in singleMode. if (!open && isSingleMode(props) && props.showSearch) { _this2.setInputValue('', false); } if (!open) { _this2.maybeFocus(open, needFocus); } _this2.setState(nextState, function () { if (open) { _this2.maybeFocus(open, needFocus); } }); }; this.setInputValue = function (inputValue) { var fireSearch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (inputValue !== _this2.state.inputValue) { _this2.setState({ inputValue: inputValue }, _this2.forcePopupAlign); if (fireSearch) { _this2.props.onSearch(inputValue); } } }; this.getValueByInput = function (string) { var _props2 = _this2.props, multiple = _props2.multiple, tokenSeparators = _props2.tokenSeparators; var nextValue = _this2.state.value; var hasNewValue = false; splitBySeparators(string, tokenSeparators).forEach(function (label) { var selectedValue = [label]; if (multiple) { var value = _this2.getValueByLabel(label); if (value && findIndexInValueBySingleValue(nextValue, value) === -1) { nextValue = nextValue.concat(value); hasNewValue = true; _this2.fireSelect(value); } } else { // tag if (findIndexInValueBySingleValue(nextValue, label) === -1) { nextValue = nextValue.concat(selectedValue); hasNewValue = true; _this2.fireSelect(label); } } }); return hasNewValue ? nextValue : undefined; }; this.getRealOpenState = function () { var open = _this2.state.open; var options = _this2._options || []; if (isMultipleOrTagsOrCombobox(_this2.props) || !_this2.props.showSearch) { if (open && !options.length) { open = false; } } return open; }; this.handleBackfill = function (item) { if (!_this2.props.backfill || !(isSingleMode(_this2.props) || isCombobox(_this2.props))) { return; } var key = getValuePropValue(item); if (isCombobox(_this2.props)) { _this2.setInputValue(key, false); } _this2.setState({ value: [key], backfillValue: key }); }; this.filterOption = function (input, child) { var defaultFilter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterFn; var value = _this2.state.value; var lastValue = value[value.length - 1]; if (!input || lastValue && lastValue === _this2.state.backfillValue) { return true; } var filterFn = _this2.props.filterOption; if ('filterOption' in _this2.props) { if (_this2.props.filterOption === true) { filterFn = defaultFilter; } } else { filterFn = defaultFilter; } if (!filterFn) { return true; } else if (typeof filterFn === 'function') { return filterFn.call(_this2, input, child); } else if (child.props.disabled) { return false; } return true; }; this.timeoutFocus = function () { if (_this2.focusTimer) { _this2.clearFocusTime(); } _this2.focusTimer = setTimeout(function () { _this2.props.onFocus(); }, 10); }; this.clearFocusTime = function () { if (_this2.focusTimer) { clearTimeout(_this2.focusTimer); _this2.focusTimer = null; } }; this.clearBlurTime = function () { if (_this2.blurTimer) { clearTimeout(_this2.blurTimer); _this2.blurTimer = null; } }; this.updateFocusClassName = function () { var rootRef = _this2.rootRef, props = _this2.props; // avoid setState and its side effect if (_this2._focused) { component_classes_default()(rootRef).add(props.prefixCls + '-focused'); } else { component_classes_default()(rootRef).remove(props.prefixCls + '-focused'); } }; this.maybeFocus = function (open, needFocus) { if (needFocus || open) { var input = _this2.getInputDOMNode(); var _document = document, activeElement = _document.activeElement; if (input && (open || isMultipleOrTagsOrCombobox(_this2.props))) { if (activeElement !== input) { input.focus(); _this2._focused = true; } } else { if (activeElement !== _this2.selectionRef) { _this2.selectionRef.focus(); _this2._focused = true; } } } }; this.removeSelected = function (selectedKey, e) { var props = _this2.props; if (props.disabled || _this2.isChildDisabled(selectedKey)) { return; } // Do not trigger Trigger popup if (e && e.stopPropagation) { e.stopPropagation(); } var value = _this2.state.value.filter(function (singleValue) { return singleValue !== selectedKey; }); var canMultiple = isMultipleOrTags(props); if (canMultiple) { var event = selectedKey; if (props.labelInValue) { event = { key: selectedKey, label: _this2.getLabelBySingleValue(selectedKey) }; } props.onDeselect(event, _this2.getOptionBySingleValue(selectedKey)); } _this2.fireChange(value); }; this.openIfHasChildren = function () { var props = _this2.props; if (react_default.a.Children.count(props.children) || isSingleMode(props)) { _this2.setOpenState(true); } }; this.fireSelect = function (value) { _this2.props.onSelect(_this2.getVLBySingleValue(value), _this2.getOptionBySingleValue(value)); }; this.fireChange = function (value) { var props = _this2.props; if (!('value' in props)) { _this2.setState({ value: value }, _this2.forcePopupAlign); } var vls = _this2.getVLForOnChange(value); var options = _this2.getOptionsBySingleValue(value); props.onChange(vls, isMultipleOrTags(_this2.props) ? options : options[0]); }; this.isChildDisabled = function (key) { return toArray_toArray(_this2.props.children).some(function (child) { var childValue = getValuePropValue(child); return childValue === key && child.props && child.props.disabled; }); }; this.forcePopupAlign = function () { _this2.selectTriggerRef.triggerRef.forcePopupAlign(); }; this.renderFilterOptions = function () { var inputValue = _this2.state.inputValue; var _props3 = _this2.props, children = _props3.children, tags = _props3.tags, filterOption = _props3.filterOption, notFoundContent = _props3.notFoundContent; var menuItems = []; var childrenKeys = []; var options = _this2.renderFilterOptionsFromChildren(children, childrenKeys, menuItems); if (tags) { // tags value must be string var value = _this2.state.value; value = value.filter(function (singleValue) { return childrenKeys.indexOf(singleValue) === -1 && (!inputValue || String(singleValue).indexOf(String(inputValue)) > -1); }); value.forEach(function (singleValue) { var key = singleValue; var menuItem = react_default.a.createElement( es_MenuItem, { style: UNSELECTABLE_STYLE, role: 'option', attribute: UNSELECTABLE_ATTRIBUTE, value: key, key: key }, key ); options.push(menuItem); menuItems.push(menuItem); }); if (inputValue) { var notFindInputItem = menuItems.every(function (option) { // this.filterOption return true has two meaning, // 1, some one exists after filtering // 2, filterOption is set to false // condition 2 does not mean the option has same value with inputValue var filterFn = function filterFn() { return getValuePropValue(option) === inputValue; }; if (filterOption !== false) { return !_this2.filterOption.call(_this2, inputValue, option, filterFn); } return !filterFn(); }); if (notFindInputItem) { options.unshift(react_default.a.createElement( es_MenuItem, { style: UNSELECTABLE_STYLE, role: 'option', attribute: UNSELECTABLE_ATTRIBUTE, value: inputValue, key: inputValue }, inputValue )); } } } if (!options.length && notFoundContent) { options = [react_default.a.createElement( es_MenuItem, { style: UNSELECTABLE_STYLE, attribute: UNSELECTABLE_ATTRIBUTE, disabled: true, role: 'option', value: 'NOT_FOUND', key: 'NOT_FOUND' }, notFoundContent )]; } return options; }; this.renderFilterOptionsFromChildren = function (children, childrenKeys, menuItems) { var sel = []; var props = _this2.props; var inputValue = _this2.state.inputValue; var tags = props.tags; react_default.a.Children.forEach(children, function (child) { if (!child) { return; } if (child.type.isSelectOptGroup) { var innerItems = _this2.renderFilterOptionsFromChildren(child.props.children, childrenKeys, menuItems); if (innerItems.length) { var label = child.props.label; var key = child.key; if (!key && typeof label === 'string') { key = label; } else if (!label && key) { label = key; } sel.push(react_default.a.createElement( es_MenuItemGroup, { key: key, title: label }, innerItems )); } return; } browser_default()(child.type.isSelectOption, 'the children of `Select` should be `Select.Option` or `Select.OptGroup`, ' + ('instead of `' + (child.type.name || child.type.displayName || child.type) + '`.')); var childValue = getValuePropValue(child); validateOptionValue(childValue, _this2.props); if (_this2.filterOption(inputValue, child)) { var menuItem = react_default.a.createElement(es_MenuItem, extends_default()({ style: UNSELECTABLE_STYLE, attribute: UNSELECTABLE_ATTRIBUTE, value: childValue, key: childValue, role: 'option' }, child.props)); sel.push(menuItem); menuItems.push(menuItem); } if (tags) { childrenKeys.push(childValue); } }); return sel; }; this.renderTopControlNode = function () { var _state2 = _this2.state, value = _state2.value, open = _state2.open, inputValue = _state2.inputValue; var props = _this2.props; var choiceTransitionName = props.choiceTransitionName, prefixCls = props.prefixCls, maxTagTextLength = props.maxTagTextLength, maxTagCount = props.maxTagCount, maxTagPlaceholder = props.maxTagPlaceholder, showSearch = props.showSearch; var className = prefixCls + '-selection__rendered'; // search input is inside topControlNode in single, multiple & combobox. 2016/04/13 var innerNode = null; if (isSingleMode(props)) { var selectedValue = null; if (value.length) { var showSelectedValue = false; var opacity = 1; if (!showSearch) { showSelectedValue = true; } else { if (open) { showSelectedValue = !inputValue; if (showSelectedValue) { opacity = 0.4; } } else { showSelectedValue = true; } } var singleValue = value[0]; var _getOptionInfoBySingl3 = _this2.getOptionInfoBySingleValue(singleValue), label = _getOptionInfoBySingl3.label, title = _getOptionInfoBySingl3.title; selectedValue = react_default.a.createElement( 'div', { key: 'value', className: prefixCls + '-selection-selected-value', title: toTitle(title || label), style: { display: showSelectedValue ? 'block' : 'none', opacity: opacity } }, label ); } if (!showSearch) { innerNode = [selectedValue]; } else { innerNode = [selectedValue, react_default.a.createElement( 'div', { className: prefixCls + '-search ' + prefixCls + '-search--inline', key: 'input', style: { display: open ? 'block' : 'none' } }, _this2.getInputElement() )]; } } else { var selectedValueNodes = []; var limitedCountValue = value; var maxTagPlaceholderEl = void 0; if (maxTagCount !== undefined && value.length > maxTagCount) { limitedCountValue = limitedCountValue.slice(0, maxTagCount); var omittedValues = _this2.getVLForOnChange(value.slice(maxTagCount, value.length)); var content = '+ ' + (value.length - maxTagCount) + ' ...'; if (maxTagPlaceholder) { content = typeof maxTagPlaceholder === 'function' ? maxTagPlaceholder(omittedValues) : maxTagPlaceholder; } maxTagPlaceholderEl = react_default.a.createElement( 'li', extends_default()({ style: UNSELECTABLE_STYLE }, UNSELECTABLE_ATTRIBUTE, { onMouseDown: preventDefaultEvent, className: prefixCls + '-selection__choice ' + prefixCls + '-selection__choice__disabled', key: 'maxTagPlaceholder', title: toTitle(content) }), react_default.a.createElement( 'div', { className: prefixCls + '-selection__choice__content' }, content ) ); } if (isMultipleOrTags(props)) { selectedValueNodes = limitedCountValue.map(function (singleValue) { var info = _this2.getOptionInfoBySingleValue(singleValue); var content = info.label; var title = info.title || content; if (maxTagTextLength && typeof content === 'string' && content.length > maxTagTextLength) { content = content.slice(0, maxTagTextLength) + '...'; } var disabled = _this2.isChildDisabled(singleValue); var choiceClassName = disabled ? prefixCls + '-selection__choice ' + prefixCls + '-selection__choice__disabled' : prefixCls + '-selection__choice'; return react_default.a.createElement( 'li', extends_default()({ style: UNSELECTABLE_STYLE }, UNSELECTABLE_ATTRIBUTE, { onMouseDown: preventDefaultEvent, className: choiceClassName, key: singleValue, title: toTitle(title) }), react_default.a.createElement( 'div', { className: prefixCls + '-selection__choice__content' }, content ), disabled ? null : react_default.a.createElement('span', { className: prefixCls + '-selection__choice__remove', onClick: function onClick(event) { _this2.removeSelected(singleValue, event); } }) ); }); } if (maxTagPlaceholderEl) { selectedValueNodes.push(maxTagPlaceholderEl); } selectedValueNodes.push(react_default.a.createElement( 'li', { className: prefixCls + '-search ' + prefixCls + '-search--inline', key: '__input' }, _this2.getInputElement() )); if (isMultipleOrTags(props) && choiceTransitionName) { innerNode = react_default.a.createElement( es_Animate, { onLeave: _this2.onChoiceAnimationLeave, component: 'ul', transitionName: choiceTransitionName }, selectedValueNodes ); } else { innerNode = react_default.a.createElement( 'ul', null, selectedValueNodes ); } } return react_default.a.createElement( 'div', { className: className, ref: _this2.saveTopCtrlRef }, _this2.getPlaceholderElement(), innerNode ); }; }; Select_Select.displayName = 'Select'; polyfill(Select_Select); /* harmony default export */ var es_Select = (Select_Select); // CONCATENATED MODULE: ../node_modules/rc-select/es/OptGroup.js var OptGroup_OptGroup = function (_React$Component) { inherits_default()(OptGroup, _React$Component); function OptGroup() { classCallCheck_default()(this, OptGroup); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } return OptGroup; }(react_default.a.Component); OptGroup_OptGroup.isSelectOptGroup = true; /* harmony default export */ var es_OptGroup = (OptGroup_OptGroup); // CONCATENATED MODULE: ../node_modules/rc-select/es/index.js es_Select.Option = es_Option; es_Select.OptGroup = es_OptGroup; /* harmony default export */ var rc_select_es = (es_Select); // CONCATENATED MODULE: ../node_modules/antd/es/select/index.js var select___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var select_SelectPropTypes = { prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, size: prop_types_default.a.oneOf(['default', 'large', 'small']), notFoundContent: prop_types_default.a.any, showSearch: prop_types_default.a.bool, optionLabelProp: prop_types_default.a.string, transitionName: prop_types_default.a.string, choiceTransitionName: prop_types_default.a.string, id: prop_types_default.a.string }; // => It is needless to export the declaration of below two inner components. // export { Option, OptGroup }; var select_Select = function (_React$Component) { inherits_default()(Select, _React$Component); function Select(props) { classCallCheck_default()(this, Select); var _this = possibleConstructorReturn_default()(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props)); _this.saveSelect = function (node) { _this.rcSelect = node; }; _this.renderSelect = function (locale) { var _classNames; var _a = _this.props, prefixCls = _a.prefixCls, _a$className = _a.className, className = _a$className === undefined ? '' : _a$className, size = _a.size, mode = _a.mode, restProps = select___rest(_a, ["prefixCls", "className", "size", "mode"]); var cls = classnames_default()((_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-lg', size === 'large'), defineProperty_default()(_classNames, prefixCls + '-sm', size === 'small'), _classNames), className); var optionLabelProp = _this.props.optionLabelProp; if (_this.isCombobox()) { // children 带 dom 结构时,无法填入输入框 optionLabelProp = optionLabelProp || 'value'; } var modeConfig = { multiple: mode === 'multiple', tags: mode === 'tags', combobox: _this.isCombobox() }; return react["createElement"](rc_select_es, extends_default()({}, restProps, modeConfig, { prefixCls: prefixCls, className: cls, optionLabelProp: optionLabelProp || 'children', notFoundContent: _this.getNotFoundContent(locale), ref: _this.saveSelect })); }; warning_default()(props.mode !== 'combobox', 'The combobox mode of Select is deprecated,' + 'it will be removed in next major version,' + 'please use AutoComplete instead'); return _this; } createClass_default()(Select, [{ key: 'focus', value: function focus() { this.rcSelect.focus(); } }, { key: 'blur', value: function blur() { this.rcSelect.blur(); } }, { key: 'getNotFoundContent', value: function getNotFoundContent(locale) { var notFoundContent = this.props.notFoundContent; if (this.isCombobox()) { // AutoComplete don't have notFoundContent defaultly return notFoundContent === undefined ? null : notFoundContent; } return notFoundContent === undefined ? locale.notFoundContent : notFoundContent; } }, { key: 'isCombobox', value: function isCombobox() { var mode = this.props.mode; return mode === 'combobox' || mode === Select.SECRET_COMBOBOX_MODE_DO_NOT_USE; } }, { key: 'render', value: function render() { return react["createElement"]( locale_provider_LocaleReceiver, { componentName: 'Select', defaultLocale: locale_provider_default.Select }, this.renderSelect ); } }]); return Select; }(react["Component"]); /* harmony default export */ var es_select = (select_Select); select_Select.Option = es_Option; select_Select.OptGroup = es_OptGroup; select_Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE'; select_Select.defaultProps = { prefixCls: 'ant-select', showSearch: false, transitionName: 'slide-up', choiceTransitionName: 'zoom' }; select_Select.propTypes = select_SelectPropTypes; // CONCATENATED MODULE: ../node_modules/antd/es/pagination/MiniSelect.js var MiniSelect_MiniSelect = function (_React$Component) { inherits_default()(MiniSelect, _React$Component); function MiniSelect() { classCallCheck_default()(this, MiniSelect); return possibleConstructorReturn_default()(this, (MiniSelect.__proto__ || Object.getPrototypeOf(MiniSelect)).apply(this, arguments)); } createClass_default()(MiniSelect, [{ key: 'render', value: function render() { return react["createElement"](es_select, extends_default()({ size: 'small' }, this.props)); } }]); return MiniSelect; }(react["Component"]); /* harmony default export */ var pagination_MiniSelect = (MiniSelect_MiniSelect); MiniSelect_MiniSelect.Option = es_select.Option; // CONCATENATED MODULE: ../node_modules/antd/es/pagination/Pagination.js var Pagination___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var pagination_Pagination_Pagination = function (_React$Component) { inherits_default()(Pagination, _React$Component); function Pagination() { classCallCheck_default()(this, Pagination); var _this = possibleConstructorReturn_default()(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).apply(this, arguments)); _this.renderPagination = function (contextLocale) { var _a = _this.props, className = _a.className, size = _a.size, customLocale = _a.locale, restProps = Pagination___rest(_a, ["className", "size", "locale"]); var locale = extends_default()({}, contextLocale, customLocale); var isSmall = size === 'small'; return react["createElement"](es_Pagination, extends_default()({}, restProps, { className: classnames_default()(className, { mini: isSmall }), selectComponentClass: isSmall ? pagination_MiniSelect : es_select, locale: locale })); }; return _this; } createClass_default()(Pagination, [{ key: 'render', value: function render() { return react["createElement"]( locale_provider_LocaleReceiver, { componentName: 'Pagination', defaultLocale: en_US }, this.renderPagination ); } }]); return Pagination; }(react["Component"]); /* harmony default export */ var pagination_Pagination = (pagination_Pagination_Pagination); pagination_Pagination_Pagination.defaultProps = { prefixCls: 'ant-pagination', selectPrefixCls: 'ant-select' }; // CONCATENATED MODULE: ../node_modules/antd/es/pagination/index.js /* harmony default export */ var es_pagination = (pagination_Pagination); // CONCATENATED MODULE: ../node_modules/antd/es/spin/index.js var spin___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; // Render indicator var defaultIndicator = null; function renderIndicator(props) { var prefixCls = props.prefixCls, indicator = props.indicator; var dotClassName = prefixCls + '-dot'; if (react["isValidElement"](indicator)) { return react["cloneElement"](indicator, { className: classnames_default()(indicator.props.className, dotClassName) }); } if (react["isValidElement"](defaultIndicator)) { return react["cloneElement"](defaultIndicator, { className: classnames_default()(defaultIndicator.props.className, dotClassName) }); } return react["createElement"]( 'span', { className: classnames_default()(dotClassName, prefixCls + '-dot-spin') }, react["createElement"]('i', null), react["createElement"]('i', null), react["createElement"]('i', null), react["createElement"]('i', null) ); } var spin_Spin = function (_React$Component) { inherits_default()(Spin, _React$Component); function Spin(props) { classCallCheck_default()(this, Spin); var _this = possibleConstructorReturn_default()(this, (Spin.__proto__ || Object.getPrototypeOf(Spin)).call(this, props)); var spinning = props.spinning; _this.state = { spinning: spinning }; return _this; } createClass_default()(Spin, [{ key: 'isNestedPattern', value: function isNestedPattern() { return !!(this.props && this.props.children); } }, { key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; var _props = this.props, spinning = _props.spinning, delay = _props.delay; if (spinning && delay && !isNaN(Number(delay))) { this.setState({ spinning: false }); this.delayTimeout = window.setTimeout(function () { return _this2.setState({ spinning: spinning }); }, delay); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.debounceTimeout) { clearTimeout(this.debounceTimeout); } if (this.delayTimeout) { clearTimeout(this.delayTimeout); } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var _this3 = this; var currentSpinning = this.props.spinning; var spinning = nextProps.spinning; var delay = this.props.delay; if (this.debounceTimeout) { clearTimeout(this.debounceTimeout); } if (currentSpinning && !spinning) { this.debounceTimeout = window.setTimeout(function () { return _this3.setState({ spinning: spinning }); }, 200); if (this.delayTimeout) { clearTimeout(this.delayTimeout); } } else { if (spinning && delay && !isNaN(Number(delay))) { if (this.delayTimeout) { clearTimeout(this.delayTimeout); } this.delayTimeout = window.setTimeout(function () { return _this3.setState({ spinning: spinning }); }, delay); } else { this.setState({ spinning: spinning }); } } } }, { key: 'render', value: function render() { var _classNames; var _a = this.props, className = _a.className, size = _a.size, prefixCls = _a.prefixCls, tip = _a.tip, wrapperClassName = _a.wrapperClassName, restProps = spin___rest(_a, ["className", "size", "prefixCls", "tip", "wrapperClassName"]);var spinning = this.state.spinning; var spinClassName = classnames_default()(prefixCls, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-sm', size === 'small'), defineProperty_default()(_classNames, prefixCls + '-lg', size === 'large'), defineProperty_default()(_classNames, prefixCls + '-spinning', spinning), defineProperty_default()(_classNames, prefixCls + '-show-text', !!tip), _classNames), className); // fix https://fb.me/react-unknown-prop var divProps = omit_js_es(restProps, ['spinning', 'delay', 'indicator']); var spinElement = react["createElement"]( 'div', extends_default()({}, divProps, { className: spinClassName }), renderIndicator(this.props), tip ? react["createElement"]( 'div', { className: prefixCls + '-text' }, tip ) : null ); if (this.isNestedPattern()) { var _classNames2; var animateClassName = prefixCls + '-nested-loading'; if (wrapperClassName) { animateClassName += ' ' + wrapperClassName; } var containerClassName = classnames_default()((_classNames2 = {}, defineProperty_default()(_classNames2, prefixCls + '-container', true), defineProperty_default()(_classNames2, prefixCls + '-blur', spinning), _classNames2)); return react["createElement"]( es_Animate, extends_default()({}, divProps, { component: 'div', className: animateClassName, style: null, transitionName: 'fade' }), spinning && react["createElement"]( 'div', { key: 'loading' }, spinElement ), react["createElement"]( 'div', { className: containerClassName, key: 'container' }, this.props.children ) ); } return spinElement; } }], [{ key: 'setDefaultIndicator', value: function setDefaultIndicator(indicator) { defaultIndicator = indicator; } }]); return Spin; }(react["Component"]); spin_Spin.defaultProps = { prefixCls: 'ant-spin', spinning: true, size: 'default', wrapperClassName: '' }; spin_Spin.propTypes = { prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, spinning: prop_types_default.a.bool, size: prop_types_default.a.oneOf(['small', 'default', 'large']), wrapperClassName: prop_types_default.a.string, indicator: prop_types_default.a.node }; /* harmony default export */ var es_spin = (spin_Spin); // CONCATENATED MODULE: ../node_modules/rc-menu/es/util.js function es_util_noop() {} function util_getKeyFromChildrenIndex(child, menuEventKey, index) { var prefix = menuEventKey || ''; return child.key || prefix + 'item_' + index; } function util_getMenuIdFromSubMenuEventKey(eventKey) { return eventKey + '-menu-'; } function util_loopMenuItem(children, cb) { var index = -1; react_default.a.Children.forEach(children, function (c) { index++; if (c && c.type && c.type.isMenuItemGroup) { react_default.a.Children.forEach(c.props.children, function (c2) { index++; cb(c2, index); }); } else { cb(c, index); } }); } function util_loopMenuItemRecursively(children, keys, ret) { /* istanbul ignore if */ if (!children || ret.find) { return; } react_default.a.Children.forEach(children, function (c) { if (c) { var construct = c.type; if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) { return; } if (keys.indexOf(c.key) !== -1) { ret.find = true; } else if (c.props.children) { util_loopMenuItemRecursively(c.props.children, keys, ret); } } }); } var util_menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', // the following keys found need to be removed from test regression 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme']; // CONCATENATED MODULE: ../node_modules/rc-menu/es/DOMWrap.js var es_DOMWrap_DOMWrap = function (_React$Component) { inherits_default()(DOMWrap, _React$Component); function DOMWrap() { classCallCheck_default()(this, DOMWrap); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } DOMWrap.prototype.render = function render() { var props = extends_default()({}, this.props); if (!props.visible) { props.className += ' ' + props.hiddenClassName; } var Tag = props.tag; delete props.tag; delete props.hiddenClassName; delete props.visible; return react_default.a.createElement(Tag, props); }; return DOMWrap; }(react_default.a.Component); es_DOMWrap_DOMWrap.propTypes = { tag: prop_types_default.a.string, hiddenClassName: prop_types_default.a.string, visible: prop_types_default.a.bool }; es_DOMWrap_DOMWrap.defaultProps = { tag: 'div', className: '' }; /* harmony default export */ var rc_menu_es_DOMWrap = (es_DOMWrap_DOMWrap); // CONCATENATED MODULE: ../node_modules/rc-menu/es/SubPopupMenu.js function SubPopupMenu_allDisabled(arr) { if (!arr.length) { return true; } return arr.every(function (c) { return !!c.props.disabled; }); } function SubPopupMenu_updateActiveKey(store, menuId, activeKey) { var _extends2; var state = store.getState(); store.setState({ activeKey: extends_default()({}, state.activeKey, (_extends2 = {}, _extends2[menuId] = activeKey, _extends2)) }); } function es_SubPopupMenu_getActiveKey(props, originalActiveKey) { var activeKey = originalActiveKey; var children = props.children, eventKey = props.eventKey; if (activeKey) { var found = void 0; util_loopMenuItem(children, function (c, i) { if (c && !c.props.disabled && activeKey === util_getKeyFromChildrenIndex(c, eventKey, i)) { found = true; } }); if (found) { return activeKey; } } activeKey = null; if (props.defaultActiveFirst) { util_loopMenuItem(children, function (c, i) { if (!activeKey && c && !c.props.disabled) { activeKey = util_getKeyFromChildrenIndex(c, eventKey, i); } }); return activeKey; } return activeKey; } function es_SubPopupMenu_saveRef(c) { if (c) { var index = this.instanceArray.indexOf(c); if (index !== -1) { // update component if it's already inside instanceArray this.instanceArray[index] = c; } else { // add component if it's not in instanceArray yet; this.instanceArray.push(c); } } } var es_SubPopupMenu_SubPopupMenu = function (_React$Component) { inherits_default()(SubPopupMenu, _React$Component); function SubPopupMenu(props) { var _extends3; classCallCheck_default()(this, SubPopupMenu); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); es_SubPopupMenu__initialiseProps.call(_this); props.store.setState({ activeKey: extends_default()({}, props.store.getState().activeKey, (_extends3 = {}, _extends3[props.eventKey] = es_SubPopupMenu_getActiveKey(props, props.activeKey), _extends3)) }); return _this; } SubPopupMenu.prototype.componentWillMount = function componentWillMount() { this.instanceArray = []; }; SubPopupMenu.prototype.componentDidMount = function componentDidMount() { // invoke customized ref to expose component to mixin if (this.props.manualRef) { this.props.manualRef(this); } }; SubPopupMenu.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var originalActiveKey = 'activeKey' in nextProps ? nextProps.activeKey : this.getStore().getState().activeKey[this.getEventKey()]; var activeKey = es_SubPopupMenu_getActiveKey(nextProps, originalActiveKey); if (activeKey !== originalActiveKey) { SubPopupMenu_updateActiveKey(this.getStore(), this.getEventKey(), activeKey); } }; SubPopupMenu.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible; }; // all keyboard events callbacks run from here at first SubPopupMenu.prototype.render = function render() { var _this2 = this; var props = objectWithoutProperties_default()(this.props, []); this.instanceArray = []; var className = classnames_default()(props.prefixCls, props.className, props.prefixCls + '-' + props.mode); var domProps = { className: className, // role could be 'select' and by default set to menu role: props.role || 'menu' }; if (props.id) { domProps.id = props.id; } if (props.focusable) { domProps.tabIndex = '0'; domProps.onKeyDown = this.onKeyDown; } var prefixCls = props.prefixCls, eventKey = props.eventKey, visible = props.visible; util_menuAllProps.forEach(function (key) { return delete props[key]; }); // Otherwise, the propagated click event will trigger another onClick delete props.onClick; return ( // ESLint is not smart enough to know that the type of `children` was checked. /* eslint-disable */ react_default.a.createElement( rc_menu_es_DOMWrap, extends_default()({}, props, { tag: 'ul', hiddenClassName: prefixCls + '-hidden', visible: visible }, domProps), react_default.a.Children.map(props.children, function (c, i) { return _this2.renderMenuItem(c, i, eventKey || '0-menu-'); }) ) /*eslint-enable */ ); }; return SubPopupMenu; }(react_default.a.Component); es_SubPopupMenu_SubPopupMenu.propTypes = { onSelect: prop_types_default.a.func, onClick: prop_types_default.a.func, onDeselect: prop_types_default.a.func, onOpenChange: prop_types_default.a.func, onDestroy: prop_types_default.a.func, openTransitionName: prop_types_default.a.string, openAnimation: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), openKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), visible: prop_types_default.a.bool, children: prop_types_default.a.any, parentMenu: prop_types_default.a.object, eventKey: prop_types_default.a.string, store: prop_types_default.a.shape({ getState: prop_types_default.a.func, setState: prop_types_default.a.func }), // adding in refactor focusable: prop_types_default.a.bool, multiple: prop_types_default.a.bool, style: prop_types_default.a.object, defaultActiveFirst: prop_types_default.a.bool, activeKey: prop_types_default.a.string, selectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultSelectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultOpenKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), level: prop_types_default.a.number, mode: prop_types_default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), triggerSubMenuAction: prop_types_default.a.oneOf(['click', 'hover']), inlineIndent: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]), manualRef: prop_types_default.a.func }; es_SubPopupMenu_SubPopupMenu.defaultProps = { prefixCls: 'rc-menu', className: '', mode: 'vertical', level: 1, inlineIndent: 24, visible: true, focusable: true, style: {}, manualRef: es_util_noop }; var es_SubPopupMenu__initialiseProps = function _initialiseProps() { var _this3 = this; this.onKeyDown = function (e, callback) { var keyCode = e.keyCode; var handled = void 0; _this3.getFlatInstanceArray().forEach(function (obj) { if (obj && obj.props.active && obj.onKeyDown) { handled = obj.onKeyDown(e); } }); if (handled) { return 1; } var activeItem = null; if (keyCode === es_KeyCode.UP || keyCode === es_KeyCode.DOWN) { activeItem = _this3.step(keyCode === es_KeyCode.UP ? -1 : 1); } if (activeItem) { e.preventDefault(); SubPopupMenu_updateActiveKey(_this3.getStore(), _this3.getEventKey(), activeItem.props.eventKey); if (typeof callback === 'function') { callback(activeItem); } return 1; } }; this.onItemHover = function (e) { var key = e.key, hover = e.hover; SubPopupMenu_updateActiveKey(_this3.getStore(), _this3.getEventKey(), hover ? key : null); }; this.onDeselect = function (selectInfo) { _this3.props.onDeselect(selectInfo); }; this.onSelect = function (selectInfo) { _this3.props.onSelect(selectInfo); }; this.onClick = function (e) { _this3.props.onClick(e); }; this.onOpenChange = function (e) { _this3.props.onOpenChange(e); }; this.onDestroy = function (key) { /* istanbul ignore next */ _this3.props.onDestroy(key); }; this.getFlatInstanceArray = function () { return _this3.instanceArray; }; this.getStore = function () { return _this3.props.store; }; this.getEventKey = function () { // when eventKey not available ,it's menu and return menu id '0-menu-' return _this3.props.eventKey || '0-menu-'; }; this.getOpenTransitionName = function () { return _this3.props.openTransitionName; }; this.step = function (direction) { var children = _this3.getFlatInstanceArray(); var activeKey = _this3.getStore().getState().activeKey[_this3.getEventKey()]; var len = children.length; if (!len) { return null; } if (direction < 0) { children = children.concat().reverse(); } // find current activeIndex var activeIndex = -1; children.every(function (c, ci) { if (c && c.props.eventKey === activeKey) { activeIndex = ci; return false; } return true; }); if (!_this3.props.defaultActiveFirst && activeIndex !== -1 && SubPopupMenu_allDisabled(children.slice(activeIndex, len - 1))) { return undefined; } var start = (activeIndex + 1) % len; var i = start; do { var child = children[i]; if (!child || child.props.disabled) { i = (i + 1) % len; } else { return child; } } while (i !== start); return null; }; this.renderCommonMenuItem = function (child, i, extraProps) { var state = _this3.getStore().getState(); var props = _this3.props; var key = util_getKeyFromChildrenIndex(child, props.eventKey, i); var childProps = child.props; var isActive = key === state.activeKey; var newChildProps = extends_default()({ mode: props.mode, level: props.level, inlineIndent: props.inlineIndent, renderMenuItem: _this3.renderMenuItem, rootPrefixCls: props.prefixCls, index: i, parentMenu: props.parentMenu, // customized ref function, need to be invoked manually in child's componentDidMount manualRef: childProps.disabled ? undefined : createChainedFunction(child.ref, es_SubPopupMenu_saveRef.bind(_this3)), eventKey: key, active: !childProps.disabled && isActive, multiple: props.multiple, onClick: function onClick(e) { (childProps.onClick || es_util_noop)(e); _this3.onClick(e); }, onItemHover: _this3.onItemHover, openTransitionName: _this3.getOpenTransitionName(), openAnimation: props.openAnimation, subMenuOpenDelay: props.subMenuOpenDelay, subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, onOpenChange: _this3.onOpenChange, onDeselect: _this3.onDeselect, onSelect: _this3.onSelect }, extraProps); if (props.mode === 'inline') { newChildProps.triggerSubMenuAction = 'click'; } return react_default.a.cloneElement(child, newChildProps); }; this.renderMenuItem = function (c, i, subMenuKey) { /* istanbul ignore if */ if (!c) { return null; } var state = _this3.getStore().getState(); var extraProps = { openKeys: state.openKeys, selectedKeys: state.selectedKeys, triggerSubMenuAction: _this3.props.triggerSubMenuAction, subMenuKey: subMenuKey }; return _this3.renderCommonMenuItem(c, i, extraProps); }; }; /* harmony default export */ var rc_menu_es_SubPopupMenu = (Object(mini_store_lib["connect"])()(es_SubPopupMenu_SubPopupMenu)); // CONCATENATED MODULE: ../node_modules/rc-menu/es/Menu.js var es_Menu_Menu = function (_React$Component) { inherits_default()(Menu, _React$Component); function Menu(props) { classCallCheck_default()(this, Menu); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); es_Menu__initialiseProps.call(_this); _this.isRootMenu = true; var selectedKeys = props.defaultSelectedKeys; var openKeys = props.defaultOpenKeys; if ('selectedKeys' in props) { selectedKeys = props.selectedKeys || []; } if ('openKeys' in props) { openKeys = props.openKeys || []; } _this.store = Object(mini_store_lib["create"])({ selectedKeys: selectedKeys, openKeys: openKeys, activeKey: { '0-menu-': es_SubPopupMenu_getActiveKey(props, props.activeKey) } }); return _this; } Menu.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if ('selectedKeys' in nextProps) { this.store.setState({ selectedKeys: nextProps.selectedKeys || [] }); } if ('openKeys' in nextProps) { this.store.setState({ openKeys: nextProps.openKeys || [] }); } }; // onKeyDown needs to be exposed as a instance method // e.g., in rc-select, we need to navigate menu item while // current active item is rc-select input box rather than the menu itself Menu.prototype.render = function render() { var _this2 = this; var props = objectWithoutProperties_default()(this.props, []); props.className += ' ' + props.prefixCls + '-root'; props = extends_default()({}, props, { onClick: this.onClick, onOpenChange: this.onOpenChange, onDeselect: this.onDeselect, onSelect: this.onSelect, openTransitionName: this.getOpenTransitionName(), parentMenu: this }); return react_default.a.createElement( mini_store_lib["Provider"], { store: this.store }, react_default.a.createElement( rc_menu_es_SubPopupMenu, extends_default()({}, props, { ref: function ref(c) { return _this2.innerMenu = c; } }), this.props.children ) ); }; return Menu; }(react_default.a.Component); es_Menu_Menu.propTypes = { defaultSelectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultActiveFirst: prop_types_default.a.bool, selectedKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), defaultOpenKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), openKeys: prop_types_default.a.arrayOf(prop_types_default.a.string), mode: prop_types_default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), getPopupContainer: prop_types_default.a.func, onClick: prop_types_default.a.func, onSelect: prop_types_default.a.func, onDeselect: prop_types_default.a.func, onDestroy: prop_types_default.a.func, openTransitionName: prop_types_default.a.string, openAnimation: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), subMenuOpenDelay: prop_types_default.a.number, subMenuCloseDelay: prop_types_default.a.number, forceSubMenuRender: prop_types_default.a.bool, triggerSubMenuAction: prop_types_default.a.string, level: prop_types_default.a.number, selectable: prop_types_default.a.bool, multiple: prop_types_default.a.bool, children: prop_types_default.a.any, className: prop_types_default.a.string, style: prop_types_default.a.object, activeKey: prop_types_default.a.string, prefixCls: prop_types_default.a.string }; es_Menu_Menu.defaultProps = { selectable: true, onClick: es_util_noop, onSelect: es_util_noop, onOpenChange: es_util_noop, onDeselect: es_util_noop, defaultSelectedKeys: [], defaultOpenKeys: [], subMenuOpenDelay: 0.1, subMenuCloseDelay: 0.1, triggerSubMenuAction: 'hover', prefixCls: 'rc-menu', className: '', mode: 'vertical', style: {} }; var es_Menu__initialiseProps = function _initialiseProps() { var _this3 = this; this.onSelect = function (selectInfo) { var props = _this3.props; if (props.selectable) { // root menu var selectedKeys = _this3.store.getState().selectedKeys; var selectedKey = selectInfo.key; if (props.multiple) { selectedKeys = selectedKeys.concat([selectedKey]); } else { selectedKeys = [selectedKey]; } if (!('selectedKeys' in props)) { _this3.store.setState({ selectedKeys: selectedKeys }); } props.onSelect(extends_default()({}, selectInfo, { selectedKeys: selectedKeys })); } }; this.onClick = function (e) { _this3.props.onClick(e); }; this.onKeyDown = function (e, callback) { _this3.innerMenu.getWrappedInstance().onKeyDown(e, callback); }; this.onOpenChange = function (event) { var props = _this3.props; var openKeys = _this3.store.getState().openKeys.concat(); var changed = false; var processSingle = function processSingle(e) { var oneChanged = false; if (e.open) { oneChanged = openKeys.indexOf(e.key) === -1; if (oneChanged) { openKeys.push(e.key); } } else { var index = openKeys.indexOf(e.key); oneChanged = index !== -1; if (oneChanged) { openKeys.splice(index, 1); } } changed = changed || oneChanged; }; if (Array.isArray(event)) { // batch change call event.forEach(processSingle); } else { processSingle(event); } if (changed) { if (!('openKeys' in _this3.props)) { _this3.store.setState({ openKeys: openKeys }); } props.onOpenChange(openKeys); } }; this.onDeselect = function (selectInfo) { var props = _this3.props; if (props.selectable) { var selectedKeys = _this3.store.getState().selectedKeys.concat(); var selectedKey = selectInfo.key; var index = selectedKeys.indexOf(selectedKey); if (index !== -1) { selectedKeys.splice(index, 1); } if (!('selectedKeys' in props)) { _this3.store.setState({ selectedKeys: selectedKeys }); } props.onDeselect(extends_default()({}, selectInfo, { selectedKeys: selectedKeys })); } }; this.getOpenTransitionName = function () { var props = _this3.props; var transitionName = props.openTransitionName; var animationName = props.openAnimation; if (!transitionName && typeof animationName === 'string') { transitionName = props.prefixCls + '-open-' + animationName; } return transitionName; }; }; /* harmony default export */ var rc_menu_es_Menu = (es_Menu_Menu); // CONCATENATED MODULE: ../node_modules/rc-menu/es/placements.js var es_placements_autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var placements_placements = { topLeft: { points: ['bl', 'tl'], overflow: es_placements_autoAdjustOverflow, offset: [0, -7] }, bottomLeft: { points: ['tl', 'bl'], overflow: es_placements_autoAdjustOverflow, offset: [0, 7] }, leftTop: { points: ['tr', 'tl'], overflow: es_placements_autoAdjustOverflow, offset: [-4, 0] }, rightTop: { points: ['tl', 'tr'], overflow: es_placements_autoAdjustOverflow, offset: [4, 0] } }; /* harmony default export */ var rc_menu_es_placements = (placements_placements); // CONCATENATED MODULE: ../node_modules/rc-menu/es/SubMenu.js var SubMenu_guid = 0; var SubMenu_popupPlacementMap = { horizontal: 'bottomLeft', vertical: 'rightTop', 'vertical-left': 'rightTop', 'vertical-right': 'leftTop' }; var es_SubMenu_updateDefaultActiveFirst = function updateDefaultActiveFirst(store, eventKey, defaultActiveFirst) { var _extends2; var menuId = util_getMenuIdFromSubMenuEventKey(eventKey); var state = store.getState(); store.setState({ defaultActiveFirst: extends_default()({}, state.defaultActiveFirst, (_extends2 = {}, _extends2[menuId] = defaultActiveFirst, _extends2)) }); }; var es_SubMenu_SubMenu = function (_React$Component) { inherits_default()(SubMenu, _React$Component); function SubMenu(props) { classCallCheck_default()(this, SubMenu); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); es_SubMenu__initialiseProps.call(_this); var store = props.store; var eventKey = props.eventKey; var defaultActiveFirst = store.getState().defaultActiveFirst; _this.isRootMenu = false; var value = false; if (defaultActiveFirst) { value = defaultActiveFirst[eventKey]; } es_SubMenu_updateDefaultActiveFirst(store, eventKey, value); return _this; } SubMenu.prototype.componentDidMount = function componentDidMount() { this.componentDidUpdate(); }; SubMenu.prototype.componentDidUpdate = function componentDidUpdate() { var _this2 = this; var _props = this.props, mode = _props.mode, parentMenu = _props.parentMenu, manualRef = _props.manualRef; // invoke customized ref to expose component to mixin if (manualRef) { manualRef(this); } if (mode !== 'horizontal' || !parentMenu.isRootMenu || !this.props.isOpen) { return; } this.minWidthTimeout = setTimeout(function () { return _this2.adjustWidth(); }, 0); }; SubMenu.prototype.componentWillUnmount = function componentWillUnmount() { var _props2 = this.props, onDestroy = _props2.onDestroy, eventKey = _props2.eventKey; if (onDestroy) { onDestroy(eventKey); } /* istanbul ignore if */ if (this.minWidthTimeout) { clearTimeout(this.minWidthTimeout); } /* istanbul ignore if */ if (this.mouseenterTimeout) { clearTimeout(this.mouseenterTimeout); } }; SubMenu.prototype.renderChildren = function renderChildren(children) { var props = this.props; var baseProps = { mode: props.mode === 'horizontal' ? 'vertical' : props.mode, visible: this.props.isOpen, level: props.level + 1, inlineIndent: props.inlineIndent, focusable: false, onClick: this.onSubMenuClick, onSelect: this.onSelect, onDeselect: this.onDeselect, onDestroy: this.onDestroy, selectedKeys: props.selectedKeys, eventKey: props.eventKey + '-menu-', openKeys: props.openKeys, openTransitionName: props.openTransitionName, openAnimation: props.openAnimation, onOpenChange: this.onOpenChange, subMenuOpenDelay: props.subMenuOpenDelay, parentMenu: this, subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, triggerSubMenuAction: props.triggerSubMenuAction, defaultActiveFirst: props.store.getState().defaultActiveFirst[util_getMenuIdFromSubMenuEventKey(props.eventKey)], multiple: props.multiple, prefixCls: props.rootPrefixCls, id: this._menuId, manualRef: this.saveMenuInstance }; var haveRendered = this.haveRendered; this.haveRendered = true; this.haveOpened = this.haveOpened || baseProps.visible || baseProps.forceSubMenuRender; // never rendered not planning to, don't render if (!this.haveOpened) { return react_default.a.createElement('div', null); } // don't show transition on first rendering (no animation for opened menu) // show appear transition if it's not visible (not sure why) // show appear transition if it's not inline mode var transitionAppear = haveRendered || !baseProps.visible || !baseProps.mode === 'inline'; baseProps.className = ' ' + baseProps.prefixCls + '-sub'; var animProps = {}; if (baseProps.openTransitionName) { animProps.transitionName = baseProps.openTransitionName; } else if (typeof baseProps.openAnimation === 'object') { animProps.animation = extends_default()({}, baseProps.openAnimation); if (!transitionAppear) { delete animProps.animation.appear; } } return react_default.a.createElement( es_Animate, extends_default()({}, animProps, { showProp: 'visible', component: '', transitionAppear: transitionAppear }), react_default.a.createElement( rc_menu_es_SubPopupMenu, extends_default()({}, baseProps, { id: this._menuId }), children ) ); }; SubMenu.prototype.render = function render() { var _classNames; var props = extends_default()({}, this.props); var isOpen = props.isOpen; var prefixCls = this.getPrefixCls(); var isInlineMode = props.mode === 'inline'; var className = classnames_default()(prefixCls, prefixCls + '-' + props.mode, (_classNames = {}, _classNames[props.className] = !!props.className, _classNames[this.getOpenClassName()] = isOpen, _classNames[this.getActiveClassName()] = props.active || isOpen && !isInlineMode, _classNames[this.getDisabledClassName()] = props.disabled, _classNames[this.getSelectedClassName()] = this.isChildrenSelected(), _classNames)); if (!this._menuId) { if (props.eventKey) { this._menuId = props.eventKey + '$Menu'; } else { this._menuId = '$__$' + ++SubMenu_guid + '$Menu'; } } var mouseEvents = {}; var titleClickEvents = {}; var titleMouseEvents = {}; if (!props.disabled) { mouseEvents = { onMouseLeave: this.onMouseLeave, onMouseEnter: this.onMouseEnter }; // only works in title, not outer li titleClickEvents = { onClick: this.onTitleClick }; titleMouseEvents = { onMouseEnter: this.onTitleMouseEnter, onMouseLeave: this.onTitleMouseLeave }; } var style = {}; if (isInlineMode) { style.paddingLeft = props.inlineIndent * props.level; } var ariaOwns = {}; // only set aria-owns when menu is open // otherwise it would be an invalid aria-owns value // since corresponding node cannot be found if (this.props.isOpen) { ariaOwns = { 'aria-owns': this._menuId }; } var title = react_default.a.createElement( 'div', extends_default()({ ref: this.saveSubMenuTitle, style: style, className: prefixCls + '-title' }, titleMouseEvents, titleClickEvents, { 'aria-expanded': isOpen }, ariaOwns, { 'aria-haspopup': 'true', title: typeof props.title === 'string' ? props.title : undefined }), props.title, react_default.a.createElement('i', { className: prefixCls + '-arrow' }) ); var children = this.renderChildren(props.children); var getPopupContainer = props.parentMenu.isRootMenu ? props.parentMenu.props.getPopupContainer : function (triggerNode) { return triggerNode.parentNode; }; var popupPlacement = SubMenu_popupPlacementMap[props.mode]; var popupAlign = props.popupOffset ? { offset: props.popupOffset } : {}; var popupClassName = props.mode === 'inline' ? '' : props.popupClassName; var disabled = props.disabled, triggerSubMenuAction = props.triggerSubMenuAction, subMenuOpenDelay = props.subMenuOpenDelay, forceSubMenuRender = props.forceSubMenuRender, subMenuCloseDelay = props.subMenuCloseDelay; util_menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; return react_default.a.createElement( 'li', extends_default()({}, props, mouseEvents, { className: className, role: 'menuitem' }), isInlineMode && title, isInlineMode && children, !isInlineMode && react_default.a.createElement( rc_trigger_es, { prefixCls: prefixCls, popupClassName: prefixCls + '-popup ' + popupClassName, getPopupContainer: getPopupContainer, builtinPlacements: rc_menu_es_placements, popupPlacement: popupPlacement, popupVisible: isOpen, popupAlign: popupAlign, popup: children, action: disabled ? [] : [triggerSubMenuAction], mouseEnterDelay: subMenuOpenDelay, mouseLeaveDelay: subMenuCloseDelay, onPopupVisibleChange: this.onPopupVisibleChange, forceRender: forceSubMenuRender }, title ) ); }; return SubMenu; }(react_default.a.Component); es_SubMenu_SubMenu.propTypes = { parentMenu: prop_types_default.a.object, title: prop_types_default.a.node, children: prop_types_default.a.any, selectedKeys: prop_types_default.a.array, openKeys: prop_types_default.a.array, onClick: prop_types_default.a.func, onOpenChange: prop_types_default.a.func, rootPrefixCls: prop_types_default.a.string, eventKey: prop_types_default.a.string, multiple: prop_types_default.a.bool, active: prop_types_default.a.bool, // TODO: remove onItemHover: prop_types_default.a.func, onSelect: prop_types_default.a.func, triggerSubMenuAction: prop_types_default.a.string, onDeselect: prop_types_default.a.func, onDestroy: prop_types_default.a.func, onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, onTitleMouseEnter: prop_types_default.a.func, onTitleMouseLeave: prop_types_default.a.func, onTitleClick: prop_types_default.a.func, popupOffset: prop_types_default.a.array, isOpen: prop_types_default.a.bool, store: prop_types_default.a.object, mode: prop_types_default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), manualRef: prop_types_default.a.func }; es_SubMenu_SubMenu.defaultProps = { onMouseEnter: es_util_noop, onMouseLeave: es_util_noop, onTitleMouseEnter: es_util_noop, onTitleMouseLeave: es_util_noop, onTitleClick: es_util_noop, manualRef: es_util_noop, mode: 'vertical', title: '' }; var es_SubMenu__initialiseProps = function _initialiseProps() { var _this3 = this; this.onDestroy = function (key) { _this3.props.onDestroy(key); }; this.onKeyDown = function (e) { var keyCode = e.keyCode; var menu = _this3.menuInstance; var _props3 = _this3.props, isOpen = _props3.isOpen, store = _props3.store; if (keyCode === es_KeyCode.ENTER) { _this3.onTitleClick(e); es_SubMenu_updateDefaultActiveFirst(store, _this3.props.eventKey, true); return true; } if (keyCode === es_KeyCode.RIGHT) { if (isOpen) { menu.onKeyDown(e); } else { _this3.triggerOpenChange(true); // need to update current menu's defaultActiveFirst value es_SubMenu_updateDefaultActiveFirst(store, _this3.props.eventKey, true); } return true; } if (keyCode === es_KeyCode.LEFT) { var handled = void 0; if (isOpen) { handled = menu.onKeyDown(e); } else { return undefined; } if (!handled) { _this3.triggerOpenChange(false); handled = true; } return handled; } if (isOpen && (keyCode === es_KeyCode.UP || keyCode === es_KeyCode.DOWN)) { return menu.onKeyDown(e); } }; this.onOpenChange = function (e) { _this3.props.onOpenChange(e); }; this.onPopupVisibleChange = function (visible) { _this3.triggerOpenChange(visible, visible ? 'mouseenter' : 'mouseleave'); }; this.onMouseEnter = function (e) { var _props4 = _this3.props, key = _props4.eventKey, onMouseEnter = _props4.onMouseEnter, store = _props4.store; es_SubMenu_updateDefaultActiveFirst(store, _this3.props.eventKey, false); onMouseEnter({ key: key, domEvent: e }); }; this.onMouseLeave = function (e) { var _props5 = _this3.props, parentMenu = _props5.parentMenu, eventKey = _props5.eventKey, onMouseLeave = _props5.onMouseLeave; parentMenu.subMenuInstance = _this3; onMouseLeave({ key: eventKey, domEvent: e }); }; this.onTitleMouseEnter = function (domEvent) { var _props6 = _this3.props, key = _props6.eventKey, onItemHover = _props6.onItemHover, onTitleMouseEnter = _props6.onTitleMouseEnter; onItemHover({ key: key, hover: true }); onTitleMouseEnter({ key: key, domEvent: domEvent }); }; this.onTitleMouseLeave = function (e) { var _props7 = _this3.props, parentMenu = _props7.parentMenu, eventKey = _props7.eventKey, onItemHover = _props7.onItemHover, onTitleMouseLeave = _props7.onTitleMouseLeave; parentMenu.subMenuInstance = _this3; onItemHover({ key: eventKey, hover: false }); onTitleMouseLeave({ key: eventKey, domEvent: e }); }; this.onTitleClick = function (e) { var props = _this3.props; props.onTitleClick({ key: props.eventKey, domEvent: e }); if (props.triggerSubMenuAction === 'hover') { return; } _this3.triggerOpenChange(!props.isOpen, 'click'); es_SubMenu_updateDefaultActiveFirst(props.store, _this3.props.eventKey, false); }; this.onSubMenuClick = function (info) { _this3.props.onClick(_this3.addKeyPath(info)); }; this.onSelect = function (info) { _this3.props.onSelect(info); }; this.onDeselect = function (info) { _this3.props.onDeselect(info); }; this.getPrefixCls = function () { return _this3.props.rootPrefixCls + '-submenu'; }; this.getActiveClassName = function () { return _this3.getPrefixCls() + '-active'; }; this.getDisabledClassName = function () { return _this3.getPrefixCls() + '-disabled'; }; this.getSelectedClassName = function () { return _this3.getPrefixCls() + '-selected'; }; this.getOpenClassName = function () { return _this3.props.rootPrefixCls + '-submenu-open'; }; this.saveMenuInstance = function (c) { // children menu instance _this3.menuInstance = c; }; this.addKeyPath = function (info) { return extends_default()({}, info, { keyPath: (info.keyPath || []).concat(_this3.props.eventKey) }); }; this.triggerOpenChange = function (open, type) { var key = _this3.props.eventKey; var openChange = function openChange() { _this3.onOpenChange({ key: key, item: _this3, trigger: type, open: open }); }; if (type === 'mouseenter') { // make sure mouseenter happen after other menu item's mouseleave _this3.mouseenterTimeout = setTimeout(function () { openChange(); }, 0); } else { openChange(); } }; this.isChildrenSelected = function () { var ret = { find: false }; util_loopMenuItemRecursively(_this3.props.children, _this3.props.selectedKeys, ret); return ret.find; }; this.isOpen = function () { return _this3.props.openKeys.indexOf(_this3.props.eventKey) !== -1; }; this.adjustWidth = function () { /* istanbul ignore if */ if (!_this3.subMenuTitle || !_this3.menuInstance) { return; } var popupMenu = react_dom_default.a.findDOMNode(_this3.menuInstance); if (popupMenu.offsetWidth >= _this3.subMenuTitle.offsetWidth) { return; } /* istanbul ignore next */ popupMenu.style.minWidth = _this3.subMenuTitle.offsetWidth + 'px'; }; this.saveSubMenuTitle = function (subMenuTitle) { _this3.subMenuTitle = subMenuTitle; }; }; var SubMenu_connected = Object(mini_store_lib["connect"])(function (_ref, _ref2) { var openKeys = _ref.openKeys, activeKey = _ref.activeKey, selectedKeys = _ref.selectedKeys; var eventKey = _ref2.eventKey, subMenuKey = _ref2.subMenuKey; return { isOpen: openKeys.indexOf(eventKey) > -1, active: activeKey[subMenuKey] === eventKey, selectedKeys: selectedKeys }; })(es_SubMenu_SubMenu); SubMenu_connected.isSubMenu = true; /* harmony default export */ var rc_menu_es_SubMenu = (SubMenu_connected); // CONCATENATED MODULE: ../node_modules/rc-menu/es/MenuItem.js /* eslint react/no-is-mounted:0 */ var es_MenuItem_MenuItem = function (_React$Component) { inherits_default()(MenuItem, _React$Component); function MenuItem(props) { classCallCheck_default()(this, MenuItem); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); _this.onKeyDown = function (e) { var keyCode = e.keyCode; if (keyCode === es_KeyCode.ENTER) { _this.onClick(e); return true; } }; _this.onMouseLeave = function (e) { var _this$props = _this.props, eventKey = _this$props.eventKey, onItemHover = _this$props.onItemHover, onMouseLeave = _this$props.onMouseLeave; onItemHover({ key: eventKey, hover: false }); onMouseLeave({ key: eventKey, domEvent: e }); }; _this.onMouseEnter = function (e) { var _this$props2 = _this.props, eventKey = _this$props2.eventKey, onItemHover = _this$props2.onItemHover, onMouseEnter = _this$props2.onMouseEnter; onItemHover({ key: eventKey, hover: true }); onMouseEnter({ key: eventKey, domEvent: e }); }; _this.onClick = function (e) { var _this$props3 = _this.props, eventKey = _this$props3.eventKey, multiple = _this$props3.multiple, onClick = _this$props3.onClick, onSelect = _this$props3.onSelect, onDeselect = _this$props3.onDeselect, isSelected = _this$props3.isSelected; var info = { key: eventKey, keyPath: [eventKey], item: _this, domEvent: e }; onClick(info); if (multiple) { if (isSelected) { onDeselect(info); } else { onSelect(info); } } else if (!isSelected) { onSelect(info); } }; return _this; } MenuItem.prototype.componentDidMount = function componentDidMount() { // invoke customized ref to expose component to mixin this.callRef(); }; MenuItem.prototype.componentDidUpdate = function componentDidUpdate() { if (this.props.active) { dom_scroll_into_view_lib_default()(react_dom_default.a.findDOMNode(this), react_dom_default.a.findDOMNode(this.props.parentMenu), { onlyScrollIfNeeded: true }); } this.callRef(); }; MenuItem.prototype.componentWillUnmount = function componentWillUnmount() { var props = this.props; if (props.onDestroy) { props.onDestroy(props.eventKey); } }; MenuItem.prototype.getPrefixCls = function getPrefixCls() { return this.props.rootPrefixCls + '-item'; }; MenuItem.prototype.getActiveClassName = function getActiveClassName() { return this.getPrefixCls() + '-active'; }; MenuItem.prototype.getSelectedClassName = function getSelectedClassName() { return this.getPrefixCls() + '-selected'; }; MenuItem.prototype.getDisabledClassName = function getDisabledClassName() { return this.getPrefixCls() + '-disabled'; }; MenuItem.prototype.callRef = function callRef() { if (this.props.manualRef) { this.props.manualRef(this); } }; MenuItem.prototype.render = function render() { var _classNames; var props = extends_default()({}, this.props); var className = classnames_default()(this.getPrefixCls(), props.className, (_classNames = {}, _classNames[this.getActiveClassName()] = !props.disabled && props.active, _classNames[this.getSelectedClassName()] = props.isSelected, _classNames[this.getDisabledClassName()] = props.disabled, _classNames)); var attrs = extends_default()({}, props.attribute, { title: props.title, className: className, // set to menuitem by default role: 'menuitem', 'aria-disabled': props.disabled }); if (props.role === 'option') { // overwrite to option attrs = extends_default()({}, attrs, { role: 'option', 'aria-selected': props.isSelected }); } else if (props.role === null) { // sometimes we want to specify role inside
  • element //
  • Link
  • would be a good example delete attrs.role; } // In case that onClick/onMouseLeave/onMouseEnter is passed down from owner var mouseEvent = { onClick: props.disabled ? null : this.onClick, onMouseLeave: props.disabled ? null : this.onMouseLeave, onMouseEnter: props.disabled ? null : this.onMouseEnter }; var style = extends_default()({}, props.style); if (props.mode === 'inline') { style.paddingLeft = props.inlineIndent * props.level; } util_menuAllProps.forEach(function (key) { return delete props[key]; }); return react_default.a.createElement( 'li', extends_default()({}, props, attrs, mouseEvent, { style: style }), props.children ); }; return MenuItem; }(react_default.a.Component); es_MenuItem_MenuItem.propTypes = { attribute: prop_types_default.a.object, rootPrefixCls: prop_types_default.a.string, eventKey: prop_types_default.a.string, active: prop_types_default.a.bool, children: prop_types_default.a.any, selectedKeys: prop_types_default.a.array, disabled: prop_types_default.a.bool, title: prop_types_default.a.string, onItemHover: prop_types_default.a.func, onSelect: prop_types_default.a.func, onClick: prop_types_default.a.func, onDeselect: prop_types_default.a.func, parentMenu: prop_types_default.a.object, onDestroy: prop_types_default.a.func, onMouseEnter: prop_types_default.a.func, onMouseLeave: prop_types_default.a.func, multiple: prop_types_default.a.bool, isSelected: prop_types_default.a.bool, manualRef: prop_types_default.a.func }; es_MenuItem_MenuItem.defaultProps = { onSelect: es_util_noop, onMouseEnter: es_util_noop, onMouseLeave: es_util_noop, manualRef: es_util_noop }; es_MenuItem_MenuItem.isMenuItem = true; var es_MenuItem_connected = Object(mini_store_lib["connect"])(function (_ref, _ref2) { var activeKey = _ref.activeKey, selectedKeys = _ref.selectedKeys; var eventKey = _ref2.eventKey, subMenuKey = _ref2.subMenuKey; return { active: activeKey[subMenuKey] === eventKey, isSelected: selectedKeys.indexOf(eventKey) !== -1 }; })(es_MenuItem_MenuItem); /* harmony default export */ var rc_menu_es_MenuItem = (es_MenuItem_connected); // CONCATENATED MODULE: ../node_modules/rc-menu/es/MenuItemGroup.js var es_MenuItemGroup_MenuItemGroup = function (_React$Component) { inherits_default()(MenuItemGroup, _React$Component); function MenuItemGroup() { var _temp, _this, _ret; classCallCheck_default()(this, MenuItemGroup); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.renderInnerMenuItem = function (item) { var _this$props = _this.props, renderMenuItem = _this$props.renderMenuItem, index = _this$props.index; return renderMenuItem(item, index, _this.props.subMenuKey); }, _temp), possibleConstructorReturn_default()(_this, _ret); } MenuItemGroup.prototype.render = function render() { var props = objectWithoutProperties_default()(this.props, []); var _props$className = props.className, className = _props$className === undefined ? '' : _props$className, rootPrefixCls = props.rootPrefixCls; var titleClassName = rootPrefixCls + '-item-group-title'; var listClassName = rootPrefixCls + '-item-group-list'; var title = props.title, children = props.children; util_menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; return react_default.a.createElement( 'li', extends_default()({}, props, { className: className + ' ' + rootPrefixCls + '-item-group' }), react_default.a.createElement( 'div', { className: titleClassName, title: typeof title === 'string' ? title : undefined }, title ), react_default.a.createElement( 'ul', { className: listClassName }, react_default.a.Children.map(children, this.renderInnerMenuItem) ) ); }; return MenuItemGroup; }(react_default.a.Component); es_MenuItemGroup_MenuItemGroup.propTypes = { renderMenuItem: prop_types_default.a.func, index: prop_types_default.a.number, className: prop_types_default.a.string, subMenuKey: prop_types_default.a.string, rootPrefixCls: prop_types_default.a.string }; es_MenuItemGroup_MenuItemGroup.defaultProps = { disabled: true }; es_MenuItemGroup_MenuItemGroup.isMenuItemGroup = true; /* harmony default export */ var rc_menu_es_MenuItemGroup = (es_MenuItemGroup_MenuItemGroup); // CONCATENATED MODULE: ../node_modules/rc-menu/es/Divider.js var es_Divider_Divider = function (_React$Component) { inherits_default()(Divider, _React$Component); function Divider() { classCallCheck_default()(this, Divider); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } Divider.prototype.render = function render() { var _props = this.props, _props$className = _props.className, className = _props$className === undefined ? '' : _props$className, rootPrefixCls = _props.rootPrefixCls; return react_default.a.createElement('li', { className: className + ' ' + rootPrefixCls + '-item-divider' }); }; return Divider; }(react_default.a.Component); es_Divider_Divider.propTypes = { className: prop_types_default.a.string, rootPrefixCls: prop_types_default.a.string }; es_Divider_Divider.defaultProps = { // To fix keyboard UX. disabled: true }; /* harmony default export */ var rc_menu_es_Divider = (es_Divider_Divider); // CONCATENATED MODULE: ../node_modules/rc-menu/es/index.js /* harmony default export */ var node_modules_rc_menu_es = (rc_menu_es_Menu); // EXTERNAL MODULE: ../node_modules/dom-closest/index.js var dom_closest = __webpack_require__("ek1V"); var dom_closest_default = /*#__PURE__*/__webpack_require__.n(dom_closest); // CONCATENATED MODULE: ../node_modules/rc-dropdown/es/placements.js var rc_dropdown_es_placements_autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var placements_targetOffset = [0, 0]; var es_placements_placements = { topLeft: { points: ['bl', 'tl'], overflow: rc_dropdown_es_placements_autoAdjustOverflow, offset: [0, -4], targetOffset: placements_targetOffset }, topCenter: { points: ['bc', 'tc'], overflow: rc_dropdown_es_placements_autoAdjustOverflow, offset: [0, -4], targetOffset: placements_targetOffset }, topRight: { points: ['br', 'tr'], overflow: rc_dropdown_es_placements_autoAdjustOverflow, offset: [0, -4], targetOffset: placements_targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: rc_dropdown_es_placements_autoAdjustOverflow, offset: [0, 4], targetOffset: placements_targetOffset }, bottomCenter: { points: ['tc', 'bc'], overflow: rc_dropdown_es_placements_autoAdjustOverflow, offset: [0, 4], targetOffset: placements_targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: rc_dropdown_es_placements_autoAdjustOverflow, offset: [0, 4], targetOffset: placements_targetOffset } }; /* harmony default export */ var rc_dropdown_es_placements = (es_placements_placements); // CONCATENATED MODULE: ../node_modules/rc-dropdown/es/Dropdown.js var Dropdown__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; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Dropdown_Dropdown = function (_Component) { _inherits(Dropdown, _Component); function Dropdown(props) { _classCallCheck(this, Dropdown); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); Dropdown__initialiseProps.call(_this); if ('visible' in props) { _this.state = { visible: props.visible }; } else { _this.state = { visible: props.defaultVisible }; } return _this; } Dropdown.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) { if ('visible' in nextProps) { return { visible: nextProps.visible }; } return null; }; Dropdown.prototype.getMenuElement = function getMenuElement() { var _props = this.props, overlay = _props.overlay, prefixCls = _props.prefixCls; var extraOverlayProps = { prefixCls: prefixCls + '-menu', onClick: this.onClick }; if (typeof overlay.type === 'string') { delete extraOverlayProps.prefixCls; } return react_default.a.cloneElement(overlay, extraOverlayProps); }; Dropdown.prototype.getPopupDomNode = function getPopupDomNode() { return this.trigger.getPopupDomNode(); }; Dropdown.prototype.render = function render() { var _props2 = this.props, prefixCls = _props2.prefixCls, children = _props2.children, transitionName = _props2.transitionName, animation = _props2.animation, align = _props2.align, placement = _props2.placement, getPopupContainer = _props2.getPopupContainer, showAction = _props2.showAction, hideAction = _props2.hideAction, overlayClassName = _props2.overlayClassName, overlayStyle = _props2.overlayStyle, trigger = _props2.trigger, otherProps = _objectWithoutProperties(_props2, ['prefixCls', 'children', 'transitionName', 'animation', 'align', 'placement', 'getPopupContainer', 'showAction', 'hideAction', 'overlayClassName', 'overlayStyle', 'trigger']); var triggerHideAction = hideAction; if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) { triggerHideAction = ['click']; } return react_default.a.createElement( rc_trigger_es, Dropdown__extends({}, otherProps, { prefixCls: prefixCls, ref: this.saveTrigger, popupClassName: overlayClassName, popupStyle: overlayStyle, builtinPlacements: rc_dropdown_es_placements, action: trigger, showAction: showAction, hideAction: triggerHideAction || [], popupPlacement: placement, popupAlign: align, popupTransitionName: transitionName, popupAnimation: animation, popupVisible: this.state.visible, afterPopupVisibleChange: this.afterVisibleChange, popup: this.getMenuElement(), onPopupVisibleChange: this.onVisibleChange, getPopupContainer: getPopupContainer }), children ); }; return Dropdown; }(react["Component"]); Dropdown_Dropdown.propTypes = { minOverlayWidthMatchTrigger: prop_types_default.a.bool, onVisibleChange: prop_types_default.a.func, onOverlayClick: prop_types_default.a.func, prefixCls: prop_types_default.a.string, children: prop_types_default.a.any, transitionName: prop_types_default.a.string, overlayClassName: prop_types_default.a.string, animation: prop_types_default.a.any, align: prop_types_default.a.object, overlayStyle: prop_types_default.a.object, placement: prop_types_default.a.string, overlay: prop_types_default.a.node, trigger: prop_types_default.a.array, alignPoint: prop_types_default.a.bool, showAction: prop_types_default.a.array, hideAction: prop_types_default.a.array, getPopupContainer: prop_types_default.a.func, visible: prop_types_default.a.bool, defaultVisible: prop_types_default.a.bool }; Dropdown_Dropdown.defaultProps = { prefixCls: 'rc-dropdown', trigger: ['hover'], showAction: [], overlayClassName: '', overlayStyle: {}, defaultVisible: false, onVisibleChange: function onVisibleChange() {}, placement: 'bottomLeft' }; var Dropdown__initialiseProps = function _initialiseProps() { var _this2 = this; this.onClick = function (e) { var props = _this2.props; var overlayProps = props.overlay.props; // do no call onVisibleChange, if you need click to hide, use onClick and control visible if (!('visible' in props)) { _this2.setState({ visible: false }); } if (props.onOverlayClick) { props.onOverlayClick(e); } if (overlayProps.onClick) { overlayProps.onClick(e); } }; this.onVisibleChange = function (visible) { var props = _this2.props; if (!('visible' in props)) { _this2.setState({ visible: visible }); } props.onVisibleChange(visible); }; this.getMinOverlayWidthMatchTrigger = function () { var _props3 = _this2.props, minOverlayWidthMatchTrigger = _props3.minOverlayWidthMatchTrigger, alignPoint = _props3.alignPoint; if ('minOverlayWidthMatchTrigger' in _this2.props) { return minOverlayWidthMatchTrigger; } return !alignPoint; }; this.afterVisibleChange = function (visible) { if (visible && _this2.getMinOverlayWidthMatchTrigger()) { var overlayNode = _this2.getPopupDomNode(); var rootNode = react_dom_default.a.findDOMNode(_this2); if (rootNode && overlayNode && rootNode.offsetWidth > overlayNode.offsetWidth) { overlayNode.style.minWidth = rootNode.offsetWidth + 'px'; if (_this2.trigger && _this2.trigger._component && _this2.trigger._component.alignInstance) { _this2.trigger._component.alignInstance.forceAlign(); } } } }; this.saveTrigger = function (node) { _this2.trigger = node; }; }; polyfill(Dropdown_Dropdown); /* harmony default export */ var es_Dropdown = (Dropdown_Dropdown); // CONCATENATED MODULE: ../node_modules/rc-dropdown/es/index.js /* harmony default export */ var rc_dropdown_es = (es_Dropdown); // CONCATENATED MODULE: ../node_modules/antd/es/dropdown/dropdown.js var dropdown_Dropdown = function (_React$Component) { inherits_default()(Dropdown, _React$Component); function Dropdown() { classCallCheck_default()(this, Dropdown); return possibleConstructorReturn_default()(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).apply(this, arguments)); } createClass_default()(Dropdown, [{ key: 'getTransitionName', value: function getTransitionName() { var _props = this.props, _props$placement = _props.placement, placement = _props$placement === undefined ? '' : _props$placement, transitionName = _props.transitionName; if (transitionName !== undefined) { return transitionName; } if (placement.indexOf('top') >= 0) { return 'slide-down'; } return 'slide-up'; } }, { key: 'componentDidMount', value: function componentDidMount() { var overlay = this.props.overlay; if (overlay) { var overlayProps = overlay.props; _util_warning(!overlayProps.mode || overlayProps.mode === 'vertical', 'mode="' + overlayProps.mode + '" is not supported for Dropdown\'s Menu.'); } } }, { key: 'render', value: function render() { var _props2 = this.props, children = _props2.children, prefixCls = _props2.prefixCls, overlayElements = _props2.overlay, trigger = _props2.trigger, disabled = _props2.disabled; var child = react["Children"].only(children); var overlay = react["Children"].only(overlayElements); var dropdownTrigger = react["cloneElement"](child, { className: classnames_default()(child.props.className, prefixCls + '-trigger'), disabled: disabled }); // menu cannot be selectable in dropdown defaultly // menu should be focusable in dropdown defaultly var _overlay$props = overlay.props, _overlay$props$select = _overlay$props.selectable, selectable = _overlay$props$select === undefined ? false : _overlay$props$select, _overlay$props$focusa = _overlay$props.focusable, focusable = _overlay$props$focusa === undefined ? true : _overlay$props$focusa; var fixedModeOverlay = typeof overlay.type === 'string' ? overlay : react["cloneElement"](overlay, { mode: 'vertical', selectable: selectable, focusable: focusable }); var triggerActions = disabled ? [] : trigger; var alignPoint = void 0; if (triggerActions && triggerActions.indexOf('contextMenu') !== -1) { alignPoint = true; } return react["createElement"]( rc_dropdown_es, extends_default()({ alignPoint: alignPoint }, this.props, { transitionName: this.getTransitionName(), trigger: triggerActions, overlay: fixedModeOverlay }), dropdownTrigger ); } }]); return Dropdown; }(react["Component"]); /* harmony default export */ var dropdown = (dropdown_Dropdown); dropdown_Dropdown.defaultProps = { prefixCls: 'ant-dropdown', mouseEnterDelay: 0.15, mouseLeaveDelay: 0.1, placement: 'bottomLeft' }; // CONCATENATED MODULE: ../node_modules/antd/es/dropdown/dropdown-button.js var dropdown_button___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var dropdown_button_ButtonGroup = es_button.Group; var dropdown_button_DropdownButton = function (_React$Component) { inherits_default()(DropdownButton, _React$Component); function DropdownButton() { classCallCheck_default()(this, DropdownButton); return possibleConstructorReturn_default()(this, (DropdownButton.__proto__ || Object.getPrototypeOf(DropdownButton)).apply(this, arguments)); } createClass_default()(DropdownButton, [{ key: 'render', value: function render() { var _a = this.props, type = _a.type, disabled = _a.disabled, onClick = _a.onClick, children = _a.children, prefixCls = _a.prefixCls, className = _a.className, overlay = _a.overlay, trigger = _a.trigger, align = _a.align, visible = _a.visible, onVisibleChange = _a.onVisibleChange, placement = _a.placement, getPopupContainer = _a.getPopupContainer, restProps = dropdown_button___rest(_a, ["type", "disabled", "onClick", "children", "prefixCls", "className", "overlay", "trigger", "align", "visible", "onVisibleChange", "placement", "getPopupContainer"]); var dropdownProps = { align: align, overlay: overlay, disabled: disabled, trigger: disabled ? [] : trigger, onVisibleChange: onVisibleChange, placement: placement, getPopupContainer: getPopupContainer }; if ('visible' in this.props) { dropdownProps.visible = visible; } return react["createElement"]( dropdown_button_ButtonGroup, extends_default()({}, restProps, { className: classnames_default()(prefixCls, className) }), react["createElement"]( es_button, { type: type, disabled: disabled, onClick: onClick }, children ), react["createElement"]( dropdown, dropdownProps, react["createElement"](es_button, { type: type, icon: 'ellipsis' }) ) ); } }]); return DropdownButton; }(react["Component"]); /* harmony default export */ var dropdown_button = (dropdown_button_DropdownButton); dropdown_button_DropdownButton.defaultProps = { placement: 'bottomRight', type: 'default', prefixCls: 'ant-dropdown-button' }; // CONCATENATED MODULE: ../node_modules/antd/es/dropdown/index.js dropdown.Button = dropdown_button; /* harmony default export */ var es_dropdown = (dropdown); // EXTERNAL MODULE: ../node_modules/rc-util/es/PureRenderMixin.js var PureRenderMixin = __webpack_require__("uTT8"); var PureRenderMixin_default = /*#__PURE__*/__webpack_require__.n(PureRenderMixin); // CONCATENATED MODULE: ../node_modules/rc-checkbox/es/Checkbox.js var Checkbox_Checkbox = function (_React$Component) { inherits_default()(Checkbox, _React$Component); function Checkbox(props) { classCallCheck_default()(this, Checkbox); var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props)); Checkbox__initialiseProps.call(_this); var checked = 'checked' in props ? props.checked : props.defaultChecked; _this.state = { checked: checked }; return _this; } Checkbox.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if ('checked' in nextProps) { this.setState({ checked: nextProps.checked }); } }; Checkbox.prototype.shouldComponentUpdate = function shouldComponentUpdate() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return PureRenderMixin_default.a.shouldComponentUpdate.apply(this, args); }; Checkbox.prototype.focus = function focus() { this.input.focus(); }; Checkbox.prototype.blur = function blur() { this.input.blur(); }; Checkbox.prototype.render = function render() { var _classNames; var _props = this.props, prefixCls = _props.prefixCls, className = _props.className, style = _props.style, name = _props.name, id = _props.id, type = _props.type, disabled = _props.disabled, readOnly = _props.readOnly, tabIndex = _props.tabIndex, onClick = _props.onClick, onFocus = _props.onFocus, onBlur = _props.onBlur, autoFocus = _props.autoFocus, value = _props.value, others = objectWithoutProperties_default()(_props, ['prefixCls', 'className', 'style', 'name', 'id', 'type', 'disabled', 'readOnly', 'tabIndex', 'onClick', 'onFocus', 'onBlur', 'autoFocus', 'value']); var globalProps = Object.keys(others).reduce(function (prev, key) { if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') { prev[key] = others[key]; } return prev; }, {}); var checked = this.state.checked; var classString = classnames_default()(prefixCls, className, (_classNames = {}, _classNames[prefixCls + '-checked'] = checked, _classNames[prefixCls + '-disabled'] = disabled, _classNames)); return react_default.a.createElement( 'span', { className: classString, style: style }, react_default.a.createElement('input', extends_default()({ name: name, id: id, type: type, readOnly: readOnly, disabled: disabled, tabIndex: tabIndex, className: prefixCls + '-input', checked: !!checked, onClick: onClick, onFocus: onFocus, onBlur: onBlur, onChange: this.handleChange, autoFocus: autoFocus, ref: this.saveInput, value: value }, globalProps)), react_default.a.createElement('span', { className: prefixCls + '-inner' }) ); }; return Checkbox; }(react_default.a.Component); Checkbox_Checkbox.propTypes = { prefixCls: prop_types_default.a.string, className: prop_types_default.a.string, style: prop_types_default.a.object, name: prop_types_default.a.string, id: prop_types_default.a.string, type: prop_types_default.a.string, defaultChecked: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.bool]), checked: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.bool]), disabled: prop_types_default.a.bool, onFocus: prop_types_default.a.func, onBlur: prop_types_default.a.func, onChange: prop_types_default.a.func, onClick: prop_types_default.a.func, tabIndex: prop_types_default.a.string, readOnly: prop_types_default.a.bool, autoFocus: prop_types_default.a.bool, value: prop_types_default.a.any }; Checkbox_Checkbox.defaultProps = { prefixCls: 'rc-checkbox', className: '', style: {}, type: 'checkbox', defaultChecked: false, onFocus: function onFocus() {}, onBlur: function onBlur() {}, onChange: function onChange() {} }; var Checkbox__initialiseProps = function _initialiseProps() { var _this2 = this; this.handleChange = function (e) { var props = _this2.props; if (props.disabled) { return; } if (!('checked' in props)) { _this2.setState({ checked: e.target.checked }); } props.onChange({ target: extends_default()({}, props, { checked: e.target.checked }), stopPropagation: function stopPropagation() { e.stopPropagation(); }, preventDefault: function preventDefault() { e.preventDefault(); }, nativeEvent: e.nativeEvent }); }; this.saveInput = function (node) { _this2.input = node; }; }; /* harmony default export */ var es_Checkbox = (Checkbox_Checkbox); // CONCATENATED MODULE: ../node_modules/rc-checkbox/es/index.js /* harmony default export */ var rc_checkbox_es = (es_Checkbox); // CONCATENATED MODULE: ../node_modules/antd/es/checkbox/Checkbox.js var Checkbox___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var checkbox_Checkbox_Checkbox = function (_React$Component) { inherits_default()(Checkbox, _React$Component); function Checkbox() { classCallCheck_default()(this, Checkbox); var _this = possibleConstructorReturn_default()(this, (Checkbox.__proto__ || Object.getPrototypeOf(Checkbox)).apply(this, arguments)); _this.saveCheckbox = function (node) { _this.rcCheckbox = node; }; return _this; } createClass_default()(Checkbox, [{ key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState, nextContext) { return !shallowequal_default()(this.props, nextProps) || !shallowequal_default()(this.state, nextState) || !shallowequal_default()(this.context.checkboxGroup, nextContext.checkboxGroup); } }, { key: 'focus', value: function focus() { this.rcCheckbox.focus(); } }, { key: 'blur', value: function blur() { this.rcCheckbox.blur(); } }, { key: 'render', value: function render() { var props = this.props, context = this.context; var prefixCls = props.prefixCls, className = props.className, children = props.children, indeterminate = props.indeterminate, style = props.style, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, restProps = Checkbox___rest(props, ["prefixCls", "className", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave"]); var checkboxGroup = context.checkboxGroup; var checkboxProps = extends_default()({}, restProps); if (checkboxGroup) { checkboxProps.onChange = function () { return checkboxGroup.toggleOption({ label: children, value: props.value }); }; checkboxProps.checked = checkboxGroup.value.indexOf(props.value) !== -1; checkboxProps.disabled = props.disabled || checkboxGroup.disabled; } var classString = classnames_default()(className, defineProperty_default()({}, prefixCls + '-wrapper', true)); var checkboxClass = classnames_default()(defineProperty_default()({}, prefixCls + '-indeterminate', indeterminate)); return react["createElement"]( 'label', { className: classString, style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, react["createElement"](rc_checkbox_es, extends_default()({}, checkboxProps, { prefixCls: prefixCls, className: checkboxClass, ref: this.saveCheckbox })), children !== undefined ? react["createElement"]( 'span', null, children ) : null ); } }]); return Checkbox; }(react["Component"]); /* harmony default export */ var checkbox_Checkbox = (checkbox_Checkbox_Checkbox); checkbox_Checkbox_Checkbox.defaultProps = { prefixCls: 'ant-checkbox', indeterminate: false }; checkbox_Checkbox_Checkbox.contextTypes = { checkboxGroup: prop_types_default.a.any }; // CONCATENATED MODULE: ../node_modules/antd/es/checkbox/Group.js var Group_CheckboxGroup = function (_React$Component) { inherits_default()(CheckboxGroup, _React$Component); function CheckboxGroup(props) { classCallCheck_default()(this, CheckboxGroup); var _this = possibleConstructorReturn_default()(this, (CheckboxGroup.__proto__ || Object.getPrototypeOf(CheckboxGroup)).call(this, props)); _this.toggleOption = function (option) { var optionIndex = _this.state.value.indexOf(option.value); var value = [].concat(toConsumableArray_default()(_this.state.value)); if (optionIndex === -1) { value.push(option.value); } else { value.splice(optionIndex, 1); } if (!('value' in _this.props)) { _this.setState({ value: value }); } var onChange = _this.props.onChange; if (onChange) { onChange(value); } }; _this.state = { value: props.value || props.defaultValue || [] }; return _this; } createClass_default()(CheckboxGroup, [{ key: 'getChildContext', value: function getChildContext() { return { checkboxGroup: { toggleOption: this.toggleOption, value: this.state.value, disabled: this.props.disabled } }; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if ('value' in nextProps) { this.setState({ value: nextProps.value || [] }); } } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState) { return !shallowequal_default()(this.props, nextProps) || !shallowequal_default()(this.state, nextState); } }, { key: 'getOptions', value: function getOptions() { var options = this.props.options; // https://github.com/Microsoft/TypeScript/issues/7960 return options.map(function (option) { if (typeof option === 'string') { return { label: option, value: option }; } return option; }); } }, { key: 'render', value: function render() { var _this2 = this; var props = this.props, state = this.state; var prefixCls = props.prefixCls, className = props.className, style = props.style, options = props.options; var groupPrefixCls = prefixCls + '-group'; var children = props.children; if (options && options.length > 0) { children = this.getOptions().map(function (option) { return react["createElement"]( checkbox_Checkbox, { prefixCls: prefixCls, key: option.value.toString(), disabled: 'disabled' in option ? option.disabled : props.disabled, value: option.value, checked: state.value.indexOf(option.value) !== -1, onChange: function onChange() { return _this2.toggleOption(option); }, className: groupPrefixCls + '-item' }, option.label ); }); } var classString = classnames_default()(groupPrefixCls, className); return react["createElement"]( 'div', { className: classString, style: style }, children ); } }]); return CheckboxGroup; }(react["Component"]); /* harmony default export */ var checkbox_Group = (Group_CheckboxGroup); Group_CheckboxGroup.defaultProps = { options: [], prefixCls: 'ant-checkbox' }; Group_CheckboxGroup.propTypes = { defaultValue: prop_types_default.a.array, value: prop_types_default.a.array, options: prop_types_default.a.array.isRequired, onChange: prop_types_default.a.func }; Group_CheckboxGroup.childContextTypes = { checkboxGroup: prop_types_default.a.any }; // CONCATENATED MODULE: ../node_modules/antd/es/checkbox/index.js checkbox_Checkbox.Group = checkbox_Group; /* harmony default export */ var es_checkbox = (checkbox_Checkbox); // CONCATENATED MODULE: ../node_modules/antd/es/radio/radio.js var radio___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var radio_Radio = function (_React$Component) { inherits_default()(Radio, _React$Component); function Radio() { classCallCheck_default()(this, Radio); var _this = possibleConstructorReturn_default()(this, (Radio.__proto__ || Object.getPrototypeOf(Radio)).apply(this, arguments)); _this.saveCheckbox = function (node) { _this.rcCheckbox = node; }; return _this; } createClass_default()(Radio, [{ key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState, nextContext) { return !shallowequal_default()(this.props, nextProps) || !shallowequal_default()(this.state, nextState) || !shallowequal_default()(this.context.radioGroup, nextContext.radioGroup); } }, { key: 'focus', value: function focus() { this.rcCheckbox.focus(); } }, { key: 'blur', value: function blur() { this.rcCheckbox.blur(); } }, { key: 'render', value: function render() { var _classNames; var props = this.props, context = this.context; var prefixCls = props.prefixCls, className = props.className, children = props.children, style = props.style, restProps = radio___rest(props, ["prefixCls", "className", "children", "style"]); var radioGroup = context.radioGroup; var radioProps = extends_default()({}, restProps); if (radioGroup) { radioProps.name = radioGroup.name; radioProps.onChange = radioGroup.onChange; radioProps.checked = props.value === radioGroup.value; radioProps.disabled = props.disabled || radioGroup.disabled; } var wrapperClassString = classnames_default()(className, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-wrapper', true), defineProperty_default()(_classNames, prefixCls + '-wrapper-checked', radioProps.checked), defineProperty_default()(_classNames, prefixCls + '-wrapper-disabled', radioProps.disabled), _classNames)); return react["createElement"]( 'label', { className: wrapperClassString, style: style, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave }, react["createElement"](rc_checkbox_es, extends_default()({}, radioProps, { prefixCls: prefixCls, ref: this.saveCheckbox })), children !== undefined ? react["createElement"]( 'span', null, children ) : null ); } }]); return Radio; }(react["Component"]); /* harmony default export */ var radio_radio = (radio_Radio); radio_Radio.defaultProps = { prefixCls: 'ant-radio', type: 'radio' }; radio_Radio.contextTypes = { radioGroup: prop_types_default.a.any }; // CONCATENATED MODULE: ../node_modules/antd/es/radio/group.js function getCheckedValue(children) { var value = null; var matched = false; react["Children"].forEach(children, function (radio) { if (radio && radio.props && radio.props.checked) { value = radio.props.value; matched = true; } }); return matched ? { value: value } : undefined; } var group_RadioGroup = function (_React$Component) { inherits_default()(RadioGroup, _React$Component); function RadioGroup(props) { classCallCheck_default()(this, RadioGroup); var _this = possibleConstructorReturn_default()(this, (RadioGroup.__proto__ || Object.getPrototypeOf(RadioGroup)).call(this, props)); _this.onRadioChange = function (ev) { var lastValue = _this.state.value; var value = ev.target.value; if (!('value' in _this.props)) { _this.setState({ value: value }); } var onChange = _this.props.onChange; if (onChange && value !== lastValue) { onChange(ev); } }; var value = void 0; if ('value' in props) { value = props.value; } else if ('defaultValue' in props) { value = props.defaultValue; } else { var checkedValue = getCheckedValue(props.children); value = checkedValue && checkedValue.value; } _this.state = { value: value }; return _this; } createClass_default()(RadioGroup, [{ key: 'getChildContext', value: function getChildContext() { return { radioGroup: { onChange: this.onRadioChange, value: this.state.value, disabled: this.props.disabled, name: this.props.name } }; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if ('value' in nextProps) { this.setState({ value: nextProps.value }); } else { var checkedValue = getCheckedValue(nextProps.children); if (checkedValue) { this.setState({ value: checkedValue.value }); } } } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState) { return !shallowequal_default()(this.props, nextProps) || !shallowequal_default()(this.state, nextState); } }, { key: 'render', value: function render() { var _this2 = this; var props = this.props; var prefixCls = props.prefixCls, _props$className = props.className, className = _props$className === undefined ? '' : _props$className, options = props.options, buttonStyle = props.buttonStyle; var groupPrefixCls = prefixCls + '-group'; var classString = classnames_default()(groupPrefixCls, groupPrefixCls + '-' + buttonStyle, defineProperty_default()({}, groupPrefixCls + '-' + props.size, props.size), className); var children = props.children; // 如果存在 options, 优先使用 if (options && options.length > 0) { children = options.map(function (option, index) { if (typeof option === 'string') { // 此处类型自动推导为 string return react["createElement"]( radio_radio, { key: index, prefixCls: prefixCls, disabled: _this2.props.disabled, value: option, onChange: _this2.onRadioChange, checked: _this2.state.value === option }, option ); } else { // 此处类型自动推导为 { label: string value: string } return react["createElement"]( radio_radio, { key: index, prefixCls: prefixCls, disabled: option.disabled || _this2.props.disabled, value: option.value, onChange: _this2.onRadioChange, checked: _this2.state.value === option.value }, option.label ); } }); } return react["createElement"]( 'div', { className: classString, style: props.style, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, id: props.id }, children ); } }]); return RadioGroup; }(react["Component"]); /* harmony default export */ var group = (group_RadioGroup); group_RadioGroup.defaultProps = { disabled: false, prefixCls: 'ant-radio', buttonStyle: 'outline' }; group_RadioGroup.childContextTypes = { radioGroup: prop_types_default.a.any }; // CONCATENATED MODULE: ../node_modules/antd/es/radio/radioButton.js var radioButton_RadioButton = function (_React$Component) { inherits_default()(RadioButton, _React$Component); function RadioButton() { classCallCheck_default()(this, RadioButton); return possibleConstructorReturn_default()(this, (RadioButton.__proto__ || Object.getPrototypeOf(RadioButton)).apply(this, arguments)); } createClass_default()(RadioButton, [{ key: 'render', value: function render() { var radioProps = extends_default()({}, this.props); if (this.context.radioGroup) { radioProps.onChange = this.context.radioGroup.onChange; radioProps.checked = this.props.value === this.context.radioGroup.value; radioProps.disabled = this.props.disabled || this.context.radioGroup.disabled; } return react["createElement"](radio_radio, radioProps); } }]); return RadioButton; }(react["Component"]); /* harmony default export */ var radioButton = (radioButton_RadioButton); radioButton_RadioButton.defaultProps = { prefixCls: 'ant-radio-button' }; radioButton_RadioButton.contextTypes = { radioGroup: prop_types_default.a.any }; // CONCATENATED MODULE: ../node_modules/antd/es/radio/index.js radio_radio.Button = radioButton; radio_radio.Group = group; /* harmony default export */ var es_radio = (radio_radio); // CONCATENATED MODULE: ../node_modules/antd/es/table/FilterDropdownMenuWrapper.js /* harmony default export */ var FilterDropdownMenuWrapper = (function (props) { return react["createElement"]( 'div', { className: props.className, onClick: props.onClick }, props.children ); }); // CONCATENATED MODULE: ../node_modules/antd/es/table/filterDropdown.js var filterDropdown_FilterMenu = function (_React$Component) { inherits_default()(FilterMenu, _React$Component); function FilterMenu(props) { classCallCheck_default()(this, FilterMenu); var _this = possibleConstructorReturn_default()(this, (FilterMenu.__proto__ || Object.getPrototypeOf(FilterMenu)).call(this, props)); _this.setNeverShown = function (column) { var rootNode = react_dom["findDOMNode"](_this); var filterBelongToScrollBody = !!dom_closest_default()(rootNode, '.ant-table-scroll'); if (filterBelongToScrollBody) { // When fixed column have filters, there will be two dropdown menus // Filter dropdown menu inside scroll body should never be shown // To fix https://github.com/ant-design/ant-design/issues/5010 and // https://github.com/ant-design/ant-design/issues/7909 _this.neverShown = !!column.fixed; } }; _this.setSelectedKeys = function (_ref) { var selectedKeys = _ref.selectedKeys; _this.setState({ selectedKeys: selectedKeys }); }; _this.handleClearFilters = function () { _this.setState({ selectedKeys: [] }, _this.handleConfirm); }; _this.handleConfirm = function () { _this.setVisible(false); _this.confirmFilter(); }; _this.onVisibleChange = function (visible) { _this.setVisible(visible); if (!visible) { _this.confirmFilter(); } }; _this.handleMenuItemClick = function (info) { if (!info.keyPath || info.keyPath.length <= 1) { return; } var keyPathOfSelectedItem = _this.state.keyPathOfSelectedItem; if (_this.state.selectedKeys.indexOf(info.key) >= 0) { // deselect SubMenu child delete keyPathOfSelectedItem[info.key]; } else { // select SubMenu child keyPathOfSelectedItem[info.key] = info.keyPath; } _this.setState({ keyPathOfSelectedItem: keyPathOfSelectedItem }); }; _this.renderFilterIcon = function () { var _this$props = _this.props, column = _this$props.column, locale = _this$props.locale, prefixCls = _this$props.prefixCls; var filterd = _this.props.selectedKeys.length > 0; var filterIcon = column.filterIcon; if (typeof filterIcon === 'function') { filterIcon = filterIcon(filterd); } var dropdownSelectedClass = filterd ? prefixCls + '-selected' : ''; return filterIcon ? react["cloneElement"](filterIcon, { title: locale.filterTitle, className: classnames_default()(prefixCls + '-icon', filterIcon.props.className) }) : react["createElement"](es_icon, { title: locale.filterTitle, type: 'filter', className: dropdownSelectedClass }); }; var visible = 'filterDropdownVisible' in props.column ? props.column.filterDropdownVisible : false; _this.state = { selectedKeys: props.selectedKeys, keyPathOfSelectedItem: {}, visible: visible }; return _this; } createClass_default()(FilterMenu, [{ key: 'componentDidMount', value: function componentDidMount() { var column = this.props.column; this.setNeverShown(column); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var column = nextProps.column; this.setNeverShown(column); var newState = {}; /** * if the state is visible the component should ignore updates on selectedKeys prop to avoid * that the user selection is lost * this happens frequently when a table is connected on some sort of realtime data * Fixes https://github.com/ant-design/ant-design/issues/10289 and * https://github.com/ant-design/ant-design/issues/10209 */ if ('selectedKeys' in nextProps && !shallowequal_default()(this.props.selectedKeys, nextProps.selectedKeys)) { newState.selectedKeys = nextProps.selectedKeys; } if ('filterDropdownVisible' in column) { newState.visible = column.filterDropdownVisible; } if (Object.keys(newState).length > 0) { this.setState(newState); } } }, { key: 'setVisible', value: function setVisible(visible) { var column = this.props.column; if (!('filterDropdownVisible' in column)) { this.setState({ visible: visible }); } if (column.onFilterDropdownVisibleChange) { column.onFilterDropdownVisibleChange(visible); } } }, { key: 'confirmFilter', value: function confirmFilter() { var selectedKeys = this.state.selectedKeys; if (!shallowequal_default()(selectedKeys, this.props.selectedKeys)) { this.props.confirmFilter(this.props.column, selectedKeys); } } }, { key: 'renderMenuItem', value: function renderMenuItem(item) { var column = this.props.column; var selectedKeys = this.state.selectedKeys; var multiple = 'filterMultiple' in column ? column.filterMultiple : true; var input = multiple ? react["createElement"](es_checkbox, { checked: selectedKeys.indexOf(item.value.toString()) >= 0 }) : react["createElement"](es_radio, { checked: selectedKeys.indexOf(item.value.toString()) >= 0 }); return react["createElement"]( rc_menu_es_MenuItem, { key: item.value }, input, react["createElement"]( 'span', null, item.text ) ); } }, { key: 'hasSubMenu', value: function hasSubMenu() { var _props$column$filters = this.props.column.filters, filters = _props$column$filters === undefined ? [] : _props$column$filters; return filters.some(function (item) { return !!(item.children && item.children.length > 0); }); } }, { key: 'renderMenus', value: function renderMenus(items) { var _this2 = this; return items.map(function (item) { if (item.children && item.children.length > 0) { var keyPathOfSelectedItem = _this2.state.keyPathOfSelectedItem; var containSelected = Object.keys(keyPathOfSelectedItem).some(function (key) { return keyPathOfSelectedItem[key].indexOf(item.value) >= 0; }); var subMenuCls = containSelected ? _this2.props.dropdownPrefixCls + '-submenu-contain-selected' : ''; return react["createElement"]( rc_menu_es_SubMenu, { title: item.text, className: subMenuCls, key: item.value.toString() }, _this2.renderMenus(item.children) ); } return _this2.renderMenuItem(item); }); } }, { key: 'render', value: function render() { var _this3 = this; var _props = this.props, column = _props.column, locale = _props.locale, prefixCls = _props.prefixCls, dropdownPrefixCls = _props.dropdownPrefixCls, getPopupContainer = _props.getPopupContainer; // default multiple selection in filter dropdown var multiple = 'filterMultiple' in column ? column.filterMultiple : true; var dropdownMenuClass = classnames_default()(defineProperty_default()({}, dropdownPrefixCls + '-menu-without-submenu', !this.hasSubMenu())); var filterDropdown = column.filterDropdown; if (filterDropdown && typeof filterDropdown === 'function') { filterDropdown = filterDropdown({ prefixCls: dropdownPrefixCls + '-custom', setSelectedKeys: function setSelectedKeys(selectedKeys) { return _this3.setSelectedKeys({ selectedKeys: selectedKeys }); }, selectedKeys: this.state.selectedKeys, confirm: this.handleConfirm, clearFilters: this.handleClearFilters, filters: column.filters, getPopupContainer: function getPopupContainer(triggerNode) { return triggerNode.parentNode; } }); } var menus = filterDropdown ? react["createElement"]( FilterDropdownMenuWrapper, null, filterDropdown ) : react["createElement"]( FilterDropdownMenuWrapper, { className: prefixCls + '-dropdown' }, react["createElement"]( node_modules_rc_menu_es, { multiple: multiple, onClick: this.handleMenuItemClick, prefixCls: dropdownPrefixCls + '-menu', className: dropdownMenuClass, onSelect: this.setSelectedKeys, onDeselect: this.setSelectedKeys, selectedKeys: this.state.selectedKeys, getPopupContainer: function getPopupContainer(triggerNode) { return triggerNode.parentNode; } }, this.renderMenus(column.filters) ), react["createElement"]( 'div', { className: prefixCls + '-dropdown-btns' }, react["createElement"]( 'a', { className: prefixCls + '-dropdown-link confirm', onClick: this.handleConfirm }, locale.filterConfirm ), react["createElement"]( 'a', { className: prefixCls + '-dropdown-link clear', onClick: this.handleClearFilters }, locale.filterReset ) ) ); return react["createElement"]( es_dropdown, { trigger: ['click'], overlay: menus, visible: this.neverShown ? false : this.state.visible, onVisibleChange: this.onVisibleChange, getPopupContainer: getPopupContainer, forceRender: true }, this.renderFilterIcon() ); } }]); return FilterMenu; }(react["Component"]); /* harmony default export */ var table_filterDropdown = (filterDropdown_FilterMenu); filterDropdown_FilterMenu.defaultProps = { handleFilter: function handleFilter() {}, column: {} }; // CONCATENATED MODULE: ../node_modules/antd/es/table/createStore.js function createStore(initialState) { var state = initialState; var listeners = []; function setState(partial) { state = extends_default()({}, state, partial); for (var i = 0; i < listeners.length; i++) { listeners[i](); } } function getState() { return state; } function subscribe(listener) { listeners.push(listener); return function unsubscribe() { var index = listeners.indexOf(listener); listeners.splice(index, 1); }; } return { setState: setState, getState: getState, subscribe: subscribe }; } // CONCATENATED MODULE: ../node_modules/antd/es/table/SelectionBox.js var SelectionBox___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var SelectionBox_SelectionBox = function (_React$Component) { inherits_default()(SelectionBox, _React$Component); function SelectionBox(props) { classCallCheck_default()(this, SelectionBox); var _this = possibleConstructorReturn_default()(this, (SelectionBox.__proto__ || Object.getPrototypeOf(SelectionBox)).call(this, props)); _this.state = { checked: _this.getCheckState(props) }; return _this; } createClass_default()(SelectionBox, [{ key: 'componentDidMount', value: function componentDidMount() { this.subscribe(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.unsubscribe) { this.unsubscribe(); } } }, { key: 'subscribe', value: function subscribe() { var _this2 = this; var store = this.props.store; this.unsubscribe = store.subscribe(function () { var checked = _this2.getCheckState(_this2.props); _this2.setState({ checked: checked }); }); } }, { key: 'getCheckState', value: function getCheckState(props) { var store = props.store, defaultSelection = props.defaultSelection, rowIndex = props.rowIndex; var checked = false; if (store.getState().selectionDirty) { checked = store.getState().selectedRowKeys.indexOf(rowIndex) >= 0; } else { checked = store.getState().selectedRowKeys.indexOf(rowIndex) >= 0 || defaultSelection.indexOf(rowIndex) >= 0; } return checked; } }, { key: 'render', value: function render() { var _a = this.props, type = _a.type, rowIndex = _a.rowIndex, rest = SelectionBox___rest(_a, ["type", "rowIndex"]);var checked = this.state.checked; if (type === 'radio') { return react["createElement"](es_radio, extends_default()({ checked: checked, value: rowIndex }, rest)); } else { return react["createElement"](es_checkbox, extends_default()({ checked: checked }, rest)); } } }]); return SelectionBox; }(react["Component"]); /* harmony default export */ var table_SelectionBox = (SelectionBox_SelectionBox); // CONCATENATED MODULE: ../node_modules/antd/es/_util/openAnimation.js function animate(node, show, done) { var height = void 0; var requestAnimationFrameId = void 0; return es(node, 'ant-motion-collapse', { start: function start() { if (!show) { node.style.height = node.offsetHeight + 'px'; node.style.opacity = '1'; } else { height = node.offsetHeight; node.style.height = '0px'; node.style.opacity = '0'; } }, active: function active() { if (requestAnimationFrameId) { raf_default.a.cancel(requestAnimationFrameId); } requestAnimationFrameId = raf_default()(function () { node.style.height = (show ? height : 0) + 'px'; node.style.opacity = show ? '1' : '0'; }); }, end: function end() { if (requestAnimationFrameId) { raf_default.a.cancel(requestAnimationFrameId); } node.style.height = ''; node.style.opacity = ''; done(); } }); } var openAnimation_animation = { enter: function enter(node, done) { return animate(node, true, done); }, leave: function leave(node, done) { return animate(node, false, done); }, appear: function appear(node, done) { return animate(node, true, done); } }; /* harmony default export */ var _util_openAnimation = (openAnimation_animation); // CONCATENATED MODULE: ../node_modules/antd/es/menu/SubMenu.js var menu_SubMenu_SubMenu = function (_React$Component) { inherits_default()(SubMenu, _React$Component); function SubMenu() { classCallCheck_default()(this, SubMenu); var _this = possibleConstructorReturn_default()(this, (SubMenu.__proto__ || Object.getPrototypeOf(SubMenu)).apply(this, arguments)); _this.onKeyDown = function (e) { _this.subMenu.onKeyDown(e); }; _this.saveSubMenu = function (subMenu) { _this.subMenu = subMenu; }; return _this; } createClass_default()(SubMenu, [{ key: 'render', value: function render() { var _props = this.props, rootPrefixCls = _props.rootPrefixCls, className = _props.className; var theme = this.context.antdMenuTheme; return react["createElement"](rc_menu_es_SubMenu, extends_default()({}, this.props, { ref: this.saveSubMenu, popupClassName: classnames_default()(rootPrefixCls + '-' + theme, className) })); } }]); return SubMenu; }(react["Component"]); menu_SubMenu_SubMenu.contextTypes = { antdMenuTheme: prop_types_default.a.string }; // fix issue:https://github.com/ant-design/ant-design/issues/8666 menu_SubMenu_SubMenu.isSubMenu = 1; /* harmony default export */ var menu_SubMenu = (menu_SubMenu_SubMenu); // CONCATENATED MODULE: ../node_modules/rc-tooltip/es/placements.js var rc_tooltip_es_placements_autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var es_placements_targetOffset = [0, 0]; var rc_tooltip_es_placements_placements = { left: { points: ['cr', 'cl'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [-4, 0], targetOffset: es_placements_targetOffset }, right: { points: ['cl', 'cr'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [4, 0], targetOffset: es_placements_targetOffset }, top: { points: ['bc', 'tc'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [0, -4], targetOffset: es_placements_targetOffset }, bottom: { points: ['tc', 'bc'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [0, 4], targetOffset: es_placements_targetOffset }, topLeft: { points: ['bl', 'tl'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [0, -4], targetOffset: es_placements_targetOffset }, leftTop: { points: ['tr', 'tl'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [-4, 0], targetOffset: es_placements_targetOffset }, topRight: { points: ['br', 'tr'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [0, -4], targetOffset: es_placements_targetOffset }, rightTop: { points: ['tl', 'tr'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [4, 0], targetOffset: es_placements_targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [0, 4], targetOffset: es_placements_targetOffset }, rightBottom: { points: ['bl', 'br'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [4, 0], targetOffset: es_placements_targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [0, 4], targetOffset: es_placements_targetOffset }, leftBottom: { points: ['br', 'bl'], overflow: rc_tooltip_es_placements_autoAdjustOverflow, offset: [-4, 0], targetOffset: es_placements_targetOffset } }; /* harmony default export */ var rc_tooltip_es_placements = (rc_tooltip_es_placements_placements); // CONCATENATED MODULE: ../node_modules/rc-tooltip/es/Content.js var Content_Content = function (_React$Component) { inherits_default()(Content, _React$Component); function Content() { classCallCheck_default()(this, Content); return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments)); } Content.prototype.componentDidUpdate = function componentDidUpdate() { var trigger = this.props.trigger; if (trigger) { trigger.forcePopupAlign(); } }; Content.prototype.render = function render() { var _props = this.props, overlay = _props.overlay, prefixCls = _props.prefixCls, id = _props.id; return react_default.a.createElement( 'div', { className: prefixCls + '-inner', id: id }, typeof overlay === 'function' ? overlay() : overlay ); }; return Content; }(react_default.a.Component); Content_Content.propTypes = { prefixCls: prop_types_default.a.string, overlay: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]).isRequired, id: prop_types_default.a.string, trigger: prop_types_default.a.any }; /* harmony default export */ var es_Content = (Content_Content); // CONCATENATED MODULE: ../node_modules/rc-tooltip/es/Tooltip.js var Tooltip_Tooltip = function (_Component) { inherits_default()(Tooltip, _Component); function Tooltip() { var _temp, _this, _ret; classCallCheck_default()(this, Tooltip); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.getPopupElement = function () { var _this$props = _this.props, arrowContent = _this$props.arrowContent, overlay = _this$props.overlay, prefixCls = _this$props.prefixCls, id = _this$props.id; return [react_default.a.createElement( 'div', { className: prefixCls + '-arrow', key: 'arrow' }, arrowContent ), react_default.a.createElement(es_Content, { key: 'content', trigger: _this.trigger, prefixCls: prefixCls, id: id, overlay: overlay })]; }, _this.saveTrigger = function (node) { _this.trigger = node; }, _temp), possibleConstructorReturn_default()(_this, _ret); } Tooltip.prototype.getPopupDomNode = function getPopupDomNode() { return this.trigger.getPopupDomNode(); }; Tooltip.prototype.render = function render() { var _props = this.props, overlayClassName = _props.overlayClassName, trigger = _props.trigger, mouseEnterDelay = _props.mouseEnterDelay, mouseLeaveDelay = _props.mouseLeaveDelay, overlayStyle = _props.overlayStyle, prefixCls = _props.prefixCls, children = _props.children, onVisibleChange = _props.onVisibleChange, afterVisibleChange = _props.afterVisibleChange, transitionName = _props.transitionName, animation = _props.animation, placement = _props.placement, align = _props.align, destroyTooltipOnHide = _props.destroyTooltipOnHide, defaultVisible = _props.defaultVisible, getTooltipContainer = _props.getTooltipContainer, restProps = objectWithoutProperties_default()(_props, ['overlayClassName', 'trigger', 'mouseEnterDelay', 'mouseLeaveDelay', 'overlayStyle', 'prefixCls', 'children', 'onVisibleChange', 'afterVisibleChange', 'transitionName', 'animation', 'placement', 'align', 'destroyTooltipOnHide', 'defaultVisible', 'getTooltipContainer']); var extraProps = extends_default()({}, restProps); if ('visible' in this.props) { extraProps.popupVisible = this.props.visible; } return react_default.a.createElement( rc_trigger_es, extends_default()({ popupClassName: overlayClassName, ref: this.saveTrigger, prefixCls: prefixCls, popup: this.getPopupElement, action: trigger, builtinPlacements: rc_tooltip_es_placements_placements, popupPlacement: placement, popupAlign: align, getPopupContainer: getTooltipContainer, onPopupVisibleChange: onVisibleChange, afterPopupVisibleChange: afterVisibleChange, popupTransitionName: transitionName, popupAnimation: animation, defaultPopupVisible: defaultVisible, destroyPopupOnHide: destroyTooltipOnHide, mouseLeaveDelay: mouseLeaveDelay, popupStyle: overlayStyle, mouseEnterDelay: mouseEnterDelay }, extraProps), children ); }; return Tooltip; }(react["Component"]); Tooltip_Tooltip.propTypes = { trigger: prop_types_default.a.any, children: prop_types_default.a.any, defaultVisible: prop_types_default.a.bool, visible: prop_types_default.a.bool, placement: prop_types_default.a.string, transitionName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), animation: prop_types_default.a.any, onVisibleChange: prop_types_default.a.func, afterVisibleChange: prop_types_default.a.func, overlay: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]).isRequired, overlayStyle: prop_types_default.a.object, overlayClassName: prop_types_default.a.string, prefixCls: prop_types_default.a.string, mouseEnterDelay: prop_types_default.a.number, mouseLeaveDelay: prop_types_default.a.number, getTooltipContainer: prop_types_default.a.func, destroyTooltipOnHide: prop_types_default.a.bool, align: prop_types_default.a.object, arrowContent: prop_types_default.a.any, id: prop_types_default.a.string }; Tooltip_Tooltip.defaultProps = { prefixCls: 'rc-tooltip', mouseEnterDelay: 0, destroyTooltipOnHide: false, mouseLeaveDelay: 0.1, align: {}, placement: 'right', trigger: ['hover'], arrowContent: null }; /* harmony default export */ var es_Tooltip = (Tooltip_Tooltip); // CONCATENATED MODULE: ../node_modules/rc-tooltip/es/index.js /* harmony default export */ var rc_tooltip_es = (es_Tooltip); // CONCATENATED MODULE: ../node_modules/antd/es/tooltip/placements.js var autoAdjustOverflowEnabled = { adjustX: 1, adjustY: 1 }; var autoAdjustOverflowDisabled = { adjustX: 0, adjustY: 0 }; var tooltip_placements_targetOffset = [0, 0]; function getOverflowOptions(autoAdjustOverflow) { if (typeof autoAdjustOverflow === 'boolean') { return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled; } return extends_default()({}, autoAdjustOverflowDisabled, autoAdjustOverflow); } function placements_getPlacements() { var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _config$arrowWidth = config.arrowWidth, arrowWidth = _config$arrowWidth === undefined ? 5 : _config$arrowWidth, _config$horizontalArr = config.horizontalArrowShift, horizontalArrowShift = _config$horizontalArr === undefined ? 16 : _config$horizontalArr, _config$verticalArrow = config.verticalArrowShift, verticalArrowShift = _config$verticalArrow === undefined ? 12 : _config$verticalArrow, _config$autoAdjustOve = config.autoAdjustOverflow, autoAdjustOverflow = _config$autoAdjustOve === undefined ? true : _config$autoAdjustOve; var placementMap = { left: { points: ['cr', 'cl'], offset: [-4, 0] }, right: { points: ['cl', 'cr'], offset: [4, 0] }, top: { points: ['bc', 'tc'], offset: [0, -4] }, bottom: { points: ['tc', 'bc'], offset: [0, 4] }, topLeft: { points: ['bl', 'tc'], offset: [-(horizontalArrowShift + arrowWidth), -4] }, leftTop: { points: ['tr', 'cl'], offset: [-4, -(verticalArrowShift + arrowWidth)] }, topRight: { points: ['br', 'tc'], offset: [horizontalArrowShift + arrowWidth, -4] }, rightTop: { points: ['tl', 'cr'], offset: [4, -(verticalArrowShift + arrowWidth)] }, bottomRight: { points: ['tr', 'bc'], offset: [horizontalArrowShift + arrowWidth, 4] }, rightBottom: { points: ['bl', 'cr'], offset: [4, verticalArrowShift + arrowWidth] }, bottomLeft: { points: ['tl', 'bc'], offset: [-(horizontalArrowShift + arrowWidth), 4] }, leftBottom: { points: ['br', 'cl'], offset: [-4, verticalArrowShift + arrowWidth] } }; Object.keys(placementMap).forEach(function (key) { placementMap[key] = config.arrowPointAtCenter ? extends_default()({}, placementMap[key], { overflow: getOverflowOptions(autoAdjustOverflow), targetOffset: tooltip_placements_targetOffset }) : extends_default()({}, rc_tooltip_es_placements_placements[key], { overflow: getOverflowOptions(autoAdjustOverflow) }); }); return placementMap; } // CONCATENATED MODULE: ../node_modules/antd/es/tooltip/index.js var tooltip_splitObject = function splitObject(obj, keys) { var picked = {}; var omitted = extends_default()({}, obj); keys.forEach(function (key) { if (obj && key in obj) { picked[key] = obj[key]; delete omitted[key]; } }); return { picked: picked, omitted: omitted }; }; var tooltip_Tooltip = function (_React$Component) { inherits_default()(Tooltip, _React$Component); function Tooltip(props) { classCallCheck_default()(this, Tooltip); var _this = possibleConstructorReturn_default()(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, props)); _this.onVisibleChange = function (visible) { var onVisibleChange = _this.props.onVisibleChange; if (!('visible' in _this.props)) { _this.setState({ visible: _this.isNoTitle() ? false : visible }); } if (onVisibleChange && !_this.isNoTitle()) { onVisibleChange(visible); } }; // 动态设置动画点 _this.onPopupAlign = function (domNode, align) { var placements = _this.getPlacements(); // 当前返回的位置 var placement = Object.keys(placements).filter(function (key) { return placements[key].points[0] === align.points[0] && placements[key].points[1] === align.points[1]; })[0]; if (!placement) { return; } // 根据当前坐标设置动画点 var rect = domNode.getBoundingClientRect(); var transformOrigin = { top: '50%', left: '50%' }; if (placement.indexOf('top') >= 0 || placement.indexOf('Bottom') >= 0) { transformOrigin.top = rect.height - align.offset[1] + 'px'; } else if (placement.indexOf('Top') >= 0 || placement.indexOf('bottom') >= 0) { transformOrigin.top = -align.offset[1] + 'px'; } if (placement.indexOf('left') >= 0 || placement.indexOf('Right') >= 0) { transformOrigin.left = rect.width - align.offset[0] + 'px'; } else if (placement.indexOf('right') >= 0 || placement.indexOf('Left') >= 0) { transformOrigin.left = -align.offset[0] + 'px'; } domNode.style.transformOrigin = transformOrigin.left + ' ' + transformOrigin.top; }; _this.saveTooltip = function (node) { _this.tooltip = node; }; _this.state = { visible: !!props.visible || !!props.defaultVisible }; return _this; } createClass_default()(Tooltip, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if ('visible' in nextProps) { this.setState({ visible: nextProps.visible }); } } }, { key: 'getPopupDomNode', value: function getPopupDomNode() { return this.tooltip.getPopupDomNode(); } }, { key: 'getPlacements', value: function getPlacements() { var _props = this.props, builtinPlacements = _props.builtinPlacements, arrowPointAtCenter = _props.arrowPointAtCenter, autoAdjustOverflow = _props.autoAdjustOverflow; return builtinPlacements || placements_getPlacements({ arrowPointAtCenter: arrowPointAtCenter, verticalArrowShift: 8, autoAdjustOverflow: autoAdjustOverflow }); } }, { key: 'isHoverTrigger', value: function isHoverTrigger() { var trigger = this.props.trigger; if (!trigger || trigger === 'hover') { return true; } if (Array.isArray(trigger)) { return trigger.indexOf('hover') >= 0; } return false; } // Fix Tooltip won't hide at disabled button // mouse events don't trigger at disabled button in Chrome // https://github.com/react-component/tooltip/issues/18 }, { key: 'getDisabledCompatibleChildren', value: function getDisabledCompatibleChildren(element) { if ((element.type.__ANT_BUTTON || element.type === 'button') && element.props.disabled && this.isHoverTrigger()) { // Pick some layout related style properties up to span // Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254 var _splitObject = tooltip_splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']), picked = _splitObject.picked, omitted = _splitObject.omitted; var spanStyle = extends_default()({ display: 'inline-block' }, picked, { cursor: 'not-allowed' }); var buttonStyle = extends_default()({}, omitted, { pointerEvents: 'none' }); var child = Object(react["cloneElement"])(element, { style: buttonStyle, className: null }); return react["createElement"]( 'span', { style: spanStyle, className: element.props.className }, child ); } return element; } }, { key: 'isNoTitle', value: function isNoTitle() { var _props2 = this.props, title = _props2.title, overlay = _props2.overlay; return !title && !overlay; // overlay for old version compatibility } }, { key: 'render', value: function render() { var props = this.props, state = this.state; var prefixCls = props.prefixCls, title = props.title, overlay = props.overlay, openClassName = props.openClassName, getPopupContainer = props.getPopupContainer, getTooltipContainer = props.getTooltipContainer; var children = props.children; var visible = state.visible; // Hide tooltip when there is no title if (!('visible' in props) && this.isNoTitle()) { visible = false; } var child = this.getDisabledCompatibleChildren(react["isValidElement"](children) ? children : react["createElement"]( 'span', null, children )); var childProps = child.props; var childCls = classnames_default()(childProps.className, defineProperty_default()({}, openClassName || prefixCls + '-open', true)); return react["createElement"]( rc_tooltip_es, extends_default()({}, this.props, { getTooltipContainer: getPopupContainer || getTooltipContainer, ref: this.saveTooltip, builtinPlacements: this.getPlacements(), overlay: overlay || title || '', visible: visible, onVisibleChange: this.onVisibleChange, onPopupAlign: this.onPopupAlign }), visible ? Object(react["cloneElement"])(child, { className: childCls }) : child ); } }]); return Tooltip; }(react["Component"]); /* harmony default export */ var tooltip = (tooltip_Tooltip); tooltip_Tooltip.defaultProps = { prefixCls: 'ant-tooltip', placement: 'top', transitionName: 'zoom-big-fast', mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1, arrowPointAtCenter: false, autoAdjustOverflow: true }; // CONCATENATED MODULE: ../node_modules/antd/es/menu/MenuItem.js var menu_MenuItem_MenuItem = function (_React$Component) { inherits_default()(MenuItem, _React$Component); function MenuItem() { classCallCheck_default()(this, MenuItem); var _this = possibleConstructorReturn_default()(this, (MenuItem.__proto__ || Object.getPrototypeOf(MenuItem)).apply(this, arguments)); _this.onKeyDown = function (e) { _this.menuItem.onKeyDown(e); }; _this.saveMenuItem = function (menuItem) { _this.menuItem = menuItem; }; return _this; } createClass_default()(MenuItem, [{ key: 'render', value: function render() { var inlineCollapsed = this.context.inlineCollapsed; var props = this.props; return react["createElement"]( tooltip, { title: inlineCollapsed && props.level === 1 ? props.children : '', placement: 'right', overlayClassName: props.rootPrefixCls + '-inline-collapsed-tooltip' }, react["createElement"](rc_menu_es_MenuItem, extends_default()({}, props, { ref: this.saveMenuItem })) ); } }]); return MenuItem; }(react["Component"]); menu_MenuItem_MenuItem.contextTypes = { inlineCollapsed: prop_types_default.a.bool }; menu_MenuItem_MenuItem.isMenuItem = 1; /* harmony default export */ var menu_MenuItem = (menu_MenuItem_MenuItem); // CONCATENATED MODULE: ../node_modules/antd/es/menu/index.js var menu_Menu = function (_React$Component) { inherits_default()(Menu, _React$Component); function Menu(props) { classCallCheck_default()(this, Menu); var _this = possibleConstructorReturn_default()(this, (Menu.__proto__ || Object.getPrototypeOf(Menu)).call(this, props)); _this.inlineOpenKeys = []; _this.handleClick = function (e) { _this.handleOpenChange([]); var onClick = _this.props.onClick; if (onClick) { onClick(e); } }; _this.handleOpenChange = function (openKeys) { _this.setOpenKeys(openKeys); var onOpenChange = _this.props.onOpenChange; if (onOpenChange) { onOpenChange(openKeys); } }; _util_warning(!('onOpen' in props || 'onClose' in props), '`onOpen` and `onClose` are removed, please use `onOpenChange` instead, ' + 'see: https://u.ant.design/menu-on-open-change.'); _util_warning(!('inlineCollapsed' in props && props.mode !== 'inline'), '`inlineCollapsed` should only be used when Menu\'s `mode` is inline.'); var openKeys = void 0; if ('defaultOpenKeys' in props) { openKeys = props.defaultOpenKeys; } else if ('openKeys' in props) { openKeys = props.openKeys; } _this.state = { openKeys: openKeys || [] }; return _this; } createClass_default()(Menu, [{ key: 'getChildContext', value: function getChildContext() { return { inlineCollapsed: this.getInlineCollapsed(), antdMenuTheme: this.props.theme }; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps, nextContext) { var prefixCls = this.props.prefixCls; if (this.props.mode === 'inline' && nextProps.mode !== 'inline') { this.switchModeFromInline = true; } if ('openKeys' in nextProps) { this.setState({ openKeys: nextProps.openKeys }); return; } if (nextProps.inlineCollapsed && !this.props.inlineCollapsed || nextContext.siderCollapsed && !this.context.siderCollapsed) { var menuNode = Object(react_dom["findDOMNode"])(this); this.switchModeFromInline = !!this.state.openKeys.length && !!menuNode.querySelectorAll('.' + prefixCls + '-submenu-open').length; this.inlineOpenKeys = this.state.openKeys; this.setState({ openKeys: [] }); } if (!nextProps.inlineCollapsed && this.props.inlineCollapsed || !nextContext.siderCollapsed && this.context.siderCollapsed) { this.setState({ openKeys: this.inlineOpenKeys }); this.inlineOpenKeys = []; } } }, { key: 'setOpenKeys', value: function setOpenKeys(openKeys) { if (!('openKeys' in this.props)) { this.setState({ openKeys: openKeys }); } } }, { key: 'getRealMenuMode', value: function getRealMenuMode() { var inlineCollapsed = this.getInlineCollapsed(); if (this.switchModeFromInline && inlineCollapsed) { return 'inline'; } var mode = this.props.mode; return inlineCollapsed ? 'vertical' : mode; } }, { key: 'getInlineCollapsed', value: function getInlineCollapsed() { var inlineCollapsed = this.props.inlineCollapsed; if (this.context.siderCollapsed !== undefined) { return this.context.siderCollapsed; } return inlineCollapsed; } }, { key: 'getMenuOpenAnimation', value: function getMenuOpenAnimation(menuMode) { var _this2 = this; var _props = this.props, openAnimation = _props.openAnimation, openTransitionName = _props.openTransitionName; var menuOpenAnimation = openAnimation || openTransitionName; if (openAnimation === undefined && openTransitionName === undefined) { switch (menuMode) { case 'horizontal': menuOpenAnimation = 'slide-up'; break; case 'vertical': case 'vertical-left': case 'vertical-right': // When mode switch from inline // submenu should hide without animation if (this.switchModeFromInline) { menuOpenAnimation = ''; this.switchModeFromInline = false; } else { menuOpenAnimation = 'zoom-big'; } break; case 'inline': menuOpenAnimation = extends_default()({}, _util_openAnimation, { leave: function leave(node, done) { return _util_openAnimation.leave(node, function () { // Make sure inline menu leave animation finished before mode is switched _this2.switchModeFromInline = false; _this2.setState({}); // when inlineCollapsed change false to true, all submenu will be unmounted, // so that we don't need handle animation leaving. if (_this2.getRealMenuMode() === 'vertical') { return; } done(); }); } }); break; default: } } return menuOpenAnimation; } }, { key: 'render', value: function render() { var _props2 = this.props, prefixCls = _props2.prefixCls, className = _props2.className, theme = _props2.theme; var menuMode = this.getRealMenuMode(); var menuOpenAnimation = this.getMenuOpenAnimation(menuMode); var menuClassName = classnames_default()(className, prefixCls + '-' + theme, defineProperty_default()({}, prefixCls + '-inline-collapsed', this.getInlineCollapsed())); var menuProps = { openKeys: this.state.openKeys, onOpenChange: this.handleOpenChange, className: menuClassName, mode: menuMode }; if (menuMode !== 'inline') { // closing vertical popup submenu after click it menuProps.onClick = this.handleClick; menuProps.openTransitionName = menuOpenAnimation; } else { menuProps.openAnimation = menuOpenAnimation; } // https://github.com/ant-design/ant-design/issues/8587 var collapsedWidth = this.context.collapsedWidth; if (this.getInlineCollapsed() && (collapsedWidth === 0 || collapsedWidth === '0' || collapsedWidth === '0px')) { return null; } return react["createElement"](node_modules_rc_menu_es, extends_default()({}, this.props, menuProps)); } }]); return Menu; }(react["Component"]); /* harmony default export */ var es_menu = (menu_Menu); menu_Menu.Divider = rc_menu_es_Divider; menu_Menu.Item = menu_MenuItem; menu_Menu.SubMenu = menu_SubMenu; menu_Menu.ItemGroup = rc_menu_es_MenuItemGroup; menu_Menu.defaultProps = { prefixCls: 'ant-menu', className: '', theme: 'light', focusable: false }; menu_Menu.childContextTypes = { inlineCollapsed: prop_types_default.a.bool, antdMenuTheme: prop_types_default.a.string }; menu_Menu.contextTypes = { siderCollapsed: prop_types_default.a.bool, collapsedWidth: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]) }; // CONCATENATED MODULE: ../node_modules/antd/es/table/SelectionCheckboxAll.js var SelectionCheckboxAll_SelectionCheckboxAll = function (_React$Component) { inherits_default()(SelectionCheckboxAll, _React$Component); function SelectionCheckboxAll(props) { classCallCheck_default()(this, SelectionCheckboxAll); var _this = possibleConstructorReturn_default()(this, (SelectionCheckboxAll.__proto__ || Object.getPrototypeOf(SelectionCheckboxAll)).call(this, props)); _this.handleSelectAllChagne = function (e) { var checked = e.target.checked; _this.props.onSelect(checked ? 'all' : 'removeAll', 0, null); }; _this.defaultSelections = props.hideDefaultSelections ? [] : [{ key: 'all', text: props.locale.selectAll, onSelect: function onSelect() {} }, { key: 'invert', text: props.locale.selectInvert, onSelect: function onSelect() {} }]; _this.state = { checked: _this.getCheckState(props), indeterminate: _this.getIndeterminateState(props) }; return _this; } createClass_default()(SelectionCheckboxAll, [{ key: 'componentDidMount', value: function componentDidMount() { this.subscribe(); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { this.setCheckState(nextProps); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.unsubscribe) { this.unsubscribe(); } } }, { key: 'subscribe', value: function subscribe() { var _this2 = this; var store = this.props.store; this.unsubscribe = store.subscribe(function () { _this2.setCheckState(_this2.props); }); } }, { key: 'checkSelection', value: function checkSelection(data, type, byDefaultChecked) { var _props = this.props, store = _props.store, getCheckboxPropsByItem = _props.getCheckboxPropsByItem, getRecordKey = _props.getRecordKey; // type should be 'every' | 'some' if (type === 'every' || type === 'some') { return byDefaultChecked ? data[type](function (item, i) { return getCheckboxPropsByItem(item, i).defaultChecked; }) : data[type](function (item, i) { return store.getState().selectedRowKeys.indexOf(getRecordKey(item, i)) >= 0; }); } return false; } }, { key: 'setCheckState', value: function setCheckState(props) { var checked = this.getCheckState(props); var indeterminate = this.getIndeterminateState(props); this.setState(function (prevState) { var newState = {}; if (indeterminate !== prevState.indeterminate) { newState.indeterminate = indeterminate; } if (checked !== prevState.checked) { newState.checked = checked; } return newState; }); } }, { key: 'getCheckState', value: function getCheckState(props) { var store = props.store, data = props.data; var checked = void 0; if (!data.length) { checked = false; } else { checked = store.getState().selectionDirty ? this.checkSelection(data, 'every', false) : this.checkSelection(data, 'every', false) || this.checkSelection(data, 'every', true); } return checked; } }, { key: 'getIndeterminateState', value: function getIndeterminateState(props) { var store = props.store, data = props.data; var indeterminate = void 0; if (!data.length) { indeterminate = false; } else { indeterminate = store.getState().selectionDirty ? this.checkSelection(data, 'some', false) && !this.checkSelection(data, 'every', false) : this.checkSelection(data, 'some', false) && !this.checkSelection(data, 'every', false) || this.checkSelection(data, 'some', true) && !this.checkSelection(data, 'every', true); } return indeterminate; } }, { key: 'renderMenus', value: function renderMenus(selections) { var _this3 = this; return selections.map(function (selection, index) { return react["createElement"]( es_menu.Item, { key: selection.key || index }, react["createElement"]( 'div', { onClick: function onClick() { _this3.props.onSelect(selection.key, index, selection.onSelect); } }, selection.text ) ); }); } }, { key: 'render', value: function render() { var _props2 = this.props, disabled = _props2.disabled, prefixCls = _props2.prefixCls, selections = _props2.selections, getPopupContainer = _props2.getPopupContainer; var _state = this.state, checked = _state.checked, indeterminate = _state.indeterminate; var selectionPrefixCls = prefixCls + '-selection'; var customSelections = null; if (selections) { var newSelections = Array.isArray(selections) ? this.defaultSelections.concat(selections) : this.defaultSelections; var menu = react["createElement"]( es_menu, { className: selectionPrefixCls + '-menu', selectedKeys: [] }, this.renderMenus(newSelections) ); customSelections = newSelections.length > 0 ? react["createElement"]( es_dropdown, { overlay: menu, getPopupContainer: getPopupContainer }, react["createElement"]( 'div', { className: selectionPrefixCls + '-down' }, react["createElement"](es_icon, { type: 'down' }) ) ) : null; } return react["createElement"]( 'div', { className: selectionPrefixCls }, react["createElement"](es_checkbox, { className: classnames_default()(defineProperty_default()({}, selectionPrefixCls + '-select-all-custom', customSelections)), checked: checked, indeterminate: indeterminate, disabled: disabled, onChange: this.handleSelectAllChagne }), customSelections ); } }]); return SelectionCheckboxAll; }(react["Component"]); /* harmony default export */ var table_SelectionCheckboxAll = (SelectionCheckboxAll_SelectionCheckboxAll); // CONCATENATED MODULE: ../node_modules/antd/es/table/Column.js var table_Column_Column = function (_React$Component) { inherits_default()(Column, _React$Component); function Column() { classCallCheck_default()(this, Column); return possibleConstructorReturn_default()(this, (Column.__proto__ || Object.getPrototypeOf(Column)).apply(this, arguments)); } return Column; }(react["Component"]); /* harmony default export */ var table_Column = (table_Column_Column); // CONCATENATED MODULE: ../node_modules/antd/es/table/ColumnGroup.js var table_ColumnGroup_ColumnGroup = function (_React$Component) { inherits_default()(ColumnGroup, _React$Component); function ColumnGroup() { classCallCheck_default()(this, ColumnGroup); return possibleConstructorReturn_default()(this, (ColumnGroup.__proto__ || Object.getPrototypeOf(ColumnGroup)).apply(this, arguments)); } return ColumnGroup; }(react["Component"]); /* harmony default export */ var table_ColumnGroup = (table_ColumnGroup_ColumnGroup); table_ColumnGroup_ColumnGroup.__ANT_TABLE_COLUMN_GROUP = true; // CONCATENATED MODULE: ../node_modules/antd/es/table/createBodyRow.js function createTableRow() { var Component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'tr'; var BodyRow = function (_React$Component) { inherits_default()(BodyRow, _React$Component); function BodyRow(props) { classCallCheck_default()(this, BodyRow); var _this = possibleConstructorReturn_default()(this, (BodyRow.__proto__ || Object.getPrototypeOf(BodyRow)).call(this, props)); _this.store = props.store; var _this$store$getState = _this.store.getState(), selectedRowKeys = _this$store$getState.selectedRowKeys; _this.state = { selected: selectedRowKeys.indexOf(props.rowKey) >= 0 }; return _this; } createClass_default()(BodyRow, [{ key: 'componentDidMount', value: function componentDidMount() { this.subscribe(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.unsubscribe) { this.unsubscribe(); } } }, { key: 'subscribe', value: function subscribe() { var _this2 = this; var _props = this.props, store = _props.store, rowKey = _props.rowKey; this.unsubscribe = store.subscribe(function () { var _store$getState = _this2.store.getState(), selectedRowKeys = _store$getState.selectedRowKeys; var selected = selectedRowKeys.indexOf(rowKey) >= 0; if (selected !== _this2.state.selected) { _this2.setState({ selected: selected }); } }); } }, { key: 'render', value: function render() { var rowProps = omit_js_es(this.props, ['prefixCls', 'rowKey', 'store']); var className = classnames_default()(this.props.className, defineProperty_default()({}, this.props.prefixCls + '-row-selected', this.state.selected)); return react["createElement"]( Component, extends_default()({}, rowProps, { className: className }), this.props.children ); } }]); return BodyRow; }(react["Component"]); return BodyRow; } // CONCATENATED MODULE: ../node_modules/antd/es/table/util.js function flatArray() { var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var childrenName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children'; var result = []; var loop = function loop(array) { array.forEach(function (item) { if (item[childrenName]) { var newItem = extends_default()({}, item); delete newItem[childrenName]; result.push(newItem); if (item[childrenName].length > 0) { loop(item[childrenName]); } } else { result.push(item); } }); }; loop(data); return result; } function treeMap(tree, mapper) { var childrenName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'children'; return tree.map(function (node, index) { var extra = {}; if (node[childrenName]) { extra[childrenName] = treeMap(node[childrenName], mapper, childrenName); } return extends_default()({}, mapper(node, index), extra); }); } function flatFilter(tree, callback) { return tree.reduce(function (acc, node) { if (callback(node)) { acc.push(node); } if (node.children) { var children = flatFilter(node.children, callback); acc.push.apply(acc, toConsumableArray_default()(children)); } return acc; }, []); } function normalizeColumns(elements) { var columns = []; react["Children"].forEach(elements, function (element) { if (!react["isValidElement"](element)) { return; } var column = extends_default()({}, element.props); if (element.key) { column.key = element.key; } if (element.type && element.type.__ANT_TABLE_COLUMN_GROUP) { column.children = normalizeColumns(column.children); } columns.push(column); }); return columns; } // CONCATENATED MODULE: ../node_modules/antd/es/table/Table.js var Table___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; function Table_noop() {} function stopPropagation(e) { e.stopPropagation(); if (e.nativeEvent.stopImmediatePropagation) { e.nativeEvent.stopImmediatePropagation(); } } function getRowSelection(props) { return props.rowSelection || {}; } var defaultPagination = { onChange: Table_noop, onShowSizeChange: Table_noop }; /** * Avoid creating new object, so that parent component's shouldComponentUpdate * can works appropriately。 */ var emptyObject = {}; var table_Table_Table = function (_React$Component) { inherits_default()(Table, _React$Component); function Table(props) { classCallCheck_default()(this, Table); var _this = possibleConstructorReturn_default()(this, (Table.__proto__ || Object.getPrototypeOf(Table)).call(this, props)); _this.getCheckboxPropsByItem = function (item, index) { var rowSelection = getRowSelection(_this.props); if (!rowSelection.getCheckboxProps) { return {}; } var key = _this.getRecordKey(item, index); // Cache checkboxProps if (!_this.CheckboxPropsCache[key]) { _this.CheckboxPropsCache[key] = rowSelection.getCheckboxProps(item); } return _this.CheckboxPropsCache[key]; }; _this.onRow = function (record, index) { var _this$props = _this.props, onRow = _this$props.onRow, prefixCls = _this$props.prefixCls; var custom = onRow ? onRow(record, index) : {}; return extends_default()({}, custom, { prefixCls: prefixCls, store: _this.store, rowKey: _this.getRecordKey(record, index) }); }; _this.handleFilter = function (column, nextFilters) { var props = _this.props; var pagination = extends_default()({}, _this.state.pagination); var filters = extends_default()({}, _this.state.filters, defineProperty_default()({}, _this.getColumnKey(column), nextFilters)); // Remove filters not in current columns var currentColumnKeys = []; treeMap(_this.columns, function (c) { if (!c.children) { currentColumnKeys.push(_this.getColumnKey(c)); } }); Object.keys(filters).forEach(function (columnKey) { if (currentColumnKeys.indexOf(columnKey) < 0) { delete filters[columnKey]; } }); if (props.pagination) { // Reset current prop pagination.current = 1; pagination.onChange(pagination.current); } var newState = { pagination: pagination, filters: {} }; var filtersToSetState = extends_default()({}, filters); // Remove filters which is controlled _this.getFilteredValueColumns().forEach(function (col) { var columnKey = _this.getColumnKey(col); if (columnKey) { delete filtersToSetState[columnKey]; } }); if (Object.keys(filtersToSetState).length > 0) { newState.filters = filtersToSetState; } // Controlled current prop will not respond user interaction if (typeof_default()(props.pagination) === 'object' && 'current' in props.pagination) { newState.pagination = extends_default()({}, pagination, { current: _this.state.pagination.current }); } _this.setState(newState, function () { _this.store.setState({ selectionDirty: false }); var onChange = _this.props.onChange; if (onChange) { onChange.apply(null, _this.prepareParamsArguments(extends_default()({}, _this.state, { selectionDirty: false, filters: filters, pagination: pagination }))); } }); }; _this.handleSelect = function (record, rowIndex, e) { var checked = e.target.checked; var nativeEvent = e.nativeEvent; var defaultSelection = _this.store.getState().selectionDirty ? [] : _this.getDefaultSelection(); var selectedRowKeys = _this.store.getState().selectedRowKeys.concat(defaultSelection); var key = _this.getRecordKey(record, rowIndex); if (checked) { selectedRowKeys.push(_this.getRecordKey(record, rowIndex)); } else { selectedRowKeys = selectedRowKeys.filter(function (i) { return key !== i; }); } _this.store.setState({ selectionDirty: true }); _this.setSelectedRowKeys(selectedRowKeys, { selectWay: 'onSelect', record: record, checked: checked, changeRowKeys: void 0, nativeEvent: nativeEvent }); }; _this.handleRadioSelect = function (record, rowIndex, e) { var checked = e.target.checked; var nativeEvent = e.nativeEvent; var defaultSelection = _this.store.getState().selectionDirty ? [] : _this.getDefaultSelection(); var selectedRowKeys = _this.store.getState().selectedRowKeys.concat(defaultSelection); var key = _this.getRecordKey(record, rowIndex); selectedRowKeys = [key]; _this.store.setState({ selectionDirty: true }); _this.setSelectedRowKeys(selectedRowKeys, { selectWay: 'onSelect', record: record, checked: checked, changeRowKeys: void 0, nativeEvent: nativeEvent }); }; _this.handleSelectRow = function (selectionKey, index, onSelectFunc) { var data = _this.getFlatCurrentPageData(); var defaultSelection = _this.store.getState().selectionDirty ? [] : _this.getDefaultSelection(); var selectedRowKeys = _this.store.getState().selectedRowKeys.concat(defaultSelection); var changeableRowKeys = data.filter(function (item, i) { return !_this.getCheckboxPropsByItem(item, i).disabled; }).map(function (item, i) { return _this.getRecordKey(item, i); }); var changeRowKeys = []; var selectWay = 'onSelectAll'; var checked = void 0; // handle default selection switch (selectionKey) { case 'all': changeableRowKeys.forEach(function (key) { if (selectedRowKeys.indexOf(key) < 0) { selectedRowKeys.push(key); changeRowKeys.push(key); } }); selectWay = 'onSelectAll'; checked = true; break; case 'removeAll': changeableRowKeys.forEach(function (key) { if (selectedRowKeys.indexOf(key) >= 0) { selectedRowKeys.splice(selectedRowKeys.indexOf(key), 1); changeRowKeys.push(key); } }); selectWay = 'onSelectAll'; checked = false; break; case 'invert': changeableRowKeys.forEach(function (key) { if (selectedRowKeys.indexOf(key) < 0) { selectedRowKeys.push(key); } else { selectedRowKeys.splice(selectedRowKeys.indexOf(key), 1); } changeRowKeys.push(key); selectWay = 'onSelectInvert'; }); break; default: break; } _this.store.setState({ selectionDirty: true }); // when select custom selection, callback selections[n].onSelect var rowSelection = _this.props.rowSelection; var customSelectionStartIndex = 2; if (rowSelection && rowSelection.hideDefaultSelections) { customSelectionStartIndex = 0; } if (index >= customSelectionStartIndex && typeof onSelectFunc === 'function') { return onSelectFunc(changeableRowKeys); } _this.setSelectedRowKeys(selectedRowKeys, { selectWay: selectWay, checked: checked, changeRowKeys: changeRowKeys }); }; _this.handlePageChange = function (current) { for (var _len = arguments.length, otherArguments = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { otherArguments[_key - 1] = arguments[_key]; } var props = _this.props; var pagination = extends_default()({}, _this.state.pagination); if (current) { pagination.current = current; } else { pagination.current = pagination.current || 1; } pagination.onChange.apply(pagination, [pagination.current].concat(otherArguments)); var newState = { pagination: pagination }; // Controlled current prop will not respond user interaction if (props.pagination && typeof_default()(props.pagination) === 'object' && 'current' in props.pagination) { newState.pagination = extends_default()({}, pagination, { current: _this.state.pagination.current }); } _this.setState(newState); _this.store.setState({ selectionDirty: false }); var onChange = _this.props.onChange; if (onChange) { onChange.apply(null, _this.prepareParamsArguments(extends_default()({}, _this.state, { selectionDirty: false, pagination: pagination }))); } }; _this.renderSelectionBox = function (type) { return function (_, record, index) { var rowIndex = _this.getRecordKey(record, index); // 从 1 开始 var props = _this.getCheckboxPropsByItem(record, index); var handleChange = function handleChange(e) { type === 'radio' ? _this.handleRadioSelect(record, rowIndex, e) : _this.handleSelect(record, rowIndex, e); }; return react["createElement"]( 'span', { onClick: stopPropagation }, react["createElement"](table_SelectionBox, extends_default()({ type: type, store: _this.store, rowIndex: rowIndex, onChange: handleChange, defaultSelection: _this.getDefaultSelection() }, props)) ); }; }; _this.getRecordKey = function (record, index) { var rowKey = _this.props.rowKey; var recordKey = typeof rowKey === 'function' ? rowKey(record, index) : record[rowKey]; _util_warning(recordKey !== undefined, 'Each record in dataSource of table should have a unique `key` prop, ' + 'or set `rowKey` of Table to an unique primary key, ' + 'see https://u.ant.design/table-row-key'); return recordKey === undefined ? index : recordKey; }; _this.getPopupContainer = function () { return react_dom["findDOMNode"](_this); }; _this.handleShowSizeChange = function (current, pageSize) { var pagination = _this.state.pagination; pagination.onShowSizeChange(current, pageSize); var nextPagination = extends_default()({}, pagination, { pageSize: pageSize, current: current }); _this.setState({ pagination: nextPagination }); var onChange = _this.props.onChange; if (onChange) { onChange.apply(null, _this.prepareParamsArguments(extends_default()({}, _this.state, { pagination: nextPagination }))); } }; _this.renderTable = function (contextLocale, loading) { var _classNames; var locale = extends_default()({}, contextLocale, _this.props.locale); var _a = _this.props, style = _a.style, className = _a.className, prefixCls = _a.prefixCls, showHeader = _a.showHeader, restProps = Table___rest(_a, ["style", "className", "prefixCls", "showHeader"]); var data = _this.getCurrentPageData(); var expandIconAsCell = _this.props.expandedRowRender && _this.props.expandIconAsCell !== false; var classString = classnames_default()((_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-' + _this.props.size, true), defineProperty_default()(_classNames, prefixCls + '-bordered', _this.props.bordered), defineProperty_default()(_classNames, prefixCls + '-empty', !data.length), defineProperty_default()(_classNames, prefixCls + '-without-column-header', !showHeader), _classNames)); var columns = _this.renderRowSelection(locale); columns = _this.renderColumnsDropdown(columns, locale); columns = columns.map(function (column, i) { var newColumn = extends_default()({}, column); newColumn.key = _this.getColumnKey(newColumn, i); return newColumn; }); var expandIconColumnIndex = columns[0] && columns[0].key === 'selection-column' ? 1 : 0; if ('expandIconColumnIndex' in restProps) { expandIconColumnIndex = restProps.expandIconColumnIndex; } return react["createElement"](rc_table_es, extends_default()({ key: 'table' }, restProps, { onRow: _this.onRow, components: _this.components, prefixCls: prefixCls, data: data, columns: columns, showHeader: showHeader, className: classString, expandIconColumnIndex: expandIconColumnIndex, expandIconAsCell: expandIconAsCell, emptyText: !loading.spinning && locale.emptyText })); }; _util_warning(!('columnsPageRange' in props || 'columnsPageSize' in props), '`columnsPageRange` and `columnsPageSize` are removed, please use ' + 'fixed columns instead, see: https://u.ant.design/fixed-columns.'); _this.columns = props.columns || normalizeColumns(props.children); _this.createComponents(props.components); _this.state = extends_default()({}, _this.getDefaultSortOrder(_this.columns), { // 减少状态 filters: _this.getFiltersFromColumns(), pagination: _this.getDefaultPagination(props) }); _this.CheckboxPropsCache = {}; _this.store = createStore({ selectedRowKeys: getRowSelection(props).selectedRowKeys || [], selectionDirty: false }); return _this; } createClass_default()(Table, [{ key: 'getDefaultSelection', value: function getDefaultSelection() { var _this2 = this; var rowSelection = getRowSelection(this.props); if (!rowSelection.getCheckboxProps) { return []; } return this.getFlatData().filter(function (item, rowIndex) { return _this2.getCheckboxPropsByItem(item, rowIndex).defaultChecked; }).map(function (record, rowIndex) { return _this2.getRecordKey(record, rowIndex); }); } }, { key: 'getDefaultPagination', value: function getDefaultPagination(props) { var pagination = props.pagination || {}; return this.hasPagination(props) ? extends_default()({}, defaultPagination, pagination, { current: pagination.defaultCurrent || pagination.current || 1, pageSize: pagination.defaultPageSize || pagination.pageSize || 10 }) : {}; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { this.columns = nextProps.columns || normalizeColumns(nextProps.children); if ('pagination' in nextProps || 'pagination' in this.props) { this.setState(function (previousState) { var newPagination = extends_default()({}, defaultPagination, previousState.pagination, nextProps.pagination); newPagination.current = newPagination.current || 1; newPagination.pageSize = newPagination.pageSize || 10; return { pagination: nextProps.pagination !== false ? newPagination : emptyObject }; }); } if (nextProps.rowSelection && 'selectedRowKeys' in nextProps.rowSelection) { this.store.setState({ selectedRowKeys: nextProps.rowSelection.selectedRowKeys || [] }); } if ('dataSource' in nextProps && nextProps.dataSource !== this.props.dataSource) { this.store.setState({ selectionDirty: false }); } // https://github.com/ant-design/ant-design/issues/10133 this.CheckboxPropsCache = {}; if (this.getSortOrderColumns(this.columns).length > 0) { var sortState = this.getSortStateFromColumns(this.columns); if (sortState.sortColumn !== this.state.sortColumn || sortState.sortOrder !== this.state.sortOrder) { this.setState(sortState); } } var filteredValueColumns = this.getFilteredValueColumns(this.columns); if (filteredValueColumns.length > 0) { var filtersFromColumns = this.getFiltersFromColumns(this.columns); var newFilters = extends_default()({}, this.state.filters); Object.keys(filtersFromColumns).forEach(function (key) { newFilters[key] = filtersFromColumns[key]; }); if (this.isFiltersChanged(newFilters)) { this.setState({ filters: newFilters }); } } this.createComponents(nextProps.components, this.props.components); } }, { key: 'setSelectedRowKeys', value: function setSelectedRowKeys(selectedRowKeys, selectionInfo) { var _this3 = this; var selectWay = selectionInfo.selectWay, record = selectionInfo.record, checked = selectionInfo.checked, changeRowKeys = selectionInfo.changeRowKeys, nativeEvent = selectionInfo.nativeEvent; var rowSelection = getRowSelection(this.props); if (rowSelection && !('selectedRowKeys' in rowSelection)) { this.store.setState({ selectedRowKeys: selectedRowKeys }); } var data = this.getFlatData(); if (!rowSelection.onChange && !rowSelection[selectWay]) { return; } var selectedRows = data.filter(function (row, i) { return selectedRowKeys.indexOf(_this3.getRecordKey(row, i)) >= 0; }); if (rowSelection.onChange) { rowSelection.onChange(selectedRowKeys, selectedRows); } if (selectWay === 'onSelect' && rowSelection.onSelect) { rowSelection.onSelect(record, checked, selectedRows, nativeEvent); } else if (selectWay === 'onSelectAll' && rowSelection.onSelectAll) { var changeRows = data.filter(function (row, i) { return changeRowKeys.indexOf(_this3.getRecordKey(row, i)) >= 0; }); rowSelection.onSelectAll(checked, selectedRows, changeRows); } else if (selectWay === 'onSelectInvert' && rowSelection.onSelectInvert) { rowSelection.onSelectInvert(selectedRowKeys); } } }, { key: 'hasPagination', value: function hasPagination(props) { return (props || this.props).pagination !== false; } }, { key: 'isFiltersChanged', value: function isFiltersChanged(filters) { var _this4 = this; var filtersChanged = false; if (Object.keys(filters).length !== Object.keys(this.state.filters).length) { filtersChanged = true; } else { Object.keys(filters).forEach(function (columnKey) { if (filters[columnKey] !== _this4.state.filters[columnKey]) { filtersChanged = true; } }); } return filtersChanged; } }, { key: 'getSortOrderColumns', value: function getSortOrderColumns(columns) { return flatFilter(columns || this.columns || [], function (column) { return 'sortOrder' in column; }); } }, { key: 'getFilteredValueColumns', value: function getFilteredValueColumns(columns) { return flatFilter(columns || this.columns || [], function (column) { return typeof column.filteredValue !== 'undefined'; }); } }, { key: 'getFiltersFromColumns', value: function getFiltersFromColumns(columns) { var _this5 = this; var filters = {}; this.getFilteredValueColumns(columns).forEach(function (col) { var colKey = _this5.getColumnKey(col); filters[colKey] = col.filteredValue; }); return filters; } }, { key: 'getDefaultSortOrder', value: function getDefaultSortOrder(columns) { var definedSortState = this.getSortStateFromColumns(columns); var defaultSortedColumn = flatFilter(columns || [], function (column) { return column.defaultSortOrder != null; })[0]; if (defaultSortedColumn && !definedSortState.sortColumn) { return { sortColumn: defaultSortedColumn, sortOrder: defaultSortedColumn.defaultSortOrder }; } return definedSortState; } }, { key: 'getSortStateFromColumns', value: function getSortStateFromColumns(columns) { // return first column which sortOrder is not falsy var sortedColumn = this.getSortOrderColumns(columns).filter(function (col) { return col.sortOrder; })[0]; if (sortedColumn) { return { sortColumn: sortedColumn, sortOrder: sortedColumn.sortOrder }; } return { sortColumn: null, sortOrder: null }; } }, { key: 'getSorterFn', value: function getSorterFn() { var _state = this.state, sortOrder = _state.sortOrder, sortColumn = _state.sortColumn; if (!sortOrder || !sortColumn || typeof sortColumn.sorter !== 'function') { return; } return function (a, b) { var result = sortColumn.sorter(a, b, sortOrder); if (result !== 0) { return sortOrder === 'descend' ? -result : result; } return 0; }; } }, { key: 'toggleSortOrder', value: function toggleSortOrder(order, column) { var _state2 = this.state, sortColumn = _state2.sortColumn, sortOrder = _state2.sortOrder; // 只同时允许一列进行排序,否则会导致排序顺序的逻辑问题 var isSortColumn = this.isSortColumn(column); if (!isSortColumn) { // 当前列未排序 sortOrder = order; sortColumn = column; } else { // 当前列已排序 if (sortOrder === order) { // 切换为未排序状态 sortOrder = undefined; sortColumn = null; } else { // 切换为排序状态 sortOrder = order; } } var newState = { sortOrder: sortOrder, sortColumn: sortColumn }; // Controlled if (this.getSortOrderColumns().length === 0) { this.setState(newState); } var onChange = this.props.onChange; if (onChange) { onChange.apply(null, this.prepareParamsArguments(extends_default()({}, this.state, newState))); } } }, { key: 'renderRowSelection', value: function renderRowSelection(locale) { var _this6 = this; var _props = this.props, prefixCls = _props.prefixCls, rowSelection = _props.rowSelection; var columns = this.columns.concat(); if (rowSelection) { var data = this.getFlatCurrentPageData().filter(function (item, index) { if (rowSelection.getCheckboxProps) { return !_this6.getCheckboxPropsByItem(item, index).disabled; } return true; }); var selectionColumnClass = classnames_default()(prefixCls + '-selection-column', defineProperty_default()({}, prefixCls + '-selection-column-custom', rowSelection.selections)); var selectionColumn = { key: 'selection-column', render: this.renderSelectionBox(rowSelection.type), className: selectionColumnClass, fixed: rowSelection.fixed, width: rowSelection.columnWidth }; if (rowSelection.type !== 'radio') { var checkboxAllDisabled = data.every(function (item, index) { return _this6.getCheckboxPropsByItem(item, index).disabled; }); selectionColumn.title = react["createElement"](table_SelectionCheckboxAll, { store: this.store, locale: locale, data: data, getCheckboxPropsByItem: this.getCheckboxPropsByItem, getRecordKey: this.getRecordKey, disabled: checkboxAllDisabled, prefixCls: prefixCls, onSelect: this.handleSelectRow, selections: rowSelection.selections, hideDefaultSelections: rowSelection.hideDefaultSelections, getPopupContainer: this.getPopupContainer }); } if ('fixed' in rowSelection) { selectionColumn.fixed = rowSelection.fixed; } else if (columns.some(function (column) { return column.fixed === 'left' || column.fixed === true; })) { selectionColumn.fixed = 'left'; } if (columns[0] && columns[0].key === 'selection-column') { columns[0] = selectionColumn; } else { columns.unshift(selectionColumn); } } return columns; } }, { key: 'getColumnKey', value: function getColumnKey(column, index) { return column.key || column.dataIndex || index; } }, { key: 'getMaxCurrent', value: function getMaxCurrent(total) { var _state$pagination = this.state.pagination, current = _state$pagination.current, pageSize = _state$pagination.pageSize; if ((current - 1) * pageSize >= total) { return Math.floor((total - 1) / pageSize) + 1; } return current; } }, { key: 'isSortColumn', value: function isSortColumn(column) { var sortColumn = this.state.sortColumn; if (!column || !sortColumn) { return false; } return this.getColumnKey(sortColumn) === this.getColumnKey(column); } }, { key: 'renderColumnsDropdown', value: function renderColumnsDropdown(columns, locale) { var _this7 = this; var _props2 = this.props, prefixCls = _props2.prefixCls, dropdownPrefixCls = _props2.dropdownPrefixCls; var sortOrder = this.state.sortOrder; return treeMap(columns, function (originColumn, i) { var column = extends_default()({}, originColumn); var key = _this7.getColumnKey(column, i); var filterDropdown = void 0; var sortButton = void 0; if (column.filters && column.filters.length > 0 || column.filterDropdown) { var colFilters = _this7.state.filters[key] || []; filterDropdown = react["createElement"](table_filterDropdown, { locale: locale, column: column, selectedKeys: colFilters, confirmFilter: _this7.handleFilter, prefixCls: prefixCls + '-filter', dropdownPrefixCls: dropdownPrefixCls || 'ant-dropdown', getPopupContainer: _this7.getPopupContainer }); } if (column.sorter) { var isSortColumn = _this7.isSortColumn(column); if (isSortColumn) { column.className = classnames_default()(column.className, defineProperty_default()({}, prefixCls + '-column-sort', sortOrder)); } var isAscend = isSortColumn && sortOrder === 'ascend'; var isDescend = isSortColumn && sortOrder === 'descend'; sortButton = react["createElement"]( 'div', { className: prefixCls + '-column-sorter' }, react["createElement"]( 'span', { className: prefixCls + '-column-sorter-up ' + (isAscend ? 'on' : 'off'), title: '\u2191', onClick: function onClick() { return _this7.toggleSortOrder('ascend', column); } }, react["createElement"](es_icon, { type: 'caret-up' }) ), react["createElement"]( 'span', { className: prefixCls + '-column-sorter-down ' + (isDescend ? 'on' : 'off'), title: '\u2193', onClick: function onClick() { return _this7.toggleSortOrder('descend', column); } }, react["createElement"](es_icon, { type: 'caret-down' }) ) ); } column.title = react["createElement"]( 'span', { key: key }, column.title, sortButton, filterDropdown ); if (sortButton || filterDropdown) { column.className = classnames_default()(prefixCls + '-column-has-filters', column.className); } return column; }); } }, { key: 'renderPagination', value: function renderPagination(paginationPosition) { // 强制不需要分页 if (!this.hasPagination()) { return null; } var size = 'default'; var pagination = this.state.pagination; if (pagination.size) { size = pagination.size; } else if (this.props.size === 'middle' || this.props.size === 'small') { size = 'small'; } var position = pagination.position || 'bottom'; var total = pagination.total || this.getLocalData().length; return total > 0 && (position === paginationPosition || position === 'both') ? react["createElement"](es_pagination, extends_default()({ key: 'pagination-' + paginationPosition }, pagination, { className: classnames_default()(pagination.className, this.props.prefixCls + '-pagination'), onChange: this.handlePageChange, total: total, size: size, current: this.getMaxCurrent(total), onShowSizeChange: this.handleShowSizeChange })) : null; } // Get pagination, filters, sorter }, { key: 'prepareParamsArguments', value: function prepareParamsArguments(state) { var pagination = extends_default()({}, state.pagination); // remove useless handle function in Table.onChange delete pagination.onChange; delete pagination.onShowSizeChange; var filters = state.filters; var sorter = {}; if (state.sortColumn && state.sortOrder) { sorter.column = state.sortColumn; sorter.order = state.sortOrder; sorter.field = state.sortColumn.dataIndex; sorter.columnKey = this.getColumnKey(state.sortColumn); } return [pagination, filters, sorter]; } }, { key: 'findColumn', value: function findColumn(myKey) { var _this8 = this; var column = void 0; treeMap(this.columns, function (c) { if (_this8.getColumnKey(c) === myKey) { column = c; } }); return column; } }, { key: 'getCurrentPageData', value: function getCurrentPageData() { var data = this.getLocalData(); var current = void 0; var pageSize = void 0; var state = this.state; // 如果没有分页的话,默认全部展示 if (!this.hasPagination()) { pageSize = Number.MAX_VALUE; current = 1; } else { pageSize = state.pagination.pageSize; current = this.getMaxCurrent(state.pagination.total || data.length); } // 分页 // --- // 当数据量少于等于每页数量时,直接设置数据 // 否则进行读取分页数据 if (data.length > pageSize || pageSize === Number.MAX_VALUE) { data = data.filter(function (_, i) { return i >= (current - 1) * pageSize && i < current * pageSize; }); } return data; } }, { key: 'getFlatData', value: function getFlatData() { return flatArray(this.getLocalData()); } }, { key: 'getFlatCurrentPageData', value: function getFlatCurrentPageData() { return flatArray(this.getCurrentPageData()); } }, { key: 'recursiveSort', value: function recursiveSort(data, sorterFn) { var _this9 = this; var _props$childrenColumn = this.props.childrenColumnName, childrenColumnName = _props$childrenColumn === undefined ? 'children' : _props$childrenColumn; return data.sort(sorterFn).map(function (item) { return item[childrenColumnName] ? extends_default()({}, item, defineProperty_default()({}, childrenColumnName, _this9.recursiveSort(item[childrenColumnName], sorterFn))) : item; }); } }, { key: 'getLocalData', value: function getLocalData() { var _this10 = this; var state = this.state; var dataSource = this.props.dataSource; var data = dataSource || []; // 优化本地排序 data = data.slice(0); var sorterFn = this.getSorterFn(); if (sorterFn) { data = this.recursiveSort(data, sorterFn); } // 筛选 if (state.filters) { Object.keys(state.filters).forEach(function (columnKey) { var col = _this10.findColumn(columnKey); if (!col) { return; } var values = state.filters[columnKey] || []; if (values.length === 0) { return; } var onFilter = col.onFilter; data = onFilter ? data.filter(function (record) { return values.some(function (v) { return onFilter(v, record); }); }) : data; }); } return data; } }, { key: 'createComponents', value: function createComponents() { var components = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var prevComponents = arguments[1]; var bodyRow = components && components.body && components.body.row; var preBodyRow = prevComponents && prevComponents.body && prevComponents.body.row; if (!this.row || bodyRow !== preBodyRow) { this.row = createTableRow(bodyRow); } this.components = extends_default()({}, components, { body: extends_default()({}, components.body, { row: this.row }) }); } }, { key: 'render', value: function render() { var _this11 = this; var _props3 = this.props, style = _props3.style, className = _props3.className, prefixCls = _props3.prefixCls; var data = this.getCurrentPageData(); var loading = this.props.loading; if (typeof loading === 'boolean') { loading = { spinning: loading }; } var table = react["createElement"]( locale_provider_LocaleReceiver, { componentName: 'Table', defaultLocale: locale_provider_default.Table }, function (locale) { return _this11.renderTable(locale, loading); } ); // if there is no pagination or no data, // the height of spin should decrease by half of pagination var paginationPatchClass = this.hasPagination() && data && data.length !== 0 ? prefixCls + '-with-pagination' : prefixCls + '-without-pagination'; return react["createElement"]( 'div', { className: classnames_default()(prefixCls + '-wrapper', className), style: style }, react["createElement"]( es_spin, extends_default()({}, loading, { className: loading.spinning ? paginationPatchClass + ' ' + prefixCls + '-spin-holder' : '' }), this.renderPagination('top'), table, this.renderPagination('bottom') ) ); } }]); return Table; }(react["Component"]); /* harmony default export */ var table_Table = (table_Table_Table); table_Table_Table.Column = table_Column; table_Table_Table.ColumnGroup = table_ColumnGroup; table_Table_Table.propTypes = { dataSource: prop_types_default.a.array, columns: prop_types_default.a.array, prefixCls: prop_types_default.a.string, useFixedHeader: prop_types_default.a.bool, rowSelection: prop_types_default.a.object, className: prop_types_default.a.string, size: prop_types_default.a.string, loading: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object]), bordered: prop_types_default.a.bool, onChange: prop_types_default.a.func, locale: prop_types_default.a.object, dropdownPrefixCls: prop_types_default.a.string }; table_Table_Table.defaultProps = { dataSource: [], prefixCls: 'ant-table', useFixedHeader: false, className: '', size: 'default', loading: false, bordered: false, indentSize: 20, locale: {}, rowKey: 'key', showHeader: true }; // CONCATENATED MODULE: ../node_modules/antd/es/table/index.js /* harmony default export */ var es_table = (table_Table); // EXTERNAL MODULE: ../node_modules/antd/es/grid/style/index.less var grid_style = __webpack_require__("+Lv/"); var grid_style_default = /*#__PURE__*/__webpack_require__.n(grid_style); // CONCATENATED MODULE: ../node_modules/antd/es/row/style/index.js // CONCATENATED MODULE: ../node_modules/antd/es/col/style/index.js // EXTERNAL MODULE: ../node_modules/@babel/runtime/core-js/object/keys.js var object_keys = __webpack_require__("o+hE"); var keys_default = /*#__PURE__*/__webpack_require__.n(object_keys); // EXTERNAL MODULE: ../node_modules/@babel/runtime/core-js/json/stringify.js var stringify = __webpack_require__("w2IC"); var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify); // EXTERNAL MODULE: ../node_modules/antd/es/message/style/index.less var message_style = __webpack_require__("gQDI"); var message_style_default = /*#__PURE__*/__webpack_require__.n(message_style); // CONCATENATED MODULE: ../node_modules/antd/es/message/style/index.js // CONCATENATED MODULE: ../node_modules/rc-notification/es/Notice.js var Notice_Notice = function (_Component) { inherits_default()(Notice, _Component); function Notice() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, Notice); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = Notice.__proto__ || Object.getPrototypeOf(Notice)).call.apply(_ref, [this].concat(args))), _this), _this.close = function () { _this.clearCloseTimer(); _this.props.onClose(); }, _this.startCloseTimer = function () { if (_this.props.duration) { _this.closeTimer = setTimeout(function () { _this.close(); }, _this.props.duration * 1000); } }, _this.clearCloseTimer = function () { if (_this.closeTimer) { clearTimeout(_this.closeTimer); _this.closeTimer = null; } }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(Notice, [{ key: 'componentDidMount', value: function componentDidMount() { this.startCloseTimer(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { if (this.props.duration !== prevProps.duration || this.props.update) { this.restartCloseTimer(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.clearCloseTimer(); } }, { key: 'restartCloseTimer', value: function restartCloseTimer() { this.clearCloseTimer(); this.startCloseTimer(); } }, { key: 'render', value: function render() { var _className; var props = this.props; var componentClass = props.prefixCls + '-notice'; var className = (_className = {}, defineProperty_default()(_className, '' + componentClass, 1), defineProperty_default()(_className, componentClass + '-closable', props.closable), defineProperty_default()(_className, props.className, !!props.className), _className); return react_default.a.createElement( 'div', { className: classnames_default()(className), style: props.style, onMouseEnter: this.clearCloseTimer, onMouseLeave: this.startCloseTimer }, react_default.a.createElement( 'div', { className: componentClass + '-content' }, props.children ), props.closable ? react_default.a.createElement( 'a', { tabIndex: '0', onClick: this.close, className: componentClass + '-close' }, react_default.a.createElement('span', { className: componentClass + '-close-x' }) ) : null ); } }]); return Notice; }(react["Component"]); Notice_Notice.propTypes = { duration: prop_types_default.a.number, onClose: prop_types_default.a.func, children: prop_types_default.a.any, update: prop_types_default.a.bool }; Notice_Notice.defaultProps = { onEnd: function onEnd() {}, onClose: function onClose() {}, duration: 1.5, style: { right: '50%' } }; /* harmony default export */ var es_Notice = (Notice_Notice); // CONCATENATED MODULE: ../node_modules/rc-notification/es/Notification.js var seed = 0; var now = Date.now(); function getUuid() { return 'rcNotification_' + now + '_' + seed++; } var Notification_Notification = function (_Component) { inherits_default()(Notification, _Component); function Notification() { var _ref; var _temp, _this, _ret; classCallCheck_default()(this, Notification); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, (_ref = Notification.__proto__ || Object.getPrototypeOf(Notification)).call.apply(_ref, [this].concat(args))), _this), _this.state = { notices: [] }, _this.add = function (notice) { var key = notice.key = notice.key || getUuid(); var maxCount = _this.props.maxCount; _this.setState(function (previousState) { var notices = previousState.notices; var noticeIndex = notices.map(function (v) { return v.key; }).indexOf(key); var updatedNotices = notices.concat(); if (noticeIndex !== -1) { updatedNotices.splice(noticeIndex, 1, notice); } else { if (maxCount && notices.length >= maxCount) { notice.updateKey = updatedNotices[0].updateKey || updatedNotices[0].key; updatedNotices.shift(); } updatedNotices.push(notice); } return { notices: updatedNotices }; }); }, _this.remove = function (key) { _this.setState(function (previousState) { return { notices: previousState.notices.filter(function (notice) { return notice.key !== key; }) }; }); }, _temp), possibleConstructorReturn_default()(_this, _ret); } createClass_default()(Notification, [{ key: 'getTransitionName', value: function getTransitionName() { var props = this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = props.prefixCls + '-' + props.animation; } return transitionName; } }, { key: 'render', value: function render() { var _this2 = this, _className; var props = this.props; var notices = this.state.notices; var noticeNodes = notices.map(function (notice, index) { var update = Boolean(index === notices.length - 1 && notice.updateKey); var key = notice.updateKey ? notice.updateKey : notice.key; var onClose = createChainedFunction(_this2.remove.bind(_this2, notice.key), notice.onClose); return react_default.a.createElement( es_Notice, extends_default()({ prefixCls: props.prefixCls }, notice, { key: key, update: update, onClose: onClose }), notice.content ); }); var className = (_className = {}, defineProperty_default()(_className, props.prefixCls, 1), defineProperty_default()(_className, props.className, !!props.className), _className); return react_default.a.createElement( 'div', { className: classnames_default()(className), style: props.style }, react_default.a.createElement( es_Animate, { transitionName: this.getTransitionName() }, noticeNodes ) ); } }]); return Notification; }(react["Component"]); Notification_Notification.propTypes = { prefixCls: prop_types_default.a.string, transitionName: prop_types_default.a.string, animation: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]), style: prop_types_default.a.object, maxCount: prop_types_default.a.number }; Notification_Notification.defaultProps = { prefixCls: 'rc-notification', animation: 'fade', style: { top: 65, left: '50%' } }; Notification_Notification.newInstance = function newNotificationInstance(properties, callback) { var _ref2 = properties || {}, getContainer = _ref2.getContainer, props = objectWithoutProperties_default()(_ref2, ['getContainer']); var div = document.createElement('div'); if (getContainer) { var root = getContainer(); root.appendChild(div); } else { document.body.appendChild(div); } var called = false; function ref(notification) { if (called) { return; } called = true; callback({ notice: function notice(noticeProps) { notification.add(noticeProps); }, removeNotice: function removeNotice(key) { notification.remove(key); }, component: notification, destroy: function destroy() { react_dom_default.a.unmountComponentAtNode(div); div.parentNode.removeChild(div); } }); } react_dom_default.a.render(react_default.a.createElement(Notification_Notification, extends_default()({}, props, { ref: ref })), div); }; /* harmony default export */ var es_Notification = (Notification_Notification); // CONCATENATED MODULE: ../node_modules/rc-notification/es/index.js /* harmony default export */ var rc_notification_es = (es_Notification); // CONCATENATED MODULE: ../node_modules/antd/es/message/index.js /* global Promise */ var defaultDuration = 3; var defaultTop = void 0; var messageInstance = void 0; var message_key = 1; var message_prefixCls = 'ant-message'; var message_transitionName = 'move-up'; var message_getContainer = void 0; var maxCount = void 0; function getMessageInstance(callback) { if (messageInstance) { callback(messageInstance); return; } rc_notification_es.newInstance({ prefixCls: message_prefixCls, transitionName: message_transitionName, style: { top: defaultTop }, getContainer: message_getContainer, maxCount: maxCount }, function (instance) { if (messageInstance) { callback(messageInstance); return; } messageInstance = instance; callback(instance); }); } function message_notice(content) { var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultDuration; var type = arguments[2]; var onClose = arguments[3]; var iconType = { info: 'info-circle', success: 'check-circle', error: 'cross-circle', warning: 'exclamation-circle', loading: 'loading' }[type]; if (typeof duration === 'function') { onClose = duration; duration = defaultDuration; } var target = message_key++; var closePromise = new Promise(function (resolve) { var callback = function callback() { if (typeof onClose === 'function') { onClose(); } return resolve(true); }; getMessageInstance(function (instance) { instance.notice({ key: target, duration: duration, style: {}, content: react["createElement"]( 'div', { className: message_prefixCls + '-custom-content ' + message_prefixCls + '-' + type }, react["createElement"](es_icon, { type: iconType }), react["createElement"]( 'span', null, content ) ), onClose: callback }); }); }); var result = function result() { if (messageInstance) { messageInstance.removeNotice(target); } }; result.then = function (filled, rejected) { return closePromise.then(filled, rejected); }; result.promise = closePromise; return result; } /* harmony default export */ var es_message = ({ info: function info(content, duration, onClose) { return message_notice(content, duration, 'info', onClose); }, success: function success(content, duration, onClose) { return message_notice(content, duration, 'success', onClose); }, error: function error(content, duration, onClose) { return message_notice(content, duration, 'error', onClose); }, // Departed usage, please use warning() warn: function warn(content, duration, onClose) { return message_notice(content, duration, 'warning', onClose); }, warning: function warning(content, duration, onClose) { return message_notice(content, duration, 'warning', onClose); }, loading: function loading(content, duration, onClose) { return message_notice(content, duration, 'loading', onClose); }, config: function config(options) { if (options.top !== undefined) { defaultTop = options.top; messageInstance = null; // delete messageInstance for new defaultTop } if (options.duration !== undefined) { defaultDuration = options.duration; } if (options.prefixCls !== undefined) { message_prefixCls = options.prefixCls; } if (options.getContainer !== undefined) { message_getContainer = options.getContainer; } if (options.transitionName !== undefined) { message_transitionName = options.transitionName; messageInstance = null; // delete messageInstance for new transitionName } if (options.maxCount !== undefined) { maxCount = options.maxCount; messageInstance = null; } }, destroy: function destroy() { if (messageInstance) { messageInstance.destroy(); messageInstance = null; } } }); // EXTERNAL MODULE: ../node_modules/@babel/runtime/helpers/classCallCheck.js var helpers_classCallCheck = __webpack_require__("0fcM"); var helpers_classCallCheck_default = /*#__PURE__*/__webpack_require__.n(helpers_classCallCheck); // EXTERNAL MODULE: ../node_modules/@babel/runtime/helpers/inherits.js var helpers_inherits = __webpack_require__("d4H2"); var helpers_inherits_default = /*#__PURE__*/__webpack_require__.n(helpers_inherits); // EXTERNAL MODULE: ../node_modules/@babel/runtime/helpers/createClass.js var helpers_createClass = __webpack_require__("P8NW"); var helpers_createClass_default = /*#__PURE__*/__webpack_require__.n(helpers_createClass); // EXTERNAL MODULE: ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js var helpers_possibleConstructorReturn = __webpack_require__("0421"); var helpers_possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(helpers_possibleConstructorReturn); // EXTERNAL MODULE: ../node_modules/@babel/runtime/helpers/getPrototypeOf.js var getPrototypeOf = __webpack_require__("UJE0"); var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf); // CONCATENATED MODULE: ../node_modules/antd/es/input/Input.js function fixControlledValue(value) { if (typeof value === 'undefined' || value === null) { return ''; } return value; } var Input_Input = function (_React$Component) { inherits_default()(Input, _React$Component); function Input() { classCallCheck_default()(this, Input); var _this = possibleConstructorReturn_default()(this, (Input.__proto__ || Object.getPrototypeOf(Input)).apply(this, arguments)); _this.handleKeyDown = function (e) { var _this$props = _this.props, onPressEnter = _this$props.onPressEnter, onKeyDown = _this$props.onKeyDown; if (e.keyCode === 13 && onPressEnter) { onPressEnter(e); } if (onKeyDown) { onKeyDown(e); } }; _this.saveInput = function (node) { _this.input = node; }; return _this; } createClass_default()(Input, [{ key: 'focus', value: function focus() { this.input.focus(); } }, { key: 'blur', value: function blur() { this.input.blur(); } }, { key: 'getInputClassName', value: function getInputClassName() { var _classNames; var _props = this.props, prefixCls = _props.prefixCls, size = _props.size, disabled = _props.disabled; return classnames_default()(prefixCls, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-sm', size === 'small'), defineProperty_default()(_classNames, prefixCls + '-lg', size === 'large'), defineProperty_default()(_classNames, prefixCls + '-disabled', disabled), _classNames)); } }, { key: 'renderLabeledInput', value: function renderLabeledInput(children) { var _classNames3; var props = this.props; // Not wrap when there is not addons if (!props.addonBefore && !props.addonAfter) { return children; } var wrapperClassName = props.prefixCls + '-group'; var addonClassName = wrapperClassName + '-addon'; var addonBefore = props.addonBefore ? react["createElement"]( 'span', { className: addonClassName }, props.addonBefore ) : null; var addonAfter = props.addonAfter ? react["createElement"]( 'span', { className: addonClassName }, props.addonAfter ) : null; var className = classnames_default()(props.prefixCls + '-wrapper', defineProperty_default()({}, wrapperClassName, addonBefore || addonAfter)); var groupClassName = classnames_default()(props.prefixCls + '-group-wrapper', (_classNames3 = {}, defineProperty_default()(_classNames3, props.prefixCls + '-group-wrapper-sm', props.size === 'small'), defineProperty_default()(_classNames3, props.prefixCls + '-group-wrapper-lg', props.size === 'large'), _classNames3)); // Need another wrapper for changing display:table to display:inline-block // and put style prop in wrapper if (addonBefore || addonAfter) { return react["createElement"]( 'span', { className: groupClassName, style: props.style }, react["createElement"]( 'span', { className: className }, addonBefore, react["cloneElement"](children, { style: null }), addonAfter ) ); } return react["createElement"]( 'span', { className: className }, addonBefore, children, addonAfter ); } }, { key: 'renderLabeledIcon', value: function renderLabeledIcon(children) { var _classNames4; var props = this.props; if (!('prefix' in props || 'suffix' in props)) { return children; } var prefix = props.prefix ? react["createElement"]( 'span', { className: props.prefixCls + '-prefix' }, props.prefix ) : null; var suffix = props.suffix ? react["createElement"]( 'span', { className: props.prefixCls + '-suffix' }, props.suffix ) : null; var affixWrapperCls = classnames_default()(props.className, props.prefixCls + '-affix-wrapper', (_classNames4 = {}, defineProperty_default()(_classNames4, props.prefixCls + '-affix-wrapper-sm', props.size === 'small'), defineProperty_default()(_classNames4, props.prefixCls + '-affix-wrapper-lg', props.size === 'large'), _classNames4)); return react["createElement"]( 'span', { className: affixWrapperCls, style: props.style }, prefix, react["cloneElement"](children, { style: null, className: this.getInputClassName() }), suffix ); } }, { key: 'renderInput', value: function renderInput() { var _props2 = this.props, value = _props2.value, className = _props2.className; // Fix https://fb.me/react-unknown-prop var otherProps = omit_js_es(this.props, ['prefixCls', 'onPressEnter', 'addonBefore', 'addonAfter', 'prefix', 'suffix']); if ('value' in this.props) { otherProps.value = fixControlledValue(value); // Input elements must be either controlled or uncontrolled, // specify either the value prop, or the defaultValue prop, but not both. delete otherProps.defaultValue; } return this.renderLabeledIcon(react["createElement"]('input', extends_default()({}, otherProps, { className: classnames_default()(this.getInputClassName(), className), onKeyDown: this.handleKeyDown, ref: this.saveInput }))); } }, { key: 'render', value: function render() { return this.renderLabeledInput(this.renderInput()); } }]); return Input; }(react["Component"]); /* harmony default export */ var input_Input = (Input_Input); Input_Input.defaultProps = { prefixCls: 'ant-input', type: 'text', disabled: false }; Input_Input.propTypes = { type: prop_types_default.a.string, id: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), size: prop_types_default.a.oneOf(['small', 'default', 'large']), maxLength: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), disabled: prop_types_default.a.bool, value: prop_types_default.a.any, defaultValue: prop_types_default.a.any, className: prop_types_default.a.string, addonBefore: prop_types_default.a.node, addonAfter: prop_types_default.a.node, prefixCls: prop_types_default.a.string, autosize: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object]), onPressEnter: prop_types_default.a.func, onKeyDown: prop_types_default.a.func, onKeyUp: prop_types_default.a.func, onFocus: prop_types_default.a.func, onBlur: prop_types_default.a.func, prefix: prop_types_default.a.node, suffix: prop_types_default.a.node }; // CONCATENATED MODULE: ../node_modules/antd/es/input/Group.js var Group_Group = function Group(props) { var _classNames; var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === undefined ? 'ant-input-group' : _props$prefixCls, _props$className = props.className, className = _props$className === undefined ? '' : _props$className; var cls = classnames_default()(prefixCls, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-lg', props.size === 'large'), defineProperty_default()(_classNames, prefixCls + '-sm', props.size === 'small'), defineProperty_default()(_classNames, prefixCls + '-compact', props.compact), _classNames), className); return react["createElement"]( 'span', { className: cls, style: props.style }, props.children ); }; /* harmony default export */ var input_Group = (Group_Group); // CONCATENATED MODULE: ../node_modules/antd/es/input/Search.js var Search___rest = this && this.__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) t[p[i]] = s[p[i]]; }return t; }; var Search_Search = function (_React$Component) { inherits_default()(Search, _React$Component); function Search() { classCallCheck_default()(this, Search); var _this = possibleConstructorReturn_default()(this, (Search.__proto__ || Object.getPrototypeOf(Search)).apply(this, arguments)); _this.onSearch = function (e) { var onSearch = _this.props.onSearch; if (onSearch) { onSearch(_this.input.input.value, e); } _this.input.focus(); }; _this.saveInput = function (node) { _this.input = node; }; return _this; } createClass_default()(Search, [{ key: 'focus', value: function focus() { this.input.focus(); } }, { key: 'blur', value: function blur() { this.input.blur(); } }, { key: 'getButtonOrIcon', value: function getButtonOrIcon() { var _props = this.props, enterButton = _props.enterButton, prefixCls = _props.prefixCls, size = _props.size, disabled = _props.disabled; var enterButtonAsElement = enterButton; var node = void 0; if (!enterButton) { node = react["createElement"](es_icon, { className: prefixCls + '-icon', type: 'search', key: 'searchIcon' }); } else if (enterButtonAsElement.type === es_button || enterButtonAsElement.type === 'button') { node = react["cloneElement"](enterButtonAsElement, enterButtonAsElement.type === es_button ? { className: prefixCls + '-button', size: size } : {}); } else { node = react["createElement"]( es_button, { className: prefixCls + '-button', type: 'primary', size: size, disabled: disabled, key: 'enterButton' }, enterButton === true ? react["createElement"](es_icon, { type: 'search' }) : enterButton ); } return react["cloneElement"](node, { onClick: this.onSearch }); } }, { key: 'render', value: function render() { var _classNames; var _a = this.props, className = _a.className, prefixCls = _a.prefixCls, inputPrefixCls = _a.inputPrefixCls, size = _a.size, suffix = _a.suffix, enterButton = _a.enterButton, others = Search___rest(_a, ["className", "prefixCls", "inputPrefixCls", "size", "suffix", "enterButton"]); delete others.onSearch; var buttonOrIcon = this.getButtonOrIcon(); var searchSuffix = suffix ? [suffix, buttonOrIcon] : buttonOrIcon; var inputClassName = classnames_default()(prefixCls, className, (_classNames = {}, defineProperty_default()(_classNames, prefixCls + '-enter-button', !!enterButton), defineProperty_default()(_classNames, prefixCls + '-' + size, !!size), _classNames)); return react["createElement"](input_Input, extends_default()({ onPressEnter: this.onSearch }, others, { size: size, className: inputClassName, prefixCls: inputPrefixCls, suffix: searchSuffix, ref: this.saveInput })); } }]); return Search; }(react["Component"]); /* harmony default export */ var input_Search = (Search_Search); Search_Search.defaultProps = { inputPrefixCls: 'ant-input', prefixCls: 'ant-input-search', enterButton: false }; // CONCATENATED MODULE: ../node_modules/antd/es/input/calculateNodeHeight.js // Thanks to https://github.com/andreypopp/react-textarea-autosize/ /** * calculateNodeHeight(uiTextNode, useCache = false) */ var HIDDEN_TEXTAREA_STYLE = '\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n'; var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing']; var computedStyleCache = {}; var hiddenTextarea = void 0; function calculateNodeStyling(node) { var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name'); if (useCache && computedStyleCache[nodeRef]) { return computedStyleCache[nodeRef]; } var style = window.getComputedStyle(node); var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing'); var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top')); var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width')); var sizingStyle = SIZING_STYLE.map(function (name) { return name + ':' + style.getPropertyValue(name); }).join(';'); var nodeInfo = { sizingStyle: sizingStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing }; if (useCache && nodeRef) { computedStyleCache[nodeRef] = nodeInfo; } return nodeInfo; } function calculateNodeHeight(uiTextNode) { var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; if (!hiddenTextarea) { hiddenTextarea = document.createElement('textarea'); document.body.appendChild(hiddenTextarea); } // Fix wrap="off" issue // https://github.com/ant-design/ant-design/issues/6577 if (uiTextNode.getAttribute('wrap')) { hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap')); } else { hiddenTextarea.removeAttribute('wrap'); } // Copy all CSS properties that have an impact on the height of the content in // the textbox var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache), paddingSize = _calculateNodeStyling.paddingSize, borderSize = _calculateNodeStyling.borderSize, boxSizing = _calculateNodeStyling.boxSizing, sizingStyle = _calculateNodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise // text-lines will not calculated properly as the shadow will technically be // narrower for content hiddenTextarea.setAttribute('style', sizingStyle + ';' + HIDDEN_TEXTAREA_STYLE); hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || ''; var minHeight = Number.MIN_SAFE_INTEGER; var maxHeight = Number.MAX_SAFE_INTEGER; var height = hiddenTextarea.scrollHeight; var overflowY = void 0; if (boxSizing === 'border-box') { // border-box: add border, since height = content + padding + border height = height + borderSize; } else if (boxSizing === 'content-box') { // remove padding, since height = content height = height - paddingSize; } if (minRows !== null || maxRows !== null) { // measure height of a textarea with a single row hiddenTextarea.value = ' '; var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize; if (minRows !== null) { minHeight = singleRowHeight * minRows; if (boxSizing === 'border-box') { minHeight = minHeight + paddingSize + borderSize; } height = Math.max(minHeight, height); } if (maxRows !== null) { maxHeight = singleRowHeight * maxRows; if (boxSizing === 'border-box') { maxHeight = maxHeight + paddingSize + borderSize; } overflowY = height > maxHeight ? '' : 'hidden'; height = Math.min(maxHeight, height); } } // Remove scroll bar flash when autosize without maxRows if (!maxRows) { overflowY = 'hidden'; } return { height: height, minHeight: minHeight, maxHeight: maxHeight, overflowY: overflowY }; } // CONCATENATED MODULE: ../node_modules/antd/es/input/TextArea.js function onNextFrame(cb) { if (window.requestAnimationFrame) { return window.requestAnimationFrame(cb); } return window.setTimeout(cb, 1); } function clearNextFrameAction(nextFrameId) { if (window.cancelAnimationFrame) { window.cancelAnimationFrame(nextFrameId); } else { window.clearTimeout(nextFrameId); } } var TextArea_TextArea = function (_React$Component) { inherits_default()(TextArea, _React$Component); function TextArea() { classCallCheck_default()(this, TextArea); var _this = possibleConstructorReturn_default()(this, (TextArea.__proto__ || Object.getPrototypeOf(TextArea)).apply(this, arguments)); _this.state = { textareaStyles: {} }; _this.resizeTextarea = function () { var autosize = _this.props.autosize; if (!autosize || !_this.textAreaRef) { return; } var minRows = autosize ? autosize.minRows : null; var maxRows = autosize ? autosize.maxRows : null; var textareaStyles = calculateNodeHeight(_this.textAreaRef, false, minRows, maxRows); _this.setState({ textareaStyles: textareaStyles }); }; _this.handleTextareaChange = function (e) { if (!('value' in _this.props)) { _this.resizeTextarea(); } var onChange = _this.props.onChange; if (onChange) { onChange(e); } }; _this.handleKeyDown = function (e) { var _this$props = _this.props, onPressEnter = _this$props.onPressEnter, onKeyDown = _this$props.onKeyDown; if (e.keyCode === 13 && onPressEnter) { onPressEnter(e); } if (onKeyDown) { onKeyDown(e); } }; _this.saveTextAreaRef = function (textArea) { _this.textAreaRef = textArea; }; return _this; } createClass_default()(TextArea, [{ key: 'componentDidMount', value: function componentDidMount() { this.resizeTextarea(); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { // Re-render with the new content then recalculate the height as required. if (this.props.value !== nextProps.value) { if (this.nextFrameActionId) { clearNextFrameAction(this.nextFrameActionId); } this.nextFrameActionId = onNextFrame(this.resizeTextarea); } } }, { key: 'focus', value: function focus() { this.textAreaRef.focus(); } }, { key: 'blur', value: function blur() { this.textAreaRef.blur(); } }, { key: 'getTextAreaClassName', value: function getTextAreaClassName() { var _props = this.props, prefixCls = _props.prefixCls, className = _props.className, disabled = _props.disabled; return classnames_default()(prefixCls, className, defineProperty_default()({}, prefixCls + '-disabled', disabled)); } }, { key: 'render', value: function render() { var props = this.props; var otherProps = omit_js_es(props, ['prefixCls', 'onPressEnter', 'autosize']); var style = extends_default()({}, props.style, this.state.textareaStyles); // Fix https://github.com/ant-design/ant-design/issues/6776 // Make sure it could be reset when using form.getFieldDecorator if ('value' in otherProps) { otherProps.value = otherProps.value || ''; } return react["createElement"]('textarea', extends_default()({}, otherProps, { className: this.getTextAreaClassName(), style: style, onKeyDown: this.handleKeyDown, onChange: this.handleTextareaChange, ref: this.saveTextAreaRef })); } }]); return TextArea; }(react["Component"]); /* harmony default export */ var input_TextArea = (TextArea_TextArea); TextArea_TextArea.defaultProps = { prefixCls: 'ant-input' }; // CONCATENATED MODULE: ../node_modules/antd/es/input/index.js input_Input.Group = input_Group; input_Input.Search = input_Search; input_Input.TextArea = input_TextArea; /* harmony default export */ var es_input = (input_Input); // EXTERNAL MODULE: ../node_modules/qs/lib/index.js var qs_lib = __webpack_require__("OFf3"); var qs_lib_default = /*#__PURE__*/__webpack_require__.n(qs_lib); // EXTERNAL MODULE: ../.roadhogrc.mock.js var _roadhogrc_mock = __webpack_require__("9Qea"); // CONCATENATED MODULE: ./src/config.js /* harmony default export */ var src_config = ({ port: "", isStatic: true }); // CONCATENATED MODULE: ./src/utils.js /* eslint no-underscore-dangle:0 */ var mockData = _roadhogrc_mock["a" /* default */].__mockData || _roadhogrc_mock["a" /* default */]; function isFunction(arg) { return Object.prototype.toString.call(arg) === '[object Function]'; } function isObject(arg) { return Object.prototype.toString.call(arg) === '[object Object]'; } // 从 key 中获取 method 和 url function parseKey(key) { var arr = key.split(' '); var method = arr[0]; var url = arr[1]; return { method: method, url: url }; } function getRequest(url) { return mockData[keys_default()(mockData).filter(function (key) { return key.indexOf(url) > -1; })[0]]; } function handleRequest(u, url, params, callback) { var r = getRequest(u); if (isFunction(r)) { var req = { url: url, params: params, query: params, body: params }; var res = { json: function json(data) { callback(data.$body || data); }, send: function send(data) { callback(data.$body || data); } }; r(req, res); } else { callback(r.$body || r); } } /* harmony default export */ var src_utils = ({ isFunction: isFunction, isObject: isObject, getRequest: getRequest, parseKey: parseKey, handleRequest: handleRequest }); // EXTERNAL MODULE: ../node_modules/@babel/runtime/helpers/objectSpread.js var objectSpread = __webpack_require__("fwAU"); var objectSpread_default = /*#__PURE__*/__webpack_require__.n(objectSpread); // EXTERNAL MODULE: ../node_modules/antd/es/notification/style/index.less var notification_style = __webpack_require__("Bw2v"); var notification_style_default = /*#__PURE__*/__webpack_require__.n(notification_style); // CONCATENATED MODULE: ../node_modules/antd/es/notification/style/index.js // CONCATENATED MODULE: ../node_modules/antd/es/notification/index.js var notificationInstance = {}; var notification_defaultDuration = 4.5; var notification_defaultTop = 24; var defaultBottom = 24; var defaultPlacement = 'topRight'; var defaultGetContainer = void 0; function setNotificationConfig(options) { var duration = options.duration, placement = options.placement, bottom = options.bottom, top = options.top, getContainer = options.getContainer; if (duration !== undefined) { notification_defaultDuration = duration; } if (placement !== undefined) { defaultPlacement = placement; } if (bottom !== undefined) { defaultBottom = bottom; } if (top !== undefined) { notification_defaultTop = top; } if (getContainer !== undefined) { defaultGetContainer = getContainer; } } function getPlacementStyle(placement) { var style = void 0; switch (placement) { case 'topLeft': style = { left: 0, top: notification_defaultTop, bottom: 'auto' }; break; case 'topRight': style = { right: 0, top: notification_defaultTop, bottom: 'auto' }; break; case 'bottomLeft': style = { left: 0, top: 'auto', bottom: defaultBottom }; break; default: style = { right: 0, top: 'auto', bottom: defaultBottom }; break; } return style; } function getNotificationInstance(prefixCls, placement, callback) { var cacheKey = prefixCls + '-' + placement; if (notificationInstance[cacheKey]) { callback(notificationInstance[cacheKey]); return; } rc_notification_es.newInstance({ prefixCls: prefixCls, className: prefixCls + '-' + placement, style: getPlacementStyle(placement), getContainer: defaultGetContainer }, function (notification) { notificationInstance[cacheKey] = notification; callback(notification); }); } var typeToIcon = { success: 'check-circle-o', info: 'info-circle-o', error: 'cross-circle-o', warning: 'exclamation-circle-o' }; function notification_notice(args) { var outerPrefixCls = args.prefixCls || 'ant-notification'; var prefixCls = outerPrefixCls + '-notice'; var duration = args.duration === undefined ? notification_defaultDuration : args.duration; var iconNode = null; if (args.icon) { iconNode = react["createElement"]( 'span', { className: prefixCls + '-icon' }, args.icon ); } else if (args.type) { var iconType = typeToIcon[args.type]; iconNode = react["createElement"](es_icon, { className: prefixCls + '-icon ' + prefixCls + '-icon-' + args.type, type: iconType }); } var autoMarginTag = !args.description && iconNode ? react["createElement"]('span', { className: prefixCls + '-message-single-line-auto-margin' }) : null; getNotificationInstance(outerPrefixCls, args.placement || defaultPlacement, function (notification) { notification.notice({ content: react["createElement"]( 'div', { className: iconNode ? prefixCls + '-with-icon' : '' }, iconNode, react["createElement"]( 'div', { className: prefixCls + '-message' }, autoMarginTag, args.message ), react["createElement"]( 'div', { className: prefixCls + '-description' }, args.description ), args.btn ? react["createElement"]( 'span', { className: prefixCls + '-btn' }, args.btn ) : null ), duration: duration, closable: true, onClose: args.onClose, key: args.key, style: args.style || {}, className: args.className }); }); } var api = { open: notification_notice, close: function close(key) { Object.keys(notificationInstance).forEach(function (cacheKey) { return notificationInstance[cacheKey].removeNotice(key); }); }, config: setNotificationConfig, destroy: function destroy() { Object.keys(notificationInstance).forEach(function (cacheKey) { notificationInstance[cacheKey].destroy(); delete notificationInstance[cacheKey]; }); } }; ['success', 'info', 'warning', 'error'].forEach(function (type) { api[type] = function (args) { return api.open(extends_default()({}, args, { type: type })); }; }); api.warn = api.warning; /* harmony default export */ var es_notification = (api); // EXTERNAL MODULE: ../node_modules/dva/fetch.js var fetch = __webpack_require__("OE08"); var fetch_default = /*#__PURE__*/__webpack_require__.n(fetch); // CONCATENATED MODULE: ./src/request.js function checkStatus(response) { if (response.status >= 200 && response.status < 300) { return response; } es_notification.error({ message: "\u8BF7\u6C42\u9519\u8BEF ".concat(response.status, ": ").concat(response.url), description: response.statusText }); var error = new Error(response.statusText); error.response = response; throw error; } /** * Requests a URL, returning a promise. * * @param {string} url The URL we want to request * @param {object} [options] The options we want to pass to "fetch" * @return {object} An object containing either "data" or "err" */ function request(url, options) { var defaultOptions = { credentials: 'include' }; var newOptions = objectSpread_default()({}, defaultOptions, options); if (newOptions.method === 'POST' || newOptions.method === 'PUT') { newOptions.headers = objectSpread_default()({ Accept: 'application/json', 'Content-Type': 'application/json; charset=utf-8' }, newOptions.headers); newOptions.body = stringify_default()(newOptions.body); } return fetch_default()(url, newOptions).then(checkStatus).then(function (response) { return response.json(); }).catch(function (error) { if (error.code) { es_notification.error({ message: error.name, description: error.message }); } if ('stack' in error && 'message' in error) { es_notification.error({ message: "request error: ".concat(url), description: error.message }); } return error; }); } // EXTERNAL MODULE: ./src/api.less var src_api = __webpack_require__("FIbo"); var api_default = /*#__PURE__*/__webpack_require__.n(src_api); // CONCATENATED MODULE: ./src/api.js var api_TextArea = es_input.TextArea; /* eslint no-underscore-dangle:0 */ var api_mockData = _roadhogrc_mock["a" /* default */].__mockData || _roadhogrc_mock["a" /* default */]; var port = src_config.port, isStatic = src_config.isStatic, docPort = src_config.docPort; var api_isObject = src_utils.isObject, api_parseKey = src_utils.parseKey, api_handleRequest = src_utils.handleRequest; var api_ApiItem = /*#__PURE__*/ function (_Component) { function ApiItem() { var _getPrototypeOf2; var _temp, _this; helpers_classCallCheck_default()(this, ApiItem); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return helpers_possibleConstructorReturn_default()(_this, (_temp = _this = helpers_possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(ApiItem)).call.apply(_getPrototypeOf2, [this].concat(args))), _this.state = { urlValue: "", theMockData: {}, postParams: undefined }, _this.handleChange = function (e) { _this.setState({ urlValue: e.target.value }); }, _this.handlePostParams = function (e) { var postParams = e.target.value; _this.setState({ postParams: postParams }); }, _this.handleShowData = function (data) { if (_this.props.onPostClick) { _this.props.onPostClick(data); } }, _this.handlePostRequest = function (u, url, postParams, method) { var params; if (Object.prototype.toString.call(postParams) === "[object String]") { try { params = JSON.parse(postParams); } catch (e) { es_message.error("parse params error: ", stringify_default()(e, null, 2)); } } if (params) { if (method != "GET" && port) { request("http://localhost:".concat(docPort).concat(u), { method: "POST", body: params }).then(function (data) { _this.handleShowData(data); }); } else { api_handleRequest(u, url, params, _this.handleShowData); } } }, _temp)); } helpers_createClass_default()(ApiItem, [{ key: "render", value: function render() { var _this2 = this; var _this$props = this.props, req = _this$props.req, data = _this$props.data; var _parseKey = api_parseKey(req), method = _parseKey.method, u = _parseKey.url; var url = "http://localhost".concat(port ? ":".concat(port) : ":8000").concat(u); var _this$state = this.state, urlValue = _this$state.urlValue, postParams = _this$state.postParams; var params = data.$params || {}; var desc = data.$desc || ""; var columns = [{ key: "p", dataIndex: "p", title: "参数" }, { key: "desc", dataIndex: "desc", title: "说明" }, { key: "exp", dataIndex: "exp", title: "样例" }]; var dataSource = []; var getParams = {}; keys_default()(params).forEach(function (p) { var pd = params[p]; if (api_isObject(pd)) { getParams[p] = params[p].exp; dataSource.push({ p: p, desc: params[p].desc, exp: params[p].exp }); } else { getParams[p] = params[p]; dataSource.push({ p: p, desc: "", exp: params[p] }); } }); if (method === "GET") { if (!urlValue && dataSource.length > 0) { urlValue = "".concat(url, "?").concat(Object(qs_lib["stringify"])(getParams)); } } if (!urlValue) { urlValue = url; } if (!postParams) { postParams = stringify_default()(getParams, null, 2); } return react_default.a.createElement(card, { className: api_default.a.apiItem, title: react_default.a.createElement("p", { className: api_default.a.apiItemTitle }, react_default.a.createElement("span", null, method), react_default.a.createElement("span", null, u)) }, !isStatic && method === "GET" && react_default.a.createElement("div", { className: api_default.a.apiItemOperator }, react_default.a.createElement(es_row, { gutter: 16 }, react_default.a.createElement(es_col, { span: 20 }, react_default.a.createElement(es_input, { value: urlValue, onChange: this.handleChange, placeholder: url })), react_default.a.createElement(es_col, { span: 4 }, react_default.a.createElement("a", { target: "_blank", href: urlValue }, "send")))), (isStatic && method === "GET" || method !== "GET") && react_default.a.createElement("div", { className: api_default.a.apiItemOperator }, react_default.a.createElement(es_row, { gutter: 16 }, react_default.a.createElement(es_col, { span: 20 }, react_default.a.createElement(es_input, { value: urlValue, onChange: this.handleChange, placeholder: url })), react_default.a.createElement(es_col, { span: 4 }, react_default.a.createElement(es_button, { type: "primary", onClick: function onClick() { return _this2.handlePostRequest(u, url, postParams, method); }, style: { width: "100%" } }, "send"))), method !== "GET" && dataSource.length > 0 && react_default.a.createElement(es_row, { gutter: 16 }, react_default.a.createElement(es_col, { span: 24 }, react_default.a.createElement(api_TextArea, { style: { marginTop: 16, width: "100%" }, autosize: { minRows: 2, maxRows: 20 }, value: postParams, onChange: this.handlePostParams })))), desc && react_default.a.createElement("p", { style: { marginTop: 16 } }, desc), dataSource.length > 0 && react_default.a.createElement("div", { className: api_default.a.apiItemDocs }, react_default.a.createElement("h3", null, "Params"), react_default.a.createElement(es_table, { rowKey: function rowKey(record) { return record.p; }, pagination: false, size: "small", columns: columns, dataSource: dataSource }))); } }]); helpers_inherits_default()(ApiItem, _Component); return ApiItem; }(react["Component"]); // eslint-disable-next-line var api_ApiDoc = /*#__PURE__*/ function (_Component2) { function ApiDoc(props) { var _this3; helpers_classCallCheck_default()(this, ApiDoc); _this3 = helpers_possibleConstructorReturn_default()(this, getPrototypeOf_default()(ApiDoc).call(this, props)); _this3.handleShowData = function (data) { _this3.setState({ theMockData: data, modalVisible: true }); }; _this3.handleModalCancel = function () { _this3.setState({ modalVisible: false }); }; _this3.state = { theMockData: {}, modalVisible: false }; return _this3; } helpers_createClass_default()(ApiDoc, [{ key: "render", value: function render() { var _this4 = this; var _this$state2 = this.state, modalVisible = _this$state2.modalVisible, theMockData = _this$state2.theMockData; return react_default.a.createElement("div", { className: api_default.a.apiDoc }, react_default.a.createElement("h1", null, "API DOCS"), react_default.a.createElement(es_row, null, react_default.a.createElement(es_col, { md: 16, xs: 24 }, react_default.a.createElement("div", { className: api_default.a.list }, keys_default()(api_mockData).map(function (key) { return react_default.a.createElement(api_ApiItem, { key: key, req: key, data: api_mockData[key], onPostClick: _this4.handleShowData }); })))), react_default.a.createElement(modal, { title: "Response Body", visible: modalVisible, onOk: this.handleModalCancel, onCancel: this.handleModalCancel }, react_default.a.createElement(api_TextArea, { autosize: { minRows: 2, maxRows: 20 }, value: stringify_default()(theMockData, null, 2) }))); } }]); helpers_inherits_default()(ApiDoc, _Component2); return ApiDoc; }(react["Component"]); react_dom_default.a.render(react_default.a.createElement(api_ApiDoc, null), document.body); /***/ }), /***/ "nFDa": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("i+u+"); __webpack_require__("COf8"); module.exports = __webpack_require__("ZxII").f('iterator'); /***/ }), /***/ "nhsl": /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /***/ "o+hE": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("eOjq"); /***/ }), /***/ "o5Xk": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("49SQ"); /***/ }), /***/ "oVe7": /***/ (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; /***/ }), /***/ "oXMl": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__("xNmf") , root = typeof window === 'undefined' ? global : window , vendors = ['moz', 'webkit'] , suffix = 'AnimationFrame' , raf = root['request' + suffix] , caf = root['cancel' + suffix] || root['cancelRequest' + suffix] for(var i = 0; !raf && i < vendors.length; i++) { raf = root[vendors[i] + 'Request' + suffix] caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix] } // Some versions of FF have rAF but not cAF if(!raf || !caf) { var last = 0 , id = 0 , queue = [] , frameDuration = 1000 / 60 raf = function(callback) { if(queue.length === 0) { var _now = now() , next = Math.max(0, frameDuration - (_now - last)) last = next + _now setTimeout(function() { var cp = queue.slice(0) // Clear queue here to prevent // callbacks from appending listeners // to the current frame's queue queue.length = 0 for(var i = 0; i < cp.length; i++) { if(!cp[i].cancelled) { try{ cp[i].callback(last) } catch(e) { setTimeout(function() { throw e }, 0) } } } }, Math.round(next)) } queue.push({ handle: ++id, callback: callback, cancelled: false }) return id } caf = function(handle) { for(var i = 0; i < queue.length; i++) { if(queue[i].handle === handle) { queue[i].cancelled = true } } } } module.exports = function(fn) { // Wrap in a new function to prevent // `cancel` potentially being assigned // to the native rAF function return raf.call(root, fn) } module.exports.cancel = function() { caf.apply(root, arguments) } module.exports.polyfill = function(object) { if (!object) { object = root; } object.requestAnimationFrame = raf object.cancelAnimationFrame = caf } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("h6ac"))) /***/ }), /***/ "p/0c": /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /***/ "p/s9": /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__("d05+"), eq = __webpack_require__("LIpy"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /***/ "pK4Y": /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__("e5TX"), isObjectLike = __webpack_require__("OuyB"); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /***/ "pz6A": /***/ (function(module, exports) { // module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (ret !== void 0) { return !!ret; } if (objA === objB) { return true; } if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B. for (var idx = 0; idx < keysA.length; idx++) { var key = keysA[idx]; if (!bHasOwnProperty(key)) { return false; } var valueA = objA[key]; var valueB = objB[key]; ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; if (ret === false || (ret === void 0 && valueA !== valueB)) { return false; } } return true; }; /***/ }), /***/ "q1lp": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "q3B8": /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__("MIhM"); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /***/ "qBl2": /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /***/ "qE2F": /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__("ga8q"), getPrototype = __webpack_require__("CXf5"), isPrototype = __webpack_require__("nhsl"); /** * 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; /***/ }), /***/ "qXFa": /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__("a+zQ"); /* 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; /***/ }), /***/ "r1+p": /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__("HHEV"); var has = Object.prototype.hasOwnProperty; var defaults = { allowDots: false, allowPrototypes: false, arrayLimit: 20, decoder: utils.decode, delimiter: '&', depth: 5, parameterLimit: 1000, plainObjects: false, strictNullHandling: false }; var parseValues = function parseQueryStringValues(str, options) { var obj = {}; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); for (var i = 0; i < parts.length; ++i) { var part = parts[i]; var bracketEqualsPos = part.indexOf(']='); var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults.decoder); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos), defaults.decoder); val = options.decoder(part.slice(pos + 1), defaults.decoder); } if (has.call(obj, key)) { obj[key] = [].concat(obj[key]).concat(val); } else { obj[key] = val; } } return obj; }; var parseObject = function (chain, val, options) { var leaf = val; for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; if (root === '[]') { obj = []; obj = obj.concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = leaf; } else { obj[cleanRoot] = leaf; } } leaf = obj; } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; // The regex chunks var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; // Get the parent var segment = brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists var keys = []; if (parent) { // If we aren't using plain objects, optionally prefix keys // that would overwrite object prototype properties if (!options.plainObjects && has.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } // Loop through children appending to the array until we hit depth var i = 0; while ((segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options); }; module.exports = function (str, opts) { var options = opts ? utils.assign({}, opts) : {}; if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; options.parseArrays = options.parseArrays !== false; options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options); obj = utils.merge(obj, newObj, options); } return utils.compact(obj); }; /***/ }), /***/ "r8MY": /***/ (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; /***/ }), /***/ "rMkZ": /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__("Wyka"); var gOPN = __webpack_require__("Ni5N").f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }), /***/ "s4SJ": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__("MIhM"); /** 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__("l262")(module))) /***/ }), /***/ "s9iF": /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /***/ "skbs": /***/ (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; /***/ }), /***/ "suKy": /***/ (function(module, exports, __webpack_require__) { var MediaQueryDispatch = __webpack_require__("A9HP"); module.exports = new MediaQueryDispatch(); /***/ }), /***/ "sxPs": /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__("z7R8"); var createDesc = __webpack_require__("0WCH"); var toIObject = __webpack_require__("Wyka"); var toPrimitive = __webpack_require__("EKwp"); var has = __webpack_require__("yS17"); var IE8_DOM_DEFINE = __webpack_require__("R6c1"); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__("6MLN") ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /***/ "tuDi": /***/ (function(module, exports) { /***/ }), /***/ "u5Za": /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Determine if a DOM element matches a CSS selector * * @param {Element} elem * @param {String} selector * @return {Boolean} * @api public */ function matches(elem, selector) { // Vendor-specific implementations of `Element.prototype.matches()`. var proto = window.Element.prototype; var nativeMatches = proto.matches || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector; if (!elem || elem.nodeType !== 1) { return false; } var parentElem = elem.parentNode; // use native 'matches' if (nativeMatches) { return nativeMatches.call(elem, selector); } // native support for `matches` is missing and a fallback is required var nodes = parentElem.querySelectorAll(selector); var len = nodes.length; for (var i = 0; i < len; i++) { if (nodes[i] === elem) { return true; } } return false; } /** * Expose `matches` */ module.exports = matches; /***/ }), /***/ "u9vI": /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /***/ "uRfg": /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__("1kq3"); var $export = __webpack_require__("vSO4"); var redefine = __webpack_require__("gojl"); var hide = __webpack_require__("akPY"); var Iterators = __webpack_require__("dhak"); var $iterCreate = __webpack_require__("b7Q2"); var setToStringTag = __webpack_require__("11Ut"); var getPrototypeOf = __webpack_require__("HHE0"); var ITERATOR = __webpack_require__("Ug9I")('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /***/ "uTT8": /***/ (function(module, exports, __webpack_require__) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactComponentWithPureRenderMixin */ var shallowEqual = __webpack_require__("kyq/"); function shallowCompare(instance, nextProps, nextState) { return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState); } /** * If your React component's render function is "pure", e.g. it will render the * same result given the same props and state, provide this mixin for a * considerable performance boost. * * Most React components have pure render functions. * * Example: * * var ReactComponentWithPureRenderMixin = * require('ReactComponentWithPureRenderMixin'); * React.createClass({ * mixins: [ReactComponentWithPureRenderMixin], * * render: function() { * return
    foo
    ; * } * }); * * Note: This only checks shallow equality for props and state. If these contain * complex data structures this mixin may have false-negatives for deeper * differences. Only mixin to components which have simple props and state, or * use `forceUpdate()` when you know deep data structures have changed. * * See https://facebook.github.io/react/docs/pure-render-mixin.html */ var ReactComponentWithPureRenderMixin = { shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) { return shallowCompare(this, nextProps, nextState); } }; module.exports = ReactComponentWithPureRenderMixin; /***/ }), /***/ "uiOY": /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__("wppe"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /***/ "uj5A": /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__("knrM"); var gOPS = __webpack_require__("Ocr3"); var pIE = __webpack_require__("z7R8"); var toObject = __webpack_require__("mbLO"); var IObject = __webpack_require__("E5Ce"); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__("wLcK")(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; } return T; } : $assign; /***/ }), /***/ "uy4o": /***/ (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; /***/ }), /***/ "v5sI": /***/ (function(module, exports) { module.exports = function(arr, obj){ if (arr.indexOf) return arr.indexOf(obj); for (var i = 0; i < arr.length; ++i) { if (arr[i] === obj) return i; } return -1; }; /***/ }), /***/ "vSO4": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("i1Q6"); var core = __webpack_require__("zKeE"); var ctx = __webpack_require__("3zRh"); var hide = __webpack_require__("akPY"); var has = __webpack_require__("yS17"); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /***/ "vUQk": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__("Gfzd"); var createDesc = __webpack_require__("0WCH"); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /***/ "vW3g": /***/ (function(module, exports) { /** * Gets the value at `key`, unless `key` is "__proto__". * * @private * @param {Object} object The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function safeGet(object, key) { return key == '__proto__' ? undefined : object[key]; } module.exports = safeGet; /***/ }), /***/ "vcHl": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("YD0x"); module.exports = __webpack_require__("zKeE").Object.assign; /***/ }), /***/ "w2IC": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__("Q17y"); /***/ }), /***/ "wLcK": /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /***/ "wRU+": /***/ (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; /***/ }), /***/ "wVGV": /***/ (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 ReactPropTypesSecret = __webpack_require__("Asjh"); function emptyFunction() {} module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim }; ReactPropTypes.checkPropTypes = emptyFunction; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /***/ "wppe": /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__("MIhM"); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /***/ "wtMJ": /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__("lBq7"), mapCacheDelete = __webpack_require__("cDyG"), mapCacheGet = __webpack_require__("G3gK"), mapCacheHas = __webpack_require__("85ue"), mapCacheSet = __webpack_require__("UY82"); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /***/ "x+C/": /***/ (function(module, exports) { /** * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ /** `Object#toString` result references. */ var arrayTag = '[object Array]', funcTag = '[object Function]'; /** Used to detect host constructors (Safari > 5). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** * Checks if `value` is object-like. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. */ function isObjectLike(value) { return !!value && typeof value == 'object'; } /** Used for native method references. */ var objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var fnToString = Function.prototype.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objToString = objectProto.toString; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /* Native method references for those with the same name as other `lodash` methods. */ var nativeIsArray = getNative(Array, 'isArray'); /** * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = object == null ? undefined : object[key]; return isNative(value) ? value : undefined; } /** * Checks if `value` is a valid array-like length. * * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(function() { return arguments; }()); * // => false */ var isArray = nativeIsArray || function(value) { return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; }; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in older versions of Chrome and Safari which return 'function' for regexes // and Safari 8 equivalents which return 'object' for typed array constructors. return isObject(value) && objToString.call(value) == funcTag; } /** * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(1); * // => false */ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; return !!value && (type == 'object' || type == 'function'); } /** * Checks if `value` is a native function. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, else `false`. * @example * * _.isNative(Array.prototype.push); * // => true * * _.isNative(_); * // => false */ function isNative(value) { if (value == null) { return false; } if (isFunction(value)) { return reIsNative.test(fnToString.call(value)); } return isObjectLike(value) && reIsHostCtor.test(value); } module.exports = isArray; /***/ }), /***/ "xDQX": /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__("yEjJ"); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /***/ "xNmf": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2 (function() { var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; if ((typeof performance !== "undefined" && performance !== null) && performance.now) { module.exports = function() { return performance.now(); }; } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { module.exports = function() { return (getNanoSeconds() - nodeLoadTime) / 1e6; }; hrtime = process.hrtime; getNanoSeconds = function() { var hr; hr = hrtime(); return hr[0] * 1e9 + hr[1]; }; moduleLoadTime = getNanoSeconds(); upTime = process.uptime() * 1e9; nodeLoadTime = moduleLoadTime - upTime; } else if (Date.now) { module.exports = function() { return Date.now() - loadTime; }; loadTime = Date.now(); } else { module.exports = function() { return new Date().getTime() - loadTime; }; loadTime = new Date().getTime(); } }).call(this); //# sourceMappingURL=performance-now.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("FN88"))) /***/ }), /***/ "xwD+": /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /***/ "yEjJ": /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__("LIpy"); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /***/ "yOG5": /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__("vSO4"); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: __webpack_require__("TNJq") }); /***/ }), /***/ "yS17": /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /***/ "ycyv": /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__("knrM"); var gOPS = __webpack_require__("Ocr3"); var pIE = __webpack_require__("z7R8"); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; /***/ }), /***/ "yeEC": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("cjsw"), __esModule: true }; /***/ }), /***/ "yeiR": /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__("Tnr5"), toKey = __webpack_require__("RQ0L"); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /***/ "yfX1": /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__("MIhM"); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /***/ "yubd": /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__("WqwZ"), createAssigner = __webpack_require__("gmQJ"); /** * 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; /***/ }), /***/ "z7R8": /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /***/ "zCAL": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; /***/ }), /***/ "zFy8": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "zKbo": /***/ (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 _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); exports.default = connect; var _react = __webpack_require__("1n8/"); var _react2 = _interopRequireDefault(_react); var _shallowequal = __webpack_require__("pz6A"); var _shallowequal2 = _interopRequireDefault(_shallowequal); var _hoistNonReactStatics = __webpack_require__("89El"); var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); var _PropTypes = __webpack_require__("hDW8"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; } function isStateless(Component) { return !Component.prototype.render; } var defaultMapStateToProps = function defaultMapStateToProps() { return {}; }; function connect(mapStateToProps) { var shouldSubscribe = !!mapStateToProps; var finnalMapStateToProps = mapStateToProps || defaultMapStateToProps; return function wrapWithConnect(WrappedComponent) { var Connect = function (_Component) { _inherits(Connect, _Component); function Connect(props, context) { _classCallCheck(this, Connect); var _this = _possibleConstructorReturn(this, (Connect.__proto__ || Object.getPrototypeOf(Connect)).call(this, props, context)); _this.handleChange = function () { if (!_this.unsubscribe) { return; } var nextState = finnalMapStateToProps(_this.store.getState(), _this.props); if (!(0, _shallowequal2.default)(_this.nextState, nextState)) { _this.nextState = nextState; _this.setState({ subscribed: nextState }); } }; _this.store = context.miniStore; _this.state = { subscribed: finnalMapStateToProps(_this.store.getState(), props) }; return _this; } _createClass(Connect, [{ key: 'componentDidMount', value: function componentDidMount() { this.trySubscribe(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.tryUnsubscribe(); } }, { key: 'trySubscribe', value: function trySubscribe() { if (shouldSubscribe) { this.unsubscribe = this.store.subscribe(this.handleChange); this.handleChange(); } } }, { key: 'tryUnsubscribe', value: function tryUnsubscribe() { if (this.unsubscribe) { this.unsubscribe(); this.unsubscribe = null; } } }, { key: 'getWrappedInstance', value: function getWrappedInstance() { return this.wrappedInstance; } }, { key: 'render', value: function render() { var _this2 = this; var props = _extends({}, this.props, this.state.subscribed, { store: this.store }); if (!isStateless(WrappedComponent)) { props = _extends({}, props, { ref: function ref(c) { return _this2.wrappedInstance = c; } }); } return _react2.default.createElement(WrappedComponent, props); } }]); return Connect; }(_react.Component); Connect.displayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; Connect.contextTypes = { miniStore: _PropTypes.storeShape.isRequired }; return (0, _hoistNonReactStatics2.default)(Connect, WrappedComponent); }; } /***/ }), /***/ "zKeE": /***/ (function(module, exports) { var core = module.exports = { version: '2.5.7' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /***/ "zb3a": /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__("yfX1"); /** * 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; /***/ }), /***/ "zotD": /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__("BxvP"); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }) /******/ });