Auto Submit

local_educoder
autosubmit 9 months ago
parent 1dd8c3398a
commit 5e959ecfb2

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -183,7 +183,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script><script src="/js/jweixin.js" crossorigin="anonymous"></script>
<script src="/umi.8c136b8a.js" crossorigin="anonymous"></script>
<script src="/umi.ecc1697a.js" crossorigin="anonymous"></script>
<script src="/js/public.js" crossorigin="anonymous"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function je({open:oe=!0,onChange:E,defaultValue:y,placement:x,width:b,height:z,extra:te,onDynamic:ue,onOpenChange:de,showExtra:Ae=!0}){const ge=(0,a.useRef)(null),pe=(0,a.useRef)(null),[De,Se]=(0,a.useState)(y||""),[ke,Ve]=(0,a.useState)(y||""),[_e,Ke]=(0,a.useState)(!!oe),[Je,Ye]=(0,a.useState)(1),lt={selectOnLineNumbers:!0};(0,a.useEffect)(()=>{oe&&(Se(y),Ve(y),Ke(!0))},[oe,y]),(0,a.useEffect)(()=>{De!==""&&(clearTimeout(pe.current),pe.current=setTimeout(()=>{const Pt=document.createElement("iframe");if(Pt.style.width="100%",Pt.style.height="100%",Pt.style.border="0",ge.current){ge.current.innerHTML="",ge.current.appendChild(Pt);const nt=Pt.contentDocument||Pt.contentWindow.document;nt.open(),nt.write(De),nt.close()}},1e3))},[oe,De]);const vt=Pt=>{Se(Pt),E==null||E(Pt,ke)};return Fe.createElement(Pe.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:_e,width:"100%",height:z||"100vh",rootClassName:ye.smartWrp,destroyOnClose:!0,onClose:()=>{Ke(!1),de==null||de(De)},extra:Ae&&Fe.createElement("div",null,Fe.createElement(he.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Je,onChange:Pt=>Ye(Pt)}),Fe.createElement(Ie.Z,{type:"primary",className:"ml20",onClick:()=>me(this,null,function*(){yield ue(De,()=>{Ke(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Fe.createElement(we.Z,{className:"h100"},Fe.createElement(Ee.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Je===1?"block":"none"}},Fe.createElement("div",{className:"h100",ref:ge})),Fe.createElement(Ee.Z,{flex:"1",style:{display:Je===2?"block":"none"}},Fe.createElement(xe.ZP,{height:"90vh",value:y,language:"html",theme:"vs",showMiniMap:!1,options:lt,onChange:vt}))))}var Ne=je},10946:function(mt,ot,ee){"use strict";ee.d(ot,{Z:function(){return De}});var a=ee(59301),Pe=ee(74439),we=ee(77596),Ee=ee(3977),ye=ee(14179),xe=ee(56102),he={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ie=ee(6767),Fe=ee(90083),me=ee(95827),Oe=ee(30084),je=ee(10787),Ne=ee(8944),oe=ee(81679),E=Object.defineProperty,y=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ue=(Se,ke,Ve)=>ke in Se?E(Se,ke,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Se[ke]=Ve,de=(Se,ke)=>{for(var Ve in ke||(ke={}))z.call(ke,Ve)&&ue(Se,Ve,ke[Ve]);if(b)for(var Ve of b(ke))te.call(ke,Ve)&&ue(Se,Ve,ke[Ve]);return Se},Ae=(Se,ke)=>y(Se,x(ke)),ge=(Se,ke)=>{var Ve={};for(var _e in Se)z.call(Se,_e)&&ke.indexOf(_e)<0&&(Ve[_e]=Se[_e]);if(Se!=null&&b)for(var _e of b(Se))ke.indexOf(_e)<0&&te.call(Se,_e)&&(Ve[_e]=Se[_e]);return Ve},De=({onFinish:Se,value:ke,streamingStatus:Ve,cancelIndex:_e,loadImage:Ke,onDynamic:Je,isHiddenHtml:Ye})=>{const[lt,vt]=(0,a.useState)(""),[Pt,nt]=(0,a.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[yt,gn]=(0,a.useState)(0),[Lt,pt]=(0,a.useState)(!1),et=Ht=>Ht.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Rt,ln)=>`<mathx data-text="${ln.trim()}">$$${ln.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),st=()=>{pt(!0),Se==null||Se()};(0,a.useEffect)(()=>{const Ht=Ke?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function je({open:oe=!0,onChange:E,defaultValue:y,placement:x,width:b,height:z,extra:te,onDynamic:ue,onOpenChange:de,showExtra:Ae=!0}){const ge=(0,a.useRef)(null),pe=(0,a.useRef)(null),[De,Se]=(0,a.useState)(y||""),[ke,Ve]=(0,a.useState)(y||""),[_e,Ke]=(0,a.useState)(!!oe),[Je,Ye]=(0,a.useState)(1),lt={selectOnLineNumbers:!0};(0,a.useEffect)(()=>{oe&&(Se(y),Ve(y),Ke(!0))},[oe,y]),(0,a.useEffect)(()=>{De!==""&&(clearTimeout(pe.current),pe.current=setTimeout(()=>{const Pt=document.createElement("iframe");if(Pt.style.width="100%",Pt.style.height="100%",Pt.style.border="0",ge.current){ge.current.innerHTML="",ge.current.appendChild(Pt);const nt=Pt.contentDocument||Pt.contentWindow.document;nt.open(),nt.write(De),nt.close()}},1e3))},[oe,De]);const vt=Pt=>{Se(Pt),E==null||E(Pt,ke)};return Fe.createElement(Pe.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:_e,width:"100%",height:z||"100vh",rootClassName:ye.smartWrp,destroyOnClose:!0,onClose:()=>{Ke(!1),de==null||de(De)},extra:Ae&&Fe.createElement("div",null,Fe.createElement(he.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Je,onChange:Pt=>Ye(Pt)}),Fe.createElement(Ie.Z,{type:"primary",className:"ml20",onClick:()=>me(this,null,function*(){yield ue(De,()=>{Ke(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Fe.createElement(we.Z,{className:"h100"},Fe.createElement(Ee.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Je===1?"block":"none"}},Fe.createElement("div",{className:"h100",ref:ge})),Fe.createElement(Ee.Z,{flex:"1",style:{display:Je===2?"block":"none"}},Fe.createElement(xe.ZP,{height:"90vh",value:y,language:"html",theme:"vs",showMiniMap:!1,options:lt,onChange:vt}))))}var Ne=je},10946:function(mt,ot,ee){"use strict";ee.d(ot,{Z:function(){return De}});var a=ee(59301),Pe=ee(72460),we=ee(77596),Ee=ee(3977),ye=ee(14179),xe=ee(56102),he={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ie=ee(6767),Fe=ee(90083),me=ee(95827),Oe=ee(30084),je=ee(10787),Ne=ee(8944),oe=ee(81679),E=Object.defineProperty,y=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ue=(Se,ke,Ve)=>ke in Se?E(Se,ke,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Se[ke]=Ve,de=(Se,ke)=>{for(var Ve in ke||(ke={}))z.call(ke,Ve)&&ue(Se,Ve,ke[Ve]);if(b)for(var Ve of b(ke))te.call(ke,Ve)&&ue(Se,Ve,ke[Ve]);return Se},Ae=(Se,ke)=>y(Se,x(ke)),ge=(Se,ke)=>{var Ve={};for(var _e in Se)z.call(Se,_e)&&ke.indexOf(_e)<0&&(Ve[_e]=Se[_e]);if(Se!=null&&b)for(var _e of b(Se))ke.indexOf(_e)<0&&te.call(Se,_e)&&(Ve[_e]=Se[_e]);return Ve},De=({onFinish:Se,value:ke,streamingStatus:Ve,cancelIndex:_e,loadImage:Ke,onDynamic:Je,isHiddenHtml:Ye})=>{const[lt,vt]=(0,a.useState)(""),[Pt,nt]=(0,a.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[yt,gn]=(0,a.useState)(0),[Lt,pt]=(0,a.useState)(!1),et=Ht=>Ht.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Rt,ln)=>`<mathx data-text="${ln.trim()}">$$${ln.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),st=()=>{pt(!0),Se==null||Se()};(0,a.useEffect)(()=>{const Ht=Ke?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${ke}`:ke,Rt=et(Ht);if(!Lt)if(Ke||!Ve||_e>0){vt(Rt),gn(Rt.length),(!Ve||_e>0)&&!Ke&&st();return}else if((Rt==null?void 0:Rt.length)<4)vt(Rt),gn(Rt.length);else if(yt<Rt.length){const ln=Rt.length-yt,Te=setInterval(()=>{vt(Rt.slice(0,yt+2)),gn(un=>un+2)},ln>10?Math.max(500/(ln/2),20):50);return()=>clearInterval(Te)}else Ve||st()},[ke,Ve,_e,Ke,yt]);const ht=(0,a.useMemo)(()=>a.createElement("section",{className:`${he.answer} fadeIn animated edu_md`},a.createElement(Pe.UG,{remarkPlugins:[Oe.Z,je.Z],rehypePlugins:[me.Z,Ee.Z],components:{code(Ht){var Rt=Ht,{node:ln,inline:Te,className:un,children:ya}=Rt,Pa=ge(Rt,["node","inline","className","children"]);const bt=/language-(\w+)/.exec(un||""),hn=String(ya).trim();return Te||!bt?a.createElement("code",de({className:un},Pa),ya):a.createElement("code",{className:he.codeCopy,"data-text":`\`\`\`${bt?bt[1]:""}
${ya}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Re({open:re=!0,onChange:a,defaultValue:E,placement:x,width:y,height:ee,extra:z,onDynamic:ne,onOpenChange:ae,showExtra:le=!0}){const oe=(0,b.useRef)(null),se=(0,b.useRef)(null),[de,ue]=(0,b.useState)(E||""),[ce,me]=(0,b.useState)(E||""),[we,Ge]=(0,b.useState)(!!re),[be,Te]=(0,b.useState)(1),ke={selectOnLineNumbers:!0};(0,b.useEffect)(()=>{re&&(ue(E),me(E),Ge(!0))},[re,E]),(0,b.useEffect)(()=>{de!==""&&(clearTimeout(se.current),se.current=setTimeout(()=>{const Qe=document.createElement("iframe");if(Qe.style.width="100%",Qe.style.height="100%",Qe.style.border="0",oe.current){oe.current.innerHTML="",oe.current.appendChild(Qe);const fe=Qe.contentDocument||Qe.contentWindow.document;fe.open(),fe.write(de),fe.close()}},1e3))},[re,de]);const Ne=Qe=>{ue(Qe),a==null||a(Qe,ce)};return ge.createElement(ve.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:we,width:"100%",height:ee||"100vh",rootClassName:pe.smartWrp,destroyOnClose:!0,onClose:()=>{Ge(!1),ae==null||ae(de)},extra:le&&ge.createElement("div",null,ge.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:be,onChange:Qe=>Te(Qe)}),ge.createElement(Be.Z,{type:"primary",className:"ml20",onClick:()=>ie(this,null,function*(){yield ne(de,()=>{Ge(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Oe.Z,{className:"h100"},ge.createElement(he.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:be===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:oe})),ge.createElement(he.Z,{flex:"1",style:{display:be===2?"block":"none"}},ge.createElement(Pe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:ke,onChange:Ne}))))}var Ye=Re},10946:function(ye,Je,te){"use strict";te.d(Je,{Z:function(){return de}});var b=te(59301),ve=te(74439),Oe=te(77596),he=te(3977),pe=te(14179),Pe=te(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Be=te(6767),ge=te(90083),ie=te(95827),Le=te(30084),Re=te(10787),Ye=te(8944),re=te(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ne=(ue,ce,me)=>ce in ue?a(ue,ce,{enumerable:!0,configurable:!0,writable:!0,value:me}):ue[ce]=me,ae=(ue,ce)=>{for(var me in ce||(ce={}))ee.call(ce,me)&&ne(ue,me,ce[me]);if(y)for(var me of y(ce))z.call(ce,me)&&ne(ue,me,ce[me]);return ue},le=(ue,ce)=>E(ue,x(ce)),oe=(ue,ce)=>{var me={};for(var we in ue)ee.call(ue,we)&&ce.indexOf(we)<0&&(me[we]=ue[we]);if(ue!=null&&y)for(var we of y(ue))ce.indexOf(we)<0&&z.call(ue,we)&&(me[we]=ue[we]);return me},de=({onFinish:ue,value:ce,streamingStatus:me,cancelIndex:we,loadImage:Ge,onDynamic:be,isHiddenHtml:Te})=>{const[ke,Ne]=(0,b.useState)(""),[Qe,fe]=(0,b.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ce,ze]=(0,b.useState)(0),[et,it]=(0,b.useState)(!1),Me=Xe=>Xe.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(je,lt)=>`<mathx data-text="${lt.trim()}">$$${lt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),De=()=>{it(!0),ue==null||ue()};(0,b.useEffect)(()=>{const Xe=Ge?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Re({open:re=!0,onChange:a,defaultValue:E,placement:x,width:y,height:ee,extra:z,onDynamic:ne,onOpenChange:ae,showExtra:le=!0}){const oe=(0,b.useRef)(null),se=(0,b.useRef)(null),[de,ue]=(0,b.useState)(E||""),[ce,me]=(0,b.useState)(E||""),[we,Ge]=(0,b.useState)(!!re),[be,Te]=(0,b.useState)(1),ke={selectOnLineNumbers:!0};(0,b.useEffect)(()=>{re&&(ue(E),me(E),Ge(!0))},[re,E]),(0,b.useEffect)(()=>{de!==""&&(clearTimeout(se.current),se.current=setTimeout(()=>{const Qe=document.createElement("iframe");if(Qe.style.width="100%",Qe.style.height="100%",Qe.style.border="0",oe.current){oe.current.innerHTML="",oe.current.appendChild(Qe);const fe=Qe.contentDocument||Qe.contentWindow.document;fe.open(),fe.write(de),fe.close()}},1e3))},[re,de]);const Ne=Qe=>{ue(Qe),a==null||a(Qe,ce)};return ge.createElement(ve.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:we,width:"100%",height:ee||"100vh",rootClassName:pe.smartWrp,destroyOnClose:!0,onClose:()=>{Ge(!1),ae==null||ae(de)},extra:le&&ge.createElement("div",null,ge.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:be,onChange:Qe=>Te(Qe)}),ge.createElement(Be.Z,{type:"primary",className:"ml20",onClick:()=>ie(this,null,function*(){yield ne(de,()=>{Ge(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Oe.Z,{className:"h100"},ge.createElement(he.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:be===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:oe})),ge.createElement(he.Z,{flex:"1",style:{display:be===2?"block":"none"}},ge.createElement(Pe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:ke,onChange:Ne}))))}var Ye=Re},10946:function(ye,Je,te){"use strict";te.d(Je,{Z:function(){return de}});var b=te(59301),ve=te(72460),Oe=te(77596),he=te(3977),pe=te(14179),Pe=te(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Be=te(6767),ge=te(90083),ie=te(95827),Le=te(30084),Re=te(10787),Ye=te(8944),re=te(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ne=(ue,ce,me)=>ce in ue?a(ue,ce,{enumerable:!0,configurable:!0,writable:!0,value:me}):ue[ce]=me,ae=(ue,ce)=>{for(var me in ce||(ce={}))ee.call(ce,me)&&ne(ue,me,ce[me]);if(y)for(var me of y(ce))z.call(ce,me)&&ne(ue,me,ce[me]);return ue},le=(ue,ce)=>E(ue,x(ce)),oe=(ue,ce)=>{var me={};for(var we in ue)ee.call(ue,we)&&ce.indexOf(we)<0&&(me[we]=ue[we]);if(ue!=null&&y)for(var we of y(ue))ce.indexOf(we)<0&&z.call(ue,we)&&(me[we]=ue[we]);return me},de=({onFinish:ue,value:ce,streamingStatus:me,cancelIndex:we,loadImage:Ge,onDynamic:be,isHiddenHtml:Te})=>{const[ke,Ne]=(0,b.useState)(""),[Qe,fe]=(0,b.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ce,ze]=(0,b.useState)(0),[et,it]=(0,b.useState)(!1),Me=Xe=>Xe.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(je,lt)=>`<mathx data-text="${lt.trim()}">$$${lt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),De=()=>{it(!0),ue==null||ue()};(0,b.useEffect)(()=>{const Xe=Ge?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${ce}`:ce,je=Me(Xe);if(!et)if(Ge||!me||we>0){Ne(je),ze(je.length),(!me||we>0)&&!Ge&&De();return}else if((je==null?void 0:je.length)<4)Ne(je),ze(je.length);else if(Ce<je.length){const lt=je.length-Ce,Ae=setInterval(()=>{Ne(je.slice(0,Ce+2)),ze(qe=>qe+2)},lt>10?Math.max(500/(lt/2),20):50);return()=>clearInterval(Ae)}else me||De()},[ce,me,we,Ge,Ce]);const Ue=(0,b.useMemo)(()=>b.createElement("section",{className:`${Ee.answer} fadeIn animated edu_md`},b.createElement(ve.UG,{remarkPlugins:[Le.Z,Re.Z],rehypePlugins:[ie.Z,he.Z],components:{code(Xe){var je=Xe,{node:lt,inline:Ae,className:qe,children:vt}=je,Et=oe(je,["node","inline","className","children"]);const at=/language-(\w+)/.exec(qe||""),jt=String(vt).trim();return Ae||!at?b.createElement("code",ae({className:qe},Et),vt):b.createElement("code",{className:Ee.codeCopy,"data-text":`\`\`\`${at?at[1]:""}
${vt}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function xe({open:le=!0,onChange:a,defaultValue:E,placement:b,width:y,height:z,extra:ee,onDynamic:oe,onOpenChange:ie,showExtra:ge=!0}){const ue=(0,x.useRef)(null),we=(0,x.useRef)(null),[Me,ve]=(0,x.useState)(E||""),[Se,De]=(0,x.useState)(E||""),[Je,mA]=(0,x.useState)(!!le),[Xe,We]=(0,x.useState)(1),nA={selectOnLineNumbers:!0};(0,x.useEffect)(()=>{le&&(ve(E),De(E),mA(!0))},[le,E]),(0,x.useEffect)(()=>{Me!==""&&(clearTimeout(we.current),we.current=setTimeout(()=>{const EA=document.createElement("iframe");if(EA.style.width="100%",EA.style.height="100%",EA.style.border="0",ue.current){ue.current.innerHTML="",ue.current.appendChild(EA);const Ze=EA.contentDocument||EA.contentWindow.document;Ze.open(),Ze.write(Me),Ze.close()}},1e3))},[le,Me]);const fA=EA=>{ve(EA),a==null||a(EA,Se)};return ce.createElement(Ee.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Je,width:"100%",height:z||"100vh",rootClassName:Ce.smartWrp,destroyOnClose:!0,onClose:()=>{mA(!1),ie==null||ie(Me)},extra:ge&&ce.createElement("div",null,ce.createElement(Fe.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Xe,onChange:EA=>We(EA)}),ce.createElement(Ie.Z,{type:"primary",className:"ml20",onClick:()=>Oe(this,null,function*(){yield oe(Me,()=>{mA(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ce.createElement(me.Z,{className:"h100"},ce.createElement(pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Xe===1?"block":"none"}},ce.createElement("div",{className:"h100",ref:ue})),ce.createElement(pe.Z,{flex:"1",style:{display:Xe===2?"block":"none"}},ce.createElement(fe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:nA,onChange:fA}))))}var iA=xe},10946:function(Ne,Ve,ne){"use strict";ne.d(Ve,{Z:function(){return Me}});var x=ne(59301),Ee=ne(74439),me=ne(77596),pe=ne(3977),Ce=ne(14179),fe=ne(56102),Fe={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ie=ne(6767),ce=ne(90083),Oe=ne(95827),Le=ne(30084),xe=ne(10787),iA=ne(8944),le=ne(81679),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(ve,Se,De)=>Se in ve?a(ve,Se,{enumerable:!0,configurable:!0,writable:!0,value:De}):ve[Se]=De,ie=(ve,Se)=>{for(var De in Se||(Se={}))z.call(Se,De)&&oe(ve,De,Se[De]);if(y)for(var De of y(Se))ee.call(Se,De)&&oe(ve,De,Se[De]);return ve},ge=(ve,Se)=>E(ve,b(Se)),ue=(ve,Se)=>{var De={};for(var Je in ve)z.call(ve,Je)&&Se.indexOf(Je)<0&&(De[Je]=ve[Je]);if(ve!=null&&y)for(var Je of y(ve))Se.indexOf(Je)<0&&ee.call(ve,Je)&&(De[Je]=ve[Je]);return De},Me=({onFinish:ve,value:Se,streamingStatus:De,cancelIndex:Je,loadImage:mA,onDynamic:Xe,isHiddenHtml:We})=>{const[nA,fA]=(0,x.useState)(""),[EA,Ze]=(0,x.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[eA,PA]=(0,x.useState)(0),[rA,jA]=(0,x.useState)(!1),ke=vA=>vA.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(oA,NA)=>`<mathx data-text="${NA.trim()}">$$${NA.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),$e=()=>{jA(!0),ve==null||ve()};(0,x.useEffect)(()=>{const vA=mA?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function xe({open:le=!0,onChange:a,defaultValue:E,placement:b,width:y,height:z,extra:ee,onDynamic:oe,onOpenChange:ie,showExtra:ge=!0}){const ue=(0,x.useRef)(null),we=(0,x.useRef)(null),[Me,ve]=(0,x.useState)(E||""),[Se,De]=(0,x.useState)(E||""),[Je,mA]=(0,x.useState)(!!le),[Xe,We]=(0,x.useState)(1),nA={selectOnLineNumbers:!0};(0,x.useEffect)(()=>{le&&(ve(E),De(E),mA(!0))},[le,E]),(0,x.useEffect)(()=>{Me!==""&&(clearTimeout(we.current),we.current=setTimeout(()=>{const EA=document.createElement("iframe");if(EA.style.width="100%",EA.style.height="100%",EA.style.border="0",ue.current){ue.current.innerHTML="",ue.current.appendChild(EA);const Ze=EA.contentDocument||EA.contentWindow.document;Ze.open(),Ze.write(Me),Ze.close()}},1e3))},[le,Me]);const fA=EA=>{ve(EA),a==null||a(EA,Se)};return ce.createElement(Ee.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Je,width:"100%",height:z||"100vh",rootClassName:Ce.smartWrp,destroyOnClose:!0,onClose:()=>{mA(!1),ie==null||ie(Me)},extra:ge&&ce.createElement("div",null,ce.createElement(Fe.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Xe,onChange:EA=>We(EA)}),ce.createElement(Ie.Z,{type:"primary",className:"ml20",onClick:()=>Oe(this,null,function*(){yield oe(Me,()=>{mA(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ce.createElement(me.Z,{className:"h100"},ce.createElement(pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Xe===1?"block":"none"}},ce.createElement("div",{className:"h100",ref:ue})),ce.createElement(pe.Z,{flex:"1",style:{display:Xe===2?"block":"none"}},ce.createElement(fe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:nA,onChange:fA}))))}var iA=xe},10946:function(Ne,Ve,ne){"use strict";ne.d(Ve,{Z:function(){return Me}});var x=ne(59301),Ee=ne(72460),me=ne(77596),pe=ne(3977),Ce=ne(14179),fe=ne(56102),Fe={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ie=ne(6767),ce=ne(90083),Oe=ne(95827),Le=ne(30084),xe=ne(10787),iA=ne(8944),le=ne(81679),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(ve,Se,De)=>Se in ve?a(ve,Se,{enumerable:!0,configurable:!0,writable:!0,value:De}):ve[Se]=De,ie=(ve,Se)=>{for(var De in Se||(Se={}))z.call(Se,De)&&oe(ve,De,Se[De]);if(y)for(var De of y(Se))ee.call(Se,De)&&oe(ve,De,Se[De]);return ve},ge=(ve,Se)=>E(ve,b(Se)),ue=(ve,Se)=>{var De={};for(var Je in ve)z.call(ve,Je)&&Se.indexOf(Je)<0&&(De[Je]=ve[Je]);if(ve!=null&&y)for(var Je of y(ve))Se.indexOf(Je)<0&&ee.call(ve,Je)&&(De[Je]=ve[Je]);return De},Me=({onFinish:ve,value:Se,streamingStatus:De,cancelIndex:Je,loadImage:mA,onDynamic:Xe,isHiddenHtml:We})=>{const[nA,fA]=(0,x.useState)(""),[EA,Ze]=(0,x.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[eA,PA]=(0,x.useState)(0),[rA,jA]=(0,x.useState)(!1),ke=vA=>vA.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(oA,NA)=>`<mathx data-text="${NA.trim()}">$$${NA.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),$e=()=>{jA(!0),ve==null||ve()};(0,x.useEffect)(()=>{const vA=mA?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Se}`:Se,oA=ke(vA);if(!rA)if(mA||!De||Je>0){fA(oA),PA(oA.length),(!De||Je>0)&&!mA&&$e();return}else if((oA==null?void 0:oA.length)<4)fA(oA),PA(oA.length);else if(eA<oA.length){const NA=oA.length-eA,Pe=setInterval(()=>{fA(oA.slice(0,eA+2)),PA(SA=>SA+2)},NA>10?Math.max(500/(NA/2),20):50);return()=>clearInterval(Pe)}else De||$e()},[Se,De,Je,mA,eA]);const BA=(0,x.useMemo)(()=>x.createElement("section",{className:`${Fe.answer} fadeIn animated edu_md`},x.createElement(Ee.UG,{remarkPlugins:[Le.Z,xe.Z],rehypePlugins:[Oe.Z,pe.Z],components:{code(vA){var oA=vA,{node:NA,inline:Pe,className:SA,children:ot}=oA,tt=ue(oA,["node","inline","className","children"]);const Ke=/language-(\w+)/.exec(SA||""),ZA=String(ot).trim();return Pe||!Ke?x.createElement("code",ie({className:SA},tt),ot):x.createElement("code",{className:Fe.codeCopy,"data-text":`\`\`\`${Ke?Ke[1]:""}
${ot}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Oe({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:z,onDynamic:te,onOpenChange:ae,showExtra:re=!0}){const ie=(0,ee.useRef)(null),le=(0,ee.useRef)(null),[ce,de]=(0,ee.useState)(E||""),[Fe,he]=(0,ee.useState)(E||""),[ze,dt]=(0,ee.useState)(!!oe),[je,ye]=(0,ee.useState)(1),Xe={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(de(E),he(E),dt(!0))},[oe,E]),(0,ee.useEffect)(()=>{ce!==""&&(clearTimeout(le.current),le.current=setTimeout(()=>{const rt=document.createElement("iframe");if(rt.style.width="100%",rt.style.height="100%",rt.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(rt);const Ge=rt.contentDocument||rt.contentWindow.document;Ge.open(),Ge.write(ce),Ge.close()}},1e3))},[oe,ce]);const et=rt=>{de(rt),a==null||a(rt,Fe)};return ge.createElement(Se.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:ze,width:"100%",height:b||"100vh",rootClassName:me.smartWrp,destroyOnClose:!0,onClose:()=>{dt(!1),ae==null||ae(ce)},extra:re&&ge.createElement("div",null,ge.createElement(se.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:je,onChange:rt=>ye(rt)}),ge.createElement(Ae.Z,{type:"primary",className:"ml20",onClick:()=>we(this,null,function*(){yield te(ce,()=>{dt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Ne.Z,{className:"h100"},ge.createElement(ve.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:je===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:ie})),ge.createElement(ve.Z,{flex:"1",style:{display:je===2?"block":"none"}},ge.createElement(Pe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Xe,onChange:et}))))}var We=Oe},10946:function(Ee,Ke,ne){"use strict";ne.d(Ke,{Z:function(){return ce}});var ee=ne(59301),Se=ne(74439),Ne=ne(77596),ve=ne(3977),me=ne(14179),Pe=ne(56102),se={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ae=ne(6767),ge=ne(90083),we=ne(95827),Re=ne(30084),Oe=ne(10787),We=ne(8944),oe=ne(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(de,Fe,he)=>Fe in de?a(de,Fe,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[Fe]=he,ae=(de,Fe)=>{for(var he in Fe||(Fe={}))b.call(Fe,he)&&te(de,he,Fe[he]);if(y)for(var he of y(Fe))z.call(Fe,he)&&te(de,he,Fe[he]);return de},re=(de,Fe)=>E(de,x(Fe)),ie=(de,Fe)=>{var he={};for(var ze in de)b.call(de,ze)&&Fe.indexOf(ze)<0&&(he[ze]=de[ze]);if(de!=null&&y)for(var ze of y(de))Fe.indexOf(ze)<0&&z.call(de,ze)&&(he[ze]=de[ze]);return he},ce=({onFinish:de,value:Fe,streamingStatus:he,cancelIndex:ze,loadImage:dt,onDynamic:je,isHiddenHtml:ye})=>{const[Xe,et]=(0,ee.useState)(""),[rt,Ge]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ye,Je]=(0,ee.useState)(0),[at,nt]=(0,ee.useState)(!1),be=Ie=>Ie.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ue,$e)=>`<mathx data-text="${$e.trim()}">$$${$e.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ce=()=>{nt(!0),de==null||de()};(0,ee.useEffect)(()=>{const Ie=dt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Oe({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:z,onDynamic:te,onOpenChange:ae,showExtra:re=!0}){const ie=(0,ee.useRef)(null),le=(0,ee.useRef)(null),[ce,de]=(0,ee.useState)(E||""),[Fe,he]=(0,ee.useState)(E||""),[ze,dt]=(0,ee.useState)(!!oe),[je,ye]=(0,ee.useState)(1),Xe={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(de(E),he(E),dt(!0))},[oe,E]),(0,ee.useEffect)(()=>{ce!==""&&(clearTimeout(le.current),le.current=setTimeout(()=>{const rt=document.createElement("iframe");if(rt.style.width="100%",rt.style.height="100%",rt.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(rt);const Ge=rt.contentDocument||rt.contentWindow.document;Ge.open(),Ge.write(ce),Ge.close()}},1e3))},[oe,ce]);const et=rt=>{de(rt),a==null||a(rt,Fe)};return ge.createElement(Se.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:ze,width:"100%",height:b||"100vh",rootClassName:me.smartWrp,destroyOnClose:!0,onClose:()=>{dt(!1),ae==null||ae(ce)},extra:re&&ge.createElement("div",null,ge.createElement(se.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:je,onChange:rt=>ye(rt)}),ge.createElement(Ae.Z,{type:"primary",className:"ml20",onClick:()=>we(this,null,function*(){yield te(ce,()=>{dt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Ne.Z,{className:"h100"},ge.createElement(ve.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:je===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:ie})),ge.createElement(ve.Z,{flex:"1",style:{display:je===2?"block":"none"}},ge.createElement(Pe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Xe,onChange:et}))))}var We=Oe},10946:function(Ee,Ke,ne){"use strict";ne.d(Ke,{Z:function(){return ce}});var ee=ne(59301),Se=ne(72460),Ne=ne(77596),ve=ne(3977),me=ne(14179),Pe=ne(56102),se={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ae=ne(6767),ge=ne(90083),we=ne(95827),Re=ne(30084),Oe=ne(10787),We=ne(8944),oe=ne(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(de,Fe,he)=>Fe in de?a(de,Fe,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[Fe]=he,ae=(de,Fe)=>{for(var he in Fe||(Fe={}))b.call(Fe,he)&&te(de,he,Fe[he]);if(y)for(var he of y(Fe))z.call(Fe,he)&&te(de,he,Fe[he]);return de},re=(de,Fe)=>E(de,x(Fe)),ie=(de,Fe)=>{var he={};for(var ze in de)b.call(de,ze)&&Fe.indexOf(ze)<0&&(he[ze]=de[ze]);if(de!=null&&y)for(var ze of y(de))Fe.indexOf(ze)<0&&z.call(de,ze)&&(he[ze]=de[ze]);return he},ce=({onFinish:de,value:Fe,streamingStatus:he,cancelIndex:ze,loadImage:dt,onDynamic:je,isHiddenHtml:ye})=>{const[Xe,et]=(0,ee.useState)(""),[rt,Ge]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ye,Je]=(0,ee.useState)(0),[at,nt]=(0,ee.useState)(!1),be=Ie=>Ie.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ue,$e)=>`<mathx data-text="${$e.trim()}">$$${$e.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ce=()=>{nt(!0),de==null||de()};(0,ee.useEffect)(()=>{const Ie=dt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Fe}`:Fe,Ue=be(Ie);if(!at)if(dt||!he||ze>0){et(Ue),Je(Ue.length),(!he||ze>0)&&!dt&&Ce();return}else if((Ue==null?void 0:Ue.length)<4)et(Ue),Je(Ue.length);else if(Ye<Ue.length){const $e=Ue.length-Ye,ue=setInterval(()=>{et(Ue.slice(0,Ye+2)),Je(tt=>tt+2)},$e>10?Math.max(500/($e/2),20):50);return()=>clearInterval(ue)}else he||Ce()},[Fe,he,ze,dt,Ye]);const Ze=(0,ee.useMemo)(()=>ee.createElement("section",{className:`${se.answer} fadeIn animated edu_md`},ee.createElement(Se.UG,{remarkPlugins:[Re.Z,Oe.Z],rehypePlugins:[we.Z,ve.Z],components:{code(Ie){var Ue=Ie,{node:$e,inline:ue,className:tt,children:yt}=Ue,St=ie(Ue,["node","inline","className","children"]);const Pt=/language-(\w+)/.exec(tt||""),en=String(yt).trim();return ue||!Pt?ee.createElement("code",ae({className:tt},St),yt):ee.createElement("code",{className:se.codeCopy,"data-text":`\`\`\`${Pt?Pt[1]:""}
${yt}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Ie({open:ue=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:ee,onDynamic:oe,onOpenChange:ie,showExtra:de=!0}){const ge=(0,z.useRef)(null),pe=(0,z.useRef)(null),[Qe,we]=(0,z.useState)(E||""),[Ke,Ge]=(0,z.useState)(E||""),[st,Qt]=(0,z.useState)(!!ue),[et,At]=(0,z.useState)(1),vt={selectOnLineNumbers:!0};(0,z.useEffect)(()=>{ue&&(we(E),Ge(E),Qt(!0))},[ue,E]),(0,z.useEffect)(()=>{Qe!==""&&(clearTimeout(pe.current),pe.current=setTimeout(()=>{const wt=document.createElement("iframe");if(wt.style.width="100%",wt.style.height="100%",wt.style.border="0",ge.current){ge.current.innerHTML="",ge.current.appendChild(wt);const tt=wt.contentDocument||wt.contentWindow.document;tt.open(),tt.write(Qe),tt.close()}},1e3))},[ue,Qe]);const Ct=wt=>{we(wt),a==null||a(wt,Ke)};return Ee.createElement(Le.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:st,width:"100%",height:b||"100vh",rootClassName:Fe.smartWrp,destroyOnClose:!0,onClose:()=>{Qt(!1),ie==null||ie(Qe)},extra:de&&Ee.createElement("div",null,Ee.createElement(xe.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:et,onChange:wt=>At(wt)}),Ee.createElement(ve.Z,{type:"primary",className:"ml20",onClick:()=>Oe(this,null,function*(){yield oe(Qe,()=>{Qt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Ee.createElement(Ce.Z,{className:"h100"},Ee.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:et===1?"block":"none"}},Ee.createElement("div",{className:"h100",ref:ge})),Ee.createElement(Pe.Z,{flex:"1",style:{display:et===2?"block":"none"}},Ee.createElement(Ue.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:vt,onChange:Ct}))))}var rt=Ie},10946:function(Re,lt,re){"use strict";re.d(lt,{Z:function(){return Qe}});var z=re(59301),Le=re(74439),Ce=re(77596),Pe=re(3977),Fe=re(14179),Ue=re(56102),xe={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},ve=re(6767),Ee=re(90083),Oe=re(95827),je=re(30084),Ie=re(10787),rt=re(8944),ue=re(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(we,Ke,Ge)=>Ke in we?a(we,Ke,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):we[Ke]=Ge,ie=(we,Ke)=>{for(var Ge in Ke||(Ke={}))b.call(Ke,Ge)&&oe(we,Ge,Ke[Ge]);if(y)for(var Ge of y(Ke))ee.call(Ke,Ge)&&oe(we,Ge,Ke[Ge]);return we},de=(we,Ke)=>E(we,x(Ke)),ge=(we,Ke)=>{var Ge={};for(var st in we)b.call(we,st)&&Ke.indexOf(st)<0&&(Ge[st]=we[st]);if(we!=null&&y)for(var st of y(we))Ke.indexOf(st)<0&&ee.call(we,st)&&(Ge[st]=we[st]);return Ge},Qe=({onFinish:we,value:Ke,streamingStatus:Ge,cancelIndex:st,loadImage:Qt,onDynamic:et,isHiddenHtml:At})=>{const[vt,Ct]=(0,z.useState)(""),[wt,tt]=(0,z.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[qe,ht]=(0,z.useState)(0),[Dt,zt]=(0,z.useState)(!1),_e=at=>at.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(dt,Ot)=>`<mathx data-text="${Ot.trim()}">$$${Ot.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),$e=()=>{zt(!0),we==null||we()};(0,z.useEffect)(()=>{const at=Qt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Ie({open:ue=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:ee,onDynamic:oe,onOpenChange:ie,showExtra:de=!0}){const ge=(0,z.useRef)(null),pe=(0,z.useRef)(null),[Qe,we]=(0,z.useState)(E||""),[Ke,Ge]=(0,z.useState)(E||""),[st,Qt]=(0,z.useState)(!!ue),[et,At]=(0,z.useState)(1),vt={selectOnLineNumbers:!0};(0,z.useEffect)(()=>{ue&&(we(E),Ge(E),Qt(!0))},[ue,E]),(0,z.useEffect)(()=>{Qe!==""&&(clearTimeout(pe.current),pe.current=setTimeout(()=>{const wt=document.createElement("iframe");if(wt.style.width="100%",wt.style.height="100%",wt.style.border="0",ge.current){ge.current.innerHTML="",ge.current.appendChild(wt);const tt=wt.contentDocument||wt.contentWindow.document;tt.open(),tt.write(Qe),tt.close()}},1e3))},[ue,Qe]);const Ct=wt=>{we(wt),a==null||a(wt,Ke)};return Ee.createElement(Le.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:st,width:"100%",height:b||"100vh",rootClassName:Fe.smartWrp,destroyOnClose:!0,onClose:()=>{Qt(!1),ie==null||ie(Qe)},extra:de&&Ee.createElement("div",null,Ee.createElement(xe.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:et,onChange:wt=>At(wt)}),Ee.createElement(ve.Z,{type:"primary",className:"ml20",onClick:()=>Oe(this,null,function*(){yield oe(Qe,()=>{Qt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Ee.createElement(Ce.Z,{className:"h100"},Ee.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:et===1?"block":"none"}},Ee.createElement("div",{className:"h100",ref:ge})),Ee.createElement(Pe.Z,{flex:"1",style:{display:et===2?"block":"none"}},Ee.createElement(Ue.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:vt,onChange:Ct}))))}var rt=Ie},10946:function(Re,lt,re){"use strict";re.d(lt,{Z:function(){return Qe}});var z=re(59301),Le=re(72460),Ce=re(77596),Pe=re(3977),Fe=re(14179),Ue=re(56102),xe={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},ve=re(6767),Ee=re(90083),Oe=re(95827),je=re(30084),Ie=re(10787),rt=re(8944),ue=re(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(we,Ke,Ge)=>Ke in we?a(we,Ke,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):we[Ke]=Ge,ie=(we,Ke)=>{for(var Ge in Ke||(Ke={}))b.call(Ke,Ge)&&oe(we,Ge,Ke[Ge]);if(y)for(var Ge of y(Ke))ee.call(Ke,Ge)&&oe(we,Ge,Ke[Ge]);return we},de=(we,Ke)=>E(we,x(Ke)),ge=(we,Ke)=>{var Ge={};for(var st in we)b.call(we,st)&&Ke.indexOf(st)<0&&(Ge[st]=we[st]);if(we!=null&&y)for(var st of y(we))Ke.indexOf(st)<0&&ee.call(we,st)&&(Ge[st]=we[st]);return Ge},Qe=({onFinish:we,value:Ke,streamingStatus:Ge,cancelIndex:st,loadImage:Qt,onDynamic:et,isHiddenHtml:At})=>{const[vt,Ct]=(0,z.useState)(""),[wt,tt]=(0,z.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[qe,ht]=(0,z.useState)(0),[Dt,zt]=(0,z.useState)(!1),_e=at=>at.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(dt,Ot)=>`<mathx data-text="${Ot.trim()}">$$${Ot.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),$e=()=>{zt(!0),we==null||we()};(0,z.useEffect)(()=>{const at=Qt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Ke}`:Ke,dt=_e(at);if(!Dt)if(Qt||!Ge||st>0){Ct(dt),ht(dt.length),(!Ge||st>0)&&!Qt&&$e();return}else if((dt==null?void 0:dt.length)<4)Ct(dt),ht(dt.length);else if(qe<dt.length){const Ot=dt.length-qe,ye=setInterval(()=>{Ct(dt.slice(0,qe+2)),ht(Pt=>Pt+2)},Ot>10?Math.max(500/(Ot/2),20):50);return()=>clearInterval(ye)}else Ge||$e()},[Ke,Ge,st,Qt,qe]);const ct=(0,z.useMemo)(()=>z.createElement("section",{className:`${xe.answer} fadeIn animated edu_md`},z.createElement(Le.UG,{remarkPlugins:[je.Z,Ie.Z],rehypePlugins:[Oe.Z,Pe.Z],components:{code(at){var dt=at,{node:Ot,inline:ye,className:Pt,children:Yt}=dt,aA=ge(dt,["node","inline","className","children"]);const We=/language-(\w+)/.exec(Pt||""),Be=String(Yt).trim();return ye||!We?z.createElement("code",ie({className:Pt},aA),Yt):z.createElement("code",{className:xe.codeCopy,"data-text":`\`\`\`${We?We[1]:""}
${Yt}

@ -143,7 +143,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function ze({open:oe=!0,onChange:E,defaultValue:y,placement:x,width:b,height:z,extra:ee,onDynamic:ne,onOpenChange:re,showExtra:ie=!0}){const ce=(0,a.useRef)(null),Fe=(0,a.useRef)(null),[Ze,Le]=(0,a.useState)(y||""),[st,rt]=(0,a.useState)(y||""),[Ie,Rt]=(0,a.useState)(!!oe),[nt,ct]=(0,a.useState)(1),Qt={selectOnLineNumbers:!0};(0,a.useEffect)(()=>{oe&&(Le(y),rt(y),Rt(!0))},[oe,y]),(0,a.useEffect)(()=>{Ze!==""&&(clearTimeout(Fe.current),Fe.current=setTimeout(()=>{const Tt=document.createElement("iframe");if(Tt.style.width="100%",Tt.style.height="100%",Tt.style.border="0",ce.current){ce.current.innerHTML="",ce.current.appendChild(Tt);const vt=Tt.contentDocument||Tt.contentWindow.document;vt.open(),vt.write(Ze),vt.close()}},1e3))},[oe,Ze]);const ht=Tt=>{Le(Tt),E==null||E(Tt,st)};return Be.createElement(ve.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ie,width:"100%",height:z||"100vh",rootClassName:we.smartWrp,destroyOnClose:!0,onClose:()=>{Rt(!1),re==null||re(Ze)},extra:ie&&Be.createElement("div",null,Be.createElement(De.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:nt,onChange:Tt=>ct(Tt)}),Be.createElement(We.Z,{type:"primary",className:"ml20",onClick:()=>le(this,null,function*(){yield ne(Ze,()=>{Rt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Be.createElement(Ae.Z,{className:"h100"},Be.createElement(pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:nt===1?"block":"none"}},Be.createElement("div",{className:"h100",ref:ce})),Be.createElement(pe.Z,{flex:"1",style:{display:nt===2?"block":"none"}},Be.createElement(Se.ZP,{height:"90vh",value:y,language:"html",theme:"vs",showMiniMap:!1,options:Qt,onChange:ht}))))}var xt=ze},10946:function(Re,ut,te){"use strict";te.d(ut,{Z:function(){return Ze}});var a=te(59301),ve=te(74439),Ae=te(77596),pe=te(3977),we=te(14179),Se=te(56102),De={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},We=te(6767),Be=te(90083),le=te(95827),Qe=te(30084),ze=te(10787),xt=te(8944),oe=te(81679),E=Object.defineProperty,y=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(Le,st,rt)=>st in Le?E(Le,st,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Le[st]=rt,re=(Le,st)=>{for(var rt in st||(st={}))z.call(st,rt)&&ne(Le,rt,st[rt]);if(b)for(var rt of b(st))ee.call(st,rt)&&ne(Le,rt,st[rt]);return Le},ie=(Le,st)=>y(Le,x(st)),ce=(Le,st)=>{var rt={};for(var Ie in Le)z.call(Le,Ie)&&st.indexOf(Ie)<0&&(rt[Ie]=Le[Ie]);if(Le!=null&&b)for(var Ie of b(Le))st.indexOf(Ie)<0&&ee.call(Le,Ie)&&(rt[Ie]=Le[Ie]);return rt},Ze=({onFinish:Le,value:st,streamingStatus:rt,cancelIndex:Ie,loadImage:Rt,onDynamic:nt,isHiddenHtml:ct})=>{const[Qt,ht]=(0,a.useState)(""),[Tt,vt]=(0,a.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[$e,zt]=(0,a.useState)(0),[It,bt]=(0,a.useState)(!1),Xe=dt=>dt.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(pt,Ht)=>`<mathx data-text="${Ht.trim()}">$$${Ht.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Oe=()=>{bt(!0),Le==null||Le()};(0,a.useEffect)(()=>{const dt=Rt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function ze({open:oe=!0,onChange:E,defaultValue:y,placement:x,width:b,height:z,extra:ee,onDynamic:ne,onOpenChange:re,showExtra:ie=!0}){const ce=(0,a.useRef)(null),Fe=(0,a.useRef)(null),[Ze,Le]=(0,a.useState)(y||""),[st,rt]=(0,a.useState)(y||""),[Ie,Rt]=(0,a.useState)(!!oe),[nt,ct]=(0,a.useState)(1),Qt={selectOnLineNumbers:!0};(0,a.useEffect)(()=>{oe&&(Le(y),rt(y),Rt(!0))},[oe,y]),(0,a.useEffect)(()=>{Ze!==""&&(clearTimeout(Fe.current),Fe.current=setTimeout(()=>{const Tt=document.createElement("iframe");if(Tt.style.width="100%",Tt.style.height="100%",Tt.style.border="0",ce.current){ce.current.innerHTML="",ce.current.appendChild(Tt);const vt=Tt.contentDocument||Tt.contentWindow.document;vt.open(),vt.write(Ze),vt.close()}},1e3))},[oe,Ze]);const ht=Tt=>{Le(Tt),E==null||E(Tt,st)};return Be.createElement(ve.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ie,width:"100%",height:z||"100vh",rootClassName:we.smartWrp,destroyOnClose:!0,onClose:()=>{Rt(!1),re==null||re(Ze)},extra:ie&&Be.createElement("div",null,Be.createElement(De.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:nt,onChange:Tt=>ct(Tt)}),Be.createElement(We.Z,{type:"primary",className:"ml20",onClick:()=>le(this,null,function*(){yield ne(Ze,()=>{Rt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Be.createElement(Ae.Z,{className:"h100"},Be.createElement(pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:nt===1?"block":"none"}},Be.createElement("div",{className:"h100",ref:ce})),Be.createElement(pe.Z,{flex:"1",style:{display:nt===2?"block":"none"}},Be.createElement(Se.ZP,{height:"90vh",value:y,language:"html",theme:"vs",showMiniMap:!1,options:Qt,onChange:ht}))))}var xt=ze},10946:function(Re,ut,te){"use strict";te.d(ut,{Z:function(){return Ze}});var a=te(59301),ve=te(72460),Ae=te(77596),pe=te(3977),we=te(14179),Se=te(56102),De={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},We=te(6767),Be=te(90083),le=te(95827),Qe=te(30084),ze=te(10787),xt=te(8944),oe=te(81679),E=Object.defineProperty,y=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(Le,st,rt)=>st in Le?E(Le,st,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Le[st]=rt,re=(Le,st)=>{for(var rt in st||(st={}))z.call(st,rt)&&ne(Le,rt,st[rt]);if(b)for(var rt of b(st))ee.call(st,rt)&&ne(Le,rt,st[rt]);return Le},ie=(Le,st)=>y(Le,x(st)),ce=(Le,st)=>{var rt={};for(var Ie in Le)z.call(Le,Ie)&&st.indexOf(Ie)<0&&(rt[Ie]=Le[Ie]);if(Le!=null&&b)for(var Ie of b(Le))st.indexOf(Ie)<0&&ee.call(Le,Ie)&&(rt[Ie]=Le[Ie]);return rt},Ze=({onFinish:Le,value:st,streamingStatus:rt,cancelIndex:Ie,loadImage:Rt,onDynamic:nt,isHiddenHtml:ct})=>{const[Qt,ht]=(0,a.useState)(""),[Tt,vt]=(0,a.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[$e,zt]=(0,a.useState)(0),[It,bt]=(0,a.useState)(!1),Xe=dt=>dt.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(pt,Ht)=>`<mathx data-text="${Ht.trim()}">$$${Ht.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Oe=()=>{bt(!0),Le==null||Le()};(0,a.useEffect)(()=>{const dt=Rt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${st}`:st,pt=Xe(dt);if(!It)if(Rt||!rt||Ie>0){ht(pt),zt(pt.length),(!rt||Ie>0)&&!Rt&&Oe();return}else if((pt==null?void 0:pt.length)<4)ht(pt),zt(pt.length);else if($e<pt.length){const Ht=pt.length-$e,Ne=setInterval(()=>{ht(pt.slice(0,$e+2)),zt(Lt=>Lt+2)},Ht>10?Math.max(500/(Ht/2),20):50);return()=>clearInterval(Ne)}else rt||Oe()},[st,rt,Ie,Rt,$e]);const at=(0,a.useMemo)(()=>a.createElement("section",{className:`${De.answer} fadeIn animated edu_md`},a.createElement(ve.UG,{remarkPlugins:[Qe.Z,ze.Z],rehypePlugins:[le.Z,pe.Z],components:{code(dt){var pt=dt,{node:Ht,inline:Ne,className:Lt,children:tn}=pt,en=ce(pt,["node","inline","className","children"]);const mn=/language-(\w+)/.exec(Lt||""),Tn=String(tn).trim();return Ne||!mn?a.createElement("code",re({className:Lt},en),tn):a.createElement("code",{className:De.codeCopy,"data-text":`\`\`\`${mn?mn[1]:""}
${tn}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Ce({open:oe=!0,onChange:a,defaultValue:E,placement:b,width:y,height:x,extra:z,onDynamic:te,onOpenChange:ae,showExtra:ie=!0}){const re=(0,ee.useRef)(null),le=(0,ee.useRef)(null),[de,ue]=(0,ee.useState)(E||""),[Ee,Se]=(0,ee.useState)(E||""),[Te,rt]=(0,ee.useState)(!!oe),[Ie,He]=(0,ee.useState)(1),Ye={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(ue(E),Se(E),rt(!0))},[oe,E]),(0,ee.useEffect)(()=>{de!==""&&(clearTimeout(le.current),le.current=setTimeout(()=>{const Je=document.createElement("iframe");if(Je.style.width="100%",Je.style.height="100%",Je.style.border="0",re.current){re.current.innerHTML="",re.current.appendChild(Je);const Me=Je.contentDocument||Je.contentWindow.document;Me.open(),Me.write(de),Me.close()}},1e3))},[oe,de]);const Ke=Je=>{ue(Je),a==null||a(Je,Ee)};return se.createElement(ye.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Te,width:"100%",height:x||"100vh",rootClassName:fe.smartWrp,destroyOnClose:!0,onClose:()=>{rt(!1),ae==null||ae(de)},extra:ie&&se.createElement("div",null,se.createElement(ce.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ie,onChange:Je=>He(Je)}),se.createElement(we.Z,{type:"primary",className:"ml20",onClick:()=>Ae(this,null,function*(){yield te(de,()=>{rt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},se.createElement(xe.Z,{className:"h100"},se.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ie===1?"block":"none"}},se.createElement("div",{className:"h100",ref:re})),se.createElement(Pe.Z,{flex:"1",style:{display:Ie===2?"block":"none"}},se.createElement(ve.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Ye,onChange:Ke}))))}var Qe=Ce},10946:function(he,Re,ne){"use strict";ne.d(Re,{Z:function(){return de}});var ee=ne(59301),ye=ne(74439),xe=ne(77596),Pe=ne(3977),fe=ne(14179),ve=ne(56102),ce={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},we=ne(6767),se=ne(90083),Ae=ne(95827),Oe=ne(30084),Ce=ne(10787),Qe=ne(8944),oe=ne(81679),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ue,Ee,Se)=>Ee in ue?a(ue,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Se}):ue[Ee]=Se,ae=(ue,Ee)=>{for(var Se in Ee||(Ee={}))x.call(Ee,Se)&&te(ue,Se,Ee[Se]);if(y)for(var Se of y(Ee))z.call(Ee,Se)&&te(ue,Se,Ee[Se]);return ue},ie=(ue,Ee)=>E(ue,b(Ee)),re=(ue,Ee)=>{var Se={};for(var Te in ue)x.call(ue,Te)&&Ee.indexOf(Te)<0&&(Se[Te]=ue[Te]);if(ue!=null&&y)for(var Te of y(ue))Ee.indexOf(Te)<0&&z.call(ue,Te)&&(Se[Te]=ue[Te]);return Se},de=({onFinish:ue,value:Ee,streamingStatus:Se,cancelIndex:Te,loadImage:rt,onDynamic:Ie,isHiddenHtml:He})=>{const[Ye,Ke]=(0,ee.useState)(""),[Je,Me]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[ze,_e]=(0,ee.useState)(0),[it,gt]=(0,ee.useState)(!1),Le=We=>We.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ge,at)=>`<mathx data-text="${at.trim()}">$$${at.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Fe=()=>{gt(!0),ue==null||ue()};(0,ee.useEffect)(()=>{const We=rt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Ce({open:oe=!0,onChange:a,defaultValue:E,placement:b,width:y,height:x,extra:z,onDynamic:te,onOpenChange:ae,showExtra:ie=!0}){const re=(0,ee.useRef)(null),le=(0,ee.useRef)(null),[de,ue]=(0,ee.useState)(E||""),[Ee,Se]=(0,ee.useState)(E||""),[Te,rt]=(0,ee.useState)(!!oe),[Ie,He]=(0,ee.useState)(1),Ye={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(ue(E),Se(E),rt(!0))},[oe,E]),(0,ee.useEffect)(()=>{de!==""&&(clearTimeout(le.current),le.current=setTimeout(()=>{const Je=document.createElement("iframe");if(Je.style.width="100%",Je.style.height="100%",Je.style.border="0",re.current){re.current.innerHTML="",re.current.appendChild(Je);const Me=Je.contentDocument||Je.contentWindow.document;Me.open(),Me.write(de),Me.close()}},1e3))},[oe,de]);const Ke=Je=>{ue(Je),a==null||a(Je,Ee)};return se.createElement(ye.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Te,width:"100%",height:x||"100vh",rootClassName:fe.smartWrp,destroyOnClose:!0,onClose:()=>{rt(!1),ae==null||ae(de)},extra:ie&&se.createElement("div",null,se.createElement(ce.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ie,onChange:Je=>He(Je)}),se.createElement(we.Z,{type:"primary",className:"ml20",onClick:()=>Ae(this,null,function*(){yield te(de,()=>{rt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},se.createElement(xe.Z,{className:"h100"},se.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ie===1?"block":"none"}},se.createElement("div",{className:"h100",ref:re})),se.createElement(Pe.Z,{flex:"1",style:{display:Ie===2?"block":"none"}},se.createElement(ve.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Ye,onChange:Ke}))))}var Qe=Ce},10946:function(he,Re,ne){"use strict";ne.d(Re,{Z:function(){return de}});var ee=ne(59301),ye=ne(72460),xe=ne(77596),Pe=ne(3977),fe=ne(14179),ve=ne(56102),ce={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},we=ne(6767),se=ne(90083),Ae=ne(95827),Oe=ne(30084),Ce=ne(10787),Qe=ne(8944),oe=ne(81679),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ue,Ee,Se)=>Ee in ue?a(ue,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Se}):ue[Ee]=Se,ae=(ue,Ee)=>{for(var Se in Ee||(Ee={}))x.call(Ee,Se)&&te(ue,Se,Ee[Se]);if(y)for(var Se of y(Ee))z.call(Ee,Se)&&te(ue,Se,Ee[Se]);return ue},ie=(ue,Ee)=>E(ue,b(Ee)),re=(ue,Ee)=>{var Se={};for(var Te in ue)x.call(ue,Te)&&Ee.indexOf(Te)<0&&(Se[Te]=ue[Te]);if(ue!=null&&y)for(var Te of y(ue))Ee.indexOf(Te)<0&&z.call(ue,Te)&&(Se[Te]=ue[Te]);return Se},de=({onFinish:ue,value:Ee,streamingStatus:Se,cancelIndex:Te,loadImage:rt,onDynamic:Ie,isHiddenHtml:He})=>{const[Ye,Ke]=(0,ee.useState)(""),[Je,Me]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[ze,_e]=(0,ee.useState)(0),[it,gt]=(0,ee.useState)(!1),Le=We=>We.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ge,at)=>`<mathx data-text="${at.trim()}">$$${at.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Fe=()=>{gt(!0),ue==null||ue()};(0,ee.useEffect)(()=>{const We=rt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Ee}`:Ee,Ge=Le(We);if(!it)if(rt||!Se||Te>0){Ke(Ge),_e(Ge.length),(!Se||Te>0)&&!rt&&Fe();return}else if((Ge==null?void 0:Ge.length)<4)Ke(Ge),_e(Ge.length);else if(ze<Ge.length){const at=Ge.length-ze,ge=setInterval(()=>{Ke(Ge.slice(0,ze+2)),_e(qe=>qe+2)},at>10?Math.max(500/(at/2),20):50);return()=>clearInterval(ge)}else Se||Fe()},[Ee,Se,Te,rt,ze]);const Ue=(0,ee.useMemo)(()=>ee.createElement("section",{className:`${ce.answer} fadeIn animated edu_md`},ee.createElement(ye.UG,{remarkPlugins:[Oe.Z,Ce.Z],rehypePlugins:[Ae.Z,Pe.Z],components:{code(We){var Ge=We,{node:at,inline:ge,className:qe,children:vt}=Ge,At=re(Ge,["node","inline","className","children"]);const st=/language-(\w+)/.exec(qe||""),_t=String(vt).trim();return ge||!st?ee.createElement("code",ae({className:qe},At),vt):ee.createElement("code",{className:ce.codeCopy,"data-text":`\`\`\`${st?st[1]:""}
${vt}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Ce({open:oe=!0,onChange:a,defaultValue:E,placement:b,width:y,height:x,extra:z,onDynamic:te,onOpenChange:ae,showExtra:ie=!0}){const re=(0,ee.useRef)(null),le=(0,ee.useRef)(null),[ce,ge]=(0,ee.useState)(E||""),[Ee,ve]=(0,ee.useState)(E||""),[Ie,rt]=(0,ee.useState)(!!oe),[Te,Ve]=(0,ee.useState)(1),Ye={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(ge(E),ve(E),rt(!0))},[oe,E]),(0,ee.useEffect)(()=>{ce!==""&&(clearTimeout(le.current),le.current=setTimeout(()=>{const Je=document.createElement("iframe");if(Je.style.width="100%",Je.style.height="100%",Je.style.border="0",re.current){re.current.innerHTML="",re.current.appendChild(Je);const Me=Je.contentDocument||Je.contentWindow.document;Me.open(),Me.write(ce),Me.close()}},1e3))},[oe,ce]);const Ke=Je=>{ge(Je),a==null||a(Je,Ee)};return se.createElement(ye.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ie,width:"100%",height:x||"100vh",rootClassName:pe.smartWrp,destroyOnClose:!0,onClose:()=>{rt(!1),ae==null||ae(ce)},extra:ie&&se.createElement("div",null,se.createElement(de.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Te,onChange:Je=>Ve(Je)}),se.createElement(we.Z,{type:"primary",className:"ml20",onClick:()=>Ae(this,null,function*(){yield te(ce,()=>{rt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},se.createElement(xe.Z,{className:"h100"},se.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Te===1?"block":"none"}},se.createElement("div",{className:"h100",ref:re})),se.createElement(Pe.Z,{flex:"1",style:{display:Te===2?"block":"none"}},se.createElement(Se.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Ye,onChange:Ke}))))}var Qe=Ce},10946:function(he,Ze,ne){"use strict";ne.d(Ze,{Z:function(){return ce}});var ee=ne(59301),ye=ne(74439),xe=ne(77596),Pe=ne(3977),pe=ne(14179),Se=ne(56102),de={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},we=ne(6767),se=ne(90083),Ae=ne(95827),Oe=ne(30084),Ce=ne(10787),Qe=ne(8944),oe=ne(81679),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ge,Ee,ve)=>Ee in ge?a(ge,Ee,{enumerable:!0,configurable:!0,writable:!0,value:ve}):ge[Ee]=ve,ae=(ge,Ee)=>{for(var ve in Ee||(Ee={}))x.call(Ee,ve)&&te(ge,ve,Ee[ve]);if(y)for(var ve of y(Ee))z.call(Ee,ve)&&te(ge,ve,Ee[ve]);return ge},ie=(ge,Ee)=>E(ge,b(Ee)),re=(ge,Ee)=>{var ve={};for(var Ie in ge)x.call(ge,Ie)&&Ee.indexOf(Ie)<0&&(ve[Ie]=ge[Ie]);if(ge!=null&&y)for(var Ie of y(ge))Ee.indexOf(Ie)<0&&z.call(ge,Ie)&&(ve[Ie]=ge[Ie]);return ve},ce=({onFinish:ge,value:Ee,streamingStatus:ve,cancelIndex:Ie,loadImage:rt,onDynamic:Te,isHiddenHtml:Ve})=>{const[Ye,Ke]=(0,ee.useState)(""),[Je,Me]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[je,qe]=(0,ee.useState)(0),[it,ut]=(0,ee.useState)(!1),be=He=>He.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ge,ot)=>`<mathx data-text="${ot.trim()}">$$${ot.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Fe=()=>{ut(!0),ge==null||ge()};(0,ee.useEffect)(()=>{const He=rt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Ce({open:oe=!0,onChange:a,defaultValue:E,placement:b,width:y,height:x,extra:z,onDynamic:te,onOpenChange:ae,showExtra:ie=!0}){const re=(0,ee.useRef)(null),le=(0,ee.useRef)(null),[ce,ge]=(0,ee.useState)(E||""),[Ee,ve]=(0,ee.useState)(E||""),[Ie,rt]=(0,ee.useState)(!!oe),[Te,Ve]=(0,ee.useState)(1),Ye={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(ge(E),ve(E),rt(!0))},[oe,E]),(0,ee.useEffect)(()=>{ce!==""&&(clearTimeout(le.current),le.current=setTimeout(()=>{const Je=document.createElement("iframe");if(Je.style.width="100%",Je.style.height="100%",Je.style.border="0",re.current){re.current.innerHTML="",re.current.appendChild(Je);const Me=Je.contentDocument||Je.contentWindow.document;Me.open(),Me.write(ce),Me.close()}},1e3))},[oe,ce]);const Ke=Je=>{ge(Je),a==null||a(Je,Ee)};return se.createElement(ye.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ie,width:"100%",height:x||"100vh",rootClassName:pe.smartWrp,destroyOnClose:!0,onClose:()=>{rt(!1),ae==null||ae(ce)},extra:ie&&se.createElement("div",null,se.createElement(de.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Te,onChange:Je=>Ve(Je)}),se.createElement(we.Z,{type:"primary",className:"ml20",onClick:()=>Ae(this,null,function*(){yield te(ce,()=>{rt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},se.createElement(xe.Z,{className:"h100"},se.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Te===1?"block":"none"}},se.createElement("div",{className:"h100",ref:re})),se.createElement(Pe.Z,{flex:"1",style:{display:Te===2?"block":"none"}},se.createElement(Se.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Ye,onChange:Ke}))))}var Qe=Ce},10946:function(he,Ze,ne){"use strict";ne.d(Ze,{Z:function(){return ce}});var ee=ne(59301),ye=ne(72460),xe=ne(77596),Pe=ne(3977),pe=ne(14179),Se=ne(56102),de={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},we=ne(6767),se=ne(90083),Ae=ne(95827),Oe=ne(30084),Ce=ne(10787),Qe=ne(8944),oe=ne(81679),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ge,Ee,ve)=>Ee in ge?a(ge,Ee,{enumerable:!0,configurable:!0,writable:!0,value:ve}):ge[Ee]=ve,ae=(ge,Ee)=>{for(var ve in Ee||(Ee={}))x.call(Ee,ve)&&te(ge,ve,Ee[ve]);if(y)for(var ve of y(Ee))z.call(Ee,ve)&&te(ge,ve,Ee[ve]);return ge},ie=(ge,Ee)=>E(ge,b(Ee)),re=(ge,Ee)=>{var ve={};for(var Ie in ge)x.call(ge,Ie)&&Ee.indexOf(Ie)<0&&(ve[Ie]=ge[Ie]);if(ge!=null&&y)for(var Ie of y(ge))Ee.indexOf(Ie)<0&&z.call(ge,Ie)&&(ve[Ie]=ge[Ie]);return ve},ce=({onFinish:ge,value:Ee,streamingStatus:ve,cancelIndex:Ie,loadImage:rt,onDynamic:Te,isHiddenHtml:Ve})=>{const[Ye,Ke]=(0,ee.useState)(""),[Je,Me]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[je,qe]=(0,ee.useState)(0),[it,ut]=(0,ee.useState)(!1),be=He=>He.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ge,ot)=>`<mathx data-text="${ot.trim()}">$$${ot.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Fe=()=>{ut(!0),ge==null||ge()};(0,ee.useEffect)(()=>{const He=rt?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Ee}`:Ee,Ge=be(He);if(!it)if(rt||!ve||Ie>0){Ke(Ge),qe(Ge.length),(!ve||Ie>0)&&!rt&&Fe();return}else if((Ge==null?void 0:Ge.length)<4)Ke(Ge),qe(Ge.length);else if(je<Ge.length){const ot=Ge.length-je,ue=setInterval(()=>{Ke(Ge.slice(0,je+2)),qe(_e=>_e+2)},ot>10?Math.max(500/(ot/2),20):50);return()=>clearInterval(ue)}else ve||Fe()},[Ee,ve,Ie,rt,je]);const Re=(0,ee.useMemo)(()=>ee.createElement("section",{className:`${de.answer} fadeIn animated edu_md`},ee.createElement(ye.UG,{remarkPlugins:[Oe.Z,Ce.Z],rehypePlugins:[Ae.Z,Pe.Z],components:{code(He){var Ge=He,{node:ot,inline:ue,className:_e,children:vt}=Ge,At=re(Ge,["node","inline","className","children"]);const st=/language-(\w+)/.exec(_e||""),_t=String(vt).trim();return ue||!st?ee.createElement("code",ae({className:_e},At),vt):ee.createElement("code",{className:de.codeCopy,"data-text":`\`\`\`${st?st[1]:""}
${vt}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function fe({open:re=!0,onChange:a,defaultValue:E,placement:x,width:b,height:z,extra:ee,onDynamic:ne,onOpenChange:ae,showExtra:oe=!0}){const le=(0,y.useRef)(null),ce=(0,y.useRef)(null),[ve,de]=(0,y.useState)(E||""),[Be,he]=(0,y.useState)(E||""),[pe,st]=(0,y.useState)(!!re),[Ze,Te]=(0,y.useState)(1),ot={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{re&&(de(E),he(E),st(!0))},[re,E]),(0,y.useEffect)(()=>{ve!==""&&(clearTimeout(ce.current),ce.current=setTimeout(()=>{const et=document.createElement("iframe");if(et.style.width="100%",et.style.height="100%",et.style.border="0",le.current){le.current.innerHTML="",le.current.appendChild(et);const De=et.contentDocument||et.contentWindow.document;De.open(),De.write(ve),De.close()}},1e3))},[re,ve]);const Ge=et=>{de(et),a==null||a(et,Be)};return ge.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:pe,width:"100%",height:z||"100vh",rootClassName:Pe.smartWrp,destroyOnClose:!0,onClose:()=>{st(!1),ae==null||ae(ve)},extra:oe&&ge.createElement("div",null,ge.createElement(Ae.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ze,onChange:et=>Te(et)}),ge.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>ie(this,null,function*(){yield ne(ve,()=>{st(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Ce.Z,{className:"h100"},ge.createElement(me.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ze===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:le})),ge.createElement(me.Z,{flex:"1",style:{display:Ze===2?"block":"none"}},ge.createElement(ye.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:ot,onChange:Ge}))))}var Ve=fe},10946:function(ze,at,te){"use strict";te.d(at,{Z:function(){return ve}});var y=te(59301),ue=te(74439),Ce=te(77596),me=te(3977),Pe=te(14179),ye=te(56102),Ae={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=te(6767),ge=te(90083),ie=te(95827),Se=te(30084),fe=te(10787),Ve=te(8944),re=te(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(de,Be,he)=>Be in de?a(de,Be,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[Be]=he,ae=(de,Be)=>{for(var he in Be||(Be={}))z.call(Be,he)&&ne(de,he,Be[he]);if(b)for(var he of b(Be))ee.call(Be,he)&&ne(de,he,Be[he]);return de},oe=(de,Be)=>E(de,x(Be)),le=(de,Be)=>{var he={};for(var pe in de)z.call(de,pe)&&Be.indexOf(pe)<0&&(he[pe]=de[pe]);if(de!=null&&b)for(var pe of b(de))Be.indexOf(pe)<0&&ee.call(de,pe)&&(he[pe]=de[pe]);return he},ve=({onFinish:de,value:Be,streamingStatus:he,cancelIndex:pe,loadImage:st,onDynamic:Ze,isHiddenHtml:Te})=>{const[ot,Ge]=(0,y.useState)(""),[et,De]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Re,rt]=(0,y.useState)(0),[qe,lt]=(0,y.useState)(!1),xe=we=>we.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(He,mt)=>`<mathx data-text="${mt.trim()}">$$${mt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ee=()=>{lt(!0),de==null||de()};(0,y.useEffect)(()=>{const we=st?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function fe({open:re=!0,onChange:a,defaultValue:E,placement:x,width:b,height:z,extra:ee,onDynamic:ne,onOpenChange:ae,showExtra:oe=!0}){const le=(0,y.useRef)(null),ce=(0,y.useRef)(null),[ve,de]=(0,y.useState)(E||""),[Be,he]=(0,y.useState)(E||""),[pe,st]=(0,y.useState)(!!re),[Ze,Te]=(0,y.useState)(1),ot={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{re&&(de(E),he(E),st(!0))},[re,E]),(0,y.useEffect)(()=>{ve!==""&&(clearTimeout(ce.current),ce.current=setTimeout(()=>{const et=document.createElement("iframe");if(et.style.width="100%",et.style.height="100%",et.style.border="0",le.current){le.current.innerHTML="",le.current.appendChild(et);const De=et.contentDocument||et.contentWindow.document;De.open(),De.write(ve),De.close()}},1e3))},[re,ve]);const Ge=et=>{de(et),a==null||a(et,Be)};return ge.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:pe,width:"100%",height:z||"100vh",rootClassName:Pe.smartWrp,destroyOnClose:!0,onClose:()=>{st(!1),ae==null||ae(ve)},extra:oe&&ge.createElement("div",null,ge.createElement(Ae.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ze,onChange:et=>Te(et)}),ge.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>ie(this,null,function*(){yield ne(ve,()=>{st(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Ce.Z,{className:"h100"},ge.createElement(me.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ze===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:le})),ge.createElement(me.Z,{flex:"1",style:{display:Ze===2?"block":"none"}},ge.createElement(ye.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:ot,onChange:Ge}))))}var Ve=fe},10946:function(ze,at,te){"use strict";te.d(at,{Z:function(){return ve}});var y=te(59301),ue=te(72460),Ce=te(77596),me=te(3977),Pe=te(14179),ye=te(56102),Ae={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=te(6767),ge=te(90083),ie=te(95827),Se=te(30084),fe=te(10787),Ve=te(8944),re=te(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(de,Be,he)=>Be in de?a(de,Be,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[Be]=he,ae=(de,Be)=>{for(var he in Be||(Be={}))z.call(Be,he)&&ne(de,he,Be[he]);if(b)for(var he of b(Be))ee.call(Be,he)&&ne(de,he,Be[he]);return de},oe=(de,Be)=>E(de,x(Be)),le=(de,Be)=>{var he={};for(var pe in de)z.call(de,pe)&&Be.indexOf(pe)<0&&(he[pe]=de[pe]);if(de!=null&&b)for(var pe of b(de))Be.indexOf(pe)<0&&ee.call(de,pe)&&(he[pe]=de[pe]);return he},ve=({onFinish:de,value:Be,streamingStatus:he,cancelIndex:pe,loadImage:st,onDynamic:Ze,isHiddenHtml:Te})=>{const[ot,Ge]=(0,y.useState)(""),[et,De]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Re,rt]=(0,y.useState)(0),[qe,lt]=(0,y.useState)(!1),xe=we=>we.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(He,mt)=>`<mathx data-text="${mt.trim()}">$$${mt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ee=()=>{lt(!0),de==null||de()};(0,y.useEffect)(()=>{const we=st?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Be}`:Be,He=xe(we);if(!qe)if(st||!he||pe>0){Ge(He),rt(He.length),(!he||pe>0)&&!st&&Ee();return}else if((He==null?void 0:He.length)<4)Ge(He),rt(He.length);else if(Re<He.length){const mt=He.length-Re,Fe=setInterval(()=>{Ge(He.slice(0,Re+2)),rt(ut=>ut+2)},mt>10?Math.max(500/(mt/2),20):50);return()=>clearInterval(Fe)}else he||Ee()},[Be,he,pe,st,Re]);const We=(0,y.useMemo)(()=>y.createElement("section",{className:`${Ae.answer} fadeIn animated edu_md`},y.createElement(ue.UG,{remarkPlugins:[Se.Z,fe.Z],rehypePlugins:[ie.Z,me.Z],components:{code(we){var He=we,{node:mt,inline:Fe,className:ut,children:Ft}=He,Nt=le(He,["node","inline","className","children"]);const Oe=/language-(\w+)/.exec(ut||""),ht=String(Ft).trim();return Fe||!Oe?y.createElement("code",ae({className:ut},Nt),Ft):y.createElement("code",{className:Ae.codeCopy,"data-text":`\`\`\`${Oe?Oe[1]:""}
${Ft}

File diff suppressed because one or more lines are too long

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function fe({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:b,height:z,extra:ee,onDynamic:ne,onOpenChange:ae,showExtra:le=!0}){const re=(0,y.useRef)(null),ce=(0,y.useRef)(null),[ve,de]=(0,y.useState)(E||""),[Be,he]=(0,y.useState)(E||""),[pe,st]=(0,y.useState)(!!oe),[Ze,Te]=(0,y.useState)(1),rt={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{oe&&(de(E),he(E),st(!0))},[oe,E]),(0,y.useEffect)(()=>{ve!==""&&(clearTimeout(ce.current),ce.current=setTimeout(()=>{const _e=document.createElement("iframe");if(_e.style.width="100%",_e.style.height="100%",_e.style.border="0",re.current){re.current.innerHTML="",re.current.appendChild(_e);const De=_e.contentDocument||_e.contentWindow.document;De.open(),De.write(ve),De.close()}},1e3))},[oe,ve]);const Ge=_e=>{de(_e),a==null||a(_e,Be)};return ge.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:pe,width:"100%",height:z||"100vh",rootClassName:Ae.smartWrp,destroyOnClose:!0,onClose:()=>{st(!1),ae==null||ae(ve)},extra:le&&ge.createElement("div",null,ge.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ze,onChange:_e=>Te(_e)}),ge.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>ie(this,null,function*(){yield ne(ve,()=>{st(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Ce.Z,{className:"h100"},ge.createElement(me.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ze===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:re})),ge.createElement(me.Z,{flex:"1",style:{display:Ze===2?"block":"none"}},ge.createElement(Se.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:rt,onChange:Ge}))))}var We=fe},10946:function(ze,nt,te){"use strict";te.d(nt,{Z:function(){return ve}});var y=te(59301),ue=te(74439),Ce=te(77596),me=te(3977),Ae=te(14179),Se=te(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=te(6767),ge=te(90083),ie=te(95827),Pe=te(30084),fe=te(10787),We=te(8944),oe=te(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(de,Be,he)=>Be in de?a(de,Be,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[Be]=he,ae=(de,Be)=>{for(var he in Be||(Be={}))z.call(Be,he)&&ne(de,he,Be[he]);if(b)for(var he of b(Be))ee.call(Be,he)&&ne(de,he,Be[he]);return de},le=(de,Be)=>E(de,x(Be)),re=(de,Be)=>{var he={};for(var pe in de)z.call(de,pe)&&Be.indexOf(pe)<0&&(he[pe]=de[pe]);if(de!=null&&b)for(var pe of b(de))Be.indexOf(pe)<0&&ee.call(de,pe)&&(he[pe]=de[pe]);return he},ve=({onFinish:de,value:Be,streamingStatus:he,cancelIndex:pe,loadImage:st,onDynamic:Ze,isHiddenHtml:Te})=>{const[rt,Ge]=(0,y.useState)(""),[_e,De]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Re,tt]=(0,y.useState)(0),[at,ft]=(0,y.useState)(!1),Oe=we=>we.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Qe,At)=>`<mathx data-text="${At.trim()}">$$${At.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ye=()=>{ft(!0),de==null||de()};(0,y.useEffect)(()=>{const we=st?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function fe({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:b,height:z,extra:ee,onDynamic:ne,onOpenChange:ae,showExtra:le=!0}){const re=(0,y.useRef)(null),ce=(0,y.useRef)(null),[ve,de]=(0,y.useState)(E||""),[Be,he]=(0,y.useState)(E||""),[pe,st]=(0,y.useState)(!!oe),[Ze,Te]=(0,y.useState)(1),rt={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{oe&&(de(E),he(E),st(!0))},[oe,E]),(0,y.useEffect)(()=>{ve!==""&&(clearTimeout(ce.current),ce.current=setTimeout(()=>{const _e=document.createElement("iframe");if(_e.style.width="100%",_e.style.height="100%",_e.style.border="0",re.current){re.current.innerHTML="",re.current.appendChild(_e);const De=_e.contentDocument||_e.contentWindow.document;De.open(),De.write(ve),De.close()}},1e3))},[oe,ve]);const Ge=_e=>{de(_e),a==null||a(_e,Be)};return ge.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:pe,width:"100%",height:z||"100vh",rootClassName:Ae.smartWrp,destroyOnClose:!0,onClose:()=>{st(!1),ae==null||ae(ve)},extra:le&&ge.createElement("div",null,ge.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ze,onChange:_e=>Te(_e)}),ge.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>ie(this,null,function*(){yield ne(ve,()=>{st(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Ce.Z,{className:"h100"},ge.createElement(me.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ze===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:re})),ge.createElement(me.Z,{flex:"1",style:{display:Ze===2?"block":"none"}},ge.createElement(Se.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:rt,onChange:Ge}))))}var We=fe},10946:function(ze,nt,te){"use strict";te.d(nt,{Z:function(){return ve}});var y=te(59301),ue=te(72460),Ce=te(77596),me=te(3977),Ae=te(14179),Se=te(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=te(6767),ge=te(90083),ie=te(95827),Pe=te(30084),fe=te(10787),We=te(8944),oe=te(81679),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(de,Be,he)=>Be in de?a(de,Be,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[Be]=he,ae=(de,Be)=>{for(var he in Be||(Be={}))z.call(Be,he)&&ne(de,he,Be[he]);if(b)for(var he of b(Be))ee.call(Be,he)&&ne(de,he,Be[he]);return de},le=(de,Be)=>E(de,x(Be)),re=(de,Be)=>{var he={};for(var pe in de)z.call(de,pe)&&Be.indexOf(pe)<0&&(he[pe]=de[pe]);if(de!=null&&b)for(var pe of b(de))Be.indexOf(pe)<0&&ee.call(de,pe)&&(he[pe]=de[pe]);return he},ve=({onFinish:de,value:Be,streamingStatus:he,cancelIndex:pe,loadImage:st,onDynamic:Ze,isHiddenHtml:Te})=>{const[rt,Ge]=(0,y.useState)(""),[_e,De]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Re,tt]=(0,y.useState)(0),[at,ft]=(0,y.useState)(!1),Oe=we=>we.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Qe,At)=>`<mathx data-text="${At.trim()}">$$${At.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ye=()=>{ft(!0),de==null||de()};(0,y.useEffect)(()=>{const we=st?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Be}`:Be,Qe=Oe(we);if(!at)if(st||!he||pe>0){Ge(Qe),tt(Qe.length),(!he||pe>0)&&!st&&ye();return}else if((Qe==null?void 0:Qe.length)<4)Ge(Qe),tt(Qe.length);else if(Re<Qe.length){const At=Qe.length-Re,Fe=setInterval(()=>{Ge(Qe.slice(0,Re+2)),tt(lt=>lt+2)},At>10?Math.max(500/(At/2),20):50);return()=>clearInterval(Fe)}else he||ye()},[Be,he,pe,st,Re]);const Ve=(0,y.useMemo)(()=>y.createElement("section",{className:`${Ee.answer} fadeIn animated edu_md`},y.createElement(ue.UG,{remarkPlugins:[Pe.Z,fe.Z],rehypePlugins:[ie.Z,me.Z],components:{code(we){var Qe=we,{node:At,inline:Fe,className:lt,children:St}=Qe,Mt=re(Qe,["node","inline","className","children"]);const Ie=/language-(\w+)/.exec(lt||""),pt=String(St).trim();return Fe||!Ie?y.createElement("code",ae({className:lt},Mt),St):y.createElement("code",{className:Ee.codeCopy,"data-text":`\`\`\`${Ie?Ie[1]:""}
${St}

@ -139,7 +139,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function ke({open:oe=!0,onChange:a,defaultValue:E,placement:b,width:y,height:x,extra:z,onDynamic:te,onOpenChange:ae,showExtra:ie=!0}){const re=(0,ee.useRef)(null),le=(0,ee.useRef)(null),[de,ue]=(0,ee.useState)(E||""),[be,we]=(0,ee.useState)(E||""),[Re,Et]=(0,ee.useState)(!!oe),[Ue,tt]=(0,ee.useState)(1),at={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(ue(E),we(E),Et(!0))},[oe,E]),(0,ee.useEffect)(()=>{de!==""&&(clearTimeout(le.current),le.current=setTimeout(()=>{const ut=document.createElement("iframe");if(ut.style.width="100%",ut.style.height="100%",ut.style.border="0",re.current){re.current.innerHTML="",re.current.appendChild(ut);const ze=ut.contentDocument||ut.contentWindow.document;ze.open(),ze.write(de),ze.close()}},1e3))},[oe,de]);const it=ut=>{ue(ut),a==null||a(ut,be)};return ge.createElement(Se.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Re,width:"100%",height:x||"100vh",rootClassName:pe.smartWrp,destroyOnClose:!0,onClose:()=>{Et(!1),ae==null||ae(de)},extra:ie&&ge.createElement("div",null,ge.createElement(me.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ue,onChange:ut=>tt(ut)}),ge.createElement(Le.Z,{type:"primary",className:"ml20",onClick:()=>xe(this,null,function*(){yield te(de,()=>{Et(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Ce.Z,{className:"h100"},ge.createElement(fe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ue===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:re})),ge.createElement(fe.Z,{flex:"1",style:{display:Ue===2?"block":"none"}},ge.createElement(Pe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:at,onChange:it}))))}var ot=ke},10946:function(Ee,$e,ne){"use strict";ne.d($e,{Z:function(){return de}});var ee=ne(59301),Se=ne(74439),Ce=ne(77596),fe=ne(3977),pe=ne(14179),Pe=ne(56102),me={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Le=ne(6767),ge=ne(90083),xe=ne(95827),Ie=ne(30084),ke=ne(10787),ot=ne(8944),oe=ne(81679),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ue,be,we)=>be in ue?a(ue,be,{enumerable:!0,configurable:!0,writable:!0,value:we}):ue[be]=we,ae=(ue,be)=>{for(var we in be||(be={}))x.call(be,we)&&te(ue,we,be[we]);if(y)for(var we of y(be))z.call(be,we)&&te(ue,we,be[we]);return ue},ie=(ue,be)=>E(ue,b(be)),re=(ue,be)=>{var we={};for(var Re in ue)x.call(ue,Re)&&be.indexOf(Re)<0&&(we[Re]=ue[Re]);if(ue!=null&&y)for(var Re of y(ue))be.indexOf(Re)<0&&z.call(ue,Re)&&(we[Re]=ue[Re]);return we},de=({onFinish:ue,value:be,streamingStatus:we,cancelIndex:Re,loadImage:Et,onDynamic:Ue,isHiddenHtml:tt})=>{const[at,it]=(0,ee.useState)(""),[ut,ze]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ve,st]=(0,ee.useState)(0),[vt,wt]=(0,ee.useState)(!1),Oe=Je=>Je.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ze,mt)=>`<mathx data-text="${mt.trim()}">$$${mt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Me=()=>{wt(!0),ue==null||ue()};(0,ee.useEffect)(()=>{const Je=Et?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function ke({open:oe=!0,onChange:a,defaultValue:E,placement:b,width:y,height:x,extra:z,onDynamic:te,onOpenChange:ae,showExtra:ie=!0}){const re=(0,ee.useRef)(null),le=(0,ee.useRef)(null),[de,ue]=(0,ee.useState)(E||""),[be,we]=(0,ee.useState)(E||""),[Re,Et]=(0,ee.useState)(!!oe),[Ue,tt]=(0,ee.useState)(1),at={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(ue(E),we(E),Et(!0))},[oe,E]),(0,ee.useEffect)(()=>{de!==""&&(clearTimeout(le.current),le.current=setTimeout(()=>{const ut=document.createElement("iframe");if(ut.style.width="100%",ut.style.height="100%",ut.style.border="0",re.current){re.current.innerHTML="",re.current.appendChild(ut);const ze=ut.contentDocument||ut.contentWindow.document;ze.open(),ze.write(de),ze.close()}},1e3))},[oe,de]);const it=ut=>{ue(ut),a==null||a(ut,be)};return ge.createElement(Se.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Re,width:"100%",height:x||"100vh",rootClassName:pe.smartWrp,destroyOnClose:!0,onClose:()=>{Et(!1),ae==null||ae(de)},extra:ie&&ge.createElement("div",null,ge.createElement(me.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ue,onChange:ut=>tt(ut)}),ge.createElement(Le.Z,{type:"primary",className:"ml20",onClick:()=>xe(this,null,function*(){yield te(de,()=>{Et(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(Ce.Z,{className:"h100"},ge.createElement(fe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ue===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:re})),ge.createElement(fe.Z,{flex:"1",style:{display:Ue===2?"block":"none"}},ge.createElement(Pe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:at,onChange:it}))))}var ot=ke},10946:function(Ee,$e,ne){"use strict";ne.d($e,{Z:function(){return de}});var ee=ne(59301),Se=ne(72460),Ce=ne(77596),fe=ne(3977),pe=ne(14179),Pe=ne(56102),me={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Le=ne(6767),ge=ne(90083),xe=ne(95827),Ie=ne(30084),ke=ne(10787),ot=ne(8944),oe=ne(81679),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ue,be,we)=>be in ue?a(ue,be,{enumerable:!0,configurable:!0,writable:!0,value:we}):ue[be]=we,ae=(ue,be)=>{for(var we in be||(be={}))x.call(be,we)&&te(ue,we,be[we]);if(y)for(var we of y(be))z.call(be,we)&&te(ue,we,be[we]);return ue},ie=(ue,be)=>E(ue,b(be)),re=(ue,be)=>{var we={};for(var Re in ue)x.call(ue,Re)&&be.indexOf(Re)<0&&(we[Re]=ue[Re]);if(ue!=null&&y)for(var Re of y(ue))be.indexOf(Re)<0&&z.call(ue,Re)&&(we[Re]=ue[Re]);return we},de=({onFinish:ue,value:be,streamingStatus:we,cancelIndex:Re,loadImage:Et,onDynamic:Ue,isHiddenHtml:tt})=>{const[at,it]=(0,ee.useState)(""),[ut,ze]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ve,st]=(0,ee.useState)(0),[vt,wt]=(0,ee.useState)(!1),Oe=Je=>Je.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ze,mt)=>`<mathx data-text="${mt.trim()}">$$${mt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Me=()=>{wt(!0),ue==null||ue()};(0,ee.useEffect)(()=>{const Je=Et?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${be}`:be,Ze=Oe(Je);if(!vt)if(Et||!we||Re>0){it(Ze),st(Ze.length),(!we||Re>0)&&!Et&&Me();return}else if((Ze==null?void 0:Ze.length)<4)it(Ze),st(Ze.length);else if(Ve<Ze.length){const mt=Ze.length-Ve,se=setInterval(()=>{it(Ze.slice(0,Ve+2)),st(ct=>ct+2)},mt>10?Math.max(500/(mt/2),20):50);return()=>clearInterval(se)}else we||Me()},[be,we,Re,Et,Ve]);const He=(0,ee.useMemo)(()=>ee.createElement("section",{className:`${me.answer} fadeIn animated edu_md`},ee.createElement(Se.UG,{remarkPlugins:[Ie.Z,ke.Z],rehypePlugins:[xe.Z,fe.Z],components:{code(Je){var Ze=Je,{node:mt,inline:se,className:ct,children:Tt}=Ze,zt=re(Ze,["node","inline","className","children"]);const At=/language-(\w+)/.exec(ct||""),hn=String(Tt).trim();return se||!At?ee.createElement("code",ae({className:ct},zt),Tt):ee.createElement("code",{className:me.codeCopy,"data-text":`\`\`\`${At?At[1]:""}
${Tt}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Xe({open:se=!0,onChange:E,defaultValue:a,placement:b,width:x,height:z,extra:ee,onDynamic:ie,onOpenChange:pe,showExtra:we=!0}){const Fe=(0,y.useRef)(null),Te=(0,y.useRef)(null),[ze,Je]=(0,y.useState)(a||""),[At,dt]=(0,y.useState)(a||""),[Rt,sn]=(0,y.useState)(!!se),[Sn,qt]=(0,y.useState)(1),Mn={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{se&&(Je(a),dt(a),sn(!0))},[se,a]),(0,y.useEffect)(()=>{ze!==""&&(clearTimeout(Te.current),Te.current=setTimeout(()=>{const kt=document.createElement("iframe");if(kt.style.width="100%",kt.style.height="100%",kt.style.border="0",Fe.current){Fe.current.innerHTML="",Fe.current.appendChild(kt);const xt=kt.contentDocument||kt.contentWindow.document;xt.open(),xt.write(ze),xt.close()}},1e3))},[se,ze]);const Gt=kt=>{Je(kt),E==null||E(kt,At)};return le.createElement(qe.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Rt,width:"100%",height:z||"100vh",rootClassName:de.smartWrp,destroyOnClose:!0,onClose:()=>{sn(!1),pe==null||pe(ze)},extra:we&&le.createElement("div",null,le.createElement(ye.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Sn,onChange:kt=>qt(kt)}),le.createElement(Ae.Z,{type:"primary",className:"ml20",onClick:()=>oe(this,null,function*(){yield ie(ze,()=>{sn(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},le.createElement(Se.Z,{className:"h100"},le.createElement(ge.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Sn===1?"block":"none"}},le.createElement("div",{className:"h100",ref:Fe})),le.createElement(ge.Z,{flex:"1",style:{display:Sn===2?"block":"none"}},le.createElement(fe.ZP,{height:"90vh",value:a,language:"html",theme:"vs",showMiniMap:!1,options:Mn,onChange:Gt}))))}var We=Xe},10946:function(zt,Ve,re){"use strict";re.d(Ve,{Z:function(){return ze}});var y=re(59301),qe=re(74439),Se=re(77596),ge=re(3977),de=re(14179),fe=re(56102),ye={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ae=re(6767),le=re(90083),oe=re(95827),Be=re(30084),Xe=re(10787),We=re(8944),se=re(81679),E=Object.defineProperty,a=Object.defineProperties,b=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ie=(Je,At,dt)=>At in Je?E(Je,At,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Je[At]=dt,pe=(Je,At)=>{for(var dt in At||(At={}))z.call(At,dt)&&ie(Je,dt,At[dt]);if(x)for(var dt of x(At))ee.call(At,dt)&&ie(Je,dt,At[dt]);return Je},we=(Je,At)=>a(Je,b(At)),Fe=(Je,At)=>{var dt={};for(var Rt in Je)z.call(Je,Rt)&&At.indexOf(Rt)<0&&(dt[Rt]=Je[Rt]);if(Je!=null&&x)for(var Rt of x(Je))At.indexOf(Rt)<0&&ee.call(Je,Rt)&&(dt[Rt]=Je[Rt]);return dt},ze=({onFinish:Je,value:At,streamingStatus:dt,cancelIndex:Rt,loadImage:sn,onDynamic:Sn,isHiddenHtml:qt})=>{const[Mn,Gt]=(0,y.useState)(""),[kt,xt]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[ut,Wt]=(0,y.useState)(0),[ln,_n]=(0,y.useState)(!1),$t=Wn=>Wn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(gn,dn)=>`<mathx data-text="${dn.trim()}">$$${dn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),en=()=>{_n(!0),Je==null||Je()};(0,y.useEffect)(()=>{const Wn=sn?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Xe({open:se=!0,onChange:E,defaultValue:a,placement:b,width:x,height:z,extra:ee,onDynamic:ie,onOpenChange:pe,showExtra:we=!0}){const Fe=(0,y.useRef)(null),Te=(0,y.useRef)(null),[ze,Je]=(0,y.useState)(a||""),[At,dt]=(0,y.useState)(a||""),[Rt,sn]=(0,y.useState)(!!se),[Sn,qt]=(0,y.useState)(1),Mn={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{se&&(Je(a),dt(a),sn(!0))},[se,a]),(0,y.useEffect)(()=>{ze!==""&&(clearTimeout(Te.current),Te.current=setTimeout(()=>{const kt=document.createElement("iframe");if(kt.style.width="100%",kt.style.height="100%",kt.style.border="0",Fe.current){Fe.current.innerHTML="",Fe.current.appendChild(kt);const xt=kt.contentDocument||kt.contentWindow.document;xt.open(),xt.write(ze),xt.close()}},1e3))},[se,ze]);const Gt=kt=>{Je(kt),E==null||E(kt,At)};return le.createElement(qe.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Rt,width:"100%",height:z||"100vh",rootClassName:de.smartWrp,destroyOnClose:!0,onClose:()=>{sn(!1),pe==null||pe(ze)},extra:we&&le.createElement("div",null,le.createElement(ye.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Sn,onChange:kt=>qt(kt)}),le.createElement(Ae.Z,{type:"primary",className:"ml20",onClick:()=>oe(this,null,function*(){yield ie(ze,()=>{sn(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},le.createElement(Se.Z,{className:"h100"},le.createElement(ge.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Sn===1?"block":"none"}},le.createElement("div",{className:"h100",ref:Fe})),le.createElement(ge.Z,{flex:"1",style:{display:Sn===2?"block":"none"}},le.createElement(fe.ZP,{height:"90vh",value:a,language:"html",theme:"vs",showMiniMap:!1,options:Mn,onChange:Gt}))))}var We=Xe},10946:function(zt,Ve,re){"use strict";re.d(Ve,{Z:function(){return ze}});var y=re(59301),qe=re(72460),Se=re(77596),ge=re(3977),de=re(14179),fe=re(56102),ye={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ae=re(6767),le=re(90083),oe=re(95827),Be=re(30084),Xe=re(10787),We=re(8944),se=re(81679),E=Object.defineProperty,a=Object.defineProperties,b=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ie=(Je,At,dt)=>At in Je?E(Je,At,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Je[At]=dt,pe=(Je,At)=>{for(var dt in At||(At={}))z.call(At,dt)&&ie(Je,dt,At[dt]);if(x)for(var dt of x(At))ee.call(At,dt)&&ie(Je,dt,At[dt]);return Je},we=(Je,At)=>a(Je,b(At)),Fe=(Je,At)=>{var dt={};for(var Rt in Je)z.call(Je,Rt)&&At.indexOf(Rt)<0&&(dt[Rt]=Je[Rt]);if(Je!=null&&x)for(var Rt of x(Je))At.indexOf(Rt)<0&&ee.call(Je,Rt)&&(dt[Rt]=Je[Rt]);return dt},ze=({onFinish:Je,value:At,streamingStatus:dt,cancelIndex:Rt,loadImage:sn,onDynamic:Sn,isHiddenHtml:qt})=>{const[Mn,Gt]=(0,y.useState)(""),[kt,xt]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[ut,Wt]=(0,y.useState)(0),[ln,_n]=(0,y.useState)(!1),$t=Wn=>Wn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(gn,dn)=>`<mathx data-text="${dn.trim()}">$$${dn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),en=()=>{_n(!0),Je==null||Je()};(0,y.useEffect)(()=>{const Wn=sn?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${At}`:At,gn=$t(Wn);if(!ln)if(sn||!dt||Rt>0){Gt(gn),Wt(gn.length),(!dt||Rt>0)&&!sn&&en();return}else if((gn==null?void 0:gn.length)<4)Gt(gn),Wt(gn.length);else if(ut<gn.length){const dn=gn.length-ut,Et=setInterval(()=>{Gt(gn.slice(0,ut+2)),Wt(Jt=>Jt+2)},dn>10?Math.max(500/(dn/2),20):50);return()=>clearInterval(Et)}else dt||en()},[At,dt,Rt,sn,ut]);const cn=(0,y.useMemo)(()=>y.createElement("section",{className:`${ye.answer} fadeIn animated edu_md`},y.createElement(qe.UG,{remarkPlugins:[Be.Z,Xe.Z],rehypePlugins:[oe.Z,ge.Z],components:{code(Wn){var gn=Wn,{node:dn,inline:Et,className:Jt,children:jn}=gn,ru=Fe(gn,["node","inline","className","children"]);const nu=/language-(\w+)/.exec(Jt||""),at=String(jn).trim();return Et||!nu?y.createElement("code",pe({className:Jt},ru),jn):y.createElement("code",{className:ye.codeCopy,"data-text":`\`\`\`${nu?nu[1]:""}
${jn}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save