UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

1,191 lines (987 loc) 4.57 MB
/*! * * antd v4.5.2 * * Copyright 2015-present, Alipay, Inc. * All rights reserved. * */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("moment"), require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["moment", "react", "react-dom"], factory); else if(typeof exports === 'object') exports["antd"] = factory(require("moment"), require("react"), require("react-dom")); else root["antd"] = factory(root["moment"], root["React"], root["ReactDOM"]); })(window, function(__WEBPACK_EXTERNAL_MODULE_moment__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) { 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] = { /******/ 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, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // 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 = "./index-with-locales.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./components sync recursive ^\\.\\/locale\\/.+_.+\\.tsx$": /*!**************************************************!*\ !*** ./components sync ^\.\/locale\/.+_.+\.tsx$ ***! \**************************************************/ /*! no static exports found */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { var map = { "./locale/ar_EG.tsx": "./components/locale/ar_EG.tsx", "./locale/az_AZ.tsx": "./components/locale/az_AZ.tsx", "./locale/bg_BG.tsx": "./components/locale/bg_BG.tsx", "./locale/ca_ES.tsx": "./components/locale/ca_ES.tsx", "./locale/cs_CZ.tsx": "./components/locale/cs_CZ.tsx", "./locale/da_DK.tsx": "./components/locale/da_DK.tsx", "./locale/de_DE.tsx": "./components/locale/de_DE.tsx", "./locale/el_GR.tsx": "./components/locale/el_GR.tsx", "./locale/en_GB.tsx": "./components/locale/en_GB.tsx", "./locale/en_US.tsx": "./components/locale/en_US.tsx", "./locale/es_ES.tsx": "./components/locale/es_ES.tsx", "./locale/et_EE.tsx": "./components/locale/et_EE.tsx", "./locale/fa_IR.tsx": "./components/locale/fa_IR.tsx", "./locale/fi_FI.tsx": "./components/locale/fi_FI.tsx", "./locale/fr_BE.tsx": "./components/locale/fr_BE.tsx", "./locale/fr_FR.tsx": "./components/locale/fr_FR.tsx", "./locale/ga_IE.tsx": "./components/locale/ga_IE.tsx", "./locale/he_IL.tsx": "./components/locale/he_IL.tsx", "./locale/hi_IN.tsx": "./components/locale/hi_IN.tsx", "./locale/hr_HR.tsx": "./components/locale/hr_HR.tsx", "./locale/hu_HU.tsx": "./components/locale/hu_HU.tsx", "./locale/hy_AM.tsx": "./components/locale/hy_AM.tsx", "./locale/id_ID.tsx": "./components/locale/id_ID.tsx", "./locale/is_IS.tsx": "./components/locale/is_IS.tsx", "./locale/it_IT.tsx": "./components/locale/it_IT.tsx", "./locale/ja_JP.tsx": "./components/locale/ja_JP.tsx", "./locale/kn_IN.tsx": "./components/locale/kn_IN.tsx", "./locale/ko_KR.tsx": "./components/locale/ko_KR.tsx", "./locale/ku_IQ.tsx": "./components/locale/ku_IQ.tsx", "./locale/lv_LV.tsx": "./components/locale/lv_LV.tsx", "./locale/mk_MK.tsx": "./components/locale/mk_MK.tsx", "./locale/mn_MN.tsx": "./components/locale/mn_MN.tsx", "./locale/ms_MY.tsx": "./components/locale/ms_MY.tsx", "./locale/nb_NO.tsx": "./components/locale/nb_NO.tsx", "./locale/ne_NP.tsx": "./components/locale/ne_NP.tsx", "./locale/nl_BE.tsx": "./components/locale/nl_BE.tsx", "./locale/nl_NL.tsx": "./components/locale/nl_NL.tsx", "./locale/pl_PL.tsx": "./components/locale/pl_PL.tsx", "./locale/pt_BR.tsx": "./components/locale/pt_BR.tsx", "./locale/pt_PT.tsx": "./components/locale/pt_PT.tsx", "./locale/ro_RO.tsx": "./components/locale/ro_RO.tsx", "./locale/ru_RU.tsx": "./components/locale/ru_RU.tsx", "./locale/sk_SK.tsx": "./components/locale/sk_SK.tsx", "./locale/sl_SI.tsx": "./components/locale/sl_SI.tsx", "./locale/sr_RS.tsx": "./components/locale/sr_RS.tsx", "./locale/sv_SE.tsx": "./components/locale/sv_SE.tsx", "./locale/ta_IN.tsx": "./components/locale/ta_IN.tsx", "./locale/th_TH.tsx": "./components/locale/th_TH.tsx", "./locale/tr_TR.tsx": "./components/locale/tr_TR.tsx", "./locale/uk_UA.tsx": "./components/locale/uk_UA.tsx", "./locale/vi_VN.tsx": "./components/locale/vi_VN.tsx", "./locale/zh_CN.tsx": "./components/locale/zh_CN.tsx", "./locale/zh_HK.tsx": "./components/locale/zh_HK.tsx", "./locale/zh_TW.tsx": "./components/locale/zh_TW.tsx" }; function webpackContext(req) { var id = webpackContextResolve(req); return __webpack_require__(id); } function webpackContextResolve(req) { if(!__webpack_require__.o(map, req)) { var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; } return map[req]; } webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "./components sync recursive ^\\.\\/locale\\/.+_.+\\.tsx$"; /***/ }), /***/ "./components/_util/colors.ts": /*!************************************!*\ !*** ./components/_util/colors.ts ***! \************************************/ /*! exports provided: PresetStatusColorTypes, PresetColorTypes */ /*! exports used: PresetColorTypes, PresetStatusColorTypes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return PresetStatusColorTypes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PresetColorTypes; }); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type */ "./components/_util/type.ts"); var PresetStatusColorTypes = Object(_type__WEBPACK_IMPORTED_MODULE_0__[/* tuple */ "a"])('success', 'processing', 'error', 'default', 'warning'); // eslint-disable-next-line import/prefer-default-export var PresetColorTypes = Object(_type__WEBPACK_IMPORTED_MODULE_0__[/* tuple */ "a"])('pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime'); /***/ }), /***/ "./components/_util/devWarning.ts": /*!****************************************!*\ !*** ./components/_util/devWarning.ts ***! \****************************************/ /*! exports provided: resetWarned, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/warning */ "./node_modules/_rc-util@5.0.6@rc-util/es/warning.js"); /* harmony default export */ __webpack_exports__["a"] = (function (valid, component, message) { if (true) Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(valid, "[antd: ".concat(component, "] ").concat(message)); }); /***/ }), /***/ "./components/_util/easings.ts": /*!*************************************!*\ !*** ./components/_util/easings.ts ***! \*************************************/ /*! exports provided: easeInOutCubic */ /*! exports used: easeInOutCubic */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return easeInOutCubic; }); // eslint-disable-next-line import/prefer-default-export function easeInOutCubic(t, b, c, d) { var cc = c - b; t /= d / 2; if (t < 1) { return cc / 2 * t * t * t + b; } // eslint-disable-next-line no-return-assign return cc / 2 * ((t -= 2) * t * t + 2) + b; } /***/ }), /***/ "./components/_util/getDataOrAriaProps.ts": /*!************************************************!*\ !*** ./components/_util/getDataOrAriaProps.ts ***! \************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDataOrAriaProps; }); function getDataOrAriaProps(props) { return Object.keys(props).reduce(function (prev, key) { if ((key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') && key.substr(0, 7) !== 'data-__') { prev[key] = props[key]; } return prev; }, {}); } /***/ }), /***/ "./components/_util/getRenderPropValue.ts": /*!************************************************!*\ !*** ./components/_util/getRenderPropValue.ts ***! \************************************************/ /*! exports provided: getRenderPropValue */ /*! exports used: getRenderPropValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getRenderPropValue; }); var getRenderPropValue = function getRenderPropValue(propValue) { if (!propValue) { return null; } var isRenderFunction = typeof propValue === 'function'; if (isRenderFunction) { return propValue(); } return propValue; }; /***/ }), /***/ "./components/_util/getScroll.tsx": /*!****************************************!*\ !*** ./components/_util/getScroll.tsx ***! \****************************************/ /*! exports provided: isWindow, default */ /*! exports used: default, isWindow */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isWindow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getScroll; }); function isWindow(obj) { return obj !== null && obj !== undefined && obj === obj.window; } function getScroll(target, top) { if (typeof window === 'undefined') { return 0; } var method = top ? 'scrollTop' : 'scrollLeft'; var result = 0; if (isWindow(target)) { result = target[top ? 'pageYOffset' : 'pageXOffset']; } else if (target instanceof Document) { result = target.documentElement[method]; } else if (target) { result = target[method]; } if (target && !isWindow(target) && typeof result !== 'number') { result = (target.ownerDocument || target).documentElement[method]; } return result; } /***/ }), /***/ "./components/_util/isNumeric.ts": /*!***************************************!*\ !*** ./components/_util/isNumeric.ts ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var isNumeric = function isNumeric(value) { return !isNaN(parseFloat(value)) && isFinite(value); }; /* harmony default export */ __webpack_exports__["a"] = (isNumeric); /***/ }), /***/ "./components/_util/motion.tsx": /*!*************************************!*\ !*** ./components/_util/motion.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ================== Collapse Motion ================== var getCollapsedHeight = function getCollapsedHeight() { return { height: 0, opacity: 0 }; }; var getRealHeight = function getRealHeight(node) { return { height: node.scrollHeight, opacity: 1 }; }; var getCurrentHeight = function getCurrentHeight(node) { return { height: node.offsetHeight }; }; var skipOpacityTransition = function skipOpacityTransition(_, event) { return event.propertyName === 'height'; }; var collapseMotion = { motionName: 'ant-motion-collapse', onAppearStart: getCollapsedHeight, onEnterStart: getCollapsedHeight, onAppearActive: getRealHeight, onEnterActive: getRealHeight, onLeaveStart: getCurrentHeight, onLeaveActive: getCollapsedHeight, onAppearEnd: skipOpacityTransition, onEnterEnd: skipOpacityTransition, onLeaveEnd: skipOpacityTransition, motionDeadline: 500 }; /* harmony default export */ __webpack_exports__["a"] = (collapseMotion); /***/ }), /***/ "./components/_util/openAnimation.tsx": /*!********************************************!*\ !*** ./components/_util/openAnimation.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _ant_design_css_animation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/css-animation */ "./node_modules/_@ant-design_css-animation@1.7.3@@ant-design/css-animation/es/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raf */ "./node_modules/_raf@3.4.1@raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_1__); /** * Deprecated. We should replace the animation with pure react motion instead of modify style directly. * If you are creating new component with animation, please use `./motion`. */ function animate(node, show, done) { var height; var requestAnimationFrameId; return Object(_ant_design_css_animation__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(node, 'ant-motion-collapse-legacy', { start: function start() { if (!show) { node.style.height = "".concat(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__WEBPACK_IMPORTED_MODULE_1___default.a.cancel(requestAnimationFrameId); } requestAnimationFrameId = raf__WEBPACK_IMPORTED_MODULE_1___default()(function () { node.style.height = "".concat(show ? height : 0, "px"); node.style.opacity = show ? '1' : '0'; }); }, end: function end() { if (requestAnimationFrameId) { raf__WEBPACK_IMPORTED_MODULE_1___default.a.cancel(requestAnimationFrameId); } node.style.height = ''; node.style.opacity = ''; done(); } }); } var 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 */ __webpack_exports__["a"] = (animation); /***/ }), /***/ "./components/_util/raf.ts": /*!*********************************!*\ !*** ./components/_util/raf.ts ***! \*********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return wrapperRaf; }); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raf */ "./node_modules/_raf@3.4.1@raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_0__); var id = 0; var ids = {}; // Support call raf with delay specified frame function wrapperRaf(callback) { var delayFrames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var myId = id++; var restFrames = delayFrames; function internalCallback() { restFrames -= 1; if (restFrames <= 0) { callback(); delete ids[myId]; } else { ids[myId] = raf__WEBPACK_IMPORTED_MODULE_0___default()(internalCallback); } } ids[myId] = raf__WEBPACK_IMPORTED_MODULE_0___default()(internalCallback); return myId; } wrapperRaf.cancel = function cancel(pid) { if (pid === undefined) return; raf__WEBPACK_IMPORTED_MODULE_0___default.a.cancel(ids[pid]); delete ids[pid]; }; wrapperRaf.ids = ids; // export this for test usage /***/ }), /***/ "./components/_util/reactNode.ts": /*!***************************************!*\ !*** ./components/_util/reactNode.ts ***! \***************************************/ /*! exports provided: isValidElement, replaceElement, cloneElement */ /*! exports used: cloneElement, isValidElement, replaceElement */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isValidElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return replaceElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cloneElement; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var isValidElement = react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"]; function replaceElement(element, replacement, props) { if (!isValidElement(element)) return replacement; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](element, typeof props === 'function' ? props() : props); } function cloneElement(element, props) { return replaceElement(element, element, props); } /***/ }), /***/ "./components/_util/ref.ts": /*!*********************************!*\ !*** ./components/_util/ref.ts ***! \*********************************/ /*! exports provided: fillRef, composeRef */ /*! exports used: composeRef */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export fillRef */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return composeRef; }); /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/typeof.js"); /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__); function fillRef(ref, node) { if (typeof ref === 'function') { ref(node); } else if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(ref) === 'object' && ref && 'current' in ref) { ref.current = node; } } function composeRef() { for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) { refs[_key] = arguments[_key]; } return function (node) { refs.forEach(function (ref) { fillRef(ref, node); }); }; } /***/ }), /***/ "./components/_util/responsiveObserve.ts": /*!***********************************************!*\ !*** ./components/_util/responsiveObserve.ts ***! \***********************************************/ /*! exports provided: responsiveArray, responsiveMap, default */ /*! exports used: default, responsiveArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return responsiveArray; }); /* unused harmony export responsiveMap */ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/extends.js"); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); 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 subscribers = new Map(); var subUid = -1; var screens = {}; var responsiveObserve = { matchHandlers: {}, dispatch: function dispatch(pointMap) { screens = pointMap; subscribers.forEach(function (func) { return func(screens); }); return subscribers.size >= 1; }, subscribe: function subscribe(func) { if (!subscribers.size) this.register(); subUid += 1; subscribers.set(subUid, func); func(screens); return subUid; }, unsubscribe: function unsubscribe(token) { subscribers["delete"](token); if (!subscribers.size) this.unregister(); }, unregister: function unregister() { var _this = this; Object.keys(responsiveMap).forEach(function (screen) { var matchMediaQuery = responsiveMap[screen]; var handler = _this.matchHandlers[matchMediaQuery]; handler === null || handler === void 0 ? void 0 : handler.mql.removeListener(handler === null || handler === void 0 ? void 0 : handler.listener); }); subscribers.clear(); }, register: function register() { var _this2 = this; Object.keys(responsiveMap).forEach(function (screen) { var matchMediaQuery = responsiveMap[screen]; var listener = function listener(_ref) { var matches = _ref.matches; _this2.dispatch(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, screens), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, screen, matches))); }; var mql = window.matchMedia(matchMediaQuery); mql.addListener(listener); _this2.matchHandlers[matchMediaQuery] = { mql: mql, listener: listener }; listener(mql); }); } }; /* harmony default export */ __webpack_exports__["a"] = (responsiveObserve); /***/ }), /***/ "./components/_util/scrollTo.ts": /*!**************************************!*\ !*** ./components/_util/scrollTo.ts ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scrollTo; }); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raf */ "./node_modules/_raf@3.4.1@raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _getScroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getScroll */ "./components/_util/getScroll.tsx"); /* harmony import */ var _easings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./easings */ "./components/_util/easings.ts"); function scrollTo(y) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var _options$getContainer = options.getContainer, getContainer = _options$getContainer === void 0 ? function () { return window; } : _options$getContainer, callback = options.callback, _options$duration = options.duration, duration = _options$duration === void 0 ? 450 : _options$duration; var container = getContainer(); var scrollTop = Object(_getScroll__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(container, true); var startTime = Date.now(); var frameFunc = function frameFunc() { var timestamp = Date.now(); var time = timestamp - startTime; var nextScrollTop = Object(_easings__WEBPACK_IMPORTED_MODULE_2__[/* easeInOutCubic */ "a"])(time > duration ? duration : time, scrollTop, y, duration); if (Object(_getScroll__WEBPACK_IMPORTED_MODULE_1__[/* isWindow */ "b"])(container)) { container.scrollTo(window.pageXOffset, nextScrollTop); } else if (container instanceof HTMLDocument || container.constructor.name === 'HTMLDocument') { container.documentElement.scrollTop = nextScrollTop; } else { container.scrollTop = nextScrollTop; } if (time < duration) { raf__WEBPACK_IMPORTED_MODULE_0___default()(frameFunc); } else if (typeof callback === 'function') { callback(); } }; raf__WEBPACK_IMPORTED_MODULE_0___default()(frameFunc); } /***/ }), /***/ "./components/_util/styleChecker.tsx": /*!*******************************************!*\ !*** ./components/_util/styleChecker.tsx ***! \*******************************************/ /*! exports provided: isFlexSupported, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export isFlexSupported */ var isStyleSupport = function isStyleSupport(styleName) { if (typeof window !== 'undefined' && window.document && window.document.documentElement) { var styleNameList = Array.isArray(styleName) ? styleName : [styleName]; var documentElement = window.document.documentElement; return styleNameList.some(function (name) { return name in documentElement.style; }); } return false; }; var isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']); /* harmony default export */ __webpack_exports__["a"] = (isStyleSupport); /***/ }), /***/ "./components/_util/throttleByAnimationFrame.tsx": /*!*******************************************************!*\ !*** ./components/_util/throttleByAnimationFrame.tsx ***! \*******************************************************/ /*! exports provided: default, throttleByAnimationFrameDecorator */ /*! exports used: default, throttleByAnimationFrameDecorator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throttleByAnimationFrame; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return throttleByAnimationFrameDecorator; }); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raf */ "./node_modules/_raf@3.4.1@raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_1__); function throttleByAnimationFrame(fn) { var requestId; var later = function later(args) { return function () { requestId = null; fn.apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(args)); }; }; var throttled = function throttled() { if (requestId == null) { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } requestId = raf__WEBPACK_IMPORTED_MODULE_1___default()(later(args)); } }; throttled.cancel = function () { return raf__WEBPACK_IMPORTED_MODULE_1___default.a.cancel(requestId); }; return throttled; } function throttleByAnimationFrameDecorator() { // eslint-disable-next-line func-names return function (target, key, descriptor) { var fn = descriptor.value; var definingProperty = false; return { configurable: true, get: function get() { // eslint-disable-next-line no-prototype-builtins 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; } }; }; } /***/ }), /***/ "./components/_util/transButton.tsx": /*!******************************************!*\ !*** ./components/_util/transButton.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/extends.js"); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/createClass.js"); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/inherits.js"); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createSuper */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/createSuper.js"); /* harmony import */ var _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/_rc-util@5.0.6@rc-util/es/KeyCode.js"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; /** * Wrap of sub component which need use as Button capacity (like Icon component). * This helps accessibility reader to tread as a interactive button to operation. */ var inlineStyle = { border: 0, background: 'transparent', padding: 0, lineHeight: 'inherit', display: 'inline-block' }; var TransButton = /*#__PURE__*/function (_React$Component) { _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(TransButton, _React$Component); var _super = _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_4___default()(TransButton); function TransButton() { var _this; _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, TransButton); _this = _super.apply(this, arguments); _this.onKeyDown = function (event) { var keyCode = event.keyCode; if (keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].ENTER) { event.preventDefault(); } }; _this.onKeyUp = function (event) { var keyCode = event.keyCode; var onClick = _this.props.onClick; if (keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].ENTER && onClick) { onClick(); } }; _this.setRef = function (btn) { _this.div = btn; }; return _this; } _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(TransButton, [{ key: "componentDidMount", value: function componentDidMount() { var autoFocus = this.props.autoFocus; if (autoFocus) { this.focus(); } } }, { key: "focus", value: function focus() { if (this.div) { this.div.focus(); } } }, { key: "blur", value: function blur() { if (this.div) { this.div.blur(); } } }, { key: "render", value: function render() { var _a = this.props, style = _a.style, noStyle = _a.noStyle, disabled = _a.disabled, restProps = __rest(_a, ["style", "noStyle", "disabled"]); var mergedStyle = {}; if (!noStyle) { mergedStyle = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, inlineStyle); } if (disabled) { mergedStyle.pointerEvents = 'none'; } mergedStyle = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, mergedStyle), style); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ role: "button", tabIndex: 0, ref: this.setRef }, restProps, { onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp, style: mergedStyle })); } }]); return TransButton; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); /* harmony default export */ __webpack_exports__["a"] = (TransButton); /***/ }), /***/ "./components/_util/type.ts": /*!**********************************!*\ !*** ./components/_util/type.ts ***! \**********************************/ /*! exports provided: tuple, tupleNum */ /*! exports used: tuple, tupleNum */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return tuple; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return tupleNum; }); // https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead var tuple = function tuple() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return args; }; var tupleNum = function tupleNum() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return args; }; /***/ }), /***/ "./components/_util/unreachableException.ts": /*!**************************************************!*\ !*** ./components/_util/unreachableException.ts ***! \**************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UnreachableException; }); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); var UnreachableException = function UnreachableException(value) { _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, UnreachableException); return new Error("unreachable case: ".concat(JSON.stringify(value))); }; /***/ }), /***/ "./components/_util/usePatchElement.tsx": /*!**********************************************!*\ !*** ./components/_util/usePatchElement.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return usePatchElement; }); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); function usePatchElement() { var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"]([]), _React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_React$useState, 2), elements = _React$useState2[0], setElements = _React$useState2[1]; function patchElement(element) { // append a new element to elements (and create a new ref) setElements(function (originElements) { return [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(originElements), [element]); }); // return a function that removes the new element out of elements (and create a new ref) // it works a little like useEffect return function () { setElements(function (originElements) { return originElements.filter(function (ele) { return ele !== element; }); }); }; } return [elements, patchElement]; } /***/ }), /***/ "./components/_util/wave.tsx": /*!***********************************!*\ !*** ./components/_util/wave.tsx ***! \***********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Wave; }); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/createClass.js"); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/inherits.js"); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createSuper */ "./node_modules/_@babel_runtime@7.11.0@@babel/runtime/helpers/createSuper.js"); /* harmony import */ var _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _ant_design_css_animation_es_Event__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/css-animation/es/Event */ "./node_modules/_@ant-design_css-animation@1.7.3@@ant-design/css-animation/es/Event.js"); /* harmony import */ var _raf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./raf */ "./components/_util/raf.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var styleForPesudo; // Where el is the DOM element you'd like to test for visibility function isHidden(element) { if (false) {} return !element || element.offsetParent === null; } function isNotGrey(color) { // eslint-disable-next-line no-useless-escape var match = (color || '').match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/); if (match && match[1] && match[2] && match[3]) { return !(match[1] === match[2] && match[2] === match[3]); } return true; } var Wave = /*#__PURE__*/function (_React$Component) { _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Wave, _React$Component); var _super = _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_4___default()(Wave); function Wave() { var _this; _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Wave); _this = _super.apply(this, arguments); _this.animationStart = false; _this.destroyed = false; _this.onClick = function (node, waveColor) { if (!node || isHidden(node) || node.className.indexOf('-leave') >= 0) { return; } var insertExtraNode = _this.props.insertExtraNode; _this.extraNode = document.createElement('div'); var _assertThisInitialize = _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), extraNode = _assertThisInitialize.extraNode; var getPrefixCls = _this.context.getPrefixCls; extraNode.className = "".concat(getPrefixCls(''), "-click-animating-node"); var attributeName = _this.getAttributeName(); node.setAttribute(attributeName, 'true'); // Not white or transparnt or grey styleForPesudo = styleForPesudo || document.createElement('style'); if (waveColor && waveColor !== '#ffffff' && waveColor !== 'rgb(255, 255, 255)' && isNotGrey(waveColor) && !/rgba\((?:\d*, ){3}0\)/.test(waveColor) && // any transparent rgba color waveColor !== 'transparent') { // Add nonce if CSP exist if (_this.csp && _this.csp.nonce) { styleForPesudo.nonce = _this.csp.nonce; } extraNode.style.borderColor = waveColor; styleForPesudo.innerHTML = "\n [".concat(getPrefixCls(''), "-click-animating-without-extra-node='true']::after, .").concat(getPrefixCls(''), "-click-animating-node {\n --antd-wave-shadow-color: ").concat(waveColor, ";\n }"); if (!document.body.contains(styleForPesudo)) { document.body.appendChild(styleForPesudo); } } if (insertExtraNode) { node.appendChild(extraNode); } _ant_design_css_animation_es_Event__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].addStartEventListener(node, _this.onTransitionStart); _ant_design_css_animatio