You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Exerc...

1 line
267 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[14105,79817,4977],{3148:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var i=t(33614),r=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},s=t(1393),a=function(e,n){return r.createElement(s.Z,(0,i.Z)({},e,{ref:n,icon:o}))};var l=r.forwardRef(a)},72826:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var i=t(33614),r=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"},s=t(1393),a=function(e,n){return r.createElement(s.Z,(0,i.Z)({},e,{ref:n,icon:o}))};var l=r.forwardRef(a)},38229: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,o=!1,s=null,a=!1,l=null,c=null,u=0;u<arguments.length;u++){var d=arguments[u];if(null!==d)switch(_typeof(d)){case"number":n=d.toFixed(1);break;case"string":d.match(new RegExp("^[0-9]\\.[0-9]+$"))?n=d:s=d;break;case"object":void 0!==d.is3D?i=d:t=d;break;case"boolean":r=d,o=!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||o||(r=!0)),null!==s&&void 0===t.id&&(t.id=s);var p="",f=!1,m=null,h=null,v=null,g=!1,x=null,_=null,w=null;void 0!==t.height&&(t.height=Math.round(t.height)),void 0!==t.width&&(t.width=Math.round(t.width));var y=function(e){return parseFloat(e)>4?parseFloat(e):5};function b(){try{return window.self!==window.top}catch(e){return!0}}function j(){return(!t.hasOwnProperty("screenshotGenerator")||!t.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,n){c=e,M(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."):(l=e,q(e,n))},e.getHTML5CodebaseVersion=function(){return h},e.getParameters=function(){return t},e.setFontsCSSURL=function(e){w=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",o=t.id,s=!1,l=0;l<arguments.length;l++){var c=arguments[l];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?r=c:o=arguments[l]:"boolean"==typeof c?s=c:c instanceof HTMLElement&&(i=c)}function u(){if(a){r=I(r);var l=i||document.getElementById(o);if(l)if(e.removeExistingApplet(l,!1),void 0===t.width&&l.clientWidth&&(t.width=l.clientWidth),void 0===t.height&&l.clientHeight&&(t.height=l.clientHeight),t.width&&t.height||"html5"!==r||(delete t.width,delete t.height),m=r,"screenshot"===r)T(l,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())&&j()),c?(m="screenshot",P(l,t,s,r)):B(l,t,s)}else console.log("possibly bug on ajax loading? ")}else setTimeout(u,200)}u()},e.getViews=function(){return i},e.isJavaInstalled=function(){return!1};var k=function(n){var r=function(){t.onError&&t.onError(),R("Error: Fetching material (id "+t.material_id+") failed.",t)},o=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://"+o+"/api/proxy.php?path="+encodeURIComponent(s),(function(o){var s=JSON.parse(o),a=s.elements?s.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:s;if(a&&a.url){t.fileName=a.url,S(a.settings||{}),i.is3D=!0;var l="https://www.geogebra.org/images/";e.setPreviewImage(x||a.previewUrl,l+"GeoGebra_loading.png",l+"applet_play.png"),n()}else r()}),r)};function S(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 m},e.setPreviewImage=function(e,n,t){x=e,_=n,t},e.removeExistingApplet=function(e,n){var i;"string"==typeof e&&(e=document.getElementById(e)),m=null;var r=null;for(i=0;i<e.childNodes.length;i++){var o=e.childNodes[i],s=o.className;"applet_screenshot"===s?n?(o.style.display="block",m="screenshot"):o.style.display="none":"applet_scaler prerender"!==s&&(e.removeChild(o),r=s&&-1!=s.indexOf("appletParameters")?o.id:null,i--)}var a=void 0!==t.id?t.id:r,l=window[a];l&&"function"==typeof l.getBase64&&(l.remove(),window[a]=null)},e.refreshHitPoints=function(){if(y(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 N=function(e){return e&&"false"!==e},B=function(n,t,i){y(h)<=4.2&&(i=!0);var r=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==h||ggbHTML5LoadedCodebaseIsWebSimple&&!g)&&(r=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var o=document.createElement("div");o.classList.add("appletParameters","notranslate");var s=t.width,a=t.height;if(t.disableAutoScale=void 0===t.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():t.disableAutoScale,void 0!==t.width)if(y(h)<=4.4)N(t.showToolBar)&&(t.height-=7),N(t.showAlgebraInput)&&(t.height-=37),t.width<605&&N(t.showToolBar)&&(t.width=605,s=605);else{var u=100;(N(t.showToolBar)||N(t.showMenuBar))&&(t.hasOwnProperty("customToolBar")&&(t.customToolbar=t.customToolBar),u=N(t.showMenuBar)?245:155),s<u&&(t.width=u,s=u)}for(var d in o.style.border="none",o.style.display="inline-block",t)t.hasOwnProperty(d)&&"appletOnLoad"!==d&&o.setAttribute("data-param-"+d,t[d]);w&&o.setAttribute("data-param-fontscssurl",w),e.resize=function(){GGBAppletUtils.responsiveResize(n,t)},window.addEventListener("resize",(function(n){e.resize()}));var f="function"==typeof t.appletOnLoad?t.appletOnLoad:function(){};if(i||void 0===t.width){var m=document.createElement("div");m.className="applet_scaler",m.style.position="relative",m.style.display="block",m.appendChild(o),n.appendChild(m),t.appletOnLoad=function(n){e.resize(),f(n)}}else{t.hasOwnProperty("showSplash")||o.setAttribute("data-param-showSplash","false");var x=n.querySelector(".applet_scaler.prerender"),_=null!==x;if(_)b=x.querySelector(".ggb_preview");else{var b=Z(s,a,t.borderColor,!1);(x=document.createElement("div")).className="applet_scaler",x.style.position="relative",x.style.display="block",x.style.width=s+"px",x.style.height=a+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(x,"66%"),y(h)>=5?(t.appletOnLoad=function(e){var t=n.querySelector(".ggb_preview");t&&t.parentNode.removeChild(t),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(x),window.GGBT_wsf_view&&$(window).trigger("resize"),f(e)},_||x.appendChild(b)):o.appendChild(b),x.appendChild(o),_||n.appendChild(x),setTimeout((function(){e.resize()}),1)}function j(e,n){n&&"function"==typeof n.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,n.appletOnLoad):renderGGBElement(e),R("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){j(e.article,e.params)})),html5AppletsToProcess=null)},y(h)<5&&(e.className+=" geogebraweb")):j(e,n)}if(r){scriptLoadStarted=!0;for(var S=0;S<o.childNodes.length;S++){"TABLE"===o.childNodes[S].tagName&&(o.removeChild(o.childNodes[S]),S--)}if(null!==ggbHTML5LoadedScript){var C=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=C&&C.parentNode.removeChild(C)}var B=document.createElement("script"),T=function(){k(o,t)};B.src=p+v,ggbHTML5LoadedCodebaseIsWebSimple=g,ggbHTML5LoadedCodebaseVersion=h,ggbHTML5LoadedScript=B.src,R("GeoGebra HTML5 codebase loaded: '"+p+"'.",t),c||l&&"5.0"!=l?p.requirejs?__webpack_require__.e(43547).then(function(){var e=[__webpack_require__(43547)];T.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(B.onload=T,n.appendChild(B)):(g?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),T())}else k(o,t);t.height=a,t.width=s},T=function(n,t,i){var r=Z(t.width,t.height,t.borderColor,i),o=document.createElement("div");o.style.position="relative",o.style.display="block",o.style.width=t.width+"px",o.style.height=t.height+"px",o.className="applet_screenshot applet_scaler"+(i?" applet_screenshot_play":""),o.appendChild(r);var s=GGBAppletUtils.getScale(t,n,i);i?(n.appendChild(A()),window.GGBT_wsf_view||(n.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(o,"66%"),n.appendChild(o),1===s||isNaN(s)||(GGBAppletUtils.scaleElement(o,s),o.style.width=t.width+"px",o.style.height=t.height+"px",o.parentNode.style.width=t.width*s+"px",o.parentNode.style.height=t.height*s+"px"),e.resize=function(){E(n,r,o,i)},window.addEventListener("resize",(function(n){e.resize()})),e.resize()};function E(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 o=GGBAppletUtils.getScale(t,e,r);null!==i.parentNode&&(isNaN(o)||1===o?(GGBAppletUtils.scaleElement(i,1),i.parentNode.style.width=t.width+"px",i.parentNode.style.height=t.height+"px"):(GGBAppletUtils.scaleElement(i,o),i.parentNode.style.width=t.width*o+"px",i.parentNode.style.height=t.height*o+"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 P=function(e,n,t,i){T(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),o=document.getElementById("fullscreencontainer"),a=jQuery(e).find(".fullscreencontent");a.length>0?(r.remove(),a.attr("id","fullscreencontent").show(),jQuery(o).append(a),window.dispatchEvent(new Event("resize"))):B(r,n,!1),window.GGBT_wsf_view.launchFullScreen(o)}else m=i,B(e,n,!1);if(!window.GGBT_wsf_view)for(s=0;s<t.length;s++)e.removeChild(t[s])},o=e.getElementsByClassName("ggb_preview_play"),s=0;s<o.length;s++)o[s].addEventListener("click",r,!1),o[s].addEventListener("ontouchstart",r,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),j()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},A=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},Z=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 o="lightgrey";void 0!==t&&(o="none"===t?"transparent":t),r.style.border="1px solid "+o;var s,a,l,c=document.createElement("img");if((c.style.position="relative",c.style.zIndex="1000",c.style.top="-1px",c.style.left="-1px",null!==x&&c.setAttribute("src",x),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,(a=360)>e/4*3&&(a=e/4*3),l=a/5.8,s.setAttribute("src",_),s.setAttribute("width",a),s.setAttribute("height",l);var u=(e-a)/2,d=(n-l)/2;s.style.left=u+"px",s.style.top=d+"px",r.appendChild(s)}return r.appendChild(c),r},I=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},L=["web","webSimple","web3d","tablet","tablet3d","phone"],q=function(e,n){if(h=e,n)M(h,!0);else{var o,s,a=!r;if(a){var l=y(h);!isNaN(l)&&l<4.4&&(a=!1)}o="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=h.indexOf("//");for(var u in s=c>0?h:0===c?o+h:"https://www.geogebra.org/apps/5.2.814.0/",L)if(h.slice(-1*L[u].length)===L[u]||h.slice(-1*(L[u].length+1))===L[u]+"/")return void M(s,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!a||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||N(t.showToolBar)||N(t.showMenuBar)||N(t.showAlgebraInput)||N(t.enableRightClick)||t.appName&&"classic"!=t.appName?s+="web3d/":s+="webSimple/",M(s,!1)}},M=function(e,n){if(e.requirejs)p=e;else{"/"!==e.slice(-1)&&(e+="/"),p=e,null===n&&(n=-1===e.indexOf("http")),f=n,v="web.nocache.js",g=!1;var t=p.split("/");t.length>1&&(n||"webSimple"!==t[t.length-2]?L.indexOf(t[t.length-2])>=0&&(v=t[t.length-2]+".nocache.js"):(v="webSimple.nocache.js",g=!0)),t=e.split("/"),"test"===(h=t[t.length-3]).substr(0,4)?h=h.substr(4,1)+"."+h.substr(5,1):"war"!==h.substr(0,3)&&"beta"!==h.substr(0,4)||(h="5.0");var i=parseFloat(h);NaN!==i&&i<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+i+" is deprecated. Using version latest instead."),q("5.0",n))}},R=function(e,n){window.console&&window.console.log&&(!n||void 0===n.showLogging||n.showLogging&&"false"!==n.showLogging)&&console.log(e)};function D(){var e=n;null!==l?e=l:parseFloat(e)<5&&(e="5.0"),q(e,!1),null!==c&&M(c,f),a=!0}return void 0!==t.material_id?k(D):D(),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 o,s=void 0!==i&&i,a=null!=e.noScaleMargin&&e.noScaleMargin,l=(o=e.autoHeight)&&"false"!==o,c=function(e,n,t,i,r,o){var s=null;if(null!=o&&""!=o)for(var a=e.parentNode;null!=a;){if((" "+a.className+" ").indexOf(" "+o+" ")>-1){s=a;break}a=a.parentNode}var l=0,c=0,u=0,d=0,p=0,f=0,m=0;if(s)l=s.offsetWidth,c=Math.max(i?s.offsetWidth:0,s.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(l=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),u=l):(l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),e){var h=e.getBoundingClientRect();h.left>0&&h.left<=l&&(void 0===r||!r)&&("rtl"===document.dir?(p=l-h.width-h.left,f=u<=480?10:30):(f=h.left,p=u<=480?10:30),d=f+p)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(d=40,m=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(d=0,m=40))}return e&&((void 0===t||!t)&&n>0&&n+d<l?l=n:l-=d,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==t&&t||(c-=m)),{width:l,height:c}}(n,e.width,t,l,s&&window.GGBT_wsf_view||a,r),u=parseInt(c.width),d=e.width,p=e.height;if(void 0===d){var f=n.querySelector(".appletParameters");f&&(d=f.offsetWidth,p=f.offsetHeight)}var m=u/d,h=s?1:c.height/p;return void 0===t||t||(m=Math.min(1,m),h=Math.min(1,h)),Math.min(m,h)}function i(e,n,i){var r,o=1,s=!1;return e.hasOwnProperty("allowUpscale")&&(s=e.allowUpscale),e.hasOwnProperty("scale")&&(o=parseFloat(e.scale),(isNaN(o)||null===o||0===o)&&(o=1),o>1&&(s=!0)),n&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(s=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?o:(r=t(e,n,s,i,e.scaleContainerClass),!s||e.hasOwnProperty("scale")&&1!==o?Math.min(o,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,o=(t-i.height)/2;o<0&&(o=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=r<40?"40px":r+"px",e.style.top=o+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=o<40?"40px":o+"px",e.style.left=r+"px")}return{responsiveResize:function(t,o){var s=t.querySelector(".appletParameters");if(s){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(o.id!==s.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(t)}if(s.parentElement&&/fullscreen/.test(s.parentElement.className))return;var a=i(o,t);e()&&s.setAttribute("data-param-scale",a);for(var l=null,c=0;c<t.childNodes.length;c++)if(void 0!==t.childNodes[c].className&&t.childNodes[c].className.match(/^applet_scaler/)){l=t.childNodes[c];break}if(null!==l&&null!==l.querySelector(".noscale"))return;var u=void 0!==o.id?o.id:"ggbApplet",d=window[u];null!=d&&d.recalculateEnvironments||null===l||l.className.match(/fullscreen/)||(l.parentNode.style.transform="",isNaN(a)||1===a?(n(l,1),l.parentNode.style.width=o.width+"px",l.parentNode.style.height=o.height+"px"):(l.parentNode.style.width=o.width*a+"px",l.parentNode.style.height=o.height*a+"px",n(l,a))),"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=[],o=[];function s(e){var n=o[e](),t=i[e];if(n in t)return n;var s=[];for(var a in t)s[t[a]]=a;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 a=(e=Cb).indexOf(Db);-1!=a&&(t=parseInt(e.substring(a+P),$),e=e.substring(O,a))}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 o=i[r];t[o[O]]=o[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")})()},44177: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],o=n?"".concat(n,"/").concat(r.name):"".concat(r.name);t.push({title:r.name,type:r.type,isLeaf:"tree"!==r.type,key:o})}return t}function o(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&&o(r.children,n,t)}return e}function s(e,n,t){var i;return function(){var r=this,o=arguments,s=function(){i=null,t||e.apply(r,o)},a=t&&!i;clearTimeout(i),i=setTimeout(s,n),a&&e.apply(r,o)}}t.d(n,{Ax:function(){return o},Ds:function(){return s},KI:function(){return a},SI:function(){return r},f1:function(){return i}});var a=t(20817).Z.API_SERVER},6739:function(e,n,t){"use strict";t.d(n,{Z:function(){return g}});var i=t(82242),r=t.n(i),o=t(7557),s=t.n(o),a=t(41498),l=t.n(a),c=t(79800),u=t.n(c),d=t(39647),p=t.n(d),f=t(3113),m=t(59301),h=t(37712),v=["children"],g=function(e){var n=e.children,t=p()(e,v),i=(0,m.useState)(!1),o=u()(i,2),a=o[0],c=o[1];return(0,h.jsx)(f.ZP,r()(r()({},t),{},{loading:a,onClick:function(){var e=l()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c(!0),e.next=4,t.onClick(n);case 4:c(!1),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),c(!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),children:n}))}},99638:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var i=t(7557),r=t.n(i),o=t(41498),s=t.n(o),a=t(79800),l=t.n(a),c=t(59301),u=t(32007),d=t(8591),p=t(85750),f=t(1012),m=t(86054),h=t(47257),v=t.n(h),g="video___nn_cD",x=t(66481),_=t(37712),w=function(e,n){for(var t=e.split(","),i=t[0].match(/:(.*?);/)[1],r=atob(t[1]),o=r.length,s=new Uint8Array(o);o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:i})},y=(0,c.forwardRef)((function(e,n){var t=e.time,i=e.number,o=e.supportCamera,a=e.take_photo,h=e.isExercise,y=void 0===h||h,b=(e.update,e.onUserMediaLoaded),j=(0,c.useRef)(),k=(0,c.useRef)(),S=(0,u.useParams)(),C=(0,c.useState)([]),N=l()(C,2),B=N[0],T=N[1],E=(0,c.useState)(0),P=l()(E,2),A=P[0],Z=P[1],I=(0,c.useState)(""),L=l()(I,2),q=(L[0],L[1]),M=(0,c.useState)(),R=l()(M,2),D=R[0],O=R[1],F=(0,c.useState)(0),G=l()(F,2),z=G[0],H=G[1],W=function(){var e=s()(r()().mark((function e(n,t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,p.ZP)("/api/attachments.json",{method:"POST",body:{file_type:"base64",original_filename:n,file:t}}));case 1:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),U=function(){var e=s()(r()().mark((function e(n){var t,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(new Date).valueOf(),!n){e.next=8;break}return e.next=4,W("照片".concat(t),n);case 4:if((i=e.sent).status){e.next=8;break}return e.next=8,(0,x.Ju)({container_id:S.categoryId,container_type:"Exercise",attachment_id:null==i?void 0:i.id});case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){return Y(),function(){$(),V()}}),[]),(0,c.useEffect)((function(){2===A&&t&&i>0&&(K(),H(1))}),[t]),(0,c.useEffect)((function(){if(0!==z){if(2===z)clearInterval(D);else{var e=0,n=setInterval((function(){B.includes(e)&&J(),e++}),1e3);O(n)}return function(){return clearInterval(D)}}}),[z]),(0,c.useImperativeHandle)(n,(function(){return{handlePhoto:J,handleTakePhoto:X}}));var V=function(){H(2)},K=function(){var e=t/i,n=[];function r(e,n){return parseInt(Math.floor(Math.random()*(n-e+1))+e)}new Array(i).fill(0).map((function(t,i){a?n.push(r(e*i,e*(i+1))):0==i?n.push(0):n.push(r(e*i,e*(i+1)))})),B=n,T([].concat(n)),console.log(n)},Y=function(){void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var n=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return n?new Promise((function(t,i){n.call(navigator,e,t,i)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia({video:{width:640,height:480}}).then((function(e){Q.current=e,o&&o(2),Z(2),"srcObject"in j.current?j.current.srcObject=e:j.current.src=window.URL.createObjectURL(e),j.current.onloadedmetadata=function(e){j.current.play(),b&&b()},j.current.addEventListener("ended",(function(){console.log("播放结束"),V(),y&&d.ZP.error({content:"您已经关闭了摄像头请在10秒钟内恢复摄像头否则将推出考试",duration:10,key:9998})}),!1)})).catch((function(e){Z(1),o&&o(1),"Permission denied"===e.message||"NotAllowedError"===e.name?d.ZP.error("您已拒绝了获取摄像头"):d.ZP.error("摄像头获取失败,或您已拒绝了获取摄像头"),console.log("errname: "+e.name),console.log("err: "+e.message)}))},J=function(){try{k.current.width=j.current.videoWidth,k.current.height=j.current.videoHeight,k.current.getContext("2d").drawImage(j.current,0,0,k.current.width,k.current.height),q(k.current.toDataURL("image/png")),U(k.current.toDataURL("image/png")),ee(k.current.toDataURL("image/png"))}catch(e){}},X=function(){try{return k.current.width=j.current.videoWidth,k.current.height=j.current.videoHeight,k.current.getContext("2d").drawImage(j.current,0,0,k.current.width,k.current.height),k.current.toDataURL("image/png")}catch(e){}},Q=(0,c.useRef)(),$=function(){try{Q.current.getTracks().forEach((function(e){e.stop()})),j.current.srcObject=null}catch(e){}},ee=function(){var e=s()(r()().mark((function e(n){var t,i,o,s,a,l,c,u,d,h,g;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/buckets/get_upload_token.json",{method:"get"});case 2:(u=e.sent).data=JSON.parse((0,m.pe)(u.data)),d=(0,f.Z)(),h=new(v())({endpoint:null==u||null===(t=u.data)||void 0===t?void 0:t.end_point,region:null==u||null===(i=u.data)||void 0===i?void 0:i.region,accessKeyId:null==u||null===(o=u.data)||void 0===o?void 0:o.access_key_id,accessKeySecret:null==u||null===(s=u.data)||void 0===s?void 0:s.access_key_secret,bucket:null==u||null===(a=u.data)||void 0===a?void 0:a.bucket,stsToken:null==u||null===(l=u.data)||void 0===l?void 0:l.security_token}),g=w(n),h.multipartUpload("".concat(d,".png"),g,{timeout:1e4,partSize:10485760,callback:{url:null==u||null===(c=u.data)||void 0===c?void 0:c.callback_url,host:null==u?void 0:u.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&login="+S.login+"&container_id="+S.categoryId+"&container_type=Exercise"}}).then((function(e){console.log("result:",e)})).catch((function(e){console.log("err:",e)}));case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,_.jsx)(_.Fragment,{children:3!==A&&(0,_.jsxs)("aside",{className:g,id:"screenshot",children:[0===A&&(0,_.jsx)("span",{children:"正在开启摄像头..."}),1===A&&(0,_.jsx)("span",{children:"摄像头开启失败"}),2===A&&(0,_.jsxs)("div",{children:[(0,_.jsx)("video",{width:"288",ref:j,autoPlay:!0}),(0,_.jsx)("canvas",{style:{display:"none"},ref:k})]})]})})})),b=y},98812:function(e,n,t){"use strict";t.d(n,{X:function(){return l},y:function(){return a}});var i=t(79800),r=t.n(i),o=t(59301),s=t(8591),a=function(e){(0,o.useEffect)((function(){if(e){var n=function(e){"F12"===e.key&&(e.preventDefault(),console.log("F12被禁用"))},t=function(e){e.preventDefault()};return document.addEventListener("keydown",n),document.addEventListener("contextmenu",t),function(){document.removeEventListener("keydown",n),document.removeEventListener("contextmenu",t)}}}),[e])},l=function(){var e=(0,o.useState)(!1),n=r()(e,2),t=n[0],i=n[1],a=function(e){var n=e.keyCode,t=e.ctrlKey,i=e.metaKey;"paste"!==e.type&&(67!==n&&86!==n||!i&&!t)||(s.ZP.warning("老师已设置答题时不允许进行复制粘贴"),e.preventDefault(),e.stopPropagation())};return(0,o.useEffect)((function(){return t&&(window.addEventListener("keydown",a,!0),window.addEventListener("paste",a,!0)),function(){window.removeEventListener("keydown",a,!0),window.removeEventListener("paste",a,!0)}}),[t]),{setOpenDisableCopyAndPaste:i,disableCopyAndPaste:t}}},18433:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var i=t(7557),r=t.n(i),o=t(41498),s=t.n(o),a=t(79800),l=t.n(a),c=t(59301),u="imageDimensions___a7crR",d="img___Kroat",p="fullWidth___c492T",f=t(92310),m=t.n(f),h=t(71418),v=t(2859),g=t(85750),x=t(66621),_=t(37712),w=function(e){var n=e.data,t=e.className,i=e.fullWidth,o=e.style,a=void 0===o?{}:o,f=e.onClose,w=e.onOk,y=e.showFullTools,b=e.noAssociationId,j=(0,c.useRef)(null),k=(0,c.useRef)(null),S=(0,c.useRef)(null),C=(0,c.useRef)(null),N=(0,c.useState)(!1),B=l()(N,2),T=B[0],E=B[1],P=(0,c.useState)("正在加载中"),A=l()(P,2),Z=A[0],I=A[1];(0,c.useEffect)((function(){S.current||(S.current=document.createElement("style"),document.head.appendChild(S.current)),null!=n&&n.visible?(document.body.setAttribute("data-custom","y-hidden"),S.current.innerHTML=" html { overflow-y: hidden; }",null!=n&&n.src&&L()):(document.body.removeAttribute("data-custom"),S.current&&(document.head.removeChild(S.current),S.current=null))}),[null==n?void 0:n.visible]);var L=function(){var e=s()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(!0),I("正在加载中"),e.next=4,(0,x.ZJ)(null==n?void 0:n.src);case 4:t=e.sent,j.current.src="",j.current.src=t,j.current.onload=function(){M()},E(!1),I("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=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 E(!0),I("正在保存中"),e.next=4,(0,g.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,g.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&&w(),e.next=13;break;case 12:null!=i&&i.id&&w(i);case 13:E(!1),I("");case 15:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),M=function(){k.current=new v.hP(j.current),k.current.targetRoot=C.current,k.current.addEventListener("render",q),k.current.addEventListener("beforeclose",f),y&&(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;window.scrollTo(0,0),(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,_.jsx)(h.Z,{spinning:T,tip:Z,style:{position:"absolute"},children:(0,_.jsx)("div",{ref:C,className:m()(u,t,i?p:""),style:a,children:(0,_.jsx)("img",{className:d,ref:j})})})})}},36833:function(e,n,t){"use strict";var i=t(79800),r=t.n(i),o=t(59301),s=t(50129),a=(t(48136),t(97488)),l=t(43418),c=t(37712),u=(0,o.forwardRef)((function(e,n){var t=e.callback,i=e.width,u=e.onChange,d=e.disabled,p=e.readOnly,f=e.type,m=void 0===f?"":f,h=e.value,v=void 0===h?"":h,g=e.style,x=void 0===g?{}:g,_=(0,o.useRef)(),w=(0,o.useRef)(),y=(0,o.useState)(0),b=r()(y,2),j=b[0],k=b[1],S=(0,o.useState)(0),C=r()(S,2),N=C[0],B=C[1],T=(0,o.useState)(!1),E=r()(T,2),P=E[0],A=E[1],Z=function(){var e=document.createElement("div");e.innerHTML=_.current.getValue();var n=e.innerText;return t&&t(n),n};(0,o.useImperativeHandle)(n,(function(){return{getData:Z}}));var I=function(e,n,t,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&t>e||e>o-20&&t<e||n<20&&i>n||n>r-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,o.useEffect)((function(){P&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;k(n),B(t)}),0)}),[P]);return(0,c.jsxs)("div",{style:x,children:[(0,c.jsx)("div",{style:{width:i||"100%",position:"relative"},className:"".concat(s.Z.mathFillWrap," ").concat(d||p?"cursorDefault":""),onClick:function(){d||p||A(!0)},children:(0,c.jsx)("math-field",{disabled:d,locale:"zh_cn",class:"".concat(s.Z.mathField," ").concat(m),readOnly:p,placeholder:"请输入公式",ref:_,style:{width:"100%",fontSize:v?18:14},value:v||""})}),(0,c.jsx)(l.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:j,top:N},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-j,t=e.clientY-N;document.body.onmousemove=function(e){var i=e.clientX-n,r=e.clientY-t,o=document.getElementsByClassName("markdown-popup-form")[0],s=window.innerWidth-o.offsetWidth,a=window.innerHeight-o.offsetHeight;i=Math.max(0,Math.min(i,s)),r=Math.max(0,Math.min(r,a)),I(e.clientX,e.clientY,n,t)&&(k(i),B(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:P,onOk:function(){var e=w.current.getData();_.current.setValue(e),u(e),A(!1)},onCancel:function(){A(!1)},destroyOnClose:!0,className:"markdown-popup-form",children:(0,c.jsx)(a.Z,{value:v,ref:w,onChange:u,showSaveButton:!1})})]})}));n.Z=u},20301:function(e,n,t){"use strict";var i=t(82242),r=t.n(i),o=t(7557),s=t.n(o),a=t(41498),l=t.n(a),c=t(79800),u=t.n(c),d=t(32007),p=t(59301),f=t(8591),m=t(3113),h=t(43418),v=t(24334),g=t(85750),x=t(75136),_=t(76666),w=t(61186),y=t.n(w),b=t(37712);n.Z=function(e){var n=e.ButtonProps,t=e.ButtonText,i=e.form,o=e.answerKey,a=e.hackidentifier,c=void 0===a?"":a,w=e.items,j=void 0===w?{}:w,k=e.setIsSubmitCode,S=(0,p.useState)(!1),C=u()(S,2),N=C[0],B=C[1],T=(0,p.useState)(""),E=u()(T,2),P=E[0],A=E[1],Z=(0,d.useParams)(),I=(0,p.useState)({}),L=u()(I,2),q=L[0],M=L[1],R="edit"===Z.type;window.location.href.includes("problemset");function D(e,n){return O.apply(this,arguments)}function O(){return(O=l()(s()().mark((function e(n,t){var r,a,l,c,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.getFieldValue("hack_codes"),l=i.getFieldValue(o),a.code){e.next=5;break}return f.ZP.info("程序代码不能为空!"),e.abrupt("return");case 5:if(a.language){e.next=8;break}return f.ZP.info("编程语言不能为空!"),e.abrupt("return");case 8:if(!(l.length>0&&(null===(r=l.filter((function(e){return!e.answer_text})))||void 0===r?void 0:r.length)>0)){e.next=11;break}return f.ZP.info("填空项不能为空!"),e.abrupt("return");case 11:return c=a.code,l.length>0&&(null==l||l.map((function(e){c=e.multi_line?c.substring(0,c.indexOf("@▁▁@"))+e.answer_text+c.substring(c.indexOf("@▁▁@")+4):c.substring(0,c.indexOf("@▁@"))+e.answer_text+c.substring(c.indexOf("@▁@")+3)}))),e.next=15,(0,x.n4)(t,n||{code:v.Base64.encode(c),language:a.language,answers:null==l?void 0:l.map((function(e){return e.answer_text}))});case 15:return u=e.sent,e.abrupt("return",u);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e,n){return G.apply(this,arguments)}function G(){return(G=l()(s()().mark((function e(n,t){var i,r,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=j.userAnswer,r=v.Base64.decode(j.code),i.length>0&&(null==i||i.map((function(e){r=e.multi_line?r.substring(0,r.indexOf("@▁▁@"))+e.value+r.substring(r.indexOf("@▁▁@")+4):r.substring(0,r.indexOf("@▁@"))+e.value+r.substring(r.indexOf("@▁@")+3)}))),e.next=5,(0,x.n4)(t,n||{code:v.Base64.encode(r),language:j.language,answers:null==i?void 0:i.map((function(e){return e.value}))});case 5:return o=e.sent,e.abrupt("return",o);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(){return(new Date).getTime()}return(0,p.useEffect)((function(){(R||c)&&A(c||Z.id)}),[Z]),(0,p.useEffect)((function(){return function(){sessionStorage.removeItem("projectFill")}}),[]),(0,b.jsxs)("div",{children:[(0,b.jsx)(m.ZP,r()(r()({loading:N},n),{},{onClick:l()(s()().mark((function e(){var n,o,a,c,u,d,p,m,_,w,y,b,S,C;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("提交代码"!==t){e.next=21;break}if(B(!0),!N){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,(0,g.ZP)("/api/problems/".concat(P,"/start.json"),{method:"get"});case 6:return n=e.sent,e.next=9,F(null,null==n?void 0:n.identifier);case 9:if(0!==(null==(o=e.sent)?void 0:o.status)){e.next=18;break}return a=function(){var e=l()(s()().mark((function e(){var t,i,r,o,l,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.rX)(null==n?void 0:n.identifier,"submit");case 2:if(i=e.sent,r=i.status,i.message,o=i.data,l=z(),u=l-c>1e4*(null==j||null===(t=j.userAnswer)||void 0===t?void 0:t.length),0===r||u||setTimeout(a,1e3),!u){e.next=13;break}return h.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时",content:"请检查程序代码是否存在死循环"}),B(!1),e.abrupt("return");case 13:0===r&&(B(!1),M(o),2===o.status&&(B(!1),h.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"})));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),c=z(),e.next=15,(0,x.bM)(null==n?void 0:n.identifier,{});case 15:a(),e.next=19;break;case 18:B(!1);case 19:return k&&k(!0),e.abrupt("return");case 21:return u=!0,e.next=24,i.validateFields().then((function(){u=!1}),(function(e){var n,t;e.errorFields[0].name.includes("standard_answers")?f.ZP.error("填空项答案不能为空"):f.ZP.error(e.errorFields[0].errors[0]),0===(null===(n=e.errorFields)||void 0===n?void 0:n.length)&&(u=!1),i.scrollToField(null==e||null===(t=e.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"}),u=!0}));case 24:if(!u){e.next=26;break}return e.abrupt("return");case 26:if(B(!0),!N){e.next=29;break}return e.abrupt("return");case 29:if(d="",p=i.getFieldsValue(),P){e.next=40;break}return e.next=34,(0,g.ZP)("/api/problems.json",{method:"post",body:r()(r()({},p),{},{hack:r()(r()({},null==p?void 0:p.hack),{},{sub_discipline_id:null==p||null===(m=p.hack)||void 0===m||null===(m=m.sub_discipline_id)||void 0===m?void 0:m[1],difficult:p.difficulty,item_banks_group_id:p.item_banks_group_id}),hack_codes:r()(r()({},p.hack_codes),{},{code:v.Base64.encode(p.hack_codes.code)}),hack_sets:[r()({},p.hack_sets)],is_blank:!0})});case 34:d=e.sent,P=null===(_=d)||void 0===_?void 0:_.identifier,sessionStorage.projectFill=P,A(P),e.next=43;break;case 40:return e.next=42,(0,g.ZP)("/api/problems/".concat(P,".json"),{method:"put",body:r()(r()({},p),{},{hack:r()(r()({},null==p?void 0:p.hack),{},{sub_discipline_id:null==p||null===(w=p.hack)||void 0===w||null===(w=w.sub_discipline_id)||void 0===w?void 0:w[1],difficult:p.difficulty,item_banks_group_id:p.item_banks_group_id}),hack_codes:r()(r()({},p.hack_codes),{},{code:v.Base64.encode(p.hack_codes.code)}),update_hack_sets:[r()({},p.hack_sets)],is_blank:!0})});case 42:d=e.sent;case 43:return e.next=45,(0,g.ZP)("/api/problems/".concat(P,"/start.json"),{method:"get"});case 45:return y=e.sent,e.next=48,D(null,null==y?void 0:y.identifier);case 48:if(0!==(null==(b=e.sent)?void 0:b.status)){e.next=57;break}return S=function(){var e=l()(s()().mark((function e(){var n,t,i,r,o,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.rX)(null==y?void 0:y.identifier,"submit");case 2:if(t=e.sent,i=t.status,t.message,r=t.data,o=z(),a=o-C>1e3*(p.hack.time_limit+3)*(null==p||null===(n=p.standard_answers)||void 0===n?void 0:n.length),0===i||a||setTimeout(S,1e3),!a){e.next=13;break}return h.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"}),B(!1),e.abrupt("return");case 13:0===i&&(B(!1),M(r),2===r.status&&(B(!1),h.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"})));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=z(),e.next=54,(0,x.bM)(null==y?void 0:y.identifier,{});case 54:S(),e.next=58;break;case 57:B(!1);case 58:case"end":return e.stop()}}),e)}))),children:t})),(null==q?void 0:q.id)&&2!==q.status&&(0,b.jsx)(h.Z,{open:(null==q?void 0:q.id)&&2!==q.status,title:"运行结果",width:1100,footer:!1,onOk:function(){M({})},onCancel:function(){M({})},children:(0,b.jsxs)("div",{style:{maxHeight:600,overflow:"auto",marginBottom:15},children:[(0,b.jsxs)("div",{style:{marginBottom:20,display:"flex",justifyContent:"space-between",fontSize:14},children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"状态"}),(0,b.jsx)("span",{style:{marginLeft:12,color:0!==q.status&&"#E30000"},children:_.Im[q.status]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"提交时间"}),(0,b.jsx)("span",{style:{marginLeft:12},children:y()(q.created_at).format("YYYY-MM-DD HH:mm:ss")})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"语言"}),(0,b.jsx)("span",{style:{marginLeft:12},children:q.language})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"执行用时"}),(0,b.jsxs)("span",{style:{marginLeft:12},children:[q.execute_time,"ms"]})]})]}),(0,b.jsx)(_.Y4,r()({},q))]})})]})}},11533:function(e,n,t){"use strict";t.d(n,{Z:function(){return p}});t(59301);var i="result___gu5zt",r="title___xrnx2",o="left___IAxp9",s="leftNode___HL8fG",a="right___ZXYmw",l="rightNode___jYL5_",c=t(92310),u=t.n(c),d=t(37712),p=function(e){var n=e.className,t=e.style,c=void 0===t?{}:t,p=e.leftNode,f=e.leftTitle,m=void 0===f?"自测输入":f,h=e.rightNode,v=e.rightTitle,g=void 0===v?"运行结果":v;return(0,d.jsxs)("div",{className:u()(i,n),style:c,children:[(0,d.jsxs)("div",{className:o,children:[(0,d.jsxs)("div",{className:r,children:[(0,d.jsx)("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),(0,d.jsx)("span",{children:m})]}),(0,d.jsx)("div",{className:s,children:p})]}),(0,d.jsxs)("div",{className:a,children:[(0,d.jsxs)("div",{className:r,children:[(0,d.jsx)("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),(0,d.jsx)("span",{children:g})]}),(0,d.jsx)("div",{className:l,children:h})]})]})}},86054:function(e,n,t){"use strict";t.d(n,{cT:function(){return T},pe:function(){return B}});var i=t(37205),r=t.n(i),o=t(79800),s=t.n(o),a=t(39647),l=t.n(a),c=t(82242),u=t.n(c),d=t(7557),p=t.n(d),f=t(41498),m=t.n(f),h=t(59301),v=t(53326),g=t(8591),x=t(85750),_=t(28209),w=t.n(_),y=t(1012),b=t(32007),j=t(47257),k=t.n(j),S=t(37712),C=["user","cancelUpload"],N=v.Z.Dragger,B=function(e){var n=w().enc.Utf8.parse("bf3c199c2470cb477d907b1e0917c17b"),t=w().enc.Utf8.parse("5183666c72eec9e4"),i=w().AES.decrypt(e,n,{iv:t,mode:w().mode.CBC});return i.toString(w().enc.Utf8)},T=function(){var e=m()(p()().mark((function e(n,t,i){var r,o,s,a,l,c,d,f,m,h;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.file_name=n.name,e.next=3,(0,x.ZP)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return d=e.sent,console.log("decrypt(res.data):",B(d.data)),d.data=JSON.parse(B(d.data)),(f=n.name.split(".")).pop(),m=t.realFileName?f.join(""):(0,y.Z)(),h=new(k())({endpoint:null==d||null===(r=d.data)||void 0===r?void 0:r.end_point,region:null==d||null===(o=d.data)||void 0===o?void 0:o.region,accessKeyId:null==d||null===(s=d.data)||void 0===s?void 0:s.access_key_id,accessKeySecret:null==d||null===(a=d.data)||void 0===a?void 0:a.access_key_secret,bucket:null==d||null===(l=d.data)||void 0===l?void 0:l.bucket,stsToken:null==d||null===(c=d.data)||void 0===c?void 0:c.security_token}),e.abrupt("return",new Promise((function(e,r){var o;h.multipartUpload("".concat(m),new Blob([n],{type:n.type}),u()(u()({timeout:2e5,partSize:102400},i),{},{callback:{url:null==d||null===(o=d.data)||void 0===o?void 0:o.callback_url,host:null==d?void 0:d.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,x.rz)(t)}})).then((function(t){var i;n.response=null===(i=t.data)||void 0===i?void 0:i.data,e(null==t?void 0:t.data)})).catch((function(e){r(e),console.log("err:",e)}))})));case 11:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}();n.ZP=(0,b.connect)((function(e){var n=e.loading,t=e.globalSetting,i=e.user;return{globalSetting:t,loading:n.models.competitions,user:i}}))((function(e){var n,t=e.user,i=e.cancelUpload,o=l()(e,C),a=(0,h.useState)([]),c=s()(a,2),d=c[0],f=c[1],v=(0,h.useState)(),_=s()(v,2),w=_[0],b=_[1],j={onRemove:function(e){f(r()(d.filter((function(n){return n.name!==e.name})))),o.onChange(d.filter((function(n){return n.name!==e.name})))},disabled:o.disabled,multiple:!0,fileList:null==d?void 0:d.map((function(e){return e.file})),customRequest:function(){},beforeUpload:(n=m()(p()().mark((function e(n){var t;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.maxSize||1073741824,!d.filter((function(e){return e.name===n.name})).length){e.next=4;break}return g.ZP.info("".concat(n.name,"已存在,请重新选择")),e.abrupt("return");case 4:if(!((null==n?void 0:n.size)>t)){e.next=7;break}return g.ZP.info("文件超过".concat(t/1024/1024/1024,"GB不符合上传要求")),e.abrupt("return",!1);case 7:return d.push({name:n.name,file:n}),f(r()(d)),o.onChange(d),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},T=function(){var e=m()(p()().mark((function e(n,t){var i,s,a,l,c,u,m,h,v,_;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.file_name=n.name,m=n.name,e.next=4,(0,x.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if((h=e.sent).data=JSON.parse(B(h.data)),0===(null==h?void 0:h.status)){e.next=12;break}return d[d.findIndex((function(e){return e.name===m}))].status="error",d[d.findIndex((function(e){return e.name===m}))].file.status="error",o.onChange(d),g.ZP.warning("上传失败,请重新尝试"),e.abrupt("return");case 12:return w=new(k())({endpoint:null==h||null===(i=h.data)||void 0===i?void 0:i.end_point,region:null==h||null===(s=h.data)||void 0===s?void 0:s.region,accessKeyId:null==h||null===(a=h.data)||void 0===a?void 0:a.access_key_id,accessKeySecret:null==h||null===(l=h.data)||void 0===l?void 0:l.access_key_secret,bucket:null==h||null===(c=h.data)||void 0===c?void 0:c.bucket,stsToken:null==h||null===(u=h.data)||void 0===u?void 0:u.security_token}),console.log(n,"file"),b(w),(v=n.name.split(".")).pop(),_=t.realFileName?v.join("."):(0,y.Z)(),e.abrupt("return",new Promise((function(e,i){try{var s;w.multipartUpload("".concat(o.identifier,"/").concat(_).concat(m.indexOf(".")>-1?"."+m.split(".").pop():""),new Blob([n.file],{type:n.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,n,t){try{console.log("进度",e,n,t);var i=d.findIndex((function(e){return e.name===m}));d[i].file.percent=100*e,d[i].tempCheckpoint=n,f(r()(d))}catch(e){}},checkpoint:d[d.findIndex((function(e){return e.name===m}))].tempCheckpoint,callback:{customValue:{id:m+""},url:null==h||null===(s=h.data)||void 0===s?void 0:s.callback_url,host:null==h?void 0:h.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,x.rz)(t)}}).then((function(t){var i,r=d.findIndex((function(e){return e.name===m})),s="done";if(0===(null===(i=t.data)||void 0===i?void 0:i.status)){var a;n.response=null===(a=t.data)||void 0===a?void 0:a.data;var l=d.findIndex((function(e){return e.name===m}));d[l].status="done",d[l].file.status="done"}else{var c;g.ZP.warning(null===(c=t.data)||void 0===c?void 0:c.message),s="error"}d[r].status=s,d[r].file.status=s,o.onChange(d),e(null==t?void 0:t.data)})).catch((function(e){d[d.findIndex((function(e){return e.name===m}))].status="error",d[d.findIndex((function(e){return e.name===m}))].file.status="error",g.ZP.warning("上传失败,请重新尝试"),f(r()(d)),o.onChange(d),i(e),console.log("err:",e)}))}catch(e){}})));case 19:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();return(0,h.useEffect)((function(){d.every((function(e){return"done"===e||"error"===e}))&&o.onComplete(d)}),[d]),(0,h.useEffect)((function(){var e;i&&(null===(e=w)||void 0===e||e.cancel())}),[i]),(0,h.useEffect)((function(){o.uploading&&d.map(function(){var e=m()(p()().mark((function e(n){var r;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.status&&"error"!==n.status||i){e.next=6;break}return n.status="uploading",n.file.status="uploading",e.next=5,T(n,{login:null==t||null===(r=t.userInfo)||void 0===r?void 0:r.login,container_type:o.container_type,container_id:o.container_id,description:o.description,realFileName:o.realFileName});case 5:e.sent;case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}())}),[o.uploading]),(0,S.jsx)(N,u()(u()({},j),{},{height:o.height,className:o.className,children:(0,S.jsx)("p",{className:"ant-upload-hint",children:o.text||"拖拽文件或者点击上传"})}))}))},4469:function(e,n,t){"use strict";t.d(n,{h:function(){return g}});var i=t(82242),r=t.n(i),o=t(79800),s=t.n(o),a=t(59301),l=t(57809),c=t(78241),u=t(3113),d=t(89780),p=t.n(d),f=(t(24147),t(74794),t(37712)),m=l.default.Option,h={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 g(e){var n=e.value,t=e.onChange,i=e.mode,o=e.options,l=void 0===o?{}:o,c=(0,a.useRef)(),u=(0,a.useState)(),d=s()(u,2),m=d[0],h=d[1];return(0,a.useEffect)((function(){if(m){var e=function(e){var n=e.getValue();t&&t(n)};return m.on("change",e),function(){m.off("change",e)}}}),[m,t]),(0,a.useEffect)((function(){m&&m.setOption("mode",i)}),[m,i]),(0,a.useEffect)((function(){m&&(n===m.getValue()&&""!==n||setTimeout((function(){m.setValue(n||"")}),300))}),[m,n]),(0,a.useEffect)((function(){if(c.current&&!m){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},l));h(e)}}),[c.current,m]),(0,f.jsx)("div",{className:"my-codemirror-container",children:(0,f.jsx)("textarea",{ref:c})})}n.Z=function(e){var n=e.callback,t=e.onCancel,i=(0,a.useState)("python"),o=s()(i,2),d=o[0],p=o[1];return(0,f.jsxs)(c.Z,r()(r()({},h),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},style:{width:500},children:[(0,f.jsx)(c.Z.Item,{label:"代码语言",name:"language",children:(0,f.jsx)(l.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){p(v[e][1])},children:Object.keys(v).map((function(e){return(0,f.jsx)(m,{value:e,children:v[e][0]},e)}))})}),(0,f.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,f.jsx)(g,{mode:d})}),(0,f.jsxs)("div",{className:"flex-container flex-end",children:[(0,f.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(u.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},95992:function(e,n,t){"use strict";t.d(n,{Z:function(){return ye}});var i=t(91232),r=t.n(i),o=t(79800),s=t.n(o),a=t(85573),l=t.n(a),c=t(59301),u=t(89780),d=t.n(u),p=t(76374),f=(t(24147),t(6313),t(25717),t(99498),t(25419),t(67549),t(51150)),m=t(37712),h=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,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},v=t(82242),g=t.n(v),x=[{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,o=e.className,s=void 0===o?"":o,a=e.children;return(0,m.jsxs)("a",{title:t,className:s,onClick:function(){n(r)},children:[(0,m.jsx)("i",{className:"".concat(i)}),a]})}var w=function(e){var n=e.watch,t=e.showNullButton,i=e.showNullProgramButton,r=e.onActionCallback,o=e.fullScreen,s=e.insertTemp,a=e.hidetoolBar,l=e.extraUse,c=[].concat(x,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,m.jsxs)("ul",{className:"markdown-toolbar-container",children:[!a&&c.map((function(e,n){return(0,m.jsx)("li",{children:e.actionName?(0,m.jsx)(_,g()(g()({},e),{},{onActionCallback:r})):(0,m.jsx)("span",{className:"v-line"})},n)})),t?(0,m.jsx)("li",{children:(0,m.jsx)(_,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("li",{children:(0,m.jsx)(_,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,m.jsx)("li",{children:(0,m.jsx)(_,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,s&&(0,m.jsx)("li",{children:(0,m.jsx)(_,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(s),onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),l&&(0,m.jsx)("li",{children:l}),(0,m.jsx)("li",{className:"btn-full-screen",children:(0,m.jsx)(_,{icon:"".concat(o?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:o?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},y=t(81074),b=t(78241),j=t(92832),k=t(3113),S={labelCol:{span:4},wrapperCol:{span:20}},C=function(e){var n=e.callback,t=e.onCancel;return(0,m.jsxs)(b.Z,g()(g()({},S),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},style:{width:500},children:[(0,m.jsx)(b.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,m.jsx)(j.Z,{})}),(0,m.jsx)(b.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,m.jsx)(j.Z,{})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},N=t(4469),B=t(72952),T=t(95237),E=t(18433),P=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 o=i.toDataURL("image/png");return(0,m.jsx)(T.Z,{style:{height:"100vh"},children:(0,m.jsx)(E.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(e){n({src:e.url})},onClose:t})})},A=t(7557),Z=t.n(A),I=t(41498),L=t.n(I),q=t(37205),M=t.n(q),R=t(12378);function D(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(D,go.CommandHandler),D.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},D.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")},D.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")},D.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")},D.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")},D.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")}},D.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")}},D.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],o=r.actualBounds.y+r.actualBounds.height+e;t[i+1].move(new go.Point(r.actualBounds.x,o))}n.commitTransaction("align Column")},D.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],o=r.actualBounds.x+r.actualBounds.width+e;t[i+1].move(new go.Point(o,r.actualBounds.y))}n.commitTransaction("align Row")},D.prototype.canRotate=function(e){var n=this.diagram;return null!==n&&!n.isReadOnly&&!n.isModelReadOnly&&!(n.selection.count<1)},D.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())},D.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){D._assignZOrder(e,n.get(e.layer)+1)})),e.commitTransaction("pullToFront")},D.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){D._assignZOrder(e,n.get(e.layer)-1-D._findGroupDepth(e))})),e.commitTransaction("pushToBack")},D._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){D._assignZOrder(e,n+1,t)}))},D._findGroupDepth=function(e){if(e instanceof go.Group){var n=0;return e.memberParts.each((function(e){n=Math.max(n,D._findGroupDepth(e))})),n+1}return 0},D.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)}},D.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},D.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")},D.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))},D.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,o=n,s=0;s<i.length;s++){var a=i[s];if(a!==n&&a.canSelect()){var l=a.actualBounds.center,c=t.directionPoint(l),u=this._angleCloseness(c,e);if(u<=45){var d=t.distanceSquaredPoint(l);(d*=1+Math.sin(u*Math.PI/180))<r&&(r=d,o=a)}}}return o},D.prototype._angleCloseness=function(e,n){return Math.min(Math.abs(n-e),Math.min(Math.abs(n+360-e),Math.abs(n-360-e)))},D.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!==(o=n.findTreeParentNode())&&e.select(o)}else if("Up"===t.key){if(null!==(o=n.findTreeParentNode()))if((a=(s=this._sortTreeChildrenByY(o)).indexOf(n))>0){for(var i=s.elt(a-1);null!==i&&i.isTreeExpanded&&!i.isTreeLeaf;){i=this._sortTreeChildrenByY(i).last()}null!==i&&e.select(i)}else e.select(o)}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 o,s,a;if(null===(o=n.findTreeParentNode()))break;if((a=(s=this._sortTreeChildrenByY(o)).indexOf(n))<s.length-1){e.select(s.elt(a+1));break}n=o}}var l=e.selection.first();null!==l&&e.scrollToRect(l.actualBounds)}},D.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},D.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},D.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(D.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(D.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 O=D,F=(t(57193),t(85160)),G=t(43418),z=t(43604),H=t(85750),W="myPaletteDiv___Xjz2I",U="maxH60___Pd4Re";window.go=R;var V=function(e){var n=e.onCancel,t=e.callback,i=(0,c.useRef)(),r=(0,c.useRef)(),o=(0,c.useRef)(),a=(0,c.useRef)(!1),l=(0,c.useRef)(!1),u=(0,c.useState)(0),d=s()(u,2),p=d[0],f=d[1],h=function(){var e=L()(Z()().mark((function e(){var n,r;return Z()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.current.makeImage(),e.next=3,(0,H.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(){f(p+1)}),[]),(0,m.jsx)("div",{ref:l,className:a.current?"".concat(U," body-overflow-initial"):"body-overflow-initial",children:(0,m.jsx)(G.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!p,destroyOnClose:!0,maskClosable:!1,getContainer:l.current,rootClassName:"zIndex-9999",title:(0,m.jsxs)(T.Z,{children:[(0,m.jsx)(z.Z,{flex:1,children:"插入流程图"}),(0,m.jsx)(z.Z,{onClick:function(){a.current=!a.current,f(p+1)},children:(0,m.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:n,children:(0,m.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},children:[(0,m.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,m.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,m.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,m.jsx)("div",{style:{height:"calc(100% - 50px)"},className:W,ref:o})]}),(0,m.jsxs)("div",{style:{flex:1,position:"relative"},children:[(0,m.jsx)(F.FI,{initDiagram:function(){var e=R.GraphObject.make,n="#ff3333",t="#3358ff",s="#25ad23",a="#d533ff",l="#7d33ff",c="#ff6233",u="#ffffff",d="#000000",p="#fffcd5",f="#d5ebff",m="#f2dfe0",h="#a5d2fa",v="#cccccc",g="#b3e6b3",x="#fcbbbd";function _(n,t){var i=function(e,t){e.handled=!0,e.diagram.model.commit((function(i){var r=t.part.adornedPart,o=(new R.Point).setRectSpot(r.actualBounds,n);o.subtract(r.location),o.scale(2,2),o.x+=130*Math.sign(o.x),o.y+=130*Math.sign(o.y),o.add(r.location),o.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 a={from:r.key,to:i.getKeyForNodeData(s)};i.addLinkData(a);var l=e.diagram.findNodeForData(s);l.location=o,e.diagram.select(l),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(R.Shape,{figure:t,alignment:n,alignmentFocus:n.opposite(),width:n.equals(R.Spot.Top)||n.equals(R.Spot.Bottom)?25:18,height:n.equals(R.Spot.Top)||n.equals(R.Spot.Bottom)?18:25,fill:"orange",stroke:u,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 w(n){return e(R.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 y(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(R.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:y(t,n),contextClick:y(t,n)})}function j(){return[e("ContextMenuButton",e(R.Panel,"Horizontal",b(u,"fill"),b(p,"fill"),b(f,"fill"),b(m,"fill"))),e("ContextMenuButton",e(R.Panel,"Horizontal",b(v,"fill"),b(g,"fill"),b(h,"fill"),b(x,"fill")))]}function k(){return[e("ContextMenuButton",e(R.Panel,"Horizontal",b(d),b(s),b(t),b(n))),e("ContextMenuButton",e(R.Panel,"Horizontal",b(u),b(a),b(l),b(c)))]}function S(n,t){return t||(t="thickness"),e(R.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:y(t,n),contextClick:y(t,n)})}function C(n,t){return t||(t="dash"),e(R.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:y(t,n),contextClick:y(t,n)})}function N(){return[e("ContextMenuButton",e(R.Panel,"Horizontal",S(1),S(2),S(3),S(4))),e("ContextMenuButton",e(R.Panel,"Horizontal",C(null),C([2,4]),C([4,4])))]}function B(n,t){return t||(t="figure"),e(R.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:y(t,n),contextClick:y(t,n)})}function T(n){return e(R.Shape,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(n+4).toString()+" H3"})}function E(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(R.Shape,{geometryString:t,margin:2,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:y("dir",n),contextClick:y("dir",n)})}function P(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",R.Spot.stringify(R.Spot.AllSides)),(n?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(R.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 A(n,t){var i=0,r=R.Spot.RightSide;n.equals(R.Spot.Top)?(i=270,r=R.Spot.TopSide):n.equals(R.Spot.Left)?(i=180,r=R.Spot.LeftSide):n.equals(R.Spot.Bottom)&&(i=90,r=R.Spot.BottomSide),t||(i-=180);var o=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var i=n.part.adornedPart;e.set(i.data,t?"toSpot":"fromSpot",R.Spot.stringify(r)),(t?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(R.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:o,contextClick:o})}return i.current=new R.Diagram(r.current,{padding:20,grid:e(R.Panel,"Grid",e(R.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(R.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(O),"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(R.Node,"Auto",{locationSpot:R.Spot.Center,locationObjectName:"SHAPE",desiredSize:new R.Size(120,60),minSize:new R.Size(40,40),resizable:!0,resizeCellSize:new R.Size(10,10),rotatable:!0},new R.Binding("location","loc",R.Point.parse).makeTwoWay(R.Point.stringify),new R.Binding("desiredSize","size",R.Size.parse).makeTwoWay(R.Size.stringify),e(R.Shape,{name:"SHAPE",fill:u,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:R.Spot.AllSides,toSpot:R.Spot.AllSides},new R.Binding("figure"),new R.Binding("fill"),new R.Binding("stroke","borderColor"),new R.Binding("strokeWidth","thickness"),new R.Binding("strokeDashArray","dash")),e(R.Shape,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(R.TextBlock,{margin:1,textAlign:"center",overflow:R.TextBlock.OverflowEllipsis,editable:!0},new R.Binding("text").makeTwoWay(),new R.Binding("stroke","color"))),i.current.nodeTemplate.toolTip=e("ToolTip",e(R.Panel,"Vertical",{maxSize:new R.Size(200,NaN)},e(R.TextBlock,{font:"bold 10pt sans-serif",textAlign:"center"},new R.Binding("text")),e(R.TextBlock,{font:"10pt sans-serif",textAlign:"center"},new R.Binding("text","details")))),i.current.nodeTemplate.selectionAdornmentTemplate=e(R.Adornment,"Spot",e(R.Placeholder,{padding:10}),_(R.Spot.Top,"TriangleUp"),_(R.Spot.Left,"TriangleLeft"),_(R.Spot.Right,"TriangleRight"),_(R.Spot.Bottom,"TriangleDown"),w({alignment:new R.Spot(.75,0)})),i.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(R.Panel,"Horizontal",B("Rectangle"),B("RoundedRectangle"),B("Ellipse"),B("Diamond"))),e("ContextMenuButton",e(R.Panel,"Horizontal",B("Parallelogram2"),B("ManualOperation"),B("Procedure"),B("Cylinder1"))),e("ContextMenuButton",e(R.Panel,"Horizontal",B("Terminator"),B("CreateRequest"),B("Document"),B("TriangleDown"))),j(),k(),N()),i.current.groupTemplate=e(R.Group,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:R.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 R.Binding("location","loc",R.Point.parse).makeTwoWay(R.Point.stringify),e(R.Panel,"Auto",{name:"BODY"},e(R.Shape,{parameter1:10,fill:u,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:R.Spot.AllSides,toSpot:R.Spot.AllSides},new R.Binding("fill"),new R.Binding("stroke","color"),new R.Binding("strokeWidth","thickness"),new R.Binding("strokeDashArray","dash")),e(R.Placeholder,{background:"transparent",margin:20})),e(R.TextBlock,{alignment:R.Spot.Top,alignmentFocus:R.Spot.Bottom,font:"bold 12pt sans-serif",editable:!0},new R.Binding("text"),new R.Binding("stroke","color"))),i.current.groupTemplate.selectionAdornmentTemplate=e(R.Adornment,"Spot",e(R.Panel,"Auto",e(R.Shape,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(R.Placeholder,{margin:1.5})),w({alignment:R.Spot.TopRight,alignmentFocus:R.Spot.BottomRight})),i.current.groupTemplate.contextMenu=e("ContextMenu",j(),k(),N()),i.current.linkTemplate=e(R.Link,{layerName:"Foreground",routing:R.Link.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new R.Binding("fromSpot","fromSpot",R.Spot.parse),new R.Binding("toSpot","toSpot",R.Spot.parse),new R.Binding("fromShortLength","dir",(function(e){return e>=1?10:0})),new R.Binding("toShortLength","dir",(function(e){return e>=1?10:0})),new R.Binding("points").makeTwoWay(),e(R.Shape,{strokeWidth:2},new R.Binding("stroke","color"),new R.Binding("strokeWidth","thickness"),new R.Binding("strokeDashArray","dash")),e(R.Shape,{segmentIndex:0,segmentOffset:new R.Point(15,0),segmentOrientation:R.Link.OrientAlong,alignmentFocus:R.Spot.Right,figure:"circle",width:10,strokeWidth:0},new R.Binding("fill","color"),new R.Binding("visible","dir",(function(e){return 1===e}))),e(R.Shape,{segmentIndex:-1,segmentOffset:new R.Point(-10,6),segmentOrientation:R.Link.OrientPlus90,alignmentFocus:R.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new R.Binding("fill","color"),new R.Binding("visible","dir",(function(e){return e>=1})),new R.Binding("width","thickness",(function(e){return 7+3*e})),new R.Binding("height","thickness",(function(e){return 7+3*e})),new R.Binding("segmentOffset","thickness",(function(e){return new R.Point(-15,4+1.5*e)}))),e(R.Shape,{segmentIndex:0,segmentOffset:new R.Point(15,-6),segmentOrientation:R.Link.OrientMinus90,alignmentFocus:R.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new R.Binding("fill","color"),new R.Binding("visible","dir",(function(e){return 2===e})),new R.Binding("width","thickness",(function(e){return 7+3*e})),new R.Binding("height","thickness",(function(e){return 7+3*e})),new R.Binding("segmentOffset","thickness",(function(e){return new R.Point(-15,4+1.5*e)}))),e(R.TextBlock,{alignmentFocus:new R.Spot(0,1,-4,0),editable:!0},new R.Binding("text").makeTwoWay(),new R.Binding("stroke","color"))),i.current.linkTemplate.selectionAdornmentTemplate=e(R.Adornment,e(R.Shape,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:T(2)},new R.Binding("pathPattern","thickness",T)),w({alignmentFocus:new R.Spot(0,0,-6,-4)})),i.current.linkTemplate.contextMenu=e("ContextMenu",k(),N(),e("ContextMenuButton",e(R.Panel,"Horizontal",E(0),E(1),E(2))),e("ContextMenuButton",e(R.Panel,"Horizontal",e(R.Panel,"Spot",P(!1),A(R.Spot.Top,!1),A(R.Spot.Left,!1),A(R.Spot.Right,!1),A(R.Spot.Bottom,!1)),e(R.Panel,"Spot",{margin:new R.Margin(0,0,0,2)},P(!0),A(R.Spot.Top,!0),A(R.Spot.Left,!0),A(R.Spot.Right,!0),A(R.Spot.Bottom,!0))))),new R.Palette(o.current,{maxSelectionCount:1,linkTemplate:e(R.Link,{locationSpot:R.Spot.Center,selectionAdornmentTemplate:e(R.Adornment,"Link",{locationSpot:R.Spot.Center},e(R.Shape,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(R.Shape,{toArrow:"Standard",stroke:null}))},{routing:R.Link.AvoidsNodes,curve:R.Link.JumpOver,corner:5,toShortLength:4},new R.Binding("points"),e(R.Shape,{isPanelMain:!0,strokeWidth:2}),e(R.Shape,{toArrow:"Standard",stroke:null})),model:new R.GraphLinksModel([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(M()(R.Shape.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))}).nodeTemplate=e(R.Node,"Auto",{locationSpot:R.Spot.Center},new R.Binding("location","location",R.Point.parse).makeTwoWay(R.Point.stringify),e(R.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 R.Binding("stroke").makeTwoWay(),new R.Binding("fill").makeTwoWay(),new R.Binding("figure")),e(R.TextBlock,{margin:new R.Margin(5,5,3,5),font:"10pt sans-serif",minSize:new R.Size(16,16),maxSize:new R.Size(10,NaN),textAlign:"center",editable:!0},new R.Binding("key").makeTwoWay())),setTimeout((function(){i.current.grid=e(R.Panel,"Grid",e(R.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(R.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,m.jsx)("div",{ref:r})]})]}),(0,m.jsx)("div",{className:"tr",children:(0,m.jsx)(k.ZP,{size:"large",onClick:h,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},K=t(5112),Y=t(94001),J=K.ZP.Group,X={margin:"0 8px"},Q=function(e){var n=e.callback,t=e.onCancel;return(0,m.jsxs)(b.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,m.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,m.jsx)("span",{style:X,children:"单元格数:"}),(0,m.jsx)("span",{style:X,children:"行数"}),(0,m.jsx)(b.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,m.jsx)(Y.Z,{})}),(0,m.jsx)("span",{style:X,children:"列数"}),(0,m.jsx)(b.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,m.jsx)(Y.Z,{})})]}),(0,m.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,m.jsx)("span",{style:X,children:"对齐方式:"}),(0,m.jsx)(b.Z.Item,{name:"align",children:(0,m.jsxs)(J,{children:[(0,m.jsx)(K.ZP,{value:"default",children:(0,m.jsx)("i",{className:"fa fa-align-justify"})}),(0,m.jsx)(K.ZP,{value:"left",children:(0,m.jsx)("i",{className:"fa fa-align-left"})}),(0,m.jsx)(K.ZP,{value:"center",children:(0,m.jsx)("i",{className:"fa fa-align-center"})}),(0,m.jsx)(K.ZP,{value:"right",children:(0,m.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},$=t(78673),ee=t(38229),ne=t.n(ee),te=(0,c.forwardRef)((function(e,n){var t=e.use3d,i=e.width,r=e.height,o=e.callback,a=(e.showSaveButton,(0,c.useRef)()),l=(0,c.useRef)(),u=(0,c.useState)(!1),d=s()(u,2),p=d[0],f=d[1],h=(0,c.useRef)({id:a,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(){l.current=new(ne())(h.current,!0),window.onload=function(){l.current.inject("applet_container")}}),[]);var v=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return o&&o(e),e};return(0,c.useEffect)((function(){h.current.appName=p?"3D":"graphing",l.current.inject("applet_container")}),[p]),(0,c.useEffect)((function(){f(t)}),[t]),(0,c.useImperativeHandle)(n,(function(){return{getImgData:v}})),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:a}),(0,m.jsxs)(T.Z,{align:"middle",children:[(0,m.jsx)(z.Z,{flex:1,children:(0,m.jsx)($.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:p,onChange:function(e){return f(e)}})}),(0,m.jsx)(z.Z,{children:(0,m.jsx)(k.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),ie=t(97488),re=t(20817),oe=t(8591),se="link",ae="upload-image",le="add-flowchart",ce="draw-image",ue="code-block",de="add-table",pe="------------",fe={default:pe,left:":".concat(pe),center:":".concat(pe,":"),right:"".concat(pe,":")},me=t(12066);var he="@▁▁@",ve=["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 ge(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var xe=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",_e=l()(l()({},xe+"-B","bold"),xe+"-I","italic"),we=l()(l()(l()(l()(l()(l()(l()(l()({},se,"添加链接"),ue,"添加代码块"),ae,"添加图片"),ce,"添加画图"),le,"插入流程图"),de,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),ye=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,o=e.width,a=void 0===o?"100%":o,u=e.height,v=void 0===u?400:u,g=e.miniToolbar,x=void 0!==g&&g,_=e.isFocus,b=void 0!==_&&_,j=e.watch,k=e.insertTemp,S=e.mode,T=void 0===S?"markdown":S,E=e.id,A=void 0===E?"markdown-editor-id":E,Z=e.showResizeBar,I=void 0!==Z&&Z,L=e.noStorage,q=void 0!==L&&L,M=e.showNullButton,R=void 0!==M&&M,D=e.showNullProgramButton,O=void 0!==D&&D,F=e.hidetoolBar,z=void 0!==F&&F,H=e.fullScreen,W=void 0!==H&&H,U=e.onBlur,K=e.onCMBeforeChange,Y=e.onFullScreen,J=e.className,X=void 0===J?"":J,$=e.disablePaste,ee=void 0!==$&&$,ne=e.disabled,pe=void 0!==ne&&ne,xe=e.disabledFill,ye=void 0!==xe&&xe,be=e.placeholder,je=void 0===be?"":be,ke=e.values,Se=void 0===ke?"":ke,Ce=e.extraUse,Ne=(0,c.useState)(null),Be=s()(Ne,2),Te=Be[0],Ee=Be[1],Pe=(0,c.useState)(t),Ae=s()(Pe,2),Ze=Ae[0],Ie=Ae[1],Le=(0,c.useState)(j),qe=s()(Le,2),Me=qe[0],Re=qe[1],De=(0,c.useState)(W),Oe=s()(De,2),Fe=Oe[0],Ge=Oe[1],ze=(0,c.useState)(""),He=s()(ze,2),We=He[0],Ue=He[1],Ve=(0,c.useState)(0),Ke=s()(Ve,2),Ye=Ke[0],Je=Ke[1],Xe=(0,c.useState)(v),Qe=s()(Xe,2),$e=Qe[0],en=Qe[1],nn=(0,c.useState)(!1),tn=s()(nn,2),rn=(tn[0],tn[1]),on=(0,c.useState)(0),sn=s()(on,2),an=sn[0],ln=sn[1],cn=(0,c.useState)(0),un=s()(cn,2),dn=un[0],pn=un[1],fn=(0,c.useRef)(),mn=(0,c.useRef)(),hn=(0,c.useRef)(),vn=(0,c.useRef)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Ie(Se),null==Te||Te.setValue(Se),window.scrollTo(0,e)}),[Se]),(0,c.useEffect)((function(){null==Y||Y(Fe)}),[Fe]),(0,c.useEffect)((function(){if(fn.current){var e=function(e,t){if(!ee){var i=t.clipboardData;if(i){var r=i.types.toString(),o=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==T)return;try{var s,a=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(a=o[0]);var l=a.getAsFile(),c=l.name.split(".").pop();(0,B.I)(l,(function(e){var t,i,r;e.id?(null==l||null===(t=l.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==l||null===(i=l.type)||void 0===i?void 0:i.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(re.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==l||null===(r=l.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(re.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(l.type,'&disposition=inline" target="_blank">').concat(l.name,"</a>")):ve.includes(c)?n.replaceSelection('<a href="'.concat(re.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(l.name,"</a>")):n.replaceSelection("[".concat(l.name,"](").concat(re.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){oe.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=d().fromTextArea(fn.current,{mode:T,lineNumbers:!x,lineWrapping:!0,value:t,autoCloseTags:!0,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",je):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),o=r.charAt(i.ch-1),s=r.lastIndexOf("@▁@",i.ch),a=r.lastIndexOf("@▁▁@",i.ch),l=s>a?s:a,c=s>a?3:4;if(-1===he.indexOf(o))return null;if(console.log("change1:",n,e,r,i,l,s,a,o),l>=0&&i.ch-l<5){var u=l+c;return t.replaceRange("",{line:i.line,ch:l},{line:i.line,ch:u}),{line:i.line,ch:u}}return null}(e);t&&n.preventDefault()}})),b&&n.focus(),n.on("paste",e),pe&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),Ee(n),function(){n.off("paste",e)}}}),[]);var gn=(0,c.useCallback)((function(){mn.current}),[$e,mn,Fe]);(0,c.useEffect)((function(){if(Te){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(),Te.setSize("100%","100%"),Te.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(fn.current.parentElement),e}();return function(){var n,t;null!==(n=fn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=fn.current)||void 0===t?void 0:t.parentElement)}}}),[Te,gn]),(0,c.useEffect)((function(){if(Te){for(var e=[],n=function(){var n=s()(i[t],2),r=n[0],o=n[1],a=l()({},r,(function(){xn(o)}));e.push(a),Te.addKeyMap(a)},t=0,i=Object.entries(_e);t<i.length;t++)n();return function(){for(var n=0,t=e;n<t.length;n++){var i=t[n];Te.removeKeyMap(i)}}}}),[Te]),(0,c.useEffect)((function(){W!==Fe&&Ge(W)}),[W]),(0,me.Z)((function(){if(!q&&Ye>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(A);e>=Ye+1e4&&(!n||n!==Ze)&&(window.sessionStorage.setItem(A,Ze),rn(!0))}}),1e4),(0,c.useEffect)((function(){Re(j)}),[Te,j]),(0,c.useEffect)((function(){Te&&b&&Te.focus()}),[Te,b]),(0,c.useEffect)((function(){if(Me&&Te){var e=function(e){var n=e.target;if(vn.current){var t=n.scrollTop/n.scrollHeight;vn.current.scrollTop=vn.current.scrollHeight*t}},n=Te.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Te,Me]),(0,c.useEffect)((function(){if(Te&&K){var e=function(e,n){K(e,n)};return Te.on("beforeChange",e),function(){Te.off("beforeChange",e)}}}),[Te,K]),(0,c.useEffect)((function(){if(Te&&U){var e=function(){U(Te.getValue())};return Te.on("blur",e),function(){Te.off("blur",e)}}}),[Te,U]),(0,c.useEffect)((function(){if(Te){var e=function(e,n){var t=e.getValue();Ie(t),Je((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(O?i(t,jn(t)):i(t))};return Te.on("change",e),function(){Te.off("change",e)}}}),[Te,i]),(0,c.useEffect)((function(){if(Te)if(null==t)Te.setValue(""),Ie("");else{var e=window.scrollY||window.pageYOffset;t!==Te.getValue()&&(Te.setValue(t),Ie(t),Te.setCursor(pe?1:Te.lineCount(),0),window.scrollTo(0,e))}}),[Te,t]);var xn=(0,c.useCallback)((function(e){var n=Te.getCursor(),t=Te.getSelection(),i=t.split("\n");switch(e){case"bold":return Te.replaceSelection("**"+t+"**"),""===t&&Te.setCursor(n.line,n.ch+2),Te.focus();case"italic":return Te.replaceSelection("*"+t+"*"),""===t&&Te.setCursor(n.line,n.ch+1),Te.focus();case"code":return Te.replaceSelection("`"+t+"`"),""===t&&Te.setCursor(n.line,n.ch+1),Te.focus();case"inline-latex":return Ue("inline-latex"),Te.focus();case"latex":return Te.replaceSelection("```latex\n"+t+"\n```"),Te.setCursor(n.line+1,t.length+1),Te.focus();case"line-break":return Te.replaceSelection("<br/>\n"),Te.focus();case"list-ul":return""===t?Te.replaceSelection("- "+t):Te.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Te.focus();case"list-ol":return""===t?Te.replaceSelection("1. "+t):Te.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Te.focus();case"add-null-ch":return""===t&&Te.setCursor(n.line,n.ch),Te.replaceSelection("▁"),Te.focus();case"add-signal":return""===t&&Te.setCursor(n.line,n.ch),Te.replaceSelection("@▁@"),Te.focus();case"add-multiple":return""===t&&Te.setCursor(n.line,n.ch),Te.replaceSelection(he),Te.focus();case"inster-template-1":return""===t&&Te.setCursor(n.line,n.ch),Te.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Te.focus();case"eraser":return Te.setValue(""),Te.focus();case"trigger-watch":return Re(!Me),Te.focus();case"trigger-full-screen":return Ge(!Fe),Te.focus();case se:return void Ue(se);case ue:return void Ue(ue);case ae:return void Ue(ae);case ce:return void Ue(ce);case"maths-latex":return void Ue("maths-latex");case le:return void Ue(le);case de:return void Ue(de);default:throw new Error}}),[Te,Me,Fe]),_n=(0,c.useCallback)((function(e,n){var t,i,r,o,s;switch(Ue(""),We){case se:var a=e.title,l=e.link;return Te.replaceSelection("[".concat(a,"](").concat(l,")")),Te.focus();case ue:var c=e.language,u=e.content;return Te.replaceSelection(["```"+c,u,"```"].join("\n")),Te.focus();case"maths-latex":for(var d=atob(e),p=new Uint8Array(d.length),f=0;f<d.length;f++)p[f]=d.charCodeAt(f);var m=new Blob([p],{type:"image/png"});(0,B.I)(m,(function(e){e.id?Te.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":Te.replaceSelection("`$$"+e+"$$`");break;case ae:case ce:case"add-flowchart":var h=e.src,v=e.alt,g=n,x=null==g||null===(t=g.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==g||null===(r=g.type)||void 0===r?void 0:r.indexOf("image"))>-1||null==g||!g.type?v?Te.replaceSelection("![ ".concat(v," ]( ").concat(h,' "').concat(v,'" )')):Te.replaceSelection("![,](".concat(h,")")):(null==g||null===(o=g.type)||void 0===o?void 0:o.indexOf("video"))>-1?Te.replaceSelection('<video width="100%" controls src="'.concat(re.Z.API_SERVER).concat(h,'"></video>')):(null==g||null===(s=g.type)||void 0===s?void 0:s.indexOf("pdf"))>-1?Te.replaceSelection('<a href="'.concat(re.Z.API_SERVER).concat(h,"?type=").concat(g.type,'&disposition=inline" target="_blank">').concat(g.name,"</a>")):ve.includes(x)?Te.replaceSelection('<a href="'.concat(re.Z.API_SERVER).concat(h,'?type=office&disposition=inline" target="_blank">').concat(g.name,"</a>")):Te.replaceSelection("[".concat(g.name,"](").concat(re.Z.API_SERVER).concat(h,")")),Te.focus();case de:for(var _=e.row,w=e.col,y=e.align,b="\n",j=0;j<_;j++){for(var k=[],S=[],C=0;C<w;C++)1===j&&S.push(fe[y]),k.push(" ");1===j&&(b+="| ".concat(S.join(" | ")," |\n")),b+="| ".concat(k.join(1===w?"":" | ")," |\n")}return Te.replaceSelection(b+"\n"),Te.focus();default:throw new Error}}),[Te,We]),wn=(0,c.useMemo)((function(){switch(We){case se:return(0,m.jsx)(C,{callback:_n,onCancel:yn});case ue:return(0,m.jsx)(N.Z,{callback:_n,onCancel:yn});case ae:return(0,m.jsx)(B.Z,{callback:_n,onCancel:yn});case le:return(0,m.jsx)(V,{callback:_n,onCancel:yn});case de:return(0,m.jsx)(Q,{callback:_n,onCancel:yn});case"maths-latex":return(0,m.jsx)(te,{showSaveButton:!0,callback:_n});case"inline-latex":return(0,m.jsx)(ie.Z,{showSaveButton:!0,callback:_n});default:return null}}),[We]);function yn(){Ue("")}(0,c.useEffect)((function(){if(hn.current){var e=function(e){r=!0,o=e.pageY},n=function(){r=!1},t=function(e){if(r){var n=e.pageY-o;n<0&&(n=0),n>300&&(n=300),en(v+n+"px")}},i=hn.current,r=!1,o=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)}}}),[Te,hn]),(0,c.useEffect)((function(){en(v)}),[v]);var bn={width:ge(a),height:ge($e)},jn=((0,c.useMemo)((function(){if(Ye){var e=new Date(Ye),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}),[Ye]),function(e){var n=[];if(O){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});(0,c.useEffect)((function(){we[We]&&We!==ce&&We!==le&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;ln(n),pn(t)}),0)}),[We]);var kn=function(e,n,t,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&t>e||e>o-20&&t<e||n<20&&i>n||n>r-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,m.jsxs)(c.Fragment,{children:[(0,m.jsx)("div",{className:"markdown-editor-wrapper",ref:mn,children:(0,m.jsxs)("div",{className:"markdown-editor-container ".concat(X," ").concat(Me?"on-preview":""," ").concat(x?"mini":""," ").concat(Fe?"full-screen":""),style:bn,children:[(0,m.jsx)(w,{insertTemp:k,watch:Me,fullScreen:Fe,showNullButton:R,showNullProgramButton:O,onActionCallback:xn,hidetoolBar:z,extraUse:Ce}),(0,m.jsxs)("div",{className:"markdown-editor-body",children:[(0,m.jsx)("div",{className:"codemirror-container",children:(0,m.jsx)("textarea",{ref:fn,placeholder:je})}),Me?(0,m.jsxs)("div",{ref:vn,className:"preview-container",children:["stex"===T&&(0,m.jsx)(h,{value:Ze}),"stex"!==T&&(0,m.jsx)(f.Z,{disabledFill:ye,showProgramFill:O,value:Ze})]}):null]})]})}),I?(0,m.jsx)("a",{ref:hn,className:"editor-resize"}):null,We===ce&&(0,m.jsx)(P,{callback:_n,onCancel:yn}),We===le&&(0,m.jsx)(V,{callback:_n,onCancel:yn}),(0,m.jsx)(y.Z,{children:we[We]&&We!==ce&&We!==le?(0,m.jsx)(G.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:an,top:dn},title:(0,m.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-an,t=e.clientY-dn;document.body.onmousemove=function(e){var i=e.clientX-n,r=e.clientY-t,o=document.getElementsByClassName("markdown-popup-form")[0],s=window.innerWidth-o.offsetWidth,a=window.innerHeight-o.offsetHeight;i=Math.max(0,Math.min(i,s)),r=Math.max(0,Math.min(r,a)),kn(e.clientX,e.clientY,n,t)&&(ln(i),pn(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:we[We]}),open:!0,onCancel:yn,footer:null,destroyOnClose:!0,width:We===le?"1200px":null,height:We===le?"80vh":null,className:"markdown-popup-form",children:wn}):null})]})}},72952:function(e,n,t){"use strict";t.d(n,{Z:function(){return g},I:function(){return _}});var i=t(82242),r=t.n(i),o=t(79800),s=t.n(o),a=t(78241),l=t(8591),c=t(92832),u=t(3113),d=t(44177),p=t(59301),f=t(37712),m=a.Z.useForm,h={width:280,marginRight:10},v={labelCol:{span:5},wrapperCol:{span:19}},g=function(e){var n=e.callback,t=e.onCancel,i=m(),o=s()(i,1)[0],d=(0,p.useRef)();function g(e,n){-1!==e.status?o.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):l.ZP.error(e.message)}return(0,f.jsxs)(a.Z,r()(r()({form:o},v),{},{className:"upload-image-panel",onFinish:function(e){n(e,d.current)},style:{width:470,overflow:"hidden"},children:[(0,f.jsx)(a.Z.Item,{label:"图片地址",required:!0,children:(0,f.jsxs)("div",{className:"flex-container",children:[(0,f.jsx)(a.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,f.jsx)(c.Z,{style:h})}),(0,f.jsx)(x,{onFileChange:function(e){var n=e.target.files[0];d.current=n,_(n,g)}})]})}),(0,f.jsx)(a.Z.Item,{label:"图片描述",name:"alt",children:(0,f.jsx)(c.Z,{style:{width:264}})}),(0,f.jsxs)(a.Z.Item,{style:{textAlign:"right"},children:[(0,f.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(u.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function x(e){var n=e.onFileChange;return(0,f.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,f.jsx)("input",{type:"file",onChange:n})]})}function _(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(d.KI,"/api/attachments.json")),i.send(t)}},62807:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ke}});var i=t(37205),r=t.n(i),o=t(82242),s=t.n(o),a=t(7557),l=t.n(a),c=t(41498),u=t.n(c),d=t(79800),p=t.n(d),f=t(39647),m=t.n(f),h=t(59301),v=t(32007),g=t(15845),x=t.n(g),_=t(31797),w=t(78241),y=t(43418),b=t(92832),j=t(8591),k=t(93948),S=t(95237),C=t(43604),N=t(5112),B=t(24905),T=t(6848),E=t(71418),P=t(3113),A=t(46400),Z=t(72311),I=t(60765),L=t(99638),q=t(86844),M=t(66621),R=t(85750),D=t(37712),O=function(e){var n=e.id,t=e.startRecording,i=e.startScreenshot,o=e.onBack,s=e.onSuccuss,a=e.timeInSeconds,c=void 0===a?[1,6,11,16,21,26,31,41,51,61,71,81,91,101,111,121,151,181,211,241,271,361,421,481,541,601,661]:a,d=(0,h.useRef)(null),f=(0,h.useRef)(null),m=(0,h.useRef)(null),v=(0,h.useRef)(null),g=(0,h.useRef)(!0),x=(0,h.useRef)(""),_=(0,h.useState)(null),w=p()(_,2),y=w[0],b=w[1];(0,h.useEffect)((function(){t?S():C()}),[t]),(0,h.useEffect)((function(){i?b(0):(clearTimeout(v.current),b(null),x.current="")}),[i]),(0,h.useEffect)((function(){return"number"==typeof y&&(null!=c&&c.includes(y)&&B(),y<=720&&(v.current=setTimeout((function(){b(y+1)}),1e3))),function(){clearTimeout(v.current)}}),[y]);var k=function(){var e=u()(l()().mark((function e(){var n,t=arguments;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.length>0&&void 0!==t[0]?t[0]:"未共享整个屏幕,禁止作答!",j.ZP.warning(n),setTimeout((function(){o()}),1e3);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=u()(l()().mark((function e(){var n,t,i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,M.i7)()){e.next=3;break}return k("请使用谷歌浏览器答题"),e.abrupt("return");case 3:if(!d.current){e.next=6;break}return j.ZP.warning("正在录制中"),e.abrupt("return");case 6:if(g.current=!0,e.prev=7,!(0,M.WX)()){e.next=14;break}return e.next=11,navigator.mediaDevices.getUserMedia({audio:{mandatory:{chromeMediaSource:"desktop"}},video:{mandatory:{chromeMediaSource:"desktop"}}});case 11:t=e.sent,e.next=22;break;case 14:return e.next=16,navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"monitor"}});case 16:if(t=e.sent,"monitor"===(null===(i=t)||void 0===i||null===(i=i.getVideoTracks())||void 0===i||null===(i=i[0])||void 0===i||null===(i=i.getSettings())||void 0===i?void 0:i.displaySurface)){e.next=22;break}return C(),k(),e.abrupt("return");case 22:return d.current=t,"srcObject"in f.current?f.current.srcObject=d.current:f.current.src=URL.createObjectURL(d.current),e.next=26,new Promise((function(e){f.current.addEventListener("loadedmetadata",(function(){e()}))}));case 26:null===(n=d.current)||void 0===n||null===(n=n.getVideoTracks())||void 0===n||null===(n=n[0])||void 0===n||n.addEventListener("ended",(function(){g.current&&k()})),f.current.play(),s(),e.next=34;break;case 31:e.prev=31,e.t0=e.catch(7),k("屏幕录制功能错误,请检查后再共享整个屏幕,否则无法作答");case 34:case"end":return e.stop()}}),e,null,[[7,31]])})));return function(){return e.apply(this,arguments)}}(),C=function(){var e;g.current=!1;var n=null===(e=d.current)||void 0===e?void 0:e.getTracks();null==n||n.forEach((function(e){e.stop()})),d.current=null},N=function(e){var n=e.split(",")[1],t=e.split(",")[0].split(":")[1].split(";")[0],i=r()(atob(n)),o=new Uint8Array(i.map((function(e){return e.charCodeAt(0)})));return new Blob([o],{type:t})},B=function(){var e=u()(l()().mark((function e(){var t,i,r,o,s,a,c,u;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.current.getContext("2d"),m.current.width=f.current.videoWidth,m.current.height=f.current.videoHeight,t.drawImage(f.current,0,0,m.current.width,m.current.height),i=m.current.toDataURL("image/jpeg"),r=N(i),o=new File([r],"canvas_image.jpg",{type:"image/jpeg"}),(s=new FormData).append("file",o),e.next=11,(0,R.ZP)("/api/exercises/".concat(n,"/exercise_user_screens/check.json"),{method:"get"});case 11:if(0!==(null==(a=e.sent)?void 0:a.status)){e.next=21;break}return e.next=15,(0,R.ZP)("/api/attachments.json",{method:"post",body:s},!0);case 15:if(null==(c=e.sent)||!c.id){e.next=21;break}return e.next=19,(0,R.ZP)("/api/exercises/".concat(n,"/exercise_user_screens.json"),{method:"post",body:{attachment_id:null==c?void 0:c.id,exercise_abnormity_id:x.current}});case 19:0===(u=e.sent).status&&(x.current=u.exercise_abnormity_id);case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("video",{ref:f,muted:!0,className:"hide"}),(0,D.jsx)("canvas",{id:"canvas",ref:m,className:"hide"})]})},F=t(61186),G=t.n(F),z={flex_box_center:"flex_box_center___ariLt",flex_space_between:"flex_space_between___MC6sH",flex_box_vertical_center:"flex_box_vertical_center___tJHfy",flex_box_center_end:"flex_box_center_end___AfB_t",flex_box_column:"flex_box_column___xX4Fj",bg:"bg___nHBEZ",wrapper:"wrapper___TZKl8",exerciseAlert:"exerciseAlert___QUMwm",title:"title___rj6Q0",content:"content___Te7Wz",baseMargin:"baseMargin___BRmsh",noWrap:"noWrap___X6AS3",singleItem:"singleItem___GkaDR",questionIcons:"questionIcons___XoGYC",green:"green___iIYnV",orange:"orange___EIhiL",greenTip:"greenTip___WwiUh",redTip:"redTip___aWSt4",orangeTip:"orangeTip___j5g_H",pollDesc:"pollDesc___yDT2Q",answered:"answered___d2hE7",unanswer:"unanswer___AdOhE",anchor:"anchor___z3CaP",answerFlag:"answerFlag___wwTKa",flagActive:"flagActive___piG3D",flagHalf:"flagHalf___E29dd",answerStudentFlag:"answerStudentFlag___HRVt8",answerStudentActive:"answerStudentActive___kM6r4",questionItem:"questionItem___q6Hgu",questionScore:"questionScore___RW5tm",itemType:"itemType___pPqzT",itemFlag:"itemFlag___j5TSr",answerWrap:"answerWrap___G9dnn",answerSubjective:"answerSubjective___LRVKJ",otherInput:"otherInput___SxNAw",submitButton:"submitButton___zPo7H",randomFlag:"randomFlag___TOZ2H",answerTrue:"answerTrue___fgIW0",answerFalse:"answerFalse___gAQD8",answerHalf:"answerHalf___h40sX",renderHtml:"renderHtml___UerV1",simpleText:"simpleText___ZKx7o",answerYes:"answerYes___AA0oM",answerNo:"answerNo___gMGLy",answerInfo:"answerInfo___tB4Wz",answerProgress:"answerProgress___CbmXy",answerSheetWrap:"answerSheetWrap___aPipx",answerSheetQuestionTitle:"answerSheetQuestionTitle___P18Ss",answerSheet:"answerSheet___yhxK1",answerSheetItem:"answerSheetItem___DIH2V",qindex:"qindex___XuKA8",markIcon:"markIcon___ZTkqb",active:"active___WSsrt",yes:"yes___knuOK",no:"no___gv_cs",bf:"bf___pJfi5",partialActive:"partialActive___K6lsa",selected:"selected___grFyM",countDown:"countDown___OzcWL",cnText:"cnText___TvFjV",red:"red___Mge1h",refreshBtn:"refreshBtn___lK1MX",fold:"fold___id0EJ",cardList:"cardList___xKhMX",withQrcode:"withQrcode___qphZK",iframe:"iframe___pMMQx",eduTip:"eduTip___hXWhK",eduQrcode:"eduQrcode____qxcx",eduVideo:"eduVideo___mufWJ",eduUsername:"eduUsername___tiufh",startAnswer:"startAnswer___AA7n5",eduSubmit:"eduSubmit___UPIsJ",eduTitle:"eduTitle___jCJrO",wrpAnswer:"wrpAnswer___AVK1Y",simpleMd:"simpleMd___ZGbXj",videomodal:"videomodal___bYarH",mainPart:"mainPart___Fqvw7",userInfoText:"userInfoText___nqL8p",answerSheetBottom:"answerSheetBottom___yXf5u",tooltipWrap:"tooltipWrap___AxG9B",leftPart:"leftPart___P4Ook",rightPart:"rightPart___De4P3",questionPart:"questionPart___GTq66",questionTypeTitle:"questionTypeTitle___r6Fo9",questionTypeInfo:"questionTypeInfo___JfpWv",toIframeBtn:"toIframeBtn___gRKtn",bottom:"bottom___coSlv",markBtn:"markBtn___ZCLGF",changeButton:"changeButton___sBTjl",prevBtn:"prevBtn___lgCPG",analysisWrap:"analysisWrap___JoCnb",greyBg:"greyBg___vgesc",fixHeader:"fixHeader___RoNxE",exerciseTitle:"exerciseTitle___Dtp56",commitModal:"commitModal___zqvNA",commitItem:"commitItem___mjYF6",commitInfoLabel:"commitInfoLabel___KtIjW",commitInfoValue:"commitInfoValue___DCyRn",cameraHeader:"cameraHeader___Pqhwb",dottedLineWrapper:"dottedLineWrapper___ONO9c",leftHalfCircle:"leftHalfCircle___RNJN7",dottedLine:"dottedLine___qWy4W",rightHalfCircle:"rightHalfCircle___s3_hr",orangeNum:"orangeNum___IYnup",teachAnalysis:"teachAnalysis___FH6fk",teachAnalysisModal:"teachAnalysisModal___RcKVp"},H=t(47243),W=t(89260),U=t(40806),V=t(33571),K=t(16896),Y=t(51150),J=t(95992),X={0:"c-red-ee4",1:"c-green"},Q=function(e){var n,t,i,r,o,s,a=e.item,l=e.answerData,c=e.isEducation,u=e.sign,d=e.onBlur,f=void 0===d?function(){}:d,m=(0,h.useRef)(""),v=(0,h.useState)(),g=p()(v,2),x=(g[0],g[1]),_=(0,h.useState)(!1),w=p()(_,2),y=w[0],b=w[1],k=(0,h.useState)(c||!1),N=p()(k,2),B=N[0],T=N[1],E=(0,h.useRef)();return(0,h.useEffect)((function(){console.log("isFocus:",y),y&&(clearInterval(E.current),E.current=setInterval((function(){y&&f(m.current,!0)}),1e4))}),[y]),(0,h.useEffect)((function(){x(null==a?void 0:a.a_flag)}),[null==a?void 0:a.a_flag]),(0,h.useEffect)((function(){return function(){clearInterval(E.current)}}),[]),(0,D.jsxs)("div",{children:[1===(null==l||null===(n=l.exercise)||void 0===n?void 0:n.user_exercise_status)?(0,D.jsxs)("div",{className:"mb20",children:[(0,D.jsxs)(S.Z,{justify:"space-between",children:[(0,D.jsx)(C.Z,{children:"我的答案"}),((0,W.GJ)()||(0,W.dE)()&&(null==l||null===(t=l.exercise)||void 0===t?void 0:t.user_exercise_status)>0&&(null==l||null===(i=l.exercise)||void 0===i?void 0:i.open_score))&&(0,D.jsx)(C.Z,{children:(0,D.jsxs)(S.Z,{justify:"end",className:"mb20",align:"middle",children:[(0,D.jsx)("span",{className:"font14",style:{color:"#6A7283"},children:"得分"}),(0,D.jsxs)("span",{className:"font14 ml10",children:[(null==a?void 0:a.user_score)&&(0,D.jsxs)("span",{children:[(0,D.jsx)("span",{className:X[Number(null==a?void 0:a.answer_status)]||"c-orange-ff9",children:null==a?void 0:a.user_score}),(0,D.jsx)("span",{style:{marginLeft:5,color:"#6A7283"},children:"分"})]}),!(null!=a&&a.user_score)&&(0,D.jsx)("span",{className:"c-red",children:"未评"})]})]})})]}),(0,D.jsx)("div",{className:z.simpleText,children:(0,D.jsx)(Y.Z,{value:null==a||null===(r=a.user_answer)||void 0===r?void 0:r[0]})})]}):(0,D.jsx)("div",{className:a.user_score&&(a.user_score===a.question_score?"c-green":"c-red"),children:B?(0,D.jsx)(J.Z,{watch:!0,isFocus:!0,defaultValue:null==a||null===(o=a.user_answer)||void 0===o?void 0:o[0],id:null==a?void 0:a.question_id,className:"mt20",onChange:function(e){m.current=e,b(!0)},onBlur:function(){setTimeout((function(){f(m.current)}),200),clearInterval(E.current),b(!1)}}):(0,D.jsx)("div",{onClick:function(){var e;!a.repeat_answer&&(null==a||null===(e=a.user_answer)||void 0===e?void 0:e.length)>0&&0!==a.ques_status?j.ZP.warning("该题不允许再修改答案"):(u.current=!0,T(!0))},className:z.startAnswer,children:(0,D.jsx)("div",{className:"c-blue",children:"点击开始作答"})})}),(0,W.dE)()&&(null==a?void 0:a.standard_answer)&&(0,D.jsx)("div",{className:z.analysisWrap,children:(0,D.jsxs)("div",{className:z.greyBg,children:[(0,D.jsxs)(S.Z,{className:"mb20",align:"middle",children:[(0,D.jsx)(C.Z,{className:"font14 mr10",style:{color:"#6A7283"},children:"【答案】"}),(0,D.jsx)(C.Z,{children:(0,D.jsx)(Y.Z,{value:null==a||null===(s=a.standard_answer)||void 0===s?void 0:s[0]})})]}),(0,D.jsxs)(S.Z,{children:[(0,D.jsx)("span",{className:"font14 mr10",style:{color:"#6A7283"},children:"【解析】"}),(0,D.jsx)(Y.Z,{className:z.renderHtml,value:null==a?void 0:a.analysis})]})]})})]})},$=t(57809),ee=function(e){var n,t,i,r,o=e.item,s=e.answerData,a=e.isEducation,l=e.onBlur,c=void 0===l?function(){}:l,u=(0,h.useRef)(""),d=(0,h.useState)(),f=p()(d,2),m=(f[0],f[1]),v=(0,h.useState)(!1),g=p()(v,2),x=g[0],_=g[1],w=(0,h.useState)(!1),y=p()(w,2),j=y[0],k=y[1],S=(0,h.useState)(a||!1),C=p()(S,2),N=C[0],B=C[1],T=(0,h.useState)(0),E=p()(T,2),P=E[0],A=E[1],Z=(0,h.useRef)(o.kp_content||""),I=(0,h.useRef)(o.kp_clazz),L=(0,h.useRef)(),q=(0,h.useMemo)((function(){var e;return null===(e=u.current)||void 0===e||null===(e=e.replace(/[\n|\r|\t]/g,""))||void 0===e?void 0:e.length}),[u.current]);return(0,h.useEffect)((function(){console.log("isFocus:",j),clearInterval(L.current),L.current=setInterval((function(){j&&c(u.current,Z.current,I.current)}),3e4)}),[j]),(0,h.useEffect)((function(){m(null==o?void 0:o.a_flag)}),[null==o?void 0:o.a_flag]),(0,h.useEffect)((function(){return function(){clearInterval(L.current)}}),[]),(0,D.jsxs)("div",{children:[1===(null==s||null===(n=s.exercise)||void 0===n?void 0:n.user_exercise_status)?(0,D.jsxs)("div",{children:[(0,D.jsxs)("div",{className:"mt30",children:[(0,D.jsx)("strong",{children:"作文题目:"}),(0,D.jsx)("br",{}),(0,D.jsx)(b.Z,{disabled:!0,className:"mt10",value:Z.current,onChange:function(e){Z.current=e.target.value,A(P+1)},onBlur:function(){c(u.current,Z.current,I.current),k(!1)}})]}),(0,D.jsxs)("div",{className:"mt30",children:[(0,D.jsx)("strong",{children:"作品类型:"}),(0,D.jsx)("br",{}),(0,D.jsxs)($.default,{disabled:!0,className:"mt10 w100",placeholder:"请选择作品类型",value:I.current,onChange:function(e){I.current=e,A(P+1)},onBlur:function(){c(u.current,Z.current,I.current),k(!1)},children:[(0,D.jsx)($.default.Option,{value:"科普",children:"科普"},1),(0,D.jsx)($.default.Option,{value:"科幻",children:"科幻"},2)]})]}),(0,D.jsx)("p",{className:"mt10 mb0",children:"作品内容:"}),(0,D.jsx)("div",{className:z.simpleText,children:(0,D.jsx)(Y.Z,{value:null==o||null===(t=o.user_answer)||void 0===t?void 0:t[0]})})]}):(0,D.jsxs)("div",{children:[(0,D.jsxs)("div",{className:"mt30",children:[(0,D.jsx)("strong",{children:"作文题目:"}),(0,D.jsx)("br",{}),(0,D.jsx)(b.Z,{className:"mt10",maxLength:60,onBlur:function(){return c(u.current,Z.current,I.current)},placeholder:"请输入作文题目(最多60个字)",value:Z.current,onChange:function(e){Z.current=e.target.value,A(P+1)}})]}),(0,D.jsxs)("div",{className:"mt30",children:[(0,D.jsx)("strong",{children:"作文类型:"}),(0,D.jsx)("br",{}),(0,D.jsxs)($.default,{className:"mt10 w100",placeholder:"请选择作品类型",value:I.current,onChange:function(e){I.current=e,c(e.current,Z.current,I.current),A(P+1)},children:[(0,D.jsx)($.default.Option,{value:"科普",children:"科普"},1),(0,D.jsx)($.default.Option,{value:"科幻",children:"科幻"},2)]})]}),(0,D.jsx)("div",{className:"mt30 mb20",children:(0,D.jsxs)("div",{className:o.user_score&&(o.user_score===o.question_score?"c-green":"c-red"),children:[(0,D.jsx)("strong",{children:"作文内容:"}),(0,D.jsx)("br",{}),(0,D.jsxs)("div",{className:"mt10 relative",children:[(0,D.jsxs)("span",{className:"c-blue",style:{position:x?"fixed":"absolute",top:x?61:4,left:10,zIndex:106},children:["已输入",q,"字"]}),N?(0,D.jsx)(J.Z,{className:z.simpleMd,disablePaste:!0,hidetoolBar:a,height:a?"60vh":150,isFocus:!0,defaultValue:null==o||null===(i=o.user_answer)||void 0===i?void 0:i[0],id:null==o?void 0:o.question_id,onFullScreen:function(e){return _(e)},onChange:function(e){u.current=e,k(!0),A(P+1)},onBlur:function(){c(u.current,Z.current,I.current),k(!1)}}):(0,D.jsx)("div",{onClick:function(){return B(!0)},className:z.startAnswer,children:(0,D.jsx)("div",{className:"c-blue",children:"点击开始作答"})})]})]})})]}),(0,W.dE)()&&(null==o?void 0:o.standard_answer)&&(0,D.jsxs)("div",{children:[(0,D.jsx)("p",{className:"mt10 mb0",children:"参考答案:"}),(0,D.jsx)("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5},children:(0,D.jsx)(Y.Z,{value:null==o||null===(r=o.standard_answer)||void 0===r?void 0:r[0]})})]})]})},ne=t(79817),te=t(51945),ie=t(84445),re="score___mcGn7",oe="wrap___h11sQ",se=function(e){var n=e.score;return n?(0,D.jsxs)("span",{className:oe,children:["得分",(0,D.jsx)("span",{className:"".concat(re," ml10 mr5"),children:n}),"分"]}):(0,D.jsx)("span",{className:"c-red",children:"未评"})},ae={flex_box_center:"flex_box_center___xK64P",flex_space_between:"flex_space_between___BNBCA",flex_box_vertical_center:"flex_box_vertical_center___ConJK",flex_box_center_end:"flex_box_center_end___L08sz",flex_box_column:"flex_box_column___hvk0E",shixunWrp:"shixunWrp___FTFC6",fill:"fill___H_Qd6",index:"index___PaSVJ",success:"success___fz_F7",fail:"fail___ftXSv",fillInput:"fillInput___q_sSb",shixunWrapper:"shixunWrapper___toGqF",score:"score___AsYGZ",name:"name___hawfX",programWrapper:"programWrapper___zVQPT",desc:"desc___MFIu5",content:"content___QuE41",analysisWrap:"analysisWrap___qGPzJ",greyBg:"greyBg___FIDIB"},le=function(e){var n,t,i,r,o,a=e.item,l=e.answerData,c=e.exerciseId,u=e.coursesId,d=(0,h.useState)([]),f=p()(d,2),m=f[0],g=f[1],x=(0,h.useState)([]),_=p()(x,2),w=_[0],y=_[1];(0,h.useEffect)((function(){var e;if(null!=a&&null!==(e=a.shixun_details)&&void 0!==e&&e.length){for(var n=[],t=[],i=function(){for(var e,i=0;i<(null==a?void 0:a.shixun_details[r].stage_list.length);i++){var o,l=null==a?void 0:a.shixun_details[r].stage_list[i];n.push(s()(s()({},l),{operation:null==a||null===(o=a.shixun_details)||void 0===o||null===(o=o[r])||void 0===o||null===(o=o.shixun_detail)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.game_identifier,is_jupyter:null==a?void 0:a.is_jupyter,is_jupyter_lab:null==a?void 0:a.is_jupyter_lab}))}if(null!=a&&null!==(e=a.shixun_details)&&void 0!==e&&null!==(e=e[r])&&void 0!==e&&e.shixun_detail){var c,u,d=null==a||null===(c=a.shixun_details)||void 0===c||null===(c=c[r])||void 0===c||null===(c=c.shixun_detail)||void 0===c?void 0:c[0],p=null==a||null===(u=a.shixun_details[r].stage_list)||void 0===u||null===(u=u.find((function(e){return(null==e?void 0:e.game_identifier)===(null==d?void 0:d.game_identifier)})))||void 0===u?void 0:u.user_score;t.push(s()(s()({},d),{},{user_score:p}))}},r=0;r<(null==a||null===(o=a.shixun_details)||void 0===o?void 0:o.length);r++){var o;i()}y(t),g(n)}}),[null==a?void 0:a.shixun_details]);var b=[{title:"关卡",dataIndex:"position",key:"position",align:"center"},{title:"任务名称",dataIndex:"name",key:"name",align:"center",render:function(e){return(0,D.jsx)("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:e&&e.length>25?e:"",children:e})}},{title:"评测次数",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(e,n){return(0,D.jsx)("span",{children:n.evaluate_count?n.evaluate_count:(0,D.jsx)("span",{className:"color-grey-9",children:"--"})})}},{title:"完成时间",key:"endTime",dataIndex:"endTime",align:"center",render:function(e,n){var t=!1;return n.finished_time&&null!=l&&l.exercise&&null!=l&&l.exercise_answer_user&&(t=-1===(null==l?void 0:l.exercise.time)?G()(null==l?void 0:l.exercise.end_time).isBefore(n.finished_time):G()(null==l?void 0:l.exercise_answer_user.start_at).add(null==l?void 0:l.exercise.time,"m").isBefore(n.finished_time)),(0,D.jsxs)("span",{children:[n.finished_time||(0,D.jsx)("span",{className:"c-grey-999",children:"--"}),(0,D.jsx)("span",{className:"c-orange-ff9 ",children:t?"(已超时)":""})]})}},{title:"耗时",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(e,n){return(0,D.jsx)("span",{children:n.time_consuming||(0,D.jsx)("span",{className:"color-grey-9",children:"--"})})}},{title:"查看答案",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(e,n){return(0,D.jsx)("span",{children:n.view_answer?"已查看":"未查看"})}},{title:"得分",dataIndex:"user_score",key:"user_score",align:"center",render:function(e){return(0,D.jsxs)("span",{style:{color:"#FA6400"},children:[e,"分"]})}},{title:"操作",dataIndex:"operation",key:"operation",align:"center",render:function(e,n,t){return!e||n.is_jupyter||n.is_jupyter_lab?(0,D.jsx)("span",{className:"c-grey-999",children:"--"}):(0,D.jsx)(ne.Z,{affix:!1,children:(0,D.jsx)(ne.Z.Link,{href:"#challenge_".concat(null==a?void 0:a.question_id).concat(t),title:(0,D.jsx)("span",{style:{color:"#0152d9",fontSize:14},children:"查看"})})})}}];console.log(w);var j={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return(0,D.jsxs)("div",{children:[(null==a||null===(n=a.shixun)||void 0===n?void 0:n.length)>0&&(0,D.jsx)("div",{className:ae.shixunWrapper,children:null==a||null===(t=a.shixun)||void 0===t?void 0:t.map((function(e,n){return(0,D.jsxs)(S.Z,{className:"mb20",justify:"space-between",children:[(0,D.jsxs)(C.Z,{flex:"1",children:[(0,D.jsxs)("span",{className:ae.score,children:["(",e.challenge_score,"分)"]}),(0,D.jsxs)("span",{className:ae.name,children:[e.challenge_name," "]})]}),(0,D.jsxs)(C.Z,{children:[!e.answer_status&&(0,D.jsx)("span",{className:"font14",style:{color:"#FA6400"},children:"未完成"}),!!e.answer_status&&(0,D.jsx)("span",{className:"font14",style:{color:"#37AD83"},children:"已完成"})]})]})}))}),0!==(null==l||null===(i=l.exercise)||void 0===i?void 0:i.student_commit_status)||0!==(null==l||null===(r=l.exercise)||void 0===r?void 0:r.user_exercise_status)?(0,D.jsxs)(D.Fragment,{children:[!(null==m||!m.length)&&(0,D.jsxs)("div",{children:[(0,D.jsxs)(S.Z,{justify:"space-between",className:"mb10",align:"middle",children:[(0,D.jsx)(C.Z,{className:"font14 c-grey-666",children:"阶段成绩"}),(0,D.jsx)(C.Z,{children:(0,D.jsx)(se,{score:null==a?void 0:a.user_score})})]}),(0,D.jsx)(te.Z,{columns:b,dataSource:m,pagination:!1})]}),!(null==w||!w.length)&&(0,D.jsxs)("div",{children:[(0,D.jsx)("p",{className:"font16 c-grey-666 mt10",children:"实训详情"}),null==w?void 0:w.map((function(e,n){return(0,D.jsxs)("div",{id:"challenge_".concat(null==a?void 0:a.question_id).concat(n),className:"mt5",children:[(0,D.jsxs)(S.Z,{children:[(0,D.jsxs)("span",{className:"font14 mr15",children:[" 第",e.position,"关"]}),(0,D.jsx)(v.Link,{className:"current c-black font14",target:"_blank",to:"/tasks/".concat(u,"/").concat(c,"/").concat(e.game_identifier,"/exercise"),children:e.name}),(0,D.jsx)(C.Z,{style:{marginLeft:"auto"},children:(0,D.jsx)(se,{score:e.user_score})})]}),0===(null==e?void 0:e.st)&&e.passed_code&&(0,D.jsxs)("aside",{className:ae.shixunWrp,children:[(0,D.jsxs)("h2",{children:["第一次通关的代码(未通关则为最后一次提交评测的代码)",(0,D.jsx)("span",{className:"c-light-black",children:e.path})]}),(0,D.jsx)(ie.ZP,{height:300,language:"python",theme:"default",value:e.passed_code,options:j})]})]})}))]})]}):(0,D.jsxs)(D.Fragment,{children:[(0,W.dE)()&&(0,D.jsx)(Y.Z,{className:"c-grey-999 mt20 mb20",value:null==a?void 0:a.question_title}),null==a||null===(o=a.shixun)||void 0===o?void 0:o.map((function(e,n){return(0,D.jsxs)("p",{className:"font16 c-grey-666 mb5",children:[(0,D.jsxs)("span",{className:"mr20",children:["第",null==e?void 0:e.challenge_position,"关 ",null==e?void 0:e.challenge_name]}),(0,D.jsxs)("span",{children:[null==e?void 0:e.challenge_score,"分"]})]},n)}))]})]})},ce=t(24334),ue=function(e){var n,t,i,r=e.item,o=e.answerData,s=(0,h.useState)([]),a=p()(s,2),l=(a[0],a[1]);(0,h.useEffect)((function(){var e,n;(null==r||null===(e=r.evaluate_codes)||void 0===e?void 0:e.length)>0?l(null==r||null===(n=r.evaluate_codes)||void 0===n?void 0:n.map((function(e,n){return{key:n+1,error_msg:null!=e&&e.error_msg?ce.Base64.decode(null==e?void 0:e.error_msg):""}}))):l([{key:"--",error_msg:"--"}])}),[null==r?void 0:r.evaluate_codes]);return(0,D.jsxs)("div",{className:"".concat(ae.programWrapper),children:[(0,D.jsx)("div",{className:ae.desc,children:"题目描述"}),(0,D.jsx)("div",{className:ae.content,children:(0,D.jsx)(Y.Z,{value:null==r?void 0:r.description})}),1===(null==o||null===(n=o.exercise)||void 0===n?void 0:n.user_exercise_status)&&(0,D.jsx)(S.Z,{justify:"end",className:"mt40",children:(0,D.jsx)(C.Z,{children:(0,D.jsx)(se,{score:null==r?void 0:r.user_score})})}),(null==r?void 0:r.passed_code)&&(0,D.jsxs)("aside",{className:ae.shixunWrp,children:[(0,D.jsx)("h3",{children:"第一次评测通过的代码(未通关则为最后一次提交评测的代码)"}),(0,D.jsx)(ie.ZP,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:null!=r&&r.passed_code?ce.Base64.decode(null==r?void 0:r.passed_code):"",options:{selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1}})]}),1===(null==o||null===(t=o.exercise)||void 0===t?void 0:t.user_exercise_status)&&(null==o||null===(i=o.exercise)||void 0===i?void 0:i.answer_open)&&(0,D.jsxs)("div",{style:{background:"#F6F7F9"},className:"mt30 p20",children:[(0,D.jsxs)("div",{style:{marginBottom:"20px",fontSize:"16px",display:"flex"},children:[(0,D.jsx)("span",{style:{whiteSpace:"nowrap"},children:"【答案】"}),(0,D.jsx)(Y.Z,{value:(null==r?void 0:r.standard_answer)||""})]}),(0,D.jsxs)("div",{style:{fontSize:"16px",display:"flex"},children:[(0,D.jsx)("span",{style:{whiteSpace:"nowrap"},children:"【解析】"}),(0,D.jsx)(Y.Z,{value:(null==r?void 0:r.analysis)||"暂无解析"})]})]})]})},de=t(36833),pe=(b.Z.TextArea,{0:"c-red-ee4",1:"c-green"}),fe=function(e){var n,t,i,o,a=e.sign,c=e.item,d=e.answerData,f=e.onBlur,m=void 0===f?function(){}:f,g=(0,h.useState)([]),x=p()(g,2),_=x[0],w=x[1],y=(0,h.useState)([]),j=p()(y,2),k=j[0],N=j[1],B=(0,h.useRef)(),T=(0,h.useRef)(),E=(0,v.useSearchParams)(),P=p()(E,1)[0];return(0,h.useEffect)((function(){if(P.get("check")){var e,n;n=null==c||null===(e=c.standard_answer)||void 0===e?void 0:e.map((function(e){var n;return s()(s()({},e),{},{choice_id:e.position,answer_text:(null==c||null===(n=c.user_answer)||void 0===n||null===(n=n.find((function(n){return n.choice_id===e.choice_id})))||void 0===n?void 0:n.answer_text)||""})})),B.current=n,w(n)}else{var t,i;i=null==c||null===(t=c.standard_answers)||void 0===t?void 0:t.map((function(e){var n;return s()(s()({},e),{},{choice_id:e.position,answer_text:(null==c||null===(n=c.user_answer)||void 0===n||null===(n=n.find((function(n){return n.choice_id===e.position})))||void 0===n?void 0:n.answer_text)||""})})),B.current=i,w(i)}}),[null==c?void 0:c.user_answer]),(0,D.jsxs)("div",{children:[null==_?void 0:_.map((function(e,n){var t,i,o,s,p;return(0,D.jsxs)(S.Z,{className:"".concat(ae.baseMargin," ").concat(ae.fill),align:"middle",children:[(0,D.jsxs)(C.Z,{className:ae.index,children:["填空项",n+1]}),(0,D.jsx)(C.Z,{flex:"430px",className:"ml20 mr20",children:1===(null==e?void 0:e.model)?(0,D.jsx)(b.Z,{name:"sign",placeholder:"请输入答案",disabled:!c.repeat_answer&&(null==c||null===(t=c.user_answer)||void 0===t?void 0:t.length)>0&&0!==c.ques_status||!(null==d||!d.exercise.commit_status),value:null==e?void 0:e.answer_text,onChange:function(e){_[n].answer_text=e.target.value,w(r()(_))},onFocus:function(){a.current=!0},onBlur:function(t){setTimeout(u()(l()().mark((function t(){var i,r,o;return l()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m(null==e?void 0:e.answer_text,n+1,_);case 2:(i=t.sent).status?((o=k.slice())[n]={status:"fail",errorText:i.message},T.current=o,N(o)):((r=k.slice())[n]={status:"success",errorText:""},T.current=r,N(r));case 4:case"end":return t.stop()}}),t)}))),200)},className:"".concat(c.user_score&&(c.user_score===c.question_score?"c-green":"c-red")," ").concat(ae.fillInput)}):(0,D.jsx)(de.Z,{value:null==e?void 0:e.answer_text,disabled:!c.repeat_answer&&(null==c||null===(i=c.user_answer)||void 0===i?void 0:i.length)>0&&0!==c.ques_status||!(null==d||!d.exercise.commit_status),onChange:function(){var t=u()(l()().mark((function t(i){var o,s,a,c,u;return l()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return _[n].answer_text=i,w(r()(_)),t.next=4,m(null==e?void 0:e.answer_text,n+1,_);case 4:(o=t.sent).status?((u=(null==T||null===(c=T.current)||void 0===c?void 0:c.slice())||[].slice())[n]={status:"fail",errorText:o.message},T.current=u,N(u)):((a=(null==T||null===(s=T.current)||void 0===s?void 0:s.slice())||[].slice())[n]={status:"success",errorText:""},T.current=a,N(a));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})}),"success"===(null===(o=k[n])||void 0===o?void 0:o.status)&&(0,D.jsx)(C.Z,{children:(0,D.jsxs)(S.Z,{align:"middle",children:[(0,D.jsx)("i",{style:{marginRight:8},className:"iconfont icon-chenggong1 ".concat(ae.success)}),(0,D.jsx)("span",{className:ae.success,children:"保存成功"})]})}),"fail"===(null===(s=k[n])||void 0===s?void 0:s.status)&&(0,D.jsx)(C.Z,{children:(0,D.jsxs)(S.Z,{align:"middle",children:[(0,D.jsx)("i",{style:{marginRight:8},className:"iconfont icon-tishi7 ".concat(ae.fail)}),(0,D.jsx)("span",{className:ae.fail,children:null===(p=k[n])||void 0===p?void 0:p.errorText})]})})]},n)})),((0,W.GJ)()||(0,W.dE)()&&(null==d||null===(n=d.exercise)||void 0===n?void 0:n.user_exercise_status)>0&&(null==d||null===(t=d.exercise)||void 0===t?void 0:t.open_score))&&(0,D.jsxs)(S.Z,{justify:"end",className:"mb20",align:"middle",children:[(0,D.jsx)("span",{className:"font14",style:{color:"#6A7283"},children:"得分"}),(0,D.jsxs)("span",{className:"font14 ml10",children:[(null==c?void 0:c.user_score)&&(0,D.jsxs)("span",{children:[(0,D.jsx)("span",{className:pe[Number(null==c?void 0:c.answer_status)]||"c-orange-ff9",children:null==c?void 0:c.user_score}),(0,D.jsx)("span",{style:{marginLeft:5,color:"#6A7283"},children:"分"})]}),!(null!=c&&c.user_score)&&(0,D.jsx)("span",{className:"c-red",children:"未评"})]})]}),(null==d||null===(i=d.exercise)||void 0===i?void 0:i.answer_open)&&(0,D.jsx)("div",{className:ae.analysisWrap,children:(0,D.jsxs)("div",{className:ae.greyBg,children:[(0,D.jsxs)(S.Z,{className:"mb20",align:"middle",children:[(0,D.jsx)(C.Z,{className:"font14 mr10",style:{color:"#6A7283"},children:"【答案】"}),null==c||null===(o=c.standard_answer)||void 0===o?void 0:o.map((function(e,n){var t;return(0,D.jsx)(C.Z,{className:"mr40",children:(0,D.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,D.jsxs)("div",{style:{width:"100px"},children:["填空项",n+1]}),(0,D.jsx)(de.Z,{value:null==e||null===(t=e.answer_text)||void 0===t?void 0:t[0],disabled:!0})]})},n)}))]}),(0,D.jsxs)(S.Z,{children:[(0,D.jsx)("span",{className:"font14 mr10",style:{color:"#6A7283"},children:"【解析】"}),(0,D.jsx)(Y.Z,{className:ae.renderHtml,value:null==c?void 0:c.analysis})]})]})})]})},me=t(20301),he=t(3148),ve=(b.Z.TextArea,function(e){var n,t,i,o=e.item,a=e.answerData,c=e.sign,d=e.onBlur,f=void 0===d?function(){}:d,m=(e.onDebug,e.setIsSubmitCode),g=(0,h.useState)([]),x=p()(g,2),_=x[0],w=x[1],y=(0,v.useSearchParams)(),b=p()(y,1)[0];return(0,h.useEffect)((function(){var e,n=null==o||null===(e=o.standard_answer_with_score)||void 0===e?void 0:e.map((function(e,n){var t;return s()(s()({},e),{},{value:(null==o||null===(t=o.user_answer)||void 0===t||null===(t=t.find((function(e){return parseInt(e.choice_id)===n+1})))||void 0===t?void 0:t.answer_text)||""})}));w(n)}),[null==o?void 0:o.standard_answer_with_score]),console.log(_,"userAnswer"),(0,D.jsxs)("div",{children:[(0,D.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:10},children:[(0,D.jsxs)("div",{style:{fontSize:14,color:"#FF0000"},children:[(0,D.jsx)(he.Z,{}),(0,D.jsx)("span",{style:{marginLeft:5},children:"注意:填写答案之后,必须提交代码进行评测,否则无法得分"})]}),!b.get("check")&&(0,D.jsx)(me.Z,{setIsSubmitCode:m,ButtonProps:{type:"primary"},ButtonText:"提交代码",items:s()(s()({},o),{},{userAnswer:_}),hackidentifier:null==o?void 0:o.hack_identifier})]}),(null==o?void 0:o.code)&&(0,D.jsx)("div",{style:{border:"1px solid #CCCCCC",padding:"10px",marginBottom:20},children:(0,D.jsx)(Y.Z,{disabledFill:!o.repeat_answer&&(null==o||null===(n=o.user_answer)||void 0===n?void 0:n.length)>0&&0!==o.ques_status||!(null==a||!a.exercise.commit_status),onFillBlur:function(){var e=u()(l()().mark((function e(n,t){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(u()(l()().mark((function e(){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(null==n||null===(i=n[parseInt(t)])||void 0===i?void 0:i.value,parseInt(t)+1,_);case 2:0===e.sent.status?(_[parseInt(t)].type="",w(r()(_))):(_[parseInt(t)].type="warning",w(r()(_)));case 4:case"end":return e.stop()}}),e)}))),200);case 1:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),onFillFocus:function(e,n){_[parseInt(n)].type="",w(r()(_)),c.current=!0},className:ae.content,programFillValue:_,showProgramFill:!0,value:ce.Base64.decode((null==o?void 0:o.code)||"")})}),!(null==o||null===(t=o.standard_answer)||void 0===t||!t.length)&&(0,D.jsx)("div",{className:ae.analysisWrap,children:(0,D.jsxs)("div",{className:ae.greyBg,children:[(0,D.jsxs)(S.Z,{className:"mb20",align:"middle",children:[(0,D.jsx)(C.Z,{className:"font14 mr10",style:{color:"#6A7283"},children:"【答案】"}),null==o||null===(i=o.standard_answer)||void 0===i?void 0:i.map((function(e,n){return(0,D.jsxs)(C.Z,{className:"mr40",children:["填空项",n+1,":",null==e?void 0:e.answer_text]},n)}))]}),(0,D.jsxs)(S.Z,{children:[(0,D.jsx)("span",{className:"font14 mr10",style:{color:"#6A7283"},children:"【解析】"}),(0,D.jsx)(Y.Z,{className:ae.renderHtml,value:(null==o?void 0:o.analysis)||"暂无解析"})]})]})})]})}),ge=t(81841),xe=(b.Z.TextArea,function(e){var n=e.data;return(0,D.jsxs)("div",{className:"tc mt80 pb30",children:[(0,D.jsx)("img",{width:"486",src:ge.BV})," ",(0,D.jsx)("br",{}),-1===n.status&&(0,D.jsx)("div",{className:"c-grey-999 mt60",children:"您的IP不在考试允许的范围内"}),-2===n.status&&(0,D.jsxs)("div",{className:" c-grey-999 mt60",children:["您已绑定当前考试IP地址",(0,D.jsx)("span",{className:"c-red",children:n.ip}),"请使用该IP地址进入考试。"]}),(0,D.jsx)(P.ZP,{className:"mt40 pl20 pr20",type:"primary",children:(0,D.jsx)("a",{href:"/",children:"回到首页"})})]})}),_e=t(20817),we=t(89392),ye="comments___ZkLeS",be="greyText___ow9J6",je="commentText___Uklcs",ke="wrapper___XTdhL",Se="header___pq5DQ",Ce="updateTime___WYYjt",Ne="text___FmQY7",Be="date___DiXg4",Te=function(e){var n=e.list,t=e.hideScore,i=void 0!==t&&t;return(0,D.jsx)("div",{children:null==n?void 0:n.map((function(e){var n,t,r,o,s;return(0,D.jsxs)("div",{className:"mt20 ".concat(ke),children:[(0,D.jsxs)(S.Z,{align:"middle",className:Se,children:[(0,D.jsx)("img",{src:_e.Z.API_SERVER+"/images/"+(null===(t=e.user)||void 0===t?void 0:t.image_url)}),(0,D.jsx)("span",{className:"ml10 font16",children:null===(r=e.user)||void 0===r?void 0:r.name}),(0,D.jsxs)(C.Z,{className:Ce,children:[(0,D.jsx)("span",{className:Ne,children:"评阅时间"}),(0,D.jsx)("span",{className:Be,children:G()(null===(o=e.comments)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.updated_at).format("YYYY-MM-DD HH:mm")})]})]}),(0,D.jsx)("div",{className:ye,children:null==e||null===(s=e.comments)||void 0===s?void 0:s.map((function(n,t){var r;return(0,D.jsxs)("div",{children:[(0,D.jsxs)(S.Z,{align:"middle",justify:"space-between",children:[!!n.shixun_chanllge_position&&(0,D.jsxs)("div",{style:{flexShrink:0,marginRight:10},children:["第",n.shixun_chanllge_position,"关"]}),!i&&(0,D.jsxs)("div",{style:{flex:1},children:["原始得分",null==n?void 0:n.origin_score,"分,修正为",(0,D.jsx)("span",{className:"c-light-primary",children:null==n?void 0:n.score}),"分"]})]}),!!n.comment&&(0,D.jsxs)("div",{children:[" ",(0,D.jsx)("span",{className:"".concat(be," mr10"),children:"评语"}),(0,D.jsx)("span",{className:je,children:n.comment})]})]},(null==e||null===(r=e.user)||void 0===r?void 0:r.user_id)+"-"+t)}))})]},null==e||null===(n=e.user)||void 0===n?void 0:n.user_id)}))})},Ee=t(62408),Pe=t(12911),Ae=t.n(Pe),Ze=t(72826),Ie=t(67147),Le=t(6739),qe=t(98812),Me="codeInput___xSFAu",Re=t(92310),De=t.n(Re),Oe=function(e){var n=e.className,t=e.style,i=e.onOk,o=(0,h.useState)(["","","","","",""]),s=p()(o,2),a=s[0],l=s[1],c=(0,h.useState)(0),u=p()(c,2),d=u[0],f=u[1],m=(0,h.useRef)([]);(0,h.useEffect)((function(){var e=a.findIndex((function(e){return!e}));-1===e&&i(a),f(e)}),[a]),(0,h.useEffect)((function(){var e;null===(e=m.current[d])||void 0===e||e.focus()}),[d]);return(0,D.jsx)("div",{className:De()(Me,n),style:t,children:a.map((function(e,n){return(0,D.jsx)("input",{type:"text",disabled:d!==n,maxLength:1,value:""===e?"":"*",onChange:function(e){return function(e,n){var t=e.target.value;if(/^\d*$/.test(t)){var i=r()(a);i[n]=t||"",l(i)}}(e,n)},onKeyDown:function(e){return function(e,n){if("Backspace"===e.key&&n>0){e.preventDefault();var t=r()(a);t[n-1]="",l(t)}}(e,n)},ref:function(e){m.current[n]=e}},n)}))})},Fe=t(59413),Ge=t(23693),ze=t(26351),He=["globalSetting","loading","user","exercise","dispatch"],We=_.Z.Countdown,Ue=["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"],Ve={0:"c-red-ee4",1:"c-green"},Ke=(0,v.connect)((function(e){var n=e.loading,t=e.user,i=e.exercise;return{globalSetting:e.globalSetting,user:t,exercise:i,loading:n.effects}}))((function(e){e.globalSetting,e.loading;var n,t,i,r,o,a,c,d,f,g,_,F,J,X,$,ne,te,ie,re,oe,se,ae,ce,de,pe,me,he,ge,ye,be,je,ke,Se,Ce,Ne,Be,Pe,Me,Re,De,Ke,Ye,Je,Xe,Qe,$e,en=e.user,nn=e.exercise,tn=e.dispatch,rn=(m()(e,He),(0,v.useLocation)()),on=(0,v.useSearchParams)(),sn=p()(on,1)[0],an=(0,v.useParams)(),ln=(0,h.useState)({}),cn=p()(ln,2),un=cn[0],dn=cn[1],pn=(0,h.useState)({}),fn=p()(pn,2),mn=fn[0],hn=fn[1],vn=(0,h.useState)({}),gn=p()(vn,2),xn=gn[0],_n=gn[1],wn=(0,h.useState)(!1),yn=p()(wn,2),bn=yn[0],jn=yn[1],kn=(0,h.useState)(!0),Sn=p()(kn,2),Cn=Sn[0],Nn=Sn[1],Bn=(0,h.useState)(!1),Tn=p()(Bn,2),En=Tn[0],Pn=Tn[1],An=(0,h.useState)(!1),Zn=p()(An,2),In=Zn[0],Ln=Zn[1],qn=(0,h.useState)(!1),Mn=p()(qn,2),Rn=Mn[0],Dn=Mn[1],On=(0,h.useState)(!1),Fn=p()(On,2),Gn=Fn[0],zn=Fn[1],Hn=(0,h.useState)(),Wn=p()(Hn,2),Un=Wn[0],Vn=Wn[1],Kn=(0,h.useState)(""),Yn=p()(Kn,2),Jn=Yn[0],Xn=Yn[1],Qn=(0,h.useState)("none"),$n=p()(Qn,2),et=$n[0],nt=$n[1],tt=(0,h.useState)(""),it=p()(tt,2),rt=it[0],ot=it[1],st=(0,h.useState)({status:0}),at=p()(st,2),lt=at[0],ct=at[1],ut=(0,h.useState)(!1),dt=p()(ut,2),pt=dt[0],ft=dt[1],mt=(0,h.useState)("kepukehuan.educoder.net"===window.document.domain),ht=p()(mt,2),vt=ht[0],gt=(ht[1],(0,h.useState)(!0)),xt=p()(gt,2),_t=xt[0],wt=xt[1],yt=(0,h.useState)(!1),bt=p()(yt,2),jt=bt[0],kt=bt[1],St=(0,h.useState)(null),Ct=p()(St,2),Nt=Ct[0],Bt=Ct[1],Tt=(0,h.useState)(!1),Et=p()(Tt,2),Pt=Et[0],At=Et[1],Zt=(0,h.useState)(0),It=p()(Zt,2),Lt=It[0],qt=It[1],Mt=(0,h.useRef)(),Rt=(0,h.useRef)(),Dt=(0,h.useRef)(!1),Ot=(0,h.useRef)(),Ft=(0,h.useRef)(),Gt=(0,h.useRef)(),zt=(0,h.useRef)(),Ht=w.Z.useForm(),Wt=p()(Ht,1)[0],Ut=(0,h.useMemo)((function(){return new WebSocket("ws://localhost:8082")}),[]),Vt=(0,h.useState)(0),Kt=p()(Vt,2),Yt=Kt[0],Jt=Kt[1],Xt=(0,h.useState)(0),Qt=p()(Xt,2),$t=Qt[0],ei=Qt[1],ni=(0,h.useState)(!1),ti=p()(ni,2),ii=ti[0],ri=ti[1],oi=(0,h.useState)(!1),si=p()(oi,2),ai=si[0],li=si[1],ci=(0,h.useState)(!1),ui=p()(ci,2),di=ui[0],pi=ui[1],fi=["/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/detail"),"/classrooms/".concat(an.coursesId,"/exercise"),"/classrooms/".concat(an.coursesId,"/exercise/"),"/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/users/").concat(null===(n=en.userInfo)||void 0===n?void 0:n.login,"/check"),"/classrooms/".concat(an.coursesId,"/exercisenotice/").concat(an.categoryId,"/users/").concat(null===(t=en.userInfo)||void 0===t?void 0:t.login),"/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/users/").concat(null===(i=en.userInfo)||void 0===i?void 0:i.login)],mi=(0,h.useState)(!1),hi=p()(mi,2),vi=hi[0],gi=hi[1],xi=(0,h.useState)(!0),_i=p()(xi,2),wi=_i[0],yi=_i[1],bi=(0,h.useState)({left:0,top:0,bottom:0,right:0}),ji=p()(bi,2),ki=ji[0],Si=ji[1],Ci=(0,h.useRef)(null),Ni=(0,h.useState)(!0),Bi=p()(Ni,2),Ti=Bi[0],Ei=Bi[1],Pi=(0,h.useRef)(),Ai=(0,h.useState)(!1),Zi=p()(Ai,2),Ii=Zi[0],Li=Zi[1];(0,qe.y)((0,W.dE)());var qi=(0,qe.X)().setOpenDisableCopyAndPaste,Mi=(0,Fe._)(un);(0,h.useEffect)((function(){return document.body.setAttribute("data-custom","auto"),function(){document.body.removeAttribute("data-custom")}}),[]),(0,h.useEffect)((function(){var e,n;if(document.body.scrollIntoView(),"游客"!==(null===(e=en.userInfo)||void 0===e?void 0:e.real_name))return null!==(n=en.userInfo)&&void 0!==n&&n.user_id&&((0,W.GJ)()?Vi():en.userInfo.login&&Fi()),window.addEventListener("message",Di),function(){window.removeEventListener("message",Di),rn.pathname.indexOf("/detail")>-1&&(0,U.BU)()};window.location.href="/classrooms/".concat(an.coursesId,"/exercise")}),[an.categoryId,en.userInfo.login]),(0,h.useEffect)((function(){return window.addEventListener("beforeunload",Ri),function(){Mi(),window.removeEventListener("beforeunload",Ri)}}),[]),(0,h.useEffect)((function(){return tn({type:"globalSetting/headerFooterToggle",payload:!1}),function(){tn({type:"globalSetting/headerFooterToggle",payload:!0})}}),[]),(0,h.useEffect)((function(){var e,n;null!=un&&null!==(e=un.question_status)&&void 0!==e&&e.every((function(e){return!!e.ques_status&&pt&&(null==mn?void 0:mn.used_screen_num)<(null==mn?void 0:mn.screen_num)}))&&setTimeout((function(){var e;null===(e=Rt.current)||void 0===e||e.handlePhoto()}),1300),Bt(null==un||null===(n=un.exercise_question_types)||void 0===n||null===(n=n[Yt])||void 0===n||null===(n=n.items)||void 0===n?void 0:n[$t])}),[un]);var Ri=function(e){var n;null!=mn&&mn.is_commit||!(0,W.dE)()||(0,M.RG)(" ",!0),localStorage.setItem("Refresh","1"),null!==(n=nn.exerciseUserInfo)&&void 0!==n&&n.screen_open&&window.navigator.sendBeacon("".concat(_e.Z.API_SERVER,"/api/exercises/").concat(an.categoryId,"/commit_screen_at.json"),{})},Di=function(e){"backExercise"===e.data&&((0,M.RG)(" ",!0),Oi())},Oi=function(){nt("none"),Xn(""),Vi()},Fi=function(){var e=u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:zi();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Gi=function(){var e=u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:wt(!1),y.Z.info({title:(0,ze._V)(ze.CP.answer1),width:500,centered:!0,closable:!1,keyboard:!1,maskClosable:!1,maskStyle:{background:"#000"},okText:(0,ze._V)(ze.CP.answer2),onOk:function(){return new Promise(function(){var e=u()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Wt.validateFields();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),t();case 8:return e.t1=V.pL,e.t2=s(),e.t3={exercise_user_id:null==mn?void 0:mn.exercise_user_id,categoryId:an.categoryId},e.next=13,Wt.validateFields();case 13:return e.t4=e.sent,e.t5=(0,e.t2)(e.t3,e.t4),e.next=17,(0,e.t1)(e.t5);case 17:0===(null==(i=e.sent)?void 0:i.status)?(wt(!0),Hi(),n(i)):(Wt.setFields([{name:"start_password",errors:[null==i?void 0:i.message]}]),t());case 19:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(n,t){return e.apply(this,arguments)}}())},content:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("p",{className:"",children:(0,ze._V)(ze.CP.answer3)}),(0,D.jsx)(w.Z,{form:Wt,autoComplete:"off",children:(0,D.jsx)(w.Z.Item,{name:"start_password",label:(0,ze._V)(ze.CP.answer1),rules:[{required:!0,message:(0,ze._V)(ze.CP.answer4)}],children:(0,D.jsx)(b.Z.Password,{autoComplete:"off"})})})]})});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),zi=function(){var e=u()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tn({type:"exercise/getExerciseUserInfo",payload:s()({},an)});case 2:n=e.sent,zt.current=s()(s()({},n.data),{},{status:null==n?void 0:n.status}),hn(s()(s()({},n.data),{},{status:null==n?void 0:n.status}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,h.useEffect)((function(){if(null!=mn&&mn.exercise_user_id){if(null!=mn&&mn.is_commit||(0,M.RG)(" ",!0),null!=mn&&mn.is_commit||!("inner"===(null==mn?void 0:mn.ip_limit)||null!=mn&&mn.ip_bind_type)||(Gt.current="&ip_limit=".concat(null==mn?void 0:mn.ip_limit,"&ip_bind=").concat(null==mn?void 0:mn.ip_bind,"&ip_bind_type=").concat(null==mn?void 0:mn.ip_bind_type)),(null!=mn&&mn.is_commit||sn.get("check"))&&(2!=mn.exercise_type||sn.get("check"))){if(!mn.answered_open&&2!=mn.exercise_type)return void y.Z.info({width:500,centered:!0,icon:null,title:(0,ze._V)(ze.CP.answer5),content:(0,ze._V)(ze.CP.answer6),onOk:function(){window.location.href="/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/detail")}})}else{if((0,M.RG)(" ",!0),null==mn||!mn.can_start)return void(window.location.href="/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/users/").concat(an.login,"/check"));if(null!=mn&&mn.is_locked&&mn.ip_error)return void tn({type:"exercise/setActionTabs",payload:{key:"student-unlock",exerciseParams:s()(s()({},mn),{},{id:an.categoryId})}});if((null==mn||!mn.is_locked)&&mn.ip_error,""===document.referrer||2===performance.navigation.type||!fi.includes(new URL(document.referrer).pathname))return sessionStorage.setItem("illegalEntry","illegalEntry"),void v.history.push("/classrooms/".concat(an.coursesId,"/exercise/"));if(null!=mn&&mn.start_locked&&(null==mn||!mn.user_is_enter))return void Gi();if(null!=mn&&mn.is_locked&&1===performance.navigation.type&&!sessionStorage.getItem("studentunlock"))return void tn({type:"exercise/setActionTabs",payload:{key:"student-unlock",exerciseParams:s()(s()({},mn),{},{id:an.categoryId})}});if((0,R.ZP)("/api/exercises/".concat(null==an?void 0:an.categoryId,"/close_pop.json"),{method:"post"}),null!=mn&&mn.is_locked&&0===performance.navigation.type&&null!=mn&&mn.user_is_enter&&(null==mn||!mn.is_commit)&&null!=mn&&mn.show_pop)return void tn({type:"exercise/setActionTabs",payload:{key:"student-unlock",exerciseParams:s()(s()({},mn),{},{id:an.categoryId})}})}sn.get("check")?Vi():Hi()}return function(){null!=mn&&mn.is_commit||!(0,W.dE)()||(0,M.RG)(" ",!0)}}),[mn]);var Hi=function(){var e=u()(l()().mark((function e(){var n,t,i,r,o,s,a,c,u,d,p,f,m,h,v,g,x;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(sessionStorage.setItem("studentunlock","studentunlock"),!("no"!==(null==(a={data:mn,status:mn.status})||null===(n=a.data)||void 0===n?void 0:n.ip_limit)||null!=a&&null!==(t=a.data)&&void 0!==t&&t.ip_bind_type)){e.next=6;break}return e.next=5,(0,H.y)({ip_limit:null==a||null===(i=a.data)||void 0===i?void 0:i.ip_limit,ip_bind:null==a||null===(r=a.data)||void 0===r?void 0:r.ip_bind_type});case 5:Ot.current=e.sent;case 6:if(!("no"!==(null==a||null===(o=a.data)||void 0===o?void 0:o.ip_limit)||null!=a&&null!==(s=a.data)&&void 0!==s&&s.ip_bind)){e.next=14;break}if(!("inner"===(null==a||null===(c=a.data)||void 0===c?void 0:c.ip_limit)||null!=a&&null!==(u=a.data)&&void 0!==u&&u.ip_bind_type)){e.next=14;break}return e.next=10,(0,M.oi)({exerciseId:an.categoryId,ip:Ot.current,errmsgHide:!0,ip_limit:(null==a||null===(d=a.data)||void 0===d?void 0:d.ip_limit)||"no",ip_bind:null==a||null===(p=a.data)||void 0===p?void 0:p.ip_bind,ip_bind_type:null==a||null===(f=a.data)||void 0===f?void 0:f.ip_bind_type});case 10:if(0===(null==(m=e.sent)?void 0:m.status)){e.next=14;break}return ct(m),e.abrupt("return");case 14:if(0!=(null==a?void 0:a.status)){e.next=26;break}if(!((null==a||null===(h=a.data)||void 0===h?void 0:h.used_screen_num)>(null==a||null===(v=a.data)||void 0===v?void 0:v.screen_num)&&null!=a&&null!==(g=a.data)&&void 0!==g&&g.screen_open)){e.next=19;break}return pi(!0),ar(),e.abrupt("return",!1);case 19:if(Pn(null==a?void 0:a.data.check_camera),null!=a&&a.data.check_camera){e.next=26;break}if(null==a||!a.data.screen_shot_open){e.next=24;break}return Dn(null==mn?void 0:mn.screen_shot_open),e.abrupt("return");case 24:Ln(null==a||null===(x=a.data)||void 0===x?void 0:x.screen_open),Vi();case 26:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Wi=function(){var e=u()(l()().mark((function e(){var n,t=arguments;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.length>0&&void 0!==t[0]?t[0]:Nt,sn.get("check")){e.next=4;break}return e.next=4,(0,R.ZP)("/api/exercise_questions/".concat(null==n?void 0:n.question_id,"/exercise_answers/save_hack_evaluate.json"),{});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ui=function(){var e=u()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1!==(null==n?void 0:n.type)){e.next=3;break}return y.Z.info({centered:!0,width:470,okText:"确定",cancelText:"取消",title:"提示",icon:null,keyboard:!1,onOk:function(){v.history.replace("/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/detail"))},content:(0,D.jsx)("div",{children:(null==n?void 0:n.message)||""})}),e.abrupt("return",Promise.reject());case 3:if(2!==(null==n?void 0:n.type)){e.next=7;break}return t=function(){v.history.replace("/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/centralizeReview/").concat(null==n?void 0:n.login))},y.Z.confirm({centered:!0,width:470,okText:"确定",cancelText:"取消",title:"提示",icon:null,keyboard:!1,onOk:t,onCancel:function(){v.history.replace("/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/detail"))},content:(0,D.jsxs)("div",{children:[(0,D.jsxs)("div",{children:["您已成为指定阅卷教师,是否现在前往",(0,D.jsx)("span",{onClick:t,className:"ml5 mr5 c-light-primary current",children:"集中阅卷"}),"继续评阅?"]}),(0,D.jsx)("div",{className:"c-grey-999",children:"(阅卷结束后恢复学生个人评阅功能,并展示学生成绩)"})]})}),e.abrupt("return",Promise.reject());case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Vi=function(){var e=u()(l()().mark((function e(){var n,t,i,r,o,a,c,u,d,p,f,m,h,v,g,x,_,w,y,b,k,S,C,N,B,T,E,P,A,Z,I,L,q,R;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(document.body.scrollIntoView(),jn(!0),i=null===(n=en.userInfo)||void 0===n?void 0:n.user_id,!(0,W.GJ)()){e.next=11;break}return e.next=6,(0,V.BJ)({exerciseId:an.categoryId,login:an.login}).catch((function(){return jn(!1)}));case 6:t=e.sent,(null===(r=t)||void 0===r?void 0:r.exercise)&&(t.exercise.user_exercise_status=1),i=null===(o=t)||void 0===o||null===(o=o.exercise_answer_user)||void 0===o?void 0:o.user_id,e.next=45;break;case 11:if(!sn.get("check")){e.next=19;break}return e.next=14,(0,V.BJ)(s()(s()({},an),{},{exerciseId:an.categoryId,login:an.login})).catch((function(){return jn(!1)}));case 14:t=e.sent,i=null===(m=t)||void 0===m||null===(m=m.exercise)||void 0===m?void 0:m.user_id,"学生正在考试中,您无权查看"===(null===(h=t)||void 0===h?void 0:h.message)&&yi(!1),e.next=39;break;case 19:if(!("no"!==(null===(v=zt.current)||void 0===v?void 0:v.ip_limit)||null!==(g=zt.current)&&void 0!==g&&g.ip_bind_type)){e.next=23;break}return e.next=22,(0,H.y)({ip_limit:null===(x=zt.current)||void 0===x?void 0:x.ip_limit,ip_bind:null===(_=zt.current)||void 0===_?void 0:_.ip_bind_type});case 22:Ot.current=e.sent;case 23:return e.next=25,(0,V.CD)(s()(s()({},an),{},{ip:Ot.current})).catch((function(){return jn(!1)}));case 25:if(-1!==(t=e.sent).status){e.next=29;break}return Yi(),e.abrupt("return");case 29:if(null===(w=t)||void 0===w||null===(w=w.exercise)||void 0===w||!w.only_on_client||(0,M.WX)()){e.next=33;break}return j.ZP.warning("请用客户端作答"),Yi(),e.abrupt("return");case 33:if(-5!==(null===(y=t)||void 0===y?void 0:y.status)){e.next=36;break}return tn({type:"exercise/setActionTabs",payload:{key:"student-unlock",exerciseParams:s()(s()({},zt.current),{},{id:an.categoryId,errorMessage:null===(C=t)||void 0===C?void 0:C.message})}}),e.abrupt("return");case 36:(null===(b=t)||void 0===b?void 0:b.exercise)&&(t.exercise.user_exercise_status=0),(null===(k=t)||void 0===k?void 0:k.exercise)&&(t.exercise.exercise_status=2),null===(S=t)||void 0===S||null===(S=S.exercise_question_types)||void 0===S||S.map((function(e){var n;(null==e?void 0:e.question_type)<3&&(null==e||null===(n=e.items)||void 0===n||n.map((function(e){e.user_answer=e.question_choices.filter((function(e){return e.user_answer_boolean})).map((function(e){return e.choice_id}))})))}));case 39:if(null!==(a=t)&&void 0!==a&&null!==(a=a.exercise)&&void 0!==a&&a.can_start||null===(c=t)||void 0===c||!c.exercise){e.next=42;break}return window.location.href="/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/users/").concat(an.login,"/check"),e.abrupt("return");case 42:0!==(null===(u=t.exercise)||void 0===u?void 0:u.commit_status)||Ft.current||(Ft.current=!0,(0,M.G5)(Ut,null===(N=t)||void 0===N?void 0:N.exercise)),null!==(d=t)&&void 0!==d&&null!==(d=d.exercise)&&void 0!==d&&d.left_time&&setTimeout((function(){ot(z.red)}),1e3*((null===(B=t)||void 0===B||null===(B=B.exercise)||void 0===B?void 0:B.left_time)-300>0?(null===(T=t)||void 0===T||null===(T=T.exercise)||void 0===T?void 0:T.left_time)-300:0)),null===(p=t)||void 0===p||null===(p=p.exercise)||void 0===p||p.take_photo,null===(f=t)||void 0===f||null===(f=f.exercise)||void 0===f||f.photo_count;case 45:return jn(!1),e.next=48,Ui(t);case 48:return t&&((null!==(E=t)&&void 0!==E&&null!==(E=E.exercise)&&void 0!==E&&E.question_random||null!==(P=t)&&void 0!==P&&null!==(P=P.exercise)&&void 0!==P&&P.choice_random)&&(R=1,t.exercise.question_random=null===(q=t)||void 0===q||null===(q=q.exercise_question_types)||void 0===q?void 0:q.map((function(e){var n,r;return null!==(n=t)&&void 0!==n&&null!==(n=n.exercise)&&void 0!==n&&n.choice_random&&(0!==e.question_type&&1!==e.question_type||e.items.map((function(e){return e.question_choices=(0,M.M2)(e.question_choices,i),e})),7===e.question_type&&e.items.forEach((function(e){e.sub_exercise_questions.forEach((function(e){e.question_choices&&(e.question_choices=(0,M.M2)(e.question_choices,i))}))}))),null!==(r=t)&&void 0!==r&&null!==(r=r.exercise)&&void 0!==r&&r.question_random&&(e.items=(0,M.M2)(e.items,i)),e.items.map((function(e){return e.question_num=R,R++,e})),e}))),t.exercise_types=(null===(A=t)||void 0===A?void 0:A.exercise_types)||(null===(Z=t)||void 0===Z||null===(Z=Z.exercise_scores)||void 0===Z?void 0:Z.exercise_types),t.question_status=t.question_status||Ki((null===(I=t)||void 0===I?void 0:I.exercise_question_types)||[]),dn(t),qi(null===(L=t)||void 0===L||null===(L=L.exercise)||void 0===L?void 0:L.forbid_copy)),e.abrupt("return",t);case 50:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ki=function(e){var n=[];return e.forEach((function(e){n=n.concat(e.items)})),n=n.map((function(e){return{ques_status:null==e?void 0:e.ques_status,score_status:null==e?void 0:e.score_status,question_num:null==e?void 0:e.question_num,ques_id:null==e?void 0:e.question_id}}))};(0,h.useEffect)((function(){var e,n,t;0===(null===(e=un.exercise)||void 0===e?void 0:e.left_time)&&ar(),(null===(n=un.exercise)||void 0===n?void 0:n.left_time)&&Vn(Date.now()+1e3*(null==un||null===(t=un.exercise)||void 0===t?void 0:t.left_time))}),[null===(r=un.exercise)||void 0===r?void 0:r.left_time]);var Yi=function(){(0,M.G5)(Ut),(0,M.WX)()?window.location.href=(0,M.Ll)()?"/":"/classrooms/examList":window.location.href=(0,M.Ll)()?"/":"/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/detail")},Ji=function(){var e=u()(l()().mark((function e(){var n,t,i=arguments;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>0&&void 0!==i[0]&&i[0],e.next=3,(0,V.PT)(s()(s()({},an),{},{refresh:n}));case 3:if(null==(t=e.sent)||!t.has_time){e.next=10;break}return Vn(Date.now()+1e3*(null==t?void 0:t.left_time)),dn((function(e){return s()(s()({},e),{},{exercise:s()(s()({},e.exercise),{},{left_time:null==t?void 0:t.left_time})})})),e.abrupt("return",!0);case 10:return Xi(),e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xi=function(){var e=u()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Dt.current){e.next=2;break}return e.abrupt("return");case 2:return Dt.current=!0,e.next=5,(0,V.VL)({categoryId:an.categoryId,commit_method:2});case 5:n=e.sent,Ln(!1),Dn(!1),0===(null==n?void 0:n.status)&&(y.Z.info({width:530,title:"提示",centered:!0,okText:"确定",zIndex:1100,content:(0,D.jsxs)("div",{children:["答题结束了,系统已自动提交试卷",(0,D.jsx)("br",{}),"不能再修改答题"]}),onOk:function(){var e=u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Yi();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),j.ZP.info(null==n?void 0:n.message)),-3===(null==n?void 0:n.status)&&(Dt.current=!1,t=parseInt(null==n?void 0:n.message),un.exercise.left_time=t,dn(s()({},un)));case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Qi=function(){var e=u()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(n.is_jupyter||n.is_jupyter_lab?K.BK:K.Ir)({id:n.shixun_identifier});case 2:(null!=(t=e.sent)&&t.game_identifier||null!=t&&t.identifier)&&(qi(!1),n.is_jupyter_lab||n.is_jupyter?Xn("/tasks/".concat(t.identifier,"/jupyter?type=exercises&exercisesId=").concat(an.categoryId,"&coursesId=").concat(an.coursesId,"&login=").concat(an.login,"&questionId=").concat(n.question_id,"&isFullScreen=").concat((0,U.vp)()).concat(Gt.current||"","&ip_limit=").concat(null==mn?void 0:mn.ip_limit,"&ip_bind=").concat(null==mn?void 0:mn.ip_bind,"&ip_bind_type=").concat(null==mn?void 0:mn.ip_bind_type)):Xn("/tasks/".concat(t.game_identifier,"?type=exercises&exercisesId=").concat(an.categoryId,"&coursesId=").concat(an.coursesId,"&login=").concat(an.login,"&questionId=").concat(n.question_id,"&isFullScreen=").concat((0,U.vp)()).concat(Gt.current||"","&ip_limit=").concat(null==mn?void 0:mn.ip_limit,"&ip_bind=").concat(null==mn?void 0:mn.ip_bind,"&ip_bind_type=").concat(null==mn?void 0:mn.ip_bind_type)),nt("block")),-3===(null==t?void 0:t.status)?(0,M.eF)():2===(null==t?void 0:t.status)?$i(null==t?void 0:t.message,n.question_id,n.is_jupyter_lab,n.is_jupyter):3===(null==t?void 0:t.status)&&er(null==t?void 0:t.message);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),$i=function e(n,t,i,r){var o,s;n=null!==(o=n)&&void 0!==o&&o.includes(".json")?n:"".concat(n,".json"),y.Z.confirm({centered:!0,title:"提示",icon:null,okText:"确定",cancelText:"取消",content:(0,D.jsx)("div",{children:"实训已经更新了,正在为您重置!"}),onOk:(s=u()(l()().mark((function o(){var s,a;return l()().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,V.$Q)({url:n});case 2:if(s=o.sent){o.next=5;break}return o.abrupt("return");case 5:return j.ZP.success("重置成功,正在进入实践项目!"),o.next=8,(0,K.Ir)({id:s.shixun_identifier});case 8:if(null==(a=o.sent)||!a.game_identifier){o.next=12;break}return Qi({shixun_identifier:null==a?void 0:a.game_identifier,question_id:t,is_jupyter_lab:i,is_jupyter:r}),o.abrupt("return");case 12:2===(null==a?void 0:a.status)?e(null==a?void 0:a.message,t,i,r):3===(null==a?void 0:a.status)&&er(null==a?void 0:a.message);case 13:case"end":return o.stop()}}),o)}))),function(){return s.apply(this,arguments)})})},er=function(e){y.Z.confirm({centered:!0,title:"提示",icon:null,okText:"确定",cancelText:"取消",content:(0,D.jsxs)("div",{children:["目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!"]})})},nr=function(){var e=u()(l()().mark((function e(n){var t,i,r;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.o3)({exercise_user_id:null===(t=nn.exerciseUserInfo)||void 0===t?void 0:t.exercise_user_id,shixun_id:n.shixun_id});case 2:null!=(i=e.sent)&&i.redo?r=y.Z.confirm({width:530,title:"提示",icon:null,centered:!0,okText:"确定",cancelText:"再想想",content:(0,D.jsx)("div",{children:"您之前已经挑战过该实训,考试过程中需要重新挑战"}),onCancel:function(){r.destroy()},onOk:function(){var e=u()(l()().mark((function e(){var t,r,o,a;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.$Q)({id:null==i?void 0:i.myshixun_identifier,url:null==i?void 0:i.url});case 2:(t=e.sent)&&(Mi(),r=(0,we.cloneDeep)(null==un?void 0:un.exercise_question_types),o=null==r?void 0:r.findIndex((function(e){return 5===e.question_type})),r[o].items.find((function(e){return e.question_id===n.question_id})).redo=!1,r[o].items.find((function(e){return e.question_id===n.question_id})).shixun_identifier=t.shixun_identifier,un.exercise_question_types=r,dn(un),a=s()(s()({},n),{},{shixun_identifier:t.shixun_identifier}),Qi(a));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}):(Mi(),Qi(n));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),tr=function(){var e=u()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.hack_identifier){e.next=5;break}return e.next=3,(0,V.nF)({id:n.hack_identifier});case 3:0===(null==(t=e.sent)?void 0:t.status)&&(Mi(),qi(!1),Xn("/myproblems/".concat(t.identifier,"?type=exercises&exercisesId=").concat(an.categoryId,"&coursesId=").concat(an.coursesId,"&login=").concat(an.login,"&questionId=").concat(n.question_id).concat(Gt.current||"")),nt("block"));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ir=function(){var e=u()(l()().mark((function e(n,t,i,r,o,a,c){var u,d,p,f,m;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(kt(!1),c||jn(!0),p={questionId:n,exercise_choice_id:t,answer_text:i},"inner"!==(null==mn?void 0:mn.ip_limit)&&!mn.ip_bind_type){e.next=7;break}return e.next=6,(0,H.y)({ip_limit:null==mn?void 0:mn.ip_limit,ip_bind:null==mn?void 0:mn.ip_bind_type});case 6:d=e.sent;case 7:if(o&&(p.kp_content=o),o&&(p.kp_clazz=a),n){e.next=12;break}return console.error("handleSave no questionId params"),e.abrupt("return");case 12:return p.ip=d,e.next=15,(0,V.oX)(p);case 15:return null!=(f=e.sent)&&null!==(u=f.alert)&&void 0!==u&&u.length&&(null==f||null===(m=f.alert)||void 0===m||m.map((function(e){y.Z.warn({title:"提示",autoFocusButton:null,content:e})}))),0===(null==f?void 0:f.status)?(r&&r(),Mr()):-1===(null==f?void 0:f.status)?setTimeout((function(){Yi()}),1e3):-2===(null==f?void 0:f.status)?ct(f):-3===(null==f?void 0:f.status)?(f.status=-1,ct(f)):-4===(null==f?void 0:f.status)?Mr():-5===(null==f?void 0:f.status)?tn({type:"exercise/setActionTabs",payload:{key:"student-unlock",exerciseParams:s()(s()({},mn),{},{id:an.categoryId,errorMessage:null==f?void 0:f.message})}}):j.ZP.warning(f.message||"试卷已截止,已自动交卷"),jn(!1),e.abrupt("return",f);case 20:case"end":return e.stop()}}),e)})));return function(n,t,i,r,o,s,a){return e.apply(this,arguments)}}(),rr=function(){var e=u()(l()().mark((function e(n){var t,i,r,o,a,c,d,p,f,m;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.PT)(s()({},an));case 2:if(-4!==(null==(t=e.sent)?void 0:t.status)){e.next=6;break}return y.Z.info({width:500,centered:!0,icon:null,title:"提示",content:null==t?void 0:t.message,okText:"我知道了"}),e.abrupt("return");case 6:if(i=null!=t&&t.left_time?Date.now()+1e3*(null==t?void 0:t.left_time):null,8!=(null==Nt?void 0:Nt.question_type)||jt){e.next=11;break}return e.next=10,Wi();case 10:kt(!0);case 11:return e.next=13,(0,V.Vj)({id:an.categoryId});case 13:if(r=e.sent){e.next=16;break}return e.abrupt("return");case 16:console.log("res===",r,Nt,jt),0!==r.question_undo||0!==r.oj_undo?(r.question_undo>0&&(c=(0,D.jsxs)("span",{children:["有",(0,D.jsx)("span",{className:z.orangeNum,children:r.question_undo}),"题未完成"]}),(r.oj_undo>0||r.shixun_undo>0)&&(f=[{type:(null==un||null===(d=un.exercise_question_types)||void 0===d||null===(d=d.find((function(e){return 6==e.question_type})))||void 0===d?void 0:d.name)||"编程题",num:r.oj_undo},{type:(null==un||null===(p=un.exercise_question_types)||void 0===p||null===(p=p.find((function(e){return 5==e.question_type})))||void 0===p?void 0:p.name)||"实训题",num:r.shixun_undo}],m=f.filter((function(e){return e.num>0})),a=(0,D.jsxs)("div",{children:[c,"(其中有",m.map((function(e,n){return(0,D.jsxs)("span",{children:[(0,D.jsx)("span",{className:z.orangeNum,children:null==e?void 0:e.num}),"个",null==e?void 0:e.type,n!==(null==m?void 0:m.length)-1?"、":""]})})),""]}))),o=y.Z.confirm({width:530,title:"提示",icon:null,centered:!0,keyboard:!1,okText:n?"知道了":"确认交卷",cancelText:"取消",content:(0,D.jsxs)("div",{children:[a,n?"在".concat(G()(r.end_time).format("YYYY-MM-DD HH:mm"),"之前,允许修改答题"):i?"你本场考试剩余时间还有".concat((0,M.li)((i-(new Date).getTime())/1e3)," ,确认提前交卷吗?"):"提交后无法再修改答题,是否确认提交?"]}),onOk:function(){var e=u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ln(!1),Dn(!1),!n){e.next=6;break}null!=mn&&mn.screen_open?j.ZP.success("保存成功"):Yi(),e.next=10;break;case 6:return pi(!0),o.update({cancelButtonProps:{disabled:!0}}),e.next=10,ar();case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()})):o=y.Z.confirm({width:530,title:"提示",icon:null,centered:!0,keyboard:!1,okText:n?"知道了":"确认交卷",cancelText:"取消",content:(0,D.jsx)("div",{children:n?"在".concat(G()(r.end_time).format("YYYY-MM-DD HH:mm"),"之前,允许修改答题"):i?"你本场考试剩余时间还有".concat((0,M.li)((i-(new Date).getTime())/1e3)," ,确认提前交卷吗?"):"提交后无法再修改答题,是否确认提交?"}),onOk:function(){var e=u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ln(!1),Dn(!1),!n){e.next=6;break}null!=mn&&mn.screen_open?j.ZP.success("保存成功"):Yi(),e.next=10;break;case 6:return pi(!0),o.update({cancelButtonProps:{disabled:!0}}),e.next=10,ar();case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 18:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),or=function(e){return(0,D.jsxs)("div",{children:[(0,D.jsx)(k.Z,{strokeColor:{from:"#3061D0",to:"#63E0FB"},status:"active",percent:e}),(0,D.jsx)("div",{className:"c-grey-c tc mt10 mb20",children:"正在判分中…"})]})},sr=function(){var e=0,n=y.Z.info({title:"交卷中",icon:null,className:"modal-footer-none",content:or(e)}),t=setInterval((function(){e<=100?(e+=2,n.update({content:or(e)})):(n.destroy(),clearInterval(t))}),50)},ar=function(){var e=u()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!di){e.next=2;break}return e.abrupt("return");case 2:if(!Dt.current){e.next=4;break}return e.abrupt("return");case 4:return Dt.current=!0,e.next=7,(0,V.VL)({categoryId:an.categoryId,commit_method:1});case 7:return n=e.sent,e.next=10,tn({type:"exercise/setActionTabs",payload:s()({},{removeEventListenerExitScreen:!0})});case 10:pi(!1),0===(null==n?void 0:n.status)&&(sr(),Pn(!1),setTimeout((function(){var e,t,i,r,o;y.Z.info({centered:!0,title:"交卷成功",className:"".concat(z.commitModal),width:520,icon:null,content:(0,D.jsxs)("div",{children:[(0,D.jsxs)(S.Z,{className:"mb20",gutter:20,children:[(0,D.jsxs)(C.Z,{span:12,className:z.commitItem,children:[(0,D.jsx)("span",{className:z.commitInfoLabel,children:"姓名"}),(0,D.jsx)("span",{className:z.commitInfoValue,title:null==un||null===(e=un.exercise)||void 0===e?void 0:e.user_name,children:(null==un||null===(t=un.exercise)||void 0===t?void 0:t.user_name)||"- -"})]}),(0,D.jsxs)(C.Z,{span:12,className:z.commitItem,children:[(0,D.jsx)("span",{className:z.commitInfoLabel,children:"作答时长"}),(0,D.jsx)("span",{className:z.commitInfoValue,children:null==n||null===(i=n.data)||void 0===i?void 0:i.user_exercise_time})]})]}),(0,D.jsxs)(S.Z,{gutter:20,children:[(0,D.jsxs)(C.Z,{span:12,className:z.commitItem,children:[(0,D.jsx)("span",{className:z.commitInfoLabel,children:"学号"}),(0,D.jsx)("span",{className:z.commitInfoValue,children:(null==un||null===(r=un.exercise)||void 0===r?void 0:r.student_id)||"- -"})]}),(0,D.jsxs)(C.Z,{span:12,className:z.commitItem,children:[(0,D.jsx)("span",{className:z.commitInfoLabel,children:"交卷时间"}),(0,D.jsx)("span",{className:z.commitInfoValue,children:null==n||null===(o=n.data)||void 0===o?void 0:o.commit_time})]})]})]}),okText:"确定",maskClosable:!1,keyboard:!1,onOk:function(){(0,U.BU)(),Yi()}})}),3e3));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),lr=function(){var e=u()(l()().mark((function e(n,t,i,r,o){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ir(t,n,null,(function(){if(r.user_answer=[],r.user_answer.push(n),null!=o&&o.question_id){var e,i,a,l,c=null==o||null===(e=o.sub_exercise_questions)||void 0===e?void 0:e.filter((function(e){var n;return 0===(null===(n=e.user_answer)||void 0===n?void 0:n.length)})),u=null==o||null===(i=o.sub_exercise_questions)||void 0===i?void 0:i.filter((function(e){return 3==e.question_type})),d=u.length>0?u.every((function(e){var n;return(null==e?void 0:e.multi_count)==(null==e||null===(n=e.user_answer)||void 0===n?void 0:n.length)}))?1:u.some((function(e){var n;return(null==e?void 0:e.multi_count)>(null==e||null===(n=e.user_answer)||void 0===n?void 0:n.length)}))?2:0:1;un.question_status.find((function(e){return e.ques_id===(null==o?void 0:o.question_id)})).ques_status=(null==c?void 0:c.length)===(null==o||null===(a=o.sub_exercise_questions)||void 0===a?void 0:a.length)?0:(null==c?void 0:c.length)>0&&(null==c?void 0:c.length)<(null==o||null===(l=o.sub_exercise_questions)||void 0===l?void 0:l.length)?2:d}else un.question_status.find((function(e){return e.ques_id===t})).ques_status=n?1:0;dn(s()({},un))}));case 1:case"end":return e.stop()}}),e)})));return function(n,t,i,r,o){return e.apply(this,arguments)}}(),cr=function(){var e=u()(l()().mark((function e(n,t,i,r,o,a){var c;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.replaceAll(" ","")){e.next=3;break}return Mr(),e.abrupt("return",{status:-4,message:"答案不能为空"});case 3:return e.next=5,ir(i,t,n,(function(){var e={choice_id:t,answer_text:n};if(o.user_answer.filter((function(e){return e.choice_id!=t}))?o.user_answer.splice(t-1,1,e):o.user_answer.push(e),null!=a&&a.question_id){var l,c,u,d,p=null==a||null===(l=a.sub_exercise_questions)||void 0===l?void 0:l.filter((function(e){var n;return 0===(null===(n=e.user_answer)||void 0===n?void 0:n.length)})),f=null==a||null===(c=a.sub_exercise_questions)||void 0===c?void 0:c.filter((function(e){return 3==e.question_type})),m=f.length>0?f.every((function(e){var n;return(null==e?void 0:e.multi_count)==(null==e||null===(n=e.user_answer)||void 0===n?void 0:n.length)}))?1:f.some((function(e){var n;return(null==e?void 0:e.multi_count)>(null==e||null===(n=e.user_answer)||void 0===n?void 0:n.length)}))?2:0:1;un.question_status.find((function(e){return e.ques_id===(null==a?void 0:a.question_id)})).ques_status=(null==p?void 0:p.length)===(null==a||null===(u=a.sub_exercise_questions)||void 0===u?void 0:u.length)?0:(null==p?void 0:p.length)>0&&(null==p?void 0:p.length)<(null==a||null===(d=a.sub_exercise_questions)||void 0===d?void 0:d.length)?2:m}else un.question_status.find((function(e){return e.ques_id===i})).ques_status=r.every((function(e){return!!e.answer_text}))?1:un.question_status.find((function(e){return e.ques_id===i})).ques_status=r.some((function(e){return!!e.answer_text}))?2:0;dn(s()({},un))}));case 5:return c=e.sent,e.abrupt("return",c);case 7:case"end":return e.stop()}}),e)})));return function(n,t,i,r,o,s){return e.apply(this,arguments)}}(),ur=function(){var e=u()(l()().mark((function e(n,t,i,r,o){var a;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.replaceAll(" ","")){e.next=3;break}return Mr(),e.abrupt("return",{status:-4,message:"答案不能为空"});case 3:return e.next=5,ir(i,t,n,(function(){un.question_status.find((function(e){return e.ques_id===i})).ques_status=r.every((function(e){return!!e.value}))?1:un.question_status.find((function(e){return e.ques_id===i})).ques_status=r.some((function(e){return!!e.value}))?2:0;var e={choice_id:t,answer_text:n};o.user_answer.filter((function(e){return e.choice_id!=t}))?o.user_answer.splice(t-1,1,e):o.user_answer.push(e),o.repeat_answer||(o.israp=!0),dn(s()({},un))}));case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})));return function(n,t,i,r,o){return e.apply(this,arguments)}}(),dr=function(e,n,t){var i,r,o,s,a,l,c,u="",d=0===(null==e?void 0:e.question_type)||1===(null==e?void 0:e.question_type);d&&(null==e||null===(c=e.question_choices)||void 0===c||c.forEach((function(e,n){e.standard_boolean&&(u+=Ue[n])})));var p=1===(null==un||null===(i=un.exercise)||void 0===i?void 0:i.user_exercise_status)||!e.repeat_answer&&(null==e||null===(r=e.user_answer)||void 0===r?void 0:r.length)>0&&0!==e.ques_status;return(0,D.jsxs)("div",{children:[(0,D.jsx)("div",{className:z.baseMargin,children:(0,D.jsx)(N.ZP.Group,{disabled:p,defaultValue:null==e||null===(o=e.user_answer)||void 0===o?void 0:o[0],onChange:function(i){return lr(i.target.value,null==e?void 0:e.question_id,n,e,t)},className:e.user_score&&"edu-radio-".concat(e.user_score===e.question_score?"green":"red"),children:null==e||null===(s=e.question_choices)||void 0===s?void 0:s.map((function(n,t){var i=2==e.question_type?"":"".concat(Ue[t],".");return(0,D.jsx)("div",{className:z.answerWrap,children:(0,D.jsx)(N.ZP,{className:z.noWrap,value:null==n?void 0:n.choice_id,children:(0,D.jsxs)(S.Z,{wrap:!1,align:"middle",children:[(0,D.jsx)(C.Z,{children:(0,D.jsx)("span",{style:{color:"#333333"},className:"font16 mr3",children:i})}),(0,D.jsx)(C.Z,{children:(0,D.jsx)(Y.Z,{className:z.renderHtml,value:null==n?void 0:n.choice_text})})]})})},t)}))})}),((0,W.GJ)()||(0,W.dE)()&&(null==un||null===(a=un.exercise)||void 0===a?void 0:a.user_exercise_status)>0&&(null==un||null===(l=un.exercise)||void 0===l?void 0:l.open_score))&&(0,D.jsxs)(S.Z,{justify:"end",className:"mb20",align:"middle",children:[(0,D.jsx)("span",{className:"font14",style:{color:"#6A7283"},children:"得分"}),(0,D.jsxs)("span",{className:"font14 ml10",children:[(null==e?void 0:e.user_score)&&(0,D.jsxs)("span",{children:[(0,D.jsx)("span",{className:Ve[Number(null==e?void 0:e.answer_status)]||"c-orange-ff9",children:null==e?void 0:e.user_score}),(0,D.jsx)("span",{style:{marginLeft:5,color:"#6A7283"},children:"分"})]}),!(null!=e&&e.user_score)&&(0,D.jsx)("span",{className:"c-red",children:"未评"})]})]}),(null==e?void 0:e.standard_answer_show)&&(0,D.jsx)("div",{className:z.analysisWrap,children:(0,D.jsxs)("div",{className:z.greyBg,children:[(0,D.jsxs)(S.Z,{className:"mb20",children:[(0,D.jsx)(C.Z,{className:"font14 mr10",style:{color:"#6A7283"},children:"【答案】"}),(0,D.jsx)(C.Z,{children:d?u:null==e?void 0:e.standard_answer_show})]}),(0,D.jsxs)(S.Z,{children:[(0,D.jsx)("span",{className:"font14 mr10",style:{color:"#6A7283"},children:"【解析】"}),(0,D.jsx)(Y.Z,{className:z.renderHtml,value:null==e?void 0:e.analysis})]})]})})]})},pr=function(e,n,t){var i,r;1===(null==un||null===(i=un.exercise)||void 0===i?void 0:i.user_exercise_status)||!e.repeat_answer&&e.ques_status;return(0,D.jsx)("div",{children:null==e||null===(r=e.sub_exercise_questions)||void 0===r?void 0:r.map((function(n,i){var r;return null==n||null===(r=n.question_choices)||void 0===r||r.forEach((function(e,n){e.standard_boolean&&Ue[n]})),(0,D.jsxs)("div",{className:"".concat(z.baseMargin," ").concat(z.singleItem," mb20"),children:[(0,D.jsxs)("div",{style:{display:"flex",alignItems:"baseline",userSelect:"none",marginBottom:40},children:[(0,D.jsxs)("span",{style:{flexShrink:0,color:"#999999"},className:"font14",children:["",null==n?void 0:n.question_score,"分)"]}),(0,D.jsx)("span",{style:{flexShrink:0,marginRight:6},className:"font16",children:t+1+"."+(i+1)}),(0,D.jsx)(Y.Z,{value:null==n?void 0:n.question_title})]}),(0==(null==n?void 0:n.question_type)||2==(null==n?void 0:n.question_type))&&dr(n,null==n?void 0:n.question_type,e),1==(null==n?void 0:n.question_type)&&wr(n,null==n?void 0:n.question_type,e),3==(null==n?void 0:n.question_type)&&yr(n,null==n?void 0:n.question_type,e),4==(null==n?void 0:n.question_type)&&br(n,null==n?void 0:n.question_type,e)]},i)}))})};console.log("----",un);var fr,mr,hr,vr,gr,xr,_r,wr=function(e,n,t){var i,r,o,a,l,c,u="",d=0===(null==e?void 0:e.question_type)||1===(null==e?void 0:e.question_type);d&&(null==e||null===(c=e.question_choices)||void 0===c||c.forEach((function(e,n){e.standard_boolean&&(u+=Ue[n])})));var p=1===(null==un||null===(i=un.exercise)||void 0===i?void 0:i.user_exercise_status)||!e.repeat_answer&&(null==e||null===(r=e.user_answer)||void 0===r?void 0:r.length)>0&&0!==e.ques_status;return(0,D.jsxs)("div",{children:[(0,D.jsx)("div",{className:z.baseMargin,children:(0,D.jsx)(B.Z.Group,{disabled:p,defaultValue:null==e?void 0:e.user_answer,style:{flexDirection:"column"},onChange:function(n){return function(e,n,t,i){null!=e&&e.length&&ir(n,e,null,(function(){if(t.user_answer=e,null!=i&&i.question_id){var r,o,a,l,c=null==i||null===(r=i.sub_exercise_questions)||void 0===r?void 0:r.filter((function(e){var n;return 0===(null===(n=e.user_answer)||void 0===n?void 0:n.length)})),u=null==i||null===(o=i.sub_exercise_questions)||void 0===o?void 0:o.filter((function(e){return 3==e.question_type})),d=u.length>0?u.every((function(e){var n;return(null==e?void 0:e.multi_count)==(null==e||null===(n=e.user_answer)||void 0===n?void 0:n.length)}))?1:u.some((function(e){var n;return(null==e?void 0:e.multi_count)>(null==e||null===(n=e.user_answer)||void 0===n?void 0:n.length)}))?2:0:1;un.question_status.find((function(e){return e.ques_id===(null==i?void 0:i.question_id)})).ques_status=(null==c?void 0:c.length)===(null==i||null===(a=i.sub_exercise_questions)||void 0===a?void 0:a.length)?0:(null==c?void 0:c.length)>0&&(null==c?void 0:c.length)<(null==i||null===(l=i.sub_exercise_questions)||void 0===l?void 0:l.length)?2:d}else un.question_status.find((function(e){return e.ques_id===n})).ques_status=null!=e&&e.length?1:0;dn(s()({},un))}))}(n,null==e?void 0:e.question_id,e,t)},className:e.user_score&&"edu-checkbox-".concat(e.user_score===e.question_score?"green":"red"),children:null==e||null===(o=e.question_choices)||void 0===o?void 0:o.map((function(e,n){var t="".concat(Ue[n],".");return(0,D.jsx)("div",{className:z.answerWrap,children:(0,D.jsx)(B.Z,{value:null==e?void 0:e.choice_id,children:(0,D.jsxs)(S.Z,{wrap:!1,align:"middle",children:[(0,D.jsx)(C.Z,{children:(0,D.jsx)("span",{style:{color:"#333333",whiteSpace:"nowrap"},className:"font16 mr3",children:t})}),(0,D.jsx)(C.Z,{children:(0,D.jsx)(Y.Z,{className:z.renderHtml,value:null==e?void 0:e.choice_text})})]})})})}))})}),((0,W.GJ)()||(0,W.dE)()&&(null==un||null===(a=un.exercise)||void 0===a?void 0:a.user_exercise_status)>0&&(null==un||null===(l=un.exercise)||void 0===l?void 0:l.open_score))&&(0,D.jsxs)(S.Z,{justify:"end",className:"mb20",align:"middle",children:[(0,D.jsx)("span",{className:"font14",style:{color:"#6A7283"},children:"得分"}),(0,D.jsxs)("span",{className:"font14 ml10",children:[(null==e?void 0:e.user_score)&&(0,D.jsxs)("span",{children:[(0,D.jsx)("span",{className:Ve[Number(null==e?void 0:e.answer_status)]||"c-orange-ff9",children:null==e?void 0:e.user_score}),(0,D.jsx)("span",{style:{marginLeft:5,color:"#6A7283"},children:"分"})]}),!(null!=e&&e.user_score)&&(0,D.jsx)("span",{className:"c-red",children:"未评"})]})]}),(null==e?void 0:e.standard_answer_show)&&(0,D.jsx)("div",{className:z.analysisWrap,children:(0,D.jsxs)("div",{className:z.greyBg,children:[(0,D.jsxs)(S.Z,{className:"mb20",children:[(0,D.jsx)(C.Z,{className:"font14 mr10",style:{color:"#6A7283"},children:"【答案】"}),(0,D.jsx)(C.Z,{children:d?u:null==e?void 0:e.standard_answer_show})]}),(0,D.jsxs)(S.Z,{children:[(0,D.jsx)("span",{className:"font14 mr10",style:{color:"#6A7283"},children:"【解析】"}),(0,D.jsx)(Y.Z,{className:z.renderHtml,value:null==e?void 0:e.analysis})]})]})})]})},yr=function(e,n,t){return(0,D.jsx)(fe,{item:e,sign:Tr,answerData:un,onBlur:function(){var n=u()(l()().mark((function n(i,r,o){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,cr(i,r,null==e?void 0:e.question_id,o,e,t);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})));return function(e,t,i){return n.apply(this,arguments)}}()})},br=function(e,n,t){return vt?(0,D.jsx)(ee,{item:e,answerData:un,onBlur:function(n,t,i){return ir(null==e?void 0:e.question_id,null,n,void 0,t,i)},isEducation:vt}):(0,D.jsx)(Q,{item:e,answerData:un,onBlur:function(n,i){return function(e,n,t,i,r){e.replaceAll(" ","")?ir(n,null,e,(function(){if(t.user_answer=[],t.user_answer.push(e),null!=r&&r.question_id){var i,o,a,l,c=null==r||null===(i=r.sub_exercise_questions)||void 0===i?void 0:i.filter((function(e){var n;return 0===(null===(n=e.user_answer)||void 0===n?void 0:n.length)})),u=null==r||null===(o=r.sub_exercise_questions)||void 0===o?void 0:o.filter((function(e){return 3==e.question_type})),d=u.length>0?u.every((function(e){var n;return(null==e?void 0:e.multi_count)==(null==e||null===(n=e.user_answer)||void 0===n?void 0:n.length)}))?1:u.some((function(e){var n;return(null==e?void 0:e.multi_count)>(null==e||null===(n=e.user_answer)||void 0===n?void 0:n.length)}))?2:0:1;un.question_status.find((function(e){return e.ques_id===(null==r?void 0:r.question_id)})).ques_status=(null==c?void 0:c.length)===(null==r||null===(a=r.sub_exercise_questions)||void 0===a?void 0:a.length)?0:(null==c?void 0:c.length)>0&&(null==c?void 0:c.length)<(null==r||null===(l=r.sub_exercise_questions)||void 0===l?void 0:l.length)?2:d}else un.question_status.find((function(e){return e.ques_id===n})).ques_status=e?1:0;dn(s()({},un))}),void 0,void 0,i):Mr()}(n,null==e?void 0:e.question_id,e,i,t)},isEducation:vt,sign:Tr})},jr=function(e,n){return(0,D.jsx)(le,{item:e,answerData:un,exerciseId:an.categoryId,coursesId:an.coursesId})},kr=function(e,n){return(0,D.jsx)(ue,{item:e,answerData:un})},Sr=function(e,n){return(0,D.jsx)(ve,{setIsSubmitCode:kt,item:e,sign:Tr,answerData:un,onBlur:function(){var n=u()(l()().mark((function n(t,i,r){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ur(t,i,null==e?void 0:e.question_id,r,e);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})));return function(e,t,i){return n.apply(this,arguments)}}()})},Cr=function(e,n,t){var i,r,o=null==un||null===(i=un.exercise_question_types)||void 0===i?void 0:i.find((function(e){return e.question_type===n}));return(0,D.jsxs)("div",{className:z.answerSheetWrap,children:[(0,D.jsxs)("div",{className:z.answerSheetQuestionTitle,onClick:function(){xn[n]=!xn[n],_n(s()({},xn))},children:[!xn[n]&&(0,D.jsx)(Z.Z,{}),xn[n]&&(0,D.jsx)(I.Z,{}),(0,D.jsx)("span",{className:"ml5 c-grey-666",children:e})]}),!xn[n]&&(0,D.jsx)(S.Z,{className:z.answerSheet,gutter:[20,20],children:null==o||null===(r=o.items)||void 0===r?void 0:r.map((function(e,i){var r,o,s,a,l,c;if(e.question_type===n)return(0,D.jsx)(C.Z,{children:(0,D.jsxs)("div",{onClick:function(){if(t!==Yt||i!==$t)return Tr.current?(Tr.current="appoint",void(Er.current={oneindex:t,twoindex:i})):void Lr({oneindex:t,twoindex:i})},className:"\n ".concat(z.answerSheetItem,"\n ").concat(null!=un&&null!==(r=un.question_status)&&void 0!==r&&r.some((function(n){var t,i;return n.ques_id===e.question_id&&1===(null==n?void 0:n.ques_status)&&3!==(null==un||null===(t=un.exercise)||void 0===t?void 0:t.exercise_status)&&!(null!=un&&null!==(i=un.exercise)&&void 0!==i&&i.open_score_commited)}))?z.active:"","\n ").concat(null!=un&&null!==(o=un.question_status)&&void 0!==o&&o.some((function(n){var t,i;return n.ques_id===e.question_id&&2===(null==n?void 0:n.ques_status)&&3!==(null==un||null===(t=un.exercise)||void 0===t?void 0:t.exercise_status)&&!(null!=un&&null!==(i=un.exercise)&&void 0!==i&&i.open_score_commited)}))?z.partialActive:"","\n ").concat(null!=un&&null!==(s=un.question_status)&&void 0!==s&&s.some((function(n){var t,i;return n.ques_id===e.question_id&&1===(null==n?void 0:n.score_status)&&(3===(null==un||null===(t=un.exercise)||void 0===t?void 0:t.exercise_status)||(null==un||null===(i=un.exercise)||void 0===i?void 0:i.open_score_commited))}))?z.yes:"","\n ").concat(null!=un&&null!==(a=un.question_status)&&void 0!==a&&a.some((function(n){var t,i;return n.ques_id===e.question_id&&2===(null==n?void 0:n.score_status)&&(3===(null==un||null===(t=un.exercise)||void 0===t?void 0:t.exercise_status)||(null==un||null===(i=un.exercise)||void 0===i?void 0:i.open_score_commited))}))?z.no:"","\n ").concat(null!=un&&null!==(l=un.question_status)&&void 0!==l&&l.some((function(n){var t,i;return n.ques_id===e.question_id&&3===(null==n?void 0:n.score_status)&&(3===(null==un||null===(t=un.exercise)||void 0===t?void 0:t.exercise_status)||(null==un||null===(i=un.exercise)||void 0===i?void 0:i.open_score_commited))}))?z.bf:"","\n\n ").concat(t===Yt&&i===$t?z.selected:"","\n "),children:[(0,D.jsx)("span",{className:z.qindex,children:i+1}),(null==un||null===(c=un.question_status)||void 0===c?void 0:c.some((function(n){var t;return n.ques_id===e.question_id&&2===(null==n?void 0:n.ques_status)&&3!==(null==un||null===(t=un.exercise)||void 0===t?void 0:t.exercise_status)})))&&(0,D.jsx)("div",{style:{height:12,background:"rgba(22,93,255,0.4)",position:"absolute",width:"100%",bottom:0}}),e.is_marked&&(0,D.jsx)("i",{className:"iconfont icon-biaoji1 ".concat(z.markIcon)})]},i)})}))},n)]})},Nr=function(e,n){var t,i,r,o;0!==(null==e?void 0:e.question_type)&&1!==(null==e?void 0:e.question_type)||(null==e||null===(o=e.question_choices)||void 0===o||o.forEach((function(e,n){e.standard_boolean&&Ue[n]})));return(0,D.jsxs)("div",{className:z.questionItem,id:"Anchor_".concat(null==e?void 0:e.question_type,"_").concat(n),children:[(0,D.jsxs)("div",{style:{display:"flex",alignItems:"baseline",marginBottom:40,userSelect:"none"},children:[(0,D.jsxs)("span",{className:"".concat(z.questionScore," mr10"),children:[null==e?void 0:e.question_score,"分"]}),(0,D.jsxs)("span",{className:"font16 ".concat(z.noWrap),children:[n+1,"、"]}),(0,D.jsx)(Y.Z,{value:8===(null==e?void 0:e.question_type)?null==e?void 0:e.description:null==e?void 0:e.question_title}),!(null==e||null===(t=e.schools)||void 0===t||!t.length)&&(0,D.jsx)(T.Z,{title:"该实训题面向指定单位开放",children:(0,D.jsx)("i",{className:"iconfont icon-zhidinggongkai1 line24 font18 c-orange"})})]}),0==(null==e?void 0:e.question_type)&&dr(e,null==e?void 0:e.question_type),2==(null==e?void 0:e.question_type)&&dr(e,null==e?void 0:e.question_type),1==(null==e?void 0:e.question_type)&&wr(e,null==e?void 0:e.question_type),3==(null==e?void 0:e.question_type)&&yr(e,null==e?void 0:e.question_type),4==(null==e?void 0:e.question_type)&&br(e,null==e?void 0:e.question_type),5==(null==e?void 0:e.question_type)&&0===(null==un||null===(i=un.exercise)||void 0===i?void 0:i.user_exercise_status)&&3!=(null==e?void 0:e.answer_status)&&(0,D.jsx)("div",{style:{margin:"-28px 0 12px 62px"},children:(0,D.jsxs)(S.Z,{justify:"space-between",align:"middle",children:[(0,D.jsx)(C.Z,{children:(0,D.jsx)("span",{className:"font14 c-grey-666",children:"任务关卡"})}),(0,D.jsx)(C.Z,{children:(0,D.jsx)(Le.Z,{type:"primary",className:z.toIframeBtn,onClick:u()(l()().mark((function n(){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,nr(e);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)}))),children:"进入答题"})})]})}),5==(null==e?void 0:e.question_type)&&jr(e,null==e||e.question_type),(0,W.dE)()&&0===(null==un||null===(r=un.exercise)||void 0===r?void 0:r.user_exercise_status)&&6==(null==e?void 0:e.question_type)&&(0,D.jsx)("div",{style:{margin:"-28px 0 -25px"},children:(0,D.jsx)(S.Z,{justify:"end",align:"middle",children:(0,D.jsx)(C.Z,{children:(0,D.jsx)(Le.Z,{type:"primary",className:z.toIframeBtn,onClick:function(){return tr(e)},children:"进入答题"})})})}),6==(null==e?void 0:e.question_type)&&kr(e,null==e||e.question_type),7==(null==e?void 0:e.question_type)&&pr(e,null==e||e.question_type,n),8==(null==e?void 0:e.question_type)&&Sr(e,null==e||e.question_type),(null==e?void 0:e.answer_comments)&&(0,D.jsx)(Te,{hideScore:!0,list:null==e?void 0:e.answer_comments})]})},Br=function(e,n){return(0,D.jsx)(h.Fragment,{children:Cr((null==e?void 0:e.name)||Ge.f[e.question_type].name,e.question_type,n)})},Tr=(0,h.useRef)(!1),Er=(0,h.useRef)({}),Pr=(0,h.useRef)(),Ar=(0,h.useRef)({}),Zr=function(){var e,n,t,i;window.blur();var r,o=null===(e=un.exercise_question_types)||void 0===e||null===(e=e[Yt])||void 0===e||null===(e=e.items)||void 0===e?void 0:e[$t];if(!ai&&0===(null==un||null===(n=un.exercise)||void 0===n?void 0:n.user_exercise_status)&&(0,W.dE)()&&((null==o||!o.repeat_answer)&&(null==o||null===(r=o.user_answer)||void 0===r?void 0:r.length)>0&&0===(null==o?void 0:o.ques_status)))return Pr.current="prev",void ri(!0);(null==o||!o.repeat_answer)&&(null==o||null===(t=o.user_answer)||void 0===t?void 0:t.length)>0&&(o.ques_status=1),Pi.current.scrollTo({top:0,left:0,behavior:"smooth"}),0===$t?(Yt-=1,$t=un.exercise_question_types[Yt].items.length-1):$t-=1,8!=(null==o?void 0:o.question_type)||jt||setTimeout((function(){Wi(o)}),500),Bt(null==un||null===(i=un.exercise_question_types)||void 0===i||null===(i=i[Yt])||void 0===i||null===(i=i.items)||void 0===i?void 0:i[$t]),kt(!1),Jt(Yt),ei($t)},Ir=function(){var e,n,t,i,r;window.blur();var o,s=null===(e=un.exercise_question_types)||void 0===e||null===(e=e[Yt])||void 0===e||null===(e=e.items)||void 0===e?void 0:e[$t];if(!ai&&0===(null==un||null===(n=un.exercise)||void 0===n?void 0:n.user_exercise_status)&&(0,W.dE)()&&((null==s||!s.repeat_answer)&&(null==s||null===(o=s.user_answer)||void 0===o?void 0:o.length)>0&&0===(null==s?void 0:s.ques_status)))return Pr.current="next",void ri(!0);(null==s||!s.repeat_answer)&&(null==s||null===(t=s.user_answer)||void 0===t?void 0:t.length)>0&&(s.ques_status=1),Pi.current.scrollTo({top:0,left:0,behavior:"smooth"}),(null==un||null===(i=un.exercise_question_types[Yt])||void 0===i||null===(i=i.items)||void 0===i?void 0:i.length)-1===$t?(Yt+=1,$t=0):$t+=1,8!=(null==s?void 0:s.question_type)||jt||setTimeout((function(){Wi(s)}),500),Bt(null==un||null===(r=un.exercise_question_types)||void 0===r||null===(r=r[Yt])||void 0===r||null===(r=r.items)||void 0===r?void 0:r[$t]),kt(!1),Jt(Yt),ei($t)},Lr=function(e){var n,t,i,r,o,s=e||Er.current,a=null===(n=un.exercise_question_types)||void 0===n||null===(n=n[Yt])||void 0===n||null===(n=n.items)||void 0===n?void 0:n[$t];if(!ai&&0===(null==un||null===(t=un.exercise)||void 0===t?void 0:t.user_exercise_status)&&(0,W.dE)()&&((null==a||!a.repeat_answer)&&(null==a||null===(o=a.user_answer)||void 0===o?void 0:o.length)>0&&0===(null==a?void 0:a.ques_status)))return Pr.current="appoint",Ar.current=s,void ri(!0);(null==a||!a.repeat_answer)&&(null==a||null===(i=a.user_answer)||void 0===i?void 0:i.length)>0&&(a.ques_status=1),8!=(null==a?void 0:a.question_type)||jt||setTimeout((function(){Wi(a)}),500),Bt(null==un||null===(r=un.exercise_question_types)||void 0===r||null===(r=r[null==s?void 0:s.oneindex])||void 0===r||null===(r=r.items)||void 0===r?void 0:r[null==s?void 0:s.twoindex]),kt(!1),Jt(null==s?void 0:s.oneindex),ei(null==s?void 0:s.twoindex),Pi.current.scrollTo({top:0,left:0,behavior:"smooth"})},qr=function(){var e=u()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Tr.current){e.next=3;break}return Tr.current="refresh",e.abrupt("return");case 3:return e.next=5,Vi();case 5:if(t=e.sent,null==un||null===(n=un.exercise)||void 0===n||!n.left_time){e.next=9;break}return e.next=9,Ji(!0);case 9:null!=t&&t.status||j.ZP.success("更新成功");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Mr=function(){var e,n;switch(Tr.current){case"prev":Zr();break;case"next":Ir();break;case"appoint":Lr();break;case"submit":rr(!1);break;case"refresh":qr()}"edu-program-fill"===(null===(e=document.activeElement)||void 0===e?void 0:e.name)||"sign"===(null===(n=document.activeElement)||void 0===n?void 0:n.name)?Tr.current=!0:Tr.current=!1,Er.current={}};return(0,D.jsxs)(E.Z,{size:"middle",spinning:bn,children:[In&&0===(null==un||null===(o=un.exercise)||void 0===o?void 0:o.user_exercise_status)&&(0,D.jsx)(q.Z,{exerciseUserInfo:nn.exerciseUserInfo,iframe:Mt,handleToDetail:Yi,socket:Ut,onStartScreenshot:function(){null!=mn&&mn.screen_shot_open&&zn(!0)},onCloseScreenshot:function(){null!=mn&&mn.screen_shot_open&&zn(!1)}}),(0,D.jsx)(O,{id:an.categoryId,startRecording:Rn,startScreenshot:Gn,onSuccuss:function(){Ln(null==mn?void 0:mn.screen_open),Vi()},onBack:Yi}),(0,D.jsx)("iframe",{style:{display:et},id:"iframeShixuns",className:z.iframe,src:Jn,ref:Mt,frameBorder:"0"}),-2!==lt.status&&-1!==lt.status&&(0,D.jsx)("div",{className:z.fixHeader,children:(0,D.jsxs)(S.Z,{wrap:!1,align:"middle",className:"edu-container",children:[(0,D.jsx)(C.Z,{children:(0,M.vB)(null==un||null===(a=un.exercise)||void 0===a?void 0:a.exercise_status)}),(0,D.jsx)(C.Z,{className:"".concat(z.exerciseTitle," ml10"),title:null==un||null===(c=un.exercise)||void 0===c?void 0:c.exercise_name,children:null==un||null===(d=un.exercise)||void 0===d?void 0:d.exercise_name}),(0,D.jsx)(C.Z,{style:{marginLeft:"auto"},children:1===(null==un||null===(f=un.exercise)||void 0===f?void 0:f.user_exercise_status)&&(0,D.jsx)(P.ZP,{className:z.changeButton,type:"primary",onClick:function(){v.history.push("/classrooms/".concat(an.coursesId,"/exercise/").concat(an.categoryId,"/detail"))},children:"返回"})}),!((0,W.GJ)()||(0,W.dE)()&&1==(null==un||null===(g=un.exercise)||void 0===g?void 0:g.user_exercise_status))&&!(null==un||null===(_=un.exercise)||void 0===_||!_.left_time)&&(0,D.jsx)(C.Z,{style:{marginLeft:"auto"},children:(0,D.jsxs)("aside",{className:"".concat(z.countDown," ").concat(rt),children:[(0,D.jsx)("i",{className:"iconfont icon-daojishi",style:{marginRight:6}}),(0,D.jsx)("span",{className:z.cnText,children:"剩余答题时长"}),(0,D.jsx)(We,{value:Un,onFinish:function(){return Ji()}})]})}),(0,D.jsx)(C.Z,{children:!((0,W.GJ)()||(0,W.dE)()&&1==(null==un||null===(F=un.exercise)||void 0===F?void 0:F.user_exercise_status))&&"student-unlock"!==nn.actionTabs.key&&_t&&(0,D.jsxs)(Le.Z,{className:"".concat(z.refreshBtn," ml30"),onClick:qr,children:[(0,D.jsx)("span",{className:"iconfont icon-shuaxin2 mr5"}),"刷新"]})}),(0,D.jsx)(C.Z,{children:(0,W.dE)()&&0===(null==un||null===(J=un.exercise)||void 0===J?void 0:J.user_exercise_status)&&(0,D.jsx)(Le.Z,{className:"".concat(z.submitButton," ml10"),type:"primary",onClick:u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Tr.current){e.next=3;break}return Tr.current="submit",e.abrupt("return");case 3:return e.next=5,rr(!1);case 5:case"end":return e.stop()}}),e)}))),children:(0,ze._V)(ze.CP.answer7)})}),(0,D.jsx)(C.Z,{children:(null==un||null===(X=un.exercise)||void 0===X?void 0:X.forbid_screen)&&(0,D.jsx)(P.ZP,{className:"".concat(z.submitButton," ml10"),type:"primary",onClick:function(){At(!0)},children:(0,ze._V)(ze.CP.answer12)})}),(0,D.jsx)(C.Z,{children:(1==(null==un||null===($=un.exercise)||void 0===$?void 0:$.commit_status)||3==(null==un||null===(ne=un.exercise)||void 0===ne?void 0:ne.exercise_status))&&(null==un||null===(te=un.exercise_answer_user)||void 0===te?void 0:te.analysis)&&(0,D.jsxs)("span",{className:z.teachAnalysis,onClick:function(){return Li(!0)},children:[(0,D.jsx)("i",{className:"iconfont icon-jiaoshipingjia"}),(0,D.jsx)("span",{className:"ml5",children:"教师评价"})]})})]})}),(0,D.jsxs)("section",{className:"edu-container ".concat(z.wrapper," ").concat(vt&&z.wrpAnswer),children:[(null==un||null===(ie=un.exercise)||void 0===ie||null===(ie=ie.exercise_description)||void 0===ie?void 0:ie.length)>0&&(0,D.jsx)(A.Z,{className:z.exerciseAlert,description:(0,D.jsxs)(S.Z,{wrap:!1,gutter:10,align:"top",children:[(0,D.jsx)(C.Z,{className:z.title,children:"考试须知"}),(0,D.jsx)(C.Z,{className:z.content,children:null==un||null===(re=un.exercise)||void 0===re?void 0:re.exercise_description})]}),closable:!0}),0===lt.status&&(0,D.jsxs)(S.Z,{className:"".concat(vt?"mt70":""," ").concat(z.mainPart),wrap:!1,children:[(0,D.jsx)(C.Z,{flex:Cn?"280px":"0px",className:vt?"mb100":"",children:(0,D.jsxs)("div",{className:z.leftPart,children:[(0,D.jsxs)("section",{children:[Cn&&(0,D.jsxs)(C.Z,{flex:"1",style:{background:"#fff",marginBottom:"10px",padding:"20px"},children:[(0,D.jsxs)("div",{style:{marginBottom:15},children:[(0,D.jsx)("span",{style:{color:"#5F6368"},children:"姓名"}),(0,D.jsx)("span",{className:"ml10 ".concat(z.userInfoText),children:(null==un||null===(oe=un.exercise)||void 0===oe?void 0:oe.user_name)||"- -"})]}),(0,D.jsxs)("div",{children:[(0,D.jsx)("span",{style:{color:"#5F6368"},children:"学号"}),(0,D.jsx)("span",{className:"ml10 ".concat(z.userInfoText),children:(null==un||null===(se=un.exercise)||void 0===se?void 0:se.student_id)||"- -"})]})]}),Cn&&(0,W.dE)()&&0===(null===(ae=un.exercise)||void 0===ae?void 0:ae.user_exercise_status)&&(null===(ce=un.exercise)||void 0===ce?void 0:ce.open_phone_video_recording)&&(0,D.jsxs)(S.Z,{className:z.eduQrcode,style:{marginTop:10},align:"middle",children:[(0,D.jsx)(C.Z,{children:(0,D.jsx)(x(),{value:"https://".concat(document.domain,"/live-push.html?id=").concat(an.categoryId,"&login=").concat(an.login,"&cookie=").concat((0,M.ej)("_educoder_session"))})}),(0,D.jsxs)(C.Z,{className:"ml15",children:["打开微信扫一扫",(0,D.jsx)("br",{}),"开启手机视频录制"]})]}),Cn&&(0,D.jsxs)("aside",{className:"bg-white",children:[(0,D.jsxs)("aside",{className:z.answerInfo,children:[(0,D.jsxs)(S.Z,{justify:"space-between",children:[(0,D.jsx)(C.Z,{children:"答题进度"}),(0,D.jsxs)(C.Z,{className:z.answerProgress,children:[(0,D.jsx)("span",{style:{color:"#165DFF"},children:null==un||null===(de=un.question_status)||void 0===de||null===(de=de.filter((function(e){return 1===e.ques_status})))||void 0===de?void 0:de.length}),(0,D.jsxs)("span",{style:{color:"#999999"},children:["/",null==un||null===(pe=un.exercise_types)||void 0===pe?void 0:pe.q_counts]})]})]}),(0,D.jsx)(S.Z,{children:(0,D.jsx)(k.Z,{strokeColor:"#165dffa6",trailColor:"#0000000d",percent:(null==un||null===(me=un.question_status)||void 0===me||null===(me=me.filter((function(e){return 1===e.ques_status})))||void 0===me?void 0:me.length)/(null==un||null===(he=un.exercise_types)||void 0===he?void 0:he.q_counts)*100,showInfo:!1})}),(0,D.jsx)(S.Z,{children:(0,D.jsxs)(C.Z,{children:[(0,D.jsxs)("span",{className:"c-grey-333",children:["共 ",(0,D.jsx)("span",{style:{color:"#165DFF"},children:(null==un||null===(ge=un.exercise_types)||void 0===ge?void 0:ge.q_counts)||(null==un||null===(ye=un.exercise_scores)||void 0===ye||null===(ye=ye.exercise_types)||void 0===ye?void 0:ye.q_counts)})," 题:"]}),(0,D.jsxs)("span",{className:"c-grey-333",children:["满分 ",(0,D.jsx)("span",{style:{color:"#FA6400"},children:(null==un||null===(be=un.exercise_types)||void 0===be?void 0:be.q_scores)||(null==un||null===(je=un.exercise_scores)||void 0===je||null===(je=je.exercise_types)||void 0===je?void 0:je.q_scores)})," 分"]})]})})]}),(0,D.jsxs)(S.Z,{className:z.dottedLineWrapper,align:"middle",children:[(0,D.jsx)(C.Z,{className:z.leftHalfCircle}),(0,D.jsx)(C.Z,{flex:1,className:z.dottedLine}),(0,D.jsx)(C.Z,{className:z.rightHalfCircle})]}),(0,D.jsx)(S.Z,{children:(0,D.jsx)(C.Z,{flex:"1",children:(0,D.jsx)("aside",{className:"".concat(z.cardList," ").concat(null!==(ke=un.exercise)&&void 0!==ke&&ke.open_phone_video_recording?z.withQrcode:""),children:null==un||null===(Se=un.exercise_question_types)||void 0===Se?void 0:Se.map((function(e,n){return(0,D.jsx)(h.Fragment,{children:Br(e,n)},e.question_type)}))})})})]})]}),(0,W.dE)()&&3!==(null==un||null===(Ce=un.exercise)||void 0===Ce?void 0:Ce.exercise_status)&&!(null!=un&&null!==(Ne=un.exercise)&&void 0!==Ne&&Ne.open_score_commited)&&(0,D.jsxs)(S.Z,{justify:"space-around",align:"middle",className:z.answerSheetBottom,children:[(0,D.jsxs)(C.Z,{className:z.tooltipWrap,children:[(0,D.jsx)("span",{className:z.answerYes}),"已答"]}),(0,D.jsxs)(C.Z,{className:z.tooltipWrap,children:[(0,D.jsx)("span",{className:"".concat(z.answerNo," ml10"),children:(0,D.jsx)("div",{style:{height:"50%",width:"100%",background:"rgba(22,93,255,0.4)"}})}),"部分答题"]}),(0,D.jsxs)(C.Z,{className:z.tooltipWrap,children:[(0,D.jsx)("span",{className:"".concat(z.answerNo," ml10")}),"未答"]}),(0,D.jsxs)(C.Z,{className:z.tooltipWrap,children:[(0,D.jsx)("i",{className:"iconfont icon-biaoji1",style:{marginRight:4,color:"#FFB538"}}),"标记"]})]}),(0,W.dE)()&&(3===(null==un||null===(Be=un.exercise)||void 0===Be?void 0:Be.exercise_status)||(null==un||null===(Pe=un.exercise)||void 0===Pe?void 0:Pe.open_score_commited))&&(0,D.jsxs)(S.Z,{justify:"space-around",align:"middle",className:z.answerSheetBottom,children:[(0,D.jsxs)(C.Z,{className:z.tooltipWrap,children:[(0,D.jsx)("span",{className:z.answerYes,style:{background:"#028D01",height:8,width:8,borderRadius:"50%"}}),"正确"]}),(0,D.jsxs)(C.Z,{className:z.tooltipWrap,children:[(0,D.jsx)("span",{style:{background:"#FB3226",height:8,width:8,borderRadius:"50%"},className:"".concat(z.answerNo," ml10")}),"错误"]}),(0,D.jsxs)(C.Z,{className:z.tooltipWrap,children:[(0,D.jsx)("span",{style:{background:"#E77400",height:8,width:8,borderRadius:"50%"},className:"".concat(z.answerNo," ml10")}),"部分得分"]}),(0,D.jsxs)(C.Z,{className:z.tooltipWrap,children:[(0,D.jsx)("i",{className:"iconfont icon-biaoji1",style:{marginRight:4,color:"#FFB538"}}),"标记"]})]})]})}),(0,D.jsx)(C.Z,{children:(0,D.jsxs)("div",{className:z.fold,onClick:function(){return Nn(!Cn)},children:[Cn&&(0,D.jsx)(T.Z,{title:"收起答题卡",children:(0,D.jsx)("span",{className:"icon-zuojiantou iconfont c-grey-c"})}),!Cn&&(0,D.jsxs)(T.Z,{title:"展开",children:[" ",(0,D.jsx)("span",{className:"icon-youjiantou iconfont c-grey-c"})]})]})}),(0,D.jsx)(C.Z,{flex:"1",children:(0,D.jsxs)("section",{className:[z.rightPart,"ml20"].join(" "),children:[(0,D.jsx)("div",{className:"".concat(z.questionPart," pl30 pr30"),ref:Pi,children:(_r=null==un||null===(fr=un.exercise_question_types)||void 0===fr||null===(fr=fr[Yt].items)||void 0===fr?void 0:fr[$t],(0,D.jsxs)(h.Fragment,{children:[(0,D.jsxs)("div",{className:"pt20 mb20",children:[(0,D.jsxs)("span",{className:z.questionTypeTitle,children:[(0,M.EM)(Yt+1),"、",null==un||null===(mr=un.exercise_question_types)||void 0===mr||null===(mr=mr[Yt])||void 0===mr?void 0:mr.name]}),(0,D.jsxs)("span",{className:z.questionTypeInfo,children:["(共",null==un||null===(hr=un.exercise_question_types)||void 0===hr||null===(hr=hr[Yt])||void 0===hr?void 0:hr.count,"题;",7===(null==un||null===(vr=un.exercise_question_types)||void 0===vr||null===(vr=vr[Yt])||void 0===vr?void 0:vr.question_type)?"包含".concat(null==un||null===(gr=un.exercise_question_types)||void 0===gr||null===(gr=gr[Yt])||void 0===gr?void 0:gr.sub_questions_count,"小题"):""," 共",null==un||null===(xr=un.exercise_question_types)||void 0===xr||null===(xr=xr[Yt])||void 0===xr?void 0:xr.score,"分)"]}),!(null!=_r&&_r.repeat_answer)&&(0,D.jsx)("span",{style:{color:"#E30000",marginLeft:20,fontSize:14},children:"注意:该题作答之后不允许修改答案。"})]}),(0,D.jsx)(h.Fragment,{children:Nr(_r,$t)},$t)]},Yt))}),(0,D.jsxs)(S.Z,{className:z.bottom,align:"middle",justify:"space-between",children:[(0,D.jsx)(C.Z,{children:(0,D.jsx)(Le.Z,{icon:(0,D.jsx)("i",{className:"iconfont ".concat(null!==(Me=un.exercise_question_types)&&void 0!==Me&&null!==(Me=Me[Yt].items[$t])&&void 0!==Me&&Me.is_marked?"icon-biaoji1":"icon-biaojigaiti"),style:{color:"#FFB538",marginRight:6}}),className:z.markBtn,onClick:u()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.sS)(an.categoryId,{exercise_question_id:null===(n=un.exercise_question_types[Yt].items[$t])||void 0===n?void 0:n.question_id});case 2:0===e.sent.status&&Vi();case 4:case"end":return e.stop()}}),e)}))),children:null!==(Re=un.exercise_question_types)&&void 0!==Re&&null!==(Re=Re[Yt].items[$t])&&void 0!==Re&&Re.is_marked?"取消标记":"标记该题"})}),(0,D.jsxs)(C.Z,{children:[(0!=Yt||0!=$t)&&(0,D.jsx)(P.ZP,{className:"".concat(z.changeButton," ").concat(z.prevBtn," mr20"),type:"default",onClick:function(){Tr.current?Tr.current="prev":Zr()},children:"上一题"}),!(Yt===(null==un||null===(De=un.exercise_question_types)||void 0===De?void 0:De.length)-1&&$t===(null==un||null===(Ke=un.exercise_question_types)||void 0===Ke||null===(Ke=Ke[Yt])||void 0===Ke||null===(Ke=Ke.items)||void 0===Ke?void 0:Ke.length)-1)&&(0,D.jsx)(P.ZP,{className:z.changeButton,type:"primary",onClick:function(){wi&&(Tr.current?Tr.current="next":Ir())},children:"下一题"})]})]})]})})]}),0!==lt.status&&(0,D.jsx)(xe,{data:lt}),(0,D.jsx)(y.Z,{title:"注意",open:ii,closable:!1,footer:!1,children:(0,D.jsxs)("div",{children:[(0,D.jsx)("p",{style:{marginBottom:0},children:"离开该题后不允许再次修改答案,确认离开吗?"}),(0,D.jsxs)("div",{style:{marginTop:60,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,D.jsx)(B.Z,{checked:ai,onChange:function(e){li(e.target.checked)},children:"下次不再显示"}),(0,D.jsxs)("div",{children:[(0,D.jsx)(P.ZP,{onClick:function(){ri(!1),li(!1)},children:"我再想想"}),(0,D.jsx)(P.ZP,{onClick:function(){un.exercise_question_types[Yt].items[$t].ques_status=1,dn(s()({},un)),"prev"===Pr.current?(0===$t?(Yt-=1,$t=un.exercise_question_types[Yt].items.length-1):$t-=1,Jt(Yt),ei($t)):"next"===Pr.current?(un.exercise_question_types[Yt].items.length-1===$t?(Yt+=1,$t=0):$t+=1,Jt(Yt),ei($t)):(Jt(Ar.current.oneindex),ei(Ar.current.twoindex)),ri(!1)},type:"primary",style:{marginLeft:30},children:"确认"})]})]})]})}),(0,D.jsx)(Ee.Z,{successCb:Hi})]}),En&&(0,D.jsx)(Ae(),{disabled:vi,bounds:ki,onStart:function(e,n){return function(e,n){var t,i=window.document.documentElement,r=i.clientWidth,o=i.clientHeight,s=null===(t=Ci.current)||void 0===t?void 0:t.getBoundingClientRect();Si({left:-s.left+n.x,right:r-(s.right-n.x),top:-s.top+n.y,bottom:o-(s.bottom-n.y)-70})}(0,n)},children:(0,D.jsx)("div",{ref:Ci,style:{position:"absolute",left:40,top:200,zIndex:101},children:(0,D.jsxs)("div",{onMouseOver:function(){vi&&gi(!1)},onMouseOut:function(){gi(!0)},children:[(0,D.jsxs)(S.Z,{className:z.cameraHeader,align:"middle",justify:"space-between",children:[(0,D.jsxs)(C.Z,{children:[(0,D.jsx)("i",{className:"iconfont icon-kaiqishexiangtou"}),(0,D.jsx)("span",{children:"已开启摄像头"})]}),Ti?(0,D.jsx)(Ze.Z,{onClick:function(){Ei(!1)}}):(0,D.jsx)(Ie.Z,{onClick:function(){Ei(!0)}})]}),(0,D.jsx)("div",{style:{display:Ti?"flex":"none"},children:(0,D.jsx)(L.Z,{number:(null==un||null===(Ye=un.exercise)||void 0===Ye?void 0:Ye.photo_count)-(null==un||null===(Je=un.exercise)||void 0===Je?void 0:Je.take_photo),take_photo:null==un||null===(Xe=un.exercise)||void 0===Xe?void 0:Xe.take_photo,ref:Rt,time:null===(Qe=un.exercise)||void 0===Qe?void 0:Qe.left_time,update:Vi,supportCamera:function(e){2===e?(ft(!0),Dn(null==mn?void 0:mn.screen_shot_open),null!=mn&&mn.screen_shot_open||(Ln(null==mn?void 0:mn.screen_open),Vi())):1===e&&setTimeout((function(){return v.history.push("/")}),3e3)}})})]})})}),(0,D.jsx)(y.Z,{destroyOnClose:!0,closable:!1,centered:!0,className:z.teachAnalysisModal,title:(0,D.jsxs)(S.Z,{align:"middle",justify:"space-between",children:[(0,D.jsx)(C.Z,{style:{color:"rgba(0,0,0,0.9)",fontSize:"16px"},children:"教师评价"}),(0,D.jsx)(C.Z,{children:(0,D.jsx)("i",{className:"iconfont icon-guanbi7",style:{fontSize:"15px",cursor:"pointer"},onClick:function(){return Li(!1)}})})]}),open:Ii,footer:!1,onCancel:function(){return Li(!1)},children:null==un||null===($e=un.exercise_answer_user)||void 0===$e?void 0:$e.analysis}),(0,D.jsx)(y.Z,{destroyOnClose:!0,centered:!0,width:555,title:(0,D.jsxs)(S.Z,{align:"middle",children:[(0,D.jsx)("div",{className:"c-black font16 mr8",children:(0,ze._V)(ze.CP.answer8)}),(0,D.jsx)("div",{className:"c-grey-666",children:(0,ze._V)(ze.CP.answer9)})]}),open:Pt,footer:!1,onCancel:function(){return At(!1)},children:(0,D.jsxs)("div",{children:[(0,D.jsx)("div",{className:"mb20 c-black",children:(0,ze._V)(ze.CP.answer10)}),(0,D.jsx)(Oe,{onOk:function(e){var n;console.log(e,444),e.join("")===(null==un||null===(n=un.exercise)||void 0===n?void 0:n.screen_key)?Yi():(j.ZP.warning((0,ze._V)(ze.CP.answer11)),qt((function(e){return e+1})))}},Lt)]})})]})}))},62408:function(e,n,t){"use strict";var i=t(31468),r=t.n(i),o=t(7557),s=t.n(o),a=t(41498),l=t.n(a),c=t(79800),u=t.n(c),d=t(59301),p=t(31797),f=t(78241),m=t(43418),h=t(71418),v=t(51945),g=t(92832),x=t(94001),_=t(95237),w=t(43604),y=t(3113),b=t(33571),j=t(61186),k=t.n(j),S=t(32007),C=t(66621),N=t(47243),B=t(89260),T=t(92208),E=t(37712);p.Z.Countdown;n.Z=(0,S.connect)((function(e){return{exercise:e.exercise}}))((function(e){var n,t,i,o,a=e.exercise,c=e.successCb,p=e.dispatch,j=(0,S.useParams)(),P=f.Z.useForm(),A=u()(P,1)[0],Z=f.Z.useWatch("time",A),I=(0,d.useState)(!1),L=u()(I,2),q=L[0],M=L[1],R=(0,d.useRef)(),D=a.actionTabs,O=(0,d.useState)(),F=u()(O,2),G=F[0],z=F[1],H=(0,T.U)(b.n7,{id:j.categoryId}),W=u()(H,4),U=W[1],V=W[2],K=W[3];(0,d.useEffect)((function(){"student-unlock"===a.actionTabs.key&&(M(!1),A.resetFields())}),[a.actionTabs.key]);var Y=function(){var e=l()(s()().mark((function e(){var n,t,i,r,o,a,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A.validateFields();case 2:if(o=A.getFieldsValue(),M(!0),!("no"!==(null==D||null===(n=D.exerciseParams)||void 0===n?void 0:n.ip_limit)||null!=D&&null!==(t=D.exerciseParams)&&void 0!==t&&t.ip_bind_type)){e.next=7;break}return e.next=7,new Promise(function(){var e=l()(s()().mark((function e(n){var t,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,N.y)({ip_limit:null==D||null===(t=D.exerciseParams)||void 0===t?void 0:t.ip_limit,ip_bind:null==D||null===(i=D.exerciseParams)||void 0===i?void 0:i.ip_bind_type});case 2:return R.current=e.sent,e.abrupt("return",n());case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}());case 7:return e.next=9,(0,b.ZD)(null==D||null===(i=D.exerciseParams)||void 0===i?void 0:i.id,{exercise_user_id:null==D||null===(r=D.exerciseParams)||void 0===r?void 0:r.exercise_user_id,unlock_key:o.unlock_key,time:o.time,ip:R.current});case 9:if(0!==e.sent.status){e.next=18;break}if(!c){e.next=15;break}return p({type:"exercise/setActionTabs",payload:{}}),c(),e.abrupt("return");case 15:u=null==D?void 0:D.exerciseParams,(0,C.nr)({inner_ip:u.inner_ip,public_ip:u.public_ip,open_camera:u.open_camera,ip_limit:u.ip_limit,ip_bind:u.ip_bind,ip_bind_type:u.ip_bind_type,exercise_tips:u.exercise_tips,exerciseId:u.id,screen_open:u.screen_open,screen_num:u.screen_num,screen_sec:u.screen_sec,coursesId:j.coursesId,login:null===(a=(0,B.eY)())||void 0===a?void 0:a.login,history:history,identity_verify:u.identity_verify,open_phone_video_recording:u.open_phone_video_recording,current_status:u.current_status}),p({type:"exercise/setActionTabs",payload:{}});case 18:M(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=[{title:"IP地址",dataIndex:"ip",key:"ip",render:function(e){return(0,E.jsx)("span",{className:e.indexOf("异常")>-1?"c-red":"c-green",children:e})}},{title:"浏览器",dataIndex:"browser",key:"browser",render:function(e){return(0,E.jsx)("span",{className:e.indexOf("异常")>-1?"c-red":"c-green",children:e})}},{title:"上次登录时间",dataIndex:"last_login_time",key:"last_login_time"}],X=(null==D||null===(n=D.exerciseParams)||void 0===n?void 0:n.errorMessage)&&"object"===r()(null==D||null===(t=D.exerciseParams)||void 0===t?void 0:t.errorMessage);(0,d.useEffect)((function(){"student-unlock"===a.actionTabs.key&&l()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.Cd)(j);case 2:return n=e.sent,e.next=5,V({});case 5:n.status||z(n);case 6:case"end":return e.stop()}}),e)})))()}),[a.actionTabs.key]);var Q=(null==G?void 0:G.exercise)||{},$=Q.time,ee=Q.end_time;return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(m.Z,{width:514,centered:!0,closable:!(null==D||null===(i=D.exerciseParams)||void 0===i||!i.unlockClose),maskClosable:!1,keyboard:!1,maskStyle:{background:"#000"},title:"提示",open:"student-unlock"===a.actionTabs.key,footer:null,onCancel:function(){p({type:"exercise/setActionTabs",payload:{}})},children:(0,E.jsxs)(h.Z,{spinning:U,children:[X&&(0,E.jsx)("div",{style:{marginBottom:16},children:"该账号已经存在异常情况,若非本人操作,请联系监考老师说明情况。 "}),!X&&(0,E.jsx)("div",{style:{marginBottom:16},children:"系统检测到您在考试时中途退出,现已将考试锁定。如需继续进行考试, 请尽快联系课堂老师进行解锁!"}),X&&(0,E.jsx)(v.Z,{className:"mb20",pagination:{hideOnSinglePage:!0},dataSource:[(null==D||null===(o=D.exerciseParams)||void 0===o?void 0:o.errorMessage)||{}],columns:J}),(0,E.jsx)("div",{className:"",children:(0,E.jsxs)(f.Z,{form:A,layout:"vertical",autoComplete:"off",children:[(0,E.jsx)(f.Z.Item,{label:"考试解锁码",name:"unlock_key",rules:[{required:!0,message:"请输入考试解锁码"}],children:(0,E.jsx)(g.Z.Password,{autoComplete:"off",placeholder:"请输入考试解锁码",visibilityToggle:!1})}),-1!==$?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(f.Z.Item,{name:"time",label:(0,E.jsxs)("span",{children:["延长时间(",(0,E.jsxs)("span",{style:{color:"#9096A3"},children:["当前考试截止时间",k()(ee).format("YYYY-MM-DD HH:mm")]}),""]}),children:(0,E.jsx)(x.Z,{min:1,precision:0,max:5e3,style:{width:"100%"},placeholder:"请填写延长时间(分钟),在学生剩余时间基础上延时",addonAfter:"分钟"})}),(0,E.jsxs)("div",{className:"mb20",style:{color:"#FA6400"},children:["该学生剩余考试时间:",(0,E.jsx)("span",{className:"ml5",children:(null==K?void 0:K.student_left_minutes)||0}),"分钟",0!==(null==K?void 0:K.student_left_minutes)&&(null==K?void 0:K.user_end_time)&&(0,E.jsxs)("span",{children:[",交卷截止时间:",(0,E.jsx)("span",{className:"ml5",children:k()(null==K?void 0:K.user_end_time).add(Z||0,"m").format("YYYY-MM-DD HH:mm:ss")})]})]})]}):(0,E.jsxs)("span",{style:{color:"#F6A53B"},children:[" 当前考试未限制考生答题时长,考试截止时间为 ",k()(ee).format("YYYY-MM-DD HH:mm")]})]})}),(0,E.jsxs)(_.Z,{justify:"space-between",align:"middle",children:[(0,E.jsx)(w.Z,{}),(0,E.jsx)(w.Z,{children:(0,E.jsx)(y.ZP,{loading:q,onClick:Y,children:"进入考试"})})]})]})})})}))},76666:function(e,n,t){"use strict";t.d(n,{Y4:function(){return Z},Im:function(){return E},ZP:function(){return L}});var i=t(79800),r=t.n(i),o=t(7557),s=t.n(o),a=t(41498),l=t.n(a),c=t(82242),u=t.n(c),d=t(85573),p=t.n(d),f=t(59301),m=t(92832),h=t(3113),v=t(46952),g=t(80836),x=t(98234),_=t(24334),w=t(51021),y=t(51150),b=t(66621),j=t(34376),k=t(85750),S=t(32007),C=t(11533),N=t(37712),B=m.Z.TextArea,T={visible:!1,tabIndex:"0"},E=p()(p()(p()(p()(p()(p()({},x.h.NOMATCH,"测试用例结果不匹配"),x.h.OK,"调试通过"),2,"调试超时"),3,"调试pod失败"),4,"编译失败"),5,"执行失败"),P=function(e){return e[e.SET_VISIBLE=0]="SET_VISIBLE",e[e.SET_TABINDEX=1]="SET_TABINDEX",e}(P||{});function A(e,n){switch(n.type){case P.SET_VISIBLE:return u()(u()({},e),{},{visible:n.payload});case P.SET_TABINDEX:return u()(u()({},e),{},{tabIndex:n.payload});default:throw new Error}}function Z(e){var n=e.status,t=e.error_msg,i=e.output,r=e.input,o=e.expected_output,a=e.is_file,c=e.input_file_url,u=e.output_file_url,d=e.expected_output_file_url,p=e.setMonacoValue,m=e.setData,h=(0,f.useRef)(),v=(0,f.useRef)(),g=(0,f.useRef)(),w=null,S={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch((0,f.useEffect)((function(){if(i&&!a&&h.current){var e=new j.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});e.open(h.current);var n=(0,b.pp)(_.Base64.decode(i));e.write(n),e.setOption("theme",{background:"#1e1e1e"})}if(r&&!a&&v.current){var t=new j.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});t.open(v.current),t.write((0,b.pp)(r)),t.setOption("theme",{background:"#1e1e1e"})}if(o&&!a&&g.current){var s=new j.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});s.open(g.current),s.write((0,b.pp)(_.Base64.decode(o))),s.setOption("theme",{background:"#1e1e1e"})}}),[i]),n){case x.h.NOMATCH:w=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("p",{className:"c-red",children:"实际输出:"}),!a&&(0,N.jsx)("div",{ref:h}),a&&(0,N.jsx)("div",{style:S,children:(0,N.jsx)("a",{style:{fontSize:"16px"},onClick:l()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.ZP)(u,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:n=e.sent,p(n),setTimeout((function(){m(u)}),200);case 5:case"end":return e.stop()}}),e)}))),children:i})}),(0,N.jsx)("p",{className:"c-red",children:"预期输出:"}),!a&&(0,N.jsx)("div",{ref:g}),a&&(0,N.jsx)("div",{style:S,children:(0,N.jsx)("a",{style:{fontSize:"16px"},onClick:l()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(d,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return n=e.sent,e.t0=p,e.next=6,n.text();case 6:e.t1=e.sent,(0,e.t0)(e.t1),setTimeout((function(){m(d)}),200);case 9:case"end":return e.stop()}}),e)}))),children:o})})]});break;case x.h.EXECUTEFAILURE:w=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)("div",{style:{border:"1px #F6F7F9 solid"},children:[(0,N.jsx)("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"},children:"最后执行的输入:"}),!a&&(0,N.jsx)(y.Z,{value:r,style:S}),a&&(0,N.jsx)("div",{style:S,children:(0,N.jsx)("a",{onClick:function(){return(0,b.LR)(c,r)},children:r})})]}),(0,N.jsxs)("div",{style:{border:"1px #F6F7F9 solid",marginTop:"10px"},children:[(0,N.jsx)("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"},children:"执行出错信息:"}),(0,N.jsxs)("pre",{className:"error",style:{color:"#E30000",padding:"0 10px"},children:[_.Base64.decode(t),"111"]})]})]});break;case x.h.COMPILEFAILURE:w=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("p",{children:"执行出错信息:"}),(0,N.jsx)("pre",{className:"error",children:_.Base64.decode(t)})]});break;case x.h.PODFAILURE:w=(0,N.jsx)("p",{children:"创建pod失败请稍后重试"});break;case x.h.TIMEOUT:w=(0,N.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,N.jsxs)(N.Fragment,{children:[" ",w," "]})}function I(e){var n=e.status,t=e.error_msg,i=e.execute_time,r=e.output,o=e.input,s=e.expected_output,a=(e.is_file,e.input_file_url,e.output_file_url,e.expected_output_file_url,null);switch(n){case x.h.OK:a=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)("p",{children:["执行用时:",i/1e3,"秒"]}),(0,N.jsx)("p",{children:"执行结果:"}),(0,N.jsx)("pre",{children:_.Base64.decode(r)})]});break;case x.h.NOMATCH:a=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)("p",{children:["输入:",(0,N.jsx)("pre",{children:o})]}),(0,N.jsxs)("p",{children:["输出:",r&&_.Base64.decode(r)]}),(0,N.jsxs)("p",{children:["预期输出:",s&&_.Base64.decode(s)]})]});break;case x.h.EXECUTEFAILURE:case x.h.COMPILEFAILURE:a=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)("p",{children:["最后执行的输入:",(0,N.jsx)("pre",{children:o})]}),(0,N.jsx)("p",{children:"执行出错信息:"}),(0,N.jsx)("pre",{className:"error",children:_.Base64.decode(t)})]});break;case x.h.PODFAILURE:a=(0,N.jsx)("p",{children:"创建pod失败请稍后重试"});break;case x.h.TIMEOUT:a=(0,N.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,N.jsxs)(N.Fragment,{children:[" ",a," "]})}var L=function(e){var n=e.input,t=e.is_file,i=e.debuging,o=e.submitting,a=(e.executingMessage,e.debugResult),c=e.onChangeInput,u=e.onDebugCode,d=e.onSubmitCode,p=e.hack,m=e.user,x=(0,f.useReducer)(A,T),_=r()(x,2),y=_[0],b=_[1],j=y.visible,E=(y.tabIndex,(0,S.useSearchParams)()),Z=r()(E,1)[0];var L=(0,f.useMemo)((function(){if(a){a.status;return(0,N.jsx)(N.Fragment,{children:I(a)})}return null}),[a]);var q=function(){var e=l()(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,k.ZP)("/api/problems/".concat(n,"/start.json"),{method:"get",params:{hack_user_id:null==m?void 0:m.user_id}});case 2:(t=e.sent)&&(window.location.href="/myproblems/".concat(null==t?void 0:t.identifier,"?type=1"));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,N.jsxs)("div",{className:"test-case-panel",children:[(0,N.jsxs)("div",{className:"test-case-panel-body ".concat(j?"active":""),children:[(0,N.jsx)("ul",{className:"s-navs",children:(0,N.jsx)("li",{children:(0,N.jsx)("a",{className:"active",children:"调试代码结果"})})}),(0,N.jsx)(C.Z,{leftTitle:"自定义测试用例",rightTitle:"代码执行结果",style:{height:240},leftNode:(0,N.jsx)(B,{placeholder:"请输入自测用例(如果未填写,自测运行时,系统会自动填充第一个非隐藏的文本类型的测试用例)",value:t?"":n,onChange:c}),rightNode:i?(0,N.jsx)(w.Z,{message:"代码执行中..."}):a?L:(0,N.jsx)("p",{style:{color:"#536879"},children:"请填写测试用例的输入值,点击“调试代码”"})})]}),(0,N.jsx)("a",{className:"btn-collapse ".concat(j?"up":""),onClick:function(){b({type:P.SET_VISIBLE,payload:!j})},children:j?(0,N.jsx)(v.Z,{}):(0,N.jsx)(g.Z,{})}),(0,N.jsxs)("footer",{className:"footer",children:[(0,N.jsx)("span",{children:"控制台"}),(0,N.jsxs)("div",{className:"flex-container",children:[(null==p?void 0:p.is_program)&&(null==p?void 0:p.above_question)&&(0,N.jsx)(h.ZP,{onClick:function(){return q(null==p?void 0:p.above_question)},id:"oj-prev",className:"btn-blue",type:"ghost",children:"上一题"}),(null==p?void 0:p.is_program)&&(null==p?void 0:p.under_question)&&(0,N.jsx)(h.ZP,{onClick:function(){return q(null==p?void 0:p.under_question)},id:"oj-next",className:"btn-blue",type:"ghost",children:"下一题"}),(0,N.jsx)(h.ZP,{className:"btn-green custom-ant-disabled",ghost:!0,disabled:i||o,loading:i,onClick:function(){b({type:P.SET_VISIBLE,payload:!0}),b({type:P.SET_TABINDEX,payload:"1"}),u()},children:"调试代码"}),"8"!==Z.get("qtype")&&(0,N.jsx)(h.ZP,{type:"primary",className:"custom-ant-disabled",loading:o,disabled:i||o,onClick:function(){b({type:P.SET_VISIBLE,payload:!1}),d()},children:"评测并提交"})]})]})]})}},98234: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}({})},75136:function(e,n,t){"use strict";t.d(n,{H7:function(){return f},MK:function(){return p},MU:function(){return l},X6:function(){return u},bM:function(){return a},fi:function(){return m},fu:function(){return s},n4:function(){return h},rX:function(){return d},vl:function(){return v},zO:function(){return c}});var i=t(82242),r=t.n(i),o=t(85750);function s(e,n){return(0,o.U2)("myproblems/".concat(e,".json"),r()({hidePopLogin:!0},n||{}))}function a(e,n){return(0,o.v_)("myproblems/".concat(e,"/code_submit.json"),n)}function l(e,n){return(0,o.v_)("myproblems/".concat(e,"/code_debug.json"),n)}function c(e,n){return n.language&&(n.language=encodeURIComponent(n.language)),(0,o.U2)("myproblems/".concat(e,"/submit_records.json"),n)}function u(e){return(0,o.U2)("myproblems/record_detail.json",{id:e})}function d(e,n){return(0,o.U2)("myproblems/".concat(e,"/result.json"),{mode:n})}function p(e,n){return(0,o.v_)("myproblems/".concat(e,"/add_notes.json"),n)}function f(e,n){return(0,o.v_)("myproblems/".concat(e,"/restore_initial_code.json"),n)}function m(e){return(0,o.v_)("myproblems/".concat(e,"/sync_code.json"))}function h(e,n){return(0,o.v_)("myproblems/".concat(e,"/update_code.json"),n)}function v(e,n){return(0,o.v_)("discusses/".concat(e,"/plus.json"),n)}},92208:function(e,n,t){"use strict";t.d(n,{U:function(){return p}});var i=t(7557),r=t.n(i),o=t(82242),s=t.n(o),a=t(41498),l=t.n(a),c=t(79800),u=t.n(c),d=t(59301);function p(e,n){var t=(0,d.useState)(n),i=u()(t,2),o=i[0],a=i[1],c=(0,d.useState)(!1),p=u()(c,2),f=p[0],m=p[1],h=(0,d.useState)(),v=u()(h,2),g=v[0],x=v[1],_=function(){var t=l()(r()().mark((function t(i){var l,c,u,d=arguments;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=d.length>1&&void 0!==d[1]&&d[1],c=l?n:s()(s()({},o),i),m(!0),a(c),t.next=6,e(c);case 6:return u=t.sent,m(!1),x(u),t.abrupt("return",u);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return[o,f,_,g]}},59413:function(e,n,t){"use strict";t.d(n,{_:function(){return a}});var i=t(91232),r=t.n(i),o=t(59301),s=t(43418),a=function(e){var n,t,i=(0,o.useRef)([]),a=function(){var e,n=r()(i.current);try{for(n.s();!(e=n.n()).done;){var t=e.value;clearTimeout(t)}}catch(e){n.e(e)}finally{n.f()}i.current=[]};return(0,o.useEffect)((function(){var n,t;if(a(),null!=e&&null!==(n=e.exercise)&&void 0!==n&&n.left_time&&(null==e||null===(t=e.exercise)||void 0===t||null===(t=t.exercise_events)||void 0===t?void 0:t.length)>0){var o,l,c=r()(null==e||null===(o=e.exercise)||void 0===o?void 0:o.exercise_events);try{var u=function(){var n,t=l.value;if((null==e||null===(n=e.exercise)||void 0===n?void 0:n.left_time)>60*(null==t?void 0:t.reminder_time)){var r,o=1e3*((null==e||null===(r=e.exercise)||void 0===r?void 0:r.left_time)-60*(null==t?void 0:t.reminder_time));o=o>2147483647?2147483647:o;var a=setTimeout((function(){s.Z.info({content:"".concat(null==t?void 0:t.reminder_content),icon:null,title:"提示",centered:!0,okText:"知道了"})}),o);i.current.push(a)}};for(c.s();!(l=c.n()).done;)u()}catch(e){c.e(e)}finally{c.f()}}}),[null==e||null===(n=e.exercise)||void 0===n?void 0:n.left_time,null==e||null===(t=e.exercise)||void 0===t?void 0:t.exercise_events]),a}},27666:function(e,n,t){"use strict";var i=t(61414),r=t(71783);n.Z=function(e){let n;const t=t=>()=>{n=null,e.apply(void 0,(0,i.Z)(t))},o=function(){if(null==n){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];n=(0,r.Z)(t(i))}};return o.cancel=()=>{r.Z.cancel(n),n=null},o}},81228:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var i=t(19243),r=t(16177),o=t(74258),s=t(35796),a=t(59301),l=t(92310),c=t.n(l),u=t(28647),d=t(55405),p=t(27666),f=t(36355),m=t(83116),h=t(37613);const v=e=>{const{componentCls:n}=e;return{[n]:{position:"fixed",zIndex:e.zIndexPopup}}};var g=(0,m.Z)("Affix",(e=>{const n=(0,h.TS)(e,{zIndexPopup:e.zIndexBase+10});return[v(n)]}));function x(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function _(e,n,t){if(void 0!==t&&n.top>e.top-t)return t+n.top}function w(e,n,t){if(void 0!==t&&n.bottom<e.bottom+t){return t+(window.innerHeight-n.bottom)}}const y=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function b(){return"undefined"!=typeof window?window:null}var j;!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(j||(j={}));let k=function(e){(0,o.Z)(t,e);var n=(0,s.Z)(t);function t(){var e;return(0,i.Z)(this,t),(e=n.apply(this,arguments)).state={status:j.None,lastAffix:!1,prevTarget:null},e.placeholderNodeRef=(0,a.createRef)(),e.fixedNodeRef=(0,a.createRef)(),e.addListeners=()=>{const n=e.getTargetFunc(),t=null==n?void 0:n(),{prevTarget:i}=e.state;i!==t&&(y.forEach((n=>{null==i||i.removeEventListener(n,e.lazyUpdatePosition),null==t||t.addEventListener(n,e.lazyUpdatePosition)})),e.updatePosition(),e.setState({prevTarget:t}))},e.removeListeners=()=>{e.timer&&(clearTimeout(e.timer),e.timer=null);const{prevTarget:n}=e.state,t=e.getTargetFunc(),i=null==t?void 0:t();y.forEach((t=>{null==i||i.removeEventListener(t,e.lazyUpdatePosition),null==n||n.removeEventListener(t,e.lazyUpdatePosition)})),e.updatePosition.cancel(),e.lazyUpdatePosition.cancel()},e.getOffsetTop=()=>{const{offsetBottom:n,offsetTop:t}=e.props;return void 0===n&&void 0===t?0:t},e.getOffsetBottom=()=>e.props.offsetBottom,e.measure=()=>{const{status:n,lastAffix:t}=e.state,{onChange:i}=e.props,r=e.getTargetFunc();if(n!==j.Prepare||!e.fixedNodeRef.current||!e.placeholderNodeRef.current||!r)return;const o=e.getOffsetTop(),s=e.getOffsetBottom(),a=r();if(a){const n={status:j.None},r=x(e.placeholderNodeRef.current);if(0===r.top&&0===r.left&&0===r.width&&0===r.height)return;const l=x(a),c=_(r,l,o),u=w(r,l,s);void 0!==c?(n.affixStyle={position:"fixed",top:c,width:r.width,height:r.height},n.placeholderStyle={width:r.width,height:r.height}):void 0!==u&&(n.affixStyle={position:"fixed",bottom:u,width:r.width,height:r.height},n.placeholderStyle={width:r.width,height:r.height}),n.lastAffix=!!n.affixStyle,i&&t!==n.lastAffix&&i(n.lastAffix),e.setState(n)}},e.prepareMeasure=()=>{e.setState({status:j.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e.updatePosition=(0,p.Z)((()=>{e.prepareMeasure()})),e.lazyUpdatePosition=(0,p.Z)((()=>{const n=e.getTargetFunc(),{affixStyle:t}=e.state;if(n&&t){const i=e.getOffsetTop(),r=e.getOffsetBottom(),o=n();if(o&&e.placeholderNodeRef.current){const n=x(o),s=x(e.placeholderNodeRef.current),a=_(s,n,i),l=w(s,n,r);if(void 0!==a&&t.top===a||void 0!==l&&t.bottom===l)return}}e.prepareMeasure()})),e}return(0,r.Z)(t,[{key:"getTargetFunc",value:function(){const{getTargetContainer:e}=this.context,{target:n}=this.props;return void 0!==n?n:null!=e?e:b}},{key:"componentDidMount",value:function(){this.timer=setTimeout(this.addListeners)}},{key:"componentDidUpdate",value:function(e){this.addListeners(),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"render",value:function(){const{affixStyle:e,placeholderStyle:n}=this.state,{affixPrefixCls:t,rootClassName:i,children:r}=this.props,o=c()(e&&i,{[t]:!!e});let s=(0,d.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls","rootClassName"]);return a.createElement(u.Z,{onResize:this.updatePosition},a.createElement("div",Object.assign({},s,{ref:this.placeholderNodeRef}),e&&a.createElement("div",{style:n,"aria-hidden":"true"}),a.createElement("div",{className:o,ref:this.fixedNodeRef,style:e},a.createElement(u.Z,{onResize:this.updatePosition},r))))}}]),t}(a.Component);k.contextType=f.E_;var S=(0,a.forwardRef)(((e,n)=>{const{prefixCls:t,rootClassName:i}=e,{getPrefixCls:r}=(0,a.useContext)(f.E_),o=r("affix",t),[s,l]=g(o),u=Object.assign(Object.assign({},e),{affixPrefixCls:o,rootClassName:c()(i,l)});return s(a.createElement(k,Object.assign({},u,{ref:n})))}))},46400:function(e,n,t){"use strict";t.d(n,{Z:function(){return L}});var i=t(46906),r=t(21884),o=t(53043),s=t(90584),a=t(85456),l=t(92310),c=t.n(l),u=t(16934),d=t(47413),p=t(59301),f=t(92343),m=t(36355),h=t(17313),v=t(83116);const g=(e,n,t,i,r)=>({backgroundColor:e,border:`${i.lineWidth}px ${i.lineType} ${n}`,[`${r}-icon`]:{color:t}}),x=e=>{const{componentCls:n,motionDurationSlow:t,marginXS:i,marginSM:r,fontSize:o,fontSizeLG:s,lineHeight:a,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:p,withDescriptionPadding:f,defaultPadding:m}=e;return{[n]:Object.assign(Object.assign({},(0,h.Wf)(e)),{position:"relative",display:"flex",alignItems:"center",padding:m,wordWrap:"break-word",borderRadius:l,[`&${n}-rtl`]:{direction:"rtl"},[`${n}-content`]:{flex:1,minWidth:0},[`${n}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:a},"&-message":{color:p},[`&${n}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${t} ${c}, opacity ${t} ${c},\n padding-top ${t} ${c}, padding-bottom ${t} ${c},\n margin-bottom ${t} ${c}`},[`&${n}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${n}-with-description`]:{alignItems:"flex-start",padding:f,[`${n}-icon`]:{marginInlineEnd:r,fontSize:u,lineHeight:0},[`${n}-message`]:{display:"block",marginBottom:i,color:p,fontSize:s},[`${n}-description`]:{display:"block",color:d}},[`${n}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},_=e=>{const{componentCls:n,colorSuccess:t,colorSuccessBorder:i,colorSuccessBg:r,colorWarning:o,colorWarningBorder:s,colorWarningBg:a,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:p,colorInfoBg:f}=e;return{[n]:{"&-success":g(r,i,t,e,n),"&-info":g(f,p,d,e,n),"&-warning":g(a,s,o,e,n),"&-error":Object.assign(Object.assign({},g(u,c,l,e,n)),{[`${n}-description > pre`]:{margin:0,padding:0}})}}},w=e=>{const{componentCls:n,iconCls:t,motionDurationMid:i,marginXS:r,fontSizeIcon:o,colorIcon:s,colorIconHover:a}=e;return{[n]:{"&-action":{marginInlineStart:r},[`${n}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:o,lineHeight:`${o}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${t}-close`]:{color:s,transition:`color ${i}`,"&:hover":{color:a}}},"&-close-text":{color:s,transition:`color ${i}`,"&:hover":{color:a}}}}},y=e=>[x(e),_(e),w(e)];var b=(0,v.Z)("Alert",(e=>[y(e)]),(e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}))),j=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 k={success:i.Z,info:a.Z,error:r.Z,warning:s.Z},S=e=>{const{icon:n,prefixCls:t,type:i}=e,r=k[i]||null;return n?(0,f.wm)(n,p.createElement("span",{className:`${t}-icon`},n),(()=>({className:c()(`${t}-icon`,{[n.props.className]:n.props.className})}))):p.createElement(r,{className:`${t}-icon`})},C=e=>{const{isClosable:n,prefixCls:t,closeIcon:i,handleClose:r}=e,s=!0===i||void 0===i?p.createElement(o.Z,null):i;return n?p.createElement("button",{type:"button",onClick:r,className:`${t}-close-icon`,tabIndex:0},s):null};var N=e=>{const{description:n,prefixCls:t,message:i,banner:r,className:o,rootClassName:s,style:a,onMouseEnter:l,onMouseLeave:f,onClick:h,afterClose:v,showIcon:g,closable:x,closeText:_,closeIcon:w,action:y}=e,k=j(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),[N,B]=p.useState(!1);const T=p.useRef(null),{getPrefixCls:E,direction:P,alert:A}=p.useContext(m.E_),Z=E("alert",t),[I,L]=b(Z),q=n=>{var t;B(!0),null===(t=e.onClose)||void 0===t||t.call(e,n)},M=p.useMemo((()=>void 0!==e.type?e.type:r?"warning":"info"),[e.type,r]),R=p.useMemo((()=>!!_||("boolean"==typeof x?x:!1!==w&&null!=w)),[_,w,x]),D=!(!r||void 0!==g)||g,O=c()(Z,`${Z}-${M}`,{[`${Z}-with-description`]:!!n,[`${Z}-no-icon`]:!D,[`${Z}-banner`]:!!r,[`${Z}-rtl`]:"rtl"===P},null==A?void 0:A.className,o,s,L),F=(0,d.Z)(k,{aria:!0,data:!0});return I(p.createElement(u.default,{visible:!N,motionName:`${Z}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:v},(t=>{let{className:r,style:o}=t;return p.createElement("div",Object.assign({ref:T,"data-show":!N,className:c()(O,r),style:Object.assign(Object.assign(Object.assign({},null==A?void 0:A.style),a),o),onMouseEnter:l,onMouseLeave:f,onClick:h,role:"alert"},F),D?p.createElement(S,{description:n,icon:e.icon,prefixCls:Z,type:M}):null,p.createElement("div",{className:`${Z}-content`},i?p.createElement("div",{className:`${Z}-message`},i):null,n?p.createElement("div",{className:`${Z}-description`},n):null),y?p.createElement("div",{className:`${Z}-action`},y):null,p.createElement(C,{isClosable:R,prefixCls:Z,closeIcon:_||w,handleClose:q}))})))},B=t(19243),T=t(16177),E=t(74258),P=t(35796);let A=function(e){(0,E.Z)(t,e);var n=(0,P.Z)(t);function t(){var e;return(0,B.Z)(this,t),(e=n.apply(this,arguments)).state={error:void 0,info:{componentStack:""}},e}return(0,T.Z)(t,[{key:"componentDidCatch",value:function(e,n){this.setState({error:e,info:n})}},{key:"render",value:function(){const{message:e,description:n,children:t}=this.props,{error:i,info:r}=this.state,o=r&&r.componentStack?r.componentStack:null,s=void 0===e?(i||"").toString():e,a=void 0===n?o:n;return i?p.createElement(N,{type:"error",message:s,description:p.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},a)}):t}}]),t}(p.Component);var Z=A;const I=N;I.ErrorBoundary=Z;var L=I},79817:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var i=t(61414),r=t(92310),o=t.n(r),s=t(83794),a=t(59301),l=t(6774),c=t(13845),u=t(68031),d=t(81228),p=t(36355);var f=a.createContext(void 0);var m=e=>{const{href:n,title:t,prefixCls:i,children:r,className:s,target:l,replace:c}=e,u=a.useContext(f),{registerLink:d,unregisterLink:m,scrollTo:h,onClick:v,activeLink:g,direction:x}=u||{};a.useEffect((()=>(null==d||d(n),()=>{null==m||m(n)})),[n]);const{getPrefixCls:_}=a.useContext(p.E_),w=_("anchor",i),y=g===n,b=o()(`${w}-link`,s,{[`${w}-link-active`]:y}),j=o()(`${w}-link-title`,{[`${w}-link-title-active`]:y});return a.createElement("div",{className:b},a.createElement("a",{className:j,href:n,title:"string"==typeof t?t:"",target:l,onClick:e=>{c&&(e.preventDefault(),window.location.replace(n)),null==v||v(e,{title:t,href:n}),null==h||h(n)}},t),"horizontal"!==x?r:null)},h=t(17313),v=t(83116),g=t(37613);const x=e=>{const{componentCls:n,holderOffsetBlock:t,motionDurationSlow:i,lineWidthBold:r,colorPrimary:o,lineType:s,colorSplit:a}=e;return{[`${n}-wrapper`]:{marginBlockStart:-t,paddingBlockStart:t,[n]:Object.assign(Object.assign({},(0,h.Wf)(e)),{position:"relative",paddingInlineStart:r,[`${n}-link`]:{paddingBlock:e.linkPaddingBlock,paddingInline:`${e.linkPaddingInlineStart}px 0`,"&-title":Object.assign(Object.assign({},h.vS),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${n}-link-title`]:{color:e.colorPrimary},[`${n}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${n}-wrapper-horizontal)`]:{[n]:{"&::before":{position:"absolute",insetInlineStart:0,top:0,height:"100%",borderInlineStart:`${r}px ${s} ${a}`,content:'" "'},[`${n}-ink`]:{position:"absolute",insetInlineStart:0,display:"none",transform:"translateY(-50%)",transition:`top ${i} ease-in-out`,width:r,backgroundColor:o,[`&${n}-ink-visible`]:{display:"inline-block"}}}},[`${n}-fixed ${n}-ink ${n}-ink`]:{display:"none"}}}},_=e=>{const{componentCls:n,motionDurationSlow:t,lineWidthBold:i,colorPrimary:r}=e;return{[`${n}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:'" "'},[n]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${n}-link:first-of-type`]:{paddingInline:0},[`${n}-ink`]:{position:"absolute",bottom:0,transition:`left ${t} ease-in-out, width ${t} ease-in-out`,height:i,backgroundColor:r}}}}};var w=(0,v.Z)("Anchor",(e=>{const{fontSize:n,fontSizeLG:t,paddingXXS:i}=e,r=(0,g.TS)(e,{holderOffsetBlock:i,anchorPaddingBlockSecondary:i/2,anchorTitleBlock:n/14*3,anchorBallSize:t/2});return[x(r),_(r)]}),(e=>({linkPaddingBlock:e.paddingXXS,linkPaddingInlineStart:e.padding})));function y(){return window}function b(e,n){if(!e.getClientRects().length)return 0;const t=e.getBoundingClientRect();return t.width||t.height?n===window?(n=e.ownerDocument.documentElement,t.top-n.clientTop):t.top-n.getBoundingClientRect().top:t.top}const j=/#([\S ]+)$/,k=e=>{var n;const{rootClassName:t,anchorPrefixCls:r,className:h,style:v,offsetTop:g,affix:x=!0,showInkInFixed:_=!1,children:w,items:k,direction:S="vertical",bounds:C,targetOffset:N,onClick:B,onChange:T,getContainer:E,getCurrentAnchor:P,replace:A}=e;const[Z,I]=a.useState([]),[L,q]=a.useState(null),M=a.useRef(L),R=a.useRef(null),D=a.useRef(null),O=a.useRef(!1),{direction:F,getTargetContainer:G,anchor:z}=a.useContext(p.E_),H=null!==(n=null!=E?E:G)&&void 0!==n?n:y,W=JSON.stringify(Z),U=(0,s.useEvent)((e=>{Z.includes(e)||I((n=>[].concat((0,i.Z)(n),[e])))})),V=(0,s.useEvent)((e=>{Z.includes(e)&&I((n=>n.filter((n=>n!==e))))})),K=(0,s.useEvent)((e=>{if(M.current===e)return;const n="function"==typeof P?P(e):e;q(n),M.current=n,null==T||T(e)})),Y=a.useCallback((()=>{if(O.current)return;const e=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;const i=[],r=H();if(e.forEach((e=>{const o=j.exec(null==e?void 0:e.toString());if(!o)return;const s=document.getElementById(o[1]);if(s){const o=b(s,r);o<n+t&&i.push({link:e,top:o})}})),i.length)return i.reduce(((e,n)=>n.top>e.top?n:e)).link;return""}(Z,void 0!==N?N:g||0,C);K(e)}),[W,N,g]),J=a.useCallback((e=>{K(e);const n=j.exec(e);if(!n)return;const t=document.getElementById(n[1]);if(!t)return;const i=H();let r=(0,c.Z)(i,!0)+b(t,i);r-=void 0!==N?N:g||0,O.current=!0,(0,u.Z)(r,{getContainer:H,callback(){O.current=!1}})}),[N,g]),X=o()(t,`${r}-wrapper`,{[`${r}-wrapper-horizontal`]:"horizontal"===S,[`${r}-rtl`]:"rtl"===F},h,null==z?void 0:z.className),Q=o()(r,{[`${r}-fixed`]:!x&&!_}),$=o()(`${r}-ink`,{[`${r}-ink-visible`]:L}),ee=Object.assign(Object.assign({maxHeight:g?`calc(100vh - ${g}px)`:"100vh"},null==z?void 0:z.style),v),ne=e=>Array.isArray(e)?e.map((e=>a.createElement(m,Object.assign({replace:A},e,{key:e.key}),"vertical"===S&&ne(e.children)))):null,te=a.createElement("div",{ref:R,className:X,style:ee},a.createElement("div",{className:Q},a.createElement("span",{className:$,ref:D}),"items"in e?ne(k):w));a.useEffect((()=>{const e=H();return Y(),null==e||e.addEventListener("scroll",Y),()=>{null==e||e.removeEventListener("scroll",Y)}}),[W]),a.useEffect((()=>{"function"==typeof P&&K(P(M.current||""))}),[P]),a.useEffect((()=>{(()=>{var e;const n=null===(e=R.current)||void 0===e?void 0:e.querySelector(`.${r}-link-title-active`);if(n&&D.current){const{style:e}=D.current,t="horizontal"===S;e.top=t?"":`${n.offsetTop+n.clientHeight/2}px`,e.height=t?"":`${n.clientHeight}px`,e.left=t?`${n.offsetLeft}px`:"",e.width=t?`${n.clientWidth}px`:"",t&&(0,l.Z)(n,{scrollMode:"if-needed",block:"nearest"})}})()}),[S,P,W,L]);const ie=a.useMemo((()=>({registerLink:U,unregisterLink:V,scrollTo:J,activeLink:L,onClick:B,direction:S})),[L,B,J,S]);return a.createElement(f.Provider,{value:ie},x?a.createElement(d.Z,{offsetTop:g,target:H},te):te)};const S=e=>{const{prefixCls:n,rootClassName:t}=e,{getPrefixCls:i}=a.useContext(p.E_),r=i("anchor",n),[s,l]=w(r);return s(a.createElement(k,Object.assign({},e,{rootClassName:o()(l,t),anchorPrefixCls:r})))};S.Link=m;var C=S},93314:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC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