(window.webpackJsonp=window.webpackJsonp||[]).push([[163,5,6,7],{"+NIl":function(st,ze,q){(function(re){re(q("VrN/"))})(function(re){"use strict";re.defineMode("stex",function(V,A){"use strict";function G(C,T){C.cmdState.push(T)}function I(C){return C.cmdState.length>0?C.cmdState[C.cmdState.length-1]:null}function R(C){var T=C.cmdState.pop();T&&T.closeBracket()}function B(C){for(var T=C.cmdState,g=T.length-1;g>=0;g--){var d=T[g];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function U(C,T,g){return function(){this.name=C,this.bracketNo=0,this.style=T,this.styles=g,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var k={};k.importmodule=U("importmodule","tag",["string","builtin"]),k.documentclass=U("documentclass","tag",["","atom"]),k.usepackage=U("usepackage","tag",["atom"]),k.begin=U("begin","tag",["atom"]),k.end=U("end","tag",["atom"]),k.label=U("label","tag",["atom"]),k.ref=U("ref","tag",["atom"]),k.eqref=U("eqref","tag",["atom"]),k.cite=U("cite","tag",["atom"]),k.bibitem=U("bibitem","tag",["atom"]),k.Bibitem=U("Bibitem","tag",["atom"]),k.RBibitem=U("RBibitem","tag",["atom"]),k.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function L(C,T){C.f=T}function y(C,T){var g;if(C.match(/^\\[a-zA-Z@]+/)){var d=C.current().slice(1);return g=k.hasOwnProperty(d)?k[d]:k.DEFAULT,g=new g,G(T,g),L(T,O),g.style}if(C.match(/^\\[$&%#{}_]/))return"tag";if(C.match(/^\\[,;!\/\\]/))return"tag";if(C.match("\\["))return L(T,function(u,s){return x(u,s,"\\]")}),"keyword";if(C.match("\\("))return L(T,function(u,s){return x(u,s,"\\)")}),"keyword";if(C.match("$$"))return L(T,function(u,s){return x(u,s,"$$")}),"keyword";if(C.match("$"))return L(T,function(u,s){return x(u,s,"$")}),"keyword";var o=C.next();if(o=="%")return C.skipToEnd(),"comment";if(o=="}"||o=="]"){if(g=I(T),g)g.closeBracket(o),L(T,O);else return"error";return"bracket"}else return o=="{"||o=="["?(g=k.DEFAULT,g=new g,G(T,g),"bracket"):/\d/.test(o)?(C.eatWhile(/[\w.%]/),"atom"):(C.eatWhile(/[\w\-_]/),g=B(T),g.name=="begin"&&(g.argument=C.current()),g.styleIdentifier())}function x(C,T,g){if(C.eatSpace())return null;if(g&&C.match(g))return L(T,y),"keyword";if(C.match(/^\\[a-zA-Z@]+/))return"tag";if(C.match(/^[a-zA-Z]+/))return"variable-2";if(C.match(/^\\[$&%#{}_]/))return"tag";if(C.match(/^\\[,;!\/]/))return"tag";if(C.match(/^[\^_&]/))return"tag";if(C.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(C.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=C.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(C.skipToEnd(),"comment"):"error"}function O(C,T){var g=C.peek(),d;return g=="{"||g=="["?(d=I(T),d.openBracket(g),C.eat(g),L(T,y),"bracket"):/[ \t\r]/.test(g)?(C.eat(g),null):(L(T,y),R(T),y(C,T))}return{startState:function(){var C=A.inMathMode?function(T,g){return x(T,g)}:y;return{cmdState:[],f:C}},copyState:function(C){return{cmdState:C.cmdState.slice(),f:C.f}},token:function(C,T){return T.f(C,T)},blankLine:function(C){C.f=y,C.cmdState.length=0},lineComment:"%"}}),re.defineMIME("text/x-stex","stex"),re.defineMIME("text/x-latex","stex")})},"+ua5":function(st,ze,q){},"19Vz":function(st,ze,q){(function(re){re(q("VrN/"))})(function(re){re.defineOption("placeholder","",function(U,k,L){var y=L&&L!=re.Init;if(k&&!y)U.on("blur",I),U.on("change",R),U.on("swapDoc",R),re.on(U.getInputField(),"compositionupdate",U.state.placeholderCompose=function(){G(U)}),R(U);else if(!k&&y){U.off("blur",I),U.off("change",R),U.off("swapDoc",R),re.off(U.getInputField(),"compositionupdate",U.state.placeholderCompose),V(U);var x=U.getWrapperElement();x.className=x.className.replace(" CodeMirror-empty","")}k&&!U.hasFocus()&&I(U)});function V(U){U.state.placeholder&&(U.state.placeholder.parentNode.removeChild(U.state.placeholder),U.state.placeholder=null)}function A(U){V(U);var k=U.state.placeholder=document.createElement("pre");k.style.cssText="height: 0; overflow: visible",k.style.direction=U.getOption("direction"),k.className="CodeMirror-placeholder CodeMirror-line-like";var L=U.getOption("placeholder");typeof L=="string"&&(L=document.createTextNode(L)),k.appendChild(L),U.display.lineSpace.insertBefore(k,U.display.lineSpace.firstChild)}function G(U){setTimeout(function(){var k=!1,L=U.getInputField();L.nodeName=="TEXTAREA"?k=!L.value:U.lineCount()==1&&(k=!/[^\u200b]/.test(L.querySelector(".CodeMirror-line").textContent)),k?A(U):V(U)},20)}function I(U){B(U)&&A(U)}function R(U){var k=U.getWrapperElement(),L=B(U);k.className=k.className.replace(" CodeMirror-empty","")+(L?" CodeMirror-empty":""),L?A(U):V(U)}function B(U){return U.lineCount()===1&&U.getLine(0)===""}})},"1eCo":function(st,ze,q){(function(re){re(q("VrN/"))})(function(re){"use strict";var V={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},A={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};re.defineMode("xml",function(G,I){var R=G.indentUnit,B={},U=I.htmlMode?V:A;for(var k in U)B[k]=U[k];for(var k in I)B[k]=I[k];var L,y;function x(a,v){function m(F){return v.tokenize=F,F(a,v)}var E=a.next();if(E=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?m(T("atom","]]>")):null:a.match("--")?m(T("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),m(g(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),v.tokenize=T("meta","?>"),"meta"):(L=a.eat("/")?"closeTag":"openTag",v.tokenize=O,"tag bracket");if(E=="&"){var M;return a.eat("#")?a.eat("x")?M=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):M=a.eatWhile(/[\d]/)&&a.eat(";"):M=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),M?"atom":"error"}else return a.eatWhile(/[^&<]/),null}x.isInText=!0;function O(a,v){var m=a.next();if(m==">"||m=="/"&&a.eat(">"))return v.tokenize=x,L=m==">"?"endTag":"selfcloseTag","tag bracket";if(m=="=")return L="equals",null;if(m=="<"){v.tokenize=x,v.state=s,v.tagName=v.tagStart=null;var E=v.tokenize(a,v);return E?E+" tag error":"tag error"}else return/[\'\"]/.test(m)?(v.tokenize=C(m),v.stringStartCol=a.column(),v.tokenize(a,v)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function C(a){var v=function(m,E){for(;!m.eol();)if(m.next()==a){E.tokenize=O;break}return"string"};return v.isInAttribute=!0,v}function T(a,v){return function(m,E){for(;!m.eol();){if(m.match(v)){E.tokenize=x;break}m.next()}return a}}function g(a){return function(v,m){for(var E;(E=v.next())!=null;){if(E=="<")return m.tokenize=g(a+1),m.tokenize(v,m);if(E==">")if(a==1){m.tokenize=x;break}else return m.tokenize=g(a-1),m.tokenize(v,m)}return"meta"}}function d(a,v,m){this.prev=a.context,this.tagName=v,this.indent=a.indented,this.startOfLine=m,(B.doNotIndent.hasOwnProperty(v)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function o(a){a.context&&(a.context=a.context.prev)}function u(a,v){for(var m;;){if(!a.context)return;if(m=a.context.tagName,!B.contextGrabbers.hasOwnProperty(m)||!B.contextGrabbers[m].hasOwnProperty(v))return;o(a)}}function s(a,v,m){return a=="openTag"?(m.tagStart=v.column(),w):a=="closeTag"?p:s}function w(a,v,m){return a=="word"?(m.tagName=v.current(),y="tag",b):B.allowMissingTagName&&a=="endTag"?(y="tag bracket",b(a,v,m)):(y="error",w)}function p(a,v,m){if(a=="word"){var E=v.current();return m.context&&m.context.tagName!=E&&B.implicitlyClosed.hasOwnProperty(m.context.tagName)&&o(m),m.context&&m.context.tagName==E||B.matchClosing===!1?(y="tag",f):(y="tag error",_)}else return B.allowMissingTagName&&a=="endTag"?(y="tag bracket",f(a,v,m)):(y="error",_)}function f(a,v,m){return a!="endTag"?(y="error",f):(o(m),s)}function _(a,v,m){return y="error",f(a,v,m)}function b(a,v,m){if(a=="word")return y="attribute",h;if(a=="endTag"||a=="selfcloseTag"){var E=m.tagName,M=m.tagStart;return m.tagName=m.tagStart=null,a=="selfcloseTag"||B.autoSelfClosers.hasOwnProperty(E)?u(m,E):(u(m,E),m.context=new d(m,E,M==m.indented)),s}return y="error",b}function h(a,v,m){return a=="equals"?c:(B.allowMissing||(y="error"),b(a,v,m))}function c(a,v,m){return a=="string"?l:a=="word"&&B.allowUnquoted?(y="string",b):(y="error",b(a,v,m))}function l(a,v,m){return a=="string"?l:b(a,v,m)}return{startState:function(a){var v={tokenize:x,state:s,indented:a||0,tagName:null,tagStart:null,context:null};return a!=null&&(v.baseIndent=a),v},token:function(a,v){if(!v.tagName&&a.sol()&&(v.indented=a.indentation()),a.eatSpace())return null;L=null;var m=v.tokenize(a,v);return(m||L)&&m!="comment"&&(y=null,v.state=v.state(L||m,a,v),y&&(m=y=="error"?m+" error":y)),m},indent:function(a,v,m){var E=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+R;if(E&&E.noIndent)return re.Pass;if(a.tokenize!=O&&a.tokenize!=x)return m?m.match(/^(\s*)/)[0].length:0;if(a.tagName)return B.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+R*(B.multilineTagIndentFactor||1);if(B.alignCDATA&&/$/,blockCommentStart:"",configuration:B.htmlMode?"html":"xml",helperType:B.htmlMode?"html":"xml",skipAttribute:function(a){a.state==c&&(a.state=b)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var v=[],m=a.context;m;m=m.prev)m.tagName&&v.push(m.tagName);return v.reverse()}}}),re.defineMIME("text/xml","xml"),re.defineMIME("application/xml","xml"),re.mimeModes.hasOwnProperty("text/html")||re.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"500L":function(st,ze,q){"use strict";q.d(ze,"a",function(){return p});var re=q("+L6B"),V=q("2/Rp"),A=q("2qtc"),G=q("kLXV"),I=q("9og8"),R=q("k1fw"),B=q("miYZ"),U=q("tsqr"),k=q("oBTY"),L=q("tJVT"),y=q("DZo9"),x=q("8z0m"),O=q("WmNS"),C=q.n(O),T=q("cDcd"),g=q.n(T),d=q("m3rI"),o=q("wzkS"),u=q("y5JW"),s=q("LtfV"),w=x.a.Dragger;function p(f){var _=[];return f&&f.length>0&&(_=f.map(function(b){return{uid:b.id,id:b.id,name:b.title+u.c+b.filesize,url:b.url,filesize:b.filesize,status:"done",response:{id:b.id}}})),_}ze.b=function(f){var _=f.value,b=f.onChange,h=f.action,c=f.className,l=f.maxSize,a=l===void 0?150:l,v=f.title,m=v===void 0?"\u4E0A\u4F20\u9644\u4EF6":v,E=f.showRemoveModal,M=E===void 0?!1:E,F=f.accept,j=F===void 0?"":F,W=f.additionalText,D=f.isDragger,P=f.number,H=P===void 0?1e3:P,Y=f.aloneClear,ee=Y===void 0?!1:Y,oe=Object(T.useState)(!1),Te=Object(L.a)(oe,2),ve=Te[0],ge=Te[1],he=Object(T.useState)(_||[]),fe=Object(L.a)(he,2),ae=fe[0],me=fe[1];Object(T.useEffect)(function(){_&&(me(Object(k.a)(_)),H===(_==null?void 0:_.length)&&ge(!0))},[_]);var J=function(){setTimeout(function(){ae.pop(),me(Object(k.a)(ae))},500)},ne={multiple:!0,disabled:ve,accept:j,withCredentials:!0,fileList:ae,beforeUpload:function(Ce,ye){var we=Ce.size/1024/1024;return ae.concat(ye).length>H?(ae.pop(),me(Object(k.a)(ae)),U.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(H,"\u4E2A\u6587\u4EF6")),ee?Promise.reject():(J(),!1)):!0},action:h||"".concat(d.a.API_SERVER,"/api/attachments.json"),onChange:function(Ce){var ye,we,De=Object(k.a)(Ce.fileList);if(Ce.file.status==="done"&&((ye=Ce.file)===null||ye===void 0||((we=ye.response)===null||we===void 0)?void 0:we.status)===-1){var Pe,ke;U.b.error((Pe=Ce.file)===null||Pe===void 0||((ke=Pe.response)===null||ke===void 0)?void 0:ke.message);return}De.length>=H?ge(!0):ge(!1),me(Object(k.a)(De)),De=De.map(function(Oe){var Re;if(Oe!=null&&(Re=Oe.response)!==null&&Re!==void 0&&Re.id){var Ge;Oe.url="/api/attachments/".concat(Oe==null||((Ge=Oe.response)===null||Ge===void 0)?void 0:Ge.id)}return Oe.name.indexOf(u.c)===-1&&(Oe.name="".concat(Oe.name).concat(u.c).concat(Object(u.a)(Oe.size))),Object(R.a)({},Oe)}),console.log("info:",Ce),b(De)},onRemove:function(){var Ee=Object(I.a)(C.a.mark(function ye(we){var De;return C.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:if(De=function(){var Oe=Object(I.a)(C.a.mark(function Re(){var Ge,$e;return C.a.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:if(Ge=we.response?we.response.id:we.id,!Ge){He.next=8;break}return He.next=4,Object(o.d)(we.response?we.response.id:we.uid);case 4:return $e=He.sent,He.abrupt("return",$e);case 8:return He.abrupt("return",!0);case 9:case"end":return He.stop()}},Re)}));return function(){return Oe.apply(this,arguments)}}(),!M){ke.next=5;break}return ke.abrupt("return",new Promise(function(Oe,Re){G.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:g.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var Ge=Object(I.a)(C.a.mark(function Be(){var He;return C.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.next=2,De();case 2:He=Je.sent,U.b.success("\u5220\u9664\u6210\u529F"),Oe(!0);case 5:case"end":return Je.stop()}},Be)}));function $e(){return Ge.apply(this,arguments)}return $e}(),onCancel:function(){return Oe(!1)}})}));case 5:return ke.next=7,De();case 7:return ke.abrupt("return",ke.sent);case 8:case"end":return ke.stop()}},ye)}));function Ce(ye){return Ee.apply(this,arguments)}return Ce}()};function Q(Ee){Ee.preventDefault(),Ee.stopPropagation()}return g.a.createElement("div",{className:"multi-upload ".concat(c||"")},D&&g.a.createElement(w,ne,g.a.createElement("p",{className:"ant-upload-drag-icon"},g.a.createElement(s.a,null)),g.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",g.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",a,"MB)"," "),W),!D&&g.a.createElement(x.a,ne,g.a.createElement(V.a,{disabled:ve},m),g.a.createElement("span",{onClick:Q,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",a,"MB)"," ")))}},"55Ip":function(st,ze,q){"use strict";q.d(ze,"a",function(){return u});var re=q("Ty5D"),V=q("dI71"),A=q("cDcd"),G=q.n(A),I=q("YS25"),R=q("17x9"),B=q.n(R),U=q("wx14"),k=q("zLVn"),L=q("9R94"),y=function(c){Object(V.a)(l,c);function l(){for(var v,m=arguments.length,E=new Array(m),M=0;M1&&arguments[1]!==void 0?arguments[1]:0,T=(B[O[C+0]]+B[O[C+1]]+B[O[C+2]]+B[O[C+3]]+"-"+B[O[C+4]]+B[O[C+5]]+"-"+B[O[C+6]]+B[O[C+7]]+"-"+B[O[C+8]]+B[O[C+9]]+"-"+B[O[C+10]]+B[O[C+11]]+B[O[C+12]]+B[O[C+13]]+B[O[C+14]]+B[O[C+15]]).toLowerCase();if(!R(T))throw TypeError("Stringified UUID is invalid");return T}var L=k;function y(O,C,T){O=O||{};var g=O.random||(O.rng||A)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,C){T=T||0;for(var d=0;d<16;++d)C[T+d]=g[d];return C}return L(g)}var x=ze.a=y},"7ahc":function(st,ze,q){"use strict";q.d(ze,"a",function(){return w});var re=q("k1fw"),V=q("0Owb"),A=q("+L6B"),G=q("2/Rp"),I=q("y8nQ"),R=q("Vl3Y"),B=q("tJVT"),U=q("OaEy"),k=q("2fM7"),L=q("cDcd"),y=q.n(L),x=q("VrN/"),O=q.n(x),C=q("p77/"),T=q.n(C),g=q("c5Ni"),d=q.n(g),o=k.a.Option,u={labelCol:{span:4},wrapperCol:{span:20}},s={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};ze.b=function(p){var f=p.callback,_=p.onCancel,b=Object(L.useState)("python"),h=Object(B.a)(b,2),c=h[0],l=h[1];function a(m){l(s[m][1])}function v(m){f(m)}return y.a.createElement(R.a,Object(V.a)({},u,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:v}),y.a.createElement(R.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},y.a.createElement(k.a,{onChange:a},Object.keys(s).map(function(m){return y.a.createElement(o,{key:m,value:m},s[m][0])}))),y.a.createElement(R.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},y.a.createElement(w,{mode:c})),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(G.a,{type:"ghost",onClick:_},"\u53D6\u6D88")))};function w(p){var f=p.value,_=p.onChange,b=p.mode,h=p.options,c=h===void 0?{}:h,l=Object(L.useRef)(),a=Object(L.useState)(),v=Object(B.a)(a,2),m=v[0],E=v[1];return Object(L.useEffect)(function(){if(m){function M(F){var j=F.getValue();_&&_(j)}return m.on("change",M),function(){m.off("change",M)}}},[m,_]),Object(L.useEffect)(function(){m&&m.setOption("mode",b)},[m,b]),Object(L.useEffect)(function(){m&&((f!==m.getValue()||f==="")&&setTimeout(function(){m.setValue(f||" ")},300))},[m,f]),Object(L.useEffect)(function(){if(l.current&&!m){var M=O.a.fromTextArea(l.current,Object(re.a)({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},c));E(M)}},[l.current,m]),y.a.createElement("div",{className:"my-codemirror-container"},y.a.createElement("textarea",{ref:l}))}},"8EBN":function(st,ze,q){(function(re){re(q("VrN/"))})(function(re){"use strict";re.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var V=0;V-1&&G.substring(B+1,G.length);if(U)return re.findModeByExtension(U)},re.findModeByName=function(G){G=G.toLowerCase();for(var I=0;I=ae.length?me.slice(ae.length):me}).join(`
`)}var C=[],T=[""],g=new y.a.Renderer,d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function o(){C.length=0,T=[""]}var u={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function s(ge,he,fe,ae){if(he>=ge.length||ge[he].level<=fe)return he;var me=ge[he];ae.push("- "+me.text+""),he++;var J=[];return he=s(ge,he,me.level,J),J.length>0&&(ae.push("
"),J.forEach(function(ne){ae.push(ne)}),ae.push("
")),ae.push(" "),he=s(ge,he,fe,ae),he}function w(){return s(C,0,0,T),T.push("
"),T.join("")}var p={heading:function(he){var fe=d.exec(he);if(fe)return{type:"heading",raw:fe[0],depth:fe[1].length,text:fe[2]}},fences:function(he){var fe=this.rules.block.fences.exec(he);if(fe){var ae=fe[0],me=O(ae,fe[3]||""),J=fe[2]?fe[2].trim():fe[2];if(["latex","katex","math"].indexOf(J)>=0){var ne=b(),Q=me;me=ne,h[ne]={type:"block",expression:Q}}return{type:"code",raw:ae,lang:J,text:me}}}},f=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,b=function(){return"__special_katext_id_".concat(_++,"__")},h={};function c(){return h}function l(){_=0,h={}}function a(ge){return ge=ge.replace(f,function(he,fe){var ae=b();return h[ae]={type:"inline",expression:fe},ae}),ge}var v=g.listitem;g.listitem=function(ge){return v(a(ge))};var m=g.paragraph;g.paragraph=function(ge){return m(a(ge))};var E=g.tablecell;g.tablecell=function(ge,he){return E(a(ge),he)},g.code=function(ge,he,fe){var ae=(he||"").match(/\S*/)[0];return ae?["latex","katex","math"].indexOf(ae)>=0?"".concat(ge,"
"):'
').concat(fe?ge:Object(x.escape)(ge,!0),`
`):''+(fe?ge:Object(x.escape)(ge,!0))+"
"},g.heading=function(ge,he,fe){var ae=this.options.headerPrefix+fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return C.push({anchor:ae,level:he,text:ge}),"'+ge+""},y.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),y.a.use({tokenizer:p,renderer:g});var M=y.a,F=q("SJMd"),j=q("ulZh"),W=q.n(j),D=q("m3rI"),P=q("Oy/b"),H=q("p5ED"),Y=q("8hTe"),ee=q.n(Y),oe=/]*>/g;function Te(ge){var he=document.createElement("div");return he.innerHTML=ge,he.childNodes.length===0?"":he.childNodes[0].nodeValue}var ve=ze.a=function(ge){var he=ge.value,fe=he===void 0?"":he,ae=ge.edit,me=ae===void 0?!1:ae,J=ge.className,ne=ge.showTextOnly,Q=ge.showLines,Ee=ge.replaces,Ce=ge.zoomImg,ye=ge.hasMask,we=ge.style,De=we===void 0?{}:we,Pe=ge.stylesPrev,ke=Pe===void 0?{}:Pe,Oe=String(fe),Re=Object(B.useRef)(),Ge=Object(B.useRef)(),$e=Object(B.useState)(""),Be=Object(R.a)($e,2),He=Be[0],rt=Be[1],Je=Object(B.useState)("office"),qe=Object(R.a)(Je,2),Se=qe[0],Ze=qe[1],Ke=Object(B.useMemo)(function(){try{var de=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Z=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Oe=Oe.replace(de,"("+D.a.API_SERVER+"/api/attachments/").replace($,'"'+D.a.API_SERVER+"/api/attachments/").replace(Z,'"'+D.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(Ae){}var te=M(Oe),le=c();if(Oe.match(/\[TOC\]/)&&(te=te.replace("[TOC]
",w()),o()),te=te.replace(/(__special_katext_id_\d+__)/g,function(Ae,_e){var Ue=le[_e],Qe=Ue.type,Ve=Ue.expression;return Object(P.renderToString)(Te(Ve)||"",{displayMode:Qe==="block",throwOnError:!1,output:"html"})}),te=te.replace(/▁/g,"\u2581\u2581\u2581"),l(),ne){var ce=document.createElement("div");return ce.innerHTML=te,ce.innerText}return setTimeout(function(){return pe()},500),te},[Oe]),Le=Object(B.useRef)();u.WebkitLineClamp=Q,Q&&(De=Object(I.a)(Object(I.a)({},De),u));function Ie(de){var $=de.target;if($.tagName.toUpperCase()==="IMG"){if(Ce){var Z=$.getAttribute("src");rt(Z),Ze("image")}}else if($.tagName.toUpperCase()==="A"){var te=$.getAttribute("href");if(te.indexOf("office")>-1)de.preventDefault(),rt(te),Ze("office");else if(te.indexOf("application/pdf")>-1)de.preventDefault(),rt(te),Ze("pdf");else if(te.indexOf("text/html")>-1)de.preventDefault(),rt(te),Ze("html");else if(te.startsWith("#")){de.preventDefault();var le=document.getElementById(te.replace("#",""));le&&le.scrollIntoView(!0)}}}var pe=function(){var $,Z=($=Le.current)===null||$===void 0?void 0:$.querySelectorAll("video");Z==null||Z.forEach(function(te){if(te.oncontextmenu=function(){return!1},te.src.indexOf(".m3u8")>-1&&!te.canPlayType("application/vnd.apple.mpegurl")){if(W.a.isSupported()){var le=new W.a;le.loadSource(te.src),le.attachMedia(te)}}})};Object(B.useEffect)(function(){if(Le.current&&Ke&&(Ke.match(oe)&&window.PR.prettyPrint()),Le.current)return Le.current.addEventListener("click",Ie),function(){Le.current.removeEventListener("click",Ie),l(),o()}},[Ke,Le.current,Ie]);var se=function($){if(!me)return;$.target.nodeName==="IMG"?(Re.current.style.display="flex",Re.current.style.width=$.target.clientWidth+"px",Re.current.style.height=$.target.clientHeight+"px",Re.current.style.top=$.target.offsetTop+"px",Re.current.style.left=$.target.offsetLeft+"px",Ge.current.src=$.target.getAttribute("src")):Re.current.style.display="none"};return U.a.createElement("div",{style:{position:"relative"}},U.a.createElement("div",{ref:Le,style:Object(I.a)({},De),className:"".concat(J||""," markdown-body ").concat(ee.a.mdBody),onMouseOver:se,dangerouslySetInnerHTML:{__html:Ke}}),U.a.createElement("div",{ref:Re,className:ee.a.button},U.a.createElement(V.a,null,U.a.createElement(G.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),U.a.createElement(G.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),U.a.createElement("img",{ref:Ge,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),U.a.createElement(H.a,{close:!0,data:He,type:He!=null&&He.length?Se:"",style:Object(I.a)({},ke),onClose:function(){return rt("")}}))}},"9VGf":function(st,ze,q){"use strict";q.d(ze,"a",function(){return A});var re=q("cDcd"),V=q.n(re);function A(G,I){var R=Object(re.useRef)();Object(re.useEffect)(function(){R.current=G}),Object(re.useEffect)(function(){function B(){R.current()}if(I!==null){var U=setInterval(B,I);return function(){return clearInterval(U)}}},[I])}},BU3w:function(st,ze,q){"use strict";q.d(ze,"a",function(){return R});var re=q("MNnm"),V="rc-util-key";function A(B){if(B.attachTo)return B.attachTo;var U=document.querySelector("head");return U||document.body}function G(B){var U,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(re.a)())return null;var L=document.createElement("style");if((U=k.csp)===null||U===void 0?void 0:U.nonce){var y;L.nonce=(y=k.csp)===null||y===void 0?void 0:y.nonce}L.innerHTML=B;var x=A(k),O=x.firstChild;return k.prepend&&x.prepend?x.prepend(L):k.prepend&&O?x.insertBefore(L,O):x.appendChild(L),L}var I=new Map;function R(B,U){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},L=A(k);if(!I.has(L)){var y=G("",k),x=y.parentNode;I.set(L,x),x.removeChild(y)}var O=Array.from(I.get(L).children).find(function(o){return o.tagName==="STYLE"&&o[V]===U});if(O){var C,T;if(((C=k.csp)===null||C===void 0?void 0:C.nonce)&&O.nonce!==((T=k.csp)===null||T===void 0?void 0:T.nonce)){var g;O.nonce=(g=k.csp)===null||g===void 0?void 0:g.nonce}return O.innerHTML!==B&&(O.innerHTML=B),O}var d=G(B,k);return d[V]=U,d}},Bd2K:function(st,ze,q){(function(re){re(q("VrN/"),q("osHv"))})(function(re){re.defineOption("autoCloseTags",!1,function(k,L,y){if(y!=re.Init&&y&&k.removeKeyMap("autoCloseTags"),!L)return;var x={name:"autoCloseTags"};(typeof L!="object"||L.whenClosing!==!1)&&(x["'/'"]=function(O){return R(O)}),(typeof L!="object"||L.whenOpening!==!1)&&(x["'>'"]=function(O){return G(O)}),k.addKeyMap(x)});var V=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],A=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function G(k){if(k.getOption("disableInput"))return re.Pass;for(var L=k.listSelections(),y=[],x=k.getOption("autoCloseTags"),O=0;OC.ch&&(u=u.slice(0,u.length-T.end+C.ch));var f=u.toLowerCase();if(!u||T.type=="string"&&(T.end!=C.ch||!/[\"\']/.test(T.string.charAt(T.string.length-1))||T.string.length==1)||T.type=="tag"&&o.close||T.string.indexOf("/")==C.ch-T.start-1||w&&B(w,f)>-1||U(k,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(d)||[],u,C,!0))return re.Pass;var _=typeof x=="object"&&x.emptyTags;if(_&&B(_,u)>-1){y[O]={text:"/>",newPos:re.Pos(C.line,C.ch+2)};continue}var b=p&&B(p,f)>-1;y[O]={indent:b,text:">"+(b?`
`:"")+""+u+">",newPos:b?re.Pos(C.line+1,0):re.Pos(C.line,C.ch+1)}}for(var h=typeof x=="object"&&x.dontIndentOnAutoClose,O=L.length-1;O>=0;O--){var c=y[O];k.replaceRange(c.text,L[O].head,L[O].anchor,"+insert");var l=k.listSelections().slice(0);l[O]={head:c.newPos,anchor:c.newPos},k.setSelections(l),!h&&c.indent&&(k.indentLine(c.newPos.line,null,!0),k.indentLine(c.newPos.line+1,null,!0))}}function I(k,L){for(var y=k.listSelections(),x=[],O=L?"/":"",C=k.getOption("autoCloseTags"),T=typeof C=="object"&&C.dontIndentOnSlash,g=0;g"&&(w+=">"),x[g]=w}if(k.replaceSelections(x),y=k.listSelections(),!T)for(var g=0;g=0&&L[d]==y;d--)++g;x=T.to;for(var d=1;d0){for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:"",L=[],y=0;ype.length)&&(se=pe.length);for(var de=0,$=new Array(se);de=pe.length?{done:!0}:{done:!1,value:pe[$++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return de=pe[Symbol.iterator](),de.next.bind(de)}function R(pe,se){return se={exports:{}},pe(se,se.exports),se.exports}var B=R(function(pe){function se(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function de($){pe.exports.defaults=$}pe.exports={defaults:se(),getDefaults:se,changeDefaults:de}}),U=B.defaults,k=B.getDefaults,L=B.changeDefaults,y=/[&<>"']/,x=/[&<>"']/g,O=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,T={"&":"&","<":"<",">":">",'"':""","'":"'"},g=function(se){return T[se]};function d(pe,se){if(se){if(y.test(pe))return pe.replace(x,g)}else if(O.test(pe))return pe.replace(C,g);return pe}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(pe){return pe.replace(o,function(se,de){return de=de.toLowerCase(),de==="colon"?":":de.charAt(0)==="#"?de.charAt(1)==="x"?String.fromCharCode(parseInt(de.substring(2),16)):String.fromCharCode(+de.substring(1)):""})}var s=/(^|[^\[])\^/g;function w(pe,se){pe=pe.source||pe,se=se||"";var de={replace:function(Z,te){return te=te.source||te,te=te.replace(s,"$1"),pe=pe.replace(Z,te),de},getRegex:function(){return new RegExp(pe,se)}};return de}var p=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(pe,se,de){if(pe){var $;try{$=decodeURIComponent(u(de)).replace(p,"").toLowerCase()}catch(Z){return null}if($.indexOf("javascript:")===0||$.indexOf("vbscript:")===0||$.indexOf("data:")===0)return null}se&&!f.test(de)&&(de=a(se,de));try{de=encodeURI(de).replace(/%25/g,"%")}catch(Z){return null}return de}var b={},h=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(pe,se){b[" "+pe]||(h.test(pe)?b[" "+pe]=pe+"/":b[" "+pe]=M(pe,"/",!0)),pe=b[" "+pe];var de=pe.indexOf(":")===-1;return se.substring(0,2)==="//"?de?se:pe.replace(c,"$1")+se:se.charAt(0)==="/"?de?se:pe.replace(l,"$1")+se:pe+se}var v={exec:function(){}};function m(pe){for(var se=1,de,$;se=0&&ce[_e]==="\\";)Ae=!Ae;return Ae?"|":" |"}),$=de.split(/ \|/),Z=0;if($.length>se)$.splice(se);else for(;$.length=$.length?Z.slice($.length):Z}).join(`
`)}var ve=function(){function pe(de){this.options=de||D}var se=pe.prototype;return se.space=function($){var Z=this.rules.block.newline.exec($);if(Z)return Z[0].length>1?{type:"space",raw:Z[0]}:{raw:`
`}},se.code=function($,Z){var te=this.rules.block.code.exec($);if(te){var le=Z[Z.length-1];if(le&&le.type==="paragraph")return{raw:te[0],text:te[0].trimRight()};var ce=te[0].replace(/^ {4}/gm,"");return{type:"code",raw:te[0],codeBlockStyle:"indented",text:this.options.pedantic?ce:P(ce,`
`)}}},se.fences=function($){var Z=this.rules.block.fences.exec($);if(Z){var te=Z[0],le=Te(te,Z[3]||"");return{type:"code",raw:te,lang:Z[2]?Z[2].trim():Z[2],text:le}}},se.heading=function($){var Z=this.rules.block.heading.exec($);if(Z)return{type:"heading",raw:Z[0],depth:Z[1].length,text:Z[2]}},se.nptable=function($){var Z=this.rules.block.nptable.exec($);if(Z){var te={type:"table",header:H(Z[1].replace(/^ *| *\| *$/g,"")),align:Z[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Z[3]?Z[3].replace(/\n$/,"").split(`
`):[],raw:Z[0]};if(te.header.length===te.align.length){var le=te.align.length,ce;for(ce=0;ce ?/gm,"");return{type:"blockquote",raw:Z[0],text:te}}},se.list=function($){var Z=this.rules.block.list.exec($);if(Z){for(var te=Z[0],le=Z[2],ce=le.length>1,Ae=le[le.length-1]===")",_e={type:"list",raw:te,ordered:ce,start:ce?+le.slice(0,-1):"",loose:!1,items:[]},Ue=Z[0].match(this.rules.block.item),Qe=!1,Ve,mt,dt,ot,Ct,bt,Bt,Ut=Ue.length,Et=0;Et1||this.options.smartLists&&dt!==le)&&(ot=Ue.slice(Et+1).join(`
`),_e.raw=_e.raw.substring(0,_e.raw.length-ot.length),Et=Ut-1)),Ct=Qe||/\n\n(?!\s*$)/.test(Ve),Et!==Ut-1&&(Qe=Ve.charAt(Ve.length-1)===`
`,Ct||(Ct=Qe)),Ct&&(_e.loose=!0),bt=/^\[[ xX]\] /.test(Ve),Bt=void 0,bt&&(Bt=Ve[1]!==" ",Ve=Ve.replace(/^\[[ xX]\] +/,"")),_e.items.push({type:"list_item",raw:te,task:bt,checked:Bt,loose:Ct,text:Ve});return _e}},se.html=function($){var Z=this.rules.block.html.exec($);if(Z)return{type:this.options.sanitize?"paragraph":"html",raw:Z[0],pre:!this.options.sanitizer&&(Z[1]==="pre"||Z[1]==="script"||Z[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Z[0]):Y(Z[0]):Z[0]}},se.def=function($){var Z=this.rules.block.def.exec($);if(Z){Z[3]&&(Z[3]=Z[3].substring(1,Z[3].length-1));var te=Z[1].toLowerCase().replace(/\s+/g," ");return{tag:te,raw:Z[0],href:Z[2],title:Z[3]}}},se.table=function($){var Z=this.rules.block.table.exec($);if(Z){var te={type:"table",header:H(Z[1].replace(/^ *| *\| *$/g,"")),align:Z[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Z[3]?Z[3].replace(/\n$/,"").split(`
`):[]};if(te.header.length===te.align.length){te.raw=Z[0];var le=te.align.length,ce;for(ce=0;ce/i.test(le[0])&&(Z=!1),!te&&/^<(pre|code|kbd|script)(\s|>)/i.test(le[0])?te=!0:te&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(le[0])&&(te=!1),{type:this.options.sanitize?"text":"html",raw:le[0],inLink:Z,inRawBlock:te,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(le[0]):Y(le[0]):le[0]}},se.link=function($){var Z=this.rules.inline.link.exec($);if(Z){var te=ee(Z[2],"()");if(te>-1){var le=Z[0].indexOf("!")===0?5:4,ce=le+Z[1].length+te;Z[2]=Z[2].substring(0,te),Z[0]=Z[0].substring(0,ce).trim(),Z[3]=""}var Ae=Z[2],_e="";if(this.options.pedantic){var Ue=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ae);Ue?(Ae=Ue[1],_e=Ue[3]):_e=""}else _e=Z[3]?Z[3].slice(1,-1):"";Ae=Ae.trim().replace(/^<([\s\S]*)>$/,"$1");var Qe=oe(Z,{href:Ae&&Ae.replace(this.rules.inline._escapes,"$1"),title:_e&&_e.replace(this.rules.inline._escapes,"$1")},Z[0]);return Qe}},se.reflink=function($,Z){var te;if((te=this.rules.inline.reflink.exec($))||(te=this.rules.inline.nolink.exec($))){var le=(te[2]||te[1]).replace(/\s+/g," ");if(le=Z[le.toLowerCase()],!le||!le.href){var ce=te[0].charAt(0);return{type:"text",raw:ce,text:ce}}var Ae=oe(te,le,te[0]);return Ae}},se.strong=function($,Z,te){te===void 0&&(te="");var le=this.rules.inline.strong.start.exec($);if(le&&(!le[1]||le[1]&&(te===""||this.rules.inline.punctuation.exec(te)))){Z=Z.slice(-1*$.length);var ce=le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ce.lastIndex=0;for(var Ae;(le=ce.exec(Z))!=null;)if(Ae=this.rules.inline.strong.middle.exec(Z.slice(0,le.index+3)),Ae)return{type:"strong",raw:$.slice(0,Ae[0].length),text:$.slice(2,Ae[0].length-2)}}},se.em=function($,Z,te){te===void 0&&(te="");var le=this.rules.inline.em.start.exec($);if(le&&(!le[1]||le[1]&&(te===""||this.rules.inline.punctuation.exec(te)))){Z=Z.slice(-1*$.length);var ce=le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ce.lastIndex=0;for(var Ae;(le=ce.exec(Z))!=null;)if(Ae=this.rules.inline.em.middle.exec(Z.slice(0,le.index+2)),Ae)return{type:"em",raw:$.slice(0,Ae[0].length),text:$.slice(1,Ae[0].length-1)}}},se.codespan=function($){var Z=this.rules.inline.code.exec($);if(Z){var te=Z[2].replace(/\n/g," "),le=/[^ ]/.test(te),ce=te.startsWith(" ")&&te.endsWith(" ");return le&&ce&&(te=te.substring(1,te.length-1)),te=Y(te,!0),{type:"codespan",raw:Z[0],text:te}}},se.br=function($){var Z=this.rules.inline.br.exec($);if(Z)return{type:"br",raw:Z[0]}},se.del=function($){var Z=this.rules.inline.del.exec($);if(Z)return{type:"del",raw:Z[0],text:Z[1]}},se.autolink=function($,Z){var te=this.rules.inline.autolink.exec($);if(te){var le,ce;return te[2]==="@"?(le=Y(this.options.mangle?Z(te[1]):te[1]),ce="mailto:"+le):(le=Y(te[1]),ce=le),{type:"link",raw:te[0],text:le,href:ce,tokens:[{type:"text",raw:le,text:le}]}}},se.url=function($,Z){var te;if(te=this.rules.inline.url.exec($)){var le,ce;if(te[2]==="@")le=Y(this.options.mangle?Z(te[0]):te[0]),ce="mailto:"+le;else{var Ae;do Ae=te[0],te[0]=this.rules.inline._backpedal.exec(te[0])[0];while(Ae!==te[0]);le=Y(te[0]),te[1]==="www."?ce="http://"+le:ce=le}return{type:"link",raw:te[0],text:le,href:ce,tokens:[{type:"text",raw:le,text:le}]}}},se.inlineText=function($,Z,te){var le=this.rules.inline.text.exec($);if(le){var ce;return Z?ce=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(le[0]):Y(le[0]):le[0]:ce=Y(this.options.smartypants?te(le[0]):le[0]),{type:"text",raw:le[0],text:ce}}},pe}(),ge=W.noopTest,he=W.edit,fe=W.merge,ae={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ge,table:ge,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ae._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ae._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ae.def=he(ae.def).replace("label",ae._label).replace("title",ae._title).getRegex(),ae.bullet=/(?:[*+-]|\d{1,9}[.)])/,ae.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ae.item=he(ae.item,"gm").replace(/bull/g,ae.bullet).getRegex(),ae.list=he(ae.list).replace(/bull/g,ae.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ae.def.source+")").getRegex(),ae._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ae._comment=//,ae.html=he(ae.html,"i").replace("comment",ae._comment).replace("tag",ae._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ae.paragraph=he(ae._paragraph).replace("hr",ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ae._tag).getRegex(),ae.blockquote=he(ae.blockquote).replace("paragraph",ae.paragraph).getRegex(),ae.normal=fe({},ae),ae.gfm=fe({},ae.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),ae.gfm.nptable=he(ae.gfm.nptable).replace("hr",ae.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ae._tag).getRegex(),ae.gfm.table=he(ae.gfm.table).replace("hr",ae.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ae._tag).getRegex(),ae.pedantic=fe({},ae.normal,{html:he(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ae._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ge,paragraph:he(ae.normal._paragraph).replace("hr",ae.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ae.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ge,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ge,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",me.punctuation=he(me.punctuation).replace(/punctuation/g,me._punctuation).getRegex(),me._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",me._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",me.em.start=he(me.em.start).replace(/punctuation/g,me._punctuation).getRegex(),me.em.middle=he(me.em.middle).replace(/punctuation/g,me._punctuation).replace(/overlapSkip/g,me._overlapSkip).getRegex(),me.em.endAst=he(me.em.endAst,"g").replace(/punctuation/g,me._punctuation).getRegex(),me.em.endUnd=he(me.em.endUnd,"g").replace(/punctuation/g,me._punctuation).getRegex(),me.strong.start=he(me.strong.start).replace(/punctuation/g,me._punctuation).getRegex(),me.strong.middle=he(me.strong.middle).replace(/punctuation/g,me._punctuation).replace(/blockSkip/g,me._blockSkip).getRegex(),me.strong.endAst=he(me.strong.endAst,"g").replace(/punctuation/g,me._punctuation).getRegex(),me.strong.endUnd=he(me.strong.endUnd,"g").replace(/punctuation/g,me._punctuation).getRegex(),me.blockSkip=he(me._blockSkip,"g").getRegex(),me.overlapSkip=he(me._overlapSkip,"g").getRegex(),me._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,me.autolink=he(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex(),me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,me.tag=he(me.tag).replace("comment",ae._comment).replace("attribute",me._attribute).getRegex(),me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,me._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,me.link=he(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex(),me.reflink=he(me.reflink).replace("label",me._label).getRegex(),me.reflinkSearch=he(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex(),me.normal=fe({},me),me.pedantic=fe({},me.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:he(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:he(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()}),me.gfm=fe({},me.normal,{escape:he(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&($="x"+$.toString(16)),se+=""+$+";";return se}var we=function(){function pe(de){this.tokens=[],this.tokens.links=Object.create(null),this.options=de||ne,this.options.tokenizer=this.options.tokenizer||new ve,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var $={block:Q.normal,inline:Ee.normal};this.options.pedantic?($.block=Q.pedantic,$.inline=Ee.pedantic):this.options.gfm&&($.block=Q.gfm,this.options.breaks?$.inline=Ee.breaks:$.inline=Ee.gfm),this.tokenizer.rules=$}pe.lex=function($,Z){var te=new pe(Z);return te.lex($)};var se=pe.prototype;return se.lex=function($){return $=$.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens($,this.tokens,!0),this.inline(this.tokens),this.tokens},se.blockTokens=function($,Z,te){Z===void 0&&(Z=[]),te===void 0&&(te=!0),$=$.replace(/^ +$/gm,"");for(var le,ce,Ae,_e;$;){if(le=this.tokenizer.space($)){$=$.substring(le.raw.length),le.type&&Z.push(le);continue}if(le=this.tokenizer.code($,Z)){$=$.substring(le.raw.length),le.type?Z.push(le):(_e=Z[Z.length-1],_e.raw+=`
`+le.raw,_e.text+=`
`+le.text);continue}if(le=this.tokenizer.fences($)){$=$.substring(le.raw.length),Z.push(le);continue}if(le=this.tokenizer.heading($)){$=$.substring(le.raw.length),Z.push(le);continue}if(le=this.tokenizer.nptable($)){$=$.substring(le.raw.length),Z.push(le);continue}if(le=this.tokenizer.hr($)){$=$.substring(le.raw.length),Z.push(le);continue}if(le=this.tokenizer.blockquote($)){$=$.substring(le.raw.length),le.tokens=this.blockTokens(le.text,[],te),Z.push(le);continue}if(le=this.tokenizer.list($)){for($=$.substring(le.raw.length),Ae=le.items.length,ce=0;ce0)for(;(Ue=this.tokenizer.rules.inline.reflinkSearch.exec(_e))!=null;)Qe.includes(Ue[0].slice(Ue[0].lastIndexOf("[")+1,-1))&&(_e=_e.slice(0,Ue.index)+"["+"a".repeat(Ue[0].length-2)+"]"+_e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ue=this.tokenizer.rules.inline.blockSkip.exec(_e))!=null;)_e=_e.slice(0,Ue.index)+"["+"a".repeat(Ue[0].length-2)+"]"+_e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;$;){if(Ae=this.tokenizer.escape($)){$=$.substring(Ae.raw.length),Z.push(Ae);continue}if(Ae=this.tokenizer.tag($,te,le)){$=$.substring(Ae.raw.length),te=Ae.inLink,le=Ae.inRawBlock,Z.push(Ae);continue}if(Ae=this.tokenizer.link($)){$=$.substring(Ae.raw.length),Ae.type==="link"&&(Ae.tokens=this.inlineTokens(Ae.text,[],!0,le)),Z.push(Ae);continue}if(Ae=this.tokenizer.reflink($,this.tokens.links)){$=$.substring(Ae.raw.length),Ae.type==="link"&&(Ae.tokens=this.inlineTokens(Ae.text,[],!0,le)),Z.push(Ae);continue}if(Ae=this.tokenizer.strong($,_e,ce)){$=$.substring(Ae.raw.length),Ae.tokens=this.inlineTokens(Ae.text,[],te,le),Z.push(Ae);continue}if(Ae=this.tokenizer.em($,_e,ce)){$=$.substring(Ae.raw.length),Ae.tokens=this.inlineTokens(Ae.text,[],te,le),Z.push(Ae);continue}if(Ae=this.tokenizer.codespan($)){$=$.substring(Ae.raw.length),Z.push(Ae);continue}if(Ae=this.tokenizer.br($)){$=$.substring(Ae.raw.length),Z.push(Ae);continue}if(Ae=this.tokenizer.del($)){$=$.substring(Ae.raw.length),Ae.tokens=this.inlineTokens(Ae.text,[],te,le),Z.push(Ae);continue}if(Ae=this.tokenizer.autolink($,ye)){$=$.substring(Ae.raw.length),Z.push(Ae);continue}if(!te&&(Ae=this.tokenizer.url($,ye))){$=$.substring(Ae.raw.length),Z.push(Ae);continue}if(Ae=this.tokenizer.inlineText($,le,Ce)){$=$.substring(Ae.raw.length),ce=Ae.raw.slice(-1),Z.push(Ae);continue}if($){var Ve="Infinite loop on byte: "+$.charCodeAt(0);if(this.options.silent){console.error(Ve);break}else throw new Error(Ve)}}return Z},V(pe,null,[{key:"rules",get:function(){return{block:Q,inline:Ee}}}]),pe}(),De=B.defaults,Pe=W.cleanUrl,ke=W.escape,Oe=function(){function pe(de){this.options=de||De}var se=pe.prototype;return se.code=function($,Z,te){var le=(Z||"").match(/\S*/)[0];if(this.options.highlight){var ce=this.options.highlight($,le);ce!=null&&ce!==$&&(te=!0,$=ce)}return le?''+(te?$:ke($,!0))+`
`:""+(te?$:ke($,!0))+`
`},se.blockquote=function($){return`
`+$+`
`},se.html=function($){return $},se.heading=function($,Z,te,le){return this.options.headerIds?"
`:""+$+"
`},se.hr=function(){return this.options.xhtml?`
`:`
`},se.list=function($,Z,te){var le=Z?"ol":"ul",ce=Z&&te!==1?' start="'+te+'"':"";return"<"+le+ce+`>
`+$+""+le+`>
`},se.listitem=function($){return""+$+`
`},se.checkbox=function($){return" "},se.paragraph=function($){return""+$+`
`},se.table=function($,Z){return Z&&(Z=""+Z+""),`
`},se.tablerow=function($){return`
`+$+`
`},se.tablecell=function($,Z){var te=Z.header?"th":"td",le=Z.align?"<"+te+' align="'+Z.align+'">':"<"+te+">";return le+$+""+te+`>
`},se.strong=function($){return""+$+""},se.em=function($){return""+$+""},se.codespan=function($){return""+$+""},se.br=function(){return this.options.xhtml?"
":"
"},se.del=function($){return""+$+""},se.link=function($,Z,te){if($=Pe(this.options.sanitize,this.options.baseUrl,$),$===null)return te;var le='"+te+"",le},se.image=function($,Z,te){if($=Pe(this.options.sanitize,this.options.baseUrl,$),$===null)return te;var le='
":">",le},se.text=function($){return $},pe}(),Re=function(){function pe(){}var se=pe.prototype;return se.strong=function($){return $},se.em=function($){return $},se.codespan=function($){return $},se.del=function($){return $},se.html=function($){return $},se.text=function($){return $},se.link=function($,Z,te){return""+te},se.image=function($,Z,te){return""+te},se.br=function(){return""},pe}(),Ge=function(){function pe(){this.seen={}}var se=pe.prototype;return se.slug=function($){var Z=$.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Z)){var te=Z;do this.seen[te]++,Z=te+"-"+this.seen[te];while(this.seen.hasOwnProperty(Z))}return this.seen[Z]=0,Z},pe}(),$e=B.defaults,Be=W.unescape,He=function(){function pe(de){this.options=de||$e,this.options.renderer=this.options.renderer||new Oe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Re,this.slugger=new Ge}pe.parse=function($,Z){var te=new pe(Z);return te.parse($)};var se=pe.prototype;return se.parse=function($,Z){Z===void 0&&(Z=!0);var te="",le,ce,Ae,_e,Ue,Qe,Ve,mt,dt,ot,Ct,bt,Bt,Ut,Et,Cr,Rr,lr,pr=$.length;for(le=0;le0&&Et.tokens[0].type==="text"?(Et.tokens[0].text=lr+" "+Et.tokens[0].text,Et.tokens[0].tokens&&Et.tokens[0].tokens.length>0&&Et.tokens[0].tokens[0].type==="text"&&(Et.tokens[0].tokens[0].text=lr+" "+Et.tokens[0].tokens[0].text)):Et.tokens.unshift({type:"text",text:lr}):Ut+=lr),Ut+=this.parse(Et.tokens,Bt),dt+=this.renderer.listitem(Ut,Rr,Cr);te+=this.renderer.list(dt,Ct,bt);continue}case"html":{te+=this.renderer.html(ot.text);continue}case"paragraph":{te+=this.renderer.paragraph(this.parseInline(ot.tokens));continue}case"text":{for(dt=ot.tokens?this.parseInline(ot.tokens):ot.text;le+1An error occurred:
"+qe(Ae.message+"",!0)+"
";throw Ae}}Le.options=Le.setOptions=function(pe){return rt(Le.defaults,pe),Ze(Le.defaults),Le},Le.getDefaults=Se,Le.defaults=Ke,Le.use=function(pe){var se=rt({},pe);if(pe.renderer&&function(){var $=Le.defaults.renderer||new Oe,Z=function(ce){var Ae=$[ce];$[ce]=function(){for(var _e=arguments.length,Ue=new Array(_e),Qe=0;Qe<_e;Qe++)Ue[Qe]=arguments[Qe];var Ve=pe.renderer[ce].apply($,Ue);return Ve===!1&&(Ve=Ae.apply($,Ue)),Ve}};for(var te in pe.renderer)Z(te);se.renderer=$}(),pe.tokenizer&&function(){var $=Le.defaults.tokenizer||new ve,Z=function(ce){var Ae=$[ce];$[ce]=function(){for(var _e=arguments.length,Ue=new Array(_e),Qe=0;Qe<_e;Qe++)Ue[Qe]=arguments[Qe];var Ve=pe.tokenizer[ce].apply($,Ue);return Ve===!1&&(Ve=Ae.apply($,Ue)),Ve}};for(var te in pe.tokenizer)Z(te);se.tokenizer=$}(),pe.walkTokens){var de=Le.defaults.walkTokens;se.walkTokens=function($){pe.walkTokens($),de&&de($)}}Le.setOptions(se)},Le.walkTokens=function(pe,se){for(var de=I(pe),$;!($=de()).done;){var Z=$.value;se(Z);switch(Z.type){case"table":{for(var te=I(Z.tokens.header),le;!(le=te()).done;){var ce=le.value;Le.walkTokens(ce,se)}for(var Ae=I(Z.tokens.cells),_e;!(_e=Ae()).done;)for(var Ue=_e.value,Qe=I(Ue),Ve;!(Ve=Qe()).done;){var mt=Ve.value;Le.walkTokens(mt,se)}break}case"list":{Le.walkTokens(Z.items,se);break}default:Z.tokens&&Le.walkTokens(Z.tokens,se)}}},Le.Parser=He,Le.parser=He.parse,Le.Renderer=Oe,Le.TextRenderer=Re,Le.Lexer=we,Le.lexer=we.lex,Le.Tokenizer=ve,Le.Slugger=Ge,Le.parse=Le;var Ie=Le;return Ie})},ELLl:function(st,ze,q){(function(re){re(q("VrN/"))})(function(re){var V={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},A=re.Pos;re.defineOption("autoCloseBrackets",!1,function(T,g,d){d&&d!=re.Init&&(T.removeKeyMap(I),T.state.closeBrackets=null),g&&(R(G(g,"pairs")),T.state.closeBrackets=g,T.addKeyMap(I))});function G(T,g){return g=="pairs"&&typeof T=="string"?T:typeof T=="object"&&T[g]!=null?T[g]:V[g]}var I={Backspace:k,Enter:L};function R(T){for(var g=0;g=0;u--){var w=o[u].head;T.replaceRange("",A(w.line,w.ch-1),A(w.line,w.ch+1),"+delete")}}function L(T){var g=U(T),d=g&&G(g,"explode");if(!d||T.getOption("disableInput"))return re.Pass;for(var o=T.listSelections(),u=0;u0;return{anchor:new A(T.anchor.line,T.anchor.ch+(g?-1:1)),head:new A(T.head.line,T.head.ch+(g?1:-1))}}function x(T,g){var d=U(T);if(!d||T.getOption("disableInput"))return re.Pass;var o=G(d,"pairs"),u=o.indexOf(g);if(u==-1)return re.Pass;for(var s=G(d,"closeBefore"),w=G(d,"triples"),p=o.charAt(u+1)==g,f=T.listSelections(),_=u%2==0,b,h=0;h=0&&T.getRange(l,A(l.line,l.ch+3))==g+g+g?a="skipThree":a="skip";else if(p&&l.ch>1&&w.indexOf(g)>=0&&T.getRange(A(l.line,l.ch-2),l)==g+g){if(l.ch>2&&/\bstring/.test(T.getTokenTypeAt(A(l.line,l.ch-2))))return re.Pass;a="addFour"}else if(p){var m=l.ch==0?" ":T.getRange(A(l.line,l.ch-1),l);if(!re.isWordChar(v)&&m!=g&&!re.isWordChar(m))a="both";else return re.Pass}else if(_&&(v.length===0||/\s/.test(v)||s.indexOf(v)>-1))a="both";else return re.Pass;if(!b)b=a;else if(b!=a)return re.Pass}var E=u%2?o.charAt(u-1):g,M=u%2?g:o.charAt(u+1);T.operation(function(){if(b=="skip")T.execCommand("goCharRight");else if(b=="skipThree")for(var F=0;F<3;F++)T.execCommand("goCharRight");else if(b=="surround"){for(var j=T.getSelections(),F=0;F0&&(ee.percent=ee.loaded/ee.total*100),W.onProgress(ee)});var P=new FormData;W.data&&Object.keys(W.data).forEach(function(Y){var ee=W.data[Y];if(Array.isArray(ee)){ee.forEach(function(oe){P.append(Y+"[]",oe)});return}P.append(Y,W.data[Y])}),W.file instanceof Blob?P.append(W.filename,W.file,W.file.name):P.append(W.filename,W.file),D.onerror=function(ee){W.onError(ee)},D.onload=function(){return D.status<200||D.status>=300?W.onError(I(W,D),R(D)):W.onSuccess(R(D),D)},D.open(W.method,W.action,!0),W.withCredentials&&"withCredentials"in D&&(D.withCredentials=!0);var H=W.headers||{};return H["X-Requested-With"]!==null&&D.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function(Y){H[Y]!==null&&D.setRequestHeader(Y,H[Y])}),D.send(P),{abort:function(){D.abort()}}}var U=+new Date,k=0;function L(){return"rc-upload-"+U+"-"+ ++k}function y(W,D){return W.indexOf(D,W.length-D.length)!==-1}var x=function(W,D){if(W&&D){var P=Array.isArray(D)?D:D.split(","),H=W.name||"",Y=W.type||"",ee=Y.replace(/\/.*$/,"");return P.some(function(oe){var Te=oe.trim();return Te.charAt(0)==="."?y(H.toLowerCase(),Te.toLowerCase()):/\/\*$/.test(Te)?ee===Te.replace(/\/.*$/,""):Y===Te})}return!0};function O(W,D){var P=W.createReader(),H=[];function Y(){P.readEntries(function(ee){var oe=Array.prototype.slice.apply(ee);H=H.concat(oe);var Te=!oe.length;Te?D(H):Y()})}Y()}var C=function(D,P,H){var Y=function ee(oe,Te){Te=Te||"",oe.isFile?oe.file(function(ve){H(ve)&&(oe.fullPath&&!ve.webkitRelativePath&&(Object.defineProperties(ve,{webkitRelativePath:{writable:!0}}),ve.webkitRelativePath=oe.fullPath.replace(/^\//,""),Object.defineProperties(ve,{webkitRelativePath:{writable:!1}})),P([ve]))}):oe.isDirectory&&O(oe,function(ve){ve.forEach(function(ge){ee(ge,""+Te+oe.name+"/")})})};D.forEach(function(ee){Y(ee.webkitGetAsEntry())})},T=C,g=Object.assign||function(W){for(var D=1;D=0)continue;if(!Object.prototype.hasOwnProperty.call(W,H))continue;P[H]=W[H]}return P}function w(W,D){if(!(W instanceof D))throw new TypeError("Cannot call a class as a function")}function p(W,D){if(!W)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:W}function f(W,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);W.prototype=Object.create(D&&D.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(W,D):W.__proto__=D)}var _=function(D){return Object.keys(D).reduce(function(P,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(P[H]=D[H]),P},{})},b=function(W){f(D,W);function D(){var P,H,Y,ee;w(this,D);for(var oe=arguments.length,Te=Array(oe),ve=0;ve1&&arguments[1]!==void 0?arguments[1]:1,de=Re.length,$=0;$1&&arguments[1]!==void 0?arguments[1]:!1;return Object(_.a)(P).map(function(Y,ee){if(!I.isValidElement(Y)||!Y.type)return null;var oe=Y.type.isSelectOptGroup,Te=Y.key,ve=Y.props,ge=ve.children,he=Object(B.a)(ve,["children"]);return H||!oe?b(Y):Object(f.a)(Object(f.a)({key:"__RC_SELECT_GRP__".concat(Te===null?ee:Te,"__"),label:Te},he),{},{options:h(ge)})}).filter(function(Y){return Y})}var c=q("2Qr1"),l=q("qNPg"),a=q("U8pU"),v=q("Kwbf"),m=q("WKfj");function E(P){var H=P.mode,Y=P.options,ee=P.children,oe=P.backfill,Te=P.allowClear,ve=P.placeholder,ge=P.getInputElement,he=P.showSearch,fe=P.onSearch,ae=P.defaultOpen,me=P.autoFocus,J=P.labelInValue,ne=P.value,Q=P.inputValue,Ee=P.optionLabelProp,Ce=H==="multiple"||H==="tags",ye=he!==void 0?he:Ce||H==="combobox",we=Y||h(ee);if(Object(v.a)(H!=="tags"||we.every(function(Oe){return!Oe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var De=we.some(function(Oe){return Oe.options?Oe.options.some(function(Re){return typeof("value"in Re?Re.value:Re.key)=="number"}):typeof("value"in Oe?Oe.value:Oe.key)=="number"});Object(v.a)(!De,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(v.a)(H!=="combobox"||!Ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(v.a)(H==="combobox"||!oe,"`backfill` only works with `combobox` mode."),Object(v.a)(H==="combobox"||!ge,"`getInputElement` only work with `combobox` mode."),Object(v.b)(H!=="combobox"||!ge||!Te||!ve,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),fe&&!ye&&H!=="combobox"&&H!=="tags"&&Object(v.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(v.b)(!ae||me,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ne!=null){var Pe=Object(m.d)(ne);Object(v.a)(!J||Pe.every(function(Oe){return Object(a.a)(Oe)==="object"&&("key"in Oe||"value"in Oe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(v.a)(!Ce||Array.isArray(ne),"`value` should be array when `mode` is `multiple` or `tags`")}if(ee){var ke=null;Object(_.a)(ee).some(function(Oe){if(!I.isValidElement(Oe)||!Oe.type)return!1;var Re=Oe.type;if(Re.isSelectOption)return!1;if(Re.isSelectOptGroup){var Ge=Object(_.a)(Oe.props.children).every(function($e){return!I.isValidElement($e)||!Oe.type||$e.type.isSelectOption?!0:(ke=$e.type,!1)});return!Ge}return ke=Re,!0}),ke&&Object(v.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ke.displayName||ke.name||ke,"`.")),Object(v.a)(Q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var M=E,F=Object(l.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:h,flattenOptions:c.d,getLabeledValue:c.e,filterOptions:c.b,isValueDisabled:c.g,findValueOption:c.c,warningProps:M,fillOptionsWithMissingValue:c.a}),j=function(P){Object(A.a)(Y,P);var H=Object(G.a)(Y);function Y(){var ee;return Object(re.a)(this,Y),ee=H.apply(this,arguments),ee.selectRef=I.createRef(),ee.focus=function(){ee.selectRef.current.focus()},ee.blur=function(){ee.selectRef.current.blur()},ee}return Object(V.a)(Y,[{key:"render",value:function(){return I.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),Y}(I.Component);j.Option=s,j.OptGroup=p;var W=j,D=ze.c=W},M8RZ:function(st,ze,q){"use strict";q.d(ze,"a",function(){return k});var re=q("fWQN"),V=q("mtLc"),A=q("yKVA"),G=q("879j"),I=q("cDcd"),R=q.n(I),B=q("faye"),U=q.n(B),k=function(L){Object(A.a)(x,L);var y=Object(G.a)(x);function x(O){var C;Object(re.a)(this,x),C=y.call(this,O);var T=window.document;return C.node=T.createElement("div"),T.body.appendChild(C.node),C}return Object(V.a)(x,[{key:"render",value:function(){var C=this.props.children;return Object(B.createPortal)(C,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),x}(R.a.Component)},Ot1p:function(st,ze,q){"use strict";var re=q("2qtc"),V=q("kLXV"),A=q("rAM+"),G=q("miYZ"),I=q("tsqr"),R=q("9og8"),B=q("tJVT"),U=q("jrin"),k=q("WmNS"),L=q.n(k),y=q("cDcd"),x=q.n(y),O=q("VrN/"),C=q.n(O),T=q("bdgK"),g=q("p77/"),d=q("Bd2K"),o=q("ELLl"),u=q("19Vz"),s=q("lZu9"),w=q("+NIl"),p=q("kSUc"),f=q("9Bee"),_=function(ce){var Ae=ce.value,_e=Ae===void 0?"":Ae,Ue=ce.className,Qe=ce.showTextOnly,Ve=ce.showLines,mt=ce.style,dt=mt===void 0?{}:mt,ot=Object(y.useMemo)(function(){return""},[_e]);return x.a.createElement(x.a.Fragment,null,x.a.createElement("div",{dangerouslySetInnerHTML:{__html:ot}}))},b=q("0Owb"),h=q("dejd"),c=q("C+DQ"),l=q("1vsH"),a=q("m3rI"),v=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function m(ce){var Ae=ce.onActionCallback,_e=ce.title,Ue=ce.icon,Qe=ce.actionName,Ve=ce.className,mt=Ve===void 0?"":Ve,dt=ce.children;function ot(){Ae(Qe)}return x.a.createElement("a",{title:_e,className:mt,onClick:ot},x.a.createElement("i",{className:"md-iconfont ".concat(Ue)}),dt)}var E=function(ce){var Ae=ce.watch,_e=ce.showNullButton,Ue=ce.onActionCallback,Qe=ce.fullScreen,Ve=ce.insertTemp,mt=ce.hidetoolBar,dt=ce.uuid,ot=ce.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(l.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(l.G)("_educoder_session"),"&key=").concat(dt,"&api=").concat(encodeURIComponent(a.a.PROXY_SERVER)));var Ct=[].concat(v,[{title:"".concat(Ae?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ae?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return x.a.createElement("ul",{className:"markdown-toolbar-container"},!mt&&Ct.map(function(bt,Bt){return x.a.createElement("li",{key:Bt},bt.actionName?x.a.createElement(m,Object(b.a)({},bt,{onActionCallback:Ue})):x.a.createElement("span",{className:"v-line"}))}),_e?x.a.createElement("li",null,x.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ue},x.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ve&&x.a.createElement("li",null,x.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ve),onActionCallback:Ue},x.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),x.a.createElement("li",{className:"btn-full-screen"},x.a.createElement(m,{icon:"".concat(Qe?"icon-shrink":"icon-enlarge"),title:Qe?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ue})))},M=q("M8RZ"),F=q("+L6B"),j=q("2/Rp"),W=q("y8nQ"),D=q("Vl3Y"),P=q("5NDa"),H=q("5rEg"),Y={labelCol:{span:4},wrapperCol:{span:20}},ee=function(ce){var Ae=ce.callback,_e=ce.onCancel;function Ue(Qe){Ae(Qe)}return x.a.createElement(D.a,Object(b.a)({},Y,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ue}),x.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},x.a.createElement(H.a,null)),x.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},x.a.createElement(H.a,null)),x.a.createElement("div",{className:"flex-container flex-end"},x.a.createElement(j.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(j.a,{type:"ghost",onClick:_e},"\u53D6\u6D88")))},oe=q("7ahc"),Te=q("HmJG"),ve=q("BjJ7"),ge=D.a.useForm,he={width:280,marginRight:10},fe={labelCol:{span:5},wrapperCol:{span:19}},ae=function(ce){var Ae=ce.callback,_e=ce.onCancel,Ue=ge(),Qe=Object(B.a)(Ue,1),Ve=Qe[0];function mt(Ct){Ae(Ct)}function dt(Ct,bt){if(Ct.status===-1){I.b.error(Ct.message);return}Ve.setFieldsValue({src:"/api/attachments/".concat(Ct.id),type:bt.type})}function ot(Ct){var bt=Ct.target.files[0];J(bt,dt)}return x.a.createElement(D.a,Object(b.a)({form:Ve},fe,{className:"upload-image-panel",onFinish:mt}),x.a.createElement(D.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},x.a.createElement("div",{className:"flex-container"},x.a.createElement(D.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},x.a.createElement(H.a,{style:he})),x.a.createElement(me,{onFileChange:ot}))),x.a.createElement(D.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},x.a.createElement(H.a,{style:{width:264}})),x.a.createElement(D.a.Item,{style:{textAlign:"right"}},x.a.createElement(j.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(j.a,{type:"ghost",onClick:_e},"\u53D6\u6D88")))};function me(ce){var Ae=ce.onFileChange;return x.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",x.a.createElement("input",{type:"file",onChange:Ae}))}function J(ce,Ae){if(!ce)throw new String("\u6CA1\u6709\u6587\u4EF6");var _e=new FormData;_e.append("editormd-image-file",ce),_e.append("file_param_name","editormd-image-file"),_e.append("byxhr","true");var Ue=new window.XMLHttpRequest;Ue.withCredentials=!0,Ue.addEventListener("load",function(Qe){Ae(JSON.parse(Qe.target.responseText),ce)},!1),Ue.addEventListener("error",function(Qe){console.error(Qe)},!1),Ue.open("POST","".concat(ve.a,"/api/attachments.json")),Ue.send(_e)}var ne=q("giR+"),Q=q("fyUT"),Ee=q("7Kak"),Ce=q("9yH6"),ye=Ce.a.Group,we={margin:"0 8px"},De=function(ce){var Ae=ce.callback,_e=ce.onCancel;function Ue(Qe){Ae(Qe)}return x.a.createElement(D.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ue},x.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},x.a.createElement("span",{style:we},"\u5355\u5143\u683C\u6570\uFF1A"),x.a.createElement("span",{style:we},"\u884C\u6570"),x.a.createElement(D.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},x.a.createElement(Q.a,null)),x.a.createElement("span",{style:we},"\u5217\u6570"),x.a.createElement(D.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},x.a.createElement(Q.a,null))),x.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},x.a.createElement("span",{style:we},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),x.a.createElement(D.a.Item,{name:"align"},x.a.createElement(ye,null,x.a.createElement(Ce.a,{value:"default"},x.a.createElement("i",{className:"fa fa-align-justify"})),x.a.createElement(Ce.a,{value:"left"},x.a.createElement("i",{className:"fa fa-align-left"})),x.a.createElement(Ce.a,{value:"center"},x.a.createElement("i",{className:"fa fa-align-center"})),x.a.createElement(Ce.a,{value:"right"},x.a.createElement("i",{className:"fa fa-align-right"}))))),x.a.createElement("div",{className:"flex-container flex-end"},x.a.createElement(j.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(j.a,{type:"ghost",onClick:_e},"\u53D6\u6D88")))},Pe=q("ErOA"),ke=q("7Cbv"),Oe="link",Re="upload-image",Ge="code-block",$e="add-table",Be="------------",He={default:Be,left:":".concat(Be),center:":".concat(Be,":"),right:"".concat(Be,":")},rt=q("9VGf"),Je,qe;function Se(){}var Ze=0,Ke=1e4,Le="\u2581",Ie=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function pe(ce){return/^\d+$/.test(ce)?"".concat(ce,"px"):ce}var se=navigator.platform.toUpperCase().indexOf("MAC")>=0,de=se?"Cmd":"Ctrl",$=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],Z=(Je={},Object(U.a)(Je,de+"-B","bold"),Object(U.a)(Je,de+"-I","italic"),Je),te=(qe={},Object(U.a)(qe,Oe,"\u6DFB\u52A0\u94FE\u63A5"),Object(U.a)(qe,Ge,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(U.a)(qe,Re,"\u6DFB\u52A0\u6587\u4EF6"),Object(U.a)(qe,$e,"\u6DFB\u52A0\u8868\u683C"),qe),le=ze.a=function(ce){var Ae=ce.defaultValue,_e=Ae===void 0?"":Ae,Ue=ce.onChange,Qe=ce.width,Ve=Qe===void 0?"100%":Qe,mt=ce.height,dt=mt===void 0?400:mt,ot=ce.miniToolbar,Ct=ot===void 0?!1:ot,bt=ce.isFocus,Bt=bt===void 0?!1:bt,Ut=ce.watch,Et=ce.insertTemp,Cr=ce.mode,Rr=Cr===void 0?"markdown":Cr,lr=ce.id,pr=lr===void 0?"markdown-editor-id":lr,fr=ce.showResizeBar,ia=fr===void 0?!1:fr,_r=ce.noStorage,Hn=_r===void 0?!1:_r,Kn=ce.showNullButton,Rt=Kn===void 0?!1:Kn,nt=ce.hidetoolBar,Pr=nt===void 0?!1:nt,mn=ce.fullScreen,Qt=mn===void 0?!1:mn,Tt=ce.onBlur,gr=ce.onCMBeforeChange,Mr=ce.onFullScreen,pn=ce.className,Ne=pn===void 0?"":pn,ct=ce.disablePaste,Gn=ct===void 0?!1:ct,gn=ce.placeholder,vn=gn===void 0?"":gn,Zr=ce.values,yn=Zr===void 0?"":Zr,ht=Object(y.useState)(null),_i=Object(B.a)(ht,2),je=_i[0],bn=_i[1],hr=Object(y.useState)(_e),zn=Object(B.a)(hr,2),Qr=zn[0],vr=zn[1],Vn=Object(y.useState)(Ut),Xn=Object(B.a)(Vn,2),yr=Xn[0],Yn=Xn[1],Ai=Object(y.useState)(Qt),$n=Object(B.a)(Ai,2),br=$n[0],Li=$n[1],aa=Object(y.useState)(""),Jn=Object(B.a)(aa,2),$t=Jn[0],Wr=Jn[1],oa=Object(y.useState)(0),qr=Object(B.a)(oa,2),Er=qr[0],Zn=qr[1],sa=Object(y.useState)(dt),Di=Object(B.a)(sa,2),Oi=Di[0],En=Di[1],Ri=Object(y.useState)(!1),Pi=Object(B.a)(Ri,2),la=Pi[0],xn=Pi[1],en=Object(y.useRef)(Object(ke.a)()),tn=Object(y.useRef)(!1),Tn=Object(y.useRef)(),kr=Object(y.useRef)(),Ir=Object(y.useRef)(),Ur=Object(y.useRef)(),Sn=Object(y.useRef)(),Mi=function(){var it=Object(R.a)(L.a.mark(function ft(){var lt,gt;return L.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,Object(Pe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:en.current}});case 2:gt=At.sent,gt!=null&&(lt=gt.attachments)!==null&<!==void 0&<.length&&(console.log("cm:",je,kr),gt.attachments.map(function(yt){yt.content_type.indexOf("image")>-1?je.replaceSelection(".concat(yt.content_type,")")):yt.content_type.indexOf("video")>-1?je.replaceSelection('')):yt.content_type.indexOf("pdf")>-1?je.replaceSelection('').concat(yt.name,"")):je.replaceSelection("[".concat(yt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(yt.id,"?type=").concat(yt.content_type,")"))}));case 4:case"end":return At.stop()}},ft)}));return function(){return it.apply(this,arguments)}}();Object(y.useEffect)(function(){vr(yn),je==null||je.setValue(yn)},[yn]),Object(y.useEffect)(function(){Mr==null||Mr(br)},[br]),Object(y.useEffect)(function(){if(kr.current){var it=C.a.fromTextArea(kr.current,{mode:Rr,lineNumbers:!Ct,lineWrapping:!0,value:_e,autoCloseTags:!0,autoCloseBrackets:!0});Bt&&it.focus();function ft(lt,gt){if(Gn){gt.preventDefault();return}var xt=gt.clipboardData;if(xt){var At=xt.types.toString(),yt=xt.items;if(At==="Files"||xt.types.indexOf("Files")>-1){if(gt.preventDefault(),Rr=="stex")return;try{var Ft,qt=yt[1];((Ft=yt[0])===null||Ft===void 0?void 0:Ft.kind)==="file"&&(qt=yt[0]);var vt=qt.getAsFile(),Fr=vt.name.split(".").pop();J(vt,function(St){if(St.id){var er,Vt,mr;(vt==null||((er=vt.type)===null||er===void 0)?void 0:er.indexOf("image"))>-1?it.replaceSelection(".concat(St.content_type,")")):(vt==null||((Vt=vt.type)===null||Vt===void 0)?void 0:Vt.indexOf("video"))>-1?it.replaceSelection('')):(vt==null||((mr=vt.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?it.replaceSelection('').concat(vt.name,"")):$.includes(Fr)?it.replaceSelection('').concat(vt.name,"")):it.replaceSelection("[".concat(vt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(St.id,"?type=").concat(St.content_type,")"))}else(St==null?void 0:St.status)===401&&(document.location.href="/user/login")})}catch(St){I.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return it.on("paste",ft),it.on("dragleave",function(lt,gt){Ir.current.classList.remove("mouse-hover-md")}),it.on("dragover",function(lt,gt){Ir.current.classList.add("mouse-hover-md")}),it.on("drop",function(lt,gt){Ir.current.classList.add("mouse-hover-md");var xt;if(xt=gt.dataTransfer.files,xt.length>0){gt.preventDefault(),gt.stopPropagation();for(var At=function(qt){var vt=xt[qt],Fr=vt.name.split(".").pop();J(vt,function(St){if(St.id){var er,Vt,mr;(vt==null||((er=vt.type)===null||er===void 0)?void 0:er.indexOf("image"))>-1?it.replaceSelection(".concat(St.content_type,")")):(vt==null||((Vt=vt.type)===null||Vt===void 0)?void 0:Vt.indexOf("video"))>-1?it.replaceSelection('')):(vt==null||((mr=vt.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?it.replaceSelection('').concat(vt.name,"")):$.includes(Fr)?it.replaceSelection('').concat(vt.name,"")):it.replaceSelection("[".concat(vt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(St.id,"?type=").concat(St.content_type,")"))}else(St==null?void 0:St.status)===401&&(document.location.href="/user/login")})},yt=0;yt0||yt.target.offsetWidth>0)&&(ur(),je.setSize("100%","100%"),je.refresh())}}catch(Ft){xt.e(Ft)}finally{xt.f()}});return lt.observe(kr.current.parentElement),lt}if(je){var ft=it();return function(){ft.unobserve(kr.current.parentElement)}}},[je,ur]),Object(y.useEffect)(function(){if(je){for(var it=[],ft=function(){var yt=gt[lt];xt=Object(B.a)(yt,2);var Ft=xt[0],qt=xt[1],vt=Object(U.a)({},Ft,function(){ki(qt)});it.push(vt),je.addKeyMap(vt)},lt=0,gt=Object.entries(Z);lt0){var it=new Date().getTime(),ft=window.sessionStorage.getItem(pr);it>=Er+Ke&&(!ft||ft!==Qr)&&(window.sessionStorage.setItem(pr,Qr),xn(!0))}},Ke),Object(y.useEffect)(function(){Yn(Ut)},[je,Ut]),Object(y.useEffect)(function(){je&&(Bt&&je.focus())},[je,Bt]),Object(y.useEffect)(function(){if(yr&&je){var it=je.getScrollerElement();function ft(lt){var gt=lt.target;if(Sn.current){var xt=gt.scrollTop/gt.scrollHeight;Sn.current.scrollTop=Sn.current.scrollHeight*xt}}return it.addEventListener("scroll",ft),function(){it.removeEventListener("scroll",ft)}}},[je,yr]),Object(y.useEffect)(function(){if(je&&gr){function it(ft,lt){gr(ft,lt)}return je.on("beforeChange",it),function(){je.off("beforeChange",it)}}},[je,gr]),Object(y.useEffect)(function(){if(je&&Tt){function it(){Tt(je.getValue())}return je.on("blur",it),function(){je.off("blur",it)}}},[je,Tt]),Object(y.useEffect)(function(){if(je){function it(ft){var lt=ft.getValue();vr(lt),Zn(new Date().getTime()),ft.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ue&&Ue(lt)}return je.on("change",it),function(){je.off("change",it)}}},[je,Ue]),Object(y.useEffect)(function(){je&&(_e==null?(je.setValue(""),vr("")):_e!==je.getValue()&&(je.setValue(_e),vr(_e),je.setCursor(je.lineCount(),0)))},[je,_e]);var ki=Object(y.useCallback)(function(it){var ft=je.getCursor(),lt=je.getSelection(),gt=lt.split(`
`);switch(it){case"bold":return je.replaceSelection("**"+lt+"**"),lt===""&&je.setCursor(ft.line,ft.ch+2),je.focus();case"italic":return je.replaceSelection("*"+lt+"*"),lt===""&&je.setCursor(ft.line,ft.ch+1),je.focus();case"code":return je.replaceSelection("`"+lt+"`"),lt===""&&je.setCursor(ft.line,ft.ch+1),je.focus();case"inline-latex":return je.replaceSelection("`$$"+lt+"$$`"),lt===""&&je.setCursor(ft.line,ft.ch+3),je.focus();case"latex":return je.replaceSelection("```latex\n"+lt+"\n```"),je.setCursor(ft.line+1,lt.length+1),je.focus();case"line-break":return je.replaceSelection(`
`),je.focus();case"list-ul":return lt===""?je.replaceSelection("- "+lt):je.replaceSelection(gt.map(function(xt){return xt===""?"":"- ".concat(xt)}).join(`
`)),je.focus();case"list-ol":return lt===""?je.replaceSelection("1. "+lt):je.replaceSelection(gt.map(function(xt,At){return xt===""?"":"".concat(At+1,". ").concat(xt)}).join(`
`)),je.focus();case"add-null-ch":return lt===""&&je.setCursor(ft.line,ft.ch+1),je.replaceSelection(Le),je.focus();case"inster-template-1":return lt===""&&je.setCursor(ft.line,ft.ch),je.replaceSelection(Ie),je.focus();case"eraser":return je.setValue(""),je.focus();case"trigger-watch":return Yn(!yr),je.focus();case"trigger-full-screen":return Li(!br),je.focus();case Oe:Wr(Oe);return;case Ge:Wr(Ge);return;case Re:Wr(Re);return;case $e:Wr($e);return;default:throw new Error}},[je,yr,br]),wn=Object(y.useCallback)(function(it){Wr("");switch($t){case Oe:var ft=it.title,lt=it.link;return je.replaceSelection("[".concat(ft,"](").concat(lt,")")),je.focus();case Ge:var gt=it.language,xt=it.content;return je.replaceSelection(["```"+gt,xt,"```"].join(`
`)),je.focus();case Re:var At=it.src,yt=it.alt;return yt?je.replaceSelection(".concat(At,' "').concat(yt,'" )')):je.replaceSelection("")),je.focus();case $e:for(var Ft=it.row,qt=it.col,vt=it.align,Fr=`
`,St=0;St300&&(Ft=300);var qt=dt+Ft+"px";En(qt)}}return it.addEventListener("mousedown",gt),document.addEventListener("mousemove",At),document.addEventListener("mouseup",xt),function(){it.removeEventListener("mousedown",gt),document.removeEventListener("mousemove",At),document.removeEventListener("mouseup",xt)}}},[je,Ur]),Object(y.useEffect)(function(){En(dt)},[dt]);var Ar=pe(Ve),qn=pe(Oi),xr={width:Ar,height:qn},ei=Object(y.useMemo)(function(){if(Er){var it=new Date(Er),ft=it.getHours(),lt=it.getMinutes(),gt=it.getSeconds();return ft=ft<10?"0"+ft:ft,lt=lt<10?"0"+lt:lt,gt=gt<10?"0"+gt:gt,"".concat(ft,":").concat(lt,":").concat(gt)}return 0},[Er]);function Ii(){window.sessionStorage.removeItem(pr),xn(!1),Zn(0)}function rn(){xn(!1),Zn(0),je.setValue(window.sessionStorage.getItem(pr))}function ua(it,ft){var lt=je.getValue();lt=lt.replace(it,ft),vr(lt),je==null||je.setValue(lt)}return x.a.createElement(y.Fragment,null,x.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ir},x.a.createElement("div",{className:"markdown-editor-container ".concat(Ne," ").concat(yr?"on-preview":""," ").concat(Ct?"mini":""," ").concat(br?"full-screen":""),style:xr},x.a.createElement(E,{insertTemp:Et,watch:yr,fullScreen:br,showNullButton:Rt,onActionCallback:ki,hidetoolBar:Pr,uuid:en.current,setOpenPhones:function(){tn.current=!0}}),x.a.createElement("div",{className:"markdown-editor-body"},x.a.createElement("div",{className:"codemirror-container"},x.a.createElement("textarea",{ref:kr,placeholder:vn})),yr?x.a.createElement("div",{ref:Sn,className:"preview-container"},Rr==="stex"&&x.a.createElement(_,{value:Qr}),Rr!=="stex"&&x.a.createElement(f.a,{edit:!0,value:Qr,replaces:ua})):null))),ia?x.a.createElement("a",{ref:Ur,className:"editor-resize"}):null,x.a.createElement(M.a,null,te[$t]?x.a.createElement(V.a,{centered:!0,title:te[$t],visible:!0,onCancel:Hr,footer:null,className:"markdown-popup-form"},Qn):null))}},SJMd:function(st,ze){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var q,re,V,A=!1,G,I;window.PR_SHOULD_USE_CONTINUATION=!0;var R,B;(function(){var U=window,k=["break,continue,do,else,for,if,return,while"],L=[k,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],y=[L,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],x=[y,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],O=[y,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],C=[y,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],T="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",g=[y,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[k,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],u=[k,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],s=[k,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],w=[x,C,O,g,d,o,u,s],p=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,f="str",_="kwd",b="com",h="typ",c="lit",l="pun",a="pln",v="tag",m="dec",E="src",M="atn",F="atv",j="nocode",W="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function D(ye){for(var we=0,De=!1,Pe=!1,ke=0,Oe=ye.length;ke122||($<65||de>90||Ze.push([Math.max(65,de)|32,Math.min($,90)|32]),$<97||de>122||Ze.push([Math.max(97,de)&~32,Math.min($,122)&~32]))}}Ze.sort(function(ce,Ae){return ce[0]-Ae[0]||Ae[1]-ce[1]});for(var Z=[],te=[],Ie=0;Iele[0]&&(le[1]+1>le[0]&&Le.push("-"),Le.push(Be(le[1])))}return Le.push("]"),Le.join("")}function rt(qe){for(var Se=qe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ze=Se.length,Ke=[],Le=0,Ie=0;Le=2&&de==="["?Se[Le]=He(pe):de!=="\\"&&(Se[Le]=pe.replace(/[a-zA-Z]/g,function(te){var le=te.charCodeAt(0);return"["+String.fromCharCode(le&~32,le|32)+"]"}))}return Se.join("")}for(var Je=[],ke=0,Oe=ye.length;ke=0;)De[Je.charAt(qe)]=rt;var Se=rt[1],Ze=""+Se;$e.hasOwnProperty(Ze)||(Ge.push(Se),$e[Ze]=null)}Ge.push(/[\0-\uffff]/),Pe=D(Ge)})();var ke=we.length,Oe=function(Re){for(var Ge=Re.sourceCode,$e=Re.basePos,Be=Re.sourceNode,He=[$e,a],rt=0,Je=Ge.match(Pe)||[],qe={},Se=0,Ze=Je.length;Se=5&&Le.substring(0,5)==="lang-",pe&&!(Ie&&typeof Ie[1]=="string")&&(pe=!1,Le=E),pe||(qe[Ke]=Le)}var $=rt;if(rt+=Ke.length,!pe)He.push($e+$,Le);else{var Z=Ie[1],te=Ke.indexOf(Z),le=te+Z.length;Ie[2]&&(le=Ke.length-Ie[2].length,te=le-Z.length);var ce=Le.substring(5);H(Be,$e+$,Ke.substring(0,te),Oe,He),H(Be,$e+$+te,Z,me(ce,Z),He),H(Be,$e+$+le,Ke.substring(le),Oe,He)}}Re.decorations=He};return Oe}function Te(ye){var we=[],De=[];ye.tripleQuotedStrings?we.push([f,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ye.multiLineStrings?we.push([f,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):we.push([f,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ye.verbatimStrings&&De.push([f,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Pe=ye.hashComments;Pe&&(ye.cStyleComments?(Pe>1?we.push([b,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):we.push([b,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),De.push([f,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):we.push([b,/^#[^\r\n]*/,null,"#"])),ye.cStyleComments&&(De.push([b,/^\/\/[^\r\n]*/,null]),De.push([b,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ke=ye.regexLiterals;if(ke){var Oe=ke>1?"":`
\r`,Re=Oe?".":"[\\S\\s]",Ge="/(?=[^/*"+Oe+"])(?:[^/\\x5B\\x5C"+Oe+"]|\\x5C"+Re+"|\\x5B(?:[^\\x5C\\x5D"+Oe+"]|\\x5C"+Re+")*(?:\\x5D|$))+/";De.push(["lang-regex",RegExp("^"+W+"("+Ge+")")])}var $e=ye.types;$e&&De.push([h,$e]);var Be=(""+ye.keywords).replace(/^ | $/g,"");Be.length&&De.push([_,new RegExp("^(?:"+Be.replace(/[\s,]+/g,"|")+")\\b"),null]),we.push([a,/^\s+/,null,` \r
\xA0`]);var He="^.[^\\s\\w.$@'\"`/\\\\]*";return ye.regexLiterals&&(He+="(?!s*/)"),De.push([c,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[a,/^[a-z_$][a-z_$@0-9]*/i,null],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[a,/^\\[\s\S]?/,null],[l,new RegExp(He),null]),oe(we,De)}var ve=Te({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ge(ye,we,De){for(var Pe=/(?:^|\s)nocode(?:\s|$)/,ke=/\r\n?|\n/,Oe=ye.ownerDocument,Re=Oe.createElement("li");ye.firstChild;)Re.appendChild(ye.firstChild);var Ge=[Re];function $e(Se){var Ze=Se.nodeType;if(Ze==1&&!Pe.test(Se.className))if(Se.nodeName==="br")Be(Se),Se.parentNode&&Se.parentNode.removeChild(Se);else for(var Ke=Se.firstChild;Ke;Ke=Ke.nextSibling)$e(Ke);else if((Ze==3||Ze==4)&&De){var Le=Se.nodeValue,Ie=Le.match(ke);if(Ie){var pe=Le.substring(0,Ie.index);Se.nodeValue=pe;var se=Le.substring(Ie.index+Ie[0].length);if(se){var de=Se.parentNode;de.insertBefore(Oe.createTextNode(se),Se.nextSibling)}Be(Se),pe||Se.parentNode.removeChild(Se)}}}function Be(Se){for(;!Se.nextSibling;)if(Se=Se.parentNode,!Se)return;function Ze(Ie,pe){var se=pe?Ie.cloneNode(!1):Ie,de=Ie.parentNode;if(de){var $=Ze(de,1),Z=Ie.nextSibling;$.appendChild(se);for(var te=Z;te;te=Z)Z=te.nextSibling,$.appendChild(te)}return se}for(var Ke=Ze(Se.nextSibling,0),Le;(Le=Ke.parentNode)&&Le.nodeType===1;)Ke=Le;Ge.push(Ke)}for(var He=0;He=de&&($e+=2),Oe>=$&&(rt+=2)}}finally{Le&&(Le.style.display=Ie)}}var fe={};function ae(ye,we){for(var De=we.length;--De>=0;){var Pe=we[De];fe.hasOwnProperty(Pe)?U.console&&console.warn("cannot override language handler %s",Pe):fe[Pe]=ye}}function me(ye,we){return ye&&fe.hasOwnProperty(ye)||(ye=/^\s*]*(?:>|$)/],[b,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^