You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/58675.async.js

4066 lines
156 KiB

(self["webpackChunk"] = self["webpackChunk"] || []).push([[58675],{
/***/ 70740:
/*!********************************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/DeliveredProcedureOutlined.js + 1 modules ***!
\********************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_DeliveredProcedureOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(38850);
// 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/DeliveredProcedureOutlined.js
// This icon file is generated automatically.
var DeliveredProcedureOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z" } }] }, "name": "delivered-procedure", "theme": "outlined" };
/* harmony default export */ var asn_DeliveredProcedureOutlined = (DeliveredProcedureOutlined);
// 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/DeliveredProcedureOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DeliveredProcedureOutlined_DeliveredProcedureOutlined = function DeliveredProcedureOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_DeliveredProcedureOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_DeliveredProcedureOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(DeliveredProcedureOutlined_DeliveredProcedureOutlined));
/***/ }),
/***/ 91671:
/*!********************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***!
\********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_ReloadOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(38850);
// 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/ReloadOutlined.js
// This icon file is generated automatically.
var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" };
/* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@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/ReloadOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ReloadOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_ReloadOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ReloadOutlined_ReloadOutlined));
/***/ }),
/***/ 15470:
/*!*********************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SettingOutlined.js + 1 modules ***!
\*********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_SettingOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(38850);
// 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/SettingOutlined.js
// This icon file is generated automatically.
var SettingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z" } }] }, "name": "setting", "theme": "outlined" };
/* harmony default export */ var asn_SettingOutlined = (SettingOutlined);
// 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/SettingOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SettingOutlined_SettingOutlined = function SettingOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_SettingOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_SettingOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(SettingOutlined_SettingOutlined));
/***/ }),
/***/ 51715:
/*!*****************************************************************************!*\
!*** ./node_modules/_antd@5.12.8@antd/es/_util/throttleByAnimationFrame.js ***!
\*****************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ 69202);
/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ 90571);
function throttleByAnimationFrame(fn) {
let requestId;
const later = args => () => {
requestId = null;
fn.apply(void 0, (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(args));
};
const throttled = function () {
if (requestId == null) {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
requestId = (0,rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(later(args));
}
};
throttled.cancel = () => {
rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.cancel(requestId);
requestId = null;
};
return throttled;
}
/* harmony default export */ __webpack_exports__.Z = (throttleByAnimationFrame);
/***/ }),
/***/ 83234:
/*!**********************************************************************!*\
!*** ./node_modules/_antd@5.12.8@antd/es/affix/index.js + 2 modules ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ affix; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_rc-resize-observer@1.4.0@rc-resize-observer/es/index.js + 4 modules
var es = __webpack_require__(28647);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/omit.js
var omit = __webpack_require__(99468);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/_util/throttleByAnimationFrame.js
var throttleByAnimationFrame = __webpack_require__(51715);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/config-provider/context.js
var context = __webpack_require__(70330);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/genComponentStyleHook.js + 5 modules
var genComponentStyleHook = __webpack_require__(16613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/affix/style/index.js
// ============================== Shared ==============================
const genSharedAffixStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
position: 'fixed',
zIndex: token.zIndexPopup
}
};
};
const prepareComponentToken = token => ({
zIndexPopup: token.zIndexBase + 10
});
// ============================== Export ==============================
/* harmony default export */ var affix_style = ((0,genComponentStyleHook/* genStyleHooks */.I$)('Affix', genSharedAffixStyle, prepareComponentToken));
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/affix/utils.js
function getTargetRect(target) {
return target !== window ? target.getBoundingClientRect() : {
top: 0,
bottom: window.innerHeight
};
}
function getFixedTop(placeholderRect, targetRect, offsetTop) {
if (offsetTop !== undefined && targetRect.top > placeholderRect.top - offsetTop) {
return offsetTop + targetRect.top;
}
return undefined;
}
function getFixedBottom(placeholderRect, targetRect, offsetBottom) {
if (offsetBottom !== undefined && targetRect.bottom < placeholderRect.bottom + offsetBottom) {
const targetBottomOffset = window.innerHeight - targetRect.bottom;
return offsetBottom + targetBottomOffset;
}
return undefined;
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/affix/index.js
"use client";
const TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];
function getDefaultTarget() {
return typeof window !== 'undefined' ? window : null;
}
var AffixStatus;
(function (AffixStatus) {
AffixStatus[AffixStatus["None"] = 0] = "None";
AffixStatus[AffixStatus["Prepare"] = 1] = "Prepare";
})(AffixStatus || (AffixStatus = {}));
const Affix = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
var _a;
const {
style,
offsetTop,
offsetBottom,
prefixCls,
className,
rootClassName,
children,
target,
onChange
} = props;
const {
getPrefixCls,
getTargetContainer
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const affixPrefixCls = getPrefixCls('affix', prefixCls);
const [lastAffix, setLastAffix] = _react_17_0_2_react.useState(false);
const [affixStyle, setAffixStyle] = _react_17_0_2_react.useState();
const [placeholderStyle, setPlaceholderStyle] = _react_17_0_2_react.useState();
const status = _react_17_0_2_react.useRef(AffixStatus.None);
const prevTarget = _react_17_0_2_react.useRef(null);
const prevListener = _react_17_0_2_react.useRef();
const placeholderNodeRef = _react_17_0_2_react.useRef(null);
const fixedNodeRef = _react_17_0_2_react.useRef(null);
const timer = _react_17_0_2_react.useRef(null);
const targetFunc = (_a = target !== null && target !== void 0 ? target : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultTarget;
const internalOffsetTop = offsetBottom === undefined && offsetTop === undefined ? 0 : offsetTop;
// =================== Measure ===================
const measure = () => {
if (status.current !== AffixStatus.Prepare || !fixedNodeRef.current || !placeholderNodeRef.current || !targetFunc) {
return;
}
const targetNode = targetFunc();
if (targetNode) {
const newState = {
status: AffixStatus.None
};
const placeholderRect = getTargetRect(placeholderNodeRef.current);
if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) {
return;
}
const targetRect = getTargetRect(targetNode);
const fixedTop = getFixedTop(placeholderRect, targetRect, internalOffsetTop);
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
if (fixedTop !== undefined) {
newState.affixStyle = {
position: 'fixed',
top: fixedTop,
width: placeholderRect.width,
height: placeholderRect.height
};
newState.placeholderStyle = {
width: placeholderRect.width,
height: placeholderRect.height
};
} else if (fixedBottom !== undefined) {
newState.affixStyle = {
position: 'fixed',
bottom: fixedBottom,
width: placeholderRect.width,
height: placeholderRect.height
};
newState.placeholderStyle = {
width: placeholderRect.width,
height: placeholderRect.height
};
}
newState.lastAffix = !!newState.affixStyle;
if (lastAffix !== newState.lastAffix) {
onChange === null || onChange === void 0 ? void 0 : onChange(newState.lastAffix);
}
status.current = newState.status;
setAffixStyle(newState.affixStyle);
setPlaceholderStyle(newState.placeholderStyle);
setLastAffix(newState.lastAffix);
}
};
const prepareMeasure = () => {
var _a;
status.current = AffixStatus.Prepare;
measure();
if (false) {}
};
const updatePosition = (0,throttleByAnimationFrame/* default */.Z)(() => {
prepareMeasure();
});
const lazyUpdatePosition = (0,throttleByAnimationFrame/* default */.Z)(() => {
// Check position change before measure to make Safari smooth
if (targetFunc && affixStyle) {
const targetNode = targetFunc();
if (targetNode && placeholderNodeRef.current) {
const targetRect = getTargetRect(targetNode);
const placeholderRect = getTargetRect(placeholderNodeRef.current);
const fixedTop = getFixedTop(placeholderRect, targetRect, internalOffsetTop);
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
if (fixedTop !== undefined && affixStyle.top === fixedTop || fixedBottom !== undefined && affixStyle.bottom === fixedBottom) {
return;
}
}
}
// Directly call prepare measure since it's already throttled.
prepareMeasure();
});
const addListeners = () => {
const listenerTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
if (!listenerTarget) {
return;
}
TRIGGER_EVENTS.forEach(eventName => {
var _a;
if (prevListener.current) {
(_a = prevTarget.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, prevListener.current);
}
listenerTarget === null || listenerTarget === void 0 ? void 0 : listenerTarget.addEventListener(eventName, lazyUpdatePosition);
});
prevTarget.current = listenerTarget;
prevListener.current = lazyUpdatePosition;
};
const removeListeners = () => {
if (timer.current) {
clearTimeout(timer.current);
timer.current = null;
}
const newTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
TRIGGER_EVENTS.forEach(eventName => {
var _a;
newTarget === null || newTarget === void 0 ? void 0 : newTarget.removeEventListener(eventName, lazyUpdatePosition);
if (prevListener.current) {
(_a = prevTarget.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, prevListener.current);
}
});
updatePosition.cancel();
lazyUpdatePosition.cancel();
};
_react_17_0_2_react.useImperativeHandle(ref, () => ({
updatePosition
}));
// mount & unmount
_react_17_0_2_react.useEffect(() => {
// [Legacy] Wait for parent component ref has its value.
// We should use target as directly element instead of function which makes element check hard.
timer.current = setTimeout(addListeners);
return () => removeListeners();
}, []);
_react_17_0_2_react.useEffect(() => {
addListeners();
}, [target, affixStyle]);
_react_17_0_2_react.useEffect(() => {
updatePosition();
}, [target, offsetTop, offsetBottom]);
const [wrapCSSVar, hashId, cssVarCls] = affix_style(affixPrefixCls);
const rootCls = _classnames_2_5_1_classnames_default()(rootClassName, hashId, affixPrefixCls, cssVarCls);
const mergedCls = _classnames_2_5_1_classnames_default()({
[rootCls]: affixStyle
});
let otherProps = (0,omit/* default */.Z)(props, ['prefixCls', 'offsetTop', 'offsetBottom', 'target', 'onChange', 'rootClassName']);
if (false) {}
return wrapCSSVar( /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, {
onResize: updatePosition
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
style: style,
className: className,
ref: placeholderNodeRef
}, otherProps), affixStyle && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
style: placeholderStyle,
"aria-hidden": "true"
}), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: mergedCls,
ref: fixedNodeRef,
style: affixStyle
}, /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, {
onResize: updatePosition
}, children)))));
});
if (false) {}
/* harmony default export */ var affix = (Affix);
/***/ }),
/***/ 52045:
/*!************************************************************************!*\
!*** ./node_modules/_antd@5.12.8@antd/es/divider/index.js + 1 modules ***!
\************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ divider; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/config-provider/context.js
var context = __webpack_require__(70330);
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.2@@ant-design/cssinjs/es/index.js + 35 modules
var es = __webpack_require__(3775);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/style/index.js
var style = __webpack_require__(78605);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/genComponentStyleHook.js + 5 modules
var genComponentStyleHook = __webpack_require__(16613);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(35577);
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/divider/style/index.js
// ============================== Shared ==============================
const genSharedDividerStyle = token => {
const {
componentCls,
sizePaddingEdgeHorizontal,
colorSplit,
lineWidth,
textPaddingInline,
orientationMargin,
verticalMarginInline
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
borderBlockStart: `${(0,es.unit)(lineWidth)} solid ${colorSplit}`,
// vertical
'&-vertical': {
position: 'relative',
top: '-0.06em',
display: 'inline-block',
height: '0.9em',
marginInline: verticalMarginInline,
marginBlock: 0,
verticalAlign: 'middle',
borderTop: 0,
borderInlineStart: `${(0,es.unit)(lineWidth)} solid ${colorSplit}`
},
'&-horizontal': {
display: 'flex',
clear: 'both',
width: '100%',
minWidth: '100%',
// Fix https://github.com/ant-design/ant-design/issues/10914
margin: `${(0,es.unit)(token.dividerHorizontalGutterMargin)} 0`
},
[`&-horizontal${componentCls}-with-text`]: {
display: 'flex',
alignItems: 'center',
margin: `${(0,es.unit)(token.dividerHorizontalWithTextGutterMargin)} 0`,
color: token.colorTextHeading,
fontWeight: 500,
fontSize: token.fontSizeLG,
whiteSpace: 'nowrap',
textAlign: 'center',
borderBlockStart: `0 ${colorSplit}`,
'&::before, &::after': {
position: 'relative',
width: '50%',
borderBlockStart: `${(0,es.unit)(lineWidth)} solid transparent`,
// Chrome not accept `inherit` in `border-top`
borderBlockStartColor: 'inherit',
borderBlockEnd: 0,
transform: 'translateY(50%)',
content: "''"
}
},
[`&-horizontal${componentCls}-with-text-left`]: {
'&::before': {
width: `calc(${orientationMargin} * 100%)`
},
'&::after': {
width: `calc(100% - ${orientationMargin} * 100%)`
}
},
[`&-horizontal${componentCls}-with-text-right`]: {
'&::before': {
width: `calc(100% - ${orientationMargin} * 100%)`
},
'&::after': {
width: `calc(${orientationMargin} * 100%)`
}
},
[`${componentCls}-inner-text`]: {
display: 'inline-block',
paddingBlock: 0,
paddingInline: textPaddingInline
},
'&-dashed': {
background: 'none',
borderColor: colorSplit,
borderStyle: 'dashed',
borderWidth: `${(0,es.unit)(lineWidth)} 0 0`
},
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
'&::before, &::after': {
borderStyle: 'dashed none none'
}
},
[`&-vertical${componentCls}-dashed`]: {
borderInlineStartWidth: lineWidth,
borderInlineEnd: 0,
borderBlockStart: 0,
borderBlockEnd: 0
},
[`&-plain${componentCls}-with-text`]: {
color: token.colorText,
fontWeight: 'normal',
fontSize: token.fontSize
},
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
'&::before': {
width: 0
},
'&::after': {
width: '100%'
},
[`${componentCls}-inner-text`]: {
paddingInlineStart: sizePaddingEdgeHorizontal
}
},
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
'&::before': {
width: '100%'
},
'&::after': {
width: 0
},
[`${componentCls}-inner-text`]: {
paddingInlineEnd: sizePaddingEdgeHorizontal
}
}
})
};
};
const prepareComponentToken = token => ({
textPaddingInline: '1em',
orientationMargin: 0.05,
verticalMarginInline: token.marginXS
});
// ============================== Export ==============================
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* genStyleHooks */.I$)('Divider', token => {
const dividerToken = (0,statistic/* merge */.TS)(token, {
dividerHorizontalWithTextGutterMargin: token.margin,
dividerHorizontalGutterMargin: token.marginLG,
sizePaddingEdgeHorizontal: 0
});
return [genSharedDividerStyle(dividerToken)];
}, prepareComponentToken, {
unitless: {
orientationMargin: true
}
}));
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/divider/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 Divider = props => {
const {
getPrefixCls,
direction,
divider
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const {
prefixCls: customizePrefixCls,
type = 'horizontal',
orientation = 'center',
orientationMargin,
className,
rootClassName,
children,
dashed,
plain,
style
} = props,
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
const prefixCls = getPrefixCls('divider', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = divider_style(prefixCls);
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
const hasChildren = !!children;
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
const classString = _classnames_2_5_1_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, cssVarCls, `${prefixCls}-${type}`, {
[`${prefixCls}-with-text`]: hasChildren,
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
[`${prefixCls}-dashed`]: !!dashed,
[`${prefixCls}-plain`]: !!plain,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
}, className, rootClassName);
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
if (typeof orientationMargin === 'number') {
return orientationMargin;
}
if (/^\d+$/.test(orientationMargin)) {
return Number(orientationMargin);
}
return orientationMargin;
}, [orientationMargin]);
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
marginLeft: memoizedOrientationMargin
}), hasCustomMarginRight && {
marginRight: memoizedOrientationMargin
});
// Warning children not work in vertical mode
if (false) {}
return wrapCSSVar( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
className: classString,
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && ( /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-inner-text`,
style: innerStyle
}, children))));
};
if (false) {}
/* harmony default export */ var divider = (Divider);
/***/ }),
/***/ 23329:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.12.8@antd/es/image/index.js + 28 modules ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ es_image; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
var EyeOutlined = __webpack_require__(15997);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(38850);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(96257);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(85005);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(69818);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__(2442);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(46130);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/Dom/css.js
var css = __webpack_require__(63830);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/hooks/useMergedState.js
var useMergedState = __webpack_require__(84381);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/common.js
var COMMON_PROPS = ['crossOrigin', 'decoding', 'draggable', 'loading', 'referrerPolicy', 'sizes', 'srcSet', 'useMap', 'alt'];
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/context.js
var PreviewGroupContext = /*#__PURE__*/_react_17_0_2_react.createContext(null);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/hooks/useRegisterImage.js
var uid = 0;
function useRegisterImage(canPreview, data) {
var _React$useState = _react_17_0_2_react.useState(function () {
uid += 1;
return String(uid);
}),
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 1),
id = _React$useState2[0];
var groupContext = _react_17_0_2_react.useContext(PreviewGroupContext);
var registerData = {
data: data,
canPreview: canPreview
};
// Keep order start
// Resolve https://github.com/ant-design/ant-design/issues/28881
// Only need unRegister when component unMount
_react_17_0_2_react.useEffect(function () {
if (groupContext) {
return groupContext.register(id, registerData);
}
}, []);
_react_17_0_2_react.useEffect(function () {
if (groupContext) {
groupContext.register(id, registerData);
}
}, [canPreview, data]);
return id;
}
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/util.js
function isImageValid(src) {
return new Promise(function (resolve) {
var img = document.createElement('img');
img.onerror = function () {
return resolve(false);
};
img.onload = function () {
return resolve(true);
};
img.src = src;
});
}
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/hooks/useStatus.js
function useStatus(_ref) {
var src = _ref.src,
isCustomPlaceholder = _ref.isCustomPlaceholder,
fallback = _ref.fallback;
var _useState = (0,_react_17_0_2_react.useState)(isCustomPlaceholder ? 'loading' : 'normal'),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
status = _useState2[0],
setStatus = _useState2[1];
var isLoaded = (0,_react_17_0_2_react.useRef)(false);
var isError = status === 'error';
// https://github.com/react-component/image/pull/187
(0,_react_17_0_2_react.useEffect)(function () {
var isCurrentSrc = true;
isImageValid(src).then(function (isValid) {
// https://github.com/ant-design/ant-design/issues/44948
// If src changes, the previous setStatus should not be triggered
if (!isValid && isCurrentSrc) {
setStatus('error');
}
});
return function () {
isCurrentSrc = false;
};
}, [src]);
(0,_react_17_0_2_react.useEffect)(function () {
if (isCustomPlaceholder && !isLoaded.current) {
setStatus('loading');
} else if (isError) {
setStatus('normal');
}
}, [src]);
var onLoad = function onLoad() {
setStatus('normal');
};
var getImgRef = function getImgRef(img) {
isLoaded.current = false;
if (status === 'loading' && img !== null && img !== void 0 && img.complete && (img.naturalWidth || img.naturalHeight)) {
isLoaded.current = true;
onLoad();
}
};
var srcAndOnload = isError && fallback ? {
src: fallback
} : {
onLoad: onLoad,
src: src
};
return [getImgRef, srcAndOnload, status];
}
// EXTERNAL MODULE: ./node_modules/_rc-dialog@9.3.4@rc-dialog/es/index.js + 8 modules
var es = __webpack_require__(6291);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/Dom/addEventListener.js
var addEventListener = __webpack_require__(7761);
// 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/isEqual.js
var isEqual = __webpack_require__(70780);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/raf.js
var raf = __webpack_require__(90571);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/hooks/useImageTransform.js
var initialTransform = {
x: 0,
y: 0,
rotate: 0,
scale: 1,
flipX: false,
flipY: false
};
function useImageTransform(imgRef, minScale, maxScale, onTransform) {
var frame = (0,_react_17_0_2_react.useRef)(null);
var queue = (0,_react_17_0_2_react.useRef)([]);
var _useState = (0,_react_17_0_2_react.useState)(initialTransform),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
transform = _useState2[0],
setTransform = _useState2[1];
var resetTransform = function resetTransform(action) {
setTransform(initialTransform);
if (onTransform && !(0,isEqual/* default */.Z)(initialTransform, transform)) {
onTransform({
transform: initialTransform,
action: action
});
}
};
/** Direct update transform */
var updateTransform = function updateTransform(newTransform, action) {
if (frame.current === null) {
queue.current = [];
frame.current = (0,raf/* default */.Z)(function () {
setTransform(function (preState) {
var memoState = preState;
queue.current.forEach(function (queueState) {
memoState = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, memoState), queueState);
});
frame.current = null;
onTransform === null || onTransform === void 0 || onTransform({
transform: memoState,
action: action
});
return memoState;
});
});
}
queue.current.push((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, transform), newTransform));
};
/** Scale according to the position of centerX and centerY */
var dispatchZoomChange = function dispatchZoomChange(ratio, action, centerX, centerY, isTouch) {
var _imgRef$current = imgRef.current,
width = _imgRef$current.width,
height = _imgRef$current.height,
offsetWidth = _imgRef$current.offsetWidth,
offsetHeight = _imgRef$current.offsetHeight,
offsetLeft = _imgRef$current.offsetLeft,
offsetTop = _imgRef$current.offsetTop;
var newRatio = ratio;
var newScale = transform.scale * ratio;
if (newScale > maxScale) {
newScale = maxScale;
newRatio = maxScale / transform.scale;
} else if (newScale < minScale) {
// For mobile interactions, allow scaling down to the minimum scale.
newScale = isTouch ? newScale : minScale;
newRatio = newScale / transform.scale;
}
/** Default center point scaling */
var mergedCenterX = centerX !== null && centerX !== void 0 ? centerX : innerWidth / 2;
var mergedCenterY = centerY !== null && centerY !== void 0 ? centerY : innerHeight / 2;
var diffRatio = newRatio - 1;
/** Deviation calculated from image size */
var diffImgX = diffRatio * width * 0.5;
var diffImgY = diffRatio * height * 0.5;
/** The difference between the click position and the edge of the document */
var diffOffsetLeft = diffRatio * (mergedCenterX - transform.x - offsetLeft);
var diffOffsetTop = diffRatio * (mergedCenterY - transform.y - offsetTop);
/** Final positioning */
var newX = transform.x - (diffOffsetLeft - diffImgX);
var newY = transform.y - (diffOffsetTop - diffImgY);
/**
* When zooming the image
* When the image size is smaller than the width and height of the window, the position is initialized
*/
if (ratio < 1 && newScale === 1) {
var mergedWidth = offsetWidth * newScale;
var mergedHeight = offsetHeight * newScale;
var _getClientSize = (0,css/* getClientSize */.g1)(),
clientWidth = _getClientSize.width,
clientHeight = _getClientSize.height;
if (mergedWidth <= clientWidth && mergedHeight <= clientHeight) {
newX = 0;
newY = 0;
}
}
updateTransform({
x: newX,
y: newY,
scale: newScale
}, action);
};
return {
transform: transform,
resetTransform: resetTransform,
updateTransform: updateTransform,
dispatchZoomChange: dispatchZoomChange
};
}
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/warning.js
var warning = __webpack_require__(36014);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/getFixScaleEleTransPosition.js
function fixPoint(key, start, width, clientWidth) {
var startAddWidth = start + width;
var offsetStart = (width - clientWidth) / 2;
if (width > clientWidth) {
if (start > 0) {
return (0,defineProperty/* default */.Z)({}, key, offsetStart);
}
if (start < 0 && startAddWidth < clientWidth) {
return (0,defineProperty/* default */.Z)({}, key, -offsetStart);
}
} else if (start < 0 || startAddWidth > clientWidth) {
return (0,defineProperty/* default */.Z)({}, key, start < 0 ? offsetStart : -offsetStart);
}
return {};
}
/**
* Fix positon x,y point when
*
* Ele width && height < client
* - Back origin
*
* - Ele width | height > clientWidth | clientHeight
* - left | top > 0 -> Back 0
* - left | top + width | height < clientWidth | clientHeight -> Back left | top + width | height === clientWidth | clientHeight
*
* Regardless of other
*/
function getFixScaleEleTransPosition(width, height, left, top) {
var _getClientSize = (0,css/* getClientSize */.g1)(),
clientWidth = _getClientSize.width,
clientHeight = _getClientSize.height;
var fixPos = null;
if (width <= clientWidth && height <= clientHeight) {
fixPos = {
x: 0,
y: 0
};
} else if (width > clientWidth || height > clientHeight) {
fixPos = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, fixPoint('x', left, width, clientWidth)), fixPoint('y', top, height, clientHeight));
}
return fixPos;
}
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/previewConfig.js
/** Scale the ratio base */
var BASE_SCALE_RATIO = 1;
/** The maximum zoom ratio when the mouse zooms in, adjustable */
var WHEEL_MAX_SCALE_RATIO = 1;
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/hooks/useMouseEvent.js
function useMouseEvent(imgRef, movable, visible, scaleStep, transform, updateTransform, dispatchZoomChange) {
var rotate = transform.rotate,
scale = transform.scale,
x = transform.x,
y = transform.y;
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
isMoving = _useState2[0],
setMoving = _useState2[1];
var startPositionInfo = (0,_react_17_0_2_react.useRef)({
diffX: 0,
diffY: 0,
transformX: 0,
transformY: 0
});
var onMouseDown = function onMouseDown(event) {
// Only allow main button
if (!movable || event.button !== 0) return;
event.preventDefault();
event.stopPropagation();
startPositionInfo.current = {
diffX: event.pageX - x,
diffY: event.pageY - y,
transformX: x,
transformY: y
};
setMoving(true);
};
var onMouseMove = function onMouseMove(event) {
if (visible && isMoving) {
updateTransform({
x: event.pageX - startPositionInfo.current.diffX,
y: event.pageY - startPositionInfo.current.diffY
}, 'move');
}
};
var onMouseUp = function onMouseUp() {
if (visible && isMoving) {
setMoving(false);
/** No need to restore the position when the picture is not moved, So as not to interfere with the click */
var _startPositionInfo$cu = startPositionInfo.current,
transformX = _startPositionInfo$cu.transformX,
transformY = _startPositionInfo$cu.transformY;
var hasChangedPosition = x !== transformX && y !== transformY;
if (!hasChangedPosition) return;
var width = imgRef.current.offsetWidth * scale;
var height = imgRef.current.offsetHeight * scale;
// eslint-disable-next-line @typescript-eslint/no-shadow
var _imgRef$current$getBo = imgRef.current.getBoundingClientRect(),
left = _imgRef$current$getBo.left,
top = _imgRef$current$getBo.top;
var isRotate = rotate % 180 !== 0;
var fixState = getFixScaleEleTransPosition(isRotate ? height : width, isRotate ? width : height, left, top);
if (fixState) {
updateTransform((0,objectSpread2/* default */.Z)({}, fixState), 'dragRebound');
}
}
};
var onWheel = function onWheel(event) {
if (!visible || event.deltaY == 0) return;
// Scale ratio depends on the deltaY size
var scaleRatio = Math.abs(event.deltaY / 100);
// Limit the maximum scale ratio
var mergedScaleRatio = Math.min(scaleRatio, WHEEL_MAX_SCALE_RATIO);
// Scale the ratio each time
var ratio = BASE_SCALE_RATIO + mergedScaleRatio * scaleStep;
if (event.deltaY > 0) {
ratio = BASE_SCALE_RATIO / ratio;
}
dispatchZoomChange(ratio, 'wheel', event.clientX, event.clientY);
};
(0,_react_17_0_2_react.useEffect)(function () {
var onTopMouseUpListener;
var onTopMouseMoveListener;
var onMouseUpListener;
var onMouseMoveListener;
if (movable) {
onMouseUpListener = (0,addEventListener/* default */.Z)(window, 'mouseup', onMouseUp, false);
onMouseMoveListener = (0,addEventListener/* default */.Z)(window, 'mousemove', onMouseMove, false);
try {
// Resolve if in iframe lost event
/* istanbul ignore next */
if (window.top !== window.self) {
onTopMouseUpListener = (0,addEventListener/* default */.Z)(window.top, 'mouseup', onMouseUp, false);
onTopMouseMoveListener = (0,addEventListener/* default */.Z)(window.top, 'mousemove', onMouseMove, false);
}
} catch (error) {
/* istanbul ignore next */
(0,warning/* warning */.Kp)(false, "[rc-image] ".concat(error));
}
}
return function () {
var _onMouseUpListener, _onMouseMoveListener, _onTopMouseUpListener, _onTopMouseMoveListen;
(_onMouseUpListener = onMouseUpListener) === null || _onMouseUpListener === void 0 || _onMouseUpListener.remove();
(_onMouseMoveListener = onMouseMoveListener) === null || _onMouseMoveListener === void 0 || _onMouseMoveListener.remove();
/* istanbul ignore next */
(_onTopMouseUpListener = onTopMouseUpListener) === null || _onTopMouseUpListener === void 0 || _onTopMouseUpListener.remove();
/* istanbul ignore next */
(_onTopMouseMoveListen = onTopMouseMoveListener) === null || _onTopMouseMoveListen === void 0 || _onTopMouseMoveListen.remove();
};
}, [visible, isMoving, x, y, rotate, movable]);
return {
isMoving: isMoving,
onMouseDown: onMouseDown,
onMouseMove: onMouseMove,
onMouseUp: onMouseUp,
onWheel: onWheel
};
}
;
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/hooks/useTouchEvent.js
function getDistance(a, b) {
var x = a.x - b.x;
var y = a.y - b.y;
return Math.hypot(x, y);
}
function getCenter(oldPoint1, oldPoint2, newPoint1, newPoint2) {
// Calculate the distance each point has moved
var distance1 = getDistance(oldPoint1, newPoint1);
var distance2 = getDistance(oldPoint2, newPoint2);
// If both distances are 0, return the original points
if (distance1 === 0 && distance2 === 0) {
return [oldPoint1.x, oldPoint1.y];
}
// Calculate the ratio of the distances
var ratio = distance1 / (distance1 + distance2);
// Calculate the new center point based on the ratio
var x = oldPoint1.x + ratio * (oldPoint2.x - oldPoint1.x);
var y = oldPoint1.y + ratio * (oldPoint2.y - oldPoint1.y);
return [x, y];
}
function useTouchEvent(imgRef, movable, visible, minScale, transform, updateTransform, dispatchZoomChange) {
var rotate = transform.rotate,
scale = transform.scale,
x = transform.x,
y = transform.y;
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
isTouching = _useState2[0],
setIsTouching = _useState2[1];
var touchPointInfo = (0,_react_17_0_2_react.useRef)({
point1: {
x: 0,
y: 0
},
point2: {
x: 0,
y: 0
},
eventType: 'none'
});
var updateTouchPointInfo = function updateTouchPointInfo(values) {
touchPointInfo.current = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, touchPointInfo.current), values);
};
var onTouchStart = function onTouchStart(event) {
if (!movable) return;
event.stopPropagation();
setIsTouching(true);
var _event$touches = event.touches,
touches = _event$touches === void 0 ? [] : _event$touches;
if (touches.length > 1) {
// touch zoom
updateTouchPointInfo({
point1: {
x: touches[0].clientX,
y: touches[0].clientY
},
point2: {
x: touches[1].clientX,
y: touches[1].clientY
},
eventType: 'touchZoom'
});
} else {
// touch move
updateTouchPointInfo({
point1: {
x: touches[0].clientX - x,
y: touches[0].clientY - y
},
eventType: 'move'
});
}
};
var onTouchMove = function onTouchMove(event) {
var _event$touches2 = event.touches,
touches = _event$touches2 === void 0 ? [] : _event$touches2;
var _touchPointInfo$curre = touchPointInfo.current,
point1 = _touchPointInfo$curre.point1,
point2 = _touchPointInfo$curre.point2,
eventType = _touchPointInfo$curre.eventType;
if (touches.length > 1 && eventType === 'touchZoom') {
// touch zoom
var newPoint1 = {
x: touches[0].clientX,
y: touches[0].clientY
};
var newPoint2 = {
x: touches[1].clientX,
y: touches[1].clientY
};
var _getCenter = getCenter(point1, point2, newPoint1, newPoint2),
_getCenter2 = (0,slicedToArray/* default */.Z)(_getCenter, 2),
centerX = _getCenter2[0],
centerY = _getCenter2[1];
var ratio = getDistance(newPoint1, newPoint2) / getDistance(point1, point2);
dispatchZoomChange(ratio, 'touchZoom', centerX, centerY, true);
updateTouchPointInfo({
point1: newPoint1,
point2: newPoint2,
eventType: 'touchZoom'
});
} else if (eventType === 'move') {
// touch move
updateTransform({
x: touches[0].clientX - point1.x,
y: touches[0].clientY - point1.y
}, 'move');
updateTouchPointInfo({
eventType: 'move'
});
}
};
var onTouchEnd = function onTouchEnd() {
if (!visible) return;
if (isTouching) {
setIsTouching(false);
}
updateTouchPointInfo({
eventType: 'none'
});
if (minScale > scale) {
/** When the scaling ratio is less than the minimum scaling ratio, reset the scaling ratio */
return updateTransform({
x: 0,
y: 0,
scale: minScale
}, 'touchZoom');
}
var width = imgRef.current.offsetWidth * scale;
var height = imgRef.current.offsetHeight * scale;
// eslint-disable-next-line @typescript-eslint/no-shadow
var _imgRef$current$getBo = imgRef.current.getBoundingClientRect(),
left = _imgRef$current$getBo.left,
top = _imgRef$current$getBo.top;
var isRotate = rotate % 180 !== 0;
var fixState = getFixScaleEleTransPosition(isRotate ? height : width, isRotate ? width : height, left, top);
if (fixState) {
updateTransform((0,objectSpread2/* default */.Z)({}, fixState), 'dragRebound');
}
};
(0,_react_17_0_2_react.useEffect)(function () {
var onTouchMoveListener;
if (visible && movable) {
onTouchMoveListener = (0,addEventListener/* default */.Z)(window, 'touchmove', function (e) {
return e.preventDefault();
}, {
passive: false
});
}
return function () {
var _onTouchMoveListener;
(_onTouchMoveListener = onTouchMoveListener) === null || _onTouchMoveListener === void 0 || _onTouchMoveListener.remove();
};
}, [visible, movable]);
return {
isTouching: isTouching,
onTouchStart: onTouchStart,
onTouchMove: onTouchMove,
onTouchEnd: onTouchEnd
};
}
;
// EXTERNAL MODULE: ./node_modules/_@rc-component_portal@1.1.2@@rc-component/portal/es/index.js + 6 modules
var portal_es = __webpack_require__(43403);
// EXTERNAL MODULE: ./node_modules/_rc-motion@2.9.0@rc-motion/es/index.js + 12 modules
var _rc_motion_2_9_0_rc_motion_es = __webpack_require__(44516);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/Operations.js
var Operations = function Operations(props) {
var visible = props.visible,
maskTransitionName = props.maskTransitionName,
getContainer = props.getContainer,
prefixCls = props.prefixCls,
rootClassName = props.rootClassName,
icons = props.icons,
countRender = props.countRender,
showSwitch = props.showSwitch,
showProgress = props.showProgress,
current = props.current,
transform = props.transform,
count = props.count,
scale = props.scale,
minScale = props.minScale,
maxScale = props.maxScale,
closeIcon = props.closeIcon,
onSwitchLeft = props.onSwitchLeft,
onSwitchRight = props.onSwitchRight,
onClose = props.onClose,
onZoomIn = props.onZoomIn,
onZoomOut = props.onZoomOut,
onRotateRight = props.onRotateRight,
onRotateLeft = props.onRotateLeft,
onFlipX = props.onFlipX,
onFlipY = props.onFlipY,
toolbarRender = props.toolbarRender,
zIndex = props.zIndex;
var groupContext = (0,_react_17_0_2_react.useContext)(PreviewGroupContext);
var rotateLeft = icons.rotateLeft,
rotateRight = icons.rotateRight,
zoomIn = icons.zoomIn,
zoomOut = icons.zoomOut,
close = icons.close,
left = icons.left,
right = icons.right,
flipX = icons.flipX,
flipY = icons.flipY;
var toolClassName = "".concat(prefixCls, "-operations-operation");
_react_17_0_2_react.useEffect(function () {
var onKeyDown = function onKeyDown(e) {
if (e.keyCode === KeyCode/* default */.Z.ESC) {
onClose();
}
};
if (visible) {
window.addEventListener('keydown', onKeyDown);
}
return function () {
window.removeEventListener('keydown', onKeyDown);
};
}, [visible]);
var tools = [{
icon: flipY,
onClick: onFlipY,
type: 'flipY'
}, {
icon: flipX,
onClick: onFlipX,
type: 'flipX'
}, {
icon: rotateLeft,
onClick: onRotateLeft,
type: 'rotateLeft'
}, {
icon: rotateRight,
onClick: onRotateRight,
type: 'rotateRight'
}, {
icon: zoomOut,
onClick: onZoomOut,
type: 'zoomOut',
disabled: scale <= minScale
}, {
icon: zoomIn,
onClick: onZoomIn,
type: 'zoomIn',
disabled: scale === maxScale
}];
var toolsNode = tools.map(function (_ref) {
var _classnames;
var icon = _ref.icon,
onClick = _ref.onClick,
type = _ref.type,
disabled = _ref.disabled;
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: _classnames_2_5_1_classnames_default()(toolClassName, (_classnames = {}, (0,defineProperty/* default */.Z)(_classnames, "".concat(prefixCls, "-operations-operation-").concat(type), true), (0,defineProperty/* default */.Z)(_classnames, "".concat(prefixCls, "-operations-operation-disabled"), !!disabled), _classnames)),
onClick: onClick,
key: type
}, icon);
});
var toolbarNode = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: "".concat(prefixCls, "-operations")
}, toolsNode);
return /*#__PURE__*/_react_17_0_2_react.createElement(_rc_motion_2_9_0_rc_motion_es["default"], {
visible: visible,
motionName: maskTransitionName
}, function (_ref2) {
var className = _ref2.className,
style = _ref2.style;
return /*#__PURE__*/_react_17_0_2_react.createElement(portal_es/* default */.Z, {
open: true,
getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : document.body
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: _classnames_2_5_1_classnames_default()("".concat(prefixCls, "-operations-wrapper"), className, rootClassName),
style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, style), {}, {
zIndex: zIndex
})
}, closeIcon === null ? null : /*#__PURE__*/_react_17_0_2_react.createElement("button", {
className: "".concat(prefixCls, "-close"),
onClick: onClose
}, closeIcon || close), showSwitch && /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: _classnames_2_5_1_classnames_default()("".concat(prefixCls, "-switch-left"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-switch-left-disabled"), current === 0)),
onClick: onSwitchLeft
}, left), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: _classnames_2_5_1_classnames_default()("".concat(prefixCls, "-switch-right"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-switch-right-disabled"), current === count - 1)),
onClick: onSwitchRight
}, right)), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: "".concat(prefixCls, "-footer")
}, showProgress && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: "".concat(prefixCls, "-progress")
}, countRender ? countRender(current + 1, count) : "".concat(current + 1, " / ").concat(count)), toolbarRender ? toolbarRender(toolbarNode, (0,objectSpread2/* default */.Z)({
icons: {
flipYIcon: toolsNode[0],
flipXIcon: toolsNode[1],
rotateLeftIcon: toolsNode[2],
rotateRightIcon: toolsNode[3],
zoomOutIcon: toolsNode[4],
zoomInIcon: toolsNode[5]
},
actions: {
onFlipY: onFlipY,
onFlipX: onFlipX,
onRotateLeft: onRotateLeft,
onRotateRight: onRotateRight,
onZoomOut: onZoomOut,
onZoomIn: onZoomIn
},
transform: transform
}, groupContext ? {
current: current,
total: count
} : {})) : toolbarNode)));
});
};
/* harmony default export */ var es_Operations = (Operations);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/Preview.js
var _excluded = ["fallback", "src", "imgRef"],
_excluded2 = ["prefixCls", "src", "alt", "fallback", "movable", "onClose", "visible", "icons", "rootClassName", "closeIcon", "getContainer", "current", "count", "countRender", "scaleStep", "minScale", "maxScale", "transitionName", "maskTransitionName", "imageRender", "imgCommonProps", "toolbarRender", "onTransform", "onChange"];
var PreviewImage = function PreviewImage(_ref) {
var fallback = _ref.fallback,
src = _ref.src,
imgRef = _ref.imgRef,
props = (0,objectWithoutProperties/* default */.Z)(_ref, _excluded);
var _useStatus = useStatus({
src: src,
fallback: fallback
}),
_useStatus2 = (0,slicedToArray/* default */.Z)(_useStatus, 2),
getImgRef = _useStatus2[0],
srcAndOnload = _useStatus2[1];
return /*#__PURE__*/_react_17_0_2_react.createElement("img", (0,esm_extends/* default */.Z)({
ref: function ref(_ref2) {
imgRef.current = _ref2;
getImgRef(_ref2);
}
}, props, srcAndOnload));
};
var Preview = function Preview(props) {
var prefixCls = props.prefixCls,
src = props.src,
alt = props.alt,
fallback = props.fallback,
_props$movable = props.movable,
movable = _props$movable === void 0 ? true : _props$movable,
onClose = props.onClose,
visible = props.visible,
_props$icons = props.icons,
icons = _props$icons === void 0 ? {} : _props$icons,
rootClassName = props.rootClassName,
closeIcon = props.closeIcon,
getContainer = props.getContainer,
_props$current = props.current,
current = _props$current === void 0 ? 0 : _props$current,
_props$count = props.count,
count = _props$count === void 0 ? 1 : _props$count,
countRender = props.countRender,
_props$scaleStep = props.scaleStep,
scaleStep = _props$scaleStep === void 0 ? 0.5 : _props$scaleStep,
_props$minScale = props.minScale,
minScale = _props$minScale === void 0 ? 1 : _props$minScale,
_props$maxScale = props.maxScale,
maxScale = _props$maxScale === void 0 ? 50 : _props$maxScale,
_props$transitionName = props.transitionName,
transitionName = _props$transitionName === void 0 ? 'zoom' : _props$transitionName,
_props$maskTransition = props.maskTransitionName,
maskTransitionName = _props$maskTransition === void 0 ? 'fade' : _props$maskTransition,
imageRender = props.imageRender,
imgCommonProps = props.imgCommonProps,
toolbarRender = props.toolbarRender,
onTransform = props.onTransform,
onChange = props.onChange,
restProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded2);
var imgRef = (0,_react_17_0_2_react.useRef)();
var groupContext = (0,_react_17_0_2_react.useContext)(PreviewGroupContext);
var showLeftOrRightSwitches = groupContext && count > 1;
var showOperationsProgress = groupContext && count >= 1;
var _useState = (0,_react_17_0_2_react.useState)(true),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
enableTransition = _useState2[0],
setEnableTransition = _useState2[1];
var _useImageTransform = useImageTransform(imgRef, minScale, maxScale, onTransform),
transform = _useImageTransform.transform,
resetTransform = _useImageTransform.resetTransform,
updateTransform = _useImageTransform.updateTransform,
dispatchZoomChange = _useImageTransform.dispatchZoomChange;
var _useMouseEvent = useMouseEvent(imgRef, movable, visible, scaleStep, transform, updateTransform, dispatchZoomChange),
isMoving = _useMouseEvent.isMoving,
onMouseDown = _useMouseEvent.onMouseDown,
onWheel = _useMouseEvent.onWheel;
var _useTouchEvent = useTouchEvent(imgRef, movable, visible, minScale, transform, updateTransform, dispatchZoomChange),
isTouching = _useTouchEvent.isTouching,
onTouchStart = _useTouchEvent.onTouchStart,
onTouchMove = _useTouchEvent.onTouchMove,
onTouchEnd = _useTouchEvent.onTouchEnd;
var rotate = transform.rotate,
scale = transform.scale;
var wrapClassName = _classnames_2_5_1_classnames_default()((0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-moving"), isMoving));
(0,_react_17_0_2_react.useEffect)(function () {
if (!enableTransition) {
setEnableTransition(true);
}
}, [enableTransition]);
var onAfterClose = function onAfterClose() {
resetTransform('close');
};
var onZoomIn = function onZoomIn() {
dispatchZoomChange(BASE_SCALE_RATIO + scaleStep, 'zoomIn');
};
var onZoomOut = function onZoomOut() {
dispatchZoomChange(BASE_SCALE_RATIO / (BASE_SCALE_RATIO + scaleStep), 'zoomOut');
};
var onRotateRight = function onRotateRight() {
updateTransform({
rotate: rotate + 90
}, 'rotateRight');
};
var onRotateLeft = function onRotateLeft() {
updateTransform({
rotate: rotate - 90
}, 'rotateLeft');
};
var onFlipX = function onFlipX() {
updateTransform({
flipX: !transform.flipX
}, 'flipX');
};
var onFlipY = function onFlipY() {
updateTransform({
flipY: !transform.flipY
}, 'flipY');
};
var onSwitchLeft = function onSwitchLeft(event) {
event === null || event === void 0 || event.preventDefault();
event === null || event === void 0 || event.stopPropagation();
if (current > 0) {
setEnableTransition(false);
resetTransform('prev');
onChange === null || onChange === void 0 || onChange(current - 1, current);
}
};
var onSwitchRight = function onSwitchRight(event) {
event === null || event === void 0 || event.preventDefault();
event === null || event === void 0 || event.stopPropagation();
if (current < count - 1) {
setEnableTransition(false);
resetTransform('next');
onChange === null || onChange === void 0 || onChange(current + 1, current);
}
};
var onKeyDown = function onKeyDown(event) {
if (!visible || !showLeftOrRightSwitches) return;
if (event.keyCode === KeyCode/* default */.Z.LEFT) {
onSwitchLeft();
} else if (event.keyCode === KeyCode/* default */.Z.RIGHT) {
onSwitchRight();
}
};
var onDoubleClick = function onDoubleClick(event) {
if (visible) {
if (scale !== 1) {
updateTransform({
x: 0,
y: 0,
scale: 1
}, 'doubleClick');
} else {
dispatchZoomChange(BASE_SCALE_RATIO + scaleStep, 'doubleClick', event.clientX, event.clientY);
}
}
};
(0,_react_17_0_2_react.useEffect)(function () {
var onKeyDownListener = (0,addEventListener/* default */.Z)(window, 'keydown', onKeyDown, false);
return function () {
onKeyDownListener.remove();
};
}, [visible, showLeftOrRightSwitches, current]);
var imgNode = /*#__PURE__*/_react_17_0_2_react.createElement(PreviewImage, (0,esm_extends/* default */.Z)({}, imgCommonProps, {
width: props.width,
height: props.height,
imgRef: imgRef,
className: "".concat(prefixCls, "-img"),
alt: alt,
style: {
transform: "translate3d(".concat(transform.x, "px, ").concat(transform.y, "px, 0) scale3d(").concat(transform.flipX ? '-' : '').concat(scale, ", ").concat(transform.flipY ? '-' : '').concat(scale, ", 1) rotate(").concat(rotate, "deg)"),
transitionDuration: (!enableTransition || isTouching) && '0s'
},
fallback: fallback,
src: src,
onWheel: onWheel,
onMouseDown: onMouseDown,
onDoubleClick: onDoubleClick,
onTouchStart: onTouchStart,
onTouchMove: onTouchMove,
onTouchEnd: onTouchEnd,
onTouchCancel: onTouchEnd
}));
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, (0,esm_extends/* default */.Z)({
transitionName: transitionName,
maskTransitionName: maskTransitionName,
closable: false,
keyboard: true,
prefixCls: prefixCls,
onClose: onClose,
visible: visible,
classNames: {
wrapper: wrapClassName
},
rootClassName: rootClassName,
getContainer: getContainer
}, restProps, {
afterClose: onAfterClose
}), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: "".concat(prefixCls, "-img-wrapper")
}, imageRender ? imageRender(imgNode, (0,objectSpread2/* default */.Z)({
transform: transform
}, groupContext ? {
current: current
} : {})) : imgNode)), /*#__PURE__*/_react_17_0_2_react.createElement(es_Operations, {
visible: visible,
transform: transform,
maskTransitionName: maskTransitionName,
closeIcon: closeIcon,
getContainer: getContainer,
prefixCls: prefixCls,
rootClassName: rootClassName,
icons: icons,
countRender: countRender,
showSwitch: showLeftOrRightSwitches,
showProgress: showOperationsProgress,
current: current,
count: count,
scale: scale,
minScale: minScale,
maxScale: maxScale,
toolbarRender: toolbarRender,
onSwitchLeft: onSwitchLeft,
onSwitchRight: onSwitchRight,
onZoomIn: onZoomIn,
onZoomOut: onZoomOut,
onRotateRight: onRotateRight,
onRotateLeft: onRotateLeft,
onFlipX: onFlipX,
onFlipY: onFlipY,
onClose: onClose,
zIndex: restProps.zIndex !== undefined ? restProps.zIndex + 1 : undefined
}));
};
/* harmony default export */ var es_Preview = (Preview);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__(69202);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/hooks/usePreviewItems.js
/**
* Merge props provided `items` or context collected images
*/
function usePreviewItems(items) {
// Context collection image data
var _React$useState = _react_17_0_2_react.useState({}),
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
images = _React$useState2[0],
setImages = _React$useState2[1];
var registerImage = _react_17_0_2_react.useCallback(function (id, data) {
setImages(function (imgs) {
return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, imgs), {}, (0,defineProperty/* default */.Z)({}, id, data));
});
return function () {
setImages(function (imgs) {
var cloneImgs = (0,objectSpread2/* default */.Z)({}, imgs);
delete cloneImgs[id];
return cloneImgs;
});
};
}, []);
// items
var mergedItems = _react_17_0_2_react.useMemo(function () {
if (items) {
return items.map(function (item) {
if (typeof item === 'string') {
return {
data: {
src: item
}
};
}
var data = {};
Object.keys(item).forEach(function (key) {
if (['src'].concat((0,toConsumableArray/* default */.Z)(COMMON_PROPS)).includes(key)) {
data[key] = item[key];
}
});
return {
data: data
};
});
}
return Object.keys(images).reduce(function (total, id) {
var _images$id = images[id],
canPreview = _images$id.canPreview,
data = _images$id.data;
if (canPreview) {
total.push({
data: data,
id: id
});
}
return total;
}, []);
}, [items, images]);
return [mergedItems, registerImage];
}
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/PreviewGroup.js
var PreviewGroup_excluded = ["visible", "onVisibleChange", "getContainer", "current", "movable", "minScale", "maxScale", "countRender", "closeIcon", "onChange", "onTransform", "toolbarRender", "imageRender"],
PreviewGroup_excluded2 = ["src"];
var Group = function Group(_ref) {
var _mergedItems$current;
var _ref$previewPrefixCls = _ref.previewPrefixCls,
previewPrefixCls = _ref$previewPrefixCls === void 0 ? 'rc-image-preview' : _ref$previewPrefixCls,
children = _ref.children,
_ref$icons = _ref.icons,
icons = _ref$icons === void 0 ? {} : _ref$icons,
items = _ref.items,
preview = _ref.preview,
fallback = _ref.fallback;
var _ref2 = (0,esm_typeof/* default */.Z)(preview) === 'object' ? preview : {},
previewVisible = _ref2.visible,
onVisibleChange = _ref2.onVisibleChange,
getContainer = _ref2.getContainer,
currentIndex = _ref2.current,
movable = _ref2.movable,
minScale = _ref2.minScale,
maxScale = _ref2.maxScale,
countRender = _ref2.countRender,
closeIcon = _ref2.closeIcon,
onChange = _ref2.onChange,
onTransform = _ref2.onTransform,
toolbarRender = _ref2.toolbarRender,
imageRender = _ref2.imageRender,
dialogProps = (0,objectWithoutProperties/* default */.Z)(_ref2, PreviewGroup_excluded);
// ========================== Items ===========================
var _usePreviewItems = usePreviewItems(items),
_usePreviewItems2 = (0,slicedToArray/* default */.Z)(_usePreviewItems, 2),
mergedItems = _usePreviewItems2[0],
register = _usePreviewItems2[1];
// ========================= Preview ==========================
// >>> Index
var _useMergedState = (0,useMergedState/* default */.Z)(0, {
value: currentIndex
}),
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
current = _useMergedState2[0],
setCurrent = _useMergedState2[1];
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
keepOpenIndex = _useState2[0],
setKeepOpenIndex = _useState2[1];
// >>> Image
var _ref3 = ((_mergedItems$current = mergedItems[current]) === null || _mergedItems$current === void 0 ? void 0 : _mergedItems$current.data) || {},
src = _ref3.src,
imgCommonProps = (0,objectWithoutProperties/* default */.Z)(_ref3, PreviewGroup_excluded2);
// >>> Visible
var _useMergedState3 = (0,useMergedState/* default */.Z)(!!previewVisible, {
value: previewVisible,
onChange: function onChange(val, prevVal) {
onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(val, prevVal, current);
}
}),
_useMergedState4 = (0,slicedToArray/* default */.Z)(_useMergedState3, 2),
isShowPreview = _useMergedState4[0],
setShowPreview = _useMergedState4[1];
// >>> Position
var _useState3 = (0,_react_17_0_2_react.useState)(null),
_useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2),
mousePosition = _useState4[0],
setMousePosition = _useState4[1];
var onPreviewFromImage = _react_17_0_2_react.useCallback(function (id, mouseX, mouseY) {
var index = mergedItems.findIndex(function (item) {
return item.id === id;
});
setShowPreview(true);
setMousePosition({
x: mouseX,
y: mouseY
});
setCurrent(index < 0 ? 0 : index);
setKeepOpenIndex(true);
}, [mergedItems]);
// Reset current when reopen
_react_17_0_2_react.useEffect(function () {
if (isShowPreview) {
if (!keepOpenIndex) {
setCurrent(0);
}
} else {
setKeepOpenIndex(false);
}
}, [isShowPreview]);
// ========================== Events ==========================
var onInternalChange = function onInternalChange(next, prev) {
setCurrent(next);
onChange === null || onChange === void 0 || onChange(next, prev);
};
var onPreviewClose = function onPreviewClose() {
setShowPreview(false);
setMousePosition(null);
};
// ========================= Context ==========================
var previewGroupContext = _react_17_0_2_react.useMemo(function () {
return {
register: register,
onPreview: onPreviewFromImage
};
}, [register, onPreviewFromImage]);
// ========================== Render ==========================
return /*#__PURE__*/_react_17_0_2_react.createElement(PreviewGroupContext.Provider, {
value: previewGroupContext
}, children, /*#__PURE__*/_react_17_0_2_react.createElement(es_Preview, (0,esm_extends/* default */.Z)({
"aria-hidden": !isShowPreview,
movable: movable,
visible: isShowPreview,
prefixCls: previewPrefixCls,
closeIcon: closeIcon,
onClose: onPreviewClose,
mousePosition: mousePosition,
imgCommonProps: imgCommonProps,
src: src,
fallback: fallback,
icons: icons,
minScale: minScale,
maxScale: maxScale,
getContainer: getContainer,
current: current,
count: mergedItems.length,
countRender: countRender,
onTransform: onTransform,
toolbarRender: toolbarRender,
imageRender: imageRender,
onChange: onInternalChange
}, dialogProps)));
};
/* harmony default export */ var PreviewGroup = (Group);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/Image.js
var Image_excluded = ["src", "alt", "onPreviewClose", "prefixCls", "previewPrefixCls", "placeholder", "fallback", "width", "height", "style", "preview", "className", "onClick", "onError", "wrapperClassName", "wrapperStyle", "rootClassName"],
Image_excluded2 = ["src", "visible", "onVisibleChange", "getContainer", "mask", "maskClassName", "movable", "icons", "scaleStep", "minScale", "maxScale", "imageRender", "toolbarRender"];
var ImageInternal = function ImageInternal(props) {
var imgSrc = props.src,
alt = props.alt,
onInitialPreviewClose = props.onPreviewClose,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-image' : _props$prefixCls,
_props$previewPrefixC = props.previewPrefixCls,
previewPrefixCls = _props$previewPrefixC === void 0 ? "".concat(prefixCls, "-preview") : _props$previewPrefixC,
placeholder = props.placeholder,
fallback = props.fallback,
width = props.width,
height = props.height,
style = props.style,
_props$preview = props.preview,
preview = _props$preview === void 0 ? true : _props$preview,
className = props.className,
onClick = props.onClick,
onError = props.onError,
wrapperClassName = props.wrapperClassName,
wrapperStyle = props.wrapperStyle,
rootClassName = props.rootClassName,
otherProps = (0,objectWithoutProperties/* default */.Z)(props, Image_excluded);
var isCustomPlaceholder = placeholder && placeholder !== true;
var _ref = (0,esm_typeof/* default */.Z)(preview) === 'object' ? preview : {},
previewSrc = _ref.src,
_ref$visible = _ref.visible,
previewVisible = _ref$visible === void 0 ? undefined : _ref$visible,
_ref$onVisibleChange = _ref.onVisibleChange,
onPreviewVisibleChange = _ref$onVisibleChange === void 0 ? onInitialPreviewClose : _ref$onVisibleChange,
_ref$getContainer = _ref.getContainer,
getPreviewContainer = _ref$getContainer === void 0 ? undefined : _ref$getContainer,
previewMask = _ref.mask,
maskClassName = _ref.maskClassName,
movable = _ref.movable,
icons = _ref.icons,
scaleStep = _ref.scaleStep,
minScale = _ref.minScale,
maxScale = _ref.maxScale,
imageRender = _ref.imageRender,
toolbarRender = _ref.toolbarRender,
dialogProps = (0,objectWithoutProperties/* default */.Z)(_ref, Image_excluded2);
var src = previewSrc !== null && previewSrc !== void 0 ? previewSrc : imgSrc;
var _useMergedState = (0,useMergedState/* default */.Z)(!!previewVisible, {
value: previewVisible,
onChange: onPreviewVisibleChange
}),
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
isShowPreview = _useMergedState2[0],
setShowPreview = _useMergedState2[1];
var _useStatus = useStatus({
src: imgSrc,
isCustomPlaceholder: isCustomPlaceholder,
fallback: fallback
}),
_useStatus2 = (0,slicedToArray/* default */.Z)(_useStatus, 3),
getImgRef = _useStatus2[0],
srcAndOnload = _useStatus2[1],
status = _useStatus2[2];
var _useState = (0,_react_17_0_2_react.useState)(null),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
mousePosition = _useState2[0],
setMousePosition = _useState2[1];
var groupContext = (0,_react_17_0_2_react.useContext)(PreviewGroupContext);
var canPreview = !!preview;
var onPreviewClose = function onPreviewClose() {
setShowPreview(false);
setMousePosition(null);
};
var wrapperClass = _classnames_2_5_1_classnames_default()(prefixCls, wrapperClassName, rootClassName, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-error"), status === 'error'));
// ========================= ImageProps =========================
var imgCommonProps = (0,_react_17_0_2_react.useMemo)(function () {
var obj = {};
COMMON_PROPS.forEach(function (prop) {
if (props[prop] !== undefined) {
obj[prop] = props[prop];
}
});
return obj;
}, COMMON_PROPS.map(function (prop) {
return props[prop];
}));
// ========================== Register ==========================
var registerData = (0,_react_17_0_2_react.useMemo)(function () {
return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, imgCommonProps), {}, {
src: src
});
}, [src, imgCommonProps]);
var imageId = useRegisterImage(canPreview, registerData);
// ========================== Preview ===========================
var onPreview = function onPreview(e) {
var _getOffset = (0,css/* getOffset */.os)(e.target),
left = _getOffset.left,
top = _getOffset.top;
if (groupContext) {
groupContext.onPreview(imageId, left, top);
} else {
setMousePosition({
x: left,
y: top
});
setShowPreview(true);
}
onClick === null || onClick === void 0 || onClick(e);
};
// =========================== Render ===========================
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("div", (0,esm_extends/* default */.Z)({}, otherProps, {
className: wrapperClass,
onClick: canPreview ? onPreview : onClick,
style: (0,objectSpread2/* default */.Z)({
width: width,
height: height
}, wrapperStyle)
}), /*#__PURE__*/_react_17_0_2_react.createElement("img", (0,esm_extends/* default */.Z)({}, imgCommonProps, {
className: _classnames_2_5_1_classnames_default()("".concat(prefixCls, "-img"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-img-placeholder"), placeholder === true), className),
style: (0,objectSpread2/* default */.Z)({
height: height
}, style),
ref: getImgRef
}, srcAndOnload, {
width: width,
height: height,
onError: onError
})), status === 'loading' && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
"aria-hidden": "true",
className: "".concat(prefixCls, "-placeholder")
}, placeholder), previewMask && canPreview && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: _classnames_2_5_1_classnames_default()("".concat(prefixCls, "-mask"), maskClassName),
style: {
display: (style === null || style === void 0 ? void 0 : style.display) === 'none' ? 'none' : undefined
}
}, previewMask)), !groupContext && canPreview && /*#__PURE__*/_react_17_0_2_react.createElement(es_Preview, (0,esm_extends/* default */.Z)({
"aria-hidden": !isShowPreview,
visible: isShowPreview,
prefixCls: previewPrefixCls,
onClose: onPreviewClose,
mousePosition: mousePosition,
src: src,
alt: alt,
fallback: fallback,
getContainer: getPreviewContainer,
icons: icons,
movable: movable,
scaleStep: scaleStep,
minScale: minScale,
maxScale: maxScale,
rootClassName: rootClassName,
imageRender: imageRender,
imgCommonProps: imgCommonProps,
toolbarRender: toolbarRender
}, dialogProps)));
};
ImageInternal.PreviewGroup = PreviewGroup;
ImageInternal.displayName = 'Image';
/* harmony default export */ var Image = (ImageInternal);
;// CONCATENATED MODULE: ./node_modules/_rc-image@7.5.1@rc-image/es/index.js
/* harmony default export */ var _rc_image_7_5_1_rc_image_es = (Image);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/_util/hooks/useZIndex.js
var useZIndex = __webpack_require__(89747);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/_util/motion.js
var motion = __webpack_require__(3);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/config-provider/context.js
var context = __webpack_require__(70330);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/locale/en_US.js + 1 modules
var en_US = __webpack_require__(48922);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
var CloseOutlined = __webpack_require__(99174);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules
var LeftOutlined = __webpack_require__(52063);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/RightOutlined.js + 1 modules
var RightOutlined = __webpack_require__(22311);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/RotateLeftOutlined.js
// This icon file is generated automatically.
var RotateLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" } }, { "tag": "path", "attrs": { "d": "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" } }] }, "name": "rotate-left", "theme": "outlined" };
/* harmony default export */ var asn_RotateLeftOutlined = (RotateLeftOutlined);
// 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/RotateLeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var RotateLeftOutlined_RotateLeftOutlined = function RotateLeftOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_RotateLeftOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_RotateLeftOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(RotateLeftOutlined_RotateLeftOutlined));
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/RotateRightOutlined.js
// This icon file is generated automatically.
var RotateRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" } }, { "tag": "path", "attrs": { "d": "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" } }] }, "name": "rotate-right", "theme": "outlined" };
/* harmony default export */ var asn_RotateRightOutlined = (RotateRightOutlined);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/RotateRightOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var RotateRightOutlined_RotateRightOutlined = function RotateRightOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_RotateRightOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_RotateRightOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(RotateRightOutlined_RotateRightOutlined));
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/SwapOutlined.js
// This icon file is generated automatically.
var SwapOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "swap", "theme": "outlined" };
/* harmony default export */ var asn_SwapOutlined = (SwapOutlined);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SwapOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SwapOutlined_SwapOutlined = function SwapOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_SwapOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_SwapOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(SwapOutlined_SwapOutlined));
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/ZoomInOutlined.js
// This icon file is generated automatically.
var ZoomInOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, "name": "zoom-in", "theme": "outlined" };
/* harmony default export */ var asn_ZoomInOutlined = (ZoomInOutlined);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ZoomInOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ZoomInOutlined_ZoomInOutlined = function ZoomInOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ZoomInOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_ZoomInOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ZoomInOutlined_ZoomInOutlined));
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/ZoomOutOutlined.js
// This icon file is generated automatically.
var ZoomOutOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, "name": "zoom-out", "theme": "outlined" };
/* harmony default export */ var asn_ZoomOutOutlined = (ZoomOutOutlined);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ZoomOutOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ZoomOutOutlined_ZoomOutOutlined = function ZoomOutOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ZoomOutOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_ZoomOutOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ZoomOutOutlined_ZoomOutOutlined));
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/config-provider/hooks/useCSSVarCls.js
var useCSSVarCls = __webpack_require__(70559);
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.2@@ant-design/cssinjs/es/index.js + 35 modules
var cssinjs_es = __webpack_require__(3775);
// EXTERNAL MODULE: ./node_modules/_@ctrl_tinycolor@3.6.1@@ctrl/tinycolor/dist/module/index.js
var dist_module = __webpack_require__(64993);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/modal/style/index.js
var style = __webpack_require__(18137);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/style/index.js
var es_style = __webpack_require__(78605);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/style/motion/zoom.js
var zoom = __webpack_require__(71788);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/style/motion/fade.js
var fade = __webpack_require__(49106);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/genComponentStyleHook.js + 5 modules
var genComponentStyleHook = __webpack_require__(16613);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(35577);
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/image/style/index.js
const genBoxStyle = position => ({
position: position || 'absolute',
inset: 0
});
const genImageMaskStyle = token => {
const {
iconCls,
motionDurationSlow,
paddingXXS,
marginXXS,
prefixCls,
colorTextLightSolid
} = token;
return {
position: 'absolute',
inset: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
color: colorTextLightSolid,
background: new dist_module/* TinyColor */.C('#000').setAlpha(0.5).toRgbString(),
cursor: 'pointer',
opacity: 0,
transition: `opacity ${motionDurationSlow}`,
[`.${prefixCls}-mask-info`]: Object.assign(Object.assign({}, es_style/* textEllipsis */.vS), {
padding: `0 ${(0,cssinjs_es.unit)(paddingXXS)}`,
[iconCls]: {
marginInlineEnd: marginXXS,
svg: {
verticalAlign: 'baseline'
}
}
})
};
};
const genPreviewOperationsStyle = token => {
const {
previewCls,
modalMaskBg,
paddingSM,
marginXL,
margin,
paddingLG,
previewOperationColorDisabled,
previewOperationHoverColor,
motionDurationSlow,
iconCls,
colorTextLightSolid
} = token;
const operationBg = new dist_module/* TinyColor */.C(modalMaskBg).setAlpha(0.1);
const operationBgHover = operationBg.clone().setAlpha(0.2);
return {
[`${previewCls}-footer`]: {
position: 'fixed',
bottom: marginXL,
left: {
_skip_check_: true,
value: 0
},
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
color: token.previewOperationColor
},
[`${previewCls}-progress`]: {
marginBottom: margin
},
[`${previewCls}-close`]: {
position: 'fixed',
top: marginXL,
right: {
_skip_check_: true,
value: marginXL
},
display: 'flex',
color: colorTextLightSolid,
backgroundColor: operationBg.toRgbString(),
borderRadius: '50%',
padding: paddingSM,
outline: 0,
border: 0,
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
'&:hover': {
backgroundColor: operationBgHover.toRgbString()
},
[`& > ${iconCls}`]: {
fontSize: token.previewOperationSize
}
},
[`${previewCls}-operations`]: {
display: 'flex',
alignItems: 'center',
padding: `0 ${(0,cssinjs_es.unit)(paddingLG)}`,
backgroundColor: operationBg.toRgbString(),
borderRadius: 100,
'&-operation': {
marginInlineStart: paddingSM,
padding: paddingSM,
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
userSelect: 'none',
[`&:not(${previewCls}-operations-operation-disabled):hover > ${iconCls}`]: {
color: previewOperationHoverColor
},
'&-disabled': {
color: previewOperationColorDisabled,
cursor: 'not-allowed'
},
'&:first-of-type': {
marginInlineStart: 0
},
[`& > ${iconCls}`]: {
fontSize: token.previewOperationSize
}
}
}
};
};
const genPreviewSwitchStyle = token => {
const {
modalMaskBg,
iconCls,
previewOperationColorDisabled,
previewCls,
zIndexPopup,
motionDurationSlow
} = token;
const operationBg = new dist_module/* TinyColor */.C(modalMaskBg).setAlpha(0.1);
const operationBgHover = operationBg.clone().setAlpha(0.2);
return {
[`${previewCls}-switch-left, ${previewCls}-switch-right`]: {
position: 'fixed',
insetBlockStart: '50%',
zIndex: token.calc(zIndexPopup).add(1).equal({
unit: false
}),
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: token.imagePreviewSwitchSize,
height: token.imagePreviewSwitchSize,
marginTop: token.calc(token.imagePreviewSwitchSize).mul(-1).div(2).equal(),
color: token.previewOperationColor,
background: operationBg.toRgbString(),
borderRadius: '50%',
transform: `translateY(-50%)`,
cursor: 'pointer',
transition: `all ${motionDurationSlow}`,
userSelect: 'none',
'&:hover': {
background: operationBgHover.toRgbString()
},
[`&-disabled`]: {
'&, &:hover': {
color: previewOperationColorDisabled,
background: 'transparent',
cursor: 'not-allowed',
[`> ${iconCls}`]: {
cursor: 'not-allowed'
}
}
},
[`> ${iconCls}`]: {
fontSize: token.previewOperationSize
}
},
[`${previewCls}-switch-left`]: {
insetInlineStart: token.marginSM
},
[`${previewCls}-switch-right`]: {
insetInlineEnd: token.marginSM
}
};
};
const genImagePreviewStyle = token => {
const {
motionEaseOut,
previewCls,
motionDurationSlow,
componentCls
} = token;
return [{
[`${componentCls}-preview-root`]: {
[previewCls]: {
height: '100%',
textAlign: 'center',
pointerEvents: 'none'
},
[`${previewCls}-body`]: Object.assign(Object.assign({}, genBoxStyle()), {
overflow: 'hidden'
}),
[`${previewCls}-img`]: {
maxWidth: '100%',
maxHeight: '70%',
verticalAlign: 'middle',
transform: 'scale3d(1, 1, 1)',
cursor: 'grab',
transition: `transform ${motionDurationSlow} ${motionEaseOut} 0s`,
userSelect: 'none',
'&-wrapper': Object.assign(Object.assign({}, genBoxStyle()), {
transition: `transform ${motionDurationSlow} ${motionEaseOut} 0s`,
// https://github.com/ant-design/ant-design/issues/39913
// TailwindCSS will reset img default style.
// Let's set back.
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
'& > *': {
pointerEvents: 'auto'
},
'&::before': {
display: 'inline-block',
width: 1,
height: '50%',
marginInlineEnd: -1,
content: '""'
}
})
},
[`${previewCls}-moving`]: {
[`${previewCls}-preview-img`]: {
cursor: 'grabbing',
'&-wrapper': {
transitionDuration: '0s'
}
}
}
}
},
// Override
{
[`${componentCls}-preview-root`]: {
[`${previewCls}-wrap`]: {
zIndex: token.zIndexPopup
}
}
},
// Preview operations & switch
{
[`${componentCls}-preview-operations-wrapper`]: {
position: 'fixed',
zIndex: token.calc(token.zIndexPopup).add(1).equal({
unit: false
})
},
'&': [genPreviewOperationsStyle(token), genPreviewSwitchStyle(token)]
}];
};
const genImageStyle = token => {
const {
componentCls
} = token;
return {
// ============================== image ==============================
[componentCls]: {
position: 'relative',
display: 'inline-block',
[`${componentCls}-img`]: {
width: '100%',
height: 'auto',
verticalAlign: 'middle'
},
[`${componentCls}-img-placeholder`]: {
backgroundColor: token.colorBgContainerDisabled,
backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center center',
backgroundSize: '30%'
},
[`${componentCls}-mask`]: Object.assign({}, genImageMaskStyle(token)),
[`${componentCls}-mask:hover`]: {
opacity: 1
},
[`${componentCls}-placeholder`]: Object.assign({}, genBoxStyle())
}
};
};
const genPreviewMotion = token => {
const {
previewCls
} = token;
return {
[`${previewCls}-root`]: (0,zoom/* initZoomMotion */._y)(token, 'zoom'),
[`&`]: (0,fade/* initFadeMotion */.J$)(token, true)
};
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
zIndexPopup: token.zIndexPopupBase + 80,
previewOperationColor: new dist_module/* TinyColor */.C(token.colorTextLightSolid).setAlpha(0.65).toRgbString(),
previewOperationHoverColor: new dist_module/* TinyColor */.C(token.colorTextLightSolid).setAlpha(0.85).toRgbString(),
previewOperationColorDisabled: new dist_module/* TinyColor */.C(token.colorTextLightSolid).setAlpha(0.25).toRgbString(),
previewOperationSize: token.fontSizeIcon * 1.5 // FIXME: fontSizeIconLG
});
/* harmony default export */ var image_style = ((0,genComponentStyleHook/* genStyleHooks */.I$)('Image', token => {
const previewCls = `${token.componentCls}-preview`;
const imageToken = (0,statistic/* merge */.TS)(token, {
previewCls,
modalMaskBg: new dist_module/* TinyColor */.C('#000').setAlpha(0.45).toRgbString(),
// FIXME: Shared Token
imagePreviewSwitchSize: token.controlHeightLG
});
return [genImageStyle(imageToken), genImagePreviewStyle(imageToken), (0,style/* genModalMaskStyle */.QA)((0,statistic/* merge */.TS)(imageToken, {
componentCls: previewCls
})), genPreviewMotion(imageToken)];
}, prepareComponentToken));
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/image/PreviewGroup.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 icons = {
rotateLeft: /*#__PURE__*/_react_17_0_2_react.createElement(icons_RotateLeftOutlined, null),
rotateRight: /*#__PURE__*/_react_17_0_2_react.createElement(icons_RotateRightOutlined, null),
zoomIn: /*#__PURE__*/_react_17_0_2_react.createElement(icons_ZoomInOutlined, null),
zoomOut: /*#__PURE__*/_react_17_0_2_react.createElement(icons_ZoomOutOutlined, null),
close: /*#__PURE__*/_react_17_0_2_react.createElement(CloseOutlined/* default */.Z, null),
left: /*#__PURE__*/_react_17_0_2_react.createElement(LeftOutlined/* default */.Z, null),
right: /*#__PURE__*/_react_17_0_2_react.createElement(RightOutlined/* default */.Z, null),
flipX: /*#__PURE__*/_react_17_0_2_react.createElement(icons_SwapOutlined, null),
flipY: /*#__PURE__*/_react_17_0_2_react.createElement(icons_SwapOutlined, {
rotate: 90
})
};
const InternalPreviewGroup = _a => {
var {
previewPrefixCls: customizePrefixCls,
preview
} = _a,
props = __rest(_a, ["previewPrefixCls", "preview"]);
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = getPrefixCls('image', customizePrefixCls);
const previewPrefixCls = `${prefixCls}-preview`;
const rootPrefixCls = getPrefixCls();
const rootCls = (0,useCSSVarCls/* default */.Z)(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = image_style(prefixCls, rootCls);
const [zIndex] = (0,useZIndex/* useZIndex */.Cn)('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);
const mergedPreview = _react_17_0_2_react.useMemo(() => {
var _a;
if (preview === false) {
return preview;
}
const _preview = typeof preview === 'object' ? preview : {};
const mergedRootClassName = _classnames_2_5_1_classnames_default()(hashId, cssVarCls, rootCls, (_a = _preview.rootClassName) !== null && _a !== void 0 ? _a : '');
return Object.assign(Object.assign({}, _preview), {
transitionName: (0,motion/* getTransitionName */.m)(rootPrefixCls, 'zoom', _preview.transitionName),
maskTransitionName: (0,motion/* getTransitionName */.m)(rootPrefixCls, 'fade', _preview.maskTransitionName),
rootClassName: mergedRootClassName,
zIndex
});
}, [preview]);
return wrapCSSVar( /*#__PURE__*/_react_17_0_2_react.createElement(_rc_image_7_5_1_rc_image_es.PreviewGroup, Object.assign({
preview: mergedPreview,
previewPrefixCls: previewPrefixCls,
icons: icons
}, props)));
};
/* harmony default export */ var image_PreviewGroup = (InternalPreviewGroup);
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/image/index.js
"use client";
var image_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 image_Image = props => {
const {
prefixCls: customizePrefixCls,
preview,
className,
rootClassName,
style
} = props,
otherProps = image_rest(props, ["prefixCls", "preview", "className", "rootClassName", "style"]);
const {
getPrefixCls,
locale: contextLocale = en_US/* default */.Z,
getPopupContainer: getContextPopupContainer,
image
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = getPrefixCls('image', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const imageLocale = contextLocale.Image || en_US/* default */.Z.Image;
// Style
const rootCls = (0,useCSSVarCls/* default */.Z)(prefixCls);
const [wrapCSSVar, hashId, cssVarCls] = image_style(prefixCls, rootCls);
const mergedRootClassName = _classnames_2_5_1_classnames_default()(rootClassName, hashId, cssVarCls, rootCls);
const mergedClassName = _classnames_2_5_1_classnames_default()(className, hashId, image === null || image === void 0 ? void 0 : image.className);
const [zIndex] = (0,useZIndex/* useZIndex */.Cn)('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);
const mergedPreview = _react_17_0_2_react.useMemo(() => {
if (preview === false) {
return preview;
}
const _preview = typeof preview === 'object' ? preview : {};
const {
getContainer
} = _preview,
restPreviewProps = image_rest(_preview, ["getContainer"]);
return Object.assign(Object.assign({
mask: ( /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${prefixCls}-mask-info`
}, /*#__PURE__*/_react_17_0_2_react.createElement(EyeOutlined/* default */.Z, null), imageLocale === null || imageLocale === void 0 ? void 0 : imageLocale.preview)),
icons: icons
}, restPreviewProps), {
getContainer: getContainer || getContextPopupContainer,
transitionName: (0,motion/* getTransitionName */.m)(rootPrefixCls, 'zoom', _preview.transitionName),
maskTransitionName: (0,motion/* getTransitionName */.m)(rootPrefixCls, 'fade', _preview.maskTransitionName),
zIndex
});
}, [preview, imageLocale]);
const mergedStyle = Object.assign(Object.assign({}, image === null || image === void 0 ? void 0 : image.style), style);
return wrapCSSVar( /*#__PURE__*/_react_17_0_2_react.createElement(_rc_image_7_5_1_rc_image_es, Object.assign({
prefixCls: prefixCls,
preview: mergedPreview,
rootClassName: mergedRootClassName,
className: mergedClassName,
style: mergedStyle
}, otherProps)));
};
image_Image.PreviewGroup = image_PreviewGroup;
if (false) {}
/* harmony default export */ var es_image = (image_Image);
/***/ }),
/***/ 51127:
/*!*********************************************************************!*\
!*** ./node_modules/_antd@5.12.8@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.8@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(38850);
// 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.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(85005);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(69818);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(46130);
// 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_5_1_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_5_1_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.12.8@antd/es/config-provider/context.js
var context = __webpack_require__(70330);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(17054);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/style/index.js
var style = __webpack_require__(78605);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/genComponentStyleHook.js + 5 modules
var genComponentStyleHook = __webpack_require__(16613);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(35577);
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.2@@ant-design/cssinjs/es/index.js + 35 modules
var cssinjs_es = __webpack_require__(3775);
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/rate/style/index.js
const genRateStarStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-star`]: {
position: 'relative',
display: 'inline-block',
color: 'inherit',
cursor: 'pointer',
'&:not(:last-child)': {
marginInlineEnd: token.marginXS
},
'> div': {
transition: `all ${token.motionDurationMid}, outline 0s`,
'&:hover': {
transform: token.starHoverScale
},
'&:focus': {
outline: 0
},
'&:focus-visible': {
outline: `${(0,cssinjs_es.unit)(token.lineWidth)} dashed ${token.starColor}`,
transform: token.starHoverScale
}
},
'&-first, &-second': {
color: token.starBg,
transition: `all ${token.motionDurationMid}`,
userSelect: 'none'
},
'&-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({}, (0,style/* resetComponent */.Wf)(token)), {
display: 'inline-block',
margin: 0,
padding: 0,
color: token.starColor,
fontSize: token.starSize,
lineHeight: 1,
listStyle: 'none',
outline: 'none',
// disable styles
[`&-disabled${componentCls} ${componentCls}-star`]: {
cursor: 'default',
'> div:hover': {
transform: 'scale(1)'
}
}
}), genRateStarStyle(token)), genRateRtlStyle(token))
};
};
// ============================== Export ==============================
const prepareComponentToken = token => ({
starColor: token.yellow6,
starSize: token.controlHeightLG * 0.5,
starHoverScale: 'scale(1.1)',
starBg: token.colorFillContent
});
/* harmony default export */ var rate_style = ((0,genComponentStyleHook/* genStyleHooks */.I$)('Rate', token => {
const rateToken = (0,statistic/* merge */.TS)(token, {});
return [genRateStyle(rateToken)];
}, prepareComponentToken));
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@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 [wrapCSSVar, hashId, cssVarCls] = rate_style(ratePrefixCls);
const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);
return wrapCSSVar( /*#__PURE__*/_react_17_0_2_react.createElement(es, Object.assign({
ref: ref,
character: character,
characterRender: characterRender
}, rest, {
className: _classnames_2_5_1_classnames_default()(className, rootClassName, hashId, cssVarCls, rate === null || rate === void 0 ? void 0 : rate.className),
style: mergedStyle,
prefixCls: ratePrefixCls,
direction: direction
})));
});
if (false) {}
/* harmony default export */ var rate = (rate_Rate);
/***/ }),
/***/ 74630:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.12.8@antd/es/switch/index.js + 2 modules ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ es_switch; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
var LoadingOutlined = __webpack_require__(38521);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(38850);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(85005);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(69818);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.8@@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(46130);
// 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);
;// CONCATENATED MODULE: ./node_modules/_rc-switch@4.1.0@rc-switch/es/index.js
var _excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
var Switch = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (_ref, ref) {
var _classNames;
var _ref$prefixCls = _ref.prefixCls,
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
className = _ref.className,
checked = _ref.checked,
defaultChecked = _ref.defaultChecked,
disabled = _ref.disabled,
loadingIcon = _ref.loadingIcon,
checkedChildren = _ref.checkedChildren,
unCheckedChildren = _ref.unCheckedChildren,
onClick = _ref.onClick,
onChange = _ref.onChange,
onKeyDown = _ref.onKeyDown,
restProps = (0,objectWithoutProperties/* default */.Z)(_ref, _excluded);
var _useMergedState = (0,useMergedState/* default */.Z)(false, {
value: checked,
defaultValue: defaultChecked
}),
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
innerChecked = _useMergedState2[0],
setInnerChecked = _useMergedState2[1];
function triggerChange(newChecked, event) {
var mergedChecked = innerChecked;
if (!disabled) {
mergedChecked = newChecked;
setInnerChecked(mergedChecked);
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
}
return mergedChecked;
}
function onInternalKeyDown(e) {
if (e.which === KeyCode/* default */.Z.LEFT) {
triggerChange(false, e);
} else if (e.which === KeyCode/* default */.Z.RIGHT) {
triggerChange(true, e);
}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
}
function onInternalClick(e) {
var ret = triggerChange(!innerChecked, e);
// [Legacy] trigger onClick with value
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
}
var switchClassName = _classnames_2_5_1_classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
return /*#__PURE__*/_react_17_0_2_react.createElement("button", (0,esm_extends/* default */.Z)({}, restProps, {
type: "button",
role: "switch",
"aria-checked": innerChecked,
disabled: disabled,
className: switchClassName,
ref: ref,
onKeyDown: onInternalKeyDown,
onClick: onInternalClick
}), loadingIcon, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: "".concat(prefixCls, "-inner")
}, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: "".concat(prefixCls, "-inner-checked")
}, checkedChildren), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: "".concat(prefixCls, "-inner-unchecked")
}, unCheckedChildren)));
});
Switch.displayName = 'Switch';
/* harmony default export */ var es = (Switch);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/_util/wave/index.js + 4 modules
var wave = __webpack_require__(50862);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/config-provider/context.js
var context = __webpack_require__(70330);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(60356);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/config-provider/hooks/useSize.js
var useSize = __webpack_require__(10261);
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.2@@ant-design/cssinjs/es/index.js + 35 modules
var cssinjs_es = __webpack_require__(3775);
// EXTERNAL MODULE: ./node_modules/_@ctrl_tinycolor@3.6.1@@ctrl/tinycolor/dist/module/index.js
var dist_module = __webpack_require__(64993);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/style/index.js
var style = __webpack_require__(78605);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/genComponentStyleHook.js + 5 modules
var genComponentStyleHook = __webpack_require__(16613);
// EXTERNAL MODULE: ./node_modules/_antd@5.12.8@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(35577);
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/switch/style/index.js
const genSwitchSmallStyle = token => {
const {
componentCls,
trackHeightSM,
trackPadding,
trackMinWidthSM,
innerMinMarginSM,
innerMaxMarginSM,
handleSizeSM,
calc
} = token;
const switchInnerCls = `${componentCls}-inner`;
const trackPaddingCalc = (0,cssinjs_es.unit)(calc(handleSizeSM).add(calc(trackPadding).mul(2)).equal());
const innerMaxMarginCalc = (0,cssinjs_es.unit)(calc(innerMaxMarginSM).mul(2).equal());
return {
[componentCls]: {
[`&${componentCls}-small`]: {
minWidth: trackMinWidthSM,
height: trackHeightSM,
lineHeight: (0,cssinjs_es.unit)(trackHeightSM),
[`${componentCls}-inner`]: {
paddingInlineStart: innerMaxMarginSM,
paddingInlineEnd: innerMinMarginSM,
[`${switchInnerCls}-checked`]: {
marginInlineStart: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`,
marginInlineEnd: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`
},
[`${switchInnerCls}-unchecked`]: {
marginTop: calc(trackHeightSM).mul(-1).equal(),
marginInlineStart: 0,
marginInlineEnd: 0
}
},
[`${componentCls}-handle`]: {
width: handleSizeSM,
height: handleSizeSM
},
[`${componentCls}-loading-icon`]: {
top: calc(calc(handleSizeSM).sub(token.switchLoadingIconSize)).div(2).equal(),
fontSize: token.switchLoadingIconSize
},
[`&${componentCls}-checked`]: {
[`${componentCls}-inner`]: {
paddingInlineStart: innerMinMarginSM,
paddingInlineEnd: innerMaxMarginSM,
[`${switchInnerCls}-checked`]: {
marginInlineStart: 0,
marginInlineEnd: 0
},
[`${switchInnerCls}-unchecked`]: {
marginInlineStart: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`,
marginInlineEnd: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`
}
},
[`${componentCls}-handle`]: {
insetInlineStart: `calc(100% - ${(0,cssinjs_es.unit)(calc(handleSizeSM).add(trackPadding).equal())})`
}
},
[`&:not(${componentCls}-disabled):active`]: {
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
[`${switchInnerCls}-unchecked`]: {
marginInlineStart: calc(token.marginXXS).div(2).equal(),
marginInlineEnd: calc(token.marginXXS).mul(-1).div(2).equal()
}
},
[`&${componentCls}-checked ${switchInnerCls}`]: {
[`${switchInnerCls}-checked`]: {
marginInlineStart: calc(token.marginXXS).mul(-1).div(2).equal(),
marginInlineEnd: calc(token.marginXXS).div(2).equal()
}
}
}
}
}
};
};
const genSwitchLoadingStyle = token => {
const {
componentCls,
handleSize,
calc
} = token;
return {
[componentCls]: {
[`${componentCls}-loading-icon${token.iconCls}`]: {
position: 'relative',
top: calc(calc(handleSize).sub(token.fontSize)).div(2).equal(),
color: token.switchLoadingIconColor,
verticalAlign: 'top'
},
[`&${componentCls}-checked ${componentCls}-loading-icon`]: {
color: token.switchColor
}
}
};
};
const genSwitchHandleStyle = token => {
const {
componentCls,
trackPadding,
handleBg,
handleShadow,
handleSize,
calc
} = token;
const switchHandleCls = `${componentCls}-handle`;
return {
[componentCls]: {
[switchHandleCls]: {
position: 'absolute',
top: trackPadding,
insetInlineStart: trackPadding,
width: handleSize,
height: handleSize,
transition: `all ${token.switchDuration} ease-in-out`,
'&::before': {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
backgroundColor: handleBg,
borderRadius: calc(handleSize).div(2).equal(),
boxShadow: handleShadow,
transition: `all ${token.switchDuration} ease-in-out`,
content: '""'
}
},
[`&${componentCls}-checked ${switchHandleCls}`]: {
insetInlineStart: `calc(100% - ${(0,cssinjs_es.unit)(calc(handleSize).add(trackPadding).equal())})`
},
[`&:not(${componentCls}-disabled):active`]: {
[`${switchHandleCls}::before`]: {
insetInlineEnd: token.switchHandleActiveInset,
insetInlineStart: 0
},
[`&${componentCls}-checked ${switchHandleCls}::before`]: {
insetInlineEnd: 0,
insetInlineStart: token.switchHandleActiveInset
}
}
}
};
};
const genSwitchInnerStyle = token => {
const {
componentCls,
trackHeight,
trackPadding,
innerMinMargin,
innerMaxMargin,
handleSize,
calc
} = token;
const switchInnerCls = `${componentCls}-inner`;
const trackPaddingCalc = (0,cssinjs_es.unit)(calc(handleSize).add(calc(trackPadding).mul(2)).equal());
const innerMaxMarginCalc = (0,cssinjs_es.unit)(calc(innerMaxMargin).mul(2).equal());
return {
[componentCls]: {
[switchInnerCls]: {
display: 'block',
overflow: 'hidden',
borderRadius: 100,
height: '100%',
paddingInlineStart: innerMaxMargin,
paddingInlineEnd: innerMinMargin,
transition: `padding-inline-start ${token.switchDuration} ease-in-out, padding-inline-end ${token.switchDuration} ease-in-out`,
[`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
display: 'block',
color: token.colorTextLightSolid,
fontSize: token.fontSizeSM,
transition: `margin-inline-start ${token.switchDuration} ease-in-out, margin-inline-end ${token.switchDuration} ease-in-out`,
pointerEvents: 'none'
},
[`${switchInnerCls}-checked`]: {
marginInlineStart: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`,
marginInlineEnd: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`
},
[`${switchInnerCls}-unchecked`]: {
marginTop: calc(trackHeight).mul(-1).equal(),
marginInlineStart: 0,
marginInlineEnd: 0
}
},
[`&${componentCls}-checked ${switchInnerCls}`]: {
paddingInlineStart: innerMinMargin,
paddingInlineEnd: innerMaxMargin,
[`${switchInnerCls}-checked`]: {
marginInlineStart: 0,
marginInlineEnd: 0
},
[`${switchInnerCls}-unchecked`]: {
marginInlineStart: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`,
marginInlineEnd: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`
}
},
[`&:not(${componentCls}-disabled):active`]: {
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
[`${switchInnerCls}-unchecked`]: {
marginInlineStart: calc(trackPadding).mul(2).equal(),
marginInlineEnd: calc(trackPadding).mul(-1).mul(2).equal()
}
},
[`&${componentCls}-checked ${switchInnerCls}`]: {
[`${switchInnerCls}-checked`]: {
marginInlineStart: calc(trackPadding).mul(-1).mul(2).equal(),
marginInlineEnd: calc(trackPadding).mul(2).equal()
}
}
}
}
};
};
const genSwitchStyle = token => {
const {
componentCls,
trackHeight,
trackMinWidth
} = token;
return {
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
position: 'relative',
display: 'inline-block',
boxSizing: 'border-box',
minWidth: trackMinWidth,
height: trackHeight,
lineHeight: `${(0,cssinjs_es.unit)(trackHeight)}`,
verticalAlign: 'middle',
background: token.colorTextQuaternary,
border: '0',
borderRadius: 100,
cursor: 'pointer',
transition: `all ${token.motionDurationMid}`,
userSelect: 'none',
[`&:hover:not(${componentCls}-disabled)`]: {
background: token.colorTextTertiary
}
}), (0,style/* genFocusStyle */.Qy)(token)), {
[`&${componentCls}-checked`]: {
background: token.switchColor,
[`&:hover:not(${componentCls}-disabled)`]: {
background: token.colorPrimaryHover
}
},
[`&${componentCls}-loading, &${componentCls}-disabled`]: {
cursor: 'not-allowed',
opacity: token.switchDisabledOpacity,
'*': {
boxShadow: 'none',
cursor: 'not-allowed'
}
},
// rtl style
[`&${componentCls}-rtl`]: {
direction: 'rtl'
}
})
};
};
// ============================== Export ==============================
const prepareComponentToken = token => {
const {
fontSize,
lineHeight,
controlHeight,
colorWhite
} = token;
const height = fontSize * lineHeight;
const heightSM = controlHeight / 2;
const padding = 2; // Fixed value
const handleSize = height - padding * 2;
const handleSizeSM = heightSM - padding * 2;
return {
trackHeight: height,
trackHeightSM: heightSM,
trackMinWidth: handleSize * 2 + padding * 4,
trackMinWidthSM: handleSizeSM * 2 + padding * 2,
trackPadding: padding,
// Fixed value
handleBg: colorWhite,
handleSize,
handleSizeSM,
handleShadow: `0 2px 4px 0 ${new dist_module/* TinyColor */.C('#00230b').setAlpha(0.2).toRgbString()}`,
innerMinMargin: handleSize / 2,
innerMaxMargin: handleSize + padding + padding * 2,
innerMinMarginSM: handleSizeSM / 2,
innerMaxMarginSM: handleSizeSM + padding + padding * 2
};
};
/* harmony default export */ var switch_style = ((0,genComponentStyleHook/* genStyleHooks */.I$)('Switch', token => {
const switchToken = (0,statistic/* merge */.TS)(token, {
switchDuration: token.motionDurationMid,
switchColor: token.colorPrimary,
switchDisabledOpacity: token.opacityLoading,
switchLoadingIconSize: token.calc(token.fontSizeIcon).mul(0.75).equal(),
switchLoadingIconColor: `rgba(0, 0, 0, ${token.opacityLoading})`,
switchHandleActiveInset: '-30%'
});
return [genSwitchStyle(switchToken),
// inner style
genSwitchInnerStyle(switchToken),
// handle style
genSwitchHandleStyle(switchToken),
// loading style
genSwitchLoadingStyle(switchToken),
// small style
genSwitchSmallStyle(switchToken)];
}, prepareComponentToken));
;// CONCATENATED MODULE: ./node_modules/_antd@5.12.8@antd/es/switch/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 switch_Switch = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
size: customizeSize,
disabled: customDisabled,
loading,
className,
rootClassName,
style,
checked: checkedProp,
value,
defaultChecked: defaultCheckedProp,
defaultValue,
onChange
} = props,
restProps = __rest(props, ["prefixCls", "size", "disabled", "loading", "className", "rootClassName", "style", "checked", "value", "defaultChecked", "defaultValue", "onChange"]);
const [checked, setChecked] = (0,useMergedState/* default */.Z)(false, {
value: checkedProp !== null && checkedProp !== void 0 ? checkedProp : value,
defaultValue: defaultCheckedProp !== null && defaultCheckedProp !== void 0 ? defaultCheckedProp : defaultValue
});
const {
getPrefixCls,
direction,
switch: SWITCH
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
// ===================== Disabled =====================
const disabled = _react_17_0_2_react.useContext(DisabledContext/* default */.Z);
const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;
const prefixCls = getPrefixCls('switch', customizePrefixCls);
const loadingIcon = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${prefixCls}-handle`
}, loading && /*#__PURE__*/_react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, {
className: `${prefixCls}-loading-icon`
}));
// Style
const [wrapCSSVar, hashId, cssVarCls] = switch_style(prefixCls);
const mergedSize = (0,useSize/* default */.Z)(customizeSize);
const classes = _classnames_2_5_1_classnames_default()(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {
[`${prefixCls}-small`]: mergedSize === 'small',
[`${prefixCls}-loading`]: loading,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId, cssVarCls);
const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);
const changeHandler = function () {
setChecked(arguments.length <= 0 ? undefined : arguments[0]);
onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, arguments);
};
return wrapCSSVar( /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, {
component: "Switch"
}, /*#__PURE__*/_react_17_0_2_react.createElement(es, Object.assign({}, restProps, {
checked: checked,
onChange: changeHandler,
prefixCls: prefixCls,
className: classes,
style: mergedStyle,
disabled: mergedDisabled,
ref: ref,
loadingIcon: loadingIcon
}))));
});
switch_Switch.__ANT_SWITCH = true;
if (false) {}
/* harmony default export */ var es_switch = (switch_Switch);
/***/ }),
/***/ 24334:
/*!***********************************************************!*\
!*** ./node_modules/_js-base64@2.6.4@js-base64/base64.js ***!
\***********************************************************/
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
* base64.js
*
* Licensed under the BSD 3-Clause License.
* http://opensource.org/licenses/BSD-3-Clause
*
* References:
* http://en.wikipedia.org/wiki/Base64
*/
;(function (global, factory) {
true
? module.exports = factory(global)
: 0
}((
typeof self !== 'undefined' ? self
: typeof window !== 'undefined' ? window
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
: this
), function(global) {
'use strict';
// existing version for noConflict()
global = global || {};
var _Base64 = global.Base64;
var version = "2.6.4";
// constants
var b64chars
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var b64tab = function(bin) {
var t = {};
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
return t;
}(b64chars);
var fromCharCode = String.fromCharCode;
// encoder stuff
var cb_utob = function(c) {
if (c.length < 2) {
var cc = c.charCodeAt(0);
return cc < 0x80 ? c
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
+ fromCharCode(0x80 | (cc & 0x3f)))
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
} else {
var cc = 0x10000
+ (c.charCodeAt(0) - 0xD800) * 0x400
+ (c.charCodeAt(1) - 0xDC00);
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
}
};
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
var utob = function(u) {
return u.replace(re_utob, cb_utob);
};
var cb_encode = function(ccc) {
var padlen = [0, 2, 1][ccc.length % 3],
ord = ccc.charCodeAt(0) << 16
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
chars = [
b64chars.charAt( ord >>> 18),
b64chars.charAt((ord >>> 12) & 63),
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
];
return chars.join('');
};
var btoa = global.btoa && typeof global.btoa == 'function'
? function(b){ return global.btoa(b) } : function(b) {
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
'The string contains invalid characters.'
);
return b.replace(/[\s\S]{1,3}/g, cb_encode);
};
var _encode = function(u) {
return btoa(utob(String(u)));
};
var mkUriSafe = function (b64) {
return b64.replace(/[+\/]/g, function(m0) {
return m0 == '+' ? '-' : '_';
}).replace(/=/g, '');
};
var encode = function(u, urisafe) {
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
};
var encodeURI = function(u) { return encode(u, true) };
var fromUint8Array;
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
// return btoa(fromCharCode.apply(null, a));
var b64 = '';
for (var i = 0, l = a.length; i < l; i += 3) {
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
var ord = a0 << 16 | a1 << 8 | a2;
b64 += b64chars.charAt( ord >>> 18)
+ b64chars.charAt((ord >>> 12) & 63)
+ ( typeof a1 != 'undefined'
? b64chars.charAt((ord >>> 6) & 63) : '=')
+ ( typeof a2 != 'undefined'
? b64chars.charAt( ord & 63) : '=');
}
return urisafe ? mkUriSafe(b64) : b64;
};
// decoder stuff
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
var cb_btou = function(cccc) {
switch(cccc.length) {
case 4:
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
| ((0x3f & cccc.charCodeAt(1)) << 12)
| ((0x3f & cccc.charCodeAt(2)) << 6)
| (0x3f & cccc.charCodeAt(3)),
offset = cp - 0x10000;
return (fromCharCode((offset >>> 10) + 0xD800)
+ fromCharCode((offset & 0x3FF) + 0xDC00));
case 3:
return fromCharCode(
((0x0f & cccc.charCodeAt(0)) << 12)
| ((0x3f & cccc.charCodeAt(1)) << 6)
| (0x3f & cccc.charCodeAt(2))
);
default:
return fromCharCode(
((0x1f & cccc.charCodeAt(0)) << 6)
| (0x3f & cccc.charCodeAt(1))
);
}
};
var btou = function(b) {
return b.replace(re_btou, cb_btou);
};
var cb_decode = function(cccc) {
var len = cccc.length,
padlen = len % 4,
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
chars = [
fromCharCode( n >>> 16),
fromCharCode((n >>> 8) & 0xff),
fromCharCode( n & 0xff)
];
chars.length -= [0, 0, 2, 1][padlen];
return chars.join('');
};
var _atob = global.atob && typeof global.atob == 'function'
? function(a){ return global.atob(a) } : function(a){
return a.replace(/\S{1,4}/g, cb_decode);
};
var atob = function(a) {
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
};
var _decode = function(a) { return btou(_atob(a)) };
var _fromURI = function(a) {
return String(a).replace(/[-_]/g, function(m0) {
return m0 == '-' ? '+' : '/'
}).replace(/[^A-Za-z0-9\+\/]/g, '');
};
var decode = function(a){
return _decode(_fromURI(a));
};
var toUint8Array;
if (global.Uint8Array) toUint8Array = function(a) {
return Uint8Array.from(atob(_fromURI(a)), function(c) {
return c.charCodeAt(0);
});
};
var noConflict = function() {
var Base64 = global.Base64;
global.Base64 = _Base64;
return Base64;
};
// export Base64
global.Base64 = {
VERSION: version,
atob: atob,
btoa: btoa,
fromBase64: decode,
toBase64: encode,
utob: utob,
encode: encode,
encodeURI: encodeURI,
btou: btou,
decode: decode,
noConflict: noConflict,
fromUint8Array: fromUint8Array,
toUint8Array: toUint8Array
};
// if ES5 is available, make Base64.extendString() available
if (typeof Object.defineProperty === 'function') {
var noEnum = function(v){
return {value:v,enumerable:false,writable:true,configurable:true};
};
global.Base64.extendString = function () {
Object.defineProperty(
String.prototype, 'fromBase64', noEnum(function () {
return decode(this)
}));
Object.defineProperty(
String.prototype, 'toBase64', noEnum(function (urisafe) {
return encode(this, urisafe)
}));
Object.defineProperty(
String.prototype, 'toBase64URI', noEnum(function () {
return encode(this, true)
}));
};
}
//
// export Base64 to the namespace
//
if (global['Meteor']) { // Meteor.js
Base64 = global.Base64;
}
// module.exports and AMD are mutually exclusive.
// module.exports has precedence.
if ( true && module.exports) {
module.exports.Base64 = global.Base64;
}
else if (true) {
// AMD. Register as an anonymous module.
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
// that's it!
return {Base64: global.Base64}
}));
/***/ })
}]);