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/91857.0316d02c.async.js

851 lines
33 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[91857],{
/***/ 91857:
/*!***************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ 38819);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ 92310);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var rc_dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-dropdown */ 31561);
/* harmony import */ var rc_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util */ 70425);
/* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ 18929);
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rc-util/es/omit */ 2738);
/* harmony import */ var _util_placements__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/placements */ 79676);
/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_util/PurePanel */ 53487);
/* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/reactNode */ 92343);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ 36355);
/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../menu */ 20834);
/* harmony import */ var _menu_OverrideContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../menu/OverrideContext */ 40875);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../theme/internal */ 88088);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./style */ 47211);
"use client";
const Placements = (/* unused pure expression or super */ null && (['topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight', 'top', 'bottom']));
const Dropdown = props => {
const {
menu,
arrow,
prefixCls: customizePrefixCls,
children,
trigger,
disabled,
dropdownRender,
getPopupContainer,
overlayClassName,
rootClassName,
open,
onOpenChange,
// Deprecated
visible,
onVisibleChange,
mouseEnterDelay = 0.15,
mouseLeaveDelay = 0.1,
autoAdjustOverflow = true,
placement = '',
overlay,
transitionName
} = props;
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
direction
} = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_5__/* .ConfigContext */ .E_);
// Warning for deprecated usage
if (false) {}
const memoTransitionName = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
const rootPrefixCls = getPrefixCls();
if (transitionName !== undefined) {
return transitionName;
}
if (placement.includes('top')) {
return `${rootPrefixCls}-slide-down`;
}
return `${rootPrefixCls}-slide-up`;
}, [getPrefixCls, placement, transitionName]);
const memoPlacement = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
if (!placement) {
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
}
if (placement.includes('Center')) {
const newPlacement = placement.slice(0, placement.indexOf('Center'));
false ? 0 : void 0;
return newPlacement;
}
return placement;
}, [placement, direction]);
if (false) {}
const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(prefixCls);
const [, token] = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)();
const child = react__WEBPACK_IMPORTED_MODULE_0__.Children.only(children);
const dropdownTrigger = (0,_util_reactNode__WEBPACK_IMPORTED_MODULE_8__/* .cloneElement */ .Tm)(child, {
className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(`${prefixCls}-trigger`, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, child.props.className),
disabled
});
const triggerActions = disabled ? [] : trigger;
let alignPoint;
if (triggerActions && triggerActions.includes('contextMenu')) {
alignPoint = true;
}
// =========================== Open ============================
const [mergedOpen, setOpen] = (0,rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(false, {
value: open !== null && open !== void 0 ? open : visible
});
const onInnerOpenChange = (0,rc_util__WEBPACK_IMPORTED_MODULE_3__.useEvent)(nextOpen => {
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen);
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(nextOpen);
setOpen(nextOpen);
});
// =========================== Overlay ============================
const overlayClassNameCustomized = classnames__WEBPACK_IMPORTED_MODULE_1___default()(overlayClassName, rootClassName, hashId, {
[`${prefixCls}-rtl`]: direction === 'rtl'
});
const builtinPlacements = (0,_util_placements__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)({
arrowPointAtCenter: typeof arrow === 'object' && arrow.pointAtCenter,
autoAdjustOverflow,
offset: token.marginXXS,
arrowWidth: arrow ? token.sizePopupArrow : 0,
borderRadius: token.borderRadius
});
const onMenuClick = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => {
setOpen(false);
}, []);
const renderOverlay = () => {
// rc-dropdown already can process the function of overlay, but we have check logic here.
// So we need render the element to check and pass back to rc-dropdown.
let overlayNode;
if (menu === null || menu === void 0 ? void 0 : menu.items) {
overlayNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_menu__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, Object.assign({}, menu));
} else if (typeof overlay === 'function') {
overlayNode = overlay();
} else {
overlayNode = overlay;
}
if (dropdownRender) {
overlayNode = dropdownRender(overlayNode);
}
overlayNode = react__WEBPACK_IMPORTED_MODULE_0__.Children.only(typeof overlayNode === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, overlayNode) : overlayNode);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_menu_OverrideContext__WEBPACK_IMPORTED_MODULE_11__/* .OverrideProvider */ .J, {
prefixCls: `${prefixCls}-menu`,
expandIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
className: `${prefixCls}-menu-submenu-arrow`
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
className: `${prefixCls}-menu-submenu-arrow-icon`
})),
mode: "vertical",
selectable: false,
onClick: onMenuClick,
validator: _ref3 => {
let {
mode
} = _ref3;
// Warning if use other mode
false ? 0 : void 0;
}
}, overlayNode);
};
// ============================ Render ============================
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(rc_dropdown__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, Object.assign({
alignPoint: alignPoint
}, (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z)(props, ['rootClassName']), {
mouseEnterDelay: mouseEnterDelay,
mouseLeaveDelay: mouseLeaveDelay,
visible: mergedOpen,
builtinPlacements: builtinPlacements,
arrow: !!arrow,
overlayClassName: overlayClassNameCustomized,
prefixCls: prefixCls,
getPopupContainer: getPopupContainer || getContextPopupContainer,
transitionName: memoTransitionName,
trigger: triggerActions,
overlay: renderOverlay,
placement: memoPlacement,
onVisibleChange: onInnerOpenChange
}), dropdownTrigger));
};
function postPureProps(props) {
return Object.assign(Object.assign({}, props), {
align: {
overflow: {
adjustX: false,
adjustY: false
}
}
});
}
// We don't care debug panel
const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(Dropdown, 'dropdown', prefixCls => prefixCls, postPureProps);
/* istanbul ignore next */
const WrapPurePanel = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(PurePanel, Object.assign({}, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null));
Dropdown._InternalPanelDoNotUseOrYouWillBeFired = WrapPurePanel;
if (false) {}
/* harmony default export */ __webpack_exports__.Z = (Dropdown);
/***/ }),
/***/ 47211:
/*!******************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/dropdown/style/index.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ dropdown_style; }
});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/motion/slide.js
var slide = __webpack_require__(13826);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/motion/move.js
var move = __webpack_require__(92899);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/motion/zoom.js
var zoom = __webpack_require__(29878);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/placementArrow.js
var placementArrow = __webpack_require__(19447);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/style/status.js
const genStatusStyle = token => {
const {
componentCls,
menuCls,
colorError,
colorTextLightSolid
} = token;
const itemCls = `${menuCls}-item`;
return {
[`${componentCls}, ${componentCls}-menu-submenu`]: {
[`${menuCls} ${itemCls}`]: {
[`&${itemCls}-danger:not(${itemCls}-disabled)`]: {
color: colorError,
'&:hover': {
color: colorTextLightSolid,
backgroundColor: colorError
}
}
}
}
};
};
/* harmony default export */ var style_status = (genStatusStyle);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/style/index.js
// =============================== Base ===============================
const genBaseStyle = token => {
const {
componentCls,
menuCls,
zIndexPopup,
dropdownArrowDistance,
sizePopupArrow,
antCls,
iconCls,
motionDurationMid,
dropdownPaddingVertical,
fontSize,
dropdownEdgeChildPadding,
colorTextDisabled,
fontSizeIcon,
controlPaddingHorizontal,
colorBgElevated
} = token;
return [{
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
position: 'absolute',
top: -9999,
left: {
_skip_check_: true,
value: -9999
},
zIndex: zIndexPopup,
display: 'block',
// A placeholder out of dropdown visible range to avoid close when user moving
'&::before': {
position: 'absolute',
insetBlock: -dropdownArrowDistance + sizePopupArrow / 2,
// insetInlineStart: -7, // FIXME: Seems not work for hidden element
zIndex: -9999,
opacity: 0.0001,
content: '""'
},
[`&-trigger${antCls}-btn`]: {
[`& > ${iconCls}-down, & > ${antCls}-btn-icon > ${iconCls}-down`]: {
fontSize: fontSizeIcon
}
},
[`${componentCls}-wrap`]: {
position: 'relative',
[`${antCls}-btn > ${iconCls}-down`]: {
fontSize: fontSizeIcon
},
[`${iconCls}-down::before`]: {
transition: `transform ${motionDurationMid}`
}
},
[`${componentCls}-wrap-open`]: {
[`${iconCls}-down::before`]: {
transform: `rotate(180deg)`
}
},
[`
&-hidden,
&-menu-hidden,
&-menu-submenu-hidden
`]: {
display: 'none'
},
// =============================================================
// == Motion ==
// =============================================================
// When position is not enough for dropdown, the placement will revert.
// We will handle this with revert motion name.
[`&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomLeft,
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomLeft,
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottom,
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottom,
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomRight,
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomRight`]: {
animationName: slide/* slideUpIn */.fJ
},
[`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topLeft,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topLeft,
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-top,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-top,
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topRight,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topRight`]: {
animationName: slide/* slideDownIn */.Qt
},
[`&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomLeft,
&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottom,
&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomRight`]: {
animationName: slide/* slideUpOut */.Uw
},
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topLeft,
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-top,
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topRight`]: {
animationName: slide/* slideDownOut */.ly
}
})
},
// =============================================================
// == Arrow style ==
// =============================================================
(0,placementArrow/* default */.ZP)(token, {
colorBg: colorBgElevated,
limitVerticalRadius: true,
arrowPlacement: {
top: true,
bottom: true
}
}), {
// =============================================================
// == Menu ==
// =============================================================
[`${componentCls} ${menuCls}`]: {
position: 'relative',
margin: 0
},
[`${menuCls}-submenu-popup`]: {
position: 'absolute',
zIndex: zIndexPopup,
background: 'transparent',
boxShadow: 'none',
transformOrigin: '0 0',
'ul, li': {
listStyle: 'none',
margin: 0
}
},
[`${componentCls}, ${componentCls}-menu-submenu`]: {
[menuCls]: Object.assign(Object.assign({
padding: dropdownEdgeChildPadding,
listStyleType: 'none',
backgroundColor: colorBgElevated,
backgroundClip: 'padding-box',
borderRadius: token.borderRadiusLG,
outline: 'none',
boxShadow: token.boxShadowSecondary
}, (0,style/* genFocusStyle */.Qy)(token)), {
[`${menuCls}-item-group-title`]: {
padding: `${dropdownPaddingVertical}px ${controlPaddingHorizontal}px`,
color: token.colorTextDescription,
transition: `all ${motionDurationMid}`
},
// ======================= Item Content =======================
[`${menuCls}-item`]: {
position: 'relative',
display: 'flex',
alignItems: 'center'
},
[`${menuCls}-item-icon`]: {
minWidth: fontSize,
marginInlineEnd: token.marginXS,
fontSize: token.fontSizeSM
},
[`${menuCls}-title-content`]: {
flex: 'auto',
'> a': {
color: 'inherit',
transition: `all ${motionDurationMid}`,
'&:hover': {
color: 'inherit'
},
'&::after': {
position: 'absolute',
inset: 0,
content: '""'
}
}
},
// =========================== Item ===========================
[`${menuCls}-item, ${menuCls}-submenu-title`]: Object.assign(Object.assign({
clear: 'both',
margin: 0,
padding: `${dropdownPaddingVertical}px ${controlPaddingHorizontal}px`,
color: token.colorText,
fontWeight: 'normal',
fontSize,
lineHeight: token.lineHeight,
cursor: 'pointer',
transition: `all ${motionDurationMid}`,
borderRadius: token.borderRadiusSM,
[`&:hover, &-active`]: {
backgroundColor: token.controlItemBgHover
}
}, (0,style/* genFocusStyle */.Qy)(token)), {
'&-selected': {
color: token.colorPrimary,
backgroundColor: token.controlItemBgActive,
'&:hover, &-active': {
backgroundColor: token.controlItemBgActiveHover
}
},
'&-disabled': {
color: colorTextDisabled,
cursor: 'not-allowed',
'&:hover': {
color: colorTextDisabled,
backgroundColor: colorBgElevated,
cursor: 'not-allowed'
},
a: {
pointerEvents: 'none'
}
},
'&-divider': {
height: 1,
margin: `${token.marginXXS}px 0`,
overflow: 'hidden',
lineHeight: 0,
backgroundColor: token.colorSplit
},
[`${componentCls}-menu-submenu-expand-icon`]: {
position: 'absolute',
insetInlineEnd: token.paddingXS,
[`${componentCls}-menu-submenu-arrow-icon`]: {
marginInlineEnd: '0 !important',
color: token.colorTextDescription,
fontSize: fontSizeIcon,
fontStyle: 'normal'
}
}
}),
[`${menuCls}-item-group-list`]: {
margin: `0 ${token.marginXS}px`,
padding: 0,
listStyle: 'none'
},
[`${menuCls}-submenu-title`]: {
paddingInlineEnd: controlPaddingHorizontal + token.fontSizeSM
},
[`${menuCls}-submenu-vertical`]: {
position: 'relative'
},
[`${menuCls}-submenu${menuCls}-submenu-disabled ${componentCls}-menu-submenu-title`]: {
[`&, ${componentCls}-menu-submenu-arrow-icon`]: {
color: colorTextDisabled,
backgroundColor: colorBgElevated,
cursor: 'not-allowed'
}
},
// https://github.com/ant-design/ant-design/issues/19264
[`${menuCls}-submenu-selected ${componentCls}-menu-submenu-title`]: {
color: token.colorPrimary
}
})
}
},
// Follow code may reuse in other components
[(0,slide/* initSlideMotion */.oN)(token, 'slide-up'), (0,slide/* initSlideMotion */.oN)(token, 'slide-down'), (0,move/* initMoveMotion */.Fm)(token, 'move-up'), (0,move/* initMoveMotion */.Fm)(token, 'move-down'), (0,zoom/* initZoomMotion */._y)(token, 'zoom-big')]];
};
// ============================== Export ==============================
/* harmony default export */ var dropdown_style = ((0,genComponentStyleHook/* default */.Z)('Dropdown', (token, _ref) => {
let {
rootPrefixCls
} = _ref;
const {
marginXXS,
sizePopupArrow,
controlHeight,
fontSize,
lineHeight,
paddingXXS,
componentCls,
borderRadiusLG
} = token;
const dropdownPaddingVertical = (controlHeight - fontSize * lineHeight) / 2;
const {
dropdownArrowOffset
} = (0,placementArrow/* getArrowOffset */.fS)({
contentRadius: borderRadiusLG
});
const dropdownToken = (0,statistic/* merge */.TS)(token, {
menuCls: `${componentCls}-menu`,
rootPrefixCls,
dropdownArrowDistance: sizePopupArrow / 2 + marginXXS,
dropdownArrowOffset,
dropdownPaddingVertical,
dropdownEdgeChildPadding: paddingXXS
});
return [genBaseStyle(dropdownToken), style_status(dropdownToken)];
}, token => ({
zIndexPopup: token.zIndexPopupBase + 50
})));
/***/ }),
/***/ 31561:
/*!*****************************************************************************!*\
!*** ./node_modules/_rc-dropdown@4.1.0@rc-dropdown/es/index.js + 4 modules ***!
\*****************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ _rc_dropdown_4_1_0_rc_dropdown_es; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(14809);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(4635);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(50298);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(62646);
// EXTERNAL MODULE: ./node_modules/_@rc-component_trigger@1.18.3@@rc-component/trigger/es/index.js + 11 modules
var es = __webpack_require__(35593);
// 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-util@5.44.4@rc-util/es/ref.js
var es_ref = __webpack_require__(8654);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/KeyCode.js
var KeyCode = __webpack_require__(10228);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/raf.js
var raf = __webpack_require__(16089);
;// CONCATENATED MODULE: ./node_modules/_rc-dropdown@4.1.0@rc-dropdown/es/hooks/useAccessibility.js
var ESC = KeyCode/* default */.Z.ESC,
TAB = KeyCode/* default */.Z.TAB;
function useAccessibility(_ref) {
var visible = _ref.visible,
triggerRef = _ref.triggerRef,
onVisibleChange = _ref.onVisibleChange,
autoFocus = _ref.autoFocus,
overlayRef = _ref.overlayRef;
var focusMenuRef = _react_17_0_2_react.useRef(false);
var handleCloseMenuAndReturnFocus = function handleCloseMenuAndReturnFocus() {
if (visible) {
var _triggerRef$current, _triggerRef$current$f;
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : (_triggerRef$current$f = _triggerRef$current.focus) === null || _triggerRef$current$f === void 0 ? void 0 : _triggerRef$current$f.call(_triggerRef$current);
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(false);
}
};
var focusMenu = function focusMenu() {
var _overlayRef$current;
if ((_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.focus) {
overlayRef.current.focus();
focusMenuRef.current = true;
return true;
}
return false;
};
var handleKeyDown = function handleKeyDown(event) {
switch (event.keyCode) {
case ESC:
handleCloseMenuAndReturnFocus();
break;
case TAB:
{
var focusResult = false;
if (!focusMenuRef.current) {
focusResult = focusMenu();
}
if (focusResult) {
event.preventDefault();
} else {
handleCloseMenuAndReturnFocus();
}
break;
}
}
};
_react_17_0_2_react.useEffect(function () {
if (visible) {
window.addEventListener("keydown", handleKeyDown);
if (autoFocus) {
// FIXME: hack with raf
(0,raf/* default */.Z)(focusMenu, 3);
}
return function () {
window.removeEventListener("keydown", handleKeyDown);
focusMenuRef.current = false;
};
}
return function () {
focusMenuRef.current = false;
};
}, [visible]); // eslint-disable-line react-hooks/exhaustive-deps
}
;// CONCATENATED MODULE: ./node_modules/_rc-dropdown@4.1.0@rc-dropdown/es/Overlay.js
var Overlay = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(function (props, ref) {
var overlay = props.overlay,
arrow = props.arrow,
prefixCls = props.prefixCls;
var overlayNode = (0,_react_17_0_2_react.useMemo)(function () {
var overlayElement;
if (typeof overlay === 'function') {
overlayElement = overlay();
} else {
overlayElement = overlay;
}
return overlayElement;
}, [overlay]);
var composedRef = (0,es_ref/* composeRef */.sQ)(ref, overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.ref);
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, arrow && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: "".concat(prefixCls, "-arrow")
}), /*#__PURE__*/_react_17_0_2_react.cloneElement(overlayNode, {
ref: (0,es_ref/* supportRef */.Yr)(overlayNode) ? composedRef : undefined
}));
});
/* harmony default export */ var es_Overlay = (Overlay);
;// CONCATENATED MODULE: ./node_modules/_rc-dropdown@4.1.0@rc-dropdown/es/placements.js
var autoAdjustOverflow = {
adjustX: 1,
adjustY: 1
};
var targetOffset = [0, 0];
var placements = {
topLeft: {
points: ['bl', 'tl'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
top: {
points: ['bc', 'tc'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
topRight: {
points: ['br', 'tr'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
},
bottom: {
points: ['tc', 'bc'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
},
bottomRight: {
points: ['tr', 'br'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
}
};
/* harmony default export */ var es_placements = (placements);
;// CONCATENATED MODULE: ./node_modules/_rc-dropdown@4.1.0@rc-dropdown/es/Dropdown.js
var _excluded = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
function Dropdown(props, ref) {
var _children$props;
var _props$arrow = props.arrow,
arrow = _props$arrow === void 0 ? false : _props$arrow,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-dropdown' : _props$prefixCls,
transitionName = props.transitionName,
animation = props.animation,
align = props.align,
_props$placement = props.placement,
placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement,
_props$placements = props.placements,
placements = _props$placements === void 0 ? es_placements : _props$placements,
getPopupContainer = props.getPopupContainer,
showAction = props.showAction,
hideAction = props.hideAction,
overlayClassName = props.overlayClassName,
overlayStyle = props.overlayStyle,
visible = props.visible,
_props$trigger = props.trigger,
trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
autoFocus = props.autoFocus,
overlay = props.overlay,
children = props.children,
onVisibleChange = props.onVisibleChange,
otherProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
var _React$useState = _react_17_0_2_react.useState(),
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
triggerVisible = _React$useState2[0],
setTriggerVisible = _React$useState2[1];
var mergedVisible = 'visible' in props ? visible : triggerVisible;
var triggerRef = _react_17_0_2_react.useRef(null);
var overlayRef = _react_17_0_2_react.useRef(null);
var childRef = _react_17_0_2_react.useRef(null);
_react_17_0_2_react.useImperativeHandle(ref, function () {
return triggerRef.current;
});
var handleVisibleChange = function handleVisibleChange(newVisible) {
setTriggerVisible(newVisible);
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(newVisible);
};
useAccessibility({
visible: mergedVisible,
triggerRef: childRef,
onVisibleChange: handleVisibleChange,
autoFocus: autoFocus,
overlayRef: overlayRef
});
var onClick = function onClick(e) {
var onOverlayClick = props.onOverlayClick;
setTriggerVisible(false);
if (onOverlayClick) {
onOverlayClick(e);
}
};
var getMenuElement = function getMenuElement() {
return /*#__PURE__*/_react_17_0_2_react.createElement(es_Overlay, {
ref: overlayRef,
overlay: overlay,
prefixCls: prefixCls,
arrow: arrow
});
};
var getMenuElementOrLambda = function getMenuElementOrLambda() {
if (typeof overlay === 'function') {
return getMenuElement;
}
return getMenuElement();
};
var getMinOverlayWidthMatchTrigger = function getMinOverlayWidthMatchTrigger() {
var minOverlayWidthMatchTrigger = props.minOverlayWidthMatchTrigger,
alignPoint = props.alignPoint;
if ('minOverlayWidthMatchTrigger' in props) {
return minOverlayWidthMatchTrigger;
}
return !alignPoint;
};
var getOpenClassName = function getOpenClassName() {
var openClassName = props.openClassName;
if (openClassName !== undefined) {
return openClassName;
}
return "".concat(prefixCls, "-open");
};
var childrenNode = /*#__PURE__*/_react_17_0_2_react.cloneElement(children, {
className: _classnames_2_5_1_classnames_default()((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.className, mergedVisible && getOpenClassName()),
ref: (0,es_ref/* supportRef */.Yr)(children) ? (0,es_ref/* composeRef */.sQ)(childRef, children.ref) : undefined
});
var triggerHideAction = hideAction;
if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {
triggerHideAction = ['click'];
}
return /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, (0,esm_extends/* default */.Z)({
builtinPlacements: placements
}, otherProps, {
prefixCls: prefixCls,
ref: triggerRef,
popupClassName: _classnames_2_5_1_classnames_default()(overlayClassName, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-show-arrow"), arrow)),
popupStyle: overlayStyle,
action: trigger,
showAction: showAction,
hideAction: triggerHideAction,
popupPlacement: placement,
popupAlign: align,
popupTransitionName: transitionName,
popupAnimation: animation,
popupVisible: mergedVisible,
stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '',
popup: getMenuElementOrLambda(),
onPopupVisibleChange: handleVisibleChange,
onPopupClick: onClick,
getPopupContainer: getPopupContainer
}), childrenNode);
}
/* harmony default export */ var es_Dropdown = (/*#__PURE__*/_react_17_0_2_react.forwardRef(Dropdown));
;// CONCATENATED MODULE: ./node_modules/_rc-dropdown@4.1.0@rc-dropdown/es/index.js
/* harmony default export */ var _rc_dropdown_4_1_0_rc_dropdown_es = (es_Dropdown);
/***/ })
}]);