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.
educoder/public/react/dist/static/js/134.2e740431.chunk.js

1 line
12 KiB

(this.webpackJsonph5=this.webpackJsonph5||[]).push([[134],{1522:function(e,t,a){"use strict";a(1523);var n=a(0),r=a.n(n),i=a(28);t.a=function(e){var t=e.userInfo,a=t.image_url,n=t.name;return r.a.createElement("div",{className:"avator_nicker"},r.a.createElement("img",{style:{display:a?"inline-block":"none"},alt:"\u7528\u6237\u5934\u50cf",className:"student_img",src:Object(i.L)("images/".concat(a)||!1)}),r.a.createElement("span",{className:"student_nicker"},n||""))}},1523:function(e,t,a){},1907:function(e,t,a){},1930:function(e,t,a){"use strict";a(170);var n=a(18).a.createFromIconfontCN({scriptUrl:"//at.alicdn.com/t/font_1535266_i4ilpm93kp.js"});t.a=n},1948:function(e,t,a){"use strict";var n=a(8),r=a(7),i=a(10),c=a(9),l=a(11),o=a(0),u=a.n(o),s=(a(1907),window.$,function(e){function t(){return Object(n.a)(this,t),Object(i.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this.props,t=(e.challenge,e.vnc_url,e.children),a=e.className;return u.a.createElement("div",{className:"float_button ".concat(a),onClick:this.props.onClick},u.a.createElement("style",null,"\n \n "),u.a.createElement("span",{class:"text"},t||"\u7248\u672c\u5e93"))}}]),t}(o.Component));t.a=s},2202:function(e,t,a){},2203:function(e,t,a){},2414:function(e,t,a){"use strict";a.r(t),a(104);var n=a(60),r=(a(965),a(970)),i=(a(131),a(39)),c=(a(259),a(167)),l=(a(170),a(18)),o=(a(50),a(29)),u=a(136),s=(a(1909),a(1940)),m=(a(273),a(91)),p=(a(268),a(95)),f=(a(2202),a(0)),d=a.n(f),_=a(1927),y=a(183),g=a(1948),h=a(1522),j=a(194);function E(e){var t=e.status,a=e.url,n=e.onReloadUrl,r=(e.onSave,e.loading),i=Object(f.useState)((function(){return s})),c=Object(u.a)(i,2),l=c[0],o=c[1],s=d.a.createElement("div",{className:"jupyter_loading_init"}),m=d.a.createElement("div",{className:"jupyter_load_url_error"},d.a.createElement("span",{className:"iconfont icon-jiazaishibai1 icon-error"}),d.a.createElement("p",{className:"jupyter_error_txt"},"\u5b9e\u8bad\u52a0\u8f7d\u5931\u8d25\uff0c",d.a.createElement("span",{className:"jupyter_reload",onClick:function(){n&&n()}},"\u91cd\u65b0\u52a0\u8f7d")));return Object(f.useEffect)((function(){o(-1===t?function(){return s}:0===t&&a?function(){return d.a.createElement("div",{className:"jupyter_result"},d.a.createElement("div",{className:"jupyter_iframe"},d.a.createElement("iframe",{id:"rightPaneframe",title:" ",width:"100%",height:"100%",src:a,className:"jupyter_iframe_style"})))}:function(){return m})}),[t,a,r]),d.a.createElement("div",{className:"jupyter_right_pane_area"},l)}function v(e){"getSelection"in window?window.getSelection().removeAllRanges():document.selection.empty(),document.getElementById(e).select(),document.execCommand("Copy")?p.a.success("\u590d\u5236\u6210\u529f"):p.a.error("\u590d\u5236\u5931\u8d25")}a(2203),a(1930),t.default=Object(y.b)((function(e){var t=e.jupyterReducer,a=t.jupyter_info,n=t.jupyter_tpi_url,r=t.jupyter_data_set,i=t.jupyter_tpi_url_state,c=t.jupyter_data_set_count,l=t.jupyter_folder_name,o=t.jupyter_pagination,u=t.jupyter_identifier,s=e.commonReducer,m=s.loading,p=s.drawervisible,f=s.jupytertime,d=s.spinning;return{loading:m,jupyter_info:a,url:n,dataSets:r,jupyter_tpi_url_state:i,total:c,pagination:o,jupyter_folder_name:l,jupyter_identifier:u,drawervisible:p,jupytertime:f,endjupytertime:s.endjupytertime,spinning:d}}),(function(e){return{changeGetJupyterUrlState:function(t){return e(j.a.changeGetJupyterUrlState(t))},getJupyterInfo:function(t){return e(j.a.getJupyterInfo(t))},syncJupyterCode:function(t,a){return e(j.a.syncJupyterCode(t,a))},reset_with_tpi:function(t,a){return e(j.a.reset_with_tpi(t,a))},getJupyterTpiDataSet:function(t,a){return e(j.a.getJupyterTpiDataSet(t,a))},getJupyterTpiUrl:function(t){return e(j.a.getJupyterTpiUrl(t))},saveJupyterTpi:function(){return e(j.a.saveJupyterTpi())},changeLoadingState:function(t){return e(j.a.changeLoadingState(t))},changeCurrentPage:function(t){return e(j.a.changeCurrentPage(t))},changeshowDrawer:function(t){return e(j.a.changeshowDrawer(t))},addjypertime:function(t){return e(j.a.addjypertime(t))},active_with_tpi:function(t,a){return e(j.a.active_with_tpi(t,a))},updataspinning:function(t,a){return e(j.a.updataspinning(t,a))}}}))((function(e){function t(e){var t=document.getElementById("rightPaneframe");null!=t&&null!=t&&""!=t&&(1===e?t.contentWindow.postMessage("stopParent","*"):t.contentWindow.postMessage("clonsParent","*"))}var a=e.match.params,p=void 0===a?{}:a,y=e.url,j=e.loading,b=e.total,N=e.pagination,w=e.dataSets,k=e.jupyter_info,x=e.getJupyterInfo,O=e.syncJupyterCode,T=e.jupyter_tpi_url_state,S=e.getJupyterTpiDataSet,C=e.getJupyterTpiUrl,J=e.saveJupyterTpi,H=e.changeLoadingState,U=e.changeGetJupyterUrlState,D=e.jupyter_identifier,I=e.changeCurrentPage,P=e.changeshowDrawer,R=e.drawervisible,z=e.reset_with_tpi,F=e.jupytertime,L=e.endjupytertime,G=e.active_with_tpi,M=e.spinning,A=e.updataspinning,B=e.jupyter_folder_name,W=d.a.createElement("div",{className:"jupyter_empty"},d.a.createElement("style",null,"\n .ant-empty{\n margin-top:80px;\n color:#fff;\n }\n "),d.a.createElement(m.a,null)),Y=s.a.Countdown,$=p.identifier,q=Object(f.useState)({}),K=Object(u.a)(q,2),Q=K[0],V=K[1],X=Object(f.useState)({}),Z=Object(u.a)(X,2),ee=Z[0],te=Z[1],ae=Object(f.useState)(!0),ne=Object(u.a)(ae,2),re=ne[0],ie=ne[1],ce=Object(f.useState)(""),le=Object(u.a)(ce,2),oe=le[0],ue=le[1],se=Object(f.useState)((function(){return W})),me=Object(u.a)(se,2),pe=me[0],fe=me[1],de=!1;return Object(f.useEffect)((function(){window.addEventListener("message",(function(e){e&&e.data&&"jupytermessage"===e.data&&!1===de&&(de=!0,J(void 0),setTimeout((function(){de=!1}),500))}))}),[]),Object(f.useEffect)((function(){x($)}),[$]),Object(f.useEffect)((function(){te(k||{});var e=k.user,a=k.tpm_modified,n=k.myshixun_identifier;e&&V(e),n&&ue(n),a&&re&&n&&(ie(!1),A(!0),o.a.confirm({title:"\u66f4\u65b0\u901a\u77e5",content:d.a.createElement("div",{className:"update_notice"},t(1),d.a.createElement("p",{className:"update_txt"},"\u8be5\u5b9e\u8bad\u5df2\u66f4\u65b0\uff0c\u60a8\u9009\u62e9\u66f4\u65b0\u540e\u4e4b\u524d\u7f16\u5199\u7684\u5b9e\u8bad\u4ee3\u7801\u5c06\u4f1a\u4e22\u5931\uff0c\u5982\u6709\u9700\u8981\u8bf7\u5148\u4f7f\u7528\u3010jupyter\u4e2d-\u6587\u4ef6-\u4e0b\u8f7d\u3011\u4fdd\u5b58\u4ee3\u7801\uff0c\u518d\u8fdb\u884c\u66f4\u65b0")),okText:"\u7acb\u5373\u66f4\u65b0",cancelText:"\u7a0d\u540e\u518d\u8bf4",onOk:function(){O(n,"\u540c\u6b65\u6210\u529f")},onCancel:function(){A(!1),t(2)}}))}),[e]),Object(f.useEffect)((function(){if(0<w.length){var e=w.map((function(e,t){return d.a.createElement("li",{className:"jupyter_item",key:"key_".concat(t)},d.a.createElement(c.a,{placement:"right",mouseLeaveDelay:.3},d.a.createElement("div",{className:"sortinxdirection"},d.a.createElement(l.a,{type:"file-text",className:"jupyter_icon fl lineheighttaj filestyles"}),d.a.createElement("a",{className:"jupyter_name ml10 maxnamewidth152 lineheighttaj colorlineheighttaj",title:e.title},e.title),d.a.createElement("a",{className:"fr color-blue lineheighttaj",onClick:function(){v("file_path"+t)}},"\u590d\u5236\u5730\u5740")),d.a.createElement("input",{id:"file_path"+t,className:"file_path_input",value:e.file_path})))})),t=d.a.createElement("ul",{className:"jupyter_data_list",onScroll:function(e){return function(e,t){var a=parseInt(e.currentTarget.scrollTop),n=e.currentTarget.clientHeight+a;w.length<b&&(e.currentTarget.scrollHeight-n!=0&&e.currentTarget.scrollHeight-n!=1&&e.currentTarget.scrollHeight-n!=-1||(I(t+1),S(D)))}(e,N.page)}},e);fe(t)}}),[e]),d.a.createElement(n.a,{tip:"\u52a0\u8f7d\u4e2d...",spinning:M},d.a.createElement("div",{className:"jupyter_area"},d.a.createElement("div",{className:"jupyter_header"},d.a.createElement(h.a,{userInfo:Q}),d.a.createElement("p",{className:"jupyter_title"},d.a.createElement("span",{className:"title_desc",style:{marginTop:"10px"}},ee.name),d.a.createElement("span",{className:"title_time jupytertitle_time"},d.a.createElement(Y,{value:F,format:"HH:mm:ss",onFinish:function(){o.a.destroyAll(),o.a.confirm({title:"\u5012\u8ba1\u65f6\u622a\u6b62",content:d.a.createElement("p",{style:{lineHeight:"24px"}},"\u670d\u52a1\u5df2\u4e2d\u65ad\uff0c\u662f\u5426\u786e\u8ba4\u91cd\u7f6e\u5b9e\u9a8c\u73af\u5883\uff1f"),okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",onOk:function(){z(oe,"\u91cd\u7f6e\u6210\u529f")}})}}),d.a.createElement("span",{className:"Countdowntypes"},!1===L?"":d.a.createElement(Y,{value:L,format:"HH:mm:ss",onFinish:function(){o.a.confirm({title:"\u670d\u52a1\u4e2d\u65ad\u63d0\u9192",content:d.a.createElement("p",{style:{lineHeight:"24px"}},"jupyter\u5c06\u4e8e",d.a.createElement("span",{className:"Countdownfonttpi"},d.a.createElement(Y,{value:F,format:"HH:mm:ss"})),"\u65f6\u95f4\u540e\u670d\u52a1\u4e2d\u65ad\uff0c\u662f\u5426\u9700\u8981\u5ef6\u957f\u4f7f\u7528\u65f6\u95f4\uff1f"),okText:"\u7acb\u5373\u5ef6\u957f",cancelText:"\u4e0d\u9700\u8981",onOk:function(){G(oe,"\u5ef6\u957f\u6210\u529f")}})}})))),d.a.createElement("p",{className:"jupyter_btn"},d.a.createElement(i.a,{className:"btn_common",type:"link",icon:"history",onClick:function(){t(1),A(!0),o.a.confirm({title:"\u91cd\u7f6e\u5b9e\u8bad",content:d.a.createElement("p",{style:{lineHeight:"24px"}},"\u4f60\u5728\u672c\u6587\u4ef6\u4e2d\u4fee\u6539\u7684\u5185\u5bb9\u5c06\u4e22\u5931,",d.a.createElement("br",null),"\u662f\u5426\u786e\u5b9a\u91cd\u65b0\u52a0\u8f7d\u521d\u59cb\u4ee3\u7801\uff1f"),okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",onOk:function(){oe&&O(oe,"\u91cd\u7f6e\u6210\u529f")},onCancel:function(){t(2),A(!1)}})}},"\u91cd\u7f6e\u5b9e\u8bad"),d.a.createElement(i.a,{className:"btn_common",type:"link",icon:"sync",onClick:function(){t(1),A(!0),o.a.confirm({title:"\u91cd\u7f6e\u73af\u5883",content:d.a.createElement("p",{style:{lineHeight:"24px"}},"\u662f\u5426\u786e\u5b9a\u91cd\u7f6e\u73af\u5883\uff1f"),okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",onOk:function(){z(oe,"\u91cd\u7f6e\u6210\u529f")},onCancel:function(){A(!1),t(2)}})}},"\u91cd\u7f6e\u73af\u5883"),d.a.createElement(i.a,{className:"btn_common",type:"link",icon:"poweroff",onClick:function(){var t=ee.identifier;t&&e.history.push("/shixuns/".concat(t,"/challenges"))}},"\u9000\u51fa\u5b9e\u8bad"))),d.a.createElement("div",{className:"jupyter_ctx"},d.a.createElement(_.a,{split:"vertical",minSize:350,maxSize:-350,defaultSize:"100%"},d.a.createElement(_.a,{split:"vertical",defaultSize:"100%",allowResize:!1},d.a.createElement(E,{identifier:oe,status:T,url:y,loading:j,onReloadUrl:function(){U(-1),C({identifier:oe})},onSave:function(){H(!0),J()}}),d.a.createElement(g.a,{onClick:function(){P(!R)},className:!1===R?"jupyter_float_button":"jupyter_float_button newjupyter_float_button"},"\u6570\u636e\u96c6"))),d.a.createElement(r.a,{placement:"right",closable:!1,mask:!1,visible:R,className:"RightPaneDrawer"},d.a.createElement("div",{className:"jupyter_data_sets_area newjupyter_data_sets_area"},d.a.createElement("h2",{className:"jupyter_h2_title bortop17212F"},d.a.createElement("i",{className:"iconfont icon-base"}),"\u6570\u636e\u96c6"),w&&0===w.length?"":d.a.createElement("h2",{className:"borbottom17212F jupyterfilepaths bortop17212F pt5"},d.a.createElement("span",{className:"ml50"},"\u6587\u4ef6\u8def\u5f84"),d.a.createElement("div",{className:"sortinxdirection"},d.a.createElement("a",{className:"jupyter_name ml50 maxnamewidth186JUPYTER colorlineheightta height45lineheight45"},B),d.a.createElement("a",{className:"fr color-blue font-14 height45lineheight45",onClick:function(){v("jupyter_folder_name")}},"\u590d\u5236\u5730\u5740")),d.a.createElement("input",{id:"jupyter_folder_name",className:"file_path_input",value:B})),pe)))))}))}}]);