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__Question__OjProblem__Rec...

2 lines
16 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9716],{8409:function(Z,F){F.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},87516:function(Z,F,l){l.d(F,{Z:function(){return _}});var t=l(71471),r={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},E=l(59301),_=({message:h,className:d,children:f,style:y={}})=>E.createElement("div",{className:`custom-spinner ${r.idsRingWrapper} ${d}`},E.createElement("div",{className:r.ldsRing},E.createElement("div",null),E.createElement("div",null),E.createElement("div",null),E.createElement("div",null)),h?E.createElement("p",{style:y},h):null,f,E.createElement(t.Outlet,null))},28582:function(Z,F,l){l.d(F,{Z:function(){return d}});var t=l(59301),r={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},E=l(92310),_=l.n(E),d=({className:f,style:y={},leftNode:I,leftTitle:C="\u81EA\u6D4B\u8F93\u5165",rightNode:P,rightTitle:$="\u8FD0\u884C\u7ED3\u679C"})=>t.createElement("div",{className:_()(r.result,f),style:y},t.createElement("div",{className:r.left},t.createElement("div",{className:r.title},t.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),t.createElement("span",null,C)),t.createElement("div",{className:r.leftNode},I)),t.createElement("div",{className:r.right},t.createElement("div",{className:r.title},t.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),t.createElement("span",null,$)),t.createElement("div",{className:r.rightNode},P)))},64642:function(Z,F,l){l.r(F),l.d(F,{default:function(){return H}});var t=l(59301),r=l(8409),E=l(66593),_=l(71471),h=l(71418),d=l(14523),f=l(94977),y=l(57197),I=l(24334),C=l(61186),P=l.n(C),$=(N,e,D)=>new Promise((j,b)=>{var L=v=>{try{R(D.next(v))}catch(A){b(A)}},O=v=>{try{R(D.throw(v))}catch(A){b(A)}},R=v=>v.done?j(v.value):Promise.resolve(v.value).then(L,O);R((D=D.apply(N,e)).next())}),H=()=>{const{submitId:N,id:e}=(0,_.useParams)(),[D,j]=(0,t.useState)(void 0);console.log((0,_.useLocation)(),33);const b=(0,_.useLocation)();function L(){var o;_.history.push(`/problems/${e}/oj/${(o=b==null?void 0:b.query)==null?void 0:o.backId}?tab=1`)}(0,t.useEffect)(()=>((0,_.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,_.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,_.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,_.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,t.useEffect)(()=>{document.title="\u5728\u7EBF\u5237\u9898"}),(0,t.useEffect)(()=>{N&&function(){return $(this,null,function*(){const p=yield(0,d.X6)(N);j(p.data)})}()},[N]);const{status:O,created_at:R,code:v,name:A,language:x,pass_sets_count:u,set_count:n,error_msg:W,output:Y,input:k,expected_output:X,execute_memory:w,user:K,execute_time:z,input_file_url:a,output_file_url:c,is_file:i,expected_output_file_url:g}=D||{};return t.createElement(h.Z,{spinning:!D,delay:500},t.createElement("div",{className:"record-detail-info"},D?t.createElement(t.Fragment,null,t.createElement("header",{className:r.Z.header},t.createElement("div",null,t.createElement("img",{src:`${E.Z.IMG_SERVER}/images/${K.image_url}`,alt:"user",width:30}),t.createElement("span",null,K.name)),t.createElement("h2",null," ",A," "),t.createElement("button",{className:"ant-btn",onClick:L,style:{border:"1px solid #bacffe",color:"#3061d0"}},"\u8FD4\u56DE\u8BE5\u9898")),t.createElement("div",{className:"record-detail-body"},t.createElement("h2",null," \u63D0\u4EA4\u8BB0\u5F55 "),t.createElement("ul",{className:"record-info"},t.createElement("li",null," \u72B6\u6001\uFF1A",t.createElement("span",{className:O===0?"c-green":"c-red"},f.Im[O])," "),t.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",t.createElement("span",null,P()(R).format("YYYY-MM-DD HH:mm:ss"))," "),t.createElement("li",null," \u8BED\u8A00\uFF1A",t.createElement("span",null,x)," "),t.createElement("li",null," \u6267\u884C\u7528\u65F6\uFF1A",t.createElement("span",null,z*1e3,"ms")," "),t.createElement("li",null," ",`${u} / ${n} \u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B`," ")),(0,f.gZ)({status:O,error_msg:W,execute_time:z,output:Y,input:k,expected_output:X,input_file_url:a,output_file_url:c,is_file:i,expected_output_file_url:g}),t.createElement("h2",null," \u63D0\u4EA4\u7684\u5185\u5BB9 "),t.createElement(y.ZP,{height:"200px",width:"100%",language:x==null?void 0:x.toLocaleLowerCase(),value:I.Base64.decode(v),options:{readOnly:!0}}))):null))}},94977:function(Z,F,l){l.d(F,{Im:function(){return W},ZP:function(){return z},gZ:function(){return w}});var t=l(59301),r=l(92832),E=l(3113),_=l(25173),h=l(16172),d=l(90160),f=l(24334),y=l(87516),I=l(83900),C=l(16427),P=l(28582),$=l(34376),H=l(92310),N=l.n(H),e=l(59301),D=Object.defineProperty,j=Object.defineProperties,b=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,v=(a,c,i)=>c in a?D(a,c,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[c]=i,A=(a,c)=>{for(var i in c||(c={}))O.call(c,i)&&v(a,i,c[i]);if(L)for(var i of L(c))R.call(c,i)&&v(a,i,c[i]);return a},x=(a,c)=>j(a,b(c));const{TextArea:u}=r.default,n={visible:!1,tabIndex:"0"},W={[d.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[d.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var Y=(a=>(a[a.SET_VISIBLE=0]="SET_VISIBLE",a[a.SET_TABINDEX=1]="SET_TABINDEX",a))(Y||{});function k(a,c){switch(c.type){case 0:return x(A({},a),{visible:c.payload});case 1:return x(A({},a),{tabIndex:c.payload});default:throw new Error}}function X({value:a,className:c}){const[i,g]=(0,t.useState)(!1),o=(0,t.useRef)(),p=(0,t.useRef)();return(0,t.useEffect)(()=>{i&&(p.current.reset(),p.current.write((0,C.pp)(a||"")))},[a,i]),(0,t.useEffect)(()=>{var m,T,U,M;if(o.current){p.current=new $.Terminal({fontSize:14,disableStdin:!0}),p.current.open(o.current);const B=o.current.offsetWidth-14,s=((M=(U=(T=(m=p.current)==null?void 0:m._core)==null?void 0:T._renderService)==null?void 0:U.dimensions)==null?void 0:M.actualCellWidth)||9.5,S=Math.ceil(B/s);p.current.resize(S,8),g(!0)}},[]),e.createElement("div",{ref:o,className:N()("XtermText-valueRef",c)})}function w(a){const{status:c,error_msg:i,output:g,input:o,expected_output:p,is_file:m,input_file_url:T,output_file_url:U,expected_output_file_url:M}=a;let B=null;const s={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(c){case d.h.NOMATCH:B=e.createElement(e.Fragment,null,e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!m&&e.createElement(X,{className:"mb10",value:o}),m&&e.createElement("div",{style:s},e.createElement("a",{onClick:()=>(0,C.LR)(T,o)},o)),e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!m&&e.createElement(X,{className:"mb10",value:g&&f.Base64.decode(g)||""}),m&&e.createElement("div",{style:s},e.createElement("a",{onClick:()=>(0,C.LR)(U,g)},g)),e.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!m&&e.createElement(X,{className:"mb10",value:p&&f.Base64.decode(p)||""}),m&&e.createElement("div",{style:s},e.createElement("a",{onClick:()=>(0,C.LR)(M,p)},p)));break;case d.h.EXECUTEFAILURE:B=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!m&&e.createElement(I.Z,{value:o,style:s}),m&&e.createElement("div",{style:s},e.createElement("a",{onClick:()=>(0,C.LR)(T,o)},o)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},f.Base64.decode(i)));break;case d.h.COMPILEFAILURE:B=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!m&&e.createElement(I.Z,{value:o,style:s}),m&&e.createElement("div",{style:s},e.createElement("a",{onClick:()=>(0,C.LR)(T,o)},o)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},f.Base64.decode(i)));break;case d.h.PODFAILURE:B=e.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.h.TIMEOUT:B=e.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return e.createElement(e.Fragment,null," ",B," ")}function K(a){const{status:c,error_msg:i,execute_time:g,output:o,input:p,expected_output:m,is_file:T,input_file_url:U,output_file_url:M,expected_output_file_url:B}=a;let s=null;switch(c){case d.h.OK:s=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",g,"\u79D2"),e.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),e.createElement("pre",null,f.Base64.decode(o)));break;case d.h.NOMATCH:s=e.createElement(e.Fragment,null,e.createElement("p",null,"\u8F93\u5165\uFF1A",e.createElement("pre",null,p)),e.createElement("p",null,"\u8F93\u51FA\uFF1A",o&&f.Base64.decode(o)),e.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",m&&f.Base64.decode(m)));break;case d.h.EXECUTEFAILURE:s=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",e.createElement("pre",null,p)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},f.Base64.decode(i)));break;case d.h.COMPILEFAILURE:s=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",e.createElement("pre",null,p)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},f.Base64.decode(i)));break;case d.h.PODFAILURE:s=e.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.h.TIMEOUT:s=e.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return e.createElement(e.Fragment,null," ",s," ")}var z=({id:a,is_file:c,input:i,debuging:g,submitting:o,executingMessage:p,debugResult:m,onChangeInput:T,onDebugCode:U,onSubmitCode:M})=>{const[B,s]=(0,t.useReducer)(k,n),{visible:S,tabIndex:ee}=B;(0,t.useEffect)(()=>{s({type:0,payload:!1})},[a]);function te(V){let q=V.target.id;s({type:1,payload:q})}function G(){s({type:0,payload:!S})}const J=(0,t.useMemo)(()=>{if(m){const{status:V}=m;return e.createElement(e.Fragment,null,K(m))}return null},[m]);function Q(){s({type:0,payload:!0}),s({type:1,payload:"1"}),U()}return e.createElement("div",{className:"test-case-panel"},e.createElement("div",{className:`test-case-panel-body ${S?"active":""}`},e.createElement("ul",{className:"s-navs"},e.createElement("li",null,e.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),e.createElement(P.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:e.createElement(u,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:c?"":i,onChange:T}),rightNode:g?e.createElement(y.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):m?J:e.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),e.createElement("a",{className:`btn-collapse ${S?"up":""}`,onClick:G},S?e.createElement(_.Z,null):e.createElement(h.Z,null)),e.createElement("footer",{className:"footer"},e.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),e.createElement("div",{className:"flex-container"},e.createElement(E.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),e.createElement(E.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),e.createElement(E.ZP,{className:"btn-green",type:"ghost",loading:g,onClick:Q},"\u8C03\u8BD5\u4EE3\u7801"),e.createElement(E.ZP,{type:"primary",className:"custom-ant-disabled",loading:o,disabled:o,onClick:()=>{s({type:0,payload:!1}),M()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},90160:function(Z,F,l){l.d(F,{h:function(){return t}});var t=(r=>(r[r.NOMATCH=-1]="NOMATCH",r[r.OK=0]="OK",r[r.TIMEOUT=2]="TIMEOUT",r[r.PODFAILURE=3]="PODFAILURE",r[r.COMPILEFAILURE=4]="COMPILEFAILURE",r[r.EXECUTEFAILURE=5]="EXECUTEFAILURE",r))(t||{})},14523:function(Z,F,l){l.d(F,{H7:function(){return I},KC:function(){return N},M3:function(){return b},MK:function(){return y},MU:function(){return _},Rg:function(){return R},WH:function(){return e},X6:function(){return d},bM:function(){return E},bx:function(){return D},dd:function(){return $},de:function(){return A},fi:function(){return C},fu:function(){return r},gu:function(){return j},n4:function(){return P},qe:function(){return O},rL:function(){return v},rX:function(){return f},uc:function(){return x},vl:function(){return H},wO:function(){return L},zO:function(){return h}});var t=l(40117);function r(u){return(0,t.U2)(`mypractices/${u}.json`,{hidePopLogin:!0})}function E(u,n){return(0,t.v_)(`mypractices/${u}/code_submit.json`,n)}function _(u,n){return(0,t.v_)(`mypractices/${u}/code_debug.json`,n)}function h(u,n){return n.language&&(n.language=encodeURIComponent(n.language)),(0,t.U2)(`mypractices/${u}/submit_records.json`,n)}function d(u){return(0,t.U2)("mypractices/record_detail.json",{id:u})}function f(u,n){return(0,t.U2)(`mypractices/${u}/result.json`,{mode:n})}function y(u,n){return(0,t.v_)(`mypractices/${u}/add_notes.json`,n)}function I(u,n){return(0,t.v_)(`mypractices/${u}/restore_initial_code.json`,n)}function C(u,n){return(0,t.v_)(`mypractices/${u}/sync_code.json`,n)}function P(u,n){return(0,t.v_)(`mypractices/${u}/update_code.json`,n)}function $(u){return(0,t.v_)(`mypractices/${u}/initial_codes.json`)}function H(u,n){return(0,t.v_)(`discusses/${u}/plus.json`,n)}function N(u){return(0,t.U2)("practices/practices_list.json",u)}function e(u,n){return(0,t.U2)(`practices/${u}/question_solution_articles`,n)}function D(u,n){return(0,t.v_)(`practices/${u}/question_solution_articles`,n)}function j(u,n){return(0,t.gz)(`practices/${u}/question_solution_articles/${n==null?void 0:n.active}`,n)}function b(u,n){return(0,t.U2)(`practices/${u}/question_solution_articles/${n==null?void 0:n.active}/edit`,n)}function L(u,n){return(0,t.U2)(`practices/${u}/question_solution_articles/${n==null?void 0:n.active}`,n)}function O(u,n){return(0,t.v_)(`practices/${u}/question_solution_articles/${n==null?void 0:n.active}/set_authority_or_excellent`,n)}function R(u,n){return(0,t.v_)(`practices/${u}/question_solution_articles/${n==null?void 0:n.active}/praise_or_treads`,n)}function v(u,n){return(0,t.v_)(`practices/${u}/question_solution_articles/${n==null?void 0:n.active}/hide`)}function A(u,n){return(0,t.IV)(`practices/${u}/question_solution_articles/${n==null?void 0:n.active}`,n)}function x(u,n){return(0,t.v_)(`mypractices/${u}/update_practice_time_sum`,n)}}}]);