diff --git a/11328.async.js b/11328.async.js index 79bfaf5176..7e4e136622 100644 --- a/11328.async.js +++ b/11328.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[11328,59606,93691,58447,77075,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[11328,59606,93691,58447,77075,94657,64649,33893,9277,54682,68282],{ /***/ 85418: /*!************************************************************!*\ diff --git a/11383.async.js b/11383.async.js new file mode 100644 index 0000000000..a9dd587271 --- /dev/null +++ b/11383.async.js @@ -0,0 +1,4099 @@ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[11383,35479,89777],{ + +/***/ 18429: +/*!************************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js + 1 modules ***! + \************************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_CloseCircleOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(87462); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/CloseCircleOutlined.js +// This icon file is generated automatically. +var CloseCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z" } }, { "tag": "path", "attrs": { "d": "M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "close-circle", "theme": "outlined" }; +/* harmony default export */ var asn_CloseCircleOutlined = (CloseCircleOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules +var AntdIcon = __webpack_require__(74643); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var CloseCircleOutlined_CloseCircleOutlined = function CloseCircleOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_CloseCircleOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_CloseCircleOutlined = (/*#__PURE__*/react.forwardRef(CloseCircleOutlined_CloseCircleOutlined)); + +/***/ }), + +/***/ 11475: +/*!******************************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***! + \******************************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_ExclamationCircleOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(87462); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js +// This icon file is generated automatically. +var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" }; +/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules +var AntdIcon = __webpack_require__(74643); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_ExclamationCircleOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined)); + +/***/ }), + +/***/ 77123: +/*!*****************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/FormOutlined.js + 1 modules ***! + \*****************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_FormOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(87462); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/FormOutlined.js +// This icon file is generated automatically. +var FormOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z" } }] }, "name": "form", "theme": "outlined" }; +/* harmony default export */ var asn_FormOutlined = (FormOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules +var AntdIcon = __webpack_require__(74643); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/FormOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var FormOutlined_FormOutlined = function FormOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_FormOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_FormOutlined = (/*#__PURE__*/react.forwardRef(FormOutlined_FormOutlined)); + +/***/ }), + +/***/ 64082: +/*!******************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***! + \******************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_InboxOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(87462); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js +// This icon file is generated automatically. +var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" }; +/* harmony default export */ var asn_InboxOutlined = (InboxOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules +var AntdIcon = __webpack_require__(74643); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_InboxOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/react.forwardRef(InboxOutlined_InboxOutlined)); + +/***/ }), + +/***/ 3089: +/*!************************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.js + 1 modules ***! + \************************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_MinusCircleOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(87462); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/MinusCircleOutlined.js +// This icon file is generated automatically. +var MinusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "minus-circle", "theme": "outlined" }; +/* harmony default export */ var asn_MinusCircleOutlined = (MinusCircleOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules +var AntdIcon = __webpack_require__(74643); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var MinusCircleOutlined_MinusCircleOutlined = function MinusCircleOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_MinusCircleOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_MinusCircleOutlined = (/*#__PURE__*/react.forwardRef(MinusCircleOutlined_MinusCircleOutlined)); + +/***/ }), + +/***/ 33160: +/*!*******************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***! + \*******************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_ReloadOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(87462); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ReloadOutlined.js +// This icon file is generated automatically. +var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" }; +/* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules +var AntdIcon = __webpack_require__(74643); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_ReloadOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_ReloadOutlined = (/*#__PURE__*/react.forwardRef(ReloadOutlined_ReloadOutlined)); + +/***/ }), + +/***/ 88484: +/*!*******************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/UploadOutlined.js + 1 modules ***! + \*******************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_UploadOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(87462); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/UploadOutlined.js +// This icon file is generated automatically. +var UploadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "upload", "theme": "outlined" }; +/* harmony default export */ var asn_UploadOutlined = (UploadOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules +var AntdIcon = __webpack_require__(74643); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/UploadOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var UploadOutlined_UploadOutlined = function UploadOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_UploadOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_UploadOutlined = (/*#__PURE__*/react.forwardRef(UploadOutlined_UploadOutlined)); + +/***/ }), + +/***/ 49288: +/*!*****************************************************!*\ + !*** ./node_modules/antd/es/auto-complete/index.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Children/toArray */ 37419); +/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ 10366); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 67294); +/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/PurePanel */ 8745); +/* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/reactNode */ 96159); +/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ 53124); +/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../select */ 79035); +'use client'; + + + + + + + + + + +const { + Option +} = _select__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z; +function isSelectOptionOrSelectOptGroup(child) { + return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup); +} +const AutoComplete = (props, ref) => { + const { + prefixCls: customizePrefixCls, + className, + popupClassName, + dropdownClassName, + children, + dataSource + } = props; + const childNodes = (0,rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(children); + // ============================= Input ============================= + let customizeInput; + if (childNodes.length === 1 && (0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) { + [customizeInput] = childNodes; + } + const getInputElement = customizeInput ? () => customizeInput : undefined; + // ============================ Options ============================ + let optionChildren; + // [Legacy] convert `children` or `dataSource` into option children + if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) { + optionChildren = children; + } else { + optionChildren = dataSource ? dataSource.map(item => { + if ((0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(item)) { + return item; + } + switch (typeof item) { + case 'string': + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, { + key: item, + value: item + }, item); + case 'object': + { + const { + value: optionValue + } = item; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, { + key: optionValue, + value: optionValue + }, item.text); + } + default: + false ? 0 : void 0; + return undefined; + } + }) : []; + } + if (false) {} + const { + getPrefixCls + } = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_5__/* .ConfigContext */ .E_); + const prefixCls = getPrefixCls('select', customizePrefixCls); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_select__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, Object.assign({ + ref: ref, + showArrow: false + }, (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props, ['dataSource', 'dropdownClassName']), { + prefixCls: prefixCls, + popupClassName: popupClassName || dropdownClassName, + className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(`${prefixCls}-auto-complete`, className), + mode: _select__WEBPACK_IMPORTED_MODULE_3__/* ["default"].SECRET_COMBOBOX_MODE_DO_NOT_USE */ .Z.SECRET_COMBOBOX_MODE_DO_NOT_USE, + // Internal api + getInputElement + }), optionChildren); +}; +const RefAutoComplete = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(AutoComplete); +// We don't care debug panel +/* istanbul ignore next */ +const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(RefAutoComplete); +RefAutoComplete.Option = Option; +RefAutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel; +if (false) {} +/* harmony default export */ __webpack_exports__["Z"] = (RefAutoComplete); + +/***/ }), + +/***/ 35479: +/*!***********************************************************!*\ + !*** ./node_modules/antd/es/drawer/index.js + 16 modules ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ drawer; } +}); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__(94184); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__(1413); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules +var slicedToArray = __webpack_require__(97685); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +// EXTERNAL MODULE: ./node_modules/react-dom/index.js +var react_dom = __webpack_require__(73935); +// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js +var Dom_canUseDom = __webpack_require__(98924); +// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js +var es_warning = __webpack_require__(80334); +// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js +var es_ref = __webpack_require__(42550); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/Context.js + +var OrderContext = /*#__PURE__*/react.createContext(null); +/* harmony default export */ var Context = (OrderContext); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules +var toConsumableArray = __webpack_require__(74902); +// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js +var useLayoutEffect = __webpack_require__(8410); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/useDom.js + + + + + + +var EMPTY_LIST = []; + +/** + * Will add `div` to document. Nest call will keep order + * @param render Render DOM in document + */ +function useDom(render, debug) { + var _React$useState = react.useState(function () { + if (!(0,Dom_canUseDom/* default */.Z)()) { + return null; + } + var defaultEle = document.createElement('div'); + if (false) {} + return defaultEle; + }), + _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 1), + ele = _React$useState2[0]; + + // ========================== Order ========================== + var appendedRef = react.useRef(false); + var queueCreate = react.useContext(Context); + var _React$useState3 = react.useState(EMPTY_LIST), + _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), + queue = _React$useState4[0], + setQueue = _React$useState4[1]; + var mergedQueueCreate = queueCreate || (appendedRef.current ? undefined : function (appendFn) { + setQueue(function (origin) { + var newQueue = [appendFn].concat((0,toConsumableArray/* default */.Z)(origin)); + return newQueue; + }); + }); + + // =========================== DOM =========================== + function append() { + if (!ele.parentElement) { + document.body.appendChild(ele); + } + appendedRef.current = true; + } + function cleanup() { + var _ele$parentElement; + (_ele$parentElement = ele.parentElement) === null || _ele$parentElement === void 0 ? void 0 : _ele$parentElement.removeChild(ele); + appendedRef.current = false; + } + (0,useLayoutEffect/* default */.Z)(function () { + if (render) { + if (queueCreate) { + queueCreate(append); + } else { + append(); + } + } else { + cleanup(); + } + return cleanup; + }, [render]); + (0,useLayoutEffect/* default */.Z)(function () { + if (queue.length) { + queue.forEach(function (appendFn) { + return appendFn(); + }); + setQueue(EMPTY_LIST); + } + }, [queue]); + return [ele, mergedQueueCreate]; +} +// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js + 1 modules +var dynamicCSS = __webpack_require__(48981); +// EXTERNAL MODULE: ./node_modules/rc-util/es/getScrollBarSize.js +var getScrollBarSize = __webpack_require__(74204); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/util.js +/** + * Test usage export. Do not use in your production + */ +function isBodyOverflowing() { + return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth; +} +;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/useScrollLocker.js + + + + + + +var UNIQUE_ID = "rc-util-locker-".concat(Date.now()); +var uuid = 0; +function useScrollLocker(lock) { + var mergedLock = !!lock; + var _React$useState = react.useState(function () { + uuid += 1; + return "".concat(UNIQUE_ID, "_").concat(uuid); + }), + _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 1), + id = _React$useState2[0]; + (0,useLayoutEffect/* default */.Z)(function () { + if (mergedLock) { + var scrollbarSize = (0,getScrollBarSize/* getTargetScrollBarSize */.o)(document.body).width; + var isOverflow = isBodyOverflowing(); + (0,dynamicCSS/* updateCSS */.hq)("\nhtml body {\n overflow-y: hidden;\n ".concat(isOverflow ? "width: calc(100% - ".concat(scrollbarSize, "px);") : '', "\n}"), id); + } else { + (0,dynamicCSS/* removeCSS */.jL)(id); + } + return function () { + (0,dynamicCSS/* removeCSS */.jL)(id); + }; + }, [mergedLock, id]); +} +;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/mock.js +var inline = false; +function inlineMock(nextInline) { + if (typeof nextInline === 'boolean') { + inline = nextInline; + } + return inline; +} +;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/Portal.js + + + + + + + + + + +var getPortalContainer = function getPortalContainer(getContainer) { + if (getContainer === false) { + return false; + } + if (!(0,Dom_canUseDom/* default */.Z)() || !getContainer) { + return null; + } + if (typeof getContainer === 'string') { + return document.querySelector(getContainer); + } + if (typeof getContainer === 'function') { + return getContainer(); + } + return getContainer; +}; +var Portal = /*#__PURE__*/react.forwardRef(function (props, ref) { + var open = props.open, + autoLock = props.autoLock, + getContainer = props.getContainer, + debug = props.debug, + _props$autoDestroy = props.autoDestroy, + autoDestroy = _props$autoDestroy === void 0 ? true : _props$autoDestroy, + children = props.children; + var _React$useState = react.useState(open), + _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), + shouldRender = _React$useState2[0], + setShouldRender = _React$useState2[1]; + var mergedRender = shouldRender || open; + + // ========================= Warning ========================= + if (false) {} + + // ====================== Should Render ====================== + react.useEffect(function () { + if (autoDestroy || open) { + setShouldRender(open); + } + }, [open, autoDestroy]); + + // ======================== Container ======================== + var _React$useState3 = react.useState(function () { + return getPortalContainer(getContainer); + }), + _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), + innerContainer = _React$useState4[0], + setInnerContainer = _React$useState4[1]; + react.useEffect(function () { + var customizeContainer = getPortalContainer(getContainer); + + // Tell component that we check this in effect which is safe to be `null` + setInnerContainer(customizeContainer !== null && customizeContainer !== void 0 ? customizeContainer : null); + }); + var _useDom = useDom(mergedRender && !innerContainer, debug), + _useDom2 = (0,slicedToArray/* default */.Z)(_useDom, 2), + defaultContainer = _useDom2[0], + queueCreate = _useDom2[1]; + var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer; + + // ========================= Locker ========================== + useScrollLocker(autoLock && open && (0,Dom_canUseDom/* default */.Z)() && (mergedContainer === defaultContainer || mergedContainer === document.body)); + + // =========================== Ref =========================== + var childRef = null; + if (children && (0,es_ref/* supportRef */.Yr)(children) && ref) { + var _ref = children; + childRef = _ref.ref; + } + var mergedRef = (0,es_ref/* useComposeRef */.x1)(childRef, ref); + + // ========================= Render ========================== + // Do not render when nothing need render + // When innerContainer is `undefined`, it may not ready since user use ref in the same render + if (!mergedRender || !(0,Dom_canUseDom/* default */.Z)() || innerContainer === undefined) { + return null; + } + + // Render inline + var renderInline = mergedContainer === false || inlineMock(); + var reffedChildren = children; + if (ref) { + reffedChildren = /*#__PURE__*/react.cloneElement(children, { + ref: mergedRef + }); + } + return /*#__PURE__*/react.createElement(Context.Provider, { + value: queueCreate + }, renderInline ? reffedChildren : /*#__PURE__*/(0,react_dom.createPortal)(reffedChildren, mergedContainer)); +}); +if (false) {} +/* harmony default export */ var es_Portal = (Portal); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/index.js + + + +/* harmony default export */ var es = (es_Portal); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__(4942); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(87462); +// EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 11 modules +var rc_motion_es = __webpack_require__(62874); +// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js +var KeyCode = __webpack_require__(15105); +// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js +var pickAttrs = __webpack_require__(64217); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/context.js + +var DrawerContext = /*#__PURE__*/react.createContext(null); +/* harmony default export */ var context = (DrawerContext); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/DrawerPanel.js + + + + +var DrawerPanel = function DrawerPanel(props) { + var prefixCls = props.prefixCls, + className = props.className, + style = props.style, + children = props.children, + containerRef = props.containerRef, + onMouseEnter = props.onMouseEnter, + onMouseOver = props.onMouseOver, + onMouseLeave = props.onMouseLeave, + onClick = props.onClick, + onKeyDown = props.onKeyDown, + onKeyUp = props.onKeyUp; + var eventHandlers = { + onMouseEnter: onMouseEnter, + onMouseOver: onMouseOver, + onMouseLeave: onMouseLeave, + onClick: onClick, + onKeyDown: onKeyDown, + onKeyUp: onKeyUp + }; + // =============================== Render =============================== + return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({ + className: classnames_default()("".concat(prefixCls, "-content"), className), + style: (0,objectSpread2/* default */.Z)({}, style), + "aria-modal": "true", + role: "dialog", + ref: containerRef + }, eventHandlers), children)); +}; +if (false) {} +/* harmony default export */ var es_DrawerPanel = (DrawerPanel); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/util.js + + +function parseWidthHeight(value) { + if (typeof value === 'string' && String(Number(value)) === value) { + (0,es_warning/* default */.ZP)(false, 'Invalid value type of `width` or `height` which should be number type instead.'); + return Number(value); + } + return value; +} +function warnCheck(props) { + warning(!('wrapperClassName' in props), "'wrapperClassName' is removed. Please use 'rootClassName' instead."); + warning(canUseDom() || !props.open, "Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead."); +} +;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/DrawerPopup.js + + + + + + + + + + + + +var sentinelStyle = { + width: 0, + height: 0, + overflow: 'hidden', + outline: 'none', + position: 'absolute' +}; +function DrawerPopup(props, ref) { + var _ref, _pushConfig$distance, _pushConfig, _classNames; + var prefixCls = props.prefixCls, + open = props.open, + placement = props.placement, + inline = props.inline, + push = props.push, + forceRender = props.forceRender, + autoFocus = props.autoFocus, + keyboard = props.keyboard, + rootClassName = props.rootClassName, + rootStyle = props.rootStyle, + zIndex = props.zIndex, + className = props.className, + style = props.style, + motion = props.motion, + width = props.width, + height = props.height, + children = props.children, + contentWrapperStyle = props.contentWrapperStyle, + mask = props.mask, + maskClosable = props.maskClosable, + maskMotion = props.maskMotion, + maskClassName = props.maskClassName, + maskStyle = props.maskStyle, + afterOpenChange = props.afterOpenChange, + onClose = props.onClose, + onMouseEnter = props.onMouseEnter, + onMouseOver = props.onMouseOver, + onMouseLeave = props.onMouseLeave, + onClick = props.onClick, + onKeyDown = props.onKeyDown, + onKeyUp = props.onKeyUp; + // ================================ Refs ================================ + var panelRef = react.useRef(); + var sentinelStartRef = react.useRef(); + var sentinelEndRef = react.useRef(); + react.useImperativeHandle(ref, function () { + return panelRef.current; + }); + var onPanelKeyDown = function onPanelKeyDown(event) { + var keyCode = event.keyCode, + shiftKey = event.shiftKey; + switch (keyCode) { + // Tab active + case KeyCode/* default.TAB */.Z.TAB: + { + if (keyCode === KeyCode/* default.TAB */.Z.TAB) { + if (!shiftKey && document.activeElement === sentinelEndRef.current) { + var _sentinelStartRef$cur; + (_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 ? void 0 : _sentinelStartRef$cur.focus({ + preventScroll: true + }); + } else if (shiftKey && document.activeElement === sentinelStartRef.current) { + var _sentinelEndRef$curre; + (_sentinelEndRef$curre = sentinelEndRef.current) === null || _sentinelEndRef$curre === void 0 ? void 0 : _sentinelEndRef$curre.focus({ + preventScroll: true + }); + } + } + break; + } + // Close + case KeyCode/* default.ESC */.Z.ESC: + { + if (onClose && keyboard) { + event.stopPropagation(); + onClose(event); + } + break; + } + } + }; + // ========================== Control =========================== + // Auto Focus + react.useEffect(function () { + if (open && autoFocus) { + var _panelRef$current; + (_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 ? void 0 : _panelRef$current.focus({ + preventScroll: true + }); + } + }, [open]); + // ============================ Push ============================ + var _React$useState = react.useState(false), + _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), + pushed = _React$useState2[0], + setPushed = _React$useState2[1]; + var parentContext = react.useContext(context); + // Merge push distance + var pushConfig; + if (push === false) { + pushConfig = { + distance: 0 + }; + } else if (push === true) { + pushConfig = {}; + } else { + pushConfig = push || {}; + } + var pushDistance = (_ref = (_pushConfig$distance = (_pushConfig = pushConfig) === null || _pushConfig === void 0 ? void 0 : _pushConfig.distance) !== null && _pushConfig$distance !== void 0 ? _pushConfig$distance : parentContext === null || parentContext === void 0 ? void 0 : parentContext.pushDistance) !== null && _ref !== void 0 ? _ref : 180; + var mergedContext = react.useMemo(function () { + return { + pushDistance: pushDistance, + push: function push() { + setPushed(true); + }, + pull: function pull() { + setPushed(false); + } + }; + }, [pushDistance]); + // ========================= ScrollLock ========================= + // Tell parent to push + react.useEffect(function () { + if (open) { + var _parentContext$push; + parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$push = parentContext.push) === null || _parentContext$push === void 0 ? void 0 : _parentContext$push.call(parentContext); + } else { + var _parentContext$pull; + parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$pull = parentContext.pull) === null || _parentContext$pull === void 0 ? void 0 : _parentContext$pull.call(parentContext); + } + }, [open]); + // Clean up + react.useEffect(function () { + return function () { + var _parentContext$pull2; + parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$pull2 = parentContext.pull) === null || _parentContext$pull2 === void 0 ? void 0 : _parentContext$pull2.call(parentContext); + }; + }, []); + // ============================ Mask ============================ + var maskNode = mask && /*#__PURE__*/react.createElement(rc_motion_es/* default */.Z, (0,esm_extends/* default */.Z)({ + key: "mask" + }, maskMotion, { + visible: open + }), function (_ref2, maskRef) { + var motionMaskClassName = _ref2.className, + motionMaskStyle = _ref2.style; + return /*#__PURE__*/react.createElement("div", { + className: classnames_default()("".concat(prefixCls, "-mask"), motionMaskClassName, maskClassName), + style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, motionMaskStyle), maskStyle), + onClick: maskClosable && open ? onClose : undefined, + ref: maskRef + }); + }); + // =========================== Panel ============================ + var motionProps = typeof motion === 'function' ? motion(placement) : motion; + var wrapperStyle = {}; + if (pushed && pushDistance) { + switch (placement) { + case 'top': + wrapperStyle.transform = "translateY(".concat(pushDistance, "px)"); + break; + case 'bottom': + wrapperStyle.transform = "translateY(".concat(-pushDistance, "px)"); + break; + case 'left': + wrapperStyle.transform = "translateX(".concat(pushDistance, "px)"); + break; + default: + wrapperStyle.transform = "translateX(".concat(-pushDistance, "px)"); + break; + } + } + if (placement === 'left' || placement === 'right') { + wrapperStyle.width = parseWidthHeight(width); + } else { + wrapperStyle.height = parseWidthHeight(height); + } + var eventHandlers = { + onMouseEnter: onMouseEnter, + onMouseOver: onMouseOver, + onMouseLeave: onMouseLeave, + onClick: onClick, + onKeyDown: onKeyDown, + onKeyUp: onKeyUp + }; + var panelNode = /*#__PURE__*/react.createElement(rc_motion_es/* default */.Z, (0,esm_extends/* default */.Z)({ + key: "panel" + }, motionProps, { + visible: open, + forceRender: forceRender, + onVisibleChanged: function onVisibleChanged(nextVisible) { + afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(nextVisible); + }, + removeOnLeave: false, + leavedClassName: "".concat(prefixCls, "-content-wrapper-hidden") + }), function (_ref3, motionRef) { + var motionClassName = _ref3.className, + motionStyle = _ref3.style; + return /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({ + className: classnames_default()("".concat(prefixCls, "-content-wrapper"), motionClassName), + style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, wrapperStyle), motionStyle), contentWrapperStyle) + }, (0,pickAttrs/* default */.Z)(props, { + data: true + })), /*#__PURE__*/react.createElement(es_DrawerPanel, (0,esm_extends/* default */.Z)({ + containerRef: motionRef, + prefixCls: prefixCls, + className: className, + style: style + }, eventHandlers), children)); + }); + // =========================== Render =========================== + var containerStyle = (0,objectSpread2/* default */.Z)({}, rootStyle); + if (zIndex) { + containerStyle.zIndex = zIndex; + } + return /*#__PURE__*/react.createElement(context.Provider, { + value: mergedContext + }, /*#__PURE__*/react.createElement("div", { + className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(placement), rootClassName, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-open"), open), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-inline"), inline), _classNames)), + style: containerStyle, + tabIndex: -1, + ref: panelRef, + onKeyDown: onPanelKeyDown + }, maskNode, /*#__PURE__*/react.createElement("div", { + tabIndex: 0, + ref: sentinelStartRef, + style: sentinelStyle, + "aria-hidden": "true", + "data-sentinel": "start" + }), panelNode, /*#__PURE__*/react.createElement("div", { + tabIndex: 0, + ref: sentinelEndRef, + style: sentinelStyle, + "aria-hidden": "true", + "data-sentinel": "end" + }))); +} +var RefDrawerPopup = /*#__PURE__*/react.forwardRef(DrawerPopup); +if (false) {} +/* harmony default export */ var es_DrawerPopup = (RefDrawerPopup); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/Drawer.js + + + + + + + +var Drawer = function Drawer(props) { + var _props$open = props.open, + open = _props$open === void 0 ? false : _props$open, + _props$prefixCls = props.prefixCls, + prefixCls = _props$prefixCls === void 0 ? 'rc-drawer' : _props$prefixCls, + _props$placement = props.placement, + placement = _props$placement === void 0 ? 'right' : _props$placement, + _props$autoFocus = props.autoFocus, + autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus, + _props$keyboard = props.keyboard, + keyboard = _props$keyboard === void 0 ? true : _props$keyboard, + _props$width = props.width, + width = _props$width === void 0 ? 378 : _props$width, + _props$mask = props.mask, + mask = _props$mask === void 0 ? true : _props$mask, + _props$maskClosable = props.maskClosable, + maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable, + getContainer = props.getContainer, + forceRender = props.forceRender, + afterOpenChange = props.afterOpenChange, + destroyOnClose = props.destroyOnClose, + onMouseEnter = props.onMouseEnter, + onMouseOver = props.onMouseOver, + onMouseLeave = props.onMouseLeave, + onClick = props.onClick, + onKeyDown = props.onKeyDown, + onKeyUp = props.onKeyUp; + var _React$useState = react.useState(false), + _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), + animatedVisible = _React$useState2[0], + setAnimatedVisible = _React$useState2[1]; + // ============================= Warn ============================= + if (false) {} + // ============================= Open ============================= + var _React$useState3 = react.useState(false), + _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), + mounted = _React$useState4[0], + setMounted = _React$useState4[1]; + (0,useLayoutEffect/* default */.Z)(function () { + setMounted(true); + }, []); + var mergedOpen = mounted ? open : false; + // ============================ Focus ============================= + var panelRef = react.useRef(); + var lastActiveRef = react.useRef(); + (0,useLayoutEffect/* default */.Z)(function () { + if (mergedOpen) { + lastActiveRef.current = document.activeElement; + } + }, [mergedOpen]); + // ============================= Open ============================= + var internalAfterOpenChange = function internalAfterOpenChange(nextVisible) { + var _panelRef$current; + setAnimatedVisible(nextVisible); + afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(nextVisible); + if (!nextVisible && lastActiveRef.current && !((_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 ? void 0 : _panelRef$current.contains(lastActiveRef.current))) { + var _lastActiveRef$curren; + (_lastActiveRef$curren = lastActiveRef.current) === null || _lastActiveRef$curren === void 0 ? void 0 : _lastActiveRef$curren.focus({ + preventScroll: true + }); + } + }; + // ============================ Render ============================ + if (!forceRender && !animatedVisible && !mergedOpen && destroyOnClose) { + return null; + } + var eventHandlers = { + onMouseEnter: onMouseEnter, + onMouseOver: onMouseOver, + onMouseLeave: onMouseLeave, + onClick: onClick, + onKeyDown: onKeyDown, + onKeyUp: onKeyUp + }; + var drawerPopupProps = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { + open: mergedOpen, + prefixCls: prefixCls, + placement: placement, + autoFocus: autoFocus, + keyboard: keyboard, + width: width, + mask: mask, + maskClosable: maskClosable, + inline: getContainer === false, + afterOpenChange: internalAfterOpenChange, + ref: panelRef + }, eventHandlers); + return /*#__PURE__*/react.createElement(es, { + open: mergedOpen || forceRender || animatedVisible, + autoDestroy: false, + getContainer: getContainer, + autoLock: mask && (mergedOpen || animatedVisible) + }, /*#__PURE__*/react.createElement(es_DrawerPopup, drawerPopupProps)); +}; +if (false) {} +/* harmony default export */ var es_Drawer = (Drawer); +;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/index.js +// export this package's api + +/* harmony default export */ var rc_drawer_es = (es_Drawer); +// EXTERNAL MODULE: ./node_modules/antd/es/_util/motion.js +var motion = __webpack_require__(33603); +// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js +var config_provider_context = __webpack_require__(53124); +// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js +var form_context = __webpack_require__(65223); +// EXTERNAL MODULE: ./node_modules/antd/es/_util/hooks/useClosable.js +var useClosable = __webpack_require__(69760); +;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/DrawerPanel.js + + + +const DrawerPanel_DrawerPanel = props => { + const { + prefixCls, + title, + footer, + extra, + closeIcon, + closable, + onClose, + headerStyle, + drawerStyle, + bodyStyle, + footerStyle, + children + } = props; + const customCloseIconRender = react.useCallback(icon => /*#__PURE__*/react.createElement("button", { + type: "button", + onClick: onClose, + "aria-label": "Close", + className: `${prefixCls}-close` + }, icon), [onClose]); + const [mergedClosable, mergedCloseIcon] = (0,useClosable/* default */.Z)(closable, closeIcon, customCloseIconRender, undefined, true); + const headerNode = react.useMemo(() => { + if (!title && !mergedClosable) { + return null; + } + return /*#__PURE__*/react.createElement("div", { + style: headerStyle, + className: classnames_default()(`${prefixCls}-header`, { + [`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra + }) + }, /*#__PURE__*/react.createElement("div", { + className: `${prefixCls}-header-title` + }, mergedCloseIcon, title && /*#__PURE__*/react.createElement("div", { + className: `${prefixCls}-title` + }, title)), extra && /*#__PURE__*/react.createElement("div", { + className: `${prefixCls}-extra` + }, extra)); + }, [mergedClosable, mergedCloseIcon, extra, headerStyle, prefixCls, title]); + const footerNode = react.useMemo(() => { + if (!footer) { + return null; + } + const footerClassName = `${prefixCls}-footer`; + return /*#__PURE__*/react.createElement("div", { + className: footerClassName, + style: footerStyle + }, footer); + }, [footer, footerStyle, prefixCls]); + return /*#__PURE__*/react.createElement("div", { + className: `${prefixCls}-wrapper-body`, + style: drawerStyle + }, headerNode, /*#__PURE__*/react.createElement("div", { + className: `${prefixCls}-body`, + style: bodyStyle + }, children), footerNode); +}; +/* harmony default export */ var drawer_DrawerPanel = (DrawerPanel_DrawerPanel); +// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js +var Compact = __webpack_require__(4173); +// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js +var genComponentStyleHook = __webpack_require__(67968); +// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js +var statistic = __webpack_require__(45503); +;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/style/motion.js +const genMotionStyle = token => { + const { + componentCls, + motionDurationSlow + } = token; + const sharedPanelMotion = { + '&-enter, &-appear, &-leave': { + '&-start': { + transition: 'none' + }, + '&-active': { + transition: `all ${motionDurationSlow}` + } + } + }; + return { + [componentCls]: { + // ======================== Mask ======================== + [`${componentCls}-mask-motion`]: { + '&-enter, &-appear, &-leave': { + '&-active': { + transition: `all ${motionDurationSlow}` + } + }, + '&-enter, &-appear': { + opacity: 0, + '&-active': { + opacity: 1 + } + }, + '&-leave': { + opacity: 1, + '&-active': { + opacity: 0 + } + } + }, + // ======================= Panel ======================== + [`${componentCls}-panel-motion`]: { + // Left + '&-left': [sharedPanelMotion, { + '&-enter, &-appear': { + '&-start': { + transform: 'translateX(-100%) !important' + }, + '&-active': { + transform: 'translateX(0)' + } + }, + '&-leave': { + transform: 'translateX(0)', + '&-active': { + transform: 'translateX(-100%)' + } + } + }], + // Right + '&-right': [sharedPanelMotion, { + '&-enter, &-appear': { + '&-start': { + transform: 'translateX(100%) !important' + }, + '&-active': { + transform: 'translateX(0)' + } + }, + '&-leave': { + transform: 'translateX(0)', + '&-active': { + transform: 'translateX(100%)' + } + } + }], + // Top + '&-top': [sharedPanelMotion, { + '&-enter, &-appear': { + '&-start': { + transform: 'translateY(-100%) !important' + }, + '&-active': { + transform: 'translateY(0)' + } + }, + '&-leave': { + transform: 'translateY(0)', + '&-active': { + transform: 'translateY(-100%)' + } + } + }], + // Bottom + '&-bottom': [sharedPanelMotion, { + '&-enter, &-appear': { + '&-start': { + transform: 'translateY(100%) !important' + }, + '&-active': { + transform: 'translateY(0)' + } + }, + '&-leave': { + transform: 'translateY(0)', + '&-active': { + transform: 'translateY(100%)' + } + } + }] + } + } + }; +}; +/* harmony default export */ var style_motion = (genMotionStyle); +;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/style/index.js + + +// =============================== Base =============================== +const genDrawerStyle = token => { + const { + componentCls, + zIndexPopup, + colorBgMask, + colorBgElevated, + motionDurationSlow, + motionDurationMid, + padding, + paddingLG, + fontSizeLG, + lineHeightLG, + lineWidth, + lineType, + colorSplit, + marginSM, + colorIcon, + colorIconHover, + colorText, + fontWeightStrong, + footerPaddingBlock, + footerPaddingInline + } = token; + const wrapperCls = `${componentCls}-content-wrapper`; + return { + [componentCls]: { + position: 'fixed', + inset: 0, + zIndex: zIndexPopup, + pointerEvents: 'none', + '&-pure': { + position: 'relative', + background: colorBgElevated, + [`&${componentCls}-left`]: { + boxShadow: token.boxShadowDrawerLeft + }, + [`&${componentCls}-right`]: { + boxShadow: token.boxShadowDrawerRight + }, + [`&${componentCls}-top`]: { + boxShadow: token.boxShadowDrawerUp + }, + [`&${componentCls}-bottom`]: { + boxShadow: token.boxShadowDrawerDown + } + }, + '&-inline': { + position: 'absolute' + }, + // ====================== Mask ====================== + [`${componentCls}-mask`]: { + position: 'absolute', + inset: 0, + zIndex: zIndexPopup, + background: colorBgMask, + pointerEvents: 'auto' + }, + // ==================== Content ===================== + [wrapperCls]: { + position: 'absolute', + zIndex: zIndexPopup, + maxWidth: '100vw', + transition: `all ${motionDurationSlow}`, + '&-hidden': { + display: 'none' + } + }, + // Placement + [`&-left > ${wrapperCls}`]: { + top: 0, + bottom: 0, + left: { + _skip_check_: true, + value: 0 + }, + boxShadow: token.boxShadowDrawerLeft + }, + [`&-right > ${wrapperCls}`]: { + top: 0, + right: { + _skip_check_: true, + value: 0 + }, + bottom: 0, + boxShadow: token.boxShadowDrawerRight + }, + [`&-top > ${wrapperCls}`]: { + top: 0, + insetInline: 0, + boxShadow: token.boxShadowDrawerUp + }, + [`&-bottom > ${wrapperCls}`]: { + bottom: 0, + insetInline: 0, + boxShadow: token.boxShadowDrawerDown + }, + [`${componentCls}-content`]: { + width: '100%', + height: '100%', + overflow: 'auto', + background: colorBgElevated, + pointerEvents: 'auto' + }, + // ===================== Panel ====================== + [`${componentCls}-wrapper-body`]: { + display: 'flex', + flexDirection: 'column', + width: '100%', + height: '100%' + }, + // Header + [`${componentCls}-header`]: { + display: 'flex', + flex: 0, + alignItems: 'center', + padding: `${padding}px ${paddingLG}px`, + fontSize: fontSizeLG, + lineHeight: lineHeightLG, + borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`, + '&-title': { + display: 'flex', + flex: 1, + alignItems: 'center', + minWidth: 0, + minHeight: 0 + } + }, + [`${componentCls}-extra`]: { + flex: 'none' + }, + [`${componentCls}-close`]: { + display: 'inline-block', + marginInlineEnd: marginSM, + color: colorIcon, + fontWeight: fontWeightStrong, + fontSize: fontSizeLG, + fontStyle: 'normal', + lineHeight: 1, + textAlign: 'center', + textTransform: 'none', + textDecoration: 'none', + background: 'transparent', + border: 0, + outline: 0, + cursor: 'pointer', + transition: `color ${motionDurationMid}`, + textRendering: 'auto', + '&:focus, &:hover': { + color: colorIconHover, + textDecoration: 'none' + } + }, + [`${componentCls}-title`]: { + flex: 1, + margin: 0, + color: colorText, + fontWeight: token.fontWeightStrong, + fontSize: fontSizeLG, + lineHeight: lineHeightLG + }, + // Body + [`${componentCls}-body`]: { + flex: 1, + minWidth: 0, + minHeight: 0, + padding: paddingLG, + overflow: 'auto' + }, + // Footer + [`${componentCls}-footer`]: { + flexShrink: 0, + padding: `${footerPaddingBlock}px ${footerPaddingInline}px`, + borderTop: `${lineWidth}px ${lineType} ${colorSplit}` + }, + // ====================== RTL ======================= + '&-rtl': { + direction: 'rtl' + } + } + }; +}; +// ============================== Export ============================== +/* harmony default export */ var drawer_style = ((0,genComponentStyleHook/* default */.Z)('Drawer', token => { + const drawerToken = (0,statistic/* merge */.TS)(token, {}); + return [genDrawerStyle(drawerToken), style_motion(drawerToken)]; +}, token => ({ + zIndexPopup: token.zIndexPopupBase, + footerPaddingBlock: token.paddingXS, + footerPaddingInline: token.padding +}))); +;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/index.js +'use client'; + +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; +}; + + + + + + + + +// CSSINJS + + +const SizeTypes = (/* unused pure expression or super */ null && (['default', 'large'])); +const defaultPushState = { + distance: 180 +}; +function drawer_Drawer(props) { + var _a; + const { + rootClassName, + width, + height, + size = 'default', + mask = true, + push = defaultPushState, + open, + afterOpenChange, + onClose, + prefixCls: customizePrefixCls, + getContainer: customizeGetContainer, + style, + className, + // Deprecated + visible, + afterVisibleChange + } = props, + rest = __rest(props, ["rootClassName", "width", "height", "size", "mask", "push", "open", "afterOpenChange", "onClose", "prefixCls", "getContainer", "style", "className", "visible", "afterVisibleChange"]); + const { + getPopupContainer, + getPrefixCls, + direction, + drawer + } = react.useContext(config_provider_context/* ConfigContext */.E_); + const prefixCls = getPrefixCls('drawer', customizePrefixCls); + // Style + const [wrapSSR, hashId] = drawer_style(prefixCls); + const getContainer = + // 有可能为 false,所以不能直接判断 + customizeGetContainer === undefined && getPopupContainer ? () => getPopupContainer(document.body) : customizeGetContainer; + const drawerClassName = classnames_default()({ + 'no-mask': !mask, + [`${prefixCls}-rtl`]: direction === 'rtl' + }, rootClassName, hashId); + // ========================== Warning =========================== + if (false) {} + // ============================ Size ============================ + const mergedWidth = react.useMemo(() => width !== null && width !== void 0 ? width : size === 'large' ? 736 : 378, [width, size]); + const mergedHeight = react.useMemo(() => height !== null && height !== void 0 ? height : size === 'large' ? 736 : 378, [height, size]); + // =========================== Motion =========================== + const maskMotion = { + motionName: (0,motion/* getTransitionName */.mL)(prefixCls, 'mask-motion'), + motionAppear: true, + motionEnter: true, + motionLeave: true, + motionDeadline: 500 + }; + const panelMotion = motionPlacement => ({ + motionName: (0,motion/* getTransitionName */.mL)(prefixCls, `panel-motion-${motionPlacement}`), + motionAppear: true, + motionEnter: true, + motionLeave: true, + motionDeadline: 500 + }); + // =========================== Render =========================== + return wrapSSR( /*#__PURE__*/react.createElement(Compact/* NoCompactStyle */.BR, null, /*#__PURE__*/react.createElement(form_context/* NoFormStyle */.Ux, { + status: true, + override: true + }, /*#__PURE__*/react.createElement(rc_drawer_es, Object.assign({ + prefixCls: prefixCls, + onClose: onClose, + maskMotion: maskMotion, + motion: panelMotion + }, rest, { + open: open !== null && open !== void 0 ? open : visible, + mask: mask, + push: push, + width: mergedWidth, + height: mergedHeight, + style: Object.assign(Object.assign({}, drawer === null || drawer === void 0 ? void 0 : drawer.style), style), + className: classnames_default()(drawer === null || drawer === void 0 ? void 0 : drawer.className, className), + rootClassName: drawerClassName, + getContainer: getContainer, + afterOpenChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange + }), /*#__PURE__*/react.createElement(drawer_DrawerPanel, Object.assign({ + prefixCls: prefixCls + }, rest, { + onClose: onClose + })))))); +} +if (false) {} +function PurePanel(_a) { + var { + prefixCls: customizePrefixCls, + style, + className, + placement = 'right' + } = _a, + restProps = __rest(_a, ["prefixCls", "style", "className", "placement"]); + const { + getPrefixCls + } = react.useContext(config_provider_context/* ConfigContext */.E_); + const prefixCls = getPrefixCls('drawer', customizePrefixCls); + // Style + const [wrapSSR, hashId] = drawer_style(prefixCls); + return wrapSSR( /*#__PURE__*/react.createElement("div", { + className: classnames_default()(prefixCls, `${prefixCls}-pure`, `${prefixCls}-${placement}`, hashId, className), + style: style + }, /*#__PURE__*/react.createElement(drawer_DrawerPanel, Object.assign({ + prefixCls: prefixCls + }, restProps)))); +} +drawer_Drawer._InternalPanelDoNotUseOrYouWillBeFired = PurePanel; +/* harmony default export */ var drawer = (drawer_Drawer); + +/***/ }), + +/***/ 51904: +/*!*******************************************************!*\ + !*** ./node_modules/antd/es/tag/index.js + 3 modules ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ tag; } +}); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + 1 modules +var CloseOutlined = __webpack_require__(97937); +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__(94184); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +// EXTERNAL MODULE: ./node_modules/antd/es/_util/colors.js +var colors = __webpack_require__(98787); +// EXTERNAL MODULE: ./node_modules/antd/es/_util/hooks/useClosable.js +var useClosable = __webpack_require__(69760); +// EXTERNAL MODULE: ./node_modules/antd/es/_util/wave/index.js + 4 modules +var wave = __webpack_require__(45353); +// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js +var context = __webpack_require__(53124); +;// CONCATENATED MODULE: ./node_modules/antd/es/_util/capitalize.js +function capitalize(str) { + if (typeof str !== 'string') { + return str; + } + const ret = str.charAt(0).toUpperCase() + str.slice(1); + return ret; +} +// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js +var style = __webpack_require__(14747); +// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genPresetColor.js +var genPresetColor = __webpack_require__(98719); +// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js +var genComponentStyleHook = __webpack_require__(67968); +// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js +var statistic = __webpack_require__(45503); +;// CONCATENATED MODULE: ./node_modules/antd/es/tag/style/index.js + + + +const genTagStatusStyle = (token, status, cssVariableType) => { + const capitalizedCssVariableType = capitalize(cssVariableType); + return { + [`${token.componentCls}-${status}`]: { + color: token[`color${cssVariableType}`], + background: token[`color${capitalizedCssVariableType}Bg`], + borderColor: token[`color${capitalizedCssVariableType}Border`], + [`&${token.componentCls}-borderless`]: { + borderColor: 'transparent' + } + } + }; +}; +const genPresetStyle = token => (0,genPresetColor/* default */.Z)(token, (colorKey, _ref) => { + let { + textColor, + lightBorderColor, + lightColor, + darkColor + } = _ref; + return { + [`${token.componentCls}-${colorKey}`]: { + color: textColor, + background: lightColor, + borderColor: lightBorderColor, + // Inverse color + '&-inverse': { + color: token.colorTextLightSolid, + background: darkColor, + borderColor: darkColor + }, + [`&${token.componentCls}-borderless`]: { + borderColor: 'transparent' + } + } + }; +}); +const genBaseStyle = token => { + const { + paddingXXS, + lineWidth, + tagPaddingHorizontal, + componentCls + } = token; + const paddingInline = tagPaddingHorizontal - lineWidth; + const iconMarginInline = paddingXXS - lineWidth; + return { + // Result + [componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { + display: 'inline-block', + height: 'auto', + marginInlineEnd: token.marginXS, + paddingInline, + fontSize: token.tagFontSize, + lineHeight: token.tagLineHeight, + whiteSpace: 'nowrap', + background: token.defaultBg, + border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`, + borderRadius: token.borderRadiusSM, + opacity: 1, + transition: `all ${token.motionDurationMid}`, + textAlign: 'start', + position: 'relative', + // RTL + [`&${componentCls}-rtl`]: { + direction: 'rtl' + }, + '&, a, a:hover': { + color: token.defaultColor + }, + [`${componentCls}-close-icon`]: { + marginInlineStart: iconMarginInline, + color: token.colorTextDescription, + fontSize: token.tagIconSize, + cursor: 'pointer', + transition: `all ${token.motionDurationMid}`, + '&:hover': { + color: token.colorTextHeading + } + }, + [`&${componentCls}-has-color`]: { + borderColor: 'transparent', + [`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: { + color: token.colorTextLightSolid + } + }, + [`&-checkable`]: { + backgroundColor: 'transparent', + borderColor: 'transparent', + cursor: 'pointer', + [`&:not(${componentCls}-checkable-checked):hover`]: { + color: token.colorPrimary, + backgroundColor: token.colorFillSecondary + }, + '&:active, &-checked': { + color: token.colorTextLightSolid + }, + '&-checked': { + backgroundColor: token.colorPrimary, + '&:hover': { + backgroundColor: token.colorPrimaryHover + } + }, + '&:active': { + backgroundColor: token.colorPrimaryActive + } + }, + [`&-hidden`]: { + display: 'none' + }, + // To ensure that a space will be placed between character and `Icon`. + [`> ${token.iconCls} + span, > span + ${token.iconCls}`]: { + marginInlineStart: paddingInline + } + }), + [`${componentCls}-borderless`]: { + borderColor: 'transparent', + background: token.tagBorderlessBg + } + }; +}; +// ============================== Export ============================== +/* harmony default export */ var tag_style = ((0,genComponentStyleHook/* default */.Z)('Tag', token => { + const { + lineWidth, + fontSizeIcon + } = token; + const tagFontSize = token.fontSizeSM; + const tagLineHeight = `${token.lineHeightSM * tagFontSize}px`; + const tagToken = (0,statistic/* merge */.TS)(token, { + tagFontSize, + tagLineHeight, + tagIconSize: fontSizeIcon - 2 * lineWidth, + tagPaddingHorizontal: 8, + tagBorderlessBg: token.colorFillTertiary + }); + return [genBaseStyle(tagToken), genPresetStyle(tagToken), genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')]; +}, token => ({ + defaultBg: token.colorFillQuaternary, + defaultColor: token.colorText +}))); +;// CONCATENATED MODULE: ./node_modules/antd/es/tag/CheckableTag.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; +}; + + + + +const CheckableTag = props => { + const { + prefixCls: customizePrefixCls, + className, + checked, + onChange, + onClick + } = props, + restProps = __rest(props, ["prefixCls", "className", "checked", "onChange", "onClick"]); + const { + getPrefixCls + } = react.useContext(context/* ConfigContext */.E_); + const handleClick = e => { + onChange === null || onChange === void 0 ? void 0 : onChange(!checked); + onClick === null || onClick === void 0 ? void 0 : onClick(e); + }; + const prefixCls = getPrefixCls('tag', customizePrefixCls); + // Style + const [wrapSSR, hashId] = tag_style(prefixCls); + const cls = classnames_default()(prefixCls, `${prefixCls}-checkable`, { + [`${prefixCls}-checkable-checked`]: checked + }, className, hashId); + return wrapSSR( /*#__PURE__*/react.createElement("span", Object.assign({}, restProps, { + className: cls, + onClick: handleClick + }))); +}; +/* harmony default export */ var tag_CheckableTag = (CheckableTag); +;// CONCATENATED MODULE: ./node_modules/antd/es/tag/index.js +'use client'; + +var tag_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; +}; + + + + + + + + + + +const InternalTag = (tagProps, ref) => { + const { + prefixCls: customizePrefixCls, + className, + rootClassName, + style, + children, + icon, + color, + onClose, + closeIcon, + closable, + bordered = true + } = tagProps, + props = tag_rest(tagProps, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "closeIcon", "closable", "bordered"]); + const { + getPrefixCls, + direction, + tag + } = react.useContext(context/* ConfigContext */.E_); + const [visible, setVisible] = react.useState(true); + // Warning for deprecated usage + if (false) {} + react.useEffect(() => { + if ('visible' in props) { + setVisible(props.visible); + } + }, [props.visible]); + const isInternalColor = (0,colors/* isPresetColor */.o2)(color) || (0,colors/* isPresetStatusColor */.yT)(color); + const tagStyle = Object.assign(Object.assign({ + backgroundColor: color && !isInternalColor ? color : undefined + }, tag === null || tag === void 0 ? void 0 : tag.style), style); + const prefixCls = getPrefixCls('tag', customizePrefixCls); + // Style + const [wrapSSR, hashId] = tag_style(prefixCls); + const tagClassName = classnames_default()(prefixCls, tag === null || tag === void 0 ? void 0 : tag.className, { + [`${prefixCls}-${color}`]: isInternalColor, + [`${prefixCls}-has-color`]: color && !isInternalColor, + [`${prefixCls}-hidden`]: !visible, + [`${prefixCls}-rtl`]: direction === 'rtl', + [`${prefixCls}-borderless`]: !bordered + }, className, rootClassName, hashId); + const handleCloseClick = e => { + e.stopPropagation(); + onClose === null || onClose === void 0 ? void 0 : onClose(e); + if (e.defaultPrevented) { + return; + } + setVisible(false); + }; + const [, mergedCloseIcon] = (0,useClosable/* default */.Z)(closable, closeIcon, iconNode => iconNode === null ? /*#__PURE__*/react.createElement(CloseOutlined/* default */.Z, { + className: `${prefixCls}-close-icon`, + onClick: handleCloseClick + }) : /*#__PURE__*/react.createElement("span", { + className: `${prefixCls}-close-icon`, + onClick: handleCloseClick + }, iconNode), null, false); + const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a'; + const iconNode = icon || null; + const kids = iconNode ? /*#__PURE__*/react.createElement(react.Fragment, null, iconNode, children && /*#__PURE__*/react.createElement("span", null, children)) : children; + const tagNode = /*#__PURE__*/react.createElement("span", Object.assign({}, props, { + ref: ref, + className: tagClassName, + style: tagStyle + }), kids, mergedCloseIcon); + return wrapSSR(isNeedWave ? /*#__PURE__*/react.createElement(wave/* default */.Z, null, tagNode) : tagNode); +}; +const Tag = /*#__PURE__*/react.forwardRef(InternalTag); +if (false) {} +Tag.CheckableTag = tag_CheckableTag; +/* harmony default export */ var tag = (Tag); + +/***/ }), + +/***/ 20640: +/*!*************************************************!*\ + !*** ./node_modules/copy-to-clipboard/index.js ***! + \*************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var deselectCurrent = __webpack_require__(/*! toggle-selection */ 11742); + +var clipboardToIE11Formatting = { + "text/plain": "Text", + "text/html": "Url", + "default": "Text" +} + +var defaultMessage = "Copy to clipboard: #{key}, Enter"; + +function format(message) { + var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; + return message.replace(/#{\s*key\s*}/g, copyKey); +} + +function copy(text, options) { + var debug, + message, + reselectPrevious, + range, + selection, + mark, + success = false; + if (!options) { + options = {}; + } + debug = options.debug || false; + try { + reselectPrevious = deselectCurrent(); + + range = document.createRange(); + selection = document.getSelection(); + + mark = document.createElement("span"); + mark.textContent = text; + // avoid screen readers from reading out loud the text + mark.ariaHidden = "true" + // reset user styles for span element + mark.style.all = "unset"; + // prevents scrolling to the end of the page + mark.style.position = "fixed"; + mark.style.top = 0; + mark.style.clip = "rect(0, 0, 0, 0)"; + // used to preserve spaces and line breaks + mark.style.whiteSpace = "pre"; + // do not inherit user-select (it may be `none`) + mark.style.webkitUserSelect = "text"; + mark.style.MozUserSelect = "text"; + mark.style.msUserSelect = "text"; + mark.style.userSelect = "text"; + mark.addEventListener("copy", function(e) { + e.stopPropagation(); + if (options.format) { + e.preventDefault(); + if (typeof e.clipboardData === "undefined") { // IE 11 + debug && console.warn("unable to use e.clipboardData"); + debug && console.warn("trying IE specific stuff"); + window.clipboardData.clearData(); + var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"] + window.clipboardData.setData(format, text); + } else { // all other browsers + e.clipboardData.clearData(); + e.clipboardData.setData(options.format, text); + } + } + if (options.onCopy) { + e.preventDefault(); + options.onCopy(e.clipboardData); + } + }); + + document.body.appendChild(mark); + + range.selectNodeContents(mark); + selection.addRange(range); + + var successful = document.execCommand("copy"); + if (!successful) { + throw new Error("copy command was unsuccessful"); + } + success = true; + } catch (err) { + debug && console.error("unable to copy using execCommand: ", err); + debug && console.warn("trying IE specific stuff"); + try { + window.clipboardData.setData(options.format || "text", text); + options.onCopy && options.onCopy(window.clipboardData); + success = true; + } catch (err) { + debug && console.error("unable to copy using clipboardData: ", err); + debug && console.error("falling back to prompt"); + message = format("message" in options ? options.message : defaultMessage); + window.prompt(message, text); + } + } finally { + if (selection) { + if (typeof selection.removeRange == "function") { + selection.removeRange(range); + } else { + selection.removeAllRanges(); + } + } + + if (mark) { + document.body.removeChild(mark); + } + reselectPrevious(); + } + + return success; +} + +module.exports = copy; + + +/***/ }), + +/***/ 89777: +/*!*************************************************!*\ + !*** ./node_modules/echarts-wordcloud/index.js ***! + \*************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* unused reexport */ __webpack_require__(/*! ./src/wordCloud */ 88157); + +/***/ }), + +/***/ 50024: +/*!***************************************************************!*\ + !*** ./node_modules/echarts-wordcloud/src/WordCloudSeries.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var completeDimensions = __webpack_require__(/*! echarts/lib/data/helper/completeDimensions */ 34380); +var echarts = __webpack_require__(/*! echarts/lib/echarts */ 70492); + +echarts.extendSeriesModel({ + + type: 'series.wordCloud', + + visualColorAccessPath: 'textStyle.normal.color', + + optionUpdated: function () { + var option = this.option; + option.gridSize = Math.max(Math.floor(option.gridSize), 4); + }, + + getInitialData: function (option, ecModel) { + var dimensions = completeDimensions(['value'], option.data); + var list = new echarts.List(dimensions, this); + list.initData(option.data); + return list; + }, + + // Most of options are from https://github.com/timdream/wordcloud2.js/blob/gh-pages/API.md + defaultOption: { + + maskImage: null, + + // Shape can be 'circle', 'cardioid', 'diamond', 'triangle-forward', 'triangle', 'pentagon', 'star' + shape: 'circle', + + left: 'center', + + top: 'center', + + width: '70%', + + height: '80%', + + sizeRange: [12, 60], + + rotationRange: [-90, 90], + + rotationStep: 45, + + gridSize: 8, + + drawOutOfBound: false, + + textStyle: { + normal: { + fontWeight: 'normal' + } + } + } +}); + + +/***/ }), + +/***/ 40885: +/*!*************************************************************!*\ + !*** ./node_modules/echarts-wordcloud/src/WordCloudView.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var echarts = __webpack_require__(/*! echarts/lib/echarts */ 70492); + +function getShallow(model, path) { + return model && model.getShallow(path); +} + +echarts.extendChartView({ + + type: 'wordCloud', + + render: function (seriesModel, ecModel, api) { + var group = this.group; + group.removeAll(); + + var data = seriesModel.getData(); + + var gridSize = seriesModel.get('gridSize'); + + seriesModel.layoutInstance.ondraw = function (text, size, dataIdx, drawn) { + var itemModel = data.getItemModel(dataIdx); + var textStyleModel = itemModel.getModel('textStyle.normal'); + var emphasisTextStyleModel = itemModel.getModel('textStyle.emphasis'); + + var textEl = new echarts.graphic.Text({ + style: echarts.graphic.setTextStyle({}, textStyleModel, { + x: drawn.info.fillTextOffsetX, + y: drawn.info.fillTextOffsetY + size * 0.5, + text: text, + textBaseline: 'middle', + textFill: data.getItemVisual(dataIdx, 'color'), + fontSize: size + }), + scale: [1 / drawn.info.mu, 1 / drawn.info.mu], + position: [ + (drawn.gx + drawn.info.gw / 2) * gridSize, + (drawn.gy + drawn.info.gh / 2) * gridSize + ], + rotation: drawn.rot + }); + + group.add(textEl); + + data.setItemGraphicEl(dataIdx, textEl); + + echarts.graphic.setHoverStyle( + textEl, + echarts.graphic.setTextStyle({}, emphasisTextStyleModel, null, {forMerge: true}, true) + ); + }; + + this._model = seriesModel; + }, + + remove: function () { + this.group.removeAll(); + + this._model.layoutInstance.dispose(); + }, + + dispose: function () { + this._model.layoutInstance.dispose(); + } +}); + + +/***/ }), + +/***/ 62255: +/*!******************************************************!*\ + !*** ./node_modules/echarts-wordcloud/src/layout.js ***! + \******************************************************/ +/***/ (function(module, exports) { + +"use strict"; +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * wordcloud2.js + * http://timdream.org/wordcloud2.js/ + * + * Copyright 2011 - 2013 Tim Chien + * Released under the MIT license + */ + + + +// setImmediate +if (!window.setImmediate) { + window.setImmediate = (function setupSetImmediate() { + return window.msSetImmediate || + window.webkitSetImmediate || + window.mozSetImmediate || + window.oSetImmediate || + (function setupSetZeroTimeout() { + if (!window.postMessage || !window.addEventListener) { + return null; + } + + var callbacks = [undefined]; + var message = 'zero-timeout-message'; + + // Like setTimeout, but only takes a function argument. There's + // no time argument (always zero) and no arguments (you have to + // use a closure). + var setZeroTimeout = function setZeroTimeout(callback) { + var id = callbacks.length; + callbacks.push(callback); + window.postMessage(message + id.toString(36), '*'); + + return id; + }; + + window.addEventListener('message', function setZeroTimeoutMessage(evt) { + // Skipping checking event source, retarded IE confused this window + // object with another in the presence of iframe + if (typeof evt.data !== 'string' || + evt.data.substr(0, message.length) !== message/* || + evt.source !== window */) { + return; + } + + evt.stopImmediatePropagation(); + + var id = parseInt(evt.data.substr(message.length), 36); + if (!callbacks[id]) { + return; + } + + callbacks[id](); + callbacks[id] = undefined; + }, true); + + /* specify clearImmediate() here since we need the scope */ + window.clearImmediate = function clearZeroTimeout(id) { + if (!callbacks[id]) { + return; + } + + callbacks[id] = undefined; + }; + + return setZeroTimeout; + })() || + // fallback + function setImmediateFallback(fn) { + window.setTimeout(fn, 0); + }; + })(); +} + +if (!window.clearImmediate) { + window.clearImmediate = (function setupClearImmediate() { + return window.msClearImmediate || + window.webkitClearImmediate || + window.mozClearImmediate || + window.oClearImmediate || + // "clearZeroTimeout" is implement on the previous block || + // fallback + function clearImmediateFallback(timer) { + window.clearTimeout(timer); + }; + })(); +} + +(function(global) { + + // Check if WordCloud can run on this browser + var isSupported = (function isSupported() { + var canvas = document.createElement('canvas'); + if (!canvas || !canvas.getContext) { + return false; + } + + var ctx = canvas.getContext('2d'); + if (!ctx.getImageData) { + return false; + } + if (!ctx.fillText) { + return false; + } + + if (!Array.prototype.some) { + return false; + } + if (!Array.prototype.push) { + return false; + } + + return true; + }()); + + // Find out if the browser impose minium font size by + // drawing small texts on a canvas and measure it's width. + var minFontSize = (function getMinFontSize() { + if (!isSupported) { + return; + } + + var ctx = document.createElement('canvas').getContext('2d'); + + // start from 20 + var size = 20; + + // two sizes to measure + var hanWidth, mWidth; + + while (size) { + ctx.font = size.toString(10) + 'px sans-serif'; + if ((ctx.measureText('\uFF37').width === hanWidth) && + (ctx.measureText('m').width) === mWidth) { + return (size + 1); + } + + hanWidth = ctx.measureText('\uFF37').width; + mWidth = ctx.measureText('m').width; + + size--; + } + + return 0; + })(); + + // Based on http://jsfromhell.com/array/shuffle + var shuffleArray = function shuffleArray(arr) { + for (var j, x, i = arr.length; i; + j = Math.floor(Math.random() * i), + x = arr[--i], arr[i] = arr[j], + arr[j] = x) {} + return arr; + }; + + var WordCloud = function WordCloud(elements, options) { + if (!isSupported) { + return; + } + + if (!Array.isArray(elements)) { + elements = [elements]; + } + + elements.forEach(function(el, i) { + if (typeof el === 'string') { + elements[i] = document.getElementById(el); + if (!elements[i]) { + throw 'The element id specified is not found.'; + } + } else if (!el.tagName && !el.appendChild) { + throw 'You must pass valid HTML elements, or ID of the element.'; + } + }); + + /* Default values to be overwritten by options object */ + var settings = { + list: [], + fontFamily: '"Trebuchet MS", "Heiti TC", "微軟正黑體", ' + + '"Arial Unicode MS", "Droid Fallback Sans", sans-serif', + fontWeight: 'normal', + color: 'random-dark', + minSize: 0, // 0 to disable + weightFactor: 1, + clearCanvas: true, + backgroundColor: '#fff', // opaque white = rgba(255, 255, 255, 1) + + gridSize: 8, + drawOutOfBound: false, + origin: null, + + drawMask: false, + maskColor: 'rgba(255,0,0,0.3)', + maskGapWidth: 0.3, + + wait: 0, + abortThreshold: 0, // disabled + abort: function noop() {}, + + minRotation: - Math.PI / 2, + maxRotation: Math.PI / 2, + rotationStep: 0.1, + + shuffle: true, + rotateRatio: 0.1, + + shape: 'circle', + ellipticity: 0.65, + + classes: null, + + hover: null, + click: null + }; + + if (options) { + for (var key in options) { + if (key in settings) { + settings[key] = options[key]; + } + } + } + + /* Convert weightFactor into a function */ + if (typeof settings.weightFactor !== 'function') { + var factor = settings.weightFactor; + settings.weightFactor = function weightFactor(pt) { + return pt * factor; //in px + }; + } + + /* Convert shape into a function */ + if (typeof settings.shape !== 'function') { + switch (settings.shape) { + case 'circle': + /* falls through */ + default: + // 'circle' is the default and a shortcut in the code loop. + settings.shape = 'circle'; + break; + + case 'cardioid': + settings.shape = function shapeCardioid(theta) { + return 1 - Math.sin(theta); + }; + break; + + /* + To work out an X-gon, one has to calculate "m", + where 1/(cos(2*PI/X)+m*sin(2*PI/X)) = 1/(cos(0)+m*sin(0)) + http://www.wolframalpha.com/input/?i=1%2F%28cos%282*PI%2FX%29%2Bm*sin%28 + 2*PI%2FX%29%29+%3D+1%2F%28cos%280%29%2Bm*sin%280%29%29 + Copy the solution into polar equation r = 1/(cos(t') + m*sin(t')) + where t' equals to mod(t, 2PI/X); + */ + + case 'diamond': + case 'square': + // http://www.wolframalpha.com/input/?i=plot+r+%3D+1%2F%28cos%28mod+ + // %28t%2C+PI%2F2%29%29%2Bsin%28mod+%28t%2C+PI%2F2%29%29%29%2C+t+%3D + // +0+..+2*PI + settings.shape = function shapeSquare(theta) { + var thetaPrime = theta % (2 * Math.PI / 4); + return 1 / (Math.cos(thetaPrime) + Math.sin(thetaPrime)); + }; + break; + + case 'triangle-forward': + // http://www.wolframalpha.com/input/?i=plot+r+%3D+1%2F%28cos%28mod+ + // %28t%2C+2*PI%2F3%29%29%2Bsqrt%283%29sin%28mod+%28t%2C+2*PI%2F3%29 + // %29%29%2C+t+%3D+0+..+2*PI + settings.shape = function shapeTriangle(theta) { + var thetaPrime = theta % (2 * Math.PI / 3); + return 1 / (Math.cos(thetaPrime) + + Math.sqrt(3) * Math.sin(thetaPrime)); + }; + break; + + case 'triangle': + case 'triangle-upright': + settings.shape = function shapeTriangle(theta) { + var thetaPrime = (theta + Math.PI * 3 / 2) % (2 * Math.PI / 3); + return 1 / (Math.cos(thetaPrime) + + Math.sqrt(3) * Math.sin(thetaPrime)); + }; + break; + + case 'pentagon': + settings.shape = function shapePentagon(theta) { + var thetaPrime = (theta + 0.955) % (2 * Math.PI / 5); + return 1 / (Math.cos(thetaPrime) + + 0.726543 * Math.sin(thetaPrime)); + }; + break; + + case 'star': + settings.shape = function shapeStar(theta) { + var thetaPrime = (theta + 0.955) % (2 * Math.PI / 10); + if ((theta + 0.955) % (2 * Math.PI / 5) - (2 * Math.PI / 10) >= 0) { + return 1 / (Math.cos((2 * Math.PI / 10) - thetaPrime) + + 3.07768 * Math.sin((2 * Math.PI / 10) - thetaPrime)); + } else { + return 1 / (Math.cos(thetaPrime) + + 3.07768 * Math.sin(thetaPrime)); + } + }; + break; + } + } + + /* Make sure gridSize is a whole number and is not smaller than 4px */ + settings.gridSize = Math.max(Math.floor(settings.gridSize), 4); + + /* shorthand */ + var g = settings.gridSize; + var maskRectWidth = g - settings.maskGapWidth; + + /* normalize rotation settings */ + var rotationRange = Math.abs(settings.maxRotation - settings.minRotation); + var minRotation = Math.min(settings.maxRotation, settings.minRotation); + var rotationStep = settings.rotationStep; + + /* information/object available to all functions, set when start() */ + var grid, // 2d array containing filling information + ngx, ngy, // width and height of the grid + center, // position of the center of the cloud + maxRadius; + + /* timestamp for measuring each putWord() action */ + var escapeTime; + + /* function for getting the color of the text */ + var getTextColor; + function random_hsl_color(min, max) { + return 'hsl(' + + (Math.random() * 360).toFixed() + ',' + + (Math.random() * 30 + 70).toFixed() + '%,' + + (Math.random() * (max - min) + min).toFixed() + '%)'; + } + switch (settings.color) { + case 'random-dark': + getTextColor = function getRandomDarkColor() { + return random_hsl_color(10, 50); + }; + break; + + case 'random-light': + getTextColor = function getRandomLightColor() { + return random_hsl_color(50, 90); + }; + break; + + default: + if (typeof settings.color === 'function') { + getTextColor = settings.color; + } + break; + } + + /* function for getting the classes of the text */ + var getTextClasses = null; + if (typeof settings.classes === 'function') { + getTextClasses = settings.classes; + } + + /* Interactive */ + var interactive = false; + var infoGrid = []; + var hovered; + + var getInfoGridFromMouseTouchEvent = + function getInfoGridFromMouseTouchEvent(evt) { + var canvas = evt.currentTarget; + var rect = canvas.getBoundingClientRect(); + var clientX; + var clientY; + /** Detect if touches are available */ + if (evt.touches) { + clientX = evt.touches[0].clientX; + clientY = evt.touches[0].clientY; + } else { + clientX = evt.clientX; + clientY = evt.clientY; + } + var eventX = clientX - rect.left; + var eventY = clientY - rect.top; + + var x = Math.floor(eventX * ((canvas.width / rect.width) || 1) / g); + var y = Math.floor(eventY * ((canvas.height / rect.height) || 1) / g); + + return infoGrid[x][y]; + }; + + var wordcloudhover = function wordcloudhover(evt) { + var info = getInfoGridFromMouseTouchEvent(evt); + + if (hovered === info) { + return; + } + + hovered = info; + if (!info) { + settings.hover(undefined, undefined, evt); + + return; + } + + settings.hover(info.item, info.dimension, evt); + + }; + + var wordcloudclick = function wordcloudclick(evt) { + var info = getInfoGridFromMouseTouchEvent(evt); + if (!info) { + return; + } + + settings.click(info.item, info.dimension, evt); + evt.preventDefault(); + }; + + /* Get points on the grid for a given radius away from the center */ + var pointsAtRadius = []; + var getPointsAtRadius = function getPointsAtRadius(radius) { + if (pointsAtRadius[radius]) { + return pointsAtRadius[radius]; + } + + // Look for these number of points on each radius + var T = radius * 8; + + // Getting all the points at this radius + var t = T; + var points = []; + + if (radius === 0) { + points.push([center[0], center[1], 0]); + } + + while (t--) { + // distort the radius to put the cloud in shape + var rx = 1; + if (settings.shape !== 'circle') { + rx = settings.shape(t / T * 2 * Math.PI); // 0 to 1 + } + + // Push [x, y, t]; t is used solely for getTextColor() + points.push([ + center[0] + radius * rx * Math.cos(-t / T * 2 * Math.PI), + center[1] + radius * rx * Math.sin(-t / T * 2 * Math.PI) * + settings.ellipticity, + t / T * 2 * Math.PI]); + } + + pointsAtRadius[radius] = points; + return points; + }; + + /* Return true if we had spent too much time */ + var exceedTime = function exceedTime() { + return ((settings.abortThreshold > 0) && + ((new Date()).getTime() - escapeTime > settings.abortThreshold)); + }; + + /* Get the deg of rotation according to settings, and luck. */ + var getRotateDeg = function getRotateDeg() { + if (settings.rotateRatio === 0) { + return 0; + } + + if (Math.random() > settings.rotateRatio) { + return 0; + } + + if (rotationRange === 0) { + return minRotation; + } + + return minRotation + Math.round(Math.random() * rotationRange / rotationStep) * rotationStep; + }; + + var getTextInfo = function getTextInfo(word, weight, rotateDeg) { + // calculate the acutal font size + // fontSize === 0 means weightFactor function wants the text skipped, + // and size < minSize means we cannot draw the text. + var debug = false; + var fontSize = settings.weightFactor(weight); + if (fontSize <= settings.minSize) { + return false; + } + + // Scale factor here is to make sure fillText is not limited by + // the minium font size set by browser. + // It will always be 1 or 2n. + var mu = 1; + if (fontSize < minFontSize) { + mu = (function calculateScaleFactor() { + var mu = 2; + while (mu * fontSize < minFontSize) { + mu += 2; + } + return mu; + })(); + } + + var fcanvas = document.createElement('canvas'); + var fctx = fcanvas.getContext('2d', { willReadFrequently: true }); + + fctx.font = settings.fontWeight + ' ' + + (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; + + // Estimate the dimension of the text with measureText(). + var fw = fctx.measureText(word).width / mu; + var fh = Math.max(fontSize * mu, + fctx.measureText('m').width, + fctx.measureText('\uFF37').width) / mu; + + // Create a boundary box that is larger than our estimates, + // so text don't get cut of (it sill might) + var boxWidth = fw + fh * 2; + var boxHeight = fh * 3; + var fgw = Math.ceil(boxWidth / g); + var fgh = Math.ceil(boxHeight / g); + boxWidth = fgw * g; + boxHeight = fgh * g; + + // Calculate the proper offsets to make the text centered at + // the preferred position. + + // This is simply half of the width. + var fillTextOffsetX = - fw / 2; + // Instead of moving the box to the exact middle of the preferred + // position, for Y-offset we move 0.4 instead, so Latin alphabets look + // vertical centered. + var fillTextOffsetY = - fh * 0.4; + + // Calculate the actual dimension of the canvas, considering the rotation. + var cgh = Math.ceil((boxWidth * Math.abs(Math.sin(rotateDeg)) + + boxHeight * Math.abs(Math.cos(rotateDeg))) / g); + var cgw = Math.ceil((boxWidth * Math.abs(Math.cos(rotateDeg)) + + boxHeight * Math.abs(Math.sin(rotateDeg))) / g); + var width = cgw * g; + var height = cgh * g; + + fcanvas.setAttribute('width', width); + fcanvas.setAttribute('height', height); + + if (debug) { + // Attach fcanvas to the DOM + document.body.appendChild(fcanvas); + // Save it's state so that we could restore and draw the grid correctly. + fctx.save(); + } + + // Scale the canvas with |mu|. + fctx.scale(1 / mu, 1 / mu); + fctx.translate(width * mu / 2, height * mu / 2); + fctx.rotate(- rotateDeg); + + // Once the width/height is set, ctx info will be reset. + // Set it again here. + fctx.font = settings.fontWeight + ' ' + + (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; + + // Fill the text into the fcanvas. + // XXX: We cannot because textBaseline = 'top' here because + // Firefox and Chrome uses different default line-height for canvas. + // Please read https://bugzil.la/737852#c6. + // Here, we use textBaseline = 'middle' and draw the text at exactly + // 0.5 * fontSize lower. + fctx.fillStyle = '#000'; + fctx.textBaseline = 'middle'; + fctx.fillText(word, fillTextOffsetX * mu, + (fillTextOffsetY + fontSize * 0.5) * mu); + + // Get the pixels of the text + var imageData = fctx.getImageData(0, 0, width, height).data; + + if (exceedTime()) { + return false; + } + + if (debug) { + // Draw the box of the original estimation + fctx.strokeRect(fillTextOffsetX * mu, + fillTextOffsetY, fw * mu, fh * mu); + fctx.restore(); + } + + // Read the pixels and save the information to the occupied array + var occupied = []; + var gx = cgw, gy, x, y; + var bounds = [cgh / 2, cgw / 2, cgh / 2, cgw / 2]; + while (gx--) { + gy = cgh; + while (gy--) { + y = g; + singleGridLoop: { + while (y--) { + x = g; + while (x--) { + if (imageData[((gy * g + y) * width + + (gx * g + x)) * 4 + 3]) { + occupied.push([gx, gy]); + + if (gx < bounds[3]) { + bounds[3] = gx; + } + if (gx > bounds[1]) { + bounds[1] = gx; + } + if (gy < bounds[0]) { + bounds[0] = gy; + } + if (gy > bounds[2]) { + bounds[2] = gy; + } + + if (debug) { + fctx.fillStyle = 'rgba(255, 0, 0, 0.5)'; + fctx.fillRect(gx * g, gy * g, g - 0.5, g - 0.5); + } + break singleGridLoop; + } + } + } + if (debug) { + fctx.fillStyle = 'rgba(0, 0, 255, 0.5)'; + fctx.fillRect(gx * g, gy * g, g - 0.5, g - 0.5); + } + } + } + } + + if (debug) { + fctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + fctx.fillRect(bounds[3] * g, + bounds[0] * g, + (bounds[1] - bounds[3] + 1) * g, + (bounds[2] - bounds[0] + 1) * g); + } + + // Return information needed to create the text on the real canvas + return { + mu: mu, + occupied: occupied, + bounds: bounds, + gw: cgw, + gh: cgh, + fillTextOffsetX: fillTextOffsetX, + fillTextOffsetY: fillTextOffsetY, + fillTextWidth: fw, + fillTextHeight: fh, + fontSize: fontSize + }; + }; + + /* Determine if there is room available in the given dimension */ + var canFitText = function canFitText(gx, gy, gw, gh, occupied) { + // Go through the occupied points, + // return false if the space is not available. + var i = occupied.length; + while (i--) { + var px = gx + occupied[i][0]; + var py = gy + occupied[i][1]; + + if (px >= ngx || py >= ngy || px < 0 || py < 0) { + if (!settings.drawOutOfBound) { + return false; + } + continue; + } + + if (!grid[px][py]) { + return false; + } + } + return true; + }; + + /* Actually draw the text on the grid */ + var drawText = function drawText(gx, gy, info, word, weight, + distance, theta, rotateDeg, attributes) { + + var fontSize = info.fontSize; + var color; + if (getTextColor) { + color = getTextColor(word, weight, fontSize, distance, theta); + } else { + color = settings.color; + } + + var classes; + if (getTextClasses) { + classes = getTextClasses(word, weight, fontSize, distance, theta); + } else { + classes = settings.classes; + } + + var dimension; + var bounds = info.bounds; + dimension = { + x: (gx + bounds[3]) * g, + y: (gy + bounds[0]) * g, + w: (bounds[1] - bounds[3] + 1) * g, + h: (bounds[2] - bounds[0] + 1) * g + }; + + elements.forEach(function(el) { + if (el.getContext) { + var ctx = el.getContext('2d'); + var mu = info.mu; + + // Save the current state before messing it + ctx.save(); + ctx.scale(1 / mu, 1 / mu); + + ctx.font = settings.fontWeight + ' ' + + (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; + ctx.fillStyle = color; + + // Translate the canvas position to the origin coordinate of where + // the text should be put. + ctx.translate((gx + info.gw / 2) * g * mu, + (gy + info.gh / 2) * g * mu); + + if (rotateDeg !== 0) { + ctx.rotate(- rotateDeg); + } + + // Finally, fill the text. + + // XXX: We cannot because textBaseline = 'top' here because + // Firefox and Chrome uses different default line-height for canvas. + // Please read https://bugzil.la/737852#c6. + // Here, we use textBaseline = 'middle' and draw the text at exactly + // 0.5 * fontSize lower. + ctx.textBaseline = 'middle'; + ctx.fillText(word, info.fillTextOffsetX * mu, + (info.fillTextOffsetY + fontSize * 0.5) * mu); + + // The below box is always matches how s are positioned + /* ctx.strokeRect(info.fillTextOffsetX, info.fillTextOffsetY, + info.fillTextWidth, info.fillTextHeight); */ + + // Restore the state. + ctx.restore(); + } else { + // drawText on DIV element + var span = document.createElement('span'); + var transformRule = ''; + transformRule = 'rotate(' + (- rotateDeg / Math.PI * 180) + 'deg) '; + if (info.mu !== 1) { + transformRule += + 'translateX(-' + (info.fillTextWidth / 4) + 'px) ' + + 'scale(' + (1 / info.mu) + ')'; + } + var styleRules = { + 'position': 'absolute', + 'display': 'block', + 'font': settings.fontWeight + ' ' + + (fontSize * info.mu) + 'px ' + settings.fontFamily, + 'left': ((gx + info.gw / 2) * g + info.fillTextOffsetX) + 'px', + 'top': ((gy + info.gh / 2) * g + info.fillTextOffsetY) + 'px', + 'width': info.fillTextWidth + 'px', + 'height': info.fillTextHeight + 'px', + 'lineHeight': fontSize + 'px', + 'whiteSpace': 'nowrap', + 'transform': transformRule, + 'webkitTransform': transformRule, + 'msTransform': transformRule, + 'transformOrigin': '50% 40%', + 'webkitTransformOrigin': '50% 40%', + 'msTransformOrigin': '50% 40%' + }; + if (color) { + styleRules.color = color; + } + span.textContent = word; + for (var cssProp in styleRules) { + span.style[cssProp] = styleRules[cssProp]; + } + if (attributes) { + for (var attribute in attributes) { + span.setAttribute(attribute, attributes[attribute]); + } + } + if (classes) { + span.className += classes; + } + el.appendChild(span); + } + }); + }; + + /* Help function to updateGrid */ + var fillGridAt = function fillGridAt(x, y, drawMask, dimension, item) { + if (x >= ngx || y >= ngy || x < 0 || y < 0) { + return; + } + + grid[x][y] = false; + + if (drawMask) { + var ctx = elements[0].getContext('2d'); + ctx.fillRect(x * g, y * g, maskRectWidth, maskRectWidth); + } + + if (interactive) { + infoGrid[x][y] = { item: item, dimension: dimension }; + } + }; + + /* Update the filling information of the given space with occupied points. + Draw the mask on the canvas if necessary. */ + var updateGrid = function updateGrid(gx, gy, gw, gh, info, item) { + var occupied = info.occupied; + var drawMask = settings.drawMask; + var ctx; + if (drawMask) { + ctx = elements[0].getContext('2d'); + ctx.save(); + ctx.fillStyle = settings.maskColor; + } + + var dimension; + if (interactive) { + var bounds = info.bounds; + dimension = { + x: (gx + bounds[3]) * g, + y: (gy + bounds[0]) * g, + w: (bounds[1] - bounds[3] + 1) * g, + h: (bounds[2] - bounds[0] + 1) * g + }; + } + + var i = occupied.length; + while (i--) { + var px = gx + occupied[i][0]; + var py = gy + occupied[i][1]; + + if (px >= ngx || py >= ngy || px < 0 || py < 0) { + continue; + } + + fillGridAt(px, py, drawMask, dimension, item); + } + + if (drawMask) { + ctx.restore(); + } + }; + + /* putWord() processes each item on the list, + calculate it's size and determine it's position, and actually + put it on the canvas. */ + var putWord = function putWord(item) { + var word, weight, attributes; + if (Array.isArray(item)) { + word = item[0]; + weight = item[1]; + } else { + word = item.word; + weight = item.weight; + attributes = item.attributes; + } + var rotateDeg = getRotateDeg(); + + // get info needed to put the text onto the canvas + var info = getTextInfo(word, weight, rotateDeg); + + // not getting the info means we shouldn't be drawing this one. + if (!info) { + return false; + } + + if (exceedTime()) { + return false; + } + + // If drawOutOfBound is set to false, + // skip the loop if we have already know the bounding box of + // word is larger than the canvas. + if (!settings.drawOutOfBound) { + var bounds = info.bounds; + if ((bounds[1] - bounds[3] + 1) > ngx || + (bounds[2] - bounds[0] + 1) > ngy) { + return false; + } + } + + // Determine the position to put the text by + // start looking for the nearest points + var r = maxRadius + 1; + + var tryToPutWordAtPoint = function(gxy) { + var gx = Math.floor(gxy[0] - info.gw / 2); + var gy = Math.floor(gxy[1] - info.gh / 2); + var gw = info.gw; + var gh = info.gh; + + // If we cannot fit the text at this position, return false + // and go to the next position. + if (!canFitText(gx, gy, gw, gh, info.occupied)) { + return false; + } + + // Actually put the text on the canvas + drawText(gx, gy, info, word, weight, + (maxRadius - r), gxy[2], rotateDeg, attributes); + + // Mark the spaces on the grid as filled + updateGrid(gx, gy, gw, gh, info, item); + + return { + gx: gx, + gy: gy, + rot: rotateDeg, + info: info + }; + }; + + while (r--) { + var points = getPointsAtRadius(maxRadius - r); + + if (settings.shuffle) { + points = [].concat(points); + shuffleArray(points); + } + + // Try to fit the words by looking at each point. + // array.some() will stop and return true + // when putWordAtPoint() returns true. + for (var i = 0; i < points.length; i++) { + var res = tryToPutWordAtPoint(points[i]); + if (res) { + return res; + } + } + + // var drawn = points.some(tryToPutWordAtPoint); + // if (drawn) { + // // leave putWord() and return true + // return true; + // } + } + // we tried all distances but text won't fit, return null + return null; + }; + + /* Send DOM event to all elements. Will stop sending event and return + if the previous one is canceled (for cancelable events). */ + var sendEvent = function sendEvent(type, cancelable, detail) { + if (cancelable) { + return !elements.some(function(el) { + var evt = document.createEvent('CustomEvent'); + evt.initCustomEvent(type, true, cancelable, detail || {}); + return !el.dispatchEvent(evt); + }, this); + } else { + elements.forEach(function(el) { + var evt = document.createEvent('CustomEvent'); + evt.initCustomEvent(type, true, cancelable, detail || {}); + el.dispatchEvent(evt); + }, this); + } + }; + + /* Start drawing on a canvas */ + var start = function start() { + // For dimensions, clearCanvas etc., + // we only care about the first element. + var canvas = elements[0]; + + if (canvas.getContext) { + ngx = Math.ceil(canvas.width / g); + ngy = Math.ceil(canvas.height / g); + } else { + var rect = canvas.getBoundingClientRect(); + ngx = Math.ceil(rect.width / g); + ngy = Math.ceil(rect.height / g); + } + + // Sending a wordcloudstart event which cause the previous loop to stop. + // Do nothing if the event is canceled. + if (!sendEvent('wordcloudstart', true)) { + return; + } + + // Determine the center of the word cloud + center = (settings.origin) ? + [settings.origin[0]/g, settings.origin[1]/g] : + [ngx / 2, ngy / 2]; + + // Maxium radius to look for space + maxRadius = Math.floor(Math.sqrt(ngx * ngx + ngy * ngy)); + + /* Clear the canvas only if the clearCanvas is set, + if not, update the grid to the current canvas state */ + grid = []; + + var gx, gy, i; + if (!canvas.getContext || settings.clearCanvas) { + elements.forEach(function(el) { + if (el.getContext) { + var ctx = el.getContext('2d'); + ctx.fillStyle = settings.backgroundColor; + ctx.clearRect(0, 0, ngx * (g + 1), ngy * (g + 1)); + ctx.fillRect(0, 0, ngx * (g + 1), ngy * (g + 1)); + } else { + el.textContent = ''; + el.style.backgroundColor = settings.backgroundColor; + el.style.position = 'relative'; + } + }); + + /* fill the grid with empty state */ + gx = ngx; + while (gx--) { + grid[gx] = []; + gy = ngy; + while (gy--) { + grid[gx][gy] = true; + } + } + } else { + /* Determine bgPixel by creating + another canvas and fill the specified background color. */ + var bctx = document.createElement('canvas').getContext('2d'); + + bctx.fillStyle = settings.backgroundColor; + bctx.fillRect(0, 0, 1, 1); + var bgPixel = bctx.getImageData(0, 0, 1, 1).data; + + /* Read back the pixels of the canvas we got to tell which part of the + canvas is empty. + (no clearCanvas only works with a canvas, not divs) */ + var imageData = + canvas.getContext('2d').getImageData(0, 0, ngx * g, ngy * g).data; + + gx = ngx; + var x, y; + while (gx--) { + grid[gx] = []; + gy = ngy; + while (gy--) { + y = g; + singleGridLoop: while (y--) { + x = g; + while (x--) { + i = 4; + while (i--) { + if (imageData[((gy * g + y) * ngx * g + + (gx * g + x)) * 4 + i] !== bgPixel[i]) { + grid[gx][gy] = false; + break singleGridLoop; + } + } + } + } + if (grid[gx][gy] !== false) { + grid[gx][gy] = true; + } + } + } + + imageData = bctx = bgPixel = undefined; + } + + // fill the infoGrid with empty state if we need it + if (settings.hover || settings.click) { + + interactive = true; + + /* fill the grid with empty state */ + gx = ngx + 1; + while (gx--) { + infoGrid[gx] = []; + } + + if (settings.hover) { + canvas.addEventListener('mousemove', wordcloudhover); + } + + if (settings.click) { + canvas.addEventListener('click', wordcloudclick); + canvas.addEventListener('touchstart', wordcloudclick); + canvas.addEventListener('touchend', function (e) { + e.preventDefault(); + }); + canvas.style.webkitTapHighlightColor = 'rgba(0, 0, 0, 0)'; + } + + canvas.addEventListener('wordcloudstart', function stopInteraction() { + canvas.removeEventListener('wordcloudstart', stopInteraction); + + canvas.removeEventListener('mousemove', wordcloudhover); + canvas.removeEventListener('click', wordcloudclick); + hovered = undefined; + }); + } + + i = 0; + var loopingFunction, stoppingFunction; + if (settings.wait !== 0) { + loopingFunction = window.setTimeout; + stoppingFunction = window.clearTimeout; + } else { + loopingFunction = window.setImmediate; + stoppingFunction = window.clearImmediate; + } + + var addEventListener = function addEventListener(type, listener) { + elements.forEach(function(el) { + el.addEventListener(type, listener); + }, this); + }; + + var removeEventListener = function removeEventListener(type, listener) { + elements.forEach(function(el) { + el.removeEventListener(type, listener); + }, this); + }; + + var anotherWordCloudStart = function anotherWordCloudStart() { + removeEventListener('wordcloudstart', anotherWordCloudStart); + stoppingFunction(timer); + }; + + addEventListener('wordcloudstart', anotherWordCloudStart); + + var timer = loopingFunction(function loop() { + if (i >= settings.list.length) { + stoppingFunction(timer); + sendEvent('wordcloudstop', false); + removeEventListener('wordcloudstart', anotherWordCloudStart); + + return; + } + escapeTime = (new Date()).getTime(); + var drawn = putWord(settings.list[i]); + var canceled = !sendEvent('wordclouddrawn', true, { + item: settings.list[i], drawn: drawn }); + if (exceedTime() || canceled) { + stoppingFunction(timer); + settings.abort(); + sendEvent('wordcloudabort', false); + sendEvent('wordcloudstop', false); + removeEventListener('wordcloudstart', anotherWordCloudStart); + return; + } + i++; + timer = loopingFunction(loop, settings.wait); + }, settings.wait); + }; + + // All set, start the drawing + start(); + }; + + WordCloud.isSupported = isSupported; + WordCloud.minFontSize = minFontSize; + + // Expose the library as an AMD module + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { return WordCloud; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} + +})(this); //jshint ignore:line + +/***/ }), + +/***/ 88157: +/*!*********************************************************!*\ + !*** ./node_modules/echarts-wordcloud/src/wordCloud.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var echarts = __webpack_require__(/*! echarts/lib/echarts */ 70492); +var layoutUtil = __webpack_require__(/*! echarts/lib/util/layout */ 76172); + +__webpack_require__(/*! ./WordCloudSeries */ 50024); +__webpack_require__(/*! ./WordCloudView */ 40885); + +var wordCloudLayoutHelper = __webpack_require__(/*! ./layout */ 62255); + +if (!wordCloudLayoutHelper.isSupported) { + throw new Error('Sorry your browser not support wordCloud'); +} + +// https://github.com/timdream/wordcloud2.js/blob/c236bee60436e048949f9becc4f0f67bd832dc5c/index.js#L233 +function updateCanvasMask(maskCanvas) { + var ctx = maskCanvas.getContext('2d'); + var imageData = ctx.getImageData( + 0, 0, maskCanvas.width, maskCanvas.height); + var newImageData = ctx.createImageData(imageData); + + var toneSum = 0; + var toneCnt = 0; + for (var i = 0; i < imageData.data.length; i += 4) { + var alpha = imageData.data[i + 3]; + if (alpha > 128) { + var tone = imageData.data[i] + + imageData.data[i + 1] + + imageData.data[i + 2]; + toneSum += tone; + ++toneCnt; + } + } + var threshold = toneSum / toneCnt; + + for (var i = 0; i < imageData.data.length; i += 4) { + var tone = imageData.data[i] + + imageData.data[i + 1] + + imageData.data[i + 2]; + var alpha = imageData.data[i + 3]; + + if (alpha < 128 || tone > threshold) { + // Area not to draw + newImageData.data[i] = 0; + newImageData.data[i + 1] = 0; + newImageData.data[i + 2] = 0; + newImageData.data[i + 3] = 0; + } + else { + // Area to draw + // The color must be same with backgroundColor + newImageData.data[i] = 255; + newImageData.data[i + 1] = 255; + newImageData.data[i + 2] = 255; + newImageData.data[i + 3] = 255; + } + } + + ctx.putImageData(newImageData, 0, 0); +} + +echarts.registerLayout(function (ecModel, api) { + ecModel.eachSeriesByType('wordCloud', function (seriesModel) { + var gridRect = layoutUtil.getLayoutRect( + seriesModel.getBoxLayoutParams(), { + width: api.getWidth(), + height: api.getHeight() + } + ); + var data = seriesModel.getData(); + + var canvas = document.createElement('canvas'); + canvas.width = gridRect.width; + canvas.height = gridRect.height; + + var ctx = canvas.getContext('2d'); + var maskImage = seriesModel.get('maskImage'); + if (maskImage) { + try { + ctx.drawImage(maskImage, 0, 0, canvas.width, canvas.height); + updateCanvasMask(canvas); + } + catch (e) { + console.error('Invalid mask image'); + console.error(e.toString()); + } + } + + var sizeRange = seriesModel.get('sizeRange'); + var rotationRange = seriesModel.get('rotationRange'); + var valueExtent = data.getDataExtent('value'); + + var DEGREE_TO_RAD = Math.PI / 180; + var gridSize = seriesModel.get('gridSize'); + wordCloudLayoutHelper(canvas, { + list: data.mapArray('value', function (value, idx) { + var itemModel = data.getItemModel(idx); + return [ + data.getName(idx), + itemModel.get('textStyle.normal.textSize', true) + || echarts.number.linearMap(value, valueExtent, sizeRange), + idx + ]; + }).sort(function (a, b) { + // Sort from large to small in case there is no more room for more words + return b[1] - a[1]; + }), + fontFamily: seriesModel.get('textStyle.normal.fontFamily') + || seriesModel.get('textStyle.emphasis.fontFamily') + || ecModel.get('textStyle.fontFamily'), + fontWeight: seriesModel.get('textStyle.normal.fontWeight') + || seriesModel.get('textStyle.emphasis.fontWeight') + || ecModel.get('textStyle.fontWeight'), + gridSize: gridSize, + + ellipticity: gridRect.height / gridRect.width, + + minRotation: rotationRange[0] * DEGREE_TO_RAD, + maxRotation: rotationRange[1] * DEGREE_TO_RAD, + + clearCanvas: !maskImage, + + rotateRatio: 1, + + rotationStep: seriesModel.get('rotationStep') * DEGREE_TO_RAD, + + drawOutOfBound: seriesModel.get('drawOutOfBound'), + + shuffle: false, + + shape: seriesModel.get('shape') + }); + + function onWordCloudDrawn(e) { + var item = e.detail.item; + if (e.detail.drawn && seriesModel.layoutInstance.ondraw) { + e.detail.drawn.gx += gridRect.x / gridSize; + e.detail.drawn.gy += gridRect.y / gridSize; + seriesModel.layoutInstance.ondraw( + item[0], item[1], item[2], e.detail.drawn + ); + } + } + + canvas.addEventListener('wordclouddrawn', onWordCloudDrawn); + + if (seriesModel.layoutInstance) { + // Dispose previous + seriesModel.layoutInstance.dispose(); + } + + seriesModel.layoutInstance = { + ondraw: null, + + dispose: function () { + canvas.removeEventListener('wordclouddrawn', onWordCloudDrawn); + // Abort + canvas.addEventListener('wordclouddrawn', function (e) { + // Prevent default to cancle the event and stop the loop + e.preventDefault(); + }); + } + }; + }); +}); + +echarts.registerPreprocessor(function (option) { + var series = (option || {}).series; + !echarts.util.isArray(series) && (series = series ? [series] : []); + + var compats = ['shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY']; + + echarts.util.each(series, function (seriesItem) { + if (seriesItem && seriesItem.type === 'wordCloud') { + var textStyle = seriesItem.textStyle || {}; + + compatTextStyle(textStyle.normal); + compatTextStyle(textStyle.emphasis); + } + }); + + function compatTextStyle(textStyle) { + textStyle && echarts.util.each(compats, function (key) { + if (textStyle.hasOwnProperty(key)) { + textStyle['text' + echarts.format.capitalFirst(key)] = textStyle[key]; + } + }); + } +}); + + +/***/ }), + +/***/ 74300: +/*!***************************************************************!*\ + !*** ./node_modules/react-copy-to-clipboard/lib/Component.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.CopyToClipboard = void 0; + +var _react = _interopRequireDefault(__webpack_require__(/*! react */ 67294)); + +var _copyToClipboard = _interopRequireDefault(__webpack_require__(/*! copy-to-clipboard */ 20640)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +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; } + +var CopyToClipboard = +/*#__PURE__*/ +function (_React$PureComponent) { + _inherits(CopyToClipboard, _React$PureComponent); + + function CopyToClipboard() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck(this, CopyToClipboard); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty(_assertThisInitialized(_this), "onClick", function (event) { + var _this$props = _this.props, + text = _this$props.text, + onCopy = _this$props.onCopy, + children = _this$props.children, + options = _this$props.options; + + var elem = _react["default"].Children.only(children); + + var result = (0, _copyToClipboard["default"])(text, options); + + if (onCopy) { + onCopy(text, result); + } // Bypass onClick if it was present + + + if (elem && elem.props && typeof elem.props.onClick === 'function') { + elem.props.onClick(event); + } + }); + + return _this; + } + + _createClass(CopyToClipboard, [{ + key: "render", + value: function render() { + var _this$props2 = this.props, + _text = _this$props2.text, + _onCopy = _this$props2.onCopy, + _options = _this$props2.options, + children = _this$props2.children, + props = _objectWithoutProperties(_this$props2, ["text", "onCopy", "options", "children"]); + + var elem = _react["default"].Children.only(children); + + return _react["default"].cloneElement(elem, _objectSpread({}, props, { + onClick: this.onClick + })); + } + }]); + + return CopyToClipboard; +}(_react["default"].PureComponent); + +exports.CopyToClipboard = CopyToClipboard; + +_defineProperty(CopyToClipboard, "defaultProps", { + onCopy: undefined, + options: undefined +}); + +/***/ }), + +/***/ 74855: +/*!***********************************************************!*\ + !*** ./node_modules/react-copy-to-clipboard/lib/index.js ***! + \***********************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var _require = __webpack_require__(/*! ./Component */ 74300), + CopyToClipboard = _require.CopyToClipboard; + +CopyToClipboard.CopyToClipboard = CopyToClipboard; +module.exports = CopyToClipboard; + +/***/ }), + +/***/ 57761: +/*!*********************************************************************!*\ + !*** ./node_modules/react-infinite-scroller/dist/InfiniteScroll.js ***! + \*********************************************************************/ +/***/ (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__(/*! react */ 67294); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(/*! prop-types */ 45697); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +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 InfiniteScroll = function (_Component) { + _inherits(InfiniteScroll, _Component); + + function InfiniteScroll(props) { + _classCallCheck(this, InfiniteScroll); + + var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props)); + + _this.scrollListener = _this.scrollListener.bind(_this); + _this.eventListenerOptions = _this.eventListenerOptions.bind(_this); + _this.mousewheelListener = _this.mousewheelListener.bind(_this); + return _this; + } + + _createClass(InfiniteScroll, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.pageLoaded = this.props.pageStart; + this.options = this.eventListenerOptions(); + this.attachScrollListener(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + if (this.props.isReverse && this.loadMore) { + var parentElement = this.getParentElement(this.scrollComponent); + parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop; + this.loadMore = false; + } + this.attachScrollListener(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.detachScrollListener(); + this.detachMousewheelListener(); + } + }, { + key: 'isPassiveSupported', + value: function isPassiveSupported() { + var passive = false; + + var testOptions = { + get passive() { + passive = true; + } + }; + + try { + document.addEventListener('test', null, testOptions); + document.removeEventListener('test', null, testOptions); + } catch (e) { + // ignore + } + return passive; + } + }, { + key: 'eventListenerOptions', + value: function eventListenerOptions() { + var options = this.props.useCapture; + + if (this.isPassiveSupported()) { + options = { + useCapture: this.props.useCapture, + passive: true + }; + } + return options; + } + + // Set a defaut loader for all your `InfiniteScroll` components + + }, { + key: 'setDefaultLoader', + value: function setDefaultLoader(loader) { + this.defaultLoader = loader; + } + }, { + key: 'detachMousewheelListener', + value: function detachMousewheelListener() { + var scrollEl = window; + if (this.props.useWindow === false) { + scrollEl = this.scrollComponent.parentNode; + } + + scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture); + } + }, { + key: 'detachScrollListener', + value: function detachScrollListener() { + var scrollEl = window; + if (this.props.useWindow === false) { + scrollEl = this.getParentElement(this.scrollComponent); + } + + scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture); + scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture); + } + }, { + key: 'getParentElement', + value: function getParentElement(el) { + var scrollParent = this.props.getScrollParent && this.props.getScrollParent(); + if (scrollParent != null) { + return scrollParent; + } + return el && el.parentNode; + } + }, { + key: 'filterProps', + value: function filterProps(props) { + return props; + } + }, { + key: 'attachScrollListener', + value: function attachScrollListener() { + var parentElement = this.getParentElement(this.scrollComponent); + + if (!this.props.hasMore || !parentElement) { + return; + } + + var scrollEl = window; + if (this.props.useWindow === false) { + scrollEl = parentElement; + } + + scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture); + scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture); + scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture); + + if (this.props.initialLoad) { + this.scrollListener(); + } + } + }, { + key: 'mousewheelListener', + value: function mousewheelListener(e) { + // Prevents Chrome hangups + // See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257 + if (e.deltaY === 1 && !this.isPassiveSupported()) { + e.preventDefault(); + } + } + }, { + key: 'scrollListener', + value: function scrollListener() { + var el = this.scrollComponent; + var scrollEl = window; + var parentNode = this.getParentElement(el); + + var offset = void 0; + if (this.props.useWindow) { + var doc = document.documentElement || document.body.parentNode || document.body; + var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop; + if (this.props.isReverse) { + offset = scrollTop; + } else { + offset = this.calculateOffset(el, scrollTop); + } + } else if (this.props.isReverse) { + offset = parentNode.scrollTop; + } else { + offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight; + } + + // Here we make sure the element is visible as well as checking the offset + if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) { + this.detachScrollListener(); + this.beforeScrollHeight = parentNode.scrollHeight; + this.beforeScrollTop = parentNode.scrollTop; + // Call loadMore after detachScrollListener to allow for non-async loadMore functions + if (typeof this.props.loadMore === 'function') { + this.props.loadMore(this.pageLoaded += 1); + this.loadMore = true; + } + } + } + }, { + key: 'calculateOffset', + value: function calculateOffset(el, scrollTop) { + if (!el) { + return 0; + } + + return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight); + } + }, { + key: 'calculateTopPosition', + value: function calculateTopPosition(el) { + if (!el) { + return 0; + } + return el.offsetTop + this.calculateTopPosition(el.offsetParent); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var renderProps = this.filterProps(this.props); + + var children = renderProps.children, + element = renderProps.element, + hasMore = renderProps.hasMore, + initialLoad = renderProps.initialLoad, + isReverse = renderProps.isReverse, + loader = renderProps.loader, + loadMore = renderProps.loadMore, + pageStart = renderProps.pageStart, + ref = renderProps.ref, + threshold = renderProps.threshold, + useCapture = renderProps.useCapture, + useWindow = renderProps.useWindow, + getScrollParent = renderProps.getScrollParent, + props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']); + + props.ref = function (node) { + _this2.scrollComponent = node; + if (ref) { + ref(node); + } + }; + + var childrenArray = [children]; + if (hasMore) { + if (loader) { + isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader); + } else if (this.defaultLoader) { + isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader); + } + } + return _react2.default.createElement(element, props, childrenArray); + } + }]); + + return InfiniteScroll; +}(_react.Component); + +InfiniteScroll.propTypes = { + children: _propTypes2.default.node.isRequired, + element: _propTypes2.default.node, + hasMore: _propTypes2.default.bool, + initialLoad: _propTypes2.default.bool, + isReverse: _propTypes2.default.bool, + loader: _propTypes2.default.node, + loadMore: _propTypes2.default.func.isRequired, + pageStart: _propTypes2.default.number, + ref: _propTypes2.default.func, + getScrollParent: _propTypes2.default.func, + threshold: _propTypes2.default.number, + useCapture: _propTypes2.default.bool, + useWindow: _propTypes2.default.bool +}; +InfiniteScroll.defaultProps = { + element: 'div', + hasMore: false, + initialLoad: true, + pageStart: 0, + ref: null, + threshold: 250, + useWindow: true, + isReverse: false, + useCapture: false, + loader: null, + getScrollParent: null +}; +exports["default"] = InfiniteScroll; +module.exports = exports['default']; + + +/***/ }), + +/***/ 246: +/*!*******************************************************!*\ + !*** ./node_modules/react-infinite-scroller/index.js ***! + \*******************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! ./dist/InfiniteScroll */ 57761) + + +/***/ }), + +/***/ 11742: +/*!************************************************!*\ + !*** ./node_modules/toggle-selection/index.js ***! + \************************************************/ +/***/ (function(module) { + + +module.exports = function () { + var selection = document.getSelection(); + if (!selection.rangeCount) { + return function () {}; + } + var active = document.activeElement; + + var ranges = []; + for (var i = 0; i < selection.rangeCount; i++) { + ranges.push(selection.getRangeAt(i)); + } + + switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML + case 'INPUT': + case 'TEXTAREA': + active.blur(); + break; + + default: + active = null; + break; + } + + selection.removeAllRanges(); + return function () { + selection.type === 'Caret' && + selection.removeAllRanges(); + + if (!selection.rangeCount) { + ranges.forEach(function(range) { + selection.addRange(range); + }); + } + + active && + active.focus(); + }; +}; + + +/***/ }) + +}]); \ No newline at end of file diff --git a/12178.async.js b/12178.async.js index 6725a81d51..3da256850c 100644 --- a/12178.async.js +++ b/12178.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[12178,59606,93691,11328,58447,77075,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[12178,59606,93691,11328,58447,77075,94657,64649,33893,9277,54682,68282],{ /***/ 38780: /*!*****************************************************!*\ diff --git a/12750.async.js b/12750.async.js deleted file mode 100644 index a93905191e..0000000000 --- a/12750.async.js +++ /dev/null @@ -1,748 +0,0 @@ -"use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[12750],{ - -/***/ 85418: -/*!************************************************************!*\ - !*** ./node_modules/antd/es/dropdown/index.js + 1 modules ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ es_dropdown; } -}); - -// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/dropdown.js + 9 modules -var dropdown = __webpack_require__(35874); -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(94184); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/EllipsisOutlined.js + 1 modules -var EllipsisOutlined = __webpack_require__(89705); -// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js -var es_button = __webpack_require__(71577); -// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js -var context = __webpack_require__(53124); -// EXTERNAL MODULE: ./node_modules/antd/es/space/index.js + 2 modules -var space = __webpack_require__(42075); -// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js -var Compact = __webpack_require__(4173); -// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/style/index.js + 1 modules -var style = __webpack_require__(66748); -;// CONCATENATED MODULE: ./node_modules/antd/es/dropdown/dropdown-button.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; -}; - - - - - - - - - -const DropdownButton = props => { - const { - getPopupContainer: getContextPopupContainer, - getPrefixCls, - direction - } = react.useContext(context/* ConfigContext */.E_); - const { - prefixCls: customizePrefixCls, - type = 'default', - danger, - disabled, - loading, - onClick, - htmlType, - children, - className, - menu, - arrow, - autoFocus, - overlay, - trigger, - align, - open, - onOpenChange, - placement, - getPopupContainer, - href, - icon = /*#__PURE__*/react.createElement(EllipsisOutlined/* default */.Z, null), - title, - buttonsRender = buttons => buttons, - mouseEnterDelay, - mouseLeaveDelay, - overlayClassName, - overlayStyle, - destroyPopupOnHide, - dropdownRender - } = props, - restProps = __rest(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"]); - const prefixCls = getPrefixCls('dropdown', customizePrefixCls); - const buttonPrefixCls = `${prefixCls}-button`; - const [wrapSSR, hashId] = (0,style/* default */.Z)(prefixCls); - const dropdownProps = { - menu, - arrow, - autoFocus, - align, - disabled, - trigger: disabled ? [] : trigger, - onOpenChange, - getPopupContainer: getPopupContainer || getContextPopupContainer, - mouseEnterDelay, - mouseLeaveDelay, - overlayClassName, - overlayStyle, - destroyPopupOnHide, - dropdownRender - }; - const { - compactSize, - compactItemClassnames - } = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction); - const classes = classnames_default()(buttonPrefixCls, compactItemClassnames, className, hashId); - if ('overlay' in props) { - dropdownProps.overlay = overlay; - } - if ('open' in props) { - dropdownProps.open = open; - } - if ('placement' in props) { - dropdownProps.placement = placement; - } else { - dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight'; - } - const leftButton = /*#__PURE__*/react.createElement(es_button/* default */.ZP, { - type: type, - danger: danger, - disabled: disabled, - loading: loading, - onClick: onClick, - htmlType: htmlType, - href: href, - title: title - }, children); - const rightButton = /*#__PURE__*/react.createElement(es_button/* default */.ZP, { - type: type, - danger: danger, - icon: icon - }); - const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]); - return wrapSSR( /*#__PURE__*/react.createElement(space/* default.Compact */.Z.Compact, Object.assign({ - className: classes, - size: compactSize, - block: true - }, restProps), leftButtonToRender, /*#__PURE__*/react.createElement(dropdown/* default */.Z, Object.assign({}, dropdownProps), rightButtonToRender))); -}; -DropdownButton.__ANT_BUTTON = true; -/* harmony default export */ var dropdown_button = (DropdownButton); -;// CONCATENATED MODULE: ./node_modules/antd/es/dropdown/index.js -'use client'; - - - -const Dropdown = dropdown/* default */.Z; -Dropdown.Button = dropdown_button; -/* harmony default export */ var es_dropdown = (Dropdown); - -/***/ }), - -/***/ 59606: -/*!********************************************************!*\ - !*** ./node_modules/antd/es/rate/index.js + 8 modules ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ rate; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/StarFilled.js -// This icon file is generated automatically. -var StarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" } }] }, "name": "star", "theme": "filled" }; -/* harmony default export */ var asn_StarFilled = (StarFilled); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules -var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/StarFilled.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var StarFilled_StarFilled = function StarFilled(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_StarFilled - })); -}; -if (false) {} -/* harmony default export */ var icons_StarFilled = (/*#__PURE__*/react.forwardRef(StarFilled_StarFilled)); -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(94184); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(4942); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules -var slicedToArray = __webpack_require__(97685); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(45987); -// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js -var useMergedState = __webpack_require__(21770); -// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js -var KeyCode = __webpack_require__(15105); -// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js -var pickAttrs = __webpack_require__(64217); -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/Star.js - - - -function Star(props, ref) { - var disabled = props.disabled, - prefixCls = props.prefixCls, - character = props.character, - characterRender = props.characterRender, - index = props.index, - count = props.count, - value = props.value, - allowHalf = props.allowHalf, - focused = props.focused, - onHover = props.onHover, - onClick = props.onClick; - // =========================== Events =========================== - var onInternalHover = function onInternalHover(e) { - onHover(e, index); - }; - var onInternalClick = function onInternalClick(e) { - onClick(e, index); - }; - var onInternalKeyDown = function onInternalKeyDown(e) { - if (e.keyCode === KeyCode/* default.ENTER */.Z.ENTER) { - onClick(e, index); - } - }; - // =========================== Render =========================== - // >>>>> ClassName - var starValue = index + 1; - var classNameList = new Set([prefixCls]); - // TODO: Current we just refactor from CC to FC. This logic seems can be optimized. - if (value === 0 && index === 0 && focused) { - classNameList.add("".concat(prefixCls, "-focused")); - } else if (allowHalf && value + 0.5 >= starValue && value < starValue) { - classNameList.add("".concat(prefixCls, "-half")); - classNameList.add("".concat(prefixCls, "-active")); - if (focused) { - classNameList.add("".concat(prefixCls, "-focused")); - } - } else { - if (starValue <= value) { - classNameList.add("".concat(prefixCls, "-full")); - } else { - classNameList.add("".concat(prefixCls, "-zero")); - } - if (starValue === value && focused) { - classNameList.add("".concat(prefixCls, "-focused")); - } - } - // >>>>> Node - var characterNode = typeof character === 'function' ? character(props) : character; - var start = /*#__PURE__*/react.createElement("li", { - className: classnames_default()(Array.from(classNameList)), - ref: ref - }, /*#__PURE__*/react.createElement("div", { - onClick: disabled ? null : onInternalClick, - onKeyDown: disabled ? null : onInternalKeyDown, - onMouseMove: disabled ? null : onInternalHover, - role: "radio", - "aria-checked": value > index ? 'true' : 'false', - "aria-posinset": index + 1, - "aria-setsize": count, - tabIndex: disabled ? -1 : 0 - }, /*#__PURE__*/react.createElement("div", { - className: "".concat(prefixCls, "-first") - }, characterNode), /*#__PURE__*/react.createElement("div", { - className: "".concat(prefixCls, "-second") - }, characterNode))); - if (characterRender) { - start = characterRender(start, props); - } - return start; -} -/* harmony default export */ var es_Star = (/*#__PURE__*/react.forwardRef(Star)); -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/useRefs.js - -function useRefs() { - var nodeRef = react.useRef({}); - function getRef(index) { - return nodeRef.current[index]; - } - function setRef(index) { - return function (node) { - nodeRef.current[index] = node; - }; - } - return [getRef, setRef]; -} -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/util.js -function getScroll(w) { - var ret = w.pageXOffset; - var method = 'scrollLeft'; - 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 getClientPosition(elem) { - var x; - var y; - var doc = elem.ownerDocument; - var body = doc.body; - var docElem = doc && doc.documentElement; - var box = elem.getBoundingClientRect(); - x = box.left; - y = box.top; - x -= docElem.clientLeft || body.clientLeft || 0; - y -= docElem.clientTop || body.clientTop || 0; - return { - left: x, - top: y - }; -} -function getOffsetLeft(el) { - var pos = getClientPosition(el); - var doc = el.ownerDocument; - // Only IE use `parentWindow` - var w = doc.defaultView || doc.parentWindow; - pos.left += getScroll(w); - return pos.left; -} -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/Rate.js - - - - -var _excluded = ["prefixCls", "className", "defaultValue", "value", "count", "allowHalf", "allowClear", "character", "characterRender", "disabled", "direction", "tabIndex", "autoFocus", "onHoverChange", "onChange", "onFocus", "onBlur", "onKeyDown", "onMouseLeave"]; - - - - - - - - -function Rate(props, ref) { - var _classNames; - var _props$prefixCls = props.prefixCls, - prefixCls = _props$prefixCls === void 0 ? 'rc-rate' : _props$prefixCls, - className = props.className, - defaultValue = props.defaultValue, - propValue = props.value, - _props$count = props.count, - count = _props$count === void 0 ? 5 : _props$count, - _props$allowHalf = props.allowHalf, - allowHalf = _props$allowHalf === void 0 ? false : _props$allowHalf, - _props$allowClear = props.allowClear, - allowClear = _props$allowClear === void 0 ? true : _props$allowClear, - _props$character = props.character, - character = _props$character === void 0 ? '★' : _props$character, - characterRender = props.characterRender, - disabled = props.disabled, - _props$direction = props.direction, - direction = _props$direction === void 0 ? 'ltr' : _props$direction, - _props$tabIndex = props.tabIndex, - tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, - autoFocus = props.autoFocus, - onHoverChange = props.onHoverChange, - onChange = props.onChange, - onFocus = props.onFocus, - onBlur = props.onBlur, - onKeyDown = props.onKeyDown, - onMouseLeave = props.onMouseLeave, - restProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded); - var _useRefs = useRefs(), - _useRefs2 = (0,slicedToArray/* default */.Z)(_useRefs, 2), - getStarRef = _useRefs2[0], - setStarRef = _useRefs2[1]; - var rateRef = react.useRef(null); - // ============================ Ref ============================= - var triggerFocus = function triggerFocus() { - if (!disabled) { - var _rateRef$current; - (_rateRef$current = rateRef.current) === null || _rateRef$current === void 0 ? void 0 : _rateRef$current.focus(); - } - }; - react.useImperativeHandle(ref, function () { - return { - focus: triggerFocus, - blur: function blur() { - if (!disabled) { - var _rateRef$current2; - (_rateRef$current2 = rateRef.current) === null || _rateRef$current2 === void 0 ? void 0 : _rateRef$current2.blur(); - } - } - }; - }); - // =========================== Value ============================ - var _useMergedState = (0,useMergedState/* default */.Z)(defaultValue || 0, { - value: propValue - }), - _useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2), - value = _useMergedState2[0], - setValue = _useMergedState2[1]; - var _useMergedState3 = (0,useMergedState/* default */.Z)(null), - _useMergedState4 = (0,slicedToArray/* default */.Z)(_useMergedState3, 2), - cleanedValue = _useMergedState4[0], - setCleanedValue = _useMergedState4[1]; - var getStarValue = function getStarValue(index, x) { - var reverse = direction === 'rtl'; - var starValue = index + 1; - if (allowHalf) { - var starEle = getStarRef(index); - var leftDis = getOffsetLeft(starEle); - var width = starEle.clientWidth; - if (reverse && x - leftDis > width / 2) { - starValue -= 0.5; - } else if (!reverse && x - leftDis < width / 2) { - starValue -= 0.5; - } - } - return starValue; - }; - // >>>>> Change - var changeValue = function changeValue(nextValue) { - setValue(nextValue); - onChange === null || onChange === void 0 ? void 0 : onChange(nextValue); - }; - // =========================== Focus ============================ - var _React$useState = react.useState(false), - _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), - focused = _React$useState2[0], - setFocused = _React$useState2[1]; - var onInternalFocus = function onInternalFocus() { - setFocused(true); - onFocus === null || onFocus === void 0 ? void 0 : onFocus(); - }; - var onInternalBlur = function onInternalBlur() { - setFocused(false); - onBlur === null || onBlur === void 0 ? void 0 : onBlur(); - }; - // =========================== Hover ============================ - var _React$useState3 = react.useState(null), - _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), - hoverValue = _React$useState4[0], - setHoverValue = _React$useState4[1]; - var onHover = function onHover(event, index) { - var nextHoverValue = getStarValue(index, event.pageX); - if (nextHoverValue !== cleanedValue) { - setHoverValue(nextHoverValue); - setCleanedValue(null); - } - onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(nextHoverValue); - }; - var onMouseLeaveCallback = function onMouseLeaveCallback(event) { - if (!disabled) { - setHoverValue(null); - setCleanedValue(null); - onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(undefined); - } - if (event) { - onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(event); - } - }; - // =========================== Click ============================ - var onClick = function onClick(event, index) { - var newValue = getStarValue(index, event.pageX); - var isReset = false; - if (allowClear) { - isReset = newValue === value; - } - onMouseLeaveCallback(); - changeValue(isReset ? 0 : newValue); - setCleanedValue(isReset ? newValue : null); - }; - var onInternalKeyDown = function onInternalKeyDown(event) { - var keyCode = event.keyCode; - var reverse = direction === 'rtl'; - var nextValue = value; - if (keyCode === KeyCode/* default.RIGHT */.Z.RIGHT && nextValue < count && !reverse) { - if (allowHalf) { - nextValue += 0.5; - } else { - nextValue += 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default.LEFT */.Z.LEFT && nextValue > 0 && !reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default.RIGHT */.Z.RIGHT && nextValue > 0 && reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default.LEFT */.Z.LEFT && nextValue < count && reverse) { - if (allowHalf) { - nextValue += 0.5; - } else { - nextValue += 1; - } - changeValue(nextValue); - event.preventDefault(); - } - onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event); - }; - // =========================== Effect =========================== - react.useEffect(function () { - if (autoFocus && !disabled) { - triggerFocus(); - } - }, []); - // =========================== Render =========================== - // >>> Star - var starNodes = new Array(count).fill(0).map(function (item, index) { - return /*#__PURE__*/react.createElement(es_Star, { - ref: setStarRef(index), - index: index, - count: count, - disabled: disabled, - prefixCls: "".concat(prefixCls, "-star"), - allowHalf: allowHalf, - value: hoverValue === null ? value : hoverValue, - onClick: onClick, - onHover: onHover, - key: item || index, - character: character, - characterRender: characterRender, - focused: focused - }); - }); - var classString = classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames)); - // >>> Node - return /*#__PURE__*/react.createElement("ul", (0,esm_extends/* default */.Z)({ - className: classString, - onMouseLeave: onMouseLeaveCallback, - tabIndex: disabled ? -1 : tabIndex, - onFocus: disabled ? null : onInternalFocus, - onBlur: disabled ? null : onInternalBlur, - onKeyDown: disabled ? null : onInternalKeyDown, - ref: rateRef, - role: "radiogroup" - }, (0,pickAttrs/* default */.Z)(restProps, { - aria: true, - data: true, - attr: true - })), starNodes); -} -/* harmony default export */ var es_Rate = (/*#__PURE__*/react.forwardRef(Rate)); -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/index.js - -/* harmony default export */ var es = (es_Rate); -// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js -var context = __webpack_require__(53124); -// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules -var tooltip = __webpack_require__(83062); -// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js -var style = __webpack_require__(14747); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(67968); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js -var statistic = __webpack_require__(45503); -;// CONCATENATED MODULE: ./node_modules/antd/es/rate/style/index.js - - -const genRateStarStyle = token => { - const { - componentCls - } = token; - return { - [`${componentCls}-star`]: { - position: 'relative', - display: 'inline-block', - color: 'inherit', - cursor: 'pointer', - '&:not(:last-child)': { - marginInlineEnd: token.marginXS - }, - '> div': { - transition: `all ${token.motionDurationMid}, outline 0s`, - '&:hover': { - transform: token.starHoverScale - }, - '&:focus': { - outline: 0 - }, - '&:focus-visible': { - outline: `${token.lineWidth}px dashed ${token.starColor}`, - transform: token.starHoverScale - } - }, - '&-first, &-second': { - color: token.starBg, - transition: `all ${token.motionDurationMid}`, - userSelect: 'none', - [token.iconCls]: { - verticalAlign: 'middle' - } - }, - '&-first': { - position: 'absolute', - top: 0, - insetInlineStart: 0, - width: '50%', - height: '100%', - overflow: 'hidden', - opacity: 0 - }, - [`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: { - opacity: 1 - }, - [`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: { - color: 'inherit' - } - } - }; -}; -const genRateRtlStyle = token => ({ - [`&-rtl${token.componentCls}`]: { - direction: 'rtl' - } -}); -const genRateStyle = token => { - const { - componentCls - } = token; - return { - [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { - display: 'inline-block', - margin: 0, - padding: 0, - color: token.starColor, - fontSize: token.starSize, - lineHeight: 'unset', - listStyle: 'none', - outline: 'none', - // disable styles - [`&-disabled${componentCls} ${componentCls}-star`]: { - cursor: 'default', - '> div:hover': { - transform: 'scale(1)' - } - } - }), genRateStarStyle(token)), { - // text styles - [`+ ${componentCls}-text`]: { - display: 'inline-block', - marginInlineStart: token.marginXS, - fontSize: token.fontSize - } - }), genRateRtlStyle(token)) - }; -}; -// ============================== Export ============================== -/* harmony default export */ var rate_style = ((0,genComponentStyleHook/* default */.Z)('Rate', token => { - const rateToken = (0,statistic/* merge */.TS)(token, {}); - return [genRateStyle(rateToken)]; -}, token => ({ - starColor: token.yellow6, - starSize: token.controlHeightLG * 0.5, - starHoverScale: 'scale(1.1)', - starBg: token.colorFillContent -}))); -;// CONCATENATED MODULE: ./node_modules/antd/es/rate/index.js -'use client'; - -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; -}; - - - - - - - -const rate_Rate = /*#__PURE__*/react.forwardRef((props, ref) => { - const { - prefixCls, - className, - rootClassName, - style, - tooltips, - character = /*#__PURE__*/react.createElement(icons_StarFilled, null) - } = props, - rest = __rest(props, ["prefixCls", "className", "rootClassName", "style", "tooltips", "character"]); - const characterRender = (node, _ref) => { - let { - index - } = _ref; - if (!tooltips) { - return node; - } - return /*#__PURE__*/react.createElement(tooltip/* default */.Z, { - title: tooltips[index] - }, node); - }; - const { - getPrefixCls, - direction, - rate - } = react.useContext(context/* ConfigContext */.E_); - const ratePrefixCls = getPrefixCls('rate', prefixCls); - // Style - const [wrapSSR, hashId] = rate_style(ratePrefixCls); - const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style); - return wrapSSR( /*#__PURE__*/react.createElement(es, Object.assign({ - ref: ref, - character: character, - characterRender: characterRender - }, rest, { - className: classnames_default()(className, rootClassName, hashId, rate === null || rate === void 0 ? void 0 : rate.className), - style: mergedStyle, - prefixCls: ratePrefixCls, - direction: direction - }))); -}); -if (false) {} -/* harmony default export */ var rate = (rate_Rate); - -/***/ }) - -}]); \ No newline at end of file diff --git a/18117.async.js b/18117.async.js index bbe90f01f9..8da7ed6cee 100644 --- a/18117.async.js +++ b/18117.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[18117,59606,57942,95002,79084,93691,11328,58447,77075,94657,89494,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[18117,59606,57942,95002,79084,93691,11328,58447,77075,89494,94657,64649,33893,9277,54682,68282],{ /***/ 11475: /*!******************************************************************************************!*\ diff --git a/22106.async.js b/22106.async.js index ca5989e75c..aa8e8234ce 100644 --- a/22106.async.js +++ b/22106.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[22106,59606,36909,18117,57942,95002,79084,93691,11328,58447,77075,94657,89494,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[22106,59606,36909,18117,57942,95002,79084,93691,11328,58447,77075,89494,94657,64649,33893,9277,54682,68282],{ /***/ 11475: /*!******************************************************************************************!*\ diff --git a/2557.async.js b/2557.async.js index 118eb5c43d..e738e17673 100644 --- a/2557.async.js +++ b/2557.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[2557,59606,72029,878,75650,93691,11328,58447,77075,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[2557,59606,72029,878,75650,93691,11328,58447,77075,94657,64649,33893,9277,54682,68282],{ /***/ 77171: /*!**********************************************************************************!*\ diff --git a/25674.async.js b/25674.async.js index 54c02755a0..e316fc28dd 100644 --- a/25674.async.js +++ b/25674.async.js @@ -1,4 +1,4 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[25674,59606,2441,75650,93691,11328,58447,77075,94657,12750,64649,33893,9277,54682,68282,14341],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[25674,59606,2441,75650,93691,11328,58447,77075,94657,64649,33893,9277,54682,68282,14341],{ /***/ 8745: /*!*************************************************!*\ diff --git a/31785.async.js b/31785.async.js index 74b56946fd..5b88e91fd6 100644 --- a/31785.async.js +++ b/31785.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[31785,73323,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[31785,73323,94657],{ /***/ 57838: /*!************************************************************!*\ diff --git a/35889.async.js b/35889.async.js index 9174f7a5ce..cb6374b8a2 100644 --- a/35889.async.js +++ b/35889.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[35889,31785,51826,73323,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[35889,31785,51826,73323,94657],{ /***/ 77171: /*!**********************************************************************************!*\ diff --git a/3650.async.js b/3650.async.js index fcd95e7508..b37061b7f6 100644 --- a/3650.async.js +++ b/3650.async.js @@ -1,4 +1,4 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[3650,31785,2441,34605,79084,73323,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[3650,31785,2441,34605,79084,73323,94657],{ /***/ 11475: /*!******************************************************************************************!*\ diff --git a/42717.async.js b/42717.async.js index 3156ad6afd..6a217b0c20 100644 --- a/42717.async.js +++ b/42717.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[42717,59606,2441,18117,57942,95002,79084,93691,11328,58447,77075,94657,89494,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[42717,59606,2441,18117,57942,95002,79084,93691,11328,58447,77075,89494,94657,64649,33893,9277,54682,68282],{ /***/ 11475: /*!******************************************************************************************!*\ diff --git a/43632.async.js b/43632.async.js index 4f4fa0f3f8..62f03ba701 100644 --- a/43632.async.js +++ b/43632.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[43632,31785,51826,73323,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[43632,31785,51826,73323,94657],{ /***/ 39398: /*!**********************************************************************************!*\ diff --git a/44776.async.js b/44776.async.js index d9f0861796..3b95ffe1fd 100644 --- a/44776.async.js +++ b/44776.async.js @@ -1,4 +1,4 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[44776,2441,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[44776,2441,94657],{ /***/ 84567: /*!************************************************************!*\ diff --git a/51826.async.js b/51826.async.js index f9bf7fefd3..a298746420 100644 --- a/51826.async.js +++ b/51826.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[51826,31785,73323,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[51826,31785,73323,94657],{ /***/ 63606: /*!******************************************************************************!*\ diff --git a/57942.async.js b/57942.async.js index 5f2c0b981f..f07c375fac 100644 --- a/57942.async.js +++ b/57942.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[57942,59606,18117,95002,79084,93691,11328,58447,77075,94657,89494,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[57942,59606,18117,95002,79084,93691,11328,58447,77075,89494,94657,64649,33893,9277,54682,68282],{ /***/ 11475: /*!******************************************************************************************!*\ diff --git a/58447.async.js b/58447.async.js index 575876843b..dda0f18a85 100644 --- a/58447.async.js +++ b/58447.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[58447,59606,93691,11328,77075,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[58447,59606,93691,11328,77075,94657,64649,33893,9277,54682,68282],{ /***/ 85418: /*!************************************************************!*\ diff --git a/72029.async.js b/72029.async.js index 25371a5ba6..0056f24c5c 100644 --- a/72029.async.js +++ b/72029.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[72029,59606,2557,878,75650,93691,11328,58447,77075,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[72029,59606,2557,878,75650,93691,11328,58447,77075,94657,64649,33893,9277,54682,68282],{ /***/ 77171: /*!**********************************************************************************!*\ diff --git a/73323.async.js b/73323.async.js index 614bb1bfff..cce04474ec 100644 --- a/73323.async.js +++ b/73323.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[73323,31785,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[73323,31785,94657],{ /***/ 57838: /*!************************************************************!*\ diff --git a/74493.async.js b/74493.async.js index 962205b648..c5da0f4d24 100644 --- a/74493.async.js +++ b/74493.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[74493,31785,2441,73323,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[74493,31785,2441,73323,94657],{ /***/ 64789: /*!***********************************************************************************!*\ diff --git a/75650.async.js b/75650.async.js index f2dd28837e..6cc7be7c5a 100644 --- a/75650.async.js +++ b/75650.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[75650,59606,93691,11328,58447,77075,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[75650,59606,93691,11328,58447,77075,94657,64649,33893,9277,54682,68282],{ /***/ 8745: /*!*************************************************!*\ diff --git a/77075.async.js b/77075.async.js index 1979a59fcc..0ec6b3db6f 100644 --- a/77075.async.js +++ b/77075.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[77075,59606,93691,11328,58447,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[77075,59606,93691,11328,58447,94657,64649,33893,9277,54682,68282],{ /***/ 85418: /*!************************************************************!*\ diff --git a/83668.async.js b/78343.async.js similarity index 87% rename from 83668.async.js rename to 78343.async.js index f27b86cbe3..c0abb652c7 100644 --- a/83668.async.js +++ b/78343.async.js @@ -1,116 +1,30 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[83668,35479,89777,48512,34605,81745],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[78343],{ -/***/ 18429: -/*!************************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js + 1 modules ***! - \************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_CloseCircleOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/CloseCircleOutlined.js -// This icon file is generated automatically. -var CloseCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z" } }, { "tag": "path", "attrs": { "d": "M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "close-circle", "theme": "outlined" }; -/* harmony default export */ var asn_CloseCircleOutlined = (CloseCircleOutlined); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules -var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var CloseCircleOutlined_CloseCircleOutlined = function CloseCircleOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_CloseCircleOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_CloseCircleOutlined = (/*#__PURE__*/react.forwardRef(CloseCircleOutlined_CloseCircleOutlined)); - -/***/ }), - -/***/ 11475: -/*!******************************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***! - \******************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_ExclamationCircleOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js -// This icon file is generated automatically. -var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" }; -/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules -var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_ExclamationCircleOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined)); - -/***/ }), - -/***/ 77123: -/*!*****************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/FormOutlined.js + 1 modules ***! - \*****************************************************************************/ +/***/ 59606: +/*!********************************************************!*\ + !*** ./node_modules/antd/es/rate/index.js + 8 modules ***! + \********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_FormOutlined; } + "Z": function() { return /* binding */ rate; } }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(87462); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/FormOutlined.js +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/StarFilled.js // This icon file is generated automatically. -var FormOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z" } }] }, "name": "form", "theme": "outlined" }; -/* harmony default export */ var asn_FormOutlined = (FormOutlined); +var StarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" } }] }, "name": "star", "theme": "filled" }; +/* harmony default export */ var asn_StarFilled = (StarFilled); // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/FormOutlined.js +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/StarFilled.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY @@ -118,4067 +32,559 @@ var AntdIcon = __webpack_require__(74643); -var FormOutlined_FormOutlined = function FormOutlined(props, ref) { +var StarFilled_StarFilled = function StarFilled(props, ref) { return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, - icon: asn_FormOutlined + icon: asn_StarFilled })); }; if (false) {} -/* harmony default export */ var icons_FormOutlined = (/*#__PURE__*/react.forwardRef(FormOutlined_FormOutlined)); - -/***/ }), - -/***/ 64082: -/*!******************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***! - \******************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_InboxOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js -// This icon file is generated automatically. -var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" }; -/* harmony default export */ var asn_InboxOutlined = (InboxOutlined); +/* harmony default export */ var icons_StarFilled = (/*#__PURE__*/react.forwardRef(StarFilled_StarFilled)); +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__(94184); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__(4942); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules +var slicedToArray = __webpack_require__(97685); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +var objectWithoutProperties = __webpack_require__(45987); +// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js +var useMergedState = __webpack_require__(21770); +// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js +var KeyCode = __webpack_require__(15105); +// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js +var pickAttrs = __webpack_require__(64217); +;// CONCATENATED MODULE: ./node_modules/rc-rate/es/Star.js -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules -var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY +function Star(props, ref) { + var disabled = props.disabled, + prefixCls = props.prefixCls, + character = props.character, + characterRender = props.characterRender, + index = props.index, + count = props.count, + value = props.value, + allowHalf = props.allowHalf, + focused = props.focused, + onHover = props.onHover, + onClick = props.onClick; + // =========================== Events =========================== + var onInternalHover = function onInternalHover(e) { + onHover(e, index); + }; + var onInternalClick = function onInternalClick(e) { + onClick(e, index); + }; + var onInternalKeyDown = function onInternalKeyDown(e) { + if (e.keyCode === KeyCode/* default.ENTER */.Z.ENTER) { + onClick(e, index); + } + }; + // =========================== Render =========================== + // >>>>> ClassName + var starValue = index + 1; + var classNameList = new Set([prefixCls]); + // TODO: Current we just refactor from CC to FC. This logic seems can be optimized. + if (value === 0 && index === 0 && focused) { + classNameList.add("".concat(prefixCls, "-focused")); + } else if (allowHalf && value + 0.5 >= starValue && value < starValue) { + classNameList.add("".concat(prefixCls, "-half")); + classNameList.add("".concat(prefixCls, "-active")); + if (focused) { + classNameList.add("".concat(prefixCls, "-focused")); + } + } else { + if (starValue <= value) { + classNameList.add("".concat(prefixCls, "-full")); + } else { + classNameList.add("".concat(prefixCls, "-zero")); + } + if (starValue === value && focused) { + classNameList.add("".concat(prefixCls, "-focused")); + } + } + // >>>>> Node + var characterNode = typeof character === 'function' ? character(props) : character; + var start = /*#__PURE__*/react.createElement("li", { + className: classnames_default()(Array.from(classNameList)), + ref: ref + }, /*#__PURE__*/react.createElement("div", { + onClick: disabled ? null : onInternalClick, + onKeyDown: disabled ? null : onInternalKeyDown, + onMouseMove: disabled ? null : onInternalHover, + role: "radio", + "aria-checked": value > index ? 'true' : 'false', + "aria-posinset": index + 1, + "aria-setsize": count, + tabIndex: disabled ? -1 : 0 + }, /*#__PURE__*/react.createElement("div", { + className: "".concat(prefixCls, "-first") + }, characterNode), /*#__PURE__*/react.createElement("div", { + className: "".concat(prefixCls, "-second") + }, characterNode))); + if (characterRender) { + start = characterRender(start, props); + } + return start; +} +/* harmony default export */ var es_Star = (/*#__PURE__*/react.forwardRef(Star)); +;// CONCATENATED MODULE: ./node_modules/rc-rate/es/useRefs.js +function useRefs() { + var nodeRef = react.useRef({}); + function getRef(index) { + return nodeRef.current[index]; + } + function setRef(index) { + return function (node) { + nodeRef.current[index] = node; + }; + } + return [getRef, setRef]; +} +;// CONCATENATED MODULE: ./node_modules/rc-rate/es/util.js +function getScroll(w) { + var ret = w.pageXOffset; + var method = 'scrollLeft'; + 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 getClientPosition(elem) { + var x; + var y; + var doc = elem.ownerDocument; + var body = doc.body; + var docElem = doc && doc.documentElement; + var box = elem.getBoundingClientRect(); + x = box.left; + y = box.top; + x -= docElem.clientLeft || body.clientLeft || 0; + y -= docElem.clientTop || body.clientTop || 0; + return { + left: x, + top: y + }; +} +function getOffsetLeft(el) { + var pos = getClientPosition(el); + var doc = el.ownerDocument; + // Only IE use `parentWindow` + var w = doc.defaultView || doc.parentWindow; + pos.left += getScroll(w); + return pos.left; +} +;// CONCATENATED MODULE: ./node_modules/rc-rate/es/Rate.js -var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_InboxOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/react.forwardRef(InboxOutlined_InboxOutlined)); -/***/ }), -/***/ 3089: -/*!************************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.js + 1 modules ***! - \************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +var _excluded = ["prefixCls", "className", "defaultValue", "value", "count", "allowHalf", "allowClear", "character", "characterRender", "disabled", "direction", "tabIndex", "autoFocus", "onHoverChange", "onChange", "onFocus", "onBlur", "onKeyDown", "onMouseLeave"]; -"use strict"; -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_MinusCircleOutlined; } -}); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/MinusCircleOutlined.js -// This icon file is generated automatically. -var MinusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "minus-circle", "theme": "outlined" }; -/* harmony default export */ var asn_MinusCircleOutlined = (MinusCircleOutlined); -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules -var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.js -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - -var MinusCircleOutlined_MinusCircleOutlined = function MinusCircleOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_MinusCircleOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_MinusCircleOutlined = (/*#__PURE__*/react.forwardRef(MinusCircleOutlined_MinusCircleOutlined)); - -/***/ }), - -/***/ 33160: -/*!*******************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***! - \*******************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_ReloadOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ReloadOutlined.js -// This icon file is generated automatically. -var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" }; -/* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules -var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_ReloadOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_ReloadOutlined = (/*#__PURE__*/react.forwardRef(ReloadOutlined_ReloadOutlined)); - -/***/ }), - -/***/ 88484: -/*!*******************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/UploadOutlined.js + 1 modules ***! - \*******************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_UploadOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/UploadOutlined.js -// This icon file is generated automatically. -var UploadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "upload", "theme": "outlined" }; -/* harmony default export */ var asn_UploadOutlined = (UploadOutlined); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules -var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/UploadOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var UploadOutlined_UploadOutlined = function UploadOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_UploadOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_UploadOutlined = (/*#__PURE__*/react.forwardRef(UploadOutlined_UploadOutlined)); - -/***/ }), - -/***/ 49288: -/*!*****************************************************!*\ - !*** ./node_modules/antd/es/auto-complete/index.js ***! - \*****************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Children/toArray */ 37419); -/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ 10366); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 67294); -/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/PurePanel */ 8745); -/* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/reactNode */ 96159); -/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ 53124); -/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../select */ 79035); -'use client'; - - - - - - - - - - -const { - Option -} = _select__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z; -function isSelectOptionOrSelectOptGroup(child) { - return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup); -} -const AutoComplete = (props, ref) => { - const { - prefixCls: customizePrefixCls, - className, - popupClassName, - dropdownClassName, - children, - dataSource - } = props; - const childNodes = (0,rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(children); - // ============================= Input ============================= - let customizeInput; - if (childNodes.length === 1 && (0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) { - [customizeInput] = childNodes; - } - const getInputElement = customizeInput ? () => customizeInput : undefined; - // ============================ Options ============================ - let optionChildren; - // [Legacy] convert `children` or `dataSource` into option children - if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) { - optionChildren = children; - } else { - optionChildren = dataSource ? dataSource.map(item => { - if ((0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(item)) { - return item; - } - switch (typeof item) { - case 'string': - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, { - key: item, - value: item - }, item); - case 'object': - { - const { - value: optionValue - } = item; - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, { - key: optionValue, - value: optionValue - }, item.text); - } - default: - false ? 0 : void 0; - return undefined; - } - }) : []; - } - if (false) {} - const { - getPrefixCls - } = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_5__/* .ConfigContext */ .E_); - const prefixCls = getPrefixCls('select', customizePrefixCls); - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_select__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, Object.assign({ - ref: ref, - showArrow: false - }, (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props, ['dataSource', 'dropdownClassName']), { - prefixCls: prefixCls, - popupClassName: popupClassName || dropdownClassName, - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(`${prefixCls}-auto-complete`, className), - mode: _select__WEBPACK_IMPORTED_MODULE_3__/* ["default"].SECRET_COMBOBOX_MODE_DO_NOT_USE */ .Z.SECRET_COMBOBOX_MODE_DO_NOT_USE, - // Internal api - getInputElement - }), optionChildren); -}; -const RefAutoComplete = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(AutoComplete); -// We don't care debug panel -/* istanbul ignore next */ -const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(RefAutoComplete); -RefAutoComplete.Option = Option; -RefAutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel; -if (false) {} -/* harmony default export */ __webpack_exports__["Z"] = (RefAutoComplete); - -/***/ }), - -/***/ 35479: -/*!***********************************************************!*\ - !*** ./node_modules/antd/es/drawer/index.js + 16 modules ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ drawer; } -}); - -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(94184); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js -var objectSpread2 = __webpack_require__(1413); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules -var slicedToArray = __webpack_require__(97685); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -// EXTERNAL MODULE: ./node_modules/react-dom/index.js -var react_dom = __webpack_require__(73935); -// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js -var Dom_canUseDom = __webpack_require__(98924); -// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js -var es_warning = __webpack_require__(80334); -// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js -var es_ref = __webpack_require__(42550); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/Context.js - -var OrderContext = /*#__PURE__*/react.createContext(null); -/* harmony default export */ var Context = (OrderContext); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules -var toConsumableArray = __webpack_require__(74902); -// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js -var useLayoutEffect = __webpack_require__(8410); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/useDom.js - - - - - - -var EMPTY_LIST = []; - -/** - * Will add `div` to document. Nest call will keep order - * @param render Render DOM in document - */ -function useDom(render, debug) { - var _React$useState = react.useState(function () { - if (!(0,Dom_canUseDom/* default */.Z)()) { - return null; - } - var defaultEle = document.createElement('div'); - if (false) {} - return defaultEle; - }), - _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 1), - ele = _React$useState2[0]; - - // ========================== Order ========================== - var appendedRef = react.useRef(false); - var queueCreate = react.useContext(Context); - var _React$useState3 = react.useState(EMPTY_LIST), - _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), - queue = _React$useState4[0], - setQueue = _React$useState4[1]; - var mergedQueueCreate = queueCreate || (appendedRef.current ? undefined : function (appendFn) { - setQueue(function (origin) { - var newQueue = [appendFn].concat((0,toConsumableArray/* default */.Z)(origin)); - return newQueue; - }); - }); - - // =========================== DOM =========================== - function append() { - if (!ele.parentElement) { - document.body.appendChild(ele); - } - appendedRef.current = true; - } - function cleanup() { - var _ele$parentElement; - (_ele$parentElement = ele.parentElement) === null || _ele$parentElement === void 0 ? void 0 : _ele$parentElement.removeChild(ele); - appendedRef.current = false; - } - (0,useLayoutEffect/* default */.Z)(function () { - if (render) { - if (queueCreate) { - queueCreate(append); - } else { - append(); - } - } else { - cleanup(); - } - return cleanup; - }, [render]); - (0,useLayoutEffect/* default */.Z)(function () { - if (queue.length) { - queue.forEach(function (appendFn) { - return appendFn(); - }); - setQueue(EMPTY_LIST); - } - }, [queue]); - return [ele, mergedQueueCreate]; -} -// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js + 1 modules -var dynamicCSS = __webpack_require__(48981); -// EXTERNAL MODULE: ./node_modules/rc-util/es/getScrollBarSize.js -var getScrollBarSize = __webpack_require__(74204); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/util.js -/** - * Test usage export. Do not use in your production - */ -function isBodyOverflowing() { - return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth; -} -;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/useScrollLocker.js - - - - - - -var UNIQUE_ID = "rc-util-locker-".concat(Date.now()); -var uuid = 0; -function useScrollLocker(lock) { - var mergedLock = !!lock; - var _React$useState = react.useState(function () { - uuid += 1; - return "".concat(UNIQUE_ID, "_").concat(uuid); - }), - _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 1), - id = _React$useState2[0]; - (0,useLayoutEffect/* default */.Z)(function () { - if (mergedLock) { - var scrollbarSize = (0,getScrollBarSize/* getTargetScrollBarSize */.o)(document.body).width; - var isOverflow = isBodyOverflowing(); - (0,dynamicCSS/* updateCSS */.hq)("\nhtml body {\n overflow-y: hidden;\n ".concat(isOverflow ? "width: calc(100% - ".concat(scrollbarSize, "px);") : '', "\n}"), id); - } else { - (0,dynamicCSS/* removeCSS */.jL)(id); - } - return function () { - (0,dynamicCSS/* removeCSS */.jL)(id); - }; - }, [mergedLock, id]); -} -;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/mock.js -var inline = false; -function inlineMock(nextInline) { - if (typeof nextInline === 'boolean') { - inline = nextInline; - } - return inline; -} -;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/Portal.js - - - - - - - - - - -var getPortalContainer = function getPortalContainer(getContainer) { - if (getContainer === false) { - return false; - } - if (!(0,Dom_canUseDom/* default */.Z)() || !getContainer) { - return null; - } - if (typeof getContainer === 'string') { - return document.querySelector(getContainer); - } - if (typeof getContainer === 'function') { - return getContainer(); - } - return getContainer; -}; -var Portal = /*#__PURE__*/react.forwardRef(function (props, ref) { - var open = props.open, - autoLock = props.autoLock, - getContainer = props.getContainer, - debug = props.debug, - _props$autoDestroy = props.autoDestroy, - autoDestroy = _props$autoDestroy === void 0 ? true : _props$autoDestroy, - children = props.children; - var _React$useState = react.useState(open), - _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), - shouldRender = _React$useState2[0], - setShouldRender = _React$useState2[1]; - var mergedRender = shouldRender || open; - - // ========================= Warning ========================= - if (false) {} - - // ====================== Should Render ====================== - react.useEffect(function () { - if (autoDestroy || open) { - setShouldRender(open); - } - }, [open, autoDestroy]); - - // ======================== Container ======================== - var _React$useState3 = react.useState(function () { - return getPortalContainer(getContainer); - }), - _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), - innerContainer = _React$useState4[0], - setInnerContainer = _React$useState4[1]; - react.useEffect(function () { - var customizeContainer = getPortalContainer(getContainer); - - // Tell component that we check this in effect which is safe to be `null` - setInnerContainer(customizeContainer !== null && customizeContainer !== void 0 ? customizeContainer : null); - }); - var _useDom = useDom(mergedRender && !innerContainer, debug), - _useDom2 = (0,slicedToArray/* default */.Z)(_useDom, 2), - defaultContainer = _useDom2[0], - queueCreate = _useDom2[1]; - var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer; - - // ========================= Locker ========================== - useScrollLocker(autoLock && open && (0,Dom_canUseDom/* default */.Z)() && (mergedContainer === defaultContainer || mergedContainer === document.body)); - - // =========================== Ref =========================== - var childRef = null; - if (children && (0,es_ref/* supportRef */.Yr)(children) && ref) { - var _ref = children; - childRef = _ref.ref; - } - var mergedRef = (0,es_ref/* useComposeRef */.x1)(childRef, ref); - - // ========================= Render ========================== - // Do not render when nothing need render - // When innerContainer is `undefined`, it may not ready since user use ref in the same render - if (!mergedRender || !(0,Dom_canUseDom/* default */.Z)() || innerContainer === undefined) { - return null; - } - - // Render inline - var renderInline = mergedContainer === false || inlineMock(); - var reffedChildren = children; - if (ref) { - reffedChildren = /*#__PURE__*/react.cloneElement(children, { - ref: mergedRef - }); - } - return /*#__PURE__*/react.createElement(Context.Provider, { - value: queueCreate - }, renderInline ? reffedChildren : /*#__PURE__*/(0,react_dom.createPortal)(reffedChildren, mergedContainer)); -}); -if (false) {} -/* harmony default export */ var es_Portal = (Portal); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/index.js - - - -/* harmony default export */ var es = (es_Portal); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(4942); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 11 modules -var rc_motion_es = __webpack_require__(62874); -// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js -var KeyCode = __webpack_require__(15105); -// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js -var pickAttrs = __webpack_require__(64217); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/context.js - -var DrawerContext = /*#__PURE__*/react.createContext(null); -/* harmony default export */ var context = (DrawerContext); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/DrawerPanel.js - - - - -var DrawerPanel = function DrawerPanel(props) { - var prefixCls = props.prefixCls, +function Rate(props, ref) { + var _classNames; + var _props$prefixCls = props.prefixCls, + prefixCls = _props$prefixCls === void 0 ? 'rc-rate' : _props$prefixCls, className = props.className, - style = props.style, - children = props.children, - containerRef = props.containerRef, - onMouseEnter = props.onMouseEnter, - onMouseOver = props.onMouseOver, - onMouseLeave = props.onMouseLeave, - onClick = props.onClick, - onKeyDown = props.onKeyDown, - onKeyUp = props.onKeyUp; - var eventHandlers = { - onMouseEnter: onMouseEnter, - onMouseOver: onMouseOver, - onMouseLeave: onMouseLeave, - onClick: onClick, - onKeyDown: onKeyDown, - onKeyUp: onKeyUp - }; - // =============================== Render =============================== - return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({ - className: classnames_default()("".concat(prefixCls, "-content"), className), - style: (0,objectSpread2/* default */.Z)({}, style), - "aria-modal": "true", - role: "dialog", - ref: containerRef - }, eventHandlers), children)); -}; -if (false) {} -/* harmony default export */ var es_DrawerPanel = (DrawerPanel); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/util.js - - -function parseWidthHeight(value) { - if (typeof value === 'string' && String(Number(value)) === value) { - (0,es_warning/* default */.ZP)(false, 'Invalid value type of `width` or `height` which should be number type instead.'); - return Number(value); - } - return value; -} -function warnCheck(props) { - warning(!('wrapperClassName' in props), "'wrapperClassName' is removed. Please use 'rootClassName' instead."); - warning(canUseDom() || !props.open, "Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead."); -} -;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/DrawerPopup.js - - - - - - - - - - - - -var sentinelStyle = { - width: 0, - height: 0, - overflow: 'hidden', - outline: 'none', - position: 'absolute' -}; -function DrawerPopup(props, ref) { - var _ref, _pushConfig$distance, _pushConfig, _classNames; - var prefixCls = props.prefixCls, - open = props.open, - placement = props.placement, - inline = props.inline, - push = props.push, - forceRender = props.forceRender, + defaultValue = props.defaultValue, + propValue = props.value, + _props$count = props.count, + count = _props$count === void 0 ? 5 : _props$count, + _props$allowHalf = props.allowHalf, + allowHalf = _props$allowHalf === void 0 ? false : _props$allowHalf, + _props$allowClear = props.allowClear, + allowClear = _props$allowClear === void 0 ? true : _props$allowClear, + _props$character = props.character, + character = _props$character === void 0 ? '★' : _props$character, + characterRender = props.characterRender, + disabled = props.disabled, + _props$direction = props.direction, + direction = _props$direction === void 0 ? 'ltr' : _props$direction, + _props$tabIndex = props.tabIndex, + tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, autoFocus = props.autoFocus, - keyboard = props.keyboard, - rootClassName = props.rootClassName, - rootStyle = props.rootStyle, - zIndex = props.zIndex, - className = props.className, - style = props.style, - motion = props.motion, - width = props.width, - height = props.height, - children = props.children, - contentWrapperStyle = props.contentWrapperStyle, - mask = props.mask, - maskClosable = props.maskClosable, - maskMotion = props.maskMotion, - maskClassName = props.maskClassName, - maskStyle = props.maskStyle, - afterOpenChange = props.afterOpenChange, - onClose = props.onClose, - onMouseEnter = props.onMouseEnter, - onMouseOver = props.onMouseOver, - onMouseLeave = props.onMouseLeave, - onClick = props.onClick, - onKeyDown = props.onKeyDown, - onKeyUp = props.onKeyUp; - // ================================ Refs ================================ - var panelRef = react.useRef(); - var sentinelStartRef = react.useRef(); - var sentinelEndRef = react.useRef(); - react.useImperativeHandle(ref, function () { - return panelRef.current; - }); - var onPanelKeyDown = function onPanelKeyDown(event) { - var keyCode = event.keyCode, - shiftKey = event.shiftKey; - switch (keyCode) { - // Tab active - case KeyCode/* default.TAB */.Z.TAB: - { - if (keyCode === KeyCode/* default.TAB */.Z.TAB) { - if (!shiftKey && document.activeElement === sentinelEndRef.current) { - var _sentinelStartRef$cur; - (_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 ? void 0 : _sentinelStartRef$cur.focus({ - preventScroll: true - }); - } else if (shiftKey && document.activeElement === sentinelStartRef.current) { - var _sentinelEndRef$curre; - (_sentinelEndRef$curre = sentinelEndRef.current) === null || _sentinelEndRef$curre === void 0 ? void 0 : _sentinelEndRef$curre.focus({ - preventScroll: true - }); - } - } - break; - } - // Close - case KeyCode/* default.ESC */.Z.ESC: - { - if (onClose && keyboard) { - event.stopPropagation(); - onClose(event); - } - break; - } - } - }; - // ========================== Control =========================== - // Auto Focus - react.useEffect(function () { - if (open && autoFocus) { - var _panelRef$current; - (_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 ? void 0 : _panelRef$current.focus({ - preventScroll: true - }); - } - }, [open]); - // ============================ Push ============================ - var _React$useState = react.useState(false), - _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), - pushed = _React$useState2[0], - setPushed = _React$useState2[1]; - var parentContext = react.useContext(context); - // Merge push distance - var pushConfig; - if (push === false) { - pushConfig = { - distance: 0 - }; - } else if (push === true) { - pushConfig = {}; - } else { - pushConfig = push || {}; - } - var pushDistance = (_ref = (_pushConfig$distance = (_pushConfig = pushConfig) === null || _pushConfig === void 0 ? void 0 : _pushConfig.distance) !== null && _pushConfig$distance !== void 0 ? _pushConfig$distance : parentContext === null || parentContext === void 0 ? void 0 : parentContext.pushDistance) !== null && _ref !== void 0 ? _ref : 180; - var mergedContext = react.useMemo(function () { - return { - pushDistance: pushDistance, - push: function push() { - setPushed(true); - }, - pull: function pull() { - setPushed(false); - } - }; - }, [pushDistance]); - // ========================= ScrollLock ========================= - // Tell parent to push - react.useEffect(function () { - if (open) { - var _parentContext$push; - parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$push = parentContext.push) === null || _parentContext$push === void 0 ? void 0 : _parentContext$push.call(parentContext); - } else { - var _parentContext$pull; - parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$pull = parentContext.pull) === null || _parentContext$pull === void 0 ? void 0 : _parentContext$pull.call(parentContext); - } - }, [open]); - // Clean up - react.useEffect(function () { - return function () { - var _parentContext$pull2; - parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$pull2 = parentContext.pull) === null || _parentContext$pull2 === void 0 ? void 0 : _parentContext$pull2.call(parentContext); - }; - }, []); - // ============================ Mask ============================ - var maskNode = mask && /*#__PURE__*/react.createElement(rc_motion_es/* default */.Z, (0,esm_extends/* default */.Z)({ - key: "mask" - }, maskMotion, { - visible: open - }), function (_ref2, maskRef) { - var motionMaskClassName = _ref2.className, - motionMaskStyle = _ref2.style; - return /*#__PURE__*/react.createElement("div", { - className: classnames_default()("".concat(prefixCls, "-mask"), motionMaskClassName, maskClassName), - style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, motionMaskStyle), maskStyle), - onClick: maskClosable && open ? onClose : undefined, - ref: maskRef - }); - }); - // =========================== Panel ============================ - var motionProps = typeof motion === 'function' ? motion(placement) : motion; - var wrapperStyle = {}; - if (pushed && pushDistance) { - switch (placement) { - case 'top': - wrapperStyle.transform = "translateY(".concat(pushDistance, "px)"); - break; - case 'bottom': - wrapperStyle.transform = "translateY(".concat(-pushDistance, "px)"); - break; - case 'left': - wrapperStyle.transform = "translateX(".concat(pushDistance, "px)"); - break; - default: - wrapperStyle.transform = "translateX(".concat(-pushDistance, "px)"); - break; - } - } - if (placement === 'left' || placement === 'right') { - wrapperStyle.width = parseWidthHeight(width); - } else { - wrapperStyle.height = parseWidthHeight(height); - } - var eventHandlers = { - onMouseEnter: onMouseEnter, - onMouseOver: onMouseOver, - onMouseLeave: onMouseLeave, - onClick: onClick, - onKeyDown: onKeyDown, - onKeyUp: onKeyUp - }; - var panelNode = /*#__PURE__*/react.createElement(rc_motion_es/* default */.Z, (0,esm_extends/* default */.Z)({ - key: "panel" - }, motionProps, { - visible: open, - forceRender: forceRender, - onVisibleChanged: function onVisibleChanged(nextVisible) { - afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(nextVisible); - }, - removeOnLeave: false, - leavedClassName: "".concat(prefixCls, "-content-wrapper-hidden") - }), function (_ref3, motionRef) { - var motionClassName = _ref3.className, - motionStyle = _ref3.style; - return /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({ - className: classnames_default()("".concat(prefixCls, "-content-wrapper"), motionClassName), - style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, wrapperStyle), motionStyle), contentWrapperStyle) - }, (0,pickAttrs/* default */.Z)(props, { - data: true - })), /*#__PURE__*/react.createElement(es_DrawerPanel, (0,esm_extends/* default */.Z)({ - containerRef: motionRef, - prefixCls: prefixCls, - className: className, - style: style - }, eventHandlers), children)); - }); - // =========================== Render =========================== - var containerStyle = (0,objectSpread2/* default */.Z)({}, rootStyle); - if (zIndex) { - containerStyle.zIndex = zIndex; - } - return /*#__PURE__*/react.createElement(context.Provider, { - value: mergedContext - }, /*#__PURE__*/react.createElement("div", { - className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(placement), rootClassName, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-open"), open), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-inline"), inline), _classNames)), - style: containerStyle, - tabIndex: -1, - ref: panelRef, - onKeyDown: onPanelKeyDown - }, maskNode, /*#__PURE__*/react.createElement("div", { - tabIndex: 0, - ref: sentinelStartRef, - style: sentinelStyle, - "aria-hidden": "true", - "data-sentinel": "start" - }), panelNode, /*#__PURE__*/react.createElement("div", { - tabIndex: 0, - ref: sentinelEndRef, - style: sentinelStyle, - "aria-hidden": "true", - "data-sentinel": "end" - }))); -} -var RefDrawerPopup = /*#__PURE__*/react.forwardRef(DrawerPopup); -if (false) {} -/* harmony default export */ var es_DrawerPopup = (RefDrawerPopup); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/Drawer.js - - - - - - - -var Drawer = function Drawer(props) { - var _props$open = props.open, - open = _props$open === void 0 ? false : _props$open, - _props$prefixCls = props.prefixCls, - prefixCls = _props$prefixCls === void 0 ? 'rc-drawer' : _props$prefixCls, - _props$placement = props.placement, - placement = _props$placement === void 0 ? 'right' : _props$placement, - _props$autoFocus = props.autoFocus, - autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus, - _props$keyboard = props.keyboard, - keyboard = _props$keyboard === void 0 ? true : _props$keyboard, - _props$width = props.width, - width = _props$width === void 0 ? 378 : _props$width, - _props$mask = props.mask, - mask = _props$mask === void 0 ? true : _props$mask, - _props$maskClosable = props.maskClosable, - maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable, - getContainer = props.getContainer, - forceRender = props.forceRender, - afterOpenChange = props.afterOpenChange, - destroyOnClose = props.destroyOnClose, - onMouseEnter = props.onMouseEnter, - onMouseOver = props.onMouseOver, - onMouseLeave = props.onMouseLeave, - onClick = props.onClick, - onKeyDown = props.onKeyDown, - onKeyUp = props.onKeyUp; - var _React$useState = react.useState(false), - _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), - animatedVisible = _React$useState2[0], - setAnimatedVisible = _React$useState2[1]; - // ============================= Warn ============================= - if (false) {} - // ============================= Open ============================= - var _React$useState3 = react.useState(false), - _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), - mounted = _React$useState4[0], - setMounted = _React$useState4[1]; - (0,useLayoutEffect/* default */.Z)(function () { - setMounted(true); - }, []); - var mergedOpen = mounted ? open : false; - // ============================ Focus ============================= - var panelRef = react.useRef(); - var lastActiveRef = react.useRef(); - (0,useLayoutEffect/* default */.Z)(function () { - if (mergedOpen) { - lastActiveRef.current = document.activeElement; - } - }, [mergedOpen]); - // ============================= Open ============================= - var internalAfterOpenChange = function internalAfterOpenChange(nextVisible) { - var _panelRef$current; - setAnimatedVisible(nextVisible); - afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(nextVisible); - if (!nextVisible && lastActiveRef.current && !((_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 ? void 0 : _panelRef$current.contains(lastActiveRef.current))) { - var _lastActiveRef$curren; - (_lastActiveRef$curren = lastActiveRef.current) === null || _lastActiveRef$curren === void 0 ? void 0 : _lastActiveRef$curren.focus({ - preventScroll: true - }); - } - }; - // ============================ Render ============================ - if (!forceRender && !animatedVisible && !mergedOpen && destroyOnClose) { - return null; - } - var eventHandlers = { - onMouseEnter: onMouseEnter, - onMouseOver: onMouseOver, - onMouseLeave: onMouseLeave, - onClick: onClick, - onKeyDown: onKeyDown, - onKeyUp: onKeyUp - }; - var drawerPopupProps = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { - open: mergedOpen, - prefixCls: prefixCls, - placement: placement, - autoFocus: autoFocus, - keyboard: keyboard, - width: width, - mask: mask, - maskClosable: maskClosable, - inline: getContainer === false, - afterOpenChange: internalAfterOpenChange, - ref: panelRef - }, eventHandlers); - return /*#__PURE__*/react.createElement(es, { - open: mergedOpen || forceRender || animatedVisible, - autoDestroy: false, - getContainer: getContainer, - autoLock: mask && (mergedOpen || animatedVisible) - }, /*#__PURE__*/react.createElement(es_DrawerPopup, drawerPopupProps)); -}; -if (false) {} -/* harmony default export */ var es_Drawer = (Drawer); -;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/index.js -// export this package's api - -/* harmony default export */ var rc_drawer_es = (es_Drawer); -// EXTERNAL MODULE: ./node_modules/antd/es/_util/motion.js -var motion = __webpack_require__(33603); -// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js -var config_provider_context = __webpack_require__(53124); -// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js -var form_context = __webpack_require__(65223); -// EXTERNAL MODULE: ./node_modules/antd/es/_util/hooks/useClosable.js -var useClosable = __webpack_require__(69760); -;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/DrawerPanel.js - - - -const DrawerPanel_DrawerPanel = props => { - const { - prefixCls, - title, - footer, - extra, - closeIcon, - closable, - onClose, - headerStyle, - drawerStyle, - bodyStyle, - footerStyle, - children - } = props; - const customCloseIconRender = react.useCallback(icon => /*#__PURE__*/react.createElement("button", { - type: "button", - onClick: onClose, - "aria-label": "Close", - className: `${prefixCls}-close` - }, icon), [onClose]); - const [mergedClosable, mergedCloseIcon] = (0,useClosable/* default */.Z)(closable, closeIcon, customCloseIconRender, undefined, true); - const headerNode = react.useMemo(() => { - if (!title && !mergedClosable) { - return null; - } - return /*#__PURE__*/react.createElement("div", { - style: headerStyle, - className: classnames_default()(`${prefixCls}-header`, { - [`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra - }) - }, /*#__PURE__*/react.createElement("div", { - className: `${prefixCls}-header-title` - }, mergedCloseIcon, title && /*#__PURE__*/react.createElement("div", { - className: `${prefixCls}-title` - }, title)), extra && /*#__PURE__*/react.createElement("div", { - className: `${prefixCls}-extra` - }, extra)); - }, [mergedClosable, mergedCloseIcon, extra, headerStyle, prefixCls, title]); - const footerNode = react.useMemo(() => { - if (!footer) { - return null; - } - const footerClassName = `${prefixCls}-footer`; - return /*#__PURE__*/react.createElement("div", { - className: footerClassName, - style: footerStyle - }, footer); - }, [footer, footerStyle, prefixCls]); - return /*#__PURE__*/react.createElement("div", { - className: `${prefixCls}-wrapper-body`, - style: drawerStyle - }, headerNode, /*#__PURE__*/react.createElement("div", { - className: `${prefixCls}-body`, - style: bodyStyle - }, children), footerNode); -}; -/* harmony default export */ var drawer_DrawerPanel = (DrawerPanel_DrawerPanel); -// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js -var Compact = __webpack_require__(4173); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(67968); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js -var statistic = __webpack_require__(45503); -;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/style/motion.js -const genMotionStyle = token => { - const { - componentCls, - motionDurationSlow - } = token; - const sharedPanelMotion = { - '&-enter, &-appear, &-leave': { - '&-start': { - transition: 'none' - }, - '&-active': { - transition: `all ${motionDurationSlow}` - } - } - }; - return { - [componentCls]: { - // ======================== Mask ======================== - [`${componentCls}-mask-motion`]: { - '&-enter, &-appear, &-leave': { - '&-active': { - transition: `all ${motionDurationSlow}` - } - }, - '&-enter, &-appear': { - opacity: 0, - '&-active': { - opacity: 1 - } - }, - '&-leave': { - opacity: 1, - '&-active': { - opacity: 0 - } - } - }, - // ======================= Panel ======================== - [`${componentCls}-panel-motion`]: { - // Left - '&-left': [sharedPanelMotion, { - '&-enter, &-appear': { - '&-start': { - transform: 'translateX(-100%) !important' - }, - '&-active': { - transform: 'translateX(0)' - } - }, - '&-leave': { - transform: 'translateX(0)', - '&-active': { - transform: 'translateX(-100%)' - } - } - }], - // Right - '&-right': [sharedPanelMotion, { - '&-enter, &-appear': { - '&-start': { - transform: 'translateX(100%) !important' - }, - '&-active': { - transform: 'translateX(0)' - } - }, - '&-leave': { - transform: 'translateX(0)', - '&-active': { - transform: 'translateX(100%)' - } - } - }], - // Top - '&-top': [sharedPanelMotion, { - '&-enter, &-appear': { - '&-start': { - transform: 'translateY(-100%) !important' - }, - '&-active': { - transform: 'translateY(0)' - } - }, - '&-leave': { - transform: 'translateY(0)', - '&-active': { - transform: 'translateY(-100%)' - } - } - }], - // Bottom - '&-bottom': [sharedPanelMotion, { - '&-enter, &-appear': { - '&-start': { - transform: 'translateY(100%) !important' - }, - '&-active': { - transform: 'translateY(0)' - } - }, - '&-leave': { - transform: 'translateY(0)', - '&-active': { - transform: 'translateY(100%)' - } - } - }] - } - } - }; -}; -/* harmony default export */ var style_motion = (genMotionStyle); -;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/style/index.js - - -// =============================== Base =============================== -const genDrawerStyle = token => { - const { - componentCls, - zIndexPopup, - colorBgMask, - colorBgElevated, - motionDurationSlow, - motionDurationMid, - padding, - paddingLG, - fontSizeLG, - lineHeightLG, - lineWidth, - lineType, - colorSplit, - marginSM, - colorIcon, - colorIconHover, - colorText, - fontWeightStrong, - footerPaddingBlock, - footerPaddingInline - } = token; - const wrapperCls = `${componentCls}-content-wrapper`; - return { - [componentCls]: { - position: 'fixed', - inset: 0, - zIndex: zIndexPopup, - pointerEvents: 'none', - '&-pure': { - position: 'relative', - background: colorBgElevated, - [`&${componentCls}-left`]: { - boxShadow: token.boxShadowDrawerLeft - }, - [`&${componentCls}-right`]: { - boxShadow: token.boxShadowDrawerRight - }, - [`&${componentCls}-top`]: { - boxShadow: token.boxShadowDrawerUp - }, - [`&${componentCls}-bottom`]: { - boxShadow: token.boxShadowDrawerDown - } - }, - '&-inline': { - position: 'absolute' - }, - // ====================== Mask ====================== - [`${componentCls}-mask`]: { - position: 'absolute', - inset: 0, - zIndex: zIndexPopup, - background: colorBgMask, - pointerEvents: 'auto' - }, - // ==================== Content ===================== - [wrapperCls]: { - position: 'absolute', - zIndex: zIndexPopup, - maxWidth: '100vw', - transition: `all ${motionDurationSlow}`, - '&-hidden': { - display: 'none' - } - }, - // Placement - [`&-left > ${wrapperCls}`]: { - top: 0, - bottom: 0, - left: { - _skip_check_: true, - value: 0 - }, - boxShadow: token.boxShadowDrawerLeft - }, - [`&-right > ${wrapperCls}`]: { - top: 0, - right: { - _skip_check_: true, - value: 0 - }, - bottom: 0, - boxShadow: token.boxShadowDrawerRight - }, - [`&-top > ${wrapperCls}`]: { - top: 0, - insetInline: 0, - boxShadow: token.boxShadowDrawerUp - }, - [`&-bottom > ${wrapperCls}`]: { - bottom: 0, - insetInline: 0, - boxShadow: token.boxShadowDrawerDown - }, - [`${componentCls}-content`]: { - width: '100%', - height: '100%', - overflow: 'auto', - background: colorBgElevated, - pointerEvents: 'auto' - }, - // ===================== Panel ====================== - [`${componentCls}-wrapper-body`]: { - display: 'flex', - flexDirection: 'column', - width: '100%', - height: '100%' - }, - // Header - [`${componentCls}-header`]: { - display: 'flex', - flex: 0, - alignItems: 'center', - padding: `${padding}px ${paddingLG}px`, - fontSize: fontSizeLG, - lineHeight: lineHeightLG, - borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`, - '&-title': { - display: 'flex', - flex: 1, - alignItems: 'center', - minWidth: 0, - minHeight: 0 - } - }, - [`${componentCls}-extra`]: { - flex: 'none' - }, - [`${componentCls}-close`]: { - display: 'inline-block', - marginInlineEnd: marginSM, - color: colorIcon, - fontWeight: fontWeightStrong, - fontSize: fontSizeLG, - fontStyle: 'normal', - lineHeight: 1, - textAlign: 'center', - textTransform: 'none', - textDecoration: 'none', - background: 'transparent', - border: 0, - outline: 0, - cursor: 'pointer', - transition: `color ${motionDurationMid}`, - textRendering: 'auto', - '&:focus, &:hover': { - color: colorIconHover, - textDecoration: 'none' - } - }, - [`${componentCls}-title`]: { - flex: 1, - margin: 0, - color: colorText, - fontWeight: token.fontWeightStrong, - fontSize: fontSizeLG, - lineHeight: lineHeightLG - }, - // Body - [`${componentCls}-body`]: { - flex: 1, - minWidth: 0, - minHeight: 0, - padding: paddingLG, - overflow: 'auto' - }, - // Footer - [`${componentCls}-footer`]: { - flexShrink: 0, - padding: `${footerPaddingBlock}px ${footerPaddingInline}px`, - borderTop: `${lineWidth}px ${lineType} ${colorSplit}` - }, - // ====================== RTL ======================= - '&-rtl': { - direction: 'rtl' - } - } - }; -}; -// ============================== Export ============================== -/* harmony default export */ var drawer_style = ((0,genComponentStyleHook/* default */.Z)('Drawer', token => { - const drawerToken = (0,statistic/* merge */.TS)(token, {}); - return [genDrawerStyle(drawerToken), style_motion(drawerToken)]; -}, token => ({ - zIndexPopup: token.zIndexPopupBase, - footerPaddingBlock: token.paddingXS, - footerPaddingInline: token.padding -}))); -;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/index.js -'use client'; - -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; -}; - - - - - - - - -// CSSINJS - - -const SizeTypes = (/* unused pure expression or super */ null && (['default', 'large'])); -const defaultPushState = { - distance: 180 -}; -function drawer_Drawer(props) { - var _a; - const { - rootClassName, - width, - height, - size = 'default', - mask = true, - push = defaultPushState, - open, - afterOpenChange, - onClose, - prefixCls: customizePrefixCls, - getContainer: customizeGetContainer, - style, - className, - // Deprecated - visible, - afterVisibleChange - } = props, - rest = __rest(props, ["rootClassName", "width", "height", "size", "mask", "push", "open", "afterOpenChange", "onClose", "prefixCls", "getContainer", "style", "className", "visible", "afterVisibleChange"]); - const { - getPopupContainer, - getPrefixCls, - direction, - drawer - } = react.useContext(config_provider_context/* ConfigContext */.E_); - const prefixCls = getPrefixCls('drawer', customizePrefixCls); - // Style - const [wrapSSR, hashId] = drawer_style(prefixCls); - const getContainer = - // 有可能为 false,所以不能直接判断 - customizeGetContainer === undefined && getPopupContainer ? () => getPopupContainer(document.body) : customizeGetContainer; - const drawerClassName = classnames_default()({ - 'no-mask': !mask, - [`${prefixCls}-rtl`]: direction === 'rtl' - }, rootClassName, hashId); - // ========================== Warning =========================== - if (false) {} - // ============================ Size ============================ - const mergedWidth = react.useMemo(() => width !== null && width !== void 0 ? width : size === 'large' ? 736 : 378, [width, size]); - const mergedHeight = react.useMemo(() => height !== null && height !== void 0 ? height : size === 'large' ? 736 : 378, [height, size]); - // =========================== Motion =========================== - const maskMotion = { - motionName: (0,motion/* getTransitionName */.mL)(prefixCls, 'mask-motion'), - motionAppear: true, - motionEnter: true, - motionLeave: true, - motionDeadline: 500 - }; - const panelMotion = motionPlacement => ({ - motionName: (0,motion/* getTransitionName */.mL)(prefixCls, `panel-motion-${motionPlacement}`), - motionAppear: true, - motionEnter: true, - motionLeave: true, - motionDeadline: 500 - }); - // =========================== Render =========================== - return wrapSSR( /*#__PURE__*/react.createElement(Compact/* NoCompactStyle */.BR, null, /*#__PURE__*/react.createElement(form_context/* NoFormStyle */.Ux, { - status: true, - override: true - }, /*#__PURE__*/react.createElement(rc_drawer_es, Object.assign({ - prefixCls: prefixCls, - onClose: onClose, - maskMotion: maskMotion, - motion: panelMotion - }, rest, { - open: open !== null && open !== void 0 ? open : visible, - mask: mask, - push: push, - width: mergedWidth, - height: mergedHeight, - style: Object.assign(Object.assign({}, drawer === null || drawer === void 0 ? void 0 : drawer.style), style), - className: classnames_default()(drawer === null || drawer === void 0 ? void 0 : drawer.className, className), - rootClassName: drawerClassName, - getContainer: getContainer, - afterOpenChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange - }), /*#__PURE__*/react.createElement(drawer_DrawerPanel, Object.assign({ - prefixCls: prefixCls - }, rest, { - onClose: onClose - })))))); -} -if (false) {} -function PurePanel(_a) { - var { - prefixCls: customizePrefixCls, - style, - className, - placement = 'right' - } = _a, - restProps = __rest(_a, ["prefixCls", "style", "className", "placement"]); - const { - getPrefixCls - } = react.useContext(config_provider_context/* ConfigContext */.E_); - const prefixCls = getPrefixCls('drawer', customizePrefixCls); - // Style - const [wrapSSR, hashId] = drawer_style(prefixCls); - return wrapSSR( /*#__PURE__*/react.createElement("div", { - className: classnames_default()(prefixCls, `${prefixCls}-pure`, `${prefixCls}-${placement}`, hashId, className), - style: style - }, /*#__PURE__*/react.createElement(drawer_DrawerPanel, Object.assign({ - prefixCls: prefixCls - }, restProps)))); -} -drawer_Drawer._InternalPanelDoNotUseOrYouWillBeFired = PurePanel; -/* harmony default export */ var drawer = (drawer_Drawer); - -/***/ }), - -/***/ 59606: -/*!********************************************************!*\ - !*** ./node_modules/antd/es/rate/index.js + 8 modules ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ rate; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(87462); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/StarFilled.js -// This icon file is generated automatically. -var StarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" } }] }, "name": "star", "theme": "filled" }; -/* harmony default export */ var asn_StarFilled = (StarFilled); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules -var AntdIcon = __webpack_require__(74643); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/StarFilled.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var StarFilled_StarFilled = function StarFilled(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_StarFilled - })); -}; -if (false) {} -/* harmony default export */ var icons_StarFilled = (/*#__PURE__*/react.forwardRef(StarFilled_StarFilled)); -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(94184); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(4942); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules -var slicedToArray = __webpack_require__(97685); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(45987); -// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js -var useMergedState = __webpack_require__(21770); -// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js -var KeyCode = __webpack_require__(15105); -// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js -var pickAttrs = __webpack_require__(64217); -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/Star.js - - - -function Star(props, ref) { - var disabled = props.disabled, - prefixCls = props.prefixCls, - character = props.character, - characterRender = props.characterRender, - index = props.index, - count = props.count, - value = props.value, - allowHalf = props.allowHalf, - focused = props.focused, - onHover = props.onHover, - onClick = props.onClick; - // =========================== Events =========================== - var onInternalHover = function onInternalHover(e) { - onHover(e, index); - }; - var onInternalClick = function onInternalClick(e) { - onClick(e, index); - }; - var onInternalKeyDown = function onInternalKeyDown(e) { - if (e.keyCode === KeyCode/* default.ENTER */.Z.ENTER) { - onClick(e, index); - } - }; - // =========================== Render =========================== - // >>>>> ClassName - var starValue = index + 1; - var classNameList = new Set([prefixCls]); - // TODO: Current we just refactor from CC to FC. This logic seems can be optimized. - if (value === 0 && index === 0 && focused) { - classNameList.add("".concat(prefixCls, "-focused")); - } else if (allowHalf && value + 0.5 >= starValue && value < starValue) { - classNameList.add("".concat(prefixCls, "-half")); - classNameList.add("".concat(prefixCls, "-active")); - if (focused) { - classNameList.add("".concat(prefixCls, "-focused")); - } - } else { - if (starValue <= value) { - classNameList.add("".concat(prefixCls, "-full")); - } else { - classNameList.add("".concat(prefixCls, "-zero")); - } - if (starValue === value && focused) { - classNameList.add("".concat(prefixCls, "-focused")); - } - } - // >>>>> Node - var characterNode = typeof character === 'function' ? character(props) : character; - var start = /*#__PURE__*/react.createElement("li", { - className: classnames_default()(Array.from(classNameList)), - ref: ref - }, /*#__PURE__*/react.createElement("div", { - onClick: disabled ? null : onInternalClick, - onKeyDown: disabled ? null : onInternalKeyDown, - onMouseMove: disabled ? null : onInternalHover, - role: "radio", - "aria-checked": value > index ? 'true' : 'false', - "aria-posinset": index + 1, - "aria-setsize": count, - tabIndex: disabled ? -1 : 0 - }, /*#__PURE__*/react.createElement("div", { - className: "".concat(prefixCls, "-first") - }, characterNode), /*#__PURE__*/react.createElement("div", { - className: "".concat(prefixCls, "-second") - }, characterNode))); - if (characterRender) { - start = characterRender(start, props); - } - return start; -} -/* harmony default export */ var es_Star = (/*#__PURE__*/react.forwardRef(Star)); -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/useRefs.js - -function useRefs() { - var nodeRef = react.useRef({}); - function getRef(index) { - return nodeRef.current[index]; - } - function setRef(index) { - return function (node) { - nodeRef.current[index] = node; - }; - } - return [getRef, setRef]; -} -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/util.js -function getScroll(w) { - var ret = w.pageXOffset; - var method = 'scrollLeft'; - 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 getClientPosition(elem) { - var x; - var y; - var doc = elem.ownerDocument; - var body = doc.body; - var docElem = doc && doc.documentElement; - var box = elem.getBoundingClientRect(); - x = box.left; - y = box.top; - x -= docElem.clientLeft || body.clientLeft || 0; - y -= docElem.clientTop || body.clientTop || 0; - return { - left: x, - top: y - }; -} -function getOffsetLeft(el) { - var pos = getClientPosition(el); - var doc = el.ownerDocument; - // Only IE use `parentWindow` - var w = doc.defaultView || doc.parentWindow; - pos.left += getScroll(w); - return pos.left; -} -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/Rate.js - - - - -var _excluded = ["prefixCls", "className", "defaultValue", "value", "count", "allowHalf", "allowClear", "character", "characterRender", "disabled", "direction", "tabIndex", "autoFocus", "onHoverChange", "onChange", "onFocus", "onBlur", "onKeyDown", "onMouseLeave"]; - - - - - - - - -function Rate(props, ref) { - var _classNames; - var _props$prefixCls = props.prefixCls, - prefixCls = _props$prefixCls === void 0 ? 'rc-rate' : _props$prefixCls, - className = props.className, - defaultValue = props.defaultValue, - propValue = props.value, - _props$count = props.count, - count = _props$count === void 0 ? 5 : _props$count, - _props$allowHalf = props.allowHalf, - allowHalf = _props$allowHalf === void 0 ? false : _props$allowHalf, - _props$allowClear = props.allowClear, - allowClear = _props$allowClear === void 0 ? true : _props$allowClear, - _props$character = props.character, - character = _props$character === void 0 ? '★' : _props$character, - characterRender = props.characterRender, - disabled = props.disabled, - _props$direction = props.direction, - direction = _props$direction === void 0 ? 'ltr' : _props$direction, - _props$tabIndex = props.tabIndex, - tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, - autoFocus = props.autoFocus, - onHoverChange = props.onHoverChange, - onChange = props.onChange, - onFocus = props.onFocus, - onBlur = props.onBlur, + onHoverChange = props.onHoverChange, + onChange = props.onChange, + onFocus = props.onFocus, + onBlur = props.onBlur, onKeyDown = props.onKeyDown, onMouseLeave = props.onMouseLeave, restProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded); - var _useRefs = useRefs(), - _useRefs2 = (0,slicedToArray/* default */.Z)(_useRefs, 2), - getStarRef = _useRefs2[0], - setStarRef = _useRefs2[1]; - var rateRef = react.useRef(null); - // ============================ Ref ============================= - var triggerFocus = function triggerFocus() { - if (!disabled) { - var _rateRef$current; - (_rateRef$current = rateRef.current) === null || _rateRef$current === void 0 ? void 0 : _rateRef$current.focus(); - } - }; - react.useImperativeHandle(ref, function () { - return { - focus: triggerFocus, - blur: function blur() { - if (!disabled) { - var _rateRef$current2; - (_rateRef$current2 = rateRef.current) === null || _rateRef$current2 === void 0 ? void 0 : _rateRef$current2.blur(); - } - } - }; - }); - // =========================== Value ============================ - var _useMergedState = (0,useMergedState/* default */.Z)(defaultValue || 0, { - value: propValue - }), - _useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2), - value = _useMergedState2[0], - setValue = _useMergedState2[1]; - var _useMergedState3 = (0,useMergedState/* default */.Z)(null), - _useMergedState4 = (0,slicedToArray/* default */.Z)(_useMergedState3, 2), - cleanedValue = _useMergedState4[0], - setCleanedValue = _useMergedState4[1]; - var getStarValue = function getStarValue(index, x) { - var reverse = direction === 'rtl'; - var starValue = index + 1; - if (allowHalf) { - var starEle = getStarRef(index); - var leftDis = getOffsetLeft(starEle); - var width = starEle.clientWidth; - if (reverse && x - leftDis > width / 2) { - starValue -= 0.5; - } else if (!reverse && x - leftDis < width / 2) { - starValue -= 0.5; - } - } - return starValue; - }; - // >>>>> Change - var changeValue = function changeValue(nextValue) { - setValue(nextValue); - onChange === null || onChange === void 0 ? void 0 : onChange(nextValue); - }; - // =========================== Focus ============================ - var _React$useState = react.useState(false), - _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), - focused = _React$useState2[0], - setFocused = _React$useState2[1]; - var onInternalFocus = function onInternalFocus() { - setFocused(true); - onFocus === null || onFocus === void 0 ? void 0 : onFocus(); - }; - var onInternalBlur = function onInternalBlur() { - setFocused(false); - onBlur === null || onBlur === void 0 ? void 0 : onBlur(); - }; - // =========================== Hover ============================ - var _React$useState3 = react.useState(null), - _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), - hoverValue = _React$useState4[0], - setHoverValue = _React$useState4[1]; - var onHover = function onHover(event, index) { - var nextHoverValue = getStarValue(index, event.pageX); - if (nextHoverValue !== cleanedValue) { - setHoverValue(nextHoverValue); - setCleanedValue(null); - } - onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(nextHoverValue); - }; - var onMouseLeaveCallback = function onMouseLeaveCallback(event) { - if (!disabled) { - setHoverValue(null); - setCleanedValue(null); - onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(undefined); - } - if (event) { - onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(event); - } - }; - // =========================== Click ============================ - var onClick = function onClick(event, index) { - var newValue = getStarValue(index, event.pageX); - var isReset = false; - if (allowClear) { - isReset = newValue === value; - } - onMouseLeaveCallback(); - changeValue(isReset ? 0 : newValue); - setCleanedValue(isReset ? newValue : null); - }; - var onInternalKeyDown = function onInternalKeyDown(event) { - var keyCode = event.keyCode; - var reverse = direction === 'rtl'; - var nextValue = value; - if (keyCode === KeyCode/* default.RIGHT */.Z.RIGHT && nextValue < count && !reverse) { - if (allowHalf) { - nextValue += 0.5; - } else { - nextValue += 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default.LEFT */.Z.LEFT && nextValue > 0 && !reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default.RIGHT */.Z.RIGHT && nextValue > 0 && reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default.LEFT */.Z.LEFT && nextValue < count && reverse) { - if (allowHalf) { - nextValue += 0.5; - } else { - nextValue += 1; - } - changeValue(nextValue); - event.preventDefault(); - } - onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event); - }; - // =========================== Effect =========================== - react.useEffect(function () { - if (autoFocus && !disabled) { - triggerFocus(); - } - }, []); - // =========================== Render =========================== - // >>> Star - var starNodes = new Array(count).fill(0).map(function (item, index) { - return /*#__PURE__*/react.createElement(es_Star, { - ref: setStarRef(index), - index: index, - count: count, - disabled: disabled, - prefixCls: "".concat(prefixCls, "-star"), - allowHalf: allowHalf, - value: hoverValue === null ? value : hoverValue, - onClick: onClick, - onHover: onHover, - key: item || index, - character: character, - characterRender: characterRender, - focused: focused - }); - }); - var classString = classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames)); - // >>> Node - return /*#__PURE__*/react.createElement("ul", (0,esm_extends/* default */.Z)({ - className: classString, - onMouseLeave: onMouseLeaveCallback, - tabIndex: disabled ? -1 : tabIndex, - onFocus: disabled ? null : onInternalFocus, - onBlur: disabled ? null : onInternalBlur, - onKeyDown: disabled ? null : onInternalKeyDown, - ref: rateRef, - role: "radiogroup" - }, (0,pickAttrs/* default */.Z)(restProps, { - aria: true, - data: true, - attr: true - })), starNodes); -} -/* harmony default export */ var es_Rate = (/*#__PURE__*/react.forwardRef(Rate)); -;// CONCATENATED MODULE: ./node_modules/rc-rate/es/index.js - -/* harmony default export */ var es = (es_Rate); -// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js -var context = __webpack_require__(53124); -// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules -var tooltip = __webpack_require__(83062); -// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js -var style = __webpack_require__(14747); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(67968); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js -var statistic = __webpack_require__(45503); -;// CONCATENATED MODULE: ./node_modules/antd/es/rate/style/index.js - - -const genRateStarStyle = token => { - const { - componentCls - } = token; - return { - [`${componentCls}-star`]: { - position: 'relative', - display: 'inline-block', - color: 'inherit', - cursor: 'pointer', - '&:not(:last-child)': { - marginInlineEnd: token.marginXS - }, - '> div': { - transition: `all ${token.motionDurationMid}, outline 0s`, - '&:hover': { - transform: token.starHoverScale - }, - '&:focus': { - outline: 0 - }, - '&:focus-visible': { - outline: `${token.lineWidth}px dashed ${token.starColor}`, - transform: token.starHoverScale - } - }, - '&-first, &-second': { - color: token.starBg, - transition: `all ${token.motionDurationMid}`, - userSelect: 'none', - [token.iconCls]: { - verticalAlign: 'middle' - } - }, - '&-first': { - position: 'absolute', - top: 0, - insetInlineStart: 0, - width: '50%', - height: '100%', - overflow: 'hidden', - opacity: 0 - }, - [`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: { - opacity: 1 - }, - [`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: { - color: 'inherit' - } - } - }; -}; -const genRateRtlStyle = token => ({ - [`&-rtl${token.componentCls}`]: { - direction: 'rtl' - } -}); -const genRateStyle = token => { - const { - componentCls - } = token; - return { - [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { - display: 'inline-block', - margin: 0, - padding: 0, - color: token.starColor, - fontSize: token.starSize, - lineHeight: 'unset', - listStyle: 'none', - outline: 'none', - // disable styles - [`&-disabled${componentCls} ${componentCls}-star`]: { - cursor: 'default', - '> div:hover': { - transform: 'scale(1)' - } - } - }), genRateStarStyle(token)), { - // text styles - [`+ ${componentCls}-text`]: { - display: 'inline-block', - marginInlineStart: token.marginXS, - fontSize: token.fontSize - } - }), genRateRtlStyle(token)) - }; -}; -// ============================== Export ============================== -/* harmony default export */ var rate_style = ((0,genComponentStyleHook/* default */.Z)('Rate', token => { - const rateToken = (0,statistic/* merge */.TS)(token, {}); - return [genRateStyle(rateToken)]; -}, token => ({ - starColor: token.yellow6, - starSize: token.controlHeightLG * 0.5, - starHoverScale: 'scale(1.1)', - starBg: token.colorFillContent -}))); -;// CONCATENATED MODULE: ./node_modules/antd/es/rate/index.js -'use client'; - -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; -}; - - - - - - - -const rate_Rate = /*#__PURE__*/react.forwardRef((props, ref) => { - const { - prefixCls, - className, - rootClassName, - style, - tooltips, - character = /*#__PURE__*/react.createElement(icons_StarFilled, null) - } = props, - rest = __rest(props, ["prefixCls", "className", "rootClassName", "style", "tooltips", "character"]); - const characterRender = (node, _ref) => { - let { - index - } = _ref; - if (!tooltips) { - return node; - } - return /*#__PURE__*/react.createElement(tooltip/* default */.Z, { - title: tooltips[index] - }, node); - }; - const { - getPrefixCls, - direction, - rate - } = react.useContext(context/* ConfigContext */.E_); - const ratePrefixCls = getPrefixCls('rate', prefixCls); - // Style - const [wrapSSR, hashId] = rate_style(ratePrefixCls); - const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style); - return wrapSSR( /*#__PURE__*/react.createElement(es, Object.assign({ - ref: ref, - character: character, - characterRender: characterRender - }, rest, { - className: classnames_default()(className, rootClassName, hashId, rate === null || rate === void 0 ? void 0 : rate.className), - style: mergedStyle, - prefixCls: ratePrefixCls, - direction: direction - }))); -}); -if (false) {} -/* harmony default export */ var rate = (rate_Rate); - -/***/ }), - -/***/ 51904: -/*!*******************************************************!*\ - !*** ./node_modules/antd/es/tag/index.js + 3 modules ***! - \*******************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ tag; } -}); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + 1 modules -var CloseOutlined = __webpack_require__(97937); -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(94184); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -// EXTERNAL MODULE: ./node_modules/antd/es/_util/colors.js -var colors = __webpack_require__(98787); -// EXTERNAL MODULE: ./node_modules/antd/es/_util/hooks/useClosable.js -var useClosable = __webpack_require__(69760); -// EXTERNAL MODULE: ./node_modules/antd/es/_util/wave/index.js + 4 modules -var wave = __webpack_require__(45353); -// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js -var context = __webpack_require__(53124); -;// CONCATENATED MODULE: ./node_modules/antd/es/_util/capitalize.js -function capitalize(str) { - if (typeof str !== 'string') { - return str; - } - const ret = str.charAt(0).toUpperCase() + str.slice(1); - return ret; -} -// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js -var style = __webpack_require__(14747); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genPresetColor.js -var genPresetColor = __webpack_require__(98719); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(67968); -// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js -var statistic = __webpack_require__(45503); -;// CONCATENATED MODULE: ./node_modules/antd/es/tag/style/index.js - - - -const genTagStatusStyle = (token, status, cssVariableType) => { - const capitalizedCssVariableType = capitalize(cssVariableType); - return { - [`${token.componentCls}-${status}`]: { - color: token[`color${cssVariableType}`], - background: token[`color${capitalizedCssVariableType}Bg`], - borderColor: token[`color${capitalizedCssVariableType}Border`], - [`&${token.componentCls}-borderless`]: { - borderColor: 'transparent' - } - } - }; -}; -const genPresetStyle = token => (0,genPresetColor/* default */.Z)(token, (colorKey, _ref) => { - let { - textColor, - lightBorderColor, - lightColor, - darkColor - } = _ref; - return { - [`${token.componentCls}-${colorKey}`]: { - color: textColor, - background: lightColor, - borderColor: lightBorderColor, - // Inverse color - '&-inverse': { - color: token.colorTextLightSolid, - background: darkColor, - borderColor: darkColor - }, - [`&${token.componentCls}-borderless`]: { - borderColor: 'transparent' - } - } - }; -}); -const genBaseStyle = token => { - const { - paddingXXS, - lineWidth, - tagPaddingHorizontal, - componentCls - } = token; - const paddingInline = tagPaddingHorizontal - lineWidth; - const iconMarginInline = paddingXXS - lineWidth; - return { - // Result - [componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { - display: 'inline-block', - height: 'auto', - marginInlineEnd: token.marginXS, - paddingInline, - fontSize: token.tagFontSize, - lineHeight: token.tagLineHeight, - whiteSpace: 'nowrap', - background: token.defaultBg, - border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`, - borderRadius: token.borderRadiusSM, - opacity: 1, - transition: `all ${token.motionDurationMid}`, - textAlign: 'start', - position: 'relative', - // RTL - [`&${componentCls}-rtl`]: { - direction: 'rtl' - }, - '&, a, a:hover': { - color: token.defaultColor - }, - [`${componentCls}-close-icon`]: { - marginInlineStart: iconMarginInline, - color: token.colorTextDescription, - fontSize: token.tagIconSize, - cursor: 'pointer', - transition: `all ${token.motionDurationMid}`, - '&:hover': { - color: token.colorTextHeading - } - }, - [`&${componentCls}-has-color`]: { - borderColor: 'transparent', - [`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: { - color: token.colorTextLightSolid - } - }, - [`&-checkable`]: { - backgroundColor: 'transparent', - borderColor: 'transparent', - cursor: 'pointer', - [`&:not(${componentCls}-checkable-checked):hover`]: { - color: token.colorPrimary, - backgroundColor: token.colorFillSecondary - }, - '&:active, &-checked': { - color: token.colorTextLightSolid - }, - '&-checked': { - backgroundColor: token.colorPrimary, - '&:hover': { - backgroundColor: token.colorPrimaryHover - } - }, - '&:active': { - backgroundColor: token.colorPrimaryActive - } - }, - [`&-hidden`]: { - display: 'none' - }, - // To ensure that a space will be placed between character and `Icon`. - [`> ${token.iconCls} + span, > span + ${token.iconCls}`]: { - marginInlineStart: paddingInline - } - }), - [`${componentCls}-borderless`]: { - borderColor: 'transparent', - background: token.tagBorderlessBg - } - }; -}; -// ============================== Export ============================== -/* harmony default export */ var tag_style = ((0,genComponentStyleHook/* default */.Z)('Tag', token => { - const { - lineWidth, - fontSizeIcon - } = token; - const tagFontSize = token.fontSizeSM; - const tagLineHeight = `${token.lineHeightSM * tagFontSize}px`; - const tagToken = (0,statistic/* merge */.TS)(token, { - tagFontSize, - tagLineHeight, - tagIconSize: fontSizeIcon - 2 * lineWidth, - tagPaddingHorizontal: 8, - tagBorderlessBg: token.colorFillTertiary - }); - return [genBaseStyle(tagToken), genPresetStyle(tagToken), genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')]; -}, token => ({ - defaultBg: token.colorFillQuaternary, - defaultColor: token.colorText -}))); -;// CONCATENATED MODULE: ./node_modules/antd/es/tag/CheckableTag.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; -}; - - - - -const CheckableTag = props => { - const { - prefixCls: customizePrefixCls, - className, - checked, - onChange, - onClick - } = props, - restProps = __rest(props, ["prefixCls", "className", "checked", "onChange", "onClick"]); - const { - getPrefixCls - } = react.useContext(context/* ConfigContext */.E_); - const handleClick = e => { - onChange === null || onChange === void 0 ? void 0 : onChange(!checked); - onClick === null || onClick === void 0 ? void 0 : onClick(e); - }; - const prefixCls = getPrefixCls('tag', customizePrefixCls); - // Style - const [wrapSSR, hashId] = tag_style(prefixCls); - const cls = classnames_default()(prefixCls, `${prefixCls}-checkable`, { - [`${prefixCls}-checkable-checked`]: checked - }, className, hashId); - return wrapSSR( /*#__PURE__*/react.createElement("span", Object.assign({}, restProps, { - className: cls, - onClick: handleClick - }))); -}; -/* harmony default export */ var tag_CheckableTag = (CheckableTag); -;// CONCATENATED MODULE: ./node_modules/antd/es/tag/index.js -'use client'; - -var tag_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; -}; - - - - - - - - - - -const InternalTag = (tagProps, ref) => { - const { - prefixCls: customizePrefixCls, - className, - rootClassName, - style, - children, - icon, - color, - onClose, - closeIcon, - closable, - bordered = true - } = tagProps, - props = tag_rest(tagProps, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "closeIcon", "closable", "bordered"]); - const { - getPrefixCls, - direction, - tag - } = react.useContext(context/* ConfigContext */.E_); - const [visible, setVisible] = react.useState(true); - // Warning for deprecated usage - if (false) {} - react.useEffect(() => { - if ('visible' in props) { - setVisible(props.visible); - } - }, [props.visible]); - const isInternalColor = (0,colors/* isPresetColor */.o2)(color) || (0,colors/* isPresetStatusColor */.yT)(color); - const tagStyle = Object.assign(Object.assign({ - backgroundColor: color && !isInternalColor ? color : undefined - }, tag === null || tag === void 0 ? void 0 : tag.style), style); - const prefixCls = getPrefixCls('tag', customizePrefixCls); - // Style - const [wrapSSR, hashId] = tag_style(prefixCls); - const tagClassName = classnames_default()(prefixCls, tag === null || tag === void 0 ? void 0 : tag.className, { - [`${prefixCls}-${color}`]: isInternalColor, - [`${prefixCls}-has-color`]: color && !isInternalColor, - [`${prefixCls}-hidden`]: !visible, - [`${prefixCls}-rtl`]: direction === 'rtl', - [`${prefixCls}-borderless`]: !bordered - }, className, rootClassName, hashId); - const handleCloseClick = e => { - e.stopPropagation(); - onClose === null || onClose === void 0 ? void 0 : onClose(e); - if (e.defaultPrevented) { - return; - } - setVisible(false); - }; - const [, mergedCloseIcon] = (0,useClosable/* default */.Z)(closable, closeIcon, iconNode => iconNode === null ? /*#__PURE__*/react.createElement(CloseOutlined/* default */.Z, { - className: `${prefixCls}-close-icon`, - onClick: handleCloseClick - }) : /*#__PURE__*/react.createElement("span", { - className: `${prefixCls}-close-icon`, - onClick: handleCloseClick - }, iconNode), null, false); - const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a'; - const iconNode = icon || null; - const kids = iconNode ? /*#__PURE__*/react.createElement(react.Fragment, null, iconNode, children && /*#__PURE__*/react.createElement("span", null, children)) : children; - const tagNode = /*#__PURE__*/react.createElement("span", Object.assign({}, props, { - ref: ref, - className: tagClassName, - style: tagStyle - }), kids, mergedCloseIcon); - return wrapSSR(isNeedWave ? /*#__PURE__*/react.createElement(wave/* default */.Z, null, tagNode) : tagNode); -}; -const Tag = /*#__PURE__*/react.forwardRef(InternalTag); -if (false) {} -Tag.CheckableTag = tag_CheckableTag; -/* harmony default export */ var tag = (Tag); - -/***/ }), - -/***/ 20640: -/*!*************************************************!*\ - !*** ./node_modules/copy-to-clipboard/index.js ***! - \*************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var deselectCurrent = __webpack_require__(/*! toggle-selection */ 11742); - -var clipboardToIE11Formatting = { - "text/plain": "Text", - "text/html": "Url", - "default": "Text" -} - -var defaultMessage = "Copy to clipboard: #{key}, Enter"; - -function format(message) { - var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; - return message.replace(/#{\s*key\s*}/g, copyKey); -} - -function copy(text, options) { - var debug, - message, - reselectPrevious, - range, - selection, - mark, - success = false; - if (!options) { - options = {}; - } - debug = options.debug || false; - try { - reselectPrevious = deselectCurrent(); - - range = document.createRange(); - selection = document.getSelection(); - - mark = document.createElement("span"); - mark.textContent = text; - // avoid screen readers from reading out loud the text - mark.ariaHidden = "true" - // reset user styles for span element - mark.style.all = "unset"; - // prevents scrolling to the end of the page - mark.style.position = "fixed"; - mark.style.top = 0; - mark.style.clip = "rect(0, 0, 0, 0)"; - // used to preserve spaces and line breaks - mark.style.whiteSpace = "pre"; - // do not inherit user-select (it may be `none`) - mark.style.webkitUserSelect = "text"; - mark.style.MozUserSelect = "text"; - mark.style.msUserSelect = "text"; - mark.style.userSelect = "text"; - mark.addEventListener("copy", function(e) { - e.stopPropagation(); - if (options.format) { - e.preventDefault(); - if (typeof e.clipboardData === "undefined") { // IE 11 - debug && console.warn("unable to use e.clipboardData"); - debug && console.warn("trying IE specific stuff"); - window.clipboardData.clearData(); - var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"] - window.clipboardData.setData(format, text); - } else { // all other browsers - e.clipboardData.clearData(); - e.clipboardData.setData(options.format, text); - } - } - if (options.onCopy) { - e.preventDefault(); - options.onCopy(e.clipboardData); - } - }); - - document.body.appendChild(mark); - - range.selectNodeContents(mark); - selection.addRange(range); - - var successful = document.execCommand("copy"); - if (!successful) { - throw new Error("copy command was unsuccessful"); - } - success = true; - } catch (err) { - debug && console.error("unable to copy using execCommand: ", err); - debug && console.warn("trying IE specific stuff"); - try { - window.clipboardData.setData(options.format || "text", text); - options.onCopy && options.onCopy(window.clipboardData); - success = true; - } catch (err) { - debug && console.error("unable to copy using clipboardData: ", err); - debug && console.error("falling back to prompt"); - message = format("message" in options ? options.message : defaultMessage); - window.prompt(message, text); - } - } finally { - if (selection) { - if (typeof selection.removeRange == "function") { - selection.removeRange(range); - } else { - selection.removeAllRanges(); - } - } - - if (mark) { - document.body.removeChild(mark); - } - reselectPrevious(); - } - - return success; -} - -module.exports = copy; - - -/***/ }), - -/***/ 89777: -/*!*************************************************!*\ - !*** ./node_modules/echarts-wordcloud/index.js ***! - \*************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/* unused reexport */ __webpack_require__(/*! ./src/wordCloud */ 88157); - -/***/ }), - -/***/ 50024: -/*!***************************************************************!*\ - !*** ./node_modules/echarts-wordcloud/src/WordCloudSeries.js ***! - \***************************************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var completeDimensions = __webpack_require__(/*! echarts/lib/data/helper/completeDimensions */ 34380); -var echarts = __webpack_require__(/*! echarts/lib/echarts */ 70492); - -echarts.extendSeriesModel({ - - type: 'series.wordCloud', - - visualColorAccessPath: 'textStyle.normal.color', - - optionUpdated: function () { - var option = this.option; - option.gridSize = Math.max(Math.floor(option.gridSize), 4); - }, - - getInitialData: function (option, ecModel) { - var dimensions = completeDimensions(['value'], option.data); - var list = new echarts.List(dimensions, this); - list.initData(option.data); - return list; - }, - - // Most of options are from https://github.com/timdream/wordcloud2.js/blob/gh-pages/API.md - defaultOption: { - - maskImage: null, - - // Shape can be 'circle', 'cardioid', 'diamond', 'triangle-forward', 'triangle', 'pentagon', 'star' - shape: 'circle', - - left: 'center', - - top: 'center', - - width: '70%', - - height: '80%', - - sizeRange: [12, 60], - - rotationRange: [-90, 90], - - rotationStep: 45, - - gridSize: 8, - - drawOutOfBound: false, - - textStyle: { - normal: { - fontWeight: 'normal' - } - } - } -}); - - -/***/ }), - -/***/ 40885: -/*!*************************************************************!*\ - !*** ./node_modules/echarts-wordcloud/src/WordCloudView.js ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var echarts = __webpack_require__(/*! echarts/lib/echarts */ 70492); - -function getShallow(model, path) { - return model && model.getShallow(path); -} - -echarts.extendChartView({ - - type: 'wordCloud', - - render: function (seriesModel, ecModel, api) { - var group = this.group; - group.removeAll(); - - var data = seriesModel.getData(); - - var gridSize = seriesModel.get('gridSize'); - - seriesModel.layoutInstance.ondraw = function (text, size, dataIdx, drawn) { - var itemModel = data.getItemModel(dataIdx); - var textStyleModel = itemModel.getModel('textStyle.normal'); - var emphasisTextStyleModel = itemModel.getModel('textStyle.emphasis'); - - var textEl = new echarts.graphic.Text({ - style: echarts.graphic.setTextStyle({}, textStyleModel, { - x: drawn.info.fillTextOffsetX, - y: drawn.info.fillTextOffsetY + size * 0.5, - text: text, - textBaseline: 'middle', - textFill: data.getItemVisual(dataIdx, 'color'), - fontSize: size - }), - scale: [1 / drawn.info.mu, 1 / drawn.info.mu], - position: [ - (drawn.gx + drawn.info.gw / 2) * gridSize, - (drawn.gy + drawn.info.gh / 2) * gridSize - ], - rotation: drawn.rot - }); - - group.add(textEl); - - data.setItemGraphicEl(dataIdx, textEl); - - echarts.graphic.setHoverStyle( - textEl, - echarts.graphic.setTextStyle({}, emphasisTextStyleModel, null, {forMerge: true}, true) - ); - }; - - this._model = seriesModel; - }, - - remove: function () { - this.group.removeAll(); - - this._model.layoutInstance.dispose(); - }, - - dispose: function () { - this._model.layoutInstance.dispose(); - } -}); - - -/***/ }), - -/***/ 62255: -/*!******************************************************!*\ - !*** ./node_modules/echarts-wordcloud/src/layout.js ***! - \******************************************************/ -/***/ (function(module, exports) { - -"use strict"; -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * wordcloud2.js - * http://timdream.org/wordcloud2.js/ - * - * Copyright 2011 - 2013 Tim Chien - * Released under the MIT license - */ - - - -// setImmediate -if (!window.setImmediate) { - window.setImmediate = (function setupSetImmediate() { - return window.msSetImmediate || - window.webkitSetImmediate || - window.mozSetImmediate || - window.oSetImmediate || - (function setupSetZeroTimeout() { - if (!window.postMessage || !window.addEventListener) { - return null; - } - - var callbacks = [undefined]; - var message = 'zero-timeout-message'; - - // Like setTimeout, but only takes a function argument. There's - // no time argument (always zero) and no arguments (you have to - // use a closure). - var setZeroTimeout = function setZeroTimeout(callback) { - var id = callbacks.length; - callbacks.push(callback); - window.postMessage(message + id.toString(36), '*'); - - return id; - }; - - window.addEventListener('message', function setZeroTimeoutMessage(evt) { - // Skipping checking event source, retarded IE confused this window - // object with another in the presence of iframe - if (typeof evt.data !== 'string' || - evt.data.substr(0, message.length) !== message/* || - evt.source !== window */) { - return; - } - - evt.stopImmediatePropagation(); - - var id = parseInt(evt.data.substr(message.length), 36); - if (!callbacks[id]) { - return; - } - - callbacks[id](); - callbacks[id] = undefined; - }, true); - - /* specify clearImmediate() here since we need the scope */ - window.clearImmediate = function clearZeroTimeout(id) { - if (!callbacks[id]) { - return; - } - - callbacks[id] = undefined; - }; - - return setZeroTimeout; - })() || - // fallback - function setImmediateFallback(fn) { - window.setTimeout(fn, 0); - }; - })(); -} - -if (!window.clearImmediate) { - window.clearImmediate = (function setupClearImmediate() { - return window.msClearImmediate || - window.webkitClearImmediate || - window.mozClearImmediate || - window.oClearImmediate || - // "clearZeroTimeout" is implement on the previous block || - // fallback - function clearImmediateFallback(timer) { - window.clearTimeout(timer); - }; - })(); -} - -(function(global) { - - // Check if WordCloud can run on this browser - var isSupported = (function isSupported() { - var canvas = document.createElement('canvas'); - if (!canvas || !canvas.getContext) { - return false; - } - - var ctx = canvas.getContext('2d'); - if (!ctx.getImageData) { - return false; - } - if (!ctx.fillText) { - return false; - } - - if (!Array.prototype.some) { - return false; - } - if (!Array.prototype.push) { - return false; - } - - return true; - }()); - - // Find out if the browser impose minium font size by - // drawing small texts on a canvas and measure it's width. - var minFontSize = (function getMinFontSize() { - if (!isSupported) { - return; - } - - var ctx = document.createElement('canvas').getContext('2d'); - - // start from 20 - var size = 20; - - // two sizes to measure - var hanWidth, mWidth; - - while (size) { - ctx.font = size.toString(10) + 'px sans-serif'; - if ((ctx.measureText('\uFF37').width === hanWidth) && - (ctx.measureText('m').width) === mWidth) { - return (size + 1); - } - - hanWidth = ctx.measureText('\uFF37').width; - mWidth = ctx.measureText('m').width; - - size--; + var _useRefs = useRefs(), + _useRefs2 = (0,slicedToArray/* default */.Z)(_useRefs, 2), + getStarRef = _useRefs2[0], + setStarRef = _useRefs2[1]; + var rateRef = react.useRef(null); + // ============================ Ref ============================= + var triggerFocus = function triggerFocus() { + if (!disabled) { + var _rateRef$current; + (_rateRef$current = rateRef.current) === null || _rateRef$current === void 0 ? void 0 : _rateRef$current.focus(); } - - return 0; - })(); - - // Based on http://jsfromhell.com/array/shuffle - var shuffleArray = function shuffleArray(arr) { - for (var j, x, i = arr.length; i; - j = Math.floor(Math.random() * i), - x = arr[--i], arr[i] = arr[j], - arr[j] = x) {} - return arr; }; - - var WordCloud = function WordCloud(elements, options) { - if (!isSupported) { - return; - } - - if (!Array.isArray(elements)) { - elements = [elements]; - } - - elements.forEach(function(el, i) { - if (typeof el === 'string') { - elements[i] = document.getElementById(el); - if (!elements[i]) { - throw 'The element id specified is not found.'; + react.useImperativeHandle(ref, function () { + return { + focus: triggerFocus, + blur: function blur() { + if (!disabled) { + var _rateRef$current2; + (_rateRef$current2 = rateRef.current) === null || _rateRef$current2 === void 0 ? void 0 : _rateRef$current2.blur(); } - } else if (!el.tagName && !el.appendChild) { - throw 'You must pass valid HTML elements, or ID of the element.'; } - }); - - /* Default values to be overwritten by options object */ - var settings = { - list: [], - fontFamily: '"Trebuchet MS", "Heiti TC", "微軟正黑體", ' + - '"Arial Unicode MS", "Droid Fallback Sans", sans-serif', - fontWeight: 'normal', - color: 'random-dark', - minSize: 0, // 0 to disable - weightFactor: 1, - clearCanvas: true, - backgroundColor: '#fff', // opaque white = rgba(255, 255, 255, 1) - - gridSize: 8, - drawOutOfBound: false, - origin: null, - - drawMask: false, - maskColor: 'rgba(255,0,0,0.3)', - maskGapWidth: 0.3, - - wait: 0, - abortThreshold: 0, // disabled - abort: function noop() {}, - - minRotation: - Math.PI / 2, - maxRotation: Math.PI / 2, - rotationStep: 0.1, - - shuffle: true, - rotateRatio: 0.1, - - shape: 'circle', - ellipticity: 0.65, - - classes: null, - - hover: null, - click: null }; - - if (options) { - for (var key in options) { - if (key in settings) { - settings[key] = options[key]; - } - } - } - - /* Convert weightFactor into a function */ - if (typeof settings.weightFactor !== 'function') { - var factor = settings.weightFactor; - settings.weightFactor = function weightFactor(pt) { - return pt * factor; //in px - }; - } - - /* Convert shape into a function */ - if (typeof settings.shape !== 'function') { - switch (settings.shape) { - case 'circle': - /* falls through */ - default: - // 'circle' is the default and a shortcut in the code loop. - settings.shape = 'circle'; - break; - - case 'cardioid': - settings.shape = function shapeCardioid(theta) { - return 1 - Math.sin(theta); - }; - break; - - /* - To work out an X-gon, one has to calculate "m", - where 1/(cos(2*PI/X)+m*sin(2*PI/X)) = 1/(cos(0)+m*sin(0)) - http://www.wolframalpha.com/input/?i=1%2F%28cos%282*PI%2FX%29%2Bm*sin%28 - 2*PI%2FX%29%29+%3D+1%2F%28cos%280%29%2Bm*sin%280%29%29 - Copy the solution into polar equation r = 1/(cos(t') + m*sin(t')) - where t' equals to mod(t, 2PI/X); - */ - - case 'diamond': - case 'square': - // http://www.wolframalpha.com/input/?i=plot+r+%3D+1%2F%28cos%28mod+ - // %28t%2C+PI%2F2%29%29%2Bsin%28mod+%28t%2C+PI%2F2%29%29%29%2C+t+%3D - // +0+..+2*PI - settings.shape = function shapeSquare(theta) { - var thetaPrime = theta % (2 * Math.PI / 4); - return 1 / (Math.cos(thetaPrime) + Math.sin(thetaPrime)); - }; - break; - - case 'triangle-forward': - // http://www.wolframalpha.com/input/?i=plot+r+%3D+1%2F%28cos%28mod+ - // %28t%2C+2*PI%2F3%29%29%2Bsqrt%283%29sin%28mod+%28t%2C+2*PI%2F3%29 - // %29%29%2C+t+%3D+0+..+2*PI - settings.shape = function shapeTriangle(theta) { - var thetaPrime = theta % (2 * Math.PI / 3); - return 1 / (Math.cos(thetaPrime) + - Math.sqrt(3) * Math.sin(thetaPrime)); - }; - break; - - case 'triangle': - case 'triangle-upright': - settings.shape = function shapeTriangle(theta) { - var thetaPrime = (theta + Math.PI * 3 / 2) % (2 * Math.PI / 3); - return 1 / (Math.cos(thetaPrime) + - Math.sqrt(3) * Math.sin(thetaPrime)); - }; - break; - - case 'pentagon': - settings.shape = function shapePentagon(theta) { - var thetaPrime = (theta + 0.955) % (2 * Math.PI / 5); - return 1 / (Math.cos(thetaPrime) + - 0.726543 * Math.sin(thetaPrime)); - }; - break; - - case 'star': - settings.shape = function shapeStar(theta) { - var thetaPrime = (theta + 0.955) % (2 * Math.PI / 10); - if ((theta + 0.955) % (2 * Math.PI / 5) - (2 * Math.PI / 10) >= 0) { - return 1 / (Math.cos((2 * Math.PI / 10) - thetaPrime) + - 3.07768 * Math.sin((2 * Math.PI / 10) - thetaPrime)); - } else { - return 1 / (Math.cos(thetaPrime) + - 3.07768 * Math.sin(thetaPrime)); - } - }; - break; + }); + // =========================== Value ============================ + var _useMergedState = (0,useMergedState/* default */.Z)(defaultValue || 0, { + value: propValue + }), + _useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2), + value = _useMergedState2[0], + setValue = _useMergedState2[1]; + var _useMergedState3 = (0,useMergedState/* default */.Z)(null), + _useMergedState4 = (0,slicedToArray/* default */.Z)(_useMergedState3, 2), + cleanedValue = _useMergedState4[0], + setCleanedValue = _useMergedState4[1]; + var getStarValue = function getStarValue(index, x) { + var reverse = direction === 'rtl'; + var starValue = index + 1; + if (allowHalf) { + var starEle = getStarRef(index); + var leftDis = getOffsetLeft(starEle); + var width = starEle.clientWidth; + if (reverse && x - leftDis > width / 2) { + starValue -= 0.5; + } else if (!reverse && x - leftDis < width / 2) { + starValue -= 0.5; } } - - /* Make sure gridSize is a whole number and is not smaller than 4px */ - settings.gridSize = Math.max(Math.floor(settings.gridSize), 4); - - /* shorthand */ - var g = settings.gridSize; - var maskRectWidth = g - settings.maskGapWidth; - - /* normalize rotation settings */ - var rotationRange = Math.abs(settings.maxRotation - settings.minRotation); - var minRotation = Math.min(settings.maxRotation, settings.minRotation); - var rotationStep = settings.rotationStep; - - /* information/object available to all functions, set when start() */ - var grid, // 2d array containing filling information - ngx, ngy, // width and height of the grid - center, // position of the center of the cloud - maxRadius; - - /* timestamp for measuring each putWord() action */ - var escapeTime; - - /* function for getting the color of the text */ - var getTextColor; - function random_hsl_color(min, max) { - return 'hsl(' + - (Math.random() * 360).toFixed() + ',' + - (Math.random() * 30 + 70).toFixed() + '%,' + - (Math.random() * (max - min) + min).toFixed() + '%)'; - } - switch (settings.color) { - case 'random-dark': - getTextColor = function getRandomDarkColor() { - return random_hsl_color(10, 50); - }; - break; - - case 'random-light': - getTextColor = function getRandomLightColor() { - return random_hsl_color(50, 90); - }; - break; - - default: - if (typeof settings.color === 'function') { - getTextColor = settings.color; - } - break; - } - - /* function for getting the classes of the text */ - var getTextClasses = null; - if (typeof settings.classes === 'function') { - getTextClasses = settings.classes; - } - - /* Interactive */ - var interactive = false; - var infoGrid = []; - var hovered; - - var getInfoGridFromMouseTouchEvent = - function getInfoGridFromMouseTouchEvent(evt) { - var canvas = evt.currentTarget; - var rect = canvas.getBoundingClientRect(); - var clientX; - var clientY; - /** Detect if touches are available */ - if (evt.touches) { - clientX = evt.touches[0].clientX; - clientY = evt.touches[0].clientY; - } else { - clientX = evt.clientX; - clientY = evt.clientY; - } - var eventX = clientX - rect.left; - var eventY = clientY - rect.top; - - var x = Math.floor(eventX * ((canvas.width / rect.width) || 1) / g); - var y = Math.floor(eventY * ((canvas.height / rect.height) || 1) / g); - - return infoGrid[x][y]; - }; - - var wordcloudhover = function wordcloudhover(evt) { - var info = getInfoGridFromMouseTouchEvent(evt); - - if (hovered === info) { - return; - } - - hovered = info; - if (!info) { - settings.hover(undefined, undefined, evt); - - return; - } - - settings.hover(info.item, info.dimension, evt); - - }; - - var wordcloudclick = function wordcloudclick(evt) { - var info = getInfoGridFromMouseTouchEvent(evt); - if (!info) { - return; - } - - settings.click(info.item, info.dimension, evt); - evt.preventDefault(); - }; - - /* Get points on the grid for a given radius away from the center */ - var pointsAtRadius = []; - var getPointsAtRadius = function getPointsAtRadius(radius) { - if (pointsAtRadius[radius]) { - return pointsAtRadius[radius]; - } - - // Look for these number of points on each radius - var T = radius * 8; - - // Getting all the points at this radius - var t = T; - var points = []; - - if (radius === 0) { - points.push([center[0], center[1], 0]); - } - - while (t--) { - // distort the radius to put the cloud in shape - var rx = 1; - if (settings.shape !== 'circle') { - rx = settings.shape(t / T * 2 * Math.PI); // 0 to 1 - } - - // Push [x, y, t]; t is used solely for getTextColor() - points.push([ - center[0] + radius * rx * Math.cos(-t / T * 2 * Math.PI), - center[1] + radius * rx * Math.sin(-t / T * 2 * Math.PI) * - settings.ellipticity, - t / T * 2 * Math.PI]); - } - - pointsAtRadius[radius] = points; - return points; - }; - - /* Return true if we had spent too much time */ - var exceedTime = function exceedTime() { - return ((settings.abortThreshold > 0) && - ((new Date()).getTime() - escapeTime > settings.abortThreshold)); - }; - - /* Get the deg of rotation according to settings, and luck. */ - var getRotateDeg = function getRotateDeg() { - if (settings.rotateRatio === 0) { - return 0; - } - - if (Math.random() > settings.rotateRatio) { - return 0; - } - - if (rotationRange === 0) { - return minRotation; - } - - return minRotation + Math.round(Math.random() * rotationRange / rotationStep) * rotationStep; - }; - - var getTextInfo = function getTextInfo(word, weight, rotateDeg) { - // calculate the acutal font size - // fontSize === 0 means weightFactor function wants the text skipped, - // and size < minSize means we cannot draw the text. - var debug = false; - var fontSize = settings.weightFactor(weight); - if (fontSize <= settings.minSize) { - return false; - } - - // Scale factor here is to make sure fillText is not limited by - // the minium font size set by browser. - // It will always be 1 or 2n. - var mu = 1; - if (fontSize < minFontSize) { - mu = (function calculateScaleFactor() { - var mu = 2; - while (mu * fontSize < minFontSize) { - mu += 2; - } - return mu; - })(); - } - - var fcanvas = document.createElement('canvas'); - var fctx = fcanvas.getContext('2d', { willReadFrequently: true }); - - fctx.font = settings.fontWeight + ' ' + - (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; - - // Estimate the dimension of the text with measureText(). - var fw = fctx.measureText(word).width / mu; - var fh = Math.max(fontSize * mu, - fctx.measureText('m').width, - fctx.measureText('\uFF37').width) / mu; - - // Create a boundary box that is larger than our estimates, - // so text don't get cut of (it sill might) - var boxWidth = fw + fh * 2; - var boxHeight = fh * 3; - var fgw = Math.ceil(boxWidth / g); - var fgh = Math.ceil(boxHeight / g); - boxWidth = fgw * g; - boxHeight = fgh * g; - - // Calculate the proper offsets to make the text centered at - // the preferred position. - - // This is simply half of the width. - var fillTextOffsetX = - fw / 2; - // Instead of moving the box to the exact middle of the preferred - // position, for Y-offset we move 0.4 instead, so Latin alphabets look - // vertical centered. - var fillTextOffsetY = - fh * 0.4; - - // Calculate the actual dimension of the canvas, considering the rotation. - var cgh = Math.ceil((boxWidth * Math.abs(Math.sin(rotateDeg)) + - boxHeight * Math.abs(Math.cos(rotateDeg))) / g); - var cgw = Math.ceil((boxWidth * Math.abs(Math.cos(rotateDeg)) + - boxHeight * Math.abs(Math.sin(rotateDeg))) / g); - var width = cgw * g; - var height = cgh * g; - - fcanvas.setAttribute('width', width); - fcanvas.setAttribute('height', height); - - if (debug) { - // Attach fcanvas to the DOM - document.body.appendChild(fcanvas); - // Save it's state so that we could restore and draw the grid correctly. - fctx.save(); - } - - // Scale the canvas with |mu|. - fctx.scale(1 / mu, 1 / mu); - fctx.translate(width * mu / 2, height * mu / 2); - fctx.rotate(- rotateDeg); - - // Once the width/height is set, ctx info will be reset. - // Set it again here. - fctx.font = settings.fontWeight + ' ' + - (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; - - // Fill the text into the fcanvas. - // XXX: We cannot because textBaseline = 'top' here because - // Firefox and Chrome uses different default line-height for canvas. - // Please read https://bugzil.la/737852#c6. - // Here, we use textBaseline = 'middle' and draw the text at exactly - // 0.5 * fontSize lower. - fctx.fillStyle = '#000'; - fctx.textBaseline = 'middle'; - fctx.fillText(word, fillTextOffsetX * mu, - (fillTextOffsetY + fontSize * 0.5) * mu); - - // Get the pixels of the text - var imageData = fctx.getImageData(0, 0, width, height).data; - - if (exceedTime()) { - return false; - } - - if (debug) { - // Draw the box of the original estimation - fctx.strokeRect(fillTextOffsetX * mu, - fillTextOffsetY, fw * mu, fh * mu); - fctx.restore(); - } - - // Read the pixels and save the information to the occupied array - var occupied = []; - var gx = cgw, gy, x, y; - var bounds = [cgh / 2, cgw / 2, cgh / 2, cgw / 2]; - while (gx--) { - gy = cgh; - while (gy--) { - y = g; - singleGridLoop: { - while (y--) { - x = g; - while (x--) { - if (imageData[((gy * g + y) * width + - (gx * g + x)) * 4 + 3]) { - occupied.push([gx, gy]); - - if (gx < bounds[3]) { - bounds[3] = gx; - } - if (gx > bounds[1]) { - bounds[1] = gx; - } - if (gy < bounds[0]) { - bounds[0] = gy; - } - if (gy > bounds[2]) { - bounds[2] = gy; - } - - if (debug) { - fctx.fillStyle = 'rgba(255, 0, 0, 0.5)'; - fctx.fillRect(gx * g, gy * g, g - 0.5, g - 0.5); - } - break singleGridLoop; - } - } - } - if (debug) { - fctx.fillStyle = 'rgba(0, 0, 255, 0.5)'; - fctx.fillRect(gx * g, gy * g, g - 0.5, g - 0.5); - } - } - } - } - - if (debug) { - fctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; - fctx.fillRect(bounds[3] * g, - bounds[0] * g, - (bounds[1] - bounds[3] + 1) * g, - (bounds[2] - bounds[0] + 1) * g); - } - - // Return information needed to create the text on the real canvas - return { - mu: mu, - occupied: occupied, - bounds: bounds, - gw: cgw, - gh: cgh, - fillTextOffsetX: fillTextOffsetX, - fillTextOffsetY: fillTextOffsetY, - fillTextWidth: fw, - fillTextHeight: fh, - fontSize: fontSize - }; - }; - - /* Determine if there is room available in the given dimension */ - var canFitText = function canFitText(gx, gy, gw, gh, occupied) { - // Go through the occupied points, - // return false if the space is not available. - var i = occupied.length; - while (i--) { - var px = gx + occupied[i][0]; - var py = gy + occupied[i][1]; - - if (px >= ngx || py >= ngy || px < 0 || py < 0) { - if (!settings.drawOutOfBound) { - return false; - } - continue; - } - - if (!grid[px][py]) { - return false; - } - } - return true; - }; - - /* Actually draw the text on the grid */ - var drawText = function drawText(gx, gy, info, word, weight, - distance, theta, rotateDeg, attributes) { - - var fontSize = info.fontSize; - var color; - if (getTextColor) { - color = getTextColor(word, weight, fontSize, distance, theta); - } else { - color = settings.color; - } - - var classes; - if (getTextClasses) { - classes = getTextClasses(word, weight, fontSize, distance, theta); - } else { - classes = settings.classes; - } - - var dimension; - var bounds = info.bounds; - dimension = { - x: (gx + bounds[3]) * g, - y: (gy + bounds[0]) * g, - w: (bounds[1] - bounds[3] + 1) * g, - h: (bounds[2] - bounds[0] + 1) * g - }; - - elements.forEach(function(el) { - if (el.getContext) { - var ctx = el.getContext('2d'); - var mu = info.mu; - - // Save the current state before messing it - ctx.save(); - ctx.scale(1 / mu, 1 / mu); - - ctx.font = settings.fontWeight + ' ' + - (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; - ctx.fillStyle = color; - - // Translate the canvas position to the origin coordinate of where - // the text should be put. - ctx.translate((gx + info.gw / 2) * g * mu, - (gy + info.gh / 2) * g * mu); - - if (rotateDeg !== 0) { - ctx.rotate(- rotateDeg); - } - - // Finally, fill the text. - - // XXX: We cannot because textBaseline = 'top' here because - // Firefox and Chrome uses different default line-height for canvas. - // Please read https://bugzil.la/737852#c6. - // Here, we use textBaseline = 'middle' and draw the text at exactly - // 0.5 * fontSize lower. - ctx.textBaseline = 'middle'; - ctx.fillText(word, info.fillTextOffsetX * mu, - (info.fillTextOffsetY + fontSize * 0.5) * mu); - - // The below box is always matches how s are positioned - /* ctx.strokeRect(info.fillTextOffsetX, info.fillTextOffsetY, - info.fillTextWidth, info.fillTextHeight); */ - - // Restore the state. - ctx.restore(); - } else { - // drawText on DIV element - var span = document.createElement('span'); - var transformRule = ''; - transformRule = 'rotate(' + (- rotateDeg / Math.PI * 180) + 'deg) '; - if (info.mu !== 1) { - transformRule += - 'translateX(-' + (info.fillTextWidth / 4) + 'px) ' + - 'scale(' + (1 / info.mu) + ')'; - } - var styleRules = { - 'position': 'absolute', - 'display': 'block', - 'font': settings.fontWeight + ' ' + - (fontSize * info.mu) + 'px ' + settings.fontFamily, - 'left': ((gx + info.gw / 2) * g + info.fillTextOffsetX) + 'px', - 'top': ((gy + info.gh / 2) * g + info.fillTextOffsetY) + 'px', - 'width': info.fillTextWidth + 'px', - 'height': info.fillTextHeight + 'px', - 'lineHeight': fontSize + 'px', - 'whiteSpace': 'nowrap', - 'transform': transformRule, - 'webkitTransform': transformRule, - 'msTransform': transformRule, - 'transformOrigin': '50% 40%', - 'webkitTransformOrigin': '50% 40%', - 'msTransformOrigin': '50% 40%' - }; - if (color) { - styleRules.color = color; - } - span.textContent = word; - for (var cssProp in styleRules) { - span.style[cssProp] = styleRules[cssProp]; - } - if (attributes) { - for (var attribute in attributes) { - span.setAttribute(attribute, attributes[attribute]); - } - } - if (classes) { - span.className += classes; - } - el.appendChild(span); - } - }); - }; - - /* Help function to updateGrid */ - var fillGridAt = function fillGridAt(x, y, drawMask, dimension, item) { - if (x >= ngx || y >= ngy || x < 0 || y < 0) { - return; - } - - grid[x][y] = false; - - if (drawMask) { - var ctx = elements[0].getContext('2d'); - ctx.fillRect(x * g, y * g, maskRectWidth, maskRectWidth); - } - - if (interactive) { - infoGrid[x][y] = { item: item, dimension: dimension }; - } - }; - - /* Update the filling information of the given space with occupied points. - Draw the mask on the canvas if necessary. */ - var updateGrid = function updateGrid(gx, gy, gw, gh, info, item) { - var occupied = info.occupied; - var drawMask = settings.drawMask; - var ctx; - if (drawMask) { - ctx = elements[0].getContext('2d'); - ctx.save(); - ctx.fillStyle = settings.maskColor; - } - - var dimension; - if (interactive) { - var bounds = info.bounds; - dimension = { - x: (gx + bounds[3]) * g, - y: (gy + bounds[0]) * g, - w: (bounds[1] - bounds[3] + 1) * g, - h: (bounds[2] - bounds[0] + 1) * g - }; - } - - var i = occupied.length; - while (i--) { - var px = gx + occupied[i][0]; - var py = gy + occupied[i][1]; - - if (px >= ngx || py >= ngy || px < 0 || py < 0) { - continue; - } - - fillGridAt(px, py, drawMask, dimension, item); - } - - if (drawMask) { - ctx.restore(); - } - }; - - /* putWord() processes each item on the list, - calculate it's size and determine it's position, and actually - put it on the canvas. */ - var putWord = function putWord(item) { - var word, weight, attributes; - if (Array.isArray(item)) { - word = item[0]; - weight = item[1]; - } else { - word = item.word; - weight = item.weight; - attributes = item.attributes; - } - var rotateDeg = getRotateDeg(); - - // get info needed to put the text onto the canvas - var info = getTextInfo(word, weight, rotateDeg); - - // not getting the info means we shouldn't be drawing this one. - if (!info) { - return false; - } - - if (exceedTime()) { - return false; - } - - // If drawOutOfBound is set to false, - // skip the loop if we have already know the bounding box of - // word is larger than the canvas. - if (!settings.drawOutOfBound) { - var bounds = info.bounds; - if ((bounds[1] - bounds[3] + 1) > ngx || - (bounds[2] - bounds[0] + 1) > ngy) { - return false; - } - } - - // Determine the position to put the text by - // start looking for the nearest points - var r = maxRadius + 1; - - var tryToPutWordAtPoint = function(gxy) { - var gx = Math.floor(gxy[0] - info.gw / 2); - var gy = Math.floor(gxy[1] - info.gh / 2); - var gw = info.gw; - var gh = info.gh; - - // If we cannot fit the text at this position, return false - // and go to the next position. - if (!canFitText(gx, gy, gw, gh, info.occupied)) { - return false; - } - - // Actually put the text on the canvas - drawText(gx, gy, info, word, weight, - (maxRadius - r), gxy[2], rotateDeg, attributes); - - // Mark the spaces on the grid as filled - updateGrid(gx, gy, gw, gh, info, item); - - return { - gx: gx, - gy: gy, - rot: rotateDeg, - info: info - }; - }; - - while (r--) { - var points = getPointsAtRadius(maxRadius - r); - - if (settings.shuffle) { - points = [].concat(points); - shuffleArray(points); - } - - // Try to fit the words by looking at each point. - // array.some() will stop and return true - // when putWordAtPoint() returns true. - for (var i = 0; i < points.length; i++) { - var res = tryToPutWordAtPoint(points[i]); - if (res) { - return res; - } - } - - // var drawn = points.some(tryToPutWordAtPoint); - // if (drawn) { - // // leave putWord() and return true - // return true; - // } - } - // we tried all distances but text won't fit, return null - return null; - }; - - /* Send DOM event to all elements. Will stop sending event and return - if the previous one is canceled (for cancelable events). */ - var sendEvent = function sendEvent(type, cancelable, detail) { - if (cancelable) { - return !elements.some(function(el) { - var evt = document.createEvent('CustomEvent'); - evt.initCustomEvent(type, true, cancelable, detail || {}); - return !el.dispatchEvent(evt); - }, this); + return starValue; + }; + // >>>>> Change + var changeValue = function changeValue(nextValue) { + setValue(nextValue); + onChange === null || onChange === void 0 ? void 0 : onChange(nextValue); + }; + // =========================== Focus ============================ + var _React$useState = react.useState(false), + _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), + focused = _React$useState2[0], + setFocused = _React$useState2[1]; + var onInternalFocus = function onInternalFocus() { + setFocused(true); + onFocus === null || onFocus === void 0 ? void 0 : onFocus(); + }; + var onInternalBlur = function onInternalBlur() { + setFocused(false); + onBlur === null || onBlur === void 0 ? void 0 : onBlur(); + }; + // =========================== Hover ============================ + var _React$useState3 = react.useState(null), + _React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2), + hoverValue = _React$useState4[0], + setHoverValue = _React$useState4[1]; + var onHover = function onHover(event, index) { + var nextHoverValue = getStarValue(index, event.pageX); + if (nextHoverValue !== cleanedValue) { + setHoverValue(nextHoverValue); + setCleanedValue(null); + } + onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(nextHoverValue); + }; + var onMouseLeaveCallback = function onMouseLeaveCallback(event) { + if (!disabled) { + setHoverValue(null); + setCleanedValue(null); + onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(undefined); + } + if (event) { + onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(event); + } + }; + // =========================== Click ============================ + var onClick = function onClick(event, index) { + var newValue = getStarValue(index, event.pageX); + var isReset = false; + if (allowClear) { + isReset = newValue === value; + } + onMouseLeaveCallback(); + changeValue(isReset ? 0 : newValue); + setCleanedValue(isReset ? newValue : null); + }; + var onInternalKeyDown = function onInternalKeyDown(event) { + var keyCode = event.keyCode; + var reverse = direction === 'rtl'; + var nextValue = value; + if (keyCode === KeyCode/* default.RIGHT */.Z.RIGHT && nextValue < count && !reverse) { + if (allowHalf) { + nextValue += 0.5; } else { - elements.forEach(function(el) { - var evt = document.createEvent('CustomEvent'); - evt.initCustomEvent(type, true, cancelable, detail || {}); - el.dispatchEvent(evt); - }, this); + nextValue += 1; } - }; - - /* Start drawing on a canvas */ - var start = function start() { - // For dimensions, clearCanvas etc., - // we only care about the first element. - var canvas = elements[0]; - - if (canvas.getContext) { - ngx = Math.ceil(canvas.width / g); - ngy = Math.ceil(canvas.height / g); + changeValue(nextValue); + event.preventDefault(); + } else if (keyCode === KeyCode/* default.LEFT */.Z.LEFT && nextValue > 0 && !reverse) { + if (allowHalf) { + nextValue -= 0.5; } else { - var rect = canvas.getBoundingClientRect(); - ngx = Math.ceil(rect.width / g); - ngy = Math.ceil(rect.height / g); - } - - // Sending a wordcloudstart event which cause the previous loop to stop. - // Do nothing if the event is canceled. - if (!sendEvent('wordcloudstart', true)) { - return; + nextValue -= 1; } - - // Determine the center of the word cloud - center = (settings.origin) ? - [settings.origin[0]/g, settings.origin[1]/g] : - [ngx / 2, ngy / 2]; - - // Maxium radius to look for space - maxRadius = Math.floor(Math.sqrt(ngx * ngx + ngy * ngy)); - - /* Clear the canvas only if the clearCanvas is set, - if not, update the grid to the current canvas state */ - grid = []; - - var gx, gy, i; - if (!canvas.getContext || settings.clearCanvas) { - elements.forEach(function(el) { - if (el.getContext) { - var ctx = el.getContext('2d'); - ctx.fillStyle = settings.backgroundColor; - ctx.clearRect(0, 0, ngx * (g + 1), ngy * (g + 1)); - ctx.fillRect(0, 0, ngx * (g + 1), ngy * (g + 1)); - } else { - el.textContent = ''; - el.style.backgroundColor = settings.backgroundColor; - el.style.position = 'relative'; - } - }); - - /* fill the grid with empty state */ - gx = ngx; - while (gx--) { - grid[gx] = []; - gy = ngy; - while (gy--) { - grid[gx][gy] = true; - } - } + changeValue(nextValue); + event.preventDefault(); + } else if (keyCode === KeyCode/* default.RIGHT */.Z.RIGHT && nextValue > 0 && reverse) { + if (allowHalf) { + nextValue -= 0.5; } else { - /* Determine bgPixel by creating - another canvas and fill the specified background color. */ - var bctx = document.createElement('canvas').getContext('2d'); - - bctx.fillStyle = settings.backgroundColor; - bctx.fillRect(0, 0, 1, 1); - var bgPixel = bctx.getImageData(0, 0, 1, 1).data; - - /* Read back the pixels of the canvas we got to tell which part of the - canvas is empty. - (no clearCanvas only works with a canvas, not divs) */ - var imageData = - canvas.getContext('2d').getImageData(0, 0, ngx * g, ngy * g).data; - - gx = ngx; - var x, y; - while (gx--) { - grid[gx] = []; - gy = ngy; - while (gy--) { - y = g; - singleGridLoop: while (y--) { - x = g; - while (x--) { - i = 4; - while (i--) { - if (imageData[((gy * g + y) * ngx * g + - (gx * g + x)) * 4 + i] !== bgPixel[i]) { - grid[gx][gy] = false; - break singleGridLoop; - } - } - } - } - if (grid[gx][gy] !== false) { - grid[gx][gy] = true; - } - } - } - - imageData = bctx = bgPixel = undefined; - } - - // fill the infoGrid with empty state if we need it - if (settings.hover || settings.click) { - - interactive = true; - - /* fill the grid with empty state */ - gx = ngx + 1; - while (gx--) { - infoGrid[gx] = []; - } - - if (settings.hover) { - canvas.addEventListener('mousemove', wordcloudhover); - } - - if (settings.click) { - canvas.addEventListener('click', wordcloudclick); - canvas.addEventListener('touchstart', wordcloudclick); - canvas.addEventListener('touchend', function (e) { - e.preventDefault(); - }); - canvas.style.webkitTapHighlightColor = 'rgba(0, 0, 0, 0)'; - } - - canvas.addEventListener('wordcloudstart', function stopInteraction() { - canvas.removeEventListener('wordcloudstart', stopInteraction); - - canvas.removeEventListener('mousemove', wordcloudhover); - canvas.removeEventListener('click', wordcloudclick); - hovered = undefined; - }); + nextValue -= 1; } - - i = 0; - var loopingFunction, stoppingFunction; - if (settings.wait !== 0) { - loopingFunction = window.setTimeout; - stoppingFunction = window.clearTimeout; + changeValue(nextValue); + event.preventDefault(); + } else if (keyCode === KeyCode/* default.LEFT */.Z.LEFT && nextValue < count && reverse) { + if (allowHalf) { + nextValue += 0.5; } else { - loopingFunction = window.setImmediate; - stoppingFunction = window.clearImmediate; + nextValue += 1; } - - var addEventListener = function addEventListener(type, listener) { - elements.forEach(function(el) { - el.addEventListener(type, listener); - }, this); - }; - - var removeEventListener = function removeEventListener(type, listener) { - elements.forEach(function(el) { - el.removeEventListener(type, listener); - }, this); - }; - - var anotherWordCloudStart = function anotherWordCloudStart() { - removeEventListener('wordcloudstart', anotherWordCloudStart); - stoppingFunction(timer); - }; - - addEventListener('wordcloudstart', anotherWordCloudStart); - - var timer = loopingFunction(function loop() { - if (i >= settings.list.length) { - stoppingFunction(timer); - sendEvent('wordcloudstop', false); - removeEventListener('wordcloudstart', anotherWordCloudStart); - - return; - } - escapeTime = (new Date()).getTime(); - var drawn = putWord(settings.list[i]); - var canceled = !sendEvent('wordclouddrawn', true, { - item: settings.list[i], drawn: drawn }); - if (exceedTime() || canceled) { - stoppingFunction(timer); - settings.abort(); - sendEvent('wordcloudabort', false); - sendEvent('wordcloudstop', false); - removeEventListener('wordcloudstart', anotherWordCloudStart); - return; - } - i++; - timer = loopingFunction(loop, settings.wait); - }, settings.wait); - }; - - // All set, start the drawing - start(); + changeValue(nextValue); + event.preventDefault(); + } + onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event); }; - - WordCloud.isSupported = isSupported; - WordCloud.minFontSize = minFontSize; - - // Expose the library as an AMD module - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { return WordCloud; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -})(this); //jshint ignore:line - -/***/ }), - -/***/ 88157: -/*!*********************************************************!*\ - !*** ./node_modules/echarts-wordcloud/src/wordCloud.js ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var echarts = __webpack_require__(/*! echarts/lib/echarts */ 70492); -var layoutUtil = __webpack_require__(/*! echarts/lib/util/layout */ 76172); - -__webpack_require__(/*! ./WordCloudSeries */ 50024); -__webpack_require__(/*! ./WordCloudView */ 40885); - -var wordCloudLayoutHelper = __webpack_require__(/*! ./layout */ 62255); - -if (!wordCloudLayoutHelper.isSupported) { - throw new Error('Sorry your browser not support wordCloud'); + // =========================== Effect =========================== + react.useEffect(function () { + if (autoFocus && !disabled) { + triggerFocus(); + } + }, []); + // =========================== Render =========================== + // >>> Star + var starNodes = new Array(count).fill(0).map(function (item, index) { + return /*#__PURE__*/react.createElement(es_Star, { + ref: setStarRef(index), + index: index, + count: count, + disabled: disabled, + prefixCls: "".concat(prefixCls, "-star"), + allowHalf: allowHalf, + value: hoverValue === null ? value : hoverValue, + onClick: onClick, + onHover: onHover, + key: item || index, + character: character, + characterRender: characterRender, + focused: focused + }); + }); + var classString = classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames)); + // >>> Node + return /*#__PURE__*/react.createElement("ul", (0,esm_extends/* default */.Z)({ + className: classString, + onMouseLeave: onMouseLeaveCallback, + tabIndex: disabled ? -1 : tabIndex, + onFocus: disabled ? null : onInternalFocus, + onBlur: disabled ? null : onInternalBlur, + onKeyDown: disabled ? null : onInternalKeyDown, + ref: rateRef, + role: "radiogroup" + }, (0,pickAttrs/* default */.Z)(restProps, { + aria: true, + data: true, + attr: true + })), starNodes); } +/* harmony default export */ var es_Rate = (/*#__PURE__*/react.forwardRef(Rate)); +;// CONCATENATED MODULE: ./node_modules/rc-rate/es/index.js -// https://github.com/timdream/wordcloud2.js/blob/c236bee60436e048949f9becc4f0f67bd832dc5c/index.js#L233 -function updateCanvasMask(maskCanvas) { - var ctx = maskCanvas.getContext('2d'); - var imageData = ctx.getImageData( - 0, 0, maskCanvas.width, maskCanvas.height); - var newImageData = ctx.createImageData(imageData); - - var toneSum = 0; - var toneCnt = 0; - for (var i = 0; i < imageData.data.length; i += 4) { - var alpha = imageData.data[i + 3]; - if (alpha > 128) { - var tone = imageData.data[i] - + imageData.data[i + 1] - + imageData.data[i + 2]; - toneSum += tone; - ++toneCnt; - } - } - var threshold = toneSum / toneCnt; +/* harmony default export */ var es = (es_Rate); +// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js +var context = __webpack_require__(53124); +// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules +var tooltip = __webpack_require__(83062); +// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js +var style = __webpack_require__(14747); +// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js +var genComponentStyleHook = __webpack_require__(67968); +// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js +var statistic = __webpack_require__(45503); +;// CONCATENATED MODULE: ./node_modules/antd/es/rate/style/index.js - for (var i = 0; i < imageData.data.length; i += 4) { - var tone = imageData.data[i] - + imageData.data[i + 1] - + imageData.data[i + 2]; - var alpha = imageData.data[i + 3]; - if (alpha < 128 || tone > threshold) { - // Area not to draw - newImageData.data[i] = 0; - newImageData.data[i + 1] = 0; - newImageData.data[i + 2] = 0; - newImageData.data[i + 3] = 0; +const genRateStarStyle = token => { + const { + componentCls + } = token; + return { + [`${componentCls}-star`]: { + position: 'relative', + display: 'inline-block', + color: 'inherit', + cursor: 'pointer', + '&:not(:last-child)': { + marginInlineEnd: token.marginXS + }, + '> div': { + transition: `all ${token.motionDurationMid}, outline 0s`, + '&:hover': { + transform: token.starHoverScale + }, + '&:focus': { + outline: 0 + }, + '&:focus-visible': { + outline: `${token.lineWidth}px dashed ${token.starColor}`, + transform: token.starHoverScale } - else { - // Area to draw - // The color must be same with backgroundColor - newImageData.data[i] = 255; - newImageData.data[i + 1] = 255; - newImageData.data[i + 2] = 255; - newImageData.data[i + 3] = 255; + }, + '&-first, &-second': { + color: token.starBg, + transition: `all ${token.motionDurationMid}`, + userSelect: 'none', + [token.iconCls]: { + verticalAlign: 'middle' } + }, + '&-first': { + position: 'absolute', + top: 0, + insetInlineStart: 0, + width: '50%', + height: '100%', + overflow: 'hidden', + opacity: 0 + }, + [`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: { + opacity: 1 + }, + [`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: { + color: 'inherit' + } } - - ctx.putImageData(newImageData, 0, 0); -} - -echarts.registerLayout(function (ecModel, api) { - ecModel.eachSeriesByType('wordCloud', function (seriesModel) { - var gridRect = layoutUtil.getLayoutRect( - seriesModel.getBoxLayoutParams(), { - width: api.getWidth(), - height: api.getHeight() - } - ); - var data = seriesModel.getData(); - - var canvas = document.createElement('canvas'); - canvas.width = gridRect.width; - canvas.height = gridRect.height; - - var ctx = canvas.getContext('2d'); - var maskImage = seriesModel.get('maskImage'); - if (maskImage) { - try { - ctx.drawImage(maskImage, 0, 0, canvas.width, canvas.height); - updateCanvasMask(canvas); - } - catch (e) { - console.error('Invalid mask image'); - console.error(e.toString()); - } - } - - var sizeRange = seriesModel.get('sizeRange'); - var rotationRange = seriesModel.get('rotationRange'); - var valueExtent = data.getDataExtent('value'); - - var DEGREE_TO_RAD = Math.PI / 180; - var gridSize = seriesModel.get('gridSize'); - wordCloudLayoutHelper(canvas, { - list: data.mapArray('value', function (value, idx) { - var itemModel = data.getItemModel(idx); - return [ - data.getName(idx), - itemModel.get('textStyle.normal.textSize', true) - || echarts.number.linearMap(value, valueExtent, sizeRange), - idx - ]; - }).sort(function (a, b) { - // Sort from large to small in case there is no more room for more words - return b[1] - a[1]; - }), - fontFamily: seriesModel.get('textStyle.normal.fontFamily') - || seriesModel.get('textStyle.emphasis.fontFamily') - || ecModel.get('textStyle.fontFamily'), - fontWeight: seriesModel.get('textStyle.normal.fontWeight') - || seriesModel.get('textStyle.emphasis.fontWeight') - || ecModel.get('textStyle.fontWeight'), - gridSize: gridSize, - - ellipticity: gridRect.height / gridRect.width, - - minRotation: rotationRange[0] * DEGREE_TO_RAD, - maxRotation: rotationRange[1] * DEGREE_TO_RAD, - - clearCanvas: !maskImage, - - rotateRatio: 1, - - rotationStep: seriesModel.get('rotationStep') * DEGREE_TO_RAD, - - drawOutOfBound: seriesModel.get('drawOutOfBound'), - - shuffle: false, - - shape: seriesModel.get('shape') - }); - - function onWordCloudDrawn(e) { - var item = e.detail.item; - if (e.detail.drawn && seriesModel.layoutInstance.ondraw) { - e.detail.drawn.gx += gridRect.x / gridSize; - e.detail.drawn.gy += gridRect.y / gridSize; - seriesModel.layoutInstance.ondraw( - item[0], item[1], item[2], e.detail.drawn - ); - } + }; +}; +const genRateRtlStyle = token => ({ + [`&-rtl${token.componentCls}`]: { + direction: 'rtl' + } +}); +const genRateStyle = token => { + const { + componentCls + } = token; + return { + [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { + display: 'inline-block', + margin: 0, + padding: 0, + color: token.starColor, + fontSize: token.starSize, + lineHeight: 'unset', + listStyle: 'none', + outline: 'none', + // disable styles + [`&-disabled${componentCls} ${componentCls}-star`]: { + cursor: 'default', + '> div:hover': { + transform: 'scale(1)' } + } + }), genRateStarStyle(token)), { + // text styles + [`+ ${componentCls}-text`]: { + display: 'inline-block', + marginInlineStart: token.marginXS, + fontSize: token.fontSize + } + }), genRateRtlStyle(token)) + }; +}; +// ============================== Export ============================== +/* harmony default export */ var rate_style = ((0,genComponentStyleHook/* default */.Z)('Rate', token => { + const rateToken = (0,statistic/* merge */.TS)(token, {}); + return [genRateStyle(rateToken)]; +}, token => ({ + starColor: token.yellow6, + starSize: token.controlHeightLG * 0.5, + starHoverScale: 'scale(1.1)', + starBg: token.colorFillContent +}))); +;// CONCATENATED MODULE: ./node_modules/antd/es/rate/index.js +'use client'; - canvas.addEventListener('wordclouddrawn', onWordCloudDrawn); - - if (seriesModel.layoutInstance) { - // Dispose previous - seriesModel.layoutInstance.dispose(); - } +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; +}; - seriesModel.layoutInstance = { - ondraw: null, - dispose: function () { - canvas.removeEventListener('wordclouddrawn', onWordCloudDrawn); - // Abort - canvas.addEventListener('wordclouddrawn', function (e) { - // Prevent default to cancle the event and stop the loop - e.preventDefault(); - }); - } - }; - }); -}); -echarts.registerPreprocessor(function (option) { - var series = (option || {}).series; - !echarts.util.isArray(series) && (series = series ? [series] : []); - var compats = ['shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY']; - echarts.util.each(series, function (seriesItem) { - if (seriesItem && seriesItem.type === 'wordCloud') { - var textStyle = seriesItem.textStyle || {}; - compatTextStyle(textStyle.normal); - compatTextStyle(textStyle.emphasis); - } - }); - function compatTextStyle(textStyle) { - textStyle && echarts.util.each(compats, function (key) { - if (textStyle.hasOwnProperty(key)) { - textStyle['text' + echarts.format.capitalFirst(key)] = textStyle[key]; - } - }); +const rate_Rate = /*#__PURE__*/react.forwardRef((props, ref) => { + const { + prefixCls, + className, + rootClassName, + style, + tooltips, + character = /*#__PURE__*/react.createElement(icons_StarFilled, null) + } = props, + rest = __rest(props, ["prefixCls", "className", "rootClassName", "style", "tooltips", "character"]); + const characterRender = (node, _ref) => { + let { + index + } = _ref; + if (!tooltips) { + return node; } + return /*#__PURE__*/react.createElement(tooltip/* default */.Z, { + title: tooltips[index] + }, node); + }; + const { + getPrefixCls, + direction, + rate + } = react.useContext(context/* ConfigContext */.E_); + const ratePrefixCls = getPrefixCls('rate', prefixCls); + // Style + const [wrapSSR, hashId] = rate_style(ratePrefixCls); + const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style); + return wrapSSR( /*#__PURE__*/react.createElement(es, Object.assign({ + ref: ref, + character: character, + characterRender: characterRender + }, rest, { + className: classnames_default()(className, rootClassName, hashId, rate === null || rate === void 0 ? void 0 : rate.className), + style: mergedStyle, + prefixCls: ratePrefixCls, + direction: direction + }))); }); - +if (false) {} +/* harmony default export */ var rate = (rate_Rate); /***/ }), @@ -7142,508 +3548,6 @@ const TreeEdge = go.TreeEdge; const version = go.version; -/***/ }), - -/***/ 74300: -/*!***************************************************************!*\ - !*** ./node_modules/react-copy-to-clipboard/lib/Component.js ***! - \***************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.CopyToClipboard = void 0; - -var _react = _interopRequireDefault(__webpack_require__(/*! react */ 67294)); - -var _copyToClipboard = _interopRequireDefault(__webpack_require__(/*! copy-to-clipboard */ 20640)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } - -function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -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; } - -var CopyToClipboard = -/*#__PURE__*/ -function (_React$PureComponent) { - _inherits(CopyToClipboard, _React$PureComponent); - - function CopyToClipboard() { - var _getPrototypeOf2; - - var _this; - - _classCallCheck(this, CopyToClipboard); - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args))); - - _defineProperty(_assertThisInitialized(_this), "onClick", function (event) { - var _this$props = _this.props, - text = _this$props.text, - onCopy = _this$props.onCopy, - children = _this$props.children, - options = _this$props.options; - - var elem = _react["default"].Children.only(children); - - var result = (0, _copyToClipboard["default"])(text, options); - - if (onCopy) { - onCopy(text, result); - } // Bypass onClick if it was present - - - if (elem && elem.props && typeof elem.props.onClick === 'function') { - elem.props.onClick(event); - } - }); - - return _this; - } - - _createClass(CopyToClipboard, [{ - key: "render", - value: function render() { - var _this$props2 = this.props, - _text = _this$props2.text, - _onCopy = _this$props2.onCopy, - _options = _this$props2.options, - children = _this$props2.children, - props = _objectWithoutProperties(_this$props2, ["text", "onCopy", "options", "children"]); - - var elem = _react["default"].Children.only(children); - - return _react["default"].cloneElement(elem, _objectSpread({}, props, { - onClick: this.onClick - })); - } - }]); - - return CopyToClipboard; -}(_react["default"].PureComponent); - -exports.CopyToClipboard = CopyToClipboard; - -_defineProperty(CopyToClipboard, "defaultProps", { - onCopy: undefined, - options: undefined -}); - -/***/ }), - -/***/ 74855: -/*!***********************************************************!*\ - !*** ./node_modules/react-copy-to-clipboard/lib/index.js ***! - \***********************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var _require = __webpack_require__(/*! ./Component */ 74300), - CopyToClipboard = _require.CopyToClipboard; - -CopyToClipboard.CopyToClipboard = CopyToClipboard; -module.exports = CopyToClipboard; - -/***/ }), - -/***/ 57761: -/*!*********************************************************************!*\ - !*** ./node_modules/react-infinite-scroller/dist/InfiniteScroll.js ***! - \*********************************************************************/ -/***/ (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__(/*! react */ 67294); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(/*! prop-types */ 45697); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -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 InfiniteScroll = function (_Component) { - _inherits(InfiniteScroll, _Component); - - function InfiniteScroll(props) { - _classCallCheck(this, InfiniteScroll); - - var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props)); - - _this.scrollListener = _this.scrollListener.bind(_this); - _this.eventListenerOptions = _this.eventListenerOptions.bind(_this); - _this.mousewheelListener = _this.mousewheelListener.bind(_this); - return _this; - } - - _createClass(InfiniteScroll, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.pageLoaded = this.props.pageStart; - this.options = this.eventListenerOptions(); - this.attachScrollListener(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - if (this.props.isReverse && this.loadMore) { - var parentElement = this.getParentElement(this.scrollComponent); - parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop; - this.loadMore = false; - } - this.attachScrollListener(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.detachScrollListener(); - this.detachMousewheelListener(); - } - }, { - key: 'isPassiveSupported', - value: function isPassiveSupported() { - var passive = false; - - var testOptions = { - get passive() { - passive = true; - } - }; - - try { - document.addEventListener('test', null, testOptions); - document.removeEventListener('test', null, testOptions); - } catch (e) { - // ignore - } - return passive; - } - }, { - key: 'eventListenerOptions', - value: function eventListenerOptions() { - var options = this.props.useCapture; - - if (this.isPassiveSupported()) { - options = { - useCapture: this.props.useCapture, - passive: true - }; - } - return options; - } - - // Set a defaut loader for all your `InfiniteScroll` components - - }, { - key: 'setDefaultLoader', - value: function setDefaultLoader(loader) { - this.defaultLoader = loader; - } - }, { - key: 'detachMousewheelListener', - value: function detachMousewheelListener() { - var scrollEl = window; - if (this.props.useWindow === false) { - scrollEl = this.scrollComponent.parentNode; - } - - scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture); - } - }, { - key: 'detachScrollListener', - value: function detachScrollListener() { - var scrollEl = window; - if (this.props.useWindow === false) { - scrollEl = this.getParentElement(this.scrollComponent); - } - - scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture); - scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture); - } - }, { - key: 'getParentElement', - value: function getParentElement(el) { - var scrollParent = this.props.getScrollParent && this.props.getScrollParent(); - if (scrollParent != null) { - return scrollParent; - } - return el && el.parentNode; - } - }, { - key: 'filterProps', - value: function filterProps(props) { - return props; - } - }, { - key: 'attachScrollListener', - value: function attachScrollListener() { - var parentElement = this.getParentElement(this.scrollComponent); - - if (!this.props.hasMore || !parentElement) { - return; - } - - var scrollEl = window; - if (this.props.useWindow === false) { - scrollEl = parentElement; - } - - scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture); - scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture); - scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture); - - if (this.props.initialLoad) { - this.scrollListener(); - } - } - }, { - key: 'mousewheelListener', - value: function mousewheelListener(e) { - // Prevents Chrome hangups - // See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257 - if (e.deltaY === 1 && !this.isPassiveSupported()) { - e.preventDefault(); - } - } - }, { - key: 'scrollListener', - value: function scrollListener() { - var el = this.scrollComponent; - var scrollEl = window; - var parentNode = this.getParentElement(el); - - var offset = void 0; - if (this.props.useWindow) { - var doc = document.documentElement || document.body.parentNode || document.body; - var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop; - if (this.props.isReverse) { - offset = scrollTop; - } else { - offset = this.calculateOffset(el, scrollTop); - } - } else if (this.props.isReverse) { - offset = parentNode.scrollTop; - } else { - offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight; - } - - // Here we make sure the element is visible as well as checking the offset - if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) { - this.detachScrollListener(); - this.beforeScrollHeight = parentNode.scrollHeight; - this.beforeScrollTop = parentNode.scrollTop; - // Call loadMore after detachScrollListener to allow for non-async loadMore functions - if (typeof this.props.loadMore === 'function') { - this.props.loadMore(this.pageLoaded += 1); - this.loadMore = true; - } - } - } - }, { - key: 'calculateOffset', - value: function calculateOffset(el, scrollTop) { - if (!el) { - return 0; - } - - return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight); - } - }, { - key: 'calculateTopPosition', - value: function calculateTopPosition(el) { - if (!el) { - return 0; - } - return el.offsetTop + this.calculateTopPosition(el.offsetParent); - } - }, { - key: 'render', - value: function render() { - var _this2 = this; - - var renderProps = this.filterProps(this.props); - - var children = renderProps.children, - element = renderProps.element, - hasMore = renderProps.hasMore, - initialLoad = renderProps.initialLoad, - isReverse = renderProps.isReverse, - loader = renderProps.loader, - loadMore = renderProps.loadMore, - pageStart = renderProps.pageStart, - ref = renderProps.ref, - threshold = renderProps.threshold, - useCapture = renderProps.useCapture, - useWindow = renderProps.useWindow, - getScrollParent = renderProps.getScrollParent, - props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']); - - props.ref = function (node) { - _this2.scrollComponent = node; - if (ref) { - ref(node); - } - }; - - var childrenArray = [children]; - if (hasMore) { - if (loader) { - isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader); - } else if (this.defaultLoader) { - isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader); - } - } - return _react2.default.createElement(element, props, childrenArray); - } - }]); - - return InfiniteScroll; -}(_react.Component); - -InfiniteScroll.propTypes = { - children: _propTypes2.default.node.isRequired, - element: _propTypes2.default.node, - hasMore: _propTypes2.default.bool, - initialLoad: _propTypes2.default.bool, - isReverse: _propTypes2.default.bool, - loader: _propTypes2.default.node, - loadMore: _propTypes2.default.func.isRequired, - pageStart: _propTypes2.default.number, - ref: _propTypes2.default.func, - getScrollParent: _propTypes2.default.func, - threshold: _propTypes2.default.number, - useCapture: _propTypes2.default.bool, - useWindow: _propTypes2.default.bool -}; -InfiniteScroll.defaultProps = { - element: 'div', - hasMore: false, - initialLoad: true, - pageStart: 0, - ref: null, - threshold: 250, - useWindow: true, - isReverse: false, - useCapture: false, - loader: null, - getScrollParent: null -}; -exports["default"] = InfiniteScroll; -module.exports = exports['default']; - - -/***/ }), - -/***/ 246: -/*!*******************************************************!*\ - !*** ./node_modules/react-infinite-scroller/index.js ***! - \*******************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -module.exports = __webpack_require__(/*! ./dist/InfiniteScroll */ 57761) - - -/***/ }), - -/***/ 11742: -/*!************************************************!*\ - !*** ./node_modules/toggle-selection/index.js ***! - \************************************************/ -/***/ (function(module) { - - -module.exports = function () { - var selection = document.getSelection(); - if (!selection.rangeCount) { - return function () {}; - } - var active = document.activeElement; - - var ranges = []; - for (var i = 0; i < selection.rangeCount; i++) { - ranges.push(selection.getRangeAt(i)); - } - - switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML - case 'INPUT': - case 'TEXTAREA': - active.blur(); - break; - - default: - active = null; - break; - } - - selection.removeAllRanges(); - return function () { - selection.type === 'Caret' && - selection.removeAllRanges(); - - if (!selection.rangeCount) { - ranges.forEach(function(range) { - selection.addRange(range); - }); - } - - active && - active.focus(); - }; -}; - - /***/ }), /***/ 41588: diff --git a/79084.async.js b/79084.async.js index 4851ec14a7..8a018c7180 100644 --- a/79084.async.js +++ b/79084.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[79084,12750],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[79084,94657],{ /***/ 11475: /*!******************************************************************************************!*\ diff --git a/81661.async.js b/81661.async.js index eb96a1aab8..e7eae8e735 100644 --- a/81661.async.js +++ b/81661.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[81661,59606,2441,75650,18117,57942,95002,79084,93691,11328,58447,77075,94657,89494,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[81661,59606,2441,75650,18117,57942,95002,79084,93691,11328,58447,77075,89494,94657,64649,33893,9277,54682,68282],{ /***/ 11475: /*!******************************************************************************************!*\ diff --git a/878.async.js b/878.async.js index 453ec8c7e9..5007881050 100644 --- a/878.async.js +++ b/878.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[878,59606,72029,2557,75650,93691,11328,58447,77075,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[878,59606,72029,2557,75650,93691,11328,58447,77075,94657,64649,33893,9277,54682,68282],{ /***/ 77171: /*!**********************************************************************************!*\ diff --git a/93691.async.js b/93691.async.js index 9d45a4742c..d651097e18 100644 --- a/93691.async.js +++ b/93691.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[93691,59606,11328,58447,77075,94657,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[93691,59606,11328,58447,77075,94657,64649,33893,9277,54682,68282],{ /***/ 85418: /*!************************************************************!*\ diff --git a/94657.async.js b/94657.async.js index a72e587488..44e0e69602 100644 --- a/94657.async.js +++ b/94657.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[94657,59606,93691,11328,58447,77075,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[94657],{ /***/ 85418: /*!************************************************************!*\ @@ -743,65 +743,6 @@ const rate_Rate = /*#__PURE__*/react.forwardRef((props, ref) => { if (false) {} /* harmony default export */ var rate = (rate_Rate); -/***/ }), - -/***/ 64217: -/*!**********************************************!*\ - !*** ./node_modules/rc-util/es/pickAttrs.js ***! - \**********************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "Z": function() { return /* binding */ pickAttrs; } -/* harmony export */ }); -/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413); - -var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"; -var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError"; -var propList = "".concat(attributes, " ").concat(eventsName).split(/[\s\n]+/); - -/* eslint-enable max-len */ -var ariaPrefix = 'aria-'; -var dataPrefix = 'data-'; -function match(key, prefix) { - return key.indexOf(prefix) === 0; -} -/** - * Picker props from exist props with filter - * @param props Passed props - * @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config - */ -function pickAttrs(props) { - var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var mergedConfig; - if (ariaOnly === false) { - mergedConfig = { - aria: true, - data: true, - attr: true - }; - } else if (ariaOnly === true) { - mergedConfig = { - aria: true - }; - } else { - mergedConfig = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, ariaOnly); - } - var attrs = {}; - Object.keys(props).forEach(function (key) { - if ( - // Aria - mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) || - // Data - mergedConfig.data && match(key, dataPrefix) || - // Attr - mergedConfig.attr && propList.includes(key)) { - attrs[key] = props[key]; - } - }); - return attrs; -} - /***/ }) }]); \ No newline at end of file diff --git a/95002.async.js b/95002.async.js index 056f56e051..1fa2e912ce 100644 --- a/95002.async.js +++ b/95002.async.js @@ -1,5 +1,5 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[95002,59606,18117,57942,79084,93691,11328,58447,77075,94657,89494,12750,64649,33893,9277,54682,68282],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[95002,59606,18117,57942,79084,93691,11328,58447,77075,89494,94657,64649,33893,9277,54682,68282],{ /***/ 11475: /*!******************************************************************************************!*\ diff --git a/p__Paths__Detail__id.async.js b/p__Paths__Detail__id.async.js index fded74e024..a08a2a760d 100644 --- a/p__Paths__Detail__id.async.js +++ b/p__Paths__Detail__id.async.js @@ -18883,6 +18883,9 @@ var knowledge_Atlas = function Atlas(_ref) { centered: true, onCancel: function onCancel() { setshowadd(false); + form.setFieldsValue({ + relation: null + }); }, okButtonProps: { loading: buttonloading @@ -18910,6 +18913,9 @@ var knowledge_Atlas = function Atlas(_ref) { res = _context15.sent; setbuttonloading(false); if (res.status === 0) { + form.setFieldsValue({ + relation: null + }); message/* default.info */.ZP.info('关联成功'); getdatas(); setAddModal(''); diff --git a/p__virtualSpaces__Lists__Knowledge__index.async.js b/p__virtualSpaces__Lists__Knowledge__index.async.js index fa42307fa0..b3844af445 100644 --- a/p__virtualSpaces__Lists__Knowledge__index.async.js +++ b/p__virtualSpaces__Lists__Knowledge__index.async.js @@ -1,9 +1,3588 @@ "use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[38447],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[38447,12768,66390,11030],{ -/***/ 47447: +/***/ 96403: +/*!*********************************!*\ + !*** ./src/pages/tasks/util.js ***! + \*********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Ax": function() { return /* binding */ processTreeData; }, +/* harmony export */ "Ds": function() { return /* binding */ debounce; }, +/* harmony export */ "KI": function() { return /* binding */ apiPref; }, +/* harmony export */ "SI": function() { return /* binding */ getTreeData; }, +/* harmony export */ "f1": function() { return /* binding */ isCompileOk; } +/* harmony export */ }); +/* unused harmony export isProd */ +/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/env */ 59758); + +function isCompileOk(rs) { + var flag = true; + if (rs.length > 0) { + for (var i = 0; i < rs.length; i++) { + if (rs[i].compile_success == 0 || !rs[i].compile_success) { + flag = false; + break; + } + } + } else { + flag = false; + } + return flag; +} +function getTreeData(data) { + var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + var result = []; + for (var i = 0; i < data.length; i++) { + var item = data[i]; + var key = parentKey ? "".concat(parentKey, "/").concat(item.name) : "".concat(item.name); + result.push({ + title: item.name, + isLeaf: item.type === 'tree' ? false : true, + key: key + }); + } + return result; +} +function processTreeData(repos, key, newData) { + for (var i = 0; i < repos.length; i++) { + var item = repos[i]; + if (item.key === key) { + item.children = newData; + break; + } + if (item.children) { + processTreeData(item.children, key, newData); + } + } + return repos; +} +function debounce(func, wait, immediate) { + var timeout; + return function () { + var context = this, + args = arguments; + 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); + }; +} +var isProd = true; +var apiPref = _utils_env__WEBPACK_IMPORTED_MODULE_0__/* ["default"].API_SERVER */ .Z.API_SERVER; +// export const isProd = +// window.location.href.indexOf('test-') > 0 || +// window.location.href.indexOf('localhost') > 0 +// ? false +// : true; + +// export const apiPref = isProd +// ? 'https://www.educoder.net' +// : 'https://test-newweb.educoder.net'; + +/***/ }), + +/***/ 82982: +/*!*****************************************!*\ + !*** ./src/components/NoData/index.tsx ***! + \*****************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122); +/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294); +/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 71577); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 85893); + + + + + + +var noData = function noData(_ref) { + var img = _ref.img, + _ref$buttonProps = _ref.buttonProps, + buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps, + _ref$styles = _ref.styles, + styles = _ref$styles === void 0 ? {} : _ref$styles, + customText = _ref.customText, + ButtonText = _ref.ButtonText, + ButtonClick = _ref.ButtonClick, + Buttonclass = _ref.Buttonclass, + ButtonTwo = _ref.ButtonTwo, + imgStyles = _ref.imgStyles, + _ref$loading = _ref.loading, + loading = _ref$loading === void 0 ? false : _ref$loading; + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", { + className: "tc animated fadeIn", + style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, { + color: '#999', + margin: '100px auto', + visibility: loading ? 'hidden' : 'visible' + }), styles), + children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", { + src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__, + style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles) + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { + className: "mt20 font14", + children: customText || '暂时还没有相关数据哦!' + }), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({ + className: Buttonclass, + onClick: ButtonClick + }, buttonProps), {}, { + children: ButtonText + })), ButtonTwo && ButtonTwo] + }); +}; +/* harmony default export */ __webpack_exports__["Z"] = (noData); + +/***/ }), + +/***/ 36579: +/*!*********************************************************!*\ + !*** ./src/components/PreviewAll/index.tsx + 1 modules ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ PreviewAll; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js +var objectSpread2 = __webpack_require__(42122); +var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js +var regeneratorRuntime = __webpack_require__(17061); +var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js +var asyncToGenerator = __webpack_require__(17156); +var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(27424); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules +// extracted by mini-css-extract-plugin +/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"}); +// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js +var es_button = __webpack_require__(71577); +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules +var ArrowDownOutlined = __webpack_require__(77171); +// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules +var monaco_editor = __webpack_require__(8691); +// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules +var tooltip = __webpack_require__(83062); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(29427); +// EXTERNAL MODULE: ./src/service/exercise.ts +var exercise = __webpack_require__(51412); +// EXTERNAL MODULE: ./src/components/NoData/index.tsx +var NoData = __webpack_require__(82982); +// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules +var env = __webpack_require__(59758); +// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js +var jsx_runtime = __webpack_require__(85893); +;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx + + + + + + + + + + + + + + + + + +/* harmony default export */ var PreviewAll = (function (_ref) { + var _data, _data2, _data3, _data4, _data5, _data6; + var _ref$editOffice = _ref.editOffice, + editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice, + data = _ref.data, + theme = _ref.theme, + type = _ref.type, + filename = _ref.filename, + monacoEditor = _ref.monacoEditor, + className = _ref.className, + style = _ref.style, + close = _ref.close, + onClose = _ref.onClose, + hasMask = _ref.hasMask, + disabledDownload = _ref.disabledDownload, + onImgDimensions = _ref.onImgDimensions, + showNodata = _ref.showNodata; + var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'), + _useState2 = slicedToArray_default()(_useState, 2), + src = _useState2[0], + setSrc = _useState2[1]; + var _useState3 = (0,react.useState)(""), + _useState4 = slicedToArray_default()(_useState3, 2), + token = _useState4[0], + setToken = _useState4[1]; + var _useState5 = (0,react.useState)(), + _useState6 = slicedToArray_default()(_useState5, 2), + officeData = _useState6[0], + setOfficeData = _useState6[1]; + var officePath = window.ENV === "build" ? "/react/build" : ""; + var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER; + // let size; + var unit = 1024 * 1024; + var maxSize = 10 * unit; + var closeRef = (0,react.useRef)(); + if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") { + data = env/* default.API_SERVER */.Z.API_SERVER + data; + } + // if (type === "office") { + // size = parseUrl(data).filesize + // if (size > maxSize) { + // type = "other" + // } + // } + if (filename) monacoEditor.filename = filename; + (0,react.useEffect)(function () { + var _document$cookie, _document$cookie$repl; + var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";"); + cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) { + var i = item.split("="); + if (i[0] === '_educoder_session') { + setToken(i[1]); + } + }); + }, []); + (0,react.useEffect)(function () { + if (type === "office") getData(); + }, [type, data]); + var getData = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var _url, _id, res; + return regeneratorRuntime_default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + console.log("data:", data); + _url = data; + if (!data.startsWith("http")) { + _url = location.origin + _url; + } + _id = new URL(_url).pathname.split("/").pop(); + _context.next = 6; + return (0,exercise/* setEcsAttachment */.gJ)({ + attachment_id: _id + }); + case 6: + res = _context.sent; + setOfficeData(res); + case 8: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function getData() { + return _ref2.apply(this, arguments); + }; + }(); + var handleClick = function handleClick() { + if (data.startsWith("http") || data.startsWith('blob:')) { + handleDown(); + return; + } + (0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename); + }; + var handleDown = function handleDown() { + (0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data)); + }; + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + style: objectSpread2_default()({}, style || {}), + className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"), + children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: PreviewAllmodules.close, + ref: closeRef, + children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { + title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8", + getPopupContainer: function getPopupContainer() { + return closeRef.current; + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + onClick: function onClick() { + onClose(); + onImgDimensions(); + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "icon-yulanpizhu" + }) + }) + }), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { + title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6", + getPopupContainer: function getPopupContainer() { + return closeRef.current; + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + onClick: handleDown, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "icon-quxiaozhiding" + }) + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { + title: "\u5173\u95ED", + getPopupContainer: function getPopupContainer() { + return closeRef.current; + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "", + onClick: onClose, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "icon-guanbi1" + }) + }) + })] + }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"), + children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor)) + }), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", { + src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data), + autoPlay: true + }), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", { + controls: true, + src: "".concat(data), + autoPlay: true + }) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", { + controls: true, + src: "data:video/mp4;base64,".concat(data), + autoPlay: true + }) + }), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { + src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload) + }), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { + src: data + '&disposition=inline' + }), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { + src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload) + }) // + , type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", { + src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data) + }), (type === "other" || type === "download") && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: showNodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, { + customText: "\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B", + ButtonTwo: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { + icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-xiazai4 font14" + }), + type: "primary", + size: 'middle', + onClick: handleClick, + children: "\u4E0B\u8F7D" + }) + }) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, { + type: "primary", + size: 'middle', + onClick: handleClick, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"] + }) + })] + }); +}); + +/***/ }), + +/***/ 12768: +/*!*********************************************************!*\ + !*** ./src/components/RenderHtml/index.tsx + 1 modules ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ RenderHtml; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js +var objectSpread2 = __webpack_require__(42122); +var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(27424); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css +var katex_min = __webpack_require__(81897); +// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js +var marked = __webpack_require__(47084); +var marked_default = /*#__PURE__*/__webpack_require__.n(marked); +// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js +var helpers = __webpack_require__(90621); +;// CONCATENATED MODULE: ./src/utils/marked.ts + + + +function indentCodeCompensation(raw, text) { + var matchIndentToCode = raw.match(/^(\s+)(?:```)/); + if (matchIndentToCode === null) { + return text; + } + var indentToCode = matchIndentToCode[1]; + return text.split('\n').map(function (node) { + var matchIndentInNode = node.match(/^\s+/); + if (matchIndentInNode === null) { + return node; + } + var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1), + indentInNode = _matchIndentInNode[0]; + if (indentInNode.length >= indentToCode.length) { + return node.slice(indentToCode.length); + } + return node; + }).join('\n'); +} +//兼容之前的 ##标题式写法 +var toc = []; +var ctx = ["