diff --git a/63240.async.js b/11392.async.js similarity index 83% rename from 63240.async.js rename to 11392.async.js index bc9c68652e..df428b9d2c 100644 --- a/63240.async.js +++ b/11392.async.js @@ -1,4 +1,4 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[63240,37825,43428,49127,28163,78892],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[11392,43428,49127,28163,78892],{ /***/ 43914: /*!*************************************************************************************************************!*\ @@ -3233,913 +3233,6 @@ const genWireframeStyle = token => { /***/ }), -/***/ 19479: -/*!********************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@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@7.23.4@@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(23015); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@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@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules -var AntdIcon = __webpack_require__(91851); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@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_17_0_2_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_17_0_2_react.forwardRef(StarFilled_StarFilled)); -// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js -var _classnames_2_3_2_classnames = __webpack_require__(12124); -var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(65817); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules -var slicedToArray = __webpack_require__(89561); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(83658); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/hooks/useMergedState.js -var useMergedState = __webpack_require__(84381); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/KeyCode.js -var KeyCode = __webpack_require__(84821); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/pickAttrs.js -var pickAttrs = __webpack_require__(3286); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@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 */.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_17_0_2_react.createElement("li", { - className: _classnames_2_3_2_classnames_default()(Array.from(classNameList)), - ref: ref - }, /*#__PURE__*/_react_17_0_2_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_17_0_2_react.createElement("div", { - className: "".concat(prefixCls, "-first") - }, characterNode), /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: "".concat(prefixCls, "-second") - }, characterNode))); - if (characterRender) { - start = characterRender(start, props); - } - return start; -} -/* harmony default export */ var es_Star = (/*#__PURE__*/_react_17_0_2_react.forwardRef(Star)); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/useRefs.js - -function useRefs() { - var nodeRef = _react_17_0_2_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@2.12.0@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@2.12.0@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_17_0_2_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_17_0_2_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_17_0_2_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_17_0_2_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 */.Z.RIGHT && nextValue < count && !reverse) { - if (allowHalf) { - nextValue += 0.5; - } else { - nextValue += 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.Z.LEFT && nextValue > 0 && !reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.Z.RIGHT && nextValue > 0 && reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.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_17_0_2_react.useEffect(function () { - if (autoFocus && !disabled) { - triggerFocus(); - } - }, []); - // =========================== Render =========================== - // >>> Star - var starNodes = new Array(count).fill(0).map(function (item, index) { - return /*#__PURE__*/_react_17_0_2_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_2_3_2_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_17_0_2_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_17_0_2_react.forwardRef(Rate)); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/index.js - -/* harmony default export */ var es = (es_Rate); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js -var context = __webpack_require__(36355); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules -var tooltip = __webpack_require__(6848); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js -var style = __webpack_require__(17313); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(83116); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js -var statistic = __webpack_require__(37613); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/rate/style/index.js -"use client"; - - - -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@5.9.0@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_17_0_2_react.forwardRef((props, ref) => { - const { - prefixCls, - className, - rootClassName, - style, - tooltips, - character = /*#__PURE__*/_react_17_0_2_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_17_0_2_react.createElement(tooltip/* default */.Z, { - title: tooltips[index] - }, node); - }; - const { - getPrefixCls, - direction, - rate - } = _react_17_0_2_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_17_0_2_react.createElement(es, Object.assign({ - ref: ref, - character: character, - characterRender: characterRender - }, rest, { - className: _classnames_2_3_2_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); - -/***/ }), - -/***/ 31797: -/*!*************************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@antd/es/statistic/index.js + 5 modules ***! - \*************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ es_statistic; } -}); - -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useForceUpdate.js -var useForceUpdate = __webpack_require__(56762); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js -var reactNode = __webpack_require__(92343); -// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js -var _classnames_2_3_2_classnames = __webpack_require__(12124); -var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js -var context = __webpack_require__(36355); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules -var skeleton = __webpack_require__(59981); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Number.js -"use client"; - - -const StatisticNumber = props => { - const { - value, - formatter, - precision, - decimalSeparator, - groupSeparator = '', - prefixCls - } = props; - let valueNode; - if (typeof formatter === 'function') { - // Customize formatter - valueNode = formatter(value); - } else { - // Internal formatter - const val = String(value); - const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/); - // Process if illegal number - if (!cells || val === '-') { - valueNode = val; - } else { - const negative = cells[1]; - let int = cells[2] || '0'; - let decimal = cells[4] || ''; - int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator); - if (typeof precision === 'number') { - decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0); - } - if (decimal) { - decimal = `${decimalSeparator}${decimal}`; - } - valueNode = [/*#__PURE__*/_react_17_0_2_react.createElement("span", { - key: "int", - className: `${prefixCls}-content-value-int` - }, negative, int), decimal && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - key: "decimal", - className: `${prefixCls}-content-value-decimal` - }, decimal)]; - } - } - return /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-value` - }, valueNode); -}; -/* harmony default export */ var statistic_Number = (StatisticNumber); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js -var style = __webpack_require__(17313); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(83116); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js -var statistic = __webpack_require__(37613); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/style/index.js -"use client"; - - - -const genStatisticStyle = token => { - const { - componentCls, - marginXXS, - padding, - colorTextDescription, - titleFontSize, - colorTextHeading, - contentFontSize, - fontFamily - } = token; - return { - [`${componentCls}`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { - [`${componentCls}-title`]: { - marginBottom: marginXXS, - color: colorTextDescription, - fontSize: titleFontSize - }, - [`${componentCls}-skeleton`]: { - paddingTop: padding - }, - [`${componentCls}-content`]: { - color: colorTextHeading, - fontSize: contentFontSize, - fontFamily, - [`${componentCls}-content-value`]: { - display: 'inline-block', - direction: 'ltr' - }, - [`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: { - display: 'inline-block' - }, - [`${componentCls}-content-prefix`]: { - marginInlineEnd: marginXXS - }, - [`${componentCls}-content-suffix`]: { - marginInlineStart: marginXXS - } - } - }) - }; -}; -// ============================== Export ============================== -/* harmony default export */ var statistic_style = ((0,genComponentStyleHook/* default */.Z)('Statistic', token => { - const statisticToken = (0,statistic/* merge */.TS)(token, {}); - return [genStatisticStyle(statisticToken)]; -}, token => { - const { - fontSizeHeading3, - fontSize - } = token; - return { - titleFontSize: fontSize, - contentFontSize: fontSizeHeading3 - }; -})); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Statistic.js -"use client"; - - - - - - - -const Statistic = props => { - const { - prefixCls: customizePrefixCls, - className, - rootClassName, - style, - valueStyle, - value = 0, - title, - valueRender, - prefix, - suffix, - loading = false, - onMouseEnter, - onMouseLeave, - decimalSeparator = '.', - groupSeparator = ',' - } = props; - const { - getPrefixCls, - direction, - statistic - } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); - const prefixCls = getPrefixCls('statistic', customizePrefixCls); - const [wrapSSR, hashId] = statistic_style(prefixCls); - const valueNode = /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Number, Object.assign({ - decimalSeparator: decimalSeparator, - groupSeparator: groupSeparator, - prefixCls: prefixCls - }, props, { - value: value - })); - const cls = _classnames_2_3_2_classnames_default()(prefixCls, { - [`${prefixCls}-rtl`]: direction === 'rtl' - }, statistic === null || statistic === void 0 ? void 0 : statistic.className, className, rootClassName, hashId); - return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: cls, - style: Object.assign(Object.assign({}, statistic === null || statistic === void 0 ? void 0 : statistic.style), style), - onMouseEnter: onMouseEnter, - onMouseLeave: onMouseLeave - }, title && /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: `${prefixCls}-title` - }, title), /*#__PURE__*/_react_17_0_2_react.createElement(skeleton/* default */.Z, { - paragraph: false, - loading: loading, - className: `${prefixCls}-skeleton` - }, /*#__PURE__*/_react_17_0_2_react.createElement("div", { - style: valueStyle, - className: `${prefixCls}-content` - }, prefix && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-prefix` - }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-suffix` - }, suffix))))); -}; -if (false) {} -/* harmony default export */ var statistic_Statistic = (Statistic); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/utils.js -// Countdown -const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365], ['M', 1000 * 60 * 60 * 24 * 30], ['D', 1000 * 60 * 60 * 24], ['H', 1000 * 60 * 60], ['m', 1000 * 60], ['s', 1000], ['S', 1] // million seconds -]; - -function formatTimeStr(duration, format) { - let leftDuration = duration; - const escapeRegex = /\[[^\]]*]/g; - const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1)); - const templateText = format.replace(escapeRegex, '[]'); - const replacedText = timeUnits.reduce((current, _ref) => { - let [name, unit] = _ref; - if (current.includes(name)) { - const value = Math.floor(leftDuration / unit); - leftDuration -= value * unit; - return current.replace(new RegExp(`${name}+`, 'g'), match => { - const len = match.length; - return value.toString().padStart(len, '0'); - }); - } - return current; - }, templateText); - let index = 0; - return replacedText.replace(escapeRegex, () => { - const match = keepList[index]; - index += 1; - return match; - }); -} -function formatCountdown(value, config) { - const { - format = '' - } = config; - const target = new Date(value).getTime(); - const current = Date.now(); - const diff = Math.max(target - current, 0); - return formatTimeStr(diff, format); -} -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Countdown.js -"use client"; - - - - - - -const REFRESH_INTERVAL = 1000 / 30; -function getTime(value) { - return new Date(value).getTime(); -} -const Countdown = props => { - const { - value, - format = 'HH:mm:ss', - onChange, - onFinish - } = props; - const forceUpdate = (0,useForceUpdate/* default */.Z)(); - const countdown = _react_17_0_2_react.useRef(null); - const stopTimer = () => { - onFinish === null || onFinish === void 0 ? void 0 : onFinish(); - if (countdown.current) { - clearInterval(countdown.current); - countdown.current = null; - } - }; - const syncTimer = () => { - const timestamp = getTime(value); - if (timestamp >= Date.now()) { - countdown.current = setInterval(() => { - forceUpdate(); - onChange === null || onChange === void 0 ? void 0 : onChange(timestamp - Date.now()); - if (timestamp < Date.now()) { - stopTimer(); - } - }, REFRESH_INTERVAL); - } - }; - _react_17_0_2_react.useEffect(() => { - syncTimer(); - return () => { - if (countdown.current) { - clearInterval(countdown.current); - countdown.current = null; - } - }; - }, [value]); - const formatter = (formatValue, config) => formatCountdown(formatValue, Object.assign(Object.assign({}, config), { - format - })); - const valueRender = node => (0,reactNode/* cloneElement */.Tm)(node, { - title: undefined - }); - return /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Statistic, Object.assign({}, props, { - valueRender: valueRender, - formatter: formatter - })); -}; -/* harmony default export */ var statistic_Countdown = (/*#__PURE__*/_react_17_0_2_react.memo(Countdown)); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/index.js -"use client"; - - - -statistic_Statistic.Countdown = statistic_Countdown; -/* harmony default export */ var es_statistic = (statistic_Statistic); - -/***/ }), - /***/ 78673: /*!**********************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/switch/index.js + 2 modules ***! diff --git a/80310.async.js b/15267.async.js similarity index 81% rename from 80310.async.js rename to 15267.async.js index 51df1e46be..de6dd973ce 100644 --- a/80310.async.js +++ b/15267.async.js @@ -1,4 +1,4 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[80310,37825,43428,56047],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[15267,43428,56047],{ /***/ 47104: /*!*************************************************************************************************************!*\ @@ -1433,913 +1433,6 @@ if (false) {} /***/ }), -/***/ 19479: -/*!********************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@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@7.23.4@@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(23015); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@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@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules -var AntdIcon = __webpack_require__(91851); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@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_17_0_2_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_17_0_2_react.forwardRef(StarFilled_StarFilled)); -// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js -var _classnames_2_3_2_classnames = __webpack_require__(12124); -var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(65817); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules -var slicedToArray = __webpack_require__(89561); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(83658); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/hooks/useMergedState.js -var useMergedState = __webpack_require__(84381); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/KeyCode.js -var KeyCode = __webpack_require__(84821); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/pickAttrs.js -var pickAttrs = __webpack_require__(3286); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@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 */.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_17_0_2_react.createElement("li", { - className: _classnames_2_3_2_classnames_default()(Array.from(classNameList)), - ref: ref - }, /*#__PURE__*/_react_17_0_2_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_17_0_2_react.createElement("div", { - className: "".concat(prefixCls, "-first") - }, characterNode), /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: "".concat(prefixCls, "-second") - }, characterNode))); - if (characterRender) { - start = characterRender(start, props); - } - return start; -} -/* harmony default export */ var es_Star = (/*#__PURE__*/_react_17_0_2_react.forwardRef(Star)); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/useRefs.js - -function useRefs() { - var nodeRef = _react_17_0_2_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@2.12.0@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@2.12.0@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_17_0_2_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_17_0_2_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_17_0_2_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_17_0_2_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 */.Z.RIGHT && nextValue < count && !reverse) { - if (allowHalf) { - nextValue += 0.5; - } else { - nextValue += 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.Z.LEFT && nextValue > 0 && !reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.Z.RIGHT && nextValue > 0 && reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.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_17_0_2_react.useEffect(function () { - if (autoFocus && !disabled) { - triggerFocus(); - } - }, []); - // =========================== Render =========================== - // >>> Star - var starNodes = new Array(count).fill(0).map(function (item, index) { - return /*#__PURE__*/_react_17_0_2_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_2_3_2_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_17_0_2_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_17_0_2_react.forwardRef(Rate)); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/index.js - -/* harmony default export */ var es = (es_Rate); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js -var context = __webpack_require__(36355); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules -var tooltip = __webpack_require__(6848); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js -var style = __webpack_require__(17313); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(83116); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js -var statistic = __webpack_require__(37613); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/rate/style/index.js -"use client"; - - - -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@5.9.0@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_17_0_2_react.forwardRef((props, ref) => { - const { - prefixCls, - className, - rootClassName, - style, - tooltips, - character = /*#__PURE__*/_react_17_0_2_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_17_0_2_react.createElement(tooltip/* default */.Z, { - title: tooltips[index] - }, node); - }; - const { - getPrefixCls, - direction, - rate - } = _react_17_0_2_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_17_0_2_react.createElement(es, Object.assign({ - ref: ref, - character: character, - characterRender: characterRender - }, rest, { - className: _classnames_2_3_2_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); - -/***/ }), - -/***/ 31797: -/*!*************************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@antd/es/statistic/index.js + 5 modules ***! - \*************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ es_statistic; } -}); - -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useForceUpdate.js -var useForceUpdate = __webpack_require__(56762); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js -var reactNode = __webpack_require__(92343); -// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js -var _classnames_2_3_2_classnames = __webpack_require__(12124); -var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js -var context = __webpack_require__(36355); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules -var skeleton = __webpack_require__(59981); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Number.js -"use client"; - - -const StatisticNumber = props => { - const { - value, - formatter, - precision, - decimalSeparator, - groupSeparator = '', - prefixCls - } = props; - let valueNode; - if (typeof formatter === 'function') { - // Customize formatter - valueNode = formatter(value); - } else { - // Internal formatter - const val = String(value); - const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/); - // Process if illegal number - if (!cells || val === '-') { - valueNode = val; - } else { - const negative = cells[1]; - let int = cells[2] || '0'; - let decimal = cells[4] || ''; - int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator); - if (typeof precision === 'number') { - decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0); - } - if (decimal) { - decimal = `${decimalSeparator}${decimal}`; - } - valueNode = [/*#__PURE__*/_react_17_0_2_react.createElement("span", { - key: "int", - className: `${prefixCls}-content-value-int` - }, negative, int), decimal && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - key: "decimal", - className: `${prefixCls}-content-value-decimal` - }, decimal)]; - } - } - return /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-value` - }, valueNode); -}; -/* harmony default export */ var statistic_Number = (StatisticNumber); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js -var style = __webpack_require__(17313); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(83116); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js -var statistic = __webpack_require__(37613); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/style/index.js -"use client"; - - - -const genStatisticStyle = token => { - const { - componentCls, - marginXXS, - padding, - colorTextDescription, - titleFontSize, - colorTextHeading, - contentFontSize, - fontFamily - } = token; - return { - [`${componentCls}`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { - [`${componentCls}-title`]: { - marginBottom: marginXXS, - color: colorTextDescription, - fontSize: titleFontSize - }, - [`${componentCls}-skeleton`]: { - paddingTop: padding - }, - [`${componentCls}-content`]: { - color: colorTextHeading, - fontSize: contentFontSize, - fontFamily, - [`${componentCls}-content-value`]: { - display: 'inline-block', - direction: 'ltr' - }, - [`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: { - display: 'inline-block' - }, - [`${componentCls}-content-prefix`]: { - marginInlineEnd: marginXXS - }, - [`${componentCls}-content-suffix`]: { - marginInlineStart: marginXXS - } - } - }) - }; -}; -// ============================== Export ============================== -/* harmony default export */ var statistic_style = ((0,genComponentStyleHook/* default */.Z)('Statistic', token => { - const statisticToken = (0,statistic/* merge */.TS)(token, {}); - return [genStatisticStyle(statisticToken)]; -}, token => { - const { - fontSizeHeading3, - fontSize - } = token; - return { - titleFontSize: fontSize, - contentFontSize: fontSizeHeading3 - }; -})); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Statistic.js -"use client"; - - - - - - - -const Statistic = props => { - const { - prefixCls: customizePrefixCls, - className, - rootClassName, - style, - valueStyle, - value = 0, - title, - valueRender, - prefix, - suffix, - loading = false, - onMouseEnter, - onMouseLeave, - decimalSeparator = '.', - groupSeparator = ',' - } = props; - const { - getPrefixCls, - direction, - statistic - } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); - const prefixCls = getPrefixCls('statistic', customizePrefixCls); - const [wrapSSR, hashId] = statistic_style(prefixCls); - const valueNode = /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Number, Object.assign({ - decimalSeparator: decimalSeparator, - groupSeparator: groupSeparator, - prefixCls: prefixCls - }, props, { - value: value - })); - const cls = _classnames_2_3_2_classnames_default()(prefixCls, { - [`${prefixCls}-rtl`]: direction === 'rtl' - }, statistic === null || statistic === void 0 ? void 0 : statistic.className, className, rootClassName, hashId); - return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: cls, - style: Object.assign(Object.assign({}, statistic === null || statistic === void 0 ? void 0 : statistic.style), style), - onMouseEnter: onMouseEnter, - onMouseLeave: onMouseLeave - }, title && /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: `${prefixCls}-title` - }, title), /*#__PURE__*/_react_17_0_2_react.createElement(skeleton/* default */.Z, { - paragraph: false, - loading: loading, - className: `${prefixCls}-skeleton` - }, /*#__PURE__*/_react_17_0_2_react.createElement("div", { - style: valueStyle, - className: `${prefixCls}-content` - }, prefix && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-prefix` - }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-suffix` - }, suffix))))); -}; -if (false) {} -/* harmony default export */ var statistic_Statistic = (Statistic); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/utils.js -// Countdown -const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365], ['M', 1000 * 60 * 60 * 24 * 30], ['D', 1000 * 60 * 60 * 24], ['H', 1000 * 60 * 60], ['m', 1000 * 60], ['s', 1000], ['S', 1] // million seconds -]; - -function formatTimeStr(duration, format) { - let leftDuration = duration; - const escapeRegex = /\[[^\]]*]/g; - const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1)); - const templateText = format.replace(escapeRegex, '[]'); - const replacedText = timeUnits.reduce((current, _ref) => { - let [name, unit] = _ref; - if (current.includes(name)) { - const value = Math.floor(leftDuration / unit); - leftDuration -= value * unit; - return current.replace(new RegExp(`${name}+`, 'g'), match => { - const len = match.length; - return value.toString().padStart(len, '0'); - }); - } - return current; - }, templateText); - let index = 0; - return replacedText.replace(escapeRegex, () => { - const match = keepList[index]; - index += 1; - return match; - }); -} -function formatCountdown(value, config) { - const { - format = '' - } = config; - const target = new Date(value).getTime(); - const current = Date.now(); - const diff = Math.max(target - current, 0); - return formatTimeStr(diff, format); -} -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Countdown.js -"use client"; - - - - - - -const REFRESH_INTERVAL = 1000 / 30; -function getTime(value) { - return new Date(value).getTime(); -} -const Countdown = props => { - const { - value, - format = 'HH:mm:ss', - onChange, - onFinish - } = props; - const forceUpdate = (0,useForceUpdate/* default */.Z)(); - const countdown = _react_17_0_2_react.useRef(null); - const stopTimer = () => { - onFinish === null || onFinish === void 0 ? void 0 : onFinish(); - if (countdown.current) { - clearInterval(countdown.current); - countdown.current = null; - } - }; - const syncTimer = () => { - const timestamp = getTime(value); - if (timestamp >= Date.now()) { - countdown.current = setInterval(() => { - forceUpdate(); - onChange === null || onChange === void 0 ? void 0 : onChange(timestamp - Date.now()); - if (timestamp < Date.now()) { - stopTimer(); - } - }, REFRESH_INTERVAL); - } - }; - _react_17_0_2_react.useEffect(() => { - syncTimer(); - return () => { - if (countdown.current) { - clearInterval(countdown.current); - countdown.current = null; - } - }; - }, [value]); - const formatter = (formatValue, config) => formatCountdown(formatValue, Object.assign(Object.assign({}, config), { - format - })); - const valueRender = node => (0,reactNode/* cloneElement */.Tm)(node, { - title: undefined - }); - return /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Statistic, Object.assign({}, props, { - valueRender: valueRender, - formatter: formatter - })); -}; -/* harmony default export */ var statistic_Countdown = (/*#__PURE__*/_react_17_0_2_react.memo(Countdown)); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/index.js -"use client"; - - - -statistic_Statistic.Countdown = statistic_Countdown; -/* harmony default export */ var es_statistic = (statistic_Statistic); - -/***/ }), - /***/ 12563: /*!*******************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/tag/index.js + 5 modules ***! diff --git a/16988.async.js b/16988.async.js index c11e92fdba..ad14970912 100644 --- a/16988.async.js +++ b/16988.async.js @@ -3438,6 +3438,7 @@ var ClassroomList = function ClassroomList(_ref) { _ref$wrapWidth = _ref.wrapWidth, wrapWidth = _ref$wrapWidth === void 0 ? 1200 : _ref$wrapWidth, trackEventItems = _ref.trackEventItems, + openMoveClassroomModal = _ref.openMoveClassroomModal, loading = _ref.loading; var width = Math.floor((wrapWidth - (col - 1) * right) / col); return /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, { @@ -3476,7 +3477,7 @@ var ClassroomList = function ClassroomList(_ref) { }) }), /*#__PURE__*/(0,jsx_runtime.jsx)("img", { className: ClassroomListmodules.img, - src: true ? env/* default */.Z.IMG_SERVER + '/images/' + item.avatar_url : 0 + src: true ? env/* default */.Z.IMG_SERVER + item.avatar_url : 0 }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: ClassroomListmodules.text, title: item.creator, @@ -3520,16 +3521,12 @@ var ClassroomList = function ClassroomList(_ref) { className: "iconfont icon-zuoye" }), item.tasks_count] }) - }), item.is_end ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - style: { - color: '#6B758B' - }, - children: "\u5DF2\u7ED3\u675F" - }) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - style: { - color: '#00B187' + }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + onClick: function onClick(e) { + e.stopPropagation(); + openMoveClassroomModal(item.id); }, - children: "\u8FDB\u884C\u4E2D" + children: "\u79FB\u52A8\u5230" })] })] }), !item.is_accessible && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { diff --git a/33072.async.js b/33072.async.js index f6c0457aa0..516cf4f092 100644 --- a/33072.async.js +++ b/33072.async.js @@ -667,7 +667,7 @@ var WorkList = function WorkList(_ref) { children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z, { flex: '1' }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z, { - children: [(0,_utils_authority__WEBPACK_IMPORTED_MODULE_7__/* .isAdmin */ .GJ)() && disabled && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .ZP, { + children: [(0,_utils_authority__WEBPACK_IMPORTED_MODULE_7__/* .isAdmin */ .GJ)() && disabled && (workSetting === null || workSetting === void 0 ? void 0 : workSetting.can_edit) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .ZP, { type: "primary", size: "middle", ghost: true, diff --git a/49845.async.js b/37188.async.js similarity index 68% rename from 49845.async.js rename to 37188.async.js index 84a7e04cf6..e85a86d99a 100644 --- a/49845.async.js +++ b/37188.async.js @@ -1,4 +1,4 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[49845,37825,52720],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[37188,52720],{ /***/ 68742: /*!***********************************************************************************************************!*\ @@ -1364,913 +1364,6 @@ const genWireframeStyle = token => { /***/ }), -/***/ 19479: -/*!********************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@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@7.23.4@@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(23015); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@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@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules -var AntdIcon = __webpack_require__(91851); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@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_17_0_2_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_17_0_2_react.forwardRef(StarFilled_StarFilled)); -// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js -var _classnames_2_3_2_classnames = __webpack_require__(12124); -var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(65817); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules -var slicedToArray = __webpack_require__(89561); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.4@@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(83658); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/hooks/useMergedState.js -var useMergedState = __webpack_require__(84381); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/KeyCode.js -var KeyCode = __webpack_require__(84821); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/pickAttrs.js -var pickAttrs = __webpack_require__(3286); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@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 */.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_17_0_2_react.createElement("li", { - className: _classnames_2_3_2_classnames_default()(Array.from(classNameList)), - ref: ref - }, /*#__PURE__*/_react_17_0_2_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_17_0_2_react.createElement("div", { - className: "".concat(prefixCls, "-first") - }, characterNode), /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: "".concat(prefixCls, "-second") - }, characterNode))); - if (characterRender) { - start = characterRender(start, props); - } - return start; -} -/* harmony default export */ var es_Star = (/*#__PURE__*/_react_17_0_2_react.forwardRef(Star)); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/useRefs.js - -function useRefs() { - var nodeRef = _react_17_0_2_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@2.12.0@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@2.12.0@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_17_0_2_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_17_0_2_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_17_0_2_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_17_0_2_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 */.Z.RIGHT && nextValue < count && !reverse) { - if (allowHalf) { - nextValue += 0.5; - } else { - nextValue += 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.Z.LEFT && nextValue > 0 && !reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.Z.RIGHT && nextValue > 0 && reverse) { - if (allowHalf) { - nextValue -= 0.5; - } else { - nextValue -= 1; - } - changeValue(nextValue); - event.preventDefault(); - } else if (keyCode === KeyCode/* default */.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_17_0_2_react.useEffect(function () { - if (autoFocus && !disabled) { - triggerFocus(); - } - }, []); - // =========================== Render =========================== - // >>> Star - var starNodes = new Array(count).fill(0).map(function (item, index) { - return /*#__PURE__*/_react_17_0_2_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_2_3_2_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_17_0_2_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_17_0_2_react.forwardRef(Rate)); -;// CONCATENATED MODULE: ./node_modules/_rc-rate@2.12.0@rc-rate/es/index.js - -/* harmony default export */ var es = (es_Rate); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js -var context = __webpack_require__(36355); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules -var tooltip = __webpack_require__(6848); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js -var style = __webpack_require__(17313); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(83116); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js -var statistic = __webpack_require__(37613); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/rate/style/index.js -"use client"; - - - -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@5.9.0@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_17_0_2_react.forwardRef((props, ref) => { - const { - prefixCls, - className, - rootClassName, - style, - tooltips, - character = /*#__PURE__*/_react_17_0_2_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_17_0_2_react.createElement(tooltip/* default */.Z, { - title: tooltips[index] - }, node); - }; - const { - getPrefixCls, - direction, - rate - } = _react_17_0_2_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_17_0_2_react.createElement(es, Object.assign({ - ref: ref, - character: character, - characterRender: characterRender - }, rest, { - className: _classnames_2_3_2_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); - -/***/ }), - -/***/ 31797: -/*!*************************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@antd/es/statistic/index.js + 5 modules ***! - \*************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ es_statistic; } -}); - -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useForceUpdate.js -var useForceUpdate = __webpack_require__(56762); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js -var reactNode = __webpack_require__(92343); -// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js -var _classnames_2_3_2_classnames = __webpack_require__(12124); -var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js -var context = __webpack_require__(36355); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules -var skeleton = __webpack_require__(59981); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Number.js -"use client"; - - -const StatisticNumber = props => { - const { - value, - formatter, - precision, - decimalSeparator, - groupSeparator = '', - prefixCls - } = props; - let valueNode; - if (typeof formatter === 'function') { - // Customize formatter - valueNode = formatter(value); - } else { - // Internal formatter - const val = String(value); - const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/); - // Process if illegal number - if (!cells || val === '-') { - valueNode = val; - } else { - const negative = cells[1]; - let int = cells[2] || '0'; - let decimal = cells[4] || ''; - int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator); - if (typeof precision === 'number') { - decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0); - } - if (decimal) { - decimal = `${decimalSeparator}${decimal}`; - } - valueNode = [/*#__PURE__*/_react_17_0_2_react.createElement("span", { - key: "int", - className: `${prefixCls}-content-value-int` - }, negative, int), decimal && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - key: "decimal", - className: `${prefixCls}-content-value-decimal` - }, decimal)]; - } - } - return /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-value` - }, valueNode); -}; -/* harmony default export */ var statistic_Number = (StatisticNumber); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js -var style = __webpack_require__(17313); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js -var genComponentStyleHook = __webpack_require__(83116); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js -var statistic = __webpack_require__(37613); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/style/index.js -"use client"; - - - -const genStatisticStyle = token => { - const { - componentCls, - marginXXS, - padding, - colorTextDescription, - titleFontSize, - colorTextHeading, - contentFontSize, - fontFamily - } = token; - return { - [`${componentCls}`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { - [`${componentCls}-title`]: { - marginBottom: marginXXS, - color: colorTextDescription, - fontSize: titleFontSize - }, - [`${componentCls}-skeleton`]: { - paddingTop: padding - }, - [`${componentCls}-content`]: { - color: colorTextHeading, - fontSize: contentFontSize, - fontFamily, - [`${componentCls}-content-value`]: { - display: 'inline-block', - direction: 'ltr' - }, - [`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: { - display: 'inline-block' - }, - [`${componentCls}-content-prefix`]: { - marginInlineEnd: marginXXS - }, - [`${componentCls}-content-suffix`]: { - marginInlineStart: marginXXS - } - } - }) - }; -}; -// ============================== Export ============================== -/* harmony default export */ var statistic_style = ((0,genComponentStyleHook/* default */.Z)('Statistic', token => { - const statisticToken = (0,statistic/* merge */.TS)(token, {}); - return [genStatisticStyle(statisticToken)]; -}, token => { - const { - fontSizeHeading3, - fontSize - } = token; - return { - titleFontSize: fontSize, - contentFontSize: fontSizeHeading3 - }; -})); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Statistic.js -"use client"; - - - - - - - -const Statistic = props => { - const { - prefixCls: customizePrefixCls, - className, - rootClassName, - style, - valueStyle, - value = 0, - title, - valueRender, - prefix, - suffix, - loading = false, - onMouseEnter, - onMouseLeave, - decimalSeparator = '.', - groupSeparator = ',' - } = props; - const { - getPrefixCls, - direction, - statistic - } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); - const prefixCls = getPrefixCls('statistic', customizePrefixCls); - const [wrapSSR, hashId] = statistic_style(prefixCls); - const valueNode = /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Number, Object.assign({ - decimalSeparator: decimalSeparator, - groupSeparator: groupSeparator, - prefixCls: prefixCls - }, props, { - value: value - })); - const cls = _classnames_2_3_2_classnames_default()(prefixCls, { - [`${prefixCls}-rtl`]: direction === 'rtl' - }, statistic === null || statistic === void 0 ? void 0 : statistic.className, className, rootClassName, hashId); - return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: cls, - style: Object.assign(Object.assign({}, statistic === null || statistic === void 0 ? void 0 : statistic.style), style), - onMouseEnter: onMouseEnter, - onMouseLeave: onMouseLeave - }, title && /*#__PURE__*/_react_17_0_2_react.createElement("div", { - className: `${prefixCls}-title` - }, title), /*#__PURE__*/_react_17_0_2_react.createElement(skeleton/* default */.Z, { - paragraph: false, - loading: loading, - className: `${prefixCls}-skeleton` - }, /*#__PURE__*/_react_17_0_2_react.createElement("div", { - style: valueStyle, - className: `${prefixCls}-content` - }, prefix && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-prefix` - }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: `${prefixCls}-content-suffix` - }, suffix))))); -}; -if (false) {} -/* harmony default export */ var statistic_Statistic = (Statistic); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/utils.js -// Countdown -const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365], ['M', 1000 * 60 * 60 * 24 * 30], ['D', 1000 * 60 * 60 * 24], ['H', 1000 * 60 * 60], ['m', 1000 * 60], ['s', 1000], ['S', 1] // million seconds -]; - -function formatTimeStr(duration, format) { - let leftDuration = duration; - const escapeRegex = /\[[^\]]*]/g; - const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1)); - const templateText = format.replace(escapeRegex, '[]'); - const replacedText = timeUnits.reduce((current, _ref) => { - let [name, unit] = _ref; - if (current.includes(name)) { - const value = Math.floor(leftDuration / unit); - leftDuration -= value * unit; - return current.replace(new RegExp(`${name}+`, 'g'), match => { - const len = match.length; - return value.toString().padStart(len, '0'); - }); - } - return current; - }, templateText); - let index = 0; - return replacedText.replace(escapeRegex, () => { - const match = keepList[index]; - index += 1; - return match; - }); -} -function formatCountdown(value, config) { - const { - format = '' - } = config; - const target = new Date(value).getTime(); - const current = Date.now(); - const diff = Math.max(target - current, 0); - return formatTimeStr(diff, format); -} -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Countdown.js -"use client"; - - - - - - -const REFRESH_INTERVAL = 1000 / 30; -function getTime(value) { - return new Date(value).getTime(); -} -const Countdown = props => { - const { - value, - format = 'HH:mm:ss', - onChange, - onFinish - } = props; - const forceUpdate = (0,useForceUpdate/* default */.Z)(); - const countdown = _react_17_0_2_react.useRef(null); - const stopTimer = () => { - onFinish === null || onFinish === void 0 ? void 0 : onFinish(); - if (countdown.current) { - clearInterval(countdown.current); - countdown.current = null; - } - }; - const syncTimer = () => { - const timestamp = getTime(value); - if (timestamp >= Date.now()) { - countdown.current = setInterval(() => { - forceUpdate(); - onChange === null || onChange === void 0 ? void 0 : onChange(timestamp - Date.now()); - if (timestamp < Date.now()) { - stopTimer(); - } - }, REFRESH_INTERVAL); - } - }; - _react_17_0_2_react.useEffect(() => { - syncTimer(); - return () => { - if (countdown.current) { - clearInterval(countdown.current); - countdown.current = null; - } - }; - }, [value]); - const formatter = (formatValue, config) => formatCountdown(formatValue, Object.assign(Object.assign({}, config), { - format - })); - const valueRender = node => (0,reactNode/* cloneElement */.Tm)(node, { - title: undefined - }); - return /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Statistic, Object.assign({}, props, { - valueRender: valueRender, - formatter: formatter - })); -}; -/* harmony default export */ var statistic_Countdown = (/*#__PURE__*/_react_17_0_2_react.memo(Countdown)); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/index.js -"use client"; - - - -statistic_Statistic.Countdown = statistic_Countdown; -/* harmony default export */ var es_statistic = (statistic_Statistic); - -/***/ }), - /***/ 51581: /*!****************************************************************************************************!*\ !*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/dist/InfiniteScroll.js ***! diff --git a/47854.async.js b/47854.async.js new file mode 100644 index 0000000000..570bfc78c3 --- /dev/null +++ b/47854.async.js @@ -0,0 +1,4230 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[47854,4977,32666,73025,3725],{ + +/***/ 25757: +/*!*********************************!*\ + !*** ./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 */ 26078); + +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"] */ .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'; + +/***/ }), + +/***/ 22848: +/*!**********************************************!*\ + !*** ./src/components/AsyncButton/index.tsx ***! + \**********************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Z: function() { return /* binding */ AsyncButton; } +/* harmony export */ }); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js */ 27161); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 3113); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712); + + + + + +var _excluded = ["children"]; + + + +var AsyncButton = function AsyncButton(_ref) { + var children = _ref.children, + props = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default()(_ref, _excluded); + var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false), + _useState2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2), + btnLoading = _useState2[0], + setBtnLoading = _useState2[1]; + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, { + loading: btnLoading, + onClick: /*#__PURE__*/function () { + var _ref2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(e) { + return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + setBtnLoading(true); + _context.next = 4; + return props.onClick(e); + case 4: + setBtnLoading(false); + _context.next = 11; + break; + case 7: + _context.prev = 7; + _context.t0 = _context["catch"](0); + console.error(_context.t0); + setBtnLoading(false); + case 11: + case "end": + return _context.stop(); + } + }, _callee, null, [[0, 7]]); + })); + return function (_x) { + return _ref2.apply(this, arguments); + }; + }(), + children: children + })); +}; + +/***/ }), + +/***/ 31917: +/*!*****************************************!*\ + !*** ./src/components/NoData/index.tsx ***! + \*****************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301); +/* 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 */ 3113); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712); + + + + + + +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_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_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_local_v9_test1_node_modules_babel_runtime_7_23_2_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_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_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); + +/***/ }), + +/***/ 1498: +/*!*********************************************************!*\ + !*** ./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@7.23.2@@babel/runtime/helpers/objectSpread2.js +var objectSpread2 = __webpack_require__(26801); +var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js +var regeneratorRuntime = __webpack_require__(10574); +var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js +var asyncToGenerator = __webpack_require__(39343); +var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(11006); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js +var _react_17_0_2_react = __webpack_require__(59301); +;// 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@5.9.0@antd/es/button/index.js +var es_button = __webpack_require__(3113); +// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules +var ArrowDownOutlined = __webpack_require__(98915); +// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules +var monaco_editor = __webpack_require__(82791); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules +var tooltip = __webpack_require__(6848); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(87885); +// EXTERNAL MODULE: ./src/service/exercise.ts +var exercise = __webpack_require__(65398); +// EXTERNAL MODULE: ./src/components/NoData/index.tsx +var NoData = __webpack_require__(31917); +// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules +var env = __webpack_require__(26078); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js +var jsx_runtime = __webpack_require__(37712); +;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx + + + + + + + + + + + + + + + + + +/* harmony default export */ var PreviewAll = (function (_ref) { + var _data, _data2, _data3, _data4, _data5, _data6, _data7; + 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_17_0_2_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_17_0_2_react.useState)(""), + _useState4 = slicedToArray_default()(_useState3, 2), + token = _useState4[0], + setToken = _useState4[1]; + var _useState5 = (0,_react_17_0_2_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 */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER; + // let size; + console.log("disabledDownload---", disabledDownload); + var unit = 1024 * 1024; + var maxSize = 10 * unit; + var closeRef = (0,_react_17_0_2_react.useRef)(); + if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") { + data = env/* default */.Z.API_SERVER + data; + } + // if (type === "office") { + // size = parseUrl(data).filesize + // if (size > maxSize) { + // type = "other" + // } + // } + if (filename) monacoEditor.filename = filename; + (0,_react_17_0_2_react.useEffect)(function () { + var _document$cookie; + var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 || (_document$cookie = _document$cookie.replace(/\s/g, "")) === null || _document$cookie === void 0 ? void 0 : _document$cookie.split(";"); + cookies === null || cookies === void 0 || cookies.map(function (item) { + var i = item.split("="); + if (i[0] === '_educoder_session') { + setToken(i[1]); + } + }); + }, []); + (0,_react_17_0_2_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)); + }; + console.log(data, '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: ((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http")) > -1 || (_data3 = data) !== null && _data3 !== void 0 && _data3.startsWith("/api") ? data : "data:image/png;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 || (_data5 = data) !== null && _data5 !== void 0 && _data5.startsWith("/api") ? /*#__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 */.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: ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("http")) > -1 || (_data7 = data) !== null && _data7 !== void 0 && _data7.startsWith("/api") ? data : "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"] + }) + })] + }); +}); + +/***/ }), + +/***/ 32666: +/*!*********************************************************!*\ + !*** ./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@7.23.2@@babel/runtime/helpers/objectSpread2.js +var objectSpread2 = __webpack_require__(26801); +var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js +var toConsumableArray = __webpack_require__(93923); +var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js +var createForOfIteratorHelper = __webpack_require__(98190); +var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(11006); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js +var _react_17_0_2_react = __webpack_require__(59301); +// EXTERNAL MODULE: ./node_modules/_katex@0.11.1@katex/dist/katex.min.css +var katex_min = __webpack_require__(88633); +// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/lib/marked.js +var marked = __webpack_require__(32834); +var marked_default = /*#__PURE__*/__webpack_require__.n(marked); +// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/src/helpers.js +var helpers = __webpack_require__(11690); +;// 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 = ["