Auto Submit

dev_aliyun_xibeigongye
autosubmit 3 years ago
parent 794c05dcd3
commit a30f98bea1

File diff suppressed because it is too large Load Diff

@ -1,4 +1,4 @@
(self["webpackChunk"] = self["webpackChunk"] || []).push([[93522],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[11988],{
/***/ 37653:
/*!*****************************************************************!*\
@ -66,6 +66,569 @@ RightOutlined.displayName = 'RightOutlined';
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 5467:
/*!**********************************************************!*\
!*** ./node_modules/antd/es/_util/getDataOrAriaProps.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": function() { return /* binding */ getDataOrAriaProps; }
/* harmony export */ });
function getDataOrAriaProps(props) {
return Object.keys(props).reduce(function (prev, key) {
if ((key.startsWith('data-') || key.startsWith('aria-') || key === 'role') && !key.startsWith('data-__')) {
prev[key] = props[key];
}
return prev;
}, {});
}
/***/ }),
/***/ 97183:
/*!**********************************************!*\
!*** ./node_modules/antd/es/layout/index.js ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./layout */ 2897);
/* harmony import */ var _Sider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Sider */ 10130);
var Layout = _layout__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP;
Layout.Header = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Header */ .h4;
Layout.Footer = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Footer */ .$_;
Layout.Content = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Content */ .VY;
Layout.Sider = _Sider__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
/* harmony default export */ __webpack_exports__["Z"] = (Layout);
/***/ }),
/***/ 27221:
/*!****************************************************************!*\
!*** ./node_modules/antd/es/layout/style/index.js + 1 modules ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
var style_default = __webpack_require__(43146);
;// CONCATENATED MODULE: ./node_modules/antd/es/layout/style/index.less
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./node_modules/antd/es/layout/style/index.js
/***/ }),
/***/ 37029:
/*!**********************************************************!*\
!*** ./node_modules/antd/es/locale/zh_CN.js + 4 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ es_locale_zh_CN; }
});
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js
var zh_CN = __webpack_require__(81626);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
;// CONCATENATED MODULE: ./node_modules/rc-picker/es/locale/zh_CN.js
var locale = {
locale: 'zh_CN',
today: '今天',
now: '此刻',
backToToday: '返回今天',
ok: '确定',
timeSelect: '选择时间',
dateSelect: '选择日期',
weekSelect: '选择周',
clear: '清除',
month: '月',
year: '年',
previousMonth: '上个月 (翻页上键)',
nextMonth: '下个月 (翻页下键)',
monthSelect: '选择月份',
yearSelect: '选择年份',
decadeSelect: '选择年代',
yearFormat: 'YYYY年',
dayFormat: 'D日',
dateFormat: 'YYYY年M月D日',
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
previousYear: '上一年 (Control键加左方向键)',
nextYear: '下一年 (Control键加右方向键)',
previousDecade: '上一年代',
nextDecade: '下一年代',
previousCentury: '上一世纪',
nextCentury: '下一世纪'
};
/* harmony default export */ var locale_zh_CN = (locale);
;// CONCATENATED MODULE: ./node_modules/antd/es/time-picker/locale/zh_CN.js
var zh_CN_locale = {
placeholder: '请选择时间',
rangePlaceholder: ['开始时间', '结束时间']
};
/* harmony default export */ var time_picker_locale_zh_CN = (zh_CN_locale);
;// CONCATENATED MODULE: ./node_modules/antd/es/date-picker/locale/zh_CN.js
// 统一合并为完整的 Locale
var locale_zh_CN_locale = {
lang: (0,esm_extends/* default */.Z)({
placeholder: '请选择日期',
yearPlaceholder: '请选择年份',
quarterPlaceholder: '请选择季度',
monthPlaceholder: '请选择月份',
weekPlaceholder: '请选择周',
rangePlaceholder: ['开始日期', '结束日期'],
rangeYearPlaceholder: ['开始年份', '结束年份'],
rangeMonthPlaceholder: ['开始月份', '结束月份'],
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
rangeWeekPlaceholder: ['开始周', '结束周']
}, locale_zh_CN),
timePickerLocale: (0,esm_extends/* default */.Z)({}, time_picker_locale_zh_CN)
};
// should add whitespace between char in Button
locale_zh_CN_locale.lang.ok = '确定';
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_zh_CN = (locale_zh_CN_locale);
;// CONCATENATED MODULE: ./node_modules/antd/es/calendar/locale/zh_CN.js
/* harmony default export */ var calendar_locale_zh_CN = (date_picker_locale_zh_CN);
;// CONCATENATED MODULE: ./node_modules/antd/es/locale/zh_CN.js
/* eslint-disable no-template-curly-in-string */
var typeTemplate = '${label}不是一个有效的${type}';
var localeValues = {
locale: 'zh-cn',
Pagination: zh_CN/* default */.Z,
DatePicker: date_picker_locale_zh_CN,
TimePicker: time_picker_locale_zh_CN,
Calendar: calendar_locale_zh_CN,
// locales for all components
global: {
placeholder: '请选择'
},
Table: {
filterTitle: '筛选',
filterConfirm: '确定',
filterReset: '重置',
filterEmptyText: '无筛选项',
filterCheckall: '全选',
filterSearchPlaceholder: '在筛选项中搜索',
selectAll: '全选当页',
selectInvert: '反选当页',
selectNone: '清空所有',
selectionAll: '全选所有',
sortTitle: '排序',
expand: '展开行',
collapse: '关闭行',
triggerDesc: '点击降序',
triggerAsc: '点击升序',
cancelSort: '取消排序'
},
Modal: {
okText: '确定',
cancelText: '取消',
justOkText: '知道了'
},
Popconfirm: {
cancelText: '取消',
okText: '确定'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: '请输入搜索内容',
itemUnit: '项',
itemsUnit: '项',
remove: '删除',
selectCurrent: '全选当页',
removeCurrent: '删除当页',
selectAll: '全选所有',
removeAll: '删除全部',
selectInvert: '反选当页'
},
Upload: {
uploading: '文件上传中',
removeFile: '删除文件',
uploadError: '上传错误',
previewFile: '预览文件',
downloadFile: '下载文件'
},
Empty: {
description: '暂无数据'
},
Icon: {
icon: '图标'
},
Text: {
edit: '编辑',
copy: '复制',
copied: '复制成功',
expand: '展开'
},
PageHeader: {
back: '返回'
},
Form: {
optional: '(可选)',
defaultValidateMessages: {
"default": '字段验证错误${label}',
required: '请输入${label}',
"enum": '${label}必须是其中一个[${enum}]',
whitespace: '${label}不能为空字符',
date: {
format: '${label}日期格式无效',
parse: '${label}不能转换为日期',
invalid: '${label}是一个无效日期'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
"boolean": typeTemplate,
integer: typeTemplate,
"float": typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label}须为${len}个字符',
min: '${label}最少${min}个字符',
max: '${label}最多${max}个字符',
range: '${label}须在${min}-${max}字符之间'
},
number: {
len: '${label}必须等于${len}',
min: '${label}最小值为${min}',
max: '${label}最大值为${max}',
range: '${label}须在${min}-${max}之间'
},
array: {
len: '须为${len}个${label}',
min: '最少${min}个${label}',
max: '最多${max}个${label}',
range: '${label}数量须在${min}-${max}之间'
},
pattern: {
mismatch: '${label}与模式不匹配${pattern}'
}
}
},
Image: {
preview: '预览'
}
};
/* harmony default export */ var es_locale_zh_CN = (localeValues);
/***/ }),
/***/ 29924:
/*!*********************************************************!*\
!*** ./node_modules/antd/es/radio/index.js + 4 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"ZP": function() { return /* binding */ es_radio; }
});
// UNUSED EXPORTS: Button, Group
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(4942);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(97685);
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
var useMergedState = __webpack_require__(21770);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
var context = __webpack_require__(53124);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/SizeContext.js
var SizeContext = __webpack_require__(97647);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/getDataOrAriaProps.js
var getDataOrAriaProps = __webpack_require__(5467);
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/context.js
var RadioGroupContext = /*#__PURE__*/react.createContext(null);
var RadioGroupContextProvider = RadioGroupContext.Provider;
/* harmony default export */ var radio_context = (RadioGroupContext);
var RadioOptionTypeContext = /*#__PURE__*/react.createContext(null);
var RadioOptionTypeContextProvider = RadioOptionTypeContext.Provider;
// EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js
var es = __webpack_require__(50132);
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__(42550);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(98866);
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
var form_context = __webpack_require__(65223);
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/radio.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var InternalRadio = function InternalRadio(props, ref) {
var _classNames;
var groupContext = react.useContext(radio_context);
var radioOptionTypeContext = react.useContext(RadioOptionTypeContext);
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var innerRef = react.useRef();
var mergedRef = (0,es_ref/* composeRef */.sQ)(ref, innerRef);
var _useContext = (0,react.useContext)(form_context/* FormItemInputContext */.aM),
isFormItemInput = _useContext.isFormItemInput;
false ? 0 : void 0;
var onChange = function onChange(e) {
var _a, _b;
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, e);
(_b = groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) === null || _b === void 0 ? void 0 : _b.call(groupContext, e);
};
var customizePrefixCls = props.prefixCls,
className = props.className,
children = props.children,
style = props.style,
customDisabled = props.disabled,
restProps = __rest(props, ["prefixCls", "className", "children", "style", "disabled"]);
var radioPrefixCls = getPrefixCls('radio', customizePrefixCls);
var prefixCls = ((groupContext === null || groupContext === void 0 ? void 0 : groupContext.optionType) || radioOptionTypeContext) === 'button' ? "".concat(radioPrefixCls, "-button") : radioPrefixCls;
var radioProps = (0,esm_extends/* default */.Z)({}, restProps);
// ===================== Disabled =====================
var disabled = react.useContext(DisabledContext/* default */.Z);
radioProps.disabled = customDisabled || disabled;
if (groupContext) {
radioProps.name = groupContext.name;
radioProps.onChange = onChange;
radioProps.checked = props.value === groupContext.value;
radioProps.disabled = radioProps.disabled || groupContext.disabled;
}
var wrapperClassString = classnames_default()("".concat(prefixCls, "-wrapper"), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-wrapper-checked"), radioProps.checked), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-wrapper-disabled"), radioProps.disabled), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-wrapper-rtl"), direction === 'rtl'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-wrapper-in-form-item"), isFormItemInput), _classNames), className);
return (
/*#__PURE__*/
// eslint-disable-next-line jsx-a11y/label-has-associated-control
react.createElement("label", {
className: wrapperClassString,
style: style,
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave
}, /*#__PURE__*/react.createElement(es/* default */.Z, (0,esm_extends/* default */.Z)({}, radioProps, {
type: "radio",
prefixCls: prefixCls,
ref: mergedRef
})), children !== undefined ? /*#__PURE__*/react.createElement("span", null, children) : null)
);
};
var Radio = /*#__PURE__*/react.forwardRef(InternalRadio);
if (false) {}
/* harmony default export */ var radio_radio = (Radio);
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/group.js
var RadioGroup = /*#__PURE__*/react.forwardRef(function (props, ref) {
var _classNames;
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var size = react.useContext(SizeContext/* default */.Z);
var _useMergedState = (0,useMergedState/* default */.Z)(props.defaultValue, {
value: props.value
}),
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
value = _useMergedState2[0],
setValue = _useMergedState2[1];
var onRadioChange = function onRadioChange(ev) {
var lastValue = value;
var val = ev.target.value;
if (!('value' in props)) {
setValue(val);
}
var onChange = props.onChange;
if (onChange && val !== lastValue) {
onChange(ev);
}
};
var customizePrefixCls = props.prefixCls,
_props$className = props.className,
className = _props$className === void 0 ? '' : _props$className,
options = props.options,
_props$buttonStyle = props.buttonStyle,
buttonStyle = _props$buttonStyle === void 0 ? 'outline' : _props$buttonStyle,
disabled = props.disabled,
children = props.children,
customizeSize = props.size,
style = props.style,
id = props.id,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave,
onFocus = props.onFocus,
onBlur = props.onBlur;
var prefixCls = getPrefixCls('radio', customizePrefixCls);
var groupPrefixCls = "".concat(prefixCls, "-group");
var childrenToRender = children;
// 如果存在 options, 优先使用
if (options && options.length > 0) {
childrenToRender = options.map(function (option) {
if (typeof option === 'string' || typeof option === 'number') {
// 此处类型自动推导为 string
return /*#__PURE__*/react.createElement(radio_radio, {
key: option.toString(),
prefixCls: prefixCls,
disabled: disabled,
value: option,
checked: value === option
}, option);
}
// 此处类型自动推导为 { label: string value: string }
return /*#__PURE__*/react.createElement(radio_radio, {
key: "radio-group-value-options-".concat(option.value),
prefixCls: prefixCls,
disabled: option.disabled || disabled,
value: option.value,
checked: value === option.value,
style: option.style
}, option.label);
});
}
var mergedSize = customizeSize || size;
var classString = classnames_default()(groupPrefixCls, "".concat(groupPrefixCls, "-").concat(buttonStyle), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(groupPrefixCls, "-").concat(mergedSize), mergedSize), (0,defineProperty/* default */.Z)(_classNames, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
return /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({}, (0,getDataOrAriaProps/* default */.Z)(props), {
className: classString,
style: style,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onFocus: onFocus,
onBlur: onBlur,
id: id,
ref: ref
}), /*#__PURE__*/react.createElement(RadioGroupContextProvider, {
value: {
onChange: onRadioChange,
value: value,
disabled: props.disabled,
name: props.name,
optionType: props.optionType
}
}, childrenToRender));
});
/* harmony default export */ var group = (/*#__PURE__*/react.memo(RadioGroup));
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/radioButton.js
var radioButton_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;
};
var RadioButton = function RadioButton(props, ref) {
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
getPrefixCls = _React$useContext.getPrefixCls;
var customizePrefixCls = props.prefixCls,
radioProps = radioButton_rest(props, ["prefixCls"]);
var prefixCls = getPrefixCls('radio', customizePrefixCls);
return /*#__PURE__*/react.createElement(RadioOptionTypeContextProvider, {
value: "button"
}, /*#__PURE__*/react.createElement(radio_radio, (0,esm_extends/* default */.Z)({
prefixCls: prefixCls
}, radioProps, {
type: "radio",
ref: ref
})));
};
/* harmony default export */ var radioButton = (/*#__PURE__*/react.forwardRef(RadioButton));
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/index.js
var radio_Radio = radio_radio;
radio_Radio.Button = radioButton;
radio_Radio.Group = group;
radio_Radio.__ANT_RADIO = true;
/* harmony default export */ var es_radio = (radio_Radio);
/***/ }),
/***/ 83822:
/*!***************************************************************!*\
!*** ./node_modules/antd/es/radio/style/index.js + 1 modules ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
var style_default = __webpack_require__(43146);
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/style/index.less
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/style/index.js
// deps-lint-skip: form
/***/ }),
/***/ 69309:

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[69060],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[12755],{
/***/ 82982:
/*!*****************************************!*\
@ -816,6 +816,109 @@ var jsx_runtime = __webpack_require__(85893);
/***/ }),
/***/ 15994:
/*!*********************************!*\
!*** ./src/utils/fullscreen.ts ***!
\*********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "BU": function() { return /* binding */ exitFull; },
/* harmony export */ "Dj": function() { return /* binding */ requestFullScreen; },
/* harmony export */ "gH": function() { return /* binding */ fullscreenChange; },
/* harmony export */ "vp": function() { return /* binding */ IsFull; }
/* harmony export */ });
function requestFullScreen(element) {
try {
if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
} catch (e) {
console.log(e, ":e");
}
}
function exitFull() {
if (window.top.document.webkitExitFullscreen) {
window.top.document.webkitExitFullscreen();
} else if (document.exitFullscreen) {
window.top.document.exitFullscreen();
} else if (document.msExitFullscreen) {
window.top.document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
window.top.document.mozCancelFullScreen();
}
}
// esliint disabled
var fullscreenChange = function fullscreenChange() {
//['fullscreenchange','msfullscreenchange','webkitfullscreenchange', 'mozfullscreenchange']
if (document.webkitExitFullscreen) {
// document.webkitExitFullscreen()
return 'webkitfullscreenchange';
} else if (document.exitFullscreen) {
// document.exitFullscreen()
return 'fullscreenchange';
} else if (document.msExitFullscreen) {
// document.msExitFullscreen()
return 'msfullscreenchange';
} else if (document.mozCancelFullScreen) {
// document.mozCancelFullScreen()
return 'mozfullscreenchange';
}
};
//判断是否全屏
function IsFull() {
var fullscreenElement = window.top.document.fullscreenElement || window.top.document.mozFullscreenElement || window.top.document.webkitFullscreenElement;
var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled;
if (fullscreenElement == null) {
return false;
} else {
return true;
}
}
// document.addEventListener("mozfullscreenchange", function (event) {
// console.log("mozfullscreenchange ", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("webkitfullscreenchange", function (event) {
// console.log("webkitfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("msfullscreenchange", function (event) {
// console.log("msfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
/***/ }),
/***/ 63778:
/*!******************************!*\
!*** ./src/utils/urlTool.ts ***!

@ -1,352 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[24634],{
/***/ 45983:
/*!**************************************************************************!*\
!*** ./src/components/EcListItems/Problemset/Card/index.tsx + 1 modules ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ Problemset_Card; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/radio/style/index.js + 1 modules
var style = __webpack_require__(83822);
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules
var es_radio = __webpack_require__(29924);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
var RenderHtml = __webpack_require__(12768);
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Cardmodules = ({"flexRow":"flexRow____Sm4b","flexColumn":"flexColumn___mQNZs","action":"action___QUVEn","setScore":"setScore___yZ0Yb","delete":"delete___e4taL","content":"content___jR4Y6","titleWrap":"titleWrap___zsXYY","titleNumber":"titleNumber___p60vi","score":"score___DbCHw","titleHtml":"titleHtml___FALbj","answerWrap":"answerWrap___uPjYq","answer":"answer___pfiPk","answerText":"answerText___K3TNr"});
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.tsx
// import Item from '@/pages/Forums/Index/components/Item';
var tagDotList = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
var Card = function Card(_ref) {
var index = _ref.index,
typeName = _ref.typeName,
type = _ref.type,
_ref$data = _ref.data,
data = _ref$data === void 0 ? {} : _ref$data,
inMouseId = _ref.inMouseId,
isshow = _ref.isshow,
_ref$onSetScore = _ref.onSetScore,
onSetScore = _ref$onSetScore === void 0 ? function () {} : _ref$onSetScore,
_ref$onDelete = _ref.onDelete,
onDelete = _ref$onDelete === void 0 ? function () {} : _ref$onDelete,
_ref$onMouseEnter = _ref.onMouseEnter,
_onMouseEnter = _ref$onMouseEnter === void 0 ? function () {} : _ref$onMouseEnter,
_ref$showAnswer = _ref.showAnswer,
showAnswer = _ref$showAnswer === void 0 ? false : _ref$showAnswer;
var _useState = (0,react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
isopen = _useState2[0],
setisopen = _useState2[1];
var renderSingleOrMultiple = function renderSingleOrMultiple() {
var _data$choices;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [data === null || data === void 0 ? void 0 : (_data$choices = data.choices) === null || _data$choices === void 0 ? void 0 : _data$choices.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
lineHeight: '24px',
flexShrink: 0
},
children: tagDotList[index]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.answer, " ml5"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: item === null || item === void 0 ? void 0 : item.choice_text
})
})]
}, index);
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
})]
});
};
var renderJudgment = function renderJudgment() {
var _data$choices2;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: data === null || data === void 0 ? void 0 : (_data$choices2 = data.choices) === null || _data$choices2 === void 0 ? void 0 : _data$choices2.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
disabled: true,
children: item === null || item === void 0 ? void 0 : item.choice_text
}, index);
})
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
})]
});
};
var renderProgram = function renderProgram() {
var _data$program_attr;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: data === null || data === void 0 ? void 0 : (_data$program_attr = data.program_attr) === null || _data$program_attr === void 0 ? void 0 : _data$program_attr.description
})
})
});
};
var renderCompletion = function renderCompletion() {
var _data$standard_answer;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexColumn, " mt15"),
children: data === null || data === void 0 ? void 0 : (_data$standard_answer = data.standard_answer) === null || _data$standard_answer === void 0 ? void 0 : _data$standard_answer.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: "\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(item.position, "\uFF09\uFF1A").concat(item.answer_text.join("、"))
}, index);
})
})
});
};
var renderSubjective = function renderSubjective() {
var _data$answer_texts;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt15",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: data === null || data === void 0 ? void 0 : (_data$answer_texts = data.answer_texts) === null || _data$answer_texts === void 0 ? void 0 : _data$answer_texts[0]
})]
})
});
};
var renderShixun = function renderShixun() {
var _data$shixun;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt10",
children: "\u5173\u5361"
}), data === null || data === void 0 ? void 0 : (_data$shixun = data.shixun) === null || _data$shixun === void 0 ? void 0 : _data$shixun.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 font14",
children: [index + 1, ". ", item === null || item === void 0 ? void 0 : item.challenge_name]
}, index);
})]
});
};
var renderCombination = function renderCombination() {
var _data$sub_questions;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
style: {
display: isopen && 'none'
},
children: data === null || data === void 0 ? void 0 : (_data$sub_questions = data.sub_questions) === null || _data$sub_questions === void 0 ? void 0 : _data$sub_questions.map(function (e, i) {
var _e$choices;
var str = "<span style=\"margin-right: 10px\">".concat(index + 1, ".").concat(i + 1, "</span><span>\uFF08\u5355\u9009\u9898\uFF09</span><span class=\"c-grey-999\">\uFF08").concat(e.score, "\u5206\uFF09</span>");
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.titleWrap,
style: {
marginTop: 16
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Cardmodules.titleHtml,
value: str + e.name
})
}), e === null || e === void 0 ? void 0 : (_e$choices = e.choices) === null || _e$choices === void 0 ? void 0 : _e$choices.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
lineHeight: '24px',
flexShrink: 0
},
children: tagDotList[index]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.answer, " ml5"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: item === null || item === void 0 ? void 0 : item.choice_text
})
})]
}, index);
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", e === null || e === void 0 ? void 0 : e.standard_answer_show]
})]
}, e === null || e === void 0 ? void 0 : e.id);
})
});
};
var renderAnswer = function renderAnswer() {
var mapping = {
'SINGLE': renderSingleOrMultiple,
'MULTIPLE': renderSingleOrMultiple,
'JUDGMENT': renderJudgment,
'PROGRAM': renderProgram,
'COMPLETION': renderCompletion,
'SUBJECTIVE': renderSubjective,
'PRACTICAL': renderShixun,
'COMBINATION': renderCombination
};
return mapping[type] ? mapping[type]() : null;
};
var getDomString = function getDomString(data, i) {
var _data$sub_questions2;
var str = "<span style=\"margin-right: -10px\">".concat(i + 1, "\u3001</span><span class=\"c-grey-999\">\uFF08").concat((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\u5171".concat(data === null || data === void 0 ? void 0 : (_data$sub_questions2 = data.sub_questions) === null || _data$sub_questions2 === void 0 ? void 0 : _data$sub_questions2.length, "\u5C0F\u9898\uFF0C") : '').concat(data.score, "\u5206\uFF09</span> ");
return str;
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onMouseEnter: function onMouseEnter() {
return _onMouseEnter(data.id);
},
children: [inMouseId === data.id && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.action,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.setScore,
onClick: function onClick() {
return onSetScore(data.id, typeName, data === null || data === void 0 ? void 0 : data.shixun, data.score, data);
},
children: "\u8BBE\u7F6E\u5F97\u5206"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules["delete"],
onClick: function onClick() {
return onDelete(data.id);
},
children: "\u5220\u9664"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.content,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.titleWrap,
style: {
justifyContent: 'space-between'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Cardmodules.titleHtml,
value: getDomString(data, index) + ((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\uFF08\u9898\u5E72\uFF09" : '') + (data.name || (data === null || data === void 0 ? void 0 : data.shixun_name))
}), (data === null || data === void 0 ? void 0 : data.item_type) === "combination" && !isshow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick(e) {
setisopen(!isopen);
},
style: {
textAlign: 'end',
flexShrink: 0
},
children: isopen ? '展开' : '收起'
})]
}), renderAnswer()]
})]
});
};
/* harmony default export */ var Problemset_Card = (Card);
/***/ }),
/***/ 36845:
/*!**********************************************************!*\
!*** ./src/components/FixedButton/index.tsx + 1 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"t": function() { return /* binding */ FixedButton; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/FixedButton/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var FixedButtonmodules = ({"buttonFixed":"buttonFixed___vyq30","button":"button___hxmYv","buttonWrap":"buttonWrap___uK8dl"});
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/FixedButton/index.tsx
var FixedButton = function FixedButton(_ref) {
var _ref$cancelText = _ref.cancelText,
cancelText = _ref$cancelText === void 0 ? '取消' : _ref$cancelText,
_ref$okText = _ref.okText,
okText = _ref$okText === void 0 ? '确定' : _ref$okText,
_ref$loading = _ref.loading,
loading = _ref$loading === void 0 ? false : _ref$loading,
_ref$hasOkBtn = _ref.hasOkBtn,
hasOkBtn = _ref$hasOkBtn === void 0 ? true : _ref$hasOkBtn,
_ref$okButtonProps = _ref.okButtonProps,
okButtonProps = _ref$okButtonProps === void 0 ? {} : _ref$okButtonProps,
_ref$onCancel = _ref.onCancel,
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
_ref$onOk = _ref.onOk,
onOk = _ref$onOk === void 0 ? function () {} : _ref$onOk,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: classnames_default()(FixedButtonmodules.buttonFixed, className),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: FixedButtonmodules.buttonWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
size: "large",
className: "".concat(FixedButtonmodules.button, " mr20"),
onClick: onCancel,
children: cancelText
}), hasOkBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, objectSpread2_default()(objectSpread2_default()({
size: "large",
type: "primary",
className: "".concat(FixedButtonmodules.button, " mr20"),
loading: loading,
onClick: onOk
}, okButtonProps), {}, {
children: okText
}))]
})
});
};
/***/ }),
(self["webpackChunk"] = self["webpackChunk"] || []).push([[12768],{
/***/ 36579:
/*!*********************************************************!*\
@ -431,7 +84,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -518,7 +172,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;

@ -1,46 +1,4 @@
(self["webpackChunk"] = self["webpackChunk"] || []).push([[37250,42977],{
/***/ 82826:
/*!**********************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***!
\**********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_ArrowLeftOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ArrowLeftOutlined.js
// This icon file is generated automatically.
var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" };
/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_ArrowLeftOutlined
}));
};
ArrowLeftOutlined_ArrowLeftOutlined.displayName = 'ArrowLeftOutlined';
/* harmony default export */ var icons_ArrowLeftOutlined = (/*#__PURE__*/react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined));
/***/ }),
(self["webpackChunk"] = self["webpackChunk"] || []).push([[14074,42977],{
/***/ 95025:
/*!**********************************************************************!*\
@ -70,34 +28,6 @@ CaretDownOutlined.displayName = 'CaretDownOutlined';
/***/ }),
/***/ 82061:
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DeleteOutlined */ 47046);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DeleteOutlined = function DeleteOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
DeleteOutlined.displayName = 'DeleteOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DeleteOutlined));
/***/ }),
/***/ 95604:
/*!*******************************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DeliveredProcedureOutlined.js + 1 modules ***!
@ -168,48 +98,6 @@ DownOutlined.displayName = 'DownOutlined';
/***/ }),
/***/ 64082:
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_InboxOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js
// This icon file is generated automatically.
var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
/* harmony default export */ var asn_InboxOutlined = (InboxOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_InboxOutlined
}));
};
InboxOutlined_InboxOutlined.displayName = 'InboxOutlined';
/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/react.forwardRef(InboxOutlined_InboxOutlined));
/***/ }),
/***/ 65429:
/*!*****************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/LikeOutlined.js + 1 modules ***!
@ -370,94 +258,6 @@ var getRenderPropValue = function getRenderPropValue(propValue) {
return propValue;
};
/***/ }),
/***/ 27049:
/*!***********************************************!*\
!*** ./node_modules/antd/es/divider/index.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462);
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 53124);
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;
};
var Divider = function Divider(props) {
var _classNames;
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var customizePrefixCls = props.prefixCls,
_props$type = props.type,
type = _props$type === void 0 ? 'horizontal' : _props$type,
_props$orientation = props.orientation,
orientation = _props$orientation === void 0 ? 'center' : _props$orientation,
orientationMargin = props.orientationMargin,
className = props.className,
children = props.children,
dashed = props.dashed,
plain = props.plain,
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"]);
var prefixCls = getPrefixCls('divider', customizePrefixCls);
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
var hasChildren = !!children;
var hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
var hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
var classString = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text"), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-plain"), !!plain), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-left"), hasCustomMarginLeft), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-right"), hasCustomMarginRight), _classNames), className);
var innerStyle = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({}, hasCustomMarginLeft && {
marginLeft: orientationMargin
}), hasCustomMarginRight && {
marginRight: orientationMargin
});
// Warning children not work in vertical mode
if (false) {}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({
className: classString
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", {
className: "".concat(prefixCls, "-inner-text"),
style: innerStyle
}, children));
};
/* harmony default export */ __webpack_exports__["Z"] = (Divider);
/***/ }),
/***/ 98541:
/*!*****************************************************************!*\
!*** ./node_modules/antd/es/divider/style/index.js + 1 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
var style_default = __webpack_require__(43146);
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.less
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.js
/***/ }),
/***/ 55241:

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[17379,34180,28078,68922,44666],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[17379,34180,7713,68922,44666],{
/***/ 49495:
/*!***********************************************************************!*\

@ -84,7 +84,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -171,7 +172,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[2246,34180,10545],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[2246,34180],{
/***/ 32857:
/*!********************************************************************!*\

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -1271,36 +1271,38 @@ var TrfList = function TrfList(_ref) {
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/modal/style */ 35611);
/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! antd/es/modal */ 85402);
/* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/button/style */ 29913);
/* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! antd/es/button */ 71577);
/* harmony import */ var antd_es_col_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/col/style */ 89032);
/* harmony import */ var antd_es_col__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! antd/es/col */ 15746);
/* harmony import */ var antd_es_row_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/row/style */ 13062);
/* harmony import */ var antd_es_row__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! antd/es/row */ 71230);
/* harmony import */ var antd_es_date_picker_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/date-picker/style */ 25763);
/* harmony import */ var antd_es_date_picker__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! antd/es/date-picker */ 45741);
/* harmony import */ var antd_es_input_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/input/style */ 69463);
/* harmony import */ var antd_es_input__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! antd/es/input */ 75008);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var antd_es_form_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd/es/form/style */ 75627);
/* harmony import */ var antd_es_form__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! antd/es/form */ 51018);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var antd_es_statistic_style__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd/es/statistic/style */ 14558);
/* harmony import */ var antd_es_statistic__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! antd/es/statistic */ 74763);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _service_exercise__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/service/exercise */ 51412);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! moment */ 30381);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! umi */ 89214);
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/utils/util */ 29427);
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/utils/authority */ 7);
/* harmony import */ var _pages_Classrooms_Lists_ShixunHomeworks_Detail_components_ConfigWorks_Releasesetting__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/ConfigWorks/Releasesetting */ 38448);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! antd/es/modal */ 85402);
/* harmony import */ var antd_es_row_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/row/style */ 13062);
/* harmony import */ var antd_es_row__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! antd/es/row */ 71230);
/* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/button/style */ 29913);
/* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! antd/es/button */ 71577);
/* harmony import */ var antd_es_col_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/col/style */ 89032);
/* harmony import */ var antd_es_col__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! antd/es/col */ 15746);
/* harmony import */ var antd_es_input_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/input/style */ 69463);
/* harmony import */ var antd_es_input__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! antd/es/input */ 75008);
/* harmony import */ var antd_es_table_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/table/style */ 71854);
/* harmony import */ var antd_es_table__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! antd/es/table */ 67250);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/typeof.js */ 18698);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var antd_es_form_style__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd/es/form/style */ 75627);
/* harmony import */ var antd_es_form__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! antd/es/form */ 51018);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var antd_es_statistic_style__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd/es/statistic/style */ 14558);
/* harmony import */ var antd_es_statistic__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! antd/es/statistic */ 74763);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _service_exercise__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/service/exercise */ 51412);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! moment */ 30381);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! umi */ 89214);
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/utils/util */ 29427);
/* harmony import */ var _components_Exercise_ip__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @/components/Exercise/ip */ 79443);
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @/utils/authority */ 7);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
@ -1330,63 +1332,113 @@ var TrfList = function TrfList(_ref) {
var Countdown = antd_es_statistic__WEBPACK_IMPORTED_MODULE_19__/* ["default"].Countdown */ .Z.Countdown;
var Countdown = antd_es_statistic__WEBPACK_IMPORTED_MODULE_20__/* ["default"].Countdown */ .Z.Countdown;
var Unlock = function Unlock(_ref) {
var _actionTabs$exerciseP5, _actionTabs$exerciseP8;
var _actionTabs$exerciseP9, _actionTabs$exerciseP10, _actionTabs$exerciseP11, _actionTabs$exerciseP12;
var exercise = _ref.exercise,
successCb = _ref.successCb,
dispatch = _ref.dispatch;
var params = (0,umi__WEBPACK_IMPORTED_MODULE_14__.useParams)();
var _Form$useForm = antd_es_form__WEBPACK_IMPORTED_MODULE_20__/* ["default"].useForm */ .Z.useForm(),
_Form$useForm2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9___default()(_Form$useForm, 1),
var params = (0,umi__WEBPACK_IMPORTED_MODULE_15__.useParams)();
var _Form$useForm = antd_es_form__WEBPACK_IMPORTED_MODULE_21__/* ["default"].useForm */ .Z.useForm(),
_Form$useForm2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10___default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_11__.useState)(false),
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9___default()(_useState, 2),
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(false),
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10___default()(_useState, 2),
isLoading = _useState2[0],
setIsLoading = _useState2[1];
var localIpRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)();
var actionTabs = exercise.actionTabs;
(0,react__WEBPACK_IMPORTED_MODULE_11__.useEffect)(function () {
(0,react__WEBPACK_IMPORTED_MODULE_12__.useEffect)(function () {
if (exercise.actionTabs.key === 'student-unlock') {
// if (actionTabs?.exerciseParams?.ip_limit !== 'no' || actionTabs?.exerciseParams?.ip_bind)
// getLocalIp();
setIsLoading(false);
form.resetFields();
}
}, [exercise.actionTabs.key]);
var getLocalIp = function getLocalIp() {
return new Promise( /*#__PURE__*/function () {
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default()().mark(function _callee(resolve) {
var _actionTabs$exerciseP, _actionTabs$exerciseP2;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,_components_Exercise_ip__WEBPACK_IMPORTED_MODULE_17__/* .findLocalIp */ .y)({
ip_limit: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP = actionTabs.exerciseParams) === null || _actionTabs$exerciseP === void 0 ? void 0 : _actionTabs$exerciseP.ip_limit,
ip_bind: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP2 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP2 === void 0 ? void 0 : _actionTabs$exerciseP2.ip_bind
});
case 2:
localIpRef.current = _context.sent;
return _context.abrupt("return", resolve());
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x) {
return _ref2.apply(this, arguments);
};
}());
};
var handleOk = /*#__PURE__*/function () {
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_7___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6___default()().mark(function _callee() {
var _actionTabs$exerciseP, _actionTabs$exerciseP2;
var formValue, unlockRes, _userInfo, _actionTabs$exerciseP3, _actionTabs$exerciseP4, delayedParams, v;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_6___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
var _ref3 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default()().mark(function _callee2() {
var _actionTabs$exerciseP3, _actionTabs$exerciseP4, _actionTabs$exerciseP5, _actionTabs$exerciseP6;
var formValue, unlockRes, _userInfo, _actionTabs$exerciseP7, _actionTabs$exerciseP8, delayedParams, v;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context.next = 2;
_context2.next = 2;
return form.validateFields();
case 2:
formValue = form.getFieldsValue();
setIsLoading(true);
_context.next = 6;
return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_12__/* .unlockUser */ .ZD)(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP = actionTabs.exerciseParams) === null || _actionTabs$exerciseP === void 0 ? void 0 : _actionTabs$exerciseP.id, {
exercise_user_id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP2 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP2 === void 0 ? void 0 : _actionTabs$exerciseP2.exercise_user_id,
unlock_key: formValue.unlock_key
if (!((actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP3 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP3 === void 0 ? void 0 : _actionTabs$exerciseP3.ip_limit) !== 'no' || actionTabs !== null && actionTabs !== void 0 && (_actionTabs$exerciseP4 = actionTabs.exerciseParams) !== null && _actionTabs$exerciseP4 !== void 0 && _actionTabs$exerciseP4.ip_bind)) {
_context2.next = 7;
break;
}
_context2.next = 7;
return getLocalIp();
case 7:
_context2.next = 9;
return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_13__/* .unlockUser */ .ZD)(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP5 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP5 === void 0 ? void 0 : _actionTabs$exerciseP5.id, {
exercise_user_id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP6 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP6 === void 0 ? void 0 : _actionTabs$exerciseP6.exercise_user_id,
unlock_key: formValue.unlock_key,
ip: localIpRef.current
});
case 6:
unlockRes = _context.sent;
case 9:
unlockRes = _context2.sent;
if (!(unlockRes.status === 0)) {
_context.next = 15;
_context2.next = 22;
break;
}
if (!successCb) {
_context2.next = 15;
break;
}
dispatch({
type: 'exercise/setActionTabs',
payload: {}
});
successCb();
return _context2.abrupt("return");
case 15:
if (!formValue.time) {
_context.next = 12;
_context2.next = 19;
break;
}
delayedParams = {
time: moment__WEBPACK_IMPORTED_MODULE_13___default()(formValue.time).format("YYYY-MM-DD HH:mm"),
exercise_user_id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP3 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP3 === void 0 ? void 0 : _actionTabs$exerciseP3.exercise_user_id,
id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP4 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP4 === void 0 ? void 0 : _actionTabs$exerciseP4.id
time: moment__WEBPACK_IMPORTED_MODULE_14___default()(formValue.time).format("YYYY-MM-DD HH:mm"),
exercise_user_id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP7 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP7 === void 0 ? void 0 : _actionTabs$exerciseP7.exercise_user_id,
id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP8 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP8 === void 0 ? void 0 : _actionTabs$exerciseP8.id
};
_context.next = 12;
return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_12__/* .delayedTime */ .qz)(delayedParams);
case 12:
_context2.next = 19;
return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_13__/* .delayedTime */ .qz)(delayedParams);
case 19:
v = actionTabs === null || actionTabs === void 0 ? void 0 : actionTabs.exerciseParams;
(0,_utils_util__WEBPACK_IMPORTED_MODULE_15__/* .startExercise */ .nr)({
(0,_utils_util__WEBPACK_IMPORTED_MODULE_16__/* .startExercise */ .nr)({
inner_ip: v.inner_ip,
public_ip: v.public_ip,
open_camera: v.open_camera,
@ -1398,7 +1450,7 @@ var Unlock = function Unlock(_ref) {
screen_num: v.screen_num,
screen_sec: v.screen_sec,
coursesId: params.coursesId,
login: (_userInfo = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_16__/* .userInfo */ .eY)()) === null || _userInfo === void 0 ? void 0 : _userInfo.login,
login: (_userInfo = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_18__/* .userInfo */ .eY)()) === null || _userInfo === void 0 ? void 0 : _userInfo.login,
history: history,
identity_verify: v.identity_verify,
open_phone_video_recording: v.open_phone_video_recording,
@ -1408,22 +1460,54 @@ var Unlock = function Unlock(_ref) {
type: 'exercise/setActionTabs',
payload: {}
});
case 15:
case 22:
setIsLoading(false);
case 16:
case 23:
case "end":
return _context.stop();
return _context2.stop();
}
}, _callee);
}, _callee2);
}));
return function handleOk() {
return _ref2.apply(this, arguments);
return _ref3.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.Fragment, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(antd_es_modal__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
var columns = [{
title: 'IP地址',
dataIndex: 'ip',
key: 'ip',
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("span", {
className: text.indexOf("异常") > -1 ? 'c-red' : 'c-green',
children: text
});
}
}, {
title: '浏览器',
dataIndex: 'browser',
key: 'browser',
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("span", {
className: text.indexOf("异常") > -1 ? 'c-red' : 'c-green',
children: text
});
}
}, {
title: '上次登录时间',
dataIndex: 'last_login_time',
key: 'last_login_time'
}];
var hasError5 = (actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP9 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP9 === void 0 ? void 0 : _actionTabs$exerciseP9.errorMessage) && _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_6___default()(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP10 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP10 === void 0 ? void 0 : _actionTabs$exerciseP10.errorMessage) === "object";
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.Fragment, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsxs)(antd_es_modal__WEBPACK_IMPORTED_MODULE_22__/* ["default"] */ .Z, {
width: 514,
centered: true,
closable: !!(actionTabs !== null && actionTabs !== void 0 && (_actionTabs$exerciseP11 = actionTabs.exerciseParams) !== null && _actionTabs$exerciseP11 !== void 0 && _actionTabs$exerciseP11.unlockClose),
maskClosable: false,
keyboard: false,
maskStyle: {
background: "#000"
},
title: '提示',
open: exercise.actionTabs.key === 'student-unlock',
footer: null,
@ -1433,89 +1517,48 @@ var Unlock = function Unlock(_ref) {
payload: {}
});
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div", {
children: [hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("div", {
style: {
marginBottom: 16
},
children: "\u8BE5\u8D26\u53F7\u5DF2\u7ECF\u5728\u5176\u4ED6\u8BBE\u5907\u4E0A\u767B\u5F55\uFF0C\u82E5\u975E\u672C\u4EBA\u64CD\u4F5C\uFF0C\u8BF7\u8054\u7CFB\u76D1\u8003\u8001\u5E08\u8BF4\u660E\u60C5\u51B5\u3002 "
}), !hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("div", {
style: {
marginBottom: 16
},
children: "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u5728\u8003\u8BD5\u65F6\u4E2D\u9014\u9000\u51FA\uFF0C\u73B0\u5DF2\u5C06\u8003\u8BD5\u9501\u5B9A\u3002\u5982\u9700\u7EE7\u7EED\u8FDB\u884C\u8003\u8BD5\uFF0C \u8BF7\u5C3D\u5FEB\u8054\u7CFB\u8BFE\u5802\u8001\u5E08\u8FDB\u884C\u89E3\u9501\uFF01"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div", {
}), hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_table__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, {
className: "mb20",
pagination: {
hideOnSinglePage: true
},
dataSource: [(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP12 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP12 === void 0 ? void 0 : _actionTabs$exerciseP12.errorMessage) || {}],
columns: columns
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("div", {
className: "",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(antd_es_form__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_form__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
form: form,
layout: "vertical",
autoComplete: "off",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(antd_es_form__WEBPACK_IMPORTED_MODULE_20__/* ["default"].Item */ .Z.Item, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_form__WEBPACK_IMPORTED_MODULE_21__/* ["default"].Item */ .Z.Item, {
label: "\u8003\u8BD5\u89E3\u9501\u7801",
name: "unlock_key",
rules: [{
required: true,
message: '请输入考试解锁码'
}],
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(antd_es_input__WEBPACK_IMPORTED_MODULE_22__/* ["default"].Password */ .Z.Password, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_input__WEBPACK_IMPORTED_MODULE_24__/* ["default"].Password */ .Z.Password, {
autoComplete: "off",
placeholder: "\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801",
visibilityToggle: false
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(antd_es_form__WEBPACK_IMPORTED_MODULE_20__/* ["default"].Item */ .Z.Item, {
label: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("span", {
children: ["\u5EF6\u957F\u4EA4\u5377\u622A\u6B62\u65F6\u95F4\uFF08", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("span", {
children: ["\u4E0D\u80FD\u8D85\u8FC7\u5F53\u524D\u8BD5\u5377\u622A\u6B62\u65F6\u95F4", moment__WEBPACK_IMPORTED_MODULE_13___default()(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP5 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP5 === void 0 ? void 0 : _actionTabs$exerciseP5.end_time).format("YYYY-MM-DD HH:mm")]
}), "\uFF09"]
}),
name: "time",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(antd_es_date_picker__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, {
placeholder: '请选择交卷截止时间',
style: {
width: '100%'
},
showTime: {
format: 'HH:mm'
},
format: "YYYY-MM-DD HH:mm",
disabledDate: function disabledDate(current) {
var _actionTabs$exerciseP6;
return (0,_pages_Classrooms_Lists_ShixunHomeworks_Detail_components_ConfigWorks_Releasesetting__WEBPACK_IMPORTED_MODULE_17__/* .disabledDate */ .Q8)(current, actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP6 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP6 === void 0 ? void 0 : _actionTabs$exerciseP6.end_time);
},
disabledTime: function disabledTime(current) {
var _actionTabs$exerciseP7;
var endDate = actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP7 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP7 === void 0 ? void 0 : _actionTabs$exerciseP7.end_time;
if (moment__WEBPACK_IMPORTED_MODULE_13___default()(current).isSame(moment__WEBPACK_IMPORTED_MODULE_13___default()(endDate), 'day')) {
var hour = moment__WEBPACK_IMPORTED_MODULE_13___default()(endDate).hours();
var minute = moment__WEBPACK_IMPORTED_MODULE_13___default()(endDate).minutes();
return {
disabledHours: function disabledHours() {
return (0,_pages_Classrooms_Lists_ShixunHomeworks_Detail_components_ConfigWorks_Releasesetting__WEBPACK_IMPORTED_MODULE_17__/* .range */ .w6)(0, 24).slice(hour + 1);
},
disabledMinutes: function disabledMinutes() {
return moment__WEBPACK_IMPORTED_MODULE_13___default()(current).isSame(moment__WEBPACK_IMPORTED_MODULE_13___default()(endDate), 'hour') ? (0,_pages_Classrooms_Lists_ShixunHomeworks_Detail_components_ConfigWorks_Releasesetting__WEBPACK_IMPORTED_MODULE_17__/* .range */ .w6)(minute, 60) : [];
}
};
}
return (0,_pages_Classrooms_Lists_ShixunHomeworks_Detail_components_ConfigWorks_Releasesetting__WEBPACK_IMPORTED_MODULE_17__/* .disabledTime */ .d0)(current);
},
getPopupContainer: function getPopupContainer(trigger) {
return trigger.parentNode;
},
allowClear: false
})
})]
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(antd_es_row__WEBPACK_IMPORTED_MODULE_24__/* ["default"] */ .Z, {
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsxs)(antd_es_row__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z, {
justify: "space-between",
align: "middle",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(antd_es_col__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(antd_es_row__WEBPACK_IMPORTED_MODULE_24__/* ["default"] */ .Z, {
align: "middle",
children: ["\u8003\u8BD5\u5269\u4F59\u65F6\u95F4\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(Countdown, {
valueStyle: {
fontSize: 14,
fontWeight: 500,
color: '#3061D0'
},
value: moment__WEBPACK_IMPORTED_MODULE_13___default()(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP8 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP8 === void 0 ? void 0 : _actionTabs$exerciseP8.end_time).valueOf()
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(antd_es_col__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(antd_es_button__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_col__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_col__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_button__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
loading: isLoading,
onClick: handleOk,
children: "\u8FDB\u5165\u8003\u8BD5"
@ -1525,8 +1568,8 @@ var Unlock = function Unlock(_ref) {
})
});
};
/* harmony default export */ __webpack_exports__["Z"] = ((0,umi__WEBPACK_IMPORTED_MODULE_14__.connect)(function (_ref3) {
var exercise = _ref3.exercise;
/* harmony default export */ __webpack_exports__["Z"] = ((0,umi__WEBPACK_IMPORTED_MODULE_15__.connect)(function (_ref4) {
var exercise = _ref4.exercise;
return {
exercise: exercise
};

@ -1,46 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[93045,42573,31105,45061,45886,32640,50745,92785,88975,99491,97141,88092,94512,95946,87388,69771],{
/***/ 82826:
/*!**********************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***!
\**********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_ArrowLeftOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ArrowLeftOutlined.js
// This icon file is generated automatically.
var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" };
/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_ArrowLeftOutlined
}));
};
ArrowLeftOutlined_ArrowLeftOutlined.displayName = 'ArrowLeftOutlined';
/* harmony default export */ var icons_ArrowLeftOutlined = (/*#__PURE__*/react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined));
/***/ }),
(self["webpackChunk"] = self["webpackChunk"] || []).push([[37807,42573,60608,88092,94512,95946,87388,69771],{
/***/ 28508:
/*!******************************************************************!*\
@ -69,33 +28,6 @@ CloseOutlined.displayName = 'CloseOutlined';
/***/ }),
/***/ 82061:
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DeleteOutlined */ 47046);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DeleteOutlined = function DeleteOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
DeleteOutlined.displayName = 'DeleteOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DeleteOutlined));
/***/ }),
/***/ 69753:
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js ***!
@ -123,47 +55,6 @@ DownloadOutlined.displayName = 'DownloadOutlined';
/***/ }),
/***/ 64082:
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_InboxOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js
// This icon file is generated automatically.
var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
/* harmony default export */ var asn_InboxOutlined = (InboxOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_InboxOutlined
}));
};
InboxOutlined_InboxOutlined.displayName = 'InboxOutlined';
/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/react.forwardRef(InboxOutlined_InboxOutlined));
/***/ }),
/***/ 33160:
/*!*******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***!
@ -492,92 +383,6 @@ var menu_style = __webpack_require__(83736);
/***/ }),
/***/ 27049:
/*!***********************************************!*\
!*** ./node_modules/antd/es/divider/index.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462);
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 53124);
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;
};
var Divider = function Divider(props) {
var _classNames;
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var customizePrefixCls = props.prefixCls,
_props$type = props.type,
type = _props$type === void 0 ? 'horizontal' : _props$type,
_props$orientation = props.orientation,
orientation = _props$orientation === void 0 ? 'center' : _props$orientation,
orientationMargin = props.orientationMargin,
className = props.className,
children = props.children,
dashed = props.dashed,
plain = props.plain,
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"]);
var prefixCls = getPrefixCls('divider', customizePrefixCls);
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
var hasChildren = !!children;
var hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
var hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
var classString = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text"), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-plain"), !!plain), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-left"), hasCustomMarginLeft), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-right"), hasCustomMarginRight), _classNames), className);
var innerStyle = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({}, hasCustomMarginLeft && {
marginLeft: orientationMargin
}), hasCustomMarginRight && {
marginRight: orientationMargin
});
// Warning children not work in vertical mode
if (false) {}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({
className: classString
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", {
className: "".concat(prefixCls, "-inner-text"),
style: innerStyle
}, children));
};
/* harmony default export */ __webpack_exports__["Z"] = (Divider);
/***/ }),
/***/ 98541:
/*!*****************************************************************!*\
!*** ./node_modules/antd/es/divider/style/index.js + 1 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
var style_default = __webpack_require__(43146);
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.less
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.js
/***/ }),
/***/ 75008:

@ -1,5 +1,18 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[12144],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[39602],{
/***/ 509:
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/es/asn/SearchOutlined.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
// This icon file is generated automatically.
var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
/* harmony default export */ __webpack_exports__["Z"] = (SearchOutlined);
/***/ }),
/***/ 87588:
/*!******************************************************************************!*\
@ -48,6 +61,73 @@ function getDataOrAriaProps(props) {
/***/ }),
/***/ 48783:
/*!****************************************************************!*\
!*** ./node_modules/antd/es/_util/throttleByAnimationFrame.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "U": function() { return /* binding */ throttleByAnimationFrameDecorator; },
/* harmony export */ "t": function() { return /* binding */ throttleByAnimationFrame; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ 74902);
/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ 75164);
function throttleByAnimationFrame(fn) {
var requestId;
var later = function later(args) {
return function () {
requestId = null;
fn.apply(void 0, (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(args));
};
};
var throttled = function throttled() {
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 = function () {
rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"].cancel */ .Z.cancel(requestId);
requestId = null;
};
return throttled;
}
function throttleByAnimationFrameDecorator() {
return function throttle(target, key, descriptor) {
var fn = descriptor.value;
var definingProperty = false;
return {
configurable: true,
get: function get() {
// In IE11 calling Object.defineProperty has a side-effect of evaluating the
// getter for the property which is being replaced. This causes infinite
// recursion and an "Out of stack space" error.
// eslint-disable-next-line no-prototype-builtins
if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
/* istanbul ignore next */
return fn;
}
var boundFn = throttleByAnimationFrame(fn.bind(this));
definingProperty = true;
Object.defineProperty(this, key, {
value: boundFn,
configurable: true,
writable: true
});
definingProperty = false;
return boundFn;
}
};
};
}
/***/ }),
/***/ 13013:
/*!************************************************!*\
!*** ./node_modules/antd/es/dropdown/index.js ***!
@ -1011,6 +1091,57 @@ var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
EyeOutlined_EyeOutlined.displayName = 'EyeOutlined';
/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/react.forwardRef(EyeOutlined_EyeOutlined));
/***/ }),
/***/ 25783:
/*!*************************************************************************************!*\
!*** ./node_modules/antd/node_modules/@ant-design/icons/es/icons/SearchOutlined.js ***!
\*************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_SearchOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/SearchOutlined */ 509);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 93771);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SearchOutlined = function SearchOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_SearchOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
SearchOutlined.displayName = 'SearchOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(SearchOutlined));
/***/ }),
/***/ 81626:
/*!*******************************************************!*\
!*** ./node_modules/rc-pagination/es/locale/zh_CN.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
/* harmony default export */ __webpack_exports__["Z"] = ({
// Options.jsx
items_per_page: '条/页',
jump_to: '跳至',
jump_to_confirm: '确定',
page: '页',
// Pagination.jsx
prev_page: '上一页',
next_page: '下一页',
prev_5: '向前 5 页',
next_5: '向后 5 页',
prev_3: '向前 3 页',
next_3: '向后 3 页',
page_size: '页码'
});
/***/ })
}]);

@ -1,9 +1,9 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[20466],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[41297],{
/***/ 15265:
/***/ 64683:
/*!***************************************************************!*\
!*** ./src/components/FileDownloadList/index.tsx + 1 modules ***!
!*** ./src/components/FileDownloadList/index.tsx + 3 modules ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@ -26,20 +26,195 @@ var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/FileDownloadList/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var FileDownloadListmodules = ({"flex_box_center":"flex_box_center___A3pzf","flex_space_between":"flex_space_between___JBoa5","flex_box_vertical_center":"flex_box_vertical_center___MJuIO","flex_box_center_end":"flex_box_center_end___OcjUA","flex_box_column":"flex_box_column___zSH4A","list":"list___KhJas","middle":"middle___IjlYi","row":"row___GGtIx","title":"title___o_xqf","size":"size___OVRoL","download":"download___ZLcIH","preview":"preview___gi0kI"});
/* harmony default export */ var FileDownloadListmodules = ({"flex_box_center":"flex_box_center___A3pzf","flex_space_between":"flex_space_between___JBoa5","flex_box_vertical_center":"flex_box_vertical_center___MJuIO","flex_box_center_end":"flex_box_center_end___OcjUA","flex_box_column":"flex_box_column___zSH4A","list":"list___KhJas","middle":"middle___IjlYi","row":"row___GGtIx","title":"title___o_xqf","size":"size___OVRoL","download":"download___ZLcIH","preview":"preview___gi0kI","annotation":"annotation___KVSwj"});
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/style/index.js + 1 modules
var style = __webpack_require__(22536);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js
var spin = __webpack_require__(11382);
;// CONCATENATED MODULE: ./src/components/ImageDimensions/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ImageDimensionsmodules = ({"imageDimensions":"imageDimensions___a7crR","img":"img___Kroat"});
// EXTERNAL MODULE: ./node_modules/markerjs2/markerjs2.esm.js
var markerjs2_esm = __webpack_require__(50290);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(84519);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/ImageDimensions/index.tsx
var ImageDimensions = function ImageDimensions(_ref) {
var data = _ref.data,
className = _ref.className,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
onClose = _ref.onClose,
onOk = _ref.onOk;
var imgRef = (0,react.useRef)(null);
var markerArea = (0,react.useRef)(null);
var _useState = (0,react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
loading = _useState2[0],
setLoading = _useState2[1];
(0,react.useEffect)(function () {
if (data !== null && data !== void 0 && data.visible) {
document.body.setAttribute('data-custom', 'height');
} else {
document.body.removeAttribute('data-custom');
}
}, [data === null || data === void 0 ? void 0 : data.visible]);
var onSave = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(event) {
var res, result;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setLoading(true);
_context.next = 3;
return (0,fetch/* default */.ZP)('/api/attachments.json', {
method: 'post',
body: {
file_type: 'base64',
original_filename: data.title,
file: event.dataUrl
}
});
case 3:
res = _context.sent;
if (!(res !== null && res !== void 0 && res.id)) {
_context.next = 9;
break;
}
_context.next = 7;
return (0,fetch/* default */.ZP)("/api/attachments/".concat(data.id, "/add_subitem.json"), {
method: 'post',
body: {
subitem_id: res === null || res === void 0 ? void 0 : res.id,
settings: JSON.stringify(event.state)
}
});
case 7:
result = _context.sent;
if (result.status === 0) {
onOk();
}
case 9:
setLoading(false);
case 10:
case "end":
return _context.stop();
}
}, _callee);
}));
return function onSave(_x) {
return _ref2.apply(this, arguments);
};
}();
var dealDom = function dealDom() {
// 删除标签
// 找到href为"https://markerjs.com/"的a标签
var targetLink = document.querySelector('a[href="https://markerjs.com/"]');
if (targetLink && targetLink.parentNode) {
targetLink.parentNode.style.display = 'none';
}
// 设置title
var item = [{
name: '[data-action="select"]',
title: '选择'
}, {
name: '[data-action="delete"]',
title: '删除元素'
}, {
name: '[data-action="undo"]',
title: '撤销'
}, {
name: '[data-type-name="FrameMarker"]',
title: '矩形'
}, {
name: '[data-type-name="FreehandMarker"]',
title: '画线'
}, {
name: '[data-type-name="ArrowMarker"]',
title: '箭头'
}, {
name: '[data-type-name="TextMarker"]',
title: '文本'
}, {
name: '[data-type-name="EllipseMarker"]',
title: '椭圆'
}, {
name: '[data-type-name="HighlightMarker"]',
title: '方块'
}, {
name: '[data-type-name="CalloutMarker"]',
title: '注释'
}, {
name: '[data-action="render"]',
title: '保存'
}, {
name: '[data-action="close"]',
title: '退出'
}];
item.forEach(function (e) {
var targetElement = document.querySelector(e.name);
if (targetElement) {
targetElement.setAttribute('title', e.title);
}
});
};
var initMarkerjs = function initMarkerjs() {
markerArea.current = new markerjs2_esm/* MarkerArea */.hP(imgRef.current);
markerArea.current.addEventListener('render', onSave);
markerArea.current.addEventListener('beforeclose', onClose);
markerArea.current.show();
console.log(markerArea.current, '22222');
if (data !== null && data !== void 0 && data.snapshotData) {
markerArea.current.restoreState(data.snapshotData);
}
setTimeout(function () {
dealDom();
}, 300);
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(react.Fragment, {
children: (data === null || data === void 0 ? void 0 : data.visible) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: classnames_default()(ImageDimensionsmodules.imageDimensions, className),
style: style,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: loading,
tip: "\u6B63\u5728\u4FDD\u5B58\u4E2D...",
style: {
position: 'absolute'
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
onLoad: initMarkerjs,
className: ImageDimensionsmodules.img,
ref: imgRef,
src: data === null || data === void 0 ? void 0 : data.src
})]
})
});
};
/* harmony default export */ var components_ImageDimensions = (ImageDimensions);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
;// CONCATENATED MODULE: ./src/components/FileDownloadList/index.tsx
@ -53,11 +228,17 @@ var jsx_runtime = __webpack_require__(85893);
var FileDownloadList = function FileDownloadList(_ref) {
var className = _ref.className,
style = _ref.style,
_ref$dataSource = _ref.dataSource,
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource;
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
_ref$authority = _ref.authority,
authority = _ref$authority === void 0 ? false : _ref$authority,
callback = _ref.callback,
_ref$showDimensions = _ref.showDimensions,
showDimensions = _ref$showDimensions === void 0 ? true : _ref$showDimensions;
var _useState = (0,react.useState)({
content: "",
type: ""
@ -65,6 +246,19 @@ var FileDownloadList = function FileDownloadList(_ref) {
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)({}),
_useState4 = slicedToArray_default()(_useState3, 2),
openData = _useState4[0],
setOpenData = _useState4[1];
var _useState5 = (0,react.useState)({
title: '',
visible: false,
src: '',
snapshotData: {}
}),
_useState6 = slicedToArray_default()(_useState5, 2),
dimensions = _useState6[0],
setDimensions = _useState6[1];
var monacoValueRef = (0,react.useRef)();
var handleClick = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(item) {
@ -72,26 +266,27 @@ var FileDownloadList = function FileDownloadList(_ref) {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setOpenData(item);
if (!(item.file_type === "txt")) {
_context.next = 5;
_context.next = 6;
break;
}
_context.next = 3;
_context.next = 4;
return (0,fetch/* default */.ZP)(item.url, {
method: "get",
headers: {
"Content-Type": "application/xml"
}
});
case 3:
case 4:
res = _context.sent;
monacoValueRef.current = res;
case 5:
case 6:
setData({
type: item.file_type,
content: env/* default.API_SERVER */.Z.API_SERVER + item.url
});
case 6:
case 7:
case "end":
return _context.stop();
}
@ -101,6 +296,42 @@ var FileDownloadList = function FileDownloadList(_ref) {
return _ref2.apply(this, arguments);
};
}();
var handleAnnotation = function handleAnnotation(item) {
var _item$subitem;
setDimensions({
visible: true,
src: env/* default.API_SERVER */.Z.API_SERVER + item.url,
id: item.id,
title: item.title,
snapshotData: item === null || item === void 0 ? void 0 : (_item$subitem = item.subitem) === null || _item$subitem === void 0 ? void 0 : _item$subitem.settings
});
};
var handleCheckAnnotation = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(item) {
var _item$subitem2;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
setData({
type: item.file_type,
content: env/* default.API_SERVER */.Z.API_SERVER + (item === null || item === void 0 ? void 0 : (_item$subitem2 = item.subitem) === null || _item$subitem2 === void 0 ? void 0 : _item$subitem2.url)
});
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function handleCheckAnnotation(_x2) {
return _ref3.apply(this, arguments);
};
}();
var handleOk = function handleOk() {
callback();
setDimensions({
visible: false
});
};
if (!(dataSource !== null && dataSource !== void 0 && dataSource.length)) {
return null;
}
@ -109,6 +340,7 @@ var FileDownloadList = function FileDownloadList(_ref) {
className: classnames_default()(FileDownloadListmodules.list, className),
style: style,
children: dataSource.map(function (item, index) {
var _item$subitem3, _item$subitem4;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: FileDownloadListmodules.row,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -142,7 +374,23 @@ var FileDownloadList = function FileDownloadList(_ref) {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-yulan"
}), "\u9884\u89C8"]
})]
}), ['image'].includes(item === null || item === void 0 ? void 0 : item.file_type) && showDimensions && (authority ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: FileDownloadListmodules.annotation,
onClick: function onClick() {
return handleAnnotation(item);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-pizhu"
}), (_item$subitem3 = item.subitem) !== null && _item$subitem3 !== void 0 && _item$subitem3.id ? '修改批注' : '批注']
}) : ((_item$subitem4 = item.subitem) === null || _item$subitem4 === void 0 ? void 0 : _item$subitem4.id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: FileDownloadListmodules.annotation,
onClick: function onClick() {
return handleCheckAnnotation(item);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-chakanlaoshipizhu1"
}), "\u67E5\u770B\u8001\u5E08\u6279\u6CE8"]
}))]
}, index);
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
@ -162,12 +410,23 @@ var FileDownloadList = function FileDownloadList(_ref) {
}
}
},
onImgDimensions: authority && showDimensions && data.type === 'image' ? function () {
return handleAnnotation(openData);
} : null,
onClose: function onClose() {
return setData({
content: "",
type: ""
});
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_ImageDimensions, {
onOk: handleOk,
onClose: function onClose() {
return setDimensions({
visible: false
});
},
data: dimensions
})]
});
};

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[44666,34180,28078],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[44666,34180,7713],{
/***/ 26554:
/*!*******************************************************************!*\

@ -455,7 +455,7 @@ var identityMap = {
"student": "学生",
"professional": "专业人士"
};
var MAX_NAME_LENGTH = 10;
var MAX_NAME_LENGTH = 20;
var MAX_NICKNAME_LENGTH = 20;
var Edit = function Edit(_ref) {
var _account$basicInfo3, _formValue$nickname, _form$getFieldValue, _schoolList$find3;

@ -1,46 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[22127],{
/***/ 82826:
/*!**********************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***!
\**********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_ArrowLeftOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ArrowLeftOutlined.js
// This icon file is generated automatically.
var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" };
/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_ArrowLeftOutlined
}));
};
ArrowLeftOutlined_ArrowLeftOutlined.displayName = 'ArrowLeftOutlined';
/* harmony default export */ var icons_ArrowLeftOutlined = (/*#__PURE__*/react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined));
/***/ }),
(self["webpackChunk"] = self["webpackChunk"] || []).push([[44851],{
/***/ 95025:
/*!**********************************************************************!*\
@ -69,33 +28,6 @@ CaretDownOutlined.displayName = 'CaretDownOutlined';
/***/ }),
/***/ 82061:
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DeleteOutlined */ 47046);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DeleteOutlined = function DeleteOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
DeleteOutlined.displayName = 'DeleteOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DeleteOutlined));
/***/ }),
/***/ 95604:
/*!*******************************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DeliveredProcedureOutlined.js + 1 modules ***!
@ -191,47 +123,6 @@ ExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined';
/***/ }),
/***/ 64082:
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_InboxOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js
// This icon file is generated automatically.
var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
/* harmony default export */ var asn_InboxOutlined = (InboxOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_InboxOutlined
}));
};
InboxOutlined_InboxOutlined.displayName = 'InboxOutlined';
/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/react.forwardRef(InboxOutlined_InboxOutlined));
/***/ }),
/***/ 65429:
/*!*****************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/LikeOutlined.js + 1 modules ***!
@ -691,92 +582,6 @@ var style_default = __webpack_require__(43146);
/***/ }),
/***/ 27049:
/*!***********************************************!*\
!*** ./node_modules/antd/es/divider/index.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462);
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 53124);
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;
};
var Divider = function Divider(props) {
var _classNames;
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var customizePrefixCls = props.prefixCls,
_props$type = props.type,
type = _props$type === void 0 ? 'horizontal' : _props$type,
_props$orientation = props.orientation,
orientation = _props$orientation === void 0 ? 'center' : _props$orientation,
orientationMargin = props.orientationMargin,
className = props.className,
children = props.children,
dashed = props.dashed,
plain = props.plain,
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"]);
var prefixCls = getPrefixCls('divider', customizePrefixCls);
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
var hasChildren = !!children;
var hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
var hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
var classString = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text"), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-plain"), !!plain), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-left"), hasCustomMarginLeft), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-right"), hasCustomMarginRight), _classNames), className);
var innerStyle = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({}, hasCustomMarginLeft && {
marginLeft: orientationMargin
}), hasCustomMarginRight && {
marginRight: orientationMargin
});
// Warning children not work in vertical mode
if (false) {}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({
className: classString
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", {
className: "".concat(prefixCls, "-inner-text"),
style: innerStyle
}, children));
};
/* harmony default export */ __webpack_exports__["Z"] = (Divider);
/***/ }),
/***/ 98541:
/*!*****************************************************************!*\
!*** ./node_modules/antd/es/divider/style/index.js + 1 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
var style_default = __webpack_require__(43146);
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.less
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.js
/***/ }),
/***/ 55241:

File diff suppressed because it is too large Load Diff

@ -1,46 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[31105,42573,93045,45061,45886,32640,50745,92785,88975,99491,97141,88092,94512,95946,87388,69771],{
/***/ 82826:
/*!**********************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***!
\**********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_ArrowLeftOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ArrowLeftOutlined.js
// This icon file is generated automatically.
var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" };
/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_ArrowLeftOutlined
}));
};
ArrowLeftOutlined_ArrowLeftOutlined.displayName = 'ArrowLeftOutlined';
/* harmony default export */ var icons_ArrowLeftOutlined = (/*#__PURE__*/react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined));
/***/ }),
(self["webpackChunk"] = self["webpackChunk"] || []).push([[60608,42573,37807,88092,94512,95946,87388,69771],{
/***/ 28508:
/*!******************************************************************!*\
@ -69,33 +28,6 @@ CloseOutlined.displayName = 'CloseOutlined';
/***/ }),
/***/ 82061:
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DeleteOutlined */ 47046);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DeleteOutlined = function DeleteOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
DeleteOutlined.displayName = 'DeleteOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DeleteOutlined));
/***/ }),
/***/ 69753:
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js ***!
@ -123,47 +55,6 @@ DownloadOutlined.displayName = 'DownloadOutlined';
/***/ }),
/***/ 64082:
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_InboxOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js
// This icon file is generated automatically.
var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
/* harmony default export */ var asn_InboxOutlined = (InboxOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_InboxOutlined
}));
};
InboxOutlined_InboxOutlined.displayName = 'InboxOutlined';
/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/react.forwardRef(InboxOutlined_InboxOutlined));
/***/ }),
/***/ 33160:
/*!*******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***!
@ -492,92 +383,6 @@ var menu_style = __webpack_require__(83736);
/***/ }),
/***/ 27049:
/*!***********************************************!*\
!*** ./node_modules/antd/es/divider/index.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462);
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 53124);
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;
};
var Divider = function Divider(props) {
var _classNames;
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var customizePrefixCls = props.prefixCls,
_props$type = props.type,
type = _props$type === void 0 ? 'horizontal' : _props$type,
_props$orientation = props.orientation,
orientation = _props$orientation === void 0 ? 'center' : _props$orientation,
orientationMargin = props.orientationMargin,
className = props.className,
children = props.children,
dashed = props.dashed,
plain = props.plain,
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"]);
var prefixCls = getPrefixCls('divider', customizePrefixCls);
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
var hasChildren = !!children;
var hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
var hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
var classString = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text"), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-plain"), !!plain), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-left"), hasCustomMarginLeft), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-right"), hasCustomMarginRight), _classNames), className);
var innerStyle = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({}, hasCustomMarginLeft && {
marginLeft: orientationMargin
}), hasCustomMarginRight && {
marginRight: orientationMargin
});
// Warning children not work in vertical mode
if (false) {}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({
className: classString
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", {
className: "".concat(prefixCls, "-inner-text"),
style: innerStyle
}, children));
};
/* harmony default export */ __webpack_exports__["Z"] = (Divider);
/***/ }),
/***/ 98541:
/*!*****************************************************************!*\
!*** ./node_modules/antd/es/divider/style/index.js + 1 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
var style_default = __webpack_require__(43146);
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.less
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.js
/***/ }),
/***/ 75008:

@ -1,18 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[9013],{
/***/ 47046:
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/es/asn/DeleteOutlined.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
// This icon file is generated automatically.
var DeleteOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
/* harmony default export */ __webpack_exports__["Z"] = (DeleteOutlined);
/***/ }),
(self["webpackChunk"] = self["webpackChunk"] || []).push([[65911],{
/***/ 7918:
/*!******************************************************************************!*\
@ -515,33 +502,6 @@ Icon.setTwoToneColor = setTwoToneColor;
/***/ }),
/***/ 82061:
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DeleteOutlined */ 47046);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DeleteOutlined = function DeleteOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
DeleteOutlined.displayName = 'DeleteOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DeleteOutlined));
/***/ }),
/***/ 87588:
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js ***!
@ -569,74 +529,6 @@ ExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined';
/***/ }),
/***/ 64789:
/*!***********************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js + 1 modules ***!
\***********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_PlusCircleOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/PlusCircleOutlined.js
// This icon file is generated automatically.
var PlusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "plus-circle", "theme": "outlined" };
/* harmony default export */ var asn_PlusCircleOutlined = (PlusCircleOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
var AntdIcon = __webpack_require__(7918);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PlusCircleOutlined_PlusCircleOutlined = function PlusCircleOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_PlusCircleOutlined
}));
};
PlusCircleOutlined_PlusCircleOutlined.displayName = 'PlusCircleOutlined';
/* harmony default export */ var icons_PlusCircleOutlined = (/*#__PURE__*/react.forwardRef(PlusCircleOutlined_PlusCircleOutlined));
/***/ }),
/***/ 63783:
/*!***************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js ***!
\***************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_QuestionCircleOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/QuestionCircleOutlined */ 36688);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var QuestionCircleOutlined = function QuestionCircleOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_QuestionCircleOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
QuestionCircleOutlined.displayName = 'QuestionCircleOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(QuestionCircleOutlined));
/***/ }),
/***/ 64029:
/*!***************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/UpOutlined.js ***!
@ -683,92 +575,6 @@ var getRenderPropValue = function getRenderPropValue(propValue) {
return propValue;
};
/***/ }),
/***/ 27049:
/*!***********************************************!*\
!*** ./node_modules/antd/es/divider/index.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462);
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 53124);
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;
};
var Divider = function Divider(props) {
var _classNames;
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var customizePrefixCls = props.prefixCls,
_props$type = props.type,
type = _props$type === void 0 ? 'horizontal' : _props$type,
_props$orientation = props.orientation,
orientation = _props$orientation === void 0 ? 'center' : _props$orientation,
orientationMargin = props.orientationMargin,
className = props.className,
children = props.children,
dashed = props.dashed,
plain = props.plain,
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"]);
var prefixCls = getPrefixCls('divider', customizePrefixCls);
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
var hasChildren = !!children;
var hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
var hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
var classString = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text"), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-plain"), !!plain), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-left"), hasCustomMarginLeft), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-right"), hasCustomMarginRight), _classNames), className);
var innerStyle = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({}, hasCustomMarginLeft && {
marginLeft: orientationMargin
}), hasCustomMarginRight && {
marginRight: orientationMargin
});
// Warning children not work in vertical mode
if (false) {}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({
className: classString
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", {
className: "".concat(prefixCls, "-inner-text"),
style: innerStyle
}, children));
};
/* harmony default export */ __webpack_exports__["Z"] = (Divider);
/***/ }),
/***/ 98541:
/*!*****************************************************************!*\
!*** ./node_modules/antd/es/divider/style/index.js + 1 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
var style_default = __webpack_require__(43146);
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.less
// extracted by mini-css-extract-plugin
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.js
/***/ }),
/***/ 55241:

File diff suppressed because it is too large Load Diff

@ -1,5 +1,421 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[88667],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[66813],{
/***/ 75008:
/*!*********************************************************!*\
!*** ./node_modules/antd/es/input/index.js + 5 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ input; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(4942);
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
var context = __webpack_require__(53124);
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
var form_context = __webpack_require__(65223);
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Group.js
var Group = function Group(props) {
var _classNames;
var _useContext = (0,react.useContext)(context/* ConfigContext */.E_),
getPrefixCls = _useContext.getPrefixCls,
direction = _useContext.direction;
var customizePrefixCls = props.prefixCls,
_props$className = props.className,
className = _props$className === void 0 ? '' : _props$className;
var prefixCls = getPrefixCls('input-group', customizePrefixCls);
var cls = classnames_default()(prefixCls, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-lg"), props.size === 'large'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-sm"), props.size === 'small'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-compact"), props.compact), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
var formItemContext = (0,react.useContext)(form_context/* FormItemInputContext */.aM);
var groupFormItemContext = (0,react.useMemo)(function () {
return (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, formItemContext), {
isFormItemInput: false
});
}, [formItemContext]);
return /*#__PURE__*/react.createElement("span", {
className: cls,
style: props.style,
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave,
onFocus: props.onFocus,
onBlur: props.onBlur
}, /*#__PURE__*/react.createElement(form_context/* FormItemInputContext.Provider */.aM.Provider, {
value: groupFormItemContext
}, props.children));
};
/* harmony default export */ var input_Group = (Group);
// EXTERNAL MODULE: ./node_modules/antd/es/input/Input.js + 1 modules
var Input = __webpack_require__(82586);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(97685);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__(71002);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
// This icon file is generated automatically.
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(93771);
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/EyeInvisibleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_EyeInvisibleOutlined
}));
};
EyeInvisibleOutlined_EyeInvisibleOutlined.displayName = 'EyeInvisibleOutlined';
/* harmony default export */ var icons_EyeInvisibleOutlined = (/*#__PURE__*/react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined));
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
var EyeOutlined = __webpack_require__(7124);
// EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
var omit = __webpack_require__(98423);
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__(42550);
// EXTERNAL MODULE: ./node_modules/antd/es/input/hooks/useRemovePasswordTimeout.js
var useRemovePasswordTimeout = __webpack_require__(72922);
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Password.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var defaultIconRender = function defaultIconRender(visible) {
return visible ? /*#__PURE__*/react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/react.createElement(icons_EyeInvisibleOutlined, null);
};
var ActionMap = {
click: 'onClick',
hover: 'onMouseOver'
};
var Password = /*#__PURE__*/react.forwardRef(function (props, ref) {
var _props$visibilityTogg = props.visibilityToggle,
visibilityToggle = _props$visibilityTogg === void 0 ? true : _props$visibilityTogg;
var visibilityControlled = (0,esm_typeof/* default */.Z)(visibilityToggle) === 'object' && visibilityToggle.visible !== undefined;
var _useState = (0,react.useState)(function () {
return visibilityControlled ? visibilityToggle.visible : false;
}),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
visible = _useState2[0],
setVisible = _useState2[1];
var inputRef = (0,react.useRef)(null);
react.useEffect(function () {
if (visibilityControlled) {
setVisible(visibilityToggle.visible);
}
}, [visibilityControlled, visibilityToggle]);
// Remove Password value
var removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef);
var onVisibleChange = function onVisibleChange() {
var disabled = props.disabled;
if (disabled) {
return;
}
if (visible) {
removePasswordTimeout();
}
setVisible(function (prevState) {
var _a;
var newState = !prevState;
if ((0,esm_typeof/* default */.Z)(visibilityToggle) === 'object') {
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);
}
return newState;
});
};
var getIcon = function getIcon(prefixCls) {
var _iconProps;
var _props$action = props.action,
action = _props$action === void 0 ? 'click' : _props$action,
_props$iconRender = props.iconRender,
iconRender = _props$iconRender === void 0 ? defaultIconRender : _props$iconRender;
var iconTrigger = ActionMap[action] || '';
var icon = iconRender(visible);
var iconProps = (_iconProps = {}, (0,defineProperty/* default */.Z)(_iconProps, iconTrigger, onVisibleChange), (0,defineProperty/* default */.Z)(_iconProps, "className", "".concat(prefixCls, "-icon")), (0,defineProperty/* default */.Z)(_iconProps, "key", 'passwordIcon'), (0,defineProperty/* default */.Z)(_iconProps, "onMouseDown", function onMouseDown(e) {
// Prevent focused state lost
// https://github.com/ant-design/ant-design/issues/15173
e.preventDefault();
}), (0,defineProperty/* default */.Z)(_iconProps, "onMouseUp", function onMouseUp(e) {
// Prevent caret position change
// https://github.com/ant-design/ant-design/issues/23524
e.preventDefault();
}), _iconProps);
return /*#__PURE__*/react.cloneElement( /*#__PURE__*/react.isValidElement(icon) ? icon : /*#__PURE__*/react.createElement("span", null, icon), iconProps);
};
var renderPassword = function renderPassword(_ref) {
var getPrefixCls = _ref.getPrefixCls;
var className = props.className,
customizePrefixCls = props.prefixCls,
customizeInputPrefixCls = props.inputPrefixCls,
size = props.size,
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
var prefixCls = getPrefixCls('input-password', customizePrefixCls);
var suffixIcon = visibilityToggle && getIcon(prefixCls);
var inputClassName = classnames_default()(prefixCls, className, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-").concat(size), !!size));
var omittedProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
type: visible ? 'text' : 'password',
className: inputClassName,
prefixCls: inputPrefixCls,
suffix: suffixIcon
});
if (size) {
omittedProps.size = size;
}
return /*#__PURE__*/react.createElement(Input/* default */.ZP, (0,esm_extends/* default */.Z)({
ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef)
}, omittedProps));
};
return /*#__PURE__*/react.createElement(context/* ConfigConsumer */.C, null, renderPassword);
});
if (false) {}
/* harmony default export */ var input_Password = (Password);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/SearchOutlined.js
var SearchOutlined = __webpack_require__(25783);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/SizeContext.js
var SizeContext = __webpack_require__(97647);
// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js
var Compact = __webpack_require__(4173);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
var reactNode = __webpack_require__(96159);
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Search.js
var Search_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;
};
var Search = /*#__PURE__*/react.forwardRef(function (props, ref) {
var _classNames;
var customizePrefixCls = props.prefixCls,
customizeInputPrefixCls = props.inputPrefixCls,
className = props.className,
customizeSize = props.size,
suffix = props.suffix,
_props$enterButton = props.enterButton,
enterButton = _props$enterButton === void 0 ? false : _props$enterButton,
addonAfter = props.addonAfter,
loading = props.loading,
disabled = props.disabled,
customOnSearch = props.onSearch,
customOnChange = props.onChange,
onCompositionStart = props.onCompositionStart,
onCompositionEnd = props.onCompositionEnd,
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var contextSize = react.useContext(SizeContext/* default */.Z);
var composedRef = react.useRef(false);
var prefixCls = getPrefixCls('input-search', customizePrefixCls);
var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
var _useCompactItemContex = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction),
compactSize = _useCompactItemContex.compactSize;
var size = compactSize || customizeSize || contextSize;
var inputRef = react.useRef(null);
var onChange = function onChange(e) {
if (e && e.target && e.type === 'click' && customOnSearch) {
customOnSearch(e.target.value, e);
}
if (customOnChange) {
customOnChange(e);
}
};
var onMouseDown = function onMouseDown(e) {
var _a;
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
e.preventDefault();
}
};
var onSearch = function onSearch(e) {
var _a, _b;
if (customOnSearch) {
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e);
}
};
var onPressEnter = function onPressEnter(e) {
if (composedRef.current || loading) {
return;
}
onSearch(e);
};
var searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/react.createElement(SearchOutlined/* default */.Z, null) : null;
var btnClassName = "".concat(prefixCls, "-button");
var button;
var enterButtonAsElement = enterButton || {};
var isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
if (isAntdButton || enterButtonAsElement.type === 'button') {
button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, (0,esm_extends/* default */.Z)({
onMouseDown: onMouseDown,
onClick: function onClick(e) {
var _a, _b;
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
onSearch(e);
},
key: 'enterButton'
}, isAntdButton ? {
className: btnClassName,
size: size
} : {}));
} else {
button = /*#__PURE__*/react.createElement(es_button/* default */.Z, {
className: btnClassName,
type: enterButton ? 'primary' : undefined,
size: size,
disabled: disabled,
key: "enterButton",
onMouseDown: onMouseDown,
onClick: onSearch,
loading: loading,
icon: searchIcon
}, enterButton);
}
if (addonAfter) {
button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, {
key: 'addonAfter'
})];
}
var cls = classnames_default()(prefixCls, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-").concat(size), !!size), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-with-button"), !!enterButton), _classNames), className);
var handleOnCompositionStart = function handleOnCompositionStart(e) {
composedRef.current = true;
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
};
var handleOnCompositionEnd = function handleOnCompositionEnd(e) {
composedRef.current = false;
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
};
return /*#__PURE__*/react.createElement(Input/* default */.ZP, (0,esm_extends/* default */.Z)({
ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref),
onPressEnter: onPressEnter
}, restProps, {
size: size,
onCompositionStart: handleOnCompositionStart,
onCompositionEnd: handleOnCompositionEnd,
prefixCls: inputPrefixCls,
addonAfter: button,
suffix: suffix,
onChange: onChange,
className: cls,
disabled: disabled
}));
});
if (false) {}
/* harmony default export */ var input_Search = (Search);
// EXTERNAL MODULE: ./node_modules/antd/es/input/TextArea.js + 1 modules
var TextArea = __webpack_require__(80173);
;// CONCATENATED MODULE: ./node_modules/antd/es/input/index.js
var input_Input = Input/* default */.ZP;
input_Input.Group = input_Group;
input_Input.Search = input_Search;
input_Input.TextArea = TextArea/* default */.Z;
input_Input.Password = input_Password;
/* harmony default export */ var input = (input_Input);
/***/ }),
/***/ 7124:
/*!**********************************************************************************************!*\
!*** ./node_modules/antd/node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***!
\**********************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_EyeOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/EyeOutlined.js
// This icon file is generated automatically.
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(93771);
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/EyeOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
ref: ref,
icon: asn_EyeOutlined
}));
};
EyeOutlined_EyeOutlined.displayName = 'EyeOutlined';
/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/react.forwardRef(EyeOutlined_EyeOutlined));
/***/ }),
/***/ 54403:
/*!***********************************************************!*\

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[67454,34180,28078,7713],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[67454,34180,7713],{
/***/ 32857:
/*!********************************************************************!*\

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[86701],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[67570],{
/***/ 96403:
/*!*********************************!*\
@ -87,609 +87,6 @@ var apiPref = _utils_env__WEBPACK_IMPORTED_MODULE_0__/* ["default"].API_SERVER *
/***/ }),
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 97501:
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[68819,34180,28078,44666],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[68819,34180,7713,44666],{
/***/ 26554:
/*!*******************************************************************!*\

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[68922,34180,28078,17379,44666],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[68922,34180,7713,17379,44666],{
/***/ 49495:
/*!***********************************************************************!*\

File diff suppressed because it is too large Load Diff

@ -1,18 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[7713,34180,28078],{
/***/ 509:
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/es/asn/SearchOutlined.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
// This icon file is generated automatically.
var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
/* harmony default export */ __webpack_exports__["Z"] = (SearchOutlined);
/***/ }),
(self["webpackChunk"] = self["webpackChunk"] || []).push([[7713,34180],{
/***/ 98787:
/*!**********************************************!*\
@ -1376,33 +1363,6 @@ EyeOutlined_EyeOutlined.displayName = 'EyeOutlined';
/***/ }),
/***/ 25783:
/*!*************************************************************************************!*\
!*** ./node_modules/antd/node_modules/@ant-design/icons/es/icons/SearchOutlined.js ***!
\*************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_SearchOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/SearchOutlined */ 509);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 93771);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SearchOutlined = function SearchOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_SearchOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
SearchOutlined.displayName = 'SearchOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(SearchOutlined));
/***/ }),
/***/ 43159:
/*!**************************************************!*\
!*** ./node_modules/rc-tooltip/es/placements.js ***!

@ -112,9 +112,10 @@ var RecordScreen = function RecordScreen(_ref) {
var plusTime = document.domain === "kepukehuan.educoder.net" ? 30 : exercise.exerciseUserInfo.screen_sec + 10 + 1;
modals.current = es_modal/* default.info */.Z.info({
icon: null,
centered: true,
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "tc font16",
children: ["\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\u9650\u5236\uFF0C", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5207\u6362\u9875\u9762 ", exercise.exerciseUserInfo.screen_num - exercise.exerciseUserInfo.used_screen_num, " \u6B21\u540E\u5C06\u8FDB\u884C\u5F3A\u5236\u4EA4\u5377\uFF0C", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u52FF\u5207\u5C4F\u53CA\u5237\u65B0\u9875\u9762"]
children: ["\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9000\u51FA\u5168\u5C4F\u9650\u5236\uFF0C", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5207\u6362\u9875\u9762 ", exercise.exerciseUserInfo.screen_num - exercise.exerciseUserInfo.used_screen_num, " \u6B21\u540E\u5C06\u7EC8\u6B62\u4F5C\u7B54\uFF0C", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u52FF\u9000\u51FA\u5168\u5C4F\u53CA\u5237\u65B0\u9875\u9762"]
}),
okText: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u5F00\u59CB\u8003\u8BD5\uFF08", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
@ -122,11 +123,25 @@ var RecordScreen = function RecordScreen(_ref) {
display: "inline-block"
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Countdown, {
onFinish: function onFinish() {
onFinish: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _modals$current;
// autoRecordScreen();
(_modals$current = modals.current) === null || _modals$current === void 0 ? void 0 : _modals$current.destroy();
},
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return handleFinish();
case 2:
res = _context.sent;
(_modals$current = modals.current) === null || _modals$current === void 0 ? void 0 : _modals$current.destroy();
console.log("res.used_screen_num:", res.used_screen_num);
if (res.used_screen_num) exitFullScreenTip(res.used_screen_num + 1);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})),
valueStyle: {
fontSize: 14,
lineHeight: 1.4,
@ -195,15 +210,15 @@ var RecordScreen = function RecordScreen(_ref) {
}, 500);
}, [exercise.exerciseUserInfo]);
var autoRecordScreen = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var user;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context2.next = 2;
_context3.next = 2;
return handleFinish();
case 2:
user = _context2.sent;
user = _context3.sent;
setTimeout(function () {
var _modals$current3, _exercise$exerciseUse4;
(_modals$current3 = modals.current) === null || _modals$current3 === void 0 ? void 0 : _modals$current3.destroy();
@ -221,16 +236,16 @@ var RecordScreen = function RecordScreen(_ref) {
}), "\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"]
}),
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
(0,fullscreen/* requestFullScreen */.Dj)(document.body);
case 1:
case "end":
return _context.stop();
return _context2.stop();
}
}, _callee);
}, _callee2);
}));
function onOk() {
return _onOk.apply(this, arguments);
@ -241,12 +256,12 @@ var RecordScreen = function RecordScreen(_ref) {
}, 1000);
case 4:
case "end":
return _context2.stop();
return _context3.stop();
}
}, _callee2);
}, _callee3);
}));
return function autoRecordScreen() {
return _ref2.apply(this, arguments);
return _ref3.apply(this, arguments);
};
}();
var documentClick = function documentClick(e) {
@ -256,83 +271,83 @@ var RecordScreen = function RecordScreen(_ref) {
}
};
var getExerciseUserInfo = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
var res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context3.next = 2;
_context4.next = 2;
return dispatch({
type: "exercise/getExerciseUserInfo",
payload: objectSpread2_default()({}, params)
});
case 2:
res = _context3.sent;
return _context3.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
res = _context4.sent;
return _context4.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
case 4:
case "end":
return _context3.stop();
return _context4.stop();
}
}, _callee3);
}, _callee4);
}));
return function getExerciseUserInfo() {
return _ref3.apply(this, arguments);
return _ref4.apply(this, arguments);
};
}();
var handleRecordScreenFinish = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(num) {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(num) {
var _exercise$exerciseUse5;
var res;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
if (!((_exercise$exerciseUse5 = exercise.exerciseUserInfo) !== null && _exercise$exerciseUse5 !== void 0 && _exercise$exerciseUse5.screen_at)) {
_context4.next = 3;
_context5.next = 3;
break;
}
_context4.next = 3;
_context5.next = 3;
return (0,service_exercise/* commitScreenAt */.ck)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
reset: true
}));
case 3:
_context4.next = 5;
_context5.next = 5;
return (0,service_exercise/* recordScreen */.oy)({
id: params.categoryId
});
case 5:
res = _context4.sent;
res = _context5.sent;
if (!(res !== null && res !== void 0 && res.is_commit)) {
_context4.next = 14;
_context5.next = 14;
break;
}
es_modal/* default.destroyAll */.Z.destroyAll();
_context4.next = 10;
_context5.next = 10;
return recordExitTimes();
case 10:
autoSubmitToDetail(true);
return _context4.abrupt("return");
return _context5.abrupt("return");
case 14:
exitFullScreenTip(num + 1);
case 15:
case "end":
return _context4.stop();
return _context5.stop();
}
}, _callee4);
}, _callee5);
}));
return function handleRecordScreenFinish(_x) {
return _ref4.apply(this, arguments);
return _ref5.apply(this, arguments);
};
}();
var recordExitTimes = /*#__PURE__*/function () {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
var current, recordInterval, _exercise$exerciseUse6, time, time_long, count;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
current = moment_default()();
recordInterval = exercise.exerciseUserInfo.screen_sec;
if (!(exitHistory.current.length > 0)) {
_context5.next = 9;
_context6.next = 9;
break;
}
time = current.format('YYYY-MM-DD hh:mm:ss');
@ -341,7 +356,7 @@ var RecordScreen = function RecordScreen(_ref) {
if (time_long / recordInterval >> 0 > count) {
time_long = (count + 1) * recordInterval - 1;
}
_context5.next = 9;
_context6.next = 9;
return (0,service_exercise/* saveScreenRecordList */.P8)(params.categoryId, {
exercise_user_id: (_exercise$exerciseUse6 = exercise.exerciseUserInfo) === null || _exercise$exerciseUse6 === void 0 ? void 0 : _exercise$exerciseUse6.exercise_user_id,
time: time,
@ -352,12 +367,12 @@ var RecordScreen = function RecordScreen(_ref) {
exitHistory.current = [];
case 10:
case "end":
return _context5.stop();
return _context6.stop();
}
}, _callee5);
}, _callee6);
}));
return function recordExitTimes() {
return _ref5.apply(this, arguments);
return _ref6.apply(this, arguments);
};
}();
var exitStartTimeRef = (0,react.useRef)(0);
@ -365,16 +380,16 @@ var RecordScreen = function RecordScreen(_ref) {
var exitHistory = (0,react.useRef)([]);
var hasModal = (0,react.useRef)(false);
var exitFullScreenTip = /*#__PURE__*/function () {
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(usedNumber) {
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(usedNumber) {
var _exercise$exerciseUse7;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
if (!submittedFlag.current) {
_context6.next = 2;
_context7.next = 2;
break;
}
return _context6.abrupt("return");
return _context7.abrupt("return");
case 2:
// 切屏提示
es_modal/* default.destroyAll */.Z.destroyAll();
@ -402,17 +417,17 @@ var RecordScreen = function RecordScreen(_ref) {
marginBottom: 50,
fontWeight: 500
},
children: "\u5207\u5C4F\u8B66\u544A"
children: "\u9000\u51FA\u5168\u5C4F\u8B66\u544A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
marginBottom: 40
},
children: "\u4F60\u5F53\u524D\u5DF2\u7ECF\u89E6\u53D1\u5207\u5C4F\uFF0C\u8BF7\u7ACB\u5373\u70B9\u51FB\u4E0B\u65B9\u7684\u201C\u56DE\u5230\u8003\u8BD5\u201D\u6309\u94AE\u56DE\u5230\u8003\u8BD5\u9875\u9762\u3002"
children: "\u4F60\u5F53\u524D\u5DF2\u7ECF\u9000\u51FA\u8003\u8BD5\u5168\u5C4F\uFF0C\u8BF7\u7ACB\u5373\u70B9\u51FB\u4E0B\u65B9\u7684\u201C\u56DE\u5230\u8003\u8BD5\u201D\u6309\u94AE\u6062\u590D\u7B54\u9898\u5168\u5C4F\u6A21\u5F0F\u3002"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginBottom: 40
},
children: ["\u5207\u5C4F\u8FBE\u5230", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: ["\u9000\u51FA\u5168\u5C4F\u6A21\u5F0F\u8FBE\u5230", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Exercisemodules.warningText,
children: ((_exercise$exerciseUse7 = exercise.exerciseUserInfo) === null || _exercise$exerciseUse7 === void 0 ? void 0 : _exercise$exerciseUse7.screen_num) + 1
}), "\u6B21\u5C06", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
@ -420,8 +435,8 @@ var RecordScreen = function RecordScreen(_ref) {
style: {
fontWeight: 600
},
children: "\u5F3A\u5236\u4EA4\u5377"
}), ",\u5F53\u524D\u5DF2\u5207\u5C4F", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u7EC8\u6B62\u4F5C\u7B54"
}), ",\u5F53\u524D\u5DF2\u9000\u51FA\u5168\u5C4F", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Exercisemodules.warningText,
children: usedNumber - 1
}), "\u6B21"]
@ -444,7 +459,7 @@ var RecordScreen = function RecordScreen(_ref) {
format: "ss",
value: Date.now() + (exercise.exerciseUserInfo.screen_sec + 1) * 1000
}), "\u79D2"]
}), "\u5185\u56DE\u5230\u8003\u8BD5\uFF0C\u4E0D\u8BA1\u5207\u5C4F\u6B21\u6570\u3002"]
}), "\u5185\u56DE\u5230\u8003\u8BD5\uFF0C\u4E0D\u8BA1\u9000\u51FA\u5168\u5C4F\u6B21\u6570\u3002"]
})]
}),
onOk: function onOk() {
@ -456,12 +471,12 @@ var RecordScreen = function RecordScreen(_ref) {
});
case 6:
case "end":
return _context6.stop();
return _context7.stop();
}
}, _callee6);
}, _callee7);
}));
return function exitFullScreenTip(_x2) {
return _ref6.apply(this, arguments);
return _ref7.apply(this, arguments);
};
}();
var handleToDetail = function handleToDetail() {
@ -469,19 +484,19 @@ var RecordScreen = function RecordScreen(_ref) {
};
// 自动交卷处理
var autoSubmit = /*#__PURE__*/function () {
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
var res;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
es_modal/* default.destroyAll */.Z.destroyAll();
_context7.next = 3;
_context8.next = 3;
return (0,service_exercise/* submitExerciseAnswer */.VL)({
categoryId: params.categoryId,
commit_method: 1
});
case 3:
res = _context7.sent;
res = _context8.sent;
if (res) {
try {
socket.send(JSON.stringify({
@ -498,25 +513,25 @@ var RecordScreen = function RecordScreen(_ref) {
}
case 5:
case "end":
return _context7.stop();
return _context8.stop();
}
}, _callee7);
}, _callee8);
}));
return function autoSubmit() {
return _ref7.apply(this, arguments);
return _ref8.apply(this, arguments);
};
}();
var autoSubmitToDetail = /*#__PURE__*/function () {
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
var isForced,
_exercise$exerciseUse8,
_exercise$exerciseUse9,
res,
_args8 = arguments;
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
_args9 = arguments;
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
isForced = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : false;
isForced = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : false;
document.removeEventListener((0,fullscreen/* fullscreenChange */.gH)(), fullscreenchangeIn, false);
(0,fullscreen/* exitFull */.BU)();
es_modal/* default.destroyAll */.Z.destroyAll();
@ -533,15 +548,15 @@ var RecordScreen = function RecordScreen(_ref) {
} catch (_unused2) {}
;
if (!isForced) {
_context8.next = 14;
_context9.next = 14;
break;
}
_context8.next = 10;
_context9.next = 10;
return (0,service_exercise/* getScreenRecordList */.Yu)(params.categoryId, {
exercise_user_id: (_exercise$exerciseUse8 = exercise.exerciseUserInfo) === null || _exercise$exerciseUse8 === void 0 ? void 0 : _exercise$exerciseUse8.exercise_user_id
});
case 10:
res = _context8.sent;
res = _context9.sent;
modal.info({
icon: null,
closable: false,
@ -560,25 +575,25 @@ var RecordScreen = function RecordScreen(_ref) {
alt: ""
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Exercisemodules.forcedText,
children: "\u5DF2\u5F3A\u5236\u4EA4\u5377"
children: "\u5DF2\u7EC8\u6B62\u8003\u8BD5\u7B54\u9898"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Exercisemodules.screenNumText,
children: ["\u7D2F\u8BA1\u5207\u5C4F\u6B21\u6570\u5DF2\u8D85\u8FC7", (_exercise$exerciseUse9 = exercise.exerciseUserInfo) === null || _exercise$exerciseUse9 === void 0 ? void 0 : _exercise$exerciseUse9.screen_num, "\u6B21"]
children: ["\u7D2F\u8BA1\u9000\u51FA\u5168\u5C4F\u72B6\u6001\u8D85\u8FC7", (_exercise$exerciseUse9 = exercise.exerciseUserInfo) === null || _exercise$exerciseUse9 === void 0 ? void 0 : _exercise$exerciseUse9.screen_num, "\u6B21"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
dataSource: res === null || res === void 0 ? void 0 : res.data,
pagination: false,
rowKey: "time",
bordered: true,
columns: [{
title: '开始切屏时间',
title: '退出全屏时间',
align: 'center',
dataIndex: 'time'
}, {
title: '屏时长(秒)',
title: '退出全屏时长(秒)',
align: 'center',
dataIndex: 'time_long'
}, {
title: '判定切屏次数',
title: '退出全屏次数',
align: 'center',
dataIndex: 'count'
}]
@ -588,7 +603,7 @@ var RecordScreen = function RecordScreen(_ref) {
handleToDetail();
}
});
_context8.next = 15;
_context9.next = 15;
break;
case 14:
modal.info({
@ -602,12 +617,12 @@ var RecordScreen = function RecordScreen(_ref) {
});
case 15:
case "end":
return _context8.stop();
return _context9.stop();
}
}, _callee8);
}, _callee9);
}));
return function autoSubmitToDetail() {
return _ref8.apply(this, arguments);
return _ref9.apply(this, arguments);
};
}();
var handleBlur = function handleBlur(e) {
@ -615,83 +630,82 @@ var RecordScreen = function RecordScreen(_ref) {
if ((0,fullscreen/* IsFull */.vp)() && document.getElementById("iframeShixuns").style.display == 'none' && !hasModal.current) {
// window.parent.postMessage('backExercise', '*');
cuttingScreenChangeIn();
// exitFull()
(0,fullscreen/* exitFull */.BU)();
}
};
var handleFinish = /*#__PURE__*/function () {
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
var _exercise$exerciseUse10;
var res, resUser;
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
if (!((_exercise$exerciseUse10 = exercise.exerciseUserInfo) !== null && _exercise$exerciseUse10 !== void 0 && _exercise$exerciseUse10.screen_at)) {
_context9.next = 3;
_context10.next = 3;
break;
}
_context9.next = 3;
_context10.next = 3;
return (0,service_exercise/* commitScreenAt */.ck)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
reset: true
}));
case 3:
_context9.next = 5;
_context10.next = 5;
return (0,service_exercise/* recordScreen */.oy)({
id: params.categoryId
});
case 5:
res = _context9.sent;
res = _context10.sent;
if (!(res !== null && res !== void 0 && res.is_commit)) {
_context9.next = 9;
_context10.next = 9;
break;
}
autoSubmitToDetail();
return _context9.abrupt("return");
return _context10.abrupt("return");
case 9:
_context9.next = 11;
_context10.next = 11;
return getExerciseUserInfo();
case 11:
resUser = _context9.sent;
return _context9.abrupt("return", resUser);
resUser = _context10.sent;
return _context10.abrupt("return", resUser);
case 13:
case "end":
return _context9.stop();
return _context10.stop();
}
}, _callee9);
}, _callee10);
}));
return function handleFinish() {
return _ref9.apply(this, arguments);
return _ref10.apply(this, arguments);
};
}();
var fullscreenchangeIn = /*#__PURE__*/function () {
var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
var showHeader, _exercise$exerciseUse11, res;
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
showHeader = false;
if (!(0,fullscreen/* IsFull */.vp)()) {
_context10.next = 5;
_context11.next = 5;
break;
}
if ((_exercise$exerciseUse11 = exercise.exerciseUserInfo) !== null && _exercise$exerciseUse11 !== void 0 && _exercise$exerciseUse11.screen_at) (0,service_exercise/* commitScreenAt */.ck)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
reset: true
}));
_context10.next = 14;
_context11.next = 14;
break;
case 5:
if (hasModal.current) {
_context10.next = 14;
_context11.next = 14;
break;
}
showHeader = true;
_context10.next = 9;
_context11.next = 9;
return (0,service_exercise/* commitScreenAt */.ck)(objectSpread2_default()({}, params));
case 9:
_context10.next = 11;
_context11.next = 11;
return getExerciseUserInfo();
case 11:
res = _context10.sent;
res = _context11.sent;
exitFullScreenTip(res.used_screen_num + 1);
if (window.frames.length != parent.frames.length) {
window.parent.postMessage('backExercise', '*');
@ -703,52 +717,155 @@ var RecordScreen = function RecordScreen(_ref) {
});
case 15:
case "end":
return _context10.stop();
return _context11.stop();
}
}, _callee10);
}, _callee11);
}));
return function fullscreenchangeIn() {
return _ref10.apply(this, arguments);
return _ref11.apply(this, arguments);
};
}();
var cuttingScreenChangeIn = /*#__PURE__*/function () {
var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
var _ref12 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12() {
var res;
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
(0,service_exercise/* commitScreenAt */.ck)(objectSpread2_default()({}, params));
_context11.next = 3;
_context12.next = 3;
return getExerciseUserInfo();
case 3:
res = _context11.sent;
res = _context12.sent;
exitFullScreenTip(res.used_screen_num + 1);
if (window.frames.length != parent.frames.length) {
window.parent.postMessage('backExercise', '*');
}
case 6:
case "end":
return _context11.stop();
return _context12.stop();
}
}, _callee11);
}, _callee12);
}));
return function cuttingScreenChangeIn() {
return _ref11.apply(this, arguments);
return _ref12.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: contextHolder
});
};
/* harmony default export */ var recordScreen = ((0,_umi_production_exports.connect)(function (_ref12) {
var exercise = _ref12.exercise,
globalSetting = _ref12.globalSetting;
/* harmony default export */ var recordScreen = ((0,_umi_production_exports.connect)(function (_ref13) {
var exercise = _ref13.exercise,
globalSetting = _ref13.globalSetting;
return {
globalSetting: globalSetting,
exercise: exercise
};
})(RecordScreen));
/***/ }),
/***/ 15994:
/*!*********************************!*\
!*** ./src/utils/fullscreen.ts ***!
\*********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "BU": function() { return /* binding */ exitFull; },
/* harmony export */ "Dj": function() { return /* binding */ requestFullScreen; },
/* harmony export */ "gH": function() { return /* binding */ fullscreenChange; },
/* harmony export */ "vp": function() { return /* binding */ IsFull; }
/* harmony export */ });
function requestFullScreen(element) {
try {
if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
} catch (e) {
console.log(e, ":e");
}
}
function exitFull() {
if (window.top.document.webkitExitFullscreen) {
window.top.document.webkitExitFullscreen();
} else if (document.exitFullscreen) {
window.top.document.exitFullscreen();
} else if (document.msExitFullscreen) {
window.top.document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
window.top.document.mozCancelFullScreen();
}
}
// esliint disabled
var fullscreenChange = function fullscreenChange() {
//['fullscreenchange','msfullscreenchange','webkitfullscreenchange', 'mozfullscreenchange']
if (document.webkitExitFullscreen) {
// document.webkitExitFullscreen()
return 'webkitfullscreenchange';
} else if (document.exitFullscreen) {
// document.exitFullscreen()
return 'fullscreenchange';
} else if (document.msExitFullscreen) {
// document.msExitFullscreen()
return 'msfullscreenchange';
} else if (document.mozCancelFullScreen) {
// document.mozCancelFullScreen()
return 'mozfullscreenchange';
}
};
//判断是否全屏
function IsFull() {
var fullscreenElement = window.top.document.fullscreenElement || window.top.document.mozFullscreenElement || window.top.document.webkitFullscreenElement;
var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled;
if (fullscreenElement == null) {
return false;
} else {
return true;
}
}
// document.addEventListener("mozfullscreenchange", function (event) {
// console.log("mozfullscreenchange ", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("webkitfullscreenchange", function (event) {
// console.log("webkitfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("msfullscreenchange", function (event) {
// console.log("msfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
/***/ })
}]);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -710,6 +710,109 @@ var regex = /(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;
});
}));
/***/ }),
/***/ 15994:
/*!*********************************!*\
!*** ./src/utils/fullscreen.ts ***!
\*********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "BU": function() { return /* binding */ exitFull; },
/* harmony export */ "Dj": function() { return /* binding */ requestFullScreen; },
/* harmony export */ "gH": function() { return /* binding */ fullscreenChange; },
/* harmony export */ "vp": function() { return /* binding */ IsFull; }
/* harmony export */ });
function requestFullScreen(element) {
try {
if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
} catch (e) {
console.log(e, ":e");
}
}
function exitFull() {
if (window.top.document.webkitExitFullscreen) {
window.top.document.webkitExitFullscreen();
} else if (document.exitFullscreen) {
window.top.document.exitFullscreen();
} else if (document.msExitFullscreen) {
window.top.document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
window.top.document.mozCancelFullScreen();
}
}
// esliint disabled
var fullscreenChange = function fullscreenChange() {
//['fullscreenchange','msfullscreenchange','webkitfullscreenchange', 'mozfullscreenchange']
if (document.webkitExitFullscreen) {
// document.webkitExitFullscreen()
return 'webkitfullscreenchange';
} else if (document.exitFullscreen) {
// document.exitFullscreen()
return 'fullscreenchange';
} else if (document.msExitFullscreen) {
// document.msExitFullscreen()
return 'msfullscreenchange';
} else if (document.mozCancelFullScreen) {
// document.mozCancelFullScreen()
return 'mozfullscreenchange';
}
};
//判断是否全屏
function IsFull() {
var fullscreenElement = window.top.document.fullscreenElement || window.top.document.mozFullscreenElement || window.top.document.webkitFullscreenElement;
var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled;
if (fullscreenElement == null) {
return false;
} else {
return true;
}
}
// document.addEventListener("mozfullscreenchange", function (event) {
// console.log("mozfullscreenchange ", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("webkitfullscreenchange", function (event) {
// console.log("webkitfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("msfullscreenchange", function (event) {
// console.log("msfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
/***/ })
}]);

@ -1,4 +1,4 @@
(self["webpackChunk"] = self["webpackChunk"] || []).push([[28547,95112],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[87545],{
/***/ 7918:
/*!******************************************************************************!*\
@ -530,47 +530,6 @@ CloseOutlined.displayName = 'CloseOutlined';
/***/ }),
/***/ 87588:
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/ExclamationCircleOutlined */ 61144);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
ExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(ExclamationCircleOutlined));
/***/ }),
/***/ 13013:
/*!************************************************!*\
!*** ./node_modules/antd/es/dropdown/index.js ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown */ 18562);
/* harmony default export */ __webpack_exports__["Z"] = (_dropdown__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z);
/***/ }),
/***/ 75008:
/*!*********************************************************!*\
!*** ./node_modules/antd/es/input/index.js + 5 modules ***!

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[11378],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[88551],{
/***/ 31662:
/*!************************************************************************!*\
@ -28,6 +28,33 @@ CloseCircleOutlined.displayName = 'CloseCircleOutlined';
/***/ }),
/***/ 87588:
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/ExclamationCircleOutlined */ 61144);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
ExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(ExclamationCircleOutlined));
/***/ }),
/***/ 27049:
/*!***********************************************!*\
!*** ./node_modules/antd/es/divider/index.js ***!
@ -112,6 +139,18 @@ var style_default = __webpack_require__(43146);
/***/ }),
/***/ 13013:
/*!************************************************!*\
!*** ./node_modules/antd/es/dropdown/index.js ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown */ 18562);
/* harmony default export */ __webpack_exports__["Z"] = (_dropdown__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z);
/***/ }),
/***/ 61460:

@ -1081,9 +1081,10 @@ var User = function User(_ref) {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
localStorage.setItem("loginOut", "true");
_context.next = 3;
return (0,service_user/* LoginOut */.vR)({});
case 2:
case 3:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
dispatch({
@ -1094,6 +1095,7 @@ var User = function User(_ref) {
type: 'user/getNavigationInfo',
payload: objectSpread2_default()({}, payload)
});
localStorage.removeItem("loginOut");
delCookie('autologin_trustie');
delCookie('_educoder_session');
localStorage.removeItem('isfirst');
@ -1104,7 +1106,7 @@ var User = function User(_ref) {
message/* default.success */.ZP.success(res === null || res === void 0 ? void 0 : res.message);
_umi_production_exports.history.replace('/');
}
case 4:
case 5:
case "end":
return _context.stop();
}

@ -563,10 +563,10 @@ a.ant-btn-disabled:active > a:only-child::after {background: transparent;}
.ant-comment-actions > li > span {color: @text-color-secondary;}
.ant-comment-actions > li > span:hover {color: #595959;}
.ant-picker-status-error.ant-picker, .ant-picker-status-error.ant-picker:not([disabled]):hover {background-color: #fff;border-color: @error-color;}
.ant-picker-status-error.ant-picker-focused, .ant-picker-status-error.ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(227, 172, 224, 0.2);border-right-width: 1px;}
.ant-picker-status-error.ant-picker-focused, .ant-picker-status-error.ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(166, 161, 196, 0.2);border-right-width: 1px;}
.ant-picker-status-error.ant-picker .ant-picker-active-bar {background: color(~`colorPalette("@{error-color}", 5)`);}
.ant-picker-status-warning.ant-picker, .ant-picker-status-warning.ant-picker:not([disabled]):hover {background-color: #fff;border-color: @warning-color;}
.ant-picker-status-warning.ant-picker-focused, .ant-picker-status-warning.ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(84, 8, 86, 0.2);border-right-width: 1px;}
.ant-picker-status-warning.ant-picker-focused, .ant-picker-status-warning.ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(26, 240, 56, 0.2);border-right-width: 1px;}
.ant-picker-status-warning.ant-picker .ant-picker-active-bar {background: color(~`colorPalette("@{warning-color}", 5)`);}
.ant-picker {color: @text-color;background: #fff;border: 1px solid @border-color-base;border-radius: 2px;}
.ant-picker:hover, .ant-picker-focused {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px;}
@ -788,16 +788,16 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.anticon.ant-input-clear-icon:hover, .ant-input-clear-icon:hover {color: @text-color-secondary;}
.anticon.ant-input-clear-icon:active, .ant-input-clear-icon:active {color: @text-color;}
.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {background: #fff;border-color: @error-color;}
.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(227, 172, 224, 0.2);border-right-width: 1px;}
.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(166, 161, 196, 0.2);border-right-width: 1px;}
.ant-input-status-error .ant-input-prefix {color: @error-color;}
.ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {background: #fff;border-color: @warning-color;}
.ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(84, 8, 86, 0.2);border-right-width: 1px;}
.ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(26, 240, 56, 0.2);border-right-width: 1px;}
.ant-input-status-warning .ant-input-prefix {color: @warning-color;}
.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover {background: #fff;border-color: @error-color;}
.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(227, 172, 224, 0.2);border-right-width: 1px;}
.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(166, 161, 196, 0.2);border-right-width: 1px;}
.ant-input-affix-wrapper-status-error .ant-input-prefix {color: @error-color;}
.ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover {background: #fff;border-color: @warning-color;}
.ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(84, 8, 86, 0.2);border-right-width: 1px;}
.ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(26, 240, 56, 0.2);border-right-width: 1px;}
.ant-input-affix-wrapper-status-warning .ant-input-prefix {color: @warning-color;}
.ant-input-group-wrapper-status-error .ant-input-group-addon {color: @error-color;border-color: @error-color;}
.ant-input-group-wrapper-status-warning .ant-input-group-addon {color: @warning-color;border-color: @warning-color;}
@ -894,16 +894,16 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.ant-input-number-affix-wrapper > div.ant-input-number {border: none;}
.ant-input-number-affix-wrapper > div.ant-input-number.ant-input-number-focused {box-shadow: none !important;}
.ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:hover {background: #fff;border-color: @error-color;}
.ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(227, 172, 224, 0.2);border-right-width: 1px;}
.ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(166, 161, 196, 0.2);border-right-width: 1px;}
.ant-input-number-status-error .ant-input-number-prefix {color: @error-color;}
.ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:hover {background: #fff;border-color: @warning-color;}
.ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(84, 8, 86, 0.2);border-right-width: 1px;}
.ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(26, 240, 56, 0.2);border-right-width: 1px;}
.ant-input-number-status-warning .ant-input-number-prefix {color: @warning-color;}
.ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover {background: #fff;border-color: @error-color;}
.ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(227, 172, 224, 0.2);border-right-width: 1px;}
.ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(166, 161, 196, 0.2);border-right-width: 1px;}
.ant-input-number-affix-wrapper-status-error .ant-input-number-prefix {color: @error-color;}
.ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover {background: #fff;border-color: @warning-color;}
.ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(84, 8, 86, 0.2);border-right-width: 1px;}
.ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(26, 240, 56, 0.2);border-right-width: 1px;}
.ant-input-number-affix-wrapper-status-warning .ant-input-number-prefix {color: @warning-color;}
.ant-input-number-group-wrapper-status-error .ant-input-number-group-addon {color: @error-color;border-color: @error-color;}
.ant-input-number-group-wrapper-status-warning .ant-input-number-group-addon {color: @warning-color;border-color: @warning-color;}
@ -1024,10 +1024,10 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.ant-list-grid .ant-col > .ant-list-item {border-bottom: none;}
.ant-list-bordered {border: 1px solid @border-color-base;border-radius: 2px;}
.ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:hover {background: #fff;border-color: @error-color;}
.ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(227, 172, 224, 0.2);border-right-width: 1px;}
.ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(166, 161, 196, 0.2);border-right-width: 1px;}
.ant-mentions-status-error .ant-input-prefix {color: @error-color;}
.ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:hover {background: #fff;border-color: @warning-color;}
.ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(84, 8, 86, 0.2);border-right-width: 1px;}
.ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(26, 240, 56, 0.2);border-right-width: 1px;}
.ant-mentions-status-warning .ant-input-prefix {color: @warning-color;}
.ant-mentions {color: @text-color;background-color: #fff;background-image: none;border: 1px solid @border-color-base;border-radius: 2px;}
.ant-mentions::placeholder {color: #bfbfbf;}
@ -1360,9 +1360,9 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.ant-select-multiple .ant-select-selection-item-remove {color: inherit;color: @text-color-secondary;}
.ant-select-multiple .ant-select-selection-item-remove:hover {color: rgba(0, 0, 0, 0.75);}
.ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector {background-color: #fff;border-color: @error-color !important;}
.ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(227, 172, 224, 0.2);border-right-width: 1px;}
.ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(166, 161, 196, 0.2);border-right-width: 1px;}
.ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector {background-color: #fff;border-color: @warning-color !important;}
.ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(84, 8, 86, 0.2);border-right-width: 1px;}
.ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(26, 240, 56, 0.2);border-right-width: 1px;}
.ant-select {color: @text-color;}
.ant-select:not(.ant-select-customize-input) .ant-select-selector {background-color: #fff;border: 1px solid @border-color-base;border-radius: 2px;}
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {border-color: color(~`colorPalette("@{primary-color}", 5)`);box-shadow: 0 0 0 2px fade(@primary-color, 20%);border-right-width: 1px;}
@ -1636,9 +1636,9 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;}
.ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;}
.ant-tag-checkable-checked {background-color: @primary-color;}
.ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);}
.ant-tag-pink {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;}
.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{modal-content-bg}", 1)`);border-color: #ffadd2;}
.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-magenta {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;}
.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{modal-content-bg}", 1)`);border-color: #ffadd2;}
.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-red {color: #cf1322;background: #fff1f0;border-color: #ffa39e;}
.ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;}

@ -14,7 +14,17 @@
<script src="/js/polyfill.min.js"></script>
</head>
<body>
<div id="root"></div><script>window.ENV = 'newBuild'</script><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<div id="root"></div><script>window.ENV = 'newBuild'</script><style>
body > div[id="monica-content-root"] {
display: none !important;
}
body > div#root {
display: block !important;
}
body > div:has([class~='ant']) {
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="https://www-cdn.educoder.net/umi.js"></script>
<script src="https://www-cdn.educoder.net/js/public.js"></script>

BIN
ip.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -29,14 +29,35 @@ function setTop() {
if ((location.host.indexOf("ilearning") > -1 || location.host.indexOf("i-learning") > -1) && location.pathname.indexOf("/tasks") === -1) {
document.getElementById("root").style.paddingTop = "60px"
}
// saia默认进入竞赛
if(document.domain === "saia.educoder.net" && location.pathname === "/"){
location.href = "/competitions/shszyjnds-2023/list"
}
}
window.addEventListener('popstate', function () {
setTop();
})
// window.addEventListener('popstate', function () {
// setTop();
// })
setTop();
const _historyWrap = function(type) {
const orig = history[type];
const e = new Event(type);
return function() {
const rv = orig.apply(this, arguments);
e.arguments = arguments;
window.dispatchEvent(e);
return rv;
};
};
history.pushState = _historyWrap('pushState');
history.replaceState = _historyWrap('replaceState');
window.addEventListener('pushState', function(e) {
setTop();
});
window.addEventListener('replaceState', function(e) {
setTop();
});
if (window.ENV !== 'dev') {
console.log = new Function;
}
@ -69,4 +90,14 @@ if (getChromeVersion()) {
if (!!version && version < 70) {
window.location.replace('/upgrade-browser.html');
}
}
}
window.addEventListener("storage", function (e) {
if(e.key === "loginOut"){
if(this.location.pathname.indexOf("/exercise") > -1 && this.location.pathname.indexOf("/users") > -1 )
window.location.href = "/"
else
window.location.reload();
}
})

@ -1,622 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[37062],{
/***/ 509:
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/es/asn/SearchOutlined.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
// This icon file is generated automatically.
var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
/* harmony default export */ __webpack_exports__["Z"] = (SearchOutlined);
/***/ }),
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 51432:
/*!****************************************************!*\
!*** ./src/layouts/SimpleLayouts.tsx + 16 modules ***!
@ -2087,124 +1471,6 @@ var SimpleLayouts = function SimpleLayouts(_ref) {
/***/ }),
/***/ 48783:
/*!****************************************************************!*\
!*** ./node_modules/antd/es/_util/throttleByAnimationFrame.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "U": function() { return /* binding */ throttleByAnimationFrameDecorator; },
/* harmony export */ "t": function() { return /* binding */ throttleByAnimationFrame; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ 74902);
/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ 75164);
function throttleByAnimationFrame(fn) {
var requestId;
var later = function later(args) {
return function () {
requestId = null;
fn.apply(void 0, (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(args));
};
};
var throttled = function throttled() {
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 = function () {
rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"].cancel */ .Z.cancel(requestId);
requestId = null;
};
return throttled;
}
function throttleByAnimationFrameDecorator() {
return function throttle(target, key, descriptor) {
var fn = descriptor.value;
var definingProperty = false;
return {
configurable: true,
get: function get() {
// In IE11 calling Object.defineProperty has a side-effect of evaluating the
// getter for the property which is being replaced. This causes infinite
// recursion and an "Out of stack space" error.
// eslint-disable-next-line no-prototype-builtins
if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
/* istanbul ignore next */
return fn;
}
var boundFn = throttleByAnimationFrame(fn.bind(this));
definingProperty = true;
Object.defineProperty(this, key, {
value: boundFn,
configurable: true,
writable: true
});
definingProperty = false;
return boundFn;
}
};
};
}
/***/ }),
/***/ 25783:
/*!*************************************************************************************!*\
!*** ./node_modules/antd/node_modules/@ant-design/icons/es/icons/SearchOutlined.js ***!
\*************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _ant_design_icons_svg_es_asn_SearchOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/SearchOutlined */ 509);
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 93771);
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SearchOutlined = function SearchOutlined(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
ref: ref,
icon: _ant_design_icons_svg_es_asn_SearchOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
}));
};
SearchOutlined.displayName = 'SearchOutlined';
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(SearchOutlined));
/***/ }),
/***/ 81626:
/*!*******************************************************!*\
!*** ./node_modules/rc-pagination/es/locale/zh_CN.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
/* harmony default export */ __webpack_exports__["Z"] = ({
// Options.jsx
items_per_page: '条/页',
jump_to: '跳至',
jump_to_confirm: '确定',
page: '页',
// Pagination.jsx
prev_page: '上一页',
next_page: '下一页',
prev_5: '向前 5 页',
next_5: '向后 5 页',
prev_3: '向前 3 页',
next_3: '向后 3 页',
page_size: '页码'
});
/***/ }),
/***/ 32637:
/*!***********************************************!*\
!*** ./src/assets/images/AssistantCode3.jpeg ***!

File diff suppressed because it is too large Load Diff

@ -1,592 +1,3 @@
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./node_modules/antd/es/form/style/index.less ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
.ant-form-item .ant-input-number + .ant-form-text {
margin-left: 8px;
}
.ant-form-inline {
display: flex;
flex-wrap: wrap;
}
.ant-form-inline .ant-form-item {
flex: none;
flex-wrap: nowrap;
margin-right: 16px;
margin-bottom: 0;
}
.ant-form-inline .ant-form-item-with-help {
margin-bottom: 16px;
}
.ant-form-inline .ant-form-item > .ant-form-item-label,
.ant-form-inline .ant-form-item > .ant-form-item-control {
display: inline-block;
vertical-align: top;
}
.ant-form-inline .ant-form-item > .ant-form-item-label {
flex: none;
}
.ant-form-inline .ant-form-item .ant-form-text {
display: inline-block;
}
.ant-form-inline .ant-form-item .ant-form-item-has-feedback {
display: inline-block;
}
.ant-form-horizontal .ant-form-item-label {
flex-grow: 0;
}
.ant-form-horizontal .ant-form-item-control {
flex: 1 1;
min-width: 0;
}
.ant-form-horizontal .ant-form-item-label[class$='-24'] + .ant-form-item-control,
.ant-form-horizontal .ant-form-item-label[class*='-24 '] + .ant-form-item-control {
min-width: 0;
min-width: initial;
}
.ant-form-vertical .ant-form-item-row {
flex-direction: column;
}
.ant-form-vertical .ant-form-item-label > label {
height: auto;
}
.ant-form-vertical .ant-form-item .ant-form-item-control {
width: 100%;
}
.ant-form-vertical .ant-form-item-label,
.ant-col-24.ant-form-item-label,
.ant-col-xl-24.ant-form-item-label {
padding: 0 0 4px;
line-height: 1.66667;
white-space: normal;
white-space: initial;
text-align: left;
}
.ant-form-vertical .ant-form-item-label > label,
.ant-col-24.ant-form-item-label > label,
.ant-col-xl-24.ant-form-item-label > label {
margin: 0;
}
.ant-form-vertical .ant-form-item-label > label::after,
.ant-col-24.ant-form-item-label > label::after,
.ant-col-xl-24.ant-form-item-label > label::after {
display: none;
}
.ant-form-rtl.ant-form-vertical .ant-form-item-label,
.ant-form-rtl.ant-col-24.ant-form-item-label,
.ant-form-rtl.ant-col-xl-24.ant-form-item-label {
text-align: right;
}
@media (max-width: 575px) {
.ant-form-item .ant-form-item-label {
padding: 0 0 4px;
line-height: 1.66667;
white-space: normal;
white-space: initial;
text-align: left;
}
.ant-form-item .ant-form-item-label > label {
margin: 0;
}
.ant-form-item .ant-form-item-label > label::after {
display: none;
}
.ant-form-rtl.ant-form-item .ant-form-item-label {
text-align: right;
}
.ant-form .ant-form-item {
flex-wrap: wrap;
}
.ant-form .ant-form-item .ant-form-item-label,
.ant-form .ant-form-item .ant-form-item-control {
flex: 0 0 100%;
max-width: 100%;
}
.ant-col-xs-24.ant-form-item-label {
padding: 0 0 4px;
line-height: 1.66667;
white-space: normal;
white-space: initial;
text-align: left;
}
.ant-col-xs-24.ant-form-item-label > label {
margin: 0;
}
.ant-col-xs-24.ant-form-item-label > label::after {
display: none;
}
.ant-form-rtl.ant-col-xs-24.ant-form-item-label {
text-align: right;
}
}
@media (max-width: 767px) {
.ant-col-sm-24.ant-form-item-label {
padding: 0 0 4px;
line-height: 1.66667;
white-space: normal;
white-space: initial;
text-align: left;
}
.ant-col-sm-24.ant-form-item-label > label {
margin: 0;
}
.ant-col-sm-24.ant-form-item-label > label::after {
display: none;
}
.ant-form-rtl.ant-col-sm-24.ant-form-item-label {
text-align: right;
}
}
@media (max-width: 991px) {
.ant-col-md-24.ant-form-item-label {
padding: 0 0 4px;
line-height: 1.66667;
white-space: normal;
white-space: initial;
text-align: left;
}
.ant-col-md-24.ant-form-item-label > label {
margin: 0;
}
.ant-col-md-24.ant-form-item-label > label::after {
display: none;
}
.ant-form-rtl.ant-col-md-24.ant-form-item-label {
text-align: right;
}
}
@media (max-width: 1199px) {
.ant-col-lg-24.ant-form-item-label {
padding: 0 0 4px;
line-height: 1.66667;
white-space: normal;
white-space: initial;
text-align: left;
}
.ant-col-lg-24.ant-form-item-label > label {
margin: 0;
}
.ant-col-lg-24.ant-form-item-label > label::after {
display: none;
}
.ant-form-rtl.ant-col-lg-24.ant-form-item-label {
text-align: right;
}
}
@media (max-width: 1599px) {
.ant-col-xl-24.ant-form-item-label {
padding: 0 0 4px;
line-height: 1.66667;
white-space: normal;
white-space: initial;
text-align: left;
}
.ant-col-xl-24.ant-form-item-label > label {
margin: 0;
}
.ant-col-xl-24.ant-form-item-label > label::after {
display: none;
}
.ant-form-rtl.ant-col-xl-24.ant-form-item-label {
text-align: right;
}
}
.ant-form-item {
/* Some non-status related component style is in `components.less` */
/* To support leave along ErrorList. We add additional className to handle explain style */
}
.ant-form-item-explain-error {
color: #ff4d4f;
}
.ant-form-item-explain-warning {
color: #faad14;
}
.ant-form-item-has-feedback .ant-switch {
margin: 2px 0 4px;
}
.ant-form-item-has-warning .ant-form-item-split {
color: #faad14;
}
.ant-form-item-has-error .ant-form-item-split {
color: #ff4d4f;
}
.ant-form {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.66667;
list-style: none;
font-feature-settings: tnum, "tnum";
}
.ant-form legend {
display: block;
width: 100%;
margin-bottom: 20px;
padding: 0;
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
line-height: inherit;
border: 0;
border-bottom: 1px solid #d9d9d9;
}
.ant-form label {
font-size: 12px;
}
.ant-form input[type='search'] {
box-sizing: border-box;
}
.ant-form input[type='radio'],
.ant-form input[type='checkbox'] {
line-height: normal;
}
.ant-form input[type='file'] {
display: block;
}
.ant-form input[type='range'] {
display: block;
width: 100%;
}
.ant-form select[multiple],
.ant-form select[size] {
height: auto;
}
.ant-form input[type='file']:focus,
.ant-form input[type='radio']:focus,
.ant-form input[type='checkbox']:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.ant-form output {
display: block;
padding-top: 15px;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
line-height: 1.66667;
}
.ant-form .ant-form-text {
display: inline-block;
padding-right: 8px;
}
.ant-form-small .ant-form-item-label > label {
height: 22px;
}
.ant-form-small .ant-form-item-control-input {
min-height: 22px;
}
.ant-form-large .ant-form-item-label > label {
height: 32px;
}
.ant-form-large .ant-form-item-control-input {
min-height: 32px;
}
.ant-form-item {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.66667;
list-style: none;
font-feature-settings: tnum, "tnum";
margin-bottom: 16px;
vertical-align: top;
}
.ant-form-item-with-help {
transition: none;
}
.ant-form-item-hidden,
.ant-form-item-hidden.ant-row {
display: none;
}
.ant-form-item-label {
display: inline-block;
flex-grow: 0;
overflow: hidden;
white-space: nowrap;
text-align: right;
vertical-align: middle;
}
.ant-form-item-label-left {
text-align: left;
}
.ant-form-item-label-wrap {
overflow: visible;
overflow: initial;
line-height: 1.41667em;
white-space: inherit;
}
.ant-form-item-label > label {
position: relative;
display: inline-flex;
align-items: center;
max-width: 100%;
height: 28px;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
}
.ant-form-item-label > label > .anticon {
font-size: 12px;
vertical-align: top;
}
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
display: inline-block;
margin-right: 4px;
color: #ff4d4f;
font-size: 12px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
}
.ant-form-hide-required-mark .ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
display: none;
}
.ant-form-item-label > label .ant-form-item-optional {
display: inline-block;
margin-left: 0px;
color: rgba(0, 0, 0, 0.45);
}
.ant-form-hide-required-mark .ant-form-item-label > label .ant-form-item-optional {
display: none;
}
.ant-form-item-label > label .ant-form-item-tooltip {
color: rgba(0, 0, 0, 0.45);
cursor: help;
-webkit-writing-mode: horizontal-tb;
-ms-writing-mode: lr-tb;
writing-mode: horizontal-tb;
-webkit-margin-start: 0px;
margin-inline-start: 0px;
}
.ant-form-item-label > label::after {
content: ':';
position: relative;
top: -0.5px;
margin: 0 8px 0 2px;
}
.ant-form-item-label > label.ant-form-item-no-colon::after {
content: ' ';
}
.ant-form-item-control {
display: flex;
flex-direction: column;
flex-grow: 1;
}
.ant-form-item-control:first-child:not([class^='ant-col-']):not([class*=' ant-col-']) {
width: 100%;
}
.ant-form-item-control-input {
position: relative;
display: flex;
align-items: center;
min-height: 28px;
}
.ant-form-item-control-input-content {
flex: auto;
max-width: 100%;
}
.ant-form-item-explain,
.ant-form-item-extra {
clear: both;
color: rgba(0, 0, 0, 0.45);
font-size: 12px;
line-height: 1.66667;
transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.ant-form-item-explain-connected {
width: 100%;
}
.ant-form-item-extra {
min-height: 16px;
}
.ant-form-item-with-help .ant-form-item-explain {
height: auto;
opacity: 1;
}
.ant-form-item-feedback-icon {
font-size: 12px;
text-align: center;
visibility: visible;
animation: zoomIn 0.3s cubic-bezier(0.12, 0.4, 0.29, 1.46);
pointer-events: none;
}
.ant-form-item-feedback-icon-success {
color: #52c41a;
}
.ant-form-item-feedback-icon-error {
color: #ff4d4f;
}
.ant-form-item-feedback-icon-warning {
color: #faad14;
}
.ant-form-item-feedback-icon-validating {
color: #1890ff;
}
.ant-show-help {
transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.ant-show-help-appear,
.ant-show-help-enter {
opacity: 0;
}
.ant-show-help-appear-active,
.ant-show-help-enter-active {
opacity: 1;
}
.ant-show-help-leave {
opacity: 1;
}
.ant-show-help-leave-active {
opacity: 0;
}
.ant-show-help-item {
overflow: hidden;
transition: height 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}
.ant-show-help-item-appear,
.ant-show-help-item-enter {
transform: translateY(-5px);
opacity: 0;
}
.ant-show-help-item-appear-active,
.ant-show-help-item-enter-active {
transform: translateY(0);
opacity: 1;
}
.ant-show-help-item-leave {
transition: height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}
.ant-show-help-item-leave-active {
transform: translateY(-5px);
}
@keyframes diffZoomIn1 {
0% {
transform: scale(0);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
@keyframes diffZoomIn2 {
0% {
transform: scale(0);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
@keyframes diffZoomIn3 {
0% {
transform: scale(0);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.ant-form-rtl {
direction: rtl;
}
.ant-form-rtl .ant-form-item-label {
text-align: left;
}
.ant-form-rtl .ant-form-item-label > label.ant-form-item-required::before {
margin-right: 0;
margin-left: 4px;
}
.ant-form-rtl .ant-form-item-label > label::after {
margin: 0 2px 0 8px;
}
.ant-form-rtl .ant-form-item-label > label .ant-form-item-optional {
margin-right: 0px;
margin-left: 0;
}
.ant-col-rtl .ant-form-item-control:first-child {
width: 100%;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-input {
padding-right: 7px;
padding-left: 24px;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input-suffix {
padding-right: 7px;
padding-left: 18px;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input {
padding: 0;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-input-number-affix-wrapper .ant-input-number {
padding: 0;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix {
right: auto;
left: 28px;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-input-number {
padding-left: 18px;
}
.ant-form-rtl .ant-form-item-has-feedback > .ant-select .ant-select-arrow,
.ant-form-rtl .ant-form-item-has-feedback > .ant-select .ant-select-clear,
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-arrow,
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-clear,
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon) > .ant-select .ant-select-arrow,
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon) > .ant-select .ant-select-clear {
right: auto;
left: 32px;
}
.ant-form-rtl .ant-form-item-has-feedback > .ant-select .ant-select-selection-selected-value,
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection-selected-value,
.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon) > .ant-select .ant-select-selection-selected-value {
padding-right: 0;
padding-left: 42px;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-cascader-picker-arrow {
margin-right: 0;
margin-left: 19px;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-cascader-picker-clear {
right: auto;
left: 32px;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-picker {
padding-right: 7px;
padding-left: 22.6px;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-picker-large {
padding-right: 11px;
padding-left: 26.6px;
}
.ant-form-rtl .ant-form-item-has-feedback .ant-picker-small {
padding-right: 7px;
padding-left: 22.6px;
}
.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-success .ant-form-item-children-icon,
.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-warning .ant-form-item-children-icon,
.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-error .ant-form-item-children-icon,
.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-is-validating .ant-form-item-children-icon {
right: auto;
left: 0;
}
.ant-form-rtl.ant-form-inline .ant-form-item {
margin-right: 0;
margin-left: 16px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/User/PopLoginRegister/components/LoginPanel/index.less ***!
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@ -1237,362 +648,6 @@
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./node_modules/antd/es/radio/style/index.less ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
.ant-radio-group {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.66667;
list-style: none;
font-feature-settings: tnum, "tnum";
display: inline-block;
font-size: 0;
}
.ant-radio-group .ant-badge-count {
z-index: 1;
}
.ant-radio-group > .ant-badge:not(:first-child) > .ant-radio-button-wrapper {
border-left: none;
}
.ant-radio-wrapper {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.66667;
list-style: none;
font-feature-settings: tnum, "tnum";
position: relative;
display: inline-flex;
align-items: baseline;
margin-right: 6px;
cursor: pointer;
}
.ant-radio-wrapper-disabled {
cursor: not-allowed;
}
.ant-radio-wrapper::after {
display: inline-block;
width: 0;
overflow: hidden;
content: '\a0';
}
.ant-radio-wrapper.ant-radio-wrapper-in-form-item input[type='radio'] {
width: 14px;
height: 14px;
}
.ant-radio {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.66667;
list-style: none;
font-feature-settings: tnum, "tnum";
position: relative;
top: 0.2em;
display: inline-block;
outline: none;
cursor: pointer;
}
.ant-radio-wrapper:hover .ant-radio,
.ant-radio:hover .ant-radio-inner,
.ant-radio-input:focus + .ant-radio-inner {
border-color: #1890ff;
}
.ant-radio-input:focus + .ant-radio-inner {
box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.12);
}
.ant-radio-checked::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 1px solid #1890ff;
border-radius: 50%;
visibility: hidden;
animation: antRadioEffect 0.36s ease-in-out;
animation-fill-mode: both;
content: '';
}
.ant-radio:hover::after,
.ant-radio-wrapper:hover .ant-radio::after {
visibility: visible;
}
.ant-radio-inner {
position: relative;
top: 0;
left: 0;
display: block;
width: 14px;
height: 14px;
background-color: #fff;
border-color: #d9d9d9;
border-style: solid;
border-width: 1px;
border-radius: 50%;
transition: all 0.3s;
}
.ant-radio-inner::after {
position: absolute;
top: 50%;
left: 50%;
display: block;
width: 14px;
height: 14px;
margin-top: -7px;
margin-left: -7px;
background-color: #1890ff;
border-top: 0;
border-left: 0;
border-radius: 14px;
transform: scale(0);
opacity: 0;
transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
content: ' ';
}
.ant-radio-input {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
cursor: pointer;
opacity: 0;
}
.ant-radio.ant-radio-disabled .ant-radio-inner {
border-color: #d9d9d9;
}
.ant-radio-checked .ant-radio-inner {
border-color: #1890ff;
}
.ant-radio-checked .ant-radio-inner::after {
transform: scale(0.42857143);
opacity: 1;
transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
}
.ant-radio-disabled {
cursor: not-allowed;
}
.ant-radio-disabled .ant-radio-inner {
background-color: #f5f5f5;
cursor: not-allowed;
}
.ant-radio-disabled .ant-radio-inner::after {
background-color: rgba(0, 0, 0, 0.2);
}
.ant-radio-disabled .ant-radio-input {
cursor: not-allowed;
}
.ant-radio-disabled + span {
color: rgba(0, 0, 0, 0.25);
cursor: not-allowed;
}
span.ant-radio + * {
padding-right: 8px;
padding-left: 8px;
}
.ant-radio-button-wrapper {
position: relative;
display: inline-block;
height: 28px;
margin: 0;
padding: 0 7px;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
line-height: 26px;
background: #fff;
border: 1px solid #d9d9d9;
border-top-width: 1.02px;
border-left-width: 0;
cursor: pointer;
transition: color 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.ant-radio-button-wrapper a {
color: rgba(0, 0, 0, 0.85);
}
.ant-radio-button-wrapper > .ant-radio-button {
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
}
.ant-radio-group-large .ant-radio-button-wrapper {
height: 32px;
font-size: 14px;
line-height: 30px;
}
.ant-radio-group-small .ant-radio-button-wrapper {
height: 22px;
padding: 0 7px;
line-height: 20px;
}
.ant-radio-button-wrapper:not(:first-child)::before {
position: absolute;
top: -1px;
left: -1px;
display: block;
box-sizing: content-box;
width: 1px;
height: 100%;
padding: 1px 0;
background-color: #d9d9d9;
transition: background-color 0.3s;
content: '';
}
.ant-radio-button-wrapper:first-child {
border-left: 1px solid #d9d9d9;
border-radius: 2px 0 0 2px;
}
.ant-radio-button-wrapper:last-child {
border-radius: 0 2px 2px 0;
}
.ant-radio-button-wrapper:first-child:last-child {
border-radius: 2px;
}
.ant-radio-button-wrapper:hover {
position: relative;
color: #1890ff;
}
.ant-radio-button-wrapper:focus-within {
box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.12);
}
.ant-radio-button-wrapper .ant-radio-inner,
.ant-radio-button-wrapper input[type='checkbox'],
.ant-radio-button-wrapper input[type='radio'] {
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
z-index: 1;
color: #1890ff;
background: #fff;
border-color: #1890ff;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before {
background-color: #1890ff;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):first-child {
border-color: #1890ff;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover {
color: #40a9ff;
border-color: #40a9ff;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover::before {
background-color: #40a9ff;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active {
color: #096dd9;
border-color: #096dd9;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active::before {
background-color: #096dd9;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {
box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.12);
}
.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
color: #fff;
background: #1890ff;
border-color: #1890ff;
}
.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover {
color: #fff;
background: #40a9ff;
border-color: #40a9ff;
}
.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active {
color: #fff;
background: #096dd9;
border-color: #096dd9;
}
.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {
box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.12);
}
.ant-radio-button-wrapper-disabled {
color: rgba(0, 0, 0, 0.25);
background-color: #f5f5f5;
border-color: #d9d9d9;
cursor: not-allowed;
}
.ant-radio-button-wrapper-disabled:first-child,
.ant-radio-button-wrapper-disabled:hover {
color: rgba(0, 0, 0, 0.25);
background-color: #f5f5f5;
border-color: #d9d9d9;
}
.ant-radio-button-wrapper-disabled:first-child {
border-left-color: #d9d9d9;
}
.ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked {
color: rgba(0, 0, 0, 0.25);
background-color: #e6e6e6;
border-color: #d9d9d9;
box-shadow: none;
}
@keyframes antRadioEffect {
0% {
transform: scale(1);
opacity: 0.5;
}
100% {
transform: scale(1.6);
opacity: 0;
}
}
.ant-radio-group.ant-radio-group-rtl {
direction: rtl;
}
.ant-radio-wrapper.ant-radio-wrapper-rtl {
margin-right: 0;
margin-left: 6px;
direction: rtl;
}
.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl {
border-right-width: 0;
border-left-width: 1px;
}
.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:not(:first-child)::before {
right: -1px;
left: 0;
}
.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:first-child {
border-right: 1px solid #d9d9d9;
border-radius: 0 2px 2px 0;
}
.ant-radio-button-wrapper-checked:not([class*=' ant-radio-button-wrapper-disabled']).ant-radio-button-wrapper:first-child {
border-right-color: #40a9ff;
}
.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:last-child {
border-radius: 2px 0 0 2px;
}
.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper-disabled:first-child {
border-right-color: #d9d9d9;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/AuthModal/index.less?modules ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

@ -836,6 +836,7 @@ var Page = function Page(_ref) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(TopPlanBanner, {}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "bg-white",
wrap: false,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(LeftPlanMenus, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(Content, {
style: {
flex: 1,

@ -1509,7 +1509,8 @@
box-orient: block-axis;
}
.menuWrap___oMbDo {
width: 260px;
flex-basis: 260px;
flex-shrink: 0;
border-right: 1px solid #dbdce0;
background-color: #fff;
min-height: 80vh;

@ -112,7 +112,7 @@ var _excluded = ["user", "account", "globalSetting", "loading", "dispatch"];
var Dragger = upload/* default.Dragger */.Z.Dragger;
var MAX_NAME_LENGTH = 10;
var MAX_NAME_LENGTH = 20;
var RealNameAuthModal = function RealNameAuthModal(_ref) {
var _globalSetting$settin;
var user = _ref.user,

@ -178,7 +178,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -265,7 +266,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;

File diff suppressed because one or more lines are too long

@ -1081,6 +1081,42 @@ span.CodeMirror-selectedtext {
font-size: 14px;
margin-right: 4px;
}
.list___KhJas .row___GGtIx .annotation___KVSwj {
display: flex;
align-items: center;
font-size: 14px;
color: #A77F1E;
margin-left: 20px;
cursor: pointer;
}
.list___KhJas .row___GGtIx .annotation___KVSwj i {
font-size: 14px;
margin-right: 4px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/ImageDimensions/index.less?modules ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.imageDimensions___a7crR {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 4;
background: rgba(0, 0, 0, 0.5);
}
.imageDimensions___a7crR .img___Kroat {
visibility: hidden;
max-width: 80%;
min-width: 500px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */

@ -156,6 +156,10 @@ var input_number = __webpack_require__(87799);
var button_style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/style/index.js + 1 modules
var spin_style = __webpack_require__(22536);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js
var spin = __webpack_require__(11382);
// EXTERNAL MODULE: ./node_modules/antd/es/divider/style/index.js + 1 modules
var divider_style = __webpack_require__(98541);
// EXTERNAL MODULE: ./node_modules/antd/es/divider/index.js
@ -219,8 +223,8 @@ var moment = __webpack_require__(30381);
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./src/components/FileDownloadList/index.tsx + 1 modules
var FileDownloadList = __webpack_require__(15265);
// EXTERNAL MODULE: ./src/components/FileDownloadList/index.tsx + 3 modules
var FileDownloadList = __webpack_require__(64683);
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
var service_shixunHomeworks = __webpack_require__(45678);
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js + 1 modules
@ -517,11 +521,13 @@ var ImagesIcon = __webpack_require__(44190);
var ExeriseReview = function ExeriseReview(_ref) {
var _studentWorkDetail$ca, _studentWorkDetail$ca2, _userInfo$course, _studentWorkDetail$ca3, _studentWorkDetail$ca4, _studentWorkDetail$ca5, _studentWorkDetail$ho, _studentWorkDetail$re, _studentWorkSupplyDet, _studentWorkDetail$no, _studentWorkDetail$co, _studentWorkDetail$ho2, _studentWorkCommon$co, _studentWorkDetail$ho3, _studentWorkDetail$ho4, _studentWorkDetail$ho5, _studentWorkDetail$ho6, _studentWorkDetail$ho7, _studentWorkDetail$ho8, _studentWorkCommon$co2;
var _studentWorkDetail$ca, _studentWorkDetail$ca2, _userInfo$course, _studentWorkDetail$ca3, _studentWorkDetail$ca4, _studentWorkDetail$ca5, _studentWorkDetail$ho, _studentWorkDetail$no, _studentWorkDetail$co, _studentWorkDetail$ho2, _studentWorkDetail$ho3, _studentWorkDetail$ho4, _studentWorkDetail$ho5, _studentWorkDetail$ho6, _studentWorkDetail$ho7, _studentWorkDetail$ho8, _studentWorkCommon$co, _studentWorkCommon$co2, _studentWorkCommon$hi, _studentWorkCommon$hi2;
var shixunHomeworks = _ref.shixunHomeworks,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
@ -612,24 +618,24 @@ var ExeriseReview = function ExeriseReview(_ref) {
return _getDatas.apply(this, arguments);
}
function _getDatas() {
_getDatas = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
_getDatas = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee16() {
var _res$all_student_work, _res$all_student_work2;
var paylaod, data, res, key, _res$all_student_work3, _res$all_student_work4;
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
return regeneratorRuntime_default()().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
paylaod = JSON.parse(sessionStorage['all_student_works_params'] || '{}');
data = {};
if (searchParams.get("ids")) {
data.course_group = searchParams.get("ids").split(',');
}
_context11.next = 5;
_context16.next = 5;
return dispatch({
type: 'shixunHomeworks/getAllStudentWorks',
payload: objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, params), paylaod), data)
});
case 5:
res = _context11.sent;
res = _context16.sent;
// setSpinning(false);
key = (_res$all_student_work = res['all_student_works']) === null || _res$all_student_work === void 0 ? void 0 : _res$all_student_work.map(function (item) {
return String(item.student_work_id);
@ -650,9 +656,9 @@ var ExeriseReview = function ExeriseReview(_ref) {
}
case 9:
case "end":
return _context11.stop();
return _context16.stop();
}
}, _callee11);
}, _callee16);
}));
return _getDatas.apply(this, arguments);
}
@ -918,134 +924,123 @@ var ExeriseReview = function ExeriseReview(_ref) {
children: [' ', "\u5B9E\u9A8C\u62A5\u544A", ' ']
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
}), /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
className: [Reviewmodules.bg, 'pt30', 'pl30', 'pr30', 'pb30'].join(' '),
children: [(studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.description) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u5185\u5BB9"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.description) || '暂无~'
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FileDownloadList/* default */.Z, {
dataSource: studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.attachments
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " c-light-black",
children: moment_default()(studentWorkDetail.commit_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.commit_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkDetail.update_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.update_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
spinning: loading['shixunHomeworks/getStudentWorkDetail'] || loading['shixunHomeworks/getStudentWorkSupplyDetail'],
children: [(studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.description) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u5185\u5BB9"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.description) || '暂无~'
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FileDownloadList/* default */.Z, {
authority: (0,authority/* isAdmin */.GJ)(),
callback: function callback() {
dispatch({
type: 'shixunHomeworks/getStudentWorkDetail',
payload: objectSpread2_default()({}, params)
});
},
dataSource: studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.attachments
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " c-light-black",
children: moment_default()(studentWorkDetail.commit_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.commit_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkDetail.update_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.update_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
})]
})]
})]
}), (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_description) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u91CD\u505A\u8BB0\u5F55"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30 mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_description) || '暂无~'
})
}), studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$re = studentWorkDetail.redo_attachments) === null || _studentWorkDetail$re === void 0 ? void 0 : _studentWorkDetail$re.map(function (item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
href: "".concat(env/* default.API_SERVER */.Z.API_SERVER).concat(item.url),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-fujian c-green font14"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-black",
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml20 font12",
children: item.filesize
})]
}), (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_description) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u91CD\u505A\u8BB0\u5F55"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30 mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_description) || '暂无~'
})
}, key);
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " c-light-black",
children: moment_default()(studentWorkDetail.redo_commit_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.commit_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkDetail.redo_update_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.update_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FileDownloadList/* default */.Z, {
authority: (0,authority/* isAdmin */.GJ)(),
callback: function callback() {
dispatch({
type: 'shixunHomeworks/getStudentWorkDetail',
payload: objectSpread2_default()({}, params)
});
},
dataSource: studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_attachments
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " c-light-black",
children: moment_default()(studentWorkDetail.redo_commit_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.commit_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkDetail.redo_update_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.update_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
})]
})]
})]
}), (studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_reason) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u8865\u4EA4\u5185\u5BB9"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30 mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_reason) || '暂无~'
})
}), studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : (_studentWorkSupplyDet = studentWorkSupplyDetail.revise_attachments) === null || _studentWorkSupplyDet === void 0 ? void 0 : _studentWorkSupplyDet.map(function (item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
onClick: function onClick(e) {
e.preventDefault();
setData({
type: item.file_type,
content: env/* default.API_SERVER */.Z.API_SERVER + item.url
});
},
href: "".concat(env/* default.API_SERVER */.Z.API_SERVER).concat(item.url),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-fujian c-green font14"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-black",
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml20 font12",
children: item.filesize
})]
}), (studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_reason) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u8865\u4EA4\u5185\u5BB9"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30 mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_reason) || '暂无~'
})
}, key);
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkSupplyDetail.atta_update_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkSupplyDetail.atta_update_user
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FileDownloadList/* default */.Z, {
authority: (0,authority/* isAdmin */.GJ)(),
callback: function callback() {
dispatch({
type: 'shixunHomeworks/getStudentWorkSupplyDetail',
payload: objectSpread2_default()({}, params)
});
},
dataSource: studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_attachments
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkSupplyDetail.atta_update_time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkSupplyDetail.atta_update_user
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
})]
})]
})]
})]
})
}), (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.anonymous_comment) && (0,authority/* isAdminOrTeacher */.G5)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: [Reviewmodules.bg, 'mt30', 'pt30', 'pl30', 'pr30', 'pb30'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
@ -1055,17 +1050,13 @@ var ExeriseReview = function ExeriseReview(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u5DF2\u5B8C\u6210\u533F\u8BC4\uFF1A", (_studentWorkDetail$co = studentWorkDetail.commented_user_names) === null || _studentWorkDetail$co === void 0 ? void 0 : _studentWorkDetail$co.join('、')]
})]
}), ((0,authority/* isAdminOrStudent */.RV)() || (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$ho2 = studentWorkDetail.homework_status) === null || _studentWorkDetail$ho2 === void 0 ? void 0 : _studentWorkDetail$ho2.includes('匿评中'))) && /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
}), ((0,authority/* isAdminOrStudent */.RV)() || (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$ho2 = studentWorkDetail.homework_status) === null || _studentWorkDetail$ho2 === void 0 ? void 0 : _studentWorkDetail$ho2.includes('匿评中'))) && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: [Reviewmodules.replyList, 'bg-white'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
gutter: [10, 20],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: 1,
children: !!(studentWorkCommon !== null && studentWorkCommon !== void 0 && (_studentWorkCommon$co = studentWorkCommon.comment_scores) !== null && _studentWorkCommon$co !== void 0 && _studentWorkCommon$co.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "font-16",
children: ["\u5168\u90E8\u8BC4\u9605(", studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : studentWorkCommon.comment_count, ")"]
})
flex: 1
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
lineHeight: '40px'
@ -1110,9 +1101,10 @@ var ExeriseReview = function ExeriseReview(_ref) {
name: "comment",
rules: [{
required: true,
message: '请填写评语'
message: '请输入评语'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u8BED",
defaultValue: "",
height: 250
})
@ -1156,6 +1148,17 @@ var ExeriseReview = function ExeriseReview(_ref) {
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {})]
})
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1",
name: "hidden_comment",
style: {
marginTop: 10
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u8BED",
defaultValue: "",
height: 250
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: "".concat(Reviewmodules.buttonFixed),
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
@ -1204,7 +1207,16 @@ var ExeriseReview = function ExeriseReview(_ref) {
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), ((0,authority/* isAdminOrStudent */.RV)() || (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$ho7 = studentWorkDetail.homework_status) === null || _studentWorkDetail$ho7 === void 0 ? void 0 : _studentWorkDetail$ho7.includes('匿评中')) || (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$ho8 = studentWorkDetail.homework_status) === null || _studentWorkDetail$ho8 === void 0 ? void 0 : _studentWorkDetail$ho8.includes('申诉中'))) && (studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$co2 = studentWorkCommon.comment_scores) === null || _studentWorkCommon$co2 === void 0 ? void 0 : _studentWorkCommon$co2.map(function (v, k) {
})]
}), ((0,authority/* isAdminOrStudent */.RV)() || (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$ho7 = studentWorkDetail.homework_status) === null || _studentWorkDetail$ho7 === void 0 ? void 0 : _studentWorkDetail$ho7.includes('匿评中')) || (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$ho8 = studentWorkDetail.homework_status) === null || _studentWorkDetail$ho8 === void 0 ? void 0 : _studentWorkDetail$ho8.includes('申诉中'))) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: [Reviewmodules.replyList, 'bg-white'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
color: '#000000',
fontWeight: 500
},
children: ["\u70B9\u8BC4\u5185\u5BB9\uFF08", studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$co = studentWorkCommon.comment_scores) === null || _studentWorkCommon$co === void 0 ? void 0 : _studentWorkCommon$co.length, "\uFF09"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$co2 = studentWorkCommon.comment_scores) === null || _studentWorkCommon$co2 === void 0 ? void 0 : _studentWorkCommon$co2.map(function (v, k) {
var _v$attachments, _v$appeal_info, _v$appeal_info2, _v$appeal_info3, _v$appeal_info4, _v$appeal_info5;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
@ -1626,8 +1638,439 @@ var ExeriseReview = function ExeriseReview(_ref) {
})]
}, k), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {})]
}, k);
}))]
})
})]
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: [Reviewmodules.replyList, 'bg-white'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
color: '#000000',
fontWeight: 500
},
children: ["\u70B9\u8BC4\u5185\u5BB9-\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1\uFF08", studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$hi = studentWorkCommon.hidden_comment_scores) === null || _studentWorkCommon$hi === void 0 ? void 0 : _studentWorkCommon$hi.length, "\uFF09"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$hi2 = studentWorkCommon.hidden_comment_scores) === null || _studentWorkCommon$hi2 === void 0 ? void 0 : _studentWorkCommon$hi2.map(function (v, k) {
var _v$attachments2, _v$appeal_info6, _v$appeal_info7, _v$appeal_info8, _v$appeal_info9, _v$appeal_info10;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
gutter: [12, 12],
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "40px",
children: [(v === null || v === void 0 ? void 0 : v.user_image_url) === '--' && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reviewmodules.headpic,
width: "40",
src: ImagesIcon/* anonyIcon */.xp
}), (v === null || v === void 0 ? void 0 : v.user_image_url) !== '--' && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reviewmodules.headpic,
width: "40",
src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(v === null || v === void 0 ? void 0 : v.user_image_url)
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "1",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: 1,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black",
children: v === null || v === void 0 ? void 0 : v.user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml10",
children: moment_default()(v === null || v === void 0 ? void 0 : v.comment_time).format('YYYY-MM-DD HH:mm')
}), v.score !== null && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "ml30 c-orange",
children: [v.score, "\u5206"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: k === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [v["delete"] && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current",
onClick: function onClick() {
handleDeleteScore(v);
},
children: "\u5220\u9664"
}), v.can_appeal && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current",
onClick: function onClick() {
setShowApply({
show: true,
type: 1,
active: k
});
},
children: "\u7533\u8BC9"
}), v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current ml10",
onClick: function onClick() {
return setShowApply({
show: true,
type: 0,
active: k
});
},
children: "\u56DE\u590D"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [v["delete"] && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current",
onClick: function onClick() {
handleDeleteScore(v);
},
children: "\u5220\u9664"
}), v.can_appeal && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current",
onClick: function onClick() {
setShowApply({
show: true,
type: 1,
active: k
});
},
children: "\u7533\u8BC9"
}), v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current ml10",
onClick: function onClick() {
return setShowApply({
show: true,
type: 0,
active: k
});
},
children: "\u56DE\u590D"
}), !v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml10",
children: "\u5931\u6548"
})]
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
span: 24,
children: [v.hidden_comment && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: v.hidden_comment
}), !v.hidden_comment && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black",
children: "\u6682\u672A\u5199\u8BC4\u8BED"
}), v === null || v === void 0 ? void 0 : (_v$attachments2 = v.attachments) === null || _v$attachments2 === void 0 ? void 0 : _v$attachments2.map(function (item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
href: "".concat(env/* default.API_SERVER */.Z.API_SERVER).concat(item.url),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-fujian c-green font14"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-black",
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml20 font12",
children: item.filesize
})]
})
}, key);
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "w100",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: [Reviewmodules.comment, 'w100'].join(' '),
children: [v.appeal_info && v.appeal_info != '' && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "50px",
children: [(v === null || v === void 0 ? void 0 : (_v$appeal_info6 = v.appeal_info) === null || _v$appeal_info6 === void 0 ? void 0 : _v$appeal_info6.user_image_url) === '--' && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reviewmodules.headpic,
width: "40",
src: ImagesIcon/* anonyIcon */.xp
}), (v === null || v === void 0 ? void 0 : (_v$appeal_info7 = v.appeal_info) === null || _v$appeal_info7 === void 0 ? void 0 : _v$appeal_info7.user_image_url) !== '--' && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reviewmodules.headpic,
width: "40",
src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(v === null || v === void 0 ? void 0 : (_v$appeal_info8 = v.appeal_info) === null || _v$appeal_info8 === void 0 ? void 0 : _v$appeal_info8.user_image_url)
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "1",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "1",
children: [v === null || v === void 0 ? void 0 : (_v$appeal_info9 = v.appeal_info) === null || _v$appeal_info9 === void 0 ? void 0 : _v$appeal_info9.user_name, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml10",
children: moment_default()(v === null || v === void 0 ? void 0 : (_v$appeal_info10 = v.appeal_info) === null || _v$appeal_info10 === void 0 ? void 0 : _v$appeal_info10.time).format('YYYY-MM-DD HH:mm')
}), (v === null || v === void 0 ? void 0 : v.appeal_status) === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "tag-style bg-blue ml10",
children: "\u7533\u8BC9\u4E2D"
}), (v === null || v === void 0 ? void 0 : v.appeal_status) === 2 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "tag-style bg-grey-ede c-light-black ml10",
children: "\u7533\u8BC9\u5DF2\u64A4\u9500"
}), (v === null || v === void 0 ? void 0 : v.appeal_status) === 3 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "tag-style bg-blue ml10",
children: "\u7533\u8BC9\u6210\u529F"
}), (v === null || v === void 0 ? void 0 : v.appeal_status) === 4 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "tag-style bg-grey-ede c-light-black ml10",
children: "\u7533\u8BC9\u88AB\u62D2\u7EDD"
}), (v === null || v === void 0 ? void 0 : v.appeal_status) === 5 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "tag-style bg-grey-ede c-light-black ml10",
children: "\u7533\u8BC9\u5931\u8D25"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
children: [(v === null || v === void 0 ? void 0 : v.appeal_status) === 1 && v.can_appeal && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
es_modal/* default.confirm */.Z.confirm({
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u64A4\u9500\u7533\u8BC9\u540E\uFF0C\u65E0\u6CD5\u518D\u5BF9\u672C\u8BC4\u9605\u8BB0\u5F55\u8FDB\u884C\u7533\u8BC9", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u662F\u5426\u786E\u8BA4\u64A4\u9500\u7533\u8BC9"]
}),
onOk: function () {
var _onOk6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
getData();
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
function onOk() {
return _onOk6.apply(this, arguments);
}
return onOk;
}()
});
},
className: "c-blue current",
children: "\u64A4\u9500\u7533\u8BC9"
}), (v === null || v === void 0 ? void 0 : v.appeal_status) === 1 && (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
es_modal/* default.confirm */.Z.confirm({
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u6B64\u533F\u8BC4\u6210\u7EE9\u5C06\u88AB\u5E9F\u5F03\uFF0C\u8BC4\u9605\u4EBA\u7684\u4F5C\u54C1\u5C06\u88AB\u8FDD\u89C4\u6263\u5206", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u662F\u5426\u786E\u8BA4\u63A5\u53D7\u7533\u8BC9"]
}),
onOk: function () {
var _onOk7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
var res;
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.userId, "/deal_appeal_score.json"), {
method: 'post',
body: {
score_id: v.score_id,
status: 3
}
});
case 2:
res = _context11.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
getData();
}
case 4:
case "end":
return _context11.stop();
}
}, _callee11);
}));
function onOk() {
return _onOk7.apply(this, arguments);
}
return onOk;
}()
});
},
className: "c-red current",
children: "\u63A5\u53D7\u7533\u8BC9"
}), (v === null || v === void 0 ? void 0 : v.appeal_status) === 1 && (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
es_modal/* default.confirm */.Z.confirm({
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u6B64\u533F\u8BC4\u6210\u7EE9\u5C06\u88AB\u8BA4\u4E3A\u5408\u7406", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u7533\u8BC9"]
}),
onOk: function () {
var _onOk8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12() {
var res;
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.userId, "/deal_appeal_score.json"), {
method: 'post',
body: {
score_id: v.score_id,
status: 4
}
});
case 2:
res = _context12.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
getData();
}
case 4:
case "end":
return _context12.stop();
}
}, _callee12);
}));
function onOk() {
return _onOk8.apply(this, arguments);
}
return onOk;
}()
});
},
className: "c-light-black current ml10",
children: "\u62D2\u7EDD\u7533\u8BC9"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: v === null || v === void 0 ? void 0 : v.appeal_info.content
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {})]
})
})
})
}), v.journals.map(function (val, key) {
var _val$user_info5, _val$user_info6, _val$user_info7, _val$user_info8;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "50px",
children: [(val === null || val === void 0 ? void 0 : (_val$user_info5 = val.user_info) === null || _val$user_info5 === void 0 ? void 0 : _val$user_info5.user_image_url) === '--' && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reviewmodules.headpic,
width: "40",
src: ImagesIcon/* anonyIcon */.xp
}), (val === null || val === void 0 ? void 0 : (_val$user_info6 = val.user_info) === null || _val$user_info6 === void 0 ? void 0 : _val$user_info6.user_image_url) !== '--' && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reviewmodules.headpic,
width: "40",
src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(val === null || val === void 0 ? void 0 : (_val$user_info7 = val.user_info) === null || _val$user_info7 === void 0 ? void 0 : _val$user_info7.user_image_url)
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "1",
children: [val === null || val === void 0 ? void 0 : (_val$user_info8 = val.user_info) === null || _val$user_info8 === void 0 ? void 0 : _val$user_info8.user_name, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml10",
children: moment_default()(val === null || val === void 0 ? void 0 : val.time).format('YYYY-MM-DD HH:mm')
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: val.hidden_comment
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: (val === null || val === void 0 ? void 0 : val.can_delete) && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5220\u9664",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {
className: "current c-light-black",
onClick: function onClick() {
handleDelete(val);
}
})
})
})]
})
})
}, key), key !== v.journals.length - 1 && /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {})]
}, key);
})]
})]
})]
}), showApply.show && k === showApply.active && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: ['bg-white'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
onChange: function onChange(v) {
setValue(v);
},
height: 150,
isFocus: true,
watch: true
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
span: 24,
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
type: "default",
size: "large",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() {
return regeneratorRuntime_default()().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
setShowApply({
show: false,
type: 0,
active: k
});
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
})),
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
type: "primary",
size: "large",
className: "ml20",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
var res;
return regeneratorRuntime_default()().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
if (!(value === '')) {
_context14.next = 4;
break;
}
message/* default.error */.ZP.error('请输入内容');
_context14.next = 14;
break;
case 4:
if (!(showApply.type === 0)) {
_context14.next = 10;
break;
}
_context14.next = 7;
return (0,service_shixunHomeworks/* addStudentWorkScoreCommit */.qP)({
hidden_comment: value,
userId: params.userId,
score_id: v.score_id
});
case 7:
res = _context14.sent;
_context14.next = 13;
break;
case 10:
_context14.next = 12;
return (0,service_shixunHomeworks/* appealAnonymousScore */.R$)({
comment: value,
score_id: v.score_id,
userId: params.userId
});
case 12:
res = _context14.sent;
case 13:
if (res.status === 0) {
message/* default.success */.ZP.success('操作成功');
setShowApply({
show: false,
type: 0,
active: k
});
getData();
}
case 14:
case "end":
return _context14.stop();
}
}, _callee14);
})),
children: showApply.type === 0 ? '回复' : '申诉'
})]
})
})]
})]
})]
}, k), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {})]
}, k);
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ChangeScore, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(AfterAppendix, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(image_preview/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
title: "\u786E\u8BA4\u6253\u56DE\u91CD\u505A",
open: isshow,
@ -1636,19 +2079,19 @@ var ExeriseReview = function ExeriseReview(_ref) {
onCancel: function onCancel() {
setisshow(false);
},
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15() {
var res;
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
return regeneratorRuntime_default()().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
if (comment) {
_context10.next = 3;
_context15.next = 3;
break;
}
message/* default.info */.ZP.info('评语不能为空');
return _context10.abrupt("return");
return _context15.abrupt("return");
case 3:
_context10.next = 5;
_context15.next = 5;
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.userId, "/redo_modal.json"), {
method: 'post',
body: {
@ -1657,7 +2100,7 @@ var ExeriseReview = function ExeriseReview(_ref) {
}
});
case 5:
res = _context10.sent;
res = _context15.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
message/* default.info */.ZP.info('打回重做成功');
setisshow(false);
@ -1665,9 +2108,9 @@ var ExeriseReview = function ExeriseReview(_ref) {
}
case 7:
case "end":
return _context10.stop();
return _context15.stop();
}
}, _callee10);
}, _callee15);
})),
width: 700,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -1726,11 +2169,11 @@ var ExeriseReview = function ExeriseReview(_ref) {
})]
});
};
/* harmony default export */ var Review = ((0,_umi_production_exports.connect)(function (_ref7) {
var shixunHomeworks = _ref7.shixunHomeworks,
loading = _ref7.loading,
user = _ref7.user,
globalSetting = _ref7.globalSetting;
/* harmony default export */ var Review = ((0,_umi_production_exports.connect)(function (_ref9) {
var shixunHomeworks = _ref9.shixunHomeworks,
loading = _ref9.loading,
user = _ref9.user,
globalSetting = _ref9.globalSetting;
return {
shixunHomeworks: shixunHomeworks,
globalSetting: globalSetting,

@ -348,6 +348,42 @@ li:last-child > .ant-breadcrumb-separator {
font-size: 14px;
margin-right: 4px;
}
.list___KhJas .row___GGtIx .annotation___KVSwj {
display: flex;
align-items: center;
font-size: 14px;
color: #A77F1E;
margin-left: 20px;
cursor: pointer;
}
.list___KhJas .row___GGtIx .annotation___KVSwj i {
font-size: 14px;
margin-right: 4px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/ImageDimensions/index.less?modules ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.imageDimensions___a7crR {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 4;
background: rgba(0, 0, 0, 0.5);
}
.imageDimensions___a7crR .img___Kroat {
visibility: hidden;
max-width: 80%;
min-width: 500px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -3498,10 +3498,10 @@ span.CodeMirror-selectedtext {
}
.unlockKeyWrapper___UOERJ {
margin-top: 15px;
padding-left: 28px;
padding-left: 24px;
}
.unlockKeyWrapper___UOERJ .unlockKeyInput___ItI9I {
width: 84px;
width: 144px;
}
.mb40___eMjps {
margin-bottom: 40px;
@ -3642,6 +3642,254 @@ span.CodeMirror-selectedtext {
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Classrooms/Lists/Exercise/Detail/components/ExamMonitoring/index.less?modules ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.flex_box_center___Mm5wp {
justify-content: center;
align-items: center;
-webkit-justify-content: center;
box-align: center;
}
.flex_space_between___Xglxr {
justify-content: space-between;
-webkit-box-pack: justify;
}
.flex_box_vertical_center___oLvCy {
align-items: center;
box-align: center;
}
.flex_box_center_end___IEhG2 {
justify-content: flex-end;
align-items: center;
-webkit-justify-content: flex-end;
-webkit-align-items: center;
-webkit-box-align: center;
-webkit-box-pack: end;
box-align: center;
box-pack: end;
}
.flex_box_column___TStIz {
flex-direction: column;
box-orient: block-axis;
}
.wrap___WfgpQ {
padding: 20px 0;
}
.wrap___WfgpQ .control___Uvc1U {
display: flex;
align-items: center;
padding: 20px 0;
background: #ffffff;
}
.wrap___WfgpQ .control___Uvc1U .ant-select {
width: 200px;
margin-right: 20px;
}
.wrap___WfgpQ .control___Uvc1U .ant-select .ant-select-selector {
height: 34px !important;
background-color: #f5f5f5;
border: 0;
padding: 0 10px;
}
.wrap___WfgpQ .control___Uvc1U .ant-select .ant-select-selection-item,
.wrap___WfgpQ .control___Uvc1U .ant-select .ant-select-selection-placeholder {
line-height: 34px !important;
}
.wrap___WfgpQ .control___Uvc1U .ant-input-search {
border: 0;
background: #f5f5f5;
height: 34px;
width: 260px;
margin-right: 30px;
}
.wrap___WfgpQ .control___Uvc1U .ant-input-search input {
background: #f5f5f5;
color: #333;
}
.wrap___WfgpQ .control___Uvc1U .ant-input-search .ant-input-search-icon::before {
border-left: 1px solid transparent;
}
.wrap___WfgpQ .control___Uvc1U .btn___gckHk {
width: 90px;
height: 26px;
line-height: 26px;
background: #0152d9;
border-radius: 4px;
text-align: center;
font-size: 12px;
color: #fff;
margin-left: auto;
cursor: pointer;
}
.wrap___WfgpQ .customTable___fDCPQ {
padding-top: 20px;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-table-thead tr {
height: 54px;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-table-thead tr th {
background-color: #f5f5f5;
border: 0;
border-radius: 0;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-table-tbody tr {
height: 54px;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-table-tbody tr td {
border-bottom: 0;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-table-tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-table-tbody tr:nth-child(even) td {
background-color: #f5f5f5;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-table-tbody tr:nth-child(odd) {
background-color: #fff;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-table-tbody tr:nth-child(odd) td {
background-color: #fff;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-pagination {
margin-top: 40px;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-pagination .ant-pagination-item-active {
border-color: #0152d9;
background: #0152d9;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-pagination .ant-pagination-item-active a {
color: #fff;
}
.wrap___WfgpQ .customTable___fDCPQ .ant-pagination button {
line-height: normal;
line-height: initial;
}
.bgH___FpdXp {
height: 10px;
background-color: #fafafa;
width: 1300px;
margin-left: -30px;
}
.cusModal___KC0OL [class~='ant-modal-confirm-btns'] {
display: none;
}
.imgWrap_____xpC {
display: flex;
}
.imgWrap_____xpC .img___y1_Tn {
position: relative;
background: #fafafa;
}
.imgWrap_____xpC .img___y1_Tn .iBtn___PezSP {
width: 54px;
height: 20px;
background: #0152d9;
border-radius: 10px;
text-align: center;
line-height: 20px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
cursor: pointer;
position: absolute;
z-index: 20;
right: 10px;
top: 10px;
}
.imgWrap_____xpC .img___y1_Tn .text___JKvO_ {
position: absolute;
z-index: 20;
left: 50%;
transform: translateX(-50%);
bottom: -28px;
color: #333333;
}
.imgWrap_____xpC .img___y1_Tn .no___WXMqt {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.imgWrap_____xpC .img___y1_Tn .textP___E5hyW {
position: absolute;
z-index: 20;
left: 50%;
transform: translateX(-50%);
bottom: -28px;
color: #333333;
}
.video___XvBIh > video {
width: 316px;
}
.sys___wcaty {
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
padding: 0;
max-height: 850px;
overflow-y: auto;
}
.sys___wcaty .li___vKMNS {
height: 100%;
margin-left: 17px;
margin-bottom: 17px;
}
.sys___wcaty .li___vKMNS .d1___jR3G0 {
width: 216px;
height: 340px;
background-color: #efefef;
position: relative;
}
.sys___wcaty .li___vKMNS .d1___jR3G0 video {
height: 100%;
width: 100%;
object-fit: cover;
}
.sys___wcaty .li___vKMNS .d1___jR3G0 .img___y1_Tn {
width: 100%;
height: 340px;
overflow: hidden;
}
.sys___wcaty .li___vKMNS .d1___jR3G0 .btn___gckHk {
position: absolute;
z-index: 2;
width: 100%;
left: 0;
bottom: 0;
display: flex;
justify-content: space-between;
align-items: center;
height: 24px;
background: #0152d9;
}
.sys___wcaty .li___vKMNS .d1___jR3G0 .btn___gckHk .b1___xuUNz {
width: 100%;
height: 24px;
color: #ffffff;
padding: 0 5px;
line-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sys___wcaty .li___vKMNS:nth-child(3n + 1),
.sys___wcaty .li___vKMNS:first-child {
margin-left: 0;
}
.es___WFOJ6 {
display: inline-block;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Classrooms/Lists/Exercise/Detail/index.less?modules ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@ -3694,7 +3942,8 @@ span.CodeMirror-selectedtext {
}
.export___tng10 > a,
.export___tng10 > button {
margin-left: 10px;
margin-left: 8px;
padding: 3px 8px;
display: box;
display: flex;
align-items: center;
@ -3703,9 +3952,6 @@ span.CodeMirror-selectedtext {
.bg___rwmJT {
background: #fafafa;
}
.tabs___SK3e0 [class='ant-tabs-nav-list'] {
padding-left: 25px;
}
.tabs___SK3e0 [class~='ant-tabs-nav'] {
margin-bottom: 0;
background: white;
@ -3719,6 +3965,7 @@ span.CodeMirror-selectedtext {
.tabs___SK3e0 [class~='ant-tabs-tab'] {
padding: 23px 0;
font-size: 18px;
margin-left: 26px;
color: #333;
}
.tabs___SK3e0 [class~='ant-tabs-tab-active'] {

File diff suppressed because it is too large Load Diff

@ -393,6 +393,101 @@ li:last-child > .ant-breadcrumb-separator {
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/PreviewAll/index.less?modules ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wrp___dq7YK {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 108;
}
.wrp___dq7YK.bgBlack___ARIUV {
background: rgba(0, 0, 0, 0.5);
}
.wrp___dq7YK img,
.wrp___dq7YK video {
max-width: 100%;
max-height: 80%;
text-align: center;
}
.wrp___dq7YK iframe {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: #fff;
border: none;
}
.monaco___VnZC3 {
position: absolute;
height: 100%;
width: 100%;
}
.darkBlue___UprA9 * {
font-size: 14px;
}
.darkBlue___UprA9 [class~='margin'],
.darkBlue___UprA9 [class~='monaco-editor-background'] {
background: #0a0e2d !important;
}
.darkBlue___UprA9 [class~='line-numbers'] {
color: white !important;
}
.close___LKoWu {
position: absolute;
right: 40px;
top: 40px;
z-index: 10;
display: flex;
}
.close___LKoWu > span {
background: #4a4a4a;
color: #fff;
width: 40px;
height: 40px;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
margin-left: 10px;
}
.embed___hvpEJ {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*******************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[4].oneOf[1].use[2]!./src/components/monaco-editor/index.css ***!
\*******************************************************************************************************************************************************************************************************************************************/
.my-monaco-editor div,
.my-diff-editor div {
font-size: inherit;
}
.my-error-line-wrp{
width: calc(100% - 20px ) !important;
background: rgba(245, 0, 0 ,0.2) !important;
height: auto !important;
color: rgba(245, 0, 0, 1);
}
.noCopyPaste .quick-input-widget{
display: none !important;
}
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Classrooms/Lists/Exercise/Review/component/index.less?modules ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@ -975,6 +1070,750 @@ li:last-child > .ant-breadcrumb-separator {
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/markdown-editor/index.less ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.markdown-editor-wrapper {
position: relative;
}
.markdown-editor-body {
display: flex;
flex-flow: row nowrap;
width: 100%;
height: calc(100% - 38px);
align-items: center;
}
.markdown-editor-body .codemirror-container {
flex: 1 0;
height: 100%;
width: 100%;
overflow: hidden;
}
.markdown-editor-body .CodeMirror-wrap {
padding-bottom: 15px;
}
.markdown-editor-body .preview-container {
flex: 1 0;
height: 100%;
margin: 10px 0px;
padding: 8px 8px 50px 8px;
background: #fff;
overflow-y: auto;
box-sizing: border-box;
border-left: 1px solid #ccc;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
font-size: 16px;
}
.markdown-editor-container {
border: 1px solid #ccc;
overflow: hidden;
border-radius: 4px;
margin-bottom: 12px;
font-size: 16px;
}
.markdown-editor-container.full-screen {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
height: 100vh !important;
z-index: 100;
}
.markdown-editor-container.full-screen .preview-container > div {
padding-bottom: 180px !important;
}
.markdown-editor-container.full-screen .CodeMirror-sizer > div {
margin-bottom: 90px;
}
.markdown-editor-container.on-preview .codemirror-container,
.markdown-editor-container.on-preview .preview-container {
width: 50%;
}
.mini .markdown-editor-body {
height: calc(100% - 28px);
}
.flex-end {
justify-content: flex-end;
}
.my-codemirror-container {
border: 1px solid #ccc;
width: 100%;
margin-bottom: 24px;
}
.markdown-tip {
color: #cdcdcd;
font-size: 12px;
position: absolute;
right: 0;
bottom: -28px;
margin-bottom: 7px;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0;
/* Vertical padding around content */
}
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
padding: 0 4px;
/* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
background-color: white;
/* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}
.CodeMirror-guttermarker {
color: black;
}
.CodeMirror-guttermarker-subtle {
color: #999;
}
/* CURSOR */
.CodeMirror-cursor {
border-left: 1px solid black;
border-right: none;
width: 0;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.cm-fat-cursor .CodeMirror-cursor {
width: auto;
border: 0 !important;
background: #7e7;
}
.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-fat-cursor-mark {
background-color: rgba(20, 255, 20, 0.5);
animation: blink 1.06s steps(1) infinite;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
animation: blink 1.06s steps(1) infinite;
background-color: #7e7;
}
@keyframes blink {
50% {
background-color: transparent;
}
}
.cm-tab {
display: inline-block;
text-decoration: inherit;
}
.CodeMirror-rulers {
position: absolute;
left: 0;
right: 0;
top: -50px;
bottom: 0;
overflow: hidden;
}
.CodeMirror-ruler {
border-left: 1px solid #ccc;
top: 0;
bottom: 0;
position: absolute;
}
/* DEFAULT THEME */
.cm-s-default .cm-header {
color: blue;
}
.cm-s-default .cm-quote {
color: #090;
}
.cm-negative {
color: #d44;
}
.cm-positive {
color: #292;
}
.cm-header,
.cm-strong {
font-weight: bold;
}
.cm-em {
font-style: italic;
}
.cm-link {
text-decoration: underline;
}
.cm-strikethrough {
text-decoration: line-through;
}
.cm-s-default .cm-keyword {
color: #708;
}
.cm-s-default .cm-atom {
color: #219;
}
.cm-s-default .cm-number {
color: #164;
}
.cm-s-default .cm-def {
color: #00f;
}
.cm-s-default .cm-variable-2 {
color: #05a;
}
.cm-s-default .cm-variable-3,
.cm-s-default .cm-type {
color: #085;
}
.cm-s-default .cm-comment {
color: #a50;
}
.cm-s-default .cm-string {
color: #a11;
}
.cm-s-default .cm-string-2 {
color: #f50;
}
.cm-s-default .cm-meta {
color: #555;
}
.cm-s-default .cm-qualifier {
color: #555;
}
.cm-s-default .cm-builtin {
color: #30a;
}
.cm-s-default .cm-bracket {
color: #997;
}
.cm-s-default .cm-tag {
color: #170;
}
.cm-s-default .cm-attribute {
color: #00c;
}
.cm-s-default .cm-hr {
color: #999;
}
.cm-s-default .cm-link {
color: #00c;
}
.cm-s-default .cm-error {
color: #f00;
}
.cm-invalidchar {
color: #f00;
}
.CodeMirror-composing {
border-bottom: 2px solid;
}
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {
color: #0b0;
}
div.CodeMirror span.CodeMirror-nonmatchingbracket {
color: #a22;
}
.CodeMirror-matchingtag {
background: rgba(255, 150, 0, 0.3);
}
.CodeMirror-activeline-background {
background: #e8f2ff;
}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
}
.CodeMirror-scroll {
overflow: scroll !important;
/* Things will break if this is overridden */
/* 50px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -50px;
margin-right: -50px;
padding-bottom: 50px;
height: 100%;
outline: none;
/* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 50px solid transparent;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actual scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar,
.CodeMirror-hscrollbar,
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0;
top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0;
left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0;
bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0;
bottom: 0;
}
.CodeMirror-gutters {
position: absolute;
left: 0;
top: 0;
min-height: 100%;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
display: inline-block;
vertical-align: top;
margin-bottom: -50px;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
background: none !important;
border: none !important;
}
.CodeMirror-gutter-background {
position: absolute;
top: 0;
bottom: 0;
z-index: 4;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper ::selection {
background-color: transparent;
}
.CodeMirror-gutter-wrapper ::-moz-selection {
background-color: transparent;
}
.CodeMirror-lines {
cursor: text;
min-height: 1px;
/* prevents collapsing before first draw */
}
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
/* Reset some styles that the rest of the page might have set */
border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
-webkit-font-variant-ligatures: contextual;
font-feature-settings: "calt";
font-variant-ligatures: contextual;
}
.CodeMirror-wrap pre.CodeMirror-line,
.CodeMirror-wrap pre.CodeMirror-line-like {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
padding: 0.1px;
/* Force widget margins to stay inside of the container */
}
.CodeMirror-rtl pre {
direction: rtl;
}
.CodeMirror-code {
outline: none;
}
/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
box-sizing: content-box;
}
.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-cursor {
position: absolute;
pointer-events: none;
}
.CodeMirror-measure pre {
position: static;
}
div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 3;
}
div.CodeMirror-dragcursors {
visibility: visible;
}
.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
}
.CodeMirror-selected {
background: #d9d9d9;
}
.CodeMirror-focused .CodeMirror-selected {
background: #d7d4f0;
}
.CodeMirror-crosshair {
cursor: crosshair;
}
.CodeMirror-line::selection,
.CodeMirror-line > span::selection,
.CodeMirror-line > span > span::selection {
background: #d7d4f0;
}
.CodeMirror-line::-moz-selection,
.CodeMirror-line > span::-moz-selection,
.CodeMirror-line > span > span::-moz-selection {
background: #d7d4f0;
}
.cm-searching {
background-color: #ffa;
background-color: rgba(255, 255, 0, 0.4);
}
/* Used to force a border model for a node */
.cm-force-border {
padding-right: 0.1px;
}
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}
/* See issue #2901 */
.cm-tab-wrap-hack:after {
content: '';
}
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext {
background: none;
}
.CodeMirror-sizer {
padding-top: 10px;
padding-bottom: 10px !important;
}
.CodeMirror-empty.CodeMirror-focused {
outline: none;
}
.CodeMirror pre.CodeMirror-placeholder {
color: #999;
}
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
word-break: break-word;
}
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
word-wrap: break-word;
word-break: break-word;
white-space: pre-wrap;
line-height: 1.6;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/markdown-editor/toolbar/index.less ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.markdown-toolbar-container {
display: flex;
flex-flow: row wrap;
align-items: center;
padding: 0 5px;
margin: 0;
position: relative;
list-style: none;
background: #fff;
border-bottom: 1px solid #ccc;
box-sizing: border-box;
line-height: 20px;
width: 100%;
min-height: 30px;
}
.markdown-toolbar-container .fill-tip {
cursor: pointer;
font-size: 12px;
display: inline-block;
padding: 5px;
border: 1px solid #eaeaea;
border-radius: 5px;
box-sizing: border-box;
line-height: 16px;
height: auto;
color: #666;
position: relative;
justify-content: center;
margin-left: 10px;
}
.markdown-toolbar-container .fill-tip::before {
content: ' ';
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid #fff;
position: absolute;
left: -6px;
top: 6px;
z-index: 10;
}
.markdown-toolbar-container .fill-tip::after {
content: ' ';
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid #cccbcb;
position: absolute;
left: -7px;
top: 6px;
}
.markdown-toolbar-container li {
color: #666;
padding: 0 1px;
height: 100%;
display: flex;
height: 38px;
flex-flow: column nowrap;
justify-content: center;
}
.markdown-toolbar-container a,
.markdown-toolbar-container span {
display: block;
}
.markdown-toolbar-container a {
width: 28px;
color: #666;
cursor: pointer;
text-align: center;
font-size: 18px;
}
.markdown-toolbar-container .btn-null {
width: auto;
display: flex;
flex-flow: row nowrap;
align-items: center;
}
.markdown-toolbar-container span.v-line {
margin: 0 5px;
height: 65%;
border-right: 1px solid #ccc;
}
.mini .markdown-toolbar-container li {
height: 28px;
}
.editor-resize {
display: block;
width: 120px;
height: 4px;
left: 54%;
margin-top: 2px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
cursor: row-resize;
white-space: nowrap;
overflow: hidden;
text-transform: capitalize;
box-sizing: border-box;
margin: 0 auto;
}
.btn-full-screen {
position: absolute;
right: 5px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!****************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[4].oneOf[1].use[2]!./src/components/markdown-editor/css/iconfont.css ***!
\****************************************************************************************************************************************************************************************************************************************************/
@font-face {
font-family: "md-iconfont";
src: url(./static/iconfont.498a2e20.eot);
/* IE9 */
src: url(./static/iconfont.498a2e20.eot#iefix) format('embedded-opentype'),
/* IE6-IE8 */
url(data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAArkAAsAAAAAFGQAAAqUAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFTgqYEJMCATYCJANMCygABCAFhG0HgUwb5hCjooZyUthkf4mpyEh3pV0O3eNzjDeMPcxWAACWBR8hkIIUVSIBAABgBAAACrx/wAkAfPHw39iv+2bmqzZUIt1PJ5FJeCMRibbSgsVNdRP+A23z391RKZiNY99ZzVmNklbCKpCtz0WxCnCVhUtkySLj37772YjcCVNhPk1OHZFC37UprJD/0ozsDfr3lrQ9Ja2fjpzpmcEJypq3QpVe3mEqOf/v+doc8Dx9AQTUAMH8r7l6h4jEycc0pD1SorTNT/f4+MQxO0wsRBKPkEy8VKiUQkiNRAgFe/ZbMVsJqPuMwq6/O48n0DSrO+To+fNnsFBwIlDuxls5WHgSlBjXUJdXFduW9T9hiXp6QK0GftDXx6ftOkkl4yc6PnvSg9sX5F9YZK7lf7DLU+CyExnbQCFelKr/MLbwbSKbKubEL8C8+KkUXjBVS7qLlkVFb9ncJpntxd2Xna/ekiQvSGwMutYjdpgXxBuyGejDtFUlNc1R+S9PV0tPERo6BpxAVHGyfbR8yxuCF0QLoQ9eUCDzArVfFA0EogJBSEd1B1QDFQ2oCSoLUAWUClAdlA5QF5QeUAvUMoTQ49UNKkRJAAUoG6AGqLsIocNbZwgD8P5WaYiTI2ObVWDfIP8FUH4B6GfCk1BkoQkNRVUCH5pC4eygwLuuu+XmIXB2jvFmcAXLmYJqni3c1sPfw8QoEHgwJsKwODyKoOr8CI/D4QnXuLpRnSqZzvUuVSLdXrMmWVlh7pdqFWyeZ6zbaj5Ea9VLbFFqJyuBbiHz/aXdwxv1o+qp6jZLs1AoqRHINuoHKJHgGlMq1FfO6n7nwbByXhAmPX0mB8QGO11d2a6eq73I/Or36dQNtU+OwzR+ZOhIvG9PavecX/p9136p84XxwOvWiBPqlOFByvvvoYHx+0JjX16+64EsGBw0NqsGsL2dB1a3LWieWdtgu+WlDNp1MF9ltnZPtbPEY8rCiCkoSnZWNZgOJAAl+ocR4Jr4TUSwy+pyq13sImw2Fj1QBDqoHIWVps9Oe6/70Jfl40V7rnnTFmeGL+2vXqcfP4VVab9hukZcxUCnDA32Jtjd74Pq5fqv/DUTv8a31K6dFFOXnYveQGKctVFs8p4EALG+V11C2k2eplEv6t7hrB6No5sL92F7AoDl8P79bJMbOAhN9S6f7YaoS6zTe9h2X22CMIMRuZ79KYSPUz0yAEJ8rmdkLSCsDbKUZm/XaCgZ/3VkwnSMp/9a/65inE4Uu2wpyvFCFYvarGxSdRFKJeNT4ujk1MPfe6Bfa1ePW1WWCVy3bmr1ko7JRynl544qLhwru3hEfhUBCxEIWwnsFpJobe+0dMS615o7jFByxzl6MRW7yD3AFsV0zZqSm1WJkK0FPjJifKsACpFsbVi3qVmD1bvqe9PTYcIIhActzTk/QMnRVdY0Pb7j2XG36f9tN8ut1oJNWexSlW9qSnbtoj2Ard40hheK/stt/Ut2NZuOWH0LFR+pyhrW/Vxd1qxBZumxWhaUbCWixxf57PaZp/zogTpeVQvYYzYAIWZjZfY6MnRB4WtX8Aed+pB7/b920mRPncmHsN1D1a0tBKlHMLW3enfGi7YkG8vfl/elLiUsZCidC5YNWzGlcQO4+sZRlCD0gOaxhQuu5niOdslx9TOub171Par2oocFG4Lp6Efmzzdh8x4Fmt4mtuL9IqxYM+Ww9DDlA5vzL9RB+0Cnf5QfkjxvFh0Ku4SFzC9xSN7TGR9dDnc77NLX2BcsxR5+++YIORTi+PXrvnhD6AZxIVtIpBJbJBafL5XKCMLFsbeeYvQwsW3yr18PRB2SDrRQvBH+Gz0sYA7hLhRtkTDn2PMl/Hr3WF2tQ427l4pUI6p77tAqMvhyjeI2X55BNI96ULb6taXwatu97E+KgDtTZr3ZmPRlSMDqgBUpYRjf7nxyxUYLPcLf8/goevBIapk4t6AXcyBfkRW7zEmZM4DBml3Hd+uXLkxnC0og1FvPgqhH9w7Gx2ZVG8NnzHROmMuTfZTxxiU6r9tenVmYoC7PjMYMbn3ciwIq5X7d0luk6eUBmmkpD2OVcT2khWWhUf48X6daKAACJ1QMnKGijbLmjgGJxOJh0etlsihEQZaLWeHhcZ6Qpy0BYgwnlkfHRS83RuUx2vVrddavPzeL2UjMzhXIDzlv4wpngWYETXAQTxzbwZMJtotbI/6nGtXvUt3DfgUhXHdJfxXbgTlYk5iXtCboggWuk4QGQUuap1DGQ/jL3SjM/aGRVn4x+57YwSaYl5hUwYGyXTNRJMgLqHcRVSEtRXJrUenECVrthIm6Jp2hybBzZ2Aqn3sjR1ahzc4WBlZBr5CqspB5g+tCFuVky4pKrUXy50ylRVZ5UbYD6mIPbNY0aXJyIC5QevaqkXue2+Zznuqd5U7qWmd1OOQ8+RUaLa7V4JoKxtQYP37AP8Rq6O/2GaPk0/XjPIKEsI4FkYN50bGZeSPH5cUkxF6MrBzA8OErS+uGfeN0hu/al9DB82E3DBQkDkyExEAkSDxZtF88KSIowojtR4cW2h9YHkRrg4URLh63c1sgZtDws9MLKG2UcSnTz+OlSxDDszwVkDJP0QvX6GjwSWYVeVOG9O6N6FjZWYBGzmKp8rw8KlFR4XTdw8Ko2tvAmLrB6NJ5rIHXVsx509enr2J52LGDiBwKRLrSeRWD721sVqUYVNuXzAvODPp3at2cYY3DJeb8udMPDz4sqDhlkW94SGlunIZ/WOLLCpszsK7GPypJL5XLpfokwCEtvfpI0RGZ7G7RXZJkVY8dOzjgPMvBkh/W9cPNQuGEic+XLYO4jMPr1ik7mxf//sz0Vl+z2QNLwPGr2MaIq/iQZ3iiyFLysoJUx7hBvXVEhWRhQai0ksJtOOvSxyixBtNubwhcuzfC9qpSrsxhzHqYBeeFYRT5EADZ7n9sNLGWuoapWKMrCDaWYcjB6BPgRuweJZFFgSKxcBGMACAn+o0NB8ueN2FS1vKAnbLu5AIskPURO4ahfGPhPAwn/wJKQY+T/5dtjuLHy0DTIUFI9i7LQeme1K11/JRvDPZ/nIy7ezlLKI38Sxry5QADiqsRsC+BVIhB/sre0mOiiPIUaT1TnSEkGd8MBOVpgfzfKyqZI+rKVDg7oSkGsR/RDd2vn56kFu/G6IkDkpoZkNUto8VyG1S07ICqul3QtCV355aRQcaiNLBpAgOhbxtIuv7hWWXZiRdYOkDF1DusCscZNJ3EzT5bVl+uHggkgxb7q/AKs5HJvDLLf4E9RkkH6Wm1P6DiMYuubr8FL5CBytignOyW2QhDmMQzWwdiRNETHkBx7ZDf75rG3DasFabByiECJDYCa0Kja/SeFJSZ6dkq8PlfgHUUSRTT7Cv6H0AKP3chUriIFOgLmVM125aqg51YW0MOCkNo2QQli845KkAUuUgYoF7qACisps+R3dvpceiuNS1Z10+n5U9afC3yrUdT5ChRiWrUoh6Nv2UXakcnutGL/sHh0THarSOfwxzy5D2yhYlCDTPPMno12WPU894rPhJMk8/HskLSQFX0hScxi8EgpWmfvDlm5UFAe56y3EcYl2MawxWWGrMqURY3m3qsoNjS+AhVRfGDAQAAAA==) format('woff2'),
url(./static/iconfont.09806494.woff) format('woff'),
url(./static/iconfont.f5a4e17c.ttf) format('truetype'),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url(./static/iconfont.c0c6fa27.svg#iconfont) format('svg');
/* iOS 4.1- */
}
.md-iconfont {
font-family: "md-iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-shrink:before {
content: "\e728";
}
.icon-enlarge:before {
content: "\e623";
}
.icon-code:before {
content: "\e602";
}
.icon-italic:before {
content: "\e718";
}
.icon-bold:before {
content: "\e644";
}
.icon-picture:before {
content: "\e606";
}
.icon-minus:before {
content: "\e62c";
}
.icon-order-list:before {
content: "\e655";
}
.icon-link:before {
content: "\e7d4";
}
.icon-formula:before {
content: "\e633";
}
.icon-unorder-list:before {
content: "\e668";
}
.icon-edit:before {
content: "\e603";
}
.icon-table:before {
content: "\e7db";
}
.icon-sum:before {
content: "\e667";
}
.icon-eye:before {
content: "\e69f";
}
.icon-eye-slash:before {
content: "\e601";
}
.icon-eraser:before {
content: "\e8cd";
}
.icon-file-code:before {
content: "\e9ec";
}
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/markdown-editor/upload-image/index.less ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.upload-button {
width: 120px;
height: 32px;
display: block;
position: relative;
color: #0152d9;
}
.upload-button input {
opacity: 0;
width: 160px;
height: 32px;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/image-preview/index.less ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

@ -1,609 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[45992],{
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 28927:
/*!*******************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Exercise/ReviewGroup/index.tsx + 2 modules ***!

@ -54,609 +54,6 @@ var noData = function noData(_ref) {
/***/ }),
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 75490:
/*!************************************************************!*\
!*** ./src/components/image-preview/index.tsx + 1 modules ***!

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[45825,36579,42977,23805,62654],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[45825,36579,23805,62654],{
/***/ 13887:
/*!******************************************************!*\
@ -1660,6 +1660,8 @@ var DownOutlined = __webpack_require__(39300);
var TipsButton = __webpack_require__(85952);
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/components/util.tsx
var components_util = __webpack_require__(9269);
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx
var Unlock = __webpack_require__(61050);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/components/List/index.tsx
@ -1690,6 +1692,7 @@ var components_util = __webpack_require__(9269);
var List = function List(_ref) {
@ -1711,6 +1714,7 @@ var List = function List(_ref) {
_useState4 = slicedToArray_default()(_useState3, 2),
isshow = _useState4[0],
setisshow = _useState4[1];
var currentEnterExamRef = (0,react.useRef)();
// 是否为集中阅卷:
var concentrate = false;
var format = 'YYYY-MM-DD';
@ -1763,17 +1767,17 @@ var List = function List(_ref) {
var enterExam = function enterExam(v) {
var _userInfo;
var notFirstTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (notFirstTime && v.is_user_locked) {
dispatch({
type: 'exercise/setActionTabs',
payload: {
key: 'student-unlock',
exerciseParams: v
}
});
return;
}
;
// if (notFirstTime && v.is_user_locked) {
// dispatch({
// type: 'exercise/setActionTabs',
// payload: {
// key: 'student-unlock',
// exerciseParams: v
// },
// })
// return
// };
currentEnterExamRef.current = v;
(0,util/* startExercise */.nr)({
inner_ip: v.inner_ip,
public_ip: v.public_ip,
@ -1790,7 +1794,9 @@ var List = function List(_ref) {
history: _umi_production_exports.history,
identity_verify: v.identity_verify,
open_phone_video_recording: v.open_phone_video_recording,
current_status: v.current_status
current_status: v.current_status,
exercise_user_id: v.exercise_user_id,
unlockClose: true
});
};
var columns = [{
@ -2487,6 +2493,11 @@ var List = function List(_ref) {
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Unlock/* default */.Z, {
closable: true,
successCb: function successCb() {
return enterExam(currentEnterExamRef.current);
}
})]
});
};
@ -2496,8 +2507,6 @@ var List = function List(_ref) {
classroomList: classroomList
};
})(List));
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx
var Unlock = __webpack_require__(61050);
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/components/TabMenu/index.tsx + 1 modules
var TabMenu = __webpack_require__(15582);
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/components/SearchSortController/index.tsx + 1 modules
@ -2691,6 +2700,36 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
course_id: params.coursesId
}
});
if (sessionStorage.getItem("illegalEntry")) {
sessionStorage.removeItem("illegalEntry");
es_modal/* default.info */.Z.info({
title: "提示",
centered: true,
width: 600,
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u5728\u7EBF\u8003\u8BD5\u7981\u6B62\u4F7F\u7528\u94FE\u63A5\u76F4\u63A5\u8BBF\u95EE\u7B54\u9898\u9875\u9762\uFF0C\u8BF7\u4F7F\u7528\u4E0B\u9762\u4E24\u79CD\u6B63\u5E38\u65B9\u5F0F\u8FDB\u5165\u8003\u8BD5\u7B54\u9898\u9875\u9762\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "1\u3001\u5728", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-red blod",
children: "\u8003\u8BD5\u5217\u8868"
}), "\u9875\u9762\u4E2D\uFF0C\u70B9\u51FB\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue blod",
children: "\u5F00\u59CB\u8003\u8BD5"
}), "\u201D\u6216\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue blod",
children: "\u7EE7\u7EED\u8003\u8BD5"
}), "\u201D\u6309\u94AE\u8FDB\u5165\u8003\u8BD5\u7B54\u9898\u9875\u9762\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "2\u3001\u5728", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-red blod",
children: "\u8003\u8BD5\u8BE6\u60C5"
}), "\u9875\u9762\u4E2D\uFF0C\u70B9\u51FB\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue blod",
children: "\u5F00\u59CB\u8003\u8BD5"
}), "\u201D\u6216\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue blod",
children: "\u7EE7\u7EED\u8003\u8BD5"
}), "\u201D\u6309\u94AE\u8FDB\u5165\u8003\u8BD5\u7B54\u9898\u9875\u9762\u3002"]
}),
okText: "知道了"
});
}
}, []);
var Menus = [{
name: '全部',

@ -1904,203 +1904,6 @@
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./node_modules/antd/es/divider/style/index.less ***!
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
.ant-divider {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.66667;
list-style: none;
font-feature-settings: tnum, "tnum";
border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.ant-divider-vertical {
position: relative;
top: -0.06em;
display: inline-block;
height: 0.9em;
margin: 0 8px;
vertical-align: middle;
border-top: 0;
border-left: 1px solid rgba(0, 0, 0, 0.06);
}
.ant-divider-horizontal {
display: flex;
clear: both;
width: 100%;
min-width: 100%;
margin: 24px 0;
}
.ant-divider-horizontal.ant-divider-with-text {
display: flex;
align-items: center;
margin: 16px 0;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
font-size: 14px;
white-space: nowrap;
text-align: center;
border-top: 0;
border-top-color: rgba(0, 0, 0, 0.06);
}
.ant-divider-horizontal.ant-divider-with-text::before,
.ant-divider-horizontal.ant-divider-with-text::after {
position: relative;
width: 50%;
border-top: 1px solid transparent;
border-top-color: inherit;
border-bottom: 0;
transform: translateY(50%);
content: '';
}
.ant-divider-horizontal.ant-divider-with-text-left::before {
width: 5%;
}
.ant-divider-horizontal.ant-divider-with-text-left::after {
width: 95%;
}
.ant-divider-horizontal.ant-divider-with-text-right::before {
width: 95%;
}
.ant-divider-horizontal.ant-divider-with-text-right::after {
width: 5%;
}
.ant-divider-inner-text {
display: inline-block;
padding: 0 1em;
}
.ant-divider-dashed {
background: none;
border-color: rgba(0, 0, 0, 0.06);
border-style: dashed;
border-width: 1px 0 0;
}
.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed::before,
.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed::after {
border-style: dashed none none;
}
.ant-divider-vertical.ant-divider-dashed {
border-width: 0 0 0 1px;
}
.ant-divider-plain.ant-divider-with-text {
color: rgba(0, 0, 0, 0.85);
font-weight: normal;
font-size: 12px;
}
.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left::before {
width: 0;
}
.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left::after {
width: 100%;
}
.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left .ant-divider-inner-text {
padding-left: 0;
}
.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right::before {
width: 100%;
}
.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right::after {
width: 0;
}
.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right .ant-divider-inner-text {
padding-right: 0;
}
.ant-divider-rtl {
direction: rtl;
}
.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-left::before {
width: 95%;
}
.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-left::after {
width: 5%;
}
.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-right::before {
width: 5%;
}
.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-right::after {
width: 95%;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/ConfigWorks/index.less?modules ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.flex_box_center___IBr6x {
justify-content: center;
align-items: center;
-webkit-justify-content: center;
box-align: center;
}
.flex_space_between___n2Iz0 {
justify-content: space-between;
-webkit-box-pack: justify;
}
.flex_box_vertical_center___1umwO {
align-items: center;
box-align: center;
}
.flex_box_center_end___SRZYb {
justify-content: flex-end;
align-items: center;
-webkit-justify-content: flex-end;
-webkit-align-items: center;
-webkit-box-align: center;
-webkit-box-pack: end;
box-align: center;
box-pack: end;
}
.flex_box_column___b90Da {
flex-direction: column;
box-orient: block-axis;
}
.form___V3fAH strong {
font-weight: normal;
color: #333;
font-size: 16px;
}
.form___V3fAH h1 {
font-weight: 600;
color: #333;
font-size: 16px;
}
.form___V3fAH [class~='ant-form-item'] {
margin-bottom: 0;
}
.efficiency___Lmou1 {
background: #fafafa;
padding: 20px;
font-size: 12px;
position: relative;
}
.efficiency___Lmou1:before {
width: 0;
height: 0;
content: '';
position: absolute;
left: -20px;
top: 27px;
border-right: 15px solid #fafafa;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
}
div[class~="ant-modal-confirm-content"] {
margin-left: none;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Classrooms/Lists/components/TabMenu/index.less?modules ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

File diff suppressed because one or more lines are too long

@ -994,6 +994,42 @@ span.CodeMirror-selectedtext {
font-size: 14px;
margin-right: 4px;
}
.list___KhJas .row___GGtIx .annotation___KVSwj {
display: flex;
align-items: center;
font-size: 14px;
color: #A77F1E;
margin-left: 20px;
cursor: pointer;
}
.list___KhJas .row___GGtIx .annotation___KVSwj i {
font-size: 14px;
margin-right: 4px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/ImageDimensions/index.less?modules ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.imageDimensions___a7crR {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 4;
background: rgba(0, 0, 0, 0.5);
}
.imageDimensions___a7crR .img___Kroat {
visibility: hidden;
max-width: 80%;
min-width: 500px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */

@ -160,6 +160,10 @@ var input_number = __webpack_require__(87799);
var checkbox_style = __webpack_require__(82000);
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules
var es_checkbox = __webpack_require__(32808);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/style/index.js + 1 modules
var spin_style = __webpack_require__(22536);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js
var spin = __webpack_require__(11382);
// EXTERNAL MODULE: ./node_modules/antd/es/divider/style/index.js + 1 modules
var divider_style = __webpack_require__(98541);
// EXTERNAL MODULE: ./node_modules/antd/es/divider/index.js
@ -471,8 +475,8 @@ var authority = __webpack_require__(7);
var RenderHtml = __webpack_require__(12768);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/components/FileDownloadList/index.tsx + 1 modules
var FileDownloadList = __webpack_require__(15265);
// EXTERNAL MODULE: ./src/components/FileDownloadList/index.tsx + 3 modules
var FileDownloadList = __webpack_require__(64683);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/GroupHomework/Review/index.tsx
@ -498,6 +502,8 @@ var FileDownloadList = __webpack_require__(15265);
@ -525,7 +531,7 @@ var _excluded = ["shixunHomeworks", "globalSetting", "loading", "user", "dispatc
var questionType = (/* unused pure expression or super */ null && (['单选题', '多选题', '判断题', '填空题', '简答题', '实训题']));
var ExeriseReview = function ExeriseReview(_ref) {
var _userInfo$course, _studentWorkDetail$ho, _studentWorkDetail$re, _studentWorkSupplyDet, _studentWorkDetail$pr, _studentWorkDetail$pr2, _studentWorkDetail$pr3, _studentWorkDetail$pr4, _user$navigationInfo, _user$navigationInfo$, _studentWorkDetail$pr5, _studentWorkDetail$pr6, _studentWorkDetail$pr7, _studentWorkDetail$wo, _studentWorkDetail$wo2, _studentWorkDetail$no, _studentWorkDetail$no2, _studentWorkDetail$no3, _studentWorkDetail$co, _studentWorkDetail$ho2, _studentWorkCommon$co;
var _userInfo$course, _studentWorkDetail$ho, _studentWorkDetail$pr, _studentWorkDetail$pr2, _studentWorkDetail$pr3, _studentWorkDetail$pr4, _user$navigationInfo, _user$navigationInfo$, _studentWorkDetail$pr5, _studentWorkDetail$pr6, _studentWorkDetail$pr7, _studentWorkDetail$wo, _studentWorkDetail$wo2, _studentWorkDetail$no, _studentWorkDetail$no2, _studentWorkDetail$no3, _studentWorkDetail$co, _studentWorkDetail$ho2, _studentWorkCommon$co, _studentWorkCommon$co2, _studentWorkCommon$co3, _studentWorkCommon$hi, _studentWorkCommon$hi2;
var shixunHomeworks = _ref.shixunHomeworks,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
@ -618,15 +624,15 @@ var ExeriseReview = function ExeriseReview(_ref) {
return _getDatas.apply(this, arguments);
}
function _getDatas() {
_getDatas = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
_getDatas = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
var _res$all_student_work, _res$all_student_work2;
var paylaod, res, key, _res$all_student_work3, _res$all_student_work4;
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
// const paylaod = JSON.parse(sessionStorage['all_student_works_params'] || '{}')
paylaod = JSON.parse(localStorage.getItem('all_student_works_param') || '{}'); // console.log('----------',paylaod);
_context8.next = 3;
_context10.next = 3;
return dispatch({
type: 'shixunHomeworks/getAllStudentWorks',
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
@ -634,7 +640,7 @@ var ExeriseReview = function ExeriseReview(_ref) {
}, paylaod)
});
case 3:
res = _context8.sent;
res = _context10.sent;
// setSpinning(false);
key = (_res$all_student_work = res['all_student_works']) === null || _res$all_student_work === void 0 ? void 0 : _res$all_student_work.map(function (item) {
return String(item.student_work_id);
@ -655,9 +661,9 @@ var ExeriseReview = function ExeriseReview(_ref) {
}
case 7:
case "end":
return _context8.stop();
return _context10.stop();
}
}, _callee8);
}, _callee10);
}));
return _getDatas.apply(this, arguments);
}
@ -928,122 +934,118 @@ var ExeriseReview = function ExeriseReview(_ref) {
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: [Reviewmodules.bg, 'pt30', 'pl30', 'pr30', 'pb30', 'mt20'].join(' '),
children: [(studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.description) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u5185\u5BB9"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.description) || '暂无~'
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FileDownloadList/* default */.Z, {
dataSource: studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.attachments
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " c-light-black",
children: moment_default()(studentWorkDetail.commit_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.commit_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkDetail.update_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.update_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
spinning: loading['shixunHomeworks/getStudentWorkDetail'] || loading['shixunHomeworks/getStudentWorkSupplyDetail'],
children: [(studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.description) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u5185\u5BB9"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.description) || '暂无~'
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FileDownloadList/* default */.Z, {
authority: (0,authority/* isAdmin */.GJ)(),
callback: function callback() {
dispatch({
type: 'shixunHomeworks/getStudentWorkDetail',
payload: objectSpread2_default()({}, params)
});
},
dataSource: studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.attachments
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " c-light-black",
children: moment_default()(studentWorkDetail.commit_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.commit_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkDetail.update_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.update_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
})]
})]
})]
}), (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_description) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u91CD\u505A\u8BB0\u5F55"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30 mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_description) || '暂无~'
})
}), studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$re = studentWorkDetail.redo_attachments) === null || _studentWorkDetail$re === void 0 ? void 0 : _studentWorkDetail$re.map(function (item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
href: "".concat(env/* default.API_SERVER */.Z.API_SERVER).concat(item.url),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-fujian c-green font14"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-black",
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml20 font12",
children: item.filesize
})]
}), (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_description) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u91CD\u505A\u8BB0\u5F55"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30 mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_description) || '暂无~'
})
}, key);
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " c-light-black",
children: moment_default()(studentWorkDetail.redo_commit_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.commit_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkDetail.redo_update_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.update_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FileDownloadList/* default */.Z, {
authority: (0,authority/* isAdmin */.GJ)(),
callback: function callback() {
dispatch({
type: 'shixunHomeworks/getStudentWorkDetail',
payload: objectSpread2_default()({}, params)
});
},
dataSource: studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.redo_attachments
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: " c-light-black",
children: moment_default()(studentWorkDetail.redo_commit_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.commit_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkDetail.redo_update_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkDetail.update_user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
})]
})]
})]
}), (studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_reason) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u8865\u4EA4\u5185\u5BB9"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30 mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_reason) || '暂无~'
})
}), studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : (_studentWorkSupplyDet = studentWorkSupplyDetail.revise_attachments) === null || _studentWorkSupplyDet === void 0 ? void 0 : _studentWorkSupplyDet.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
href: "".concat(env/* default.API_SERVER */.Z.API_SERVER).concat(item.url),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-fujian c-green font14"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-black",
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml20 font12",
children: item.filesize
})]
}), (studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_reason) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "font16",
children: "\u8865\u4EA4\u5185\u5BB9"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pl30 mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_reason) || '暂无~'
})
}, index);
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkSupplyDetail.atta_update_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkSupplyDetail.atta_update_user
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FileDownloadList/* default */.Z, {
authority: (0,authority/* isAdmin */.GJ)(),
callback: function callback() {
dispatch({
type: 'shixunHomeworks/getStudentWorkSupplyDetail',
payload: objectSpread2_default()({}, params)
});
},
dataSource: studentWorkSupplyDetail === null || studentWorkSupplyDetail === void 0 ? void 0 : studentWorkSupplyDetail.revise_attachments
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-light-black",
children: moment_default()(studentWorkSupplyDetail.atta_update_time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: studentWorkSupplyDetail.atta_update_user
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-light-black",
children: "\u66F4\u65B0"
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$pr = studentWorkDetail.project_info) === null || _studentWorkDetail$pr === void 0 ? void 0 : _studentWorkDetail$pr.id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
@ -1117,18 +1119,12 @@ var ExeriseReview = function ExeriseReview(_ref) {
children: ["\u5DF2\u5B8C\u6210\u533F\u8BC4\uFF1A", studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : (_studentWorkDetail$co = studentWorkDetail.commented_user_names) === null || _studentWorkDetail$co === void 0 ? void 0 : _studentWorkDetail$co.toString()]
})]
})
}), ((0,authority/* isAdmin */.GJ)() || (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.show_evaluation)) && /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
}), ((0,authority/* isAdmin */.GJ)() || (studentWorkDetail === null || studentWorkDetail === void 0 ? void 0 : studentWorkDetail.show_evaluation)) && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: [Reviewmodules.replyList, 'bg-white'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
gutter: [10, 20],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: 1,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "font-16",
children: ["\u5168\u90E8\u8BC4\u9605(", studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : studentWorkCommon.comment_count, ")"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
lineHeight: '40px'
},
@ -1217,6 +1213,17 @@ var ExeriseReview = function ExeriseReview(_ref) {
})
})
})
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1",
name: "hidden_comment",
style: {
marginTop: 10
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u8BED",
defaultValue: "",
height: 250
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: "".concat(Reviewmodules.buttonFixed),
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
@ -1265,7 +1272,16 @@ var ExeriseReview = function ExeriseReview(_ref) {
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$co = studentWorkCommon.comment_scores) === null || _studentWorkCommon$co === void 0 ? void 0 : _studentWorkCommon$co.map(function (v, k) {
})]
}), (studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$co = studentWorkCommon.comment_scores) === null || _studentWorkCommon$co === void 0 ? void 0 : _studentWorkCommon$co.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: [Reviewmodules.replyList, 'bg-white'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
color: '#000000',
fontWeight: 500
},
children: ["\u70B9\u8BC4\u5185\u5BB9\uFF08", studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$co2 = studentWorkCommon.comment_scores) === null || _studentWorkCommon$co2 === void 0 ? void 0 : _studentWorkCommon$co2.length, "\uFF09"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$co3 = studentWorkCommon.comment_scores) === null || _studentWorkCommon$co3 === void 0 ? void 0 : _studentWorkCommon$co3.map(function (v, k) {
var _v$attachments;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
@ -1488,7 +1504,238 @@ var ExeriseReview = function ExeriseReview(_ref) {
}, k), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {})]
}, k);
})]
})
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: [Reviewmodules.replyList, 'bg-white'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
color: '#000000',
fontWeight: 500
},
children: ["\u70B9\u8BC4\u5185\u5BB9-\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1\uFF08", studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$hi = studentWorkCommon.hidden_comment_scores) === null || _studentWorkCommon$hi === void 0 ? void 0 : _studentWorkCommon$hi.length, "\uFF09"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), studentWorkCommon === null || studentWorkCommon === void 0 ? void 0 : (_studentWorkCommon$hi2 = studentWorkCommon.hidden_comment_scores) === null || _studentWorkCommon$hi2 === void 0 ? void 0 : _studentWorkCommon$hi2.map(function (v, k) {
var _v$attachments2;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
gutter: [12, 12],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: "40px",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reviewmodules.headpic,
width: "40",
src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(v === null || v === void 0 ? void 0 : v.user_image_url)
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "1",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: 1,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black",
children: v === null || v === void 0 ? void 0 : v.user_name
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "c-light-black",
children: ["\uFF08", v === null || v === void 0 ? void 0 : v.comment_role, "\uFF09"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml10",
children: moment_default()(v === null || v === void 0 ? void 0 : v.comment_time).format("YYYY-MM-DD HH:mm")
}), v.score !== null && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "ml30 c-orange",
children: [v.score, "\u5206"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: k === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [v["delete"] && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current",
onClick: function onClick() {
handleDeleteScore(v);
},
children: "\u5220\u9664"
}), v.can_appeal && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current",
onClick: function onClick() {
setShowApply(true);
},
children: "\u7533\u8BC9"
}), v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current ml10",
onClick: function onClick() {
return setShowApply(true);
},
children: "\u56DE\u590D"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [v["delete"] && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current",
onClick: function onClick() {
handleDeleteScore(v);
},
children: "\u5220\u9664"
}), v.can_appeal && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current",
onClick: function onClick() {
setShowApply(true);
},
children: "\u7533\u8BC9"
}), v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue current ml10",
onClick: function onClick() {
return setShowApply(true);
},
children: "\u56DE\u590D"
}), !v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml10",
children: "\u5931\u6548"
})]
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
span: 24,
children: [v.hidden_comment && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: v.hidden_comment
}), !v.hidden_comment && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black",
children: "\u6682\u672A\u5199\u8BC4\u8BED"
}), v === null || v === void 0 ? void 0 : (_v$attachments2 = v.attachments) === null || _v$attachments2 === void 0 ? void 0 : _v$attachments2.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
href: "".concat(env/* default.API_SERVER */.Z.API_SERVER).concat(item.url),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-fujian c-green font14"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 c-black",
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml20 font12",
children: item.filesize
})]
})
}, index);
})]
}), v.journals != '' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "w100",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: [Reviewmodules.comment, 'w100'].join(" "),
children: v.journals.map(function (val, key) {
var _val$user_info3, _val$user_info4;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: "50px",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reviewmodules.headpic,
width: "40",
src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(val === null || val === void 0 ? void 0 : (_val$user_info3 = val.user_info) === null || _val$user_info3 === void 0 ? void 0 : _val$user_info3.user_image_url)
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: "1",
children: [val === null || val === void 0 ? void 0 : (_val$user_info4 = val.user_info) === null || _val$user_info4 === void 0 ? void 0 : _val$user_info4.user_name, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-black ml10",
children: moment_default()(val === null || val === void 0 ? void 0 : val.time).format("YYYY-MM-DD HH:mm")
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: val.hidden_comment
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5220\u9664",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {
className: "current c-light-black",
onClick: function onClick() {
handleDelete(val);
}
})
})
})]
})
})
}, key), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {})]
}, key);
})
})]
})]
}), showApply && k === 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: ['bg-white'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
onChange: function onChange(v) {
setValue(v);
},
height: 150,
isFocus: true,
watch: true
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
span: 24,
className: "tr",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
type: "default",
size: "large",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
setShowApply(false);
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
})),
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
type: "primary",
size: "large",
className: "ml20",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
var res;
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
if (!(value === '')) {
_context8.next = 4;
break;
}
message/* default.error */.ZP.error('请输入内容');
_context8.next = 8;
break;
case 4:
_context8.next = 6;
return (0,service_shixunHomeworks/* addStudentWorkScoreCommit */.qP)({
hidden_comment: value,
userId: params.userId,
score_id: v.score_id
});
case 6:
res = _context8.sent;
if (res.status === 0) {
message/* default.success */.ZP.success('操作成功');
setShowApply(false);
getData();
}
case 8:
case "end":
return _context8.stop();
}
}, _callee8);
})),
children: "\u4FDD\u5B58"
})]
})
})]
})]
})]
}, k), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {})]
}, k);
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ChangeScore, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(AfterAppendix, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(image_preview/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
title: "\u786E\u8BA4\u6253\u56DE\u91CD\u505A",
open: isshow,
@ -1497,19 +1744,19 @@ var ExeriseReview = function ExeriseReview(_ref) {
onCancel: function onCancel() {
setisshow(false);
},
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
var res;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
if (comment) {
_context7.next = 3;
_context9.next = 3;
break;
}
message/* default.info */.ZP.info('评语不能为空');
return _context7.abrupt("return");
return _context9.abrupt("return");
case 3:
_context7.next = 5;
_context9.next = 5;
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.userId, "/redo_modal.json"), {
method: "post",
body: {
@ -1518,7 +1765,7 @@ var ExeriseReview = function ExeriseReview(_ref) {
}
});
case 5:
res = _context7.sent;
res = _context9.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
message/* default.info */.ZP.info('打回重做成功');
setisshow(false);
@ -1526,9 +1773,9 @@ var ExeriseReview = function ExeriseReview(_ref) {
}
case 7:
case "end":
return _context7.stop();
return _context9.stop();
}
}, _callee7);
}, _callee9);
})),
width: 700,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -1562,11 +1809,11 @@ var ExeriseReview = function ExeriseReview(_ref) {
}), contextHolder]
});
};
/* harmony default export */ var Review = ((0,_umi_production_exports.connect)(function (_ref7) {
var shixunHomeworks = _ref7.shixunHomeworks,
loading = _ref7.loading,
user = _ref7.user,
globalSetting = _ref7.globalSetting;
/* harmony default export */ var Review = ((0,_umi_production_exports.connect)(function (_ref9) {
var shixunHomeworks = _ref9.shixunHomeworks,
loading = _ref9.loading,
user = _ref9.user,
globalSetting = _ref9.globalSetting;
return {
shixunHomeworks: shixunHomeworks,
globalSetting: globalSetting,

@ -456,6 +456,42 @@ strong {
font-size: 14px;
margin-right: 4px;
}
.list___KhJas .row___GGtIx .annotation___KVSwj {
display: flex;
align-items: center;
font-size: 14px;
color: #A77F1E;
margin-left: 20px;
cursor: pointer;
}
.list___KhJas .row___GGtIx .annotation___KVSwj i {
font-size: 14px;
margin-right: 4px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/ImageDimensions/index.less?modules ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.imageDimensions___a7crR {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 4;
background: rgba(0, 0, 0, 0.5);
}
.imageDimensions___a7crR .img___Kroat {
visibility: hidden;
max-width: 80%;
min-width: 500px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */

File diff suppressed because it is too large Load Diff

@ -546,6 +546,845 @@
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/markdown-editor/index.less ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.markdown-editor-wrapper {
position: relative;
}
.markdown-editor-body {
display: flex;
flex-flow: row nowrap;
width: 100%;
height: calc(100% - 38px);
align-items: center;
}
.markdown-editor-body .codemirror-container {
flex: 1 0;
height: 100%;
width: 100%;
overflow: hidden;
}
.markdown-editor-body .CodeMirror-wrap {
padding-bottom: 15px;
}
.markdown-editor-body .preview-container {
flex: 1 0;
height: 100%;
margin: 10px 0px;
padding: 8px 8px 50px 8px;
background: #fff;
overflow-y: auto;
box-sizing: border-box;
border-left: 1px solid #ccc;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
font-size: 16px;
}
.markdown-editor-container {
border: 1px solid #ccc;
overflow: hidden;
border-radius: 4px;
margin-bottom: 12px;
font-size: 16px;
}
.markdown-editor-container.full-screen {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
height: 100vh !important;
z-index: 100;
}
.markdown-editor-container.full-screen .preview-container > div {
padding-bottom: 180px !important;
}
.markdown-editor-container.full-screen .CodeMirror-sizer > div {
margin-bottom: 90px;
}
.markdown-editor-container.on-preview .codemirror-container,
.markdown-editor-container.on-preview .preview-container {
width: 50%;
}
.mini .markdown-editor-body {
height: calc(100% - 28px);
}
.flex-end {
justify-content: flex-end;
}
.my-codemirror-container {
border: 1px solid #ccc;
width: 100%;
margin-bottom: 24px;
}
.markdown-tip {
color: #cdcdcd;
font-size: 12px;
position: absolute;
right: 0;
bottom: -28px;
margin-bottom: 7px;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0;
/* Vertical padding around content */
}
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
padding: 0 4px;
/* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
background-color: white;
/* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}
.CodeMirror-guttermarker {
color: black;
}
.CodeMirror-guttermarker-subtle {
color: #999;
}
/* CURSOR */
.CodeMirror-cursor {
border-left: 1px solid black;
border-right: none;
width: 0;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.cm-fat-cursor .CodeMirror-cursor {
width: auto;
border: 0 !important;
background: #7e7;
}
.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-fat-cursor-mark {
background-color: rgba(20, 255, 20, 0.5);
animation: blink 1.06s steps(1) infinite;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
animation: blink 1.06s steps(1) infinite;
background-color: #7e7;
}
@keyframes blink {
50% {
background-color: transparent;
}
}
.cm-tab {
display: inline-block;
text-decoration: inherit;
}
.CodeMirror-rulers {
position: absolute;
left: 0;
right: 0;
top: -50px;
bottom: 0;
overflow: hidden;
}
.CodeMirror-ruler {
border-left: 1px solid #ccc;
top: 0;
bottom: 0;
position: absolute;
}
/* DEFAULT THEME */
.cm-s-default .cm-header {
color: blue;
}
.cm-s-default .cm-quote {
color: #090;
}
.cm-negative {
color: #d44;
}
.cm-positive {
color: #292;
}
.cm-header,
.cm-strong {
font-weight: bold;
}
.cm-em {
font-style: italic;
}
.cm-link {
text-decoration: underline;
}
.cm-strikethrough {
text-decoration: line-through;
}
.cm-s-default .cm-keyword {
color: #708;
}
.cm-s-default .cm-atom {
color: #219;
}
.cm-s-default .cm-number {
color: #164;
}
.cm-s-default .cm-def {
color: #00f;
}
.cm-s-default .cm-variable-2 {
color: #05a;
}
.cm-s-default .cm-variable-3,
.cm-s-default .cm-type {
color: #085;
}
.cm-s-default .cm-comment {
color: #a50;
}
.cm-s-default .cm-string {
color: #a11;
}
.cm-s-default .cm-string-2 {
color: #f50;
}
.cm-s-default .cm-meta {
color: #555;
}
.cm-s-default .cm-qualifier {
color: #555;
}
.cm-s-default .cm-builtin {
color: #30a;
}
.cm-s-default .cm-bracket {
color: #997;
}
.cm-s-default .cm-tag {
color: #170;
}
.cm-s-default .cm-attribute {
color: #00c;
}
.cm-s-default .cm-hr {
color: #999;
}
.cm-s-default .cm-link {
color: #00c;
}
.cm-s-default .cm-error {
color: #f00;
}
.cm-invalidchar {
color: #f00;
}
.CodeMirror-composing {
border-bottom: 2px solid;
}
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {
color: #0b0;
}
div.CodeMirror span.CodeMirror-nonmatchingbracket {
color: #a22;
}
.CodeMirror-matchingtag {
background: rgba(255, 150, 0, 0.3);
}
.CodeMirror-activeline-background {
background: #e8f2ff;
}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
}
.CodeMirror-scroll {
overflow: scroll !important;
/* Things will break if this is overridden */
/* 50px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -50px;
margin-right: -50px;
padding-bottom: 50px;
height: 100%;
outline: none;
/* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 50px solid transparent;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actual scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar,
.CodeMirror-hscrollbar,
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0;
top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0;
left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0;
bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0;
bottom: 0;
}
.CodeMirror-gutters {
position: absolute;
left: 0;
top: 0;
min-height: 100%;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
display: inline-block;
vertical-align: top;
margin-bottom: -50px;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
background: none !important;
border: none !important;
}
.CodeMirror-gutter-background {
position: absolute;
top: 0;
bottom: 0;
z-index: 4;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper ::selection {
background-color: transparent;
}
.CodeMirror-gutter-wrapper ::-moz-selection {
background-color: transparent;
}
.CodeMirror-lines {
cursor: text;
min-height: 1px;
/* prevents collapsing before first draw */
}
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
/* Reset some styles that the rest of the page might have set */
border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
-webkit-font-variant-ligatures: contextual;
font-feature-settings: "calt";
font-variant-ligatures: contextual;
}
.CodeMirror-wrap pre.CodeMirror-line,
.CodeMirror-wrap pre.CodeMirror-line-like {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
padding: 0.1px;
/* Force widget margins to stay inside of the container */
}
.CodeMirror-rtl pre {
direction: rtl;
}
.CodeMirror-code {
outline: none;
}
/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
box-sizing: content-box;
}
.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-cursor {
position: absolute;
pointer-events: none;
}
.CodeMirror-measure pre {
position: static;
}
div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 3;
}
div.CodeMirror-dragcursors {
visibility: visible;
}
.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
}
.CodeMirror-selected {
background: #d9d9d9;
}
.CodeMirror-focused .CodeMirror-selected {
background: #d7d4f0;
}
.CodeMirror-crosshair {
cursor: crosshair;
}
.CodeMirror-line::selection,
.CodeMirror-line > span::selection,
.CodeMirror-line > span > span::selection {
background: #d7d4f0;
}
.CodeMirror-line::-moz-selection,
.CodeMirror-line > span::-moz-selection,
.CodeMirror-line > span > span::-moz-selection {
background: #d7d4f0;
}
.cm-searching {
background-color: #ffa;
background-color: rgba(255, 255, 0, 0.4);
}
/* Used to force a border model for a node */
.cm-force-border {
padding-right: 0.1px;
}
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}
/* See issue #2901 */
.cm-tab-wrap-hack:after {
content: '';
}
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext {
background: none;
}
.CodeMirror-sizer {
padding-top: 10px;
padding-bottom: 10px !important;
}
.CodeMirror-empty.CodeMirror-focused {
outline: none;
}
.CodeMirror pre.CodeMirror-placeholder {
color: #999;
}
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
word-break: break-word;
}
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
word-wrap: break-word;
word-break: break-word;
white-space: pre-wrap;
line-height: 1.6;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/PreviewAll/index.less?modules ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wrp___dq7YK {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 108;
}
.wrp___dq7YK.bgBlack___ARIUV {
background: rgba(0, 0, 0, 0.5);
}
.wrp___dq7YK img,
.wrp___dq7YK video {
max-width: 100%;
max-height: 80%;
text-align: center;
}
.wrp___dq7YK iframe {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: #fff;
border: none;
}
.monaco___VnZC3 {
position: absolute;
height: 100%;
width: 100%;
}
.darkBlue___UprA9 * {
font-size: 14px;
}
.darkBlue___UprA9 [class~='margin'],
.darkBlue___UprA9 [class~='monaco-editor-background'] {
background: #0a0e2d !important;
}
.darkBlue___UprA9 [class~='line-numbers'] {
color: white !important;
}
.close___LKoWu {
position: absolute;
right: 40px;
top: 40px;
z-index: 10;
display: flex;
}
.close___LKoWu > span {
background: #4a4a4a;
color: #fff;
width: 40px;
height: 40px;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
margin-left: 10px;
}
.embed___hvpEJ {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!*******************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[4].oneOf[1].use[2]!./src/components/monaco-editor/index.css ***!
\*******************************************************************************************************************************************************************************************************************************************/
.my-monaco-editor div,
.my-diff-editor div {
font-size: inherit;
}
.my-error-line-wrp{
width: calc(100% - 20px ) !important;
background: rgba(245, 0, 0 ,0.2) !important;
height: auto !important;
color: rgba(245, 0, 0, 1);
}
.noCopyPaste .quick-input-widget{
display: none !important;
}
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/markdown-editor/toolbar/index.less ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.markdown-toolbar-container {
display: flex;
flex-flow: row wrap;
align-items: center;
padding: 0 5px;
margin: 0;
position: relative;
list-style: none;
background: #fff;
border-bottom: 1px solid #ccc;
box-sizing: border-box;
line-height: 20px;
width: 100%;
min-height: 30px;
}
.markdown-toolbar-container .fill-tip {
cursor: pointer;
font-size: 12px;
display: inline-block;
padding: 5px;
border: 1px solid #eaeaea;
border-radius: 5px;
box-sizing: border-box;
line-height: 16px;
height: auto;
color: #666;
position: relative;
justify-content: center;
margin-left: 10px;
}
.markdown-toolbar-container .fill-tip::before {
content: ' ';
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid #fff;
position: absolute;
left: -6px;
top: 6px;
z-index: 10;
}
.markdown-toolbar-container .fill-tip::after {
content: ' ';
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid #cccbcb;
position: absolute;
left: -7px;
top: 6px;
}
.markdown-toolbar-container li {
color: #666;
padding: 0 1px;
height: 100%;
display: flex;
height: 38px;
flex-flow: column nowrap;
justify-content: center;
}
.markdown-toolbar-container a,
.markdown-toolbar-container span {
display: block;
}
.markdown-toolbar-container a {
width: 28px;
color: #666;
cursor: pointer;
text-align: center;
font-size: 18px;
}
.markdown-toolbar-container .btn-null {
width: auto;
display: flex;
flex-flow: row nowrap;
align-items: center;
}
.markdown-toolbar-container span.v-line {
margin: 0 5px;
height: 65%;
border-right: 1px solid #ccc;
}
.mini .markdown-toolbar-container li {
height: 28px;
}
.editor-resize {
display: block;
width: 120px;
height: 4px;
left: 54%;
margin-top: 2px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
cursor: row-resize;
white-space: nowrap;
overflow: hidden;
text-transform: capitalize;
box-sizing: border-box;
margin: 0 auto;
}
.btn-full-screen {
position: absolute;
right: 5px;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!****************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[4].oneOf[1].use[2]!./src/components/markdown-editor/css/iconfont.css ***!
\****************************************************************************************************************************************************************************************************************************************************/
@font-face {
font-family: "md-iconfont";
src: url(./static/iconfont.498a2e20.eot);
/* IE9 */
src: url(./static/iconfont.498a2e20.eot#iefix) format('embedded-opentype'),
/* IE6-IE8 */
url(data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAArkAAsAAAAAFGQAAAqUAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFTgqYEJMCATYCJANMCygABCAFhG0HgUwb5hCjooZyUthkf4mpyEh3pV0O3eNzjDeMPcxWAACWBR8hkIIUVSIBAABgBAAACrx/wAkAfPHw39iv+2bmqzZUIt1PJ5FJeCMRibbSgsVNdRP+A23z391RKZiNY99ZzVmNklbCKpCtz0WxCnCVhUtkySLj37772YjcCVNhPk1OHZFC37UprJD/0ozsDfr3lrQ9Ja2fjpzpmcEJypq3QpVe3mEqOf/v+doc8Dx9AQTUAMH8r7l6h4jEycc0pD1SorTNT/f4+MQxO0wsRBKPkEy8VKiUQkiNRAgFe/ZbMVsJqPuMwq6/O48n0DSrO+To+fNnsFBwIlDuxls5WHgSlBjXUJdXFduW9T9hiXp6QK0GftDXx6ftOkkl4yc6PnvSg9sX5F9YZK7lf7DLU+CyExnbQCFelKr/MLbwbSKbKubEL8C8+KkUXjBVS7qLlkVFb9ncJpntxd2Xna/ekiQvSGwMutYjdpgXxBuyGejDtFUlNc1R+S9PV0tPERo6BpxAVHGyfbR8yxuCF0QLoQ9eUCDzArVfFA0EogJBSEd1B1QDFQ2oCSoLUAWUClAdlA5QF5QeUAvUMoTQ49UNKkRJAAUoG6AGqLsIocNbZwgD8P5WaYiTI2ObVWDfIP8FUH4B6GfCk1BkoQkNRVUCH5pC4eygwLuuu+XmIXB2jvFmcAXLmYJqni3c1sPfw8QoEHgwJsKwODyKoOr8CI/D4QnXuLpRnSqZzvUuVSLdXrMmWVlh7pdqFWyeZ6zbaj5Ea9VLbFFqJyuBbiHz/aXdwxv1o+qp6jZLs1AoqRHINuoHKJHgGlMq1FfO6n7nwbByXhAmPX0mB8QGO11d2a6eq73I/Or36dQNtU+OwzR+ZOhIvG9PavecX/p9136p84XxwOvWiBPqlOFByvvvoYHx+0JjX16+64EsGBw0NqsGsL2dB1a3LWieWdtgu+WlDNp1MF9ltnZPtbPEY8rCiCkoSnZWNZgOJAAl+ocR4Jr4TUSwy+pyq13sImw2Fj1QBDqoHIWVps9Oe6/70Jfl40V7rnnTFmeGL+2vXqcfP4VVab9hukZcxUCnDA32Jtjd74Pq5fqv/DUTv8a31K6dFFOXnYveQGKctVFs8p4EALG+V11C2k2eplEv6t7hrB6No5sL92F7AoDl8P79bJMbOAhN9S6f7YaoS6zTe9h2X22CMIMRuZ79KYSPUz0yAEJ8rmdkLSCsDbKUZm/XaCgZ/3VkwnSMp/9a/65inE4Uu2wpyvFCFYvarGxSdRFKJeNT4ujk1MPfe6Bfa1ePW1WWCVy3bmr1ko7JRynl544qLhwru3hEfhUBCxEIWwnsFpJobe+0dMS615o7jFByxzl6MRW7yD3AFsV0zZqSm1WJkK0FPjJifKsACpFsbVi3qVmD1bvqe9PTYcIIhActzTk/QMnRVdY0Pb7j2XG36f9tN8ut1oJNWexSlW9qSnbtoj2Ard40hheK/stt/Ut2NZuOWH0LFR+pyhrW/Vxd1qxBZumxWhaUbCWixxf57PaZp/zogTpeVQvYYzYAIWZjZfY6MnRB4WtX8Aed+pB7/b920mRPncmHsN1D1a0tBKlHMLW3enfGi7YkG8vfl/elLiUsZCidC5YNWzGlcQO4+sZRlCD0gOaxhQuu5niOdslx9TOub171Par2oocFG4Lp6Efmzzdh8x4Fmt4mtuL9IqxYM+Ww9DDlA5vzL9RB+0Cnf5QfkjxvFh0Ku4SFzC9xSN7TGR9dDnc77NLX2BcsxR5+++YIORTi+PXrvnhD6AZxIVtIpBJbJBafL5XKCMLFsbeeYvQwsW3yr18PRB2SDrRQvBH+Gz0sYA7hLhRtkTDn2PMl/Hr3WF2tQ427l4pUI6p77tAqMvhyjeI2X55BNI96ULb6taXwatu97E+KgDtTZr3ZmPRlSMDqgBUpYRjf7nxyxUYLPcLf8/goevBIapk4t6AXcyBfkRW7zEmZM4DBml3Hd+uXLkxnC0og1FvPgqhH9w7Gx2ZVG8NnzHROmMuTfZTxxiU6r9tenVmYoC7PjMYMbn3ciwIq5X7d0luk6eUBmmkpD2OVcT2khWWhUf48X6daKAACJ1QMnKGijbLmjgGJxOJh0etlsihEQZaLWeHhcZ6Qpy0BYgwnlkfHRS83RuUx2vVrddavPzeL2UjMzhXIDzlv4wpngWYETXAQTxzbwZMJtotbI/6nGtXvUt3DfgUhXHdJfxXbgTlYk5iXtCboggWuk4QGQUuap1DGQ/jL3SjM/aGRVn4x+57YwSaYl5hUwYGyXTNRJMgLqHcRVSEtRXJrUenECVrthIm6Jp2hybBzZ2Aqn3sjR1ahzc4WBlZBr5CqspB5g+tCFuVky4pKrUXy50ylRVZ5UbYD6mIPbNY0aXJyIC5QevaqkXue2+Zznuqd5U7qWmd1OOQ8+RUaLa7V4JoKxtQYP37AP8Rq6O/2GaPk0/XjPIKEsI4FkYN50bGZeSPH5cUkxF6MrBzA8OErS+uGfeN0hu/al9DB82E3DBQkDkyExEAkSDxZtF88KSIowojtR4cW2h9YHkRrg4URLh63c1sgZtDws9MLKG2UcSnTz+OlSxDDszwVkDJP0QvX6GjwSWYVeVOG9O6N6FjZWYBGzmKp8rw8KlFR4XTdw8Ko2tvAmLrB6NJ5rIHXVsx509enr2J52LGDiBwKRLrSeRWD721sVqUYVNuXzAvODPp3at2cYY3DJeb8udMPDz4sqDhlkW94SGlunIZ/WOLLCpszsK7GPypJL5XLpfokwCEtvfpI0RGZ7G7RXZJkVY8dOzjgPMvBkh/W9cPNQuGEic+XLYO4jMPr1ik7mxf//sz0Vl+z2QNLwPGr2MaIq/iQZ3iiyFLysoJUx7hBvXVEhWRhQai0ksJtOOvSxyixBtNubwhcuzfC9qpSrsxhzHqYBeeFYRT5EADZ7n9sNLGWuoapWKMrCDaWYcjB6BPgRuweJZFFgSKxcBGMACAn+o0NB8ueN2FS1vKAnbLu5AIskPURO4ahfGPhPAwn/wJKQY+T/5dtjuLHy0DTIUFI9i7LQeme1K11/JRvDPZ/nIy7ezlLKI38Sxry5QADiqsRsC+BVIhB/sre0mOiiPIUaT1TnSEkGd8MBOVpgfzfKyqZI+rKVDg7oSkGsR/RDd2vn56kFu/G6IkDkpoZkNUto8VyG1S07ICqul3QtCV355aRQcaiNLBpAgOhbxtIuv7hWWXZiRdYOkDF1DusCscZNJ3EzT5bVl+uHggkgxb7q/AKs5HJvDLLf4E9RkkH6Wm1P6DiMYuubr8FL5CBytignOyW2QhDmMQzWwdiRNETHkBx7ZDf75rG3DasFabByiECJDYCa0Kja/SeFJSZ6dkq8PlfgHUUSRTT7Cv6H0AKP3chUriIFOgLmVM125aqg51YW0MOCkNo2QQli845KkAUuUgYoF7qACisps+R3dvpceiuNS1Z10+n5U9afC3yrUdT5ChRiWrUoh6Nv2UXakcnutGL/sHh0THarSOfwxzy5D2yhYlCDTPPMno12WPU894rPhJMk8/HskLSQFX0hScxi8EgpWmfvDlm5UFAe56y3EcYl2MawxWWGrMqURY3m3qsoNjS+AhVRfGDAQAAAA==) format('woff2'),
url(./static/iconfont.09806494.woff) format('woff'),
url(./static/iconfont.f5a4e17c.ttf) format('truetype'),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url(./static/iconfont.c0c6fa27.svg#iconfont) format('svg');
/* iOS 4.1- */
}
.md-iconfont {
font-family: "md-iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-shrink:before {
content: "\e728";
}
.icon-enlarge:before {
content: "\e623";
}
.icon-code:before {
content: "\e602";
}
.icon-italic:before {
content: "\e718";
}
.icon-bold:before {
content: "\e644";
}
.icon-picture:before {
content: "\e606";
}
.icon-minus:before {
content: "\e62c";
}
.icon-order-list:before {
content: "\e655";
}
.icon-link:before {
content: "\e7d4";
}
.icon-formula:before {
content: "\e633";
}
.icon-unorder-list:before {
content: "\e668";
}
.icon-edit:before {
content: "\e603";
}
.icon-table:before {
content: "\e7db";
}
.icon-sum:before {
content: "\e667";
}
.icon-eye:before {
content: "\e69f";
}
.icon-eye-slash:before {
content: "\e601";
}
.icon-eraser:before {
content: "\e8cd";
}
.icon-file-code:before {
content: "\e9ec";
}
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/markdown-editor/upload-image/index.less ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.upload-button {
width: 120px;
height: 32px;
display: block;
position: relative;
color: #0152d9;
}
.upload-button input {
opacity: 0;
width: 160px;
height: 32px;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/pages/Classrooms/Lists/OnlineLearning/components/Discuss/discuss-editor/index.less ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

@ -1,609 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[65148],{
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 15461:
/*!***********************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Polls/Answer/index.tsx + 4 modules ***!

@ -138,611 +138,6 @@ var noData = function noData(_ref) {
/***/ }),
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 91405:
/*!************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Polls/Detail/index.tsx + 15 modules ***!

@ -1,609 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[12884,36579,23805,62654],{
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 77680:
/*!********************************************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx + 1 modules ***!

@ -70,611 +70,6 @@ ExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined';
/***/ }),
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 77680:
/*!********************************************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx + 1 modules ***!

@ -54,609 +54,6 @@ var noData = function noData(_ref) {
/***/ }),
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 98739:
/*!****************************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Detail/answer/index.tsx + 2 modules ***!

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[13581,56369],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[13581,12034,56369],{
/***/ 65429:
/*!*****************************************************************************!*\
@ -8983,6 +8983,761 @@ var TrfList = function TrfList(_ref) {
};
/* harmony default export */ var components_TrfList = (TrfList);
/***/ }),
/***/ 12034:
/*!*****************************!*\
!*** ./src/utils/export.ts ***!
\*****************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "D9": function() { return /* binding */ ExportStudentanalysis; },
/* harmony export */ "IM": function() { return /* binding */ get_ecs_attachment; },
/* harmony export */ "Iy": function() { return /* binding */ ExportCourseWorkListScores; },
/* harmony export */ "Ne": function() { return /* binding */ getec_training_objectives; },
/* harmony export */ "VY": function() { return /* binding */ getrank_list; },
/* harmony export */ "Zn": function() { return /* binding */ ExportCourseInfo; },
/* harmony export */ "_g": function() { return /* binding */ exportMoocrecord; },
/* harmony export */ "_k": function() { return /* binding */ getDownFile; },
/* harmony export */ "cr": function() { return /* binding */ ExportCourseActScore; },
/* harmony export */ "eV": function() { return /* binding */ ExportCourseStudentsInfo; },
/* harmony export */ "fi": function() { return /* binding */ ExportCourseMemberScores; },
/* harmony export */ "gh": function() { return /* binding */ ExportAttendance; },
/* harmony export */ "hS": function() { return /* binding */ getec_courses; },
/* harmony export */ "iA": function() { return /* binding */ ExportCourseAndOther; },
/* harmony export */ "j6": function() { return /* binding */ ExportCourseTotalScore; },
/* harmony export */ "je": function() { return /* binding */ ExportExerciseStudentScores; },
/* harmony export */ "kS": function() { return /* binding */ getquestion_rank_list; },
/* harmony export */ "o6": function() { return /* binding */ ExportVideoStudent; },
/* harmony export */ "rQ": function() { return /* binding */ ExportProblemset; },
/* harmony export */ "sA": function() { return /* binding */ ExportPollsScores; },
/* harmony export */ "xm": function() { return /* binding */ getecyears; },
/* harmony export */ "xo": function() { return /* binding */ getec_graduation_requirements; },
/* harmony export */ "y8": function() { return /* binding */ Exportcompetitions; }
/* harmony export */ });
/* unused harmony export ExportCourseWorkListAppendix */
/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/message/style */ 14934);
/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd/es/message */ 12461);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _service_classrooms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/service/classrooms */ 73290);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! umi */ 89214);
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util */ 29427);
/* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./env */ 59758);
var showLoading = function showLoading() {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'globalSetting/setGlobalLoading',
payload: {
show: true,
text: '正在生成文件,请稍后...'
}
});
};
var hideLoading = function hideLoading() {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'globalSetting/setGlobalLoading',
payload: {
show: false,
text: ''
}
});
};
var ExportCourseInfo = /*#__PURE__*/function () {
var _ref = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(params) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
showLoading();
_context.next = 3;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportCourseInfo */ .YR)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 3:
res = _context.sent;
if (!(res.status === 0)) {
_context.next = 7;
break;
}
_context.next = 7;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFileIframe */ .QH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/export_couser_info.json"),
query: params
}));
case 7:
hideLoading();
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function ExportCourseInfo(_x) {
return _ref.apply(this, arguments);
};
}();
var ExportCourseActScore = /*#__PURE__*/function () {
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee2(params) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportCourseActScore */ .yS)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 2:
res = _context2.sent;
if (!(res.status === 0)) {
_context2.next = 8;
break;
}
antd_es_message__WEBPACK_IMPORTED_MODULE_8__/* ["default"].info */ .ZP.info('导出任务生成成功');
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_member_act_score"));
_context2.next = 13;
break;
case 8:
if (!(res.status === -2)) {
_context2.next = 12;
break;
}
return _context2.abrupt("return", res);
case 12:
if (res.status === -3) {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'classroomList/setActionTabs',
payload: {
key: '导出提醒'
}
});
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_member_act_score"));
}
case 13:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function ExportCourseActScore(_x2) {
return _ref2.apply(this, arguments);
};
}();
var ExportCourseMemberScores = /*#__PURE__*/function () {
var _ref3 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee3(params) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportCourseMemberScores */ .W0)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 2:
res = _context3.sent;
if (!(res.status === 0)) {
_context3.next = 8;
break;
}
antd_es_message__WEBPACK_IMPORTED_MODULE_8__/* ["default"].info */ .ZP.info('导出任务生成成功');
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_score"));
_context3.next = 13;
break;
case 8:
if (!(res.status === -2)) {
_context3.next = 12;
break;
}
return _context3.abrupt("return", res);
case 12:
if (res.status === -3) {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'classroomList/setActionTabs',
payload: {
key: '导出提醒'
}
});
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_score"));
}
case 13:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function ExportCourseMemberScores(_x3) {
return _ref3.apply(this, arguments);
};
}();
//试卷
var ExportCourseAndOther = /*#__PURE__*/function () {
var _ref4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee4(params) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportCourseAndOther */ .Nl)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 2:
res = _context4.sent;
if (!(res.status === 0)) {
_context4.next = 8;
break;
}
antd_es_message__WEBPACK_IMPORTED_MODULE_8__/* ["default"].info */ .ZP.info('导出任务生成成功');
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
_context4.next = 13;
break;
case 8:
if (!(res.status === -2)) {
_context4.next = 12;
break;
}
return _context4.abrupt("return", res);
case 12:
if (res.status === -3) {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'classroomList/setActionTabs',
payload: {
key: '导出提醒'
}
});
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
}
case 13:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return function ExportCourseAndOther(_x4) {
return _ref4.apply(this, arguments);
};
}();
//第三方幕课
var exportMoocrecord = /*#__PURE__*/function () {
var _ref5 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee5(params) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportMoocrecords */ .td)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 2:
res = _context5.sent;
if (!(res.status === 0)) {
_context5.next = 8;
break;
}
antd_es_message__WEBPACK_IMPORTED_MODULE_8__/* ["default"].info */ .ZP.info('导出任务生成成功');
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
_context5.next = 13;
break;
case 8:
if (!(res.status === -2)) {
_context5.next = 12;
break;
}
return _context5.abrupt("return", res);
case 12:
if (res.status === -3) {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'classroomList/setActionTabs',
payload: {
key: '导出提醒'
}
});
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
}
case 13:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return function exportMoocrecord(_x5) {
return _ref5.apply(this, arguments);
};
}();
//作业
var ExportCourseTotalScore = /*#__PURE__*/function () {
var _ref6 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee6(params) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportCourseTotalScore */ .QX)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 2:
res = _context6.sent;
if (!(res.status === 0)) {
_context6.next = 8;
break;
}
antd_es_message__WEBPACK_IMPORTED_MODULE_8__/* ["default"].info */ .ZP.info('导出任务生成成功');
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_homework"));
_context6.next = 13;
break;
case 8:
if (!(res.status === -2)) {
_context6.next = 12;
break;
}
return _context6.abrupt("return", res);
case 12:
if (res.status === -3) {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'classroomList/setActionTabs',
payload: {
key: '导出提醒'
}
});
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_homework"));
}
case 13:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return function ExportCourseTotalScore(_x6) {
return _ref6.apply(this, arguments);
};
}();
var ExportCourseWorkListScores = /*#__PURE__*/function () {
var _ref7 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee7(params, type) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportCourseWorkListScores */ .aP)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 2:
res = _context7.sent;
if (res.status === 0) {
antd_es_message__WEBPACK_IMPORTED_MODULE_8__/* ["default"].info */ .ZP.info('导出任务生成成功');
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/").concat(type));
} else if (res.status === -3) {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'classroomList/setActionTabs',
payload: {
key: '导出提醒'
}
});
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/").concat(type));
}
// else if(res.status === -1){
// history.push(`/classrooms/${params.coursesId}/exportlist/${type}`)
// };
// console.log(JSON.stringify(params))
// if(res.status === 0) await downLoadFileIframe('',setUrlQuery({url:ENV.API_SERVER + `/api/homework_commons/${params.categoryId}/works_list.xlsx`,query:params}))
// hideLoading();
case 4:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return function ExportCourseWorkListScores(_x7, _x8) {
return _ref7.apply(this, arguments);
};
}();
var ExportCourseWorkListAppendix = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
var res;
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
showLoading();
_context8.next = 3;
return exportCourseWorkListAppendix(_objectSpread({}, params));
case 3:
res = _context8.sent;
if (!(res.status === 0)) {
_context8.next = 7;
break;
}
_context8.next = 7;
return downLoadFileIframe('', setUrlQuery({
url: ENV.API_SERVER + "/api/homework_commons/".concat(params.categoryId, "/works_list.zip"),
query: params
}));
case 7:
hideLoading();
case 8:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return function ExportCourseWorkListAppendix(_x9) {
return _ref8.apply(this, arguments);
};
}()));
var ExportPollsScores = /*#__PURE__*/function () {
var _ref9 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee9(params) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
showLoading();
_context9.next = 3;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportPollsScores */ .MJ)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 3:
res = _context9.sent;
if (!(res.status === 0)) {
_context9.next = 7;
break;
}
_context9.next = 7;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFileIframe */ .QH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/polls/".concat(params.categoryId, "/commit_result.xlsx"),
query: params
}));
case 7:
hideLoading();
case 8:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return function ExportPollsScores(_x10) {
return _ref9.apply(this, arguments);
};
}();
var ExportAttendance = /*#__PURE__*/function () {
var _ref10 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee10(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/attendances/export_xlsx_data.xlsx"),
query: params
}));
case 2:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return function ExportAttendance(_x11) {
return _ref10.apply(this, arguments);
};
}();
var ExportVideoStudent = /*#__PURE__*/function () {
var _ref11 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee11(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/video_study_statics.xlsx"),
query: params
}));
case 2:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return function ExportVideoStudent(_x12) {
return _ref11.apply(this, arguments);
};
}();
var ExportCourseStudentsInfo = /*#__PURE__*/function () {
var _ref12 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee12(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/export_course_students_info.xlsx"),
query: params
}));
case 2:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return function ExportCourseStudentsInfo(_x13) {
return _ref12.apply(this, arguments);
};
}();
var ExportProblemset = /*#__PURE__*/function () {
var _ref13 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee13(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/item_banks/export.xlsx",
query: params
}));
case 2:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return function ExportProblemset(_x14) {
return _ref13.apply(this, arguments);
};
}();
var Exportcompetitions = /*#__PURE__*/function () {
var _ref14 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee14(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/competitions/region_reports.xlsx",
query: params
}));
case 2:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return function Exportcompetitions(_x15) {
return _ref14.apply(this, arguments);
};
}();
var ExportExerciseStudentScores = /*#__PURE__*/function () {
var _ref15 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee15(params) {
var res;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_4__/* .exportExerciseStudentScores */ .Uy)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params));
case 2:
res = _context15.sent;
if (res.status === 0) {
antd_es_message__WEBPACK_IMPORTED_MODULE_8__/* ["default"].info */ .ZP.info('导出任务生成成功');
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/exercise_score"));
} else if (res.status === -3) {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: 'classroomList/setActionTabs',
payload: {
key: '导出提醒'
}
});
umi__WEBPACK_IMPORTED_MODULE_5__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/exercise_score"));
}
// else if(res.status === -1){
// history.push(`/classrooms/${params.coursesId}/exportlist/exercise_score`)
// };
// // https://test-newweb.educoder.net/api/exercises/4229/exercise_lists.xlsx?page=1&search=&limit=20&order=end_at&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
// if(res.status === 0) await downLoadFileIframe('',setUrlQuery({url:ENV.API_SERVER + `/api/exercises/${params.categoryId}/exercise_lists.xlsx`,query:params}))
// hideLoading();
case 4:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return function ExportExerciseStudentScores(_x16) {
return _ref15.apply(this, arguments);
};
}();
var getDownFile = /*#__PURE__*/function () {
var _ref16 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee16(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
console.log('----------', '调用下载');
_context16.next = 3;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/export_records/".concat(params.id, ".xlsx"),
query: params
}));
case 3:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return function getDownFile(_x17) {
return _ref16.apply(this, arguments);
};
}();
var getecyears = /*#__PURE__*/function () {
var _ref17 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee17(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/ec_major_schools/0/ec_years.xlsx",
query: params
}));
case 2:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return function getecyears(_x18) {
return _ref17.apply(this, arguments);
};
}();
var ExportStudentanalysis = /*#__PURE__*/function () {
var _ref18 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee18(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/courses/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/").concat(params.menuKey, "_statistic.xlsx?").concat(params.checkedList.map(function (item) {
return "course_group_id[]=".concat(item);
}).join('&')),
query: params
}));
case 2:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return function ExportStudentanalysis(_x19) {
return _ref18.apply(this, arguments);
};
}();
var getec_training_objectives = /*#__PURE__*/function () {
var _ref19 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee19(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
_context19.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_training_objectives.xlsx"),
query: params
}));
case 2:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return function getec_training_objectives(_x20) {
return _ref19.apply(this, arguments);
};
}();
var get_ecs_attachment = /*#__PURE__*/function () {
var _ref20 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee20(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
_context20.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)(params === null || params === void 0 ? void 0 : params.name, (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/attachments/get_ecs_attachment.docx",
query: params
}));
case 2:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return function get_ecs_attachment(_x21) {
return _ref20.apply(this, arguments);
};
}();
var getec_courses = /*#__PURE__*/function () {
var _ref21 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee21(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
_context21.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_courses.xlsx"),
query: params
}));
case 2:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return function getec_courses(_x22) {
return _ref21.apply(this, arguments);
};
}();
var getec_graduation_requirements = /*#__PURE__*/function () {
var _ref22 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee22(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
_context22.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_graduation_requirements.xlsx"),
query: params
}));
case 2:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return function getec_graduation_requirements(_x23) {
return _ref22.apply(this, arguments);
};
}();
var getrank_list = /*#__PURE__*/function () {
var _ref23 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee23(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
_context23.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/courses/rank_list.xlsx",
query: params
}));
case 2:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return function getrank_list(_x24) {
return _ref23.apply(this, arguments);
};
}();
var getquestion_rank_list = /*#__PURE__*/function () {
var _ref24 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee24(params) {
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
_context24.next = 2;
return (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_6__/* .setUrlQuery */ .NY)({
url: _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"].API_SERVER */ .Z.API_SERVER + "/api/courses/question_rank_list.xlsx",
query: params
}));
case 2:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return function getquestion_rank_list(_x25) {
return _ref24.apply(this, arguments);
};
}();
/***/ })
}]);

@ -1,609 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[2819],{
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 29791:
/*!**************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Template/detail/index.tsx + 5 modules ***!

@ -1,4 +1,4 @@
(self["webpackChunk"] = self["webpackChunk"] || []).push([[72570,86701,12325,30707],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[72570,12768,67570,12325,30707],{
/***/ 96403:
/*!*********************************!*\
@ -240,7 +240,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -327,7 +328,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;

@ -1496,7 +1496,7 @@ var Index_competitionsPage = function competitionsPage(_ref) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: Indexmodules.bg,
style: {
background: globalSetting.currentDomain == "saia.educoder.net" ? "#fafafa" : "#fff",
background: globalSetting.isSaiaDomain ? "#fafafa" : "#fff",
minHeight: "100vh"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -1532,7 +1532,7 @@ var Index_competitionsPage = function competitionsPage(_ref) {
style: {
marginTop: competitions.listParams.url_suffix_name && competitions.competition_title == '' ? "69px" : ""
},
children: globalSetting.currentDomain !== 'saia.educoder.net' && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default.Search */.Z.Search, {
children: !globalSetting.isSaiaDomain && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default.Search */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u7ADE\u8D5B\u540D\u79F0",
size: "large",
className: Indexmodules.search

@ -527,7 +527,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -614,7 +615,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
@ -4348,6 +4363,110 @@ var SelectFilePathModal = function SelectFilePathModal(_ref) {
/***/ }),
/***/ 15994:
/*!*********************************!*\
!*** ./src/utils/fullscreen.ts ***!
\*********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "BU": function() { return /* binding */ exitFull; },
/* harmony export */ "Dj": function() { return /* binding */ requestFullScreen; },
/* harmony export */ "gH": function() { return /* binding */ fullscreenChange; },
/* harmony export */ "vp": function() { return /* binding */ IsFull; }
/* harmony export */ });
function requestFullScreen(element) {
try {
if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
} catch (e) {
console.log(e, ":e");
}
}
function exitFull() {
if (window.top.document.webkitExitFullscreen) {
window.top.document.webkitExitFullscreen();
} else if (document.exitFullscreen) {
window.top.document.exitFullscreen();
} else if (document.msExitFullscreen) {
window.top.document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
window.top.document.mozCancelFullScreen();
}
}
// esliint disabled
var fullscreenChange = function fullscreenChange() {
//['fullscreenchange','msfullscreenchange','webkitfullscreenchange', 'mozfullscreenchange']
if (document.webkitExitFullscreen) {
// document.webkitExitFullscreen()
return 'webkitfullscreenchange';
} else if (document.exitFullscreen) {
// document.exitFullscreen()
return 'fullscreenchange';
} else if (document.msExitFullscreen) {
// document.msExitFullscreen()
return 'msfullscreenchange';
} else if (document.mozCancelFullScreen) {
// document.mozCancelFullScreen()
return 'mozfullscreenchange';
}
};
//判断是否全屏
function IsFull() {
var fullscreenElement = window.top.document.fullscreenElement || window.top.document.mozFullscreenElement || window.top.document.webkitFullscreenElement;
var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled;
if (fullscreenElement == null) {
return false;
} else {
return true;
}
}
// document.addEventListener("mozfullscreenchange", function (event) {
// console.log("mozfullscreenchange ", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("webkitfullscreenchange", function (event) {
// console.log("webkitfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("msfullscreenchange", function (event) {
// console.log("msfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
/***/ }),
/***/ 57838:
/*!************************************************************!*\
!*** ./node_modules/antd/es/_util/hooks/useForceUpdate.js ***!

@ -137,7 +137,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -224,7 +225,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;

@ -125,7 +125,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -212,7 +213,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;

@ -152,7 +152,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -239,7 +240,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;

@ -1,609 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[50869],{
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 62744:
/*!**************************************************!*\
!*** ./src/pages/Guidance/index.tsx + 1 modules ***!

@ -1,609 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[35729,36579,23805,62654],{
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 68996:
/*!**********************************************!*\
!*** ./src/pages/Help/Index.tsx + 3 modules ***!

@ -84,7 +84,8 @@ var jsx_runtime = __webpack_require__(85893);
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
@ -171,7 +172,21 @@ var jsx_runtime = __webpack_require__(85893);
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;

@ -1,609 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[54056],{
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 33654:
/*!********************************************************!*\
!*** ./src/pages/IntrainCourse/index.tsx + 14 modules ***!

@ -1,9 +1,9 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[30067],{
/***/ 49440:
/***/ 49929:
/*!*************************************************!*\
!*** ./src/pages/Message/index.tsx + 1 modules ***!
!*** ./src/pages/Message/index.tsx + 2 modules ***!
\*************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@ -83,6 +83,8 @@ var resetmodules = __webpack_require__(39132);
// EXTERNAL MODULE: ./node_modules/moment/moment.js
var moment = __webpack_require__(30381);
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
;// CONCATENATED MODULE: ./src/pages/Message/img/pt0.png
var pt0_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAwCAYAAABNPhkJAAAAAXNSR0IArs4c6QAAC+tJREFUaEPVWgtwVEUWPf1mJoEwCfkQ8s/MJIBCkgIFBBRdZLfElUWNIl/FKqFABfkUYLR0DYJsiaACy7pYBeUCtSoKogiu+EUQBYIuLi6GfGZevuQf859k5r3e6p7My5vkvUwmsoJdlcrMe7fvvafv7dv33h6CfoyqUaPM7U7nbZIs/4EQkk4pjSaENEEQVlkKC7/rB8tfbQoJRFKRzTaDUroKhEwGpSbV3AqTwXBTQmFhSSD8rgZtnwCXpKZmSpL0ZwA3aCopCDOtdvvBqwEgUJm9Amau29bW9galdKYuY0IqLQsWxJPnn5cDFX416HUBl6SmDpMl6X0KpPlR7N8Wq/Wm/4fy5Phx95Xmqwm4ODU1XZakkwDCr7TAQPgRQAYhrRRoIZQ2gxCRUponCEK+IAjfJsyffzZQz+oBuCgjIwJNTTkUSA1EuatCS0g1Af5FBeF1a2HhN33RwQcwzc4WivbsOQrgzr5MvpZoCCHHCCHPJtvt53rTywdwkdX6JAU2XUtAAtGFEOImhKxItttf05unAOYRubVVpEBUIEKuRVqBkB3JDscTWropgH+JdYnR6ApOT/+vV0CH3W6VGxt1A54xIaHEGB1dG8hiSY2NZrfDkRI8evR/vPPaf/ghg1Jq0AG2wiKK27u/44DLx44N6airc4DSoWqCARMnwpSSAldhIf+Tamo0dTRERyPx7FnlXc3y5Wj58ENdPFGbNsE8a1YgeNF+5gyqH38cid95Mlfa1obiUaP0eRDSIRAyOdluz1ETccBFNtsCSume7rMjnn4aYYsXK4/lhgYO3F1YiI68PDTu2sXfGYYMQWJOF9+alSvR8sEHVxxwXXY24j7+mPN1iyIqH3wQkGVAkkDZf7cbcmsraEcHpyGE5FgcDp8cwQt4L6X0oe4aDtmyBYPuv19TcamsDKWTJ3sAR0YqK8++16xYgZbDh3UBhy9fjoF33KH7nhACk8p6brsd7d9/zxdx6L59vXoGbWpC6cSJHDjXDZiSJIpfeSd5AFutpRRI6M4pMjsb5tmzQQYO7CHEeeIEKh9+2MO0u0svXYqWjz4KyGV93M5kQnJenvKobMIEuKuqEDp/PiJfeKF3vh0dKE5PB3W5vFY+YnE4ZiiAS1NSRrhl+ZIeF7bahvh4mIYNgyk1Fabhw/ln5zff4OdXX+XTjPHxSDh1SmFRvWgRWj//XFcxY2wsQh/q4VAeVy0vR/M772gCjn3rLQRPnMjp5JoayI2NHlDBwTAkeOzFPKFC5ZUEkMxGY2RUQQEnJsUpKY/Ksvz3fpsDgMlmQ/wXXygsKufOhfP0aV2WwRkZiNVx+Y7z51Exa1YPwDAafRb18l13oeOnn7gM8733Iqpz8Rtffx31L77oK1sQ/mS121lCBSLabFtA6Wot7QaMHw/qdvNA5V1NLbrg9HTEqqLy5enT0XHx4hUFPCgzE+FPPcV5dvz4Iy7PULwUURs3wjxvHn9XvXAhWlWLz0ESstnicDzJPxfZbP+glHo2Y7cRs3cvBtx6K38qVVfDVVDA/1iUbr9wgbsPGwMmTULMm28qs8smTYK7oqJPgFnwUx9h7rIyNO/f38PCYcuWKdugdu1aNB84wPmzLZdw8qTHpSUJJWPGQG5u9pVNyBmrw8H3AgN8hFI6XUu7+KNHfaKlmqbtyy9R9cgj/NGgGTMwZHvXGV88YoQSNDQ9QuXSzlOnFD5e2qBRoxB76FDXAk6YgMErV8I8dy7cpaUonzpV4T/wttswdI/nRGVndcWcOT1EEqAtefz4UPLuuxJz6dOgdIKWYglffQVjcrKmpZp27ULdxo38XdjChYh49lmPJ5SXo/SWW3Sty170toe1JrIoHb52LQbNnInqxYvR+umnCpnaC3s7DoOCgkbG5+XlkiKrtUCvFCQGA4xJSZ4Irf5LTUX9xo1oevttLjhy/XrF3dSW10MdKOCSjAxEbtgAd3GxcjIw3sbERIQtWsTFyLW1aNixA5RSTbECcG+yKH7ALFwFSqN7NYnGS2I08oDGRuyBAwgeO5Z/bty5E/Wbei+4AgHctGcP6tat4+CYO7MhsLzAaOSfWVZF29v9q0/IIqvDsZsBrgClMf5naFOwMzD5wgXA5Gli+ksrGQ1bLCEiwq9IBkTrdIg7dAhBY8bw+Q3bt/tYXY8pAbIsovgSEa1WBwArd5HYWJhGjvSriJqAFRfe/cue12/YAJeDsdQYkoS2EycQNHIkT1YCGVJ9vXIqJJ4+DUOMx0b169ej8Y03/LIiwDqLKD7P9vA5CnB/NN93H6Jeftnv5P4S0NZWFKelob/VEovARBCQnJ8PCAJXo3bVKjS//75flRTAotXKkt4/csCZmYh65RW/k/tL4C3pfglgY0wMElRZXOWcOXCeOeNXJQKstIjiNlJss22WKV3DZgycMgXha/jHPg3mzurCwnXxom6UZAzZnmR5bkRWFkKmax79HrmE8CDlHSwCO3NyUP3YYwgePRqxKouW3Xwz3Jcv+9dXEB602u3/ZInHQ5TSvf5n+FLwdJIJNngaDm2ffIKqJUsCZaNJT3SqJS0vZKUjG3UbNqDt+HFd+QJwZ7IoHiOlw4Ylut3ugO6ESFAQ4g4fhum66zwCOjpQPm0apKoqGKK6WmJSQ4NmlGXlJIsXWkOqrETL0aOa1RKjV5/56vnOkydRuWCBPmBBGM86mt4GQA6ldFxfzRO+ejUGL1umkDds24aft26FMS4OCSdOKGdk+9mzqJg9uwfb/lRLrB5mI/7YMZhGjOCfXbm5MF1/vcK//Pbb4RJFTRjBAwbY4nJzRQ642GZ7RqbUT2Xt4TNg3DjEsAyr05Vdly7h8t13K22VIVu3YtA99yhCK+fNg/Pbb32U6C9gU1IS4tmCdo7qJUsQuW4dDHFx/EnT7t2o02oQENJksVgi2dWNx8LDh6fA7b5EKfWkLzqDCWT7VoiM5BQs6jKwrILyjqC0NMQdOaJ810ro1YCligq0qco5d0kJGnfv1nRplkZGPPOMh7fLhZKxYzF4yRKELV3KH7EkheXdstPZHcFHVlHkUVJp04o2299A6eN6YIXQUMQePMg7Ht5Ru2YNmg/2vCVVdyYYbfeGgBqw8+uvUdmt+xE0YgTijh1T5DAQrDxlTQajledIfJGqFi6EyWJBvCpY1WZl8Y6JegiCsDrZbufnrQK4IjV1qFOWC0BpaHfQLEgN3bVLqY25++zbh7rnntNcn5CpUxG9e7eulXu4dGf/SZnA8mTSdSnCALOm3lBVRlX96KNo7VyU2P37EXyTpznZvTnAnhlNphsS8/PP+wBmX4qs1iUU2KlGwfLe6B07MHDaNOVxy8GDYEW4XmXCivL4zz6DMSVFmaO2ciDFA2NQeuONPG54gxWviadMAZUkzt88cyaiNm9WZFVkZqL9PMfHFq7KYrfHEkJ4GdXz9tBm204p5dcUzLLR27f7gG09coQXCF5helsgdN48RHbWy4xGvZcDAdzy3ntw5ecjPCtLEdW97hVCQnhfnISEcBpmkJrOBEpgF2wOh6dw1wJMH3jAUHzu3EFK6T3sCoWEhLSoQdGmplC96w0fzyBEEsLCPG3FziE1NHhKJIPBZQwPr9dbLO9z6nab2BxDREQNMRo95qQU7pqaHtWdYDY3EqOR16tUlgV+1SMIjaGCkOTtWGoC5hOys4Xiffv+QmW5a1n9aXcNvieCsN5it2f7GKI3PYtstlkU+Gv3O6drEFtPlQipImbz9ZYLF3w8ye+vePg1qtO5FrK8mgKDfgtg+T0x8Ptkh6MrS9Hbw3qAStLSIuWWlpmUkHmE0lsp4ClIr8VByBNWh2OHlmp+Law1iZ3ZLkrHUUpvoMBoCrBr1nBQOpgA6h+sXZHloISY+rqtCLDTIoqP6QnuF+ArgiIAJiVW6+8kQL/28zTk3aB0DSvye2P9mwBcnJLyiCzLXalbd0SEVBsMhllJBQW9LorusRTA4v8qpHqXBQRgEXhrqCBsi7TbG/qizDVvYdFmYznsS14w/MdqwHkIwrtmQXhNnVT8pgF3Znzs8op1EGpByGVQesoQHPxFYm5uQD+IUS/E/wDuMBt8jOzH2wAAAABJRU5ErkJggg==";
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/pages/Message/index.tsx
@ -117,6 +119,7 @@ var jsx_runtime = __webpack_require__(85893);
var Message = function Message(_ref) {
@ -352,8 +355,12 @@ var Message = function Message(_ref) {
setLoad(true);
findId = leftList === null || leftList === void 0 ? void 0 : (_leftList$find = leftList.find(function (e) {
return e.id === itemId;
})) === null || _leftList$find === void 0 ? void 0 : _leftList$find.to_user_id;
_umi_production_exports.history.replace("/chatgpt?id=".concat(findId || id, "&position=").concat(challenge_id));
})) === null || _leftList$find === void 0 ? void 0 : _leftList$find.to_user_id; //在这里改变传参:
if (window.location.host === "gpt.educoder.net") {
_umi_production_exports.history.replace("/chatgpt?id=0&position=0");
} else {
_umi_production_exports.history.replace("/chatgpt?id=".concat(findId || id, "&position=").concat(challenge_id));
}
if (isBottom) {
setBarBottomIndex(Math.random());
getLeftData(findId, challenge_id);
@ -525,8 +532,6 @@ var Message = function Message(_ref) {
}
};
var magList = ["\u8BF7".concat(rightData === null || rightData === void 0 ? void 0 : rightData.user_name, "\u8001\u5E08\u5C1D\u8BD5\u518D\u56DE\u7B54\u4E00\u6B21"), '可能启用了机器人,请老师亲自回答'];
// console.log("rightData", rightData);
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Messagemodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -549,8 +554,10 @@ var Message = function Message(_ref) {
return handleLeftChange(e.id);
},
className: "".concat(Messagemodules.li, " ").concat(e.id === active ? Messagemodules.active : ''),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
children: [e !== null && e !== void 0 && e.avatar ? /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(e === null || e === void 0 ? void 0 : e.avatar)
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: pt0_namespaceObject
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {

@ -54,609 +54,6 @@ var noData = function noData(_ref) {
/***/ }),
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 22845:
/*!**********************************************************!*\
!*** ./src/pages/Messages/Private/index.tsx + 2 modules ***!

@ -1,609 +1,6 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[51855],{
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 66867:
/*!*************************************************!*\
!*** ./src/pages/MoopCases/InfoPanel/index.tsx ***!

@ -94,609 +94,6 @@ UpOutlined.displayName = 'UpOutlined';
/***/ }),
/***/ 36579:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(77171);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
var monaco_editor = __webpack_require__(8691);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(29427);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(51412);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload;
var _useState = (0,react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
var size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default.API_SERVER */.Z.API_SERVER + data;
}
if (type === "office") {
size = (0,util/* parseUrl */.en)(data).filesize;
if (size > maxSize) {
type = "other";
}
}
if (filename) monacoEditor.filename = filename;
(0,react.useEffect)(function () {
var _document$cookie, _document$cookie$repl;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,react.useEffect)(function () {
if (type === "office") getData();
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
setOfficeData(res);
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), type === "other" && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
}), type === "download" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
type: "primary",
size: "large",
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})]
});
});
/***/ }),
/***/ 12768:
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ RenderHtml; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
var katex_min = __webpack_require__(81897);
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
var marked = __webpack_require__(47084);
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
var helpers = __webpack_require__(90621);
;// CONCATENATED MODULE: ./src/utils/marked.ts
function indentCodeCompensation(raw, text) {
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
if (matchIndentToCode === null) {
return text;
}
var indentToCode = matchIndentToCode[1];
return text.split('\n').map(function (node) {
var matchIndentInNode = node.match(/^\s+/);
if (matchIndentInNode === null) {
return node;
}
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
indentInNode = _matchIndentInNode[0];
if (indentInNode.length >= indentToCode.length) {
return node.slice(indentToCode.length);
}
return node;
}).join('\n');
}
//兼容之前的 ##标题式写法
var toc = [];
var ctx = ["<ul>"];
var renderer = new (marked_default()).Renderer();
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
function cleanToc() {
toc.length = 0;
ctx = ["<ul>"];
}
var lines = {
overflow: "hidden",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
WebkitLineClamp: 2
};
function buildToc(coll, k, level, ctx) {
if (k >= coll.length || coll[k].level <= level) {
return k;
}
var node = coll[k];
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
k++;
var childCtx = [];
k = buildToc(coll, k, node.level, childCtx);
if (childCtx.length > 0) {
ctx.push("<ul>");
childCtx.forEach(function (idm) {
ctx.push(idm);
});
ctx.push("</ul>");
}
ctx.push("</li>");
k = buildToc(coll, k, level, ctx);
return k;
}
function getTocContent() {
buildToc(toc, 0, 0, ctx);
ctx.push("</ul>");
return ctx.join("");
}
var tokenizer = {
heading: function heading(src) {
var cap = headingRegex.exec(src);
if (cap) {
return {
type: 'heading',
raw: cap[0],
depth: cap[1].length,
text: cap[2]
};
}
},
fences: function fences(src) {
var cap = this.rules.block.fences.exec(src);
if (cap) {
var raw = cap[0];
var text = indentCodeCompensation(raw, cap[3] || '');
var lang = cap[2] ? cap[2].trim() : cap[2];
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
var id = next_id();
var expression = text;
text = id;
math_expressions[id] = {
type: 'block',
expression: expression
};
}
return {
type: 'code',
raw: raw,
lang: lang,
text: text
};
}
}
};
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
var katex_count = 0;
var next_id = function next_id() {
return "__special_katext_id_".concat(katex_count++, "__");
};
var math_expressions = {};
function getMathExpressions() {
return math_expressions;
}
function resetMathExpressions() {
katex_count = 0;
math_expressions = {};
}
function replace_math_with_ids(text) {
text = text.replace(latexRegex, function (_match, expression) {
var id = next_id();
math_expressions[id] = {
type: 'inline',
expression: expression
};
return id;
});
return text;
}
var original_listitem = renderer.listitem;
renderer.listitem = function (text) {
return original_listitem(replace_math_with_ids(text));
};
var original_paragraph = renderer.paragraph;
renderer.paragraph = function (text) {
return original_paragraph(replace_math_with_ids(text));
};
var original_tablecell = renderer.tablecell;
renderer.tablecell = function (content, flags) {
return original_tablecell(replace_math_with_ids(content), flags);
};
renderer.code = function (code, infostring, escaped) {
var lang = (infostring || '').match(/\S*/)[0];
if (!lang) {
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
}
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
return "<p class='editormd-tex'>".concat(code, "</p>");
} else {
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
}
};
renderer.heading = function (text, level, raw) {
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
toc.push({
anchor: anchor,
level: level,
text: text
});
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
};
marked_default().setOptions({
silent: true,
gfm: true,
pedantic: false
});
marked_default().use({
tokenizer: tokenizer,
renderer: renderer
});
/* harmony default export */ var utils_marked = ((marked_default()));
// EXTERNAL MODULE: ./node_modules/code-prettify/src/prettify.js
var prettify = __webpack_require__(11771);
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
var dist_hls = __webpack_require__(67631);
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
var katex = __webpack_require__(20527);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(36579);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
var preRegex = /<pre[^>]*>/g;
function _unescape(str) {
var div = document.createElement('div');
div.innerHTML = str;
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
}
/* harmony default export */ var RenderHtml = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value,
className = _ref.className,
showTextOnly = _ref.showTextOnly,
showLines = _ref.showLines,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
_ref$stylesPrev = _ref.stylesPrev,
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev;
var str = String(value);
var _useState = (0,react.useState)(""),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _useState3 = (0,react.useState)("office"),
_useState4 = slicedToArray_default()(_useState3, 2),
type = _useState4[0],
setType = _useState4[1];
var html = (0,react.useMemo)(function () {
try {
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
str = str.replace(reg, "(" + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) {}
;
var rs = utils_marked(str);
var math_expressions = getMathExpressions();
if (str.match(/\[TOC\]/)) {
rs = rs.replace('<p>[TOC]</p>', getTocContent());
cleanToc();
}
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
var _math_expressions$cap = math_expressions[capture],
type = _math_expressions$cap.type,
expression = _math_expressions$cap.expression;
return (0,katex.renderToString)(_unescape(expression) || '', {
displayMode: type === 'block',
throwOnError: false,
output: 'html'
});
});
rs = rs.replace(/▁/g, '▁▁▁');
resetMathExpressions();
// return dompurify.sanitize(rs)
if (showTextOnly) {
var dom = document.createElement('div');
dom.innerHTML = rs;
return dom.innerText;
}
setTimeout(function () {
return onLoad();
}, 500);
return rs;
}, [str]);
var el = (0,react.useRef)();
lines.WebkitLineClamp = showLines;
if (showLines) {
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
}
function onAncherHandler(e) {
var target = e.target;
if (target.tagName.toUpperCase() === 'A') {
var ancher = target.getAttribute('href');
if (ancher.indexOf("office") > -1) {
e.preventDefault();
setData(ancher);
setType("office");
} else if (ancher.indexOf("application/pdf") > -1) {
e.preventDefault();
setData(ancher);
setType("pdf");
} else if (ancher.indexOf("text/html") > -1) {
e.preventDefault();
setData(ancher);
setType("html");
} else if (ancher.startsWith('#')) {
e.preventDefault();
var viewEl = document.getElementById(ancher.replace('#', ''));
if (viewEl) {
viewEl.scrollIntoView(true);
}
}
}
}
var onLoad = function onLoad() {
var _el$current;
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
videoElement === null || videoElement === void 0 ? void 0 : videoElement.forEach(function (item) {
item.oncontextmenu = function () {
return false;
};
if (item.src.indexOf('.m3u8') > -1) {
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (hls_default().isSupported()) {
var hls = new (hls_default())();
hls.loadSource(item.src);
hls.attachMedia(item);
}
}
});
};
(0,react.useEffect)(function () {
if (el.current && html) {
if (html.match(preRegex)) {
window.PR.prettyPrint();
}
}
if (el.current) {
el.current.addEventListener('click', onAncherHandler);
return function () {
var _el$current2;
(_el$current2 = el.current) === null || _el$current2 === void 0 ? void 0 : _el$current2.removeEventListener('click', onAncherHandler);
resetMathExpressions();
cleanToc();
};
}
}, [html, el.current, onAncherHandler]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: el,
style: objectSpread2_default()({}, style),
className: "".concat(className ? className : '', " markdown-body "),
dangerouslySetInnerHTML: {
__html: html
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data,
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
style: objectSpread2_default()({}, stylesPrev),
onClose: function onClose() {
return setData("");
}
})]
});
});
/***/ }),
/***/ 38054:
/*!******************************************************!*\
!*** ./src/components/Spinner/index.tsx + 1 modules ***!

@ -338,6 +338,319 @@ UpOutlined.displayName = 'UpOutlined';
/***/ }),
/***/ 61050:
/*!*******************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/modal/style */ 35611);
/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! antd/es/modal */ 85402);
/* harmony import */ var antd_es_row_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/row/style */ 13062);
/* harmony import */ var antd_es_row__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! antd/es/row */ 71230);
/* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/button/style */ 29913);
/* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! antd/es/button */ 71577);
/* harmony import */ var antd_es_col_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/col/style */ 89032);
/* harmony import */ var antd_es_col__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! antd/es/col */ 15746);
/* harmony import */ var antd_es_input_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/input/style */ 69463);
/* harmony import */ var antd_es_input__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! antd/es/input */ 75008);
/* harmony import */ var antd_es_table_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/table/style */ 71854);
/* harmony import */ var antd_es_table__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! antd/es/table */ 67250);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/typeof.js */ 18698);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var antd_es_form_style__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd/es/form/style */ 75627);
/* harmony import */ var antd_es_form__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! antd/es/form */ 51018);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var antd_es_statistic_style__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd/es/statistic/style */ 14558);
/* harmony import */ var antd_es_statistic__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! antd/es/statistic */ 74763);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _service_exercise__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/service/exercise */ 51412);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! moment */ 30381);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! umi */ 89214);
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/utils/util */ 29427);
/* harmony import */ var _components_Exercise_ip__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @/components/Exercise/ip */ 79443);
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @/utils/authority */ 7);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
var Countdown = antd_es_statistic__WEBPACK_IMPORTED_MODULE_20__/* ["default"].Countdown */ .Z.Countdown;
var Unlock = function Unlock(_ref) {
var _actionTabs$exerciseP9, _actionTabs$exerciseP10, _actionTabs$exerciseP11, _actionTabs$exerciseP12;
var exercise = _ref.exercise,
successCb = _ref.successCb,
dispatch = _ref.dispatch;
var params = (0,umi__WEBPACK_IMPORTED_MODULE_15__.useParams)();
var _Form$useForm = antd_es_form__WEBPACK_IMPORTED_MODULE_21__/* ["default"].useForm */ .Z.useForm(),
_Form$useForm2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10___default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(false),
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10___default()(_useState, 2),
isLoading = _useState2[0],
setIsLoading = _useState2[1];
var localIpRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)();
var actionTabs = exercise.actionTabs;
(0,react__WEBPACK_IMPORTED_MODULE_12__.useEffect)(function () {
if (exercise.actionTabs.key === 'student-unlock') {
// if (actionTabs?.exerciseParams?.ip_limit !== 'no' || actionTabs?.exerciseParams?.ip_bind)
// getLocalIp();
setIsLoading(false);
form.resetFields();
}
}, [exercise.actionTabs.key]);
var getLocalIp = function getLocalIp() {
return new Promise( /*#__PURE__*/function () {
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default()().mark(function _callee(resolve) {
var _actionTabs$exerciseP, _actionTabs$exerciseP2;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,_components_Exercise_ip__WEBPACK_IMPORTED_MODULE_17__/* .findLocalIp */ .y)({
ip_limit: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP = actionTabs.exerciseParams) === null || _actionTabs$exerciseP === void 0 ? void 0 : _actionTabs$exerciseP.ip_limit,
ip_bind: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP2 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP2 === void 0 ? void 0 : _actionTabs$exerciseP2.ip_bind
});
case 2:
localIpRef.current = _context.sent;
return _context.abrupt("return", resolve());
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x) {
return _ref2.apply(this, arguments);
};
}());
};
var handleOk = /*#__PURE__*/function () {
var _ref3 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default()().mark(function _callee2() {
var _actionTabs$exerciseP3, _actionTabs$exerciseP4, _actionTabs$exerciseP5, _actionTabs$exerciseP6;
var formValue, unlockRes, _userInfo, _actionTabs$exerciseP7, _actionTabs$exerciseP8, delayedParams, v;
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_7___default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return form.validateFields();
case 2:
formValue = form.getFieldsValue();
setIsLoading(true);
if (!((actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP3 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP3 === void 0 ? void 0 : _actionTabs$exerciseP3.ip_limit) !== 'no' || actionTabs !== null && actionTabs !== void 0 && (_actionTabs$exerciseP4 = actionTabs.exerciseParams) !== null && _actionTabs$exerciseP4 !== void 0 && _actionTabs$exerciseP4.ip_bind)) {
_context2.next = 7;
break;
}
_context2.next = 7;
return getLocalIp();
case 7:
_context2.next = 9;
return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_13__/* .unlockUser */ .ZD)(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP5 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP5 === void 0 ? void 0 : _actionTabs$exerciseP5.id, {
exercise_user_id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP6 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP6 === void 0 ? void 0 : _actionTabs$exerciseP6.exercise_user_id,
unlock_key: formValue.unlock_key,
ip: localIpRef.current
});
case 9:
unlockRes = _context2.sent;
if (!(unlockRes.status === 0)) {
_context2.next = 22;
break;
}
if (!successCb) {
_context2.next = 15;
break;
}
dispatch({
type: 'exercise/setActionTabs',
payload: {}
});
successCb();
return _context2.abrupt("return");
case 15:
if (!formValue.time) {
_context2.next = 19;
break;
}
delayedParams = {
time: moment__WEBPACK_IMPORTED_MODULE_14___default()(formValue.time).format("YYYY-MM-DD HH:mm"),
exercise_user_id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP7 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP7 === void 0 ? void 0 : _actionTabs$exerciseP7.exercise_user_id,
id: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP8 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP8 === void 0 ? void 0 : _actionTabs$exerciseP8.id
};
_context2.next = 19;
return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_13__/* .delayedTime */ .qz)(delayedParams);
case 19:
v = actionTabs === null || actionTabs === void 0 ? void 0 : actionTabs.exerciseParams;
(0,_utils_util__WEBPACK_IMPORTED_MODULE_16__/* .startExercise */ .nr)({
inner_ip: v.inner_ip,
public_ip: v.public_ip,
open_camera: v.open_camera,
ip_limit: v.ip_limit,
ip_bind: v.ip_bind,
exercise_tips: v.exercise_tips,
exerciseId: v.id,
screen_open: v.screen_open,
screen_num: v.screen_num,
screen_sec: v.screen_sec,
coursesId: params.coursesId,
login: (_userInfo = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_18__/* .userInfo */ .eY)()) === null || _userInfo === void 0 ? void 0 : _userInfo.login,
history: history,
identity_verify: v.identity_verify,
open_phone_video_recording: v.open_phone_video_recording,
current_status: v.current_status
});
dispatch({
type: 'exercise/setActionTabs',
payload: {}
});
case 22:
setIsLoading(false);
case 23:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function handleOk() {
return _ref3.apply(this, arguments);
};
}();
var columns = [{
title: 'IP地址',
dataIndex: 'ip',
key: 'ip',
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("span", {
className: text.indexOf("异常") > -1 ? 'c-red' : 'c-green',
children: text
});
}
}, {
title: '浏览器',
dataIndex: 'browser',
key: 'browser',
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("span", {
className: text.indexOf("异常") > -1 ? 'c-red' : 'c-green',
children: text
});
}
}, {
title: '上次登录时间',
dataIndex: 'last_login_time',
key: 'last_login_time'
}];
var hasError5 = (actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP9 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP9 === void 0 ? void 0 : _actionTabs$exerciseP9.errorMessage) && _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_6___default()(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP10 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP10 === void 0 ? void 0 : _actionTabs$exerciseP10.errorMessage) === "object";
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.Fragment, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsxs)(antd_es_modal__WEBPACK_IMPORTED_MODULE_22__/* ["default"] */ .Z, {
width: 514,
centered: true,
closable: !!(actionTabs !== null && actionTabs !== void 0 && (_actionTabs$exerciseP11 = actionTabs.exerciseParams) !== null && _actionTabs$exerciseP11 !== void 0 && _actionTabs$exerciseP11.unlockClose),
maskClosable: false,
keyboard: false,
maskStyle: {
background: "#000"
},
title: '提示',
open: exercise.actionTabs.key === 'student-unlock',
footer: null,
onCancel: function onCancel() {
dispatch({
type: 'exercise/setActionTabs',
payload: {}
});
},
children: [hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("div", {
style: {
marginBottom: 16
},
children: "\u8BE5\u8D26\u53F7\u5DF2\u7ECF\u5728\u5176\u4ED6\u8BBE\u5907\u4E0A\u767B\u5F55\uFF0C\u82E5\u975E\u672C\u4EBA\u64CD\u4F5C\uFF0C\u8BF7\u8054\u7CFB\u76D1\u8003\u8001\u5E08\u8BF4\u660E\u60C5\u51B5\u3002 "
}), !hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("div", {
style: {
marginBottom: 16
},
children: "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u5728\u8003\u8BD5\u65F6\u4E2D\u9014\u9000\u51FA\uFF0C\u73B0\u5DF2\u5C06\u8003\u8BD5\u9501\u5B9A\u3002\u5982\u9700\u7EE7\u7EED\u8FDB\u884C\u8003\u8BD5\uFF0C \u8BF7\u5C3D\u5FEB\u8054\u7CFB\u8BFE\u5802\u8001\u5E08\u8FDB\u884C\u89E3\u9501\uFF01"
}), hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_table__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, {
className: "mb20",
pagination: {
hideOnSinglePage: true
},
dataSource: [(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$exerciseP12 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP12 === void 0 ? void 0 : _actionTabs$exerciseP12.errorMessage) || {}],
columns: columns
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)("div", {
className: "",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_form__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
form: form,
layout: "vertical",
autoComplete: "off",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_form__WEBPACK_IMPORTED_MODULE_21__/* ["default"].Item */ .Z.Item, {
label: "\u8003\u8BD5\u89E3\u9501\u7801",
name: "unlock_key",
rules: [{
required: true,
message: '请输入考试解锁码'
}],
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_input__WEBPACK_IMPORTED_MODULE_24__/* ["default"].Password */ .Z.Password, {
autoComplete: "off",
placeholder: "\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801",
visibilityToggle: false
})
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsxs)(antd_es_row__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z, {
justify: "space-between",
align: "middle",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_col__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_col__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(antd_es_button__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
loading: isLoading,
onClick: handleOk,
children: "\u8FDB\u5165\u8003\u8BD5"
})
})]
})]
})
});
};
/* harmony default export */ __webpack_exports__["Z"] = ((0,umi__WEBPACK_IMPORTED_MODULE_15__.connect)(function (_ref4) {
var exercise = _ref4.exercise;
return {
exercise: exercise
};
})(Unlock));
/***/ }),
/***/ 92632:
/*!*****************************************************************!*\
!*** ./src/pages/MyProblem/TestCasePanel/index.tsx + 1 modules ***!
@ -2729,8 +3042,12 @@ var difficultyMappingcolor = {
});
// EXTERNAL MODULE: ./src/assets/images/question/internal.png
var internal = __webpack_require__(62522);
// EXTERNAL MODULE: ./src/components/Exercise/ip.tsx
var Exercise_ip = __webpack_require__(79443);
// EXTERNAL MODULE: ./src/components/Timepiece/index.tsx
var Timepiece = __webpack_require__(44635);
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx
var Unlock = __webpack_require__(61050);
// EXTERNAL MODULE: ./src/assets/images/question/time.svg
var time = __webpack_require__(39022);
// EXTERNAL MODULE: ./src/assets/images/question/title.svg
@ -2776,6 +3093,8 @@ var _excluded = ["input", "showNote", "onShowNote", "notes", "onCancelNote", "on
@ -2906,6 +3225,7 @@ function MyProblem_reducer(state, action) {
var time_save = (0,react.useRef)(0);
var user = data === null || data === void 0 ? void 0 : data.user;
var hack = data === null || data === void 0 ? void 0 : data.hack;
var runTypeRef = (0,react.useRef)(1);
var countDownRef = (0,react.useRef)();
var countDownRef2 = (0,react.useRef)();
(0,react.useEffect)(function () {
@ -3136,19 +3456,48 @@ function MyProblem_reducer(state, action) {
}
function _onUpdateCode() {
_onUpdateCode = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
var response;
var ip, response, _exerciseData$exercis7;
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
if (!(searchParams.get("ip_limit") === 'inner' || searchParams.get("ip_bind") === "true")) {
_context9.next = 4;
break;
}
_context9.next = 3;
return (0,Exercise_ip/* findLocalIp */.y)({
ip_limit: searchParams.get("ip_limit"),
ip_bind: searchParams.get("ip_bind") === "true" ? true : false
});
case 3:
ip = _context9.sent;
case 4:
_context9.next = 6;
return (0,service/* updateCode */.n4)(id, {
code: base64.Base64.encode(hack.code),
language: hack === null || hack === void 0 ? void 0 : hack.language
language: hack === null || hack === void 0 ? void 0 : hack.language,
exercise_id: searchParams.get("exercisesId"),
question_id: searchParams.get("questionId"),
ip: ip
});
case 2:
case 6:
response = _context9.sent;
if (response.status === -5) {
(0,_umi_production_exports.getDvaApp)()._store.dispatch({
type: 'exercise/setActionTabs',
payload: {
key: 'student-unlock',
exerciseParams: objectSpread2_default()(objectSpread2_default()({
errorMessage: response === null || response === void 0 ? void 0 : response.message
}, (exerciseData === null || exerciseData === void 0 ? void 0 : exerciseData.exercise) || {}), {}, {
exercise_user_id: exerciseData === null || exerciseData === void 0 ? void 0 : (_exerciseData$exercis7 = exerciseData.exercise) === null || _exerciseData$exercis7 === void 0 ? void 0 : _exerciseData$exercis7.user_id,
id: searchParams.get("exercisesId")
})
}
});
}
return _context9.abrupt("return", response);
case 4:
case 9:
case "end":
return _context9.stop();
}
@ -3165,25 +3514,26 @@ function MyProblem_reducer(state, action) {
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
runTypeRef.current = 2;
if (!submitting) {
_context11.next = 2;
_context11.next = 3;
break;
}
return _context11.abrupt("return");
case 2:
case 3:
dispatch({
type: MyProblem_Types.SET_SUBMITING,
payload: true
});
_context11.prev = 3;
_context11.prev = 4;
mediator/* default.publish */.Z.publish('to-commit-info');
_context11.next = 7;
_context11.next = 8;
return onUpdateCode();
case 7:
case 8:
response = _context11.sent;
console.log(response, 1);
if (!(response.status === 0)) {
_context11.next = 22;
_context11.next = 30;
break;
}
executeCode = /*#__PURE__*/function () {
@ -3260,43 +3610,64 @@ function MyProblem_reducer(state, action) {
};
}();
submitCodeParams = {};
if (searchParams.get("type") === 'exercises') {
submitCodeParams.extras = {
exercise_id: searchParams.get("exercisesId"),
//试卷id
question_id: searchParams.get("questionId") //题目id
};
if (!(searchParams.get("type") === 'exercises')) {
_context11.next = 19;
break;
}
submitCodeParams.extras = {
exercise_id: searchParams.get("exercisesId"),
//试卷id
question_id: searchParams.get("questionId") //题目id
};
if (!(searchParams.get("ip_limit") === 'inner' || searchParams.get("ip_bind") === "true")) {
_context11.next = 19;
break;
}
_context11.next = 15;
_context11.next = 18;
return (0,Exercise_ip/* findLocalIp */.y)({
ip_limit: searchParams.get("ip_limit"),
ip_bind: searchParams.get("ip_bind") === "true" ? true : false
});
case 18:
submitCodeParams.extras.ip = _context11.sent;
case 19:
_context11.next = 21;
return (0,service/* sumbitCode */.bM)(id, submitCodeParams);
case 15:
case 21:
res = _context11.sent;
if (!(res.status === -1)) {
_context11.next = 19;
_context11.next = 25;
break;
}
window.parent.location.href = "/classrooms/".concat(searchParams.get("coursesId"), "/exercise/").concat(searchParams.get("exercisesId"), "/detail");
return _context11.abrupt("return");
case 19:
case 25:
time_limit = hack.time_limit, test_case_size = hack.test_case_size;
startTime = getTimeStamp();
executeCode();
case 22:
_context11.next = 28;
_context11.next = 31;
break;
case 30:
dispatch({
type: MyProblem_Types.SET_SUBMITING,
payload: false
});
case 31:
_context11.next = 37;
break;
case 24:
_context11.prev = 24;
_context11.t0 = _context11["catch"](3);
case 33:
_context11.prev = 33;
_context11.t0 = _context11["catch"](4);
console.log(_context11.t0);
dispatch({
type: MyProblem_Types.SET_SUBMITING,
payload: false
});
case 28:
case 37:
case "end":
return _context11.stop();
}
}, _callee11, null, [[3, 24]]);
}, _callee11, null, [[4, 33]]);
}));
return _onSubmitCode.apply(this, arguments);
}
@ -3309,18 +3680,19 @@ function MyProblem_reducer(state, action) {
return regeneratorRuntime_default()().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
runTypeRef.current = 1;
state.debuging = true;
dispatch({
type: MyProblem_Types.SET_DEBUGING,
payload: true
});
_context13.prev = 2;
_context13.next = 5;
_context13.prev = 3;
_context13.next = 6;
return onUpdateCode();
case 5:
case 6:
response = _context13.sent;
if (!(response.status === 0)) {
_context13.next = 21;
_context13.next = 22;
break;
}
executeCode = /*#__PURE__*/function () {
@ -3404,41 +3776,41 @@ function MyProblem_reducer(state, action) {
if (searchParams.get("type") === 'exercises') {
submitCodeParams.exercise_id = searchParams.get("exercisesId");
}
_context13.next = 13;
_context13.next = 14;
return (0,service/* debugCode */.MU)(id, submitCodeParams);
case 13:
case 14:
res = _context13.sent;
if (!(res.status === -1)) {
_context13.next = 17;
_context13.next = 18;
break;
}
window.parent.location.href = "/classrooms/".concat(searchParams.get("coursesId"), "/exercise/").concat(searchParams.get("exercisesId"), "/detail");
return _context13.abrupt("return");
case 17:
case 18:
startTime = getTimeStamp();
executeCode();
_context13.next = 22;
_context13.next = 23;
break;
case 21:
case 22:
dispatch({
type: MyProblem_Types.SET_DEBUGING,
payload: false
});
case 22:
_context13.next = 27;
case 23:
_context13.next = 28;
break;
case 24:
_context13.prev = 24;
_context13.t0 = _context13["catch"](2);
case 25:
_context13.prev = 25;
_context13.t0 = _context13["catch"](3);
console.log(_context13.t0);
case 27:
_context13.prev = 27;
return _context13.finish(27);
case 29:
case 28:
_context13.prev = 28;
return _context13.finish(28);
case 30:
case "end":
return _context13.stop();
}
}, _callee13, null, [[2, 24, 27, 29]]);
}, _callee13, null, [[3, 25, 28, 30]]);
}));
return _onDebugCode.apply(this, arguments);
}
@ -3687,8 +4059,8 @@ function MyProblem_reducer(state, action) {
user: data === null || data === void 0 ? void 0 : data.user,
onTriggerPraise: onTriggerPraise
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
spinning: loading,
delay: 500,
children: [!data ? null : /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
@ -3942,7 +4314,15 @@ function MyProblem_reducer(state, action) {
})]
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Unlock/* default */.Z, {
successCb: function successCb() {
if (runTypeRef.current === 1) {
onDebugCode();
} else {
onSubmitCode();
}
}
})]
});
});
function ActionBar(_ref8) {

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[90337,34180,28078,44666],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[90337,34180,7713,44666],{
/***/ 26554:
/*!*******************************************************************!*\

@ -116,6 +116,353 @@ var AsyncButton = function AsyncButton(_ref) {
/***/ }),
/***/ 45983:
/*!**************************************************************************!*\
!*** ./src/components/EcListItems/Problemset/Card/index.tsx + 1 modules ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ Problemset_Card; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/radio/style/index.js + 1 modules
var style = __webpack_require__(83822);
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules
var es_radio = __webpack_require__(29924);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
var RenderHtml = __webpack_require__(12768);
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Cardmodules = ({"flexRow":"flexRow____Sm4b","flexColumn":"flexColumn___mQNZs","action":"action___QUVEn","setScore":"setScore___yZ0Yb","delete":"delete___e4taL","content":"content___jR4Y6","titleWrap":"titleWrap___zsXYY","titleNumber":"titleNumber___p60vi","score":"score___DbCHw","titleHtml":"titleHtml___FALbj","answerWrap":"answerWrap___uPjYq","answer":"answer___pfiPk","answerText":"answerText___K3TNr"});
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.tsx
// import Item from '@/pages/Forums/Index/components/Item';
var tagDotList = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
var Card = function Card(_ref) {
var index = _ref.index,
typeName = _ref.typeName,
type = _ref.type,
_ref$data = _ref.data,
data = _ref$data === void 0 ? {} : _ref$data,
inMouseId = _ref.inMouseId,
isshow = _ref.isshow,
_ref$onSetScore = _ref.onSetScore,
onSetScore = _ref$onSetScore === void 0 ? function () {} : _ref$onSetScore,
_ref$onDelete = _ref.onDelete,
onDelete = _ref$onDelete === void 0 ? function () {} : _ref$onDelete,
_ref$onMouseEnter = _ref.onMouseEnter,
_onMouseEnter = _ref$onMouseEnter === void 0 ? function () {} : _ref$onMouseEnter,
_ref$showAnswer = _ref.showAnswer,
showAnswer = _ref$showAnswer === void 0 ? false : _ref$showAnswer;
var _useState = (0,react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
isopen = _useState2[0],
setisopen = _useState2[1];
var renderSingleOrMultiple = function renderSingleOrMultiple() {
var _data$choices;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [data === null || data === void 0 ? void 0 : (_data$choices = data.choices) === null || _data$choices === void 0 ? void 0 : _data$choices.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
lineHeight: '24px',
flexShrink: 0
},
children: tagDotList[index]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.answer, " ml5"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: item === null || item === void 0 ? void 0 : item.choice_text
})
})]
}, index);
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
})]
});
};
var renderJudgment = function renderJudgment() {
var _data$choices2;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: data === null || data === void 0 ? void 0 : (_data$choices2 = data.choices) === null || _data$choices2 === void 0 ? void 0 : _data$choices2.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
disabled: true,
children: item === null || item === void 0 ? void 0 : item.choice_text
}, index);
})
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
})]
});
};
var renderProgram = function renderProgram() {
var _data$program_attr;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: data === null || data === void 0 ? void 0 : (_data$program_attr = data.program_attr) === null || _data$program_attr === void 0 ? void 0 : _data$program_attr.description
})
})
});
};
var renderCompletion = function renderCompletion() {
var _data$standard_answer;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexColumn, " mt15"),
children: data === null || data === void 0 ? void 0 : (_data$standard_answer = data.standard_answer) === null || _data$standard_answer === void 0 ? void 0 : _data$standard_answer.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: "\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(item.position, "\uFF09\uFF1A").concat(item.answer_text.join("、"))
}, index);
})
})
});
};
var renderSubjective = function renderSubjective() {
var _data$answer_texts;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt15",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: data === null || data === void 0 ? void 0 : (_data$answer_texts = data.answer_texts) === null || _data$answer_texts === void 0 ? void 0 : _data$answer_texts[0]
})]
})
});
};
var renderShixun = function renderShixun() {
var _data$shixun;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt10",
children: "\u5173\u5361"
}), data === null || data === void 0 ? void 0 : (_data$shixun = data.shixun) === null || _data$shixun === void 0 ? void 0 : _data$shixun.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 font14",
children: [index + 1, ". ", item === null || item === void 0 ? void 0 : item.challenge_name]
}, index);
})]
});
};
var renderCombination = function renderCombination() {
var _data$sub_questions;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
style: {
display: isopen && 'none'
},
children: data === null || data === void 0 ? void 0 : (_data$sub_questions = data.sub_questions) === null || _data$sub_questions === void 0 ? void 0 : _data$sub_questions.map(function (e, i) {
var _e$choices;
var str = "<span style=\"margin-right: 10px\">".concat(index + 1, ".").concat(i + 1, "</span><span>\uFF08\u5355\u9009\u9898\uFF09</span><span class=\"c-grey-999\">\uFF08").concat(e.score, "\u5206\uFF09</span>");
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.titleWrap,
style: {
marginTop: 16
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Cardmodules.titleHtml,
value: str + e.name
})
}), e === null || e === void 0 ? void 0 : (_e$choices = e.choices) === null || _e$choices === void 0 ? void 0 : _e$choices.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
lineHeight: '24px',
flexShrink: 0
},
children: tagDotList[index]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.answer, " ml5"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: item === null || item === void 0 ? void 0 : item.choice_text
})
})]
}, index);
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", e === null || e === void 0 ? void 0 : e.standard_answer_show]
})]
}, e === null || e === void 0 ? void 0 : e.id);
})
});
};
var renderAnswer = function renderAnswer() {
var mapping = {
'SINGLE': renderSingleOrMultiple,
'MULTIPLE': renderSingleOrMultiple,
'JUDGMENT': renderJudgment,
'PROGRAM': renderProgram,
'COMPLETION': renderCompletion,
'SUBJECTIVE': renderSubjective,
'PRACTICAL': renderShixun,
'COMBINATION': renderCombination
};
return mapping[type] ? mapping[type]() : null;
};
var getDomString = function getDomString(data, i) {
var _data$sub_questions2;
var str = "<span style=\"margin-right: -10px\">".concat(i + 1, "\u3001</span><span class=\"c-grey-999\">\uFF08").concat((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\u5171".concat(data === null || data === void 0 ? void 0 : (_data$sub_questions2 = data.sub_questions) === null || _data$sub_questions2 === void 0 ? void 0 : _data$sub_questions2.length, "\u5C0F\u9898\uFF0C") : '').concat(data.score, "\u5206\uFF09</span> ");
return str;
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onMouseEnter: function onMouseEnter() {
return _onMouseEnter(data.id);
},
children: [inMouseId === data.id && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.action,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.setScore,
onClick: function onClick() {
return onSetScore(data.id, typeName, data === null || data === void 0 ? void 0 : data.shixun, data.score, data);
},
children: "\u8BBE\u7F6E\u5F97\u5206"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules["delete"],
onClick: function onClick() {
return onDelete(data.id);
},
children: "\u5220\u9664"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.content,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.titleWrap,
style: {
justifyContent: 'space-between'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Cardmodules.titleHtml,
value: getDomString(data, index) + ((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\uFF08\u9898\u5E72\uFF09" : '') + (data.name || (data === null || data === void 0 ? void 0 : data.shixun_name))
}), (data === null || data === void 0 ? void 0 : data.item_type) === "combination" && !isshow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick(e) {
setisopen(!isopen);
},
style: {
textAlign: 'end',
flexShrink: 0
},
children: isopen ? '展开' : '收起'
})]
}), renderAnswer()]
})]
});
};
/* harmony default export */ var Problemset_Card = (Card);
/***/ }),
/***/ 36845:
/*!**********************************************************!*\
!*** ./src/components/FixedButton/index.tsx + 1 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"t": function() { return /* binding */ FixedButton; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/FixedButton/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var FixedButtonmodules = ({"buttonFixed":"buttonFixed___vyq30","button":"button___hxmYv","buttonWrap":"buttonWrap___uK8dl"});
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/FixedButton/index.tsx
var FixedButton = function FixedButton(_ref) {
var _ref$cancelText = _ref.cancelText,
cancelText = _ref$cancelText === void 0 ? '取消' : _ref$cancelText,
_ref$okText = _ref.okText,
okText = _ref$okText === void 0 ? '确定' : _ref$okText,
_ref$loading = _ref.loading,
loading = _ref$loading === void 0 ? false : _ref$loading,
_ref$hasOkBtn = _ref.hasOkBtn,
hasOkBtn = _ref$hasOkBtn === void 0 ? true : _ref$hasOkBtn,
_ref$okButtonProps = _ref.okButtonProps,
okButtonProps = _ref$okButtonProps === void 0 ? {} : _ref$okButtonProps,
_ref$onCancel = _ref.onCancel,
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
_ref$onOk = _ref.onOk,
onOk = _ref$onOk === void 0 ? function () {} : _ref$onOk,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: classnames_default()(FixedButtonmodules.buttonFixed, className),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: FixedButtonmodules.buttonWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
size: "large",
className: "".concat(FixedButtonmodules.button, " mr20"),
onClick: onCancel,
children: cancelText
}), hasOkBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, objectSpread2_default()(objectSpread2_default()({
size: "large",
type: "primary",
className: "".concat(FixedButtonmodules.button, " mr20"),
loading: loading,
onClick: onOk
}, okButtonProps), {}, {
children: okText
}))]
})
});
};
/***/ }),
/***/ 7570:
/*!**********************************************************!*\
!*** ./src/pages/Paperlibrary/See/index.tsx + 2 modules ***!

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -12,6 +12,353 @@ var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 89
/* harmony default export */ __webpack_exports__["Z"] = (DownOutlined);
/***/ }),
/***/ 45983:
/*!**************************************************************************!*\
!*** ./src/components/EcListItems/Problemset/Card/index.tsx + 1 modules ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ Problemset_Card; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/radio/style/index.js + 1 modules
var style = __webpack_require__(83822);
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules
var es_radio = __webpack_require__(29924);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
var RenderHtml = __webpack_require__(12768);
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Cardmodules = ({"flexRow":"flexRow____Sm4b","flexColumn":"flexColumn___mQNZs","action":"action___QUVEn","setScore":"setScore___yZ0Yb","delete":"delete___e4taL","content":"content___jR4Y6","titleWrap":"titleWrap___zsXYY","titleNumber":"titleNumber___p60vi","score":"score___DbCHw","titleHtml":"titleHtml___FALbj","answerWrap":"answerWrap___uPjYq","answer":"answer___pfiPk","answerText":"answerText___K3TNr"});
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.tsx
// import Item from '@/pages/Forums/Index/components/Item';
var tagDotList = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
var Card = function Card(_ref) {
var index = _ref.index,
typeName = _ref.typeName,
type = _ref.type,
_ref$data = _ref.data,
data = _ref$data === void 0 ? {} : _ref$data,
inMouseId = _ref.inMouseId,
isshow = _ref.isshow,
_ref$onSetScore = _ref.onSetScore,
onSetScore = _ref$onSetScore === void 0 ? function () {} : _ref$onSetScore,
_ref$onDelete = _ref.onDelete,
onDelete = _ref$onDelete === void 0 ? function () {} : _ref$onDelete,
_ref$onMouseEnter = _ref.onMouseEnter,
_onMouseEnter = _ref$onMouseEnter === void 0 ? function () {} : _ref$onMouseEnter,
_ref$showAnswer = _ref.showAnswer,
showAnswer = _ref$showAnswer === void 0 ? false : _ref$showAnswer;
var _useState = (0,react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
isopen = _useState2[0],
setisopen = _useState2[1];
var renderSingleOrMultiple = function renderSingleOrMultiple() {
var _data$choices;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [data === null || data === void 0 ? void 0 : (_data$choices = data.choices) === null || _data$choices === void 0 ? void 0 : _data$choices.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
lineHeight: '24px',
flexShrink: 0
},
children: tagDotList[index]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.answer, " ml5"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: item === null || item === void 0 ? void 0 : item.choice_text
})
})]
}, index);
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
})]
});
};
var renderJudgment = function renderJudgment() {
var _data$choices2;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: data === null || data === void 0 ? void 0 : (_data$choices2 = data.choices) === null || _data$choices2 === void 0 ? void 0 : _data$choices2.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
disabled: true,
children: item === null || item === void 0 ? void 0 : item.choice_text
}, index);
})
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
})]
});
};
var renderProgram = function renderProgram() {
var _data$program_attr;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: data === null || data === void 0 ? void 0 : (_data$program_attr = data.program_attr) === null || _data$program_attr === void 0 ? void 0 : _data$program_attr.description
})
})
});
};
var renderCompletion = function renderCompletion() {
var _data$standard_answer;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.flexColumn, " mt15"),
children: data === null || data === void 0 ? void 0 : (_data$standard_answer = data.standard_answer) === null || _data$standard_answer === void 0 ? void 0 : _data$standard_answer.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: "\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(item.position, "\uFF09\uFF1A").concat(item.answer_text.join("、"))
}, index);
})
})
});
};
var renderSubjective = function renderSubjective() {
var _data$answer_texts;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt15",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: data === null || data === void 0 ? void 0 : (_data$answer_texts = data.answer_texts) === null || _data$answer_texts === void 0 ? void 0 : _data$answer_texts[0]
})]
})
});
};
var renderShixun = function renderShixun() {
var _data$shixun;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.answerWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt10",
children: "\u5173\u5361"
}), data === null || data === void 0 ? void 0 : (_data$shixun = data.shixun) === null || _data$shixun === void 0 ? void 0 : _data$shixun.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 font14",
children: [index + 1, ". ", item === null || item === void 0 ? void 0 : item.challenge_name]
}, index);
})]
});
};
var renderCombination = function renderCombination() {
var _data$sub_questions;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.answerWrap,
style: {
display: isopen && 'none'
},
children: data === null || data === void 0 ? void 0 : (_data$sub_questions = data.sub_questions) === null || _data$sub_questions === void 0 ? void 0 : _data$sub_questions.map(function (e, i) {
var _e$choices;
var str = "<span style=\"margin-right: 10px\">".concat(index + 1, ".").concat(i + 1, "</span><span>\uFF08\u5355\u9009\u9898\uFF09</span><span class=\"c-grey-999\">\uFF08").concat(e.score, "\u5206\uFF09</span>");
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.titleWrap,
style: {
marginTop: 16
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Cardmodules.titleHtml,
value: str + e.name
})
}), e === null || e === void 0 ? void 0 : (_e$choices = e.choices) === null || _e$choices === void 0 ? void 0 : _e$choices.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Cardmodules.flexRow, " mt15"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
lineHeight: '24px',
flexShrink: 0
},
children: tagDotList[index]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Cardmodules.answer, " ml5"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: item === null || item === void 0 ? void 0 : item.choice_text
})
})]
}, index);
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10 ".concat(Cardmodules.answerText),
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", e === null || e === void 0 ? void 0 : e.standard_answer_show]
})]
}, e === null || e === void 0 ? void 0 : e.id);
})
});
};
var renderAnswer = function renderAnswer() {
var mapping = {
'SINGLE': renderSingleOrMultiple,
'MULTIPLE': renderSingleOrMultiple,
'JUDGMENT': renderJudgment,
'PROGRAM': renderProgram,
'COMPLETION': renderCompletion,
'SUBJECTIVE': renderSubjective,
'PRACTICAL': renderShixun,
'COMBINATION': renderCombination
};
return mapping[type] ? mapping[type]() : null;
};
var getDomString = function getDomString(data, i) {
var _data$sub_questions2;
var str = "<span style=\"margin-right: -10px\">".concat(i + 1, "\u3001</span><span class=\"c-grey-999\">\uFF08").concat((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\u5171".concat(data === null || data === void 0 ? void 0 : (_data$sub_questions2 = data.sub_questions) === null || _data$sub_questions2 === void 0 ? void 0 : _data$sub_questions2.length, "\u5C0F\u9898\uFF0C") : '').concat(data.score, "\u5206\uFF09</span> ");
return str;
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onMouseEnter: function onMouseEnter() {
return _onMouseEnter(data.id);
},
children: [inMouseId === data.id && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.action,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules.setScore,
onClick: function onClick() {
return onSetScore(data.id, typeName, data === null || data === void 0 ? void 0 : data.shixun, data.score, data);
},
children: "\u8BBE\u7F6E\u5F97\u5206"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Cardmodules["delete"],
onClick: function onClick() {
return onDelete(data.id);
},
children: "\u5220\u9664"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.content,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Cardmodules.titleWrap,
style: {
justifyContent: 'space-between'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Cardmodules.titleHtml,
value: getDomString(data, index) + ((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\uFF08\u9898\u5E72\uFF09" : '') + (data.name || (data === null || data === void 0 ? void 0 : data.shixun_name))
}), (data === null || data === void 0 ? void 0 : data.item_type) === "combination" && !isshow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick(e) {
setisopen(!isopen);
},
style: {
textAlign: 'end',
flexShrink: 0
},
children: isopen ? '展开' : '收起'
})]
}), renderAnswer()]
})]
});
};
/* harmony default export */ var Problemset_Card = (Card);
/***/ }),
/***/ 36845:
/*!**********************************************************!*\
!*** ./src/components/FixedButton/index.tsx + 1 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"t": function() { return /* binding */ FixedButton; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/FixedButton/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var FixedButtonmodules = ({"buttonFixed":"buttonFixed___vyq30","button":"button___hxmYv","buttonWrap":"buttonWrap___uK8dl"});
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/FixedButton/index.tsx
var FixedButton = function FixedButton(_ref) {
var _ref$cancelText = _ref.cancelText,
cancelText = _ref$cancelText === void 0 ? '取消' : _ref$cancelText,
_ref$okText = _ref.okText,
okText = _ref$okText === void 0 ? '确定' : _ref$okText,
_ref$loading = _ref.loading,
loading = _ref$loading === void 0 ? false : _ref$loading,
_ref$hasOkBtn = _ref.hasOkBtn,
hasOkBtn = _ref$hasOkBtn === void 0 ? true : _ref$hasOkBtn,
_ref$okButtonProps = _ref.okButtonProps,
okButtonProps = _ref$okButtonProps === void 0 ? {} : _ref$okButtonProps,
_ref$onCancel = _ref.onCancel,
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
_ref$onOk = _ref.onOk,
onOk = _ref$onOk === void 0 ? function () {} : _ref$onOk,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: classnames_default()(FixedButtonmodules.buttonFixed, className),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: FixedButtonmodules.buttonWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
size: "large",
className: "".concat(FixedButtonmodules.button, " mr20"),
onClick: onCancel,
children: cancelText
}), hasOkBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, objectSpread2_default()(objectSpread2_default()({
size: "large",
type: "primary",
className: "".concat(FixedButtonmodules.button, " mr20"),
loading: loading,
onClick: onOk
}, okButtonProps), {}, {
children: okText
}))]
})
});
};
/***/ }),
/***/ 99953:

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[14599,14626],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[14599],{
/***/ 62752:
/*!*********************************************************!*\

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save