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.
2 lines
112 KiB
2 lines
112 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7460],{77353:function(ut,he,m){m.d(he,{Z:function(){return z}});var e=m(63144),$={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},ce=m(59301),z=({message:ue,className:T,children:ee,style:X={}})=>ce.createElement("div",{className:`custom-spinner ${$.idsRingWrapper} ${T}`},ce.createElement("div",{className:$.ldsRing},ce.createElement("div",null),ce.createElement("div",null),ce.createElement("div",null),ce.createElement("div",null)),ue?ce.createElement("p",{style:X},ue):null,ee,ce.createElement(e.Outlet,null))},44475:function(ut,he,m){m.d(he,{Im:function(){return se},ZP:function(){return Dt},gZ:function(){return Qe}});var e=m(59301),$=m(98135),ce=m(3113),z=m(43501),ue=m(53547),T=m(26132),ee=m(24334),X=m(77353),de=m(31272),M=m(15826),U=m(19137),c=m(59301),ve=Object.defineProperty,ze=Object.defineProperties,H=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,pe=(G,W,ie)=>W in G?ve(G,W,{enumerable:!0,configurable:!0,writable:!0,value:ie}):G[W]=ie,te=(G,W)=>{for(var ie in W||(W={}))Ae.call(W,ie)&&pe(G,ie,W[ie]);if(me)for(var ie of me(W))Se.call(W,ie)&&pe(G,ie,W[ie]);return G},Ke=(G,W)=>ze(G,H(W));const{TextArea:qe}=$.default,rt={visible:!1,tabIndex:"0"},se={[T.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[T.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 N=(G=>(G[G.SET_VISIBLE=0]="SET_VISIBLE",G[G.SET_TABINDEX=1]="SET_TABINDEX",G))(N||{});function p(G,W){switch(W.type){case 0:return Ke(te({},G),{visible:W.payload});case 1:return Ke(te({},G),{tabIndex:W.payload});default:throw new Error}}function Qe(G){const{status:W,error_msg:ie,output:Ce,input:le,expected_output:Fe,is_file:K,input_file_url:Re,output_file_url:Ue,expected_output_file_url:ke}=G;let Ee=null;const Q={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(W){case T.h.NOMATCH:Ee=c.createElement(c.Fragment,null,c.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!K&&c.createElement(de.Z,{value:le,style:Q}),K&&c.createElement("div",{style:Q},c.createElement("a",{onClick:()=>(0,M.LR)(Re,le)},le)),c.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!K&&c.createElement(de.Z,{value:Ce&&ee.Base64.decode(Ce)||"",style:Q}),K&&c.createElement("div",{style:Q},c.createElement("a",{onClick:()=>(0,M.LR)(Ue,Ce)},Ce)),c.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!K&&c.createElement(de.Z,{value:Fe&&ee.Base64.decode(Fe)||"",style:Q}),K&&c.createElement("div",{style:Q},c.createElement("a",{onClick:()=>(0,M.LR)(ke,Fe)},Fe)));break;case T.h.EXECUTEFAILURE:Ee=c.createElement(c.Fragment,null,c.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!K&&c.createElement(de.Z,{value:le,style:Q}),K&&c.createElement("div",{style:Q},c.createElement("a",{onClick:()=>(0,M.LR)(Re,le)},le)),c.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),c.createElement("pre",{className:"error"},ee.Base64.decode(ie)));break;case T.h.COMPILEFAILURE:Ee=c.createElement(c.Fragment,null,c.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!K&&c.createElement(de.Z,{value:le,style:Q}),K&&c.createElement("div",{style:Q},c.createElement("a",{onClick:()=>(0,M.LR)(Re,le)},le)),c.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),c.createElement("pre",{className:"error"},ee.Base64.decode(ie)));break;case T.h.PODFAILURE:Ee=c.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case T.h.TIMEOUT:Ee=c.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return c.createElement(c.Fragment,null," ",Ee," ")}function yt(G){const{status:W,error_msg:ie,execute_time:Ce,output:le,input:Fe,expected_output:K,is_file:Re,input_file_url:Ue,output_file_url:ke,expected_output_file_url:Ee}=G;let Q=null;switch(W){case T.h.OK:Q=c.createElement(c.Fragment,null,c.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Ce,"\u79D2"),c.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),c.createElement("pre",null,ee.Base64.decode(le)));break;case T.h.NOMATCH:Q=c.createElement(c.Fragment,null,c.createElement("p",null,"\u8F93\u5165\uFF1A",c.createElement("pre",null,Fe)),c.createElement("p",null,"\u8F93\u51FA\uFF1A",le&&ee.Base64.decode(le)),c.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",K&&ee.Base64.decode(K)));break;case T.h.EXECUTEFAILURE:Q=c.createElement(c.Fragment,null,c.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",c.createElement("pre",null,Fe)),c.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),c.createElement("pre",{className:"error"},ee.Base64.decode(ie)));break;case T.h.COMPILEFAILURE:Q=c.createElement(c.Fragment,null,c.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",c.createElement("pre",null,Fe)),c.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),c.createElement("pre",{className:"error"},ee.Base64.decode(ie)));break;case T.h.PODFAILURE:Q=c.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case T.h.TIMEOUT:Q=c.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return c.createElement(c.Fragment,null," ",Q," ")}var Dt=({id:G,is_file:W,input:ie,debuging:Ce,submitting:le,executingMessage:Fe,debugResult:K,onChangeInput:Re,onDebugCode:Ue,onSubmitCode:ke})=>{const[Ee,Q]=(0,e.useReducer)(p,rt),{visible:et,tabIndex:Nt}=Ee;(0,e.useEffect)(()=>{Q({type:0,payload:!1})},[G]);function Ct(it){let jt=it.target.id;Q({type:1,payload:jt})}function dt(){Q({type:0,payload:!et})}const _t=(0,e.useMemo)(()=>{if(K){const{status:it}=K;return c.createElement(c.Fragment,null,yt(K))}return null},[K]);function It(){Q({type:0,payload:!0}),Q({type:1,payload:"1"}),Ue()}return c.createElement("div",{className:"test-case-panel"},c.createElement("div",{className:`test-case-panel-body ${et?"active":""}`},c.createElement("ul",{className:"s-navs"},c.createElement("li",null,c.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),c.createElement(U.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:c.createElement(qe,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\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:W?"":ie,onChange:Re}),rightNode:Ce?c.createElement(X.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):K?_t:c.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")})),c.createElement("a",{className:`btn-collapse ${et?"up":""}`,onClick:dt},et?c.createElement(z.Z,null):c.createElement(ue.Z,null)),c.createElement("footer",{className:"footer"},c.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),c.createElement("div",{className:"flex-container"},c.createElement(ce.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),c.createElement(ce.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),c.createElement(ce.ZP,{className:"btn-green",type:"ghost",loading:Ce,onClick:It},"\u8C03\u8BD5\u4EE3\u7801"),c.createElement(ce.ZP,{type:"primary",className:"custom-ant-disabled",loading:le,disabled:le,onClick:()=>{Q({type:0,payload:!1}),ke()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},71790:function(ut,he,m){m.r(he),m.d(he,{default:function(){return Ga}});var e=m(59301),$=m(39146),ce=m(84078),z=m(63144),ue=m(31797),T=m(43418),ee=m(71418),X=m(8591),de=m(57809),M=m(68155),U=m(92955),c=m(46961),ve=m(88289),ze=m(34353),H=m(24334),me=m(31667),Ae=m(44475),Se=m(98135),pe=m(78241),te=m(3113);const{TextArea:Ke}=Se.default,qe=5e3;var rt=({callback:t,onCancel:l,notes:n})=>{function E(o){t(o)}return e.createElement(pe.default,{className:"note-form-panel",onFinish:E,initialValues:{notes:n}},e.createElement(pe.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:qe,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${qe}`}]},e.createElement(Ke,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),e.createElement(pe.default.Item,{style:{textAlign:"right"}},e.createElement(te.ZP,{type:"ghost",onClick:l,style:{marginRight:10}}," \u53D6\u6D88 "),e.createElement(te.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},se={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},N={pagination:"pagination___npPu7",info:"info___aRH6C"},p=m(14491),Qe=m(53864),yt=m(5095),Dt=m(7054),G=m(26132),W=m(15826),ie=m(99232),Ce=m.n(ie);const{Column:le}=p.default;var Fe=({submitResult:t,submitting:l,submitRecords:n,page:E,onPageChange:o,topicId:a})=>{const{status:r,id:i,input:u,output:s,expected_output:x,is_file:v,input_file_url:f,output_file_url:L,expected_output_file_url:I,error_msg:_}=t||{},{records:Z,records_count:A}=n||{},V=(0,z.useParams)();function R(){v?navigator.clipboard.writeText(H.Base64.decode(_)).then(()=>{X.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(H.Base64.decode(s)).then(()=>{X.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return e.createElement(ee.Z,{spinning:l,tip:"\u8BC4\u6D4B\u4E2D...",indicator:e.createElement(yt.Z,{style:{fontSize:24},spin:!0})},i?e.createElement(e.Fragment,null,e.createElement("ul",{className:N.info},e.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",e.createElement("span",{className:r===G.h.OK?"c-green":"c-red"},Ae.Im[r])),e.createElement("li",{className:N.error},e.createElement("a",{onClick:R},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",e.createElement(Dt.Z,null)," ")),e.createElement("li",null,e.createElement(z.Link,{to:`/problems/${a}/record-detail/${i}?backId=${V==null?void 0:V.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),r!==G.h.OK?e.createElement(e.Fragment,null,e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),e.createElement("pre",null,!v&&u,v&&e.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,W.LR)(f,u)},u)),e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),e.createElement("pre",null,(r===4||r===5)&&H.Base64.decode(_),r!=4&&r!=5&&(v?e.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,W.LR)(L,s)},s):H.Base64.decode(s))),e.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),e.createElement("pre",null,!v&&H.Base64.decode(x),v&&e.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,W.LR)(I,x)},x))):null):null,(Z==null?void 0:Z.length)>0?e.createElement(p.default,{dataSource:Z,rowKey:"id",pagination:!1},e.createElement(le,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(h,O)=>e.createElement("span",null," ",Ce()(h).format("YYYY-MM-DD HH:mm:ss"))}),e.createElement(le,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(h,O)=>{var d;return e.createElement(z.Link,{className:h===0?"c-green":"c-red",to:`/problems/${a}/record-detail/${O.id}?backId=${V==null?void 0:V.save_identifier}`},(d=Ae.Im[h])==null?void 0:d.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),e.createElement(le,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),e.createElement(le,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),e.createElement(le,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,A>15?e.createElement(Qe.Z,{className:N.pagination,current:E,pageSize:15,total:A,onChange:o}):null)},K=m(6629),Re=m(12563),Ue=m(81327),ke={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ee=m(31272);const Q={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var et=({hack:t,onTriggerPraise:l,toDiscuss:n})=>{const{language:E,difficulty:o,time_limit:a,username:r,user_path:i,user_praise:u,comments_count:s,praises_count:x,description:v,pass_count:f,submit_count:L}=t,I=(0,z.useLocation)();console.log(t.language,"language");const _=Q[o];return e.createElement(e.Fragment,null,e.createElement("ul",{className:ke.info},e.createElement("li",null,"\u96BE\u5EA6\uFF1A",e.createElement(Re.default,{color:_.color},_.name)),e.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",e.createElement("b",null,a,"\u79D2"))),e.createElement(Ee.Z,{value:v,className:ke.desc}),e.createElement("ul",{className:ke["commit-info"]},e.createElement("li",null,e.createElement(Ue.Z,{size:4},e.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",e.createElement("b",null,f))),e.createElement("li",null,e.createElement(Ue.Z,{size:4},e.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",e.createElement("b",null,L))," "),e.createElement("li",{style:{flex:"1 0 0"}}),e.createElement("li",null,e.createElement(Ue.Z,{size:4},e.createElement("i",{className:"iconfont icon-huifu1",onClick:n})," ",e.createElement("b",null,s))," ")))},Nt=m(44259),Ct=Object.defineProperty,dt=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,it=(t,l,n)=>l in t?Ct(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,jt=(t,l)=>{for(var n in l||(l={}))_t.call(l,n)&&it(t,n,l[n]);if(dt)for(var n of dt(l))It.call(l,n)&&it(t,n,l[n]);return t};const Xa=t=>React.createElement("svg",jt({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var Sl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Cl=m(38134),Ye=m(76265);function xt(t){return(0,Ye.U2)("comments.json",t)}function At(t){return(0,Ye.v_)(`/discusses/${t}/plus.json`,{container_type:"Discuss",type:1})}function Ft(t){return(0,Ye.v_)("comments/reply.json",t)}function wt(t){return(0,Ye.v_)("comments.json",t)}function xl(t){return(0,Ye.v_)(`comments/${t==null?void 0:t.id}/hidden.json`,t)}function Al(t){return(0,Ye.IV)(`comments/${t==null?void 0:t.id}.json`)}var Fl=m(28971),Ve=m(35099);function Ot({author:t}){return e.createElement("a",{href:`/users/${t.login}`,target:"_blank"},e.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${c.Z.IMG_SERVER}/images/${t.image_url}`,width:"50"}))}function wl({data:t,index:l,parentDiscussIndex:n,user:E,onSetActionType:o}){const{author:a,can_delete:r,content:i,id:u,time:s}=t;function x(){o({id:u,index:l,type:"delete-discuss",parentDiscussIndex:n,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const v=E.admin||r||a.user_id===E.user_id;return e.createElement("div",{className:"discuss-item-container second-discuss "},e.createElement(Ot,{author:a}),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${a.login}`,target:"_blank"},a.name),e.createElement("span",{className:"grey"},s),e.createElement("div",{className:"btn-group",style:{marginBottom:0}},v?e.createElement("a",{onClick:x,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null)),e.createElement(Ee.Z,{className:"discuss-content",value:i})))}var Ol=({user:t,data:l,index:n,onPlusDiscuss:E,onSetActionType:o,activeDiscussIndex:a,onReplyDiscuss:r,onSetActiveDiscussIndex:i})=>{const{content:u,children:s,hidden:x,id:v,praise_count:f,time:L,user_praise:I,can_delete:_,author:Z}=l;console.log(_&&(!s||s.length==0),"children22");function A(){i(v)}function V(){E(v,!I,n)}function R(){o({id:v,index:n,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function h(){o({id:v,index:n,params:{hidden:x?"0":"1"},type:"hidden-discuss",message:x?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const O=t.admin||t.user_id===Z.user_id;return e.createElement("div",{className:"discuss-item-container",key:v},e.createElement(Ot,{author:Z}),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${Z.login}`,target:"_blank"}," ",Z.name," "),e.createElement("span",{className:"grey"},L)),e.createElement(Ee.Z,{className:"discuss-content",value:u}),s&&s.length>0?e.createElement("div",{className:"reply-discuss-container"},s.map((d,B)=>e.createElement(wl,{key:d.id,data:d,index:B,user:t,onSetActionType:o,parentDiscussIndex:n}))):null,e.createElement("div",{className:"btn-group"},(0,Ve.Ny)()?e.createElement("a",{onClick:h,title:x?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},e.createElement("i",{className:x?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,_&&(!s||s.length==0)?e.createElement("a",{onClick:R,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null,e.createElement("a",{onClick:A,title:"\u56DE\u590D"}," ",e.createElement("i",{className:"iconfont icon-huifu1"})," "),e.createElement("a",{onClick:V,className:I?"c-orange":""},e.createElement("i",{className:I?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),e.createElement("span",null,f||""))),e.createElement(Fl.Z,{id:v,activeDiscussIndex:a,onReplyDiscuss:r})))},Tl=m(51355),mt=m(94646),Pl=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())}),bl=({user_praise:t,praise_count:l,praisePlus:n,onCreateDiscuss:E,discuss_count:o})=>{const[a,r]=(0,e.useState)(!1),[i,u]=(0,e.useState)("");function s(L){u(L)}function x(){r(!0)}function v(){r(!1)}function f(){return Pl(this,null,function*(){E(i),u(""),r(!1)})}return e.createElement("div",{className:`dis-input-editor-container ${a?"active":""} `},e.createElement("div",{className:a?"text-area hide":"text-area"},e.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:x}),e.createElement("a",{style:{alignItems:"center"}}," ",e.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",o," "),e.createElement("a",{className:"c-light-black",onClick:n,style:{alignItems:"center"},title:t?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},e.createElement("i",{className:`mr3 ${t?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),l?e.createElement("span",null,l):"")),a?e.createElement("div",{className:"input-mask",onClick:v}):null,e.createElement("div",{className:a?"md-container":"md-container hide"},e.createElement(mt.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:i,height:240,onChange:s}),e.createElement("div",{className:"tip-container",onClick:v},e.createElement("a",{className:"btn-send",onClick:f}," \u53D1\u9001 "))))},zl=Object.defineProperty,Bl=Object.defineProperties,Zl=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,Rl=Object.prototype.hasOwnProperty,Ul=Object.prototype.propertyIsEnumerable,Pt=(t,l,n)=>l in t?zl(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,ye=(t,l)=>{for(var n in l||(l={}))Rl.call(l,n)&&Pt(t,n,l[n]);if(Tt)for(var n of Tt(l))Ul.call(l,n)&&Pt(t,n,l[n]);return t},kl=(t,l)=>Bl(t,Zl(l)),ot=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())});const Yl={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var Gl=(t=>(t[t.GET_DISCUSSES=0]="GET_DISCUSSES",t[t.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",t[t.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",t[t.PLUS_DISCUSS=3]="PLUS_DISCUSS",t[t.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",t[t.SET_PAGE=5]="SET_PAGE",t[t.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",t))(Gl||{});function Wl(t,l){switch(l.type){case 6:return kl(ye({},t),{loading:!0});case 0:return ye(ye({},t),l.payload);case 1:return ye(ye({},t),l.payload);case 4:return ye(ye({},t),l.payload);case 3:return ye(ye({},t),l.payload);case 5:return ye(ye({},t),l.payload);case 2:return ye(ye({},t),l.payload);default:throw new Error}}var Ql=({user:t,identifier:l,hack:n,onTriggerPraise:E,setDiscussTotal:o})=>{const[a,r]=(0,e.useReducer)(Wl,Yl),{loading:i,page:u,data:s,count:x,actionType:v,activeDiscussIndex:f}=a;console.log("---",a);const L=(0,e.useCallback)(()=>ot(void 0,null,function*(){r({type:6});const d=yield xt({container_type:"Practice",container_identifier:l,limit:10,page:u}),{comments:B,disscuss_count:F}=d;r({type:0,payload:{data:B,count:F,loading:!1}}),o(F)}),[u,l]);(0,e.useEffect)(()=>{L()},[l,u]);function I(d){r({type:5,payload:{page:d}})}function _(d){r({type:4,payload:{actionType:d}})}function Z(d){r(f===d?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:d}})}function A(d,B,F){return ot(this,null,function*(){try{const J=yield At(d);s[F].user_praise=B,s[F].praise_count=J.praise_count,r({type:3,payload:{data:[...s]}})}catch(J){console.log(J)}})}function V(){return ot(this,null,function*(){const{id:d,params:B,type:F,index:J,parentDiscussIndex:Me}=v;F==="hidden-discuss"&&(console.log(B,"params"),yield xl(ye({id:d,container_type:"Practice",container_identifier:l},B)),Me?s[Me].children[J].hidden=B.hidden==1:s[J].hidden=B.hidden==1,r({type:4,payload:{actionType:null,data:[...s]}})),F==="delete-discuss"&&(yield Al({id:d,container_type:"Practice",container_identifier:l}),r({type:4,payload:{actionType:null}}),yield L())})}function R(){r({type:4,payload:{actionType:null}})}function h(d,B){return ot(this,null,function*(){try{yield Ft({container_type:"Practice",container_identifier:l,comments:{content:B,parent_id:d}}),L()}catch(F){console.log(F)}})}function O(d){return ot(this,null,function*(){r({type:6}),yield wt({comments:{content:d},container_type:"Practice",container_identifier:l}),L()})}return e.createElement(e.Fragment,null,e.createElement("div",{className:"discuss-panel"},s.length===0?e.createElement(K.Z,null):e.createElement(ee.Z,{spinning:i},s.map((d,B)=>e.createElement(Ol,{onReplyDiscuss:h,onPlusDiscuss:A,onSetActiveDiscussIndex:Z,onSetActionType:_,data:d,index:B,user:t,activeDiscussIndex:f}))),x>10?e.createElement("div",{className:"pagination-container mt10 mb10"},e.createElement(Qe.Z,{showQuickJumper:!0,onChange:I,current:u,total:x,showTotal:d=>e.createElement("span",{style:{color:"#656F87"}},"\u5171",e.createElement("span",{className:"c-light-primary"},d),"\u6761\u6570\u636E")})):null),e.createElement(bl,{user_praise:n.user_praise,praise_count:n.praises_count,praisePlus:E,discuss_count:n.comments_count,onCreateDiscuss:O}),e.createElement(Cl.Z,null,e.createElement(T.default,{centered:!0,title:"\u63D0\u793A",open:!!v,onOk:V,onCancel:R},e.createElement("p",null,v?v.message:"")),e.createElement(Tl.Z,null)))},Ge={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},Ne={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},Vl=Object.defineProperty,bt=Object.getOwnPropertySymbols,Hl=Object.prototype.hasOwnProperty,Jl=Object.prototype.propertyIsEnumerable,zt=(t,l,n)=>l in t?Vl(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,$l=(t,l)=>{for(var n in l||(l={}))Hl.call(l,n)&&zt(t,n,l[n]);if(bt)for(var n of bt(l))Jl.call(l,n)&&zt(t,n,l[n]);return t};const Ka=t=>React.createElement("svg",$l({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var Xl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",Kl=Object.defineProperty,Bt=Object.getOwnPropertySymbols,ql=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,Zt=(t,l,n)=>l in t?Kl(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,tn=(t,l)=>{for(var n in l||(l={}))ql.call(l,n)&&Zt(t,n,l[n]);if(Bt)for(var n of Bt(l))en.call(l,n)&&Zt(t,n,l[n]);return t};const qa=t=>React.createElement("svg",tn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var Rt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",ln=Object.defineProperty,Ut=Object.getOwnPropertySymbols,nn=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,kt=(t,l,n)=>l in t?ln(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,un=(t,l)=>{for(var n in l||(l={}))nn.call(l,n)&&kt(t,n,l[n]);if(Ut)for(var n of Ut(l))an.call(l,n)&&kt(t,n,l[n]);return t};const eu=t=>React.createElement("svg",un({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var rn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",on=Object.defineProperty,Yt=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,Gt=(t,l,n)=>l in t?on(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,dn=(t,l)=>{for(var n in l||(l={}))cn.call(l,n)&&Gt(t,n,l[n]);if(Yt)for(var n of Yt(l))sn.call(l,n)&&Gt(t,n,l[n]);return t};const tu=t=>React.createElement("svg",dn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var Wt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",mn=Object.defineProperty,Qt=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,Vt=(t,l,n)=>l in t?mn(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,vn=(t,l)=>{for(var n in l||(l={}))En.call(l,n)&&Vt(t,n,l[n]);if(Qt)for(var n of Qt(l))gn.call(l,n)&&Vt(t,n,l[n]);return t};const lu=t=>React.createElement("svg",vn({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var Ht="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",pn=({style:t={},onClick:l,onAssist:n,onHide:E,data:o,active:a,showLine:r})=>e.createElement(e.Fragment,null,e.createElement("div",{className:a===(o==null?void 0:o.id)?`${Ne.list} ${Ne.active}`:Ne.list,style:t,onClick:()=>l(o)},(o==null?void 0:o.video)&&e.createElement("div",{className:Ne.left},e.createElement("img",{src:o==null?void 0:o.video_cover}),e.createElement("div",null,e.createElement("img",{src:Xl}),e.createElement("span",null,o==null?void 0:o.video_duration)),e.createElement("div",{className:Ne.mask})),e.createElement("div",{className:Ne.right},e.createElement("div",{className:Ne.name},e.createElement("img",{src:c.Z.IMG_SERVER+"/images/"+(o==null?void 0:o.image_url),width:30,height:30}),e.createElement("div",{title:o==null?void 0:o.name,className:Ne.title},o==null?void 0:o.name),(o==null?void 0:o.is_authority)&&e.createElement("div",{className:Ne.b},"\u5B98\u65B9"),(o==null?void 0:o.is_excellent)&&e.createElement("div",{className:Ne.a},"\u7CBE\u9009")),e.createElement("div",{className:Ne.des},e.createElement(Ee.Z,{showLines:2,showTextOnly:!0,value:(o==null?void 0:o.content)||"\u6682\u65E0\u5185\u5BB9"})),e.createElement("div",{className:Ne.tag},e.createElement("span",{className:"current",onClick:i=>{i.stopPropagation(),n(o)}},e.createElement("img",{src:o!=null&&o.user_liker?rn:Rt}),e.createElement("span",{style:{color:o!=null&&o.user_liker?"#0152d9":"#656f87"}},o==null?void 0:o.praises_count)),e.createElement("span",null,e.createElement("img",{src:Wt}),e.createElement("span",null,o==null?void 0:o.discusses_count)),e.createElement("span",null,e.createElement("img",{src:Ht}),e.createElement("span",null,o==null?void 0:o.viewed_count)),(0,Ve.Ny)()&&e.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:i=>{i.stopPropagation(),E(o)}},o!=null&&o.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),r&&e.createElement("div",{className:Ne.line})),_e={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},Jt=m(6848),Mn=m(88511),fn=Object.defineProperty,$t=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable,Xt=(t,l,n)=>l in t?fn(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,Nn=(t,l)=>{for(var n in l||(l={}))yn.call(l,n)&&Xt(t,n,l[n]);if($t)for(var n of $t(l))Dn.call(l,n)&&Xt(t,n,l[n]);return t};const au=t=>React.createElement("svg",Nn({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var _n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",In=Object.defineProperty,Kt=Object.getOwnPropertySymbols,jn=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable,qt=(t,l,n)=>l in t?In(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,hn=(t,l)=>{for(var n in l||(l={}))jn.call(l,n)&&qt(t,n,l[n]);if(Kt)for(var n of Kt(l))Ln.call(l,n)&&qt(t,n,l[n]);return t};const uu=t=>React.createElement("svg",hn({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var Sn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Cn=Object.defineProperty,el=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,tl=(t,l,n)=>l in t?Cn(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,Fn=(t,l)=>{for(var n in l||(l={}))xn.call(l,n)&&tl(t,n,l[n]);if(el)for(var n of el(l))An.call(l,n)&&tl(t,n,l[n]);return t};const ru=t=>React.createElement("svg",Fn({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},t),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var ll="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",wn=Object.defineProperty,nl=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable,al=(t,l,n)=>l in t?wn(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,Be=(t,l)=>{for(var n in l||(l={}))On.call(l,n)&&al(t,n,l[n]);if(nl)for(var n of nl(l))Tn.call(l,n)&&al(t,n,l[n]);return t},ul=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())});const Pn=(t,l)=>{var n,E,o;const{uploadInfo:a={}}=l.payload;switch(l.type){case"addVideo":return{videoList:[...t.videoList,{name:a.file.name,size:a.file.size,type:a.file.type,fileHash:a.fileHash,state:a.state,video_id:a.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:t.videoList.filter(r=>r.name!==l.payload.name)};case"replaceVideo":return{videoList:l.payload};case"removeAll":return[];case"updateProgress":return{videoList:t.videoList.map(r=>r.name===l.payload.uploadInfo.file.name?Be(Be({},r),{loaded:l.payload.progressPercent,video_id:a.videoId,fileHash:a.fileHash}):r)};case"updateTitle":return{videoList:(n=t.videoList)==null?void 0:n.map(r=>r.name===l.payload.item.name?Be(Be({},r),{title:l.payload.title}):r)};case"updateImg":return{videoList:(E=t.videoList)==null?void 0:E.map(r=>r.name===l.payload.item.name?Be(Be({},r),{attachment_id:l.payload.attachment_id}):r)};case"updateImg":return{videoList:(o=t.videoList)==null?void 0:o.map(r=>r.name===l.payload.item.name?Be(Be({},r),{attachment_id:l.payload.attachment_id}):r)};default:return[]}};var rl=({onClose:t,onOk:l,identifier:n,active:E})=>{var o,a;const[r]=pe.default.useForm(),[i,u]=(0,e.useState)({}),[s,x]=(0,e.useState)(!1),[v,f]=(0,e.useState)(!1),[L,I]=(0,e.useReducer)(Pn,{videoList:[]}),_=(0,Ve.eY)(),Z=(0,z.useParams)(),A=(0,e.useRef)();(0,e.useEffect)(()=>{E&&V()},[E]);const V=()=>ul(void 0,null,function*(){var C,y,b,Le,ne,we,Oe,nt,at,D;const P=yield(0,M.M3)(n,{active:E});if((P==null?void 0:P.status)===0){const ge={name:(C=P==null?void 0:P.data)==null?void 0:C.name,content:(y=P==null?void 0:P.data)==null?void 0:y.content};r.setFieldsValue(ge),u(ge),(Le=(b=P==null?void 0:P.data)==null?void 0:b.videos)!=null&&Le[0]&&I({type:"replaceVideo",payload:[{video_id:(Oe=(we=(ne=P==null?void 0:P.data)==null?void 0:ne.videos)==null?void 0:we[0])==null?void 0:Oe.video_id,name:(D=(at=(nt=P==null?void 0:P.data)==null?void 0:nt.videos)==null?void 0:at[0])==null?void 0:D.title,loaded:100}]})}}),R=(C,y)=>{u(Be({},y))},h=C=>ul(void 0,null,function*(){const y={videos:L.videoList,articles:C};f(!0);let b;E?(y.active=E,b=yield(0,M.gu)(n,y)):b=yield(0,M.bx)(n,y),(b==null?void 0:b.status)===0&&(console.log(E||(b==null?void 0:b.id),44),l(E||(b==null?void 0:b.id))),f(!1)}),O=()=>{const C=document.getElementById("fileUpload");C.value=""},d=C=>{var y='{"Vod":{}}';if(x(!0),A.current){A.current.addFile(C,null,null,null,y);return}(0,Mn.o)(_==null?void 0:_.login,"",{create:!A,addFileSuccess:b=>{I({type:"addVideo",payload:{uploadInfo:b}})},onUploadProgress:(b,Le,ne)=>{const we=Math.ceil(ne*100);I({type:"updateProgress",payload:{uploadInfo:b,progressPercent:we}}),O()},onUploadFailed:b=>{X.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:b=>{x(!1)},onUploadSucceed:b=>{x(!1)},onUploadError:b=>{x(!1)},gotUploader:b=>{b.addFile(C,null,null,null,y),A.current=b}})},B=C=>{var y;const Le=C.target.files[0];if(!Le){O();return}let ne=Le.name.toLowerCase();if(ne&&ne.indexOf(".avi")==-1&&ne.indexOf(".flv")==-1&&ne.indexOf(".f4v")==-1&&ne.indexOf(".m4v")==-1&&ne.indexOf(".mov")==-1&&ne.indexOf(".mp4")==-1&&ne.indexOf(".rmvb")==-1&&ne.indexOf(".swf")==-1&&ne.indexOf(".webm")==-1&&ne.indexOf(".wmv")==-1){X.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),O();return}if(Le.size>1024*1024*1024){X.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),O();return}if((y=L.videoList)!=null&&y.find(we=>we.name===Le.name)){X.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),O();return}d(Le)},F=(C,y)=>{T.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:e.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",y?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{O(),I({type:"removeVideo",payload:{name:C}})}})},J=()=>e.createElement("label",{htmlFor:"fileUpload",className:_e.main},e.createElement("img",{src:_n,alt:""}),e.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Me=C=>e.createElement("div",{className:_e.mainLoading},e.createElement("div",{className:_e.proWarp},e.createElement("div",{className:_e.pro},e.createElement("div",{style:{width:C}})),e.createElement("span",null,C||0,"%")),e.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),e.createElement("div",{className:_e.tip},e.createElement(Jt.Z,{getPopupContainer:y=>y.parentNode,title:e.createElement("div",null,e.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",e.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),e.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),e.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},e.createElement("img",{src:ll,alt:""})))),g=C=>e.createElement("div",{className:_e.mainSucceed},e.createElement("img",{src:Sn,alt:""}),e.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),e.createElement("div",{className:_e.tip},e.createElement(Jt.Z,{getPopupContainer:y=>y.parentNode,title:e.createElement("div",null,e.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",e.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),e.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),e.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},e.createElement("img",{src:ll,alt:""}))),e.createElement("div",{className:_e.del,onClick:()=>F(C.name,C.loaded==100)},e.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),Y=()=>{var C;return e.createElement(e.Fragment,null,(C=L.videoList)==null?void 0:C.map((y,b)=>e.createElement(e.Fragment,{key:b},y.loaded==100?g(y):Me(y.loaded))))},w=()=>{T.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:t})},j=(o=L.videoList)==null?void 0:o.length;return e.createElement("div",{className:_e.listForm},e.createElement("header",null,E?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),e.createElement("section",{className:_e.scroll,id:"sss"},e.createElement("div",{className:_e.formWrap}," ",e.createElement(pe.default,{form:r,scrollToFirstError:!0,layout:"vertical",onValuesChange:R,onFinish:h},e.createElement(pe.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},e.createElement(Se.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((a=i.name)==null?void 0:a.length)||0}/60`})),e.createElement(pe.default.Item,{name:"content",label:"\u5185\u5BB9:"},e.createElement(mt.Z,{defaultValue:i.content||"",watch:!0})))),e.createElement("div",{className:_e.upload},j?Y():J(),e.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:B,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),e.createElement("div",{className:_e.btns},e.createElement(te.ZP,{onClick:w,type:"primary",ghost:!0},"\u5173\u95ED"),e.createElement(te.ZP,{loading:v,disabled:s,onClick:()=>r.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Ie={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},bn=m(56511),zn=Object.defineProperty,il=Object.getOwnPropertySymbols,Bn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable,ol=(t,l,n)=>l in t?zn(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,Rn=(t,l)=>{for(var n in l||(l={}))Bn.call(l,n)&&ol(t,n,l[n]);if(il)for(var n of il(l))Zn.call(l,n)&&ol(t,n,l[n]);return t};const ou=t=>React.createElement("svg",Rn({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},t),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var Un="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",kn=Object.defineProperty,cl=Object.getOwnPropertySymbols,Yn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,sl=(t,l,n)=>l in t?kn(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,Wn=(t,l)=>{for(var n in l||(l={}))Yn.call(l,n)&&sl(t,n,l[n]);if(cl)for(var n of cl(l))Gn.call(l,n)&&sl(t,n,l[n]);return t};const cu=t=>React.createElement("svg",Wn({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},t),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var Qn="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",Vn=Object.defineProperty,dl=Object.getOwnPropertySymbols,Hn=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable,ml=(t,l,n)=>l in t?Vn(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,$n=(t,l)=>{for(var n in l||(l={}))Hn.call(l,n)&&ml(t,n,l[n]);if(dl)for(var n of dl(l))Jn.call(l,n)&&ml(t,n,l[n]);return t};const su=t=>React.createElement("svg",$n({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var El="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Lt={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},gl=m(95237),Et=m(43604),Ze={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},Xn=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())});const vl=({id:t,cb:l})=>{const[n,E]=(0,e.useState)("");return e.createElement("aside",{className:"mt10"},e.createElement(mt.Z,{defaultValue:n,id:"writeForumsReviewId",onChange:o=>{E(o)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),e.createElement(gl.Z,null,e.createElement(Et.Z,{flex:"1"}),e.createElement(Et.Z,null,e.createElement(te.ZP,{type:"primary",size:"middle",onClick:()=>Xn(void 0,null,function*(){n===""?X.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):l(t,n)})},"\u53D1\u9001"))))},Kn=({data:t})=>{var l;return e.createElement("div",{className:Ze.thirdlyLevelDiscuss},e.createElement("span",{className:"c-grey-333"},e.createElement("span",{className:"font 14 c-light-primary"},(l=t==null?void 0:t.author)==null?void 0:l.name),"@",e.createElement("span",{className:"font 14 c-light-primary"},t==null?void 0:t.parent_name),":"),e.createElement(Ee.Z,{value:t==null?void 0:t.content}))},qn=({data:t,onReplyDiscuss:l,thirdlyReply:n,setThirdlyReply:E})=>{var o,a,r,i;const u=(0,Ve.eY)();return console.log(u,"user"),e.createElement("div",{className:Ze.list},e.createElement("img",{src:c.Z.IMG_SERVER+"/images/"+((o=t==null?void 0:t.author)==null?void 0:o.image_url)}),e.createElement("div",{className:Ze.wrap},e.createElement("div",{className:"font14",style:{marginBottom:6}},e.createElement("span",{className:"c-grey-333"},(a=t==null?void 0:t.author)==null?void 0:a.name),(u==null?void 0:u.login)!==((r=t==null?void 0:t.author)==null?void 0:r.login)&&e.createElement("span",{onClick:()=>E(t==null?void 0:t.id),className:"c-grey-999 current",style:{float:"right"}},e.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),e.createElement("span",null,"\u56DE\u590D"))),e.createElement(Ee.Z,{value:t==null?void 0:t.content}),(i=t==null?void 0:t.children)==null?void 0:i.map(s=>e.createElement(Kn,{key:s.id,data:s})),n===(t==null?void 0:t.id)&&e.createElement("div",null,e.createElement(vl,{id:t==null?void 0:t.id,cb:l}),e.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>E(null),className:"c-light-primary current"},e.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),e.createElement("div",{className:Ze.line})))};var ea=({data:t,onReplyDiscuss:l,secondReply:n,setSecondReply:E,thirdlyReply:o,setThirdlyReply:a,onPlusDiscuss:r})=>{var i,u,s,x;const[v,f]=(0,e.useState)(!1);return console.log(t,"data"),e.createElement("div",{className:Ze.discussItem},e.createElement("div",{className:Ze.list},e.createElement("img",{src:c.Z.IMG_SERVER+"/images/"+((i=t==null?void 0:t.author)==null?void 0:i.image_url)}),e.createElement("div",{className:Ze.wrap},e.createElement("div",{className:"font14",style:{marginBottom:6}},e.createElement("span",{className:"c-grey-333 mr30"},(u=t==null?void 0:t.author)==null?void 0:u.name),e.createElement("span",{className:"c-grey-999"},t==null?void 0:t.time)),e.createElement(Ee.Z,{value:t==null?void 0:t.content}),e.createElement("div",{className:Ze.btns},e.createElement("div",{onClick:()=>r(t==null?void 0:t.id),className:t!=null&&t.user_praise?"c-light-primary":"c-grey-999"},e.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),e.createElement("span",null,t==null?void 0:t.praise_count)),e.createElement("div",{onClick:()=>{var L;((L=t==null?void 0:t.children)==null?void 0:L.length)!==0&&(E(null),f(!v))},style:{color:v?"#0152d9":"#999999"}},e.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),e.createElement("span",null,v?"\u6536\u8D77\u8BC4\u8BBA":(s=t==null?void 0:t.children)==null?void 0:s.length)),e.createElement("div",{onClick:()=>{f(!1),E(n===(t==null?void 0:t.id)?null:t==null?void 0:t.id)},style:{color:n===(t==null?void 0:t.id)?"#0152d9":"#999999"}},e.createElement("i",{className:"iconfont icon-huifu3 mr3"}),e.createElement("span",null,n===(t==null?void 0:t.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),n===(t==null?void 0:t.id)&&e.createElement(vl,{id:t==null?void 0:t.id,cb:(L,I)=>{l(L,I),f(!0)}}),v&&e.createElement("div",{className:Ze.secondLevelDiscuss},(x=t==null?void 0:t.children)==null?void 0:x.map(L=>e.createElement(qn,{thirdlyReply:o,setThirdlyReply:a,key:L.id,data:L,onReplyDiscuss:l}))))))},gt=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())}),ta=({identifier:t,active:l,onOk:n})=>{const[E,o]=(0,e.useState)(""),[a,r]=(0,e.useState)(1),[i,u]=(0,e.useState)([]),[s,x]=(0,e.useState)(0),[v,f]=(0,e.useState)(null),[L,I]=(0,e.useState)(null);(0,e.useEffect)(()=>{_(1),r(1)},[l]);const _=h=>gt(void 0,null,function*(){const O=yield xt({container_type:"QuestionSolutionArticle",container_identifier:l,limit:5,page:h});O!=null&&O.comments&&(u((O==null?void 0:O.comments)||[]),r(h),x(O==null?void 0:O.disscuss_count))}),Z=()=>gt(void 0,null,function*(){if(E===""){X.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const h=yield wt({comments:{content:E},container_type:"QuestionSolutionArticle",container_identifier:l});h!=null&&h.discuss&&(o(""),_(a),n())}),A=(h,O,d)=>gt(void 0,null,function*(){const B=yield Ft({container_type:"QuestionSolutionArticle",container_identifier:l,comments:{content:O,parent_id:h}});f(null),I(null),_(a)}),V=h=>gt(void 0,null,function*(){const O=yield At(h);_(a)}),R=h=>{r(h),_(h)};return e.createElement("div",{className:Lt.discuss},e.createElement("aside",{className:Lt.reply,style:{borderWidth:s?1:0}},e.createElement(mt.Z,{defaultValue:E,id:"writeForumsReviewId",onChange:h=>{o(h)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),e.createElement(gl.Z,null,e.createElement(Et.Z,{flex:"1"}),e.createElement(Et.Z,null,e.createElement(te.ZP,{type:"primary",size:"middle",onClick:()=>Z()},"\u53D1\u9001")))),i==null?void 0:i.map(h=>e.createElement(ea,{secondReply:v,setSecondReply:f,thirdlyReply:L,setThirdlyReply:I,key:h.id,data:h,onReplyDiscuss:A,onPlusDiscuss:V})),e.createElement(Qe.Z,{className:Lt.pagination,showTotal:h=>e.createElement("span",{style:{color:"#656F87"}},"\u5171",e.createElement("span",{className:"c-light-primary"},h),"\u6761\u6570\u636E"),current:a,onChange:R,total:s,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},la=m(45401),na=Object.defineProperty,pl=Object.getOwnPropertySymbols,aa=Object.prototype.hasOwnProperty,ua=Object.prototype.propertyIsEnumerable,Ml=(t,l,n)=>l in t?na(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,ra=(t,l)=>{for(var n in l||(l={}))aa.call(l,n)&&Ml(t,n,l[n]);if(pl)for(var n of pl(l))ua.call(l,n)&&Ml(t,n,l[n]);return t},ht=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())}),ia=({active:t,identifier:l,onAssist:n,onEdit:E,onArticlesSkip:o,onClose:a,onOk:r,onDelete:i,detailsIndex:u,btnShowStatus:s})=>{var x,v,f,L,I,_,Z,A,V,R;const[h,O]=(0,e.useState)(!0),[d,B]=(0,e.useState)({});(0,e.useEffect)(()=>{t&&F()},[t,u]);const F=(w=!0)=>ht(void 0,null,function*(){w&&O(!0);const j=yield(0,M.wO)(l,{active:t});(j==null?void 0:j.status)===0&&B((j==null?void 0:j.data)||{}),O(!1)}),J=w=>ht(void 0,null,function*(){const j=yield(0,M.qe)(l,ra({active:t},w));(j==null?void 0:j.status)===0&&(F(!1),r())}),Me=w=>ht(void 0,null,function*(){(yield(0,M.Rg)(l,{active:w==null?void 0:w.id})).status===0&&(F(!1),r())}),g=w=>{T.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>i(w)})},Y=()=>{F(!1),r()};return e.createElement("div",{className:Ie.listDetails},e.createElement(bn.Z,{className:"pt20 pl20 pr20",loading:h,active:!0,paragraph:{rows:5}},e.createElement("div",{className:Ie.head},e.createElement("div",{className:Ie.name},e.createElement("div",{title:d==null?void 0:d.name,className:Ie.title},d==null?void 0:d.name),(d==null?void 0:d.is_authority)&&e.createElement("div",{className:Ie.b},"\u5B98\u65B9"),(d==null?void 0:d.is_excellent)&&e.createElement("div",{className:Ie.a},"\u7CBE\u9009")),e.createElement("div",{className:Ie.tag},e.createElement("img",{src:c.Z.IMG_SERVER+"/images/"+(d==null?void 0:d.image_url)}),e.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},d==null?void 0:d.username),e.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ce()(d==null?void 0:d.created_at).format("YYYY-MM-DD")),e.createElement("span",null,e.createElement("img",{src:Rt}),e.createElement("span",null,d==null?void 0:d.praises_count)),e.createElement("span",null,e.createElement("img",{src:Wt}),e.createElement("span",null,d==null?void 0:d.discusses_count)),e.createElement("span",null,e.createElement("img",{src:Ht}),e.createElement("span",null,d==null?void 0:d.viewed_count)),e.createElement("div",{className:Ie.btn},((0,Ve.Ny)()||(d==null?void 0:d.is_self))&&e.createElement(e.Fragment,null,e.createElement(te.ZP,{onClick:()=>g(d),type:"primary",ghost:!0},"\u5220\u9664"),e.createElement(te.ZP,{onClick:()=>E(d),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Ve.Ny)()&&e.createElement(te.ZP,{onClick:()=>J({is_authority:!(d!=null&&d.is_authority)}),type:"primary"},e.createElement("img",{src:Qn}),d!=null&&d.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Ve.Ny)()&&e.createElement(te.ZP,{onClick:()=>J({is_excellent:!(d!=null&&d.is_excellent)}),type:"primary"},e.createElement("img",{src:Un}),d!=null&&d.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),e.createElement("div",{className:Ie.scroll},((v=(x=d==null?void 0:d.videos)==null?void 0:x[0])==null?void 0:v.id)&&e.createElement("div",{className:Ie.video},e.createElement(ee.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((L=(f=d==null?void 0:d.videos)==null?void 0:f[0])!=null&&L.transcoded)},e.createElement(la.Z,{poster:(_=(I=d==null?void 0:d.videos)==null?void 0:I[0])==null?void 0:_.cover_url,src:((A=(Z=d==null?void 0:d.videos)==null?void 0:Z[0])==null?void 0:A.play_url)||"",videoId:(R=(V=d==null?void 0:d.videos)==null?void 0:V[0])==null?void 0:R.id,logWatchHistory:()=>{}}))),e.createElement(Ee.Z,{className:Ie.html,value:(d==null?void 0:d.content)||""}),e.createElement("div",{onClick:()=>Me(d),className:Ie.g},e.createElement("img",{className:"mr10",src:(d!=null&&d.user_liker,El)}),e.createElement("span",null,d==null?void 0:d.praises_count)),e.createElement(ta,{onOk:Y,active:t,identifier:l})),e.createElement("div",{className:Ie.btns},e.createElement(te.ZP,{onClick:()=>a(),type:"primary",ghost:!0},"\u5173\u95ED"),s[0]&&e.createElement(te.ZP,{onClick:w=>o(w,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),s[1]&&e.createElement(te.ZP,{onClick:w=>o(w,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},oa=Object.defineProperty,fl=Object.getOwnPropertySymbols,ca=Object.prototype.hasOwnProperty,sa=Object.prototype.propertyIsEnumerable,yl=(t,l,n)=>l in t?oa(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,da=(t,l)=>{for(var n in l||(l={}))ca.call(l,n)&&yl(t,n,l[n]);if(fl)for(var n of fl(l))sa.call(l,n)&&yl(t,n,l[n]);return t};const gu=t=>React.createElement("svg",da({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},t),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var ma="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",Ea=m(79255),ga=m(86984),va=Object.defineProperty,pa=Object.defineProperties,Ma=Object.getOwnPropertyDescriptors,Dl=Object.getOwnPropertySymbols,fa=Object.prototype.hasOwnProperty,ya=Object.prototype.propertyIsEnumerable,Nl=(t,l,n)=>l in t?va(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,xe=(t,l)=>{for(var n in l||(l={}))fa.call(l,n)&&Nl(t,n,l[n]);if(Dl)for(var n of Dl(l))ya.call(l,n)&&Nl(t,n,l[n]);return t},Da=(t,l)=>pa(t,Ma(l)),tt=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())}),Na=({identifier:t,tabStatus:l,setFilterListTotal:n,setListStatus:E})=>{const o={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[a,r]=(0,e.useState)(xe({},o));const[i,u]=(0,e.useState)(!1),[s,x]=(0,e.useState)(0),[v,f]=(0,e.useState)(1),[L,I]=(0,e.useState)(null),[_,Z]=(0,e.useState)([]),[A,V]=(0,e.useState)([!0,!0]),[R,h]=(0,e.useState)(0),O=(0,e.useRef)(null);(0,e.useEffect)(()=>{C()},[l]),(0,e.useEffect)(()=>{d()},[L]),(0,e.useEffect)(()=>{F(xe({},o)),C()},[t]),(0,e.useEffect)(()=>(window.addEventListener("resize",B),E(R),()=>{window.removeEventListener("resize",B)}),[R]);const d=()=>tt(void 0,null,function*(){if(!L){V([!0,!0]);return}const D=[!0,!0],P=_==null?void 0:_.findIndex(ge=>ge.id===L);P===0&&a.page===1&&(D[0]=!1),(a.page-1)*a.limit+(P+1)===a.total&&(D[1]=!1),V(D)}),B=()=>{var D;if(R){const P=window.innerWidth-((D=O.current)==null?void 0:D.clientWidth);x(P)}},F=D=>tt(void 0,null,function*(){var P,ge,He;u(!0);const De=yield(0,M.WH)(t,D);return(De==null?void 0:De.status)===0&&(Z(((P=De==null?void 0:De.data)==null?void 0:P.articles)||[]),r(Da(xe({},D),{total:(ge=De==null?void 0:De.data)==null?void 0:ge.articles_count})),n((He=De==null?void 0:De.data)==null?void 0:He.articles_count)),u(!1),De}),J=()=>{(a==null?void 0:a.sort_direction)===null?a.sort_direction="asc":(a==null?void 0:a.sort_direction)==="asc"?a.sort_direction="desc":(a==null?void 0:a.sort_direction)==="desc"&&(a.sort_direction=null),a.page=1,C(),r(xe({},a)),F(a)},Me=()=>{a.page=1,a.search=a==null?void 0:a.save_search,C(),r(xe({},a)),F(a)},g=()=>{var D;const P=document.getElementsByClassName("btn-resize");P[0].style.visibility="hidden";const ge=window.innerWidth-((D=O.current)==null?void 0:D.clientWidth);x(ge)},Y=()=>{g(),h(1)},w=D=>{g(),I(D==null?void 0:D.id),h(3)},j=D=>{g(),I(D==null?void 0:D.id),h(2)},C=()=>{const D=document.getElementsByClassName("btn-resize");D[0].style.visibility="visible",x(0),h(0),I(null)},y=D=>{h(3),I(D),a.page=1,r(xe({},a)),F(a)},b=D=>{h(3),I(D),r(xe({},a)),F(a)},Le=D=>{r(xe({},a)),F(a)},ne=D=>tt(void 0,null,function*(){(yield(0,M.Rg)(t,{active:D==null?void 0:D.id})).status===0&&(F(a),f(v+1))}),we=D=>tt(void 0,null,function*(){(yield(0,M.rL)(t,{active:D==null?void 0:D.id})).status===0&&(F(a),f(v+1))}),Oe=D=>tt(void 0,null,function*(){(yield(0,M.de)(t,{active:D==null?void 0:D.id})).status===0&&(C(),F(a))}),nt=D=>{a.page=D,r(xe({},a)),F(a)},at=(D,P)=>tt(void 0,null,function*(){var ge,He,De,Mt;const Te=_==null?void 0:_.findIndex(re=>re.id===L);if(console.log(Te,P,22),P==="prev"){if(Te===void 0){X.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Te===0){if(a.page===1){X.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(a.page!==1){a.page=a.page-1,r(xe({},a));const re=yield F(a);if((re==null?void 0:re.status)===0){const Je=(De=re==null?void 0:re.data)==null?void 0:De.articles[((He=(ge=re==null?void 0:re.data)==null?void 0:ge.articles)==null?void 0:He.length)-1];I(Je==null?void 0:Je.id),console.log(D.target,555)}}}else{const re=_[Te-1];I(re==null?void 0:re.id)}}if(P==="next"){if(Te===void 0){X.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((a.page-1)*a.limit+(Te+1)===a.total){X.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Te+1===a.limit){a.page=a.page+1,r(xe({},a));const re=yield F(a);if((re==null?void 0:re.status)===0){const Je=(Mt=re==null?void 0:re.data)==null?void 0:Mt.articles[0];I(Je==null?void 0:Je.id)}}else{const re=_[Te+1];I(re==null?void 0:re.id)}}});return e.createElement("div",{className:Ge.wrap,ref:O},e.createElement("div",{className:Ge.head},e.createElement("div",{className:Ge.sort,onClick:J},e.createElement("span",null,"\u6700\u65B0"),e.createElement("aside",null,e.createElement(Ea.Z,{style:{color:(a==null?void 0:a.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),e.createElement(ga.Z,{style:{color:(a==null?void 0:a.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),e.createElement(Se.default.Search,{value:a.save_search,className:Ge["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:D=>{a.save_search=D.target.value,r(xe({},a))},onSearch:Me}),e.createElement("div",{onClick:Y,className:Ge.btn},e.createElement("img",{src:ma}),"\u5199\u9898\u89E3")),e.createElement("div",{className:Ge.listWarp},e.createElement(ee.Z,{spinning:i,className:"mt20"},_==null?void 0:_.map((D,P)=>{let ge=!0;return P+1===_.length&&P!==0&&(ge=!1),e.createElement(pn,{active:L,key:D.id,data:D,showLine:ge,onClick:w,onAssist:ne,onHide:we})}),(_==null?void 0:_.length)===0&&e.createElement(K.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),e.createElement(Qe.Z,{className:Ge.pagination,showTotal:D=>e.createElement("span",{style:{color:"#656F87"}},"\u5171",e.createElement("span",{className:"c-light-primary"},D),"\u6761\u6570\u636E"),total:a.total,showSizeChanger:!1,current:a==null?void 0:a.page,onChange:nt,hideOnSinglePage:!0,showQuickJumper:!0}),R>0&&e.createElement("div",{className:Ge.fixedRight,style:{width:s}},R===1&&e.createElement(rl,{identifier:t,onClose:C,onOk:y}),R===2&&e.createElement(rl,{active:L,identifier:t,onClose:C,onOk:b}),R===3&&e.createElement(ia,{btnShowStatus:A,onArticlesSkip:at,detailsIndex:v,active:L,identifier:t,onClose:C,onOk:Le,onEdit:j,onAssist:ne,onDelete:Oe})))},lt={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},_a=Object.defineProperty,Ia=Object.defineProperties,ja=Object.getOwnPropertyDescriptors,_l=Object.getOwnPropertySymbols,La=Object.prototype.hasOwnProperty,ha=Object.prototype.propertyIsEnumerable,Il=(t,l,n)=>l in t?_a(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,We=(t,l)=>{for(var n in l||(l={}))La.call(l,n)&&Il(t,n,l[n]);if(_l)for(var n of _l(l))ha.call(l,n)&&Il(t,n,l[n]);return t},St=(t,l)=>Ia(t,ja(l)),ct=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())}),Sa=({visible:t,onVisible:l,value:n,onChange:E,setIndex:o})=>{var a;const r={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[i,u]=(0,e.useState)(r);const[s,x]=(0,e.useState)([]),[v,f]=(0,e.useState)([]),[L,I]=(0,e.useState)(!1),_=(0,e.useRef)([]),Z=(0,e.useRef)(null),A=(0,z.useParams)();(0,e.useEffect)(()=>(A!=null&&A.id&&(Z.current=setInterval(()=>{V(30)},3e4)),()=>{clearInterval(Z.current)}),[]);const V=g=>ct(void 0,null,function*(){const Y=yield(0,M.uc)(A==null?void 0:A.id,{practice_time:g})});(0,e.useEffect)(()=>{F(i),d()},[]),(0,e.useEffect)(()=>(window.addEventListener("click",h),()=>{window.removeEventListener("click",h)}),[A==null?void 0:A.save_identifier,t]),(0,e.useEffect)(()=>{const g=_.current.findIndex(y=>y.identifier===(A==null?void 0:A.save_identifier)),Y=_.current[g-1],w=_.current[g+1],j=document.getElementById("oj-prev"),C=document.getElementById("oj-next");Y?j.style.display="block":j.style.display="none",w?C.style.display="block":C.style.display="none"},[A==null?void 0:A.save_identifier,_.current]);const R=(g,Y)=>{if(g.id===Y)return g;for(let w=0,j=g;j=j.parentNode;w++){if(j.id===Y)return j;if(j==document.documentElement)return!1}},h=g=>ct(void 0,null,function*(){!R(g.target,"oj-drawer")&&t&&l(!1);const Y=_.current.findIndex(C=>C.identifier===(A==null?void 0:A.save_identifier)),w=_.current[Y-1],j=_.current[Y+1];if(g.target.id==="oj-prev"){if(!w||Y===-1){X.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}g.target.style.pointerEvents="none",g.target.style.cursor="not-allowed",yield J(w==null?void 0:w.identifier),o("0"),setTimeout(()=>{g.target.style.pointerEvents="auto",g.target.style.cursor="pointer"},400)}if(g.target.id==="oj-next"||g.target.id==="oj-modal-next"){if(!j||Y===-1){X.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}g.target.style.pointerEvents="none",g.target.style.cursor="not-allowed",yield J(j==null?void 0:j.identifier),o("0"),setTimeout(()=>{g.target.style.pointerEvents="auto",g.target.style.cursor="pointer"},400)}});(0,e.useEffect)(()=>{E(A==null?void 0:A.save_identifier);const g=v.findIndex(Y=>Y.some(w=>w.identifier===(A==null?void 0:A.save_identifier)));u(g===-1?St(We({},i),{page:1}):St(We({},i),{page:g+1}))},[A==null?void 0:A.save_identifier,v]);const O=g=>{i.page=1,i.tag_discipline_id=g,u(We({},i)),F(i)},d=()=>ct(void 0,null,function*(){const g=yield(0,Ye.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});x(g.tag_disciplines||[])}),B=g=>{i.page=1,i.difficulty=typeof g=="number"?g:null,u(We({},i)),F(i)},F=g=>ct(void 0,null,function*(){var Y,w;I(!0);const j=yield(0,M.KC)(g);if(j!=null&&j.practices_list){for(var C=(Y=j==null?void 0:j.practices_list)==null?void 0:Y.length,y=[],b=0;b<C;b+=i==null?void 0:i.per_page)y.push((w=j==null?void 0:j.practices_list)==null?void 0:w.slice(b,b+(i==null?void 0:i.per_page)));u(St(We({},i),{total:j==null?void 0:j.practices_count})),_.current=(j==null?void 0:j.practices_list)||[],f(y)}I(!1)}),J=(g,Y)=>ct(void 0,null,function*(){const w=yield(0,Ye.ZP)(`/api/practices/${g}/start`,{method:"get"});(w==null?void 0:w.status)===0&&z.history.push(`/problems/${w==null?void 0:w.identifier}/oj/${g}`)}),Me=g=>{i.page=g,u(We({},i))};return e.createElement("div",{className:lt.wrap,id:"oj-drawer",style:{left:t?0:-700}},e.createElement("div",{className:lt.head},e.createElement("div",{className:lt.title},"\u9898\u76EE\u5217\u8868"),e.createElement(Se.default.Search,{value:i==null?void 0:i.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:g=>{i.save_search=g.target.value,u(We({},i))},onSearch:()=>{i.page=1,i.search=i.save_search,u(We({},i)),F(i)}}),e.createElement(de.default,{value:i==null?void 0:i.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:g=>g.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:O},s.map(g=>e.createElement(de.default.Option,{key:g.id,value:g.id},g.name))),e.createElement(de.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:g=>g.parentNode,value:i==null?void 0:i.difficulty,onChange:B},e.createElement(de.default.Option,{value:1},"\u7B80\u5355"),e.createElement(de.default.Option,{value:2},"\u9002\u4E2D"),e.createElement(de.default.Option,{value:3},"\u56F0\u96BE"))),e.createElement("div",{className:lt.content},e.createElement(ee.Z,{spinning:L},(a=v==null?void 0:v[i.page-1])==null?void 0:a.map(g=>e.createElement("div",{key:g.identifier,className:lt.list,onClick:Y=>J(g.identifier,Y)},e.createElement("i",{style:{visibility:n===g.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),e.createElement("span",{style:{fontWeight:n===g.identifier?"bold":400,color:n===g.identifier?"#ffffff":"#bac4cd"},title:g==null?void 0:g.name},g.name),(g==null?void 0:g.difficulty)===1&&e.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(g==null?void 0:g.difficulty)===2&&e.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(g==null?void 0:g.difficulty)===3&&e.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),e.createElement("div",{className:lt.footer},e.createElement(Qe.Z,{showTotal:g=>e.createElement("span",{style:{color:"#656F87"}},"\u5171",e.createElement("span",{className:"c-light-primary"},g),"\u6761\u6570\u636E"),total:i.total,pageSize:i==null?void 0:i.per_page,current:i==null?void 0:i.page,showSizeChanger:!1,onChange:Me,showQuickJumper:!0,hideOnSinglePage:!0})))},Ca=({hack:t,onTriggerPraise:l,topicId:n,page:E,onPageChange:o,user:a,submitRecords:r,submitting:i,submitResult:u})=>{const[s]=(0,z.useSearchParams)(),x=(0,z.useLocation)(),[v,f]=(0,e.useState)(s.get("tab")||"0"),[L,I]=(0,e.useState)(0),[_,Z]=(0,e.useState)(0),[A,V]=(0,e.useState)(0),[R,h]=(0,e.useState)(),[O,d]=(0,e.useState)(!1);function B(J){const Me=J.target.id;if(v==="3"&&Me!==v&&(_===1||_===2)){T.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{f(Me)}});return}f(Me)}(0,e.useEffect)(()=>Nt.Z.subscribe("to-commit-info",()=>{f("1")}),[]);function F(){f("2")}return e.createElement("div",{className:se["left-panel"]},e.createElement("ul",{className:`${se["s-navs"]} ${se["bg-white"]} ${se.b1}`},e.createElement("li",{className:"mr40 current"},e.createElement("img",{onClick:()=>d(!0),src:Sl})),e.createElement("li",{className:se["oj-mr"]},e.createElement("a",{className:v==="0"?se.active:"",id:"0",onClick:B},"\u4EFB\u52A1\u63CF\u8FF0")),e.createElement("li",{className:se["oj-mr"]},e.createElement("a",{className:v==="3"?se.active:"",id:"3",onClick:B},"\u9898\u89E3",A?`(${A})`:"")),e.createElement("li",{className:se["oj-mr"]},e.createElement("a",{className:v==="2"?se.active:"",id:"2",onClick:B},"\u8BC4\u8BBA",L?`(${L})`:"")),e.createElement("li",null,e.createElement("a",{className:v==="1"?se.active:"",id:"1",onClick:B},"\u63D0\u4EA4\u8BB0\u5F55"))),e.createElement("div",{className:`${se["tab-panel-body"]} ${v==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},e.createElement(et,{hack:t,onTriggerPraise:l,toDiscuss:F})),e.createElement("div",{className:`${se["tab-panel-body"]} ${v==="1"?"":"hide"}`},r!=null&&r.records_count?e.createElement(Fe,{page:E,onPageChange:o,topicId:n,submitting:i,submitRecords:r,submitResult:u}):e.createElement(K.Z,null)),e.createElement("div",{className:`${se["tab-panel-body"]} ${v==="2"?"":"hide"}`,style:{padding:0}},e.createElement(Ql,{setDiscussTotal:I,user:a,identifier:t.identifier,hack:t,onTriggerPraise:l})),e.createElement("div",{className:`${se["tab-panel-body"]} ${v==="3"?"":"hide"}`,style:{padding:0}},e.createElement(Na,{setListStatus:Z,setFilterListTotal:V,tabStatus:v,identifier:t.identifier})),e.createElement(Sa,{visible:O,setIndex:f,onVisible:J=>d(J),value:R,onChange:J=>h(J)}))},xa=m(62384),Aa=m(62522),Fa=m(51556),wa=m(9326),Oa=m(89392),Ta=m.n(Oa),Pa=m(56102),ba=Object.defineProperty,za=Object.defineProperties,Ba=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,jl=Object.prototype.hasOwnProperty,Ll=Object.prototype.propertyIsEnumerable,hl=(t,l,n)=>l in t?ba(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,k=(t,l)=>{for(var n in l||(l={}))jl.call(l,n)&&hl(t,n,l[n]);if(vt)for(var n of vt(l))Ll.call(l,n)&&hl(t,n,l[n]);return t},oe=(t,l)=>za(t,Ba(l)),Za=(t,l)=>{var n={};for(var E in t)jl.call(t,E)&&l.indexOf(E)<0&&(n[E]=t[E]);if(t!=null&&vt)for(var E of vt(t))l.indexOf(E)<0&&Ll.call(t,E)&&(n[E]=t[E]);return n},je=(t,l,n)=>new Promise((E,o)=>{var a=u=>{try{i(n.next(u))}catch(s){o(s)}},r=u=>{try{i(n.throw(u))}catch(s){o(s)}},i=u=>u.done?E(u.value):Promise.resolve(u.value).then(a,r);i((n=n.apply(t,l)).next())});const{Countdown:Mu}=ue.default,Ra={Java:"java",C:"c",Python:"py","C++":"c"};var Ua=(t=>(t[t.SET_LOADING=0]="SET_LOADING",t[t.GET_DATA=1]="GET_DATA",t[t.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",t[t.SET_DATA=3]="SET_DATA",t[t.SET_DEBUGING=4]="SET_DEBUGING",t[t.SET_SUBMITING=5]="SET_SUBMITING",t[t.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",t[t.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",t[t.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",t[t.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",t[t.SET_PAGE=10]="SET_PAGE",t[t.GET_LANGUAGE=11]="GET_LANGUAGE",t[t.GET_DRAWER=12]="GET_DRAWER",t))(Ua||{});function pt(){return new Date().getTime()}const ka={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function Ya(t,l){switch(l.type){case 1:return k(k({},t),l.payload);case 3:return oe(k({},t),{data:l.payload});case 0:return oe(k({},t),{loading:l.payload});case 11:return oe(k({},t),{languageList:l.payload});case 12:return oe(k({},t),{drawerData:l.payload});case 9:return oe(k({},t),{showNote:l.payload});case 4:return oe(k({},t),{debuging:l.payload});case 5:return oe(k({},t),{submitting:l.payload});case 2:return oe(k({},t),{submitRecords:l.payload});case 10:return oe(k({},t),{submitRecordPage:l.payload});case 6:return oe(k({},t),{executingMessage:l.payload});case 7:return k(k({},t),l.payload);case 8:return k(k({},t),l.payload);default:throw new Error}}var Ga=({children:t})=>{var l,n,E;const[o,a]=(0,e.useReducer)(Ya,ka),{id:r}=(0,z.useParams)(),i=(0,z.useLocation)(),[u]=(0,z.useSearchParams)(),{languageValue:s,languageList:x,loading:v,data:f,debugResult:L,submitResult:I,submitRecords:_,submitRecordPage:Z,showNote:A,debuging:V,submitting:R,executingMessage:h}=o,[O,d]=(0,e.useState)("#FFF"),[B,F]=(0,e.useState)(null),[J,Me]=(0,e.useState)({}),[g,Y]=(0,e.useState)(!1),w=(0,e.useRef)(null),j=(0,e.useRef)(null),C=f==null?void 0:f.user,y=f==null?void 0:f.hack;(0,e.useEffect)(()=>((0,z.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,z.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,z.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,z.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,e.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,e.useEffect)(()=>{var S;if(g){const ae=document.getElementById("oj-next"),fe=document.getElementById("oj-modal-next");((S=ae==null?void 0:ae.style)==null?void 0:S.display)==="none"?fe.style.display="none":fe.style.display="block"}},[g]),(0,e.useEffect)(()=>{function S(){return je(this,null,function*(){var ae,fe,Pe;const q=yield(0,M.fu)(r);if(q.status===401)document.location.href="/user/login";else{q.hack=q.practice,q.hack.code=H.Base64.decode((ae=q==null?void 0:q.hack)==null?void 0:ae.code);const be=`${C==null?void 0:C.login}-language`;localStorage.getItem(be)&&(q.hack.language=localStorage.getItem(be)),j.current=Ta().cloneDeep(q),j.current.language=(fe=q==null?void 0:q.hack)==null?void 0:fe.language,a({type:1,payload:{loading:!1,data:q}}),a({type:8,payload:{languageValue:(Pe=q==null?void 0:q.hack)==null?void 0:Pe.language}})}})}r&&S()},[r]),(0,e.useEffect)(()=>{a({type:8,payload:{debugResult:void 0}}),ne(),Y(!1)},[r]),(0,e.useEffect)(()=>{clearTimeout(w.current)},[r]),(0,e.useEffect)(()=>{Le()},[r,Z]);const b=()=>{window.parent.postMessage("backExercise","*")};function Le(){return je(this,null,function*(){try{const S=yield(0,M.zO)(r,{limit:15,page:Z});a({type:2,payload:S})}catch(S){console.log(S)}})}function ne(){return je(this,null,function*(){try{const S=yield(0,M.dd)(r);a({type:11,payload:S==null?void 0:S.data})}catch(S){console.log(S)}})}function we(S){a({type:10,payload:S})}function Oe(S){return je(this,null,function*(){var ae,fe,Pe;const q=((Pe=(fe=(ae=window==null?void 0:window.location)==null?void 0:ae.pathname)==null?void 0:fe.split("/"))==null?void 0:Pe[2])||r;return yield(0,M.n4)(q,S||{code:H.Base64.encode(y.code),language:s})})}function nt(){return je(this,null,function*(){if(!R){a({type:5,payload:!0});try{if(Nt.Z.publish("to-commit-info"),(yield Oe()).status===0){let $e=function(){return je(this,null,function*(){const{status:ft,data:Xe}=yield(0,M.rX)(r,"submit"),st=pt()-be>(Pe*q+3)*1e3;if(ft!==0&&!st&&setTimeout($e,1e3),st){T.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),a({type:5,payload:!1});return}if(ft===0){Xe.status===2&&T.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const $a=yield(0,M.zO)(r,{limit:15,page:Z});a({type:8,payload:oe(k({},o),{submitResult:Xe,submitting:!1,submitRecords:$a})}),(Xe==null?void 0:Xe.status)===0&&Y(!0)}})},ae={};if((yield(0,M.bM)(r,ae)).status===-1&&u.get("exercisesId")){window.parent.location.href=`/classrooms/${u.get("coursesId")}/exercise/${u.get("exercisesId")}/detail`;return}const{time_limit:Pe,test_case_size:q}=y,be=pt();$e()}}catch(S){a({type:5,payload:!1})}}})}function at(){return je(this,null,function*(){o.debuging=!0,a({type:4,payload:!0});try{if((yield Oe()).status===0){let be=function(){return je(this,null,function*(){const{status:$e,message:ft,data:Xe}=yield(0,M.rX)(r,"debug"),st=pt()-q>(ae+3)*1e3;if($e!==0&&!st&&(a({type:6,payload:ft}),setTimeout(be,1e3)),st){T.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),a({type:4,payload:!1});return}$e===0&&(a({type:4,payload:!1}),Xe.status===2&&T.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),a({type:7,payload:oe(k({},o),{debugResult:Xe,debuging:!1})}))})};const{time_limit:ae}=y;let fe={input:encodeURIComponent(f.test_case.input)};if((yield(0,M.MU)(r,fe)).status===-1&&u.get("exercisesId")){window.parent.location.href=`/classrooms/${u.get("coursesId")}/exercise/${u.get("exercisesId")}/detail`;return}const q=pt();be()}else a({type:4,payload:!1})}catch(S){console.log(S)}finally{}})}function D(S){var ae;clearTimeout(w.current),w.current=setTimeout(()=>{var fe;Oe({code:H.Base64.encode(S),language:(fe=j==null?void 0:j.current)==null?void 0:fe.language})},2e3),a({type:3,payload:oe(k({},j==null?void 0:j.current),{hack:oe(k({},(ae=j==null?void 0:j.current)==null?void 0:ae.hack),{code:S})})})}function P(S){let ae=S.target.value;a({type:3,payload:oe(k({},f),{test_case:{input:ae}})})}const ge=S=>je(void 0,null,function*(){var ae;if(a({type:0,payload:!0}),(yield Oe()).status===0){a({type:8,payload:{languageValue:S}}),j.current.language=S;const Pe=`${C==null?void 0:C.login}-language`;localStorage.setItem(Pe,S);const q=yield(0,M.dd)(r);if(q.status===0){const be=(ae=q==null?void 0:q.data)==null?void 0:ae.find($e=>$e.language===S);D(H.Base64.decode(be.code))}setTimeout(()=>{a({type:0,payload:!1})},300)}});function He(){return je(this,null,function*(){try{const S=yield(0,M.H7)(r,{language:s});S.status===401?z.history.replace("/login",{from:i.pathname}):(D(H.Base64.decode(S.code)),ne())}catch(S){console.log(S)}})}function De(){T.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:e.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",e.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return je(this,null,function*(){const S=yield(0,M.fi)(r,{language:s});S.status===401?z.history.replace("/login",{from:i.pathname}):D(H.Base64.decode(S.code))})}})}function Mt(){a({type:9,payload:!0})}function Te(){a({type:9,payload:!1})}function re(S){return je(this,null,function*(){yield(0,M.MK)(r,S),a({type:1,payload:{showNote:!1,data:oe(k({},f),{hack:oe(k({},y),{notes:S.notes})})}})})}const Je={input:(l=f==null?void 0:f.test_case)==null?void 0:l.input,is_file:(n=f==null?void 0:f.test_case)==null?void 0:n.is_file,language:y==null?void 0:y.language,code:y==null?void 0:y.code,title:"main."+Ra[y==null?void 0:y.language],modify_code:y==null?void 0:y.modify_code,notes:y==null?void 0:y.notes,debugResult:L,debuging:V,submitting:R,executingMessage:h,id:r,languageValue:s,languageList:x,onChangeLanguage:ge,onCancelNote:Te,onAddNote:re,showNote:A,onShowNote:Mt,onSubmitCode:nt,onChangeCode:D,onChangeInput:P,onDebugCode:at,onResetCode:He,onSyncCode:De,onUpdateCode:Oe};function Va(){return je(this,null,function*(){const{praise_count:S}=yield(0,M.vl)(y.id,{container_type:"Hack",type:1});let ae=oe(k({},f),{hack:oe(k({},y),{praises_count:S,user_praise:!y.user_praise})});a({type:3,payload:ae})})}const Ha={topicId:r,submitResult:I,submitRecords:_,submitting:R,page:Z,onPageChange:we,hack:y,user:f==null?void 0:f.user,onTriggerPraise:Va};return console.log(f,j==null?void 0:j.current,"data--------"),e.createElement(e.Fragment,null,e.createElement(ee.Z,{className:"oj-custom-large-spin",size:"large",spinning:v},f?e.createElement("div",{className:"oj-custom-warp"},e.createElement("header",{className:me.Z.header,style:{minWidth:1200}},e.createElement("div",null,e.createElement("img",{src:`${c.Z.IMG_SERVER}/images/${C.image_url}`,alt:"user",width:30}),e.createElement("span",null,C.name)),e.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},e.createElement("div",null,y.name),e.createElement(xa.Z,{onChange:S=>{},className:"font12 c-grey-999"})),e.createElement(Pa.CopyToClipboard,{text:`${(E=window.location)==null?void 0:E.origin}/problems/${y.identifier}/share`,onCopy:()=>X.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},e.createElement("span",{className:me.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",e.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),y.edit_privilege?e.createElement(z.Link,{className:me.Z.btn_back,to:`/problems/${y.identifier}/ojedit`,style:{marginRight:10}}," ",e.createElement($.Z,null)," \u7F16\u8F91"):null,e.createElement(z.Link,{className:me.Z.btn_back,onClick:()=>{},to:"/problems"}," ",e.createElement(ce.Z,null),"\u9000\u51FA")),e.createElement(U.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:e.createElement(Ca,k({},Ha)),rightChild:e.createElement(Qa,k({},Je))})):null),e.createElement(T.default,{centered:!0,closable:!1,width:680,footer:null,open:g,className:"oj-modal"},e.createElement("section",{className:"oj-modal-content"},e.createElement("div",{className:"oj-modal-head"},e.createElement("img",{src:Aa,alt:""}),e.createElement("i",{onClick:()=>Y(!1),className:"iconfont icon-guanbi1"})),e.createElement("aside",null,e.createElement("img",{className:"mr30",src:wa.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",e.createElement("span",{style:{color:"#75d6ba",marginRight:100}},I==null?void 0:I.execute_time,"s"),"\u4F18\u4E8E",e.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(I==null?void 0:I.time_better_than)||100,"%"),"\u7684\u7528\u6237"),e.createElement("aside",{className:"mb50"},e.createElement("img",{src:Fa.Z,className:"mr30"}),e.createElement("span",{className:"oj-modal-tt"},e.createElement("span",null,e.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),e.createElement("span",{className:"c-light-primary"},I==null?void 0:I.execute_memory,"mb")),e.createElement("span",null,e.createElement("span",null))),"\u4F18\u4E8E",e.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(I==null?void 0:I.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),e.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Wa({languageValue:t,languageList:l,onChangeLanguage:n,title:E,modify_code:o,onSyncCode:a,onShowCodeSetting:r,onResetCode:i}){const u=(0,z.useLocation)(),s=()=>{T.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:e.createElement(ve.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:i})};return e.createElement("div",{className:"action-bar"},e.createElement(de.default,{className:"oj-select",value:t,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:n},l==null?void 0:l.map(x=>e.createElement(de.default.Option,{key:x.language,value:x.language},x.language))),e.createElement("span",null),e.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:s},e.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),e.createElement("a",{onClick:r},e.createElement("i",{className:"iconfont icon-shezhi"})))}function Qa(t){var l=t,{id:n,input:E,is_file:o,showNote:a,onShowNote:r,notes:i,onCancelNote:u,onAddNote:s,debugResult:x,language:v,debuging:f,submitting:L,executingMessage:I,code:_,onSubmitCode:Z,onDebugCode:A,onChangeCode:V,onChangeInput:R,onUpdateCode:h}=l,O=Za(l,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function d(F){return e.createElement(Wa,oe(k({},O),{onShowCodeSetting:F}))}const B={id:n,input:E,debugResult:x,debuging:f,is_file:o,submitting:L,executingMessage:I,onDebugCode:A,onChangeCode:V,onSubmitCode:Z,onChangeInput:R};return e.createElement("div",{className:"right-panel"},e.createElement(ze.Z,{onUpdateCode:()=>{},language:v,value:_,onChange:V,ActionBarRender:d}),e.createElement("div",{className:`note-form-area ${a?"active":""}`},e.createElement(rt,{onCancel:u,notes:i,callback:s})),e.createElement(Ae.ZP,k({},B)))}},26132:function(ut,he,m){m.d(he,{h:function(){return e}});var e=($=>($[$.NOMATCH=-1]="NOMATCH",$[$.OK=0]="OK",$[$.TIMEOUT=2]="TIMEOUT",$[$.PODFAILURE=3]="PODFAILURE",$[$.COMPILEFAILURE=4]="COMPILEFAILURE",$[$.EXECUTEFAILURE=5]="EXECUTEFAILURE",$))(e||{})},68155:function(ut,he,m){m.d(he,{H7:function(){return de},KC:function(){return ze},M3:function(){return Se},MK:function(){return X},MU:function(){return z},Rg:function(){return Ke},WH:function(){return H},X6:function(){return T},bM:function(){return ce},bx:function(){return me},dd:function(){return c},de:function(){return rt},fi:function(){return M},fu:function(){return $},gu:function(){return Ae},n4:function(){return U},qe:function(){return te},rL:function(){return qe},rX:function(){return ee},uc:function(){return se},vl:function(){return ve},wO:function(){return pe},zO:function(){return ue}});var e=m(76265);function $(N){return(0,e.U2)(`mypractices/${N}.json`,{hidePopLogin:!0})}function ce(N,p){return(0,e.v_)(`mypractices/${N}/code_submit.json`,p)}function z(N,p){return(0,e.v_)(`mypractices/${N}/code_debug.json`,p)}function ue(N,p){return p.language&&(p.language=encodeURIComponent(p.language)),(0,e.U2)(`mypractices/${N}/submit_records.json`,p)}function T(N){return(0,e.U2)("mypractices/record_detail.json",{id:N})}function ee(N,p){return(0,e.U2)(`mypractices/${N}/result.json`,{mode:p})}function X(N,p){return(0,e.v_)(`mypractices/${N}/add_notes.json`,p)}function de(N,p){return(0,e.v_)(`mypractices/${N}/restore_initial_code.json`,p)}function M(N,p){return(0,e.v_)(`mypractices/${N}/sync_code.json`,p)}function U(N,p){return(0,e.v_)(`mypractices/${N}/update_code.json`,p)}function c(N){return(0,e.v_)(`mypractices/${N}/initial_codes.json`)}function ve(N,p){return(0,e.v_)(`discusses/${N}/plus.json`,p)}function ze(N){return(0,e.U2)("practices/practices_list.json",N)}function H(N,p){return(0,e.U2)(`practices/${N}/question_solution_articles`,p)}function me(N,p){return(0,e.v_)(`practices/${N}/question_solution_articles`,p)}function Ae(N,p){return(0,e.gz)(`practices/${N}/question_solution_articles/${p==null?void 0:p.active}`,p)}function Se(N,p){return(0,e.U2)(`practices/${N}/question_solution_articles/${p==null?void 0:p.active}/edit`,p)}function pe(N,p){return(0,e.U2)(`practices/${N}/question_solution_articles/${p==null?void 0:p.active}`,p)}function te(N,p){return(0,e.v_)(`practices/${N}/question_solution_articles/${p==null?void 0:p.active}/set_authority_or_excellent`,p)}function Ke(N,p){return(0,e.v_)(`practices/${N}/question_solution_articles/${p==null?void 0:p.active}/praise_or_treads`,p)}function qe(N,p){return(0,e.v_)(`practices/${N}/question_solution_articles/${p==null?void 0:p.active}/hide`)}function rt(N,p){return(0,e.IV)(`practices/${N}/question_solution_articles/${p==null?void 0:p.active}`,p)}function se(N,p){return(0,e.v_)(`mypractices/${N}/update_practice_time_sum`,p)}},88511:function(ut,he,m){m.d(he,{o:function(){return de}});var e=m(76265),$=m(93125),ce=m.n($);let z="",ue,T="";function ee(M){X(M)}function X(M){ue=new(ce()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(U){console.log("addFileSuccess: "+U.file.name),M.addFileSuccess&&M.addFileSuccess(U),ue.startUpload()},onUploadstarted:function(U){const c=U.file.name;if(U.videoId){var ze=`/api/users/${z}/video_auths.json`;(0,e.ZP)(ze,{method:"put",body:{video_id:U.videoId,title:c,file_name:c,virtual_classroom_id:T}}).then(H=>{if(H.status==-1){M.onUploadError&&M.onUploadError(U);return}const me=H.data;var Ae=me.UploadAuth,Se=me.UploadAddress,pe=me.VideoId;ue.setUploadAuthAndAddress(U,Ae,Se)}).catch(H=>{ue.deleteFile(ue._curIndex),ue.nextUpload(),console.log(H)})}else{var ve=`/api/users/${z}/video_auths.json`;const H="";(0,e.ZP)(ve,{method:"Post",body:{title:H+c,file_name:H+c,virtual_classroom_id:T}}).then(me=>{if(me){const te=me.data;var Ae=te.UploadAuth,Se=te.UploadAddress,pe=te.VideoId;ue.setUploadAuthAndAddress(U,Ae,Se,pe)}}).catch(me=>{ue.deleteFile(ue._curIndex),ue.nextUpload(),console.log(me)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(U){M.onUploadSucceed&&M.onUploadSucceed(U),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(U,c,ve){M.onUploadFailed&&M.onUploadFailed(U),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(U,c,ve){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(U,c,ve){M.onUploadProgress&&M.onUploadProgress(U,c,ve);var ze=Math.ceil(ve*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(U){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var c=`/api/users/${z}/video_auths.json`;(0,e.ZP)(c,{method:"put",body:{video_id:U.videoId}}).then(ve=>{var H=ve.data.UploadAuth;ue.resumeUploadWithAuth(H)}).catch(ve=>{console.log(ve)})},onUploadEnd:function(U){M.onUploadEnd&&M.onUploadEnd(U),console.log("onUploadEnd: uploaded all the files")}}),M.gotUploader&&M.gotUploader(ue)}function de(M,U,c){M&&(z=M),U&&(T=U),ee(c)}}}]);
|