"use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([[23873],{ /***/ 98839: /*!********************************************************************!*\ !*** ./src/pages/virtualSpaces/Lists/Lesson/index.tsx + 1 modules ***! \********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": function() { return /* binding */ Lesson; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js var regeneratorRuntime = __webpack_require__(7557); var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js var asyncToGenerator = __webpack_require__(41498); var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js var objectSpread2 = __webpack_require__(82242); var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js var slicedToArray = __webpack_require__(79800); var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(39647); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); // EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules var _umi_production_exports = __webpack_require__(58011); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules var es_form = __webpack_require__(78241); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules var spin = __webpack_require__(71418); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js var col = __webpack_require__(43604); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules var tooltip = __webpack_require__(6848); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js var row = __webpack_require__(95237); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules var pagination = __webpack_require__(66786); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules var message = __webpack_require__(8591); // EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 34 modules var ui_customization = __webpack_require__(75748); // EXTERNAL MODULE: ./src/components/NoData/index.tsx var NoData = __webpack_require__(56971); // EXTERNAL MODULE: ./src/pages/virtualSpaces/Lists/Lesson/index.less?modules var Lessonmodules = __webpack_require__(73280); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(2367); // EXTERNAL MODULE: ./src/utils/util.tsx var util = __webpack_require__(73400); ;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Lesson/imgs/AddIcon.png var AddIcon_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAABE9JREFUOE+t1OtPU3ccx/HPOac9l5ZSxEuhwKZSIVW0CGFInEEHLhDHpiQjmSLO7cGyZdklS5YtE5Lhhblp2Ngkc/PCbHDIxcUEnOJikMV5WShRJsqlCBRs4XBraUvpac9vcTrHRvDBtt8f8Mrv+37woQghDP7HRz0W7G1SArdMEpQmmaJCFZRvOOB3XuYMu3rn+sPcoP1kdO+VY4f1qTs2Kucl0BTDAvI0iKfXScYt++hlW0qBZPmf8EOwhW4/2ZCnC2eVjMwADKG0qyNeu3G+NjXg7oVpQxYodSwobhFobiEwPRgM2FvLJ/rDLDQAr28aTi7MkvD827cegDfN/KEjVWPmNhurFnhsTgvHG1uT0Nlci6tNfUhM0cFoigRoNSheB0qIQmBqHB8etaHjnhec24mSnS8UL9+2p/gPcOimma+pOC2eEP3CvFA1yrJsMEQEce1iD6JiVLB2uaBgVUhI1kHFyZCDMoJBgusjT+KQRQ968C72PremMH7rnpJHYO2JH8Rjgx4hZYkCn663osfqRlAiiIqNgS4CcA07YO32wiuHQK8PwYLQKfiDNN5qSoQ0OIbiTamFxplgTUWdeNg2KRQk+RExcAP1FgWy1yzAvQkCdUgQQy4JSVFA56ASPo8PPY4pfJDPoWY8Ga0tk9i/Ob3ImL9736OGX1bUiV/1jAvvp4yhv6kd7HwtVmTkwnLlOtLXxmGy7zKWpeVi78EGvP7KBpw9XokUowIjsck4cwk4sCW90Lh9xsmnjteKZd2jwu5UO8ZvDUBWMDCsNACMCqGsiOSnn8DFn0QoWQ084yMYstpAgSAYF4+66yqUvfRsoXFr8cOGjWa++lydeMThF0rXWcE5h9H22xS2bddD0AigaIKJ0QDCF7KQ/DJco258X+mAPlKJqahYVDQLKM3LLFpZsPfByUONZv7UuVrx23vTwtEcGyLpMbRYPBAEGpnZkThzbgK377ixNk2LdU+p0VjvgH1YQuJKASOCHp/Va3AgN73I9HLJX2DV2Wqx3OYRvst1IF7rxsDANJp/diEykoUpSQNCAMgErS0uiKKEVavUiFsmoMM9H0VVPD7Pe+bvYGV9tVjW5xIyDD5kLvFCBT8cAwSinUYM2w9NCIMJZwDDZCk04V5EL2bhV6pRf4dHZ5sX5flZhat3fvKgob3+G+7C5fN3RmVKydAUgUqn9cdsEHzcUooJuJEtfA3O34VgaApqxG3geRrc6FVZ6fh1jEhSQJp0wbTceDDzzdLSWeNw+hd79KhEX3NN+nTd3XfBK4LIyzDCJ8lQ0gRVFzrBszz0i6OhVSu+eHV91HszB2IWWN7Y97FXoj9yOmxoN+/CfmMcfPcDUhTuh2QYBpaIFeiI34iwEM4Vo5EML64zjP2JzgJLf+y5BLApI31daHh3E2vWLYKHEBBQoEFAAkHczimQe9bvCIRrBUIF3FveyVneOCf4X8f78Yv9L/TfAdDhGTPNBgwfAAAAAElFTkSuQmCC"; // EXTERNAL MODULE: ./src/pages/virtualSpaces/Lists/Lesson/AddOrEdit/index.tsx var AddOrEdit = __webpack_require__(3711); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js var jsx_runtime = __webpack_require__(37712); ;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Lesson/index.tsx var _excluded = ["classroomList", "globalSetting", "user", "virtualSpaces", "loading", "dispatch"]; var LessonPage = function LessonPage(_ref) { var _menus$find, _LessonsList$data, _LessonsList$data2, _LessonsList$data3, _LessonsList$data4, _LessonsList$data5, _LessonsList$data6; var classroomList = _ref.classroomList, globalSetting = _ref.globalSetting, user = _ref.user, virtualSpaces = _ref.virtualSpaces, loading = _ref.loading, dispatch = _ref.dispatch, props = objectWithoutProperties_default()(_ref, _excluded); var virtualSpacesDetails = virtualSpaces.virtualSpacesDetails, menus = virtualSpaces.menus, LessonsList = virtualSpaces.LessonsList; var _Form$useForm = es_form/* default */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; var _useState = (0,_react_17_0_2_react.useState)({}), _useState2 = slicedToArray_default()(_useState, 2), fileList = _useState2[0], setFileList = _useState2[1]; var _useParams = (0,_umi_production_exports.useParams)(), virtual_spacesId = _useParams.virtual_spacesId; var _useState3 = (0,_react_17_0_2_react.useState)(false), _useState4 = slicedToArray_default()(_useState3, 2), isAddLesson = _useState4[0], setIsAddLesson = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)({ page: 1, limit: 15 }), _useState6 = slicedToArray_default()(_useState5, 2), urlData = _useState6[0], setUrlData = _useState6[1]; // const moduleName = menus?.find((e: any) => e.module_url === location.pathname)?.name || ''; var moduleName = (menus === null || menus === void 0 || (_menus$find = menus.find(function (e) { return e.id == window.localStorage.getItem('vtrsModuleId'); })) === null || _menus$find === void 0 ? void 0 : _menus$find.name) || ''; var getGoodLessonsList = function getGoodLessonsList() { window.scrollTo(0, 0); dispatch({ type: "virtualSpaces/getGoodLessonsList", payload: objectSpread2_default()(objectSpread2_default()({}, urlData), {}, { virtual_spacesId: virtual_spacesId, virtual_module_id: window.localStorage.getItem('vtrsModuleId') }) }); }; (0,_react_17_0_2_react.useEffect)(function () { getGoodLessonsList(); }, [urlData, window.localStorage.getItem('vtrsModuleId')]); return /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, { spinning: loading["virtualSpaces/getGoodLessonsList"], children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: "ml40 mr40", children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTabs */.YG, { value: 'all', onChange: function onChange() {}, tabBarExtraContent: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, { icon: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { width: 20, src: AddIcon_namespaceObject }), onClick: function onClick() { var _user$userInfo; setIsAddLesson(true); form.setFieldsValue({ creator: user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.real_name }); }, children: "\u65B0\u5EFA\u597D\u8BFE" }), dataSource: [{ id: 'all', name: moduleName, total: LessonsList === null || LessonsList === void 0 || (_LessonsList$data = LessonsList.data) === null || _LessonsList$data === void 0 ? void 0 : _LessonsList$data.count }] }), (LessonsList === null || LessonsList === void 0 || (_LessonsList$data2 = LessonsList.data) === null || _LessonsList$data2 === void 0 ? void 0 : _LessonsList$data2.count) == 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Lessonmodules/* default */.Z.LessonsList, children: LessonsList === null || LessonsList === void 0 || (_LessonsList$data3 = LessonsList.data) === null || _LessonsList$data3 === void 0 || (_LessonsList$data3 = _LessonsList$data3.list) === null || _LessonsList$data3 === void 0 ? void 0 : _LessonsList$data3.map(function (item, index) { var _item$cover; return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: Lessonmodules/* default */.Z.LessonsListItem, onClick: function onClick() { _umi_production_exports.history.push("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/lesson/").concat(item.id, "/detail?leftMenuId=").concat(window.localStorage.getItem('vtrsModuleId'))); }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { style: { width: 283, height: 177, overflow: "hidden" }, children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { className: Lessonmodules/* default */.Z.LessonsListItemImg, src: "".concat(env/* default */.Z.API_SERVER).concat(item === null || item === void 0 || (_item$cover = item.cover) === null || _item$cover === void 0 ? void 0 : _item$cover.url) }) }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { style: { padding: "26px 12px" }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { placement: "topLeft", title: item.name, children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: "font16 ".concat(Lessonmodules/* default */.Z.Onerow), style: { color: "#333", fontWeight: 600 }, children: item.name }) }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: "mt10 ".concat(Lessonmodules/* default */.Z.MultiLine), style: { color: "#666" }, children: item.desc })] })] }, index); }) }), (LessonsList === null || LessonsList === void 0 || (_LessonsList$data4 = LessonsList.data) === null || _LessonsList$data4 === void 0 ? void 0 : _LessonsList$data4.count) != 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { className: "mt20 mb20", wrap: false, align: "middle", justify: "space-between", children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, { children: ["\u5171\xA0", /*#__PURE__*/(0,jsx_runtime.jsx)("span", { style: { color: "#165DFF" }, children: (LessonsList === null || LessonsList === void 0 || (_LessonsList$data5 = LessonsList.data) === null || _LessonsList$data5 === void 0 ? void 0 : _LessonsList$data5.count) || 0 }), "\xA0\u6761\u6570\u636E"] }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, { showSizeChanger: false, showQuickJumper: true, current: urlData.page, pageSize: urlData.limit, onChange: function onChange(page, limit) { return setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, { page: page, limit: limit })); }, total: (LessonsList === null || LessonsList === void 0 || (_LessonsList$data6 = LessonsList.data) === null || _LessonsList$data6 === void 0 ? void 0 : _LessonsList$data6.count) || 0 }) })] }), /*#__PURE__*/(0,jsx_runtime.jsx)(AddOrEdit/* default */.Z, { title: "新建好课", form: form, width: 1200, open: isAddLesson, destroyOnClose: true, centered: true, dispatch: dispatch, onCancel: function onCancel() { form.resetFields(); setIsAddLesson(false); }, confirmLoading: loading["virtualSpaces/postGoodLessonsList"], onOk: function onOk() { return form.submit(); }, handleFinish: ( /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(ValueAll) { var res; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.next = 2; return dispatch({ type: "virtualSpaces/postGoodLessonsList", payload: objectSpread2_default()(objectSpread2_default()({ virtual_spacesId: virtual_spacesId }, ValueAll), {}, { virtual_module_id: window.localStorage.getItem('vtrsModuleId') }) }); case 2: res = _context.sent; if ((res === null || res === void 0 ? void 0 : res.status) == 0) { message/* default */.ZP.success("创建成功"); form.resetFields(); setIsAddLesson(false); getGoodLessonsList(); } case 4: case "end": return _context.stop(); } }, _callee); })); return function (_x) { return _ref2.apply(this, arguments); }; }()) })] }) }); }; /* harmony default export */ var Lesson = ((0,_umi_production_exports.connect)(function (_ref3) { var classroomList = _ref3.classroomList, loading = _ref3.loading, globalSetting = _ref3.globalSetting, virtualSpaces = _ref3.virtualSpaces, user = _ref3.user; return { classroomList: classroomList, globalSetting: globalSetting, loading: loading.effects, virtualSpaces: virtualSpaces, user: user }; })(LessonPage)); /***/ }), /***/ 38854: /*!************************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules ***! \************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ es_dropdown; } }); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js var dropdown = __webpack_require__(91857); // 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/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/EllipsisOutlined.js + 1 modules var EllipsisOutlined = __webpack_require__(40090); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js var es_button = __webpack_require__(3113); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js var context = __webpack_require__(36355); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules var space = __webpack_require__(81327); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js var Compact = __webpack_require__(33234); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/style/index.js + 1 modules var style = __webpack_require__(47211); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown-button.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 DropdownButton = props => { const { getPopupContainer: getContextPopupContainer, getPrefixCls, direction } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); const { prefixCls: customizePrefixCls, type = 'default', danger, disabled, loading, onClick, htmlType, children, className, menu, arrow, autoFocus, overlay, trigger, align, open, onOpenChange, placement, getPopupContainer, href, icon = /*#__PURE__*/_react_17_0_2_react.createElement(EllipsisOutlined/* default */.Z, null), title, buttonsRender = buttons => buttons, mouseEnterDelay, mouseLeaveDelay, overlayClassName, overlayStyle, destroyPopupOnHide, dropdownRender } = props, restProps = __rest(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"]); const prefixCls = getPrefixCls('dropdown', customizePrefixCls); const buttonPrefixCls = `${prefixCls}-button`; const [wrapSSR, hashId] = (0,style/* default */.Z)(prefixCls); const dropdownProps = { menu, arrow, autoFocus, align, disabled, trigger: disabled ? [] : trigger, onOpenChange, getPopupContainer: getPopupContainer || getContextPopupContainer, mouseEnterDelay, mouseLeaveDelay, overlayClassName, overlayStyle, destroyPopupOnHide, dropdownRender }; const { compactSize, compactItemClassnames } = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction); const classes = _classnames_2_5_1_classnames_default()(buttonPrefixCls, compactItemClassnames, className, hashId); if ('overlay' in props) { dropdownProps.overlay = overlay; } if ('open' in props) { dropdownProps.open = open; } if ('placement' in props) { dropdownProps.placement = placement; } else { dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight'; } const leftButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, { type: type, danger: danger, disabled: disabled, loading: loading, onClick: onClick, htmlType: htmlType, href: href, title: title }, children); const rightButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, { type: type, danger: danger, icon: icon }); const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]); return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(space/* default */.Z.Compact, Object.assign({ className: classes, size: compactSize, block: true }, restProps), leftButtonToRender, /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({}, dropdownProps), rightButtonToRender))); }; DropdownButton.__ANT_BUTTON = true; /* harmony default export */ var dropdown_button = (DropdownButton); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js "use client"; const Dropdown = dropdown/* default */.Z; Dropdown.Button = dropdown_button; /* harmony default export */ var es_dropdown = (Dropdown); /***/ }), /***/ 81327: /*!*********************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules ***! \*********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ space; } }); // UNUSED EXPORTS: SpaceContext // 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-util@5.39.1@rc-util/es/Children/toArray.js var toArray = __webpack_require__(47783); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js var context = __webpack_require__(36355); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js var Compact = __webpack_require__(33234); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/context.js const SpaceContext = /*#__PURE__*/_react_17_0_2_react.createContext({ latestIndex: 0 }); const SpaceContextProvider = SpaceContext.Provider; ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Item.js "use client"; const Item = _ref => { let { className, index, children, split, style } = _ref; const { latestIndex } = _react_17_0_2_react.useContext(SpaceContext); if (children === null || children === undefined) { return null; } return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("div", { className: className, style: style }, children), index < latestIndex && split && /*#__PURE__*/_react_17_0_2_react.createElement("span", { className: `${className}-split` }, split)); }; /* harmony default export */ var space_Item = (Item); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/style/index.js + 1 modules var space_style = __webpack_require__(2856); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/utils.js function isPresetSize(size) { return ['small', 'middle', 'large'].includes(size); } function isValidGapNumber(size) { if (!size) { // The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it. return false; } return typeof size === 'number' && !Number.isNaN(size); } ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/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 Space = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => { var _a, _b; const { getPrefixCls, space, direction: directionConfig } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); const { size = (space === null || space === void 0 ? void 0 : space.size) || 'small', align, className, rootClassName, children, direction = 'horizontal', prefixCls: customizePrefixCls, split, style, wrap = false, classNames: customClassNames, styles } = props, otherProps = __rest(props, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]); const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size]; const isPresetVerticalSize = isPresetSize(verticalSize); const isPresetHorizontalSize = isPresetSize(horizontalSize); const isValidVerticalSize = isValidGapNumber(verticalSize); const isValidHorizontalSize = isValidGapNumber(horizontalSize); const childNodes = (0,toArray/* default */.Z)(children, { keepEmpty: true }); const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align; const prefixCls = getPrefixCls('space', customizePrefixCls); const [wrapSSR, hashId] = (0,space_style/* default */.Z)(prefixCls); const cls = _classnames_2_5_1_classnames_default()(prefixCls, space === null || space === void 0 ? void 0 : space.className, hashId, `${prefixCls}-${direction}`, { [`${prefixCls}-rtl`]: directionConfig === 'rtl', [`${prefixCls}-align-${mergedAlign}`]: mergedAlign, [`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize, [`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize }, className, rootClassName); const itemClassName = _classnames_2_5_1_classnames_default()(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.classNames) === null || _b === void 0 ? void 0 : _b.item); // Calculate latest one let latestIndex = 0; const nodes = childNodes.map((child, i) => { var _a, _b; if (child !== null && child !== undefined) { latestIndex = i; } const key = child && child.key || `${itemClassName}-${i}`; return /*#__PURE__*/_react_17_0_2_react.createElement(space_Item, { className: itemClassName, key: key, index: i, split: split, style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.styles) === null || _b === void 0 ? void 0 : _b.item }, child); }); const spaceContext = _react_17_0_2_react.useMemo(() => ({ latestIndex }), [latestIndex]); // =========================== Render =========================== if (childNodes.length === 0) { return null; } const gapStyle = {}; if (wrap) { gapStyle.flexWrap = 'wrap'; } if (!isPresetHorizontalSize && isValidHorizontalSize) { gapStyle.columnGap = horizontalSize; } if (!isPresetVerticalSize && isValidVerticalSize) { gapStyle.rowGap = verticalSize; } return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({ ref: ref, className: cls, style: Object.assign(Object.assign(Object.assign({}, gapStyle), space === null || space === void 0 ? void 0 : space.style), style) }, otherProps), /*#__PURE__*/_react_17_0_2_react.createElement(SpaceContextProvider, { value: spaceContext }, nodes))); }); if (false) {} const CompoundedSpace = Space; CompoundedSpace.Compact = Compact/* default */.ZP; /* harmony default export */ var space = (CompoundedSpace); /***/ }) }]);