From 80506606bc41e19f12bdcb32753fd8f3c77fd5f7 Mon Sep 17 00:00:00 2001 From: eduauto Date: Tue, 16 Jan 2024 16:40:28 +0800 Subject: [PATCH] autoUpdataFile --- 11649.async.js | 2 +- 22394.async.js | 2 +- 27627.async.js | 1 + 41977.async.js | 2 +- 43435.async.js | 2 +- 49243.async.js | 1 - 49616.async.js | 2 +- 5338.async.js | 2 +- 57704.async.js | 2 +- 9180.async.js | 2 +- layouts__CoreDetail__index.async.js | 2 +- p__Classrooms__Lists__CommonHomework__Comment__index.async.js | 2 +- p__Classrooms__Lists__CommonHomework__Detail__index.async.js | 2 +- p__Classrooms__Lists__Exercise__Add__index.async.js | 2 +- p__Classrooms__Lists__Exercise__Answer__index.async.js | 2 +- p__Classrooms__Lists__Exercise__Detail__index.async.js | 2 +- p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js | 2 +- p__Classrooms__Lists__GroupHomework__Detail__index.async.js | 2 +- p__Classrooms__Lists__ProgramHomework__Comment__index.async.js | 2 +- p__Classrooms__Lists__ProgramHomework__Detail__index.async.js | 2 +- p__Classrooms__Lists__ShixunHomeworks__Comment__index.async.js | 2 +- p__Classrooms__Lists__ShixunHomeworks__Detail__index.async.js | 2 +- p__Competitions__Detail__index.async.js | 2 +- p__Competitions__Edit__index.async.js | 2 +- p__CoreCurriculum__Lists__Answers__index.async.js | 2 +- p__CoreCurriculum__Lists__Knowledge__index.async.js | 2 +- p__CoreCurriculum__Lists__Overview__index.async.js | 2 +- p__CoreCurriculum__Lists__Plan__index.async.js | 2 +- p__Graduations__Lists__Topics__index.async.js | 2 +- p__MyProblem__index.async.js | 2 +- p__Paperlibrary__Add__index.async.js | 2 +- p__Paperlibrary__Random__Edit__index.async.js | 2 +- p__Problems__OjForm__NewEdit__index.async.js | 2 +- p__Problems__OjForm__index.async.js | 2 +- p__Problemset__NewItem__index.async.js | 2 +- p__Problemset__index.async.js | 2 +- p__Question__AddOrEdit__index.async.js | 2 +- p__Question__OjProblem__index.async.js | 2 +- p__Shixuns__Detail__Discuss__index.async.js | 2 +- p__Shixuns__Edit__index.async.js | 2 +- p__index.async.js | 2 +- umi.js | 2 +- 42 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 27627.async.js delete mode 100644 49243.async.js diff --git a/11649.async.js b/11649.async.js index 03fb058333..d6cb8b154c 100644 --- a/11649.async.js +++ b/11649.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[11649,62438],{57014:function(e,n,t){t.d(n,{JW:function(){return T},Jd:function(){return C},Kl:function(){return D},L5:function(){return h},MH:function(){return R},MI:function(){return W},Qo:function(){return _},SO:function(){return m},Tf:function(){return j},XO:function(){return p},Xy:function(){return y},Y0:function(){return Z},Ye:function(){return X},Yv:function(){return G},ZH:function(){return L},am:function(){return M},bD:function(){return H},fA:function(){return B},fY:function(){return A},g6:function(){return f},g7:function(){return J},gT:function(){return w},gn:function(){return U},h$:function(){return Y},hG:function(){return b},i8:function(){return z},j3:function(){return O},lH:function(){return E},li:function(){return x},n4:function(){return v},pU:function(){return N},qK:function(){return g},sA:function(){return k},sP:function(){return S},t$:function(){return P},zl:function(){return I}});var i=t(7557),r=t.n(i),c=t(41498),a=t.n(c),o=t(82242),s=t.n(o),l=t(78092),u=(0,t(88123).oP)(),d={};function p(e){return(0,l.U2)("tasks/".concat(e,".json"),d)}function f(e){return(0,l.U2)("myshixuns/".concat(e,"/challenges.json"))}function m(e,n){return(0,l.U2)("myshixuns/".concat(e,"/subject_challenges.json"),n)}function h(e,n,t){return(0,l.U2)("tasks/".concat(e,"/star.json"),{shixun_id:n,star:t})}function x(e,n){return(0,l.U2)("tasks/".concat(e,"/rep_content.json"),s()(s()({},n),d))}function v(e,n){return(0,l.v_)("myshixuns/".concat(e,"/update_file.json"),n)}function g(e,n){return(0,l.U2)("tasks/".concat(e,"/reset_original_code.json"),s()(s()({},n),d))}function j(e,n){return(0,l.v_)("myshixuns/".concat(e,"/reset_repository.json"),n)}function b(e,n){return(0,l.U2)("tasks/".concat(e,"/reset_passed_code.json"),s()(s()({},n),d))}function y(e,n){return(0,l.v_)("tasks/".concat(e,"/game_build.json"),s()(s()({},n),d))}function _(e,n){return(0,l.U2)("tasks/".concat(e,"/game_status.json"),s()(s()({},n),d))}function I(e,n){return(0,l.v_)("tasks/".concat(e,"/choose_build.json"),s()(s()({},n),d))}function A(e){return(0,l.U2)("myshixuns/".concat(e,"/get_remaining_time.json"))}function w(e){return(0,l.U2)("tasks/".concat(e,"/picture_display.json"),d)}function Z(e){return(0,l.v_)("tasks/".concat(e,"/plus_or_cancel_praise.json"))}function N(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,l.v_)("myshixuns/".concat(e,"/repository.json"),n)}function k(e,n){return(0,l.U2)("myshixuns/".concat(e,"/start.json"),n||{})}function M(e,n){return(0,l.U2)("myshixuns/".concat(e,"/reset_pod.json"),n)}function C(e,n){return(0,l.ZP)("/api/tasks/".concat(e,"/reboot_esc.json"),{method:"post",body:n})}function P(e){return(0,l.U2)("tasks/".concat(e,"/check_test_sets.json"))}function E(e){return(0,l.U2)("tasks/".concat(e,"/get_answer_info.json"))}function S(e){return(0,l.U2)("tasks/".concat(e,"/get_choose_answer.json"))}function R(e){return(0,l.U2)("tasks/".concat(e,"/unlock_choose_answer.json"))}function O(e,n){return(0,l.U2)("tasks/".concat(e,"/unlock_answer.json"),{answer_id:n})}function T(e,n,t){return(0,l.v_)("tasks/".concat(e,"/set_games_status.json"),{result:n,data:t})}function D(e,n){return(0,l.U2)("myshixuns/".concat(e,"/active_pod.json"),n)}function z(e,n){return(0,l.U2)("tasks/".concat(e,"/rank_list.json"),n)}function B(e,n){return(0,l.v_)("tasks/".concat(e,"/close_windows_vnc.json"),{tpi_id:n})}function L(e,n){return(0,l.U2)("tasks/".concat(e,"/commit_files.json"),n)}function U(e,n){return(0,l.U2)("tasks/".concat(e,"/pull_files.json"),n)}function Y(e,n){return(0,l.v_)("tasks/".concat(e,"/log_output"),n)}function G(e,n){return(0,l.U2)("tasks/".concat(e,"/stop_log_output.json"),n)}function W(e){return Q.apply(this,arguments)}function Q(){return(Q=a()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.ZP)("/api/myshixuns/".concat(n.id,"/add_file.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(e){return V.apply(this,arguments)}function V(){return(V=a()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.ZP)("/api/myshixuns/".concat(n.id,"/delete_git_file.json"),{method:"Delete",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function J(e){return F.apply(this,arguments)}function F(){return(F=a()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.ZP)("/api/myshixuns/".concat(n.id,"/mv_file.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e,n){return(0,l.ZP)("/api/shixuns/".concat(e,"/set_start_permanent.json"),{method:"put",body:n})}null!=u&&u.homework_common_id&&(d.homework_common_id=null==u?void 0:u.homework_common_id),null!=u&&u.exercisesId&&(d.exercise_id=null==u?void 0:u.exercisesId)},62438:function(e,n,t){t.d(n,{z:function(){return Z},Z:function(){return N}});var i=t(7557),r=t.n(i),c=t(41498),a=t.n(c),o=t(82242),s=t.n(o),l=t(37205),u=t.n(l),d=t(79800),p=t.n(d),f=t(59301),m=t(48826),h=t(8591),x=t(43418),v=t(3113),g=t(80548),j=t(14503),b=t(37712),y="  ";function _(e){if(0==e)return"0 Byte";var n=parseInt(""+Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,n)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][n]}var I=t(60936),A=t(89392);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var w=m.Z.Dragger;function Z(e){var n=[];return e&&e.length>0&&(n=e.map((function(e){return{uid:e.id,id:e.id,name:e.title+y+e.filesize,url:e.url,filesize:e.filesize,status:"done",response:{id:e.id}}}))),n}var N=function(e){var n=e.value,t=e.onChange,i=e.action,c=e.data,o=e.className,l=e.maxSize,d=void 0===l?150:l,Z=e.title,N=void 0===Z?"上传附件":Z,k=e.showRemoveModal,M=void 0!==k&&k,C=e.accept,P=void 0===C?"":C,E=e.additionalText,S=e.isDragger,R=e.number,O=void 0===R?1e3:R,T=e.aloneClear,D=void 0!==T&&T,z=(0,f.useState)(!1),B=p()(z,2),L=B[0],U=B[1],Y=(0,f.useState)(n||[]),G=p()(Y,2),W=G[0],Q=G[1],H=(0,f.useState)(1),V=p()(H,2),J=V[0],F=V[1];(0,f.useEffect)((function(){n&&(1===J&&Q(u()(n)),F(2),O===(null==n?void 0:n.length)&&U(!0))}),[n]);var X,q=function(){setTimeout((function(){W.pop(),Q(u()(W))}),500)},K={multiple:!0,disabled:L,accept:P,withCredentials:!0,fileList:W,beforeUpload:function(e,n){var t=e.size/1024/1024;return W.concat(n).length>O?(W.pop(),Q(u()(W)),h.ZP.error("最多只能上传".concat(O,"个文件")),D?Promise.reject():(q(),!1)):t=O?U(!0):U(!1),Q(u()(W)),W=W.map((function(e){var n,t;null!=e&&null!==(n=e.response)&&void 0!==n&&n.id&&(e.url="/api/attachments/".concat(null==e||null===(t=e.response)||void 0===t?void 0:t.id));return-1===e.name.indexOf(y)&&(e.name="".concat(e.name).concat(y).concat(_(e.size))),s()({},e)})),console.log("info:",e,W),t(W)):h.ZP.error(null===(i=e.file)||void 0===i||null===(i=i.response)||void 0===i?void 0:i.message)},onRemove:(X=a()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.response?n.response.id:n.id)){e.next=8;break}return e.next=4,(0,j.JZ)(n.response?n.response.id:n.uid);case 4:return t=e.sent,e.abrupt("return",Promise.resolve(t));case 8:return e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!M){e.next=5;break}return e.abrupt("return",new Promise((function(e,n){var i;x.Z.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:(0,b.jsx)("div",{className:"tc font16",children:"是否确认删除?"}),onOk:(i=a()(r()().mark((function n(){return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t();case 2:n.sent,h.ZP.success("删除成功"),e(!0);case 5:case"end":return n.stop()}}),n)}))),function(){return i.apply(this,arguments)}),onCancel:function(){return e(!1)}})})));case 5:return e.next=7,t();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)}))),function(e){return X.apply(this,arguments)})};return(0,b.jsxs)("div",{className:"multi-upload ".concat(o||""),children:[S&&(0,b.jsxs)(w,s()(s()({},K),{},{children:[(0,b.jsx)("p",{className:"ant-upload-drag-icon",children:(0,b.jsx)(I.Z,{})}),(0,b.jsxs)("p",{className:"ant-upload-text",children:["点击上传图标,选择要上传的文件或将文件拖拽到此",(0,b.jsx)("br",{}),"(单个文件最大限制为",d,"MB)"," "]}),E]})),!S&&(0,b.jsxs)(m.Z,s()(s()({},K),{},{children:[(0,b.jsxs)(v.ZP,{disabled:L,className:"upload_button",children:[(0,b.jsx)("img",{className:"aBtn_img",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4="}),N]}),(0,b.jsxs)("span",{onClick:function(e){e.preventDefault(),e.stopPropagation()},className:"upload_text",children:["(单个文件最大",d,"MB)"," "]})]}))]})}},22775:function(e,n,t){t.d(n,{Z:function(){return _}});var i=t(82242),r=t.n(i),c=t(7557),a=t.n(c),o=t(41498),s=t.n(o),l=t(79800),u=t.n(l),d=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=t(3113),m=t(98915),h=t(59554),x=t(6848),v=t(88123),g=t(5168),j=t(30038),b=t(80548),y=t(37712),_=function(e){var n,t,i,c,o,l,_,I=e.editOffice,A=void 0===I?"view":I,w=e.data,Z=(e.theme,e.type),N=e.filename,k=e.monacoEditor,M=e.className,C=e.style,P=e.close,E=e.onClose,S=e.hasMask,R=e.disabledDownload,O=e.onImgDimensions,T=e.showNodata,D=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),z=u()(D,2),B=(z[0],z[1],(0,d.useState)("")),L=u()(B,2),U=(L[0],L[1]),Y=(0,d.useState)(),G=u()(Y,2),W=G[0],Q=G[1],H="build"===window.ENV?"/react/build":"",V=location.host.startsWith("localhost")?b.Z.PROXY_SERVER:b.Z.API_SERVER;console.log("disabledDownload---",R);var J=(0,d.useRef)();null!==(n=w)&&void 0!==n&&n.startsWith("/api")&&"txt"!==Z&&(w=b.Z.API_SERVER+w),N&&(k.filename=N),(0,d.useEffect)((function(){var e,n=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&U(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===Z&&F()}),[Z,w]);var F=function(){var e=s()(a()().mark((function e(){var n,t,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",w),n=w,w.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=6,(0,g.gJ)({attachment_id:t});case 6:i=e.sent,Q(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=function(){w.startsWith("http")||w.startsWith("blob:")?q():(0,v.Sv)(N||"educoder",w,N)},q=function(){(0,v.Nd)(N||"educoder",decodeURIComponent(w))};return console.log(w,"data"),(0,y.jsxs)("div",{style:r()({},C||{}),className:"".concat(S&&p.bgBlack," ").concat(Z?p.wrp:"hide"),children:[P&&(0,y.jsxs)("div",{className:p.close,ref:J,children:[!!O&&(0,y.jsx)(x.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return J.current},children:(0,y.jsx)("span",{onClick:function(){E(),O()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!R&&(0,y.jsx)(x.Z,{title:"点击下载此文件",getPopupContainer:function(){return J.current},children:(0,y.jsx)("span",{onClick:q,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(x.Z,{title:"关闭",getPopupContainer:function(){return J.current},children:(0,y.jsx)("span",{className:"",onClick:E,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(p[M]," ").concat(M," ").concat(p.monaco," ").concat("txt"===Z?"show":"hide"),children:"txt"===Z&&(0,y.jsx)(h.ZP,r()({},k))}),"audio"===Z&&(0,y.jsx)("audio",{src:(null===(t=w)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(i=w)&&void 0!==i&&i.startsWith("/api")?w:"data:image/png;base64,".concat(w),autoPlay:!0}),"video"===Z&&(0,y.jsx)(y.Fragment,{children:(null===(c=w)||void 0===c?void 0:c.indexOf("http"))>-1||null!==(o=w)&&void 0!==o&&o.startsWith("/api")?(0,y.jsx)("video",{controls:!0,src:"".concat(w),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(w),autoPlay:!0})}),"office"===Z&&W&&(0,y.jsx)("iframe",{src:"".concat(H,"/office.html?key=").concat(W.key,"&url=").concat(V+W.url,"&callbackUrl=").concat(V+W.callbackUrl,"&fileType=").concat(W.fileType,"&title=").concat(W.title,"&model=").concat(A,"&officeServer=").concat(b.Z.ONLYOFFICE,"&disabledDownload=").concat(!!R)}),"html"===Z&&(0,y.jsx)("iframe",{src:w+"&disposition=inline"}),"pdf"===Z&&(0,y.jsx)("iframe",{src:"".concat(H,"/js/pdfview/index.html?url=").concat(w,"&disabledDownload=").concat(!!R)}),"image"===Z&&(0,y.jsx)("img",{src:(null===(l=w)||void 0===l?void 0:l.indexOf("http"))>-1||null!==(_=w)&&void 0!==_&&_.startsWith("/api")?w:"data:image/png;base64,".concat(w)}),("other"===Z||"download"===Z)&&(0,y.jsx)(y.Fragment,{children:T?(0,y.jsx)(j.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(f.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:X,children:"下载"})}):(0,y.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:X,children:[(0,y.jsx)(m.Z,{}),"点击下载"]})})]})}},41977:function(e,n,t){t.d(n,{Z:function(){return G}});var i=t(82242),r=t.n(i),c=t(37205),a=t.n(c),o=t(91232),s=t.n(o),l=t(79800),u=t.n(l),d=t(59301),p=(t(68728),t(32834)),f=t.n(p),m=t(11690);var h=[],x=["