diff --git a/index.html b/index.html index 4694ba1de5..8dcb1fe85a 100644 --- a/index.html +++ b/index.html @@ -46,6 +46,6 @@
- + diff --git a/p__Classrooms__Lists__Exercise__Detail__index.4d42902c.async.js b/p__Classrooms__Lists__Exercise__Detail__index.4d42902c.async.js deleted file mode 100644 index 8f616bdb5d..0000000000 --- a/p__Classrooms__Lists__Exercise__Detail__index.4d42902c.async.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[47,4,5,6,7,9,11],{"1vsH":function(e,t,n){"use strict";n.d(t,"i",(function(){return s})),n.d(t,"k",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"h",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return b})),n.d(t,"a",(function(){return v})),n.d(t,"A",(function(){return _})),n.d(t,"z",(function(){return g})),n.d(t,"B",(function(){return h})),n.d(t,"C",(function(){return E})),n.d(t,"s",(function(){return x})),n.d(t,"r",(function(){return y})),n.d(t,"p",(function(){return w})),n.d(t,"o",(function(){return j})),n.d(t,"y",(function(){return O})),n.d(t,"j",(function(){return S})),n.d(t,"x",(function(){return q})),n.d(t,"u",(function(){return C})),n.d(t,"l",(function(){return I})),n.d(t,"w",(function(){return D})),n.d(t,"n",(function(){return T})),n.d(t,"d",(function(){return F})),n.d(t,"b",(function(){return R})),n.d(t,"t",(function(){return V})),n.d(t,"m",(function(){return L})),n.d(t,"v",(function(){return B})),n.d(t,"q",(function(){return M}));var a=n("jrin"),c=n("q1tI"),r=n.n(c),i=n("xKgJ"),o=n("aCH8"),l=n.n(o),s=["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"],u=function(e){var t,n=(t={},Object(a["a"])(t,-1,"\u91cd\u505a\u4e2d"),Object(a["a"])(t,0,"\u672a\u5f00\u542f"),Object(a["a"])(t,1,"\u672a\u901a\u5173"),Object(a["a"])(t,2,"\u6309\u65f6\u901a\u5173"),t);return n[e]||"\u8fdf\u4ea4\u901a\u5173"},d=function(e){var t,n,c,i=(t={},Object(a["a"])(t,-1,{name:"\u91cd\u505a\u4e2d",class:"c-orange"}),Object(a["a"])(t,0,{name:"\u672a\u5f00\u542f",class:"c-black"}),Object(a["a"])(t,1,{name:"\u672a\u901a\u5173",class:"c-red"}),Object(a["a"])(t,2,{name:"\u6309\u65f6\u901a\u5173",class:"c-green"}),Object(a["a"])(t,3,{name:"\u8fdf\u4ea4\u901a\u5173",class:"c-orange"}),t);return r.a.createElement("span",{className:null===i||void 0===i||null===(n=i[e.status])||void 0===n?void 0:n["class"]},null===i||void 0===i||null===(c=i[e.status])||void 0===c?void 0:c["name"])},m=function(e){var t=e.status,n={0:{class:"tag-style bg-blue ml10",name:"\u5f85\u9009\u4e2d"},1:{class:"tag-style bg-blue ml10",name:"\u5f85\u786e\u8ba4"},2:{class:"tag-style bg-pink ml10",name:"\u5df2\u786e\u8ba4"}};try{return r.a.createElement("span",{className:n[t]["class"]},n[t]["name"])}catch(a){console.log("utils.StatusGraduationProjectTags",e.status)}},p={1:"\u672a\u53d1\u5e03",2:"\u8003\u8bd5\u4e2d",3:"\u5df2\u622a\u6b62",4:"\u5df2\u7ed3\u675f"},f={1:"\u672a\u53d1\u5e03",2:"\u63d0\u4ea4\u4e2d",3:"\u5df2\u622a\u6b62",4:"\u5df2\u7ed3\u675f"},b=function(e){var t={"\u5df2\u5f00\u542f\u9632\u4f5c\u5f0a":{class:"tag-style-fzb ml10 iconfont icon-fangzuobi"},"\u516c\u5f00":{class:"tag-style bg-blue ml10"},"\u5df2\u5f00\u542f\u8865\u4ea4":{class:"tag-style bg-green ml10"},"\u672a\u5f00\u542f\u8865\u4ea4":{class:"tag-style bg-pink ml10"},"\u672a\u53d1\u5e03":{class:"tag-style bg-light-blue ml10"},"\u533f\u540d\u4f5c\u54c1":{class:"tag-style bg-cyan ml10"},"\u5df2\u9009\u62e9":{class:"tag-style bg-grey-ede ml10"},"\u5df2\u7ed3\u675f":{class:"tag-style bg-grey-ede ml10"},"\u63d0\u4ea4\u4e2d":{class:"tag-style bg-blue ml10"},"\u533f\u8bc4\u4e2d":{class:"tag-style bg-blue ml10"},"\u7533\u8bc9\u4e2d":{class:"tag-style bg-blue ml10"},"\u8003\u8bd5\u4e2d":{class:"tag-style bg-light-blue ml10"},"\u8865\u4ea4\u4e2d":{class:"tag-style bg-blue ml10"},"\u8bc4\u9605\u4e2d":{class:"tag-style bg-blue ml10"},"\u5f85\u9009\u4e2d":{class:"tag-style bg-blue ml10"},"\u4ea4\u53c9\u8bc4\u9605\u4e2d":{class:"tag-style bg-light-orange ml10"},"\u5df2\u5f00\u542f\u4ea4\u53c9\u8bc4\u9605":{class:"tag-style bg-lightblue-purple ml10"},"\u5f85\u786e\u8ba4":{class:"tag-style bg-lightblue-purple ml10"},"\u5f85\u5904\u7406":{class:"tag-style bg-lightblue-purple ml10"},"\u79c1\u6709":{class:"tag-style bg-lightblue-purple ml10"},"\u672a\u63d0\u4ea4":{class:"tag-style bg-lightblue-purple ml10"},"\u5df2\u786e\u8ba4":{class:"tag-style bg-light-pink ml10"},"\u5df2\u53d1\u5e03":{class:"tag-style bg-light-blue ml10"},"\u5df2\u622a\u6b62":{class:"tag-style bg-light-pink ml10"},"\u5f00\u53d1\u8bfe\u7a0b":{class:"tag-style bg-orange ml10"},"\u5df2\u5f00\u64ad":{class:"tag-style-border border-green c-green ml10"},"\u672a\u5f00\u64ad":{class:"tag-style-border border-light-black ml10"},"\u6309\u65f6\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u8fdf\u4ea4\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u672a\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u672a\u5f00\u542f":{class:"tag-style-border border-light-black ml10"}},n=[];e.is_random&&n.push(r.a.createElement("span",{className:"tag-style bg-blue ml10"},"\u968f\u673a"));try{e.status&&e.status.map((function(e,a){n.push(r.a.createElement("span",{key:a,className:t[e]&&t[e]["class"]},e))}))}catch(a){console.log("utils.status.tag:",a,e.status)}return n},v=function(e){var t,n,a={0:{name:"\u672a\u63d0\u4ea4",class:"c-black"},1:{name:"\u6309\u65f6\u63d0\u4ea4",class:"c-green"},2:{name:"\u5ef6\u65f6\u63d0\u4ea4",class:"c-red"}};return r.a.createElement("span",{className:null===(t=a[e.status])||void 0===t?void 0:t["class"]},null===(n=a[e.status])||void 0===n?void 0:n["name"])},_=function(e){e=new Date(e).getTime();var t=6e4,n=60*t,a=24*n,c="",r=(new Date).getTime(),i=r-e;if(i<0)return console.log("\u65f6\u95f4\u4e0d\u5bf9\u52b2,\u670d\u52a1\u5668\u521b\u5efa\u65f6\u95f4\u4e0e\u5f53\u524d\u65f6\u95f4\u4e0d\u540c\u6b65"),"\u521a\u521a";var o=parseInt(i/a,10),l=parseInt(i/n,10),s=parseInt(i/t,10);return c=o>30?""+g(e,"yyyy-MM-dd"):o>1?o+"\u5929\u524d":1==o?"\u6628\u5929":l>=1?l+"\u5c0f\u65f6\u524d":s>=5?s+"\u5206\u949f\u524d":"\u521a\u521a",c},g=function(e,t){"string"==typeof e&&(e.indexOf("T")>=0&&(e=e.replace("T"," ")),e=new Date(Date.parse(e.replace(/-/g,"/")))),e=new Date(e);var n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()},a=[["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"]];for(var c in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(w+)/.test(t)&&(t=t.replace(RegExp.$1,a[RegExp.$1.length-1][e.getDay()])),n)new RegExp("("+c+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?n[c]:("00"+n[c]).substr((""+n[c]).length)));return t},h=function(e){if(!e||e<0)return"0\u79d2";console.log("time:",e);var t=60,n=60*t,a=24*n,c=e/a,r=e/n,i=e/t;return c>=1?parseInt(c.toString())+"\u5929"+Math.floor(r%24)+"\u65f6"+Math.floor(i%60)+"\u5206"+Math.floor(e%60)+"\u79d2":r>1?parseInt(r.toString())+"\u65f6"+Math.floor(i%60)+"\u5206"+Math.floor(e%60)+"\u79d2":i>=1?parseInt(i.toString())+"\u5206"+Math.floor(e%60)+"\u79d2":Math.ceil(e)+"\u79d2"},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=0;if(e){n=e.length;for(var a=0;a=55296&&c<=56319&&(n--,a++)}}return n<=t},x=function(e,t,n){if(t){var a=/[`~!@#$%^&*()\-+=<>?:"{}|,.\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&*\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018\u2019\uff0c\u3002\u3001]/im,c=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,r=c.test(t),i=a.test(t);(!0===r||!0===i||t.length<2||t.length>=21)&&n("2-20\u4f4d\u4e2d\u82f1\u6587\u3001\u6570\u5b57\u53ca\u4e0b\u5212\u7ebf")}n()},y=function(e,t,n){if(t){var a=/[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018\u2019\uff0c\u3002\u3001]/im,c=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,r=c.test(t),i=a.test(t);(!0===r||!0===i||t.length<2||t.length>=11)&&n("2-10\u4f4d\u4e2d\u82f1\u6587\u3001\u6570\u5b57")}n()},w=function(e){if(!e)return"";for(var t=e.length-1,n="",a=0;a0){n=!1;break}return n}var A,I=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return null===t||void 0===t||null===(e=t.toString())||void 0===e?void 0:e.replace(/\B(?=(\d{3})+(?!\d))/g,",")},D=function(e){var t=document.createElement("a");t.target="_blank",document.body.appendChild(t),t.href=e;var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n),document.body.removeChild(t)},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.length<=6?e:"".concat(e.substring(0,3),"...").concat(e.substring(e.length-3,e.length))},F=function(){var e=(new Date).getHours(),t=(new Date).getMinutes();return t>=30?(e++,t="00"):t="30",e+":"+t},R=function(){var e=(new Date).getHours(),t=(new Date).getMinutes();return t>=30?(e++,t="00"):t="30",(new Date).toLocaleDateString().replace(/\//g,"-")+" "+e+":"+t};(function(e){e["Number"]="Number",e["String"]="String",e["Boolean"]="Boolean",e["Object"]="Object",e["Array"]="Array",e["Function"]="Function"})(A||(A={}));var H=function(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)},V=function(e){return H(e)===A.Array?0===e.length:H(e)===A.Object?0===Object.keys(e).length:!e},L=function(e){return e>4.5?5:e>4&&e<=4.5?4.5:e>3.5&&e<=4?4:e>3&&e<=3.5?3.5:e>2.5&&e<=3?3:e>2&&e<=2.5?2.5:e>1.5&&e<=2?2:e>1&&e<=1.5?1.5:e>.5&&e<=1?1:e>0&&e<=.5?.5:0},B=function(e){return void 0===e||null===e};var M=function(e){switch(e.container_type){case"ApplyUserAuthentication":if("Apply"===e.tiding_type){if(1===e.auth_type)return window.open("/admins/identity_authentications");if(2===e.auth_type)return window.open("/admins/professional_authentications")}return"System"===e.tiding_type?window.open("/account/certification"):void 0;case"CancelUserAuthentication":return window.open("/account/certification");case"CancelUserProCertification":return window.open("/account/certification");case"ApplyAddDepartment":return"Apply"===e.tiding_type?window.open("/admins/department_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAddSchools":return"Apply"===e.tiding_type?window.open("/admins/unit_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAction":switch(e.parent_container_type){case"ApplyShixun":if("Apply"===e.tiding_type)return window.open("/admins/shixun_authorizations");if("System"===e.tiding_type)return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"ApplySubject":if("Apply"===e.tiding_type)return window.open("/admins/subject_authorizations");if("System"===e.tiding_type)return window.open("/paths/".concat(e.parent_container_id));case"TrialAuthorization":if("Apply"===e.tiding_type)return window.open("/managements/trial_authorization");if("System"===e.tiding_type)return window.open("/account/profile")}return;case"JoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));case"StudentJoinCourse":if("Apply"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));if("System"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/students"));case"DealCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"TeacherJoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"Course":if("Delete"===e.tiding_type)return;return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"ArchiveCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"Shixun":return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"Subject":return window.open("/paths/".concat(e.container_id));case"JournalsForMessage":switch(e.parent_container_type){case"Principal":return"";case"HomeworkCommon":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):"";case"GraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):""}case"Memo":return window.open("/forums/".concat(e.parent_container_id));case"Message":return window.open("/forums/");case"Watcher":return window.open("/users/".concat(e.trigger_user.login,"/classrooms"));case"PraiseTread":return"";case"Grade":return"";case"JoinProject":return window.open("/projects/".concat(e.container_id));case"ReporterJoinProject":return window.open("/projects/".concat(e.container_id));case"DealProject":return window.open("/projects/".concat(e.container_id));case"ManagerJoinProject":return window.open("/projects/".concat(e.container_id));case"Poll":switch(e.parent_container_type){case"CommitPoll":return window.open("\t/courses/".concat(e.belong_container_id,"/polls/").concat(e.container_id));default:return window.open("\t/courses/".concat(e.belong_container_id,"/polls/").concat(e.container_id))}case"Exercise":switch(e.parent_container_type){case"CommitExercise":return window.open("\t/courses/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"));case"ExerciseScore":return window.open("\t/courses/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"));default:return window.open("/classrooms/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"))}case"StudentGraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"DealStudentTopicSelect":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"GraduationTask":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWork":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWorkScore":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.parent_container_id));case"HomeworkCommon":switch(e.parent_container_type){case"AnonymousCommentFail":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"HomeworkPublish":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"AnonymousAppeal":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));default:if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"))}case"StudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"StudentWorksScoresAppeal":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"ChallengeWorkScore":return"";case"SendMessage":return window.open("/managements/mirror_repository");case"Journal":return window.open("/issues/".concat(e.parent_container_id));case"Issue":return window.open("/issues/".concat(e.container_id));case"PullRequest":return window.open("/projects/".concat(e.parent_container_id,"/pull_requests"));case"Department":return window.open("/account/profile");case"Library":if("Apply"===e.tiding_type)return window.open("/admins/library_applies");if("System"===e.tiding_type)return window.open("/moop_cases/".concat(e.container_id));case"ProjectPackage":if("Destroyed"===e.tiding_type)return;return"Destroyed_end"===e.tiding_type?void 0:"Apply"===e.tiding_type?window.open("/admins/project_package_applies"):window.open("/crowdsourcing/".concat(e.container_id));case"Discuss":return"Hack"===e.parent_container_type&&e.extra?window.open("/myproblems/".concat(e.extra,"/comment")):window.open("/shixuns/".concat(e.identifier,"/shixun_discuss"));case"Video":return"Apply"===e.tiding_type?window.open("/admins/video_applies"):"System"===e.tiding_type?window.open("/users/".concat(null===(t=Object(i["r"])())||void 0===t?void 0:t.login,"/videos")):"";var t;case"PublicCourseStart":return window.open("/classrooms/".concat(e.container_id,"/informs"));case"SubjectStartCourse":return window.open("/paths/".concat(e.container_id));case"ResubmitStudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));case"AdjustScore":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id));case"LiveLink":return window.open("/classrooms/".concat(e.belong_container_id,"/course_videos?open=live"));case"Hack":if(e.extra&&"HackDelete"!==e.parent_container_type)return window.open("/problems/".concat(e.extra,"/edit"));default:return}}},"1w57":function(e,t,n){"use strict";n("14J3");var a=n("BMrR"),c=(n("5NDa"),n("5rEg")),r=(n("jCWc"),n("kPKH")),i=(n("5Dmo"),n("3S7+")),o=(n("+L6B"),n("2/Rp")),l=(n("giR+"),n("fyUT")),s=(n("sRBo"),n("kaz8")),u=(n("2qtc"),n("kLXV")),d=n("WmNS"),m=n.n(d),p=n("k1fw"),f=(n("miYZ"),n("tsqr")),b=n("9og8"),v=n("oBTY"),_=n("tJVT"),g=n("PpiC"),h=n("q1tI"),E=n.n(h),x=n("Ty5D"),y=n("9kvl"),w=n("V0Rq"),j=n("Ot1p"),O=n("kqOp"),k=n("7qnI"),N=n("1vsH"),S=n("YJx+"),q=n.n(S),C=n("9Bee"),A=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,d=(e.loading,e.dispatch),y=e.editData,S=e.editKey,A=e.setEditKey,I=void 0===A?function(){}:A,D=e.cancelAdd,T=void 0===D?function(){}:D,F=e.addCallback,R=void 0===F?function(){}:F,H=e.setIsClaer,V=void 0===H?function(){}:H,L=(Object(g["a"])(e,["problemset","globalSetting","exercise","loading","dispatch","editData","editKey","setEditKey","cancelAdd","addCallback","setIsClaer"]),Object(h["useState"])("")),B=Object(_["a"])(L,2),M=B[0],P=B[1],W=Object(h["useState"])(""),Y=Object(_["a"])(W,2),z=Y[0],G=(Y[1],Object(h["useState"])([])),J=Object(_["a"])(G,2),K=J[0],Q=J[1],X=Object(h["useState"])(""),Z=Object(_["a"])(X,2),U=Z[0],$=Z[1],ee=Object(h["useState"])(),te=Object(_["a"])(ee,2),ne=te[0],ae=te[1],ce=Object(h["useState"])(!1),re=Object(_["a"])(ce,2),ie=re[0],oe=re[1],le=Object(h["useState"])(2),se=Object(_["a"])(le,2),ue=se[0],de=se[1],me=Object(h["useState"])(!1),pe=Object(_["a"])(me,2),fe=pe[0],be=pe[1],ve=Object(x["m"])();Object(h["useEffect"])((function(){if(!(null===y||void 0===y?void 0:y.question_title))return be(!0),P(""),ae(!1),de(2),Q([]),$(""),void oe(!1);P(null===y||void 0===y?void 0:y.question_title),ae(null===y||void 0===y?void 0:y.is_ordered),de(null===y||void 0===y?void 0:y.question_score);var e=null===y||void 0===y?void 0:y.standard_answer.map((function(e){return e.answer_text}));Q(Object(v["a"])(e))}),[y]),Object(h["useEffect"])((function(){oe(!1)}),[fe]),Object(h["useImperativeHandle"])(t,(function(){return{onSave:_e,isEdit:fe}}));var _e=function(){var e=Object(b["a"])(m.a.mark((function e(){var t,n,a;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=[],n=!1,K.forEach((function(e,a){t.push({choice_id:a+1,answer_text:[]}),e.forEach((function(e,c){t[a].answer_text.push(e),e&&Object(N["C"])(e,1e4)||($("".concat(a,"-").concat(c)),f["b"].info(e?"\u7b54\u6848\u4e0d\u80fd\u8d85\u8fc710000\u5b57\u7b26":"\u7b54\u6848\uff1a\u4e0d\u80fd\u4e3a\u7a7a"),n=!0)}))})),!n){e.next=5;break}return e.abrupt("return",!1);case 5:if(!y.question_id){e.next=11;break}return e.next=8,d({type:"exercise/editExerciseQuestion",payload:{id:y.question_id,question_title:M,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t}});case 8:a=e.sent,e.next=14;break;case 11:return e.next=13,d({type:"exercise/addExerciseQuestion",payload:{insert_id:null===y||void 0===y?void 0:y.insert_id,categoryId:ve.categoryId,question_title:M,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t}});case 13:a=e.sent;case 14:return 0===a.status&&(I(-1),f["b"].success("\u4fdd\u5b58\u6210\u529f"),be(!1),d({type:"exercise/editExercise",payload:Object(p["a"])({},ve)})),e.abrupt("return",{name:M,analysis:z,standard_answers:t,is_ordered:ne});case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ge=function(e,t,n){var a=K.slice();if(t&&a.splice(e,t),S===y.key){if(n&&ie||!y.question_id)for(var c=0;c1&&E.a.createElement("span",null,E.a.createElement(s["a"],{checked:ne,onChange:function(e){return ae(e.target.checked)},className:"".concat(q.a.color333," font14")},"\u591a\u4e2a\u586b\u7a7a\u7684\u7b54\u6848\u6709\u987a\u5e8f\u8981\u6c42"),E.a.createElement("span",{className:"".concat(q.a.color999," font12")},"\uff08\u9009\u4e2d\uff0c\u6bcf\u4e2a\u586b\u7a7a\u7684\u7b54\u6848\u987a\u5e8f\u5fc5\u987b\u4e0e\u53c2\u8003\u7b54\u6848\u4e00\u81f4\uff09"))),E.a.createElement("p",{className:""},"\u5206\u503c\uff1a",E.a.createElement(l["a"],{value:ue,max:1e4,min:0,onChange:function(e){de(e)}})," \u5206"),E.a.createElement("aside",{className:"tr"},(-1!==S||y.question_id)&&E.a.createElement(o["a"],{type:"default",onClick:function(){T(),be(!1)}},"\u53d6\u6d88"),E.a.createElement(o["a"],{className:"ml20",type:"primary",onClick:function(){_e()}},"\u4fdd\u5b58")))},je=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4e0a\u79fb",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4e0b\u79fb",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"(\u5411\u4e0b\u63d2\u5165\u586b\u7a7a\u9898)",icon:"iconfont c-green ml30 icon-tianjia current",id:"add"},{name:"\u7f16\u8f91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}].filter((function(e){var t,a;return 1===(null===n||void 0===n||null===(t=n.editData)||void 0===t||null===(a=t.exercise)||void 0===a?void 0:a.exercise_status)?e:"\u5220\u9664"!==e.name})),Oe=function(){var e=Object(b["a"])(m.a.mark((function e(t){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t.id,e.next="del"===e.t0?3:"up"===e.t0||"down"===e.t0?5:"edit"===e.t0?9:"add"===e.t0?11:16;break;case 3:return u["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u786e\u8ba4\u8981\u5220\u9664\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f",onOk:function(){return Object(b["a"])(m.a.mark((function e(){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(w["i"])({id:y.question_id});case 2:d({type:"exercise/editExercise",payload:Object(p["a"])({},ve)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",16);case 5:return e.next=7,d({type:"exercise/exeriseMoveUpDown",payload:{id:y.question_id,opr:t.id}});case 7:return d({type:"exercise/editExercise",payload:Object(p["a"])({},ve)}),e.abrupt("break",16);case 9:return-1!==S?f["b"].error("\u8bf7\u5148\u4fdd\u5b58\u6216\u53d6\u6d88\u5f53\u524d\u6b63\u5728\u7f16\u8f91\u7684\u95ee\u9898\u3002"):(V(!1),I(y.key),be(!0)),e.abrupt("break",16);case 11:if(-1===S){e.next=14;break}return f["b"].error("\u8bf7\u5148\u4fdd\u5b58\u6216\u53d6\u6d88\u5f53\u524d\u6b63\u5728\u7f16\u8f91\u7684\u95ee\u9898\u3002"),e.abrupt("return");case 14:return R({key:y.key,insert_id:null===y||void 0===y?void 0:y.question_id,question_type:3}),e.abrupt("break",16);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ke=function(){var e;return E.a.createElement("aside",null,E.a.createElement("div",{className:q.a.questionType},E.a.createElement("div",null,E.a.createElement("span",{className:"font16 c-blue"},y.key,"\u3001\u586b\u7a7a\u9898"),"\uff08",y.question_score,"\u5206\uff09"),!y.hideAction&&je.map((function(e,t){return"up"===e.id&&1===y.key||"down"===e.id&&y.key===y.len?null:E.a.createElement(i["a"],{key:t,placement:"bottom",title:e.name},E.a.createElement("span",{onClick:function(){return Oe(e)},className:e.icon}))}))),E.a.createElement("div",{className:"mt5"},E.a.createElement(C["a"],{value:y.question_title||""})),E.a.createElement("div",{className:q.a.questionChoices},null===y||void 0===y||null===(e=y.standard_answer)||void 0===e?void 0:e.map((function(e,t){return E.a.createElement(a["a"],{key:t,align:"middle"},E.a.createElement(r["a"],null,"\u7b54\u6848\uff08\u586b\u7a7a",e.choice_id,"\uff09\uff1a"),E.a.createElement(r["a"],{flex:"1"},E.a.createElement(a["a"],{align:"middle",gutter:[1,1]},e.answer_text.map((function(e,n){return E.a.createElement(r["a"],{span:24,key:n},E.a.createElement(c["a"],{key:t,checked:y.standard_answer.includes(t),disabled:!0,value:e}))})))))}))))};return E.a.createElement("section",{className:q.a.wrap},!fe&&ke(),fe&&we())};t["a"]=Object(y["a"])((function(e){var t=e.problemset,n=e.loading,a=e.exercise,c=e.globalSetting;return{problemset:t,globalSetting:c,exercise:a,loading:n.effects}}),null,null,{forwardRef:!0})(Object(h["forwardRef"])(A))},"2JKx":function(e,t,n){e.exports={flex_box_center:"flex_box_center___21flX",flex_space_between:"flex_space_between___hkcwT",flex_box_vertical_center:"flex_box_vertical_center___1JAyR",flex_box_center_end:"flex_box_center_end___2trjo",flex_box_column:"flex_box_column___2q5e9",form:"form___1j7IG",efficiency:"efficiency___KDh-I"}},"51gm":function(e,t,n){e.exports={title:"title___1NT0J"}},"7ahc":function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var a=n("k1fw"),c=n("0Owb"),r=(n("+L6B"),n("2/Rp")),i=(n("y8nQ"),n("Vl3Y")),o=n("tJVT"),l=(n("OaEy"),n("2fM7")),s=n("q1tI"),u=n.n(s),d=n("VrN/"),m=n.n(d),p=(n("p77/"),l["a"].Option),f={labelCol:{span:4},wrapperCol:{span:20}},b={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function v(e){var t=e.value,n=e.onChange,c=e.mode,r=e.options,i=void 0===r?{}:r,l=Object(s["useRef"])(),d=Object(s["useState"])(),p=Object(o["a"])(d,2),f=p[0],b=p[1];return Object(s["useEffect"])((function(){if(f){var e=function(e){var t=e.getValue();n&&n(t)};return f.on("change",e),function(){f.off("change",e)}}}),[f,n]),Object(s["useEffect"])((function(){f&&f.setOption("mode",c)}),[f,c]),Object(s["useEffect"])((function(){f&&t!==f.getValue()&&f.setValue(t||"")}),[f,t]),Object(s["useEffect"])((function(){if(l.current&&!f){var e=m.a.fromTextArea(l.current,Object(a["a"])({mode:c,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0},i));b(e)}}),[l.current,f]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t["b"]=function(e){var t=e.callback,n=e.onCancel,a=Object(s["useState"])("python"),d=Object(o["a"])(a,2),m=d[0],_=d[1];function g(e){_(b[e][1])}function h(e){t(e)}return u.a.createElement(i["a"],Object(c["a"])({},f,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:h}),u.a.createElement(i["a"].Item,{label:"\u4ee3\u7801\u8bed\u8a00",name:"language"},u.a.createElement(l["a"],{onChange:g},Object.keys(b).map((function(e){return u.a.createElement(p,{key:e,value:e},b[e][0])})))),u.a.createElement(i["a"].Item,{label:"\u4ee3\u7801\u5185\u5bb9",name:"content",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u4ee3\u7801\u5185\u5bb9"}]},u.a.createElement(v,{mode:m})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(r["a"],{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786e\u5b9a"),u.a.createElement(r["a"],{type:"ghost",onClick:n},"\u53d6\u6d88")))}},"7qnI":function(e,t,n){"use strict";n("5Dmo");var a=n("3S7+"),c=n("fWQN"),r=n("mtLc"),i=n("yKVA"),o=n("879j"),l=(n("5NDa"),n("5rEg")),s=n("q1tI"),u=n.n(s),d=n("O2Wb"),m=n.n(d),p=l["a"].TextArea,f=function(e){Object(i["a"])(n,e);var t=Object(o["a"])(n);function n(){return Object(c["a"])(this,n),t.apply(this,arguments)}return Object(r["a"])(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.index,c=t.onAnswerChange,r=t.addChildAnswer,i=t.exerciseIsPublish,o=t.answers,l=t.activeOptionErrorIndex;return u.a.createElement("div",{className:m.a.flex},u.a.createElement("div",{className:"".concat(m.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7b54\u6848(\u586b\u7a7a",n+1,"):"),u.a.createElement("div",{className:"".concat(m.a.flex," ").concat(m.a.flex1),style:{flexDirection:"column"}},o.map((function(t,s){var d="".concat(n,"-").concat(s);return u.a.createElement("div",{className:"".concat(m.a.flex," ").concat(m.a.flex1),key:s},u.a.createElement("div",{className:m.a.flex1,style:{flex:"0 0 1000px"}},u.a.createElement("div",null,u.a.createElement(p,{className:d===l?m.a.error:"",spellCheck:!1,rows:4,value:t||"",defaultValue:"\u8bf7\u8f93\u5165\u53c2\u8003\u7b54\u6848".concat(0==s?"":"(\u53ef\u9009)"),onChange:function(e){return c(n,s,e.target.value)},style:{minHeight:95}}))),!i&&u.a.createElement(u.a.Fragment,null,0!=s&&u.a.createElement(a["a"],{title:"\u5220\u9664"},u.a.createElement("i",{className:"".concat(m.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return e.props.deleteChildAnswer(n,s)},style:{float:"right"}})),0===s&&u.a.createElement(a["a"],{title:"\u5220\u9664"},u.a.createElement("i",{className:"".concat(m.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return e.props.deleteChildAnswermain(n,s)},style:{float:"right"}})),u.a.createElement(a["a"],{title:"\u65b0\u589e\u53c2\u8003\u7b54\u6848"},u.a.createElement("i",{className:"".concat(m.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return r(n)},style:{float:"right",visibility:s==o.length-1?"":"hidden"}}))))}))))}}]),n}(s["Component"]);t["a"]=f},"8RY0":function(e,t,n){"use strict";n("+L6B");var a=n("2/Rp"),c=(n("giR+"),n("fyUT")),r=n("oBTY"),i=(n("14J3"),n("BMrR")),o=(n("jCWc"),n("kPKH")),l=(n("sRBo"),n("kaz8")),s=(n("5Dmo"),n("3S7+")),u=(n("2qtc"),n("kLXV")),d=n("WmNS"),m=n.n(d),p=n("k1fw"),f=(n("miYZ"),n("tsqr")),b=n("9og8"),v=n("tJVT"),_=n("PpiC"),g=n("q1tI"),h=n.n(g),E=n("Ty5D"),x=n("9kvl"),y=n("V0Rq"),w=n("Ot1p"),j=n("9Bee"),O=n("YJx+"),k=n.n(O),N=["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"],S=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,d=(e.loading,e.dispatch),x=(e.onRef,e.editData),O=e.cancelAdd,S=void 0===O?function(){}:O,q=e.editKey,C=e.setEditKey,A=void 0===C?function(){}:C,I=e.setIsClaer,D=void 0===I?function(){}:I,T=e.addCallback,F=void 0===T?function(e){}:T,R=(Object(_["a"])(e,["problemset","globalSetting","exercise","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","setIsClaer","addCallback"]),Object(g["useState"])([])),H=Object(v["a"])(R,2),V=H[0],L=H[1],B=Object(g["useState"])(),M=Object(v["a"])(B,2),P=M[0],W=M[1],Y=Object(g["useState"])([]),z=Object(v["a"])(Y,2),G=z[0],J=z[1],K=Object(g["useState"])(""),Q=Object(v["a"])(K,2),X=Q[0],Z=Q[1],U=Object(g["useState"])(5),$=Object(v["a"])(U,2),ee=$[0],te=$[1],ne=Object(g["useState"])(!1),ae=Object(v["a"])(ne,2),ce=ae[0],re=ae[1],ie=Object(E["m"])();Object(g["useEffect"])((function(){L(["","","",""])}),[]),Object(g["useEffect"])((function(){if(!(null===x||void 0===x?void 0:x.question_choices))return re(!0),Z(""),te(5),L(["","","",""]),void J([]);Z(null===x||void 0===x?void 0:x.question_title),te(parseInt(null===x||void 0===x?void 0:x.question_score)),L(null===x||void 0===x?void 0:x.question_choices.map((function(e){return e.choice_text})));var e=[];null===x||void 0===x||x.standard_answer.map((function(t,n){e.push(t-1)})),J(e)}),[x]),Object(g["useImperativeHandle"])(t,(function(){return{onSave:oe,isEdit:ce}}));var oe=function(){var e=Object(b["a"])(m.a.mark((function e(){var t,n,a;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(X){e.next=3;break}return f["b"].info("\u8bf7\u60a8\u8f93\u5165\u9898\u76ee"),e.abrupt("return",!1);case 3:if(t=V.findIndex((function(e){return!e})),!(t>-1)){e.next=7;break}return f["b"].info("\u8bf7\u5148\u8f93\u5165 ".concat(N[t]," \u9009\u9879\u7684\u5185\u5bb9")),e.abrupt("return",!1);case 7:if(G.length){e.next=10;break}return f["b"].info("\u8bf7\u8bbe\u7f6e\u672c\u9898\u7684\u6b63\u786e\u7b54\u6848\uff0c\u70b9\u51fb\u9009\u9879A/B...\u5373\u53ef\u5b8c\u6210\u8bbe\u7f6e"),e.abrupt("return",!1);case 10:if(!(G.length<1)){e.next=13;break}return f["b"].info("\u8bf7\u9009\u62e9\u7b54\u6848"),e.abrupt("return",!1);case 13:if(n=V.map((function(e,t){return{choice_text:e,is_answer:G.includes(t)?t+1:0}})),!x.question_id){e.next=20;break}return e.next=17,d({type:"exercise/editExerciseQuestion",payload:{id:x.question_id,question_title:X,question_type:1,question_score:ee,question_choices:n.map((function(e){return e.choice_text})),standard_answers:n.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))}});case 17:a=e.sent,e.next=23;break;case 20:return e.next=22,d({type:"exercise/addExerciseQuestion",payload:{insert_id:null===x||void 0===x?void 0:x.insert_id,categoryId:ie.categoryId,question_title:X,question_type:1,question_score:ee,question_choices:n.map((function(e){return e.choice_text})),standard_answers:n.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))}});case 22:a=e.sent;case 23:0===a.status&&(A(-1),f["b"].success("\u4fdd\u5b58\u6210\u529f"),re(!1),d({type:"exercise/editExercise",payload:Object(p["a"])({},ie)}));case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4e0a\u79fb",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4e0b\u79fb",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"(\u5411\u4e0b\u63d2\u5165\u591a\u9009\u9898)",icon:"iconfont c-green ml30 icon-tianjia current",id:"add"},{name:"\u7f16\u8f91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}].filter((function(e){var t,a;return 1===(null===n||void 0===n||null===(t=n.editData)||void 0===t||null===(a=t.exercise)||void 0===a?void 0:a.exercise_status)?e:"\u5220\u9664"!==e.name})),se=function(){var e=Object(b["a"])(m.a.mark((function e(t){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t.id,e.next="del"===e.t0?3:"up"===e.t0||"down"===e.t0?5:"edit"===e.t0?9:"add"===e.t0?11:16;break;case 3:return u["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u786e\u8ba4\u8981\u5220\u9664\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f",onOk:function(){return Object(b["a"])(m.a.mark((function e(){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(y["i"])({id:x.question_id});case 2:d({type:"exercise/editExercise",payload:Object(p["a"])({},ie)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",16);case 5:return e.next=7,d({type:"exercise/exeriseMoveUpDown",payload:{id:x.question_id,opr:t.id}});case 7:return d({type:"exercise/editExercise",payload:Object(p["a"])({},ie)}),e.abrupt("break",16);case 9:return-1!==q?f["b"].error("\u8bf7\u5148\u4fdd\u5b58\u6216\u53d6\u6d88\u5f53\u524d\u6b63\u5728\u7f16\u8f91\u7684\u95ee\u9898\u3002"):(D(!1),A(x.key),re(!0)),e.abrupt("break",16);case 11:if(-1===q){e.next=14;break}return f["b"].error("\u8bf7\u5148\u4fdd\u5b58\u6216\u53d6\u6d88\u5f53\u524d\u6b63\u5728\u7f16\u8f91\u7684\u95ee\u9898\u3002"),e.abrupt("return");case 14:return F({key:x.key,insert_id:null===x||void 0===x?void 0:x.question_id,question_type:1}),e.abrupt("break",16);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e;return h.a.createElement("aside",null,h.a.createElement("div",{className:k.a.questionType},h.a.createElement("div",null,h.a.createElement("span",{className:"font16 c-blue"},x.key,"\u3001\u591a\u9009\u9898"),"\uff08",x.question_score,"\u5206\uff09"),!x.hideAction&&le.map((function(e,t){return"up"===e.id&&1===x.key||"down"===e.id&&x.key===x.len?null:h.a.createElement(s["a"],{key:t,placement:"bottom",title:e.name},h.a.createElement("span",{onClick:function(){return se(e)},className:e.icon}))}))),h.a.createElement("div",{className:"mt5"},h.a.createElement(j["a"],{value:x.question_title})),h.a.createElement("div",{className:k.a.questionChoices},null===x||void 0===x||null===(e=x.question_choices)||void 0===e?void 0:e.map((function(e,t){return h.a.createElement(i["a"],null,h.a.createElement(o["a"],null,h.a.createElement(l["a"],{key:t,checked:x.standard_answer.includes(t+1),disabled:!0},N[t],".")),h.a.createElement(o["a"],{flex:"1"},h.a.createElement("span",{className:"c-black font14"},h.a.createElement(j["a"],{value:e.choice_text}))))}))))},de=function(){return h.a.createElement("aside",null,h.a.createElement("div",{className:k.a.questionType},h.a.createElement("div",null,h.a.createElement("span",{className:"font16 c-blue"},"\u9009\u62e9\u9898"),"\uff08\u5ba2\u89c2\u9898\uff0c\u7531\u7cfb\u7edf\u81ea\u52a8\u8bc4\u5206\uff0c\u8bf7\u8bbe\u7f6e\u6807\u51c6\u7b54\u6848\uff09")),h.a.createElement("p",{className:k.a.titleWrap},h.a.createElement("span",{className:k.a.required},"*"),h.a.createElement("span",{className:k.a.title},"\u9898\u5e72\uff1a")),h.a.createElement(w["a"],{id:"single-question-title",watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u9898\u5e72",defaultValue:X,onChange:function(e){return Z(e)}}),h.a.createElement("p",{className:k.a.titleWrap},h.a.createElement("span",{className:k.a.required},"*"),h.a.createElement("span",{className:k.a.title},"\u7b54\u6848\u9009\u9879\uff1a",h.a.createElement("span",{className:k.a.colorGray},"\u70b9\u51fb\u9009\u9879\u53ef\u8bbe\u7f6e\u6b63\u786e\u7b54\u6848"))),V.map((function(e,t){var a,c;return h.a.createElement("div",{className:k.a.choiceWrap,key:t},h.a.createElement(s["a"],{title:"\u70b9\u51fb\u8bbe\u7f6e\u4e3a\u6807\u51c6\u7b54\u6848",placement:"left"},h.a.createElement("div",{className:"".concat(k.a.answer," ").concat(G.includes(t)?k.a.activeAnswer:""),onClick:function(){G.includes(t)?J(G.filter((function(e){return e!==t}))):J([].concat(Object(r["a"])(G),[t]))}},N[t])),h.a.createElement("div",{className:k.a.editorWrap},P===t?h.a.createElement(w["a"],{id:"single-question-option-".concat(t),watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u9009\u9879",defaultValue:e,onChange:function(e){V[t]=e,L(V)}}):h.a.createElement("div",{className:k.a.htmlWrap,onClick:function(){return W(t)}},h.a.createElement(j["a"],{value:e}))),1===(null===(a=n.editData)||void 0===a||null===(c=a.exercise)||void 0===c?void 0:c.exercise_status)&&h.a.createElement(h.a.Fragment,null,t>1&&h.a.createElement(s["a"],{title:"\u5220\u9664"},h.a.createElement("i",{className:"".concat(k.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return L(V.filter((function(e,n){return n!==t})))}})),t<7&&t===V.length-1&&h.a.createElement(s["a"],{title:"\u65b0\u589e\u53c2\u8003\u7b54\u6848"},h.a.createElement("i",{className:"".concat(k.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return L([].concat(Object(r["a"])(V),[""]))}}))))})),h.a.createElement("p",{className:"c-orange"},"\u6e29\u99a8\u63d0\u793a\uff1a\u70b9\u51fb\u9009\u9879\u8f93\u5165\u6846\u53ef\u8bbe\u7f6e\u7b54\u6848\uff1b\u9009\u4e2d\u7684\u9009\u9879\u5373\u4e3a\u6b63\u786e\u7b54\u6848\uff0c\u9009\u62e9\u591a\u4e2a\u7b54\u6848\u5373\u4e3a\u591a\u9009\u9898"),h.a.createElement("p",{className:""},"\u5206\u503c\uff1a",h.a.createElement(c["a"],{value:ee,max:1e4,min:0,onChange:function(e){te(e)}})," \u5206"),h.a.createElement("aside",{className:"tr"},(-1!==q||x.question_id)&&h.a.createElement(a["a"],{type:"default",onClick:function(){S(),re(!1)}},"\u53d6\u6d88"),h.a.createElement(a["a"],{className:"ml20",type:"primary",onClick:function(){oe()}},"\u4fdd\u5b58")))};return h.a.createElement("section",{className:k.a.wrap},!ce&&ue(),ce&&de())};t["a"]=Object(x["a"])((function(e){var t=e.problemset,n=e.loading,a=e.exercise,c=e.globalSetting;return{problemset:t,globalSetting:c,exercise:a,loading:n.effects}}),null,null,{forwardRef:!0})(Object(g["forwardRef"])(S))},"9Bee":function(e,t,n){"use strict";var a=n("q1tI"),c=n.n(a),r=(n("vg9a"),n("tJVT")),i=n("DlQD"),o=n.n(i),l=n("rUJ1");function s(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var a=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);if(null===t)return e;var n=Object(r["a"])(t,1),c=n[0];return c.length>=a.length?e.slice(a.length):e})).join("\n")}var u=[],d=["