|
|
(self.webpackChunk=self.webpackChunk||[]).push([[292,4977,39752],{66455:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var e={},n="5.0",t={},i=null,r=!1,l=!1,s=null,o=!1,a=null,c=null,d=0;d<arguments.length;d++){var u=arguments[d];if(null!==u)switch(_typeof(u)){case"number":n=u.toFixed(1);break;case"string":u.match(new RegExp("^[0-9]\\.[0-9]+$"))?n=u:s=u;break;case"object":void 0!==u.is3D?i=u:t=u;break;case"boolean":r=u,l=!0}}null===i&&(i={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},void 0===t.material_id||l||(r=!0)),null!==s&&void 0===t.id&&(t.id=s);var p="",m=!1,h=null,f=null,v=null,x=!1,g=null,_=null,y=null;void 0!==t.height&&(t.height=Math.round(t.height)),void 0!==t.width&&(t.width=Math.round(t.width));var j=function(e){return parseFloat(e)>4?parseFloat(e):5};function b(){try{return window.self!==window.top}catch(e){return!0}}function w(){return(!t.hasOwnProperty("screenshotGenerator")||!t.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,n){c=e,L(e,n)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,n){var t=parseFloat(e);NaN!==t&&t<5?console.log("The GeoGebra HTML5 codebase version "+t+" is deprecated. Using version latest instead."):(a=e,M(e,n))},e.getHTML5CodebaseVersion=function(){return f},e.getParameters=function(){return t},e.setFontsCSSURL=function(e){y=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function n(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var i,r="auto",l=t.id,s=!1,a=0;a<arguments.length;a++){var c=arguments[a];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?r=c:l=arguments[a]:"boolean"==typeof c?s=c:c instanceof HTMLElement&&(i=c)}function d(){if(o){r=E(r);var a=i||document.getElementById(l);if(a)if(e.removeExistingApplet(a,!1),void 0===t.width&&a.clientWidth&&(t.width=a.clientWidth),void 0===t.height&&a.clientHeight&&(t.height=a.clientHeight),t.width&&t.height||"html5"!==r||(delete t.width,delete t.height),h=r,"screenshot"===r)P(a,t);else{var c=!1;t.hasOwnProperty("playButton")&&t.playButton||t.hasOwnProperty("clickToLoad")&&t.clickToLoad?c=!0:t.hasOwnProperty("playButtonAutoDecide")&&t.playButtonAutoDecide&&(c=(!b()||n())&&w()),c?(h="screenshot",T(a,t,s,r)):S(a,t,s)}else console.log("possibly bug on ajax loading? ")}else setTimeout(d,200)}d()},e.getViews=function(){return i},e.isJavaInstalled=function(){return!1};var k=function(n){var r=function(){t.onError&&t.onError(),O("Error: Fetching material (id "+t.material_id+") failed.",t)},l=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",s="/materials/"+t.material_id+"?scope=basic";C("https://"+l+"/api/proxy.php?path="+encodeURIComponent(s),(function(l){var s=JSON.parse(l),o=s.elements?s.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:s;if(o&&o.url){t.fileName=o.url,N(o.settings||{}),i.is3D=!0;var a="https://www.geogebra.org/images/";e.setPreviewImage(g||o.previewUrl,a+"GeoGebra_loading.png",a+"applet_play.png"),n()}else r()}),r)};function N(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(n){e[n]=!!e[n]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(n){void 0===t[n]&&void 0!==e[n]&&(t[n]=e[n])})),void 0===t.showToolBarHelp&&(t.showToolBarHelp=t.showToolBar)}function C(e,n,t){var i=new XMLHttpRequest;i.open("GET",e),i.onload=function(){n(i.responseText)},i.onerror=t,i.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return h},e.setPreviewImage=function(e,n,t){g=e,_=n,t},e.removeExistingApplet=function(e,n){var i;"string"==typeof e&&(e=document.getElementById(e)),h=null;var r=null;for(i=0;i<e.childNodes.length;i++){var l=e.childNodes[i],s=l.className;"applet_screenshot"===s?n?(l.style.display="block",h="screenshot"):l.style.display="none":"applet_scaler prerender"!==s&&(e.removeChild(l),r=s&&-1!=s.indexOf("appletParameters")?l.id:null,i--)}var o=void 0!==t.id?t.id:r,a=window[o];a&&"function"==typeof a.getBase64&&(a.remove(),window[o]=null)},e.refreshHitPoints=function(){if(j(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var n=e.getAppletObject();return!(!n||"function"!=typeof n.recalculateEnvironments)&&(n.recalculateEnvironments(),!0)},e.startAnimation=function(){var n=e.getAppletObject();return!(!n||"function"!=typeof n.startAnimation)&&(n.startAnimation(),!0)},e.stopAnimation=function(){var n=e.getAppletObject();return!(!n||"function"!=typeof n.stopAnimation)&&(n.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==t.id?t.id:"ggbApplet";return window[e]},e.resize=function(){};var Z=function(e){return e&&"false"!==e},S=function(n,t,i){j(f)<=4.2&&(i=!0);var r=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==f||ggbHTML5LoadedCodebaseIsWebSimple&&!x)&&(r=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var l=document.createElement("div");l.classList.add("appletParameters","notranslate");var s=t.width,o=t.height;if(t.disableAutoScale=void 0===t.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():t.disableAutoScale,void 0!==t.width)if(j(f)<=4.4)Z(t.showToolBar)&&(t.height-=7),Z(t.showAlgebraInput)&&(t.height-=37),t.width<605&&Z(t.showToolBar)&&(t.width=605,s=605);else{var d=100;(Z(t.showToolBar)||Z(t.showMenuBar))&&(t.hasOwnProperty("customToolBar")&&(t.customToolbar=t.customToolBar),d=Z(t.showMenuBar)?245:155),s<d&&(t.width=d,s=d)}for(var u in l.style.border="none",l.style.display="inline-block",t)t.hasOwnProperty(u)&&"appletOnLoad"!==u&&l.setAttribute("data-param-"+u,t[u]);y&&l.setAttribute("data-param-fontscssurl",y),e.resize=function(){GGBAppletUtils.responsiveResize(n,t)},window.addEventListener("resize",(function(n){e.resize()}));var m="function"==typeof t.appletOnLoad?t.appletOnLoad:function(){};if(i||void 0===t.width){var h=document.createElement("div");h.className="applet_scaler",h.style.position="relative",h.style.display="block",h.appendChild(l),n.appendChild(h),t.appletOnLoad=function(n){e.resize(),m(n)}}else{t.hasOwnProperty("showSplash")||l.setAttribute("data-param-showSplash","false");var g=n.querySelector(".applet_scaler.prerender"),_=null!==g;if(_)b=g.querySelector(".ggb_preview");else{var b=A(s,o,t.borderColor,!1);(g=document.createElement("div")).className="applet_scaler",g.style.position="relative",g.style.display="block",g.style.width=s+"px",g.style.height=o+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(g,"66%"),j(f)>=5?(t.appletOnLoad=function(e){var t=n.querySelector(".ggb_preview");t&&t.parentNode.removeChild(t),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(g),window.GGBT_wsf_view&&$(window).trigger("resize"),m(e)},_||g.appendChild(b)):l.appendChild(b),g.appendChild(l),_||n.appendChild(g),setTimeout((function(){e.resize()}),1)}function w(e,n){n&&"function"==typeof n.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,n.appletOnLoad):renderGGBElement(e),O("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",n)}function k(e,n){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:n}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){w(e.article,e.params)})),html5AppletsToProcess=null)},j(f)<5&&(e.className+=" geogebraweb")):w(e,n)}if(r){scriptLoadStarted=!0;for(var N=0;N<l.childNodes.length;N++){"TABLE"===l.childNodes[N].tagName&&(l.removeChild(l.childNodes[N]),N--)}if(null!==ggbHTML5LoadedScript){var C=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=C&&C.parentNode.removeChild(C)}var S=document.createElement("script"),P=function(){k(l,t)};S.src=p+v,ggbHTML5LoadedCodebaseIsWebSimple=x,ggbHTML5LoadedCodebaseVersion=f,ggbHTML5LoadedScript=S.src,O("GeoGebra HTML5 codebase loaded: '"+p+"'.",t),c||a&&"5.0"!=a?p.requirejs?__webpack_require__.e(5783).then(function(){var e=[__webpack_require__(5783)];P.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(S.onload=P,n.appendChild(S)):(x?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),P())}else k(l,t);t.height=o,t.width=s},P=function(n,t,i){var r=A(t.width,t.height,t.borderColor,i),l=document.createElement("div");l.style.position="relative",l.style.display="block",l.style.width=t.width+"px",l.style.height=t.height+"px",l.className="applet_screenshot applet_scaler"+(i?" applet_screenshot_play":""),l.appendChild(r);var s=GGBAppletUtils.getScale(t,n,i);i?(n.appendChild(B()),window.GGBT_wsf_view||(n.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(l,"66%"),n.appendChild(l),1===s||isNaN(s)||(GGBAppletUtils.scaleElement(l,s),l.style.width=t.width+"px",l.style.height=t.height+"px",l.parentNode.style.width=t.width*s+"px",l.parentNode.style.height=t.height*s+"px"),e.resize=function(){I(n,r,l,i)},window.addEventListener("resize",(function(n){e.resize()})),e.resize()};function I(e,n,i,r){if(e.contains(n)){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if("fullscreencontent"!==e.id)return;window.GGBT_wsf_view.setCloseBtnPosition(e)}var l=GGBAppletUtils.getScale(t,e,r);null!==i.parentNode&&(isNaN(l)||1===l?(GGBAppletUtils.scaleElement(i,1),i.parentNode.style.width=t.width+"px",i.parentNode.style.height=t.height+"px"):(GGBAppletUtils.scaleElement(i,l),i.parentNode.style.width=t.width*l+"px",i.parentNode.style.height=t.height*l+"px")),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(e),"object"===_typeof(window.GGBT_ws_header_footer)&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}e.onExitFullscreen=function(e,n){n.appendChild(e)};var T=function(e,n,t,i){P(e,n,!0);for(var r=function(){var t=[];for(s=0;s<e.childNodes.length;s++)t.push(e.childNodes[s]);if(window.GGBT_wsf_view){var r=window.GGBT_wsf_view.renderFullScreen(e,n.id),l=document.getElementById("fullscreencontainer"),o=jQuery(e).find(".fullscreencontent");o.length>0?(r.remove(),o.attr("id","fullscreencontent").show(),jQuery(l).append(o),window.dispatchEvent(new Event("resize"))):S(r,n,!1),window.GGBT_wsf_view.launchFullScreen(l)}else h=i,S(e,n,!1);if(!window.GGBT_wsf_view)for(s=0;s<t.length;s++)e.removeChild(t[s])},l=e.getElementsByClassName("ggb_preview_play"),s=0;s<l.length;s++)l[s].addEventListener("click",r,!1),l[s].addEventListener("ontouchstart",r,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),w()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},B=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var n='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',t=document.createElement("style");t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n)),document.getElementsByTagName("head")[0].appendChild(t)}return e},A=function(e,n,t,i){var r=document.createElement("div");r.className="ggb_preview",r.style.position="absolute",r.style.zIndex="90",r.style.width=e-2+"px",r.style.height=n-2+"px",r.style.top="0px",r.style.left="0px",r.style.overflow="hidden",r.style.backgroundColor="white";var l="lightgrey";void 0!==t&&(l="none"===t?"transparent":t),r.style.border="1px solid "+l;var s,o,a,c=document.createElement("img");if((c.style.position="relative",c.style.zIndex="1000",c.style.top="-1px",c.style.left="-1px",null!==g&&c.setAttribute("src",g),c.style.opacity=.7,null!==_)&&!i){(s=document.createElement("img")).style.position="absolute",s.style.zIndex="1001",s.style.opacity=1,c.style.opacity=.3,(o=360)>e/4*3&&(o=e/4*3),a=o/5.8,s.setAttribute("src",_),s.setAttribute("width",o),s.setAttribute("height",a);var d=(e-o)/2,u=(n-a)/2;s.style.left=d+"px",s.style.top=u+"px",r.appendChild(s)}return r.appendChild(c),r},E=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},q=["web","webSimple","web3d","tablet","tablet3d","phone"],M=function(e,n){if(f=e,n)L(f,!0);else{var l,s,o=!r;if(o){var a=j(f);!isNaN(a)&&a<4.4&&(o=!1)}l="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=f.indexOf("//");for(var d in s=c>0?f:0===c?l+f:"https://www.geogebra.org/apps/5.2.814.0/",q)if(f.slice(-1*q[d].length)===q[d]||f.slice(-1*(q[d].length+1))===q[d]+"/")return void L(s,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!o||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||Z(t.showToolBar)||Z(t.showMenuBar)||Z(t.showAlgebraInput)||Z(t.enableRightClick)||t.appName&&"classic"!=t.appName?s+="web3d/":s+="webSimple/",L(s,!1)}},L=function(e,n){if(e.requirejs)p=e;else{"/"!==e.slice(-1)&&(e+="/"),p=e,null===n&&(n=-1===e.indexOf("http")),m=n,v="web.nocache.js",x=!1;var t=p.split("/");t.length>1&&(n||"webSimple"!==t[t.length-2]?q.indexOf(t[t.length-2])>=0&&(v=t[t.length-2]+".nocache.js"):(v="webSimple.nocache.js",x=!0)),t=e.split("/"),"test"===(f=t[t.length-3]).substr(0,4)?f=f.substr(4,1)+"."+f.substr(5,1):"war"!==f.substr(0,3)&&"beta"!==f.substr(0,4)||(f="5.0");var i=parseFloat(f);NaN!==i&&i<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+i+" is deprecated. Using version latest instead."),M("5.0",n))}},O=function(e,n){window.console&&window.console.log&&(!n||void 0===n.showLogging||n.showLogging&&"false"!==n.showLogging)&&console.log(e)};function F(){var e=n;null!==a?e=a:parseFloat(e)<5&&(e="5.0"),M(e,!1),null!==c&&L(c,m),o=!0}return void 0!==t.material_id?k(F):F(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function n(e,n){1!=n?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+n+","+n+")",e.style.webkitTransform="scale("+n+","+n+")",e.style.maxWidth="initial",null!==e.querySelector(".ggb_preview")&&(e.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[0]&&(e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[1]&&(e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(e.style.transform="none",e.style.webkitTransform="none")}function t(e,n,t,i,r){if(e.isScreenshoGenerator)return 1;var l,s=void 0!==i&&i,o=null!=e.noScaleMargin&&e.noScaleMargin,a=(l=e.autoHeight)&&"false"!==l,c=function(e,n,t,i,r,l){var s=null;if(null!=l&&""!=l)for(var o=e.parentNode;null!=o;){if((" "+o.className+" ").indexOf(" "+l+" ")>-1){s=o;break}o=o.parentNode}var a=0,c=0,d=0,u=0,p=0,m=0,h=0;if(s)a=s.offsetWidth,c=Math.max(i?s.offsetWidth:0,s.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(a=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),d=a):(a=window.innerWidth,c=window.innerHeight,d=window.innerWidth),e){var f=e.getBoundingClientRect();f.left>0&&f.left<=a&&(void 0===r||!r)&&("rtl"===document.dir?(p=a-f.width-f.left,m=d<=480?10:30):(m=f.left,p=d<=480?10:30),u=m+p)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(u=40,h=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(u=0,h=40))}return e&&((void 0===t||!t)&&n>0&&n+u<a?a=n:a-=u,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==t&&t||(c-=h)),{width:a,height:c}}(n,e.width,t,a,s&&window.GGBT_wsf_view||o,r),d=parseInt(c.width),u=e.width,p=e.height;if(void 0===u){var m=n.querySelector(".appletParameters");m&&(u=m.offsetWidth,p=m.offsetHeight)}var h=d/u,f=s?1:c.height/p;return void 0===t||t||(h=Math.min(1,h),f=Math.min(1,f)),Math.min(h,f)}function i(e,n,i){var r,l=1,s=!1;return e.hasOwnProperty("allowUpscale")&&(s=e.allowUpscale),e.hasOwnProperty("scale")&&(l=parseFloat(e.scale),(isNaN(l)||null===l||0===l)&&(l=1),l>1&&(s=!0)),n&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(s=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?l:(r=t(e,n,s,i,e.scaleContainerClass),!s||e.hasOwnProperty("scale")&&1!==l?Math.min(l,r):r)}function r(e){var n=Math.min(window.innerWidth,document.documentElement.clientWidth),t=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.getBoundingClientRect(),r=(n-i.width)/2,l=(t-i.height)/2;l<0&&(l=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=r<40?"40px":r+"px",e.style.top=l+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=l<40?"40px":l+"px",e.style.left=r+"px")}return{responsiveResize:function(t,l){var s=t.querySelector(".appletParameters");if(s){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(l.id!==s.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(t)}if(s.parentElement&&/fullscreen/.test(s.parentElement.className))return;var o=i(l,t);e()&&s.setAttribute("data-param-scale",o);for(var a=null,c=0;c<t.childNodes.length;c++)if(void 0!==t.childNodes[c].className&&t.childNodes[c].className.match(/^applet_scaler/)){a=t.childNodes[c];break}if(null!==a&&null!==a.querySelector(".noscale"))return;var d=void 0!==l.id?l.id:"ggbApplet",u=window[d];null!=u&&u.recalculateEnvironments||null===a||a.className.match(/fullscreen/)||(a.parentNode.style.transform="",isNaN(o)||1===o?(n(a,1),a.parentNode.style.width=l.width+"px",a.parentNode.style.height=l.height+"px"):(a.parentNode.style.width=l.width*o+"px",a.parentNode.style.height=l.height*o+"px",n(a,o))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&r(t),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(s).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:r,getScale:i,scaleElement:n}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var e=n.location.search;return-1!=e.indexOf(J)||-1!=e.indexOf(K)}function q(e,n){}q(H,I),webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{},t;function u(){return v(),t}function v(){if(!t){var e=o.createElement(Q);if(e.id=L,e.style.cssText=R+S,e.tabIndex=-1,o.body.appendChild(e),t=e.contentWindow.document,-1==navigator.userAgent.indexOf(T)){t.open();var n=document.compatMode==U?V:W;t.write(n+X),t.close()}}}function w(e){q(cb,eb),function(e){function n(){return _typeof(o.readyState)==Y?_typeof(o.body)!=Y&&null!=o.body:/loaded|complete/.test(o.readyState)}var t=n();if(t)e();else{o.addEventListener&&o.addEventListener(Z,r,!1);var i=setInterval((function(){r()}),$)}function r(){if(!t){if(!n())return;t=!0,e(),o.removeEventListener&&o.removeEventListener(Z,r,!1),i&&clearInterval(i)}}}((function(){var n,t,i,r;n=e,t=u(),i=t.body,(r=t.createElement(_)).language=ab,r.crossOrigin=W,r.src=n,webModule.__errFn&&(r.onerror=function(){webModule.__errFn(L,new Error(bb+n))}),i.appendChild(r),q(cb,db)}))}function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(e){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(e){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(e){var n=c[e];return null==n?null:n},r=d,webModule.__errFn=e}function B(){function e(e){var n=e.lastIndexOf(rb);-1==n&&(n=e.length);var t=e.indexOf(sb);-1==t&&(t=e.length);var i=e.lastIndexOf(tb,Math.min(t,n));return i>=O?e.substring(O,i+P):W}var n,t=null!=(n=__gwt_getMetaProperty(wb))?n:W;return t==W&&(t=function(){for(var n=o.getElementsByTagName(_),t=O;t<n.length;++t)if(-1!=n[t].src.indexOf(xb))return e(n[t].src);return W}()),t==W&&(t=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),t==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(t=e(o.location.href)),t=function(n){if(n.match(/^\w+:\/\//));else{var t=o.createElement(ub);t.src=n+vb,n=e(t.src)}return n}(t),t}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,i=[],l=[];function s(e){var n=l[e](),t=i[e];if(n in t)return n;var s=[];for(var o in t)s[t[o]]=o;throw r&&r(e,s,n),null}if(__gwt_isKnownPropertyValue=function(e,n){return n in i[e]},webModule.__getPropMap=function(){var e={};for(var n in i)i.hasOwnProperty(n)&&(e[n]=s(n));return e},webModule.__computePropValue=s,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var o=(e=Cb).indexOf(Db);-1!=o&&(t=parseInt(e.substring(o+P),$),e=e.substring(O,o))}catch(e){}return webModule.__softPermutationId=t,C(e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(e){var n=s[L].bindings;s[L].bindings=function(){for(var t=n?n():{},i=e[webModule.__softPermutationId],r=O;r<i.length;r++){var l=i[r];t[l[O]]=l[P]}return t}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var n=u(),t=n.body,i=n.createElement(_);i.language=ab,i.text=e,t.appendChild(i),t.removeChild(i)},A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},"function"!=typeof window.web3d&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),"function"!=typeof window.webSimple&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet}else console.warn("deployggb.js was loaded twice")})()},55087:function(e,n,t){"use strict";function i(e){var n=!0;if(e.length>0){for(var t=0;t<e.length;t++)if(0==e[t].compile_success||!e[t].compile_success){n=!1;break}}else n=!1;return n}function r(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i<e.length;i++){var r=e[i],l=n?"".concat(n,"/").concat(r.name):"".concat(r.name);t.push({title:r.name,type:r.type,isLeaf:"tree"!==r.type,key:l})}return t}function l(e,n,t){for(var i=0;i<e.length;i++){var r=e[i];if(r.key===n){r.children=t;break}r.children&&l(r.children,n,t)}return e}function s(e,n,t){var i;return function(){var r=this,l=arguments,s=function(){i=null,t||e.apply(r,l)},o=t&&!i;clearTimeout(i),i=setTimeout(s,n),o&&e.apply(r,l)}}t.d(n,{Ax:function(){return l},Ds:function(){return s},KI:function(){return o},SI:function(){return r},f1:function(){return i}});var o=t(27065).Z.API_SERVER},47754:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var i=t(82242),r=t.n(i),l=t(7557),s=t.n(l),o=t(41498),a=t.n(o),c=t(79800),d=t.n(c),u=t(39647),p=t.n(u),m=t(59301),h=t(48209),f=t(57374),v="customTree___ZhEHU",x="name___RIkn2",g=t(37712),_=["value","onChange","defaultValue","disabled"],y=function(e){var n=e.value,t=e.onChange,i=e.defaultValue,l=e.disabled,o=p()(e,_),c=(0,m.useState)([]),u=d()(c,2),y=u[0],j=u[1],b=(0,m.useState)("1"),w=d()(b,2),k=w[0],N=w[1];(0,m.useEffect)((function(){C()}),[]);var C=function(){var e=a()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,f.NZ)({});case 2:null!=(n=e.sent)&&n.data&&(t=[{title:(0,g.jsx)("div",{title:"根目录",className:x,children:"根目录"}),value:0,key:0,icon:(0,g.jsx)("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:Z(n.data||[])}],j(t),N("2"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Z=function(e){function n(e){var t=e.children,i=Array.isArray(t)&&t.length>0,r=null==e?void 0:e.group_id;return{title:(0,g.jsx)("div",{title:null==e?void 0:e.name,className:x,children:null==e?void 0:e.name}),value:r,key:r,icon:(0,g.jsx)("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:i?null==t?void 0:t.map((function(e){return n(e)})):[]}}return null==e?void 0:e.map((function(e){return n(e)}))},S=i?{defaultExpandedKeys:[0],defaultSelectedKeys:[0]}:{selectedKeys:n,defaultExpandedKeys:n};return(0,g.jsx)("div",{className:v,children:(0,g.jsx)(h.Z,r()(r()({},S),{},{showIcon:!0,treeData:y,onSelect:t,disabled:l},o),k)})}},40029:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});t(59301);var i="digitalLabel___tImKs",r="active___Ck70Q",l=t(37712),s=function(e){var n=e.number,t=e.active,s=e.className;return(0,l.jsx)("div",{className:"".concat(i," ").concat(t?r:""," ").concat(s),children:n})}},74908:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var i=t(7557),r=t.n(i),l=t(41498),s=t.n(l),o=t(79800),a=t.n(o),c=t(59301),d="imageDimensions___a7crR",u="img___Kroat",p="fullWidth___c492T",m=t(92310),h=t.n(m),f=t(71418),v=t(2859),x=t(51136),g=t(6457),_=t(37712),y=function(e){var n=e.data,t=e.className,i=e.fullWidth,l=e.style,o=void 0===l?{}:l,m=e.onClose,y=e.onOk,j=e.showFullTools,b=e.noAssociationId,w=(0,c.useRef)(null),k=(0,c.useRef)(null),N=(0,c.useState)(!1),C=a()(N,2),Z=C[0],S=C[1],P=(0,c.useState)("正在加载中"),I=a()(P,2),T=I[0],B=I[1];(0,c.useEffect)((function(){null!=n&&n.visible?document.body.setAttribute("data-custom","y-hidden"):document.body.removeAttribute("data-custom"),null!=n&&n.src&&A()}),[null==n?void 0:n.visible]);var A=function(){var e=s()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),B("正在加载中"),e.next=4,(0,g.ZJ)(null==n?void 0:n.src);case 4:t=e.sent,w.current.src="",w.current.src=t,w.current.onload=function(){q()},S(!1),B("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=s()(r()().mark((function e(t){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),B("正在保存中"),e.next=4,(0,x.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:n.title,file:t.dataUrl}});case 4:if(null==(i=e.sent)||!i.id||b){e.next=12;break}return e.next=8,(0,x.ZP)("/api/attachments/".concat(n.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==i?void 0:i.id,settings:JSON.stringify(t.state)}});case 8:0===e.sent.status&&y(),e.next=13;break;case 12:null!=i&&i.id&&y(i);case 13:S(!1),B("");case 15:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){k.current=new v.hP(w.current),k.current.addEventListener("render",E),k.current.addEventListener("beforeclose",m),j&&(k.current.availableMarkerTypes=k.current.ALL_MARKER_TYPES,k.current.uiStyleSettings.redoButtonVisible=!0,k.current.uiStyleSettings.notesButtonVisible=!0,k.current.uiStyleSettings.zoomButtonVisible=!0,k.current.uiStyleSettings.zoomOutButtonVisible=!0,k.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=k.current.uiStyleSettings,k.current.show(),null!=n&&n.snapshotData&&k.current.restoreState(n.snapshotData),setTimeout((function(){var e;(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.parentNode.style.display="none"),[{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:"退出"}].forEach((function(e){var n=document.querySelector(e.name);n&&n.setAttribute("title",e.title)}))}),300)};return(0,_.jsx)(c.Fragment,{children:(null==n?void 0:n.visible)&&(0,_.jsxs)("div",{className:h()(d,t,i?p:""),style:o,children:[(0,_.jsx)(f.Z,{spinning:Z,tip:T,style:{position:"absolute"}}),(0,_.jsx)("img",{className:u,ref:w})]})})}},30347:function(e,n,t){"use strict";var i=t(79800),r=t.n(i),l=t(59301),s=t(44499),o=(t(48136),t(33773)),a=t(43418),c=t(37712),d=(0,l.forwardRef)((function(e,n){var t=e.callback,i=e.width,d=e.onChange,u=e.disabled,p=e.readOnly,m=e.type,h=void 0===m?"":m,f=e.value,v=void 0===f?"":f,x=e.style,g=void 0===x?{}:x,_=(0,l.useRef)(),y=(0,l.useRef)(),j=(0,l.useState)(0),b=r()(j,2),w=b[0],k=b[1],N=(0,l.useState)(0),C=r()(N,2),Z=C[0],S=C[1],P=(0,l.useState)(!1),I=r()(P,2),T=I[0],B=I[1],A=function(){var e=document.createElement("div");e.innerHTML=_.current.getValue();var n=e.innerText;return t&&t(n),n};(0,l.useImperativeHandle)(n,(function(){return{getData:A}}));var E=function(e,n,t,i){var r=document.body.clientHeight,l=document.body.clientWidth;return!(e<20&&t>e||e>l-20&&t<e||n<20&&i>n||n>r-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,l.useEffect)((function(){T&&setTimeout((function(){var e=document.getElementsByClassName("ant-modal")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;k(n),S(t)}),0)}),[T]);return(0,c.jsxs)("div",{style:g,children:[(0,c.jsx)("div",{style:{width:i||"100%",position:"relative"},className:"".concat(s.Z.mathFillWrap," ").concat(u||p?"cursorDefault":""),onClick:function(){u||p||B(!0)},children:(0,c.jsx)("math-field",{disabled:u,locale:"zh_cn",class:"".concat(s.Z.mathField," ").concat(h),readOnly:p,placeholder:"请输入公式",ref:_,style:{width:"100%",fontSize:v?18:14},value:v||""})}),(0,c.jsx)(a.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:w,top:Z},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-w,t=e.clientY-Z;document.body.onmousemove=function(e){var i=e.clientX-n,r=e.clientY-t,l=document.getElementsByClassName("ant-modal")[0],s=window.innerWidth-l.offsetWidth,o=window.innerHeight-l.offsetHeight;i=Math.max(0,Math.min(i,s)),r=Math.max(0,Math.min(r,o)),E(e.clientX,e.clientY,n,t)&&(k(i),S(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:T,onOk:function(){var e=y.current.getData();_.current.setValue(e),d(e),B(!1)},onCancel:function(){B(!1)},destroyOnClose:!0,className:"markdown-popup-form",children:(0,c.jsx)(o.Z,{value:v,ref:y,onChange:d,showSaveButton:!1})})]})}));n.Z=d},48637:function(e,n,t){"use strict";t.d(n,{t:function(){return Q}});var i=t(39647),r=t.n(i),l=t(91232),s=t.n(l),o=t(85573),a=t.n(o),c=t(82242),d=t.n(c),u=t(79800),p=t.n(u),m=t(59301),h=t(98135),f=t(78241),v=t(43418),x=t(95237),g=t(43604),_=t(54449),y=t(57809),j=t(5112),b=t(36017),w=t(7880),k=t(5547),N=t(7557),C=t.n(N),Z=t(41498),S=t.n(Z),P=t(8591),I=t(3113),T=t(71418),B=t(24334),A="result___UYRo8",E="left___TRaH5",q="right___twp9s",M="box___vwndt",L="li___hRe2d",O=t(51136),F=t(76039),D=t(11094),R=t(56102),z=t(42541),G=t(37712),V=function(e){var n=e.buttonProps,t=e.buttonText,i=e.form,r=e.hackIdentifier,l=void 0===r?"":r,s=e.answerKey,o=e.data,a=(0,m.useState)(!1),c=p()(a,2),u=c[0],f=c[1],x=(0,m.useState)(!1),g=p()(x,2),_=g[0],y=g[1],j=(0,m.useState)(!1),b=p()(j,2),w=b[0],k=b[1],N=(0,m.useState)({}),Z=p()(N,2),V=Z[0],W=Z[1],H=(0,m.useState)(""),U=p()(H,2),K=U[0],Y=U[1],J=(0,m.useState)(""),Q=p()(J,2),X=Q[0],$=Q[1],ee=(0,m.useRef)(l),ne=(0,m.useRef)(""),te=(0,m.useRef)(!1);(0,m.useEffect)((function(){w&&se()}),[w]),(0,m.useEffect)((function(){return function(){sessionStorage.removeItem("projectFill")}}),[]);var ie=function(){return(new Date).getTime()},re=null==o?void 0:o.code,le=function(){var e,n,t=re?null==o?void 0:o.code:null===(e=i.getFieldValue("hack_codes"))||void 0===e?void 0:e.code,r=re?null==o?void 0:o.answer_content:i.getFieldValue(s),l=re?null==o?void 0:o.input:null===(n=i.getFieldValue("hack_sets"))||void 0===n?void 0:n.input;null==r||r.forEach((function(e){var n=e.value||e.answer_text||"";t=t.replace(/(@▁@|@▁▁@)/,n)})),$(l),Y(t),W({}),k(!0)},se=function(){var e=S()(C()().mark((function e(){var n,t,r,l,s,a,c,u;return C()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=function(){return u=S()(C()().mark((function e(){var n,t,i,r,o;return C()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.rX)(ne.current,"submit");case 2:if(n=e.sent,t=n.status,i=n.data,r=ie(),o=r-l>1e3*(s+3)*a,te.current){e.next=9;break}return e.abrupt("return");case 9:if(!o){e.next=13;break}return P.ZP.error("调试代码超时"),f(!1),e.abrupt("return");case 13:if(0!==t){e.next=17;break}return f(!1),W(d()(d()({},i),{},{showText:!0})),e.abrupt("return");case 17:setTimeout(c,1e3);case 18:case"end":return e.stop()}}),e)}))),u.apply(this,arguments)},c=function(){return u.apply(this,arguments)},l=ie(),s=re?null==o?void 0:o.time_limit:null===(n=i.getFieldsValue())||void 0===n?void 0:n.hack.time_limit,a=re?null==o||null===(t=o.answer_content)||void 0===t?void 0:t.length:null===(r=i.getFieldsValue())||void 0===r||null===(r=r.standard_answers)||void 0===r?void 0:r.length,f(!0),e.next=8,(0,F.bM)(ne.current,{test_hack_code:K,test_input:X});case 8:c();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=S()(C()().mark((function e(){var n,t,r,l,s,a,c,u;return C()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o){e.next=25;break}return e.prev=1,e.next=4,i.validateFields();case 4:e.next=11;break;case 6:return e.prev=6,e.t0=e.catch(1),null!==e.t0&&void 0!==e.t0&&null!==(n=e.t0.errorFields)&&void 0!==n&&null!==(n=n[0])&&void 0!==n&&null!==(n=n.name)&&void 0!==n&&n.includes("standard_answers")?P.ZP.error("填空项答案不能为空"):P.ZP.error(e.t0.errorFields[0].errors[0]),i.scrollToField(e.t0.errorFields[0].name,{behavior:"smooth",block:"center"}),e.abrupt("return");case 11:if(y(!0),t="",r=i.getFieldsValue(),ee.current){e.next=22;break}return e.next=17,(0,O.ZP)("/api/problems.json",{method:"post",body:d()(d()({},r),{},{hack:d()(d()({},null==r?void 0:r.hack),{},{sub_discipline_id:null==r||null===(l=r.hack)||void 0===l||null===(l=l.sub_discipline_id)||void 0===l?void 0:l[1],difficult:r.difficulty,item_banks_group_id:r.item_banks_group_id}),hack_codes:d()(d()({},r.hack_codes),{},{code:B.Base64.encode(r.hack_codes.code)}),hack_sets:[d()({},r.hack_sets)],is_blank:!0})});case 17:t=e.sent,ee.current=null===(s=t)||void 0===s?void 0:s.identifier,sessionStorage.projectFill=null===(a=t)||void 0===a?void 0:a.identifier,e.next=25;break;case 22:return e.next=24,(0,O.ZP)("/api/problems/".concat(ee.current,".json"),{method:"put",body:d()(d()({},r),{},{hack:d()(d()({},null==r?void 0:r.hack),{},{sub_discipline_id:null==r||null===(c=r.hack)||void 0===c||null===(c=c.sub_discipline_id)||void 0===c?void 0:c[1],difficult:r.difficulty,item_banks_group_id:r.item_banks_group_id}),hack_codes:d()(d()({},r.hack_codes),{},{code:B.Base64.encode(r.hack_codes.code)}),update_hack_sets:[d()({},r.hack_sets)],is_blank:!0})});case 24:t=e.sent;case 25:return e.next=27,(0,O.ZP)("/api/problems/".concat(ee.current,"/start.json"),{method:"get"});case 27:if(0!==(null==(u=e.sent)?void 0:u.status)){e.next=34;break}return ne.current=null==u?void 0:u.identifier,te.current=!0,y(!1),le(),e.abrupt("return");case 34:y(!1);case 35:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}();return(0,G.jsxs)("div",{children:[(0,G.jsx)(I.ZP,d()(d()({loading:_},n),{},{onClick:oe,children:t})),(0,G.jsx)(v.Z,{open:w,title:"调试代码",destroyOnClose:!0,width:1200,okText:"运行测试",confirmLoading:u,cancelButtonProps:{style:{display:"none"}},onOk:function(){return se()},onCancel:function(){te.current=!1,k(!1)},children:(0,G.jsxs)("div",{className:A,children:[(0,G.jsxs)("div",{className:E,children:[(0,G.jsxs)("div",{className:"mb20",children:[(0,G.jsx)("span",{className:"c-black",children:"执行代码"}),!o&&(0,G.jsx)(R.CopyToClipboard,{text:K,onCopy:function(){return P.ZP.success("复制成功")},children:(0,G.jsxs)("span",{style:{float:"right"},className:"current c-light-primary",children:[(0,G.jsx)("i",{className:"iconfont icon-fuzhi8 mr5"}),"复制"]})})]}),(0,G.jsx)(D.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:K,onChange:function(e){return Y(e)}})]}),(0,G.jsxs)("div",{className:q,children:[(0,G.jsx)("div",{className:"c-black mb20",children:"自定义测试用例"}),(0,G.jsx)("div",{className:M,children:(0,G.jsx)("div",{className:L,children:(0,G.jsx)(h.Z.TextArea,{placeholder:"请输入",value:X,onChange:function(e){return $(e.target.value)},bordered:!1,style:{height:180}})})}),(0,G.jsx)("div",{className:"c-black mb20 mt30",children:"代码执行结果"}),(0,G.jsx)("div",{className:M,children:(0,G.jsx)(T.Z,{spinning:u,tip:"代码执行中",children:(0,G.jsx)("div",{className:L,style:{height:196,overflow:"auto",padding:10},children:function(e){var n=e.status,t=e.error_msg,i=e.execute_time,r=e.output,l=e.input,s=e.expected_output,o=null;switch(n){case z.h.OK:o=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("p",{children:["执行用时:",i/1e3,"秒"]}),(0,G.jsx)("p",{children:"执行结果:调试通过"})]});break;case z.h.NOMATCH:o=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("div",{children:"输入:"}),(0,G.jsx)("pre",{style:{fontFamily:"initial"},children:l}),(0,G.jsx)("div",{children:"输出:"}),(0,G.jsx)("pre",{style:{fontFamily:"initial"},children:r&&B.Base64.decode(r)}),(0,G.jsx)("div",{children:"预期输出:"}),(0,G.jsx)("pre",{style:{fontFamily:"initial"},children:s&&B.Base64.decode(s)})]});break;case z.h.EXECUTEFAILURE:case z.h.COMPILEFAILURE:o=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("p",{children:["最后执行的输入:",(0,G.jsx)("pre",{children:l})]}),(0,G.jsx)("p",{children:"执行出错信息:"}),(0,G.jsx)("pre",{className:"error",children:B.Base64.decode(t)})]});break;case z.h.PODFAILURE:o=(0,G.jsx)("p",{children:"创建pod失败,请稍后重试"});break;case z.h.TIMEOUT:o=(0,G.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,G.jsxs)(G.Fragment,{children:[" ",o," "]})}(V)})})})]})]})})]})},W=t(88289),H=["key","name"],U=h.Z.TextArea,K=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}],Y="@▁@",J="@▁▁@",Q=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.scoreByBlank,l=void 0!==i&&i,o=e.hackidentifier,c=e.answerKey,u=(0,m.useState)(!1),N=p()(u,2),C=N[0],Z=N[1],S=(0,m.useState)(!1),P=p()(S,2),I=(P[0],P[1],(0,w.useParams)().type,function(e,n){for(var t=n.line,i=0,r=0;r<t;r++)i+=e.getLine(r).split(Y).length-1;for(var l=0;l<t;l++)i+=e.getLine(l).split(J).length-1;var s=e.getLine(t).substring(0,n.ch);return i+=s.split(Y).length-1,i+=s.split(J).length-1}),T=function(){var e=t.getFieldValue(c);t.setFieldsValue(a()({},c,null==e?void 0:e.map((function(e,n){return d()(d()({},e),{},{position:n+1})}))))},B=(0,m.useRef)(),A=function(e,n){for(var t=0;t<e;t++)B.current({position:null,answer_text:""},n+t);T()},E=(0,m.useRef)(),q=function(e){E.current(e),T()},M=f.Z.useWatch(c,t);return(0,G.jsxs)("div",{className:k.Z.wrap,children:[(0,G.jsx)(f.Z.Item,{label:"试题描述",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}],children:(0,G.jsx)(b.h,{scrollId:"name",watch:!0,height:140})}),(0,G.jsx)("div",{className:k.Z.questionTitleEditorWrap,children:(0,G.jsx)(f.Z.Item,{label:"程序代码",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}],children:(0,G.jsx)(b.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:function(e,n){var i=t.getFieldValue(c);console.log("--preAnswerData",i,n),t.setFieldsValue(a()({},c,null==i?void 0:i.map((function(e,t){var i;return d()(d()({},e),{},{position:t+1,multi_line:null==n||null===(i=n[t])||void 0===i?void 0:i.multiLine})}))))},placeholder:n,onCMBeforeChange:function(e,n){!function(e,n,t,i){var r=e.getRange(n.from,n.to),l=0;if(n.text.forEach((function(e){l+=e.split(Y).length-1})),n.text.forEach((function(e){l+=e.split(J).length-1})),"setValue"!==n.origin)if(!r||-1===r.indexOf(Y)&&-1===r.indexOf(J)){if(l>0){var s=I(e,n.from);console.log("新增".concat(l,"个,之前有").concat(s,"个")),t(l,s)}}else{var o=r.split(Y).length-1+r.split(J).length-1,a=I(e,n.from);console.log("删除".concat(o,"个, 前面有").concat(a,"个,新增").concat(l,"个")),i(o>1?Array.from({length:o},(function(e,n){return a+n})):a)}}(e,n,A,q)}})})}),(0,G.jsx)(f.Z.List,{name:c,rules:[{validator:function(e,n){if(null==n||!n.length)return Promise.reject(new Error("答案不能为空"));var t,i=s()(n);try{for(i.s();!(t=i.n()).done;){var r=(t.value||{}).answer_text;if(0===(null==r?void 0:r.length))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,t){var i=n.add,s=n.remove;t.errors;return B.current=i,E.current=s,(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,G.jsx)(f.Z.Item,{label:"填空项答案",required:!0,labelCol:{span:24}}),(0,G.jsxs)("div",{onClick:function(){v.Z.warning({title:"给分说明",icon:null,width:700,centered:!0,content:(0,G.jsxs)("div",{children:[(0,G.jsxs)("div",{children:["1.学生填写答案之后,必须提交代码",(0,G.jsx)("span",{style:{color:"#e30000"},children:"进行评测"}),"才能得分。"]}),(0,G.jsx)("div",{style:{marginTop:10},children:"2.试题算分时,系统会将程序里面的所有空替换成学生的答案进行评测。输出的结果与测试集比对,完全正确则得满分;若不完全正确,则依次将每个空换成学生提交的答案,同时将其他空替换成标准答案,运行程序。如果这个空的学生答案与标准答案结合能得到正确输出,则这个空得到该空的满分,否则该空得0分。"})]})})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"},children:[(0,G.jsx)(W.Z,{style:{marginRight:3,color:"#3061D0"}}),(0,G.jsx)("span",{children:" 给分说明"})]})]}),e.map((function(e,n){var t,i,s=e.key,o=e.name,a=r()(e,H);return(0,G.jsxs)(x.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,G.jsxs)(g.Z,{flex:"0 0 auto",className:"".concat(k.Z.blankIndex),children:["填空项",n+1]}),(0,G.jsx)(g.Z,{flex:1,children:(0,G.jsxs)(x.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,G.jsx)(g.Z,{children:(0,G.jsx)(f.Z.Item,d()(d()({},a),{},{name:[o,"answer_text"],noStyle:!0,children:null!=M&&null!==(t=M[o])&&void 0!==t&&t.multi_line||null!=M&&null!==(i=M[o])&&void 0!==i&&i.multiLine?(0,G.jsx)(U,{spellCheck:!1,style:{marginLeft:10,width:550}}):(0,G.jsx)(h.Z,{style:{marginLeft:10,width:550},className:k.Z.blankInput,size:"large",maxLength:1e3,onBlur:function(e){}})}))}),l&&(0,G.jsx)(g.Z,{flex:"224px",children:(0,G.jsx)(f.Z.Item,d()(d()({},a),{},{name:[o,"score"],label:"分值",rules:[{required:!0}],children:(0,G.jsx)(_.Z,{size:"large",className:k.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]})})]},s)}))]})}}),(0,G.jsx)("div",{onClick:function(){return Z(!0)},children:(0,G.jsx)(f.Z.Item,{name:["hack","analysis"],label:"题目解析",labelCol:{span:24},children:(0,G.jsx)(b.x,{placeholder:"请编辑题目解析(非必填)",isEdit:C})})}),(0,G.jsx)(f.Z.Item,{label:"编程语言",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"请选择编程语言"}],children:(0,G.jsx)(y.default,{size:"large",children:K.map((function(e){return(0,G.jsxs)(y.default.Option,{value:e.key,children:[" ",e.title]},e.title)}))})}),(0,G.jsxs)(f.Z.Item,{label:"最大评测时长(秒)",style:{marginTop:30},labelCol:{span:24},required:!0,children:[(0,G.jsx)(f.Z.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"请输入单个测试集评测时长限制"},{type:"number",min:3,message:"最小限制时间是3秒"}],noStyle:!0,children:(0,G.jsx)(_.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})}),(0,G.jsx)("span",{className:"ml10 font14",children:"秒"})]}),(0,G.jsx)(f.Z.Item,{label:"学生答案的空格处理方式",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"请选择学生答案的空格处理方式"}],children:(0,G.jsxs)(j.ZP.Group,{style:{marginTop:-10},children:[(0,G.jsx)(j.ZP,{value:0,children:"不忽略空格"}),(0,G.jsx)(j.ZP,{value:1,children:"忽略首尾空格"}),(0,G.jsx)(j.ZP,{value:2,children:"忽略所有空格"})]})}),(0,G.jsx)(f.Z.Item,{label:"测试用例",required:!0,style:{marginTop:30}}),(0,G.jsxs)("div",{style:{background:"#F6F7F9",padding:15},children:[(0,G.jsx)(f.Z.Item,{label:"输入",labelCol:{span:24},name:["hack_sets","input"],children:(0,G.jsx)(U,{rows:4})}),(0,G.jsx)(f.Z.Item,{label:"输出",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"请输入输出内容"}],children:(0,G.jsx)(U,{rows:4})})]}),(0,G.jsx)(V,{form:t,answerKey:c,hackIdentifier:o,buttonText:"运行调试",buttonProps:{ghost:!0,icon:(0,G.jsx)("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}})]})}},5309:function(e,n,t){"use strict";t.d(n,{u:function(){return k}});var i=t(39647),r=t.n(i),l=t(79800),s=t.n(l),o=t(85573),a=t.n(o),c=t(82242),d=t.n(c),u=t(59301),p=t(95237),m=t(43604),h=t(6848),f=t(78241),v=t(5547),x=t(57703),g=t(78091),_=t(36017),y=t(37712),j=["key","name"],b=["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"],w=function(e){var n=e.value,t=e.onChange,i=e.choiceTextKey,r=e.answerKey,l=e.index,s=e.isEdit,o=e.setInputActive,c=e.form,u=e.choiceOptionsPath,f=e.allowChangeMode,j=e.showAddIcon,w=e.addItem,k=e.deleteItem;console.log(n,"value");var N=1===(null==n?void 0:n[r]),C=function(){var e;N?t(d()(d()({},n),{},a()({},r,0))):(f||(e=c.getFieldValue(u),c.setFieldValue(u,e.map((function(e){return d()(d()({},e),{},a()({},r,0))})))),t(d()(d()({},n),{},a()({},r,1))))};return(0,y.jsxs)(p.Z,{className:v.Z.choiceWrap,align:"middle",wrap:!1,children:[(0,y.jsx)(m.Z,{onClick:C,className:"".concat(v.Z.choiceIndex," ").concat(N?v.Z.activeAnswer:""),children:b[l]}),(0,y.jsx)(m.Z,{flex:1,className:"".concat(v.Z.editorWrap," ml15"),onClick:o,children:(0,y.jsx)(_.x,{height:155,placeholder:"请您输入选项",isEdit:s,value:null==n?void 0:n[i],onChange:function(e){t(d()(d()({},n),{},a()({},i,e)))}})}),(0,y.jsx)(m.Z,{flex:"0 0 auto",className:"ml15",children:(0,y.jsx)("div",{onClick:C,className:"".concat(v.Z.setAnswerBtn," ").concat(N?v.Z.activeAnswer:""),children:N?"正确答案":"设为答案"})}),(0,y.jsxs)(m.Z,{className:v.Z.actionWrapper,children:[(0,y.jsx)(h.Z,{title:"新增参考答案",children:(0,y.jsx)(x.Z,{className:v.Z.addIcon,onClick:w,style:{visibility:j?"visible":"hidden"}})}),(0,y.jsx)(h.Z,{title:"删除",children:(0,y.jsx)(g.Z,{className:v.Z.deleteIcon,onClick:k,style:{visibility:l>1?"visible":"hidden"}})})]})]})},k=function(e){var n=e.questionTitlePlaceholder,t=e.titleKey,i=e.choiceKey,l=e.analysisKey,o=e.choiceTextKey,c=e.answerKey,p=e.choiceOptionsPath,m=e.allowChangeMode,h=void 0===m||m,x=e.form,g=e.showAnalysis,k=void 0===g||g,N=(0,u.useState)(),C=s()(N,2),Z=C[0],S=C[1],P=(0,u.useState)(!1),I=s()(P,2),T=I[0],B=I[1];return(0,y.jsxs)("div",{className:v.Z.wrap,children:[(0,y.jsx)("div",{className:v.Z.questionTitleEditorWrap,children:(0,y.jsx)(f.Z.Item,{label:"题干",name:t,labelCol:{span:24},rules:[{required:!0}],children:(0,y.jsx)(_.h,{scrollId:Array.isArray(t)?t.join("_"):"".concat(t),watch:!0,height:140,placeholder:n})})}),(0,y.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,y.jsx)(f.Z.List,{name:i,rules:[{validator:function(e,n){var t=n.some((function(e){return 1===e[c]})),i=n.findIndex((function(e){var n;return(null===(n=e[o])||void 0===n?void 0:n.length)<=0}));return-1!==i?Promise.reject(new Error("请先输入".concat(b[i],"选项的内容"))):t?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e,n){var t=n.add,i=n.remove;return(0,y.jsxs)("div",{id:Array.isArray(p)?p.join("_"):"".concat(p),children:[e.map((function(n,l){var s=n.key,m=n.name,g=r()(n,j),_=Z===s,k=l<7&&l===e.length-1;return(0,u.createElement)(f.Z.Item,d()(d()({},g),{},{key:s,name:m,className:v.Z.choiceListWrap,rules:[{validator:function(e,n){return null!=n&&n.choice_text?Promise.resolve():Promise.reject(new Error("请先输入".concat(b[l],"选项的内容")))}}]}),(0,y.jsx)(w,{choiceTextKey:o,answerKey:c,index:l,isEdit:_,setInputActive:function(){S(s)},form:x,choiceOptionsPath:p,allowChangeMode:h,showAddIcon:k,addItem:function(){return t(a()(a()({},o,""),c,0))},deleteItem:function(){return i(m)}}))})),e.length<8&&(0,y.jsx)("div",{className:"".concat(v.Z.addBtn," mb30"),onClick:function(){return t(a()(a()({},o,""),c,0))},children:"添加选项"})]})}}),k&&(0,y.jsx)("div",{onClick:function(){return B(!0)},children:(0,y.jsx)(f.Z.Item,{name:l,label:"题目解析",labelCol:{span:24},children:(0,y.jsx)(_.x,{placeholder:"请编辑题目解析(非必填)",isEdit:T})})})]})}},56763:function(e,n,t){"use strict";t.d(n,{u:function(){return M}});var i=t(39647),r=t.n(i),l=t(91232),s=t.n(l),o=t(85573),a=t.n(o),c=t(82242),d=t.n(c),u=t(79800),p=t.n(u),m=t(37205),h=t.n(m),f=t(59301),v=t(43418),x=t(95237),g=t(43604),_=t(98135),y=t(6848),j=t(78673),b=t(78241),w=t(5112),k=t(54449),N=t(36017),C=t(78091),Z=t(85699),S=t(5547),P=t(30347),I=t(37712),T=["key","name"],B=function(e){var n=e.value,t=e.onChange;return(0,I.jsxs)(x.Z,{className:"ml20",children:[(0,I.jsx)(g.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,I.jsxs)(x.Z,{className:"mb20",children:[(0,I.jsx)(_.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var r=h()(n),l=e.target.value.trim();r[i]=l,t(r)}}),(0,I.jsx)(y.Z,{title:"删除",children:(0,I.jsx)(C.Z,{className:S.Z.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){v.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:S.Z.modal,onOk:function(){var i=h()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,I.jsx)(g.Z,{children:(0,I.jsx)("div",{className:"".concat(S.Z.addBtn),onClick:function(){var e;(e=h()(n)).push(""),t(e)},children:"新增答案"})})]})},A=function(e){var n=e.value,t=e.onChange;return(0,I.jsxs)(x.Z,{className:"ml20",children:[(0,I.jsx)(g.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,I.jsxs)(x.Z,{align:"middle",className:"mb20",children:[(0,I.jsx)(P.Z,{value:e,style:{flex:1},onChange:function(e){var r=h()(n);r[i]=e,t(r)}}),(0,I.jsx)(y.Z,{title:"删除",children:(0,I.jsx)(C.Z,{className:S.Z.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){v.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:S.Z.modal,onOk:function(){var i=h()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,I.jsx)(g.Z,{children:(0,I.jsx)("div",{className:"".concat(S.Z.addBtn),onClick:function(){var e;(e=h()(n)).push(""),t(e)},children:"新增答案"})})]})},E=function(e){var n=e.value,t=void 0===n||n,i=e.onChange;return(0,I.jsx)(j.Z,{checked:!t,onChange:function(e){i(!e)}})},q="▁",M=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.scoreByBlank,l=void 0!==i&&i,o=e.answerKey,c=(0,f.useState)(!1),u=p()(c,2),m=u[0],h=u[1],v=function(e,n){for(var t=n.line,i=0,r=0;r<t;r++)i+=e.getLine(r).split(q).length-1;return i+=e.getLine(t).substring(0,n.ch).split(q).length-1},C=function(){var e=t.getFieldValue(o);t.setFieldsValue(a()({},o,e.map((function(e,n){return d()(d()({},e),{},{position:n+1})}))))},P=(0,f.useRef)(),M=function(e,n){for(var t=0;t<e;t++)P.current({position:null,answer_text:[""],model:1},n+t);C()},L=(0,f.useRef)(),O=function(e){L.current(e),C()},F=b.Z.useWatch(o,t);return(0,I.jsxs)("div",{className:S.Z.wrap,children:[(0,I.jsx)("div",{className:S.Z.questionTitleEditorWrap,children:(0,I.jsx)(b.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,I.jsx)(N.h,{scrollId:"name",watch:!0,height:140,placeholder:n,showNullButton:!0,onCMBeforeChange:function(e,n){!function(e,n,t,i){var r=e.getRange(n.from,n.to),l=0;if(n.text.forEach((function(e){l+=e.split(q).length-1})),"setValue"!==n.origin)if(r&&-1!==r.indexOf(q)){var s=r.split(q).length-1,o=v(e,n.from);console.log("删除".concat(s,"个, 前面有").concat(o,"个,新增").concat(l,"个")),i(s>1?Array.from({length:s},(function(e,n){return o+n})):o)}else if(l>0){var a=v(e,n.from);console.log("新增".concat(l,"个,之前有").concat(a,"个")),t(l,a)}}(e,n,M,O)}})})}),(0,I.jsx)(b.Z.List,{name:o,rules:[{validator:function(e,n){if(null==n||!n.length)return Promise.reject(new Error("请先在题干中插入填空项"));var t,i=s()(n);try{for(i.s();!(t=i.n()).done;){var r=(t.value||{}).answer_text;if(null!=r&&r.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,i){var s=n.add,c=n.remove;i.errors;return P.current=s,L.current=c,(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(b.Z.Item,{label:(0,I.jsxs)("span",{children:["填空项答案",!(null!=e&&e.length)&&(0,I.jsx)("span",{style:{color:"#E99237"},children:"(请先在题干中插入填空项)"})]}),required:!0,labelCol:{span:24}}),e.map((function(e,n){var i,s=e.key,c=e.name,u=r()(e,T);return(0,I.jsxs)("div",{style:{marginBottom:10},children:[(0,I.jsxs)(x.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,I.jsxs)(g.Z,{style:{marginRight:10},flex:"0 0 auto",className:"".concat(S.Z.blankIndex),children:["填空项",n+1]}),(0,I.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"model"],noStyle:!0,children:(0,I.jsxs)(w.ZP.Group,{onChange:function(){var e=t.getFieldValue(o);t.setFieldsValue(a()({},o,e.map((function(e,n){return d()(d()({},e),{},{answer_text:c===n?[""]:e.answer_text})}))))},children:[(0,I.jsxs)(w.ZP,{value:1,children:["文本模式 ",(0,I.jsx)(y.Z,{title:"学生答题时,需要在文本框中填写文本答案",children:(0,I.jsx)(Z.Z,{})})]}),(0,I.jsxs)(w.ZP,{value:2,children:["数学公式模式 ",(0,I.jsx)(y.Z,{title:"学生答题时,需要编写数学公式作为答案",children:(0,I.jsx)(Z.Z,{})})]})]})}))]}),(0,I.jsx)(x.Z,{style:{marginLeft:20},align:"middle",wrap:!1,children:(0,I.jsxs)(g.Z,{flex:1,children:[(0,I.jsxs)(x.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,I.jsx)(g.Z,{flex:1,children:(0,I.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"answer_text"],noStyle:!0,children:1===(null===(i=t.getFieldValue(o))||void 0===i||null===(i=i[c])||void 0===i?void 0:i.model)?(0,I.jsx)(B,{}):(0,I.jsx)(A,{})}))}),l&&(0,I.jsx)(g.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"},children:(0,I.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"score"],label:"分值",rules:[{required:!0}],className:S.Z.blankInputNumberWrapper,children:(0,I.jsx)(k.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]}),(0,I.jsx)(b.Z.Item,d()(d()({},u),{},{name:[c,"position"],noStyle:!0,children:(0,I.jsx)(_.Z,{type:"hidden"})}))]})})]},s)}))]})}}),(0,I.jsxs)(x.Z,{align:"middle",children:[(0,I.jsx)(b.Z.Item,{name:"downcase",valuePropName:"checked",children:(0,I.jsx)(j.Z,{})}),(0,I.jsx)(g.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,I.jsxs)(x.Z,{align:"middle",children:[(0,I.jsx)(b.Z.Item,{name:"no_space",valuePropName:"checked",children:(0,I.jsx)(j.Z,{})}),(0,I.jsx)(g.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==F?void 0:F.length)>1&&(0,I.jsxs)(x.Z,{align:"middle",className:(null==F?void 0:F.length)>1?"mb30":"".concat(S.Z.hide),children:[(0,I.jsx)(b.Z.Item,{name:"is_ordered",children:(0,I.jsx)(E,{})}),(0,I.jsx)(g.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,I.jsx)("div",{onClick:function(){return h(!0)},children:(0,I.jsx)(b.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,I.jsx)(N.x,{placeholder:"请编辑题目解析(非必填)",isEdit:m})})})]})}},99041:function(e,n,t){"use strict";t.d(n,{Z:function(){return j}});var i=t(39647),r=t.n(i),l=t(79800),s=t.n(l),o=t(82242),a=t.n(o),c=t(85573),d=t.n(c),u=t(59301),p=t(95237),m=t(43604),h=t(78241),f=t(5547),v=t(36017),x=t(37712),g=["key","name"],_=d()(d()({},"正确","T"),"错误","F"),y=function(e){var n=e.value,t=e.onChange,i=e.form,r=1===(null==n?void 0:n.is_answer),l=null==n?void 0:n.choice_text,s=function(){var e=i.getFieldsValue().choices.map((function(e){return{choice_text:e.choice_text,is_answer:0}}));i.setFieldsValue({choices:e}),t(a()(a()({},n),{},{is_answer:1}))};return(0,x.jsxs)(p.Z,{className:f.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"},children:[(0,x.jsx)(m.Z,{onClick:s,className:"".concat(f.Z.choiceIndex," ").concat(f.Z.judgementIndex," ").concat(r?f.Z.activeAnswer:""),children:_[l]}),(0,x.jsx)(m.Z,{flex:1,className:"".concat(f.Z.editorWrap," ml15"),children:(0,x.jsx)("div",{className:"".concat(f.Z.inputBorder," ").concat(f.Z.placeholder," ").concat(r?f.Z.activeJudgementAnswer:""),children:l})}),(0,x.jsx)(m.Z,{flex:"0 0 auto",className:"ml15",children:(0,x.jsx)("div",{onClick:s,className:"".concat(f.Z.setAnswerBtn," ").concat(r?f.Z.activeAnswer:""),children:r?"正确答案":"设为答案"})})]})},j=function(e){var n=e.questionTitlePlaceholder,t=(e.choiceKey,e.form),i=(0,u.useState)(!1),l=s()(i,2),o=l[0],c=l[1];return(0,x.jsxs)("div",{className:f.Z.wrap,children:[(0,x.jsx)("div",{className:f.Z.questionTitleEditorWrap,children:(0,x.jsx)(h.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,x.jsx)(v.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,x.jsx)(h.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,x.jsx)(h.Z.List,{name:"choices",rules:[{validator:function(e,n){return n.some((function(e){return 1===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,x.jsx)("div",{id:"choices",children:e.map((function(e){var n=e.key,i=e.name,l=r()(e,g);return(0,u.createElement)(h.Z.Item,a()(a()({},l),{},{key:n,name:i,noStyle:!0}),(0,x.jsx)(y,{form:t}))}))})}})}),(0,x.jsx)("div",{onClick:function(){return c(!0)},children:(0,x.jsx)(h.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,x.jsx)(v.x,{placeholder:"请编辑题目解析(非必填)",isEdit:o})})})]})}},36017:function(e,n,t){"use strict";t.d(n,{h:function(){return p},x:function(){return m}});var i=t(82242),r=t.n(i),l=t(39647),s=t.n(l),o=t(11094),a=t(5547),c=t(42783),d=t(37712),u=["value","onChange","scrollId"],p=function(e){var n=e.value,t=e.onChange,i=e.scrollId,l=s()(e,u);return(0,d.jsx)("div",{id:i||"",children:(0,d.jsx)(o.Z,r()(r()({},l),{},{defaultValue:n,onChange:function(e,n){console.log("a:",e,n),null!=n&&n.length?t(e,n):t(e)}}))})},m=function(e){var n=e.value,t=e.onChange,i=e.placeholder,r=e.height,l=void 0===r?140:r;return e.isEdit?(0,d.jsx)(o.Z,{watch:!0,isFocus:!0,height:l,placeholder:i,defaultValue:n,onChange:t}):(0,d.jsx)("div",{style:{cursor:"pointer"},children:n?(0,d.jsx)(c.Z,{className:a.Z.inputBorder,value:n}):(0,d.jsx)("div",{className:"".concat(a.Z.inputBorder," ").concat(a.Z.placeholder," inputBorderError"),children:i})})}},42230:function(e,n,t){"use strict";t.d(n,{W:function(){return I}});var i=t(91232),r=t.n(i),l=t(79800),s=t.n(l),o=t(82242),a=t.n(o),c=t(39647),d=t.n(c),u=t(59301),p=t(8591),m=t(12563),h=t(78241),f=t(78673),v=t(95237),x=t(43604),g=t(6848),_=t(98135),y=t(54449),j=t(5547),b=t(36017),w=t(11094),k=t(85699),N=t(37712),C=["value","onChange"],Z=["key","name"],S=function(e){var n=e.value,t=e.onChange,i=d()(e,C);return(0,N.jsx)(w.Z,a()(a()({},i),{},{defaultValue:null==n?void 0:n[0],onChange:function(e){t([e])}}))},P=function(e){var n=e.value,t=void 0===n?[]:n,i=e.onClose;return(0,N.jsx)(m.Z,{closable:!0,onClose:i,className:j.Z.keywordTag,children:(0,N.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:t.join(" 或 ")})})},I=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.showKeywords,l=e.isMustKeyWords,o=void 0===l?i:l,c=(0,u.useState)(!1),m=s()(c,2),w=m[0],C=m[1],I=(0,u.useState)(""),T=s()(I,2),B=T[0],A=T[1],E=h.Z.useWatch("use_keywords",t),q=h.Z.useWatch("question_score",t);return(0,N.jsxs)("div",{className:j.Z.wrap,children:[(0,N.jsx)("div",{className:j.Z.questionTitleEditorWrap,children:(0,N.jsx)(h.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,N.jsx)(b.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,N.jsx)(h.Z.Item,{label:"参考答案",name:"answer_texts",labelCol:{span:24},children:(0,N.jsx)(S,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!o&&(0,N.jsx)(h.Z.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked",children:(0,N.jsx)(f.Z,{defaultChecked:!0})}),i&&o&&(0,N.jsxs)(v.Z,{align:"middle",className:"mb30",children:[(0,N.jsx)(h.Z.Item,{name:"use_keywords",valuePropName:"checked",children:(0,N.jsx)(f.Z,{})}),(0,N.jsx)(x.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,N.jsx)(x.Z,{children:(0,N.jsx)(g.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,N.jsx)(k.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(E||!o)&&(0,N.jsx)(h.Z.List,{name:"keywords",rules:[{validator:function(e,n){return o?null!=n&&n.length?(null==n?void 0:n.reduce((function(e,n){return e+n.score}),0))>parseFloat(q)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请输入关键词")):Promise.resolve()}}],children:function(e,n){var i=n.add,l=n.remove;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("div",{className:"".concat(j.Z.title," mb10"),children:o?"关键词":(0,N.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,N.jsxs)(v.Z,{align:"middle",className:"font14 mb30",children:[(0,N.jsx)(x.Z,{flex:1,children:(0,N.jsx)(_.Z,{value:B,onChange:function(e){A(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var n,l,s,o,a="".concat(null===(n=e.target)||void 0===n?void 0:n.value),c=null==a||null===(l=a.split("|"))||void 0===l||null===(l=l.filter((function(e){return!!e})))||void 0===l?void 0:l.map((function(e){return null==e?void 0:e.trim()})),d=t.getFieldValue("keywords"),u=(null==d||null===(s=d.map((function(e){return null==e?void 0:e.keyword})))||void 0===s?void 0:s.flat())||[],m=r()(c);try{for(m.s();!(o=m.n()).done;){var h=o.value;if(u.includes(h))return void p.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){m.e(e)}finally{m.f()}(function(e){if(!e)return!1;if(!/^s*$/.test(e)&&""!==e.trim())return new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~!@#¥……&*()—【】‘;:”“。,、?「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==e||(p.ZP.warning("关键词不能只输入一个“|”字符!"),!1);p.ZP.warning("关键词不能全为空格")})(a)&&(i({keyword:c,score:1}),A(""))},className:j.Z.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,N.jsx)(x.Z,{flex:"148px",style:{textAlign:"right",color:"#9096A3"},children:"“回车键”保存关键词"})]}),e.map((function(e){var n=e.key,t=e.name,i=d()(e,Z);return(0,N.jsx)(v.Z,{className:"mb20",style:{marginRight:148},children:(0,N.jsx)(x.Z,{flex:1,children:(0,N.jsxs)(v.Z,{align:"middle",justify:"space-between",children:[(0,N.jsx)(h.Z.Item,a()(a()({},i),{},{name:[t,"keyword"],children:(0,N.jsx)(P,{onClose:function(){return l(t)}})})),o&&(0,N.jsx)(h.Z.Item,a()(a()({},i),{},{name:[t,"score"],label:"分值",rules:[{required:!0}],className:j.Z.blankInputNumberWrapper,children:(0,N.jsx)(y.Z,{className:j.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},n)}))]})}}),(0,N.jsx)("div",{onClick:function(){return C(!0)},children:(0,N.jsx)(h.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,N.jsx)(b.x,{placeholder:"请编辑题目解析(非必填)",isEdit:w})})})]})}},95166:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var i="text___bQulM",r="sup___rX_Y3",l=t(78241),s=t(37712),o=function(e){var n=e.text,t=e.name,o=void 0===t?"question_score":t,a=function(e){var t=e.value;return(0,s.jsxs)("div",{className:i,children:[(0,s.jsx)("span",{className:r,children:"*"}),(0,s.jsx)("span",{className:"mr10",children:"分值"}),(0,s.jsx)("span",{children:t||"--"}),(0,s.jsx)("span",{className:"c-grey-999",children:n})]})};return(0,s.jsx)(l.Z.Item,{noStyle:!0,name:o,children:(0,s.jsx)(a,{})})}},30941:function(e,n,t){"use strict";t.d(n,{Z:function(){return q},P:function(){return A}});var i=t(37205),r=t.n(i),l=t(39647),s=t.n(l),o=t(7557),a=t.n(o),c=t(82242),d=t.n(c),u=t(41498),p=t.n(u),m=t(79800),h=t.n(m),f=t(59301),v=t(78241),x=t(43418),g=t(5112),_=t(98135),y=t(14491),j="brief___LOzpE",b="contentTitle___xkdcN",w="content___Vtri0",k="antdTable___s8T2N",N="tableCell___kN9Fw",C="antdModal___WVBk3",Z="orangeColor___ryB2u",S=t(85062),P=t(37712),I=["isImportMultipleCourse"],T=function(e){var n=e.studentNames,t=e.total;return t>3?(0,P.jsxs)(P.Fragment,{children:["课堂内有",(0,P.jsx)("span",{className:Z,children:null==n?void 0:n.join("、")}),"等",(0,P.jsx)("span",{className:Z,children:t}),"名学生"]}):(0,P.jsxs)(P.Fragment,{children:["课堂内有",(0,P.jsx)("span",{className:Z,children:null==n?void 0:n.join("、")}),["","一","两","三"][t],"名学生"]})},B=function(e){var n=e.onCancel,t=e.onOk,i=e.visible,r=(e.inPaper,e.renderData),l=(e.type,e.isMultipleCourse),s=void 0!==l&&l,o=v.Z.useForm(),c=h()(o,1)[0],u=(0,f.useState)(1),m=h()(u,2),_=m[0],y=m[1],j=(0,f.useState)(!1),b=h()(j,2),k=b[0],N=b[1],S=(0,f.useMemo)((function(){return 1===(null==r?void 0:r.total_num)&&1===(null==r?void 0:r.can_copy_num)}),[r]),I=(0,f.useMemo)((function(){var e;return null==r||null===(e=r.course_data_list)||void 0===e?void 0:e.filter((function(e){return e.is_show}))}),[r]);return(0,P.jsx)(P.Fragment,{children:S?(0,P.jsxs)(x.Z,{centered:!0,closable:!0,open:i,destroyOnClose:!0,title:"提示",className:C,width:682,confirmLoading:k,onCancel:n,onOk:p()(a()().mark((function e(){var n,i,l;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),n=_,s&&(l=d()({},c.getFieldsValue()),n=null==r||null===(i=r.course_data_list)||void 0===i?void 0:i.map((function(e){return void 0!==l[e.id]?d()(d()({},e),{},{is_copy:l[e.id]}):e}))),e.next=5,t(n);case 5:N(!1);case 6:case"end":return e.stop()}}),e)}))),children:[(0,P.jsx)("div",{className:w,style:{marginBottom:20},children:s?"检测到以下课堂已在教学课堂中使用,请问是否复制成新的实训发送至教学课堂中?":(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(T,{studentNames:null==r?void 0:r.student_names,total:null==r?void 0:r.student_count}),"学习过该实践项目。该项目支持复制,请选择是否将该项目复制为新项目发送至课堂中?"]})}),s?(0,P.jsx)(v.Z,{form:c,preserve:!1,children:null==I?void 0:I.map((function(e){return(0,P.jsxs)(f.Fragment,{children:[(0,P.jsx)("h3",{className:"ml15 mb5",children:e.name}),(0,P.jsx)(v.Z.Item,{name:e.id,initialValue:1,children:(0,P.jsxs)(g.ZP.Group,{className:w,children:[(0,P.jsx)(g.ZP,{value:1,style:{color:"#464f66"},children:"复制实训"}),(0,P.jsx)(g.ZP,{value:0,style:{color:"#464f66"},children:"不复制实训"})]})})]},e.id)}))}):(0,P.jsxs)(g.ZP.Group,{value:_,onChange:function(e){return y(e.target.value)},className:w,style:{marginBottom:30},children:[(0,P.jsx)(g.ZP,{value:1,style:{color:"#464f66"},children:"复制"}),(0,P.jsx)(g.ZP,{value:0,style:{color:"#464f66"},children:"不复制"})]}),(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{className:w,style:{marginBottom:10},children:"* 说明:"}),(0,P.jsx)("div",{className:w,style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,P.jsx)("div",{className:"".concat(w," ").concat(Z),children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]})]}):(0,P.jsx)(x.Z,{centered:!0,closable:!0,destroyOnClose:!0,open:i,confirmLoading:k,title:"提示",width:682,onCancel:n,onOk:p()(a()().mark((function e(){var n,i,l;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),n=0,s&&(l=d()({},c.getFieldsValue()),n=null==r||null===(i=r.course_data_list)||void 0===i?void 0:i.map((function(e){return void 0!==l[e.id]?d()(d()({},e),{},{is_use:l[e.id]}):e}))),e.next=5,t(n);case 5:N(!1);case 6:case"end":return e.stop()}}),e)}))),children:(0,P.jsxs)("div",{className:w,children:[(0,P.jsx)(T,{studentNames:null==r?void 0:r.student_names,total:null==r?void 0:r.student_count}),"学习过该实践项目。",s?(0,P.jsxs)(v.Z,{form:c,preserve:!1,children:[(0,P.jsx)("h3",{children:"当前实训不可复制,已经检测到以下课堂存在该实训,同一实训在课堂中重复使用时,会导致成绩互相影响,请确认是否继续使用"}),null==I?void 0:I.map((function(e){return(0,P.jsxs)(f.Fragment,{children:[(0,P.jsx)("h3",{className:"ml15 mb5",children:e.name}),(0,P.jsx)(v.Z.Item,{name:e.id,initialValue:1,children:(0,P.jsxs)(g.ZP.Group,{className:w,children:[(0,P.jsx)(g.ZP,{value:1,style:{color:"#464f66"},children:"继续使用"}),(0,P.jsx)(g.ZP,{value:0,style:{color:"#464f66"},children:"不使用"})]})})]},e.id)}))]}):(0,P.jsxs)("div",{children:["该项目不支持复制,若确认继续发送,",(0,P.jsx)("span",{className:Z,children:"当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"}),"(如果不想清空学生之前的挑战记录,建议参照该实践项目的内容自行创建一个新的项目,或者尝试联系项目创建人开放本项目的复制权限)。"]})]})})})},A=function(){var e=(0,f.useState)(!1),n=h()(e,2),t=n[0],i=n[1],r=(0,f.useState)(),l=h()(r,2),o=l[0],c=l[1],d=function(){var e=p()(a()().mark((function e(n){var t,r,l,o,d;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.isImportMultipleCourse,r=void 0!==t&&t,l=s()(n,I),console.log(n),e.t0=null==n?void 0:n.result,e.t0){e.next=7;break}return e.next=6,(0,S.Tr)(l);case 6:e.t0=e.sent;case 7:if(!("status"in(o=e.t0))){e.next=10;break}return e.abrupt("return",!1);case 10:if(!r){e.next=17;break}if(!(null==o||null===(d=o.course_data_list)||void 0===d?void 0:d.some((function(e){return e.is_show})))){e.next=16;break}return c(o),i(!0),e.abrupt("return",!0);case 16:return e.abrupt("return",o.course_data_list||[]);case 17:if(0!==o.student_count){e.next=19;break}return e.abrupt("return",!1);case 19:return c(o),i(!0),e.abrupt("return",!0);case 22:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return[t,function(){return i(!1)},o,d]},E=function(e){var n=v.Z.useForm(),t=h()(n,1)[0],i=(0,f.useState)(!1),l=h()(i,2),s=l[0],o=l[1],c=e.onCancel,d=e.onOk,u=e.visible,m=e.inPaper,w=void 0!==m&&m,S=e.renderData,I=e.type,B=e.isMultipleCourse,A=void 0!==B&&B,E=e.position,q=(0,f.useMemo)((function(){return w?[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:N,render:function(e,n){return(0,P.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(e,n){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],initialValue:1,children:(0,P.jsxs)(g.ZP.Group,{children:[(0,P.jsx)(g.ZP,{value:1,children:"是"}),(0,P.jsx)(g.ZP,{value:0,children:"否"})]})}),(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],hidden:!0,initialValue:1,children:(0,P.jsx)(_.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:N,render:function(e,n){return(0,P.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(e,n){return(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],initialValue:1,children:(0,P.jsxs)(g.ZP.Group,{children:[(0,P.jsx)(g.ZP,{value:1,children:"是"}),(0,P.jsx)(g.ZP,{value:0,children:"否"})]})})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(e,n){return(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],initialValue:1,children:(0,P.jsxs)(g.ZP.Group,{children:[(0,P.jsx)(g.ZP,{value:1,children:"是"}),(0,P.jsx)(g.ZP,{value:0,children:"否"})]})})}}]}),[w]),M=(0,f.useMemo)((function(){return w?[{title:"实践项目名称",dataIndex:"name",width:424,className:N,align:"center",ellipsis:!0,render:function(e,n){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e}),(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],hidden:!0,initialValue:0,children:(0,P.jsx)(_.Z,{type:"hidden"})}),(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],hidden:!0,initialValue:1,children:(0,P.jsx)(_.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,className:N,ellipsis:!0,align:"center",render:function(e,n){return(0,P.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(e,n){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],initialValue:0,children:(0,P.jsxs)(g.ZP.Group,{children:[(0,P.jsx)(g.ZP,{value:1,children:"是"}),(0,P.jsx)(g.ZP,{value:0,children:"否"})]})}),(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],hidden:!0,initialValue:0,children:(0,P.jsx)(_.Z,{type:"hidden"})})]})}}]}),[w]);if(A){var L={title:"课堂名称",ellipsis:!0,dataIndex:"course_name",width:190,align:"center",className:N,render:function(e,n){return(0,P.jsx)("a",{href:"/classrooms/".concat(n.course_id),children:e})}};q=[L].concat(r()(q)),M=[L].concat(r()(M))}var O=(0,f.useMemo)((function(){return function(e){var n=e.used,t=e.copy,i=e.canNotCopy,r=e.studentNames,l=e.studentCount,s=e.inPaper,o=e.is_random,a=void 0!==o&&o,c=e.position,d=(void 0===c?"":c)||(s?"试卷":"课程");return(0,P.jsxs)("span",{children:[(0,P.jsx)(T,{studentNames:r,total:l}),"学习过",d,"中的",(0,P.jsx)("span",{className:Z,children:n}),"个项目,",t>0&&i>0?(0,P.jsxs)(P.Fragment,{children:["其中",(0,P.jsx)("span",{className:Z,children:t}),"个项目支持复制,",(0,P.jsx)("span",{className:Z,children:i}),"个项目不支持复制"]}):t>0&&0===i?(0,P.jsxs)(P.Fragment,{children:["其中",(0,P.jsx)("span",{className:Z,children:t}),"个项目支持复制"]}):0===t&&i>0?(0,P.jsxs)(P.Fragment,{children:["其中",(0,P.jsx)("span",{className:Z,children:i}),"个项目不支持复制"]}):void 0,"。请选择",a?"":"是否继续使用和","是否复制为新项目发送至课堂中?"]})}({used:null==S?void 0:S.repeat_shixun_num,copy:null==S?void 0:S.can_copy_num,canNotCopy:null==S?void 0:S.no_copy_num,studentNames:null==S?void 0:S.student_names,studentCount:null==S?void 0:S.student_count,is_random:null==S?void 0:S.is_random,inPaper:w,position:E})}),[S,w,E]);return(0,P.jsx)(x.Z,{title:"提示",centered:!0,open:u,confirmLoading:s,onOk:p()(a()().mark((function e(){var n,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),n=t.getFieldsValue(),i=Object.keys(n).map((function(e){return{id:parseInt(e.split("_")[0]),course_id:parseInt(e.split("_")[1]),is_use:n[e].is_use,is_copy:n[e].is_copy}})),e.next=5,d(i);case 5:o(!1);case 6:case"end":return e.stop()}}),e)}))),onCancel:c,width:880,okText:"确认",className:C,destroyOnClose:!0,children:(0,P.jsxs)(v.Z,{form:t,preserve:!1,children:[(0,P.jsx)("div",{className:j,children:O}),(0,P.jsxs)("div",{style:{marginBottom:30},children:[(0,P.jsx)("div",{style:{marginBottom:20},children:"* 说明"}),(0,P.jsx)("div",{style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,P.jsx)("div",{className:Z,children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]}),(null==S?void 0:S.can_copy_num)>0&&(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{className:b,children:"支持复制的项目"}),(0,P.jsx)(y.Z,{columns:q,className:k,dataSource:null==S?void 0:S.can_copy_list,rowKey:"subject"===I?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})]}),(null==S?void 0:S.no_copy_num)>0&&(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{className:b,children:"不支持复制的项目"}),(0,P.jsx)(y.Z,{columns:M,className:k,dataSource:null==S?void 0:S.no_copy_list,rowKey:"subject"===I?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})]}),(null==S?void 0:S.no_use_list.length)>0&&(null==S?void 0:S.no_use_list.map((function(e){return(0,P.jsxs)("div",{children:[(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_copy"],hidden:!0,initialValue:0,children:(0,P.jsx)(_.Z,{type:"hidden"})}),(0,P.jsx)(v.Z.Item,{name:["".concat("subject"===I?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_use"],hidden:!0,initialValue:1,children:(0,P.jsx)(_.Z,{type:"hidden"})})]},"subject"===I?e.stage_shixun_id:e.shixun_course_id||e.id)})))]})})},q=function(e){return"multiple"===e.modalType?(0,P.jsx)(E,d()({},e)):(0,P.jsx)(B,d()({},e))}},37507:function(e,n,t){"use strict";t.d(n,{h:function(){return x}});var i=t(82242),r=t.n(i),l=t(79800),s=t.n(l),o=t(59301),a=t(57809),c=t(78241),d=t(3113),u=t(89780),p=t.n(u),m=(t(81974),t(3693),t(37712)),h=a.default.Option,f={labelCol:{span:4},wrapperCol:{span:20}},v={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 x(e){var n=e.value,t=e.onChange,i=e.mode,l=e.options,a=void 0===l?{}:l,c=(0,o.useRef)(),d=(0,o.useState)(),u=s()(d,2),h=u[0],f=u[1];return(0,o.useEffect)((function(){if(h){var e=function(e){var n=e.getValue();t&&t(n)};return h.on("change",e),function(){h.off("change",e)}}}),[h,t]),(0,o.useEffect)((function(){h&&h.setOption("mode",i)}),[h,i]),(0,o.useEffect)((function(){h&&(n===h.getValue()&&""!==n||setTimeout((function(){h.setValue(n||"")}),300))}),[h,n]),(0,o.useEffect)((function(){if(c.current&&!h){var e=p().fromTextArea(c.current,r()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},a));f(e)}}),[c.current,h]),(0,m.jsx)("div",{className:"my-codemirror-container",children:(0,m.jsx)("textarea",{ref:c})})}n.Z=function(e){var n=e.callback,t=e.onCancel,i=(0,o.useState)("python"),l=s()(i,2),u=l[0],p=l[1];return(0,m.jsxs)(c.Z,r()(r()({},f),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},style:{width:500},children:[(0,m.jsx)(c.Z.Item,{label:"代码语言",name:"language",children:(0,m.jsx)(a.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){p(v[e][1])},children:Object.keys(v).map((function(e){return(0,m.jsx)(h,{value:e,children:v[e][0]},e)}))})}),(0,m.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,m.jsx)(x,{mode:u})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(d.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(d.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},11094:function(e,n,t){"use strict";t.d(n,{Z:function(){return Ze}});var i=t(91232),r=t.n(i),l=t(79800),s=t.n(l),o=t(85573),a=t.n(o),c=t(59301),d=t(89780),u=t.n(d),p=t(76374),m=(t(81974),t(6313),t(25717),t(99498),t(25419),t(67549),t(42783)),h=t(37712),f=function(e){var n=e.value,t=void 0===n?"":n,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,c.useMemo)((function(){return""}),[t]));return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},v=t(82242),x=t.n(v),g=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学图像",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function _(e){var n=e.onActionCallback,t=e.title,i=e.icon,r=e.actionName,l=e.className,s=void 0===l?"":l,o=e.children;return(0,h.jsxs)("a",{title:t,className:s,onClick:function(){n(r)},children:[(0,h.jsx)("i",{className:"".concat(i)}),o]})}var y=function(e){var n=e.watch,t=e.showNullButton,i=e.showNullProgramButton,r=e.onActionCallback,l=e.fullScreen,s=e.insertTemp,o=e.hidetoolBar,a=e.extraUse,c=[].concat(g,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,h.jsxs)("ul",{className:"markdown-toolbar-container",children:[!o&&c.map((function(e,n){return(0,h.jsx)("li",{children:e.actionName?(0,h.jsx)(_,x()(x()({},e),{},{onActionCallback:r})):(0,h.jsx)("span",{className:"v-line"})},n)})),t?(0,h.jsx)("li",{children:(0,h.jsx)(_,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("li",{children:(0,h.jsx)(_,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,h.jsx)("li",{children:(0,h.jsx)(_,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,s&&(0,h.jsx)("li",{children:(0,h.jsx)(_,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(s),onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),a&&(0,h.jsx)("li",{children:a}),(0,h.jsx)("li",{className:"btn-full-screen",children:(0,h.jsx)(_,{icon:"".concat(l?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:l?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},j=t(27308),b=t(78241),w=t(98135),k=t(3113),N={labelCol:{span:4},wrapperCol:{span:20}},C=function(e){var n=e.callback,t=e.onCancel;return(0,h.jsxs)(b.Z,x()(x()({},N),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},style:{width:500},children:[(0,h.jsx)(b.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,h.jsx)(w.Z,{})}),(0,h.jsx)(b.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,h.jsx)(w.Z,{})}),(0,h.jsxs)("div",{className:"flex-container flex-end",children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},Z=t(37507),S=t(8591),P=t(55087),I=b.Z.useForm,T={width:280,marginRight:10},B={labelCol:{span:5},wrapperCol:{span:19}},A=function(e){var n=e.callback,t=e.onCancel,i=I(),r=s()(i,1)[0],l=(0,c.useRef)();function o(e,n){-1!==e.status?r.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):S.ZP.error(e.message)}return(0,h.jsxs)(b.Z,x()(x()({form:r},B),{},{className:"upload-image-panel",onFinish:function(e){n(e,l.current)},style:{width:470,overflow:"hidden"},children:[(0,h.jsx)(b.Z.Item,{label:"图片地址",required:!0,children:(0,h.jsxs)("div",{className:"flex-container",children:[(0,h.jsx)(b.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,h.jsx)(w.Z,{style:T})}),(0,h.jsx)(E,{onFileChange:function(e){var n=e.target.files[0];l.current=n,q(n,o)}})]})}),(0,h.jsx)(b.Z.Item,{label:"图片描述",name:"alt",children:(0,h.jsx)(w.Z,{style:{width:264}})}),(0,h.jsxs)(b.Z.Item,{style:{textAlign:"right"},children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function E(e){var n=e.onFileChange;return(0,h.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,h.jsx)("input",{type:"file",onChange:n})]})}function q(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(P.KI,"/api/attachments.json")),i.send(t)}var M=t(95237),L=t(74908),O=function(e){var n=e.callback,t=e.onCancel,i=document.createElement("canvas"),r=i.getContext("2d");i.width=1e3,i.height=800,r.fillStyle="#ffffff",r.fillRect(0,0,i.width,i.height);var l=i.toDataURL("image/png");return(0,h.jsx)(M.Z,{style:{height:"100vh"},children:(0,h.jsx)(L.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:l,visible:!0,title:String(Date.now())},onOk:function(e){n({src:e.url})},onClose:t})})},F=t(7557),D=t.n(F),R=t(41498),z=t.n(R),G=t(37205),V=t.n(G),W=t(12378);function H(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(H,go.CommandHandler),H.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},H.prototype.alignLeft=function(){var e=this.diagram;e.startTransaction("aligning left");var n=1/0;e.selection.each((function(e){e instanceof go.Link||(n=Math.min(e.position.x,n))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n,e.position.y))})),e.commitTransaction("aligning left")},H.prototype.alignRight=function(){var e=this.diagram;e.startTransaction("aligning right");var n=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var t=e.actualBounds.x+e.actualBounds.width;n=Math.max(t,n)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n-e.actualBounds.width,e.position.y))})),e.commitTransaction("aligning right")},H.prototype.alignTop=function(){var e=this.diagram;e.startTransaction("alignTop");var n=1/0;e.selection.each((function(e){e instanceof go.Link||(n=Math.min(e.position.y,n))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.position.x,n))})),e.commitTransaction("alignTop")},H.prototype.alignBottom=function(){var e=this.diagram;e.startTransaction("aligning bottom");var n=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var t=e.actualBounds.y+e.actualBounds.height;n=Math.max(t,n)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,n-e.actualBounds.height))})),e.commitTransaction("aligning bottom")},H.prototype.alignCenterX=function(){var e=this.diagram,n=e.selection.first();if(n){e.startTransaction("aligning Center X");var t=n.actualBounds.x+n.actualBounds.width/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t-e.actualBounds.width/2,e.actualBounds.y))})),e.commitTransaction("aligning Center X")}},H.prototype.alignCenterY=function(){var e=this.diagram,n=e.selection.first();if(n){e.startTransaction("aligning Center Y");var t=n.actualBounds.y+n.actualBounds.height/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,t-e.actualBounds.height/2))})),e.commitTransaction("aligning Center Y")}},H.prototype.alignColumn=function(e){var n=this.diagram;n.startTransaction("align Column"),void 0===e&&(e=0),e=parseFloat(e);var t=new Array;n.selection.each((function(e){e instanceof go.Link||t.push(e)}));for(var i=0;i<t.length-1;i++){var r=t[i],l=r.actualBounds.y+r.actualBounds.height+e;t[i+1].move(new go.Point(r.actualBounds.x,l))}n.commitTransaction("align Column")},H.prototype.alignRow=function(e){void 0===e&&(e=0),e=parseFloat(e);var n=this.diagram;n.startTransaction("align Row");var t=new Array;n.selection.each((function(e){e instanceof go.Link||t.push(e)}));for(var i=0;i<t.length-1;i++){var r=t[i],l=r.actualBounds.x+r.actualBounds.width+e;t[i+1].move(new go.Point(l,r.actualBounds.y))}n.commitTransaction("align Row")},H.prototype.canRotate=function(e){var n=this.diagram;return null!==n&&!n.isReadOnly&&!n.isModelReadOnly&&!(n.selection.count<1)},H.prototype.rotate=function(e){var n;void 0===e&&(e=90),(n=this.diagram).startTransaction("rotate "+e.toString()),(n=this.diagram).selection.each((function(n){n instanceof go.Link||n instanceof go.Group||(n.angle+=e)})),n.commitTransaction("rotate "+e.toString())},H.prototype.pullToFront=function(){var e=this.diagram;e.startTransaction("pullToFront");var n=new go.Map;e.selection.each((function(e){n.set(e.layer,0)})),n.iteratorKeys.each((function(e){var t=0;e.parts.each((function(e){if(!e.isSelected){var n=e.zOrder;isNaN(n)?e.zOrder=0:t=Math.max(t,n)}})),n.set(e,t)})),e.selection.each((function(e){H._assignZOrder(e,n.get(e.layer)+1)})),e.commitTransaction("pullToFront")},H.prototype.pushToBack=function(){var e=this.diagram;e.startTransaction("pushToBack");var n=new go.Map;e.selection.each((function(e){n.set(e.layer,0)})),n.iteratorKeys.each((function(e){var t=0;e.parts.each((function(e){if(!e.isSelected){var n=e.zOrder;isNaN(n)?e.zOrder=0:t=Math.min(t,n)}})),n.set(e,t)})),e.selection.each((function(e){H._assignZOrder(e,n.get(e.layer)-1-H._findGroupDepth(e))})),e.commitTransaction("pushToBack")},H._assignZOrder=function(e,n,t){void 0===t&&(t=e),e.layer===t.layer&&(e.zOrder=n),e instanceof go.Group&&e.memberParts.each((function(e){H._assignZOrder(e,n+1,t)}))},H._findGroupDepth=function(e){if(e instanceof go.Group){var n=0;return e.memberParts.each((function(e){n=Math.max(n,H._findGroupDepth(e))})),n+1}return 0},H.prototype.doKeyDown=function(){var e=this.diagram;if(null!==e){var n=e.lastInput;if("Up"===n.key||"Down"===n.key||"Left"===n.key||"Right"===n.key){var t=this.arrowKeyBehavior;if("none"===t)return;if("select"===t)return void this._arrowKeySelect();if("move"===t)return void this._arrowKeyMove();if("tree"===t)return void this._arrowKeyTree()}go.CommandHandler.prototype.doKeyDown.call(this)}},H.prototype._getAllParts=function(){var e=new Array;return this.diagram.nodes.each((function(n){e.push(n)})),this.diagram.parts.each((function(n){e.push(n)})),e},H.prototype._arrowKeyMove=function(){var e=this.diagram,n=e.lastInput,t=0,i=0;if(n.control||n.meta)t=1,i=1;else if(null!==e.grid){var r=e.grid.gridCellSize;i=r.width,t=r.height}e.startTransaction("arrowKeyMove"),e.selection.each((function(e){"Up"===n.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y-t)):"Down"===n.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y+t)):"Left"===n.key?e.move(new go.Point(e.actualBounds.x-i,e.actualBounds.y)):"Right"===n.key&&e.move(new go.Point(e.actualBounds.x+i,e.actualBounds.y))})),e.commitTransaction("arrowKeyMove")},H.prototype._arrowKeySelect=function(){var e=this.diagram,n=e.lastInput,t=null;"Up"===n.key?t=this._findNearestPartTowards(270):"Down"===n.key?t=this._findNearestPartTowards(90):"Left"===n.key?t=this._findNearestPartTowards(180):"Right"===n.key&&(t=this._findNearestPartTowards(0)),null!==t&&(n.shift?t.isSelected=!0:n.control||n.meta?t.isSelected=!t.isSelected:e.select(t))},H.prototype._findNearestPartTowards=function(e){var n=this.diagram.selection.first();if(null===n)return null;for(var t=n.actualBounds.center,i=this._getAllParts(),r=1/0,l=n,s=0;s<i.length;s++){var o=i[s];if(o!==n&&o.canSelect()){var a=o.actualBounds.center,c=t.directionPoint(a),d=this._angleCloseness(c,e);if(d<=45){var u=t.distanceSquaredPoint(a);(u*=1+Math.sin(d*Math.PI/180))<r&&(r=u,l=o)}}}return l},H.prototype._angleCloseness=function(e,n){return Math.min(Math.abs(n-e),Math.min(Math.abs(n+360-e),Math.abs(n-360-e)))},H.prototype._arrowKeyTree=function(){var e=this.diagram,n=e.selection.first();if(n instanceof go.Node){var t=e.lastInput;if("Right"===t.key)if(n.isTreeLeaf);else if(n.isTreeExpanded){null!==(r=this._sortTreeChildrenByY(n).first())&&e.select(r)}else e.commandHandler.canExpandTree(n)&&e.commandHandler.expandTree(n);else if("Left"===t.key){if(!n.isTreeLeaf&&n.isTreeExpanded)e.commandHandler.canCollapseTree(n)&&e.commandHandler.collapseTree(n);else null!==(l=n.findTreeParentNode())&&e.select(l)}else if("Up"===t.key){if(null!==(l=n.findTreeParentNode()))if((o=(s=this._sortTreeChildrenByY(l)).indexOf(n))>0){for(var i=s.elt(o-1);null!==i&&i.isTreeExpanded&&!i.isTreeLeaf;){i=this._sortTreeChildrenByY(i).last()}null!==i&&e.select(i)}else e.select(l)}else if("Down"===t.key){var r;if(n.isTreeExpanded&&!n.isTreeLeaf)null!==(r=this._sortTreeChildrenByY(n).first())&&e.select(r);else for(;null!==n;){var l,s,o;if(null===(l=n.findTreeParentNode()))break;if((o=(s=this._sortTreeChildrenByY(l)).indexOf(n))<s.length-1){e.select(s.elt(o+1));break}n=l}}var a=e.selection.first();null!==a&&e.scrollToRect(a.actualBounds)}},H.prototype._sortTreeChildrenByY=function(e){var n=(new go.List).addAll(e.findTreeChildrenNodes());return n.sort((function(e,n){var t=e.location,i=n.location;return t.y<i.y?-1:t.y>i.y?1:t.x<i.x?-1:t.x>i.x?1:0})),n},H.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},H.prototype.pasteFromClipboard=function(){var e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),e},Object.defineProperty(H.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(e){if("move"!==e&&"select"!==e&&"scroll"!==e&&"tree"!==e&&"none"!==e)throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+e);this._arrowKeyBehavior=e}}),Object.defineProperty(H.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(e){if(!(e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+e);this._pasteOffset.set(e)}});var U=H,K=(t(31270),t(85160)),Y=t(43418),J=t(43604),Q=t(51136),X="myPaletteDiv___Xjz2I",$="maxH60___Pd4Re";window.go=W;var ee=function(e){var n=e.onCancel,t=e.callback,i=(0,c.useRef)(),r=(0,c.useRef)(),l=(0,c.useRef)(),o=(0,c.useRef)(!1),a=(0,c.useRef)(!1),d=(0,c.useState)(0),u=s()(d,2),p=u[0],m=u[1],f=function(){var e=z()(D()().mark((function e(){var n,r;return D()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.current.makeImage(),e.next=3,(0,Q.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:n.src}});case 3:r=e.sent,t({src:r.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){m(p+1)}),[]),(0,h.jsx)("div",{ref:a,className:o.current?"".concat($," body-overflow-initial"):"body-overflow-initial",children:(0,h.jsx)(Y.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!p,destroyOnClose:!0,maskClosable:!1,getContainer:a.current,rootClassName:"zIndex-9999",title:(0,h.jsxs)(M.Z,{children:[(0,h.jsx)(J.Z,{flex:1,children:"插入流程图"}),(0,h.jsx)(J.Z,{onClick:function(){o.current=!o.current,m(p+1)},children:(0,h.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:n,children:(0,h.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},children:[(0,h.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,h.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,h.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,h.jsx)("div",{style:{height:"calc(100% - 50px)"},className:X,ref:l})]}),(0,h.jsxs)("div",{style:{flex:1,position:"relative"},children:[(0,h.jsx)(K.FI,{initDiagram:function(){var e=W.GraphObject.make,n="#ff3333",t="#3358ff",s="#25ad23",o="#d533ff",a="#7d33ff",c="#ff6233",d="#ffffff",u="#000000",p="#fffcd5",m="#d5ebff",h="#f2dfe0",f="#a5d2fa",v="#cccccc",x="#b3e6b3",g="#fcbbbd";function _(n,t){var i=function(e,t){e.handled=!0,e.diagram.model.commit((function(i){var r=t.part.adornedPart,l=(new W.Point).setRectSpot(r.actualBounds,n);l.subtract(r.location),l.scale(2,2),l.x+=130*Math.sign(l.x),l.y+=130*Math.sign(l.y),l.add(r.location),l.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var s=i.copyNodeData(r.data);i.setGroupKeyForNodeData(s,i.getGroupKeyForNodeData(r.data)),i.addNodeData(s);var o={from:r.key,to:i.getKeyForNodeData(s)};i.addLinkData(o);var a=e.diagram.findNodeForData(s);a.location=l,e.diagram.select(a),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(W.Shape,{figure:t,alignment:n,alignmentFocus:n.opposite(),width:n.equals(W.Spot.Top)||n.equals(W.Spot.Bottom)?25:18,height:n.equals(W.Spot.Top)||n.equals(W.Spot.Bottom)?18:25,fill:"orange",stroke:d,strokeWidth:4,mouseEnter:function(e,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="orange"},isActionable:!0,click:i,contextClick:i})}function y(n){return e(W.Shape,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:function(e,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="orange"},click:function(e,n){e.diagram.commandHandler.showContextMenu(n.part.adornedPart)}},n||{})}function j(e,n){return function(t,i){t.handled=!0,t.diagram.model.commit((function(t){t.set(i.part.adornedPart.data,e,n)}))}}function b(n,t){return t||(t="color"),e(W.Shape,{width:16,height:16,stroke:"lightgray",fill:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.stroke="dodgerblue"},mouseLeave:function(e,n){return n.stroke="lightgray"},click:j(t,n),contextClick:j(t,n)})}function w(){return[e("ContextMenuButton",e(W.Panel,"Horizontal",b(d,"fill"),b(p,"fill"),b(m,"fill"),b(h,"fill"))),e("ContextMenuButton",e(W.Panel,"Horizontal",b(v,"fill"),b(x,"fill"),b(f,"fill"),b(g,"fill")))]}function k(){return[e("ContextMenuButton",e(W.Panel,"Horizontal",b(u),b(s),b(t),b(n))),e("ContextMenuButton",e(W.Panel,"Horizontal",b(d),b(o),b(a),b(c)))]}function N(n,t){return t||(t="thickness"),e(W.Shape,"LineH",{width:16,height:16,strokeWidth:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:j(t,n),contextClick:j(t,n)})}function C(n,t){return t||(t="dash"),e(W.Shape,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:j(t,n),contextClick:j(t,n)})}function Z(){return[e("ContextMenuButton",e(W.Panel,"Horizontal",N(1),N(2),N(3),N(4))),e("ContextMenuButton",e(W.Panel,"Horizontal",C(null),C([2,4]),C([4,4])))]}function S(n,t){return t||(t="figure"),e(W.Shape,{width:32,height:32,scale:.5,fill:"lightgray",figure:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="lightgray"},click:j(t,n),contextClick:j(t,n)})}function P(n){return e(W.Shape,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(n+4).toString()+" H3"})}function I(n){var t="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return 0===n?t="M0 0 M16 16 M0 8 L16 8":2===n&&(t="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),e(W.Shape,{geometryString:t,margin:2,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:j("dir",n),contextClick:j("dir",n)})}function T(n){var t=function(e,t){e.handled=!0,e.diagram.model.commit((function(e){var i=t.part.adornedPart;e.set(i.data,n?"toSpot":"fromSpot",W.Spot.stringify(W.Spot.AllSides)),(n?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(W.Shape,{width:12,height:12,fill:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:t,contextClick:t})}function B(n,t){var i=0,r=W.Spot.RightSide;n.equals(W.Spot.Top)?(i=270,r=W.Spot.TopSide):n.equals(W.Spot.Left)?(i=180,r=W.Spot.LeftSide):n.equals(W.Spot.Bottom)&&(i=90,r=W.Spot.BottomSide),t||(i-=180);var l=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var i=n.part.adornedPart;e.set(i.data,t?"toSpot":"fromSpot",W.Spot.stringify(r)),(t?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(W.Shape,{alignment:n,alignmentFocus:n.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:i,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:l,contextClick:l})}return i.current=new W.Diagram(r.current,{padding:20,grid:e(W.Panel,"Grid",e(W.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(W.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:function(e){e.diagram.commandHandler.addTopLevelParts(e.diagram.selection,!0)||e.diagram.currentTool.doCancel()},commandHandler:e(U),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(e){var n=e.subject;n.location=n.location.copy().snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:function(e){e.subject;setTimeout((function(){e.diagram.commandHandler.editTextBlock()}))},LinkRelinked:function(e){e.parameter.part.invalidateConnectedLinks();var n=e.subject;e.diagram.toolManager.linkingTool.isForwards?n.toNode.invalidateConnectedLinks():n.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),i.current.nodeTemplate=e(W.Node,"Auto",{locationSpot:W.Spot.Center,locationObjectName:"SHAPE",desiredSize:new W.Size(120,60),minSize:new W.Size(40,40),resizable:!0,resizeCellSize:new W.Size(10,10),rotatable:!0},new W.Binding("location","loc",W.Point.parse).makeTwoWay(W.Point.stringify),new W.Binding("desiredSize","size",W.Size.parse).makeTwoWay(W.Size.stringify),e(W.Shape,{name:"SHAPE",fill:d,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:W.Spot.AllSides,toSpot:W.Spot.AllSides},new W.Binding("figure"),new W.Binding("fill"),new W.Binding("stroke","borderColor"),new W.Binding("strokeWidth","thickness"),new W.Binding("strokeDashArray","dash")),e(W.Shape,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(W.TextBlock,{margin:1,textAlign:"center",overflow:W.TextBlock.OverflowEllipsis,editable:!0},new W.Binding("text").makeTwoWay(),new W.Binding("stroke","color"))),i.current.nodeTemplate.toolTip=e("ToolTip",e(W.Panel,"Vertical",{maxSize:new W.Size(200,NaN)},e(W.TextBlock,{font:"bold 10pt sans-serif",textAlign:"center"},new W.Binding("text")),e(W.TextBlock,{font:"10pt sans-serif",textAlign:"center"},new W.Binding("text","details")))),i.current.nodeTemplate.selectionAdornmentTemplate=e(W.Adornment,"Spot",e(W.Placeholder,{padding:10}),_(W.Spot.Top,"TriangleUp"),_(W.Spot.Left,"TriangleLeft"),_(W.Spot.Right,"TriangleRight"),_(W.Spot.Bottom,"TriangleDown"),y({alignment:new W.Spot(.75,0)})),i.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(W.Panel,"Horizontal",S("Rectangle"),S("RoundedRectangle"),S("Ellipse"),S("Diamond"))),e("ContextMenuButton",e(W.Panel,"Horizontal",S("Parallelogram2"),S("ManualOperation"),S("Procedure"),S("Cylinder1"))),e("ContextMenuButton",e(W.Panel,"Horizontal",S("Terminator"),S("CreateRequest"),S("Document"),S("TriangleDown"))),w(),k(),Z()),i.current.groupTemplate=e(W.Group,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:W.Spot.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:function(e,n){n.addMembers(n.diagram.selection,!0)||n.diagram.currentTool.doCancel()},avoidable:!1},new W.Binding("location","loc",W.Point.parse).makeTwoWay(W.Point.stringify),e(W.Panel,"Auto",{name:"BODY"},e(W.Shape,{parameter1:10,fill:d,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:W.Spot.AllSides,toSpot:W.Spot.AllSides},new W.Binding("fill"),new W.Binding("stroke","color"),new W.Binding("strokeWidth","thickness"),new W.Binding("strokeDashArray","dash")),e(W.Placeholder,{background:"transparent",margin:20})),e(W.TextBlock,{alignment:W.Spot.Top,alignmentFocus:W.Spot.Bottom,font:"bold 12pt sans-serif",editable:!0},new W.Binding("text"),new W.Binding("stroke","color"))),i.current.groupTemplate.selectionAdornmentTemplate=e(W.Adornment,"Spot",e(W.Panel,"Auto",e(W.Shape,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(W.Placeholder,{margin:1.5})),y({alignment:W.Spot.TopRight,alignmentFocus:W.Spot.BottomRight})),i.current.groupTemplate.contextMenu=e("ContextMenu",w(),k(),Z()),i.current.linkTemplate=e(W.Link,{layerName:"Foreground",routing:W.Link.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new W.Binding("fromSpot","fromSpot",W.Spot.parse),new W.Binding("toSpot","toSpot",W.Spot.parse),new W.Binding("fromShortLength","dir",(function(e){return e>=1?10:0})),new W.Binding("toShortLength","dir",(function(e){return e>=1?10:0})),new W.Binding("points").makeTwoWay(),e(W.Shape,{strokeWidth:2},new W.Binding("stroke","color"),new W.Binding("strokeWidth","thickness"),new W.Binding("strokeDashArray","dash")),e(W.Shape,{segmentIndex:0,segmentOffset:new W.Point(15,0),segmentOrientation:W.Link.OrientAlong,alignmentFocus:W.Spot.Right,figure:"circle",width:10,strokeWidth:0},new W.Binding("fill","color"),new W.Binding("visible","dir",(function(e){return 1===e}))),e(W.Shape,{segmentIndex:-1,segmentOffset:new W.Point(-10,6),segmentOrientation:W.Link.OrientPlus90,alignmentFocus:W.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new W.Binding("fill","color"),new W.Binding("visible","dir",(function(e){return e>=1})),new W.Binding("width","thickness",(function(e){return 7+3*e})),new W.Binding("height","thickness",(function(e){return 7+3*e})),new W.Binding("segmentOffset","thickness",(function(e){return new W.Point(-15,4+1.5*e)}))),e(W.Shape,{segmentIndex:0,segmentOffset:new W.Point(15,-6),segmentOrientation:W.Link.OrientMinus90,alignmentFocus:W.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new W.Binding("fill","color"),new W.Binding("visible","dir",(function(e){return 2===e})),new W.Binding("width","thickness",(function(e){return 7+3*e})),new W.Binding("height","thickness",(function(e){return 7+3*e})),new W.Binding("segmentOffset","thickness",(function(e){return new W.Point(-15,4+1.5*e)}))),e(W.TextBlock,{alignmentFocus:new W.Spot(0,1,-4,0),editable:!0},new W.Binding("text").makeTwoWay(),new W.Binding("stroke","color"))),i.current.linkTemplate.selectionAdornmentTemplate=e(W.Adornment,e(W.Shape,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:P(2)},new W.Binding("pathPattern","thickness",P)),y({alignmentFocus:new W.Spot(0,0,-6,-4)})),i.current.linkTemplate.contextMenu=e("ContextMenu",k(),Z(),e("ContextMenuButton",e(W.Panel,"Horizontal",I(0),I(1),I(2))),e("ContextMenuButton",e(W.Panel,"Horizontal",e(W.Panel,"Spot",T(!1),B(W.Spot.Top,!1),B(W.Spot.Left,!1),B(W.Spot.Right,!1),B(W.Spot.Bottom,!1)),e(W.Panel,"Spot",{margin:new W.Margin(0,0,0,2)},T(!0),B(W.Spot.Top,!0),B(W.Spot.Left,!0),B(W.Spot.Right,!0),B(W.Spot.Bottom,!0))))),new W.Palette(l.current,{maxSelectionCount:1,linkTemplate:e(W.Link,{locationSpot:W.Spot.Center,selectionAdornmentTemplate:e(W.Adornment,"Link",{locationSpot:W.Spot.Center},e(W.Shape,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(W.Shape,{toArrow:"Standard",stroke:null}))},{routing:W.Link.AvoidsNodes,curve:W.Link.JumpOver,corner:5,toShortLength:4},new W.Binding("points"),e(W.Shape,{isPanelMain:!0,strokeWidth:2}),e(W.Shape,{toArrow:"Standard",stroke:null})),model:new W.GraphLinksModel([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(V()(W.Shape.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))}).nodeTemplate=e(W.Node,"Auto",{locationSpot:W.Spot.Center},new W.Binding("location","location",W.Point.parse).makeTwoWay(W.Point.stringify),e(W.Shape,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new W.Binding("stroke").makeTwoWay(),new W.Binding("fill").makeTwoWay(),new W.Binding("figure")),e(W.TextBlock,{margin:new W.Margin(5,5,3,5),font:"10pt sans-serif",minSize:new W.Size(16,16),maxSize:new W.Size(10,NaN),textAlign:"center",editable:!0},new W.Binding("key").makeTwoWay())),setTimeout((function(){i.current.grid=e(W.Panel,"Grid",e(W.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(W.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),i.current.grid.visible=!0,i.current.grid.gridCellStroke="darkgray",i.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=i.current,i.current},divClassName:"diagram-component",style:{height:"80vh"}}),(0,h.jsx)("div",{ref:r})]})]}),(0,h.jsx)("div",{className:"tr",children:(0,h.jsx)(k.ZP,{size:"large",onClick:f,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},ne=t(5112),te=t(54449),ie=ne.ZP.Group,re={margin:"0 8px"},le=function(e){var n=e.callback,t=e.onCancel;return(0,h.jsxs)(b.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,h.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,h.jsx)("span",{style:re,children:"单元格数:"}),(0,h.jsx)("span",{style:re,children:"行数"}),(0,h.jsx)(b.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,h.jsx)(te.Z,{})}),(0,h.jsx)("span",{style:re,children:"列数"}),(0,h.jsx)(b.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,h.jsx)(te.Z,{})})]}),(0,h.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,h.jsx)("span",{style:re,children:"对齐方式:"}),(0,h.jsx)(b.Z.Item,{name:"align",children:(0,h.jsxs)(ie,{children:[(0,h.jsx)(ne.ZP,{value:"default",children:(0,h.jsx)("i",{className:"fa fa-align-justify"})}),(0,h.jsx)(ne.ZP,{value:"left",children:(0,h.jsx)("i",{className:"fa fa-align-left"})}),(0,h.jsx)(ne.ZP,{value:"center",children:(0,h.jsx)("i",{className:"fa fa-align-center"})}),(0,h.jsx)(ne.ZP,{value:"right",children:(0,h.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,h.jsxs)("div",{className:"flex-container flex-end",children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},se=t(78673),oe=t(66455),ae=t.n(oe),ce=(0,c.forwardRef)((function(e,n){var t=e.use3d,i=e.width,r=e.height,l=e.callback,o=(e.showSaveButton,(0,c.useRef)()),a=(0,c.useRef)(),d=(0,c.useState)(!1),u=s()(d,2),p=u[0],m=u[1],f=(0,c.useRef)({id:o,appName:"graphing",width:i||1e3,height:r||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,c.useEffect)((function(){a.current=new(ae())(f.current,!0),window.onload=function(){a.current.inject("applet_container")}}),[]);var v=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return l&&l(e),e};return(0,c.useEffect)((function(){f.current.appName=p?"3D":"graphing",a.current.inject("applet_container")}),[p]),(0,c.useEffect)((function(){m(t)}),[t]),(0,c.useImperativeHandle)(n,(function(){return{getImgData:v}})),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:o}),(0,h.jsxs)(M.Z,{align:"middle",children:[(0,h.jsx)(J.Z,{flex:1,children:(0,h.jsx)(se.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:p,onChange:function(e){return m(e)}})}),(0,h.jsx)(J.Z,{children:(0,h.jsx)(k.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),de=t(33773),ue=t(27065),pe="link",me="upload-image",he="add-flowchart",fe="draw-image",ve="code-block",xe="add-table",ge="------------",_e={default:ge,left:":".concat(ge),center:":".concat(ge,":"),right:"".concat(ge,":")},ye=t(56266);var je="@▁▁@",be=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function we(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ke=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Ne=a()(a()({},ke+"-B","bold"),ke+"-I","italic"),Ce=a()(a()(a()(a()(a()(a()(a()(a()({},pe,"添加链接"),ve,"添加代码块"),me,"添加图片"),fe,"添加画图"),he,"插入流程图"),xe,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),Ze=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,l=e.width,o=void 0===l?"100%":l,d=e.height,v=void 0===d?400:d,x=e.miniToolbar,g=void 0!==x&&x,_=e.isFocus,b=void 0!==_&&_,w=e.watch,k=e.insertTemp,N=e.mode,P=void 0===N?"markdown":N,I=e.id,T=void 0===I?"markdown-editor-id":I,B=e.showResizeBar,E=void 0!==B&&B,M=e.noStorage,L=void 0!==M&&M,F=e.showNullButton,D=void 0!==F&&F,R=e.showNullProgramButton,z=void 0!==R&&R,G=e.hidetoolBar,V=void 0!==G&&G,W=e.fullScreen,H=void 0!==W&&W,U=e.onBlur,K=e.onCMBeforeChange,J=e.onFullScreen,Q=e.className,X=void 0===Q?"":Q,$=e.disablePaste,ne=void 0!==$&&$,te=e.disabled,ie=void 0!==te&&te,re=e.disabledFill,se=void 0!==re&&re,oe=e.placeholder,ae=void 0===oe?"":oe,ge=e.values,ke=void 0===ge?"":ge,Ze=e.extraUse,Se=(0,c.useState)(null),Pe=s()(Se,2),Ie=Pe[0],Te=Pe[1],Be=(0,c.useState)(t),Ae=s()(Be,2),Ee=Ae[0],qe=Ae[1],Me=(0,c.useState)(w),Le=s()(Me,2),Oe=Le[0],Fe=Le[1],De=(0,c.useState)(H),Re=s()(De,2),ze=Re[0],Ge=Re[1],Ve=(0,c.useState)(""),We=s()(Ve,2),He=We[0],Ue=We[1],Ke=(0,c.useState)(0),Ye=s()(Ke,2),Je=Ye[0],Qe=Ye[1],Xe=(0,c.useState)(v),$e=s()(Xe,2),en=$e[0],nn=$e[1],tn=(0,c.useState)(!1),rn=s()(tn,2),ln=(rn[0],rn[1]),sn=(0,c.useState)(0),on=s()(sn,2),an=on[0],cn=on[1],dn=(0,c.useState)(0),un=s()(dn,2),pn=un[0],mn=un[1],hn=(0,c.useRef)(),fn=(0,c.useRef)(),vn=(0,c.useRef)(),xn=(0,c.useRef)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;qe(ke),null==Ie||Ie.setValue(ke),window.scrollTo(0,e)}),[ke]),(0,c.useEffect)((function(){null==J||J(ze)}),[ze]),(0,c.useEffect)((function(){if(hn.current){var e=function(e,t){if(!ne){var i=t.clipboardData;if(i){var r=i.types.toString(),l=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==P)return;try{var s,o=l[1];"file"===(null===(s=l[0])||void 0===s?void 0:s.kind)&&(o=l[0]);var a=o.getAsFile(),c=a.name.split(".").pop();q(a,(function(e){var t,i,r;e.id?(null==a||null===(t=a.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection(".concat(e.content_type,")")):(null==a||null===(i=a.type)||void 0===i?void 0:i.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(ue.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==a||null===(r=a.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(ue.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(a.type,'&disposition=inline" target="_blank">').concat(a.name,"</a>")):be.includes(c)?n.replaceSelection('<a href="'.concat(ue.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(a.name,"</a>")):n.replaceSelection("[".concat(a.name,"](").concat(ue.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(t){S.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=u().fromTextArea(hn.current,{mode:P,lineNumbers:!g,lineWrapping:!0,value:t,autoCloseTags:!0,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",ae):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),i=t.getCursor(),r=t.getLine(i.line),l=r.charAt(i.ch-1),s=r.lastIndexOf("@▁@",i.ch),o=r.lastIndexOf("@▁▁@",i.ch),a=s>o?s:o,c=s>o?3:4;if(-1===je.indexOf(l))return null;if(console.log("change1:",n,e,r,i,a,s,o,l),a>=0&&i.ch-a<5){var d=a+c;return t.replaceRange("",{line:i.line,ch:a},{line:i.line,ch:d}),{line:i.line,ch:d}}return null}(e);t&&n.preventDefault()}})),b&&n.focus(),n.on("paste",e),ie&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),Te(n),function(){n.off("paste",e)}}}),[]);var gn=(0,c.useCallback)((function(){fn.current}),[en,fn,ze]);(0,c.useEffect)((function(){if(Ie){var e=function(){var e=new p.Z((function(e){var n,t=r()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(gn(),Ie.setSize("100%","100%"),Ie.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(hn.current.parentElement),e}();return function(){var n,t;null!==(n=hn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=hn.current)||void 0===t?void 0:t.parentElement)}}}),[Ie,gn]),(0,c.useEffect)((function(){if(Ie){for(var e=[],n=function(){var n=s()(i[t],2),r=n[0],l=n[1],o=a()({},r,(function(){_n(l)}));e.push(o),Ie.addKeyMap(o)},t=0,i=Object.entries(Ne);t<i.length;t++)n();return function(){for(var n=0,t=e;n<t.length;n++){var i=t[n];Ie.removeKeyMap(i)}}}}),[Ie]),(0,c.useEffect)((function(){H!==ze&&Ge(H)}),[H]),(0,ye.Z)((function(){if(!L&&Je>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(T);e>=Je+1e4&&(!n||n!==Ee)&&(window.sessionStorage.setItem(T,Ee),ln(!0))}}),1e4),(0,c.useEffect)((function(){Fe(w)}),[Ie,w]),(0,c.useEffect)((function(){Ie&&b&&Ie.focus()}),[Ie,b]),(0,c.useEffect)((function(){if(Oe&&Ie){var e=function(e){var n=e.target;if(xn.current){var t=n.scrollTop/n.scrollHeight;xn.current.scrollTop=xn.current.scrollHeight*t}},n=Ie.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Ie,Oe]),(0,c.useEffect)((function(){if(Ie&&K){var e=function(e,n){K(e,n)};return Ie.on("beforeChange",e),function(){Ie.off("beforeChange",e)}}}),[Ie,K]),(0,c.useEffect)((function(){if(Ie&&U){var e=function(){U(Ie.getValue())};return Ie.on("blur",e),function(){Ie.off("blur",e)}}}),[Ie,U]),(0,c.useEffect)((function(){if(Ie){var e=function(e,n){var t=e.getValue();qe(t),Qe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(z?i(t,kn(t)):i(t))};return Ie.on("change",e),function(){Ie.off("change",e)}}}),[Ie,i]),(0,c.useEffect)((function(){if(Ie)if(null==t)Ie.setValue(""),qe("");else{var e=window.scrollY||window.pageYOffset;t!==Ie.getValue()&&(Ie.setValue(t),qe(t),Ie.setCursor(ie?1:Ie.lineCount(),0),window.scrollTo(0,e))}}),[Ie,t]);var _n=(0,c.useCallback)((function(e){var n=Ie.getCursor(),t=Ie.getSelection(),i=t.split("\n");switch(e){case"bold":return Ie.replaceSelection("**"+t+"**"),""===t&&Ie.setCursor(n.line,n.ch+2),Ie.focus();case"italic":return Ie.replaceSelection("*"+t+"*"),""===t&&Ie.setCursor(n.line,n.ch+1),Ie.focus();case"code":return Ie.replaceSelection("`"+t+"`"),""===t&&Ie.setCursor(n.line,n.ch+1),Ie.focus();case"inline-latex":return Ue("inline-latex"),Ie.focus();case"latex":return Ie.replaceSelection("```latex\n"+t+"\n```"),Ie.setCursor(n.line+1,t.length+1),Ie.focus();case"line-break":return Ie.replaceSelection("<br/>\n"),Ie.focus();case"list-ul":return""===t?Ie.replaceSelection("- "+t):Ie.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Ie.focus();case"list-ol":return""===t?Ie.replaceSelection("1. "+t):Ie.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Ie.focus();case"add-null-ch":return""===t&&Ie.setCursor(n.line,n.ch),Ie.replaceSelection("▁"),Ie.focus();case"add-signal":return""===t&&Ie.setCursor(n.line,n.ch),Ie.replaceSelection("@▁@"),Ie.focus();case"add-multiple":return""===t&&Ie.setCursor(n.line,n.ch),Ie.replaceSelection(je),Ie.focus();case"inster-template-1":return""===t&&Ie.setCursor(n.line,n.ch),Ie.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),Ie.focus();case"eraser":return Ie.setValue(""),Ie.focus();case"trigger-watch":return Fe(!Oe),Ie.focus();case"trigger-full-screen":return Ge(!ze),Ie.focus();case pe:return void Ue(pe);case ve:return void Ue(ve);case me:return void Ue(me);case fe:return void Ue(fe);case"maths-latex":return void Ue("maths-latex");case he:return void Ue(he);case xe:return void Ue(xe);default:throw new Error}}),[Ie,Oe,ze]),yn=(0,c.useCallback)((function(e,n){var t,i,r,l,s;switch(Ue(""),He){case pe:var o=e.title,a=e.link;return Ie.replaceSelection("[".concat(o,"](").concat(a,")")),Ie.focus();case ve:var c=e.language,d=e.content;return Ie.replaceSelection(["```"+c,d,"```"].join("\n")),Ie.focus();case"maths-latex":for(var u=atob(e),p=new Uint8Array(u.length),m=0;m<u.length;m++)p[m]=u.charCodeAt(m);q(new Blob([p],{type:"image/png"}),(function(e){e.id?Ie.replaceSelection(".concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":Ie.replaceSelection("`$$"+e+"$$`");break;case me:case fe:case"add-flowchart":var h=e.src,f=e.alt,v=n,x=null==v||null===(t=v.name)||void 0===t||null===(t=t.split("."))||void 0===t||null===(i=t.pop)||void 0===i?void 0:i.call(t);return(null==v||null===(r=v.type)||void 0===r?void 0:r.indexOf("image"))>-1||null==v||!v.type?f?Ie.replaceSelection(".concat(h,' "').concat(f,'" )')):Ie.replaceSelection("")):(null==v||null===(l=v.type)||void 0===l?void 0:l.indexOf("video"))>-1?Ie.replaceSelection('<video width="100%" controls src="'.concat(ue.Z.API_SERVER).concat(h,'"></video>')):(null==v||null===(s=v.type)||void 0===s?void 0:s.indexOf("pdf"))>-1?Ie.replaceSelection('<a href="'.concat(ue.Z.API_SERVER).concat(h,"?type=").concat(v.type,'&disposition=inline" target="_blank">').concat(v.name,"</a>")):be.includes(x)?Ie.replaceSelection('<a href="'.concat(ue.Z.API_SERVER).concat(h,'?type=office&disposition=inline" target="_blank">').concat(v.name,"</a>")):Ie.replaceSelection("[".concat(v.name,"](").concat(ue.Z.API_SERVER).concat(h,")")),Ie.focus();case xe:for(var g=e.row,_=e.col,y=e.align,j="\n",b=0;b<g;b++){for(var w=[],k=[],N=0;N<_;N++)1===b&&k.push(_e[y]),w.push(" ");1===b&&(j+="| ".concat(k.join(" | ")," |\n")),j+="| ".concat(w.join(1===_?"":" | ")," |\n")}return Ie.replaceSelection(j+"\n"),Ie.focus();default:throw new Error}}),[Ie,He]),jn=(0,c.useMemo)((function(){switch(He){case pe:return(0,h.jsx)(C,{callback:yn,onCancel:bn});case ve:return(0,h.jsx)(Z.Z,{callback:yn,onCancel:bn});case me:return(0,h.jsx)(A,{callback:yn,onCancel:bn});case he:return(0,h.jsx)(ee,{callback:yn,onCancel:bn});case xe:return(0,h.jsx)(le,{callback:yn,onCancel:bn});case"maths-latex":return(0,h.jsx)(ce,{showSaveButton:!0,callback:yn});case"inline-latex":return(0,h.jsx)(de.Z,{showSaveButton:!0,callback:yn});default:return null}}),[He]);function bn(){Ue("")}(0,c.useEffect)((function(){if(vn.current){var e=function(e){r=!0,l=e.pageY},n=function(){r=!1},t=function(e){if(r){var n=e.pageY-l;n<0&&(n=0),n>300&&(n=300),nn(v+n+"px")}},i=vn.current,r=!1,l=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Ie,vn]),(0,c.useEffect)((function(){nn(v)}),[v]);var wn={width:we(o),height:we(en)},kn=((0,c.useMemo)((function(){if(Je){var e=new Date(Je),n=e.getHours(),t=e.getMinutes(),i=e.getSeconds();return t=t<10?"0"+t:t,i=i<10?"0"+i:i,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(i)}return 0}),[Je]),function(e){var n=[];if(z){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});(0,c.useEffect)((function(){if(Ce[He]&&He!==fe&&He!==he){var e=document.getElementsByClassName("ant-modal")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;cn(n),mn(t)}}),[He]);var Nn=function(e,n,t,i){var r=document.body.clientHeight,l=document.body.clientWidth;return!(e<20&&t>e||e>l-20&&t<e||n<20&&i>n||n>r-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,h.jsxs)(c.Fragment,{children:[(0,h.jsx)("div",{className:"markdown-editor-wrapper",ref:fn,children:(0,h.jsxs)("div",{className:"markdown-editor-container ".concat(X," ").concat(Oe?"on-preview":""," ").concat(g?"mini":""," ").concat(ze?"full-screen":""),style:wn,children:[(0,h.jsx)(y,{insertTemp:k,watch:Oe,fullScreen:ze,showNullButton:D,showNullProgramButton:z,onActionCallback:_n,hidetoolBar:V,extraUse:Ze}),(0,h.jsxs)("div",{className:"markdown-editor-body",children:[(0,h.jsx)("div",{className:"codemirror-container",children:(0,h.jsx)("textarea",{ref:hn,placeholder:ae})}),Oe?(0,h.jsxs)("div",{ref:xn,className:"preview-container",children:["stex"===P&&(0,h.jsx)(f,{value:Ee}),"stex"!==P&&(0,h.jsx)(m.Z,{disabledFill:se,showProgramFill:z,value:Ee})]}):null]})]})}),E?(0,h.jsx)("a",{ref:vn,className:"editor-resize"}):null,He===fe&&(0,h.jsx)(O,{callback:yn,onCancel:bn}),He===he&&(0,h.jsx)(ee,{callback:yn,onCancel:bn}),(0,h.jsx)(j.Z,{children:Ce[He]&&He!==fe&&He!==he?(0,h.jsx)(Y.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:an,top:pn},title:(0,h.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-an,t=e.clientY-pn;document.body.onmousemove=function(e){var i=e.clientX-n,r=e.clientY-t,l=document.getElementsByClassName("ant-modal")[0],s=window.innerWidth-l.offsetWidth,o=window.innerHeight-l.offsetHeight;i=Math.max(0,Math.min(i,s)),r=Math.max(0,Math.min(r,o)),Nn(e.clientX,e.clientY,n,t)&&(cn(i),mn(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:Ce[He]}),open:!0,onCancel:bn,footer:null,destroyOnClose:!0,width:He===he?"1200px":null,height:He===he?"80vh":null,className:"markdown-popup-form",children:jn}):null})]})}},27308:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var i=t(82100),r=t.n(i),l=t(29186),s=t.n(l),o=t(80619),a=t.n(o),c=t(47074),d=t.n(c),u=t(59301),p=t(4676),m=function(e){a()(t,e);var n=d()(t);function t(e){var i;r()(this,t),i=n.call(this,e);var l=window.document;return i.node=l.createElement("div"),l.body.appendChild(i.node),i}return s()(t,[{key:"render",value:function(){var e=this.props.children;return(0,p.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(u.Component)},56266:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});var i=t(59301);function r(e,n){var t=(0,i.useRef)();(0,i.useEffect)((function(){t.current=e})),(0,i.useEffect)((function(){if(null!==n){var e=setInterval((function(){t.current()}),n);return function(){return clearInterval(e)}}}),[n])}},79118:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return dt}});var i=t(82242),r=t.n(i),l=t(7557),s=t.n(l),o=t(41498),a=t.n(o),c=t(79800),d=t.n(c),u=t(39647),p=t.n(u),m=t(59301),h=t(7880),f=t(78241),v=t(8591),x=t(66104),g=t(98135),_=t(19842),y=t(5112),j=t(54449),b=t(3113),w={flex_box_center:"flex_box_center___aPGWN",flex_space_between:"flex_space_between___MQNX5",flex_box_vertical_center:"flex_box_vertical_center___Z7QdK",flex_box_center_end:"flex_box_center_end___JQl5O",flex_box_column:"flex_box_column___IhYhx",bg:"bg___Kg8x_",title:"title___UhsVG",titleLeft:"titleLeft___NPVwn",titleRight:"titleRight___UGtmZ",formWrap:"formWrap___Jowb2",baseLineHeight:"baseLineHeight___N68WX",radioBtnWrapper:"radioBtnWrapper___bX7Pi",radiogroup:"radiogroup___ukf8u",easy:"easy___ZHYPU",medium:"medium___piewx",hard:"hard___HMXyt",selectdiv:"selectdiv___gkuBG",divitem:"divitem___vNm0q",bottmodiv:"bottmodiv___assW5",cancelBtn:"cancelBtn___Nl6Pi",confirmBtn:"confirmBtn___BNoFU",baseFormItem:"baseFormItem___ILZ2V",cascaderPopup:"cascaderPopup___QPxW3",addQuestionBtn:"addQuestionBtn___OjehS"},k=t(43418),N=t(84291),C=t(99232),Z=t.n(C),S=t(37712),P=(0,h.connect)((function(e){return{user:e.user,classroomList:e.classroomList}}))((function(e){e.user;var n=e.dispatch,t=e.classroomList,i=e.onModalOk,r=e.setsubloading,l=((0,h.useParams)(),(0,m.useState)()),o=d()(l,2),c=o[0],u=o[1],p=(0,m.useState)(!1),f=d()(p,2),x=f[0],g=f[1];return(0,S.jsx)(k.Z,{title:"温馨提示",afterClose:function(){g(!1)},zIndex:8888,destroyOnClose:!0,footer:null,maskClosable:!1,keyboard:!1,open:"预约弹窗"===t.actionTabs.key,onCancel:function(){x?v.ZP.warning("正在请求数据中..."):(r(!1),n({type:"classroomList/setActionTabs",payload:{}}))},children:(0,S.jsxs)("div",{children:[(0,S.jsx)("span",{children:"EduCoder注意到您的课堂中学生人数较多。为更好地为您和您的学生服务,给同学们带来更好的考试体验,我们将提前为您和您的学生准备好服务器资源。 请您告知我们,这份试卷的预计考试时间是:"}),(0,S.jsx)("br",{}),(0,S.jsx)(N.default,{popupStyle:{zIndex:9999},style:{marginTop:"10px",marginBottom:"10px"},disabledDate:function(e){return e&&e<Z()().subtract(1,"days")},format:"YYYY-MM-DD HH:mm:ss",onChange:function(e,n){u(n)},showTime:{defaultValue:Z()("00:00:00","HH:mm:ss")}}),(0,S.jsx)("br",{}),(0,S.jsx)("span",{children:"感谢您的配合"}),(0,S.jsx)("br",{}),(0,S.jsx)("div",{style:{textAlign:"end"},children:(0,S.jsx)(b.ZP,{loading:x,type:"primary",onClick:a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g(!0),i(c,(function(){n({type:"classroomList/setActionTabs",payload:{}})}));case 2:case"end":return e.stop()}}),e)}))),children:"确认"})})]})})})),I=t(51136),T=t(37205),B=t.n(T),A=t(57703),E=t(78091),q={wrap:"wrap___Ww0Ti",itemWarp:"itemWarp___LMLjd",addIcon:"addIcon___xmRLl",deleteIcon:"deleteIcon___gjwgO"},M=t(57809),L=function(e){var n,t,i,l,o,c,u,p,h=e.setitem,v=e.item,x=e.rz,g=(0,m.useState)({zydatas:[],jbdatas:[],kcdatas:[],zsdatas:[],page:1,per_page:20}),_=d()(g,2),y=_[0],j=_[1],b=f.Z.useForm(),w=d()(b,1)[0],k=(0,m.useState)(!1),N=d()(k,2),C=N[0],Z=N[1];function P(){return(P=a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T(null==v?void 0:v.ec_major_school_id);case 2:return e.next=4,A(null==v?void 0:v.ec_year_id);case 4:return e.next=6,L(null==v?void 0:v.ec_course_id);case 6:w.setFieldsValue({ec_course_id:null==v?void 0:v.ec_course_id,ec_major_school_id:null==v?void 0:v.ec_major_school_id,ec_point_ids:null==v?void 0:v.ec_point_ids,ec_year_id:null==v?void 0:v.ec_year_id});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return B.apply(this,arguments)}function B(){return(B=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/ec_major_schools/".concat(n,"/ec_years/get_year_list.json"),{method:"get"});case 2:t=e.sent,y.jbdatas=null==t?void 0:t.data,j(r()({},y)),w.setFieldsValue({ec_year_id:"",ec_course_id:"",ec_point_ids:[]});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(e){return E.apply(this,arguments)}function E(){return(E=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/ec_years/".concat(n,"/ec_courses/get_courses.json"),{method:"get"});case 2:t=e.sent,y.kcdatas=null==t?void 0:t.data,j(r()({},y)),w.setFieldsValue({ec_course_id:"",ec_point_ids:[]});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){x&&!C&&(y.zydatas=x,j(r()({},y)),Z(!0),null!=v&&v.ec_course_id&&function(){P.apply(this,arguments)}())}),[v,x,C]),console.log(y,"params");var L=function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/ec_courses/".concat(n,"/ec_points.json"),{method:"get",params:{ec_course_id:n}});case 2:t=e.sent,y.zsdatas=null==t?void 0:t.data,j(r()({},y));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,S.jsx)("div",{className:q.from,children:(0,S.jsxs)(f.Z,{form:w,layout:"inline",onValuesChange:function(e){console.log("----",e),e.ec_major_school_id&&(y.jbdatas=[],y.kcdatas=[],y.zsdatas=[],j(r()({},y)),T(e.ec_major_school_id)),e.ec_year_id&&(y.kcdatas=[],y.zsdatas=[],j(r()({},y)),A(e.ec_year_id)),e.ec_course_id&&(y.zsdatas=[],j(r()({},y)),L(e.ec_course_id))},onFinish:function(){var e=a()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h(n);case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsx)(f.Z.Item,{name:"ec_major_school_id",children:(0,S.jsx)(M.default,{style:{width:160},disabled:(null===(n=y.zydatas)||void 0===n?void 0:n.length)<=0,placeholder:"请选择认证专业",children:null==y||null===(t=y.zydatas)||void 0===t?void 0:t.map((function(e,n){return(0,S.jsx)(M.default.Option,{value:null==e?void 0:e.ec_major_school_id,children:null==e?void 0:e.name},n)}))})}),(0,S.jsx)(f.Z.Item,{name:"ec_year_id",children:(0,S.jsx)(M.default,{style:{width:160},disabled:(null===(i=y.jbdatas)||void 0===i?void 0:i.length)<=0,placeholder:"请选择认证届别",children:null==y||null===(l=y.jbdatas)||void 0===l?void 0:l.map((function(e,n){return(0,S.jsx)(M.default.Option,{value:null==e?void 0:e.ec_year_id,children:null==e?void 0:e.year},n)}))})}),(0,S.jsx)(f.Z.Item,{name:"ec_course_id",children:(0,S.jsx)(M.default,{style:{width:208},disabled:(null===(o=y.kcdatas)||void 0===o?void 0:o.length)<=0,placeholder:"请选择课程",children:null==y||null===(c=y.kcdatas)||void 0===c?void 0:c.map((function(e,n){return(0,S.jsx)(M.default.Option,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},n)}))})}),(0,S.jsx)(f.Z.Item,{name:"ec_point_ids",children:(0,S.jsx)(M.default,{onChange:function(){w.submit()},style:{width:160},maxTagCount:1,maxTagTextLength:7,mode:"multiple",disabled:(null===(u=y.zsdatas)||void 0===u?void 0:u.length)<=0,placeholder:"请选择知识点",children:null==y||null===(p=y.zsdatas)||void 0===p?void 0:p.map((function(e,n){return(0,S.jsx)(M.default.Option,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},n)}))})})]})})},O=(0,h.connect)((function(e){return{user:e.user}}))((function(e){var n,t,i=e.user,l=e.exercise_id,o=void 0===l?null:l,c=e.homework_common_id,u=void 0===c?null:c,p=e.setitem,h=(0,m.useState)([{id:Math.random()}]),f=d()(h,2),v=f[0],x=f[1],g=(0,m.useState)(null),_=d()(g,2),y=_[0],j=_[1];function b(){return w.apply(this,arguments)}function w(){return(w=a()(s()().mark((function e(){var n,t,i,l,a,c;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/ec_courses/".concat(0,"/ec_points/get_work_points.json"),{method:"get",params:{exercise_id:o,homework_common_id:u}});case 2:(null==(t=e.sent)||null===(n=t.data)||void 0===n?void 0:n.length)>0&&(c=[],null==t||null===(i=t.data)||void 0===i||i.map((function(e){var n;null==e||null===(n=e.ec_point_ids)||void 0===n||n.map((function(e){c.push(e)}))})),p(r()(r()({},null==t||null===(l=t.data)||void 0===l?void 0:l[0]),{},{ec_point_ids:c})),x(null==t||null===(a=t.data)||void 0===a?void 0:a.map((function(e){return r()(r()({},e),{},{id:Math.random()})}))));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(){return(k=a()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/schools/".concat(null==i||null===(n=i.userInfo)||void 0===n||null===(n=n.course)||void 0===n?void 0:n.course_school_id,"/ec_majors/get_major_list.json"),{method:"get"});case 2:t=e.sent,j(null==t?void 0:t.data),(u||o)&&b();case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,m.useEffect)((function(){var e;null!=i&&null!==(e=i.userInfo)&&void 0!==e&&null!==(e=e.course)&&void 0!==e&&e.course_school_id&&function(){k.apply(this,arguments)}()}),[null==i||null===(n=i.userInfo)||void 0===n||null===(n=n.course)||void 0===n?void 0:n.course_school_id]),console.log(v,y,"datas"),(0,S.jsx)("div",{style:{display:null!==(t=i.userInfo.course)&&void 0!==t&&t.is_openengineering?"":"none"},children:(0,S.jsxs)("div",{className:q.wrap,children:[(0,S.jsxs)("p",{children:["工程认证",(0,S.jsx)("br",{}),"考核知识点"]}),(0,S.jsx)("div",{className:q.itemWarp,children:null==v?void 0:v.map((function(e,n){return(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:20},children:[(0,S.jsx)(L,{rz:y,item:e,setitem:function(e){e=r()(r()({},null==v?void 0:v[n]),e),v.splice(n,1,e),x(B()(v));var t=[];null==v||v.map((function(e){var n;null==e||null===(n=e.ec_point_ids)||void 0===n||n.map((function(e){t.push(e)}))})),p(r()(r()({},e),{},{ec_point_ids:t}))}}),(0,S.jsx)(A.Z,{className:q.addIcon,onClick:function(){v.push({id:Math.random()}),x(B()(v))}}),0!=n&&(0,S.jsx)(E.Z,{className:q.deleteIcon,onClick:function(){v.splice(n,1);var e=[];null==v||v.map((function(n){var t;null==n||null===(t=n.ec_point_ids)||void 0===t||t.map((function(n){e.push(n)}))})),p(r()(r()({},v[n-1]),{},{ec_point_ids:e})),x(B()(v))}})]},e.id)}))})]})})})),F=t(20834),D=t(71418),R=t(56511),z=t(38854),G=t(6848),V={flex_box_center:"flex_box_center___zCnVx",flex_space_between:"flex_space_between___BBiQD",flex_box_vertical_center:"flex_box_vertical_center___KzPui",flex_box_center_end:"flex_box_center_end___zJokd",flex_box_column:"flex_box_column___Grsys",moreSpan:"moreSpan___VJeLv",bg:"bg___oBBHW",title:"title___xV4Rt",bottomdiv:"bottomdiv___rPfwr",spanBtn:"spanBtn___eJxID",addQuestionBtn:"addQuestionBtn___RPRiP",saveBtn:"saveBtn___y9nNf",left:"left___Q3Qf4",leftAction:"leftAction___GT9yG",Button:"Button___r00OP",iconWrapper:"iconWrapper___wofW_",up:"up___a9RQm",down:"down___x6RAl",disabled:"disabled___mkEME",titleleft:"titleleft___WZ83K",more_style:"more_style___ZXYnN",qcount:"qcount___o6F1k",score:"score___Gy6jr",qtitle:"qtitle___KF7pa",qcountclick:"qcountclick___kvoyc",right:"right___Nfa70",edit:"edit___RVRSb",delete:"delete___J9BAT",yuanti:"yuanti___ljq8l",tianjia:"tianjia___s7Zu2",shixun:"shixun___YkjdZ",scoreByBlankRadio:"scoreByBlankRadio___QYQY5",modalconfirm:"modalconfirm___dmWFe",scoremodal:"scoremodal___CDA7w",close:"close___jdUWv",content:"content___HPqUf",items:"items___YkyQL",bottom:"bottom___mzpp4",yes:"yes___Xio6z",no:"no___hbicD",formcenter:"formcenter___kN8Ax",radiogroup:"radiogroup___htjtc",easy:"easy____g1mR",medium:"medium___vPAsn",hard:"hard___c6tcf",formcenterselect:"formcenterselect___B88vb",selectitems:"selectitems___wUGKF",morebottom:"morebottom___F5cFQ",scoreinput:"scoreinput___S9Fbv",titleTooltip:"titleTooltip___J0i26",exercise_styles:"exercise_styles___BJAZm"},W=t(6457),H=t(7406),U=t(47766),K=t(42783),Y=function(e){var n=e.Itemid,t=e.setqitem,i=e.qitem,l=e.data,o=e.getdata,c=e.bigitem,u=e.setBigqitem,p=e.isedit,h=(0,m.useState)([]),f=d()(h,2),x=f[0],g=f[1],_=(0,m.useState)(!1),y=d()(_,2),j=y[0],b=y[1],w=function(e,n,t){var i=Array.from(e),r=i.splice(n,1),l=d()(r,1)[0];return i.splice(t,0,l),i};(0,m.useEffect)((function(){l.length>0&&g(B()(l)||[])}),[l]);var k=function(){var e=a()(s()().mark((function e(t,i){var r,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.destination){e.next=2;break}return e.abrupt("return");case 2:if(!p){e.next=5;break}return v.ZP.info("请先保存或取消当前正在编辑的试题。"),e.abrupt("return");case 5:return r=w(i,t.source.index,t.destination.index),b(!0),e.next=9,(0,I.ZP)("/api/exercises/".concat(n,"/adjust_position.json"),{method:"post",body:{id:n,question_ids:null==r?void 0:r.map((function(e){return e.question_id}))}});case 9:l=e.sent,b(!1),0===l.status&&o({id:null==i?void 0:i[t.source.index].question_id});case 12:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();return(0,S.jsx)("div",{children:(0,S.jsx)(U.Z5,{onDragEnd:function(e){return k(e,x)},children:(0,S.jsx)(U.bK,{droppableId:"droppable",children:function(e,n){return(0,S.jsxs)("div",r()(r()({ref:e.innerRef},e.droppableProps),{},{children:[(0,S.jsx)(D.Z,{spinning:j,children:x.map((function(e,n){return(0,S.jsx)(U._l,{draggableId:n.toString(),index:n,children:function(l,s){var o,a;return(0,S.jsx)("aside",r()(r()(r()({ref:l.innerRef},l.draggableProps),l.dragHandleProps),{},{children:(0,S.jsx)(G.Z,{title:(0,S.jsx)(K.Z,{value:8===(null==e?void 0:e.question_type)?null==e||null===(o=e.program_attr)||void 0===o?void 0:o.description:e.question_title}),color:"#fff",placement:"left",overlayClassName:V.titleTooltip,children:(0,S.jsxs)("div",{onClick:function(){p?v.ZP.info("请先保存或取消当前正在编辑的试题。"):(t(r()(r()({},e),{},{index:n+1})),u(c),(0,W.Vf)("#question-scroll-id"))},className:"".concat(V.qcount," ").concat(e.question_id===(null==i?void 0:i.question_id)?V.qcountclick:""),children:[(0,S.jsxs)("span",{className:V.score,children:[null==e?void 0:e.question_score,"分"]}),(0,S.jsxs)("span",{className:V.qtitle,children:[n+1,"、",(0,S.jsx)(K.Z,{value:8===(null==e?void 0:e.question_type)?null==e||null===(a=e.program_attr)||void 0===a?void 0:a.description:e.question_title,showTextOnly:!0})]})]})})}))}},n)}))}),e.placeholder]}))}})})})},J=t(95237),Q=t(5309),X=t(78673),$=t(85699),ee=t(88289),ne=function(e){var n,t=e.form,i=e.TagDiscipline,r=e.exerciseitem,l=e.qitem,o=e.getTagData,c=(0,m.useState)(!0),u=d()(c,2),p=u[0],h=(u[1],(0,m.useState)(!1)),x=d()(h,2),_=x[0],j=x[1],w=(0,m.useState)(""),N=d()(w,2),C=N[0],Z=N[1];return(0,m.useEffect)((function(){t.setFieldsValue({difficulty:l.difficulty||2,tag_discipline_ids:l.tag_discipline_ids,repeat_answer:!l.repeat_answer})}),[]),(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{style:{marginTop:30,height:p?"100%":"0px",overflow:"hidden"},children:[(0,S.jsx)(f.Z.Item,{className:V.formcenter,rules:[{required:!0,message:"请先选择难度"}],label:"难度",name:"difficulty",children:(0,S.jsxs)(y.ZP.Group,{className:V.radiogroup,children:[(0,S.jsx)(y.ZP.Button,{className:V.easy,value:1,children:"简单"}),(0,S.jsx)(y.ZP.Button,{className:V.medium,value:2,children:"适中"}),(0,S.jsx)(y.ZP.Button,{className:V.hard,value:3,children:"困难"})]})}),(0,S.jsx)(f.Z.Item,{className:V.formcenterselect,label:"知识点",children:(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsx)(f.Z.Item,{name:"tag_discipline_ids",children:(0,S.jsx)(M.default,{className:V.selectitems,showSearch:!0,placeholder:"请选择知识点,支持选择多个",mode:"multiple",listHeight:200,dropdownStyle:{zIndex:9},allowClear:!0,optionFilterProp:"children",filterOption:function(e,n){return n.key.indexOf(e.toLowerCase())>=0},children:null==i||null===(n=i.tag_disciplines)||void 0===n?void 0:n.map((function(e){return(0,S.jsx)(M.default.Option,{value:e.id,children:(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsx)("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e.name}),"personal"===(null==e?void 0:e.type)&&(0,S.jsx)("div",{style:{marginLeft:"5px",border:"1px solid #24C074",color:"#24C074",padding:"0 4px",borderRadius:"2px",fontSize:"12px",height:"20px",lineHeight:"20px"},children:"自用"})]})},e.name+e.id)}))})}),(0,S.jsxs)("div",{style:{marginLeft:20,marginTop:"-16px",lineHeight:"48px",height:48,fontSize:14},children:[(0,S.jsx)("span",{children:"没有合适的知识点?"}),(0,S.jsx)("a",{onClick:function(){j(!0)},style:{marginLeft:3,color:"#3061D0"},children:"新建知识点"})]})]})}),(0,S.jsx)(f.Z.Item,{className:V.formcenterselect,children:(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsx)(f.Z.Item,{name:"repeat_answer",valuePropName:"checked",children:(0,S.jsx)(X.Z,{})}),(0,S.jsxs)("div",{style:{marginLeft:10,marginTop:"-16px",lineHeight:"48px",height:48,color:"#000000"},children:["不允许学生重复答题",(0,S.jsx)(G.Z,{placement:"right",title:"选中后,学生必须作答完成才能进入下一题,且进入下一题之后不允许再修改该题答案",children:(0,S.jsx)($.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})]})]})})]}),(0,S.jsxs)(k.Z,{title:!1,footer:!1,open:_,width:640,centered:!0,closable:!1,className:V.scoremodal,children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:40},children:[(0,S.jsx)("div",{className:V.title,children:"新建知识点"}),(0,S.jsx)("span",{onClick:function(){return j(!1)},className:V.close,children:"X"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)(ee.Z,{style:{color:"#FF8C29",marginRight:10}}),"新建的知识点仅本人可见,平台审核列入公开知识点后,对所有用户可见。 平台有权删除不合适的知识点,请认真填写知识点名称。"]}),(0,S.jsx)(g.Z,{style:{marginBottom:30,marginTop:30,height:46},showCount:!0,maxLength:20,onChange:function(e){Z(e.target.value)},placeholder:"请输入知识点名称"}),(0,S.jsxs)("div",{className:V.bottom,children:[(0,S.jsx)(b.ZP,{className:V.no,onClick:function(){j(!1)},children:"取消"}),(0,S.jsx)(b.ZP,{className:V.yes,onClick:a()(s()().mark((function e(){var n,i,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C){e.next=3;break}return v.ZP.info("知识点名称不能为空"),e.abrupt("return");case 3:return e.next=5,(0,I.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:C,sub_discipline_id:null==r||null===(n=r.exercise)||void 0===n?void 0:n.sub_discipline_id}});case 5:0===(null==(i=e.sent)?void 0:i.status)&&(t.setFieldsValue({knowledge:C,tag_discipline_ids:[].concat(B()(t.getFieldValue("tag_discipline_ids")),[null==i?void 0:i.tag_discipline_id])}),o(null===(l=r.exercise)||void 0===l?void 0:l.sub_discipline_id)),j(!1);case 8:case"end":return e.stop()}}),e)}))),children:"确认"})]})]})]})},te=function(e){var n,t=e.qitem,i=e.setisedit,l=e.TagDiscipline,o=e.exerciseitem,c=e.seveeditor,u=e.deleteitem,p=e.getTagData,h=e.init,x=f.Z.useForm(),g=d()(x,1)[0];return(0,m.useEffect)((function(){var e;g.setFieldsValue(r()(r()({},t),{},{name:null==t?void 0:t.question_title,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=t&&t.repeat_answer)}))}),[t]),(0,S.jsx)("div",{children:(0,S.jsxs)(f.Z,{form:g,colon:!1,onFinish:function(e){var n,i,l,s,o,a=null==e||null===(n=e.choices)||void 0===n||null===(i=n.map)||void 0===i?void 0:i.call(n,(function(e,n){if(1===(null==e?void 0:e.standard_boolean))return n+1})),d=r()(r()({},e),{},{item_type:null==t?void 0:t.question_type,question_choices:null==e||null===(l=e.choices)||void 0===l||null===(s=l.map)||void 0===s?void 0:s.call(l,(function(e){return e.choice_text})),standard_answers:a.filter((function(e){return e})),choices:null==e||null===(o=e.choices)||void 0===o?void 0:o.map((function(e){return r()(r()({},e),{},{is_answer:e.standard_boolean})}))});c(r()(r()({},t),d))},onFinishFailed:function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),g.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,S.jsx)("span",{children:1===(null==t?void 0:t.question_type)?"多选题":"单选题"})]}),1==(null==o||null===(n=o.exercise)||void 0===n?void 0:n.exercise_status)&&!(null!=t&&t.isadd)&&(0,S.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){u()},children:[(0,S.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,S.jsx)(b.ZP,{onClick:function(){var e;t.isadd?(i(!1),h()):(g.setFieldsValue(r()(r()({},t),{},{name:null==t?void 0:t.question_title,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=t&&t.repeat_answer)})),i(!1))},children:"取消"}),(0,S.jsx)(b.ZP,{type:"primary",className:"ml20",onClick:a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g.submit();case 1:case"end":return e.stop()}}),e)}))),children:"保存"})]}),(0,S.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,S.jsx)(J.Z,{align:"middle",children:(0,S.jsx)(f.Z.Item,{className:V.scoreinput,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,S.jsx)(j.Z,{onBlur:function(e){"0"===e.target.value&&v.ZP.error("分值必须大于0且小于等于100")},style:{width:150},precision:1,placeholder:"请输入分值",max:100,min:.1})})}),(0,S.jsx)(Q.u,{form:g,questionTitlePlaceholder:"请编辑选择题题干内容",titleKey:"question_title",choiceKey:"choices",analysisKey:"analysis",choiceOptionsPath:"choices",choiceTextKey:"choice_text",answerKey:"standard_boolean"}),(0,S.jsx)(ne,{getTagData:p,qitem:t,exerciseitem:o,TagDiscipline:l,form:g})]})]})})},ie=t(56763),re=t(95166),le=function(e){var n,t=e.qitem,i=e.TagDiscipline,l=e.exerciseitem,o=e.setisedit,c=e.seveeditor,u=e.deleteitem,p=e.getTagData,h=e.init,x=f.Z.useForm(),g=d()(x,1)[0],_=f.Z.useWatch("use_blank_score",g);return(0,m.useEffect)((function(){g.setFieldsValue(r()(r()({},t),{},{standard_answers:t.standard_answers||[],name:t.question_title,repeat_answer:!t.repeat_answer}))}),[t]),(0,S.jsx)("div",{children:(0,S.jsxs)(f.Z,{form:g,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.standard_answers||null!=e&&e.use_blank_score){var t,i,r,l=(null===(t=g.getFieldValue("standard_answers"))||void 0===t?void 0:t.length)>0&&(null===(i=g.getFieldValue("standard_answers"))||void 0===i||null===(i=i.map((function(e){return e.score})))||void 0===i?void 0:i.filter((function(e){return e})));if((null==l?void 0:l.length)>0)g.setFieldsValue({question_score:(null==l?void 0:l.length)>0&&(null===(r=l.reduce((function(e,n){return e+n})))||void 0===r?void 0:r.toFixed(1))})}},onFinish:function(e){c(r()(r()(r()({},t),e),{},{item_type:null==t?void 0:t.question_type,standard_answers:e.standard_answers,question_title:e.name}))},onFinishFailed:function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"请先在题干中插入填空项"===n.errorFields[0].errors[0]&&(0,W.pE)(),v.ZP.error(n.errorFields[0].errors[0]),g.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,S.jsx)("span",{children:"填空题"})]}),1==(null==l||null===(n=l.exercise)||void 0===n?void 0:n.exercise_status)&&!(null!=t&&t.isadd)&&(0,S.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){u()},children:[(0,S.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,S.jsx)(b.ZP,{onClick:function(){t.isadd?(o(!1),h()):(g.setFieldsValue(r()(r()({},t),{},{standard_answers:t.standard_answers||[],name:t.question_title,repeat_answer:!t.repeat_answer})),o(!1))},children:"取消"}),(0,S.jsx)(b.ZP,{type:"primary",className:"ml20",onClick:function(){g.submit()},children:"保存"})]}),(0,S.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,S.jsxs)(J.Z,{align:"middle",children:[_?(0,S.jsx)(re.Z,{text:"(小题分值等于各填空项分值之和)"}):(0,S.jsx)(f.Z.Item,{className:V.scoreinput,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,S.jsx)(j.Z,{onBlur:function(e){"0"===e.target.value&&v.ZP.error("分值必须大于0且小于等于100")},style:{width:150},precision:1,placeholder:"请输入分值",size:"middle",max:100,min:.1})},2),(0,S.jsx)(f.Z.Item,{name:"use_blank_score",noStyle:!0,children:(0,S.jsx)(y.ZP.Group,{className:V.scoreByBlankRadio,optionType:"button",options:[{label:"按空给分",value:!0},{label:"按题给分",value:!1}]})}),(0,S.jsx)(G.Z,{overlayInnerStyle:{width:460},title:(0,S.jsxs)("div",{children:["按空给分:需要分别设置每个填空项的分值,填空项答对之后则获得对应的分值。",(0,S.jsx)("br",{}),"按题给分:需要设置整个小题的分值,答对全部填空项之后才能获得该小题的分值。"]}),children:(0,S.jsx)("i",{className:"icon-tishixiaowenhao font18 ml20 c-3061d0"})})]}),(0,S.jsx)(ie.u,{form:g,questionTitlePlaceholder:"请编辑填空题题干内容",scoreByBlank:_,answerKey:"standard_answers"}),(0,S.jsx)(ne,{getTagData:p,qitem:t,exerciseitem:l,TagDiscipline:i,form:g})]})]})})},se=t(99041),oe=function(e){var n,t=e.qitem,i=e.setisedit,l=e.TagDiscipline,o=e.exerciseitem,c=e.seveeditor,u=e.deleteitem,p=e.getTagData,h=e.init,x=f.Z.useForm(),g=d()(x,1)[0];return(0,m.useEffect)((function(){var e;g.setFieldsValue(r()(r()({},t),{},{name:t.question_title,repeat_answer:!t.repeat_answer,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})}))}))}),[t]),(0,S.jsx)("div",{children:(0,S.jsxs)(f.Z,{form:g,colon:!1,onFinish:function(e){var n,i,l,s,o=null==e||null===(n=e.choices)||void 0===n||null===(i=n.map)||void 0===i?void 0:i.call(n,(function(e,n){if(1===(null==e?void 0:e.is_answer))return n+1}));c(r()(r()(r()({},t),e),{},{question_title:e.name,standard_answers:o.filter((function(e){return e})),question_choices:null==e||null===(l=e.choices)||void 0===l||null===(s=l.map)||void 0===s?void 0:s.call(l,(function(e){return e.choice_text}))}))},onFinishFailed:function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),g.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,S.jsx)("span",{children:"判断题"})]}),1==(null==o||null===(n=o.exercise)||void 0===n?void 0:n.exercise_status)&&!(null!=t&&t.isadd)&&(0,S.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){u()},children:[(0,S.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,S.jsx)(b.ZP,{onClick:function(){var e;t.isadd?(i(!1),h()):(g.setFieldsValue(r()(r()({},t),{},{name:t.question_title,repeat_answer:!t.repeat_answer,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})}))})),i(!1))},children:"取消"}),(0,S.jsx)(b.ZP,{type:"primary",className:"ml20",onClick:function(){g.submit()},children:"保存"})]}),(0,S.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,S.jsx)(f.Z.Item,{className:V.scoreinput,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,S.jsx)(j.Z,{onBlur:function(e){"0"===e.target.value&&v.ZP.error("分值必须大于0且小于等于100")},style:{width:150},precision:1,placeholder:"请输入分值",max:100,min:.1})}),(0,S.jsx)(se.Z,{form:g,questionTitlePlaceholder:"请编辑判断题题干内容",choiceKey:""}),(0,S.jsx)(ne,{getTagData:p,qitem:t,exerciseitem:o,TagDiscipline:l,form:g})]})]})})},ae=t(36381),ce={wrap:"wrap___m6v_p",deleteIcon:"deleteIcon___hdYRw",keywordTag:"keywordTag___BLtdn",questionTitleEditorWrap:"questionTitleEditorWrap___fdaK7",choiceWrap:"choiceWrap___wkyUO",choiceIndex:"choiceIndex___tExMq",judgementIndex:"judgementIndex___RMhzJ",setAnswerBtn:"setAnswerBtn___bisIK",activeAnswer:"activeAnswer___MnyyC",activeJudgementAnswer:"activeJudgementAnswer___grGX5",actionWrapper:"actionWrapper___LUawU",addIcon:"addIcon___ckXqe",inputBorder:"inputBorder___nuo0O",placeholder:"placeholder___Dhdir",blankWrapper:"blankWrapper___cnidV",blankInput:"blankInput___iZ5BF",blankInputNumberWrapper:"blankInputNumberWrapper___zlXQc",addBtn:"addBtn___OdgAm",blankIndex:"blankIndex___g4Y7d",baseInputWrapper:"baseInputWrapper___DCOHd",collapseWrapper:"collapseWrapper___SyLrk",panelHeader:"panelHeader___E0il1",open:"open___IFH3V",close:"close___YpIA9",hide:"hide___Nl1W6",scoreByBlankRadio:"scoreByBlankRadio___jpG4i"},de=t(11094),ue=["value","onChange","scrollId"],pe=function(e){var n=e.value,t=e.onChange,i=e.scrollId,l=p()(e,ue);return(0,S.jsx)("div",{id:i||"",children:(0,S.jsx)(de.Z,r()(r()({},l),{},{defaultValue:n,onChange:function(e,n){console.log("a:",e,n),null!=n&&n.length?t(e,n):t(e)}}))})},me=function(e){var n=e.value,t=e.onChange,i=e.placeholder,r=e.height,l=void 0===r?140:r;return e.isEdit?(0,S.jsx)(de.Z,{watch:!0,isFocus:!0,height:l,placeholder:i,defaultValue:n,onChange:t}):(0,S.jsx)("div",{style:{cursor:"pointer"},children:n?(0,S.jsx)(K.Z,{className:ce.inputBorder,value:n}):(0,S.jsx)("div",{className:"".concat(ce.inputBorder," ").concat(ce.placeholder),children:i})})},he=t(85573),fe=t.n(he),ve=t(43604),xe=["key","name"],ge=["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"],_e=function(e){var n=e.value,t=e.onChange,i=e.choiceTextKey,l=e.answerKey,s=e.index,o=e.isEdit,a=e.setInputActive,c=e.form,d=e.choiceOptionsPath,u=e.allowChangeMode,p=e.showAddIcon,m=e.addItem,h=e.deleteItem,f=1===(null==n?void 0:n[l]),v=function(){var e;f?t(r()(r()({},n),{},fe()({},l,0))):(u||(e=c.getFieldValue(d),c.setFieldValue(d,e.map((function(e){return r()(r()({},e),{},fe()({},l,0))})))),t(r()(r()({},n),{},fe()({},l,1))))};return(0,S.jsxs)(J.Z,{className:ce.choiceWrap,align:"middle",wrap:!1,children:[(0,S.jsx)(ve.Z,{onClick:v,className:"".concat(ce.choiceIndex," ").concat(f?ce.activeAnswer:""),children:ge[s]}),(0,S.jsx)(ve.Z,{flex:1,className:"".concat(ce.editorWrap," ml15"),onClick:a,children:(0,S.jsx)(me,{height:155,placeholder:"请您输入选项",isEdit:o,value:null==n?void 0:n[i],onChange:function(e){t(r()(r()({},n),{},fe()({},i,e)))}})}),(0,S.jsx)(ve.Z,{flex:"0 0 auto",className:"ml15",children:(0,S.jsx)("div",{onClick:v,className:"".concat(ce.setAnswerBtn," ").concat(f?ce.activeAnswer:""),children:f?"正确答案":"设为答案"})}),(0,S.jsxs)(ve.Z,{className:ce.actionWrapper,children:[(0,S.jsx)(G.Z,{title:"新增参考答案",children:(0,S.jsx)(A.Z,{className:ce.addIcon,onClick:m,style:{visibility:p?"visible":"hidden"}})}),(0,S.jsx)(G.Z,{title:"删除",children:(0,S.jsx)(E.Z,{className:ce.deleteIcon,onClick:h,style:{visibility:s>1?"visible":"hidden"}})})]})]})},ye=function(e){var n=e.questionTitlePlaceholder,t=e.titleKey,i=e.choiceKey,l=e.analysisKey,s=e.choiceTextKey,o=e.answerKey,a=e.choiceOptionsPath,c=e.allowChangeMode,u=void 0===c||c,h=e.form,v=e.showAnalysis,x=void 0===v||v,g=(0,m.useState)(),_=d()(g,2),y=_[0],j=_[1],b=(0,m.useState)(!1),w=d()(b,2),k=w[0],N=w[1];return(0,S.jsxs)("div",{className:ce.wrap,children:[(0,S.jsx)("div",{className:ce.questionTitleEditorWrap,children:(0,S.jsx)(f.Z.Item,{label:"题干",name:t,labelCol:{span:24},rules:[{required:!0}],children:(0,S.jsx)(pe,{scrollId:Array.isArray(t)?t.join("_"):"".concat(t),watch:!0,height:140,placeholder:n})})}),(0,S.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,S.jsx)(f.Z.List,{name:i,rules:[{validator:function(e,n){var t=n.some((function(e){return 1===e[o]})),i=n.findIndex((function(e){var n;return(null===(n=e[s])||void 0===n?void 0:n.length)<=0}));return-1!==i?Promise.reject(new Error("请先输入".concat(ge[i],"选项的内容"))):t?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e,n){var t=n.add,i=n.remove;return(0,S.jsxs)("div",{id:Array.isArray(a)?a.join("_"):"".concat(a),children:[e.map((function(n,l){var c=n.key,d=n.name,v=p()(n,xe),x=y===c,g=l<7&&l===e.length-1;return(0,m.createElement)(f.Z.Item,r()(r()({},v),{},{key:c,name:d,noStyle:!0}),(0,S.jsx)(_e,{choiceTextKey:s,answerKey:o,index:l,isEdit:x,setInputActive:function(){j(c)},form:h,choiceOptionsPath:a,allowChangeMode:u,showAddIcon:g,addItem:function(){return t(fe()(fe()({},s,""),o,0))},deleteItem:function(){return i(d)}}))})),e.length<8&&(0,S.jsx)("div",{className:"".concat(ce.addBtn," mb30"),onClick:function(){return t(fe()(fe()({},s,""),o,0))},children:"添加选项"})]})}}),x&&(0,S.jsx)("div",{onClick:function(){return N(!0)},children:(0,S.jsx)(f.Z.Item,{name:l,label:"题目解析",labelCol:{span:24},children:(0,S.jsx)(me,{placeholder:"请编辑题目解析(非必填)",isEdit:k})})})]})},je=t(91232),be=t.n(je),we=["key","name"],ke=function(e){var n=e.value,t=e.onChange;return(0,S.jsxs)(J.Z,{className:"ml20",children:[(0,S.jsx)(ve.Z,{flex:1,children:null==n?void 0:n.map((function(e,i){return(0,S.jsxs)(J.Z,{align:"middle",className:"mb20",children:[(0,S.jsx)(g.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var r=B()(n),l=e.target.value.trim();r[i]=l,t(r)}}),(0,S.jsx)(G.Z,{title:"删除",children:(0,S.jsx)(E.Z,{className:ce.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){k.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:ce.modal,onOk:function(){var i=B()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))}))}),(0,S.jsx)(ve.Z,{children:(0,S.jsx)("div",{className:"".concat(ce.addBtn),onClick:function(){var e;(e=B()(n)).push(""),t(e)},children:"新增答案"})})]})},Ne=function(e){var n=e.value,t=void 0===n||n,i=e.onChange;return(0,S.jsx)(X.Z,{checked:!t,onChange:function(e){i(!e)}})},Ce="▁",Ze=function(e){var n,t=e.questionTitlePlaceholder,i=e.form,l=e.name,s=e.scoreByBlank,o=e.answerKey,a=e.titleKey,c=void 0===a?"name":a,u=e.analysisKey,h=void 0===u?"analysis":u,v=e.isOrdered,x=void 0===v?"is_ordered":v,_=(0,m.useState)(!1),y=d()(_,2),b=y[0],w=y[1],k=function(e,n){for(var t=n.line,i=0,r=0;r<t;r++)i+=e.getLine(r).split(Ce).length-1;return i+=e.getLine(t).substring(0,n.ch).split(Ce).length-1},N=function(){var e=i.getFieldValue(["sub_item_banks"].concat(B()(o)));i.setFieldValue(["sub_item_banks"].concat(B()(o)),null==e?void 0:e.map((function(e,n){return r()(r()({},e),{},{position:n+1})})))},C=(0,m.useRef)(),Z=function(e,n){for(var t=0;t<e;t++)C.current({position:null,answer_text:[""]},n+t);N()},P=(0,m.useRef)(),I=function(e){P.current(e),N()},T=null===(n=i.getFieldValue("sub_item_banks"))||void 0===n||null===(n=n[null==o?void 0:o[0]])||void 0===n?void 0:n[null==o?void 0:o[1]];return console.log(null==i?void 0:i.getFieldValue(["sub_item_banks"].concat(B()(s)))),(0,S.jsxs)("div",{className:ce.wrap,children:[(0,S.jsx)("div",{className:ce.questionTitleEditorWrap,children:(0,S.jsx)(f.Z.Item,{label:"题干",name:c,labelCol:{span:24},rules:[{required:!0}],children:(0,S.jsx)(pe,{scrollId:"name",watch:!0,height:140,placeholder:t,showNullButton:!0,onCMBeforeChange:function(e,n){!function(e,n,t,i){var r=e.getRange(n.from,n.to),l=0;if(n.text.forEach((function(e){l+=e.split(Ce).length-1})),"setValue"!==n.origin)if(r&&-1!==r.indexOf(Ce)){var s=r.split(Ce).length-1,o=k(e,n.from);console.log("删除".concat(s,"个, 前面有").concat(o,"个,新增").concat(l,"个")),i(s>1?Array.from({length:s},(function(e,n){return o+n})):o)}else if(l>0){var a=k(e,n.from);console.log("新增".concat(l,"个,之前有").concat(a,"个")),t(l,a)}}(e,n,Z,I)}})})}),(0,S.jsx)(f.Z.List,{name:o,rules:[{validator:function(e,n){if(0===(null==n?void 0:n.length))return Promise.reject(new Error("请先在题干中插入填空项"));var t,i=be()(n);try{for(i.s();!(t=i.n()).done;){var r=(t.value||{}).answer_text;if(null!=r&&r.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,t){var l=n.add,a=n.remove;t.errors;return C.current=l,P.current=a,(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f.Z.Item,{label:(0,S.jsxs)("span",{children:["填空项答案",!(null!=e&&e.length)&&(0,S.jsx)("span",{style:{color:"#E99237"},children:"(请先在题干中插入填空项)"})]}),required:!0,labelCol:{span:24}}),e.map((function(e,n){var t=e.key,l=e.name,a=p()(e,we);return(0,S.jsxs)(J.Z,{className:"mb20",align:"top",children:[(0,S.jsxs)(ve.Z,{flex:"0 0 auto",className:"".concat(ce.blankIndex," pt5"),children:["填空项",n+1]}),(0,S.jsxs)(ve.Z,{flex:1,children:[(0,S.jsxs)(J.Z,{align:"top",justify:"space-between",children:[(0,S.jsx)(ve.Z,{flex:1,children:(0,S.jsx)(f.Z.Item,r()(r()({},a),{},{name:[l,"answer_text"],noStyle:!0,children:(0,S.jsx)(ke,{})}))}),(null==i?void 0:i.getFieldValue(["sub_item_banks"].concat(B()(s))))&&(0,S.jsx)(ve.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"},children:(0,S.jsx)(f.Z.Item,r()(r()({},a),{},{name:[l,"score"],label:"分值",rules:[{required:!0}],className:ce.blankInputNumberWrapper,children:(0,S.jsx)(j.Z,{onChange:function(){var e=null==i?void 0:i.getFieldValue(["sub_item_banks",null==o?void 0:o[0],"standard_answers"]),n=0;for(var t in e){var r,l;if(null!==(r=e[t])&&void 0!==r&&r.score)n+=Number(null===(l=e[t])||void 0===l?void 0:l.score)}null==i||i.setFieldValue(["sub_item_banks",null==o?void 0:o[0],"question_score"],n)},className:ce.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]}),(0,S.jsx)(f.Z.Item,r()(r()({},a),{},{name:[l,"position"],noStyle:!0,children:(0,S.jsx)(g.Z,{type:"hidden"})}))]})]},t)}))]})}}),(0,S.jsxs)(J.Z,{align:"middle",children:[(0,S.jsx)(f.Z.Item,{name:[l,"downcase"],valuePropName:"checked",children:(0,S.jsx)(X.Z,{})}),(0,S.jsx)(ve.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,S.jsxs)(J.Z,{align:"middle",children:[(0,S.jsx)(f.Z.Item,{name:[l,"no_space"],valuePropName:"checked",children:(0,S.jsx)(X.Z,{})}),(0,S.jsx)(ve.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==T?void 0:T.length)>1&&(0,S.jsxs)(J.Z,{align:"middle",className:(null==T?void 0:T.length)>1?"mb30":"".concat(ce.hide),children:[(0,S.jsx)(f.Z.Item,{name:x,children:(0,S.jsx)(Ne,{})}),(0,S.jsx)(ve.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,S.jsx)("div",{onClick:function(){return w(!0)},children:(0,S.jsx)(f.Z.Item,{name:h,label:"题目解析",labelCol:{span:24},children:(0,S.jsx)(me,{placeholder:"请编辑题目解析(非必填)",isEdit:b})})})]})},Se=["key","name"],Pe=fe()(fe()({},"正确","T"),"错误","F"),Ie=function(e){var n=e.value,t=e.onChange,i=e.form,l=e.choiceKey,s=1===(null==n?void 0:n.is_answer),o=null==n?void 0:n.choice_text,a=function(){var e,s=null==i||null===(e=i.getFieldValue(["sub_item_banks"].concat(B()(l))))||void 0===e?void 0:e.map((function(e){return{choice_text:e.choice_text,is_answer:0}}));null==i||i.setFieldValue(["sub_item_banks"].concat(B()(l)),s),t(r()(r()({},n),{},{is_answer:1}))};return(0,S.jsxs)(J.Z,{className:ce.choiceWrap,align:"middle",wrap:!1,children:[(0,S.jsx)(ve.Z,{onClick:a,className:"".concat(ce.choiceIndex," ").concat(ce.judgementIndex," ").concat(s?ce.activeAnswer:""),children:Pe[o]}),(0,S.jsx)(ve.Z,{flex:1,className:"".concat(ce.editorWrap," ml15"),children:(0,S.jsx)("div",{className:"".concat(ce.inputBorder," ").concat(ce.placeholder," ").concat(s?ce.activeJudgementAnswer:""),children:o})}),(0,S.jsx)(ve.Z,{flex:"0 0 auto",className:"ml15",children:(0,S.jsx)("div",{onClick:a,className:"".concat(ce.setAnswerBtn," ").concat(s?ce.activeAnswer:""),children:s?"正确答案":"设为答案"})})]})},Te=function(e){var n=e.questionTitlePlaceholder,t=e.choiceKey,i=void 0===t?"choices":t,l=e.form,s=e.titleKey,o=void 0===s?"name":s,a=e.analysisKey,c=void 0===a?"analysis":a,u=(0,m.useState)(!1),h=d()(u,2),v=h[0],x=h[1];return(0,S.jsxs)("div",{className:ce.wrap,children:[(0,S.jsx)("div",{className:ce.questionTitleEditorWrap,children:(0,S.jsx)(f.Z.Item,{label:"题干",name:o,labelCol:{span:24},rules:[{required:!0}],children:(0,S.jsx)(pe,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,S.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,S.jsx)(f.Z.List,{name:i,rules:[{validator:function(e,n){return n.some((function(e){return 1===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,S.jsx)("div",{id:"choices",children:e.map((function(e){var n=e.key,t=e.name,s=p()(e,Se);return(0,m.createElement)(f.Z.Item,r()(r()({},s),{},{key:n,name:t,noStyle:!0}),(0,S.jsx)(Ie,{form:l,choiceKey:i}))}))})}})}),(0,S.jsx)("div",{onClick:function(){return x(!0)},children:(0,S.jsx)(f.Z.Item,{name:c,label:"题目解析",labelCol:{span:24},children:(0,S.jsx)(me,{placeholder:"请编辑题目解析(非必填)",isEdit:v})})})]})},Be=t(12563),Ae=["value","onChange"],Ee=["key","name"],qe=function(e){var n=e.value,t=e.onChange,i=p()(e,Ae);return(0,S.jsx)(de.Z,r()(r()({},i),{},{defaultValue:null==n?void 0:n[0],onChange:function(e){t([e])}}))},Me=function(e){var n=e.value,t=void 0===n?[]:n,i=e.onClose;return(0,S.jsx)(Be.Z,{closable:!0,onClose:i,className:ce.keywordTag,children:(0,S.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:t.join(" 或 ")})})},Le=function(e){var n,t,i=e.questionTitlePlaceholder,l=e.form,s=e.showKeywords,o=e.isMustKeyWords,a=void 0===o?s:o,c=e.titleKey,u=void 0===c?"name":c,h=e.analysisKey,x=void 0===h?"analysis":h,_=e.answerTexts,y=void 0===_?"answer_texts":_,b=e.keywords,w=void 0===b?"keywords":b,k=e.useKeywords,N=void 0===k?"use_keywords":k,C=(e.indexs,(0,m.useState)(!1)),Z=d()(C,2),P=Z[0],I=Z[1],T=(0,m.useState)(""),A=d()(T,2),E=A[0],q=A[1],M=null===(n=l.getFieldValue("sub_item_banks"))||void 0===n||null===(n=n[null==N?void 0:N[0]])||void 0===n?void 0:n[null==N?void 0:N[1]],L=null===(t=l.getFieldValue("sub_item_banks"))||void 0===t||null===(t=t[null==N?void 0:N[0]])||void 0===t?void 0:t.question_score;return(0,S.jsxs)("div",{className:ce.wrap,children:[(0,S.jsx)("div",{className:ce.questionTitleEditorWrap,children:(0,S.jsx)(f.Z.Item,{label:"题干",name:u,labelCol:{span:24},rules:[{required:!0}],children:(0,S.jsx)(pe,{scrollId:"name",watch:!0,height:140,placeholder:i})})}),(0,S.jsx)(f.Z.Item,{label:"参考答案",name:y,labelCol:{span:24},children:(0,S.jsx)(qe,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),s&&!a&&(0,S.jsx)(f.Z.Item,{hidden:!0,name:N,valuePropName:"checked",children:(0,S.jsx)(X.Z,{defaultChecked:!0})}),s&&a&&(0,S.jsxs)(J.Z,{align:"middle",className:"mb30",children:[(0,S.jsx)(f.Z.Item,{name:N,valuePropName:"checked",children:(0,S.jsx)(X.Z,{})}),(0,S.jsx)(ve.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,S.jsx)(ve.Z,{children:(0,S.jsx)(G.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,S.jsx)($.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(M||!a)&&(0,S.jsx)(f.Z.List,{name:w,rules:[{validator:function(e,n){return a?null!=n&&n.length?(null==n?void 0:n.reduce((function(e,n){return e+n.score}),0))>parseFloat(L)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请输入关键词")):Promise.resolve()}}],children:function(e,n){var t=n.add,i=n.remove;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:"".concat(ce.title," mb10"),children:a?"关键词":(0,S.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,S.jsxs)(J.Z,{align:"middle",className:"font14 mb30",children:[(0,S.jsx)(ve.Z,{flex:1,children:(0,S.jsx)(g.Z,{value:E,onChange:function(e){q(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var n,i,r,s,o,a="".concat(null===(n=e.target)||void 0===n?void 0:n.value),c=null==a||null===(i=a.split("|"))||void 0===i||null===(i=i.filter((function(e){return!!e})))||void 0===i?void 0:i.map((function(e){return null==e?void 0:e.trim()})),d=l.getFieldValue(["sub_item_banks"].concat(B()(w))),u=(null==d||null===(r=d.map((function(e){return null==e?void 0:e.keyword})))||void 0===r?void 0:r.flat())||[],p=be()(c);try{for(p.s();!(s=p.n()).done;){var m=s.value;if(u.includes(m))return void v.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){p.e(e)}finally{p.f()}(o=a)&&(new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~!@#¥……&*()—【】‘;:”“。,、?「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==o||(v.ZP.warning("关键词不能只输入一个“|”字符!"),0))&&(t({keyword:c,score:1}),q(""))},className:ce.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,S.jsx)(ve.Z,{flex:"148px",style:{textAlign:"right",color:"#9096A3"},children:"“回车键”保存关键词"})]}),e.map((function(e){var n=e.key,t=e.name,l=p()(e,Ee);return(0,S.jsx)(J.Z,{className:"mb20",style:{marginRight:148},children:(0,S.jsx)(ve.Z,{flex:1,children:(0,S.jsxs)(J.Z,{align:"middle",justify:"space-between",children:[(0,S.jsx)(f.Z.Item,r()(r()({},l),{},{name:[t,"keyword"],children:(0,S.jsx)(Me,{onClose:function(){return i(t)}})})),a&&(0,S.jsx)(f.Z.Item,r()(r()({},l),{},{name:[t,"score"],label:"分值",rules:[{required:!0}],className:ce.blankInputNumberWrapper,children:(0,S.jsx)(j.Z,{className:ce.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},n)}))]})}}),(0,S.jsx)("div",{onClick:function(){return I(!0)},children:(0,S.jsx)(f.Z.Item,{name:x,label:"题目解析",labelCol:{span:24},children:(0,S.jsx)(me,{placeholder:"请编辑题目解析(非必填)",isEdit:P})})})]})},Oe=["key","name"],Fe=ae.Z.Panel,De=function(e){var n=e.questionTitlePlaceholder,t=(e.choiceKey,e.form),i=e.withScore,l=(0,m.useState)(),s=d()(l,2),o=s[0],a=s[1],c=(0,m.useState)([]),u=d()(c,2),h=u[0],v=u[1],x=function(e){v(e)},g=function(e){var n=e.value;return(0,S.jsx)("div",{style:{width:150,paddingLeft:11},children:n})};return(0,S.jsxs)("div",{className:ce.wrap,children:[(0,S.jsx)("div",{className:ce.questionTitleEditorWrap,children:(0,S.jsx)(f.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,S.jsx)(pe,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,S.jsx)(f.Z.Item,{label:"小题",required:!0,labelCol:{span:24}}),(0,S.jsx)(f.Z.List,{name:"sub_item_banks",rules:[{validator:function(e,n){return n?Promise.resolve():Promise.reject(new Error("请添加小题"))}}],children:function(e,n){var l=n.add,s=n.remove,c=n.move,d=t.getFieldValue("sub_item_banks");return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(ae.Z,{className:e.length>0?ce.collapseWrapper:"",bordered:!1,activeKey:h,onChange:x,expandIcon:function(e){var n=e.isActive;return(0,S.jsx)("i",{className:"iconfont icon-weizhankai ".concat(n?ce.open:ce.close),style:{fontSize:14,transition:"all .2s"}})},children:e.map((function(n,l){n.key;var u,m,h,v,x,_,b,w,k,N,C,Z,P,I,T=n.name,B=p()(n,Oe);return(0,S.jsx)(Fe,{className:ce.panel,forceRender:!0,header:(0,S.jsxs)("div",{className:ce.panelHeader,children:["第",l+1,"小题",(0,S.jsxs)("span",{children:["(",0==(null==d||null===(u=d[T])||void 0===u?void 0:u.question_type)?"单选题":1==(null==d||null===(m=d[T])||void 0===m?void 0:m.question_type)?"多选题":3==(null==d||null===(h=d[T])||void 0===h?void 0:h.question_type)?"填空题":2==(null==d||null===(v=d[T])||void 0===v?void 0:v.question_type)?"判断题":"简答题",")"]})]}),extra:(0,S.jsxs)(J.Z,{align:"middle",onClick:function(e){return e.stopPropagation()},children:[3==(null==d||null===(x=d[T])||void 0===x?void 0:x.question_type)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(y.ZP.Group,{defaultValue:null==d||null===(_=d[T])||void 0===_?void 0:_.use_blank_score,className:V.scoreByBlankRadio,style:{marginRight:20},optionType:"button",options:[{label:"按空给分",value:!0},{label:"按题给分",value:!1}],onChange:function(e){var n,i;if(null==t||t.setFieldValue(["sub_item_banks",T,"use_blank_score"],null==e||null===(n=e.target)||void 0===n?void 0:n.value),null!=e&&null!==(i=e.target)&&void 0!==i&&i.value){var r=0;for(var l in null==t||null===(s=t.getFieldValue(["sub_item_banks",T]))||void 0===s?void 0:s.standard_answers){var s,o;r+=Number(null==t||null===(o=t.getFieldValue(["sub_item_banks",T]))||void 0===o||null===(o=o.standard_answers[l])||void 0===o?void 0:o.score)}null==t||t.setFieldValue(["sub_item_banks",T,"question_score"],r||"")}a(new Date)}}),(0,S.jsx)(G.Z,{overlayInnerStyle:{width:460},title:(0,S.jsxs)("div",{children:["按空给分:需要分别设置每个填空项的分值,填空项答对之后则获得对应的分值。",(0,S.jsx)("br",{}),"按题给分:需要设置整个小题的分值,答对全部填空项之后才能获得该小题的分值。"]}),children:(0,S.jsx)("i",{className:"icon-tishixiaowenhao font18 mr25 c-3061d0"})})]}),i&&(0,S.jsx)(f.Z.Item,r()(r()({},B),{},{rules:[{required:!0,message:"请输入小题分值"}],label:"分值",name:[T,"question_score"],className:ce.blankInputNumberWrapper,children:3==(null==d||null===(b=d[T])||void 0===b?void 0:b.question_type)&&null!=d&&null!==(w=d[T])&&void 0!==w&&w.use_blank_score?(0,S.jsx)(g,{}):(0,S.jsx)(j.Z,{className:ce.blankInput,placeholder:"请输入分数",min:.1,precision:1,max:100,style:{width:150}})})),(0,S.jsxs)(J.Z,{align:"middle",className:"pl40",style:{width:82},children:[0!==l&&(0,S.jsx)("div",{onClick:function(){var n;c(l,l-1);var i=null===(n=t.getFieldValue("sub_item_banks"))||void 0===n?void 0:n.map((function(n,t){return e.map((function(e,i){t===i&&(n.q_position=Number(e.name)+1)})),n}));t.setFieldValue("sub_item_banks",i)},children:(0,S.jsx)(G.Z,{title:"上移",children:(0,S.jsx)("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"})})}),l<e.length-1&&(0,S.jsx)("div",{onClick:function(){var n;c(l,l+1);var i=null===(n=t.getFieldValue("sub_item_banks"))||void 0===n?void 0:n.map((function(n,t){return e.map((function(e,i){t===i&&(n.q_position=Number(e.name)+1)})),n}));t.setFieldValue("sub_item_banks",i)},className:0===l?"":"ml10",children:(0,S.jsx)(G.Z,{title:"下移",children:(0,S.jsx)("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"})})})]}),(0,S.jsx)(G.Z,{title:"删除",children:(0,S.jsx)(E.Z,{className:"".concat(ce.deleteIcon," ml40"),onClick:function(){return s(T)}})})]}),children:(0,S.jsxs)(f.Z.Item,r()(r()({},B),{},{name:T,children:[(0==(null==d||null===(k=d[T])||void 0===k?void 0:k.question_type)||1==(null==d||null===(N=d[T])||void 0===N?void 0:N.question_type))&&(0,S.jsx)(ye,{questionTitlePlaceholder:"请编辑选择题题干内容",allowChangeMode:1==(null==d||null===(C=d[T])||void 0===C?void 0:C.question_type),form:t,choiceKey:[T,"choices"],titleKey:[T,"name"],analysisKey:[T,"analysis"],choiceOptionsPath:["sub_item_banks",T,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),3==(null==d||null===(Z=d[T])||void 0===Z?void 0:Z.question_type)&&(0,S.jsx)(Ze,{form:t,name:T,questionTitlePlaceholder:"请编辑题干并设置填空项",scoreByBlank:[T,"use_blank_score"],titleKey:[T,"name"],analysisKey:[T,"analysis"],isOrdered:[T,"is_ordered"],answerKey:[T,"standard_answers"]},o),2==(null==d||null===(P=d[T])||void 0===P?void 0:P.question_type)&&(0,S.jsx)(Te,{form:t,questionTitlePlaceholder:"请编辑判断题题干内容",titleKey:[T,"name"],analysisKey:[T,"analysis"],choiceKey:[T,"choices"]}),4==(null==d||null===(I=d[T])||void 0===I?void 0:I.question_type)&&(0,S.jsx)(Le,{showKeywords:!0,isMustKeyWords:!0,form:t,titleKey:[T,"name"],analysisKey:[T,"analysis"],answerTexts:[T,"answer_texts"],useKeywords:[T,"use_keywords"],keywords:[T,"keywords"],indexs:T,questionTitlePlaceholder:"请编辑简答题题干内容"})]}))},T)}))}),e.length<20&&(0,S.jsx)(z.Z,{menu:{items:[{label:(0,S.jsx)("div",{onClick:function(){l({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:"",question_type:0,item_type:"SINGLE"}),v([null==e?void 0:e.length].concat(B()(h)))},children:"单选题"}),key:"1",show:!0},{label:(0,S.jsx)("div",{onClick:function(){l({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:"",question_type:1,item_type:"MULTIPLE"}),v([null==e?void 0:e.length].concat(B()(h)))},children:"多选题"}),key:"2",show:!0},{label:(0,S.jsx)("div",{onClick:function(){l({name:"",choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],analysis:"",question_type:2,item_type:"JUDGMENT"}),v([null==e?void 0:e.length].concat(B()(h)))},children:"判断题"}),key:"3",show:!0},{label:(0,S.jsx)("div",{onClick:function(){l({name:"",analysis:"",is_ordered:!0,standard_answers:[],question_type:3,item_type:"COMPLETION",use_blank_score:!0,downcase:!0,no_space:!0}),v([null==e?void 0:e.length].concat(B()(h)))},children:"填空题"}),key:"4",show:!0},{label:(0,S.jsx)("div",{onClick:function(){l({name:"",answer_texts:[],keywords:[],use_keywords:!1,analysis:"",question_type:4,item_type:"SUBJECTIVE"}),v([null==e?void 0:e.length].concat(B()(h)))},children:"简答题"}),key:"5",show:!0}].filter((function(e){return e.show})).map((function(e){return{label:e.label,key:e.key}}))},children:(0,S.jsx)("div",{className:"".concat(ce.addBtn),children:"添加小题"})})]})}})]})},Re=function(e){var n,t=e.qitem,i=e.setisedit,l=e.TagDiscipline,o=e.exerciseitem,c=e.seveeditor,u=e.deleteitem,p=e.getTagData,h=e.init,x=f.Z.useForm(),g=d()(x,1)[0];return(0,m.useEffect)((function(){var e;g.setFieldsValue(r()(r()({},t),{},{name:t.question_title,sub_item_banks:null===(e=t.sub_exercise_questions)||void 0===e?void 0:e.map((function(e){var n;return r()(r()({},e),{},{name:e.question_title,choices:null==e||null===(n=e.question_choices)||void 0===n?void 0:n.map((function(e){return r()(r()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})}))})})),repeat_answer:!t.repeat_answer}))}),[t]),(0,S.jsx)("div",{children:(0,S.jsxs)(f.Z,{form:g,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.sub_item_banks){var t,i,r,l=(null===(t=g.getFieldValue("sub_item_banks"))||void 0===t?void 0:t.length)>0&&(null===(i=g.getFieldValue("sub_item_banks"))||void 0===i||null===(i=i.map((function(e){if(3==e.question_type&&null!=e&&e.use_blank_score){var n=0;for(var t in null==e?void 0:e.standard_answers){var i;n+=Number(null==e||null===(i=e.standard_answers[t])||void 0===i?void 0:i.score)}return n}return e.question_score})))||void 0===i?void 0:i.filter((function(e){return e})));if((null==l?void 0:l.length)>0)g.setFieldsValue({question_score:null===(r=parseFloat(l.reduce((function(e,n){return parseFloat(e)+parseFloat(n)}))))||void 0===r?void 0:r.toFixed(1)})}},onFinish:function(e){var n;c(r()(r()(r()({},t),e),{},{question_title:e.name,sub_questions:null==e||null===(n=e.sub_item_banks)||void 0===n?void 0:n.map((function(e){return 3==(null==e?void 0:e.question_type)?r()(r()({},e),{},{question_title:e.name,item_type:null==e?void 0:e.question_type}):r()(r()({},e),{},{question_title:e.name,question_choices:null==e||null===(n=e.choices)||void 0===n||null===(t=n.map)||void 0===t?void 0:t.call(n,(function(e){return e.choice_text})),standard_answers:null==e||null===(i=e.choices)||void 0===i||null===(l=i.map)||void 0===l?void 0:l.call(i,(function(e,n){return 1===(null==e?void 0:e.is_answer)&&n+1})).filter((function(e){return e})),item_type:null==e?void 0:e.question_type});var n,t,i,l}))}))},onFinishFailed:function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),g.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,S.jsx)("span",{children:"组合题"})]}),1==(null==o||null===(n=o.exercise)||void 0===n?void 0:n.exercise_status)&&!(null!=t&&t.isadd)&&(0,S.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){u()},children:[(0,S.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,S.jsx)(b.ZP,{onClick:function(){var e;t.isadd?(i(!1),h()):(g.setFieldsValue(r()(r()({},t),{},{name:t.question_title,sub_item_banks:null===(e=t.sub_exercise_questions)||void 0===e?void 0:e.map((function(e){var n;return r()(r()({},e),{},{name:e.question_title,choices:null==e||null===(n=e.question_choices)||void 0===n?void 0:n.map((function(e){return r()(r()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})}))})})),repeat_answer:!t.repeat_answer})),i(!1))},children:"取消"}),(0,S.jsx)(b.ZP,{className:"ml20",type:"primary",onClick:function(){g.submit()},children:"保存"})]}),(0,S.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,S.jsx)(re.Z,{text:"(组合题分值等于各小题分值之和)"}),(0,S.jsx)(De,{form:g,withScore:!0,choiceKey:"",questionTitlePlaceholder:"请编辑组合题题干内容"}),(0,S.jsx)(ne,{getTagData:p,qitem:t,exerciseitem:o,TagDiscipline:l,form:g})]})]})})},ze=function(e){var n,t,i=e.qitem,l=e.setqitem,o=e.setisedit,c=(e.TagDiscipline,e.exerciseitem),u=e.seveeditor,p=e.deleteitem,h=f.Z.useForm(),x=d()(h,1)[0];return(0,m.useEffect)((function(){var e,n;x.setFieldsValue(r()(r()({},i),{},{name:null==i?void 0:i.question_title,choices:null==i||null===(e=i.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=i&&i.repeat_answer)})),i.shixun=null==i||null===(n=i.shixun)||void 0===n?void 0:n.map((function(e){return r()(r()({},e),{},{defaultscore:e.challenge_score})}))}),[]),(0,S.jsxs)("div",{children:[(0,S.jsxs)(f.Z,{form:x,colon:!1,onFinish:function(e){var n,t,l=r()(r()({},e),{},{question_scores:null==i||null===(n=i.shixun)||void 0===n?void 0:n.map((function(e){return e.challenge_score})),item_type:null==i?void 0:i.question_type,choices:null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e){return r()(r()({},e),{},{is_answer:e.standard_boolean})}))});u(r()(r()({},i),l))},onFinishFailed:function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),x.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,S.jsx)("span",{children:"实训题"})]}),1==(null==c||null===(n=c.exercise)||void 0===n?void 0:n.exercise_status)&&!(null!=i&&i.isadd)&&(0,S.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){p()},children:[(0,S.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,S.jsx)(b.ZP,{onClick:function(){var e,n;x.setFieldsValue(r()(r()({},i),{},{name:null==i?void 0:i.question_title,choices:null==i||null===(e=i.question_choices)||void 0===e?void 0:e.map((function(e){return r()(r()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=i&&i.repeat_answer)})),i.shixun=null==i||null===(n=i.shixun)||void 0===n?void 0:n.map((function(e){return r()(r()({},e),{},{challenge_score:e.defaultscore})})),l(r()({},i)),o(!1)},children:"取消"}),(0,S.jsx)(b.ZP,{className:"ml20",type:"primary",onClick:a()(s()().mark((function e(){var n,t,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==i||null===(n=i.shixun)||void 0===n||null===(t=n.map)||void 0===t?void 0:t.call(n,(function(e){return e.challenge_score})).filter((function(e){return e})).length)<(null==i||null===(r=i.shixun)||void 0===r?void 0:r.length))){e.next=3;break}return v.ZP.info("分数不能为空"),e.abrupt("return");case 3:x.submit();case 4:case"end":return e.stop()}}),e)}))),children:"保存"})]}),(0,S.jsx)(re.Z,{text:"(实训题分值等于各关卡分值之和)"}),(0,S.jsx)(f.Z.Item,{label:"题干",name:"question_title",labelCol:{span:24},rules:[{required:!0}],children:(0,S.jsx)(de.Z,{watch:!0,height:140,placeholder:"",defaultValue:i.question_title})})]}),(0,S.jsxs)(J.Z,{style:{marginBottom:15},align:"middle",justify:"space-between",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("span",{style:{color:"red"},children:"*"}),"关卡名称"]}),(0,S.jsxs)("a",{href:"/shixuns/".concat(null==i?void 0:i.shixun_identifier,"/challenges?exercise=true"),target:"_blank",children:[(0,S.jsx)("i",{onClick:function(){},className:"iconfont icon-shixunkecheng font14 mr5"}),"实训详情"]})]}),null==i||null===(t=i.shixun)||void 0===t?void 0:t.map((function(e,n){return(0,S.jsxs)("div",{style:{display:"flex",marginBottom:20},children:[(0,S.jsxs)("div",{style:{flex:1},children:[n+1,"、",e.challenge_name]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("span",{style:{color:"red"},children:"*"}),"分值",(0,S.jsx)(j.Z,{precision:1,value:null==e?void 0:e.challenge_score,onChange:function(e){var t=JSON.parse(JSON.stringify((null==i?void 0:i.shixun)||[]));t[n].challenge_score=e;var s=t.every((function(e){return!e.challenge_score})),o=parseFloat(null==t?void 0:t.map((function(e){return e.challenge_score})).reduce((function(e,n){return parseFloat(e||0)+parseFloat(n||0)})));x.setFieldsValue({question_score:s?"":o.toFixed(1)}),l(r()(r()({},i),{},{shixun:t}))},max:100,min:.1,style:{marginLeft:10,width:150},placeholder:"请输入分值",size:"middle"})]})]})}))]})},Ge="warp___UlRJc",Ve="indexTag___rjJ1u",We="normalWrap___Qm4zY",He="redio___VW3yr",Ue="redioitem___jAPlJ",Ke="redioitemyes___VoiQ1",Ye="title___Dt2dl",Je="titleyes___Fjh3a",Qe="yestag___CXrPv",Xe="checkbox___CgMU_",$e="checkboxitem___PpJ9n",en="checkboxitemyes___pCfvZ",nn="bottom___BqrmJ",tn="bottomitem___Qk2rG",rn="left___l29lW",ln="right___nB1XE",sn="completion___y1m7L",on="content___AmQy4",an="items___lIt8e",cn="simple___zxJLH",dn="shixunWrapper___kAYdL",un="shixun___UE6xS",pn="score___Px5Fq",mn="qtitle___wG7Nn",hn="program___gzKdL",fn="combination___R0ysn",vn="qtype___U0Suy",xn=t(30347),gn=t(24334),_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."],yn=[{type:0,name:"单选题"},{type:1,name:"多选题"},{type:2,name:"判断题"},{type:3,name:"填空题"},{type:4,name:"简答题"},{type:5,name:"实训题"},{type:6,name:"编程题"},{type:7,name:"组合题"},{type:8,name:"程序填空题"}],jn=function(e){var n,t,i,r,l,s,o,a,c,d,u,p,m,h,f=e.qitem;return(0,S.jsxs)("div",{className:Ge,children:[(0===(null==f?void 0:f.question_type)||2===(null==f?void 0:f.question_type))&&(0,S.jsx)("div",{className:We,children:null==f||null===(n=f.question_choices)||void 0===n?void 0:n.map((function(e,n){return(0,S.jsxs)("div",{className:He,children:[!(null!=e&&e.standard_boolean)&&(0,S.jsx)("span",{className:Ue}),(null==e?void 0:e.standard_boolean)&&(0,S.jsx)("i",{className:"".concat(Ke," icon-duigou1")}),(0,S.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?Je:Ye," ").concat(Ve),children:0===(null==f?void 0:f.question_type)?_n[n]:""}),(0,S.jsx)(K.Z,{className:null!=e&&e.standard_boolean?Je:Ye,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,S.jsx)("div",{className:Qe,children:"正确答案"})]})}))}),1===(null==f?void 0:f.question_type)&&(0,S.jsx)("div",{className:We,children:null==f||null===(t=f.question_choices)||void 0===t?void 0:t.map((function(e,n){return(0,S.jsxs)("div",{className:Xe,children:[!(null!=e&&e.standard_boolean)&&(0,S.jsx)("span",{className:$e}),(null==e?void 0:e.standard_boolean)&&(0,S.jsx)("i",{className:"".concat(en," icon-duigou1")}),(0,S.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?Je:Ye," ").concat(Ve),children:_n[n]}),(0,S.jsx)(K.Z,{className:null!=e&&e.standard_boolean?Je:Ye,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,S.jsx)("div",{className:Qe,children:"正确答案"})]})}))}),3===(null==f?void 0:f.question_type)&&(0,S.jsx)("div",{className:sn,children:null==f||null===(i=f.standard_answers)||void 0===i?void 0:i.map((function(e,n){var t;return(0,S.jsxs)(J.Z,{align:"top",children:[(0,S.jsxs)("span",{className:Ye,children:["填空项",n+1]}),(0,S.jsx)("div",{className:on,children:null===(t=e.answer_text)||void 0===t?void 0:t.map((function(n,t){return(0,S.jsx)("div",{className:an,style:2===(null==e?void 0:e.model)?{border:0,padding:0}:{},children:1===(null==e?void 0:e.model)?(0,S.jsx)("pre",{className:"mb0",children:n}):(0,S.jsx)(xn.Z,{value:n,disabled:!0})},t)}))})]})}))}),4===(null==f?void 0:f.question_type)&&(0,S.jsxs)("div",{className:cn,children:[(0,S.jsx)("div",{className:Ye,children:"参考答案"}),(0,S.jsx)("div",{className:"mt10",style:{fontSize:"16px"},children:null!=f&&null!==(r=f.answer_texts)&&void 0!==r&&r[0]?(0,S.jsx)(K.Z,{className:on,value:null==f||null===(l=f.answer_texts)||void 0===l?void 0:l[0]}):(0,S.jsx)("div",{style:{color:"#C1C1C1"},children:"暂未设置~"})}),(0,S.jsxs)("div",{className:"mt20 ",children:[(0,S.jsx)("span",{className:Ye,style:{color:"#3061D0"},children:"判分方式"}),(0,S.jsx)("span",{style:{color:"#000",marginLeft:10,fontSize:"16px"},children:null!=f&&f.use_keywords?"关键词自动判分":"手动判分"})]})]}),5===(null==f?void 0:f.question_type)&&(0,S.jsx)("div",{className:dn,children:null==f||null===(s=f.shixun)||void 0===s?void 0:s.map((function(e,n){return(0,S.jsxs)("div",{className:"".concat(un," mb30"),children:[(0,S.jsxs)("span",{className:pn,children:["(",null==e?void 0:e.challenge_score,"分)"]}),(0,S.jsxs)("span",{className:mn,children:[(null==f?void 0:f.index)+"."+(n+1),"、",null==e?void 0:e.challenge_name]})]},n)}))}),6===(null==f?void 0:f.question_type)&&(0,S.jsx)("div",{className:hn,children:(0,S.jsx)(K.Z,{className:on,value:(null==f?void 0:f.description)||"- -"})}),7===(null==f?void 0:f.question_type)&&(null==f||null===(o=f.sub_exercise_questions)||void 0===o?void 0:o.map((function(e,n){var t,i,r,l,s,o;return(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:fn,children:[(0,S.jsxs)("span",{className:pn,children:[null==e?void 0:e.question_score,"分"]}),(0,S.jsx)("span",{className:vn,children:null===(t=yn.find((function(n){return n.type==e.question_type})))||void 0===t?void 0:t.name}),(0,S.jsxs)("span",{className:mn,children:[n+1,"、",null==e?void 0:e.question_title]})]}),(0===e.question_type||2===e.question_type)&&(0,S.jsx)("div",{className:Ge,style:{padding:"30px 58px",paddingBottom:0},children:(0,S.jsx)("div",{children:null==e||null===(i=e.question_choices)||void 0===i?void 0:i.map((function(n,t){return(0,S.jsxs)("div",{className:He,children:[!(null!=n&&n.standard_boolean)&&(0,S.jsx)("span",{className:Ue}),(null==n?void 0:n.standard_boolean)&&(0,S.jsx)("i",{className:"".concat(Ke," icon-duigou1")}),2===e.question_type&&(0,S.jsx)("span",{className:"".concat(null!=n&&n.standard_boolean?Je:Ye," ").concat(Ve),children:_n[t]}),(0,S.jsx)(K.Z,{className:null!=n&&n.standard_boolean?Je:Ye,value:null==n?void 0:n.choice_text}),(null==n?void 0:n.standard_boolean)&&(0,S.jsx)("div",{className:Qe,children:"正确答案"})]},t)}))})}),1===e.question_type&&(0,S.jsx)("div",{className:We,children:null==e||null===(r=e.question_choices)||void 0===r?void 0:r.map((function(e,n){return(0,S.jsxs)("div",{className:Xe,children:[!(null!=e&&e.standard_boolean)&&(0,S.jsx)("span",{className:$e}),(null==e?void 0:e.standard_boolean)&&(0,S.jsx)("i",{className:"".concat(en," icon-duigou1")}),(0,S.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?Je:Ye," ").concat(Ve),children:_n[n]}),(0,S.jsx)(K.Z,{className:null!=e&&e.standard_boolean?Je:Ye,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,S.jsx)("div",{className:Qe,children:"正确答案"})]},n)}))}),3===e.question_type&&(0,S.jsx)("div",{className:sn,children:null==e||null===(l=e.standard_answers)||void 0===l?void 0:l.map((function(e,n){var t;return(0,S.jsxs)(J.Z,{align:"top",children:[(0,S.jsxs)("span",{className:Ye,children:["填空项",n+1]}),(0,S.jsx)("div",{className:on,children:null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,S.jsx)("div",{className:an,children:(0,S.jsx)("pre",{className:"mb0",children:e})},n)}))})]})}))}),4===e.question_type&&(0,S.jsxs)("div",{className:cn,children:[(0,S.jsx)("div",{className:Ye,children:"参考答案"}),(0,S.jsx)("div",{className:"mt10",style:{fontSize:"16px"},children:null!=e&&null!==(s=e.answer_texts)&&void 0!==s&&s[0]?(0,S.jsx)(K.Z,{className:on,value:null==e||null===(o=e.answer_texts)||void 0===o?void 0:o[0]}):(0,S.jsx)("div",{style:{color:"#C1C1C1"},children:"暂未设置~"})}),(0,S.jsxs)("div",{className:"mt20 ",children:[(0,S.jsx)("span",{className:Ye,style:{color:"#3061D0"},children:"判分方式"}),(0,S.jsx)("span",{style:{color:"#000",marginLeft:10,fontSize:"16px"},children:null!=f&&f.use_keywords?"关键词自动判分":"手动判分"})]})]})]},n)}))),8===(null==f?void 0:f.question_type)&&(0,S.jsx)("div",{children:(0,S.jsx)(K.Z,{disabledFill:!0,className:on,showProgramFill:!0,value:gn.Base64.decode((null==f||null===(a=f.program_attr)||void 0===a?void 0:a.code)||"")})}),((null==f?void 0:f.question_type)<=4||[6,8].includes(null==f?void 0:f.question_type))&&(0,S.jsxs)("div",{className:nn,children:[(0,S.jsxs)("div",{className:"".concat(tn," mb30"),children:[(0,S.jsx)("span",{className:rn,children:"解析"}),(0,S.jsx)("span",{className:ln,children:null!=f&&f.analysis?(0,S.jsx)(K.Z,{value:null==f?void 0:f.analysis}):(0,S.jsx)("span",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]}),(0,S.jsxs)("div",{className:"".concat(tn," mb30"),children:[(0,S.jsx)("span",{className:rn,children:"难度"}),(0,S.jsx)("span",{className:ln,children:1===(null==f?void 0:f.difficulty)?"简单":2===(null==f?void 0:f.difficulty)?"适中":"困难"})]}),(0,S.jsxs)("div",{className:tn,children:[(0,S.jsx)("span",{className:rn,children:"知识点"}),(0,S.jsx)(G.Z,{title:(null==f||null===(c=f.tag_discipline_names)||void 0===c?void 0:c.length)<=0||1==(null==f||null===(d=f.tag_discipline_names)||void 0===d?void 0:d.length)&&["-"].includes(null==f?void 0:f.tag_discipline_names[0])?"暂未设置~":null==f||null===(u=f.tag_discipline_names)||void 0===u||null===(u=u.join(";"))||void 0===u?void 0:u.toString(),children:(0,S.jsx)("span",{className:ln,children:(null==f||null===(p=f.tag_discipline_names)||void 0===p?void 0:p.length)<=0||1==(null==f||null===(m=f.tag_discipline_names)||void 0===m?void 0:m.length)&&["-"].includes(null==f?void 0:f.tag_discipline_names[0])?(0,S.jsx)("span",{style:{color:"#C1C1C1"},children:"暂未设置~"}):null==f||null===(h=f.tag_discipline_names)||void 0===h||null===(h=h.join(";"))||void 0===h?void 0:h.toString()})})]})]})]})},bn=t(91099),wn=t(42230),kn=function(e){var n,t=e.qitem,i=e.setisedit,l=e.TagDiscipline,o=e.exerciseitem,c=e.seveeditor,u=e.deleteitem,p=e.getTagData,h=e.init,x=f.Z.useForm(),g=d()(x,1)[0];return(0,m.useEffect)((function(){g.setFieldsValue(r()(r()({},t),{},{name:t.question_title,answer_texts:t.answer_texts,repeat_answer:!t.repeat_answer}))}),[t]),(0,S.jsx)("div",{children:(0,S.jsxs)(f.Z,{form:g,colon:!1,onFinish:function(e){c(r()(r()(r()({},t),e),{},{answer_texts:null==e?void 0:e.answer_texts,question_title:null==e?void 0:e.name}))},onFinishFailed:function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),g.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,S.jsx)("span",{children:"简答题"})]}),1==(null==o||null===(n=o.exercise)||void 0===n?void 0:n.exercise_status)&&!(null!=t&&t.isadd)&&(0,S.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){u()},children:[(0,S.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]}),(0,S.jsx)(b.ZP,{onClick:function(){t.isadd?(i(!1),h()):(g.setFieldsValue(r()(r()({},t),{},{name:null==t?void 0:t.question_title,answer_texts:t.answer_texts||[],repeat_answer:!(null!=t&&t.repeat_answer)})),i(!1))},children:"取消"}),(0,S.jsx)(b.ZP,{type:"primary",className:"ml20",onClick:function(){g.submit()},children:"保存"})]}),(0,S.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,S.jsx)(f.Z.Item,{className:V.scoreinput,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,S.jsx)(j.Z,{onBlur:function(e){"0"===e.target.value&&v.ZP.error("分值必须大于0且小于等于100")},style:{width:150},precision:1,placeholder:"请输入分值",max:100,min:.1})}),(0,S.jsx)(wn.W,{form:g,showKeywords:!0,questionTitlePlaceholder:"请编辑简答题题干内容"}),(0,S.jsx)(ne,{getTagData:p,qitem:t,exerciseitem:o,TagDiscipline:l,form:g})]})]})})},Nn=function(e){var n,t,i=e.setScoreShow,r=e.ScoreShow,l=e.exerciseitem,o=e.getdata,c=(0,m.useState)(!1),u=d()(c,2),p=u[0],h=u[1];function f(){return v.apply(this,arguments)}function v(){return(v=a()(s()().mark((function e(){var n,t,i,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==l||null===(n=l.exercise_question_types)||void 0===n||null===(n=n.filter((function(e){return e.Singlequestion})))||void 0===n?void 0:n.map((function(e){return{question_type:e.question_type,score:e.Singlequestion}})),e.next=3,(0,I.ZP)("/api/exercises/".concat(null==l||null===(t=l.exercise)||void 0===t?void 0:t.id,"/batch_set_score.json"),{method:"POST",body:{question_arr:i}});case 3:0===(null==(r=e.sent)?void 0:r.status)&&o();case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,S.jsxs)("div",{children:[r&&(0,S.jsxs)(k.Z,{title:!1,footer:!1,open:r,width:640,centered:!0,zIndex:10,closable:!1,className:V.scoremodal,onCancel:function(){i(!1)},children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{className:V.title,children:["批量设置分值",(0,S.jsxs)("div",{className:V.score,children:["总分 ",(null==l?void 0:l.exercise_question_types.length)>0&&(null==l||null===(n=l.exercise_types)||void 0===n?void 0:n.q_scores)]})]}),(0,S.jsx)("span",{onClick:function(){return i(!1)},className:V.close,children:"X"})]}),(0,S.jsxs)("div",{className:V.content,children:[(0,S.jsx)("span",{children:"题型名称"}),(0,S.jsx)("span",{children:"小题总数"}),(0,S.jsx)("span",{children:"题型总分"}),(0,S.jsx)("span",{children:"操作"})]}),null==l||null===(t=l.exercise_question_types)||void 0===t||null===(t=t.filter((function(e){return"实训题"!==e.name&&"组合题"!==e.name})))||void 0===t?void 0:t.map((function(e){var n;return(0,S.jsxs)("div",{className:V.items,children:[(0,S.jsx)("span",{children:null==e?void 0:e.name}),(0,S.jsx)("span",{children:null==e||null===(n=e.items)||void 0===n?void 0:n.length}),(0,S.jsx)("span",{children:null==e?void 0:e.score}),(0,S.jsxs)("span",{children:["每题",(0,S.jsx)(j.Z,{max:100,min:.1,onChange:function(n){e.Singlequestion=n},style:{width:90,height:38,margin:"0px 10px",display:"flex",alignItems:"center"}}),"分"]})]})})),(0,S.jsxs)("div",{className:V.bottom,children:[(0,S.jsx)(b.ZP,{className:V.no,onClick:function(){i(!1)},children:"取消"}),(0,S.jsx)(b.ZP,{className:V.yes,onClick:function(){var e;null!=l&&l.use_blank_score&&null!=l&&null!==(e=l.exercise_question_types)&&void 0!==e&&null!==(e=e.filter((function(e){return"填空题"===e.name})))&&void 0!==e&&null!==(e=e[0])&&void 0!==e&&e.Singlequestion?h(!0):(f(),i(!1))},children:"确认"})]})]}),(0,S.jsxs)(k.Z,{title:!1,footer:!1,centered:!0,zIndex:20,open:p,width:640,closable:!1,className:V.scoremodal,children:[(0,S.jsxs)("div",{style:{marginTop:40},children:["填空题中存在",(0,S.jsx)("span",{style:{color:"#FA6400"},children:"按空给分"}),"的小题,若批量设置分值会统一将填空题改为按题给分"]}),(0,S.jsxs)("div",{className:V.bottom,children:[(0,S.jsx)(b.ZP,{className:V.no,onClick:function(){h(!1)},children:"取消"}),(0,S.jsx)(b.ZP,{className:V.yes,onClick:function(){f(),h(!1),i(!1)},children:"确认"})]})]})]})},Cn=t(99313),Zn=t(14491),Sn=t(53864),Pn="scoremodal___PfqOf",In="selectWrapper___Mtqcz",Tn="allqingchu___IqL8g",Bn="title___UgYfD",An="bottom___vQTEm",En="yes___j81JQ",qn="no___kiUH4",Mn="titlecount___lliQr",Ln="add___QhDj8",On="search___QCCaL",Fn="searchIcon___oXRH5",Dn="tabWrap___Cu_4D",Rn="previewModal___BVDlS",zn=t(68111),Gn={flex_box_center:"flex_box_center___zojHa",flex_space_between:"flex_space_between___wmLZ4",flex_box_vertical_center:"flex_box_vertical_center___DszWW",flex_box_center_end:"flex_box_center_end___mVCv5",flex_box_column:"flex_box_column___fbC9t",warp:"warp___isAcM",shixunbutton:"shixunbutton___h3Ybb",redio:"redio___xDffb",redioitem:"redioitem___FFPtq",redioitemyes:"redioitemyes___pF7ID",title:"title___mnPZc",titleyes:"titleyes___wrtWQ",yestag:"yestag___D4krY",qcount:"qcount___W5pwO",score:"score___eKQzl",qtitle:"qtitle___lb8MD",checkbox:"checkbox___QpUm4",checkboxitem:"checkboxitem___Wm2SH",checkboxitemyes:"checkboxitemyes___VVVTe",bottom:"bottom___Mn_Bw",bottomitem:"bottomitem___JTyHT",left:"left___nQqpo",right:"right___v58qy",completion:"completion___BnZSp",content:"content___MU8hZ",items:"items___a7i54",simple:"simple___GDw3K",shixun:"shixun___DGzTe",combination:"combination___AG9cr"},Vn=["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."],Wn=function(e){var n,t,i,r,l,s,o,a,c,d,u=e.qitem;return(0,S.jsxs)("div",{className:Gn.warp,children:[(0,S.jsxs)("div",{className:Gn.mainPart,children:[(0,S.jsxs)("div",{className:Gn.qcount,children:[8===(null==u?void 0:u.question_type)&&(0,S.jsx)(K.Z,{className:Gn.content,showProgramFill:!0,value:null==u||null===(n=u.program_attr)||void 0===n?void 0:n.description}),8!=(null==u?void 0:u.question_type)&&(0,S.jsx)(K.Z,{className:Gn.qtitle,value:(null==u?void 0:u.name)||(null==u?void 0:u.title)})]}),(0===(null==u?void 0:u.question_type)||2===(null==u?void 0:u.question_type))&&(0,S.jsx)("div",{children:null==u||null===(t=u.choices)||void 0===t?void 0:t.map((function(e,n){return(0,S.jsxs)("div",{className:Gn.redio,children:[!(null!=e&&e.is_answer)&&(0,S.jsx)("span",{className:Gn.redioitem}),(null==e?void 0:e.is_answer)&&(0,S.jsx)("i",{className:"".concat(Gn.redioitemyes," icon-duigou1")}),(0,S.jsx)(K.Z,{className:null!=e&&e.is_answer?Gn.titleyes:Gn.title,value:Vn[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,S.jsx)("div",{className:Gn.yestag,children:"正确答案"})]})}))}),1===(null==u?void 0:u.question_type)&&(0,S.jsx)("div",{children:null==u||null===(i=u.choices)||void 0===i?void 0:i.map((function(e,n){return(0,S.jsxs)("div",{className:Gn.checkbox,children:[!(null!=e&&e.is_answer)&&(0,S.jsx)("span",{className:Gn.checkboxitem}),(null==e?void 0:e.is_answer)&&(0,S.jsx)("i",{className:"".concat(Gn.checkboxitemyes," icon-duigou1")}),(0,S.jsx)(K.Z,{className:null!=e&&e.is_answer?Gn.titleyes:Gn.title,value:Vn[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,S.jsx)("div",{className:Gn.yestag,children:"正确答案"})]})}))}),3===(null==u?void 0:u.question_type)&&(0,S.jsx)("div",{className:Gn.completion,children:null==u||null===(r=u.standard_answer)||void 0===r?void 0:r.map((function(e,n){var t;return(0,S.jsxs)("div",{style:{display:"flex"},children:[(0,S.jsxs)("span",{className:Gn.title,children:["填空项",n+1]}),(0,S.jsx)("div",{className:Gn.content,children:null==e||null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,S.jsx)("div",{className:Gn.items,children:e})}))})]})}))}),4===(null==u?void 0:u.question_type)&&(0,S.jsxs)("div",{className:Gn.simple,children:[(0,S.jsx)("div",{className:Gn.title,children:"参考答案"}),(0,S.jsx)("div",{className:"mt10",style:{fontSize:"16px"},children:null!=u&&null!==(l=u.answer_texts)&&void 0!==l&&l[0]?(0,S.jsx)(K.Z,{className:Gn.content,value:null==u||null===(s=u.answer_texts)||void 0===s?void 0:s[0]}):(0,S.jsx)("div",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]}),5===(null==u?void 0:u.question_type)&&(null==u||null===(o=u.challenge_names)||void 0===o?void 0:o.map((function(e,n){return(0,S.jsx)("div",{className:Gn.shixun,children:(0,S.jsxs)("span",{className:Gn.qtitle,children:[(0,S.jsxs)("span",{style:{marginRight:10},children:["第",(0,W.EM)(n+1),"题"]}),e]})})}))),6===(null==u?void 0:u.question_type)&&(0,S.jsx)("div",{className:Gn.simple,children:(0,S.jsx)(K.Z,{className:Gn.content,value:(null==u||null===(a=u.program_attr)||void 0===a?void 0:a.description)||"- -"})}),7===(null==u?void 0:u.question_type)&&(null==u||null===(c=u.sub_item_banks)||void 0===c?void 0:c.map((function(e,n){var t,i,r,l,s;return(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:Gn.combination,children:(0,S.jsx)("span",{className:Gn.qtitle,children:null==e?void 0:e.name})}),(0,S.jsx)("div",{className:Gn.warp,style:{padding:"0px",paddingTop:20},children:(0,S.jsxs)("div",{children:[("SINGLE"==(null==e?void 0:e.item_type)||"JUDGMENT"==(null==e?void 0:e.item_type))&&(null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e,n){return(0,S.jsxs)("div",{className:Gn.redio,children:[!(null!=e&&e.is_answer)&&(0,S.jsx)("span",{className:Gn.redioitem}),(null==e?void 0:e.is_answer)&&(0,S.jsx)("i",{className:"".concat(Gn.redioitemyes," icon-duigou1")}),(0,S.jsx)(K.Z,{className:null!=e&&e.is_answer?Gn.titleyes:Gn.title,value:Vn[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,S.jsx)("div",{className:Gn.yestag,children:"正确答案"})]})}))),"MULTIPLE"==(null==e?void 0:e.item_type)&&(null==e||null===(i=e.choices)||void 0===i?void 0:i.map((function(e,n){return(0,S.jsxs)("div",{className:Gn.checkbox,children:[!(null!=e&&e.is_answer)&&(0,S.jsx)("span",{className:Gn.checkboxitem}),(null==e?void 0:e.is_answer)&&(0,S.jsx)("i",{className:"".concat(Gn.checkboxitemyes," icon-duigou1")}),(0,S.jsx)(K.Z,{className:null!=e&&e.is_answer?Gn.titleyes:Gn.title,value:Vn[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,S.jsx)("div",{className:Gn.yestag,children:"正确答案"})]})}))),"COMPLETION"==(null==e?void 0:e.item_type)&&(0,S.jsx)("div",{className:Gn.completion,children:null==e||null===(r=e.standard_answer)||void 0===r?void 0:r.map((function(e,n){var t;return(0,S.jsxs)("div",{style:{display:"flex"},children:[(0,S.jsxs)("span",{className:Gn.title,children:["填空项",n+1]}),(0,S.jsx)("div",{className:Gn.content,children:null==e||null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,S.jsx)("div",{className:Gn.items,children:e})}))})]})}))}),"SUBJECTIVE"==(null==e?void 0:e.item_type)&&(0,S.jsxs)("div",{className:Gn.simple,children:[(0,S.jsx)("div",{className:Gn.title,children:"参考答案"}),(0,S.jsx)("div",{className:"mt10",style:{fontSize:"16px"},children:null!=e&&null!==(l=e.answer_texts)&&void 0!==l&&l[0]?(0,S.jsx)(K.Z,{className:Gn.content,value:null==e||null===(s=e.answer_texts)||void 0===s?void 0:s[0]}):(0,S.jsx)("div",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]})]})})]})}))),8===(null==u?void 0:u.question_type)&&(0,S.jsx)("div",{children:(0,S.jsx)(K.Z,{disabledFill:!0,className:Gn.content,showProgramFill:!0,value:gn.Base64.decode((null==u||null===(d=u.program_attr)||void 0===d?void 0:d.code)||"")})}),5===(null==u?void 0:u.question_type)&&(0,S.jsxs)("div",{style:{background:"#F6F7F9",padding:"0px 20px",height:46,lineHeight:"46px",marginTop:40,display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{style:{flex:1,alignItems:"center",display:"flex"},children:[(0,S.jsxs)("div",{style:{marginRight:30},children:[(0,S.jsx)("span",{style:{marginRight:10,color:"#666666"},children:"创建者"}),(0,S.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.author_name)||"- -"})]}),(0,S.jsxs)("div",{style:{marginRight:30},children:[(0,S.jsx)("span",{style:{marginRight:10,color:"#666666"},children:"所属单位"}),(0,S.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.author_school_name)||"- -"})]}),(0,S.jsxs)("div",{style:{marginRight:30},children:[(0,S.jsx)("span",{style:{marginRight:10,color:"#666666"},children:"学习人数"}),(0,S.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.study_count)||"0"})]})]}),(0,S.jsxs)("a",{className:Gn.shixunbutton,href:"/shixuns/".concat(null==u?void 0:u.identifier,"/challenges?exercise=true"),target:"_blank",children:[(0,S.jsx)("i",{onClick:function(){},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"实训详情"]})]})]}),((null==u?void 0:u.question_type)<=4||[6,8].includes(null==u?void 0:u.question_type))&&(0,S.jsxs)("div",{className:Gn.bottom,children:[(0,S.jsxs)("div",{className:Gn.bottomitem,children:[(0,S.jsx)("span",{className:Gn.left,children:"解析"}),(0,S.jsx)("span",{className:Gn.right,children:null!=u&&u.analysis?(0,S.jsx)(K.Z,{value:null==u?void 0:u.analysis}):(0,S.jsx)("span",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]}),(0,S.jsxs)("div",{className:Gn.bottomitem,children:[(0,S.jsx)("span",{className:Gn.left,children:"难度"}),(0,S.jsx)("span",{className:Gn.right,children:1===(null==u?void 0:u.difficulty)?"简单":2===(null==u?void 0:u.difficulty)?"适中":"困难"})]}),(0,S.jsxs)("div",{className:Gn.bottomitem,children:[(0,S.jsx)("span",{className:Gn.left,children:"知识点"}),(0,S.jsx)("span",{className:Gn.right,children:null!=u&&u.tag_discipline?null==u?void 0:u.tag_discipline:(0,S.jsx)("span",{style:{color:"#C1C1C1"},children:"暂未设置~"})})]})]})]})},Hn=t(4505),Un=t(28288),Kn=t(30941),Yn=(0,h.connect)((function(e){return{shixunsDetail:e.shixunsDetail}}))((function(e){var n,t,i,l=e.setScoreShow,o=e.ScoreShow,c=e.onOk,u=e.isshixuns,p=e.isloadings,x=e.dispatch,y=(e.shixunsDetail,(0,m.useState)({type:"0",page:1,per_page:10,updated_at:"",quotes:""})),j=d()(y,2),w=j[0],N=j[1],C=(0,m.useState)([]),Z=d()(C,2),P=Z[0],T=Z[1],A=(0,m.useState)([]),E=d()(A,2),q=E[0],L=E[1],O=(0,m.useState)([]),F=d()(O,2),D=F[0],R=F[1],z=(0,m.useState)([]),V=d()(z,2),W=V[0],H=V[1],U=(0,m.useState)(!1),Y=d()(U,2),J=Y[0],Q=Y[1],X=f.Z.useForm(),ee=d()(X,1)[0],ne=(0,m.useState)(),te=d()(ne,2),ie=te[0],re=te[1],le=(0,m.useState)(!1),se=d()(le,2),oe=se[0],ae=se[1],ce=(0,m.useState)(u),de=d()(ce,2),ue=de[0],pe=de[1],me=(0,m.useState)([]),he=d()(me,2),fe=he[0],ve=he[1],xe=(0,m.useState)(!0),ge=d()(xe,2),_e=ge[0],ye=ge[1],je=(0,m.useState)([]),we=d()(je,2),ke=we[0],Ne=we[1],Ce=(0,m.useState)(0),Ze=d()(Ce,2),Se=Ze[0],Pe=Ze[1],Ie=[{name:"全部",value:"",question_type:0},{name:"单选题",value:"SINGLE",question_type:0},{name:"多选题",value:"MULTIPLE",question_type:1},{name:"判断题",value:"JUDGMENT",question_type:2},{name:"填空题",value:"COMPLETION",question_type:3},{name:"简答题",value:"SUBJECTIVE",question_type:4},{name:"实训题",value:"SHIXUN",question_type:5},{name:"编程题",value:"PROGRAM",question_type:6},{name:"组合题",value:"COMBINATION",question_type:7},{name:"程序填空题",value:"BPROGRAM",question_type:8}],Te=(0,m.useState)([]),Be=d()(Te,2),Ae=Be[0],Ee=Be[1],qe=(0,m.useRef)(new Set),Me=(0,m.useRef)(new Set),Le=[{name:"简单",value:1},{name:"适中",value:2},{name:"困难",value:3}],Oe=(0,m.useState)(!1),Fe=d()(Oe,2),De=Fe[0],Re=Fe[1];function ze(e){return Ge.apply(this,arguments)}function Ge(){return(Ge=a()(s()().mark((function e(n){var t,i,l,o,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Q(!0),N(n),!((null==D?void 0:D.length)<=0&&"5"===n.type)){e.next=6;break}return H([]),Q(!1),e.abrupt("return");case 6:return l="5"===n.type?null==D?void 0:D.filter((function(e){return!fe.includes(e)})):null,o="5"===n.type?null==D?void 0:D.filter((function(e){return fe.includes(e)})):null,e.next=10,(0,I.ZP)("/api/item_banks.json",{method:"get",params:r()(r()({},n),{},{discipline_id:(null==n||null===(t=n.courseid)||void 0===t?void 0:t[0])||null,sub_discipline_id:(null==n||null===(i=n.courseid)||void 0===i?void 0:i[1])||null,ids:l,shixun_ids:o,keyword:n.keyword?encodeURIComponent(n.keyword):n.keyword,include_shixuns:!0,type:"5"===n.type?null:n.type,clazz:"3"===n.type?"ItemBanksGroup":null})});case 10:a=e.sent,H(a),Q(!1);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ve(){return(Ve=a()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/disciplines.json",{method:"get",params:{source:"question",group_id:0,group_type:"5"===w.type?null:"5"===w.type,clazz:"ItemBanksGroup"}});case 2:n=e.sent,T((0,zn.L)(null==n?void 0:n.disciplines));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(){return(We=a()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/item_banks_groups/all_groups.json",{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&Ne(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function He(e){return Ue.apply(this,arguments)}function Ue(){return(Ue=a()(s()().mark((function e(n){var t,i,l,o,a,c,d;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Q(!0),a=null===(t=n.list)||void 0===t?void 0:t.filter((function(e){return!fe.includes(e)})),c=null===(i=n.list)||void 0===i?void 0:i.filter((function(e){return fe.includes(e)})),0!==a.length||0!==c.length){e.next=7;break}return Q(!1),H([]),e.abrupt("return");case 7:return e.next=9,(0,I.ZP)("/api/item_banks.json",{method:"get",params:r()(r()({},n),{},{discipline_id:(null==n||null===(l=n.courseid)||void 0===l?void 0:l[0])||null,sub_discipline_id:(null==n||null===(o=n.courseid)||void 0===o?void 0:o[1])||null,ids:a,shixun_ids:c,type:"5"===n.type?null:n.type,clazz:"3"===n.type?"ItemBanksGroup":null})});case 9:d=e.sent,Q(!1),H(d);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){Se>0&&setTimeout((function(){Pe(0)}),2e3)}),[Se]),(0,m.useEffect)((function(){o&&(ee.setFieldsValue({item_type:"",courseid:"",tag_discipline_id:null,difficulty:null,keyword:null}),_e&&ue&&(ee.setFieldsValue({item_type:"SHIXUN"}),w.item_type="SHIXUN",N(r()({},w)),ye(!1)),ze(w),function(){Ve.apply(this,arguments)}(),function(){We.apply(this,arguments)}())}),[o]);var Ke=(0,h.useParams)(),Ye=(0,Kn.P)(),Je=d()(Ye,4),Qe=Je[0],Xe=Je[1],$e=Je[2],en=Je[3],nn=function(){var e=a()(s()().mark((function e(n){var t,i,r,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x({type:"shixunsDetail/release",payload:{id:n}});case 2:if(t=e.sent,i=null==t?void 0:t.tag_position,r=(null==t?void 0:t.evaluation_set_position)||[],0!==(l=t.status)){e.next=12;break}return v.ZP.success("发布成功"),ze(w),e.abrupt("return",!0);case 12:2===l?v.ZP.error("第".concat(r.join(","),"关尚未完成,无法申请发布")):3===l?v.ZP.error("每一个关卡至少需要一个技能标签, 第".concat(i.join(","),"关尚未设置技能标签,请补充")):v.ZP.error("尚未创建任务的实训,不能申请发布");case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),tn=function(e){return 1===(null==e?void 0:e.shixun_tag_num)?"未发布的实践项目不能被选用,请先进行发布":""};return(0,S.jsxs)("div",{children:[(0,S.jsxs)(k.Z,{title:!1,footer:!1,open:o,width:1200,centered:!0,className:Pn,onCancel:function(){l(!1)},children:[(0,S.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,S.jsx)("div",{className:Bn,children:"题库选题"})}),(0,S.jsx)(Cn.Z,{className:Dn,activeKey:w.type,onChange:function(e){w.type=e,w.page=1,w.updated_at="",w.quotes="",w.courseid="",w.tag_discipline_id=null,w.difficulty=null,w.keyword=null,w.group_id=null,ee.setFieldsValue({courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:null}),"SHIXUN"===(null==w?void 0:w.item_type)&&"5"!==w.type&&(ue=!0,pe(!0)),Re(!1),"5"===w.type&&(ue=!1,pe(!1)),N(r()({},w)),ze(r()({},w))},items:[{label:"公共",key:"1"},{label:"团队共享",key:"3"},{label:"收藏夹",key:"2"},{label:"我创建的",key:"0"},{label:(0,S.jsxs)("div",{children:["已选",D.length>0&&(0,S.jsx)("span",{className:Mn,children:D.length}),Se>0&&(0,S.jsxs)("span",{className:Ln,children:["+",Se]})]}),key:"5"}]}),(0,S.jsxs)(f.Z,{layout:"inline",form:ee,onValuesChange:function(e,n){var t,i,r=Object.values(n).some((function(e){return null!==e&&""!==e&&void 0!==e})),l=""===n.keyword;if(Re(r||!l),w.page=1,w.keyword=null===(t=w.keyword)||void 0===t||null===(i=t.replace)||void 0===i?void 0:i.call(t,/^\s+|\s+$/g,""),"SHIXUN"===(null==n?void 0:n.item_type)){if("5"===w.type?pe(!1):pe(!0),e.keyword||""===e.keyword)return;ee.submit()}else{if(null!=e&&e.courseid&&ee.setFieldsValue({tag_discipline_id:""}),pe(!1),e.keyword||""===e.keyword)return;ee.submit()}},onFinish:function(e){ze(r()(r()({},w),e))},children:[(0,S.jsx)(f.Z.Item,{name:"item_type",children:(0,S.jsx)(M.default,{className:In,placeholder:"题型",style:{width:110},size:"middle",allowClear:!0,children:Ie.map((function(e){return(0,S.jsx)(M.default.Option,{children:e.name},e.value)}))})}),(0,S.jsx)(f.Z.Item,{name:"courseid",children:(0,S.jsx)(_.Z,{className:In,style:{width:160},size:"middle",placeholder:"方向&课程",options:P})}),!ue&&(0,S.jsx)(f.Z.Item,{name:"tag_discipline_id",children:(0,S.jsx)(M.default,{className:In,placeholder:"知识点",style:{width:160},size:"middle",allowClear:!0,children:null==W||null===(n=W.tag_disciplines)||void 0===n?void 0:n.map((function(e){return(0,S.jsx)(M.default.Option,{children:e.name},e.id)}))})}),(0,S.jsx)(f.Z.Item,{name:ue?"diff":"difficulty",children:(0,S.jsxs)(M.default,{className:In,placeholder:"难度",style:{width:118},size:"middle",allowClear:!0,children:[!ue&&Le.map((function(e){return(0,S.jsx)(M.default.Option,{children:e.name},e.value)})),ue&&[{name:"初级",value:1},{name:"中级",value:2},{name:"中高级",value:3},{name:"高级",value:4}].map((function(e){return(0,S.jsx)(M.default.Option,{children:e.name},e.value)}))]})}),ue&&(0,S.jsx)(f.Z.Item,{name:"shixun_publish_status",children:(0,S.jsx)(M.default,{className:In,placeholder:"全部状态",style:{width:118},size:"middle",allowClear:!0,children:[{name:"未发布",value:"unpublish"},{name:"静默发布",value:"silent_publish"},{name:"公开发布",value:"public_publish"}].map((function(e){return(0,S.jsx)(M.default.Option,{children:e.name},e.value)}))})}),("3"===w.type||"0"===w.type)&&!ue&&(0,S.jsx)(f.Z.Item,{name:"group_id",children:(0,S.jsxs)(M.default,{className:In,placeholder:"文件夹",showSearch:!0,style:{width:118},size:"middle",allowClear:!0,filterOption:function(e,n){return-1!==n.children.toUpperCase().indexOf(e.toUpperCase())},children:[(0,S.jsx)(M.default.Option,{children:"根目录"},0),"3"===w.type&&(null==ke||null===(t=ke.share_banks_groups)||void 0===t?void 0:t.map((function(e){return(0,S.jsx)(M.default.Option,{children:e.name},e.id)}))),"0"===w.type&&(null==ke||null===(i=ke.my_banks_groups)||void 0===i?void 0:i.map((function(e){return(0,S.jsx)(M.default.Option,{children:e.name},e.id)})))]})}),De&&(0,S.jsxs)("span",{className:Tn,onClick:function(){ee.resetFields(),ue=!1,pe(!1),Re(!1),ee.submit()},children:[(0,S.jsx)("i",{className:"iconfont icon-guanbi4"}),(0,S.jsx)("span",{children:"清除筛选条件"})]}),(0,S.jsx)(f.Z.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"keyword",children:(0,S.jsx)(g.Z.Search,{className:On,placeholder:"请输入关键词搜索",allowClear:!0,suffix:(0,S.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Fn),onClick:function(){return ee.submit()}}),onSearch:function(e){ee.submit()}})})]}),(0,S.jsxs)("div",{style:{background:"#F6F7F9",display:"flex",alignItems:"center",marginTop:18,height:40,paddingLeft:10,paddingRight:20},children:[(0,S.jsxs)("div",{onClick:function(){"asc"===w.updated_at?w.updated_at="desc":w.updated_at="asc",N(r()(r()({},w),{},{page:1})),ze(r()(r()({},w),{},{page:1}))},children:[" ",w.updated_at?(0,S.jsx)("img",{src:"asc"===w.updated_at?Hn.Z:Un.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):(0,S.jsx)("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"按更新时间排序"]}),(0,S.jsxs)("div",{onClick:function(){"asc"===w.quotes?w.quotes="desc":w.quotes="asc",N(r()(r()({},w),{},{page:1})),ze(r()(r()({},w),{},{page:1}))},style:{marginLeft:20},children:[" ",w.quotes?(0,S.jsx)("img",{src:"asc"===w.quotes?Hn.Z:Un.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):(0,S.jsx)("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"按使用次数排序"]})]}),(0,S.jsx)(Zn.Z,{style:{marginTop:2,marginBottom:20},scroll:{y:260},dataSource:(null==W?void 0:W.items)||(null==W?void 0:W.shixun_list),pagination:!1,loading:J,rowKey:function(e){return e.id},rowSelection:{type:"checkbox",selectedRowKeys:q,getCheckboxProps:function(e){return{disabled:1===e.shixun_tag_num}},onSelect:function(e,n,t){if(n)ue&&ve([].concat(B()(fe),[e.id])),L([].concat(B()(q),[e.id])),Ee([].concat(B()(Ae),[e])),e.identifier?qe.current.add(e.id):Me.current.add(e.id),Pe(1),R([].concat(B()(D),[e.id]));else{var i=Ae.filter((function(n){return n.id!==e.id}));Ee(i);var l=i.map((function(e){return e.id}));L(B()(l)),e.identifier?qe.current.delete(e.id):Me.current.delete(e.id);var s=D.filter((function(n){return n!==e.id}));if(R(s),ue){var o=fe.filter((function(n){return n!==e.id}));ve(B()(o))}if("5"===w.type)return void He(r()(r()({},w),{},{list:B()(s)}))}},onSelectAll:function(e,n,t){if(e){var i=t.map((function(e){return e.id}));ue&&ve([].concat(B()(fe),B()(i))),Ee([].concat(B()(Ae),B()(t))),L([].concat(B()(q),B()(i))),R([].concat(B()(D),B()(i)));var l,s=be()(t);try{for(s.s();!(l=s.n()).done;){var o=l.value;o.identifier?qe.current.add(o.id):Me.current.add(o.id)}}catch(e){s.e(e)}finally{s.f()}}else{var a=t.map((function(e){return e.id})),c=q.filter((function(e){return!a.some((function(n){return n===e}))})),d=Ae.filter((function(e){return!a.some((function(n){return n===e.id}))}));if(Ee(d),L(B()(c)),R(B()(c)),ue){var u=fe.filter((function(e){return!a.some((function(n){return n===e.id}))}));ve(B()(u))}"5"===w.type&&He(r()(r()({},w),{},{list:B()(c)}));var p,m=be()(a);try{for(m.s();!(p=m.n()).done;){var h=p.value;h.identifier?qe.current.delete(h):Me.current.delete(h)}}catch(e){m.e(e)}finally{m.f()}}}},columns:[{title:"题型",dataIndex:"item_type",key:"item_type",render:function(e,n,t){var i;return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsx)("div",{children:ue||null!=n&&n.challenge_names?"实训题":null==Ie||null===(i=Ie.filter((function(n){return n.value===e})))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.name})})}},{title:"试题名称",dataIndex:"name",width:ue?"30%":"60%",key:"name",render:function(e,n,t){var i;return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsx)("span",{children:(0,S.jsx)(K.Z,{showLines:1,showTextOnly:!0,value:ue||null!=n&&n.challenge_names?null!=n&&n.title||null===e?"--":e:"BPROGRAM"==(null==n?void 0:n.item_type)?null==n||null===(i=n.program_attr)||void 0===i?void 0:i.description:e},1)})})}},{title:"创建者",dataIndex:"author_name",key:"author_name",hidden:!ue,render:function(e,n,t){var i;return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsx)("span",{children:e?null==e||null===(i=e.split("、"))||void 0===i?void 0:i[0]:"- -"})})}},{title:"所属单位",dataIndex:"author_school_name",key:"author_school_name",hidden:!ue,render:function(e,n,t){return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsx)("span",{children:e||"- -"})})}},{title:"难度",dataIndex:"difficulty",key:"difficulty",render:function(e,n,t){var i,r;return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsx)("div",{children:ue||null!=n&&n.challenge_names?(null==n?void 0:n.level)||(null==Le||null===(i=Le.filter((function(n){return n.value===e})))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.name):null==Le||null===(r=Le.filter((function(n){return n.value===e})))||void 0===r||null===(r=r[0])||void 0===r?void 0:r.name})})}},{title:"关卡数量",dataIndex:"challenges_count",key:"challenges_count",hidden:!ue,render:function(e,n,t){return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsx)("div",{children:e||"- -"})})}},{title:"使用次数",dataIndex:"quotes",key:"quotes",render:function(e,n,t){return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsx)("div",{children:ue||null!=n&&n.challenge_names?(null==n?void 0:n.study_count)||(null==n?void 0:n.stu_num):e})})}},{title:(0,S.jsxs)("span",{children:["发布状态 ",(0,S.jsx)(G.Z,{title:"未发布的实践项目不能被选用",children:(0,S.jsx)($.Z,{})})]}),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",hidden:!ue,render:function(e,n,t){return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsx)("div",{children:e||"- -"})})}},{title:"操作",dataIndex:"id",key:"item_type",render:function(e,n,t){return(0,S.jsx)(G.Z,{title:tn(n),children:(0,S.jsxs)("div",{style:{flex:1,textAlign:"start"},children:[(0,S.jsx)("a",{onClick:function(){var e;re(r()(r()({},n),{},{question_type:ue||null!=n&&n.challenge_names?5:null==Ie||null===(e=Ie.filter((function(e){return e.value===(null==n?void 0:n.item_type)})))||void 0===e||null===(e=e[0])||void 0===e?void 0:e.question_type})),ae(!0)},children:"查看"}),1===(null==n?void 0:n.shixun_tag_num)&&(0,S.jsx)("a",{style:{marginLeft:10},onClick:function(){var e;k.Z.confirm({title:"提示",icon:null,centered:!0,width:400,content:(0,S.jsxs)("div",{children:["是否确定发布",(0,S.jsx)("span",{style:{cursor:"pointer",color:"#3061D0"},onClick:function(){window.open("/shixuns/".concat(null==n?void 0:n.identifier,"/challenges"))},children:(null==n?void 0:n.shixun_name)||"--"}),"?"]}),onOk:(e=a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(nn(null==n?void 0:n.identifier)){e.next=2;break}return e.abrupt("return",new Promise((function(e,n){n()})));case 2:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"发布"})]})})}}].filter((function(e){return!e.hidden}))}),(0,S.jsx)(Sn.Z,{current:w.page,total:(null==W?void 0:W.items_count)||(null==W?void 0:W.shixuns_count),style:{marginBottom:20},defaultPageSize:w.per_page,showTotal:function(e){return(0,S.jsxs)("span",{children:["共 ",(0,S.jsx)("span",{style:{color:"#165DFF"},children:e})," 条数据"]})},pageSize:w.per_page,onChange:function(e,n){w.page=e,w.per_page=n,N(r()({},w)),ze(r()({},w))}}),(0,S.jsxs)("div",{className:An,children:[(0,S.jsx)(b.ZP,{className:qn,onClick:function(){l(!1)},children:"取消"}),(0,S.jsx)(b.ZP,{loading:p,style:{width:p&&75},className:En,onClick:a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==D?void 0:D.length)<=0)){e.next=3;break}return v.ZP.info("当前暂未选择数据"),e.abrupt("return");case 3:return e.next=5,en({id:B()(qe.current),course_id:Ke.coursesId,type:"shixun"});case 5:e.sent||c(B()(Me.current),B()(qe.current),!0,null==D?void 0:D.length);case 7:case"end":return e.stop()}}),e)}))),children:"确认"})]})]}),(0,S.jsx)(k.Z,{open:oe,title:"题目详情",footer:!1,className:Rn,width:1e3,centered:!0,onCancel:function(){ae(!1)},onOk:function(){ae(!1)},children:(0,S.jsx)(Wn,{qitem:ie})}),(0,S.jsx)(Kn.Z,{visible:Qe,position:"已选试题",onCancel:Xe,onOk:function(){var e=a()(s()().mark((function e(n){var t,i,r,l,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],i=[],r=be()(n);try{for(r.s();!(l=r.n()).done;)1===(o=l.value).is_copy&&1===o.is_use&&t.push(o.id),0===o.is_use&&i.push(o.id)}catch(e){r.e(e)}finally{r.f()}return e.next=6,c(B()(Me.current),B()(qe.current).filter((function(e){return!i.includes(e)})),!0,null==D?void 0:D.length,t);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),renderData:$e,inPaper:!1,modalType:"multiple",type:"shixun"})]})})),Jn=t(48637),Qn=function(e){var n,t=e.qitem,i=e.TagDiscipline,l=e.exerciseitem,o=e.setisedit,c=e.seveeditor,u=e.deleteitem,p=e.getTagData,h=e.init,x=f.Z.useForm(),g=d()(x,1)[0];return(0,m.useEffect)((function(){var e,n,i;g.setFieldsValue(r()(r()({},t),{},{standard_answers:t.standard_answer,difficulty:(null==t?void 0:t.difficult)||2,item_banks_group_id:t.item_banks_group_id,hack:r()(r()({},t),{},{time_limit:(null==t?void 0:t.time_limit)||3}),hack_codes:{language:null==t||null===(e=t.program_attr)||void 0===e?void 0:e.language,code:gn.Base64.decode((null==t||null===(n=t.program_attr)||void 0===n?void 0:n.code)||"")},hack_sets:r()({},null==t||null===(i=t.hack_sets)||void 0===i?void 0:i[0]),repeat_answer:!t.repeat_answer}))}),[t]),(0,S.jsx)("div",{children:(0,S.jsxs)(f.Z,{form:g,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.standard_answers){var t,i,r,l=(null===(t=g.getFieldValue("standard_answers"))||void 0===t?void 0:t.length)>0&&(null===(i=g.getFieldValue("standard_answers"))||void 0===i||null===(i=i.map((function(e){return e.score})))||void 0===i?void 0:i.filter((function(e){return e})));if((null==l?void 0:l.length)>0)g.setFieldsValue({question_score:(null==l?void 0:l.length)>0&&(null===(r=l.reduce((function(e,n){return e+n})))||void 0===r?void 0:r.toFixed(1))})}},onFinish:function(e){var n;c(r()(r()(r()({},t),e),{},{item_type:null==t?void 0:t.question_type,standard_answers:null===(n=e.standard_answers)||void 0===n?void 0:n.map((function(e,n){return r()(r()({},e),{},{position:n+1})})),hack_codes:r()(r()({},e.hack_codes),{},{code:gn.Base64.encode(e.hack_codes.code)}),standard_answer:void 0}))},onFinishFailed:function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),g.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,S.jsx)("span",{children:"程序填空题"})]}),1==(null==l||null===(n=l.exercise)||void 0===n?void 0:n.exercise_status)&&!(null!=t&&t.isadd)&&(0,S.jsxs)("span",{style:{marginLeft:20,marginRight:20,color:"red",cursor:"pointer"},onClick:function(){u()},children:[(0,S.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}})," 删除"]}),(0,S.jsx)(b.ZP,{onClick:function(){var e,n,i,s;t.isadd?(o(!1),h()):(g.setFieldsValue(r()(r()({},t),{},{standard_answers:t.standard_answer,difficulty:t.difficult,item_banks_group_id:t.item_banks_group_id,hack:r()(r()({},t),{},{sub_discipline_id:null==l||null===(e=l.exercise)||void 0===e?void 0:e.sub_discipline_id,tag_discipline_ids:[]}),hack_codes:{language:null==t||null===(n=t.program_attr)||void 0===n?void 0:n.language,code:gn.Base64.decode(null==t||null===(i=t.program_attr)||void 0===i?void 0:i.code)},hack_sets:r()({},null==t||null===(s=t.hack_sets)||void 0===s?void 0:s[0]),repeat_answer:!t.repeat_answer})),o(!1))},children:"取消"}),(0,S.jsx)(b.ZP,{className:"ml20",type:"primary",onClick:function(){g.submit()},children:"保存"})]}),(0,S.jsxs)("div",{style:{maxHeight:"70vh",overflowY:"auto",marginTop:"10px",paddingRight:"5px"},children:[(0,S.jsx)(re.Z,{text:"(小题分值等于各填空项分值之和)"}),(0,S.jsx)(Jn.t,{form:g,questionTitlePlaceholder:"请编辑程序填空题题干内容",scoreByBlank:!0,hackidentifier:null==t?void 0:t.hack_identifier,answerKey:"standard_answers"}),(0,S.jsx)(ne,{getTagData:p,qitem:t,exerciseitem:l,TagDiscipline:i,form:g})]})]})})},Xn=t(27065),$n=t(18122),et=t(83),nt=t(89392),tt=t(47754),it=k.Z.confirm,rt=[{name:"单选题",id:0,count:"q_singles",score:"q_singles_scores",nameType:"SINGLE"},{name:"多选题",id:1,count:"q_doubles",score:"q_doubles_scores",nameType:"MULTIPLE"},{name:"判断题",id:2,count:"q_judges",score:"q_judges_scores",nameType:"JUDGMENT"},{name:"填空题",id:3,count:"q_nulls",score:"q_nulls_scores",nameType:"COMPLETION"},{name:"简答题",id:4,count:"q_mains",score:"q_mains_scores",nameType:"SUBJECTIVE"},{name:"实训题",id:5,count:"q_shixuns",score:"q_shixuns_scores",nameType:"PRACTICAL"},{name:"编程题",id:6,count:"q_pros",score:"q_pros_scores",nameType:"PROGRAM"},{name:"组合题",id:7,count:"q_combinations",score:"q_combinations_scores",nameType:"COMBINATION"},{name:"程序填空题",id:8,count:"q_combinations",score:"q_combinations_scores",nameType:"BPROGRAM"}],lt=(0,h.connect)((function(e){return{user:e.user,dispatch:e.dispatch}}))((function(e){var n,t,i,l,o,c,u,p,x,_,y,w,N,C,Z,P,T=e.user,B=e.dispatch,A=e.itemid,E=e.setisedits,q=(e.setitemid,(0,m.useState)()),M=d()(q,2),L=M[0],O=M[1],U=(0,m.useState)(!1),J=d()(U,2),Q=J[0],X=J[1],$=(0,m.useState)(),ee=d()($,2),ne=ee[0],ie=ee[1],re=(0,m.useState)(),se=d()(re,2),ae=se[0],ce=se[1],de=(0,m.useRef)(),ue=(0,m.useRef)(),pe=(0,m.useState)(),me=d()(pe,2),he=me[0],fe=me[1],ve=(0,m.useState)(!1),xe=d()(ve,2),ge=xe[0],_e=xe[1],ye=(0,m.useState)(!1),je=d()(ye,2),be=je[0],we=je[1],ke=(0,m.useState)(),Ne=d()(ke,2),Ce=Ne[0],Ze=Ne[1],Se=(0,m.useState)(!1),Pe=d()(Se,2),Ie=Pe[0],Te=Pe[1],Be=(0,m.useState)(!1),Ae=d()(Be,2),Ee=Ae[0],qe=Ae[1],Me=(0,m.useState)(!1),Le=d()(Me,2),Oe=Le[0],Fe=Le[1],De=(0,m.useState)(!1),Ge=d()(De,2),Ve=Ge[0],We=Ge[1],He=(0,m.useState)(!1),Ue=d()(He,2),Ke=Ue[0],Ye=Ue[1],Je=(0,m.useState)(!1),Qe=d()(Je,2),Xe=Qe[0],$e=Qe[1],en=(0,h.useParams)(),nn=(0,m.useState)(!1),tn=d()(nn,2),rn=tn[0],ln=tn[1],sn=f.Z.useForm(),on=d()(sn,1)[0],an=(0,m.useState)(!1),cn=d()(an,2),dn=cn[0],un=cn[1],pn=(0,m.useRef)();(0,m.useEffect)((function(){A&&hn()}),[A]),(0,m.useEffect)((function(){E(be)}),[be]),(0,m.useEffect)((function(){null!=ne&&ne.question_id&&(ce(null==ne?void 0:ne.question_score),ue.current=null==ne?void 0:ne.question_id)}),[null==ne?void 0:ne.question_id]);var mn=function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B({type:"newExercisePaper/getTagDiscipline",payload:{sub_discipline_id:n}});case 2:t=e.sent,B({type:"globalSetting/footerToggle",payload:!1}),Ze(t);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();function hn(){return fn.apply(this,arguments)}function fn(){return(fn=a()(s()().mark((function e(){var n,t,i,l,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _e(!0),X(!0),e.next=4,B({type:"exercise/editExercise",payload:{categoryId:A}});case 4:l=e.sent,_e(!1),X(!1),O(l),Ye(!1),null!=l&&null!==(n=l.exercise)&&void 0!==n&&n.sub_discipline_id&&mn(null==l||null===(o=l.exercise)||void 0===o?void 0:o.sub_discipline_id),ie(r()(r()({},null==l||null===(t=l.exercise_question_types)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.items)||void 0===t?void 0:t[0]),{},{index:1})),fe(r()(r()({},null==l||null===(i=l.exercise_question_types)||void 0===i?void 0:i[0]),{},{indexs:1}));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vn(e){return xn.apply(this,arguments)}function xn(){return xn=a()(s()().mark((function e(n){var t,i,l,o,a,c,d,u,p,m=arguments;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(!(m.length>1&&void 0!==m[1])||m[1])&&(_e(!0),X(!0)),e.next=4,B({type:"exercise/editExercise",payload:{categoryId:A}});case 4:a=e.sent,O(a),c=[],null==a||null===(t=a.exercise_question_types)||void 0===t||t.map((function(e){var n;null==e||null===(n=e.items)||void 0===n||n.map((function(e,n){c.push(r()(r()({},e),{},{index:n+1}))}))})),d=null===(i=c.filter((function(e){return e.question_id===(null==n?void 0:n.id)})))||void 0===i?void 0:i[0],u=null==a||null===(l=a.exercise_question_types)||void 0===l?void 0:l.map((function(e,n){if((null==d?void 0:d.question_type)===(null==e?void 0:e.question_type))return r()(r()({},e),{},{indexs:n+1})})),p=null===(o=u.filter((function(e){return e})))||void 0===o?void 0:o[0],fe(r()({},p)),ie(r()({},d)),ce(null==d?void 0:d.question_score),_e(!1),X(!1),Ye(!1);case 17:case"end":return e.stop()}}),e)}))),xn.apply(this,arguments)}function gn(e){return _n.apply(this,arguments)}function _n(){return _n=a()(s()().mark((function e(n){var t,i,l,o,c;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r()(r()({},n),{},{repeat_answer:!n.repeat_answer,difficulty:(null==n?void 0:n.difficulty)||2,item_type:n.question_type,sub_discipline_id:null==L||null===(t=L.exercise)||void 0===t?void 0:t.sub_discipline_id,tag_discipline_ids:[],hack:r()(r()({},null==n?void 0:n.hack),{},{difficult:(null==n?void 0:n.difficulty)||2}),hack_identifier:sessionStorage.projectFill}),n.tag_discipline_ids&&(i.tag_discipline_ids=Array.isArray(n.tag_discipline_ids)?n.tag_discipline_ids:[n.tag_discipline_ids]),l=Ke?"/api/exercises/".concat(A,"/exercise_questions"):"/api/exercise_questions/".concat(null==n?void 0:n.question_id,".json"),1!==(null==n?void 0:n.is_my)){e.next=7;break}o=it({title:"提示",content:(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{children:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?"}),(0,S.jsx)("i",{className:"iconfont icon-guanbi",style:{position:"absolute",top:"20px",right:"20px",cursor:"pointer"},onClick:function(){o.destroy()}})]}),okText:"覆盖原题",cancelText:"不覆盖",keyboard:!1,onOk:function(){var e=a()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.is_cover=1,e.next=3,(0,I.ZP)(l,{method:Ke?"post":"PUT",body:r()({},i)});case 3:0===(null==(t=e.sent)?void 0:t.status)&&(we(!1),vn({id:(null==t?void 0:t.exercise_question_id)||(null==n?void 0:n.question_id)})),o.destroy();case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=a()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)(l,{method:Ke?"post":"PUT",body:r()({},i)});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(we(!1),vn({id:(null==t?void 0:t.exercise_question_id)||(null==n?void 0:n.question_id)})),o.destroy();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=11;break;case 7:return e.next=9,(0,I.ZP)(l,{method:Ke?"post":"PUT",body:r()({},i)});case 9:0===(null==(c=e.sent)?void 0:c.status)&&(we(!1),vn({id:(null==c?void 0:c.exercise_question_id)||(null==n?void 0:n.question_id)}));case 11:(0,W.Vf)("#question-scroll-id");case 12:case"end":return e.stop()}}),e)}))),_n.apply(this,arguments)}function yn(e){return wn.apply(this,arguments)}function wn(){return wn=a()(s()().mark((function e(n){var t,i,r,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return X(!0),e.next=3,(0,I.ZP)("/api/exercises/".concat(A,"/sort_question_type.json"),{method:"post",body:{question_type:n}});case 3:if(t=e.sent,X(!1),0!==(null==t?void 0:t.status)){e.next=12;break}return e.next=8,B({type:"exercise/editExercise",payload:{categoryId:A}});case 8:r=e.sent,O(r),Ye(!1),null!=r&&null!==(i=r.exercise)&&void 0!==i&&i.sub_discipline_id&&mn(null==r||null===(l=r.exercise)||void 0===l?void 0:l.sub_discipline_id);case 12:case"end":return e.stop()}}),e)}))),wn.apply(this,arguments)}var Cn=function(){var e=a()(s()().mark((function e(n,t){var i,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==n.length){e.next=4;break}return v.ZP.warning("请上传文件"),t(),e.abrupt("return");case 4:r={id:null==en?void 0:en.exerciseId,file:null===(i=n[0])||void 0===i?void 0:i.file},Sn(r,"".concat(Xn.Z.API_SERVER,"/api/courses/").concat(null==en?void 0:en.coursesId,"/exercises/import_exercise.json"),(function(e){if(0===(null==e?void 0:e.status)){var n,i={};null==e||null===(n=e.fail)||void 0===n||n.forEach((function(e){var n,t=null===(n=Object.keys(i))||void 0===n?void 0:n.includes(e.message);i[e.message]=t?i[e.message]+1:1}));var r="成功导入".concat(null==e?void 0:e.success,"条");Object.keys(i).forEach((function(e){r+=",".concat(e).concat(i[e],"条")})),v.ZP.success(r),Te(!1),hn()}-1===(null==e?void 0:e.status)&&(v.ZP.error(null==e?void 0:e.message),t())}));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Zn=function(){var e=a()(s()().mark((function e(n,t){var i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,et.zR)({score:(0,nt.round)(n,1),question_id:null==t?void 0:t.question_id});case 2:if(0!==(null==(i=e.sent)?void 0:i.status)){e.next=7;break}return v.ZP.success("修改成功"),vn({id:ue.current},!1),e.abrupt("return");case 7:-1===(null==i?void 0:i.status)&&ce(null==t?void 0:t.question_score);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Sn=function(e,n,t,i,r){var l=new FormData;Object.keys(e).forEach((function(n){l.append(n,e[n])}));var s=new window.XMLHttpRequest;return s.withCredentials=!0,s.addEventListener("load",(function(e){var n;t(JSON.parse(null==e||null===(n=e.target)||void 0===n?void 0:n.response))}),!1),s.addEventListener("error",(function(e){r&&r(e)}),!1),s.upload.onprogress=function(e){i&&i(e)},s.open("POST",n),s.send(l),s};function Pn(){return In.apply(this,arguments)}function In(){return In=a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k.Z.confirm({title:"提示",content:"确定要删除这个试题吗?",okText:"确定",centered:!0,className:V.modalconfirm,onOk:function(){var e=a()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ne.question_id){e.next=7;break}return e.next=3,(0,I.ZP)("/api/exercise_questions/".concat(ne.question_id,".json"),{method:"delete"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(hn(),we(!1)),e.next=10;break;case 7:ie({}),we(!1),hn();case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),cancelText:"取消"});case 1:case"end":return e.stop()}}),e)}))),In.apply(this,arguments)}var Tn=function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/exercises/".concat(A,"/select_questions.json"),{method:"post",body:r()({},n)});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Bn=(0,$n.I)(),An=Bn.overflow,En=Bn.handleMouseEnter,qn=Bn.handleMouseLeave,Mn=function(e){if(be)v.ZP.info("请先保存或取消当前正在编辑的试题。");else{if(Ye(!0),5===e)return Fe(!0),void We(!0);var n,t,i;if(6!==e)we(!0),ie(2===e?{question_type:e,isadd:!0,repeat_answer:!0,choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],question_choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],difficulty:2,standard_answers:[],question_score:"",question_title:"",tag_discipline_ids:[],analysis:""}:{question_type:e,question_choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),standard_answers:[],repeat_answer:!0,difficulty:2,isadd:!0,tag_discipline_ids:[],question_score:"",analysis:"",sub_item_banks:[],is_ordered:!0,question_title:"",use_keywords:!1,keywords:[],use_blank_score:!0,allow_student_debug:!1,submit_rule:1,downcase:!0,no_space:!0});else h.history.push("/problems/newcreate?difficult=".concat(null==L||null===(n=L.exercise)||void 0===n?void 0:n.difficulty,"&sub_discipline_id=").concat(null==L||null===(t=L.exercise)||void 0===t?void 0:t.sub_discipline_id,"&express_id=").concat(null==L||null===(i=L.exercise)||void 0===i?void 0:i.id,"&callback_url=/classrooms/").concat(en.coursesId,"/exercise/add/").concat(A,"?type=2"))}};return console.log(null==he?void 0:he.question_type,null==ne?void 0:ne.question_type),(0,S.jsxs)("div",{children:[(0,S.jsx)(D.Z,{spinning:ge,children:(0,S.jsxs)("div",{className:V.bg,children:[0===(null==L||null===(n=L.exercise_types)||void 0===n?void 0:n.q_counts)&&!be&&(0,S.jsx)(H.Z,{customText:"还没有试题,从底部操作栏来添加吧~"}),((null==L||null===(t=L.exercise_types)||void 0===t?void 0:t.q_counts)>0||be)&&(0,S.jsx)("div",{style:{textAlign:"center"},children:(0,S.jsxs)("div",{style:{marginTop:20,borderTop:"1px solid #DCDCDC",display:"block",alignItems:"stretch"},children:[(0,S.jsx)("div",{style:{backgroundColor:"#F6F7F9",display:"inline-block",position:"sticky",top:0},children:(0,S.jsx)(R.Z,{className:V.left,active:!0,loading:Q,children:(0,S.jsxs)("div",{className:V.left,children:[(0,S.jsx)("div",{className:V.leftAction,children:1===(null==L||null===(i=L.exercise)||void 0===i?void 0:i.exercise_status)&&(0,S.jsx)(b.ZP,{onClick:function(){be?v.ZP.info("请先保存或取消当前正在编辑试题。"):qe(!0)},className:V.Button,children:"批量设置分值"})}),(0,S.jsx)("div",{className:V.scrollWrapper,style:{overflow:An},onMouseEnter:En,onMouseLeave:qn,children:null==L||null===(l=L.exercise_question_types)||void 0===l?void 0:l.map((function(e,n){return(0,S.jsxs)("div",{className:"mb30",children:[(0,S.jsxs)("div",{className:V.title,children:[(0,S.jsxs)("div",{className:V.titleleft,children:[(0,S.jsxs)("span",{style:{color:"#000000",fontWeight:400,fontSize:12},children:[" ",(0,W.EM)(n+1),"、【",e.name,"】"]}),(0,S.jsxs)("span",{style:{color:"#464F66",fontSize:12},children:["(",e.count,"小题,共",e.score,"分)"]})]}),(0,S.jsx)(z.Z,{dropdownRender:function(){return function(e,n){return(0,S.jsxs)(F.Z,{children:[(0,S.jsx)(F.Z.Item,{onClick:function(){return Mn(null==e?void 0:e.question_type)},children:(0,S.jsx)("span",{className:V.moreSpan,children:"新增"})},"0"),(0,S.jsx)(F.Z.Item,{disabled:0===n,onClick:a()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==n){e.next=2;break}return e.abrupt("return");case 2:if(!be){e.next=5;break}return v.ZP.info("请先保存或取消当前正在编辑的试题。"),e.abrupt("return");case 5:return t=(0,W.rz)(null==L?void 0:L.exercise_question_types,n,n-1),e.next=8,yn(t.map((function(e){return e.name})));case 8:case"end":return e.stop()}}),e)}))),children:(0,S.jsx)("span",{className:V.moreSpan,children:"上移"})},"1"),(0,S.jsx)(F.Z.Item,{disabled:n===(null==L?void 0:L.exercise_question_types.length)-1,onClick:a()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n!==(null==L?void 0:L.exercise_question_types.length)-1){e.next=2;break}return e.abrupt("return");case 2:if(!be){e.next=5;break}return v.ZP.info("请先保存或取消当前正在编辑的试题。"),e.abrupt("return");case 5:return t=(0,W.rz)(null==L?void 0:L.exercise_question_types,n,n+1),e.next=8,yn(t.map((function(e){return e.name})));case 8:case"end":return e.stop()}}),e)}))),children:(0,S.jsx)("span",{className:V.moreSpan,children:"下移"})},"2"),(0,S.jsx)(F.Z.Item,{onClick:function(){var n;on.setFieldsValue({name:e.name,item_type_en:null===(n=rt.find((function(n){return n.id==e.question_type})))||void 0===n?void 0:n.nameType}),un(!0)},children:(0,S.jsx)("span",{className:V.moreSpan,children:"重命名"})},"3")]})}(e,n)},placement:"bottomLeft",children:(0,S.jsx)("div",{className:V.more_style,children:(0,S.jsx)("i",{className:"iconfont icon-sandian font12"})})})]}),(0,S.jsx)(Y,{isedit:be,setBigqitem:fe,bigitem:r()(r()({},e),{},{indexs:n+1}),setqitem:function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=de.current)||void 0===t||t.blur(),ie(n);case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),qitem:ne,Itemid:A,getdata:vn,data:e.items})]},n)}))})]})})}),(0,S.jsx)(R.Z,{className:V.right,active:!0,loading:ge,children:(0,S.jsxs)("div",{id:"question-scroll-id",className:V.right,children:[!(null!=ne&&ne.isadd)&&(0,S.jsxs)("div",{className:V.title,children:[!be&&(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsxs)("span",{style:{color:"#000000",fontWeight:600,fontSize:16},children:[" ",(null==he?void 0:he.indexs)&&(0,W.EM)(null==he?void 0:he.indexs),"、【",null==he?void 0:he.name,"】"]}),(0,S.jsx)(G.Z,{title:"编辑题型名称",children:(0,S.jsx)("i",{className:"".concat(V.edit," iconfont icon-bianji_Hover mr5 ml5 font18"),onClick:function(){var e;on.setFieldsValue({name:he.name,item_type_en:null===(e=rt.find((function(e){return e.id==he.question_type})))||void 0===e?void 0:e.nameType}),un(!0)}})}),(0,S.jsxs)("span",{style:{color:"#464F66",fontSize:16,fontWeight:400},children:["(",null==he?void 0:he.count,"小题,共",null==he?void 0:he.score,"分)"]})]}),(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[5===(null==ne?void 0:ne.question_type)&&!be&&(0,S.jsxs)("a",{className:V.shixun,href:"/shixuns/".concat(null==ne?void 0:ne.shixun_identifier,"/challenges?exercise=true"),target:"_blank",children:[(0,S.jsx)("i",{onClick:function(){},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"实训详情"]}),!be&&1==(null==L||null===(o=L.exercise)||void 0===o?void 0:o.exercise_status)&&[0,1,2,4,6].includes(null==ne?void 0:ne.question_type)&&(0,S.jsx)(f.Z.Item,{label:"分值",style:{margin:"0 20px"},required:!0,children:(0,S.jsx)(j.Z,{precision:1,ref:de,onChange:function(e){return ce(e)},value:ae,onBlur:function(e){Zn(e.target.value,ne)}})}),!be&&1==(null==L||null===(c=L.exercise)||void 0===c?void 0:c.exercise_status)&&(0,S.jsx)(G.Z,{title:"删除",children:(0,S.jsx)("i",{onClick:function(){Pn()},style:{marginRight:20},className:"".concat(V.delete," iconfont icon-shanchu13 mr8 ml8 ")})}),5!==(null==ne?void 0:ne.question_type)&&!be&&(0,S.jsxs)(S.Fragment,{children:[1==(null==ne?void 0:ne.is_my)&&(0,S.jsx)(G.Z,{title:"查看原题",children:(0,S.jsx)("i",{className:"".concat(V.yuanti," iconfont icon-chakanyuanti mr8 ml8"),onClick:function(){6==(null==ne?void 0:ne.question_type)?window.open("/problems/newedit/".concat(null==ne?void 0:ne.item_bank_hack_identifier)):8==(null==ne?void 0:ne.question_type)?window.open("/problemset/edit/".concat(null==ne?void 0:ne.item_bank_hack_identifier,"?type=1")):window.open("/problemset/edit/".concat(null==ne?void 0:ne.item_bank_id))}})}),(0,S.jsx)(G.Z,{title:"加入我的题库",children:(0,S.jsx)("i",{className:"".concat(V.tianjia," iconfont icon-jiarushitiku mr8 ml8"),onClick:function(){var e;pn.current=[],k.Z.confirm({centered:!0,width:500,okText:"确定",cancelText:"取消",title:"加入我的题库",maskClosable:!0,className:"custom-modal-divider",icon:null,content:(0,S.jsxs)("div",{className:"font14 ".concat(V.overflow),style:{maxHeight:500,overflow:"auto"},children:[(0,S.jsx)("p",{className:"c-grey-333",children:"请选择加入的文件夹"}),(0,S.jsx)(D.Z,{spinning:!1,children:(0,S.jsx)(tt.Z,{defaultValue:!0,value:pn.current,onChange:function(e){return pn.current=e}})})]}),onOk:(e=a()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,et.$l)({id:null==ne?void 0:ne.question_id,group_id:(null==pn||null===(n=pn.current)||void 0===n?void 0:n[0])||""}).then((function(e){0==(null==e?void 0:e.status)&&(v.ZP.success("加入成功"),hn())}));case 1:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}})})]}),!be&&(1==(null==L||null===(u=L.exercise)||void 0===u?void 0:u.exercise_status)||2==(null==L||null===(p=L.exercise)||void 0===p?void 0:p.exercise_status)&&15!=(null===(x=T.userInfo)||void 0===x||null===(x=x.course)||void 0===x?void 0:x.course_role)||3==(null==L||null===(_=L.exercise)||void 0===_?void 0:_.exercise_status)&&15!=(null===(y=T.userInfo)||void 0===y||null===(y=y.course)||void 0===y?void 0:y.course_role)||4==(null==L||null===(w=L.exercise)||void 0===w?void 0:w.exercise_status)&&15!=(null===(N=T.userInfo)||void 0===N||null===(N=N.course)||void 0===N?void 0:N.course_role))&&(0,S.jsx)(G.Z,{title:"编辑试题",children:(0,S.jsx)("i",{onClick:function(){6===(null==ne?void 0:ne.question_type)?h.history.push("/problems/newedit/".concat(null==ne?void 0:ne.hack_identifier,"?type=exercises&express_id=").concat(en.exerciseId,"&question_id=").concat(null==ne?void 0:ne.question_id,"&score=").concat(null==ne?void 0:ne.question_score,"&exercise=true&callback_url=/classrooms/").concat(en.coursesId,"/exercise/add/").concat(A,"?type=2")):we(!0)},className:"".concat(V.edit," iconfont icon-bianji_Hover ml8")})})]})]}),!be&&(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:V.qcount,children:[(0,S.jsxs)("span",{className:V.score,children:[null==ne?void 0:ne.question_score,"分"]}),(0,S.jsx)(K.Z,{className:V.qtitle,value:(null==ne?void 0:ne.index)+"、"+"".concat(8==(null==ne?void 0:ne.question_type)?null==ne||null===(C=ne.program_attr)||void 0===C?void 0:C.description:null==ne?void 0:ne.question_title)})]}),(0,S.jsx)(jn,{TagDiscipline:Ce,qitem:ne})]}),be&&(0,S.jsxs)("div",{children:[(null==ne?void 0:ne.question_type)<=1&&(0,S.jsx)(te,{deleteitem:Pn,getTagData:mn,seveeditor:gn,exerciseitem:L,TagDiscipline:Ce,setisedit:we,qitem:ne,init:hn}),5===(null==ne?void 0:ne.question_type)&&(0,S.jsx)(ze,{setqitem:ie,deleteitem:Pn,seveeditor:gn,exerciseitem:L,TagDiscipline:Ce,setisedit:we,qitem:ne}),3===(null==ne?void 0:ne.question_type)&&(0,S.jsx)(le,{deleteitem:Pn,getTagData:mn,seveeditor:gn,exerciseitem:L,TagDiscipline:Ce,setisedit:we,qitem:ne,init:hn}),2===(null==ne?void 0:ne.question_type)&&(0,S.jsx)(oe,{deleteitem:Pn,getTagData:mn,seveeditor:gn,exerciseitem:L,TagDiscipline:Ce,setisedit:we,qitem:ne,init:hn}),4===(null==ne?void 0:ne.question_type)&&(0,S.jsx)(kn,{deleteitem:Pn,getTagData:mn,seveeditor:gn,exerciseitem:L,TagDiscipline:Ce,setisedit:we,qitem:ne,init:hn}),7===(null==ne?void 0:ne.question_type)&&(0,S.jsx)(Re,{deleteitem:Pn,getTagData:mn,seveeditor:gn,exerciseitem:L,TagDiscipline:Ce,setisedit:we,qitem:ne,init:hn}),8===(null==ne?void 0:ne.question_type)&&(0,S.jsx)(Qn,{deleteitem:Pn,getTagData:mn,seveeditor:gn,exerciseitem:L,TagDiscipline:Ce,setisedit:we,qitem:ne,init:hn})]})]})})]})})]})}),(0,S.jsx)("div",{className:V.bottomdiv,children:(0,S.jsxs)("div",{className:V.exercise_styles,children:[1==(null==L||null===(Z=L.exercise)||void 0===Z?void 0:Z.exercise_status)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("span",{className:V.spanBtn,onClick:function(){be?v.ZP.info("请先保存或取消当前正在编辑的试题。"):(Fe(!0),We(!1))},children:"题库选题"}),(0,S.jsx)("span",{className:V.spanBtn,onClick:function(){be?v.ZP.info("请先保存或取消当前正在编辑的试题。"):Te(!0)},children:"导入试题"}),(0,S.jsx)("span",{className:V.spanBtn,onClick:a()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/exercises/".concat(null==en?void 0:en.exerciseId,"/simulate_start_answer.json"),{method:"get",params:{coursesId:null==en?void 0:en.coursesId,categoryId:null==en?void 0:en.exerciseId,is_reset:1}});case 2:-1!=(null==(n=e.sent)?void 0:n.status)&&window.open("/classrooms/".concat(null==en?void 0:en.coursesId,"/exercise/").concat(null==en?void 0:en.exerciseId,"/").concat(null===(t=T.userInfo)||void 0===t?void 0:t.login,"/initate_answer"));case 4:case"end":return e.stop()}}),e)}))),children:"模拟考试"}),(0,S.jsx)("span",{className:V.spanBtn,onClick:function(){window.open("/classrooms/".concat(null==en?void 0:en.coursesId,"/exercise/").concat(null==en?void 0:en.exerciseId,"/detail?random=false&tabs=2"))},children:"试卷预览"}),null==rt?void 0:rt.map((function(e){return(0,S.jsx)(b.ZP,{className:V.addQuestionBtn,type:"primary",onClick:function(){Mn(e.id)},children:e.name},e.id)}))]}),1!=(null==L||null===(P=L.exercise)||void 0===P?void 0:P.exercise_status)&&(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("span",{style:{width:"1022px"}})}),(0,S.jsxs)("span",{className:V.saveBtn,onClick:function(){var e;be?v.ZP.info("请先保存或取消当前正在编辑试题。"):1==(null==L||null===(e=L.exercise)||void 0===e?void 0:e.exercise_status)?$e(!0):h.history.back()},children:[(0,S.jsx)("i",{className:"iconfont icon-baocun1",style:{fontSize:15,marginRight:5}}),"保存试卷"]})]})}),(0,S.jsx)(Nn,{setScoreShow:qe,ScoreShow:Ee,exerciseitem:L,getdata:hn}),Oe&&(0,S.jsx)(Yn,{setScoreShow:Fe,isshixuns:Ve,isloadings:rn,ScoreShow:Oe,onOk:function(){var e=a()(s()().mark((function e(n,t,i,l,o){var c,d;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ln(!0),c={exam_id:A,item_bank_ids:n,shixun_ids:t,shixun_copy_ids:o},e.next=4,Tn(r()(r()({},c),{},{check_only:i}));case 4:if(d=e.sent,ln(!1),0!==(null==d?void 0:d.status)){e.next=14;break}return e.next=9,Tn(c);case 9:hn(),Fe(!1),v.ZP.info("添加成功"),e.next=15;break;case 14:-4===d.status&&k.Z.confirm({title:"提示",content:"当前已选择".concat(l,"道试题,已加入过的试题将不会重复加入"),onOk:function(){var e=a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Tn(c);case 2:Fe(!1),hn(),v.ZP.info("添加成功");case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 15:case"end":return e.stop()}}),e)})));return function(n,t,i,r,l){return e.apply(this,arguments)}}()}),(0,S.jsx)(bn.Z,{visible:Ie,onCancel:function(){return Te(!1)},onOk:Cn}),(0,S.jsx)(k.Z,{title:"提示",open:Xe,confirmLoading:!1,centered:!0,okText:"设置规则",cancelText:"修改试卷",footer:(0,S.jsxs)("div",{children:[(0,S.jsx)(b.ZP,{onClick:function(){$e(!1),h.history.back()},children:"稍后再说"}),(0,S.jsx)(b.ZP,{type:"primary",onClick:function(){h.history.push("/classrooms/".concat(null==en?void 0:en.coursesId,"/exercise/").concat(A,"/detail?random=",!1,"&tabs=3")),$e(!1)},children:"设置规则"})]}),onCancel:function(){$e(!1)},children:(0,S.jsx)("p",{children:"试卷创建完成!目前处于未发布状态,是否设置考试规则?"})}),(0,S.jsx)(k.Z,{centered:!0,title:"编辑题型名称",open:dn,width:500,onOk:function(){return on.submit()},onCancel:function(){return un(!1)},children:(0,S.jsxs)(f.Z,{form:on,initialValues:{},onFinish:function(){var e=a()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,et.RK)(r()({id:A},n));case 2:0==e.sent.status&&(v.ZP.success("修改成功"),hn(),un(!1));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,S.jsx)(f.Z.Item,{name:"name",style:{marginBottom:0},rules:[{required:!0,message:"请输入题型名称"},{whitespace:!0,message:"请勿输入空格"},{validator:function(e,n){var t,i,r=null==rt||null===(t=rt.find((function(e){return e.nameType==on.getFieldValue("item_type_en")})))||void 0===t?void 0:t.id;return null!=L&&null!==(i=L.exercise_question_types)&&void 0!==i&&null!==(i=i.filter((function(e){return e.question_type!=r})))&&void 0!==i&&null!==(i=i.map((function(e){return null==e?void 0:e.name})))&&void 0!==i&&i.includes(n)?Promise.reject(new Error("题型名称已存在,请勿设置相同的题型名称")):Promise.resolve()}}],children:(0,S.jsx)(g.Z,{size:"large",maxLength:10,showCount:!0})}),(0,S.jsx)(f.Z.Item,{hidden:!0,name:"item_type_en",children:(0,S.jsx)(g.Z,{size:"large"})})]})})]})})),st=t(40029),ot=t(57840),at=t(22061),ct=["classroomList","globalSetting","problemset","loading","exercise","user","dispatch"],dt=(0,h.connect)((function(e){var n=e.classroomList,t=e.loading,i=e.user,r=e.problemset;return{classroomList:n,globalSetting:e.globalSetting,problemset:r,user:i,exercise:e.exercise,loading:t.effects}}))((function(e){e.classroomList,e.globalSetting;var n,t,i,l,o,c,u,k,N=e.problemset,C=(e.loading,e.exercise),Z=e.user,T=e.dispatch,B=(p()(e,ct),(0,h.useParams)()),A=(0,m.useState)(!1),E=d()(A,2),q=(E[0],E[1]),M=Z.userInfo,L=f.Z.useForm(),F=d()(L,1)[0],D=(0,m.useState)({}),R=d()(D,2),z=R[0],G=R[1],V=(0,m.useState)(1),W=d()(V,2),H=W[0],U=W[1],K=(0,m.useState)(""),Y=d()(K,2),J=Y[0],Q=Y[1],X=(0,h.useSearchParams)(),$=d()(X,1)[0],ne=(0,m.useState)(!1),te=d()(ne,2),ie=te[0],re=te[1],le=(0,m.useState)(!1),se=d()(le,2),oe=se[0],ae=se[1],ce=(0,m.useState)(!1),de=d()(ce,2),ue=de[0],pe=de[1],me=(0,m.useState)(""),he=d()(me,2),fe=he[0],ve=he[1];function xe(){return(xe=a()(s()().mark((function e(n,t){var i,l,o,a,c,u,p,m,f;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F.validateFields();case 2:return i=F.getFieldsValue(),l=i.courseid,o=d()(l,2),o[0],a=o[1],i.sub_discipline_id=a,i.is_md=!0,i.time=parseInt(i.time)>9999?9999:i.time,e.next=10,T({type:"exercise/addExercise",payload:r()(r()({},i),B)});case 10:if(0!==(c=e.sent).status){e.next=21;break}return e.next=14,(0,I.ZP)("/api/courses/".concat(null==B?void 0:B.coursesId,"/exercises/notice_at.json"),{method:"POST",body:{course_id:null==B?void 0:B.coursesId,id:null==c||null===(u=c.data)||void 0===u?void 0:u.exercise_id,time:n}});case 14:ge(null===(p=c.data)||void 0===p?void 0:p.exercise_id),Q(null==c||null===(m=c.data)||void 0===m?void 0:m.exercise_id),U(2),re(!1),h.history.replace("/classrooms/".concat(B.coursesId,"/exercise/add/").concat(null===(f=c.data)||void 0===f?void 0:f.exercise_id,"?type=2")),e.next=22;break;case 21:v.ZP.error(c.message);case 22:t();case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ge(e){return _e.apply(this,arguments)}function _e(){return(_e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=z&&z.ec_point_ids){e.next=2;break}return e.abrupt("return");case 2:return delete(t=r()({},z)).id,e.next=6,(0,I.ZP)("/api/ec_courses/".concat(null==z?void 0:z.ec_course_id,"/ec_points/set_work_points.json"),{method:"post",body:r()({exercise_id:n},t)});case 6:e.sent;case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,m.useEffect)((function(){T({type:"problemset/getEditDisciplines",payload:{source:"new_question",identifier:null==B?void 0:B.coursesId}}),T({type:"globalSetting/footerToggle",payload:!1}),F.setFieldsValue({difficulty:2})}),[]),(0,m.useEffect)((function(){B.exerciseId&&a()(s()().mark((function e(){var n,t,i,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T({type:"exercise/editExercise",payload:{categoryId:B.exerciseId}});case 2:-1!==(null==(n=e.sent)?void 0:n.status)&&(2===(null==n||null===(t=n.exercise)||void 0===t?void 0:t.exercise_status)||3===(null==n||null===(i=n.exercise)||void 0===i?void 0:i.exercise_status)||4===(null==n||null===(r=n.exercise)||void 0===r?void 0:r.exercise_status)?pe(!0):pe(!1));case 4:case"end":return e.stop()}}),e)})))()}),[B]),(0,m.useEffect)((function(){if(B.exerciseId){var e,n,t=C.editData;F.setFieldsValue(r()(r()({},t.exercise),{},{courseid:[null==t||null===(e=t.exercise)||void 0===e?void 0:e.discipline_id,null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id]}))}}),[C]),(0,m.useEffect)((function(){"2"===$.get("type")&&(Q(B.exerciseId),U(2))}),[$.get("type")]),(0,m.useEffect)((function(){var e,n,t;null!=N&&null!==(e=N.disciplinesData)&&void 0!==e&&null!==(e=e.checked)&&void 0!==e&&e.sub_discipline_id&&F.setFieldsValue({courseid:[null==N||null===(n=N.disciplinesData)||void 0===n||null===(n=n.checked)||void 0===n?void 0:n.discipline_id,null==N||null===(t=N.disciplinesData)||void 0===t||null===(t=t.checked)||void 0===t?void 0:t.sub_discipline_id]})}),[null==N||null===(n=N.disciplinesData)||void 0===n?void 0:n.checked]),(0,S.jsx)("div",{style:{background:"#ffffff",marginTop:-8,padding:8,minHeight:"100vh",paddingBottom:64},children:(0,S.jsxs)("section",{className:"edu-container",children:[(0,S.jsx)("section",{className:"animated fadeIn",children:(0,S.jsx)("aside",{className:"mt10",children:M&&(0,S.jsxs)(x.Z,{separator:">",children:[(0,S.jsx)(x.Z.Item,{children:(0,S.jsx)(h.Link,{to:"/classrooms/".concat(B.coursesId,"/exercise"),children:null==M||null===(t=M.course)||void 0===t?void 0:t.course_name})}),(0,S.jsx)(x.Z.Item,{children:(0,S.jsx)(h.Link,{to:"/classrooms/".concat(B.coursesId,"/exercise"),children:"试卷列表"})}),(0,S.jsx)(x.Z.Item,{children:B.exerciseId?"编辑试卷":"新建试卷"})]})})}),B.exerciseId&&(0,S.jsxs)("div",{style:{display:"inline-flex",background:"rgba(233, 146, 55, 0.05)",borderRadius:4,height:40,lineHeight:"40px",width:"100%",padding:"0px 10px",alignItems:"center",marginTop:20},children:[(0,S.jsx)(ee.Z,{style:{marginRight:5,color:"#E99237"}}),(0,S.jsx)("span",{style:{flex:1,color:"#E99237"},children:"发布后的试卷不允许进行增加/删除试题和修改分值等操作,若需要二次使用,可将试卷加入试卷库中进行编辑"}),(0,S.jsx)("span",{className:w.addQuestionBtn,onClick:function(){T({type:"exercise/setActionTabs",payload:{key:"单个加入试卷库",selectArrs:[B.exerciseId]}})},children:"加入试卷库"})]}),(0,S.jsx)(at.Z,{haveInit:!0,init:function(){ve(new Date)}}),(0,S.jsxs)("div",{className:"bg-white",children:[(0,S.jsxs)("div",{style:{display:"flex",justifyContent:"center",paddingTop:20,alignItems:"center"},children:[(0,S.jsxs)("div",{onClick:function(){oe?v.ZP.info("请先保存或取消当前正在编辑试题。"):U(1)},className:1===H?w.selectdiv:w.divitem,children:[(0,S.jsx)(st.Z,{number:1,active:1===H,className:"mr10"}),(0,S.jsx)("span",{children:"试卷基础信息"})]}),(0,S.jsx)("div",{style:{width:188,border:"1px dotted #9096A3",margin:"0px 30px",height:1}}),(0,S.jsxs)("div",{onClick:function(){B.exerciseId||J?(U(2),J||Q(B.exerciseId)):v.ZP.info("请先保存基础信息再新建试题")},className:1!==H?w.selectdiv:w.divitem,children:[(0,S.jsx)(st.Z,{number:2,active:1!==H,className:"mr10"}),(0,S.jsx)("span",{children:"编辑试题"})]})]}),2===H&&(0,S.jsxs)("div",{className:"tc",children:[(0,S.jsx)(ot.Z,{defaultValue:null==C||null===(i=C.editData)||void 0===i||null===(i=i.exercise)||void 0===i?void 0:i.exercise_name,onFinish:function(){var e=a()(s()().mark((function e(n){var t,i,r,l,o,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.trim()!==(null==C||null===(t=C.editData)||void 0===t||null===(t=t.exercise)||void 0===t?void 0:t.exercise_name)){e.next=2;break}return e.abrupt("return",!0);case 2:return e.next=4,(0,et.wy)({exercise_name:n,exercise_description:null==C||null===(i=C.editData)||void 0===i||null===(i=i.exercise)||void 0===i?void 0:i.exercise_description,sub_discipline_id:null==C||null===(r=C.editData)||void 0===r||null===(r=r.exercise)||void 0===r?void 0:r.sub_discipline_id,time:null==C||null===(l=C.editData)||void 0===l||null===(l=l.exercise)||void 0===l?void 0:l.time,exerciseId:null===(o=C.editData)||void 0===o||null===(o=o.exercise)||void 0===o?void 0:o.id,difficulty:null===(a=C.editData)||void 0===a||null===(a=a.exercise)||void 0===a?void 0:a.difficulty});case 4:if(0!==e.sent.status){e.next=8;break}return F.setFieldValue("exercise_name",n),e.abrupt("return",!0);case 8:return e.abrupt("return",!1);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()}),(0,S.jsxs)("div",{style:{fontSize:14},children:[(0,S.jsxs)("span",{style:{color:"#5F6368"},children:["答题时长",(0,S.jsx)("span",{style:{color:"#000000",marginLeft:8},children:(null==C||null===(l=C.editData)||void 0===l||null===(l=l.exercise)||void 0===l?void 0:l.time)||"不限"})]}),(0,S.jsxs)("span",{style:{margin:"0px 30px",color:"#5F6368"},children:["难度",(0,S.jsx)("span",{style:{color:"#000000",marginLeft:8},children:1===(null==C||null===(o=C.editData)||void 0===o||null===(o=o.exercise)||void 0===o?void 0:o.difficulty)?"简单":2===(null==C||null===(c=C.editData)||void 0===c||null===(c=c.exercise)||void 0===c?void 0:c.difficulty)?"适中":"困难"})]}),(0,S.jsxs)("span",{style:{marginRight:30,color:"#5F6368"},children:["试题总数",(0,S.jsx)("span",{style:{color:"#000000",marginLeft:8},children:(null==C||null===(u=C.editData)||void 0===u||null===(u=u.exercise_types)||void 0===u?void 0:u.q_counts)||0})]}),(0,S.jsxs)("span",{style:{color:"#5F6368"},children:["总分",(0,S.jsx)("span",{style:{color:"#000000",marginLeft:8},children:null==C||null===(k=C.editData)||void 0===k||null===(k=k.exercise_types)||void 0===k?void 0:k.q_scores})]})]})]})]}),1===H&&(0,S.jsxs)("div",{children:[(0,S.jsxs)("section",{className:[w.bg,"mt20"].join(" "),style:{padding:"30px 120px 300px 120px"},children:[(0,S.jsxs)(f.Z,{form:F,colon:!1,layout:"horizontal",labelCol:{span:4},wrapperCol:{span:20},initialValues:{time:60},onFinish:function(){var e=a()(s()().mark((function e(n){var t,i,l,o,a,c,u,p,m;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(q(!0),re(!0),!B.exerciseId){e.next=13;break}return n.exerciseId=null===(t=C.editData)||void 0===t||null===(t=t.exercise)||void 0===t?void 0:t.id,n.sub_discipline_id=n.courseid[n.courseid.length-1],e.next=7,(0,et.wy)(r()({},n));case 7:return U(2),ge(null==B?void 0:B.exerciseId),Q(B.exerciseId),q(!1),re(!1),e.abrupt("return");case 13:return e.next=15,(0,I.ZP)("/api/courses/".concat(null==B?void 0:B.coursesId,"/exercises/overload_alert.json"),{method:"get",params:{course_id:null==B?void 0:B.coursesId}});case 15:if(null==(i=e.sent)||!i.alert){e.next=20;break}T({type:"classroomList/setActionTabs",payload:{key:"预约弹窗"}}),e.next=30;break;case 20:return l=n.courseid,o=d()(l,2),o[0],a=o[1],n.sub_discipline_id=a,n.is_md=!0,n.time=parseInt(n.time)>9999?9999:n.time,e.next=27,T({type:"exercise/addExercise",payload:r()(r()({},n),B)});case 27:0===(c=e.sent).status&&(ge(null===(u=c.data)||void 0===u?void 0:u.exercise_id),h.history.replace("/classrooms/".concat(B.coursesId,"/exercise/add/").concat(null===(p=c.data)||void 0===p?void 0:p.exercise_id,"?type=2")),Q(null==c||null===(m=c.data)||void 0===m?void 0:m.exercise_id),U(2)),re(!1);case 30:q(!1);case 31:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),className:w.formWrap,children:[(0,S.jsx)(f.Z.Item,{name:"exercise_name",label:"试卷名称",className:w.baseLineHeight,rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请输入试卷名称")}}],children:(0,S.jsx)(g.Z,{maxLength:60,className:w.baseFormItem,placeholder:"请输入试卷名称",showCount:!0})}),(0,S.jsx)(f.Z.Item,{label:"方向&课程",name:"courseid",rules:[{required:!0,message:"请选择方向&课程"}],className:w.baseLineHeight,children:(0,S.jsx)(_.Z,{disabled:ue,placeholder:"请选择方向&课程",options:N.courseOptions,className:w.baseFormItem,allowClear:!1,size:"large",popupClassName:w.cascaderPopup,dropdownMenuColumnStyle:{padding:"8px 12px",fontSize:14}})}),(0,S.jsx)(f.Z.Item,{label:"难度",name:"difficulty",className:w.radioBtnWrapper,rules:[{required:!0,message:"请选择难度"}],children:(0,S.jsxs)(y.ZP.Group,{className:w.radiogroup,disabled:ue,children:[(0,S.jsx)(y.ZP.Button,{className:w.easy,value:1,children:"简单"}),(0,S.jsx)(y.ZP.Button,{className:w.medium,value:2,children:"适中"}),(0,S.jsx)(y.ZP.Button,{className:w.hard,value:3,children:"困难"})]})}),(0,S.jsx)(f.Z.Item,{label:"答题时长",className:w.baseLineHeight,children:(0,S.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,S.jsx)(f.Z.Item,{name:"time",noStyle:!0,children:(0,S.jsx)(j.Z,{disabled:ue,min:1,max:9999,className:w.baseFormItem,style:{width:220},maxLength:60,placeholder:"请填写答题时长"})}),(0,S.jsx)("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"46px",fontSize:14},children:"分钟"})]})}),(0,S.jsx)(f.Z.Item,{label:"试卷须知",name:"exercise_description",children:(0,S.jsx)(g.Z.TextArea,{disabled:ue,rows:6,maxLength:65535,placeholder:"请在此输入本次试卷答题的相关说明,最大限制65535个字符"})})]}),(0,S.jsx)(O,{exercise_id:null==B?void 0:B.exerciseId,setitem:function(e){G(r()({},e))}})]}),(0,S.jsxs)("div",{className:w.bottmodiv,children:[(0,S.jsx)(b.ZP,{className:"".concat(w.cancelBtn),type:"primary",onClick:function(){h.history.back()},children:"取消"}),(0,S.jsx)(b.ZP,{loading:ie,onClick:function(){F.validateFields(),F.submit()},type:"primary",className:"".concat(w.confirmBtn," ml20"),children:"下一步"})]}),(0,S.jsx)(P,{setsubloading:re,onModalOk:function(e,n){return xe.apply(this,arguments)}})]}),2===H&&(0,S.jsx)("div",{children:(0,S.jsx)(lt,{setisedits:ae,setitemid:Q,itemid:J},fe)})]})})}))},91099:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var i=t(79800),r=t.n(i),l=t(59301),s=t(43418),o=t(46651),a=t(3113),c=t(27065),d=t(6457),u=t(7880),p="customModal___bVzUV",m="content___oKhZq",h="upload___nPxEL",f="infoText___gZEJF",v="okBtn___CVo2A",x="fileList___tauGN",g="fileName___T_8JX",_=t(37712),y=function(e){var n=e.visible,t=e.onOk,i=e.onCancel,y=(0,l.useState)([]),j=r()(y,2),b=j[0],w=j[1],k=(0,l.useState)(!1),N=r()(k,2),C=N[0],Z=N[1],S=(0,u.useParams)();(0,l.useEffect)((function(){n||(w([]),Z(!1))}),[n]);var P=function(){var e="".concat(c.Z.API_SERVER,"/api/courses/").concat(S.coursesId,"/exercises/down_template");(0,d.Nd)(null,e)},I=function(){w([])};return(0,_.jsx)(s.Z,{title:"导入试题",open:n,onOk:function(){Z(!0),t(b,(function(){Z(!1)}))},centered:!0,wrapClassName:p,onCancel:function(){i()},width:663,okText:"确认",okButtonProps:{className:v},cancelText:"取消",confirmLoading:C,children:(0,_.jsxs)("div",{className:m,children:[(0,_.jsxs)("aside",{children:[(0,_.jsx)("div",{style:{fontWeight:600},children:"步骤1"}),(0,_.jsxs)("ul",{children:[(0,_.jsxs)("li",{children:[(0,_.jsx)("span",{style:{color:"#5F6367"},children:"根据模板要求编辑需要上传的试题"}),(0,_.jsx)("span",{style:{color:"#0152d9",cursor:"pointer",marginLeft:20},onClick:P,children:"下载考试试题模板"}),(0,_.jsx)("i",{className:"iconfont icon-xiazai4 ml10",onClick:P,style:{fontSize:14,cursor:"pointer",color:"#0152d9"}})]}),(0,_.jsx)("li",{style:{color:"#FA6400"},className:"mt10",children:"提示"}),(0,_.jsx)("li",{className:f,children:"1、目前仅支持Excel格式模板; "}),(0,_.jsx)("li",{className:f,children:"2、不支持组合题和实训题导入;"}),(0,_.jsx)("li",{className:f,children:"3、每次最多导入300题;"}),(0,_.jsx)("li",{className:f,children:"4、填空题导入最多支持8个填空项。"})]})]}),(0,_.jsxs)("aside",{style:{marginTop:22},children:[(0,_.jsx)("div",{style:{fontWeight:600},children:"步骤2"}),(0,_.jsxs)("ul",{style:{flex:1},children:[(0,_.jsx)("li",{style:{color:"#5F6367"},children:"上传编辑好的试题文档,确定导入"}),n&&(0,_.jsx)(o.Z,{action:"".concat(c.Z.API_SERVER,"/api/attachments.json"),beforeUpload:function(e){var n={name:e.name,uid:e.uid,file:e};return w([n]),!1},onRemove:I,withCredentials:!0,fileList:b,accept:".xls,.xlsx",showUploadList:!1,children:(0,_.jsx)(a.ZP,{className:h,type:"primary",icon:(0,_.jsx)("i",{className:"iconfont icon-shangchuan3",style:{fontSize:14}}),children:"上传文件"})}),b.map((function(e,n){return(0,_.jsxs)("div",{className:x,children:[(0,_.jsx)("span",{className:g,children:null==e?void 0:e.name}),(0,_.jsx)("i",{className:"iconfont icon-shanchu12",style:{color:"#F65160",fontSize:16,cursor:"pointer"},onClick:I})]},n)}))]})]})]})})}},22061:function(e,n,t){"use strict";var i=t(7557),r=t.n(i),l=t(41498),s=t.n(l),o=t(79800),a=t.n(o),c=t(59301),d=t(43418),u=t(51136),p=t(7880),m=t(37712);n.Z=(0,p.connect)((function(e){return{exercise:e.exercise}}))((function(e){var n=e.exercise,t=e.dispatch,i=e.init,l=e.haveInit,o=void 0!==l&&l,h=(0,p.useParams)(),f=(0,c.useState)(!1),v=a()(f,2),x=v[0],g=v[1],_=(0,c.useState)(),y=a()(_,2),j=y[0],b=y[1],w=(0,c.useState)(!1),k=a()(w,2),N=k[0],C=k[1],Z=(0,c.useState)(!1),S=a()(Z,2),P=S[0],I=S[1];function T(){return(T=s()(r()().mark((function e(){var l,s,a,c;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.ZP)("/api/courses/".concat(null==h?void 0:h.coursesId,"/exercises/check_exercise_cover.json"),{method:"post",body:{check_ids:n.actionTabs.selectArrs}});case 2:if(!((null==(s=e.sent)||null===(l=s.cover_exercises)||void 0===l?void 0:l.length)>0)){e.next=8;break}g(!0),b(null==s||null===(a=s.cover_exercises)||void 0===a?void 0:a[0]),e.next=13;break;case 8:return e.next=10,(0,u.ZP)("/api/courses/".concat(null==h?void 0:h.coursesId,"/exercises/join_examination_banks.json"),{method:"post",body:{check_ids:n.actionTabs.selectArrs}});case 10:c=e.sent,t({type:"exercise/setActionTabs",payload:{key:""}}),0===(null==c?void 0:c.status)&&(o&&i(),d.Z.confirm({title:"提示",icon:null,centered:!0,content:"加入成功!试卷中新建的试题已为您自动同步至试题库~",okText:"前往试卷库",cancelText:"稍后再说",onOk:function(){p.history.push("/paperlibrary")}}));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,c.useEffect)((function(){"单个加入试卷库"===n.actionTabs.key&&function(){T.apply(this,arguments)}()}),[n.actionTabs]),(0,m.jsx)("div",{children:(0,m.jsx)(d.Z,{open:x,centered:!0,onCancel:function(){var e=s()(r()().mark((function e(l){var s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("覆盖原来的试卷"!==l.target.outerText){e.next=10;break}return C(!0),e.next=4,(0,u.ZP)("/api/courses/".concat(null==h?void 0:h.coursesId,"/exercises/join_examination_banks.json"),{method:"post",body:{check_ids:n.actionTabs.selectArrs,update:1}});case 4:s=e.sent,t({type:"exercise/setActionTabs",payload:{key:""}}),C(!1),0===(null==s?void 0:s.status)&&(o&&i(),g(!1),d.Z.confirm({title:"提示",icon:null,centered:!0,content:"加入成功!试卷中新建的试题已为您自动同步至试题库~",okText:"前往试卷库",cancelText:"稍后再说",onOk:function(){p.history.push("/paperlibrary")}})),e.next=11;break;case 10:g(!1);case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),cancelButtonProps:{loading:N},okText:"形成新试卷",cancelText:"覆盖原来的试卷",okButtonProps:{loading:P},onOk:s()(r()().mark((function e(){var l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,(0,u.ZP)("/api/courses/".concat(null==h?void 0:h.coursesId,"/exercises/join_examination_banks.json"),{method:"post",body:{check_ids:n.actionTabs.selectArrs}});case 3:l=e.sent,I(!1),0===(null==l?void 0:l.status)&&(o&&i(),t({type:"exercise/setActionTabs",payload:{key:""}}),g(!1),d.Z.confirm({title:"提示",icon:null,centered:!0,content:"加入成功!试卷中新建的试题已为您自动同步至试题库~",okText:"前往试卷库",cancelText:"稍后再说",onOk:function(){p.history.push("/paperlibrary")}}));case 6:case"end":return e.stop()}}),e)}))),title:"加入试卷库提示",children:(0,m.jsxs)("div",{children:[(0,m.jsx)("p",{children:"该试卷在试卷库重复,是否需要覆盖原来的试卷?"}),(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{children:["试卷:",null==j?void 0:j.origin_exercise_nam]}),(0,m.jsxs)("div",{children:["原试卷:",(0,m.jsx)("a",{href:"/paperlibrary/see/".concat(null==j?void 0:j.examination_bank_id,"?defaultActiveKey=0"),target:"_blank",children:null==j?void 0:j.examination_bank_name})]})]})]})})})}))},42541:function(e,n,t){"use strict";t.d(n,{h:function(){return i}});var i=function(e){return e[e.NOMATCH=-1]="NOMATCH",e[e.OK=0]="OK",e[e.TIMEOUT=2]="TIMEOUT",e[e.PODFAILURE=3]="PODFAILURE",e[e.COMPILEFAILURE=4]="COMPILEFAILURE",e[e.EXECUTEFAILURE=5]="EXECUTEFAILURE",e}({})},76039:function(e,n,t){"use strict";t.d(n,{H7:function(){return m},MK:function(){return p},MU:function(){return a},X6:function(){return d},bM:function(){return o},fi:function(){return h},fu:function(){return s},n4:function(){return f},rX:function(){return u},vl:function(){return v},zO:function(){return c}});var i=t(82242),r=t.n(i),l=t(51136);function s(e,n){return(0,l.U2)("myproblems/".concat(e,".json"),r()({hidePopLogin:!0},n||{}))}function o(e,n){return(0,l.v_)("myproblems/".concat(e,"/code_submit.json"),n)}function a(e,n){return(0,l.v_)("myproblems/".concat(e,"/code_debug.json"),n)}function c(e,n){return n.language&&(n.language=encodeURIComponent(n.language)),(0,l.U2)("myproblems/".concat(e,"/submit_records.json"),n)}function d(e){return(0,l.U2)("myproblems/record_detail.json",{id:e})}function u(e,n){return(0,l.U2)("myproblems/".concat(e,"/result.json"),{mode:n})}function p(e,n){return(0,l.v_)("myproblems/".concat(e,"/add_notes.json"),n)}function m(e,n){return(0,l.v_)("myproblems/".concat(e,"/restore_initial_code.json"),n)}function h(e){return(0,l.v_)("myproblems/".concat(e,"/sync_code.json"))}function f(e,n){return(0,l.v_)("myproblems/".concat(e,"/update_code.json"),n)}function v(e,n){return(0,l.v_)("discusses/".concat(e,"/plus.json"),n)}},57840:function(e,n,t){"use strict";var i=t(7557),r=t.n(i),l=t(41498),s=t.n(l),o=t(79800),a=t.n(o),c=t(59301),d=t(6848),u=t(98135),p=t(8591),m=t(89293),h=t(37712);n.Z=function(e){var n=e.defaultValue,t=e.onFinish,i=(0,c.useState)(!1),l=a()(i,2),o=l[0],f=l[1],v=(0,c.useState)(n),x=a()(v,2),g=x[0],_=x[1];return(0,c.useEffect)((function(){_(n)}),[n]),(0,h.jsx)("div",{children:o?(0,h.jsx)(u.Z,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:g,onChange:function(e){_(e.target.value)},onBlur:s()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==g||null===(n=g.replaceAll(" ",""))||void 0===n?void 0:n.length)<=0)){e.next=3;break}return p.ZP.error("试卷标题不能为空"),e.abrupt("return");case 3:return e.next=5,t(g);case 5:e.sent&&f(!1);case 7:case"end":return e.stop()}}),e)}))),onPressEnter:s()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==g||null===(n=g.replaceAll(" ",""))||void 0===n?void 0:n.length)<=0)){e.next=3;break}return p.ZP.error("试卷标题不能为空"),e.abrupt("return");case 3:return e.next=5,t(g);case 5:e.sent&&f(!1);case 7:case"end":return e.stop()}}),e)})))}):(0,h.jsxs)("div",{className:m.Z.title,children:[g,(0,h.jsx)(d.Z,{title:"编辑试卷名称",children:(0,h.jsx)("i",{className:"".concat(m.Z.editIcon," iconfont icon-bianji_Hover"),onClick:function(){return f(!0)}})})]})})}},18122:function(e,n,t){"use strict";t.d(n,{I:function(){return s}});var i=t(79800),r=t.n(i),l=t(59301),s=function(){var e=(0,l.useState)("hidden"),n=r()(e,2),t=n[0],i=n[1];return{overflow:t,handleMouseEnter:function(){return i("auto")},handleMouseLeave:function(){return i("hidden")}}}},28288:function(e,n,t){"use strict";t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},4505:function(e,n,t){"use strict";t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},5547:function(e,n){"use strict";n.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},89293:function(e,n){"use strict";n.Z={flex_box_center:"flex_box_center___ycN2f",flex_space_between:"flex_space_between___LcS9e",flex_box_vertical_center:"flex_box_vertical_center___uwjPm",flex_box_center_end:"flex_box_center_end___Pc903",flex_box_column:"flex_box_column___AXEdv",bg:"bg___fm2Cw",title:"title___J3MCU",editIcon:"editIcon___i4Zll",titleLeft:"titleLeft___da61c",titleRight:"titleRight___EsdL6",formWrap:"formWrap___YTxC3",baseLineHeight:"baseLineHeight___TprCB",radioBtnWrapper:"radioBtnWrapper___Mt_XG",radiogroup:"radiogroup___EvkWh",easy:"easy___mSxtg",medium:"medium___NIaWN",hard:"hard___mddnD",baseFormItem:"baseFormItem___csbyb",cascaderPopup:"cascaderPopup___BttnF",selectdiv:"selectdiv___TAr4i",divitem:"divitem___iaXB2",bottmodiv:"bottmodiv___bmp6p",cancelBtn:"cancelBtn___Q4ZcL",confirmBtn:"confirmBtn___nRiCD"}},66104:function(e,n,t){"use strict";t.d(n,{Z:function(){return I}});var i=t(92310),r=t.n(i),l=t(55401),s=t(87147),o=t(59301),a=t(92343),c=t(36355),d=t(43501),u=t(91857);const p=e=>{let{children:n}=e;const{getPrefixCls:t}=o.useContext(c.E_),i=t("breadcrumb");return o.createElement("li",{className:`${i}-separator`,"aria-hidden":"true"},""===n?n:n||"/")};p.__ANT_BREADCRUMB_SEPARATOR=!0;var m=p,h=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};function f(e,n,t,i){if(null==t)return null;const{className:l,onClick:a}=n,c=h(n,["className","onClick"]),d=Object.assign(Object.assign({},(0,s.Z)(c,{data:!0,aria:!0})),{onClick:a});return void 0!==i?o.createElement("a",Object.assign({},d,{className:r()(`${e}-link`,l),href:i}),t):o.createElement("span",Object.assign({},d,{className:r()(`${e}-link`,l)}),t)}function v(e,n){return(t,i,r,l,s)=>{if(n)return n(t,i,r,l);const o=function(e,n){if(void 0===e.title||null===e.title)return null;const t=Object.keys(n).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${t})`,"g"),((e,t)=>n[t]||e))}(t,i);return f(e,t,o,s)}}var x=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};const g=e=>{const{prefixCls:n,separator:t="/",children:i,menu:r,overlay:l,dropdownProps:s,href:a}=e;const c=(e=>{if(r||l){const t=Object.assign({},s);if(r){const e=r||{},{items:n}=e,i=x(e,["items"]);t.menu=Object.assign(Object.assign({},i),{items:null==n?void 0:n.map(((e,n)=>{var{key:t,title:i,label:r,path:l}=e,s=x(e,["key","title","label","path"]);let c=null!=r?r:i;return l&&(c=o.createElement("a",{href:`${a}${l}`},c)),Object.assign(Object.assign({},s),{key:null!=t?t:n,label:c})}))})}else l&&(t.overlay=l);return o.createElement(u.Z,Object.assign({placement:"bottom"},t),o.createElement("span",{className:`${n}-overlay-link`},e,o.createElement(d.Z,null)))}return e})(i);return null!=c?o.createElement(o.Fragment,null,o.createElement("li",null,c),t&&o.createElement(m,null,t)):null},_=e=>{const{prefixCls:n,children:t,href:i}=e,r=x(e,["prefixCls","children","href"]),{getPrefixCls:l}=o.useContext(c.E_),s=l("breadcrumb",n);return o.createElement(g,Object.assign({},r,{prefixCls:s}),f(s,r,t,i))};_.__ANT_BREADCRUMB_ITEM=!0;var y=_,j=t(17313),b=t(83116),w=t(37613);const k=e=>{const{componentCls:n,iconCls:t}=e;return{[n]:Object.assign(Object.assign({},(0,j.Wf)(e)),{color:e.itemColor,fontSize:e.fontSize,[t]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},(0,j.Qy)(e)),"li:last-child":{color:e.lastItemColor},[`${n}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${n}-link`]:{[`\n > ${t} + span,\n > ${t} + a\n `]:{marginInlineStart:e.marginXXS}},[`${n}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${t}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}};var N=(0,b.Z)("Breadcrumb",(e=>{const n=(0,w.TS)(e,{});return[k(n)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}))),C=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};function Z(e){const{breadcrumbName:n,children:t}=e,i=C(e,["breadcrumbName","children"]),r=Object.assign({title:n},i);return t&&(r.menu={items:t.map((e=>{var{breadcrumbName:n}=e,t=C(e,["breadcrumbName"]);return Object.assign(Object.assign({},t),{title:n})}))}),r}var S=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};const P=e=>{const{prefixCls:n,separator:t="/",style:i,className:d,rootClassName:u,routes:p,items:h,children:f,itemRender:x,params:_={}}=e,y=S(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:j,direction:b,breadcrumb:w}=o.useContext(c.E_);let k;const C=j("breadcrumb",n),[P,I]=N(C),T=function(e,n){return(0,o.useMemo)((()=>e||(n?n.map(Z):null)),[e,n])}(h,p);const B=v(C,x);if(T&&T.length>0){const e=[],n=h||p;k=T.map(((i,r)=>{const{path:l,key:a,type:c,menu:d,overlay:u,onClick:p,className:h,separator:f,dropdownProps:v}=i,x=((e,n)=>{if(void 0===n)return n;let t=(n||"").replace(/^\//,"");return Object.keys(e).forEach((n=>{t=t.replace(`:${n}`,e[n])})),t})(_,l);void 0!==x&&e.push(x);const y=null!=a?a:r;if("separator"===c)return o.createElement(m,{key:y},f);const j={},b=r===T.length-1;d?j.menu=d:u&&(j.overlay=u);let{href:w}=i;return e.length&&void 0!==x&&(w=`#/${e.join("/")}`),o.createElement(g,Object.assign({key:y},j,(0,s.Z)(i,{data:!0,aria:!0}),{className:h,dropdownProps:v,href:w,separator:b?"":t,onClick:p,prefixCls:C}),B(i,_,n,e,w))}))}else if(f){const e=(0,l.Z)(f).length;k=(0,l.Z)(f).map(((n,i)=>{if(!n)return n;const r=i===e-1;return(0,a.Tm)(n,{separator:r?"":t,key:i})}))}const A=r()(C,null==w?void 0:w.className,{[`${C}-rtl`]:"rtl"===b},d,u,I),E=Object.assign(Object.assign({},null==w?void 0:w.style),i);return P(o.createElement("nav",Object.assign({className:A,style:E},y),o.createElement("ol",null,k)))};P.Item=y,P.Separator=m;var I=P},25769:function(e,n,t){"use strict";var i=t(98040),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,l,s,o,a,c,d=!1;n||(n={}),t=n.debug||!1;try{if(s=i(),o=document.createRange(),a=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(i){if(i.stopPropagation(),n.format)if(i.preventDefault(),void 0===i.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var l=r[n.format]||r.default;window.clipboardData.setData(l,e)}else i.clipboardData.clearData(),i.clipboardData.setData(n.format,e);n.onCopy&&(i.preventDefault(),n.onCopy(i.clipboardData))})),document.body.appendChild(c),o.selectNodeContents(c),a.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(i){t&&console.error("unable to copy using execCommand: ",i),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),d=!0}catch(i){t&&console.error("unable to copy using clipboardData: ",i),t&&console.error("falling back to prompt"),l=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(l,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(o):a.removeAllRanges()),c&&document.body.removeChild(c),s()}return d}},83145:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=l(t(59301)),r=l(t(25769));function l(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function a(e,n){if(null==e)return{};var t,i,r=function(e,n){if(null==e)return{};var t,i,r={},l=Object.keys(e);for(i=0;i<l.length;i++)t=l[i],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)t=l[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function c(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function d(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function u(e,n){return!n||"object"!==s(n)&&"function"!=typeof n?m(e):n}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,n){return h=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},h(e,n)}function f(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var v=function(e){function n(){var e,t;c(this,n);for(var l=arguments.length,s=new Array(l),o=0;o<l;o++)s[o]=arguments[o];return f(m(t=u(this,(e=p(n)).call.apply(e,[this].concat(s)))),"onClick",(function(e){var n=t.props,l=n.text,s=n.onCopy,o=n.children,a=n.options,c=i.default.Children.only(o),d=(0,r.default)(l,a);s&&s(l,d),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(e)})),t}var t,l,s;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&h(e,n)}(n,e),t=n,l=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,["text","onCopy","options","children"]),r=i.default.Children.only(n);return i.default.cloneElement(r,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(t,!0).forEach((function(n){f(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(t).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},t,{onClick:this.onClick}))}}],l&&d(t.prototype,l),s&&d(t,s),n}(i.default.PureComponent);n.CopyToClipboard=v,f(v,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(e,n,t){"use strict";var i=t(83145).CopyToClipboard;i.CopyToClipboard=i,e.exports=i},98040:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],i=0;i<e.rangeCount;i++)t.push(e.getRangeAt(i));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},93314:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP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