You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__virtualSpaces__Lists__Sy...

122 lines
432 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[274,6,7,14],{"+NIl":function(nt,Be,h){(function(W){W(h("VrN/"))})(function(W){"use strict";W.defineMode("stex",function(_e,ue){"use strict";function ke($,N){$.cmdState.push(N)}function we($){return $.cmdState.length>0?$.cmdState[$.cmdState.length-1]:null}function Y($){var N=$.cmdState.pop();N&&N.closeBracket()}function M($){for(var N=$.cmdState,P=N.length-1;P>=0;P--){var I=N[P];if(I.name=="DEFAULT")continue;return I}return{styleIdentifier:function(){return null}}}function A($,N,P){return function(){this.name=$,this.bracketNo=0,this.style=N,this.styles=P,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var w={};w.importmodule=A("importmodule","tag",["string","builtin"]),w.documentclass=A("documentclass","tag",["","atom"]),w.usepackage=A("usepackage","tag",["atom"]),w.begin=A("begin","tag",["atom"]),w.end=A("end","tag",["atom"]),w.label=A("label","tag",["atom"]),w.ref=A("ref","tag",["atom"]),w.eqref=A("eqref","tag",["atom"]),w.cite=A("cite","tag",["atom"]),w.bibitem=A("bibitem","tag",["atom"]),w.Bibitem=A("Bibitem","tag",["atom"]),w.RBibitem=A("RBibitem","tag",["atom"]),w.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function H($,N){$.f=N}function J($,N){var P;if($.match(/^\\[a-zA-Z@]+/)){var I=$.current().slice(1);return P=w.hasOwnProperty(I)?w[I]:w.DEFAULT,P=new P,ke(N,P),H(N,fe),P.style}if($.match(/^\\[$&%#{}_]/))return"tag";if($.match(/^\\[,;!\/\\]/))return"tag";if($.match("\\["))return H(N,function(ie,Ce){return ae(ie,Ce,"\\]")}),"keyword";if($.match("\\("))return H(N,function(ie,Ce){return ae(ie,Ce,"\\)")}),"keyword";if($.match("$$"))return H(N,function(ie,Ce){return ae(ie,Ce,"$$")}),"keyword";if($.match("$"))return H(N,function(ie,Ce){return ae(ie,Ce,"$")}),"keyword";var B=$.next();if(B=="%")return $.skipToEnd(),"comment";if(B=="}"||B=="]"){if(P=we(N),P)P.closeBracket(B),H(N,fe);else return"error";return"bracket"}else return B=="{"||B=="["?(P=w.DEFAULT,P=new P,ke(N,P),"bracket"):/\d/.test(B)?($.eatWhile(/[\w.%]/),"atom"):($.eatWhile(/[\w\-_]/),P=M(N),P.name=="begin"&&(P.argument=$.current()),P.styleIdentifier())}function ae($,N,P){if($.eatSpace())return null;if(P&&$.match(P))return H(N,J),"keyword";if($.match(/^\\[a-zA-Z@]+/))return"tag";if($.match(/^[a-zA-Z]+/))return"variable-2";if($.match(/^\\[$&%#{}_]/))return"tag";if($.match(/^\\[,;!\/]/))return"tag";if($.match(/^[\^_&]/))return"tag";if($.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if($.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var I=$.next();return I=="{"||I=="}"||I=="["||I=="]"||I=="("||I==")"?"bracket":I=="%"?($.skipToEnd(),"comment"):"error"}function fe($,N){var P=$.peek(),I;return P=="{"||P=="["?(I=we(N),I.openBracket(P),$.eat(P),H(N,J),"bracket"):/[ \t\r]/.test(P)?($.eat(P),null):(H(N,J),Y(N),J($,N))}return{startState:function(){var $=ue.inMathMode?function(N,P){return ae(N,P)}:J;return{cmdState:[],f:$}},copyState:function($){return{cmdState:$.cmdState.slice(),f:$.f}},token:function($,N){return N.f($,N)},blankLine:function($){$.f=J,$.cmdState.length=0},lineComment:"%"}}),W.defineMIME("text/x-stex","stex"),W.defineMIME("text/x-latex","stex")})},"19Vz":function(nt,Be,h){(function(W){W(h("VrN/"))})(function(W){W.defineOption("placeholder","",function(A,w,H){var J=H&&H!=W.Init;if(w&&!J)A.on("blur",we),A.on("change",Y),A.on("swapDoc",Y),W.on(A.getInputField(),"compositionupdate",A.state.placeholderCompose=function(){ke(A)}),Y(A);else if(!w&&J){A.off("blur",we),A.off("change",Y),A.off("swapDoc",Y),W.off(A.getInputField(),"compositionupdate",A.state.placeholderCompose),_e(A);var ae=A.getWrapperElement();ae.className=ae.className.replace(" CodeMirror-empty","")}w&&!A.hasFocus()&&we(A)});function _e(A){A.state.placeholder&&(A.state.placeholder.parentNode.removeChild(A.state.placeholder),A.state.placeholder=null)}function ue(A){_e(A);var w=A.state.placeholder=document.createElement("pre");w.style.cssText="height: 0; overflow: visible",w.style.direction=A.getOption("direction"),w.className="CodeMirror-placeholder CodeMirror-line-like";var H=A.getOption("placeholder");typeof H=="string"&&(H=document.createTextNode(H)),w.appendChild(H),A.display.lineSpace.insertBefore(w,A.display.lineSpace.firstChild)}function ke(A){setTimeout(function(){var w=!1,H=A.getInputField();H.nodeName=="TEXTAREA"?w=!H.value:A.lineCount()==1&&(w=!/[^\u200b]/.test(H.querySelector(".CodeMirror-line").textContent)),w?ue(A):_e(A)},20)}function we(A){M(A)&&ue(A)}function Y(A){var w=A.getWrapperElement(),H=M(A);w.className=w.className.replace(" CodeMirror-empty","")+(H?" CodeMirror-empty":""),H?ue(A):_e(A)}function M(A){return A.lineCount()===1&&A.getLine(0)===""}})},"1ZF9":function(nt,Be,h){nt.exports=h.p+"static/Authorize.cc9c212f.png"},"1eCo":function(nt,Be,h){(function(W){W(h("VrN/"))})(function(W){"use strict";var _e={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},ue={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};W.defineMode("xml",function(ke,we){var Y=ke.indentUnit,M={},A=we.htmlMode?_e:ue;for(var w in A)M[w]=A[w];for(var w in we)M[w]=we[w];var H,J;function ae(y,V){function D(R){return V.tokenize=R,R(y,V)}var _=y.next();if(_=="<")return y.eat("!")?y.eat("[")?y.match("CDATA[")?D(N("atom","]]>")):null:y.match("--")?D(N("comment","-->")):y.match("DOCTYPE",!0,!0)?(y.eatWhile(/[\w\._\-]/),D(P(1))):null:y.eat("?")?(y.eatWhile(/[\w\._\-]/),V.tokenize=N("meta","?>"),"meta"):(H=y.eat("/")?"closeTag":"openTag",V.tokenize=fe,"tag bracket");if(_=="&"){var G;return y.eat("#")?y.eat("x")?G=y.eatWhile(/[a-fA-F\d]/)&&y.eat(";"):G=y.eatWhile(/[\d]/)&&y.eat(";"):G=y.eatWhile(/[\w\.\-:]/)&&y.eat(";"),G?"atom":"error"}else return y.eatWhile(/[^&<]/),null}ae.isInText=!0;function fe(y,V){var D=y.next();if(D==">"||D=="/"&&y.eat(">"))return V.tokenize=ae,H=D==">"?"endTag":"selfcloseTag","tag bracket";if(D=="=")return H="equals",null;if(D=="<"){V.tokenize=ae,V.state=Ce,V.tagName=V.tagStart=null;var _=V.tokenize(y,V);return _?_+" tag error":"tag error"}else return/[\'\"]/.test(D)?(V.tokenize=$(D),V.stringStartCol=y.column(),V.tokenize(y,V)):(y.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function $(y){var V=function(D,_){for(;!D.eol();)if(D.next()==y){_.tokenize=fe;break}return"string"};return V.isInAttribute=!0,V}function N(y,V){return function(D,_){for(;!D.eol();){if(D.match(V)){_.tokenize=ae;break}D.next()}return y}}function P(y){return function(V,D){for(var _;(_=V.next())!=null;){if(_=="<")return D.tokenize=P(y+1),D.tokenize(V,D);if(_==">")if(y==1){D.tokenize=ae;break}else return D.tokenize=P(y-1),D.tokenize(V,D)}return"meta"}}function I(y,V,D){this.prev=y.context,this.tagName=V,this.indent=y.indented,this.startOfLine=D,(M.doNotIndent.hasOwnProperty(V)||y.context&&y.context.noIndent)&&(this.noIndent=!0)}function B(y){y.context&&(y.context=y.context.prev)}function ie(y,V){for(var D;;){if(!y.context)return;if(D=y.context.tagName,!M.contextGrabbers.hasOwnProperty(D)||!M.contextGrabbers[D].hasOwnProperty(V))return;B(y)}}function Ce(y,V,D){return y=="openTag"?(D.tagStart=V.column(),We):y=="closeTag"?he:Ce}function We(y,V,D){return y=="word"?(D.tagName=V.current(),J="tag",pe):M.allowMissingTagName&&y=="endTag"?(J="tag bracket",pe(y,V,D)):(J="error",We)}function he(y,V,D){if(y=="word"){var _=V.current();return D.context&&D.context.tagName!=_&&M.implicitlyClosed.hasOwnProperty(D.context.tagName)&&B(D),D.context&&D.context.tagName==_||M.matchClosing===!1?(J="tag",be):(J="tag error",Re)}else return M.allowMissingTagName&&y=="endTag"?(J="tag bracket",be(y,V,D)):(J="error",Re)}function be(y,V,D){return y!="endTag"?(J="error",be):(B(D),Ce)}function Re(y,V,D){return J="error",be(y,V,D)}function pe(y,V,D){if(y=="word")return J="attribute",de;if(y=="endTag"||y=="selfcloseTag"){var _=D.tagName,G=D.tagStart;return D.tagName=D.tagStart=null,y=="selfcloseTag"||M.autoSelfClosers.hasOwnProperty(_)?ie(D,_):(ie(D,_),D.context=new I(D,_,G==D.indented)),Ce}return J="error",pe}function de(y,V,D){return y=="equals"?Ae:(M.allowMissing||(J="error"),pe(y,V,D))}function Ae(y,V,D){return y=="string"?Q:y=="word"&&M.allowUnquoted?(J="string",pe):(J="error",pe(y,V,D))}function Q(y,V,D){return y=="string"?Q:pe(y,V,D)}return{startState:function(y){var V={tokenize:ae,state:Ce,indented:y||0,tagName:null,tagStart:null,context:null};return y!=null&&(V.baseIndent=y),V},token:function(y,V){if(!V.tagName&&y.sol()&&(V.indented=y.indentation()),y.eatSpace())return null;H=null;var D=V.tokenize(y,V);return(D||H)&&D!="comment"&&(J=null,V.state=V.state(H||D,y,V),J&&(D=J=="error"?D+" error":J)),D},indent:function(y,V,D){var _=y.context;if(y.tokenize.isInAttribute)return y.tagStart==y.indented?y.stringStartCol+1:y.indented+Y;if(_&&_.noIndent)return W.Pass;if(y.tokenize!=fe&&y.tokenize!=ae)return D?D.match(/^(\s*)/)[0].length:0;if(y.tagName)return M.multilineTagIndentPastTag!==!1?y.tagStart+y.tagName.length+2:y.tagStart+Y*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/<!\[CDATA\[/.test(V))return 0;var G=V&&/^<(\/)?([\w_:\.-]*)/.exec(V);if(G&&G[1])for(;_;)if(_.tagName==G[2]){_=_.prev;break}else if(M.implicitlyClosed.hasOwnProperty(_.tagName))_=_.prev;else break;else if(G)for(;_;){var R=M.contextGrabbers[_.tagName];if(R&&R.hasOwnProperty(G[2]))_=_.prev;else break}for(;_&&_.prev&&!_.startOfLine;)_=_.prev;return _?_.indent+Y:y.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(y){y.state==Ae&&(y.state=pe)},xmlCurrentTag:function(y){return y.tagName?{name:y.tagName,close:y.type=="closeTag"}:null},xmlCurrentContext:function(y){for(var V=[],D=y.context;D;D=D.prev)D.tagName&&V.push(D.tagName);return V.reverse()}}}),W.defineMIME("text/xml","xml"),W.defineMIME("application/xml","xml"),W.mimeModes.hasOwnProperty("text/html")||W.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"3vs6":function(nt,Be,h){"use strict";var W=h("+L6B"),_e=h("2/Rp"),ue=h("5Dmo"),ke=h("3S7+"),we=h("k1fw"),Y=h("miYZ"),M=h("tsqr"),A=h("9og8"),w=h("2qtc"),H=h("kLXV"),J=h("tJVT"),ae=h("WmNS"),fe=h.n(ae),$=h("q1tI"),N=h.n($),P=h("ttuQ"),I=h.n(P),B=h("ErOA"),ie=h("m3rI"),Ce=h("IE1O"),We=h("xKgJ"),he=h("NLgs"),be=h("Ty5D"),Re=h("9kvl"),pe=function(Ae){var Q=Ae.virtualSpaces,y=Ae.user,V=Ae.dispatch,D=Object($.useState)(!1),_=Object(J.a)(D,2),G=_[0],R=_[1],S=Object(be.i)(),C=Q.virtualSpacesDetails;Object($.useEffect)(function(){u()},[]);var u=function(){V({type:"virtualSpaces/getVirtualSpacesDetails",payload:{id:S==null?void 0:S.virtual_spacesId}})},s=function(){if(!Object(he.g)(V))return;H.a.confirm({centered:!0,width:424,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u7533\u8BF7\u52A0\u5165",icon:null,className:"custom-modal-divider",content:N.a.createElement("div",{className:"font14"},"\u786E\u8BA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u52A0\u5165\u8BE5\u865A\u62DF\u793E\u533A\u5417\uFF1F"),onOk:function(){var ce=Object(A.a)(fe.a.mark(function Z(){var q;return fe.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ee.next=2,Object(B.a)("/api/virtual_classrooms/".concat(S==null?void 0:S.virtual_spacesId,"/apply_become_member.json"),{method:"post"});case 2:q=ee.sent,(q==null?void 0:q.status)!==-1&&(M.b.success(q==null?void 0:q.message),u());case 4:case"end":return ee.stop()}},Z)}));function xe(){return ce.apply(this,arguments)}return xe}()})},g=function(){H.a.confirm({centered:!0,width:424,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u7533\u8BF7\u516C\u5F00",icon:null,className:"custom-modal-divider",content:N.a.createElement("div",{className:"font14"},N.a.createElement("p",null,"\u786E\u8BA4\u5411\u5E73\u53F0\u7533\u8BF7\u516C\u5F00\u865A\u62DF\u793E\u533A\u5417\uFF1F"),N.a.createElement("p",null,"\u516C\u5F00\u865A\u62DF\u793E\u533A\u9700\u7ECF\u8FC7\u5E73\u53F0\u6807\u51C6\u5316\u5BA1\u6838\uFF0C\u5BA1\u6838\u5468\u671F\u4E3A1-2\u5929\uFF0C"),N.a.createElement("div",null,"\u516C\u5F00\u7684\u865A\u62DF\u793E\u533A\u5C06\u5BF9\u5E73\u53F0\u6240\u6709\u4EBA\u53EF\u89C1\u3002")),onOk:function(){var ce=Object(A.a)(fe.a.mark(function Z(){var q;return fe.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ee.next=2,Object(B.a)("/api/virtual_classrooms/".concat(S==null?void 0:S.virtual_spacesId,"/apply_public.json"),{method:"post"});case 2:q=ee.sent,(q==null?void 0:q.status)!==-1&&(M.b.success(q==null?void 0:q.message),u());case 4:case"end":return ee.stop()}},Z)}));function xe(){return ce.apply(this,arguments)}return xe}()})},x=function(){var Ee=Object(A.a)(fe.a.mark(function ce(xe){var Z;return fe.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(B.a)("/api/virtual_classrooms/".concat(S==null?void 0:S.virtual_spacesId,".json"),{method:"put",body:xe});case 2:Z=K.sent,(Z==null?void 0:Z.status)===0&&(u(),R(!1));case 4:case"end":return K.stop()}},ce)}));return function(xe){return Ee.apply(this,arguments)}}(),U=function(){var Ee=Object(A.a)(fe.a.mark(function ce(xe){return fe.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:R(Object(we.a)({},C));case 1:case"end":return q.stop()}},ce)}));return function(xe){return Ee.apply(this,arguments)}}(),le=(C==null?void 0:C.is_member)||Object(We.v)();return N.a.createElement("div",{className:I.a.bg,style:{background:"url('".concat(ie.a.IMG_SERVER+(C==null?void 0:C.backbground_image_url),"') no-repeat center center")}},N.a.createElement("aside",null,N.a.createElement("div",null,N.a.createElement("div",{className:I.a.member},N.a.createElement("div",null,N.a.createElement(ke.a,{title:"\u6210\u5458\u603B\u6570"},N.a.createElement("i",{style:{color:"#FF8B58",fontSize:24},className:"iconfont icon-a-chengyuan1"})),N.a.createElement(ke.a,{title:"\u6210\u5458\u603B\u6570"},N.a.createElement("span",null,C==null?void 0:C.members_count))),N.a.createElement("div",null,N.a.createElement(ke.a,{title:"\u8D44\u6E90\u603B\u6570"},N.a.createElement("i",{style:{color:"#07C160",marginLeft:100},className:"iconfont icon-a-ziyuanku1"})),N.a.createElement(ke.a,{title:"\u8D44\u6E90\u603B\u6570"},N.a.createElement("span",null,C==null?void 0:C.resources_count)))),le&&N.a.createElement(_e.a,{disabled:(C==null?void 0:C.status)!==2,onClick:g,type:"primary"},N.a.createElement("i",{className:"iconfont icon-sheweigongkai2 mr5 font14"}),(C==null?void 0:C.status)===2?"\u7533\u8BF7\u516C\u5F00":(C==null?void 0:C.status)===0?"\u7533\u8BF7\u4E2D":"\u5DF2\u516C\u5F00"),!le&&N.a.createElement(_e.a,{onClick:s,type:"primary"},N.a.createElement("i",{className:"iconfont icon-shenqingjiaru2 mr5 font14"}),"\u7533\u8BF7\u52A0\u5165"))),N.a.createElement(Ce.b,{visible:G,title:"\u7F16\u8F91\u865A\u62DF\u793E\u533A",onCancel:function(){return R(!1)},onOk:x}))};Be.a=Object(Re.a)(function(de){var Ae=de.virtualSpaces,Q=de.user;return{virtualSpaces:Ae,user:Q}})(pe)},"500L":function(nt,Be,h){"use strict";h.d(Be,"a",function(){return he});var W=h("+L6B"),_e=h("2/Rp"),ue=h("2qtc"),ke=h("kLXV"),we=h("9og8"),Y=h("k1fw"),M=h("miYZ"),A=h("tsqr"),w=h("oBTY"),H=h("tJVT"),J=h("DZo9"),ae=h("8z0m"),fe=h("WmNS"),$=h.n(fe),N=h("q1tI"),P=h.n(N),I=h("m3rI"),B=h("wzkS"),ie=h("y5JW"),Ce=h("LtfV"),We=ae.a.Dragger;function he(be){var Re=[];return be&&be.length>0&&(Re=be.map(function(pe){return{uid:pe.id,id:pe.id,name:pe.title+ie.c+pe.filesize,url:pe.url,filesize:pe.filesize,status:"done",response:{id:pe.id}}})),Re}Be.b=function(be){var Re=be.value,pe=be.onChange,de=be.action,Ae=be.className,Q=be.maxSize,y=Q===void 0?150:Q,V=be.title,D=V===void 0?"\u4E0A\u4F20\u9644\u4EF6":V,_=be.showRemoveModal,G=_===void 0?!1:_,R=be.accept,S=R===void 0?"":R,C=be.additionalText,u=be.isDragger,s=be.number,g=s===void 0?1e3:s,x=be.aloneClear,U=x===void 0?!1:x,le=be.restrict,Ee=le===void 0?!0:le,ce=Object(N.useState)(!1),xe=Object(H.a)(ce,2),Z=xe[0],q=xe[1],K=Object(N.useState)(Re||[]),ee=Object(H.a)(K,2),p=ee[0],k=ee[1];Object(N.useEffect)(function(){Re&&(k(Object(w.a)(Re)),g===(Re==null?void 0:Re.length)&&q(!0))},[Re]);var m=function(){setTimeout(function(){p.pop(),k(Object(w.a)(p))},500)},j={multiple:!0,disabled:Z,accept:S,withCredentials:!0,fileList:p,beforeUpload:function(oe,Se){var Te=oe.size/1024/1024;return p.concat(Se).length>g?(p.pop(),k(Object(w.a)(p)),A.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(g,"\u4E2A\u6587\u4EF6")),U?Promise.reject():(m(),!1)):Te<y?!0:(A.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(y,"MB).")),U?Promise.reject():(m(),!1))},action:de||"".concat(I.a.API_SERVER,"/api/attachments.json"),onChange:function(oe){var Se=Object(w.a)(oe.fileList);Se.length>=g?q(!0):q(!1),k(Object(w.a)(Se)),Se=Se.map(function(Te){var ge;if(Te!=null&&(ge=Te.response)!==null&&ge!==void 0&&ge.id){var ve;Te.url="/api/attachments/".concat(Te==null||((ve=Te.response)===null||ve===void 0)?void 0:ve.id)}return Te.name.indexOf(ie.c)===-1&&(Te.name="".concat(Te.name).concat(ie.c).concat(Object(ie.a)(Te.size))),Object(Y.a)({},Te)}),console.log("info:",oe),pe(Se)},onRemove:function(){var z=Object(we.a)($.a.mark(function Se(Te){var ge;return $.a.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:if(ge=function(){var Ie=Object(we.a)($.a.mark(function Pe(){var Ue,Ke;return $.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(Ue=Te.response?Te.response.id:Te.id,!Ue){Xe.next=8;break}return Xe.next=4,Object(B.d)(Te.response?Te.response.id:Te.uid);case 4:return Ke=Xe.sent,Xe.abrupt("return",Ke);case 8:return Xe.abrupt("return",!0);case 9:case"end":return Xe.stop()}},Pe)}));return function(){return Ie.apply(this,arguments)}}(),!G){De.next=5;break}return De.abrupt("return",new Promise(function(Ie,Pe){ke.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:P.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var Ue=Object(we.a)($.a.mark(function tt(){var Xe;return $.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Oe.next=2,ge();case 2:Xe=Oe.sent,A.b.success("\u5220\u9664\u6210\u529F"),Ie(!0);case 5:case"end":return Oe.stop()}},tt)}));function Ke(){return Ue.apply(this,arguments)}return Ke}(),onCancel:function(){return Ie(!1)}})}));case 5:return De.next=7,ge();case 7:return De.abrupt("return",De.sent);case 8:case"end":return De.stop()}},Se)}));function oe(Se){return z.apply(this,arguments)}return oe}()};function ne(z){z.preventDefault(),z.stopPropagation()}return P.a.createElement("div",{className:"multi-upload ".concat(Ae||"")},u&&P.a.createElement(We,j,P.a.createElement("p",{className:"ant-upload-drag-icon"},P.a.createElement(Ce.a,null)),P.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",P.a.createElement("br",null),P.a.createElement("span",{style:{display:Ee?"block":"none"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",y,"MB) ")),C),!u&&P.a.createElement(ae.a,j,P.a.createElement(_e.a,{disabled:Z},D),P.a.createElement("span",{onClick:ne,style:{marginLeft:10,color:"#FA6400",display:Ee?"block":"none"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",y,"MB) ")))}},"7ahc":function(nt,Be,h){"use strict";h.d(Be,"a",function(){return We});var W=h("k1fw"),_e=h("0Owb"),ue=h("+L6B"),ke=h("2/Rp"),we=h("y8nQ"),Y=h("Vl3Y"),M=h("tJVT"),A=h("OaEy"),w=h("2fM7"),H=h("q1tI"),J=h.n(H),ae=h("VrN/"),fe=h.n(ae),$=h("p77/"),N=h.n($),P=h("c5Ni"),I=h.n(P),B=w.a.Option,ie={labelCol:{span:4},wrapperCol:{span:20}},Ce={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"]};Be.b=function(he){var be=he.callback,Re=he.onCancel,pe=Object(H.useState)("python"),de=Object(M.a)(pe,2),Ae=de[0],Q=de[1];function y(D){Q(Ce[D][1])}function V(D){be(D)}return J.a.createElement(Y.a,Object(_e.a)({},ie,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:V}),J.a.createElement(Y.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},J.a.createElement(w.a,{onChange:y},Object.keys(Ce).map(function(D){return J.a.createElement(B,{key:D,value:D},Ce[D][0])}))),J.a.createElement(Y.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},J.a.createElement(We,{mode:Ae})),J.a.createElement("div",{className:"flex-container flex-end"},J.a.createElement(ke.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),J.a.createElement(ke.a,{type:"ghost",onClick:Re},"\u53D6\u6D88")))};function We(he){var be=he.value,Re=he.onChange,pe=he.mode,de=he.options,Ae=de===void 0?{}:de,Q=Object(H.useRef)(),y=Object(H.useState)(),V=Object(M.a)(y,2),D=V[0],_=V[1];return Object(H.useEffect)(function(){if(D){function G(R){var S=R.getValue();Re&&Re(S)}return D.on("change",G),function(){D.off("change",G)}}},[D,Re]),Object(H.useEffect)(function(){D&&D.setOption("mode",pe)},[D,pe]),Object(H.useEffect)(function(){D&&((be!==D.getValue()||be==="")&&setTimeout(function(){D.setValue(be||" ")},300))},[D,be]),Object(H.useEffect)(function(){if(Q.current&&!D){var G=fe.a.fromTextArea(Q.current,Object(W.a)({mode:pe,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ae));_(G)}},[Q.current,D]),J.a.createElement("div",{className:"my-codemirror-container"},J.a.createElement("textarea",{ref:Q}))}},"7ixt":function(nt,Be,h){"use strict";h.d(Be,"a",function(){return ue});var W={adjustX:1,adjustY:1},_e=[0,0],ue={left:{points:["cr","cl"],overflow:W,offset:[-4,0],targetOffset:_e},right:{points:["cl","cr"],overflow:W,offset:[4,0],targetOffset:_e},top:{points:["bc","tc"],overflow:W,offset:[0,-4],targetOffset:_e},bottom:{points:["tc","bc"],overflow:W,offset:[0,4],targetOffset:_e},topLeft:{points:["bl","tl"],overflow:W,offset:[0,-4],targetOffset:_e},leftTop:{points:["tr","tl"],overflow:W,offset:[-4,0],targetOffset:_e},topRight:{points:["br","tr"],overflow:W,offset:[0,-4],targetOffset:_e},rightTop:{points:["tl","tr"],overflow:W,offset:[4,0],targetOffset:_e},bottomRight:{points:["tr","br"],overflow:W,offset:[0,4],targetOffset:_e},rightBottom:{points:["bl","br"],overflow:W,offset:[4,0],targetOffset:_e},bottomLeft:{points:["tl","bl"],overflow:W,offset:[0,4],targetOffset:_e},leftBottom:{points:["br","bl"],overflow:W,offset:[-4,0],targetOffset:_e}},ke=ue},"8EBN":function(nt,Be,h){(function(W){W(h("VrN/"))})(function(W){"use strict";W.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 _e=0;_e<W.modeInfo.length;_e++){var ue=W.modeInfo[_e];ue.mimes&&(ue.mime=ue.mimes[0])}W.findModeByMIME=function(ke){ke=ke.toLowerCase();for(var we=0;we<W.modeInfo.length;we++){var Y=W.modeInfo[we];if(Y.mime==ke)return Y;if(Y.mimes){for(var M=0;M<Y.mimes.length;M++)if(Y.mimes[M]==ke)return Y}}if(/\+xml$/.test(ke))return W.findModeByMIME("application/xml");if(/\+json$/.test(ke))return W.findModeByMIME("application/json")},W.findModeByExtension=function(ke){ke=ke.toLowerCase();for(var we=0;we<W.modeInfo.length;we++){var Y=W.modeInfo[we];if(Y.ext){for(var M=0;M<Y.ext.length;M++)if(Y.ext[M]==ke)return Y}}},W.findModeByFileName=function(ke){for(var we=0;we<W.modeInfo.length;we++){var Y=W.modeInfo[we];if(Y.file&&Y.file.test(ke))return Y}var M=ke.lastIndexOf("."),A=M>-1&&ke.substring(M+1,ke.length);if(A)return W.findModeByExtension(A)},W.findModeByName=function(ke){ke=ke.toLowerCase();for(var we=0;we<W.modeInfo.length;we++){var Y=W.modeInfo[we];if(Y.name.toLowerCase()==ke)return Y;if(Y.alias){for(var M=0;M<Y.alias.length;M++)if(Y.alias[M].toLowerCase()==ke)return Y}}}})},"9Bee":function(nt,Be,h){"use strict";var W=h("k1fw"),_e=h("tJVT"),ue=h("q1tI"),ke=h.n(ue),we=h("vg9a"),Y=h("DlQD"),M=h.n(Y),A=h("rUJ1");function w(g,x){var U=g.match(/^(\s+)(?:```)/);if(U===null)return x;var le=U[1];return x.split(`
`).map(function(Ee){var ce=Ee.match(/^\s+/);if(ce===null)return Ee;var xe=Object(_e.a)(ce,1),Z=xe[0];return Z.length>=le.length?Ee.slice(le.length):Ee}).join(`
`)}var H=[],J=["<ul>"],ae=new M.a.Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function $(){H.length=0,J=["<ul>"]}var N={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function P(g,x,U,le){if(x>=g.length||g[x].level<=U)return x;var Ee=g[x];le.push("<li><a href='#"+Ee.anchor+"'>"+Ee.text+"</a>"),x++;var ce=[];return x=P(g,x,Ee.level,ce),ce.length>0&&(le.push("<ul>"),ce.forEach(function(xe){le.push(xe)}),le.push("</ul>")),le.push("</li>"),x=P(g,x,U,le),x}function I(){return P(H,0,0,J),J.push("</ul>"),J.join("")}var B={heading:function(x){var U=fe.exec(x);if(U)return{type:"heading",raw:U[0],depth:U[1].length,text:U[2]}},fences:function(x){var U=this.rules.block.fences.exec(x);if(U){var le=U[0],Ee=w(le,U[3]||""),ce=U[2]?U[2].trim():U[2];if(["latex","katex","math"].indexOf(ce)>=0){var xe=We(),Z=Ee;Ee=xe,he[xe]={type:"block",expression:Z}}return{type:"code",raw:le,lang:ce,text:Ee}}}},ie=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Ce=0,We=function(){return"__special_katext_id_".concat(Ce++,"__")},he={};function be(){return he}function Re(){Ce=0,he={}}function pe(g){return g=g.replace(ie,function(x,U){var le=We();return he[le]={type:"inline",expression:U},le}),g}var de=ae.listitem;ae.listitem=function(g){return de(pe(g))};var Ae=ae.paragraph;ae.paragraph=function(g){return Ae(pe(g))};var Q=ae.tablecell;ae.tablecell=function(g,x){return Q(pe(g),x)},ae.code=function(g,x,U){var le=(x||"").match(/\S*/)[0];return le?["latex","katex","math"].indexOf(le)>=0?"<p class='editormd-tex'>".concat(g,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(x,'">').concat(U?g:Object(A.escape)(g,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(U?g:Object(A.escape)(g,!0))+"</code></pre>"},ae.heading=function(g,x,U){var le=this.options.headerPrefix+U.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return H.push({anchor:le,level:x,text:g}),"<h"+x+' id="'+le+'">'+g+"</h"+x+">"},M.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),M.a.use({tokenizer:B,renderer:ae});var y=M.a,V=h("SJMd"),D=h("ulZh"),_=h.n(D),G=h("m3rI"),R=h("Oy/b"),S=h("p5ED"),C=/<pre[^>]*>/g;function u(g){var x=document.createElement("div");return x.innerHTML=g,x.childNodes.length===0?"":x.childNodes[0].nodeValue}var s=Be.a=function(g){var x,U=g.value,le=U===void 0?"":U,Ee=g.className,ce=g.showTextOnly,xe=g.showLines,Z=g.style,q=Z===void 0?{}:Z,K=g.stylesPrev,ee=K===void 0?{}:K,p=(x=String(le))===null||x===void 0?void 0:x.replace(/<script.*?>|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),k=Object(ue.useState)(""),m=Object(_e.a)(k,2),j=m[0],ne=m[1],z=Object(ue.useMemo)(function(){try{var ge=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ve=/\"\/api\/attachments\/|\"\/attachments\/download\//g,De=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;p=p.replace(ge,"("+G.a.API_SERVER+"/api/attachments/").replace(ve,'"'+G.a.API_SERVER+"/api/attachments/").replace(De,'"'+G.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),p=p.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Ke){}var Ie=y(p),Pe=be();if(p.match(/\[TOC\]/)&&(Ie=Ie.replace("<p>[TOC]</p>",I()),$()),Ie=Ie.replace(/(__special_katext_id_\d+__)/g,function(Ke,tt){var Xe=Pe[tt],Ye=Xe.type,Oe=Xe.expression;return Object(R.renderToString)(u(Oe)||"",{displayMode:Ye==="block",throwOnError:!1,output:"html"})}),Ie=Ie.replace(/▁/g,"\u2581\u2581\u2581"),Re(),ce){var Ue=document.createElement("div");return Ue.innerHTML=Ie,Ue.innerText}return setTimeout(function(){return Te()},500),Ie},[p]),oe=Object(ue.useRef)();N.WebkitLineClamp=xe,xe&&(q=Object(W.a)(Object(W.a)({},q),N));function Se(ge){var ve=ge.target;if(ve.tagName.toUpperCase()==="A"){var De=ve.getAttribute("href");if(De.indexOf("office")>-1)ge.preventDefault(),ne(De);else if(De.startsWith("#")){ge.preventDefault();var Ie=document.getElementById(De.replace("#",""));Ie&&Ie.scrollIntoView(!0)}}}var Te=function(){var ve,De=(ve=oe.current)===null||ve===void 0?void 0:ve.querySelectorAll("video");De==null||De.forEach(function(Ie){if(Ie.oncontextmenu=function(){return!1},Ie.src.indexOf(".m3u8")>-1&&!Ie.canPlayType("application/vnd.apple.mpegurl")){if(_.a.isSupported()){var Pe=new _.a;Pe.loadSource(Ie.src),Pe.attachMedia(Ie)}}})};return Object(ue.useEffect)(function(){if(oe.current&&z&&(z.match(C)&&window.PR.prettyPrint()),oe.current)return oe.current.addEventListener("click",Se),function(){oe.current.removeEventListener("click",Se),Re(),$()}},[z,oe.current,Se]),ke.a.createElement(ke.a.Fragment,null,ke.a.createElement("div",{ref:oe,style:Object(W.a)({},q),className:"".concat(Ee||""," markdown-body "),dangerouslySetInnerHTML:{__html:z}}),ke.a.createElement(S.a,{close:!0,data:j,type:j!=null&&j.length?"office":"",style:Object(W.a)({},ee),onClose:function(){return ne("")}}))}},"9VGf":function(nt,Be,h){"use strict";h.d(Be,"a",function(){return ue});var W=h("q1tI"),_e=h.n(W);function ue(ke,we){var Y=Object(W.useRef)();Object(W.useEffect)(function(){Y.current=ke}),Object(W.useEffect)(function(){function M(){Y.current()}if(we!==null){var A=setInterval(M,we);return function(){return clearInterval(A)}}},[we])}},Bd2K:function(nt,Be,h){(function(W){W(h("VrN/"),h("osHv"))})(function(W){W.defineOption("autoCloseTags",!1,function(w,H,J){if(J!=W.Init&&J&&w.removeKeyMap("autoCloseTags"),!H)return;var ae={name:"autoCloseTags"};(typeof H!="object"||H.whenClosing!==!1)&&(ae["'/'"]=function(fe){return Y(fe)}),(typeof H!="object"||H.whenOpening!==!1)&&(ae["'>'"]=function(fe){return ke(fe)}),w.addKeyMap(ae)});var _e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ue=["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 ke(w){if(w.getOption("disableInput"))return W.Pass;for(var H=w.listSelections(),J=[],ae=w.getOption("autoCloseTags"),fe=0;fe<H.length;fe++){if(!H[fe].empty())return W.Pass;var $=H[fe].head,N=w.getTokenAt($),P=W.innerMode(w.getMode(),N.state),I=P.state,B=P.mode.xmlCurrentTag&&P.mode.xmlCurrentTag(I),ie=B&&B.name;if(!ie)return W.Pass;var Ce=P.mode.configuration=="html",We=typeof ae=="object"&&ae.dontCloseTags||Ce&&_e,he=typeof ae=="object"&&ae.indentTags||Ce&&ue;N.end>$.ch&&(ie=ie.slice(0,ie.length-N.end+$.ch));var be=ie.toLowerCase();if(!ie||N.type=="string"&&(N.end!=$.ch||!/[\"\']/.test(N.string.charAt(N.string.length-1))||N.string.length==1)||N.type=="tag"&&B.close||N.string.indexOf("/")==$.ch-N.start-1||We&&M(We,be)>-1||A(w,P.mode.xmlCurrentContext&&P.mode.xmlCurrentContext(I)||[],ie,$,!0))return W.Pass;var Re=typeof ae=="object"&&ae.emptyTags;if(Re&&M(Re,ie)>-1){J[fe]={text:"/>",newPos:W.Pos($.line,$.ch+2)};continue}var pe=he&&M(he,be)>-1;J[fe]={indent:pe,text:">"+(pe?`
`:"")+"</"+ie+">",newPos:pe?W.Pos($.line+1,0):W.Pos($.line,$.ch+1)}}for(var de=typeof ae=="object"&&ae.dontIndentOnAutoClose,fe=H.length-1;fe>=0;fe--){var Ae=J[fe];w.replaceRange(Ae.text,H[fe].head,H[fe].anchor,"+insert");var Q=w.listSelections().slice(0);Q[fe]={head:Ae.newPos,anchor:Ae.newPos},w.setSelections(Q),!de&&Ae.indent&&(w.indentLine(Ae.newPos.line,null,!0),w.indentLine(Ae.newPos.line+1,null,!0))}}function we(w,H){for(var J=w.listSelections(),ae=[],fe=H?"/":"</",$=w.getOption("autoCloseTags"),N=typeof $=="object"&&$.dontIndentOnSlash,P=0;P<J.length;P++){if(!J[P].empty())return W.Pass;var I=J[P].head,B=w.getTokenAt(I),ie=W.innerMode(w.getMode(),B.state),Ce=ie.state;if(H&&(B.type=="string"||B.string.charAt(0)!="<"||B.start!=I.ch-1))return W.Pass;var We,he=ie.mode.name!="xml"&&w.getMode().name=="htmlmixed";if(he&&ie.mode.name=="javascript")We=fe+"script";else if(he&&ie.mode.name=="css")We=fe+"style";else{var be=ie.mode.xmlCurrentContext&&ie.mode.xmlCurrentContext(Ce);if(!be||be.length&&A(w,be,be[be.length-1],I))return W.Pass;We=fe+be[be.length-1]}w.getLine(I.line).charAt(B.end)!=">"&&(We+=">"),ae[P]=We}if(w.replaceSelections(ae),J=w.listSelections(),!N)for(var P=0;P<J.length;P++)(P==J.length-1||J[P].head.line<J[P+1].head.line)&&w.indentLine(J[P].head.line)}function Y(w){return w.getOption("disableInput")?W.Pass:we(w,!0)}W.commands.closeTag=function(w){return we(w)};function M(w,H){if(w.indexOf)return w.indexOf(H);for(var J=0,ae=w.length;J<ae;++J)if(w[J]==H)return J;return-1}function A(w,H,J,ae,fe){if(!W.scanForClosingTag)return!1;var $=Math.min(w.lastLine()+1,ae.line+500),N=W.scanForClosingTag(w,ae,null,$);if(!N||N.tag!=J)return!1;for(var P=fe?1:0,I=H.length-1;I>=0&&H[I]==J;I--)++P;ae=N.to;for(var I=1;I<P;I++){var B=W.scanForClosingTag(w,ae,null,$);if(!B||B.tag!=J)return!1;ae=B.to}return!0}})},BjJ7:function(nt,Be,h){"use strict";h.d(Be,"d",function(){return _e}),h.d(Be,"c",function(){return ue}),h.d(Be,"e",function(){return ke}),h.d(Be,"b",function(){return we}),h.d(Be,"a",function(){return M});var W=h("m3rI");function _e(A){var w=!0;if(A.length>0){for(var H=0;H<A.length;H++)if(A[H].compile_success==0||!A[H].compile_success){w=!1;break}}else w=!1;return w}function ue(A){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",H=[],J=0;J<A.length;J++){var ae=A[J],fe=w?"".concat(w,"/").concat(ae.name):"".concat(ae.name);H.push({title:ae.name,isLeaf:!(ae.type==="tree"),key:fe})}return H}function ke(A,w,H){for(var J=0;J<A.length;J++){var ae=A[J];if(ae.key===w){ae.children=H;break}ae.children&&ke(ae.children,w,H)}return A}function we(A,w,H){var J;return function(){var ae=this,fe=arguments,$=function(){J=null,H||A.apply(ae,fe)},N=H&&!J;clearTimeout(J),J=setTimeout($,w),N&&A.apply(ae,fe)}}var Y=!0,M=W.a.API_SERVER},"C+DQ":function(nt,Be,h){},DlQD:function(nt,Be,h){(function(W,_e){nt.exports=_e()})(this,function(){"use strict";function W(X,F){for(var T=0;T<F.length;T++){var f=F[T];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(X,f.key,f)}}function _e(X,F,T){return F&&W(X.prototype,F),T&&W(X,T),X}function ue(X,F){if(!X)return;if(typeof X=="string")return ke(X,F);var T=Object.prototype.toString.call(X).slice(8,-1);if(T==="Object"&&X.constructor&&(T=X.constructor.name),T==="Map"||T==="Set")return Array.from(X);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return ke(X,F)}function ke(X,F){(F==null||F>X.length)&&(F=X.length);for(var T=0,f=new Array(F);T<F;T++)f[T]=X[T];return f}function we(X,F){var T;if(typeof Symbol=="undefined"||X[Symbol.iterator]==null){if(Array.isArray(X)||(T=ue(X))||F&&X&&typeof X.length=="number"){T&&(X=T);var f=0;return function(){return f>=X.length?{done:!0}:{done:!1,value:X[f++]}}}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 T=X[Symbol.iterator](),T.next.bind(T)}function Y(X,F){return F={exports:{}},X(F,F.exports),F.exports}var M=Y(function(X){function F(){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 T(f){X.exports.defaults=f}X.exports={defaults:F(),getDefaults:F,changeDefaults:T}}),A=M.defaults,w=M.getDefaults,H=M.changeDefaults,J=/[&<>"']/,ae=/[&<>"']/g,fe=/[<>"']|&(?!#?\w+;)/,$=/[<>"']|&(?!#?\w+;)/g,N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P=function(F){return N[F]};function I(X,F){if(F){if(J.test(X))return X.replace(ae,P)}else if(fe.test(X))return X.replace($,P);return X}var B=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ie(X){return X.replace(B,function(F,T){return T=T.toLowerCase(),T==="colon"?":":T.charAt(0)==="#"?T.charAt(1)==="x"?String.fromCharCode(parseInt(T.substring(2),16)):String.fromCharCode(+T.substring(1)):""})}var Ce=/(^|[^\[])\^/g;function We(X,F){X=X.source||X,F=F||"";var T={replace:function(v,b){return b=b.source||b,b=b.replace(Ce,"$1"),X=X.replace(v,b),T},getRegex:function(){return new RegExp(X,F)}};return T}var he=/[^\w:]/g,be=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Re(X,F,T){if(X){var f;try{f=decodeURIComponent(ie(T)).replace(he,"").toLowerCase()}catch(v){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}F&&!be.test(T)&&(T=y(F,T));try{T=encodeURI(T).replace(/%25/g,"%")}catch(v){return null}return T}var pe={},de=/^[^:]+:\/*[^/]*$/,Ae=/^([^:]+:)[\s\S]*$/,Q=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(X,F){pe[" "+X]||(de.test(X)?pe[" "+X]=X+"/":pe[" "+X]=G(X,"/",!0)),X=pe[" "+X];var T=X.indexOf(":")===-1;return F.substring(0,2)==="//"?T?F:X.replace(Ae,"$1")+F:F.charAt(0)==="/"?T?F:X.replace(Q,"$1")+F:X+F}var V={exec:function(){}};function D(X){for(var F=1,T,f;F<arguments.length;F++){T=arguments[F];for(f in T)Object.prototype.hasOwnProperty.call(T,f)&&(X[f]=T[f])}return X}function _(X,F){var T=X.replace(/\|/g,function(b,E,re){for(var me=!1,je=E;--je>=0&&re[je]==="\\";)me=!me;return me?"|":" |"}),f=T.split(/ \|/),v=0;if(f.length>F)f.splice(F);else for(;f.length<F;)f.push("");for(;v<f.length;v++)f[v]=f[v].trim().replace(/\\\|/g,"|");return f}function G(X,F,T){var f=X.length;if(f===0)return"";for(var v=0;v<f;){var b=X.charAt(f-v-1);if(b===F&&!T)v++;else if(b!==F&&T)v++;else break}return X.substr(0,f-v)}function R(X,F){if(X.indexOf(F[1])===-1)return-1;for(var T=X.length,f=0,v=0;v<T;v++)if(X[v]==="\\")v++;else if(X[v]===F[0])f++;else if(X[v]===F[1]&&(f--,f<0))return v;return-1}function S(X){X&&X.sanitize&&!X.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var C={escape:I,unescape:ie,edit:We,cleanUrl:Re,resolveUrl:y,noopTest:V,merge:D,splitCells:_,rtrim:G,findClosingBracket:R,checkSanitizeDeprecation:S},u=M.defaults,s=C.rtrim,g=C.splitCells,x=C.escape,U=C.findClosingBracket;function le(X,F,T){var f=F.href,v=F.title?x(F.title):null,b=X[1].replace(/\\([\[\]])/g,"$1");return X[0].charAt(0)!=="!"?{type:"link",raw:T,href:f,title:v,text:b}:{type:"image",raw:T,href:f,title:v,text:x(b)}}function Ee(X,F){var T=X.match(/^(\s+)(?:```)/);if(T===null)return F;var f=T[1];return F.split(`
`).map(function(v){var b=v.match(/^\s+/);if(b===null)return v;var E=b[0];return E.length>=f.length?v.slice(f.length):v}).join(`
`)}var ce=function(){function X(T){this.options=T||u}var F=X.prototype;return F.space=function(f){var v=this.rules.block.newline.exec(f);if(v)return v[0].length>1?{type:"space",raw:v[0]}:{raw:`
`}},F.code=function(f,v){var b=this.rules.block.code.exec(f);if(b){var E=v[v.length-1];if(E&&E.type==="paragraph")return{raw:b[0],text:b[0].trimRight()};var re=b[0].replace(/^ {4}/gm,"");return{type:"code",raw:b[0],codeBlockStyle:"indented",text:this.options.pedantic?re:s(re,`
`)}}},F.fences=function(f){var v=this.rules.block.fences.exec(f);if(v){var b=v[0],E=Ee(b,v[3]||"");return{type:"code",raw:b,lang:v[2]?v[2].trim():v[2],text:E}}},F.heading=function(f){var v=this.rules.block.heading.exec(f);if(v)return{type:"heading",raw:v[0],depth:v[1].length,text:v[2]}},F.nptable=function(f){var v=this.rules.block.nptable.exec(f);if(v){var b={type:"table",header:g(v[1].replace(/^ *| *\| *$/g,"")),align:v[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:v[3]?v[3].replace(/\n$/,"").split(`
`):[],raw:v[0]};if(b.header.length===b.align.length){var E=b.align.length,re;for(re=0;re<E;re++)/^ *-+: *$/.test(b.align[re])?b.align[re]="right":/^ *:-+: *$/.test(b.align[re])?b.align[re]="center":/^ *:-+ *$/.test(b.align[re])?b.align[re]="left":b.align[re]=null;for(E=b.cells.length,re=0;re<E;re++)b.cells[re]=g(b.cells[re],b.header.length);return b}}},F.hr=function(f){var v=this.rules.block.hr.exec(f);if(v)return{type:"hr",raw:v[0]}},F.blockquote=function(f){var v=this.rules.block.blockquote.exec(f);if(v){var b=v[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:v[0],text:b}}},F.list=function(f){var v=this.rules.block.list.exec(f);if(v){for(var b=v[0],E=v[2],re=E.length>1,me=E[E.length-1]===")",je={type:"list",raw:b,ordered:re,start:re?+E.slice(0,-1):"",loose:!1,items:[]},rt=v[0].match(this.rules.block.item),it=!1,lt,_t,bt,ht,Ft,wt,Ht,Rt=rt.length,yt=0;yt<Rt;yt++)lt=rt[yt],b=lt,_t=lt.length,lt=lt.replace(/^ *([*+-]|\d+[.)]) */,""),~lt.indexOf(`
`)&&(_t-=lt.length,lt=this.options.pedantic?lt.replace(/^ {1,4}/gm,""):lt.replace(new RegExp("^ {1,"+_t+"}","gm"),"")),yt!==Rt-1&&(bt=this.rules.block.bullet.exec(rt[yt+1])[0],(re?bt.length===1||!me&&bt[bt.length-1]===")":bt.length>1||this.options.smartLists&&bt!==E)&&(ht=rt.slice(yt+1).join(`
`),je.raw=je.raw.substring(0,je.raw.length-ht.length),yt=Rt-1)),Ft=it||/\n\n(?!\s*$)/.test(lt),yt!==Rt-1&&(it=lt.charAt(lt.length-1)===`
`,Ft||(Ft=it)),Ft&&(je.loose=!0),wt=/^\[[ xX]\] /.test(lt),Ht=void 0,wt&&(Ht=lt[1]!==" ",lt=lt.replace(/^\[[ xX]\] +/,"")),je.items.push({type:"list_item",raw:b,task:wt,checked:Ht,loose:Ft,text:lt});return je}},F.html=function(f){var v=this.rules.block.html.exec(f);if(v)return{type:this.options.sanitize?"paragraph":"html",raw:v[0],pre:!this.options.sanitizer&&(v[1]==="pre"||v[1]==="script"||v[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(v[0]):x(v[0]):v[0]}},F.def=function(f){var v=this.rules.block.def.exec(f);if(v){v[3]&&(v[3]=v[3].substring(1,v[3].length-1));var b=v[1].toLowerCase().replace(/\s+/g," ");return{tag:b,raw:v[0],href:v[2],title:v[3]}}},F.table=function(f){var v=this.rules.block.table.exec(f);if(v){var b={type:"table",header:g(v[1].replace(/^ *| *\| *$/g,"")),align:v[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:v[3]?v[3].replace(/\n$/,"").split(`
`):[]};if(b.header.length===b.align.length){b.raw=v[0];var E=b.align.length,re;for(re=0;re<E;re++)/^ *-+: *$/.test(b.align[re])?b.align[re]="right":/^ *:-+: *$/.test(b.align[re])?b.align[re]="center":/^ *:-+ *$/.test(b.align[re])?b.align[re]="left":b.align[re]=null;for(E=b.cells.length,re=0;re<E;re++)b.cells[re]=g(b.cells[re].replace(/^ *\| *| *\| *$/g,""),b.header.length);return b}}},F.lheading=function(f){var v=this.rules.block.lheading.exec(f);if(v)return{type:"heading",raw:v[0],depth:v[2].charAt(0)==="="?1:2,text:v[1]}},F.paragraph=function(f){var v=this.rules.block.paragraph.exec(f);if(v)return{type:"paragraph",raw:v[0],text:v[1].charAt(v[1].length-1)===`
`?v[1].slice(0,-1):v[1]}},F.text=function(f,v){var b=this.rules.block.text.exec(f);if(b){var E=v[v.length-1];return E&&E.type==="text"?{raw:b[0],text:b[0]}:{type:"text",raw:b[0],text:b[0]}}},F.escape=function(f){var v=this.rules.inline.escape.exec(f);if(v)return{type:"escape",raw:v[0],text:x(v[1])}},F.tag=function(f,v,b){var E=this.rules.inline.tag.exec(f);if(E)return!v&&/^<a /i.test(E[0])?v=!0:v&&/^<\/a>/i.test(E[0])&&(v=!1),!b&&/^<(pre|code|kbd|script)(\s|>)/i.test(E[0])?b=!0:b&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(E[0])&&(b=!1),{type:this.options.sanitize?"text":"html",raw:E[0],inLink:v,inRawBlock:b,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(E[0]):x(E[0]):E[0]}},F.link=function(f){var v=this.rules.inline.link.exec(f);if(v){var b=U(v[2],"()");if(b>-1){var E=v[0].indexOf("!")===0?5:4,re=E+v[1].length+b;v[2]=v[2].substring(0,b),v[0]=v[0].substring(0,re).trim(),v[3]=""}var me=v[2],je="";if(this.options.pedantic){var rt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(me);rt?(me=rt[1],je=rt[3]):je=""}else je=v[3]?v[3].slice(1,-1):"";me=me.trim().replace(/^<([\s\S]*)>$/,"$1");var it=le(v,{href:me&&me.replace(this.rules.inline._escapes,"$1"),title:je&&je.replace(this.rules.inline._escapes,"$1")},v[0]);return it}},F.reflink=function(f,v){var b;if((b=this.rules.inline.reflink.exec(f))||(b=this.rules.inline.nolink.exec(f))){var E=(b[2]||b[1]).replace(/\s+/g," ");if(E=v[E.toLowerCase()],!E||!E.href){var re=b[0].charAt(0);return{type:"text",raw:re,text:re}}var me=le(b,E,b[0]);return me}},F.strong=function(f,v,b){b===void 0&&(b="");var E=this.rules.inline.strong.start.exec(f);if(E&&(!E[1]||E[1]&&(b===""||this.rules.inline.punctuation.exec(b)))){v=v.slice(-1*f.length);var re=E[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;re.lastIndex=0;for(var me;(E=re.exec(v))!=null;)if(me=this.rules.inline.strong.middle.exec(v.slice(0,E.index+3)),me)return{type:"strong",raw:f.slice(0,me[0].length),text:f.slice(2,me[0].length-2)}}},F.em=function(f,v,b){b===void 0&&(b="");var E=this.rules.inline.em.start.exec(f);if(E&&(!E[1]||E[1]&&(b===""||this.rules.inline.punctuation.exec(b)))){v=v.slice(-1*f.length);var re=E[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;re.lastIndex=0;for(var me;(E=re.exec(v))!=null;)if(me=this.rules.inline.em.middle.exec(v.slice(0,E.index+2)),me)return{type:"em",raw:f.slice(0,me[0].length),text:f.slice(1,me[0].length-1)}}},F.codespan=function(f){var v=this.rules.inline.code.exec(f);if(v){var b=v[2].replace(/\n/g," "),E=/[^ ]/.test(b),re=b.startsWith(" ")&&b.endsWith(" ");return E&&re&&(b=b.substring(1,b.length-1)),b=x(b,!0),{type:"codespan",raw:v[0],text:b}}},F.br=function(f){var v=this.rules.inline.br.exec(f);if(v)return{type:"br",raw:v[0]}},F.del=function(f){var v=this.rules.inline.del.exec(f);if(v)return{type:"del",raw:v[0],text:v[1]}},F.autolink=function(f,v){var b=this.rules.inline.autolink.exec(f);if(b){var E,re;return b[2]==="@"?(E=x(this.options.mangle?v(b[1]):b[1]),re="mailto:"+E):(E=x(b[1]),re=E),{type:"link",raw:b[0],text:E,href:re,tokens:[{type:"text",raw:E,text:E}]}}},F.url=function(f,v){var b;if(b=this.rules.inline.url.exec(f)){var E,re;if(b[2]==="@")E=x(this.options.mangle?v(b[0]):b[0]),re="mailto:"+E;else{var me;do me=b[0],b[0]=this.rules.inline._backpedal.exec(b[0])[0];while(me!==b[0]);E=x(b[0]),b[1]==="www."?re="http://"+E:re=E}return{type:"link",raw:b[0],text:E,href:re,tokens:[{type:"text",raw:E,text:E}]}}},F.inlineText=function(f,v,b){var E=this.rules.inline.text.exec(f);if(E){var re;return v?re=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(E[0]):x(E[0]):E[0]:re=x(this.options.smartypants?b(E[0]):E[0]),{type:"text",raw:E[0],text:re}}},X}(),xe=C.noopTest,Z=C.edit,q=C.merge,K={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*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\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:xe,table:xe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};K._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,K._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,K.def=Z(K.def).replace("label",K._label).replace("title",K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}[.)])/,K.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,K.item=Z(K.item,"gm").replace(/bull/g,K.bullet).getRegex(),K.list=Z(K.list).replace(/bull/g,K.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+K.def.source+")").getRegex(),K._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",K._comment=/<!--(?!-?>)[\s\S]*?-->/,K.html=Z(K.html,"i").replace("comment",K._comment).replace("tag",K._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=Z(K._paragraph).replace("hr",K.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",K._tag).getRegex(),K.blockquote=Z(K.blockquote).replace("paragraph",K.paragraph).getRegex(),K.normal=q({},K),K.gfm=q({},K.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*|$)"}),K.gfm.nptable=Z(K.gfm.nptable).replace("hr",K.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",K._tag).getRegex(),K.gfm.table=Z(K.gfm.table).replace("hr",K.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",K._tag).getRegex(),K.pedantic=q({},K.normal,{html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",K._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:xe,paragraph:Z(K.normal._paragraph).replace("hr",K.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ee={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\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:xe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ee._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ee.punctuation=Z(ee.punctuation).replace(/punctuation/g,ee._punctuation).getRegex(),ee._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ee._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ee.em.start=Z(ee.em.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.middle=Z(ee.em.middle).replace(/punctuation/g,ee._punctuation).replace(/overlapSkip/g,ee._overlapSkip).getRegex(),ee.em.endAst=Z(ee.em.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.endUnd=Z(ee.em.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.start=Z(ee.strong.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.middle=Z(ee.strong.middle).replace(/punctuation/g,ee._punctuation).replace(/blockSkip/g,ee._blockSkip).getRegex(),ee.strong.endAst=Z(ee.strong.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.endUnd=Z(ee.strong.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.blockSkip=Z(ee._blockSkip,"g").getRegex(),ee.overlapSkip=Z(ee._overlapSkip,"g").getRegex(),ee._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ee._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ee._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])?)+(?![-_])/,ee.autolink=Z(ee.autolink).replace("scheme",ee._scheme).replace("email",ee._email).getRegex(),ee._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ee.tag=Z(ee.tag).replace("comment",K._comment).replace("attribute",ee._attribute).getRegex(),ee._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ee._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ee._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ee.link=Z(ee.link).replace("label",ee._label).replace("href",ee._href).replace("title",ee._title).getRegex(),ee.reflink=Z(ee.reflink).replace("label",ee._label).getRegex(),ee.reflinkSearch=Z(ee.reflinkSearch,"g").replace("reflink",ee.reflink).replace("nolink",ee.nolink).getRegex(),ee.normal=q({},ee),ee.pedantic=q({},ee.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:Z(/^!?\[(label)\]\((.*?)\)/).replace("label",ee._label).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee._label).getRegex()}),ee.gfm=q({},ee.normal,{escape:Z(ee.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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),ee.gfm.url=Z(ee.gfm.url,"i").replace("email",ee.gfm._extended_email).getRegex(),ee.breaks=q({},ee.gfm,{br:Z(ee.br).replace("{2,}","*").getRegex(),text:Z(ee.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var p={block:K,inline:ee},k=M.defaults,m=p.block,j=p.inline;function ne(X){return X.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function z(X){var F="",T,f,v=X.length;for(T=0;T<v;T++)f=X.charCodeAt(T),Math.random()>.5&&(f="x"+f.toString(16)),F+="&#"+f+";";return F}var oe=function(){function X(T){this.tokens=[],this.tokens.links=Object.create(null),this.options=T||k,this.options.tokenizer=this.options.tokenizer||new ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:m.normal,inline:j.normal};this.options.pedantic?(f.block=m.pedantic,f.inline=j.pedantic):this.options.gfm&&(f.block=m.gfm,this.options.breaks?f.inline=j.breaks:f.inline=j.gfm),this.tokenizer.rules=f}X.lex=function(f,v){var b=new X(v);return b.lex(f)};var F=X.prototype;return F.lex=function(f){return f=f.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(f,this.tokens,!0),this.inline(this.tokens),this.tokens},F.blockTokens=function(f,v,b){v===void 0&&(v=[]),b===void 0&&(b=!0),f=f.replace(/^ +$/gm,"");for(var E,re,me,je;f;){if(E=this.tokenizer.space(f)){f=f.substring(E.raw.length),E.type&&v.push(E);continue}if(E=this.tokenizer.code(f,v)){f=f.substring(E.raw.length),E.type?v.push(E):(je=v[v.length-1],je.raw+=`
`+E.raw,je.text+=`
`+E.text);continue}if(E=this.tokenizer.fences(f)){f=f.substring(E.raw.length),v.push(E);continue}if(E=this.tokenizer.heading(f)){f=f.substring(E.raw.length),v.push(E);continue}if(E=this.tokenizer.nptable(f)){f=f.substring(E.raw.length),v.push(E);continue}if(E=this.tokenizer.hr(f)){f=f.substring(E.raw.length),v.push(E);continue}if(E=this.tokenizer.blockquote(f)){f=f.substring(E.raw.length),E.tokens=this.blockTokens(E.text,[],b),v.push(E);continue}if(E=this.tokenizer.list(f)){for(f=f.substring(E.raw.length),me=E.items.length,re=0;re<me;re++)E.items[re].tokens=this.blockTokens(E.items[re].text,[],!1);v.push(E);continue}if(E=this.tokenizer.html(f)){f=f.substring(E.raw.length),v.push(E);continue}if(b&&(E=this.tokenizer.def(f))){f=f.substring(E.raw.length),this.tokens.links[E.tag]||(this.tokens.links[E.tag]={href:E.href,title:E.title});continue}if(E=this.tokenizer.table(f)){f=f.substring(E.raw.length),v.push(E);continue}if(E=this.tokenizer.lheading(f)){f=f.substring(E.raw.length),v.push(E);continue}if(b&&(E=this.tokenizer.paragraph(f))){f=f.substring(E.raw.length),v.push(E);continue}if(E=this.tokenizer.text(f,v)){f=f.substring(E.raw.length),E.type?v.push(E):(je=v[v.length-1],je.raw+=`
`+E.raw,je.text+=`
`+E.text);continue}if(f){var rt="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(rt);break}else throw new Error(rt)}}return v},F.inline=function(f){var v,b,E,re,me,je,rt=f.length;for(v=0;v<rt;v++){je=f[v];switch(je.type){case"paragraph":case"text":case"heading":{je.tokens=[],this.inlineTokens(je.text,je.tokens);break}case"table":{for(je.tokens={header:[],cells:[]},re=je.header.length,b=0;b<re;b++)je.tokens.header[b]=[],this.inlineTokens(je.header[b],je.tokens.header[b]);for(re=je.cells.length,b=0;b<re;b++)for(me=je.cells[b],je.tokens.cells[b]=[],E=0;E<me.length;E++)je.tokens.cells[b][E]=[],this.inlineTokens(me[E],je.tokens.cells[b][E]);break}case"blockquote":{this.inline(je.tokens);break}case"list":{for(re=je.items.length,b=0;b<re;b++)this.inline(je.items[b].tokens);break}}}return f},F.inlineTokens=function(f,v,b,E,re){v===void 0&&(v=[]),b===void 0&&(b=!1),E===void 0&&(E=!1),re===void 0&&(re="");var me,je=f,rt;if(this.tokens.links){var it=Object.keys(this.tokens.links);if(it.length>0)for(;(rt=this.tokenizer.rules.inline.reflinkSearch.exec(je))!=null;)it.includes(rt[0].slice(rt[0].lastIndexOf("[")+1,-1))&&(je=je.slice(0,rt.index)+"["+"a".repeat(rt[0].length-2)+"]"+je.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(rt=this.tokenizer.rules.inline.blockSkip.exec(je))!=null;)je=je.slice(0,rt.index)+"["+"a".repeat(rt[0].length-2)+"]"+je.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(me=this.tokenizer.escape(f)){f=f.substring(me.raw.length),v.push(me);continue}if(me=this.tokenizer.tag(f,b,E)){f=f.substring(me.raw.length),b=me.inLink,E=me.inRawBlock,v.push(me);continue}if(me=this.tokenizer.link(f)){f=f.substring(me.raw.length),me.type==="link"&&(me.tokens=this.inlineTokens(me.text,[],!0,E)),v.push(me);continue}if(me=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(me.raw.length),me.type==="link"&&(me.tokens=this.inlineTokens(me.text,[],!0,E)),v.push(me);continue}if(me=this.tokenizer.strong(f,je,re)){f=f.substring(me.raw.length),me.tokens=this.inlineTokens(me.text,[],b,E),v.push(me);continue}if(me=this.tokenizer.em(f,je,re)){f=f.substring(me.raw.length),me.tokens=this.inlineTokens(me.text,[],b,E),v.push(me);continue}if(me=this.tokenizer.codespan(f)){f=f.substring(me.raw.length),v.push(me);continue}if(me=this.tokenizer.br(f)){f=f.substring(me.raw.length),v.push(me);continue}if(me=this.tokenizer.del(f)){f=f.substring(me.raw.length),me.tokens=this.inlineTokens(me.text,[],b,E),v.push(me);continue}if(me=this.tokenizer.autolink(f,z)){f=f.substring(me.raw.length),v.push(me);continue}if(!b&&(me=this.tokenizer.url(f,z))){f=f.substring(me.raw.length),v.push(me);continue}if(me=this.tokenizer.inlineText(f,E,ne)){f=f.substring(me.raw.length),re=me.raw.slice(-1),v.push(me);continue}if(f){var lt="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return v},_e(X,null,[{key:"rules",get:function(){return{block:m,inline:j}}}]),X}(),Se=M.defaults,Te=C.cleanUrl,ge=C.escape,ve=function(){function X(T){this.options=T||Se}var F=X.prototype;return F.code=function(f,v,b){var E=(v||"").match(/\S*/)[0];if(this.options.highlight){var re=this.options.highlight(f,E);re!=null&&re!==f&&(b=!0,f=re)}return E?'<pre><code class="'+this.options.langPrefix+ge(E,!0)+'">'+(b?f:ge(f,!0))+`</code></pre>
`:"<pre><code>"+(b?f:ge(f,!0))+`</code></pre>
`},F.blockquote=function(f){return`<blockquote>
`+f+`</blockquote>
`},F.html=function(f){return f},F.heading=function(f,v,b,E){return this.options.headerIds?"<h"+v+' id="'+this.options.headerPrefix+E.slug(b)+'">'+f+"</h"+v+`>
`:"<h"+v+">"+f+"</h"+v+`>
`},F.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},F.list=function(f,v,b){var E=v?"ol":"ul",re=v&&b!==1?' start="'+b+'"':"";return"<"+E+re+`>
`+f+"</"+E+`>
`},F.listitem=function(f){return"<li>"+f+`</li>
`},F.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},F.paragraph=function(f){return"<p>"+f+`</p>
`},F.table=function(f,v){return v&&(v="<tbody>"+v+"</tbody>"),`<table>
<thead>
`+f+`</thead>
`+v+`</table>
`},F.tablerow=function(f){return`<tr>
`+f+`</tr>
`},F.tablecell=function(f,v){var b=v.header?"th":"td",E=v.align?"<"+b+' align="'+v.align+'">':"<"+b+">";return E+f+"</"+b+`>
`},F.strong=function(f){return"<strong>"+f+"</strong>"},F.em=function(f){return"<em>"+f+"</em>"},F.codespan=function(f){return"<code>"+f+"</code>"},F.br=function(){return this.options.xhtml?"<br/>":"<br>"},F.del=function(f){return"<del>"+f+"</del>"},F.link=function(f,v,b){if(f=Te(this.options.sanitize,this.options.baseUrl,f),f===null)return b;var E='<a href="'+ge(f)+'"';return v&&(E+=' title="'+v+'"'),E+=">"+b+"</a>",E},F.image=function(f,v,b){if(f=Te(this.options.sanitize,this.options.baseUrl,f),f===null)return b;var E='<img src="'+f+'" alt="'+b+'"';return v&&(E+=' title="'+v+'"'),E+=this.options.xhtml?"/>":">",E},F.text=function(f){return f},X}(),De=function(){function X(){}var F=X.prototype;return F.strong=function(f){return f},F.em=function(f){return f},F.codespan=function(f){return f},F.del=function(f){return f},F.html=function(f){return f},F.text=function(f){return f},F.link=function(f,v,b){return""+b},F.image=function(f,v,b){return""+b},F.br=function(){return""},X}(),Ie=function(){function X(){this.seen={}}var F=X.prototype;return F.slug=function(f){var v=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(v)){var b=v;do this.seen[b]++,v=b+"-"+this.seen[b];while(this.seen.hasOwnProperty(v))}return this.seen[v]=0,v},X}(),Pe=M.defaults,Ue=C.unescape,Ke=function(){function X(T){this.options=T||Pe,this.options.renderer=this.options.renderer||new ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new De,this.slugger=new Ie}X.parse=function(f,v){var b=new X(v);return b.parse(f)};var F=X.prototype;return F.parse=function(f,v){v===void 0&&(v=!0);var b="",E,re,me,je,rt,it,lt,_t,bt,ht,Ft,wt,Ht,Rt,yt,on,wn,sn,Cn=f.length;for(E=0;E<Cn;E++){ht=f[E];switch(ht.type){case"space":continue;case"hr":{b+=this.renderer.hr();continue}case"heading":{b+=this.renderer.heading(this.parseInline(ht.tokens),ht.depth,Ue(this.parseInline(ht.tokens,this.textRenderer)),this.slugger);continue}case"code":{b+=this.renderer.code(ht.text,ht.lang,ht.escaped);continue}case"table":{for(_t="",lt="",je=ht.header.length,re=0;re<je;re++)lt+=this.renderer.tablecell(this.parseInline(ht.tokens.header[re]),{header:!0,align:ht.align[re]});for(_t+=this.renderer.tablerow(lt),bt="",je=ht.cells.length,re=0;re<je;re++){for(it=ht.tokens.cells[re],lt="",rt=it.length,me=0;me<rt;me++)lt+=this.renderer.tablecell(this.parseInline(it[me]),{header:!1,align:ht.align[me]});bt+=this.renderer.tablerow(lt)}b+=this.renderer.table(_t,bt);continue}case"blockquote":{bt=this.parse(ht.tokens),b+=this.renderer.blockquote(bt);continue}case"list":{for(Ft=ht.ordered,wt=ht.start,Ht=ht.loose,je=ht.items.length,bt="",re=0;re<je;re++)yt=ht.items[re],on=yt.checked,wn=yt.task,Rt="",yt.task&&(sn=this.renderer.checkbox(on),Ht?yt.tokens.length>0&&yt.tokens[0].type==="text"?(yt.tokens[0].text=sn+" "+yt.tokens[0].text,yt.tokens[0].tokens&&yt.tokens[0].tokens.length>0&&yt.tokens[0].tokens[0].type==="text"&&(yt.tokens[0].tokens[0].text=sn+" "+yt.tokens[0].tokens[0].text)):yt.tokens.unshift({type:"text",text:sn}):Rt+=sn),Rt+=this.parse(yt.tokens,Ht),bt+=this.renderer.listitem(Rt,wn,on);b+=this.renderer.list(bt,Ft,wt);continue}case"html":{b+=this.renderer.html(ht.text);continue}case"paragraph":{b+=this.renderer.paragraph(this.parseInline(ht.tokens));continue}case"text":{for(bt=ht.tokens?this.parseInline(ht.tokens):ht.text;E+1<Cn&&f[E+1].type==="text";)ht=f[++E],bt+=`
`+(ht.tokens?this.parseInline(ht.tokens):ht.text);b+=v?this.renderer.paragraph(bt):bt;continue}default:{var tn='Token with "'+ht.type+'" type was not found.';if(this.options.silent){console.error(tn);return}else throw new Error(tn)}}}return b},F.parseInline=function(f,v){v=v||this.renderer;var b="",E,re,me=f.length;for(E=0;E<me;E++){re=f[E];switch(re.type){case"escape":{b+=v.text(re.text);break}case"html":{b+=v.html(re.text);break}case"link":{b+=v.link(re.href,re.title,this.parseInline(re.tokens,v));break}case"image":{b+=v.image(re.href,re.title,re.text);break}case"strong":{b+=v.strong(this.parseInline(re.tokens,v));break}case"em":{b+=v.em(this.parseInline(re.tokens,v));break}case"codespan":{b+=v.codespan(re.text);break}case"br":{b+=v.br();break}case"del":{b+=v.del(this.parseInline(re.tokens,v));break}case"text":{b+=v.text(re.text);break}default:{var je='Token with "'+re.type+'" type was not found.';if(this.options.silent){console.error(je);return}else throw new Error(je)}}}return b},X}(),tt=C.merge,Xe=C.checkSanitizeDeprecation,Ye=C.escape,Oe=M.getDefaults,at=M.changeDefaults,Ze=M.defaults;function Me(X,F,T){if(typeof X=="undefined"||X===null)throw new Error("marked(): input parameter is undefined or null");if(typeof X!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(X)+", string expected");if(typeof F=="function"&&(T=F,F=null),F=tt({},Me.defaults,F||{}),Xe(F),T){var f=F.highlight,v;try{v=oe.lex(X,F)}catch(me){return T(me)}var b=function(je){var rt;if(!je)try{rt=Ke.parse(v,F)}catch(it){je=it}return F.highlight=f,je?T(je):T(null,rt)};if(!f||f.length<3)return b();if(delete F.highlight,!v.length)return b();var E=0;Me.walkTokens(v,function(me){me.type==="code"&&(E++,setTimeout(function(){f(me.text,me.lang,function(je,rt){if(je)return b(je);rt!=null&&rt!==me.text&&(me.text=rt,me.escaped=!0),E--,E===0&&b()})},0))}),E===0&&b();return}try{var re=oe.lex(X,F);return F.walkTokens&&Me.walkTokens(re,F.walkTokens),Ke.parse(re,F)}catch(me){if(me.message+=`
Please report this to https://github.com/markedjs/marked.`,F.silent)return"<p>An error occurred:</p><pre>"+Ye(me.message+"",!0)+"</pre>";throw me}}Me.options=Me.setOptions=function(X){return tt(Me.defaults,X),at(Me.defaults),Me},Me.getDefaults=Oe,Me.defaults=Ze,Me.use=function(X){var F=tt({},X);if(X.renderer&&function(){var f=Me.defaults.renderer||new ve,v=function(re){var me=f[re];f[re]=function(){for(var je=arguments.length,rt=new Array(je),it=0;it<je;it++)rt[it]=arguments[it];var lt=X.renderer[re].apply(f,rt);return lt===!1&&(lt=me.apply(f,rt)),lt}};for(var b in X.renderer)v(b);F.renderer=f}(),X.tokenizer&&function(){var f=Me.defaults.tokenizer||new ce,v=function(re){var me=f[re];f[re]=function(){for(var je=arguments.length,rt=new Array(je),it=0;it<je;it++)rt[it]=arguments[it];var lt=X.tokenizer[re].apply(f,rt);return lt===!1&&(lt=me.apply(f,rt)),lt}};for(var b in X.tokenizer)v(b);F.tokenizer=f}(),X.walkTokens){var T=Me.defaults.walkTokens;F.walkTokens=function(f){X.walkTokens(f),T&&T(f)}}Me.setOptions(F)},Me.walkTokens=function(X,F){for(var T=we(X),f;!(f=T()).done;){var v=f.value;F(v);switch(v.type){case"table":{for(var b=we(v.tokens.header),E;!(E=b()).done;){var re=E.value;Me.walkTokens(re,F)}for(var me=we(v.tokens.cells),je;!(je=me()).done;)for(var rt=je.value,it=we(rt),lt;!(lt=it()).done;){var _t=lt.value;Me.walkTokens(_t,F)}break}case"list":{Me.walkTokens(v.items,F);break}default:v.tokens&&Me.walkTokens(v.tokens,F)}}},Me.Parser=Ke,Me.parser=Ke.parse,Me.Renderer=ve,Me.TextRenderer=De,Me.Lexer=oe,Me.lexer=oe.lex,Me.Tokenizer=ce,Me.Slugger=Ie,Me.parse=Me;var He=Me;return He})},ELLl:function(nt,Be,h){(function(W){W(h("VrN/"))})(function(W){var _e={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ue=W.Pos;W.defineOption("autoCloseBrackets",!1,function(N,P,I){I&&I!=W.Init&&(N.removeKeyMap(we),N.state.closeBrackets=null),P&&(Y(ke(P,"pairs")),N.state.closeBrackets=P,N.addKeyMap(we))});function ke(N,P){return P=="pairs"&&typeof N=="string"?N:typeof N=="object"&&N[P]!=null?N[P]:_e[P]}var we={Backspace:w,Enter:H};function Y(N){for(var P=0;P<N.length;P++){var I=N.charAt(P),B="'"+I+"'";we[B]||(we[B]=M(I))}}Y(_e.pairs+"`");function M(N){return function(P){return ae(P,N)}}function A(N){var P=N.state.closeBrackets;if(!P||P.override)return P;var I=N.getModeAt(N.getCursor());return I.closeBrackets||P}function w(N){var P=A(N);if(!P||N.getOption("disableInput"))return W.Pass;for(var I=ke(P,"pairs"),B=N.listSelections(),ie=0;ie<B.length;ie++){if(!B[ie].empty())return W.Pass;var Ce=fe(N,B[ie].head);if(!Ce||I.indexOf(Ce)%2!=0)return W.Pass}for(var ie=B.length-1;ie>=0;ie--){var We=B[ie].head;N.replaceRange("",ue(We.line,We.ch-1),ue(We.line,We.ch+1),"+delete")}}function H(N){var P=A(N),I=P&&ke(P,"explode");if(!I||N.getOption("disableInput"))return W.Pass;for(var B=N.listSelections(),ie=0;ie<B.length;ie++){if(!B[ie].empty())return W.Pass;var Ce=fe(N,B[ie].head);if(!Ce||I.indexOf(Ce)%2!=0)return W.Pass}N.operation(function(){var We=N.lineSeparator()||`
`;N.replaceSelection(We+We,null),N.execCommand("goCharLeft"),B=N.listSelections();for(var he=0;he<B.length;he++){var be=B[he].head.line;N.indentLine(be,null,!0),N.indentLine(be+1,null,!0)}})}function J(N){var P=W.cmpPos(N.anchor,N.head)>0;return{anchor:new ue(N.anchor.line,N.anchor.ch+(P?-1:1)),head:new ue(N.head.line,N.head.ch+(P?1:-1))}}function ae(N,P){var I=A(N);if(!I||N.getOption("disableInput"))return W.Pass;var B=ke(I,"pairs"),ie=B.indexOf(P);if(ie==-1)return W.Pass;for(var Ce=ke(I,"closeBefore"),We=ke(I,"triples"),he=B.charAt(ie+1)==P,be=N.listSelections(),Re=ie%2==0,pe,de=0;de<be.length;de++){var Ae=be[de],Q=Ae.head,y,V=N.getRange(Q,ue(Q.line,Q.ch+1));if(Re&&!Ae.empty())y="surround";else if((he||!Re)&&V==P)he&&$(N,Q)?y="both":We.indexOf(P)>=0&&N.getRange(Q,ue(Q.line,Q.ch+3))==P+P+P?y="skipThree":y="skip";else if(he&&Q.ch>1&&We.indexOf(P)>=0&&N.getRange(ue(Q.line,Q.ch-2),Q)==P+P){if(Q.ch>2&&/\bstring/.test(N.getTokenTypeAt(ue(Q.line,Q.ch-2))))return W.Pass;y="addFour"}else if(he){var D=Q.ch==0?" ":N.getRange(ue(Q.line,Q.ch-1),Q);if(!W.isWordChar(V)&&D!=P&&!W.isWordChar(D))y="both";else return W.Pass}else if(Re&&(V.length===0||/\s/.test(V)||Ce.indexOf(V)>-1))y="both";else return W.Pass;if(!pe)pe=y;else if(pe!=y)return W.Pass}var _=ie%2?B.charAt(ie-1):P,G=ie%2?P:B.charAt(ie+1);N.operation(function(){if(pe=="skip")N.execCommand("goCharRight");else if(pe=="skipThree")for(var R=0;R<3;R++)N.execCommand("goCharRight");else if(pe=="surround"){for(var S=N.getSelections(),R=0;R<S.length;R++)S[R]=_+S[R]+G;N.replaceSelections(S,"around"),S=N.listSelections().slice();for(var R=0;R<S.length;R++)S[R]=J(S[R]);N.setSelections(S)}else pe=="both"?(N.replaceSelection(_+G,null),N.triggerElectric(_+G),N.execCommand("goCharLeft")):pe=="addFour"&&(N.replaceSelection(_+_+_+_,"before"),N.execCommand("goCharRight"))})}function fe(N,P){var I=N.getRange(ue(P.line,P.ch-1),ue(P.line,P.ch+1));return I.length==2?I:null}function $(N,P){var I=N.getTokenAt(ue(P.line,P.ch+1));return/\bstring/.test(I.type)&&I.start==P.ch&&(P.ch==0||!/\bstring/.test(N.getTokenTypeAt(P)))}})},GfqC:function(nt,Be,h){"use strict";var W=h("q1tI"),_e=h.n(W),ue=h("TSYQ"),ke=h.n(ue);function we(C,u){var s="cannot "+C.method+" "+C.action+" "+u.status+"'",g=new Error(s);return g.status=u.status,g.method=C.method,g.url=C.action,g}function Y(C){var u=C.responseText||C.response;if(!u)return u;try{return JSON.parse(u)}catch(s){return u}}function M(C){var u=new XMLHttpRequest;C.onProgress&&u.upload&&(u.upload.onprogress=function(U){U.total>0&&(U.percent=U.loaded/U.total*100),C.onProgress(U)});var s=new FormData;C.data&&Object.keys(C.data).forEach(function(x){var U=C.data[x];if(Array.isArray(U)){U.forEach(function(le){s.append(x+"[]",le)});return}s.append(x,C.data[x])}),C.file instanceof Blob?s.append(C.filename,C.file,C.file.name):s.append(C.filename,C.file),u.onerror=function(U){C.onError(U)},u.onload=function(){return u.status<200||u.status>=300?C.onError(we(C,u),Y(u)):C.onSuccess(Y(u),u)},u.open(C.method,C.action,!0),C.withCredentials&&"withCredentials"in u&&(u.withCredentials=!0);var g=C.headers||{};return g["X-Requested-With"]!==null&&u.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(g).forEach(function(x){g[x]!==null&&u.setRequestHeader(x,g[x])}),u.send(s),{abort:function(){u.abort()}}}var A=+new Date,w=0;function H(){return"rc-upload-"+A+"-"+ ++w}function J(C,u){return C.indexOf(u,C.length-u.length)!==-1}var ae=function(C,u){if(C&&u){var s=Array.isArray(u)?u:u.split(","),g=C.name||"",x=C.type||"",U=x.replace(/\/.*$/,"");return s.some(function(le){var Ee=le.trim();return Ee.charAt(0)==="."?J(g.toLowerCase(),Ee.toLowerCase()):/\/\*$/.test(Ee)?U===Ee.replace(/\/.*$/,""):x===Ee})}return!0};function fe(C,u){var s=C.createReader(),g=[];function x(){s.readEntries(function(U){var le=Array.prototype.slice.apply(U);g=g.concat(le);var Ee=!le.length;Ee?u(g):x()})}x()}var $=function(u,s,g){var x=function U(le,Ee){Ee=Ee||"",le.isFile?le.file(function(ce){g(ce)&&(le.fullPath&&!ce.webkitRelativePath&&(Object.defineProperties(ce,{webkitRelativePath:{writable:!0}}),ce.webkitRelativePath=le.fullPath.replace(/^\//,""),Object.defineProperties(ce,{webkitRelativePath:{writable:!1}})),s([ce]))}):le.isDirectory&&fe(le,function(ce){ce.forEach(function(xe){U(xe,""+Ee+le.name+"/")})})};u.forEach(function(U){x(U.webkitGetAsEntry())})},N=$,P=Object.assign||function(C){for(var u=1;u<arguments.length;u++){var s=arguments[u];for(var g in s)Object.prototype.hasOwnProperty.call(s,g)&&(C[g]=s[g])}return C},I=function(){function C(u,s){var g=[],x=!0,U=!1,le=void 0;try{for(var Ee=u[Symbol.iterator](),ce;!(x=(ce=Ee.next()).done)&&!(g.push(ce.value),s&&g.length===s);x=!0);}catch(xe){U=!0,le=xe}finally{try{!x&&Ee.return&&Ee.return()}finally{if(U)throw le}}return g}return function(u,s){if(Array.isArray(u))return u;if(Symbol.iterator in Object(u))return C(u,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),B=function(){function C(u,s){for(var g=0;g<s.length;g++){var x=s[g];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(u,x.key,x)}}return function(u,s,g){return s&&C(u.prototype,s),g&&C(u,g),u}}();function ie(C,u,s){return u in C?Object.defineProperty(C,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):C[u]=s,C}function Ce(C,u){var s={};for(var g in C){if(u.indexOf(g)>=0)continue;if(!Object.prototype.hasOwnProperty.call(C,g))continue;s[g]=C[g]}return s}function We(C,u){if(!(C instanceof u))throw new TypeError("Cannot call a class as a function")}function he(C,u){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:C}function be(C,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);C.prototype=Object.create(u&&u.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(C,u):C.__proto__=u)}var Re=function(u){return Object.keys(u).reduce(function(s,g){return(g.substr(0,5)==="data-"||g.substr(0,5)==="aria-"||g==="role")&&(s[g]=u[g]),s},{})},pe=function(C){be(u,C);function u(){var s,g,x,U;We(this,u);for(var le=arguments.length,Ee=Array(le),ce=0;ce<le;ce++)Ee[ce]=arguments[ce];return U=(g=(x=he(this,(s=u.__proto__||Object.getPrototypeOf(u)).call.apply(s,[this].concat(Ee))),x),x.state={uid:H()},x.reqs={},x.onChange=function(xe){var Z=xe.target.files;x.uploadFiles(Z),x.reset()},x.onClick=function(xe){var Z=x.fileInput;if(!Z)return;var q=x.props,K=q.children,ee=q.onClick;K&&K.type==="button"&&(Z.parentNode.focus(),Z.parentNode.querySelector("button").blur()),Z.click(),ee&&ee(xe)},x.onKeyDown=function(xe){xe.key==="Enter"&&x.onClick()},x.onFileDrop=function(xe){var Z=x.props.multiple;if(xe.preventDefault(),xe.type==="dragover")return;if(x.props.directory)N(Array.prototype.slice.call(xe.dataTransfer.items),x.uploadFiles,function(K){return ae(K,x.props.accept)});else{var q=Array.prototype.slice.call(xe.dataTransfer.files).filter(function(K){return ae(K,x.props.accept)});Z===!1&&(q=q.slice(0,1)),x.uploadFiles(q)}},x.uploadFiles=function(xe){var Z=Array.prototype.slice.call(xe);Z.map(function(q){return q.uid=H(),q}).forEach(function(q){x.upload(q,Z)})},x.saveFileInput=function(xe){x.fileInput=xe},g),he(x,U)}return B(u,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(g,x){var U=this,le=this.props;if(!le.beforeUpload)return setTimeout(function(){return U.post(g)},0);var Ee=le.beforeUpload(g,x);Ee&&Ee.then?Ee.then(function(ce){var xe=Object.prototype.toString.call(ce);return xe==="[object File]"||xe==="[object Blob]"?U.post(ce):U.post(g)}).catch(function(ce){console.log(ce)}):Ee!==!1&&setTimeout(function(){return U.post(g)},0);return}},{key:"post",value:function(g){var x=this;if(!this._isMounted)return;var U=this.props,le=U.onStart,Ee=U.onProgress,ce=U.transformFile,xe=ce===void 0?function(Z){return Z}:ce;new Promise(function(Z){var q=U.action;return typeof q=="function"&&(q=q(g)),Z(q)}).then(function(Z){var q=g.uid,K=U.customRequest||M,ee=Promise.resolve(xe(g)).then(function(p){var k=U.data;return typeof k=="function"&&(k=k(p)),Promise.all([p,k])}).catch(function(p){console.error(p)});ee.then(function(p){var k=I(p,2),m=k[0],j=k[1],ne={action:Z,filename:U.name,data:j,file:m,headers:U.headers,withCredentials:U.withCredentials,method:U.method||"post",onProgress:Ee?function(z){Ee(z,g)}:null,onSuccess:function(oe,Se){delete x.reqs[q],U.onSuccess(oe,g,Se)},onError:function(oe,Se){delete x.reqs[q],U.onError(oe,Se,g)}};le(g),x.reqs[q]=K(ne)})})}},{key:"reset",value:function(){this.setState({uid:H()})}},{key:"abort",value:function(g){var x=this.reqs;if(g){var U=g;g&&g.uid&&(U=g.uid),x[U]&&x[U].abort&&x[U].abort(),delete x[U]}else Object.keys(x).forEach(function(le){x[le]&&x[le].abort&&x[le].abort(),delete x[le]})}},{key:"render",value:function(){var g,x=this.props,U=x.component,le=x.prefixCls,Ee=x.className,ce=x.disabled,xe=x.id,Z=x.style,q=x.multiple,K=x.accept,ee=x.children,p=x.directory,k=x.openFileDialogOnClick,m=x.onMouseEnter,j=x.onMouseLeave,ne=Ce(x,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),z=ke()((g={},ie(g,le,!0),ie(g,le+"-disabled",ce),ie(g,Ee,Ee),g)),oe=ce?{}:{onClick:k?this.onClick:function(){},onKeyDown:k?this.onKeyDown:function(){},onMouseEnter:m,onMouseLeave:j,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return _e.a.createElement(U,P({},oe,{className:z,role:"button",style:Z}),_e.a.createElement("input",P({},Re(ne),{id:xe,type:"file",ref:this.saveFileInput,onClick:function(Te){return Te.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:K,directory:p?"directory":null,webkitdirectory:p?"webkitdirectory":null,multiple:q,onChange:this.onChange})),ee)}}]),u}(W.Component),de=pe,Ae=Object.assign||function(C){for(var u=1;u<arguments.length;u++){var s=arguments[u];for(var g in s)Object.prototype.hasOwnProperty.call(s,g)&&(C[g]=s[g])}return C},Q=function(){function C(u,s){for(var g=0;g<s.length;g++){var x=s[g];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(u,x.key,x)}}return function(u,s,g){return s&&C(u.prototype,s),g&&C(u,g),u}}();function y(C,u){if(!(C instanceof u))throw new TypeError("Cannot call a class as a function")}function V(C,u){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:C}function D(C,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);C.prototype=Object.create(u&&u.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(C,u):C.__proto__=u)}function _(){}var G=function(C){D(u,C);function u(){var s,g,x,U;y(this,u);for(var le=arguments.length,Ee=Array(le),ce=0;ce<le;ce++)Ee[ce]=arguments[ce];return U=(g=(x=V(this,(s=u.__proto__||Object.getPrototypeOf(u)).call.apply(s,[this].concat(Ee))),x),x.saveUploader=function(xe){x.uploader=xe},g),V(x,U)}return Q(u,[{key:"abort",value:function(g){this.uploader.abort(g)}},{key:"render",value:function(){return _e.a.createElement(de,Ae({},this.props,{ref:this.saveUploader}))}}]),u}(W.Component);G.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:_,onError:_,onSuccess:_,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var R=G,S=Be.a=R},Gytx:function(nt,Be){nt.exports=function(W,_e,ue,ke){var we=ue?ue.call(ke,W,_e):void 0;if(we!==void 0)return!!we;if(W===_e)return!0;if(typeof W!="object"||!W||typeof _e!="object"||!_e)return!1;var Y=Object.keys(W),M=Object.keys(_e);if(Y.length!==M.length)return!1;for(var A=Object.prototype.hasOwnProperty.bind(_e),w=0;w<Y.length;w++){var H=Y[w];if(!A(H))return!1;var J=W[H],ae=_e[H];if(we=ue?ue.call(ke,J,ae,H):void 0,we===!1||we===void 0&&J!==ae)return!1}return!0}},HmJG:function(nt,Be,h){},IE1O:function(nt,Be,h){"use strict";h.d(Be,"a",function(){return Re});var W=h("2qtc"),_e=h("kLXV"),ue=h("DZo9"),ke=h("8z0m"),we=h("+L6B"),Y=h("2/Rp"),M=h("5NDa"),A=h("5rEg"),w=h("miYZ"),H=h("tsqr"),J=h("9og8"),ae=h("y8nQ"),fe=h("Vl3Y"),$=h("tJVT"),N=h("WmNS"),P=h.n(N),I=h("q1tI"),B=h.n(I),ie=h("KeLC"),Ce=h.n(ie),We=h("m3rI"),he=h("jN4g"),be=function(de){var Ae,Q,y,V,D=de.visible,_=de.onOk,G=de.onCancel,R=de.title,S=R===void 0?"\u9009\u62E9\u8BA4\u8BC1\u56E2\u961F\u6559\u5E08":R,C=fe.a.useForm(),u=Object($.a)(C,1),s=u[0],g=Object(I.useState)(!1),x=Object($.a)(g,2),U=x[0],le=x[1],Ee=Object(I.useState)([]),ce=Object($.a)(Ee,2),xe=ce[0],Z=ce[1],q=Object(I.useState)([]),K=Object($.a)(q,2),ee=K[0],p=K[1],k=Object(I.useState)(!1),m=Object($.a)(k,2),j=m[0],ne=m[1];Object(I.useEffect)(function(){if(D!=null&&D.name){var Ie,Pe,Ue,Ke;s.setFieldsValue({name:D==null?void 0:D.name});var tt=D!=null&&(Ie=D.cover_url)!==null&&Ie!==void 0&&Ie.includes("attachments")?[{response:{id:D==null||((Pe=D.cover_url)===null||Pe===void 0)?void 0:Pe.split("/")[3]}}]:[],Xe=D!=null&&(Ue=D.backbground_image_url)!==null&&Ue!==void 0&&Ue.includes("attachments")?[{response:{id:D==null||((Ke=D.backbground_image_url)===null||Ke===void 0)?void 0:Ke.split("/")[3]}}]:[];Z(tt),p(Xe)}},[D]);var z=function(){s.submit()},oe=function(){G()},Se=function(){var Ie=Object(J.a)(P.a.mark(function Pe(Ue){var Ke,tt,Xe,Ye,Oe;return P.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:le(!0),console.log(xe,ee,3333),Oe={name:Ue==null?void 0:Ue.name,cover_id:(xe==null||((Ke=xe[0])===null||Ke===void 0||((tt=Ke.response)===null||tt===void 0))?void 0:tt.id)||"",backbground_image_id:(ee==null||((Xe=ee[0])===null||Xe===void 0||((Ye=Xe.response)===null||Ye===void 0))?void 0:Ye.id)||""},_(Oe);case 4:case"end":return Ze.stop()}},Pe)}));return function(Ue){return Ie.apply(this,arguments)}}(),Te=function(Pe,Ue){var Ke=["uploading","done","removed"];Ke.includes(Pe.file.status)&&(Pe.file.status==="uploading"&&ne(!0),Pe.file.status==="done"&&ne(!1),Ue===1?Z(Pe.fileList):p(Pe.fileList))},ge=function(Pe,Ue){Ue===1?Z([]):p([])},ve=function(Pe,Ue){var Ke=Pe.type==="image/jpeg"||Pe.type==="image/png";if(!Ke)return H.b.error("\u8BF7\u4E0A\u4F20jpg\u6216png\u7684\u56FE\u7247!"),!1;var tt=Pe.size/1024/1024>2;return tt?(H.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E2MB"),!1):(Ue===1?Z([]):p([]),!0)},De=function(Pe){var Ue,Ke,tt,Xe;return B.a.createElement("div",{className:Ce.a.img},B.a.createElement("img",{src:We.a.API_SERVER+"/api/attachments/"+(Pe===1?xe==null||((Ue=xe[0])===null||Ue===void 0||((Ke=Ue.response)===null||Ke===void 0))?void 0:Ke.id:ee==null||((tt=ee[0])===null||tt===void 0||((Xe=tt.response)===null||Xe===void 0))?void 0:Xe.id),alt:"avatar",style:{width:"100%"}}),B.a.createElement("div",null,B.a.createElement(he.a,{onClick:function(){Pe===1?Z([]):p([])},style:{fontSize:"16px",color:"red"}})))};return B.a.createElement(_e.a,{title:S,visible:D,onOk:z,centered:!0,onCancel:oe,confirmLoading:U,okButtonProps:{disabled:j},width:686,afterClose:function(){le(!1),Z([]),p([]),s.resetFields()},okText:D!=null&&D.name?"\u786E\u8BA4":"\u786E\u8BA4\u65B0\u5EFA",cancelText:"\u53D6\u6D88"},B.a.createElement(fe.a,{form:s,colon:!1,onFinish:Se,labelCol:{span:4},wrapperCol:{span:18},className:Ce.a.form},B.a.createElement(fe.a.Item,{label:"\u793E\u533A\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"},{max:60,message:"\u53EA\u80FD\u8F93\u516560\u4E2A\u5B57\u7B26"}]},B.a.createElement(A.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"})),B.a.createElement(fe.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",valuePropName:"fileList"},B.a.createElement("div",{className:Ce.a.upload},xe!=null&&(Ae=xe[0])!==null&&Ae!==void 0&&(Q=Ae.response)!==null&&Q!==void 0&&Q.id?De(1):B.a.createElement(ke.a,{fileList:xe,action:"".concat(We.a.API_SERVER,"/api/attachments.json"),onChange:function(Pe){return Te(Pe,1)},onRemove:function(Pe){return ge(Pe,1)},beforeUpload:function(Pe){return ve(Pe,1)},withCredentials:!0,accept:"image/*"},B.a.createElement(Y.a,null,B.a.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10"}),"\u4E0A\u4F20\u56FE\u7247")),B.a.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528278*225\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002"))),B.a.createElement(fe.a.Item,{name:"backbground_image_id",label:"\u8BE6\u60C5\u9876\u90E8\u80CC\u666F",valuePropName:"fileList"},B.a.createElement("div",{className:Ce.a.upload},ee!=null&&(y=ee[0])!==null&&y!==void 0&&(V=y.response)!==null&&V!==void 0&&V.id?De(2):B.a.createElement(ke.a,{fileList:ee,action:"".concat(We.a.API_SERVER,"/api/attachments.json"),onChange:function(Pe){return Te(Pe,2)},onRemove:function(Pe){return ge(Pe,2)},beforeUpload:function(Pe){return ve(Pe,2)},withCredentials:!0,accept:"image/*"},B.a.createElement(Y.a,null,B.a.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10"}),"\u4E0A\u4F20\u56FE\u7247")),B.a.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u75281920*220\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002")))))},Re=function(de){var Ae,Q,y,V,D=de.data,_=de.onOk,G=fe.a.useForm(),R=Object($.a)(G,1),S=R[0],C=Object(I.useState)(!1),u=Object($.a)(C,2),s=u[0],g=u[1],x=Object(I.useState)([]),U=Object($.a)(x,2),le=U[0],Ee=U[1],ce=Object(I.useState)([]),xe=Object($.a)(ce,2),Z=xe[0],q=xe[1],K=Object(I.useState)(!1),ee=Object($.a)(K,2),p=ee[0],k=ee[1];Object(I.useEffect)(function(){if(D!=null&&D.name){var Te,ge,ve,De;S.setFieldsValue({name:D==null?void 0:D.name});var Ie=D!=null&&(Te=D.cover_url)!==null&&Te!==void 0&&Te.includes("attachments")?[{response:{id:D==null||((ge=D.cover_url)===null||ge===void 0)?void 0:ge.split("/")[3]}}]:[],Pe=D!=null&&(ve=D.backbground_image_url)!==null&&ve!==void 0&&ve.includes("attachments")?[{response:{id:D==null||((De=D.backbground_image_url)===null||De===void 0)?void 0:De.split("/")[3]}}]:[];Ee(Ie),q(Pe)}},[D]);var m=function(){S.submit()},j=function(){var Te=Object(J.a)(P.a.mark(function ge(ve){var De,Ie,Pe,Ue,Ke;return P.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:g(!0),Ke={name:ve==null?void 0:ve.name,cover_id:(le==null||((De=le[0])===null||De===void 0||((Ie=De.response)===null||Ie===void 0))?void 0:Ie.id)||"",backbground_image_id:(Z==null||((Pe=Z[0])===null||Pe===void 0||((Ue=Pe.response)===null||Ue===void 0))?void 0:Ue.id)||""},_(Ke,function(){g(!1)});case 3:case"end":return Xe.stop()}},ge)}));return function(ve){return Te.apply(this,arguments)}}(),ne=function(ge,ve){var De=["uploading","done","removed"];De.includes(ge.file.status)&&(ge.file.status==="uploading"&&k(!0),ge.file.status==="done"&&k(!1),ve===1?Ee(ge.fileList):q(ge.fileList))},z=function(ge,ve){ve===1?Ee([]):q([])},oe=function(ge,ve){var De=ge.type==="image/jpeg"||ge.type==="image/png";if(!De)return H.b.error("\u8BF7\u4E0A\u4F20jpg\u6216png\u7684\u56FE\u7247!"),!1;var Ie=ge.size/1024/1024>2;return Ie?(H.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E2MB"),!1):(ve===1?Ee([]):q([]),!0)},Se=function(ge){var ve,De,Ie,Pe;return B.a.createElement("div",{className:Ce.a.img},B.a.createElement("img",{src:We.a.API_SERVER+"/api/attachments/"+(ge===1?le==null||((ve=le[0])===null||ve===void 0||((De=ve.response)===null||De===void 0))?void 0:De.id:Z==null||((Ie=Z[0])===null||Ie===void 0||((Pe=Ie.response)===null||Pe===void 0))?void 0:Pe.id),alt:"avatar",style:{width:"100%"}}),B.a.createElement("div",null,B.a.createElement(he.a,{onClick:function(){ge===1?Ee([]):q([])},style:{fontSize:"16px",color:"red"}})))};return B.a.createElement(fe.a,{form:S,colon:!1,onFinish:j,labelCol:{span:3},wrapperCol:{span:19},className:Ce.a.form},B.a.createElement(fe.a.Item,{label:"\u793E\u533A\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"},{max:60,message:"\u53EA\u80FD\u8F93\u516560\u4E2A\u5B57\u7B26"}]},B.a.createElement(A.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"})),B.a.createElement(fe.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",valuePropName:"fileList"},B.a.createElement("div",{className:Ce.a.upload},le!=null&&(Ae=le[0])!==null&&Ae!==void 0&&(Q=Ae.response)!==null&&Q!==void 0&&Q.id?Se(1):B.a.createElement(ke.a,{fileList:le,action:"".concat(We.a.API_SERVER,"/api/attachments.json"),onChange:function(ge){return ne(ge,1)},onRemove:function(ge){return z(ge,1)},beforeUpload:function(ge){return oe(ge,1)},withCredentials:!0,accept:"image/*"},B.a.createElement(Y.a,null,B.a.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10"}),"\u4E0A\u4F20\u56FE\u7247")),B.a.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528278*225\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002"))),B.a.createElement(fe.a.Item,{name:"backbground_image_id",label:"\u8BE6\u60C5\u9876\u90E8\u80CC\u666F",valuePropName:"fileList"},B.a.createElement("div",{className:Ce.a.upload},Z!=null&&(y=Z[0])!==null&&y!==void 0&&(V=y.response)!==null&&V!==void 0&&V.id?Se(2):B.a.createElement(ke.a,{fileList:Z,action:"".concat(We.a.API_SERVER,"/api/attachments.json"),onChange:function(ge){return ne(ge,2)},onRemove:function(ge){return z(ge,2)},beforeUpload:function(ge){return oe(ge,2)},withCredentials:!0,accept:"image/*"},B.a.createElement(Y.a,null,B.a.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10"}),"\u4E0A\u4F20\u56FE\u7247")),B.a.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u75281920*220\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002"))),B.a.createElement(Y.a,{disabled:p,loading:s,type:"primary",onClick:m,style:{marginLeft:120}},"\u786E\u8BA4"))};Be.b=be},KeLC:function(nt,Be,h){nt.exports={flex_box_center:"flex_box_center___WC8D3",flex_space_between:"flex_space_between___1oJuS",flex_box_vertical_center:"flex_box_vertical_center___wHVAB",flex_box_center_end:"flex_box_center_end___2rX0l",flex_box_column:"flex_box_column___Iu_rf",form:"form___RRVwq",upload:"upload___2PzlY",img:"img___qC8f0"}},LdHM:function(nt,Be,h){"use strict";h.d(Be,"b",function(){return Ce}),h.d(Be,"a",function(){return he});var W=h("1OyB"),_e=h("vuIU"),ue=h("Ji7U"),ke=h("LK+K"),we=h("q1tI"),Y=h("rePB"),M=h("Ff2n"),A=h("ODXe"),w=h("4IlW"),H=h("bX4T"),J=h("YrtM"),ae=h("TSYQ"),fe=h.n(ae),$=h("+nKL"),N=h("8OUc"),P=function(g,x){var U=g.prefixCls,le=g.id,Ee=g.flattenOptions,ce=g.childrenAsData,xe=g.values,Z=g.searchValue,q=g.multiple,K=g.defaultActiveFirstOption,ee=g.height,p=g.itemHeight,k=g.notFoundContent,m=g.open,j=g.menuItemSelectedIcon,ne=g.virtual,z=g.onSelect,oe=g.onToggleOpen,Se=g.onActiveValue,Te=g.onScroll,ge=g.onMouseEnter,ve="".concat(U,"-item"),De=Object(J.a)(function(){return Ee},[m,Ee],function(He,X){return X[0]&&He[1]!==X[1]}),Ie=we.useRef(null),Pe=function(X){X.preventDefault()},Ue=function(X){Ie.current&&Ie.current.scrollTo({index:X})},Ke=function(X){for(var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,T=De.length,f=0;f<T;f+=1){var v=(X+f*F+T)%T,b=De[v],E=b.group,re=b.data;if(!E&&!re.disabled)return v}return-1},tt=we.useState(function(){return Ke(0)}),Xe=Object(A.a)(tt,2),Ye=Xe[0],Oe=Xe[1],at=function(X){Oe(X);var F=De[X];if(!F){Se(null,-1);return}Se(F.data.value,X)};we.useEffect(function(){at(K!==!1?Ke(0):-1)},[De.length,Z]),we.useEffect(function(){var He=setTimeout(function(){if(!q&&m&&xe.size===1){var X=Array.from(xe)[0],F=De.findIndex(function(T){var f=T.data;return f.value===X});at(F),Ue(F)}});return function(){return clearTimeout(He)}},[m]);var Ze=function(X){X!==void 0&&z(X,{selected:!xe.has(X)}),q||oe(!1)};if(we.useImperativeHandle(x,function(){return{onKeyDown:function(X){var F=X.which;switch(F){case w.a.UP:case w.a.DOWN:{var T=0;if(F===w.a.UP?T=-1:F===w.a.DOWN&&(T=1),T!==0){var f=Ke(Ye+T,T);Ue(f),at(f)}break}case w.a.ENTER:{var v=De[Ye];v&&!v.data.disabled?Ze(v.data.value):Ze(void 0),m&&X.preventDefault();break}case w.a.ESC:oe(!1)}},onKeyUp:function(){},scrollTo:function(X){Ue(X)}}}),De.length===0)return we.createElement("div",{role:"listbox",id:"".concat(le,"_list"),className:"".concat(ve,"-empty"),onMouseDown:Pe},k);function Me(He){var X=De[He];if(!X)return null;var F=X.data||{},T=F.value,f=F.label,v=F.children,b=Object(H.a)(F,!0),E=ce?v:f;return X?we.createElement("div",Object.assign({"aria-label":typeof E=="string"?E:null},b,{key:He,role:"option",id:"".concat(le,"_list_").concat(He),"aria-selected":xe.has(T)}),T):null}return we.createElement(we.Fragment,null,we.createElement("div",{role:"listbox",id:"".concat(le,"_list"),style:{height:0,width:0,overflow:"hidden"}},Me(Ye-1),Me(Ye),Me(Ye+1)),we.createElement($.a,{itemKey:"key",ref:Ie,data:De,height:ee,itemHeight:p,fullHeight:!1,onMouseDown:Pe,onScroll:Te,virtual:ne,onMouseEnter:ge},function(He,X){var F,T=He.group,f=He.groupOption,v=He.data,b=v.label,E=v.key;if(T)return we.createElement("div",{className:fe()(ve,"".concat(ve,"-group"))},b!==void 0?b:E);var re=v.disabled,me=v.value,je=v.title,rt=v.children,it=v.style,lt=v.className,_t=Object(M.a)(v,["disabled","value","title","children","style","className"]),bt=xe.has(me),ht="".concat(ve,"-option"),Ft=fe()(ve,ht,lt,(F={},Object(Y.a)(F,"".concat(ht,"-grouped"),f),Object(Y.a)(F,"".concat(ht,"-active"),Ye===X&&!re),Object(Y.a)(F,"".concat(ht,"-disabled"),re),Object(Y.a)(F,"".concat(ht,"-selected"),bt),F)),wt=ce?rt:b,Ht=!j||typeof j=="function"||bt;return we.createElement("div",Object.assign({},_t,{"aria-selected":bt,className:Ft,title:je,onMouseMove:function(){if(Ye===X||re)return;at(X)},onClick:function(){re||Ze(me)},style:it}),we.createElement("div",{className:"".concat(ht,"-content")},wt||me),we.isValidElement(j)||bt,Ht&&we.createElement(N.a,{className:"".concat(ve,"-option-state"),customizeIcon:j,customizeIconProps:{isSelected:bt}},bt?"\u2713":null))}))},I=we.forwardRef(P);I.displayName="OptionList";var B=I,ie=function(){return null};ie.isSelectOption=!0;var Ce=ie,We=function(){return null};We.isSelectOptGroup=!0;var he=We,be=h("VTBJ"),Re=h("Zm9Q");function pe(s){var g=s.key,x=s.props,U=x.children,le=x.value,Ee=Object(M.a)(x,["children","value"]);return Object(be.a)({key:g,value:le!==void 0?le:g,children:U},Ee)}function de(s){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Re.a)(s).map(function(x,U){if(!we.isValidElement(x)||!x.type)return null;var le=x.type.isSelectOptGroup,Ee=x.key,ce=x.props,xe=ce.children,Z=Object(M.a)(ce,["children"]);return g||!le?pe(x):Object(be.a)(Object(be.a)({key:"__RC_SELECT_GRP__".concat(Ee===null?U:Ee,"__"),label:Ee},Z),{},{options:de(xe)})}).filter(function(x){return x})}var Ae=h("2Qr1"),Q=h("qNPg"),y=h("U8pU"),V=h("Kwbf"),D=h("WKfj");function _(s){var g=s.mode,x=s.options,U=s.children,le=s.backfill,Ee=s.allowClear,ce=s.placeholder,xe=s.getInputElement,Z=s.showSearch,q=s.onSearch,K=s.defaultOpen,ee=s.autoFocus,p=s.labelInValue,k=s.value,m=s.inputValue,j=s.optionLabelProp,ne=g==="multiple"||g==="tags",z=Z!==void 0?Z:ne||g==="combobox",oe=x||de(U);if(Object(V.a)(g!=="tags"||oe.every(function(ve){return!ve.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),g==="tags"||g==="combobox"){var Se=oe.some(function(ve){return ve.options?ve.options.some(function(De){return typeof("value"in De?De.value:De.key)=="number"}):typeof("value"in ve?ve.value:ve.key)=="number"});Object(V.a)(!Se,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(V.a)(g!=="combobox"||!j,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(V.a)(g==="combobox"||!le,"`backfill` only works with `combobox` mode."),Object(V.a)(g==="combobox"||!xe,"`getInputElement` only work with `combobox` mode."),Object(V.b)(g!=="combobox"||!xe||!Ee||!ce,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),q&&!z&&g!=="combobox"&&g!=="tags"&&Object(V.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(V.b)(!K||ee,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),k!=null){var Te=Object(D.d)(k);Object(V.a)(!p||Te.every(function(ve){return Object(y.a)(ve)==="object"&&("key"in ve||"value"in ve)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(V.a)(!ne||Array.isArray(k),"`value` should be array when `mode` is `multiple` or `tags`")}if(U){var ge=null;Object(Re.a)(U).some(function(ve){if(!we.isValidElement(ve)||!ve.type)return!1;var De=ve.type;if(De.isSelectOption)return!1;if(De.isSelectOptGroup){var Ie=Object(Re.a)(ve.props.children).every(function(Pe){return!we.isValidElement(Pe)||!ve.type||Pe.type.isSelectOption?!0:(ge=Pe.type,!1)});return!Ie}return ge=De,!0}),ge&&Object(V.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ge.displayName||ge.name||ge,"`.")),Object(V.a)(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=_,R=Object(Q.a)({prefixCls:"rc-select",components:{optionList:B},convertChildrenToData:de,flattenOptions:Ae.d,getLabeledValue:Ae.e,filterOptions:Ae.b,isValueDisabled:Ae.g,findValueOption:Ae.c,warningProps:G,fillOptionsWithMissingValue:Ae.a}),S=function(s){Object(ue.a)(x,s);var g=Object(ke.a)(x);function x(){var U;return Object(W.a)(this,x),U=g.apply(this,arguments),U.selectRef=we.createRef(),U.focus=function(){U.selectRef.current.focus()},U.blur=function(){U.selectRef.current.blur()},U}return Object(_e.a)(x,[{key:"render",value:function(){return we.createElement(R,Object.assign({ref:this.selectRef},this.props))}}]),x}(we.Component);S.Option=Ce,S.OptGroup=he;var C=S,u=Be.c=C},M8RZ:function(nt,Be,h){"use strict";h.d(Be,"a",function(){return w});var W=h("fWQN"),_e=h("mtLc"),ue=h("yKVA"),ke=h("879j"),we=h("q1tI"),Y=h.n(we),M=h("i8i4"),A=h.n(M),w=function(H){Object(ue.a)(ae,H);var J=Object(ke.a)(ae);function ae(fe){var $;Object(W.a)(this,ae),$=J.call(this,fe);var N=window.document;return $.node=N.createElement("div"),N.body.appendChild($.node),$}return Object(_e.a)(ae,[{key:"render",value:function(){var $=this.props.children;return Object(M.createPortal)($,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),ae}(Y.a.Component)},NLgs:function(nt,Be,h){"use strict";h.d(Be,"b",function(){return We}),h.d(Be,"f",function(){return he}),h.d(Be,"g",function(){return be}),h.d(Be,"e",function(){return pe}),h.d(Be,"d",function(){return de}),h.d(Be,"a",function(){return Ae}),h.d(Be,"c",function(){return Q});var W=h("9og8"),_e=h("2qtc"),ue=h("kLXV"),ke=h("miYZ"),we=h("tsqr"),Y=h("WmNS"),M=h.n(Y),A=h("q1tI"),w=h.n(A),H=h("9kvl"),J=h("xKgJ"),ae=h("RCxd"),fe=h("mOS8"),$=h.n(fe),N=h("1ZF9"),P=h.n(N),I=h("WdTA"),B=h.n(I),ie=h("m3rI"),Ce=h("1vsH"),We=function(V){var D=Object(H.c)()._store.getState(),_=D.globalSetting;if(!Object(J.p)()){var G;return _!=null&&(G=_.setting)!==null&&G!==void 0&&G.sso_url?(we.b.warning("\u7528\u6237\u8FD8\u672A\u767B\u5F55\uFF0C\u6B63\u5728\u8DF3\u8F6C\u767B\u5F55"),setTimeout(function(){var R;window.location.href=_==null||((R=_.setting)===null||R===void 0)?void 0:R.sso_url},1e3)):be(V),!1}return!0},he=function(V){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(be(V)&&Re(D))},be=function(V){return Object(J.p)()?!0:(Object(Ce.Z)(),!1)},Re=function(){var V,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,_=Object(H.c)()._store.getState(),G=_.user;return(V=G.userInfo)!==null&&V!==void 0&&V.profile_completed?!0:(ue.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:D?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){H.d.push("/account/profile/edit")}}),!1)},pe=function(){var V,D=Object(H.c)()._store.getState(),_=D.user;return(V=_.userInfo)!==null&&V!==void 0&&V.professional_certification?!0:(ue.a.confirm({title:"\u63D0\u793A",centered:!0,content:w.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(Ce.R)("/account/certification")}}),!1)},de=function(){return Object(J.a)()?!0:(ue.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:w.a.createElement("div",{className:"tc",style:{marginLeft:-38}},w.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),w.a.createElement("img",{src:Object(J.t)()?B.a:"".concat(ie.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},Ae=function(V,D){return V?!0:(ue.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:w.a.createElement("div",null,w.a.createElement("p",null,D||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),w.a.createElement("div",{style:{marginLeft:"110px"}},w.a.createElement("img",{src:P.a,width:200}),w.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(Ce.R)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},Q=function(V){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",_=Object(H.c)()._store.getState(),G=_.shixunsDetail.detail;return(G==null?void 0:G.public)===2||(G==null?void 0:G.public)===1||(G==null?void 0:G.shixun_status)===3?(ue.a.info({centered:!0,icon:w.a.createElement(ae.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:w.a.createElement("div",{className:"tc",style:{marginLeft:-38}},w.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},w.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(G==null?void 0:G.public)===2?"\u5DF2\u516C\u5F00":(G==null?void 0:G.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",D,"\u3002"),w.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),w.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:$.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(G==null?void 0:G.shixun_status)===2?(ue.a.confirm({centered:!0,icon:w.a.createElement(ae.a,null),title:"\u63D0\u793A",content:w.a.createElement("div",null,w.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",D,"\u3002"),w.a.createElement("br",null),w.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){ue.a.confirm({width:440,centered:!0,icon:w.a.createElement(ae.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var S=Object(W.a)(M.a.mark(function u(){var s;return M.a.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,V({type:"shixunsDetail/cancelRelease",payload:{id:G==null?void 0:G.identifier}});case 2:s=x.sent,s.status!==401&&(we.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),V({type:"shixunsDetail/getShixunsDetail",payload:{id:G==null?void 0:G.identifier}}),V({type:"practiceSetting/getCommonData",payload:{id:G==null?void 0:G.identifier}}));case 4:case"end":return x.stop()}},u)}));function C(){return S.apply(this,arguments)}return C}()})}}),!0):!1}},OLES:function(nt,Be,h){"use strict";var W=h("U8pU"),_e=h("VTBJ"),ue=h("Ff2n"),ke=h("q1tI"),we=h("uciX"),Y=h("7ixt"),M=function(fe){var $=fe.overlay,N=fe.prefixCls,P=fe.id,I=fe.overlayInnerStyle;return ke.createElement("div",{className:"".concat(N,"-inner"),id:P,role:"tooltip",style:I},typeof $=="function"?$():$)},A=M,w=function(fe,$){var N=fe.overlayClassName,P=fe.trigger,I=P===void 0?["hover"]:P,B=fe.mouseEnterDelay,ie=B===void 0?0:B,Ce=fe.mouseLeaveDelay,We=Ce===void 0?.1:Ce,he=fe.overlayStyle,be=fe.prefixCls,Re=be===void 0?"rc-tooltip":be,pe=fe.children,de=fe.onVisibleChange,Ae=fe.afterVisibleChange,Q=fe.transitionName,y=fe.animation,V=fe.placement,D=V===void 0?"right":V,_=fe.align,G=_===void 0?{}:_,R=fe.destroyTooltipOnHide,S=R===void 0?!1:R,C=fe.defaultVisible,u=fe.getTooltipContainer,s=fe.overlayInnerStyle,g=Object(ue.a)(fe,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),x=Object(ke.useRef)(null);Object(ke.useImperativeHandle)($,function(){return x.current});var U=Object(_e.a)({},g);"visible"in fe&&(U.popupVisible=fe.visible);var le=function(){var q=fe.arrowContent,K=q===void 0?null:q,ee=fe.overlay,p=fe.id;return[ke.createElement("div",{className:"".concat(Re,"-arrow"),key:"arrow"},K),ke.createElement(A,{key:"content",prefixCls:Re,id:p,overlay:ee,overlayInnerStyle:s})]},Ee=!1,ce=!1;if(typeof S=="boolean")Ee=S;else if(S&&Object(W.a)(S)==="object"){var xe=S.keepParent;Ee=xe===!0,ce=xe===!1}return ke.createElement(we.a,Object.assign({popupClassName:N,prefixCls:Re,popup:le,action:I,builtinPlacements:Y.a,popupPlacement:D,ref:x,popupAlign:G,getPopupContainer:u,onPopupVisibleChange:de,afterPopupVisibleChange:Ae,popupTransitionName:Q,popupAnimation:y,defaultPopupVisible:C,destroyPopupOnHide:Ee,autoDestroy:ce,mouseLeaveDelay:We,popupStyle:he,mouseEnterDelay:ie},U),pe)},H=Object(ke.forwardRef)(w),J=Be.a=H},Ot1p:function(nt,Be,h){"use strict";var W=h("2qtc"),_e=h("kLXV"),ue=h("rAM+"),ke=h("miYZ"),we=h("tsqr"),Y=h("tJVT"),M=h("jrin"),A=h("q1tI"),w=h.n(A),H=h("VrN/"),J=h.n(H),ae=h("bdgK"),fe=h("p77/"),$=h("Bd2K"),N=h("ELLl"),P=h("19Vz"),I=h("lZu9"),B=h("+NIl"),ie=h("kSUc"),Ce=h("9Bee"),We=function(T){var f=T.value,v=f===void 0?"":f,b=T.className,E=T.showTextOnly,re=T.showLines,me=T.style,je=me===void 0?{}:me,rt=Object(A.useMemo)(function(){return""},[v]);return w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{dangerouslySetInnerHTML:{__html:rt}}))},he=h("0Owb"),be=h("dejd"),Re=h("C+DQ"),pe=[{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 de(T){var f=T.onActionCallback,v=T.title,b=T.icon,E=T.actionName,re=T.className,me=re===void 0?"":re,je=T.children;function rt(){f(E)}return w.a.createElement("a",{title:v,className:me,onClick:rt},w.a.createElement("i",{className:"md-iconfont ".concat(b)}),je)}var Ae=function(T){var f=T.watch,v=T.showNullButton,b=T.onActionCallback,E=T.fullScreen,re=T.insertTemp,me=T.hidetoolBar,je=[].concat(pe,[{title:"".concat(f?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(f?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return w.a.createElement("ul",{className:"markdown-toolbar-container"},!me&&je.map(function(rt,it){return w.a.createElement("li",{key:it},rt.actionName?w.a.createElement(de,Object(he.a)({},rt,{onActionCallback:b})):w.a.createElement("span",{className:"v-line"}))}),v?w.a.createElement("li",null,w.a.createElement(de,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:b},w.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,re&&w.a.createElement("li",null,w.a.createElement(de,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(re),onActionCallback:b},w.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),w.a.createElement("li",{className:"btn-full-screen"},w.a.createElement(de,{icon:"".concat(E?"icon-shrink":"icon-enlarge"),title:E?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:b})))},Q=h("M8RZ"),y=h("+L6B"),V=h("2/Rp"),D=h("y8nQ"),_=h("Vl3Y"),G=h("5NDa"),R=h("5rEg"),S={labelCol:{span:4},wrapperCol:{span:20}},C=function(T){var f=T.callback,v=T.onCancel;function b(E){f(E)}return w.a.createElement(_.a,Object(he.a)({},S,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:b}),w.a.createElement(_.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},w.a.createElement(R.a,null)),w.a.createElement(_.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},w.a.createElement(R.a,null)),w.a.createElement("div",{className:"flex-container flex-end"},w.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(V.a,{type:"ghost",onClick:v},"\u53D6\u6D88")))},u=h("7ahc"),s=h("HmJG"),g=h("BjJ7"),x=_.a.useForm,U={width:280,marginRight:10},le={labelCol:{span:5},wrapperCol:{span:19}},Ee=function(T){var f=T.callback,v=T.onCancel,b=x(),E=Object(Y.a)(b,1),re=E[0];function me(it){f(it)}function je(it,lt){re.setFieldsValue({src:"/api/attachments/".concat(it.id),type:lt.type})}function rt(it){var lt=it.target.files[0];xe(lt,je)}return w.a.createElement(_.a,Object(he.a)({form:re},le,{className:"upload-image-panel",onFinish:me}),w.a.createElement(_.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},w.a.createElement("div",{className:"flex-container"},w.a.createElement(_.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},w.a.createElement(R.a,{style:U})),w.a.createElement(ce,{onFileChange:rt}))),w.a.createElement(_.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},w.a.createElement(R.a,{style:{width:264}})),w.a.createElement(_.a.Item,{style:{textAlign:"right"}},w.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(V.a,{type:"ghost",onClick:v},"\u53D6\u6D88")))};function ce(T){var f=T.onFileChange;return w.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",w.a.createElement("input",{type:"file",onChange:f}))}function xe(T,f){if(!T)throw new String("\u6CA1\u6709\u6587\u4EF6");var v=new FormData;v.append("editormd-image-file",T),v.append("file_param_name","editormd-image-file"),v.append("byxhr","true");var b=new window.XMLHttpRequest;b.withCredentials=!0,b.addEventListener("load",function(E){f(JSON.parse(E.target.responseText),T)},!1),b.addEventListener("error",function(E){console.error(E)},!1),b.open("POST","".concat(g.a,"/api/attachments.json")),b.send(v)}var Z=h("giR+"),q=h("fyUT"),K=h("7Kak"),ee=h("9yH6"),p=ee.a.Group,k={margin:"0 8px"},m=function(T){var f=T.callback,v=T.onCancel;function b(E){f(E)}return w.a.createElement(_.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:b},w.a.createElement("div",{className:"flex-container"},w.a.createElement("span",{style:k},"\u5355\u5143\u683C\u6570\uFF1A"),w.a.createElement("span",{style:k},"\u884C\u6570"),w.a.createElement(_.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},w.a.createElement(q.a,null)),w.a.createElement("span",{style:k},"\u5217\u6570"),w.a.createElement(_.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},w.a.createElement(q.a,null))),w.a.createElement("div",{className:"flex-container",style:{marginTop:12}},w.a.createElement("span",{style:k},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),w.a.createElement(_.a.Item,{name:"align"},w.a.createElement(p,null,w.a.createElement(ee.a,{value:"default"},w.a.createElement("i",{className:"fa fa-align-justify"})),w.a.createElement(ee.a,{value:"left"},w.a.createElement("i",{className:"fa fa-align-left"})),w.a.createElement(ee.a,{value:"center"},w.a.createElement("i",{className:"fa fa-align-center"})),w.a.createElement(ee.a,{value:"right"},w.a.createElement("i",{className:"fa fa-align-right"}))))),w.a.createElement("div",{className:"flex-container flex-end"},w.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(V.a,{type:"ghost",onClick:v},"\u53D6\u6D88")))},j=h("m3rI"),ne=h("wMS7"),z=h.n(ne),oe="link",Se="upload-image",Te="code-block",ge="add-table",ve="------------",De={default:ve,left:":".concat(ve),center:":".concat(ve,":"),right:"".concat(ve,":")},Ie=h("9VGf"),Pe,Ue;function Ke(){}var tt=0,Xe=1e4,Ye="\u2581",Oe=`
**\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 at(T){return/^\d+$/.test(T)?"".concat(T,"px"):T}var Ze=navigator.platform.toUpperCase().indexOf("MAC")>=0,Me=Ze?"Cmd":"Ctrl",He=(Pe={},Object(M.a)(Pe,Me+"-B","bold"),Object(M.a)(Pe,Me+"-I","italic"),Pe),X=(Ue={},Object(M.a)(Ue,oe,"\u6DFB\u52A0\u94FE\u63A5"),Object(M.a)(Ue,Te,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(M.a)(Ue,Se,"\u6DFB\u52A0\u56FE\u7247"),Object(M.a)(Ue,ge,"\u6DFB\u52A0\u8868\u683C"),Ue),F=Be.a=function(T){var f=T.defaultValue,v=f===void 0?"":f,b=T.onChange,E=T.width,re=E===void 0?"100%":E,me=T.height,je=me===void 0?400:me,rt=T.miniToolbar,it=rt===void 0?!1:rt,lt=T.isFocus,_t=lt===void 0?!1:lt,bt=T.watch,ht=T.insertTemp,Ft=T.mode,wt=Ft===void 0?"markdown":Ft,Ht=T.id,Rt=Ht===void 0?"markdown-editor-id":Ht,yt=T.showResizeBar,on=yt===void 0?!1:yt,wn=T.noStorage,sn=wn===void 0?!1:wn,Cn=T.showNullButton,tn=Cn===void 0?!1:Cn,nr=T.hidetoolBar,An=nr===void 0?!1:nr,Rn=T.fullScreen,Bn=Rn===void 0?!1:Rn,kt=T.onBlur,qe=T.onCMBeforeChange,Qt=T.onFullScreen,Gn=T.className,hn=Gn===void 0?"":Gn,xt=T.disablePaste,Sn=xt===void 0?!1:xt,Pn=T.placeholder,Dn=Pn===void 0?"":Pn,Fe=T.values,dt=Fe===void 0?"":Fe,On=Object(A.useState)(null),Ln=Object(Y.a)(On,2),Ge=Ln[0],Xn=Ln[1],Tr=Object(A.useState)(v),ct=Object(Y.a)(Tr,2),ln=ct[0],Wn=ct[1],$n=Object(A.useState)(bt),un=Object(Y.a)($n,2),Mn=un[0],ut=un[1],ye=Object(A.useState)(Bn),Qe=Object(Y.a)(ye,2),ot=Qe[0],Ct=Qe[1],cn=Object(A.useState)(""),Gt=Object(Y.a)(cn,2),Pt=Gt[0],Dt=Gt[1],kr=Object(A.useState)(0),_n=Object(Y.a)(kr,2),jn=_n[0],pn=_n[1],Si=Object(A.useState)(je),Oi=Object(Y.a)(Si,2),pr=Oi[0],rr=Oi[1],Qi=Object(A.useState)(!1),Ti=Object(Y.a)(Qi,2),Ua=Ti[0],Jr=Ti[1],Vn=Object(A.useRef)(),Ar=Object(A.useRef)(),Dr=Object(A.useRef)(),mr=Object(A.useRef)();Object(A.useEffect)(function(){Wn(dt),Ge==null||Ge.setValue(dt)},[dt]),Object(A.useEffect)(function(){Qt==null||Qt(ot)},[ot]),Object(A.useEffect)(function(){if(Vn.current){var pt=J.a.fromTextArea(Vn.current,{mode:wt,lineNumbers:!it,lineWrapping:!0,value:v,autoCloseTags:!0,autoCloseBrackets:!0});_t&&pt.focus();function mt(gt,Et){if(Sn){Et.preventDefault();return}var Ot=Et.clipboardData;if(Ot){var Lt=Ot.types.toString(),Nt=Ot.items,Xt=["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"];if(Lt==="Files"||Ot.types.indexOf("Files")>-1){if(Et.preventDefault(),wt=="stex")return;try{var $t,Jn=Nt[1];(($t=Nt[0])===null||$t===void 0?void 0:$t.kind)==="file"&&(Jn=Nt[0]);var Bt=Jn.getAsFile(),ar=Bt.name.split(".").pop();xe(Bt,function(nn){if(nn.id){var Zn,Qn,qr;(Bt==null||((Zn=Bt.type)===null||Zn===void 0)?void 0:Zn.indexOf("image"))>-1?pt.replaceSelection("![,](/api/attachments/".concat(nn.id,"?type=").concat(nn.content_type,")")):(Bt==null||((Qn=Bt.type)===null||Qn===void 0)?void 0:Qn.indexOf("video"))>-1?pt.replaceSelection('<video width="100%" controls src="'.concat(j.a.API_SERVER,"/api/attachments/").concat(nn.id,'"></video>')):(Bt==null||((qr=Bt.type)===null||qr===void 0)?void 0:qr.indexOf("pdf"))>-1?pt.replaceSelection('<a href="'.concat(j.a.API_SERVER,"/api/attachments/").concat(nn.id,"?type=").concat(Bt.type,'&disposition=inline" target="_blank">').concat(Bt.name,"</a>")):Xt.includes(ar)?pt.replaceSelection('<a href="'.concat(j.a.API_SERVER,"/api/attachments/").concat(nn.id,'?type=office&disposition=inline" target="_blank">').concat(Bt.name,"</a>")):pt.replaceSelection("[".concat(Bt.name,"](").concat(j.a.API_SERVER,"/api/attachments/").concat(nn.id,"?type=").concat(nn.content_type,")"))}else(nn==null?void 0:nn.status)===401&&(document.location.href="/user/login")})}catch(nn){we.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return pt.on("paste",mt),Xn(pt),function(){pt.off("paste",mt)}}},[]);var Zr=Object(A.useCallback)(function(){if(Ar.current)try{}catch(pt){console.log(pt,"---- to set md editor body height")}},[pr,Ar,ot]);Object(A.useEffect)(function(){function pt(){var gt=new ae.default(function(Et){var Ot=Object(ue.a)(Et),Lt;try{for(Ot.s();!(Lt=Ot.n()).done;){var Nt=Lt.value;(Nt.target.offsetHeight>0||Nt.target.offsetWidth>0)&&(Zr(),Ge.setSize("100%","100%"),Ge.refresh())}}catch(Xt){Ot.e(Xt)}finally{Ot.f()}});return gt.observe(Vn.current.parentElement),gt}if(Ge){var mt=pt();return function(){mt.unobserve(Vn.current.parentElement)}}},[Ge,Zr]),Object(A.useEffect)(function(){if(Ge){for(var pt=[],mt=function(){var Nt=Et[gt];Ot=Object(Y.a)(Nt,2);var Xt=Ot[0],$t=Ot[1],Jn=Object(M.a)({},Xt,function(){gr($t)});pt.push(Jn),Ge.addKeyMap(Jn)},gt=0,Et=Object.entries(He);gt<Et.length;gt++){var Ot;mt()}return function(){var Lt=Object(ue.a)(pt),Nt;try{for(Lt.s();!(Nt=Lt.n()).done;){var Xt=Nt.value;Ge.removeKeyMap(Xt)}}catch($t){Lt.e($t)}finally{Lt.f()}}}},[Ge]),Object(A.useEffect)(function(){Bn!==ot&&Ct(Bn)},[Bn]),Object(Ie.a)(function(){if(!sn&&jn>0){var pt=new Date().getTime(),mt=window.sessionStorage.getItem(Rt);pt>=jn+Xe&&(!mt||mt!==ln)&&(window.sessionStorage.setItem(Rt,ln),Jr(!0))}},Xe),Object(A.useEffect)(function(){ut(bt)},[Ge,bt]),Object(A.useEffect)(function(){Ge&&(_t&&Ge.focus())},[Ge,_t]),Object(A.useEffect)(function(){if(Mn&&Ge){var pt=Ge.getScrollerElement();function mt(gt){var Et=gt.target;if(mr.current){var Ot=Et.scrollTop/Et.scrollHeight;mr.current.scrollTop=mr.current.scrollHeight*Ot}}return pt.addEventListener("scroll",mt),function(){pt.removeEventListener("scroll",mt)}}},[Ge,Mn]),Object(A.useEffect)(function(){if(Ge&&qe){function pt(mt,gt){qe(mt,gt)}return Ge.on("beforeChange",pt),function(){Ge.off("beforeChange",pt)}}},[Ge,qe]),Object(A.useEffect)(function(){if(Ge&&kt){function pt(){kt(Ge.getValue())}return Ge.on("blur",pt),function(){Ge.off("blur",pt)}}},[Ge,kt]),Object(A.useEffect)(function(){if(Ge){function pt(mt){var gt=z.a.sanitize(mt.getValue());Wn(gt),pn(new Date().getTime()),mt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),b&&b(gt)}return Ge.on("change",pt),function(){Ge.off("change",pt)}}},[Ge,b]),Object(A.useEffect)(function(){Ge&&(v==null?(Ge.setValue(""),Wn("")):v!==Ge.getValue()&&(Ge.setValue(v),Wn(v),Ge.setCursor(Ge.lineCount(),0)))},[Ge,v]);var gr=Object(A.useCallback)(function(pt){var mt=Ge.getCursor(),gt=Ge.getSelection(),Et=gt.split(`
`);switch(pt){case"bold":return Ge.replaceSelection("**"+gt+"**"),gt===""&&Ge.setCursor(mt.line,mt.ch+2),Ge.focus();case"italic":return Ge.replaceSelection("*"+gt+"*"),gt===""&&Ge.setCursor(mt.line,mt.ch+1),Ge.focus();case"code":return Ge.replaceSelection("`"+gt+"`"),gt===""&&Ge.setCursor(mt.line,mt.ch+1),Ge.focus();case"inline-latex":return Ge.replaceSelection("`$$"+gt+"$$`"),gt===""&&Ge.setCursor(mt.line,mt.ch+3),Ge.focus();case"latex":return Ge.replaceSelection("```latex\n"+gt+"\n```"),Ge.setCursor(mt.line+1,gt.length+1),Ge.focus();case"line-break":return Ge.replaceSelection(`<br/>
`),Ge.focus();case"list-ul":return gt===""?Ge.replaceSelection("- "+gt):Ge.replaceSelection(Et.map(function(Ot){return Ot===""?"":"- ".concat(Ot)}).join(`
`)),Ge.focus();case"list-ol":return gt===""?Ge.replaceSelection("1. "+gt):Ge.replaceSelection(Et.map(function(Ot,Lt){return Ot===""?"":"".concat(Lt+1,". ").concat(Ot)}).join(`
`)),Ge.focus();case"add-null-ch":return gt===""&&Ge.setCursor(mt.line,mt.ch+1),Ge.replaceSelection(Ye),Ge.focus();case"inster-template-1":return gt===""&&Ge.setCursor(mt.line,mt.ch),Ge.replaceSelection(Oe),Ge.focus();case"eraser":return Ge.setValue(""),Ge.focus();case"trigger-watch":return ut(!Mn),Ge.focus();case"trigger-full-screen":return Ct(!ot),Ge.focus();case oe:Dt(oe);return;case Te:Dt(Te);return;case Se:Dt(Se);return;case ge:Dt(ge);return;default:throw new Error}},[Ge,Mn,ot]),Yn=Object(A.useCallback)(function(pt){Dt("");switch(Pt){case oe:var mt=pt.title,gt=pt.link;return Ge.replaceSelection("[".concat(mt,"](").concat(gt,")")),Ge.focus();case Te:var Et=pt.language,Ot=pt.content;return Ge.replaceSelection(["```"+Et,Ot,"```"].join(`
`)),Ge.focus();case Se:var Lt=pt.src,Nt=pt.alt;return Ge.replaceSelection("![ ".concat(Nt," ]( ").concat(Lt,' "').concat(Nt,'" )')),Ge.focus();case ge:for(var Xt=pt.row,$t=pt.col,Jn=pt.align,Bt=`
`,ar=0;ar<Xt;ar++){for(var nn=[],Zn=[],Qn=0;Qn<$t;Qn++)ar===1&&Zn.push(De[Jn]),nn.push(" ");ar===1&&(Bt+="| ".concat(Zn.join(" | "),` |
`)),Bt+="| ".concat(nn.join($t===1?"":" | "),` |
`)}return Ge.replaceSelection(Bt+`
`),Ge.focus();default:throw new Error}},[Ge,Pt]),Qr=Object(A.useMemo)(function(){switch(Pt){case oe:return w.a.createElement(C,{callback:Yn,onCancel:ir});case Te:return w.a.createElement(u.b,{callback:Yn,onCancel:ir});case Se:return w.a.createElement(Ee,{callback:Yn,onCancel:ir});case ge:return w.a.createElement(m,{callback:Yn,onCancel:ir});default:return null}},[Pt]);function ir(){Dt("")}Object(A.useEffect)(function(){if(Dr.current){var pt=Dr.current,mt=!1,gt=0;function Et(Nt){mt=!0,gt=Nt.pageY}function Ot(){mt=!1}function Lt(Nt){if(mt){var Xt=Nt.pageY-gt;Xt<0&&(Xt=0),Xt>300&&(Xt=300);var $t=je+Xt+"px";rr($t)}}return pt.addEventListener("mousedown",Et),document.addEventListener("mousemove",Lt),document.addEventListener("mouseup",Ot),function(){pt.removeEventListener("mousedown",Et),document.removeEventListener("mousemove",Lt),document.removeEventListener("mouseup",Ot)}}},[Ge,Dr]),Object(A.useEffect)(function(){rr(je)},[je]);var ki=at(re),Lr=at(pr),qi={width:ki,height:Lr},ea=Object(A.useMemo)(function(){if(jn){var pt=new Date(jn),mt=pt.getHours(),gt=pt.getMinutes(),Et=pt.getSeconds();return mt=mt<10?"0"+mt:mt,gt=gt<10?"0"+gt:gt,Et=Et<10?"0"+Et:Et,"".concat(mt,":").concat(gt,":").concat(Et)}return 0},[jn]);function Nn(){window.sessionStorage.removeItem(Rt),Jr(!1),pn(0)}function Ba(){Jr(!1),pn(0),Ge.setValue(window.sessionStorage.getItem(Rt))}return w.a.createElement(A.Fragment,null,w.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ar},w.a.createElement("div",{className:"markdown-editor-container ".concat(hn," ").concat(Mn?"on-preview":""," ").concat(it?"mini":""," ").concat(ot?"full-screen":""),style:qi},w.a.createElement(Ae,{insertTemp:ht,watch:Mn,fullScreen:ot,showNullButton:tn,onActionCallback:gr,hidetoolBar:An}),w.a.createElement("div",{className:"markdown-editor-body"},w.a.createElement("div",{className:"codemirror-container"},w.a.createElement("textarea",{ref:Vn,placeholder:Dn})),Mn?w.a.createElement("div",{ref:mr,className:"preview-container"},wt==="stex"&&w.a.createElement(We,{value:ln}),wt!=="stex"&&w.a.createElement(Ce.a,{value:ln})):null))),on?w.a.createElement("a",{ref:Dr,className:"editor-resize"}):null,w.a.createElement(Q.a,null,X[Pt]?w.a.createElement(_e.a,{centered:!0,title:X[Pt],visible:!0,onCancel:ir,footer:null},Qr):null))}},SJMd:function(nt,Be){/**
* @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 h,W,_e,ue=!1,ke,we;window.PR_SHOULD_USE_CONTINUATION=!0;var Y,M;(function(){var A=window,w=["break,continue,do,else,for,if,return,while"],H=[w,"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"],J=[H,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],ae=[J,"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"],fe=[J,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],$=[J,"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"],N="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",P=[J,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],I="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",B=[w,"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"],ie=[w,"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"],Ce=[w,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],We=[ae,$,fe,P,I,B,ie,Ce],he=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,be="str",Re="kwd",pe="com",de="typ",Ae="lit",Q="pun",y="pln",V="tag",D="dec",_="src",G="atn",R="atv",S="nocode",C="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function u(z){for(var oe=0,Se=!1,Te=!1,ge=0,ve=z.length;ge<ve;++ge){var De=z[ge];if(De.ignoreCase)Te=!0;else if(/[a-z]/i.test(De.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Se=!0,Te=!1;break}}var Ie={b:8,t:9,n:10,v:11,f:12,r:13};function Pe(Ye){var Oe=Ye.charCodeAt(0);if(Oe!==92)return Oe;var at=Ye.charAt(1);return Oe=Ie[at],Oe||("0"<=at&&at<="7"?parseInt(Ye.substring(1),8):at==="u"||at==="x"?parseInt(Ye.substring(2),16):Ye.charCodeAt(1))}function Ue(Ye){if(Ye<32)return(Ye<16?"\\x0":"\\x")+Ye.toString(16);var Oe=String.fromCharCode(Ye);return Oe==="\\"||Oe==="-"||Oe==="]"||Oe==="^"?"\\"+Oe:Oe}function Ke(Ye){var Oe=Ye.substring(1,Ye.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),at=[],Ze=Oe[0]==="^",Me=["["];Ze&&Me.push("^");for(var He=Ze?1:0,X=Oe.length;He<X;++He){var F=Oe[He];if(/\\[bdsw]/i.test(F))Me.push(F);else{var T=Pe(F),f;He+2<X&&Oe[He+1]==="-"?(f=Pe(Oe[He+2]),He+=2):f=T,at.push([T,f]),f<65||T>122||(f<65||T>90||at.push([Math.max(65,T)|32,Math.min(f,90)|32]),f<97||T>122||at.push([Math.max(97,T)&~32,Math.min(f,122)&~32]))}}at.sort(function(re,me){return re[0]-me[0]||me[1]-re[1]});for(var v=[],b=[],He=0;He<at.length;++He){var E=at[He];E[0]<=b[1]+1?b[1]=Math.max(b[1],E[1]):v.push(b=E)}for(var He=0;He<v.length;++He){var E=v[He];Me.push(Ue(E[0])),E[1]>E[0]&&(E[1]+1>E[0]&&Me.push("-"),Me.push(Ue(E[1])))}return Me.push("]"),Me.join("")}function tt(Ye){for(var Oe=Ye.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")),at=Oe.length,Ze=[],Me=0,He=0;Me<at;++Me){var X=Oe[Me];if(X==="(")++He;else if(X.charAt(0)==="\\"){var F=+X.substring(1);F&&(F<=He?Ze[F]=-1:Oe[Me]=Ue(F))}}for(var Me=1;Me<Ze.length;++Me)Ze[Me]===-1&&(Ze[Me]=++oe);for(var Me=0,He=0;Me<at;++Me){var X=Oe[Me];if(X==="(")++He,Ze[He]||(Oe[Me]="(?:");else if(X.charAt(0)==="\\"){var F=+X.substring(1);F&&F<=He&&(Oe[Me]="\\"+Ze[F])}}for(var Me=0;Me<at;++Me)Oe[Me]==="^"&&Oe[Me+1]!=="^"&&(Oe[Me]="");if(Ye.ignoreCase&&Se)for(var Me=0;Me<at;++Me){var X=Oe[Me],T=X.charAt(0);X.length>=2&&T==="["?Oe[Me]=Ke(X):T!=="\\"&&(Oe[Me]=X.replace(/[a-zA-Z]/g,function(b){var E=b.charCodeAt(0);return"["+String.fromCharCode(E&~32,E|32)+"]"}))}return Oe.join("")}for(var Xe=[],ge=0,ve=z.length;ge<ve;++ge){var De=z[ge];if(De.global||De.multiline)throw new Error(""+De);Xe.push("(?:"+tt(De)+")")}return new RegExp(Xe.join("|"),Te?"gi":"g")}function s(z,oe){var Se=/(?:^|\s)nocode(?:\s|$)/,Te=[],ge=0,ve=[],De=0;function Ie(Pe){var Ue=Pe.nodeType;if(Ue==1){if(Se.test(Pe.className))return;for(var Ke=Pe.firstChild;Ke;Ke=Ke.nextSibling)Ie(Ke);var tt=Pe.nodeName.toLowerCase();(tt==="br"||tt==="li")&&(Te[De]=`
`,ve[De<<1]=ge++,ve[De++<<1|1]=Pe)}else if(Ue==3||Ue==4){var Xe=Pe.nodeValue;Xe.length&&(oe?Xe=Xe.replace(/\r\n?/g,`
`):Xe=Xe.replace(/[ \t\r\n]+/g," "),Te[De]=Xe,ve[De<<1]=ge,ge+=Xe.length,ve[De++<<1|1]=Pe)}}return Ie(z),{sourceCode:Te.join("").replace(/\n$/,""),spans:ve}}function g(z,oe,Se,Te,ge){if(!Se)return;var ve={sourceNode:z,pre:1,langExtension:null,numberLines:null,sourceCode:Se,spans:null,basePos:oe,decorations:null};Te(ve),ge.push.apply(ge,ve.decorations)}var x=/\S/;function U(z){for(var oe=void 0,Se=z.firstChild;Se;Se=Se.nextSibling){var Te=Se.nodeType;oe=Te===1?oe?z:Se:Te===3&&x.test(Se.nodeValue)?z:oe}return oe===z?void 0:oe}function le(z,oe){var Se={},Te;(function(){for(var De=z.concat(oe),Ie=[],Pe={},Ue=0,Ke=De.length;Ue<Ke;++Ue){var tt=De[Ue],Xe=tt[3];if(Xe)for(var Ye=Xe.length;--Ye>=0;)Se[Xe.charAt(Ye)]=tt;var Oe=tt[1],at=""+Oe;Pe.hasOwnProperty(at)||(Ie.push(Oe),Pe[at]=null)}Ie.push(/[\0-\uffff]/),Te=u(Ie)})();var ge=oe.length,ve=function(De){for(var Ie=De.sourceCode,Pe=De.basePos,Ue=De.sourceNode,Ke=[Pe,y],tt=0,Xe=Ie.match(Te)||[],Ye={},Oe=0,at=Xe.length;Oe<at;++Oe){var Ze=Xe[Oe],Me=Ye[Ze],He=void 0,X;if(typeof Me=="string")X=!1;else{var F=Se[Ze.charAt(0)];if(F)He=Ze.match(F[1]),Me=F[0];else{for(var T=0;T<ge;++T)if(F=oe[T],He=Ze.match(F[1]),He){Me=F[0];break}He||(Me=y)}X=Me.length>=5&&Me.substring(0,5)==="lang-",X&&!(He&&typeof He[1]=="string")&&(X=!1,Me=_),X||(Ye[Ze]=Me)}var f=tt;if(tt+=Ze.length,!X)Ke.push(Pe+f,Me);else{var v=He[1],b=Ze.indexOf(v),E=b+v.length;He[2]&&(E=Ze.length-He[2].length,b=E-v.length);var re=Me.substring(5);g(Ue,Pe+f,Ze.substring(0,b),ve,Ke),g(Ue,Pe+f+b,v,ee(re,v),Ke),g(Ue,Pe+f+E,Ze.substring(E),ve,Ke)}}De.decorations=Ke};return ve}function Ee(z){var oe=[],Se=[];z.tripleQuotedStrings?oe.push([be,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):z.multiLineStrings?oe.push([be,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):oe.push([be,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),z.verbatimStrings&&Se.push([be,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Te=z.hashComments;Te&&(z.cStyleComments?(Te>1?oe.push([pe,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):oe.push([pe,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Se.push([be,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):oe.push([pe,/^#[^\r\n]*/,null,"#"])),z.cStyleComments&&(Se.push([pe,/^\/\/[^\r\n]*/,null]),Se.push([pe,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ge=z.regexLiterals;if(ge){var ve=ge>1?"":`
\r`,De=ve?".":"[\\S\\s]",Ie="/(?=[^/*"+ve+"])(?:[^/\\x5B\\x5C"+ve+"]|\\x5C"+De+"|\\x5B(?:[^\\x5C\\x5D"+ve+"]|\\x5C"+De+")*(?:\\x5D|$))+/";Se.push(["lang-regex",RegExp("^"+C+"("+Ie+")")])}var Pe=z.types;Pe&&Se.push([de,Pe]);var Ue=(""+z.keywords).replace(/^ | $/g,"");Ue.length&&Se.push([Re,new RegExp("^(?:"+Ue.replace(/[\s,]+/g,"|")+")\\b"),null]),oe.push([y,/^\s+/,null,` \r
\xA0`]);var Ke="^.[^\\s\\w.$@'\"`/\\\\]*";return z.regexLiterals&&(Ke+="(?!s*/)"),Se.push([Ae,/^@[a-z_$][a-z_$@0-9]*/i,null],[de,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[y,/^[a-z_$][a-z_$@0-9]*/i,null],[Ae,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[y,/^\\[\s\S]?/,null],[Q,new RegExp(Ke),null]),le(oe,Se)}var ce=Ee({keywords:We,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function xe(z,oe,Se){for(var Te=/(?:^|\s)nocode(?:\s|$)/,ge=/\r\n?|\n/,ve=z.ownerDocument,De=ve.createElement("li");z.firstChild;)De.appendChild(z.firstChild);var Ie=[De];function Pe(Oe){var at=Oe.nodeType;if(at==1&&!Te.test(Oe.className))if(Oe.nodeName==="br")Ue(Oe),Oe.parentNode&&Oe.parentNode.removeChild(Oe);else for(var Ze=Oe.firstChild;Ze;Ze=Ze.nextSibling)Pe(Ze);else if((at==3||at==4)&&Se){var Me=Oe.nodeValue,He=Me.match(ge);if(He){var X=Me.substring(0,He.index);Oe.nodeValue=X;var F=Me.substring(He.index+He[0].length);if(F){var T=Oe.parentNode;T.insertBefore(ve.createTextNode(F),Oe.nextSibling)}Ue(Oe),X||Oe.parentNode.removeChild(Oe)}}}function Ue(Oe){for(;!Oe.nextSibling;)if(Oe=Oe.parentNode,!Oe)return;function at(He,X){var F=X?He.cloneNode(!1):He,T=He.parentNode;if(T){var f=at(T,1),v=He.nextSibling;f.appendChild(F);for(var b=v;b;b=v)v=b.nextSibling,f.appendChild(b)}return F}for(var Ze=at(Oe.nextSibling,0),Me;(Me=Ze.parentNode)&&Me.nodeType===1;)Ze=Me;Ie.push(Ze)}for(var Ke=0;Ke<Ie.length;++Ke)Pe(Ie[Ke]);oe===(oe|0)&&Ie[0].setAttribute("value",oe);var tt=ve.createElement("ol");tt.className="linenums";for(var Xe=Math.max(0,oe-1|0)||0,Ke=0,Ye=Ie.length;Ke<Ye;++Ke)De=Ie[Ke],De.className="L"+(Ke+Xe)%10,De.firstChild||De.appendChild(ve.createTextNode("\xA0")),tt.appendChild(De);z.appendChild(tt)}function Z(z){var oe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);oe=oe&&+oe[1]<=8;var Se=/\n/g,Te=z.sourceCode,ge=Te.length,ve=0,De=z.spans,Ie=De.length,Pe=0,Ue=z.decorations,Ke=Ue.length,tt=0;Ue[Ke]=ge;var Xe,Ye;for(Ye=Xe=0;Ye<Ke;)Ue[Ye]!==Ue[Ye+2]?(Ue[Xe++]=Ue[Ye++],Ue[Xe++]=Ue[Ye++]):Ye+=2;for(Ke=Xe,Ye=Xe=0;Ye<Ke;){for(var Oe=Ue[Ye],at=Ue[Ye+1],Ze=Ye+2;Ze+2<=Ke&&Ue[Ze+1]===at;)Ze+=2;Ue[Xe++]=Oe,Ue[Xe++]=at,Ye=Ze}Ke=Ue.length=Xe;var Me=z.sourceNode,He="";Me&&(He=Me.style.display,Me.style.display="none");try{for(var X=null;Pe<Ie;){var F=De[Pe],T=De[Pe+2]||ge,f=Ue[tt+2]||ge,Ze=Math.min(T,f),v=De[Pe+1],b;if(v.nodeType!==1&&(b=Te.substring(ve,Ze))){oe&&(b=b.replace(Se,"\r")),v.nodeValue=b;var E=v.ownerDocument,re=E.createElement("span");re.className=Ue[tt+1];var me=v.parentNode;me.replaceChild(re,v),re.appendChild(v),ve<T&&(De[Pe+1]=v=E.createTextNode(Te.substring(Ze,T)),me.insertBefore(v,re.nextSibling))}ve=Ze,ve>=T&&(Pe+=2),ve>=f&&(tt+=2)}}finally{Me&&(Me.style.display=He)}}var q={};function K(z,oe){for(var Se=oe.length;--Se>=0;){var Te=oe[Se];q.hasOwnProperty(Te)?A.console&&console.warn("cannot override language handler %s",Te):q[Te]=z}}function ee(z,oe){return z&&q.hasOwnProperty(z)||(z=/^\s*</.test(oe)?"default-markup":"default-code"),q[z]}K(ce,["default-code"]),K(le([],[[y,/^[^<?]+/],[D,/^<!\w[^>]*(?:>|$)/],[pe,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Q,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),K(le([[y,/^[\s]+/,null,` \r
`],[R,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[V,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Q,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),K(le([],[[R,/^[\s\S]+/]]),["uq.val"]),K(Ee({keywords:ae,hashComments:!0,cStyleComments:!0,types:he}),["c","cc","cpp","cxx","cyc","m"]),K(Ee({keywords:"null,true,false"}),["json"]),K(Ee({keywords:$,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:he}),["cs"]),K(Ee({keywords:fe,cStyleComments:!0}),["java"]),K(Ee({keywords:Ce,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),K(Ee({keywords:B,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),K(Ee({keywords:I,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),K(Ee({keywords:ie,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),K(Ee({keywords:P,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),K(Ee({keywords:N,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),K(le([],[[be,/^[\s\S]+/]]),["regex"]);function p(z){var oe=z.langExtension;try{var Se=s(z.sourceNode,z.pre),Te=Se.sourceCode;z.sourceCode=Te,z.spans=Se.spans,z.basePos=0,ee(oe,Te)(z),Z(z)}catch(ge){A.console&&console.log(ge&&ge.stack||ge)}}function k(z,oe,Se){var Te=Se||!1,ge=oe||null,ve=document.createElement("div");ve.innerHTML="<pre>"+z+"</pre>",ve=ve.firstChild,Te&&xe(ve,Te,!0);var De={langExtension:ge,numberLines:Te,sourceNode:ve,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return p(De),ve.innerHTML}function m(z,oe){var Se=oe||document.body,Te=Se.ownerDocument||document;function ge(F){return Se.getElementsByTagName(F)}for(var ve=[ge("pre"),ge("code"),ge("xmp")],De=[],Ie=0;Ie<ve.length;++Ie)for(var Pe=0,Ue=ve[Ie].length;Pe<Ue;++Pe)De.push(ve[Ie][Pe]);ve=null;var Ke=Date;Ke.now||(Ke={now:function(){return+new Date}});var tt=0,Xe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ye=/\bprettyprint\b/,Oe=/\bprettyprinted\b/,at=/pre|xmp/i,Ze=/^code$/i,Me=/^(?:pre|code|xmp)$/i,He={};function X(){for(var F=A.PR_SHOULD_USE_CONTINUATION?Ke.now()+250:Infinity;tt<De.length&&Ke.now()<F;tt++){for(var T=De[tt],f=He,v=T;v=v.previousSibling;){var b=v.nodeType,E=(b===7||b===8)&&v.nodeValue;if(E?!/^\??prettify\b/.test(E):b!==3||/\S/.test(v.nodeValue))break;if(E){f={},E.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Rt,yt,on){f[yt]=on});break}}var re=T.className;if((f!==He||Ye.test(re))&&!Oe.test(re)){for(var me=!1,je=T.parentNode;je;je=je.parentNode){var rt=je.tagName;if(Me.test(rt)&&je.className&&Ye.test(je.className)){me=!0;break}}if(!me){T.className+=" prettyprinted";var it=f.lang;if(!it){it=re.match(Xe);var lt;!it&&(lt=U(T))&&Ze.test(lt.tagName)&&(it=lt.className.match(Xe)),it&&(it=it[1])}var _t;if(at.test(T.tagName))_t=1;else{var bt=T.currentStyle,ht=Te.defaultView,Ft=bt?bt.whiteSpace:ht&&ht.getComputedStyle?ht.getComputedStyle(T,null).getPropertyValue("white-space"):0;_t=Ft&&Ft.substring(0,3)==="pre"}var wt=f.linenums;(wt=wt==="true"||+wt)||(wt=re.match(/\blinenums\b(?::(\d+))?/),wt=wt?wt[1]&&wt[1].length?+wt[1]:!0:!1),wt&&xe(T,wt,_t);var Ht={langExtension:it,sourceNode:T,numberLines:wt,pre:_t,sourceCode:null,basePos:null,spans:null,decorations:null};p(Ht)}}}tt<De.length?A.setTimeout(X,250):typeof z=="function"&&z()}X()}var j=A.PR={createSimpleLexer:le,registerLangHandler:K,sourceDecorator:Ee,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:R,PR_COMMENT:pe,PR_DECLARATION:D,PR_KEYWORD:Re,PR_LITERAL:Ae,PR_NOCODE:S,PR_PLAIN:y,PR_PUNCTUATION:Q,PR_SOURCE:_,PR_STRING:be,PR_TAG:V,PR_TYPE:de,prettyPrintOne:ue?A.prettyPrintOne=k:Y=k,prettyPrint:M=ue?A.prettyPrint=m:M=m},ne=A.define;typeof ne=="function"&&ne.amd&&ne("google-code-prettify",[],function(){return j})})()},"VrN/":function(nt,Be,h){(function(W,_e){nt.exports=_e()})(this,function(){"use strict";var W=navigator.userAgent,_e=navigator.platform,ue=/gecko\/\d/i.test(W),ke=/MSIE \d/.test(W),we=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(W),Y=/Edge\/(\d+)/.exec(W),M=ke||we||Y,A=M&&(ke?document.documentMode||6:+(Y||we)[1]),w=!Y&&/WebKit\//.test(W),H=w&&/Qt\/\d+\.\d+/.test(W),J=!Y&&/Chrome\//.test(W),ae=/Opera\//.test(W),fe=/Apple Computer/.test(navigator.vendor),$=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(W),N=/PhantomJS/.test(W),P=!Y&&/AppleWebKit/.test(W)&&/Mobile\/\w+/.test(W),I=/Android/.test(W),B=P||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(W),ie=P||/Mac/.test(_e),Ce=/\bCrOS\b/.test(W),We=/win/i.test(_e),he=ae&&W.match(/Version\/(\d*\.\d*)/);he&&(he=Number(he[1])),he&&he>=15&&(ae=!1,w=!0);var be=ie&&(H||ae&&(he==null||he<12.11)),Re=ue||M&&A>=9;function pe(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var de=function(e,t){var r=e.className,n=pe(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function Ae(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Q(e,t){return Ae(e).appendChild(t)}function y(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function V(e,t,r,n){var i=y(e,t,r,n);return i.setAttribute("role","presentation"),i}var D;document.createRange?D=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:D=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function _(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function G(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function R(e,t){var r=e.className;pe(t).test(r)||(e.className+=(r?" ":"")+t)}function S(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!pe(r[n]).test(t)&&(t+=" "+r[n]);return t}var C=function(e){e.select()};P?C=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:M&&(C=function(e){try{e.select()}catch(t){}});function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function s(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function g(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,o=i||0;;){var l=e.indexOf(" ",a);if(l<0||l>=t)return o+(t-a);o+=l-a,o+=r-o%r,a=l+1}}var x=function(){this.id=null,this.f=null,this.time=0,this.handler=u(this.onTimeout,this)};x.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},x.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function U(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var le=50,Ee={toString:function(){return"CodeMirror.Pass"}},ce={scroll:!1},xe={origin:"*mouse"},Z={origin:"+move"};function q(e,t,r){for(var n=0,i=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var o=a-n;if(a==e.length||i+o>=t)return n+Math.min(o,t-i);if(i+=a-n,i+=r-i%r,n=a+1,i>=t)return n}}var K=[""];function ee(e){for(;K.length<=e;)K.push(p(K)+" ");return K[e]}function p(e){return e[e.length-1]}function k(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function m(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function j(){}function ne(e,t){var r;return Object.create?r=Object.create(e):(j.prototype=e,r=new j),t&&s(t,r),r}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||z.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&oe(e)?!0:t.test(e):oe(e)}function Te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ge=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ve(e){return e.charCodeAt(0)>=768&&ge.test(e)}function De(e,t,r){for(;(r<0?t>0:t<e.length)&&ve(e.charAt(t));)t+=r;return t}function Ie(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function Pe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<r&&o.to>t||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var Ue=null;function Ke(e,t,r){var n;Ue=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&r=="before"?n=i:Ue=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:Ue=i)}return n!=null?n:Ue}var tt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function c(d,O,L){this.level=d,this.from=O,this.to=L}return function(d,O){var L=O=="ltr"?"L":"R";if(d.length==0||O=="ltr"&&!n.test(d))return!1;for(var se=d.length,te=[],Le=0;Le<se;++Le)te.push(r(d.charCodeAt(Le)));for(var Ne=0,ze=L;Ne<se;++Ne){var $e=te[Ne];$e=="m"?te[Ne]=ze:ze=$e}for(var Je=0,Ve=L;Je<se;++Je){var et=te[Je];et=="1"&&Ve=="r"?te[Je]="n":a.test(et)&&(Ve=et,et=="r"&&(te[Je]="R"))}for(var ft=1,st=te[0];ft<se-1;++ft){var vt=te[ft];vt=="+"&&st=="1"&&te[ft+1]=="1"?te[ft]="1":vt==","&&st==te[ft+1]&&(st=="1"||st=="n")&&(te[ft]=st),st=vt}for(var At=0;At<se;++At){var Jt=te[At];if(Jt==",")te[At]="N";else if(Jt=="%"){var jt=void 0;for(jt=At+1;jt<se&&te[jt]=="%";++jt);for(var En=At&&te[At-1]=="!"||jt<se&&te[jt]=="1"?"1":"N",vn=At;vn<jt;++vn)te[vn]=En;At=jt-1}}for(var Wt=0,bn=L;Wt<se;++Wt){var en=te[Wt];bn=="L"&&en=="1"?te[Wt]="L":a.test(en)&&(bn=en)}for(var Kt=0;Kt<se;++Kt)if(i.test(te[Kt])){var zt=void 0;for(zt=Kt+1;zt<se&&i.test(te[zt]);++zt);for(var It=(Kt?te[Kt-1]:L)=="L",yn=(zt<se?te[zt]:L)=="L",Vr=It==yn?It?"L":"R":L,hr=Kt;hr<zt;++hr)te[hr]=Vr;Kt=zt-1}for(var an=[],Kn,Zt=0;Zt<se;)if(o.test(te[Zt])){var Ia=Zt;for(++Zt;Zt<se&&o.test(te[Zt]);++Zt);an.push(new c(0,Ia,Zt))}else{var tr=Zt,Sr=an.length,Or=O=="rtl"?1:0;for(++Zt;Zt<se&&te[Zt]!="L";++Zt);for(var fn=tr;fn<Zt;)if(l.test(te[fn])){tr<fn&&(an.splice(Sr,0,new c(1,tr,fn)),Sr+=Or);var Yr=fn;for(++fn;fn<Zt&&l.test(te[fn]);++fn);an.splice(Sr,0,new c(2,Yr,fn)),Sr+=Or,tr=fn}else++fn;tr<Zt&&an.splice(Sr,0,new c(1,tr,Zt))}return O=="ltr"&&(an[0].level==1&&(Kn=d.match(/^\s+/))&&(an[0].from=Kn[0].length,an.unshift(new c(0,0,Kn[0].length))),p(an).level==1&&(Kn=d.match(/\s+$/))&&(p(an).to-=Kn[0].length,an.push(new c(0,se-Kn[0].length,se)))),O=="rtl"?an.reverse():an}}();function Xe(e,t){var r=e.order;return r==null&&(r=e.order=tt(e.text,t)),r}var Ye=[],Oe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ye).concat(r)}};function at(e,t){return e._handlers&&e._handlers[t]||Ye}function Ze(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var a=U(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Me(e,t){var r=at(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function He(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Me(e,r||t.type,e,t),b(t)||t.codemirrorIgnore}function X(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)U(r,t[n])==-1&&r.push(t[n])}function F(e,t){return at(e,t).length>0}function T(e){e.prototype.on=function(t,r){Oe(this,t,r)},e.prototype.off=function(t,r){Ze(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function v(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function b(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function E(e){f(e),v(e)}function re(e){return e.target||e.srcElement}function me(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ie&&e.ctrlKey&&t==1&&(t=3),t}var je=function(){if(M&&A<9)return!1;var e=y("div");return"draggable"in e||"dragDrop"in e}(),rt;function it(e){if(rt==null){var t=y("span","\u200B");Q(e,y("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(rt=t.offsetWidth<=1&&t.offsetHeight>2&&!(M&&A<8))}var r=rt?y("span","\u200B"):y("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var lt;function _t(e){if(lt!=null)return lt;var t=Q(e,document.createTextNode("A\u062EA")),r=D(t,0,1).getBoundingClientRect(),n=D(t,1,2).getBoundingClientRect();return Ae(e),!r||r.left==r.right?!1:lt=n.right-r.right<3}var bt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(r.push(a.slice(0,o)),t+=o+1):(r.push(a),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},ht=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ft=function(){var e=y("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),wt=null;function Ht(e){if(wt!=null)return wt;var t=Q(e,y("span","x")),r=t.getBoundingClientRect(),n=D(t,0,1).getBoundingClientRect();return wt=Math.abs(r.left-n.left)>1}var Rt={},yt={};function on(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Rt[e]=t}function wn(e,t){yt[e]=t}function sn(e){if(typeof e=="string"&&yt.hasOwnProperty(e))e=yt[e];else if(e&&typeof e.name=="string"&&yt.hasOwnProperty(e.name)){var t=yt[e.name];typeof t=="string"&&(t={name:t}),e=ne(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return sn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return sn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Cn(e,t){t=sn(t);var r=Rt[t.name];if(!r)return Cn(e,"text/plain");var n=r(e,t);if(tn.hasOwnProperty(t.name)){var i=tn[t.name];for(var a in i){if(!i.hasOwnProperty(a))continue;n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=i[a]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)n[o]=t.modeProps[o];return n}var tn={};function nr(e,t){var r=tn.hasOwnProperty(e)?tn[e]:tn[e]={};s(t,r)}function An(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Rn(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Bn(e,t,r){return e.startState?e.startState(t,r):!0}var kt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};kt.prototype.eol=function(){return this.pos>=this.string.length},kt.prototype.sol=function(){return this.pos==this.lineStart},kt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},kt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},kt.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},kt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},kt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},kt.prototype.skipToEnd=function(){this.pos=this.string.length},kt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},kt.prototype.backUp=function(e){this.pos-=e},kt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=g(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?g(this.string,this.lineStart,this.tabSize):0)},kt.prototype.indentation=function(){return g(this.string,null,this.tabSize)-(this.lineStart?g(this.string,this.lineStart,this.tabSize):0)},kt.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(o){return r?o.toLowerCase():o},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},kt.prototype.current=function(){return this.string.slice(this.start,this.pos)},kt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},kt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},kt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function qe(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t<a){r=i;break}t-=a}return r.lines[t]}function Qt(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(a){var o=a.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function Gn(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function hn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function xt(e){if(e.parent==null)return null;for(var t=e.parent,r=U(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;!(n.children[i]==t);++i)r+=n.children[i].chunkSize();return r+t.first}function Sn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],a=i.height;if(t<a){e=i;continue e}t-=a,r+=i.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var l=e.lines[o],c=l.height;if(t<c)break;t-=c}return r+o}function Pn(e,t){return t>=e.first&&t<e.first+e.size}function Dn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Fe(e,t,r){if(r===void 0&&(r=null),!(this instanceof Fe))return new Fe(e,t,r);this.line=e,this.ch=t,this.sticky=r}function dt(e,t){return e.line-t.line||e.ch-t.ch}function On(e,t){return e.sticky==t.sticky&&dt(e,t)==0}function Ln(e){return Fe(e.line,e.ch)}function Ge(e,t){return dt(e,t)<0?t:e}function Xn(e,t){return dt(e,t)<0?e:t}function Tr(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ct(e,t){if(t.line<e.first)return Fe(e.first,0);var r=e.first+e.size-1;return t.line>r?Fe(r,qe(e,r).text.length):ln(t,qe(e,t.line).text.length)}function ln(e,t){var r=e.ch;return r==null||r>t?Fe(e.line,t):r<0?Fe(e.line,0):e}function Wn(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ct(e,t[n]);return r}var $n=function(e,t){this.state=e,this.lookAhead=t},un=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},un.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(e,t,r){return t instanceof $n?new un(e,An(e.mode,t.state),r,t.lookAhead):new un(e,An(e.mode,t),r)},un.prototype.save=function(e){var t=e!==!1?An(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new $n(t,this.maxLookAhead):t};function Mn(e,t,r,n){var i=[e.state.modeGen],a={};Dt(e,t.text,e.doc.mode,r,function(d,O){return i.push(d,O)},a,n);for(var o=r.state,l=function(d){r.baseTokens=i;var O=e.state.overlays[d],L=1,se=0;r.state=!0,Dt(e,t.text,O.mode,r,function(te,Le){for(var Ne=L;se<te;){var ze=i[L];ze>te&&i.splice(L,1,te,i[L+1],ze),L+=2,se=Math.min(te,ze)}if(!Le)return;if(O.opaque)i.splice(Ne,L-Ne,te,"overlay "+Le),L=Ne+2;else for(;Ne<L;Ne+=2){var $e=i[Ne+1];i[Ne+1]=($e?$e+" ":"")+"overlay "+Le}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)l(c);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function ut(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=ye(e,xt(t)),i=t.text.length>e.options.maxHighlightLength&&An(e.doc.mode,n.state),a=Mn(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ye(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new un(n,!0,t);var a=kr(e,t,r),o=a>n.first&&qe(n,a-1).stateAfter,l=o?un.fromSaved(n,o,a):new un(n,Bn(n.mode),a);return n.iter(a,t,function(c){Qe(e,c.text,l);var d=l.line;c.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function Qe(e,t,r,n){var i=e.doc.mode,a=new kt(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&ot(i,r.state);!a.eol();)Ct(i,a,r.state),a.start=a.pos}function ot(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Rn(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function Ct(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Rn(e,r).mode);var a=e.token(t,r);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var cn=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Gt(e,t,r,n){var i=e.doc,a=i.mode,o;t=ct(i,t);var l=qe(i,t.line),c=ye(e,t.line,r),d=new kt(l.text,e.options.tabSize,c),O;for(n&&(O=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=Ct(a,d,c.state),n&&O.push(new cn(d,o,An(i.mode,c.state)));return n?O:new cn(d,o,c.state)}function Pt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Dt(e,t,r,n,i,a,o){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var c=0,d=null,O=new kt(t,e.options.tabSize,n),L,se=e.options.addModeClass&&[null];for(t==""&&Pt(ot(r,n.state),a);!O.eol();){if(O.pos>e.options.maxHighlightLength?(l=!1,o&&Qe(e,t,n,O.pos),O.pos=t.length,L=null):L=Pt(Ct(r,O,n.state,se),a),se){var te=se[0].name;te&&(L="m-"+(L?te+" "+L:te))}if(!l||d!=L){for(;c<O.start;)c=Math.min(O.start,c+5e3),i(c,d);d=L}O.start=O.pos}for(;c<O.pos;){var Le=Math.min(O.pos,c+5e3);i(Le,d),c=Le}}function kr(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>o;--l){if(l<=a.first)return a.first;var c=qe(a,l-1),d=c.stateAfter;if(d&&(!r||l+(d instanceof $n?d.lookAhead:0)<=a.modeFrontier))return l;var O=g(c.text,null,e.options.tabSize);(i==null||n>O)&&(i=l-1,n=O)}return i}function _n(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=qe(e,n).stateAfter;if(i&&(!(i instanceof $n)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var jn=!1,pn=!1;function Si(){jn=!0}function Oi(){pn=!0}function pr(e,t,r){this.marker=e,this.from=t,this.to=r}function rr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Qi(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ti(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Ua(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(l||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var c=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new pr(o,a.from,c?null:a.to))}}return n}function Jr(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(l||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var c=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new pr(o,c?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Vn(e,t){if(t.full)return null;var r=Pn(e,t.from.line)&&qe(e,t.from.line).markedSpans,n=Pn(e,t.to.line)&&qe(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=dt(t.from,t.to)==0,l=Ua(r,i,o),c=Jr(n,a,o),d=t.text.length==1,O=p(t.text).length+(d?i:0);if(l)for(var L=0;L<l.length;++L){var se=l[L];if(se.to==null){var te=rr(c,se.marker);te?d&&(se.to=te.to==null?null:te.to+O):se.to=i}}if(c)for(var Le=0;Le<c.length;++Le){var Ne=c[Le];if(Ne.to!=null&&(Ne.to+=O),Ne.from==null){var ze=rr(l,Ne.marker);ze||(Ne.from=O,d&&(l||(l=[])).push(Ne))}else Ne.from+=O,d&&(l||(l=[])).push(Ne)}l&&(l=Ar(l)),c&&c!=l&&(c=Ar(c));var $e=[l];if(!d){var Je=t.text.length-2,Ve;if(Je>0&&l)for(var et=0;et<l.length;++et)l[et].to==null&&(Ve||(Ve=[])).push(new pr(l[et].marker,null,null));for(var ft=0;ft<Je;++ft)$e.push(Ve);$e.push(c)}return $e}function Ar(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Dr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(te){if(te.markedSpans)for(var Le=0;Le<te.markedSpans.length;++Le){var Ne=te.markedSpans[Le].marker;Ne.readOnly&&(!n||U(n,Ne)==-1)&&(n||(n=[])).push(Ne)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],l=o.find(0),c=0;c<i.length;++c){var d=i[c];if(dt(d.to,l.from)<0||dt(d.from,l.to)>0)continue;var O=[c,1],L=dt(d.from,l.from),se=dt(d.to,l.to);(L<0||!o.inclusiveLeft&&!L)&&O.push({from:d.from,to:l.from}),(se>0||!o.inclusiveRight&&!se)&&O.push({from:l.to,to:d.to}),i.splice.apply(i,O),c+=O.length-3}return i}function mr(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function Zr(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function gr(e){return e.inclusiveLeft?-1:0}function Yn(e){return e.inclusiveRight?1:0}function Qr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=dt(n.from,i.from)||gr(e)-gr(t);if(a)return-a;var o=dt(n.to,i.to)||Yn(e)-Yn(t);return o||t.id-e.id}function ir(e,t){var r=pn&&e.markedSpans,n;if(r)for(var i=void 0,a=0;a<r.length;++a)i=r[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||Qr(n,i.marker)<0)&&(n=i.marker);return n}function ki(e){return ir(e,!0)}function Lr(e){return ir(e,!1)}function qi(e,t){var r=pn&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Qr(n,a.marker)<0)&&(n=a.marker)}return n}function ea(e,t,r,n,i){var a=qe(e,t),o=pn&&a.markedSpans;if(o)for(var l=0;l<o.length;++l){var c=o[l];if(!c.marker.collapsed)continue;var d=c.marker.find(0),O=dt(d.from,r)||gr(c.marker)-gr(i),L=dt(d.to,n)||Yn(c.marker)-Yn(i);if(O>=0&&L<=0||O<=0&&L>=0)continue;if(O<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?dt(d.to,r)>=0:dt(d.to,r)>0)||O>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?dt(d.from,n)<=0:dt(d.from,n)<0))return!0}}function Nn(e){for(var t;t=ki(e);)e=t.find(-1,!0).line;return e}function Ba(e){for(var t;t=Lr(e);)e=t.find(1,!0).line;return e}function pt(e){for(var t,r;t=Lr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function mt(e,t){var r=qe(e,t),n=Nn(r);return r==n?t:xt(n)}function gt(e,t){if(t>e.lastLine())return t;var r=qe(e,t),n;if(!Et(e,r))return t;for(;n=Lr(r);)r=n.find(1,!0).line;return xt(r)+1}function Et(e,t){var r=pn&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i){if(n=r[i],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&Ot(e,t,n))return!0}}function Ot(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Ot(e,n.line,rr(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Ot(e,t,i))return!0}function Lt(e){e=Nn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var a=r.parent;a;r=a,a=r.parent)for(var o=0;o<a.children.length;++o){var l=a.children[o];if(l==r)break;t+=l.height}return t}function Nt(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=ki(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Lr(n);){var a=r.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function Xt(e){var t=e.display,r=e.doc;t.maxLine=qe(r,r.first),t.maxLineLength=Nt(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Nt(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var $t=function(e,t,r){this.text=e,Zr(this,t),this.height=r?r(this):1};$t.prototype.lineNo=function(){return xt(this)},T($t);function Jn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),mr(e),Zr(e,r);var i=n?n(e):1;i!=e.height&&hn(e,i)}function Bt(e){e.parent=null,mr(e)}var ar={},nn={};function Zn(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?nn:ar;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qn(e,t){var r=V("span",null,null,w?"padding-right: .1px":null),n={pre:V("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;n.pos=0,n.addToken=Ss,_t(e.display.measure)&&(o=Xe(a,e.doc.direction))&&(n.addToken=Ts(n.addToken,o)),n.map=[];var l=t!=e.display.externalMeasured&&xt(a);ks(a,n,ut(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=S(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=S(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(it(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(w){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Me(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=S(n.pre.className,n.textClass||"")),n}function qr(e){var t=y("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ss(e,t,r,n,i,a,o){if(!t)return;var l=e.splitSpaces?Os(t,e.trailingSpace):t,c=e.cm.state.specialChars,d=!1,O;if(!c.test(t))e.col+=t.length,O=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,O),M&&A<9&&(d=!0),e.pos+=t.length;else{O=document.createDocumentFragment();for(var L=0;;){c.lastIndex=L;var se=c.exec(t),te=se?se.index-L:t.length-L;if(te){var Le=document.createTextNode(l.slice(L,L+te));M&&A<9?O.appendChild(y("span",[Le])):O.appendChild(Le),e.map.push(e.pos,e.pos+te,Le),e.col+=te,e.pos+=te}if(!se)break;L+=te+1;var Ne=void 0;if(se[0]==" "){var ze=e.cm.options.tabSize,$e=ze-e.col%ze;Ne=O.appendChild(y("span",ee($e),"cm-tab")),Ne.setAttribute("role","presentation"),Ne.setAttribute("cm-text"," "),e.col+=$e}else se[0]=="\r"||se[0]==`
`?(Ne=O.appendChild(y("span",se[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ne.setAttribute("cm-text",se[0]),e.col+=1):(Ne=e.cm.options.specialCharPlaceholder(se[0]),Ne.setAttribute("cm-text",se[0]),M&&A<9?O.appendChild(y("span",[Ne])):O.appendChild(Ne),e.col+=1);e.map.push(e.pos,e.pos+1,Ne),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var Je=r||"";n&&(Je+=n),i&&(Je+=i);var Ve=y("span",[O],Je,a);if(o)for(var et in o)o.hasOwnProperty(et)&&et!="style"&&et!="class"&&Ve.setAttribute(et,o[et]);return e.content.appendChild(Ve)}e.content.appendChild(O)}function Os(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),n+=a,r=a==" "}return n}function Ts(e,t){return function(r,n,i,a,o,l,c){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,O=d+n.length;;){for(var L=void 0,se=0;se<t.length&&!(L=t[se],L.to>d&&L.from<=d);se++);if(L.to>=O)return e(r,n,i,a,o,l,c);e(r,n.slice(0,L.to-d),i,a,null,l,c),a=null,n=n.slice(L.to-d),d=L.to}}}function Wa(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function ks(e,t,r){var n=e.markedSpans,i=e.text,a=0;if(!n){for(var o=1;o<r.length;o+=2)t.addToken(t,i.slice(a,a=r[o]),Zn(r[o+1],t.cm.options));return}for(var l=i.length,c=0,d=1,O="",L,se,te=0,Le,Ne,ze,$e,Je;;){if(te==c){Le=Ne=ze=se="",Je=null,$e=null,te=Infinity;for(var Ve=[],et=void 0,ft=0;ft<n.length;++ft){var st=n[ft],vt=st.marker;if(vt.type=="bookmark"&&st.from==c&&vt.widgetNode)Ve.push(vt);else if(st.from<=c&&(st.to==null||st.to>c||vt.collapsed&&st.to==c&&st.from==c)){if(st.to!=null&&st.to!=c&&te>st.to&&(te=st.to,Ne=""),vt.className&&(Le+=" "+vt.className),vt.css&&(se=(se?se+";":"")+vt.css),vt.startStyle&&st.from==c&&(ze+=" "+vt.startStyle),vt.endStyle&&st.to==te&&(et||(et=[])).push(vt.endStyle,st.to),vt.title&&((Je||(Je={})).title=vt.title),vt.attributes)for(var At in vt.attributes)(Je||(Je={}))[At]=vt.attributes[At];vt.collapsed&&(!$e||Qr($e.marker,vt)<0)&&($e=st)}else st.from>c&&te>st.from&&(te=st.from)}if(et)for(var Jt=0;Jt<et.length;Jt+=2)et[Jt+1]==te&&(Ne+=" "+et[Jt]);if(!$e||$e.from==c)for(var jt=0;jt<Ve.length;++jt)Wa(t,0,Ve[jt]);if($e&&($e.from||0)==c){if(Wa(t,($e.to==null?l+1:$e.to)-c,$e.marker,$e.from==null),$e.to==null)return;$e.to==c&&($e=!1)}}if(c>=l)break;for(var En=Math.min(l,te);;){if(O){var vn=c+O.length;if(!$e){var Wt=vn>En?O.slice(0,En-c):O;t.addToken(t,Wt,L?L+Le:Le,ze,c+Wt.length==te?Ne:"",se,Je)}if(vn>=En){O=O.slice(En-c),c=En;break}c=vn,ze=""}O=i.slice(a,a=r[d++]),L=Zn(r[d++],t.cm.options)}}}function za(e,t,r){this.line=t,this.rest=pt(t),this.size=this.rest?xt(p(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Et(e,t)}function Ai(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new za(e.doc,qe(e.doc,a),a);i=a+o.size,n.push(o)}return n}var Mr=null;function As(e){Mr?Mr.ops.push(e):e.ownsGroup=Mr={ops:[e],delayedCallbacks:[]}}function Ds(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Ls(e,t){var r=e.ownsGroup;if(!r)return;try{Ds(r)}finally{Mr=null,t(r)}}var ei=null;function qt(e,t){var r=at(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;Mr?i=Mr.delayedCallbacks:ei?i=ei:(i=ei=[],setTimeout(Ms,0));for(var a=function(l){i.push(function(){return r[l].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ms(){var e=ei;ei=null;for(var t=0;t<e.length;++t)e[t]()}function Ha(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ps(e,t):a=="gutter"?Ga(e,t,r,n):a=="class"?ta(e,t):a=="widget"&&js(e,t,n)}t.changes=null}function ti(e){return e.node==e.text&&(e.node=y("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),M&&A<8&&(e.node.style.zIndex=2)),e.node}function Rs(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ti(t);t.background=n.insertBefore(y("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ka(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qn(e,t)}function Ps(e,t){var r=t.text.className,n=Ka(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,ta(e,t)):r&&(t.text.className=r)}function ta(e,t){Rs(e,t),t.line.wrapClass?ti(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Ga(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ti(t);t.gutterBackground=y("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=ti(t),l=t.gutter=y("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),o.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(y("div",Dn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.display.gutterSpecs.length;++c){var d=e.display.gutterSpecs[c].className,O=a.hasOwnProperty(d)&&a[d];O&&l.appendChild(y("div",[O],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function js(e,t,r){t.alignable&&(t.alignable=null);for(var n=pe("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Xa(e,t,r)}function Ns(e,t,r,n){var i=Ka(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ta(e,t),Ga(e,t,r,n),Xa(e,t,n),t.node}function Xa(e,t,r){if($a(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)$a(e,t.rest[n],t,r,!1)}function $a(e,t,r,n,i){if(!t.widgets)return;for(var a=ti(r),o=0,l=t.widgets;o<l.length;++o){var c=l[o],d=y("div",[c.node],"CodeMirror-linewidget"+(c.className?" "+c.className:""));c.handleMouseEvents||d.setAttribute("cm-ignore-events","true"),Is(c,d,r,n),e.display.input.setUneditable(d),i&&c.above?a.insertBefore(d,r.gutter||r.text):a.appendChild(d),qt(c,"redraw")}}function Is(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function ni(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!_(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),Q(t.display.measure,y("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function qn(e,t){for(var r=re(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Di(e){return e.lineSpace.offsetTop}function na(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Va(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Q(e.measure,y("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function zn(e){return le-e.display.nativeBarWidth}function vr(e){return e.display.scroller.clientWidth-zn(e)-e.display.barWidth}function ra(e){return e.display.scroller.clientHeight-zn(e)-e.display.barHeight}function Fs(e,t,r){var n=e.options.lineWrapping,i=n&&vr(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var c=o[l],d=o[l+1];Math.abs(c.bottom-d.bottom)>2&&a.push((c.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function Ya(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(xt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Us(e,t){t=Nn(t);var r=xt(t),n=e.display.externalMeasured=new za(e.doc,t,r);n.lineN=r;var i=n.built=Qn(e,n);return n.text=i.pre,Q(e.display.lineMeasure,i.pre),n}function Ja(e,t,r,n){return Hn(e,Rr(e,t),r,n)}function ia(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[_r(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Rr(e,t){var r=xt(t),n=ia(e,r);n&&!n.text?n=null:n&&n.changes&&(Ha(e,n,r,ca(e)),e.curOp.forceUpdate=!0),n||(n=Us(e,t));var i=Ya(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Hn(e,t,r,n,i){t.before&&(r=-1);var a=r+(n||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Fs(e,t.view,t.rect),t.hasHeights=!0),o=Ws(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Za={left:0,right:0,top:0,bottom:0};function Qa(e,t,r){for(var n,i,a,o,l,c,d=0;d<e.length;d+=3)if(l=e[d],c=e[d+1],t<l?(i=0,a=1,o="left"):t<c?(i=t-l,a=i+1):(d==e.length-3||t==c&&e[d+3]>t)&&(a=c-l,i=a-1,t>=c&&(o="right")),i!=null){if(n=e[d+2],l==c&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[(d-=3)+2],o="left";if(r=="right"&&i==c-l)for(;d<e.length-3&&e[d+3]==e[d+4]&&!e[d+5].insertLeft;)n=e[(d+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:l,coverEnd:c}}function Bs(e,t){var r=Za;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var i=e.length-1;i>=0&&!((r=e[i]).left!=r.right);i--);return r}function Ws(e,t,r,n){var i=Qa(t.map,r,n),a=i.node,o=i.start,l=i.end,c=i.collapse,d;if(a.nodeType==3){for(var O=0;O<4;O++){for(;o&&ve(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+l<i.coverEnd&&ve(t.line.text.charAt(i.coverStart+l));)++l;if(M&&A<9&&o==0&&l==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Bs(D(a,o,l).getClientRects(),n),d.left||d.right||o==0)break;l=o,o=o-1,c="right"}M&&A<11&&(d=zs(e.display.measure,d))}else{o>0&&(c=n="right");var L;e.options.lineWrapping&&(L=a.getClientRects()).length>1?d=L[n=="right"?L.length-1:0]:d=a.getBoundingClientRect()}if(M&&A<9&&!o&&(!d||!d.left&&!d.right)){var se=a.parentNode.getClientRects()[0];se?d={left:se.left,right:se.left+jr(e.display),top:se.top,bottom:se.bottom}:d=Za}for(var te=d.top-t.rect.top,Le=d.bottom-t.rect.top,Ne=(te+Le)/2,ze=t.view.measure.heights,$e=0;$e<ze.length-1&&!(Ne<ze[$e]);$e++);var Je=$e?ze[$e-1]:0,Ve=ze[$e],et={left:(c=="right"?d.right:d.left)-t.rect.left,right:(c=="left"?d.left:d.right)-t.rect.left,top:Je,bottom:Ve};return!d.left&&!d.right&&(et.bogus=!0),e.options.singleCursorHeightPerLine||(et.rtop=te,et.rbottom=Le),et}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ht(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function qa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function eo(e){e.display.externalMeasure=null,Ae(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)qa(e.display.view[t])}function ri(e){eo(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function to(){return J&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function no(){return J&&I?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function aa(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=ni(e.widgets[r]));return t}function Li(e,t,r,n,i){if(!i){var a=aa(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=Lt(t);if(n=="local"?o+=Di(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();o+=l.top+(n=="window"?0:no());var c=l.left+(n=="window"?0:to());r.left+=c,r.right+=c}return r.top+=o,r.bottom+=o,r}function ro(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=to(),i-=no();else if(r=="local"||!r){var a=e.display.sizer.getBoundingClientRect();n+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:i-o.top}}function oa(e,t,r,n,i){return n||(n=qe(e.doc,t.line)),Li(e,n,Ja(e,n,t.ch,i),r)}function In(e,t,r,n,i,a){n=n||qe(e.doc,t.line),i||(i=Rr(e,n));function o(Le,Ne){var ze=Hn(e,i,Le,Ne?"right":"left",a);return Ne?ze.left=ze.right:ze.right=ze.left,Li(e,n,ze,r)}var l=Xe(n,e.doc.direction),c=t.ch,d=t.sticky;if(c>=n.text.length?(c=n.text.length,d="before"):c<=0&&(c=0,d="after"),!l)return o(d=="before"?c-1:c,d=="before");function O(Le,Ne,ze){var $e=l[Ne],Je=$e.level==1;return o(ze?Le-1:Le,Je!=ze)}var L=Ke(l,c,d),se=Ue,te=O(c,L,d=="before");return se!=null&&(te.other=O(c,se,d!="before")),te}function io(e,t){var r=0;t=ct(e.doc,t),e.options.lineWrapping||(r=jr(e.display)*t.ch);var n=qe(e.doc,t.line),i=Lt(n)+Di(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function sa(e,t,r,n,i){var a=Fe(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function la(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return sa(n.first,0,null,-1,-1);var i=Sn(n,r),a=n.first+n.size-1;if(i>a)return sa(n.first+n.size-1,qe(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=qe(n,i);;){var l=Hs(e,o,i,t,r),c=qi(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!c)return l;var d=c.find(1);if(d.line==i)return d;o=qe(n,i=d.line)}}function ao(e,t,r,n){n-=aa(t);var i=t.text.length,a=Ie(function(o){return Hn(e,r,o-1).bottom<=n},i,0);return i=Ie(function(o){return Hn(e,r,o).top>n},a,i),{begin:a,end:i}}function oo(e,t,r,n){r||(r=Rr(e,t));var i=Li(e,t,Hn(e,r,n),"line").top;return ao(e,t,r,i)}function ua(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Hs(e,t,r,n,i){i-=Lt(t);var a=Rr(e,t),o=aa(t),l=0,c=t.text.length,d=!0,O=Xe(t,e.doc.direction);if(O){var L=(e.options.lineWrapping?Gs:Ks)(e,t,r,a,O,n,i);d=L.level!=1,l=d?L.from:L.to-1,c=d?L.to:L.from-1}var se=null,te=null,Le=Ie(function(ft){var st=Hn(e,a,ft);return st.top+=o,st.bottom+=o,ua(st,n,i,!1)?(st.top<=i&&st.left<=n&&(se=ft,te=st),!0):!1},l,c),Ne,ze,$e=!1;if(te){var Je=n-te.left<te.right-n,Ve=Je==d;Le=se+(Ve?0:1),ze=Ve?"after":"before",Ne=Je?te.left:te.right}else{!d&&(Le==c||Le==l)&&Le++,ze=Le==0?"after":Le==t.text.length?"before":Hn(e,a,Le-(d?1:0)).bottom+o<=i==d?"after":"before";var et=In(e,Fe(r,Le,ze),"line",t,a);Ne=et.left,$e=i<et.top?-1:i>=et.bottom?1:0}return Le=De(t.text,Le,1),sa(r,Le,ze,$e,n-Ne)}function Ks(e,t,r,n,i,a,o){var l=Ie(function(L){var se=i[L],te=se.level!=1;return ua(In(e,Fe(r,te?se.to:se.from,te?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),c=i[l];if(l>0){var d=c.level!=1,O=In(e,Fe(r,d?c.from:c.to,d?"after":"before"),"line",t,n);ua(O,a,o,!0)&&O.top>o&&(c=i[l-1])}return c}function Gs(e,t,r,n,i,a,o){var l=ao(e,t,n,o),c=l.begin,d=l.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var O=null,L=null,se=0;se<i.length;se++){var te=i[se];if(te.from>=d||te.to<=c)continue;var Le=te.level!=1,Ne=Hn(e,n,Le?Math.min(d,te.to)-1:Math.max(c,te.from)).right,ze=Ne<a?a-Ne+1e9:Ne-a;(!O||L>ze)&&(O=te,L=ze)}return O||(O=i[i.length-1]),O.from<c&&(O={from:c,to:O.to,level:O.level}),O.to>d&&(O={from:O.from,to:d,level:O.level}),O}var br;function Pr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(br==null){br=y("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)br.appendChild(document.createTextNode("x")),br.appendChild(y("br"));br.appendChild(document.createTextNode("x"))}Q(e.measure,br);var r=br.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Ae(e.measure),r||1}function jr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=y("span","xxxxxxxxxx"),r=y("pre",[t],"CodeMirror-line-like");Q(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ca(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var l=e.display.gutterSpecs[o].className;r[l]=a.offsetLeft+a.clientLeft+i,n[l]=a.clientWidth}return{fixedPos:da(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function da(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function so(e){var t=Pr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/jr(e.display)-3);return function(i){if(Et(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return r?a+(Math.ceil(i.text.length/n)||1)*t:a+t}}function fa(e){var t=e.doc,r=so(e);t.iter(function(n){var i=r(n);i!=n.height&&hn(n,i)})}function yr(e,t,r,n){var i=e.display;if(!r&&re(t).getAttribute("cm-not-content")=="true")return null;var a,o,l=i.lineSpace.getBoundingClientRect();try{a=t.clientX-l.left,o=t.clientY-l.top}catch(L){return null}var c=la(e,a,o),d;if(n&&c.xRel>0&&(d=qe(e.doc,c.line).text).length==c.ch){var O=g(d,d.length,e.options.tabSize)-d.length;c=Fe(c.line,Math.max(0,Math.round((a-Va(e.display).left)/jr(e.display))-O))}return c}function _r(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function mn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)pn&&mt(e.doc,t)<i.viewTo&&sr(e);else if(r<=i.viewFrom)pn&&gt(e.doc,r+n)>i.viewFrom?sr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)sr(e);else if(t<=i.viewFrom){var a=Mi(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):sr(e)}else if(r>=i.viewTo){var o=Mi(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):sr(e)}else{var l=Mi(e,t,t,-1),c=Mi(e,r,r+n,1);l&&c?(i.view=i.view.slice(0,l.index).concat(Ai(e,l.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=n):sr(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function or(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var a=n.view[_r(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);U(o,r)==-1&&o.push(r)}function sr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Mi(e,t,r,n){var i=_r(e,t),a,o=e.display.view;if(!pn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,c=0;c<i;c++)l+=o[c].size;if(l!=t){if(n>0){if(i==o.length-1)return null;a=l+o[i].size-t,i++}else a=l-t;t+=a,r+=a}for(;mt(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Xs(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Ai(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ai(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(_r(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Ai(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,_r(e,r)))),n.viewTo=r}function lo(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function ii(e){e.display.input.showSelection(e.display.input.prepareSelection())}function uo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var l=r.sel.ranges[o];if(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)continue;var c=l.empty();(c||e.options.showCursorWhenSelecting)&&co(e,l.head,i),c||$s(e,l,a)}return n}function co(e,t,r){var n=In(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(y("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var a=r.appendChild(y("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Ri(e,t){return e.top-t.top||e.left-t.left}function $s(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=Va(e.display),l=o.left,c=Math.max(n.sizerWidth,vr(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function O(Ve,et,ft,st){et<0&&(et=0),et=Math.round(et),st=Math.round(st),a.appendChild(y("div",null,"CodeMirror-selected","position: absolute; left: "+Ve+`px;
top: `+et+"px; width: "+(ft==null?c-Ve:ft)+`px;
height: `+(st-et)+"px"))}function L(Ve,et,ft){var st=qe(i,Ve),vt=st.text.length,At,Jt;function jt(Wt,bn){return oa(e,Fe(Ve,Wt),"div",st,bn)}function En(Wt,bn,en){var Kt=oo(e,st,null,Wt),zt=bn=="ltr"==(en=="after")?"left":"right",It=en=="after"?Kt.begin:Kt.end-(/\s/.test(st.text.charAt(Kt.end-1))?2:1);return jt(It,zt)[zt]}var vn=Xe(st,i.direction);return Pe(vn,et||0,ft==null?vt:ft,function(Wt,bn,en,Kt){var zt=en=="ltr",It=jt(Wt,zt?"left":"right"),yn=jt(bn-1,zt?"right":"left"),Vr=et==null&&Wt==0,hr=ft==null&&bn==vt,an=Kt==0,Kn=!vn||Kt==vn.length-1;if(yn.top-It.top<=3){var Zt=(d?Vr:hr)&&an,Ia=(d?hr:Vr)&&Kn,tr=Zt?l:(zt?It:yn).left,Sr=Ia?c:(zt?yn:It).right;O(tr,It.top,Sr-tr,It.bottom)}else{var Or,fn,Yr,Fa;zt?(Or=d&&Vr&&an?l:It.left,fn=d?c:En(Wt,en,"before"),Yr=d?l:En(bn,en,"after"),Fa=d&&hr&&Kn?c:yn.right):(Or=d?En(Wt,en,"before"):l,fn=!d&&Vr&&an?c:It.right,Yr=!d&&hr&&Kn?l:yn.left,Fa=d?En(bn,en,"after"):c),O(Or,It.top,fn-Or,It.bottom),It.bottom<yn.top&&O(l,It.bottom,null,yn.top),O(Yr,yn.top,Fa-Yr,yn.bottom)}(!At||Ri(It,At)<0)&&(At=It),Ri(yn,At)<0&&(At=yn),(!Jt||Ri(It,Jt)<0)&&(Jt=It),Ri(yn,Jt)<0&&(Jt=yn)}),{start:At,end:Jt}}var se=t.from(),te=t.to();if(se.line==te.line)L(se.line,se.ch,te.ch);else{var Le=qe(i,se.line),Ne=qe(i,te.line),ze=Nn(Le)==Nn(Ne),$e=L(se.line,se.ch,ze?Le.text.length+1:null).end,Je=L(te.line,ze?0:null,te.ch).start;ze&&($e.top<Je.top-2?(O($e.right,$e.top,null,$e.bottom),O(l,Je.top,Je.left,Je.bottom)):O($e.right,$e.top,Je.left-$e.right,$e.bottom)),$e.bottom<Je.top&&O(l,$e.bottom,null,Je.top)}r.appendChild(a)}function ha(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Nr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function fo(e){e.state.focused||(e.display.input.focus(),pa(e))}function ho(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Nr(e))},100)}function pa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Me(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),w&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ha(e)}function Nr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Me(e,"blur",e,t),e.state.focused=!1,de(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Pi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],a=e.options.lineWrapping,o=void 0,l=0;if(i.hidden)continue;if(M&&A<8){var c=i.node.offsetTop+i.node.offsetHeight;o=c-r,r=c}else{var d=i.node.getBoundingClientRect();o=d.bottom-d.top,!a&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var O=i.line.height-o;if((O>.005||O<-.005)&&(hn(i.line,o),po(i.line),i.rest))for(var L=0;L<i.rest.length;L++)po(i.rest[L]);if(l>e.display.sizerWidth){var se=Math.ceil(l/jr(e.display));se>e.display.maxLineLength&&(e.display.maxLineLength=se,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function po(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function ji(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Di(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,a=Sn(t,n),o=Sn(t,i);if(r&&r.ensure){var l=r.ensure.from.line,c=r.ensure.to.line;l<a?(a=l,o=Sn(t,Lt(qe(t,l))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=o&&(a=Sn(t,Lt(qe(t,c))-e.wrapper.clientHeight),o=c)}return{from:a,to:Math.max(o,a+1)}}function Vs(e,t){if(He(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!N){var a=y("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Di(e.display))+`px;
height: `+(t.bottom-t.top+zn(e)+r.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}function Ys(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?Fe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Fe(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,l=In(e,t),c=!r||r==t?l:In(e,r);i={left:Math.min(l.left,c.left),top:Math.min(l.top,c.top)-n,right:Math.max(l.left,c.left),bottom:Math.max(l.bottom,c.bottom)+n};var d=ma(e,i),O=e.doc.scrollTop,L=e.doc.scrollLeft;if(d.scrollTop!=null&&(oi(e,d.scrollTop),Math.abs(e.doc.scrollTop-O)>1&&(o=!0)),d.scrollLeft!=null&&(xr(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-L)>1&&(o=!0)),!o)break}return i}function Js(e,t){var r=ma(e,t);r.scrollTop!=null&&oi(e,r.scrollTop),r.scrollLeft!=null&&xr(e,r.scrollLeft)}function ma(e,t){var r=e.display,n=Pr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=ra(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+na(r),c=t.top<n,d=t.bottom>l-n;if(t.top<i)o.scrollTop=c?0:t.top;else if(t.bottom>i+a){var O=Math.min(t.top,(d?l:t.bottom)-a);O!=i&&(o.scrollTop=O)}var L=e.options.fixedGutter?0:r.gutters.offsetWidth,se=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-L,te=vr(e)-r.gutters.offsetWidth,Le=t.right-t.left>te;return Le&&(t.right=t.left+te),t.left<10?o.scrollLeft=0:t.left<se?o.scrollLeft=Math.max(0,t.left+L-(Le?0:10)):t.right>te+se-3&&(o.scrollLeft=t.right+(Le?0:10)-te),o}function ga(e,t){if(t==null)return;Ni(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ir(e){Ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ai(e,t,r){(t!=null||r!=null)&&Ni(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Zs(e,t){Ni(e),e.curOp.scrollToPos=t}function Ni(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=io(e,t.from),n=io(e,t.to);mo(e,r,n,t.margin)}}function mo(e,t,r,n){var i=ma(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});ai(e,i.scrollLeft,i.scrollTop)}function oi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;ue||ba(e,{top:t}),go(e,t,!0),ue&&ba(e),ui(e,100)}function go(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function xr(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,xo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function si(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+na(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+zn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Er=function(e,t,r){this.cm=r;var n=this.vert=y("div",[y("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=y("div",[y("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),Oe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Oe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,M&&A<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Er.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Er.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Er.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Er.prototype.zeroWidthHack=function(){var e=ie&&!$?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new x,this.disableVert=new x},Er.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),a=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Er.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var li=function(){};li.prototype.update=function(){return{bottom:0,right:0}},li.prototype.setScrollLeft=function(){},li.prototype.setScrollTop=function(){},li.prototype.clear=function(){};function Fr(e,t){t||(t=si(e));var r=e.display.barWidth,n=e.display.barHeight;vo(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Pi(e),vo(e,si(e)),r=e.display.barWidth,n=e.display.barHeight}function vo(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var bo={native:Er,null:li};function yo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&de(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Oe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?xr(e,t):oi(e,t)},e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function wr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Qs},As(e.curOp)}function Cr(e){var t=e.curOp;t&&Ls(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;qs(r)})}function qs(e){for(var t=e.ops,r=0;r<t.length;r++)el(t[r]);for(var n=0;n<t.length;n++)tl(t[n]);for(var i=0;i<t.length;i++)nl(t[i]);for(var a=0;a<t.length;a++)rl(t[a]);for(var o=0;o<t.length;o++)il(t[o])}function el(e){var t=e.cm,r=t.display;ol(t),e.updateMaxLine&&Xt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&va(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Pi(t),e.barMeasure=si(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ja(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+zn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-vr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&xr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==G();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Fr(t,e.barMeasure),e.updatedDisplay&&_a(t,e.barMeasure),e.selectionChanged&&ha(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&fo(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&_o(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&go(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&xr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,ct(n,e.scrollToPos.from),ct(n,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var l=0;l<a.length;++l)a[l].lines.length||Me(a[l],"hide");if(o)for(var c=0;c<o.length;++c)o[c].lines.length&&Me(o[c],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Me(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function xn(e,t){if(e.curOp)return t();wr(e);try{return t()}finally{Cr(e)}}function Vt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);wr(e);try{return t.apply(e,arguments)}finally{Cr(e)}}}function dn(e){return function(){if(this.curOp)return e.apply(this,arguments);wr(this);try{return e.apply(this,arguments)}finally{Cr(this)}}}function Yt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);wr(t);try{return e.apply(this,arguments)}finally{Cr(t)}}}function ui(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,u(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=ye(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,l=a.text.length>e.options.maxHighlightLength?An(t.mode,n.state):null,c=Mn(e,a,n,!0);l&&(n.state=l),a.styles=c.styles;var d=a.styleClasses,O=c.classes;O?a.styleClasses=O:d&&(a.styleClasses=null);for(var L=!o||o.length!=a.styles.length||d!=O&&(!d||!O||d.bgClass!=O.bgClass||d.textClass!=O.textClass),se=0;!L&&se<o.length;++se)L=o[se]!=a.styles[se];L&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Qe(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ui(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&xn(e,function(){for(var a=0;a<i.length;a++)or(e,i[a],"text")})}var Ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=ji(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=vr(e),this.force=r,this.dims=ca(e),this.events=[]};Ii.prototype.signal=function(e,t){F(e,t)&&this.events.push(arguments)},Ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Me.apply(null,this.events[e])};function ol(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=zn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=zn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=G();if(!t||!_(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&_(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ll(e){if(!e||!e.activeElt||e.activeElt==G())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&_(document.body,e.anchorNode)&&_(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function va(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return sr(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&lo(e)==0)return!1;Eo(e)&&(sr(e),t.dims=ca(e));var i=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<a&&a-r.viewFrom<20&&(a=Math.max(n.first,r.viewFrom)),r.viewTo>o&&r.viewTo-o<20&&(o=Math.min(i,r.viewTo)),pn&&(a=mt(e.doc,a),o=gt(e.doc,o));var l=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Xs(e,a,o),r.viewOffset=Lt(qe(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=lo(e);if(!l&&c==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var d=sl(e);return c>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(d),Ae(r.cursorDiv),Ae(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ui(e,400)),r.updateLineNumbers=null,!0}function _o(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==vr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+na(e.display)-ra(e),r.top)}),t.visible=ji(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=ji(e.display,e.doc,r));if(!va(e,t))break;Pi(e);var i=si(e);ii(e),Fr(e,i),_a(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ba(e,t){var r=new Ii(e,t);if(va(e,r)){Pi(e),_o(e,r);var n=si(e);ii(e),Fr(e,n),_a(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function l(Le){var Ne=Le.nextSibling;return w&&ie&&e.display.currentWheelTarget==Le?Le.style.display="none":Le.parentNode.removeChild(Le),Ne}for(var c=n.view,d=n.viewFrom,O=0;O<c.length;O++){var L=c[O];if(!L.hidden)if(!L.node||L.node.parentNode!=a){var se=Ns(e,L,d,r);a.insertBefore(se,o)}else{for(;o!=L.node;)o=l(o);var te=i&&t!=null&&t<=d&&L.lineNumber;L.changes&&(U(L.changes,"gutter")>-1&&(te=!1),Ha(e,L,d,r)),te&&(Ae(L.lineNumber),L.lineNumber.appendChild(document.createTextNode(Dn(e.options,d)))),o=L.node.nextSibling}d+=L.size}for(;o;)o=l(o)}function ya(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function _a(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+zn(e)+"px"}function xo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=da(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=a),r[o].gutterBackground&&(r[o].gutterBackground.style.left=a));var l=r[o].alignable;if(l)for(var c=0;c<l.length;c++)l[c].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function Eo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Dn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(y("div",[y("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ya(e.display),!0}return!1}function xa(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:a,style:o})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function wo(e){var t=e.gutters,r=e.gutterSpecs;Ae(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],a=i.className,o=i.style,l=t.appendChild(y("div",null,"CodeMirror-gutter "+a));o&&(l.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ya(e)}function ci(e){wo(e.display),mn(e),xo(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=y("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=y("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=V("div",null,"CodeMirror-code"),i.selectionDiv=y("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=y("div",null,"CodeMirror-cursors"),i.measure=y("div",null,"CodeMirror-measure"),i.lineMeasure=y("div",null,"CodeMirror-measure"),i.lineSpace=V("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=V("div",[i.lineSpace],"CodeMirror-lines");i.mover=y("div",[a],null,"position: relative"),i.sizer=y("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=y("div",null,null,"position: absolute; height: "+le+"px; width: 1px;"),i.gutters=y("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=y("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=y("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),M&&A<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!w&&!(ue&&B)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=xa(n.gutters,n.lineNumbers),wo(i),r.init(i)}var Fi=0,Tn=null;M?Tn=-.53:ue?Tn=15:J?Tn=-.7:fe&&(Tn=-1/3);function Co(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function dl(e){var t=Co(e);return t.x*=Tn,t.y*=Tn,t}function So(e,t){var r=Co(t),n=r.x,i=r.y,a=e.display,o=a.scroller,l=o.scrollWidth>o.clientWidth,c=o.scrollHeight>o.clientHeight;if(!(n&&l||i&&c))return;if(i&&ie&&w){e:for(var d=t.target,O=a.view;d!=o;d=d.parentNode)for(var L=0;L<O.length;L++)if(O[L].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!ue&&!ae&&Tn!=null){i&&c&&oi(e,Math.max(0,o.scrollTop+i*Tn)),xr(e,Math.max(0,o.scrollLeft+n*Tn)),(!i||i&&c)&&f(t),a.wheelStartX=null;return}if(i&&Tn!=null){var se=i*Tn,te=e.doc.scrollTop,Le=te+a.wrapper.clientHeight;se<0?te=Math.max(0,te+se-50):Le=Math.min(e.doc.height,Le+se+50),ba(e,{top:te,bottom:Le})}Fi<20&&(a.wheelStartX==null?(a.wheelStartX=o.scrollLeft,a.wheelStartY=o.scrollTop,a.wheelDX=n,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX==null)return;var Ne=o.scrollLeft-a.wheelStartX,ze=o.scrollTop-a.wheelStartY,$e=ze&&a.wheelDY&&ze/a.wheelDY||Ne&&a.wheelDX&&Ne/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!$e)return;Tn=(Tn*Fi+$e)/(Fi+1),++Fi},200)):(a.wheelDX+=n,a.wheelDY+=i))}var kn=function(e,t){this.ranges=e,this.primIndex=t};kn.prototype.primary=function(){return this.ranges[this.primIndex]},kn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!On(r.anchor,n.anchor)||!On(r.head,n.head))return!1}return!0},kn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new St(Ln(this.ranges[t].anchor),Ln(this.ranges[t].head));return new kn(e,this.primIndex)},kn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},kn.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(dt(t,n.from())>=0&&dt(e,n.to())<=0)return r}return-1};var St=function(e,t){this.anchor=e,this.head=t};St.prototype.from=function(){return Xn(this.anchor,this.head)},St.prototype.to=function(){return Ge(this.anchor,this.head)},St.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Fn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(se,te){return dt(se.from(),te.from())}),r=U(t,i);for(var a=1;a<t.length;a++){var o=t[a],l=t[a-1],c=dt(l.to(),o.from());if(n&&!o.empty()?c>0:c>=0){var d=Xn(l.from(),o.from()),O=Ge(l.to(),o.to()),L=l.empty()?o.from()==o.head:l.from()==l.head;a<=r&&--r,t.splice(--a,2,new St(L?O:d,L?d:O))}}return new kn(t,r)}function lr(e,t){return new kn([new St(e,t||e)],0)}function ur(e){return e.text?Fe(e.from.line+e.text.length-1,p(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Oo(e,t){if(dt(e,t.from)<0)return e;if(dt(e,t.to)<=0)return ur(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ur(t).ch-t.to.ch),Fe(r,n)}function Ea(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new St(Oo(i.anchor,t),Oo(i.head,t)))}return Fn(e.cm,r,e.sel.primIndex)}function To(e,t,r){return e.line==t.line?Fe(r.line,e.ch-t.ch+r.ch):Fe(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Fe(e.first,0),a=i,o=0;o<t.length;o++){var l=t[o],c=To(l.from,i,a),d=To(ur(l),i,a);if(i=l.to,a=d,r=="around"){var O=e.sel.ranges[o],L=dt(O.head,O.anchor)<0;n[o]=new St(L?d:c,L?c:d)}else n[o]=new St(c,c)}return new kn(n,e.sel.primIndex)}function wa(e){e.doc.mode=Cn(e.options,e.doc.modeOption),di(e)}function di(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ui(e,100),e.state.modeGen++,e.curOp&&mn(e)}function ko(e,t){return t.from.ch==0&&t.to.ch==0&&p(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ca(e,t,r,n){function i(Je){return r?r[Je]:null}function a(Je,Ve,et){Jn(Je,Ve,et,n),qt(Je,"change",Je,t)}function o(Je,Ve){for(var et=[],ft=Je;ft<Ve;++ft)et.push(new $t(d[ft],i(ft),n));return et}var l=t.from,c=t.to,d=t.text,O=qe(e,l.line),L=qe(e,c.line),se=p(d),te=i(d.length-1),Le=c.line-l.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(ko(e,t)){var Ne=o(0,d.length-1);a(L,L.text,te),Le&&e.remove(l.line,Le),Ne.length&&e.insert(l.line,Ne)}else if(O==L)if(d.length==1)a(O,O.text.slice(0,l.ch)+se+O.text.slice(c.ch),te);else{var ze=o(1,d.length-1);ze.push(new $t(se+O.text.slice(c.ch),te,n)),a(O,O.text.slice(0,l.ch)+d[0],i(0)),e.insert(l.line+1,ze)}else if(d.length==1)a(O,O.text.slice(0,l.ch)+d[0]+L.text.slice(c.ch),i(0)),e.remove(l.line+1,Le);else{a(O,O.text.slice(0,l.ch)+d[0],i(0)),a(L,se+L.text.slice(c.ch),te);var $e=o(1,d.length-1);Le>1&&e.remove(l.line+1,Le-1),e.insert(l.line+1,$e)}qt(e,"change",e,t)}function cr(e,t,r){function n(i,a,o){if(i.linked)for(var l=0;l<i.linked.length;++l){var c=i.linked[l];if(c.doc==a)continue;var d=o&&c.sharedHist;if(r&&!d)continue;t(c.doc,d),n(c.doc,i,d)}}n(e,null,!0)}function Ao(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,fa(e),wa(e),Do(e),e.options.lineWrapping||Xt(e),e.options.mode=t.modeOption,mn(e)}function Do(e){(e.doc.direction=="rtl"?R:de)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){xn(e,function(){Do(e),mn(e)})}function Ui(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Sa(e,t){var r={from:Ln(t.from),to:ur(t),text:Qt(e,t.from,t.to)};return Ro(e,r,t.from.line,t.to.line+1),cr(e,function(n){return Ro(n,r,t.from.line,t.to.line+1)},!0),r}function Lo(e){for(;e.length;){var t=p(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Lo(e.done),p(e.done);if(e.done.length&&!p(e.done).ranges)return p(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),p(e.done)}function Mo(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))l=p(o.changes),dt(t.from,t.to)==0&&dt(t.from,l.to)==0?l.to=ur(t):o.changes.push(Sa(e,t));else{var c=p(i.done);for((!c||!c.ranges)&&Bi(e.sel,i.done),o={changes:[Sa(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Me(e,"historyAdded")}function ml(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ml(e,a,p(i.done),t))?i.done[i.done.length-1]=t:Bi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Lo(i.undone)}function Bi(e,t){var r=p(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ro(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function Po(e,t){var r=bl(e,t),n=Vn(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var a=r[i],o=n[i];if(a&&o){e:for(var l=0;l<o.length;++l){for(var c=o[l],d=0;d<a.length;++d)if(a[d].marker==c.marker)continue e;a.push(c)}}else o&&(r[i]=o)}return r}function Ur(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?kn.prototype.deepCopy.call(a):a);continue}var o=a.changes,l=[];n.push({changes:l});for(var c=0;c<o.length;++c){var d=o[c],O=void 0;if(l.push({from:d.from,to:d.to,text:d.text}),t)for(var L in d)(O=L.match(/^spans_(\d+)$/))&&(U(t,Number(O[1]))>-1&&(p(l)[L]=d[L],delete d[L]))}}return n}function Oa(e,t,r,n){if(n){var i=e.anchor;if(r){var a=dt(t,i)<0;a!=dt(r,i)<0?(i=t,t=r):a!=dt(t,r)<0&&(t=r)}return new St(i,t)}else return new St(r||t,t)}function Wi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),rn(e,new kn([Oa(e.sel.primary(),t,r,i)],0),n)}function jo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=Oa(e.sel.ranges[a],t[a],null,i);var o=Fn(e.cm,n,e.sel.primIndex);rn(e,o,r)}function Ta(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,rn(e,Fn(e.cm,i,e.sel.primIndex),n)}function No(e,t,r,n){rn(e,lr(t,r),n)}function yl(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var a=0;a<i.length;a++)this.ranges[a]=new St(ct(e,i[a].anchor),ct(e,i[a].head))},origin:r&&r.origin};return Me(e,"beforeSelectionChange",e,n),e.cm&&Me(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Fn(e.cm,n.ranges,n.ranges.length-1):t}function Io(e,t,r){var n=e.history.done,i=p(n);i&&i.ranges?(n[n.length-1]=t,zi(e,t,r)):rn(e,t,r)}function rn(e,t,r){zi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function zi(e,t,r){(F(e,"beforeSelectionChange")||e.cm&&F(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(dt(t.primary().head,e.sel.primary().head)<0?-1:1);Fo(e,Bo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Ir(e.cm)}function Fo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,X(e.cm)),qt(e,"cursorActivity",e)}function Uo(e){Fo(e,Bo(e,e.sel,null,!1))}function Bo(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],c=Hi(e,o.anchor,l&&l.anchor,r,n),d=Hi(e,o.head,l&&l.head,r,n);(i||c!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new St(c,d))}return i?Fn(e.cm,i,t.primIndex):t}function Br(e,t,r,n,i){var a=qe(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var l=a.markedSpans[o],c=l.marker,d="selectLeft"in c?!c.selectLeft:c.inclusiveLeft,O="selectRight"in c?!c.selectRight:c.inclusiveRight;if((l.from==null||(d?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(O?l.to>=t.ch:l.to>t.ch))){if(i&&(Me(c,"beforeCursorEnter"),c.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!c.atomic)continue;if(r){var L=c.find(n<0?1:-1),se=void 0;if((n<0?O:d)&&(L=Wo(e,L,-n,L&&L.line==t.line?a:null)),L&&L.line==t.line&&(se=dt(L,r))&&(n<0?se<0:se>0))return Br(e,L,t,n,i)}var te=c.find(n<0?-1:1);return(n<0?d:O)&&(te=Wo(e,te,n,te.line==t.line?a:null)),te?Br(e,te,t,n,i):null}}return t}function Hi(e,t,r,n,i){var a=n||1,o=Br(e,t,r,a,i)||!i&&Br(e,t,r,a,!0)||Br(e,t,r,-a,i)||!i&&Br(e,t,r,-a,!0);return o||(e.cantEdit=!0,Fe(e.first,0))}function Wo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ct(e,Fe(t.line-1)):null:r>0&&t.ch==(n||qe(e,t.line)).text.length?t.line<e.first+e.size-1?Fe(t.line+1,0):null:new Fe(t.line,t.ch+r)}function zo(e){e.setSelection(Fe(e.firstLine(),0),Fe(e.lastLine()),ce)}function Ho(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,a,o,l){i&&(n.from=ct(e,i)),a&&(n.to=ct(e,a)),o&&(n.text=o),l!==void 0&&(n.origin=l)}),Me(e,"beforeChange",e,n),e.cm&&Me(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Wr(e,t,r){if(e.cm){if(!e.cm.curOp)return Vt(e.cm,Wr)(e,t,r);if(e.cm.state.suppressEdits)return}if((F(e,"beforeChange")||e.cm&&F(e.cm,"beforeChange"))&&(t=Ho(e,t,!0),!t))return;var n=jn&&!r&&Dr(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Ko(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Ko(e,t)}function Ko(e,t){if(t.text.length==1&&t.text[0]==""&&dt(t.from,t.to)==0)return;var r=Ea(e,t);Mo(e,t,r,e.cm?e.cm.curOp.id:NaN),fi(e,t,r,Vn(e,t));var n=[];cr(e,function(i,a){!a&&U(n,i.history)==-1&&(Vo(i.history,t),n.push(i.history)),fi(i,t,null,Vn(i,t))})}function Ki(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,l=t=="undo"?i.done:i.undone,c=t=="undo"?i.undone:i.done,d=0;d<l.length&&!(a=l[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==l.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=l.pop(),a.ranges){if(Bi(a,c),r&&!a.equals(e.sel)){rn(e,a,{clearRedo:!1});return}o=a}else if(n){l.push(a);return}else break;var O=[];Bi(o,c),c.push({changes:O,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var L=F(e,"beforeChange")||e.cm&&F(e.cm,"beforeChange"),se=function(Ne){var ze=a.changes[Ne];if(ze.origin=t,L&&!Ho(e,ze,!1))return l.length=0,{};O.push(Sa(e,ze));var $e=Ne?Ea(e,ze):p(l);fi(e,ze,$e,Po(e,ze)),!Ne&&e.cm&&e.cm.scrollIntoView({from:ze.from,to:ur(ze)});var Je=[];cr(e,function(Ve,et){!et&&U(Je,Ve.history)==-1&&(Vo(Ve.history,ze),Je.push(Ve.history)),fi(Ve,ze,null,Po(Ve,ze))})},te=a.changes.length-1;te>=0;--te){var Le=se(te);if(Le)return Le.v}}function Go(e,t){if(t==0)return;if(e.first+=t,e.sel=new kn(k(e.sel.ranges,function(i){return new St(Fe(i.anchor.line+t,i.anchor.ch),Fe(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){mn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)or(e.cm,n,"gutter")}}function fi(e,t,r,n){if(e.cm&&!e.cm.curOp)return Vt(e.cm,fi)(e,t,r,n);if(t.to.line<e.first){Go(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Go(e,i),t={from:Fe(e.first,0),to:Fe(t.to.line+i,t.to.ch),text:[p(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Fe(a,qe(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qt(e,t.from,t.to),r||(r=Ea(e,t)),e.cm?_l(e.cm,t,n):Ca(e,t,n),zi(e,r,ce),e.cantEdit&&Hi(e,Fe(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,l=!1,c=a.line;e.options.lineWrapping||(c=xt(Nn(qe(n,a.line))),n.iter(c,o.line+1,function(te){if(te==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&X(e),Ca(n,t,r,so(e)),e.options.lineWrapping||(n.iter(c,a.line+t.text.length,function(te){var Le=Nt(te);Le>i.maxLineLength&&(i.maxLine=te,i.maxLineLength=Le,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),_n(n,a.line),ui(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?mn(e):a.line==o.line&&t.text.length==1&&!ko(e.doc,t)?or(e,a.line,"text"):mn(e,a.line,o.line+1,d);var O=F(e,"changes"),L=F(e,"change");if(L||O){var se={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};L&&qt(e,"change",e,se),O&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(se)}e.display.selForContextMenu=null}function zr(e,t,r,n,i){var a;n||(n=r),dt(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Wr(e,{from:r,to:n,text:t,origin:i})}function Xo(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function $o(e,t,r,n){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var l=0;l<a.ranges.length;l++)Xo(a.ranges[l].anchor,t,r,n),Xo(a.ranges[l].head,t,r,n);continue}for(var c=0;c<a.changes.length;++c){var d=a.changes[c];if(r<d.from.line)d.from=Fe(d.from.line+n,d.from.ch),d.to=Fe(d.to.line+n,d.to.ch);else if(t<=d.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function Vo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;$o(e.done,r,n,i),$o(e.undone,r,n,i)}function hi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=qe(e,Tr(e,t)):i=xt(t),i==null?null:(n(a,i)&&e.cm&&or(e.cm,i,r),a)}function pi(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}pi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Bt(i),qt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function mi(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}mi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var a=Math.min(t,i-e),o=n.height;if(n.removeInner(e,a),this.height-=o-n.height,i==a&&(this.children.splice(r--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof pi))){var l=[];this.collapse(l),this.children=[new pi(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,l=o;l<i.lines.length;){var c=new pi(i.lines.slice(l,l+=25));i.height-=c.height,this.children.splice(++n,0,c),c.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new mi(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=U(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new mi(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,r))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var gi=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};gi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=xt(r);if(n==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var a=ni(this);hn(r,Math.max(0,r.height-a)),e&&(xn(e,function(){Yo(e,r,-a),or(e,n,"widget")}),qt(e,"lineWidgetCleared",e,this,n))},gi.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=ni(this)-t;if(!i)return;Et(this.doc,n)||hn(n,n.height+i),r&&xn(r,function(){r.curOp.forceUpdate=!0,Yo(r,n,i),qt(r,"lineWidgetChanged",r,e,xt(n))})},T(gi);function Yo(e,t,r){Lt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ga(e,r)}function xl(e,t,r,n){var i=new gi(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),hi(e,t,"widget",function(o){var l=o.widgets||(o.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!Et(e,o)){var c=Lt(o)<e.scrollTop;hn(o,o.height+ni(i)),c&&ga(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&qt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:xt(t)),i}var Jo=0,dr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Jo};dr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&wr(e),F(this,"clear")){var r=this.find();r&&qt(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],l=rr(o.markedSpans,this);e&&!this.collapsed?or(e,xt(o),"text"):e&&(l.to!=null&&(i=xt(o)),l.from!=null&&(n=xt(o))),o.markedSpans=Qi(o.markedSpans,l),l.from==null&&this.collapsed&&!Et(this.doc,o)&&e&&hn(o,Pr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var d=Nn(this.lines[c]),O=Nt(d);O>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=O,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&mn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&qt(e,"markerCleared",e,this,n,i),t&&Cr(e),this.parent&&this.parent.clear()},dr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var a=this.lines[i],o=rr(a.markedSpans,this);if(o.from!=null&&(r=Fe(t?a:xt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Fe(t?a:xt(a),o.to),e==1))return n}return r&&{from:r,to:n}},dr.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;xn(n,function(){var i=t.line,a=xt(t.line),o=ia(n,a);if(o&&(qa(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Et(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var c=ni(r)-l;c&&hn(i,i.height+c)}qt(n,"markerChanged",n,e)})},dr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||U(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},dr.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},T(dr);function Hr(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Vt(e.cm,Hr)(e,t,r,n,i);var a=new dr(e,i),o=dt(t,r);if(n&&s(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=V("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ea(e,t.line,t,r,a)||t.line!=r.line&&ea(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Oi()}a.addToHistory&&Mo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,c=e.cm,d;if(e.iter(l,r.line+1,function(L){c&&a.collapsed&&!c.options.lineWrapping&&Nn(L)==c.display.maxLine&&(d=!0),a.collapsed&&l!=t.line&&hn(L,0),Ti(L,new pr(a,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),a.collapsed&&e.iter(t.line,r.line+1,function(L){Et(e,L)&&hn(L,0)}),a.clearOnEnter&&Oe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Si(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Jo,a.atomic=!0),c){if(d&&(c.curOp.updateMaxLine=!0),a.collapsed)mn(c,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var O=t.line;O<=r.line;O++)or(c,O,"text");a.atomic&&Uo(c.doc),qt(c,"markerAdded",c,a)}return a}var vi=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};vi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();qt(this,"clear")},vi.prototype.find=function(e,t){return this.primary.find(e,t)},T(vi);function El(e,t,r,n,i){n=s(n),n.shared=!1;var a=[Hr(e,t,r,n,i)],o=a[0],l=n.widgetNode;return cr(e,function(c){l&&(n.widgetNode=l.cloneNode(!0)),a.push(Hr(c,ct(c,t),ct(c,r),n,i));for(var d=0;d<c.linked.length;++d)if(c.linked[d].isParent)return;o=p(a)}),new vi(a,o)}function Zo(e){return e.findMarks(Fe(e.first,0),e.clipPos(Fe(e.lastLine())),function(t){return t.parent})}function wl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(dt(a,o)){var l=Hr(e,a,o,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Cl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];cr(i.primary.doc,function(c){return a.push(c)});for(var o=0;o<i.markers.length;o++){var l=i.markers[o];U(a,l.doc)==-1&&(l.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,gn=function(e,t,r,n,i){if(!(this instanceof gn))return new gn(e,t,r,n,i);r==null&&(r=0),mi.call(this,[new pi([new $t("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Fe(r,0);this.sel=lr(a),this.history=new Ui(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ca(this,{from:a,to:a,text:e}),rn(this,lr(a),ce)};gn.prototype=ne(mi.prototype,{constructor:gn,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Gn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yt(function(e){var t=Fe(this.first,0),r=this.first+this.size-1;Wr(this,{from:t,to:Fe(r,qe(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ai(this.cm,0,0),rn(this,lr(t),ce)}),replaceRange:function(e,t,r,n){t=ct(this,t),r=r?ct(this,r):t,zr(this,e,t,r,n)},getRange:function(e,t,r){var n=Qt(this,ct(this,e),ct(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Pn(this,e))return qe(this,e)},getLineNumber:function(e){return xt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=qe(this,e)),Nn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ct(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yt(function(e,t,r){No(this,ct(this,typeof e=="number"?Fe(e,t||0):e),null,r)}),setSelection:Yt(function(e,t,r){No(this,ct(this,e),ct(this,t||e),r)}),extendSelection:Yt(function(e,t,r){Wi(this,ct(this,e),t&&ct(this,t),r)}),extendSelections:Yt(function(e,t){jo(this,Wn(this,e),t)}),extendSelectionsBy:Yt(function(e,t){var r=k(this.sel.ranges,e);jo(this,Wn(this,r),t)}),setSelections:Yt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new St(ct(this,e[i].anchor),ct(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rn(this,Fn(this.cm,n,t),r)}),addSelection:Yt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new St(ct(this,e),ct(this,t||e))),rn(this,Fn(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=Qt(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Qt(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yt(function(e,t,r){for(var n=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];n[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:r}}for(var l=t&&t!="end"&&fl(this,n,t),c=n.length-1;c>=0;c--)Wr(this,n[c]);l?Io(this,l):this.cm&&Ir(this.cm)}),undo:Yt(function(){Ki(this,"undo")}),redo:Yt(function(){Ki(this,"redo")}),undoSelection:Yt(function(){Ki(this,"undo",!0)}),redoSelection:Yt(function(){Ki(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ui(this.history.maxGeneration),cr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ur(this.history.done),undone:Ur(this.history.undone)}},setHistory:function(e){var t=this.history=new Ui(this.history.maxGeneration);t.done=Ur(e.done.slice(0),null,!0),t.undone=Ur(e.undone.slice(0),null,!0)},setGutterMarker:Yt(function(e,t,r){return hi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Te(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Yt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&hi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Te(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Pn(this,e))return null;if(t=e,e=qe(this,e),!e)return null}else if(t=xt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Yt(function(e,t,r){return hi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(pe(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Yt(function(e,t,r){return hi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[i];if(a)if(r==null)n[i]=null;else{var o=a.match(pe(r));if(!o)return!1;var l=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||l==a.length?"":" ")+a.slice(l)||null}else return!1;return!0})}),addLineWidget:Yt(function(e,t,r){return xl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Hr(this,ct(this,e),ct(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ct(this,e),Hr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ct(this,e);var t=[],r=qe(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=ct(this,e),t=ct(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var l=0;l<o.length;l++){var c=o[l];!(c.to!=null&&i==e.line&&e.ch>=c.to||c.from==null&&i!=e.line||c.from!=null&&i==t.line&&c.from>=t.ch)&&(!r||r(c.marker))&&n.push(c.marker.parent||c.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+n;if(a>e)return t=e,!0;e-=a,++r}),ct(this,Fe(r,t))},indexFromPos:function(e){e=ct(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new gn(Gn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new gn(Gn(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(n,Zo(this)),n},unlinkDoc:function(e){if(e instanceof Mt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Cl(Zo(this));break}if(e.history==this.history){var n=[e.id];cr(e,function(i){return n.push(i.id)},!0),e.history=new Ui(null),e.history.done=Ur(this.history.done,n),e.history.undone=Ur(this.history.undone,n)}},iterLinkedDocs:function(e){cr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):bt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yt(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&hl(this.cm)})}),gn.prototype.eachLine=gn.prototype.iter;var Qo=0;function Ol(e){var t=this;if(qo(t),He(t,e)||qn(t.display,e))return;f(e),M&&(Qo=+new Date);var r=yr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,a=Array(i),o=0,l=function(){++o==i&&Vt(t,function(){r=ct(t.doc,r);var te={from:r,to:r,text:t.doc.splitLines(a.filter(function(Le){return Le!=null}).join(t.doc.lineSeparator())),origin:"paste"};Wr(t.doc,te),Io(t.doc,lr(ct(t.doc,r),ct(t.doc,ur(te))))})()},c=function(te,Le){if(t.options.allowDropFileTypes&&U(t.options.allowDropFileTypes,te.type)==-1){l();return}var Ne=new FileReader;Ne.onerror=function(){return l()},Ne.onload=function(){var ze=Ne.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ze)){l();return}a[Le]=ze,l()},Ne.readAsText(te)},d=0;d<n.length;d++)c(n[d],d);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var O=e.dataTransfer.getData("Text");if(O){var L;if(t.state.draggingText&&!t.state.draggingText.copy&&(L=t.listSelections()),zi(t.doc,lr(r,r)),L)for(var se=0;se<L.length;++se)zr(t.doc,"",L[se].anchor,L[se].head,"drag");t.replaceSelection(O,"around","paste"),t.display.input.focus()}}catch(te){}}}function Tl(e,t){if(M&&(!e.state.draggingText||+new Date-Qo<100)){E(t);return}if(He(e,t)||qn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!fe){var r=y("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ae&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),ae&&r.parentNode.removeChild(r)}}function kl(e,t){var r=yr(e,t);if(!r)return;var n=document.createDocumentFragment();co(e,r,n),e.display.dragCursor||(e.display.dragCursor=y("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Q(e.display.dragCursor,n)}function qo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function es(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var a=0;a<r.length;a++)e(r[a])})}var ts=!1;function Al(){if(ts)return;Dl(),ts=!0}function Dl(){var e;Oe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,es(Ll)},100))}),Oe(window,"blur",function(){return es(Nr)})}function Ll(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var fr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},bi=0;bi<10;bi++)fr[bi+48]=fr[bi+96]=String(bi);for(var Gi=65;Gi<=90;Gi++)fr[Gi]=String.fromCharCode(Gi);for(var yi=1;yi<=12;yi++)fr[yi+111]=fr[yi+63235]="F"+yi;var er={};er.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},er.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},er.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},er.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},er.default=ie?er.macDefault:er.pcDefault;function Ml(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var l=t[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Rl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=k(r.split(" "),Ml),a=0;a<i.length;a++){var o=void 0,l=void 0;a==i.length-1?(l=i.join(" "),o=n):(l=i.slice(0,a+1).join(" "),o="...");var c=t[l];if(!c)t[l]=o;else if(c!=o)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var d in t)e[d]=t[d];return e}function Kr(e,t,r,n){t=Xi(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Kr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Kr(e,t.fallthrough[a],r,n);if(o)return o}}}function ns(e){var t=typeof e=="string"?e:fr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function rs(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(be?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(be?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function is(e,t){if(ae&&e.keyCode==34&&e.char)return!1;var r=fr[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),rs(r,e,t))}function Xi(e){return typeof e=="string"?er[e]:e}function Gr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&dt(a.from,p(n).to)<=0;){var o=n.pop();if(dt(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}xn(e,function(){for(var l=n.length-1;l>=0;l--)zr(e.doc,"",n[l].from,n[l].to,"+delete");Ir(e)})}function ka(e,t,r){var n=De(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Aa(e,t,r){var n=ka(e,t.ch,r);return n==null?null:new Fe(t.line,n,r<0?"after":"before")}function Da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=Xe(r,t.doc.direction);if(a){var o=i<0?p(a):a[0],l=i<0==(o.level==1),c=l?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var O=Rr(t,r);d=i<0?r.text.length-1:0;var L=Hn(t,O,d).top;d=Ie(function(se){return Hn(t,O,se).top==L},i<0==(o.level==1)?o.from:o.to-1,d),c=="before"&&(d=ka(r,d,1))}else d=i<0?o.to:o.from;return new Fe(n,d,c)}}return new Fe(n,i<0?r.text.length:0,i<0?"before":"after")}function Pl(e,t,r,n){var i=Xe(t,e.doc.direction);if(!i)return Aa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var a=Ke(i,r.ch,r.sticky),o=i[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from<r.ch))return Aa(t,r,n);var l=function($e,Je){return ka(t,$e instanceof Fe?$e.ch:$e,Je)},c,d=function($e){return e.options.lineWrapping?(c=c||Rr(e,t),oo(e,t,c,$e)):{begin:0,end:t.text.length}},O=d(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var L=o.level==1==n<0,se=l(r,L?1:-1);if(se!=null&&(L?se<=o.to&&se<=O.end:se>=o.from&&se>=O.begin)){var te=L?"before":"after";return new Fe(r.line,se,te)}}var Le=function($e,Je,Ve){for(var et=function(At,Jt){return Jt?new Fe(r.line,l(At,1),"before"):new Fe(r.line,At,"after")};$e>=0&&$e<i.length;$e+=Je){var ft=i[$e],st=Je>0==(ft.level!=1),vt=st?Ve.begin:l(Ve.end,-1);if(ft.from<=vt&&vt<ft.to)return et(vt,st);if(vt=st?ft.from:l(ft.to,-1),Ve.begin<=vt&&vt<Ve.end)return et(vt,st)}},Ne=Le(a+n,n,O);if(Ne)return Ne;var ze=n>0?O.end:l(O.begin,-1);return ze!=null&&!(n>0&&ze==t.text.length)&&(Ne=Le(n>0?0:i.length-1,n,d(ze)),Ne)?Ne:null}var _i={selectAll:zo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ce)},killLine:function(e){return Gr(e,function(t){if(t.empty()){var r=qe(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Fe(t.head.line+1,0)}:{from:t.head,to:Fe(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Gr(e,function(t){return{from:Fe(t.from().line,0),to:ct(e.doc,Fe(t.to().line+1,0))}})},delLineLeft:function(e){return Gr(e,function(t){return{from:Fe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Gr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Gr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Fe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Fe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return os(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return jl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Z)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Z)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?os(e,t.head):n},Z)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var a=r[i].from(),o=g(e.getLine(a.line),a.ch,n);t.push(ee(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return xn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,a=qe(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Fe(i.line,i.ch-1)),i.ch>0)i=new Fe(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Fe(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=qe(e.doc,i.line-1).text;o&&(i=new Fe(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Fe(i.line-1,o.length-1),i,"+transpose"))}}r.push(new St(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return xn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Ir(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function as(e,t){var r=qe(e.doc,t),n=Nn(r);return n!=r&&(t=xt(n)),Da(!0,e,n,t,1)}function jl(e,t){var r=qe(e.doc,t),n=Ba(r);return n!=r&&(t=xt(n)),Da(!0,e,r,t,-1)}function os(e,t){var r=as(e,t.line),n=qe(e.doc,r.line),i=Xe(n,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=a&&t.ch;return Fe(r.line,o?0:a,r.sticky)}return r}function $i(e,t,r){if(typeof t=="string"&&(t=_i[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Ee}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function Nl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Kr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Kr(t,e.options.extraKeys,r,e)||Kr(t,e.options.keyMap,r,e)}var Il=new x;function xi(e,t,r,n){var i=e.state.keySeq;if(i){if(ns(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ss(e,i+" "+t,r,n))return!0}return ss(e,t,r,n)}function ss(e,t,r,n){var i=Nl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&qt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(f(r),ha(e)),!!i}function ls(e,t){var r=is(t,!0);return r?t.shiftKey&&!e.state.keySeq?xi(e,"Shift-"+r,t,function(n){return $i(e,n,!0)})||xi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $i(e,n)}):xi(e,r,t,function(n){return $i(e,n)}):!1}function Fl(e,t,r){return xi(e,"'"+r+"'",t,function(n){return $i(e,n,!0)})}var La=null;function us(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=G(),He(t,e))return;M&&A<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ls(t,e);ae&&(La=n?r:null,!n&&r==88&&!Ft&&(ie?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),ue&&!ie&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ul(t)}function Ul(e){var t=e.display.lineDiv;R(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(de(t,"CodeMirror-crosshair"),Ze(document,"keyup",r),Ze(document,"mouseover",r))}Oe(document,"keyup",r),Oe(document,"mouseover",r)}function cs(e){e.keyCode==16&&(this.doc.sel.shift=!1),He(this,e)}function ds(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(qn(t.display,e)||He(t,e)||e.ctrlKey&&!e.altKey||ie&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(ae&&r==La){La=null,f(e);return}if(ae&&(!e.which||e.which<10)&&ls(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Fl(t,e,i))return;t.display.input.onKeyPress(e)}var Bl=400,Ma=function(e,t,r){this.time=e,this.pos=t,this.button=r};Ma.prototype.compare=function(e,t,r){return this.time+Bl>e&&dt(t,this.pos)==0&&r==this.button};var Ei,wi;function Wl(e,t){var r=+new Date;return wi&&wi.compare(r,e,t)?(Ei=wi=null,"triple"):Ei&&Ei.compare(r,e,t)?(wi=new Ma(r,e,t),Ei=null,"double"):(Ei=new Ma(r,e,t),wi=null,"single")}function fs(e){var t=this,r=t.display;if(He(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,qn(r,e)){w||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ra(t,e))return;var n=yr(t,e),i=me(e),a=n?Wl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,i,n,a,e))return;i==1?n?Kl(t,n,a,e):re(e)==r.scroller&&f(e):i==2?(n&&Wi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(Re?t.display.input.onContextMenu(e):ho(t))}function zl(e,t,r,n,i){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,xi(e,rs(a,i),i,function(o){if(typeof o=="string"&&(o=_i[o]),!o)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=o(e,r)!=Ee}finally{e.state.suppressEdits=!1}return l})}function Hl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=Ce?r.shiftKey&&r.metaKey:r.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=ie?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ie?r.altKey:r.ctrlKey)),i}function Kl(e,t,r,n){M?setTimeout(u(fo,e),0):e.curOp.focus=G();var i=Hl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&je&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(dt((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(dt(o.to(),t)>0||t.xRel<0)?Gl(e,n,t,i):Xl(e,n,t,i)}function Gl(e,t,r,n){var i=e.display,a=!1,o=Vt(e,function(d){w&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ze(i.wrapper.ownerDocument,"mouseup",o),Ze(i.wrapper.ownerDocument,"mousemove",l),Ze(i.scroller,"dragstart",c),Ze(i.scroller,"drop",o),a||(f(d),n.addNew||Wi(e.doc,r,null,null,n.extend),w&&!fe||M&&A==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},c=function(){return a=!0};w&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),Oe(i.wrapper.ownerDocument,"mouseup",o),Oe(i.wrapper.ownerDocument,"mousemove",l),Oe(i.scroller,"dragstart",c),Oe(i.scroller,"drop",o),ho(e),setTimeout(function(){return i.input.focus()},20)}function hs(e,t,r){if(r=="char")return new St(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new St(Fe(t.line,0),ct(e.doc,Fe(t.line+1,0)));var n=r(e,t);return new St(n.from,n.to)}function Xl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,l,c=a.sel,d=c.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(r),l>-1?o=d[l]:o=new St(r,r)):(o=a.sel.primary(),l=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new St(r,r)),r=yr(e,t,!0,!0),l=-1;else{var O=hs(e,r,n.unit);n.extend?o=Oa(o,O.anchor,O.head,n.extend):o=O}n.addNew?l==-1?(l=d.length,rn(a,Fn(e,d.concat([o]),l),{scroll:!1,origin:"*mouse"})):d.length>1&&d[l].empty()&&n.unit=="char"&&!n.extend?(rn(a,Fn(e,d.slice(0,l).concat(d.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):Ta(a,l,o,xe):(l=0,rn(a,new kn([o],0),xe),c=a.sel);var L=r;function se(Ve){if(dt(L,Ve)==0)return;if(L=Ve,n.unit=="rectangle"){for(var et=[],ft=e.options.tabSize,st=g(qe(a,r.line).text,r.ch,ft),vt=g(qe(a,Ve.line).text,Ve.ch,ft),At=Math.min(st,vt),Jt=Math.max(st,vt),jt=Math.min(r.line,Ve.line),En=Math.min(e.lastLine(),Math.max(r.line,Ve.line));jt<=En;jt++){var vn=qe(a,jt).text,Wt=q(vn,At,ft);At==Jt?et.push(new St(Fe(jt,Wt),Fe(jt,Wt))):vn.length>Wt&&et.push(new St(Fe(jt,Wt),Fe(jt,q(vn,Jt,ft))))}et.length||et.push(new St(r,r)),rn(a,Fn(e,c.ranges.slice(0,l).concat(et),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ve)}else{var bn=o,en=hs(e,Ve,n.unit),Kt=bn.anchor,zt;dt(en.anchor,Kt)>0?(zt=en.head,Kt=Xn(bn.from(),en.anchor)):(zt=en.anchor,Kt=Ge(bn.to(),en.head));var It=c.ranges.slice(0);It[l]=$l(e,new St(ct(a,Kt),zt)),rn(a,Fn(e,It,l),xe)}}var te=i.wrapper.getBoundingClientRect(),Le=0;function Ne(Ve){var et=++Le,ft=yr(e,Ve,!0,n.unit=="rectangle");if(!ft)return;if(dt(ft,L)!=0){e.curOp.focus=G(),se(ft);var st=ji(i,a);(ft.line>=st.to||ft.line<st.from)&&setTimeout(Vt(e,function(){Le==et&&Ne(Ve)}),150)}else{var vt=Ve.clientY<te.top?-20:Ve.clientY>te.bottom?20:0;vt&&setTimeout(Vt(e,function(){if(Le!=et)return;i.scroller.scrollTop+=vt,Ne(Ve)}),50)}}function ze(Ve){e.state.selectingText=!1,Le=Infinity,Ve&&(f(Ve),i.input.focus()),Ze(i.wrapper.ownerDocument,"mousemove",$e),Ze(i.wrapper.ownerDocument,"mouseup",Je),a.history.lastSelOrigin=null}var $e=Vt(e,function(Ve){Ve.buttons===0||!me(Ve)?ze(Ve):Ne(Ve)}),Je=Vt(e,ze);e.state.selectingText=Je,Oe(i.wrapper.ownerDocument,"mousemove",$e),Oe(i.wrapper.ownerDocument,"mouseup",Je)}function $l(e,t){var r=t.anchor,n=t.head,i=qe(e.doc,r.line);if(dt(r,n)==0&&r.sticky==n.sticky)return t;var a=Xe(i);if(!a)return t;var o=Ke(a,r.ch,r.sticky),l=a[o];if(l.from!=r.ch&&l.to!=r.ch)return t;var c=o+(l.from==r.ch==(l.level!=1)?0:1);if(c==0||c==a.length)return t;var d;if(n.line!=r.line)d=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var O=Ke(a,n.ch,n.sticky),L=O-o||(n.ch-r.ch)*(l.level==1?-1:1);O==c-1||O==c?d=L<0:d=L>0}var se=a[c+(d?-1:0)],te=d==(se.level==1),Le=te?se.from:se.to,Ne=te?"after":"before";return r.ch==Le&&r.sticky==Ne?t:new St(new Fe(r.line,Le,Ne),n)}function ps(e,t,r,n){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(se){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(a>l.bottom||!F(e,r))return b(t);a-=l.top-o.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var d=o.gutters.childNodes[c];if(d&&d.getBoundingClientRect().right>=i){var O=Sn(e.doc,a),L=e.display.gutterSpecs[c];return Me(e,r,e,O,L.className,t),b(t)}}}function Ra(e,t){return ps(e,t,"gutterClick",!0)}function ms(e,t){if(qn(e.display,t)||Vl(e,t))return;if(He(e,t,"contextmenu"))return;Re||e.display.input.onContextMenu(t)}function Vl(e,t){return F(e,"gutterContextMenu")?ps(e,t,"gutterContextMenu",!1):!1}function gs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ri(e)}var Xr={toString:function(){return"CodeMirror.Init"}},vs={},Vi={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(l,c,d){d!=Xr&&a(l,c,d)}:a)}e.defineOption=r,e.Init=Xr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,wa(n)},!0),r("indentUnit",2,wa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){di(n),ri(n),mn(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!i)return;var a=[],o=n.doc.first;n.doc.iter(function(c){for(var d=0;;){var O=c.text.indexOf(i,d);if(O==-1)break;d=O+i.length,a.push(Fe(o,O))}o++});for(var l=a.length-1;l>=0;l--)zr(n.doc,i,a[l],Fe(a[l].line,a[l].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Xr&&n.refresh()}),r("specialCharPlaceholder",qr,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",B?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!We),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){gs(n),ci(n)},!0),r("keyMap","default",function(n,i,a){var o=Xi(i),l=a!=Xr&&Xi(a);l&&l.detach&&l.detach(n,o),o.attach&&o.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=xa(i,n.options.lineNumbers),ci(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?da(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Fr(n)},!0),r("scrollbarStyle","native",function(n){yo(n),Fr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=xa(n.options.gutters,i),ci(n)},!0),r("firstLineNumber",1,ci,!0),r("lineNumberFormatter",function(n){return n},ci,!0),r("showCursorWhenSelecting",!1,ii,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Nr(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,ii,!0),r("singleCursorHeightPerLine",!0,ii,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,di,!0),r("addModeClass",!1,di,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,di,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=Xr;if(!t!=!n){var i=e.display.dragFunctions,a=t?Oe:Ze;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Zl(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(de(e.display.wrapper,"CodeMirror-wrap"),Xt(e)),fa(e),mn(e),ri(e),setTimeout(function(){return Fr(e)},100)}function Mt(e,t){var r=this;if(!(this instanceof Mt))return new Mt(e,t);this.options=t=t?s(t):{},s(vs,t,!1);var n=t.value;typeof n=="string"?n=new gn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Mt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,gs(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),yo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new x,keySeq:null,specialChars:null},t.autofocus&&!B&&a.input.focus(),M&&A<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ql(this),Al(),wr(this),this.curOp.forceUpdate=!0,Ao(this,n),t.autofocus&&!B||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&pa(r)},20):Nr(this);for(var o in Vi)Vi.hasOwnProperty(o)&&Vi[o](this,t[o],Xr);Eo(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Pa.length;++l)Pa[l](this);Cr(this),w&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Mt.defaults=vs,Mt.optionHandlers=Vi;function Ql(e){var t=e.display;Oe(t.scroller,"mousedown",Vt(e,fs)),M&&A<11?Oe(t.scroller,"dblclick",Vt(e,function(c){if(He(e,c))return;var d=yr(e,c);if(!d||Ra(e,c)||qn(e.display,c))return;f(c);var O=e.findWordAt(d);Wi(e.doc,O.anchor,O.head)})):Oe(t.scroller,"dblclick",function(c){return He(e,c)||f(c)}),Oe(t.scroller,"contextmenu",function(c){return ms(e,c)}),Oe(t.input.getField(),"contextmenu",function(c){t.scroller.contains(c.target)||ms(e,c)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(c){if(c.touches.length!=1)return!1;var d=c.touches[0];return d.radiusX<=1&&d.radiusY<=1}function o(c,d){if(d.left==null)return!0;var O=d.left-c.left,L=d.top-c.top;return O*O+L*L>20*20}Oe(t.scroller,"touchstart",function(c){if(!He(e,c)&&!a(c)&&!Ra(e,c)){t.input.ensurePolled(),clearTimeout(r);var d=+new Date;t.activeTouch={start:d,moved:!1,prev:d-n.end<=300?n:null},c.touches.length==1&&(t.activeTouch.left=c.touches[0].pageX,t.activeTouch.top=c.touches[0].pageY)}}),Oe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Oe(t.scroller,"touchend",function(c){var d=t.activeTouch;if(d&&!qn(t,c)&&d.left!=null&&!d.moved&&new Date-d.start<300){var O=e.coordsChar(t.activeTouch,"page"),L;!d.prev||o(d,d.prev)?L=new St(O,O):!d.prev.prev||o(d,d.prev.prev)?L=e.findWordAt(O):L=new St(Fe(O.line,0),ct(e.doc,Fe(O.line+1,0))),e.setSelection(L.anchor,L.head),e.focus(),f(c)}i()}),Oe(t.scroller,"touchcancel",i),Oe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(oi(e,t.scroller.scrollTop),xr(e,t.scroller.scrollLeft,!0),Me(e,"scroll",e))}),Oe(t.scroller,"mousewheel",function(c){return So(e,c)}),Oe(t.scroller,"DOMMouseScroll",function(c){return So(e,c)}),Oe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(c){He(e,c)||E(c)},over:function(c){He(e,c)||(kl(e,c),E(c))},start:function(c){return Tl(e,c)},drop:Vt(e,Ol),leave:function(c){He(e,c)||qo(e)}};var l=t.input.getField();Oe(l,"keyup",function(c){return cs.call(e,c)}),Oe(l,"keydown",Vt(e,us)),Oe(l,"keypress",Vt(e,ds)),Oe(l,"focus",function(c){return pa(e,c)}),Oe(l,"blur",function(c){return Nr(e,c)})}var Pa=[];Mt.defineInitHook=function(e){return Pa.push(e)};function Ci(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=ye(e,t).state:r="prev");var o=e.options.tabSize,l=qe(i,t),c=g(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var d=l.text.match(/^\s*/)[0],O;if(!n&&!/\S/.test(l.text))O=0,r="not";else if(r=="smart"&&(O=i.mode.indent(a,l.text.slice(d.length),l.text),O==Ee||O>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?O=g(qe(i,t-1).text,null,o):O=0:r=="add"?O=c+e.options.indentUnit:r=="subtract"?O=c-e.options.indentUnit:typeof r=="number"&&(O=c+r),O=Math.max(0,O);var L="",se=0;if(e.options.indentWithTabs)for(var te=Math.floor(O/o);te;--te)se+=o,L+=" ";if(se<O&&(L+=ee(O-se)),L!=d)return zr(i,L,Fe(t,0),Fe(t,d.length),"+input"),l.stateAfter=null,!0;for(var Le=0;Le<i.sel.ranges.length;Le++){var Ne=i.sel.ranges[Le];if(Ne.head.line==t&&Ne.head.ch<d.length){var ze=Fe(t,d.length);Ta(i,Le,new St(ze,ze));break}}}var Un=null;function Yi(e){Un=e}function ja(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,l=i=="paste"||e.state.pasteIncoming>o,c=bt(t),d=null;if(l&&n.ranges.length>1)if(Un&&Un.text.join(`
`)==t){if(n.ranges.length%Un.text.length==0){d=[];for(var O=0;O<Un.text.length;O++)d.push(a.splitLines(Un.text[O]))}}else c.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=k(c,function($e){return[$e]}));for(var L=e.curOp.updateInput,se=n.ranges.length-1;se>=0;se--){var te=n.ranges[se],Le=te.from(),Ne=te.to();te.empty()&&(r&&r>0?Le=Fe(Le.line,Le.ch-r):e.state.overwrite&&!l?Ne=Fe(Ne.line,Math.min(qe(a,Ne.line).text.length,Ne.ch+p(c).length)):l&&Un&&Un.lineWise&&Un.text.join(`
`)==c.join(`
`)&&(Le=Ne=Fe(Le.line,0)));var ze={from:Le,to:Ne,text:d?d[se%d.length]:c,origin:i||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};Wr(e.doc,ze),qt(e,"inputRead",e,ze)}t&&!l&&ys(e,t),Ir(e),e.curOp.updateInput<2&&(e.curOp.updateInput=L),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function bs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&xn(t,function(){return ja(t,r,0,null,"paste")}),!0}function ys(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var l=0;l<a.electricChars.length;l++)if(t.indexOf(a.electricChars.charAt(l))>-1){o=Ci(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(qe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Ci(e,i.head.line,"smart")));o&&qt(e,"electricInput",e,i.head.line)}}function _s(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,a={anchor:Fe(i,0),head:Fe(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function xs(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Es(){var e=y("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=y("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return w?e.style.width="1000px":e.setAttribute("wrap","off"),P&&(e.style.border="1px solid black"),xs(e),t}function ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var a=this.options,o=a[n];if(a[n]==i&&n!="mode")return;a[n]=i,t.hasOwnProperty(n)&&Vt(this,t[n])(this,i,o),Me(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](Xi(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==n||i[a].name==n)return i.splice(a,1),!0},addOverlay:dn(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");m(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,mn(this)}),removeOverlay:dn(function(n){for(var i=this.state.overlays,a=0;a<i.length;++a){var o=i[a].modeSpec;if(o==n||typeof n=="string"&&o.name==n){i.splice(a,1),this.state.modeGen++,mn(this);return}}}),indentLine:dn(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Pn(this.doc,n)&&Ci(this,n,i,a)}),indentSelection:dn(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var l=i[o];if(l.empty())l.head.line>a&&(Ci(this,l.head.line,n,!0),a=l.head.line,o==this.doc.sel.primIndex&&Ir(this));else{var c=l.from(),d=l.to(),O=Math.max(a,c.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var L=O;L<a;++L)Ci(this,L,n);var se=this.doc.sel.ranges;c.ch==0&&i.length==se.length&&se[o].from().ch>0&&Ta(this.doc,o,new St(c,se[o].to()),ce)}}}),getTokenAt:function(n,i){return Gt(this,n,i)},getLineTokens:function(n,i){return Gt(this,Fe(n),i,!0)},getTokenTypeAt:function(n){n=ct(this.doc,n);var i=ut(this,qe(this.doc,n.line)),a=0,o=(i.length-1)/2,l=n.ch,c;if(l==0)c=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=l)o=d;else if(i[d*2+1]<l)a=d+1;else{c=i[d*2+2];break}}var O=c?c.indexOf("overlay "):-1;return O<0?c:O==0?null:c.slice(0,O-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var a=[];if(!r.hasOwnProperty(i))return a;var o=r[i],l=this.getModeAt(n);if(typeof l[i]=="string")o[l[i]]&&a.push(o[l[i]]);else if(l[i])for(var c=0;c<l[i].length;c++){var d=o[l[i][c]];d&&a.push(d)}else l.helperType&&o[l.helperType]?a.push(o[l.helperType]):o[l.name]&&a.push(o[l.name]);for(var O=0;O<o._global.length;O++){var L=o._global[O];L.pred(l,this)&&U(a,L.val)==-1&&a.push(L.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=Tr(a,n==null?a.first+a.size-1:n),ye(this,n+1,i).state},cursorCoords:function(n,i){var a,o=this.doc.sel.primary();return n==null?a=o.head:typeof n=="object"?a=ct(this.doc,n):a=n?o.from():o.to(),In(this,a,i||"page")},charCoords:function(n,i){return oa(this,ct(this.doc,n),i||"page")},coordsChar:function(n,i){return n=ro(this,n,i||"page"),la(this,n.left,n.top)},lineAtHeight:function(n,i){return n=ro(this,{top:n,left:0},i||"page").top,Sn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,l;if(typeof n=="number"){var c=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>c&&(n=c,o=!0),l=qe(this.doc,n)}else l=n;return Li(this,l,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Lt(l):0)},defaultTextHeight:function(){return Pr(this.display)},defaultCharWidth:function(){return jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,l){var c=this.display;n=In(this,ct(this.doc,n));var d=n.bottom,O=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),c.sizer.appendChild(i),o=="over")d=n.top;else if(o=="above"||o=="near"){var L=Math.max(c.wrapper.clientHeight,this.doc.height),se=Math.max(c.sizer.clientWidth,c.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>L)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=L&&(d=n.bottom),O+i.offsetWidth>se&&(O=se-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",l=="right"?(O=c.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?O=0:l=="middle"&&(O=(c.sizer.clientWidth-i.offsetWidth)/2),i.style.left=O+"px"),a&&Js(this,{left:O,top:d,right:O+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:dn(us),triggerOnKeyPress:dn(ds),triggerOnKeyUp:cs,triggerOnMouseDown:dn(fs),execCommand:function(n){if(_i.hasOwnProperty(n))return _i[n].call(null,this)},triggerElectric:dn(function(n){ys(this,n)}),findPosH:function(n,i,a,o){var l=1;i<0&&(l=-1,i=-i);for(var c=ct(this.doc,n),d=0;d<i&&!(c=Na(this.doc,c,l,a,o),c.hitSide);++d);return c},moveH:dn(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Na(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},Z)}),deleteH:dn(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Gr(this,function(l){var c=Na(o,l.head,n,i,!1);return n<0?{from:c,to:l.head}:{from:l.head,to:c}})}),findPosV:function(n,i,a,o){var l=1,c=o;i<0&&(l=-1,i=-i);for(var d=ct(this.doc,n),O=0;O<i;++O){var L=In(this,d,"div");if(c==null?c=L.left:L.left=c,d=ws(this,L,l,a),d.hitSide)break}return d},moveV:dn(function(n,i){var a=this,o=this.doc,l=[],c=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(O){if(c)return n<0?O.from():O.to();var L=In(a,O.head,"div");O.goalColumn!=null&&(L.left=O.goalColumn),l.push(L.left);var se=ws(a,L,n,i);return i=="page"&&O==o.sel.primary()&&ga(a,oa(a,se,"div").top-L.top),se},Z),l.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=l[d]}),findWordAt:function(n){var i=this.doc,a=qe(i,n.line).text,o=n.ch,l=n.ch;if(a){var c=this.getHelper(n,"wordChars");(n.sticky=="before"||l==a.length)&&o?--o:++l;for(var d=a.charAt(o),O=Se(d,c)?function(L){return Se(L,c)}:/\s/.test(d)?function(L){return/\s/.test(L)}:function(L){return!/\s/.test(L)&&!Se(L)};o>0&&O(a.charAt(o-1));)--o;for(;l<a.length&&O(a.charAt(l));)++l}return new St(Fe(n.line,o),Fe(n.line,l))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?R(this.display.cursorDiv,"CodeMirror-overwrite"):de(this.display.cursorDiv,"CodeMirror-overwrite"),Me(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dn(function(n,i){ai(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-zn(this)-this.display.barHeight,width:n.scrollWidth-zn(this)-this.display.barWidth,clientHeight:ra(this),clientWidth:vr(this)}},scrollIntoView:dn(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Fe(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Zs(this,n):mo(this,n.from,n.to,n.margin)}),setSize:dn(function(n,i){var a=this,o=function(c){return typeof c=="number"||/^\d+$/.test(String(c))?c+"px":c};n!=null&&(this.display.wrapper.style.width=o(n)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&eo(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(c){if(c.widgets){for(var d=0;d<c.widgets.length;d++)if(c.widgets[d].noHScroll){or(a,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Me(this,"refresh",this)}),operation:function(n){return xn(this,n)},startOperation:function(){return wr(this)},endOperation:function(){return Cr(this)},refresh:dn(function(){var n=this.display.cachedTextHeight;mn(this),this.curOp.forceUpdate=!0,ri(this),ai(this,this.doc.scrollLeft,this.doc.scrollTop),ya(this.display),(n==null||Math.abs(n-Pr(this.display))>.5||this.options.lineWrapping)&&fa(this),Me(this,"refresh",this)}),swapDoc:dn(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ao(this,n),ri(this),this.display.input.reset(),ai(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,qt(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},T(e),e.registerHelper=function(n,i,a){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=a},e.registerGlobalHelper=function(n,i,a,o){e.registerHelper(n,i,o),r[n]._global.push({pred:a,val:o})}}function Na(e,t,r,n,i){var a=t,o=r,l=qe(e,t.line),c=i&&e.direction=="rtl"?-r:r;function d(){var Je=t.line+c;return Je<e.first||Je>=e.first+e.size?!1:(t=new Fe(Je,t.ch,t.sticky),l=qe(e,Je))}function O(Je){var Ve;if(n=="codepoint"){var et=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(et)?Ve=null:Ve=new Fe(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(et>=55296&&et<56320?2:1))),-r)}else i?Ve=Pl(e.cm,l,t,r):Ve=Aa(l,t,r);if(Ve==null)if(!Je&&d())t=Da(i,e.cm,l,t.line,c);else return!1;else t=Ve;return!0}if(n=="char"||n=="codepoint")O();else if(n=="column")O(!0);else if(n=="word"||n=="group")for(var L=null,se=n=="group",te=e.cm&&e.cm.getHelper(t,"wordChars"),Le=!0;!(r<0&&!O(!Le));Le=!1){var Ne=l.text.charAt(t.ch)||`
`,ze=Se(Ne,te)?"w":se&&Ne==`
`?"n":!se||/\s/.test(Ne)?null:"p";if(se&&!Le&&!ze&&(ze="s"),L&&L!=ze){r<0&&(r=1,O(),t.sticky="after");break}if(ze&&(L=ze),r>0&&!O(!Le))break}var $e=Hi(e,t,a,o,!0);return On(a,$e)&&($e.hitSide=!0),$e}function ws(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Pr(e.display),3);o=(r>0?t.bottom:t.top)+r*c}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var d;!(d=la(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var Tt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new x,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Tt.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;xs(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(l){for(var c=l.target;c;c=c.parentNode){if(c==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(c.className))break}return!1}Oe(i,"paste",function(l){if(!a(l)||He(n,l)||bs(l,n))return;A<=11&&setTimeout(Vt(n,function(){return t.updateFromDOM()}),20)}),Oe(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),Oe(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),Oe(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Oe(i,"touchstart",function(){return r.forceCompositionEnd()}),Oe(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(l){if(!a(l)||He(n,l))return;if(n.somethingSelected())Yi({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var c=_s(n);Yi({lineWise:!0,text:c.text}),l.type=="cut"&&n.operation(function(){n.setSelections(c.ranges,0,ce),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var d=Un.text.join(`
`);if(l.clipboardData.setData("Text",d),l.clipboardData.getData("Text")==d){l.preventDefault();return}}var O=Es(),L=O.firstChild;n.display.lineSpace.insertBefore(O,n.display.lineSpace.firstChild),L.value=Un.text.join(`
`);var se=document.activeElement;C(L),setTimeout(function(){n.display.lineSpace.removeChild(O),se.focus(),se==i&&r.showPrimarySelection()},50)}Oe(i,"copy",o),Oe(i,"cut",o)},Tt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Tt.prototype.prepareSelection=function(){var e=uo(this.cm,!1);return e.focus=document.activeElement==this.div,e},Tt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Tt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Tt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var a=Ji(t,e.anchorNode,e.anchorOffset),o=Ji(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&dt(Xn(a,o),n)==0&&dt(Ge(a,o),i)==0)return;var l=t.display.view,c=n.line>=t.display.viewFrom&&Cs(t,n)||{node:l[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&Cs(t,i);if(!d){var O=l[l.length-1].measure,L=O.maps?O.maps[O.maps.length-1]:O.map;d={node:L[L.length-1],offset:L[L.length-2]-L[L.length-3]}}if(!c||!d){e.removeAllRanges();return}var se=e.rangeCount&&e.getRangeAt(0),te;try{te=D(c.node,c.offset,d.offset,d.node)}catch(Le){}te&&(!ue&&t.state.focused?(e.collapse(c.node,c.offset),te.collapsed||(e.removeAllRanges(),e.addRange(te))):(e.removeAllRanges(),e.addRange(te)),se&&e.anchorNode==null?e.addRange(se):ue&&this.startGracePeriod()),this.rememberSelection()},Tt.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Tt.prototype.showMultipleSelections=function(e){Q(this.cm.display.cursorDiv,e.cursors),Q(this.cm.display.selectionDiv,e.selection)},Tt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Tt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return _(this.div,t)},Tt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Tt.prototype.blur=function(){this.div.blur()},Tt.prototype.getField=function(){return this.div},Tt.prototype.supportsTouch=function(){return!0},Tt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():xn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Tt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Tt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(I&&J&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var r=Ji(t,e.anchorNode,e.anchorOffset),n=Ji(t,e.focusNode,e.focusOffset);r&&n&&xn(t,function(){rn(t.doc,lr(r,n),ce),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},Tt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Fe(n.line-1,qe(e.doc,n.line-1).length)),i.ch==qe(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Fe(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,l;n.line==t.viewFrom||(a=_r(e,n.line))==0?(o=xt(t.view[0].line),l=t.view[0].node):(o=xt(t.view[a].line),l=t.view[a-1].node.nextSibling);var c=_r(e,i.line),d,O;if(c==t.view.length-1?(d=t.viewTo-1,O=t.lineDiv.lastChild):(d=xt(t.view[c+1].line)-1,O=t.view[c+1].node.previousSibling),!l)return!1;for(var L=e.doc.splitLines(tu(e,l,O,o,d)),se=Qt(e.doc,Fe(o,0),Fe(d,qe(e.doc,d).text.length));L.length>1&&se.length>1;)if(p(L)==p(se))L.pop(),se.pop(),d--;else if(L[0]==se[0])L.shift(),se.shift(),o++;else break;for(var te=0,Le=0,Ne=L[0],ze=se[0],$e=Math.min(Ne.length,ze.length);te<$e&&Ne.charCodeAt(te)==ze.charCodeAt(te);)++te;for(var Je=p(L),Ve=p(se),et=Math.min(Je.length-(L.length==1?te:0),Ve.length-(se.length==1?te:0));Le<et&&Je.charCodeAt(Je.length-Le-1)==Ve.charCodeAt(Ve.length-Le-1);)++Le;if(L.length==1&&se.length==1&&o==n.line)for(;te&&te>n.ch&&Je.charCodeAt(Je.length-Le-1)==Ve.charCodeAt(Ve.length-Le-1);)te--,Le++;L[L.length-1]=Je.slice(0,Je.length-Le).replace(/^\u200b+/,""),L[0]=L[0].slice(te).replace(/\u200b+$/,"");var ft=Fe(o,te),st=Fe(d,se.length?p(se).length-Le:0);if(L.length>1||L[0]||dt(ft,st))return zr(e.doc,L,ft,st,"+input"),!0},Tt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Tt.prototype.reset=function(){this.forceCompositionEnd()},Tt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Tt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},Tt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&xn(this.cm,function(){return mn(e.cm)})},Tt.prototype.setUneditable=function(e){e.contentEditable="false"},Tt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Vt(this.cm,ja)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Tt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Tt.prototype.onContextMenu=function(){},Tt.prototype.resetPosition=function(){},Tt.prototype.needsContentAttribute=!0;function Cs(e,t){var r=ia(e,t.line);if(!r||r.hidden)return null;var n=qe(e.doc,t.line),i=Ya(r,n,t.line),a=Xe(n,e.doc.direction),o="left";if(a){var l=Ke(a,t.ch);o=l%2?"right":"left"}var c=Qa(i.map,t.ch,o);return c.offset=c.collapse=="right"?c.end:c.start,c}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function $r(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,l=e.doc.lineSeparator(),c=!1;function d(te){return function(Le){return Le.id==te}}function O(){o&&(a+=l,c&&(a+=l),o=c=!1)}function L(te){te&&(O(),a+=te)}function se(te){if(te.nodeType==1){var Le=te.getAttribute("cm-text");if(Le){L(Le);return}var Ne=te.getAttribute("cm-marker"),ze;if(Ne){var $e=e.findMarks(Fe(n,0),Fe(i+1,0),d(+Ne));$e.length&&(ze=$e[0].find(0))&&L(Qt(e.doc,ze.from,ze.to).join(l));return}if(te.getAttribute("contenteditable")=="false")return;var Je=/^(pre|div|p|li|table|br)$/i.test(te.nodeName);if(!/^br$/i.test(te.nodeName)&&te.textContent.length==0)return;Je&&O();for(var Ve=0;Ve<te.childNodes.length;Ve++)se(te.childNodes[Ve]);/^(pre|p)$/i.test(te.nodeName)&&(c=!0),Je&&(o=!0)}else te.nodeType==3&&L(te.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(se(t),t==r);)t=t.nextSibling,c=!1;return a}function Ji(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return $r(e.clipPos(Fe(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return nu(a,t,r)}}function nu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!_(n,t))return $r(Fe(xt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?p(e.rest):e.line;return $r(Fe(xt(a),a.text.length),i)}var o=t.nodeType==3?t:null,l=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var c=e.measure,d=c.maps;function O(ze,$e,Je){for(var Ve=-1;Ve<(d?d.length:0);Ve++)for(var et=Ve<0?c.map:d[Ve],ft=0;ft<et.length;ft+=3){var st=et[ft+2];if(st==ze||st==$e){var vt=xt(Ve<0?e.line:e.rest[Ve]),At=et[ft]+Je;return(Je<0||st!=ze)&&(At=et[ft+(Je?1:0)]),Fe(vt,At)}}}var L=O(o,l,r);if(L)return $r(L,i);for(var se=l.nextSibling,te=o?o.nodeValue.length-r:0;se;se=se.nextSibling){if(L=O(se,se.firstChild,0),L)return $r(Fe(L.line,L.ch-te),i);te+=se.textContent.length}for(var Le=l.previousSibling,Ne=r;Le;Le=Le.previousSibling){if(L=O(Le,Le.firstChild,-1),L)return $r(Fe(L.line,L.ch+Ne),i);Ne+=Le.textContent.length}}var Ut=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new x,this.hasSelection=!1,this.composing=null};Ut.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),P&&(i.style.width="0px"),Oe(i,"input",function(){M&&A>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Oe(i,"paste",function(o){if(He(n,o)||bs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(He(n,o))return;if(n.somethingSelected())Yi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=_s(n);Yi({lineWise:!0,text:l.text}),o.type=="cut"?n.setSelections(l.ranges,null,ce):(r.prevInput="",i.value=l.text.join(`
`),C(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}Oe(i,"cut",a),Oe(i,"copy",a),Oe(e.scroller,"paste",function(o){if(qn(e,o)||He(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=o.clipboardData,i.dispatchEvent(l)}),Oe(e.lineSpace,"selectstart",function(o){qn(e,o)||f(o)}),Oe(i,"compositionstart",function(){var o=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:o,range:n.markText(o,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Oe(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Ut.prototype.createField=function(e){this.wrapper=Es(),this.textarea=this.wrapper.firstChild},Ut.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ut.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=uo(e);if(e.options.moveInputWithCursor){var i=In(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},Ut.prototype.showSelection=function(e){var t=this.cm,r=t.display;Q(r.cursorDiv,e.cursors),Q(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ut.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&C(this.textarea),M&&A>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",M&&A>=9&&(this.hasSelection=null))},Ut.prototype.getField=function(){return this.textarea},Ut.prototype.supportsTouch=function(){return!1},Ut.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!B||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ut.prototype.blur=function(){this.textarea.blur()},Ut.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ut.prototype.receivedFocus=function(){this.slowPoll()},Ut.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ut.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Ut.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ht(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(M&&A>=9&&this.hasSelection===i||ie&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(n.length,i.length);o<l&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return xn(t,function(){ja(t,i.slice(o),n.length-o,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ut.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ut.prototype.onKeyPress=function(){M&&A>=9&&(this.hasSelection=null),this.fastPoll()},Ut.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=yr(r,e),o=n.scroller.scrollTop;if(!a||ae)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(a)==-1&&Vt(r,rn)(r.doc,lr(a),ce);var c=i.style.cssText,d=t.wrapper.style.cssText,O=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-O.top-5)+"px; left: "+(e.clientX-O.left-5)+`px;
z-index: 1000; background: `+(M?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var L;w&&(L=window.scrollY),n.input.focus(),w&&window.scrollTo(null,L),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=te,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function se(){if(i.selectionStart!=null){var Ne=r.somethingSelected(),ze="\u200B"+(Ne?i.value:"");i.value="\u21DA",i.value=ze,t.prevInput=Ne?"":"\u200B",i.selectionStart=1,i.selectionEnd=ze.length,n.selForContextMenu=r.doc.sel}}function te(){if(t.contextMenuPending!=te)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=c,M&&A<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!M||M&&A<9)&&se();var Ne=0,ze=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Vt(r,zo)(r):Ne++<10?n.detectingSelectAll=setTimeout(ze,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ze,200)}}if(M&&A>=9&&se(),Re){E(e);var Le=function(){Ze(window,"mouseup",Le),setTimeout(te,20)};Oe(window,"mouseup",Le)}else setTimeout(te,50)},Ut.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ut.prototype.setUneditable=function(){},Ut.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?s(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=G();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(Oe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){n(),a.submit=i,a.submit(),a.submit=o}}catch(c){}}t.finishInit=function(c){c.save=n,c.getTextArea=function(){return e},c.toTextArea=function(){c.toTextArea=isNaN,n(),e.parentNode.removeChild(c.getWrapperElement()),e.style.display="",e.form&&(Ze(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Mt(function(c){return e.parentNode.insertBefore(c,e.nextSibling)},t);return l}function iu(e){e.off=Ze,e.on=Oe,e.wheelEventPixels=dl,e.Doc=gn,e.splitLines=bt,e.countColumn=g,e.findColumn=q,e.isWordChar=oe,e.Pass=Ee,e.signal=Me,e.Line=$t,e.changeEnd=ur,e.scrollbarModel=bo,e.Pos=Fe,e.cmpPos=dt,e.modes=Rt,e.mimeModes=yt,e.resolveMode=sn,e.getMode=Cn,e.modeExtensions=tn,e.extendMode=nr,e.copyState=An,e.startState=Bn,e.innerMode=Rn,e.commands=_i,e.keyMap=er,e.keyName=is,e.isModifierKey=ns,e.lookupKey=Kr,e.normalizeKeyMap=Rl,e.StringStream=kt,e.SharedTextMarker=vi,e.TextMarker=dr,e.LineWidget=gi,e.e_preventDefault=f,e.e_stopPropagation=v,e.e_stop=E,e.addClass=R,e.contains=_,e.rmClass=de,e.keyNames=fr}Yl(Mt),ql(Mt);var au="iter insert remove copy getEditor constructor".split(" ");for(var Zi in gn.prototype)gn.prototype.hasOwnProperty(Zi)&&U(au,Zi)<0&&(Mt.prototype[Zi]=function(e){return function(){return e.apply(this.doc,arguments)}}(gn.prototype[Zi]));return T(gn),Mt.inputStyles={textarea:Ut,contenteditable:Tt},Mt.defineMode=function(e){!Mt.defaults.mode&&e!="null"&&(Mt.defaults.mode=e),on.apply(this,arguments)},Mt.defineMIME=wn,Mt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Mt.defineMIME("text/plain","null"),Mt.defineExtension=function(e,t){Mt.prototype[e]=t},Mt.defineDocExtension=function(e,t){gn.prototype[e]=t},Mt.fromTextArea=ru,iu(Mt),Mt.version="5.58.2",Mt})},WdTA:function(nt,Be,h){nt.exports=h.p+"static/studnetqun.598eeb43.png"},Y1PL:function(nt,Be,h){"use strict";h.r(Be),h.d(Be,"ResizableTextArea",function(){return U});var W=h("wx14"),_e=h("1OyB"),ue=h("vuIU"),ke=h("Ji7U"),we=h("LK+K"),Y=h("q1tI"),M=h("VTBJ"),A=h("rePB"),w=h("Zm9Q"),H=h("Kwbf"),J=h("c+Xe"),ae=h("m+aA"),fe=h("bdgK"),$=new Map;function N(ce){ce.forEach(function(xe){var Z,q=xe.target;(Z=$.get(q))===null||Z===void 0||Z.forEach(function(K){return K(q)})})}var P=new fe.default(N),I=null,B=null;function ie(ce,xe){$.has(ce)||($.set(ce,new Set),P.observe(ce)),$.get(ce).add(xe)}function Ce(ce,xe){$.has(ce)&&($.get(ce).delete(xe),$.get(ce).size||(P.unobserve(ce),$.delete(ce)))}var We=function(ce){Object(ke.a)(Z,ce);var xe=Object(we.a)(Z);function Z(){return Object(_e.a)(this,Z),xe.apply(this,arguments)}return Object(ue.a)(Z,[{key:"render",value:function(){return this.props.children}}]),Z}(Y.Component),he=Y.createContext(null);function be(ce){var xe=ce.children,Z=ce.onBatchResize,q=Y.useRef(0),K=Y.useRef([]),ee=Y.useContext(he),p=Y.useCallback(function(k,m,j){q.current+=1;var ne=q.current;K.current.push({size:k,element:m,data:j}),Promise.resolve().then(function(){ne===q.current&&(Z==null||Z(K.current),K.current=[])}),ee==null||ee(k,m,j)},[Z,ee]);return Y.createElement(he.Provider,{value:p},xe)}function Re(ce){var xe=ce.children,Z=ce.disabled,q=Y.useRef(null),K=Y.useRef(null),ee=Y.useContext(he),p=Y.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),k=Y.isValidElement(xe)&&Object(J.c)(xe),m=k?xe.ref:null,j=Y.useMemo(function(){return Object(J.a)(m,q)},[m,q]),ne=Y.useRef(ce);ne.current=ce;var z=Y.useCallback(function(oe){var Se=ne.current,Te=Se.onResize,ge=Se.data,ve=oe.getBoundingClientRect(),De=ve.width,Ie=ve.height,Pe=oe.offsetWidth,Ue=oe.offsetHeight,Ke=Math.floor(De),tt=Math.floor(Ie);if(p.current.width!==Ke||p.current.height!==tt||p.current.offsetWidth!==Pe||p.current.offsetHeight!==Ue){var Xe={width:Ke,height:tt,offsetWidth:Pe,offsetHeight:Ue};p.current=Xe;var Ye=Pe===Math.round(De)?De:Pe,Oe=Ue===Math.round(Ie)?Ie:Ue,at=Object(M.a)(Object(M.a)({},Xe),{},{offsetWidth:Ye,offsetHeight:Oe});ee==null||ee(at,oe,ge),Te&&Promise.resolve().then(function(){Te(at,oe)})}},[]);return Y.useEffect(function(){var oe=Object(ae.a)(q.current)||Object(ae.a)(K.current);return oe&&!Z&&ie(oe,z),function(){return Ce(oe,z)}},[q.current,Z]),Y.createElement(We,{ref:K},k?Y.cloneElement(xe,{ref:j}):xe)}var pe="rc-observer-key";function de(ce){var xe=ce.children,Z=Object(w.a)(xe);return Z.map(function(q,K){var ee=(q==null?void 0:q.key)||"".concat(pe,"-").concat(K);return Y.createElement(Re,Object(W.a)({},ce,{key:ee}),q)})}de.Collection=be;var Ae=de,Q=h("bT9E"),y=h("TSYQ"),V=h.n(y),D=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,_=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],G={},R;function S(ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Z=ce.getAttribute("id")||ce.getAttribute("data-reactid")||ce.getAttribute("name");if(xe&&G[Z])return G[Z];var q=window.getComputedStyle(ce),K=q.getPropertyValue("box-sizing")||q.getPropertyValue("-moz-box-sizing")||q.getPropertyValue("-webkit-box-sizing"),ee=parseFloat(q.getPropertyValue("padding-bottom"))+parseFloat(q.getPropertyValue("padding-top")),p=parseFloat(q.getPropertyValue("border-bottom-width"))+parseFloat(q.getPropertyValue("border-top-width")),k=_.map(function(j){return"".concat(j,":").concat(q.getPropertyValue(j))}).join(";"),m={sizingStyle:k,paddingSize:ee,borderSize:p,boxSizing:K};return xe&&Z&&(G[Z]=m),m}function C(ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;R||(R=document.createElement("textarea"),R.setAttribute("tab-index","-1"),R.setAttribute("aria-hidden","true"),document.body.appendChild(R)),ce.getAttribute("wrap")?R.setAttribute("wrap",ce.getAttribute("wrap")):R.removeAttribute("wrap");var K=S(ce,xe),ee=K.paddingSize,p=K.borderSize,k=K.boxSizing,m=K.sizingStyle;R.setAttribute("style","".concat(m,";").concat(D)),R.value=ce.value||ce.placeholder||"";var j=Number.MIN_SAFE_INTEGER,ne=Number.MAX_SAFE_INTEGER,z=R.scrollHeight,oe;if(k==="border-box"?z+=p:k==="content-box"&&(z-=ee),Z!==null||q!==null){R.value=" ";var Se=R.scrollHeight-ee;Z!==null&&(j=Se*Z,k==="border-box"&&(j=j+ee+p),z=Math.max(j,z)),q!==null&&(ne=Se*q,k==="border-box"&&(ne=ne+ee+p),oe=z>ne?"":"hidden",z=Math.min(ne,z))}return{height:z,minHeight:j,maxHeight:ne,overflowY:oe,resize:"none"}}var u=h("Gytx"),s=h.n(u),g;(function(ce){ce[ce.NONE=0]="NONE",ce[ce.RESIZING=1]="RESIZING",ce[ce.RESIZED=2]="RESIZED"})(g||(g={}));var x=function(ce){Object(ke.a)(Z,ce);var xe=Object(we.a)(Z);function Z(q){var K;return Object(_e.a)(this,Z),K=xe.call(this,q),K.nextFrameActionId=void 0,K.resizeFrameId=void 0,K.textArea=void 0,K.saveTextArea=function(ee){K.textArea=ee},K.handleResize=function(ee){var p=K.state.resizeStatus,k=K.props,m=k.autoSize,j=k.onResize;if(p!==g.NONE)return;typeof j=="function"&&j(ee),m&&K.resizeOnNextFrame()},K.resizeOnNextFrame=function(){cancelAnimationFrame(K.nextFrameActionId),K.nextFrameActionId=requestAnimationFrame(K.resizeTextarea)},K.resizeTextarea=function(){var ee=K.props.autoSize;if(!ee||!K.textArea)return;var p=ee.minRows,k=ee.maxRows,m=C(K.textArea,!1,p,k);K.setState({textareaStyles:m,resizeStatus:g.RESIZING},function(){cancelAnimationFrame(K.resizeFrameId),K.resizeFrameId=requestAnimationFrame(function(){K.setState({resizeStatus:g.RESIZED},function(){K.resizeFrameId=requestAnimationFrame(function(){K.setState({resizeStatus:g.NONE}),K.fixFirefoxAutoScroll()})})})})},K.renderTextArea=function(){var ee=K.props,p=ee.prefixCls,k=p===void 0?"rc-textarea":p,m=ee.autoSize,j=ee.onResize,ne=ee.className,z=ee.disabled,oe=K.state,Se=oe.textareaStyles,Te=oe.resizeStatus,ge=Object(Q.a)(K.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ve=V()(k,ne,Object(A.a)({},"".concat(k,"-disabled"),z));"value"in ge&&(ge.value=ge.value||"");var De=Object(M.a)(Object(M.a)(Object(M.a)({},K.props.style),Se),Te===g.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return Y.createElement(Ae,{onResize:K.handleResize,disabled:!(m||j)},Y.createElement("textarea",Object(W.a)({},ge,{className:ve,style:De,ref:K.saveTextArea})))},K.state={textareaStyles:{},resizeStatus:g.NONE},K}return Object(ue.a)(Z,[{key:"componentDidUpdate",value:function(K){(K.value!==this.props.value||!s()(K.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var K=this.textArea.selectionStart,ee=this.textArea.selectionEnd;this.textArea.setSelectionRange(K,ee)}}catch(p){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Z}(Y.Component),U=x,le=function(ce){Object(ke.a)(Z,ce);var xe=Object(we.a)(Z);function Z(q){var K;Object(_e.a)(this,Z),K=xe.call(this,q),K.resizableTextArea=void 0,K.focus=function(){K.resizableTextArea.textArea.focus()},K.saveTextArea=function(p){K.resizableTextArea=p},K.handleChange=function(p){var k=K.props.onChange;K.setValue(p.target.value,function(){K.resizableTextArea.resizeTextarea()}),k&&k(p)},K.handleKeyDown=function(p){var k=K.props,m=k.onPressEnter,j=k.onKeyDown;p.keyCode===13&&m&&m(p),j&&j(p)};var ee=typeof q.value=="undefined"||q.value===null?q.defaultValue:q.value;return K.state={value:ee},K}return Object(ue.a)(Z,[{key:"setValue",value:function(K,ee){"value"in this.props||this.setState({value:K},ee)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return Y.createElement(U,Object(W.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(K){return"value"in K?{value:K.value}:null}}]),Z}(Y.Component),Ee=Be.default=le},ZW9T:function(nt,Be,h){"use strict";h.d(Be,"a",function(){return We});var W=h("k1fw"),_e=h("miYZ"),ue=h("tsqr"),ke=h("rAM+"),we=h("tJVT"),Y=h("PpiC"),M=h("q1tI"),A=h.n(M),w=h("bdgK");function H(he,be,Re,pe,de){var Ae=be.getWordUntilPosition(Re),Q={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:Ae.startColumn,endColumn:Ae.endColumn},y=pe.map(function(V){return{label:V,kind:he.languages.CompletionItemKind.Keyword,insertText:V,insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Q}});return de.map(function(V){y.push(Object(W.a)(Object(W.a)({},V),{},{range:Q}))}),y}var J=function(he){var be={label:"ifelse",kind:he.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet},Re=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];he.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Q,y){var V=H(he,Q,y,Re,[be]);return{suggestions:V}}});var pe=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];he.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Q,y){var V=[{label:"print",kind:he.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet}],D=H(he,Q,y,pe,V);return{suggestions:D}}});var de=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];he.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Q,y){var V=[be,{label:"main",kind:he.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:he.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet}],D=H(he,Q,y,de,V);return{suggestions:D}}})},ae="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",fe=h("LvDl");function $(he){return/^\d+$/.test(he)?"".concat(he,"px"):he}function N(){}var P=!1,I={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function B(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],be=he;if(Array.isArray(he)){for(var Re=0;Re<he.length;Re++){var pe=I[he[Re]];if(pe)return pe}return be[0]}return I[be]||be}var ie=null,Ce=Be.b=function(he){var be=he.width,Re=be===void 0?"100%":be,pe=he.height,de=pe===void 0?"100%":pe,Ae=he.value,Q=he.language,y=Q===void 0?"javascript":Q,V=he.style,D=V===void 0?{}:V,_=he.options,G=_===void 0?{}:_,R=he.overrideServices,S=R===void 0?{}:R,C=he.theme,u=C===void 0?"vs-dark":C,s=he.onEditBlur,g=he.onSave,x=he.autoHeight,U=x===void 0?!1:x,le=he.forbidCopy,Ee=le===void 0?!1:le,ce=he.onChange,xe=ce===void 0?N:ce,Z=he.editorDidMount,q=Z===void 0?N:Z,K=he.onFocus,ee=K===void 0?N:K,p=he.filename,k=p===void 0?"educoder.txt":p,m=Object(Y.a)(he,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),j=Object(M.useRef)(),ne=Object(M.useRef)({}),z=Object(M.useRef)(),oe=Object(M.useRef)(!1),Se=Object(M.useRef)(),Te=Object(M.useState)(!1),ge=Object(we.a)(Te,2),ve=ge[0],De=ge[1];function Ie(){var b;return j.current&&(b=new w.default(function(E){var re=Object(ke.a)(E),me;try{for(re.s();!(me=re.n()).done;){var je=me.value;(je.target.offsetHeight>0||je.target.offsetWidth>0)&&ne.current.instance.layout()}}catch(rt){re.e(rt)}finally{re.f()}}),b.observe(j.current)),b}function Pe(){ue.b.warn(decodeURIComponent(ae))}var Ue=function(){var E=ne.current.instance;if(Ae!=null&&E&&ve){var re=E.getModel();re&&Ae!==re.getValue()&&(P=!0,re.setValue(Ae),E.layout(),P=!1)}};Object(M.useEffect)(function(){z.current&&clearTimeout(z.current),z.current=setTimeout(function(){Ue()},500)},[Ae,ve,ne.current]);function Ke(){var b=ne.current.instance;if(b){var E=b.getSelection(),re=ne.current.pastePos||{},me=new ie.Range(re.startLineNumber||E.endLineNumber,re.startColumn||E.endColumn,re.endLineNumber||E.endLineNumber,re.endColumn||E.endColumn);setTimeout(function(){b.executeEdits("",[{range:me,text:""}])},300)}}function tt(b){(window.navigator.platform.match("Mac")?b.metaKey:b.ctrlKey)&&b.keyCode==83&&(b.preventDefault(),g())}var Xe=function(){if(U&&ne.current.instance){var E=ne.current.instance.getContentHeight();f(E<de?de:E)}else f(de)};function Ye(b){var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.dispatchEvent(E)}function Oe(b,E){var re=window.URL||window.webkitURL||window,me=new Blob([E]),je=document.createElementNS("http://www.w3.org/1999/xhtml","a");je.href=re.createObjectURL(me),je.download=b,Ye(je)}Object(M.useEffect)(function(){Xe()},[Xe]),Object(M.useEffect)(function(){j.current&&!ve&&h.e(26).then(h.t.bind(null,"M/lh",7)).then(function(b){try{ie=b,ne.current.instance=ie.editor.create(j.current,{value:Ae,language:B(y),theme:u,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},S);var E=ne.current.instance;if(q(E,ie),setTimeout(function(){Xe(),ne.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Oe(k||"educoder.txt",E.getValue())}})},500),ne.current.subscription=E.onDidChangeModelContent(function(me){oe.current?clearTimeout(Se.current):(Xe(),xe(E.getValue(),me)),Se.current=setTimeout(function(){oe.current=!1},500)}),window.Monaco||J(ie),Ee&&(E.addCommand(ie.KeyMod.CtrlCmd|ie.KeyMod.Shift|ie.KeyCode.KEY_V,function(){return Pe(),null}),E.addCommand(ie.KeyMod.CtrlCmd|ie.KeyCode.KEY_C,function(){return Pe(),null})),window.Monaco=ie,s&&E.onDidBlurEditorWidget(function(){s(E.getValue())}),ee&&E.onDidFocusEditorText(function(){ee(E.getValue())}),Ee){E.addCommand(ie.KeyMod.CtrlCmd|ie.KeyCode.KEY_V,function(){return Pe(),null}),E.onDidPaste(function(me){ne.current.pastePos=me});try{window.addEventListener("paste",Ke)}catch(me){}}var re=Ie();return De(!0),function(){var me=ne.current.instance;me.dispose();var je=me.getModel();je&&je.dispose(),ne.current.subscription&&ne.current.subscription.dispose(),Ee&&window.removeEventListener("paste",Ke),re.unobserve(j.current)}}catch(me){}})},[]),Object(M.useEffect)(function(){var b=ne.current.instance;if(b&&ve)return document.addEventListener("keydown",tt,!1),function(){document.removeEventListener("keydown",tt)}},[g,ve]),Object(M.useEffect)(function(){var b=ne.current.instance;if(b&&ve){var E=B(y);ie.editor.setModelLanguage(b.getModel(),E),console.log("language:",y,b.getModel(),E)}},[y,ve]),Object(M.useEffect)(function(){var b=ne.current.instance;b&&ve&&ie.editor.setTheme(u)},[u,ve]),Object(M.useEffect)(function(){var b=ne.current.instance;b&&ve&&(b.updateOptions(Object(W.a)({},G)),setTimeout(function(){b.getModel().updateOptions(Object(W.a)({},G))},200))},[JSON.stringify(G),ve]),Object(M.useEffect)(function(){var b=ne.current.instance;b&&ve&&b.layout()},[Re,de,ve]);var at=Object(M.useState)($(Re)),Ze=Object(we.a)(at,2),Me=Ze[0],He=Ze[1],X=Object(M.useState)($(de)),F=Object(we.a)(X,2),T=F[0],f=F[1],v=Object(W.a)(Object(W.a)({},D),{},{width:Me,height:T});return A.a.createElement("div",{className:"my-monaco-editor",ref:j,style:v})};function We(he){var be=he.width,Re=be===void 0?"100%":be,pe=he.height,de=pe===void 0?"100%":pe,Ae=he.original,Q=he.modified,y=he.language,V=he.options,D=V===void 0?{}:V,_=Object(M.useRef)(),G=Object(M.useState)(null),R=Object(we.a)(G,2),S=R[0],C=R[1];function u(U){var le;return _.current&&(le=new w.default(function(Ee){var ce=Object(ke.a)(Ee),xe;try{for(ce.s();!(xe=ce.n()).done;){var Z=xe.value;(Z.target.offsetHeight>0||Z.target.offsetWidth>0)&&U.layout()}}catch(q){ce.e(q)}finally{ce.f()}}),le.observe(_.current)),le}Object(M.useEffect)(function(){_.current&&h.e(26).then(h.t.bind(null,"M/lh",7)).then(function(U){ie=U;var le=ie.editor.createDiffEditor(_.current,Object(W.a)(Object(W.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},D),{},{wordWrap:!0}));C(le);var Ee=u(le);return function(){le.dispose();var ce=le.getModel();ce&&ce.dispose(),Ee.unobserve(_.current)}})},[]),Object(M.useEffect)(function(){S&&S.setModel({original:ie.editor.createModel(Ae,y),modified:ie.editor.createModel(Q,y)})},[Ae,Q,y,S]);var s=$(Re),g=$(de),x={width:s,height:g};return A.a.createElement("div",{className:"my-diff-editor",ref:_,style:x})}},ZpRC:function(nt,Be,h){"use strict";function W(J){return typeof J=="object"&&J!=null&&J.nodeType===1}function _e(J,ae){return(!ae||J!=="hidden")&&J!=="visible"&&J!=="clip"}function ue(J,ae){if(J.clientHeight<J.scrollHeight||J.clientWidth<J.scrollWidth){var fe=getComputedStyle(J,null);return _e(fe.overflowY,ae)||_e(fe.overflowX,ae)||function($){var N=function(P){if(!P.ownerDocument||!P.ownerDocument.defaultView)return null;try{return P.ownerDocument.defaultView.frameElement}catch(I){return null}}($);return!!N&&(N.clientHeight<$.scrollHeight||N.clientWidth<$.scrollWidth)}(J)}return!1}function ke(J,ae,fe,$,N,P,I,B){return P<J&&I>ae||P>J&&I<ae?0:P<=J&&B<=fe||I>=ae&&B>=fe?P-J-$:I>ae&&B<fe||P<J&&B>fe?I-ae+N:0}var we=function(J,ae){var fe=window,$=ae.scrollMode,N=ae.block,P=ae.inline,I=ae.boundary,B=ae.skipOverflowHiddenElements,ie=typeof I=="function"?I:function(Se){return Se!==I};if(!W(J))throw new TypeError("Invalid target");for(var Ce=document.scrollingElement||document.documentElement,We=[],he=J;W(he)&&ie(he);){if((he=he.parentElement)===Ce){We.push(he);break}he!=null&&he===document.body&&ue(he)&&!ue(document.documentElement)||he!=null&&ue(he,B)&&We.push(he)}for(var be=fe.visualViewport?fe.visualViewport.width:innerWidth,Re=fe.visualViewport?fe.visualViewport.height:innerHeight,pe=window.scrollX||pageXOffset,de=window.scrollY||pageYOffset,Ae=J.getBoundingClientRect(),Q=Ae.height,y=Ae.width,V=Ae.top,D=Ae.right,_=Ae.bottom,G=Ae.left,R=N==="start"||N==="nearest"?V:N==="end"?_:V+Q/2,S=P==="center"?G+y/2:P==="end"?D:G,C=[],u=0;u<We.length;u++){var s=We[u],g=s.getBoundingClientRect(),x=g.height,U=g.width,le=g.top,Ee=g.right,ce=g.bottom,xe=g.left;if($==="if-needed"&&V>=0&&G>=0&&_<=Re&&D<=be&&V>=le&&_<=ce&&G>=xe&&D<=Ee)return C;var Z=getComputedStyle(s),q=parseInt(Z.borderLeftWidth,10),K=parseInt(Z.borderTopWidth,10),ee=parseInt(Z.borderRightWidth,10),p=parseInt(Z.borderBottomWidth,10),k=0,m=0,j="offsetWidth"in s?s.offsetWidth-s.clientWidth-q-ee:0,ne="offsetHeight"in s?s.offsetHeight-s.clientHeight-K-p:0;if(Ce===s)k=N==="start"?R:N==="end"?R-Re:N==="nearest"?ke(de,de+Re,Re,K,p,de+R,de+R+Q,Q):R-Re/2,m=P==="start"?S:P==="center"?S-be/2:P==="end"?S-be:ke(pe,pe+be,be,q,ee,pe+S,pe+S+y,y),k=Math.max(0,k+de),m=Math.max(0,m+pe);else{k=N==="start"?R-le-K:N==="end"?R-ce+p+ne:N==="nearest"?ke(le,ce,x,K,p+ne,R,R+Q,Q):R-(le+x/2)+ne/2,m=P==="start"?S-xe-q:P==="center"?S-(xe+U/2)+j/2:P==="end"?S-Ee+ee+j:ke(xe,Ee,U,q,ee+j,S,S+y,y);var z=s.scrollLeft,oe=s.scrollTop;R+=oe-(k=Math.max(0,Math.min(oe+k,s.scrollHeight-x+ne))),S+=z-(m=Math.max(0,Math.min(z+m,s.scrollWidth-U+j)))}C.push({el:s,top:k,left:m})}return C};function Y(J){return J===Object(J)&&Object.keys(J).length!==0}function M(J,ae){ae===void 0&&(ae="auto");var fe="scrollBehavior"in document.body.style;J.forEach(function($){var N=$.el,P=$.top,I=$.left;N.scroll&&fe?N.scroll({top:P,left:I,behavior:ae}):(N.scrollTop=P,N.scrollLeft=I)})}function A(J){return J===!1?{block:"end",inline:"nearest"}:Y(J)?J:{block:"start",inline:"nearest"}}function w(J,ae){var fe=!J.ownerDocument.documentElement.contains(J);if(Y(ae)&&typeof ae.behavior=="function")return ae.behavior(fe?[]:we(J,ae));if(fe)return;var $=A(ae);return M(we(J,$),$.behavior)}var H=Be.a=w},Zss7:function(nt,Be,h){var W;(function(_e){var ue=/^\s+/,ke=/\s+$/,we=0,Y=_e.round,M=_e.min,A=_e.max,w=_e.random;function H(p,k){if(p=p||"",k=k||{},p instanceof H)return p;if(!(this instanceof H))return new H(p,k);var m=J(p);this._originalInput=p,this._r=m.r,this._g=m.g,this._b=m.b,this._a=m.a,this._roundA=Y(100*this._a)/100,this._format=k.format||m.format,this._gradientType=k.gradientType,this._r<1&&(this._r=Y(this._r)),this._g<1&&(this._g=Y(this._g)),this._b<1&&(this._b=Y(this._b)),this._ok=m.ok,this._tc_id=we++}H.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var p=this.toRgb();return(p.r*299+p.g*587+p.b*114)/1e3},getLuminance:function(){var p=this.toRgb(),k,m,j,ne,z,oe;return k=p.r/255,m=p.g/255,j=p.b/255,k<=.03928?ne=k/12.92:ne=_e.pow((k+.055)/1.055,2.4),m<=.03928?z=m/12.92:z=_e.pow((m+.055)/1.055,2.4),j<=.03928?oe=j/12.92:oe=_e.pow((j+.055)/1.055,2.4),.2126*ne+.7152*z+.0722*oe},setAlpha:function(p){return this._a=C(p),this._roundA=Y(100*this._a)/100,this},toHsv:function(){var p=N(this._r,this._g,this._b);return{h:p.h*360,s:p.s,v:p.v,a:this._a}},toHsvString:function(){var p=N(this._r,this._g,this._b),k=Y(p.h*360),m=Y(p.s*100),j=Y(p.v*100);return this._a==1?"hsv("+k+", "+m+"%, "+j+"%)":"hsva("+k+", "+m+"%, "+j+"%, "+this._roundA+")"},toHsl:function(){var p=fe(this._r,this._g,this._b);return{h:p.h*360,s:p.s,l:p.l,a:this._a}},toHslString:function(){var p=fe(this._r,this._g,this._b),k=Y(p.h*360),m=Y(p.s*100),j=Y(p.l*100);return this._a==1?"hsl("+k+", "+m+"%, "+j+"%)":"hsla("+k+", "+m+"%, "+j+"%, "+this._roundA+")"},toHex:function(p){return I(this._r,this._g,this._b,p)},toHexString:function(p){return"#"+this.toHex(p)},toHex8:function(p){return B(this._r,this._g,this._b,this._a,p)},toHex8String:function(p){return"#"+this.toHex8(p)},toRgb:function(){return{r:Y(this._r),g:Y(this._g),b:Y(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Y(this._r)+", "+Y(this._g)+", "+Y(this._b)+")":"rgba("+Y(this._r)+", "+Y(this._g)+", "+Y(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Y(u(this._r,255)*100)+"%",g:Y(u(this._g,255)*100)+"%",b:Y(u(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Y(u(this._r,255)*100)+"%, "+Y(u(this._g,255)*100)+"%, "+Y(u(this._b,255)*100)+"%)":"rgba("+Y(u(this._r,255)*100)+"%, "+Y(u(this._g,255)*100)+"%, "+Y(u(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:R[I(this._r,this._g,this._b,!0)]||!1},toFilter:function(p){var k="#"+ie(this._r,this._g,this._b,this._a),m=k,j=this._gradientType?"GradientType = 1, ":"";if(p){var ne=H(p);m="#"+ie(ne._r,ne._g,ne._b,ne._a)}return"progid:DXImageTransform.Microsoft.gradient("+j+"startColorstr="+k+",endColorstr="+m+")"},toString:function(p){var k=!!p;p=p||this._format;var m=!1,j=this._a<1&&this._a>=0,ne=!k&&j&&(p==="hex"||p==="hex6"||p==="hex3"||p==="hex4"||p==="hex8"||p==="name");return ne?p==="name"&&this._a===0?this.toName():this.toRgbString():(p==="rgb"&&(m=this.toRgbString()),p==="prgb"&&(m=this.toPercentageRgbString()),(p==="hex"||p==="hex6")&&(m=this.toHexString()),p==="hex3"&&(m=this.toHexString(!0)),p==="hex4"&&(m=this.toHex8String(!0)),p==="hex8"&&(m=this.toHex8String()),p==="name"&&(m=this.toName()),p==="hsl"&&(m=this.toHslString()),p==="hsv"&&(m=this.toHsvString()),m||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(p,k){var m=p.apply(null,[this].concat([].slice.call(k)));return this._r=m._r,this._g=m._g,this._b=m._b,this.setAlpha(m._a),this},lighten:function(){return this._applyModification(be,arguments)},brighten:function(){return this._applyModification(Re,arguments)},darken:function(){return this._applyModification(pe,arguments)},desaturate:function(){return this._applyModification(Ce,arguments)},saturate:function(){return this._applyModification(We,arguments)},greyscale:function(){return this._applyModification(he,arguments)},spin:function(){return this._applyModification(de,arguments)},_applyCombination:function(p,k){return p.apply(null,[this].concat([].slice.call(k)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(Ae,arguments)},monochromatic:function(){return this._applyCombination(_,arguments)},splitcomplement:function(){return this._applyCombination(V,arguments)},triad:function(){return this._applyCombination(Q,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},H.fromRatio=function(p,k){if(typeof p=="object"){var m={};for(var j in p)p.hasOwnProperty(j)&&(j==="a"?m[j]=p[j]:m[j]=Ee(p[j]));p=m}return H(p,k)};function J(p){var k={r:0,g:0,b:0},m=1,j=null,ne=null,z=null,oe=!1,Se=!1;return typeof p=="string"&&(p=K(p)),typeof p=="object"&&(q(p.r)&&q(p.g)&&q(p.b)?(k=ae(p.r,p.g,p.b),oe=!0,Se=String(p.r).substr(-1)==="%"?"prgb":"rgb"):q(p.h)&&q(p.s)&&q(p.v)?(j=Ee(p.s),ne=Ee(p.v),k=P(p.h,j,ne),oe=!0,Se="hsv"):q(p.h)&&q(p.s)&&q(p.l)&&(j=Ee(p.s),z=Ee(p.l),k=$(p.h,j,z),oe=!0,Se="hsl"),p.hasOwnProperty("a")&&(m=p.a)),m=C(m),{ok:oe,format:p.format||Se,r:M(255,A(k.r,0)),g:M(255,A(k.g,0)),b:M(255,A(k.b,0)),a:m}}function ae(p,k,m){return{r:u(p,255)*255,g:u(k,255)*255,b:u(m,255)*255}}function fe(p,k,m){p=u(p,255),k=u(k,255),m=u(m,255);var j=A(p,k,m),ne=M(p,k,m),z,oe,Se=(j+ne)/2;if(j==ne)z=oe=0;else{var Te=j-ne;oe=Se>.5?Te/(2-j-ne):Te/(j+ne);switch(j){case p:z=(k-m)/Te+(k<m?6:0);break;case k:z=(m-p)/Te+2;break;case m:z=(p-k)/Te+4;break}z/=6}return{h:z,s:oe,l:Se}}function $(p,k,m){var j,ne,z;p=u(p,360),k=u(k,100),m=u(m,100);function oe(ge,ve,De){return De<0&&(De+=1),De>1&&(De-=1),De<1/6?ge+(ve-ge)*6*De:De<1/2?ve:De<2/3?ge+(ve-ge)*(2/3-De)*6:ge}if(k===0)j=ne=z=m;else{var Se=m<.5?m*(1+k):m+k-m*k,Te=2*m-Se;j=oe(Te,Se,p+1/3),ne=oe(Te,Se,p),z=oe(Te,Se,p-1/3)}return{r:j*255,g:ne*255,b:z*255}}function N(p,k,m){p=u(p,255),k=u(k,255),m=u(m,255);var j=A(p,k,m),ne=M(p,k,m),z,oe,Se=j,Te=j-ne;if(oe=j===0?0:Te/j,j==ne)z=0;else{switch(j){case p:z=(k-m)/Te+(k<m?6:0);break;case k:z=(m-p)/Te+2;break;case m:z=(p-k)/Te+4;break}z/=6}return{h:z,s:oe,v:Se}}function P(p,k,m){p=u(p,360)*6,k=u(k,100),m=u(m,100);var j=_e.floor(p),ne=p-j,z=m*(1-k),oe=m*(1-ne*k),Se=m*(1-(1-ne)*k),Te=j%6,ge=[m,oe,z,z,Se,m][Te],ve=[Se,m,m,oe,z,z][Te],De=[z,z,Se,m,m,oe][Te];return{r:ge*255,g:ve*255,b:De*255}}function I(p,k,m,j){var ne=[le(Y(p).toString(16)),le(Y(k).toString(16)),le(Y(m).toString(16))];return j&&ne[0].charAt(0)==ne[0].charAt(1)&&ne[1].charAt(0)==ne[1].charAt(1)&&ne[2].charAt(0)==ne[2].charAt(1)?ne[0].charAt(0)+ne[1].charAt(0)+ne[2].charAt(0):ne.join("")}function B(p,k,m,j,ne){var z=[le(Y(p).toString(16)),le(Y(k).toString(16)),le(Y(m).toString(16)),le(ce(j))];return ne&&z[0].charAt(0)==z[0].charAt(1)&&z[1].charAt(0)==z[1].charAt(1)&&z[2].charAt(0)==z[2].charAt(1)&&z[3].charAt(0)==z[3].charAt(1)?z[0].charAt(0)+z[1].charAt(0)+z[2].charAt(0)+z[3].charAt(0):z.join("")}function ie(p,k,m,j){var ne=[le(ce(j)),le(Y(p).toString(16)),le(Y(k).toString(16)),le(Y(m).toString(16))];return ne.join("")}H.equals=function(p,k){return!p||!k?!1:H(p).toRgbString()==H(k).toRgbString()},H.random=function(){return H.fromRatio({r:w(),g:w(),b:w()})};function Ce(p,k){k=k===0?0:k||10;var m=H(p).toHsl();return m.s-=k/100,m.s=s(m.s),H(m)}function We(p,k){k=k===0?0:k||10;var m=H(p).toHsl();return m.s+=k/100,m.s=s(m.s),H(m)}function he(p){return H(p).desaturate(100)}function be(p,k){k=k===0?0:k||10;var m=H(p).toHsl();return m.l+=k/100,m.l=s(m.l),H(m)}function Re(p,k){k=k===0?0:k||10;var m=H(p).toRgb();return m.r=A(0,M(255,m.r-Y(255*-(k/100)))),m.g=A(0,M(255,m.g-Y(255*-(k/100)))),m.b=A(0,M(255,m.b-Y(255*-(k/100)))),H(m)}function pe(p,k){k=k===0?0:k||10;var m=H(p).toHsl();return m.l-=k/100,m.l=s(m.l),H(m)}function de(p,k){var m=H(p).toHsl(),j=(m.h+k)%360;return m.h=j<0?360+j:j,H(m)}function Ae(p){var k=H(p).toHsl();return k.h=(k.h+180)%360,H(k)}function Q(p){var k=H(p).toHsl(),m=k.h;return[H(p),H({h:(m+120)%360,s:k.s,l:k.l}),H({h:(m+240)%360,s:k.s,l:k.l})]}function y(p){var k=H(p).toHsl(),m=k.h;return[H(p),H({h:(m+90)%360,s:k.s,l:k.l}),H({h:(m+180)%360,s:k.s,l:k.l}),H({h:(m+270)%360,s:k.s,l:k.l})]}function V(p){var k=H(p).toHsl(),m=k.h;return[H(p),H({h:(m+72)%360,s:k.s,l:k.l}),H({h:(m+216)%360,s:k.s,l:k.l})]}function D(p,k,m){k=k||6,m=m||30;var j=H(p).toHsl(),ne=360/m,z=[H(p)];for(j.h=(j.h-(ne*k>>1)+720)%360;--k;)j.h=(j.h+ne)%360,z.push(H(j));return z}function _(p,k){k=k||6;for(var m=H(p).toHsv(),j=m.h,ne=m.s,z=m.v,oe=[],Se=1/k;k--;)oe.push(H({h:j,s:ne,v:z})),z=(z+Se)%1;return oe}H.mix=function(p,k,m){m=m===0?0:m||50;var j=H(p).toRgb(),ne=H(k).toRgb(),z=m/100,oe={r:(ne.r-j.r)*z+j.r,g:(ne.g-j.g)*z+j.g,b:(ne.b-j.b)*z+j.b,a:(ne.a-j.a)*z+j.a};return H(oe)},H.readability=function(p,k){var m=H(p),j=H(k);return(_e.max(m.getLuminance(),j.getLuminance())+.05)/(_e.min(m.getLuminance(),j.getLuminance())+.05)},H.isReadable=function(p,k,m){var j=H.readability(p,k),ne,z;z=!1,ne=ee(m);switch(ne.level+ne.size){case"AAsmall":case"AAAlarge":z=j>=4.5;break;case"AAlarge":z=j>=3;break;case"AAAsmall":z=j>=7;break}return z},H.mostReadable=function(p,k,m){var j=null,ne=0,z,oe,Se,Te;m=m||{},oe=m.includeFallbackColors,Se=m.level,Te=m.size;for(var ge=0;ge<k.length;ge++)z=H.readability(p,k[ge]),z>ne&&(ne=z,j=H(k[ge]));return H.isReadable(p,j,{level:Se,size:Te})||!oe?j:(m.includeFallbackColors=!1,H.mostReadable(p,["#fff","#000"],m))};var G=H.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},R=H.hexNames=S(G);function S(p){var k={};for(var m in p)p.hasOwnProperty(m)&&(k[p[m]]=m);return k}function C(p){return p=parseFloat(p),(isNaN(p)||p<0||p>1)&&(p=1),p}function u(p,k){x(p)&&(p="100%");var m=U(p);return p=M(k,A(0,parseFloat(p))),m&&(p=parseInt(p*k,10)/100),_e.abs(p-k)<1e-6?1:p%k/parseFloat(k)}function s(p){return M(1,A(0,p))}function g(p){return parseInt(p,16)}function x(p){return typeof p=="string"&&p.indexOf(".")!=-1&&parseFloat(p)===1}function U(p){return typeof p=="string"&&p.indexOf("%")!=-1}function le(p){return p.length==1?"0"+p:""+p}function Ee(p){return p<=1&&(p=p*100+"%"),p}function ce(p){return _e.round(parseFloat(p)*255).toString(16)}function xe(p){return g(p)/255}var Z=function(){var p="[-\\+]?\\d+%?",k="[-\\+]?\\d*\\.\\d+%?",m="(?:"+k+")|(?:"+p+")",j="[\\s|\\(]+("+m+")[,|\\s]+("+m+")[,|\\s]+("+m+")\\s*\\)?",ne="[\\s|\\(]+("+m+")[,|\\s]+("+m+")[,|\\s]+("+m+")[,|\\s]+("+m+")\\s*\\)?";return{CSS_UNIT:new RegExp(m),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+ne),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+ne),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+ne),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function q(p){return!!Z.CSS_UNIT.exec(p)}function K(p){p=p.replace(ue,"").replace(ke,"").toLowerCase();var k=!1;if(G[p])p=G[p],k=!0;else if(p=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var m;return(m=Z.rgb.exec(p))?{r:m[1],g:m[2],b:m[3]}:(m=Z.rgba.exec(p))?{r:m[1],g:m[2],b:m[3],a:m[4]}:(m=Z.hsl.exec(p))?{h:m[1],s:m[2],l:m[3]}:(m=Z.hsla.exec(p))?{h:m[1],s:m[2],l:m[3],a:m[4]}:(m=Z.hsv.exec(p))?{h:m[1],s:m[2],v:m[3]}:(m=Z.hsva.exec(p))?{h:m[1],s:m[2],v:m[3],a:m[4]}:(m=Z.hex8.exec(p))?{r:g(m[1]),g:g(m[2]),b:g(m[3]),a:xe(m[4]),format:k?"name":"hex8"}:(m=Z.hex6.exec(p))?{r:g(m[1]),g:g(m[2]),b:g(m[3]),format:k?"name":"hex"}:(m=Z.hex4.exec(p))?{r:g(m[1]+""+m[1]),g:g(m[2]+""+m[2]),b:g(m[3]+""+m[3]),a:xe(m[4]+""+m[4]),format:k?"name":"hex8"}:(m=Z.hex3.exec(p))?{r:g(m[1]+""+m[1]),g:g(m[2]+""+m[2]),b:g(m[3]+""+m[3]),format:k?"name":"hex"}:!1}function ee(p){var k,m;return p=p||{level:"AA",size:"small"},k=(p.level||"AA").toUpperCase(),m=(p.size||"small").toLowerCase(),k!=="AA"&&k!=="AAA"&&(k="AA"),m!=="small"&&m!=="large"&&(m="small"),{level:k,size:m}}nt.exports?nt.exports=H:!(W=function(){return H}.call(Be,h,Be,nt),W!==void 0&&(nt.exports=W))})(Math)},bT9E:function(nt,Be,h){"use strict";h.d(Be,"a",function(){return _e});var W=h("VTBJ");function _e(ue,ke){var we=Object(W.a)({},ue);return Array.isArray(ke)&&ke.forEach(function(Y){delete we[Y]}),we}},c5Ni:function(nt,Be,h){},dejd:function(nt,Be,h){},dmUQ:function(nt,Be,h){"use strict";var W=h("Ff2n"),_e=h("rePB"),ue=h("1OyB"),ke=h("vuIU"),we=h("Ji7U"),Y=h("md7G"),M=h("foSv"),A=h("q1tI"),w=h.n(A),H=h("TSYQ"),J=h.n(H),ae=h("4IlW");function fe(Q,y){var V=Object.keys(Q);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(Q);y&&(D=D.filter(function(_){return Object.getOwnPropertyDescriptor(Q,_).enumerable})),V.push.apply(V,D)}return V}function $(Q){for(var y=1;y<arguments.length;y++){var V=arguments[y]!=null?arguments[y]:{};y%2?fe(Object(V),!0).forEach(function(D){Object(_e.a)(Q,D,V[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Q,Object.getOwnPropertyDescriptors(V)):fe(Object(V)).forEach(function(D){Object.defineProperty(Q,D,Object.getOwnPropertyDescriptor(V,D))})}return Q}function N(Q){var y=P();return function(){var D=Object(M.a)(Q),_;if(y){var G=Object(M.a)(this).constructor;_=Reflect.construct(D,arguments,G)}else _=D.apply(this,arguments);return Object(Y.a)(this,_)}}function P(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(Q){return!1}}function I(){}function B(Q){Q.preventDefault()}var ie=function(y){return y.replace(/[^\w.-]+/g,"")},Ce=200,We=600,he=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,be=function(y){return y!=null},Re=function(y,V){return V===y||typeof V=="number"&&typeof y=="number"&&isNaN(V)&&isNaN(y)},pe=function(Q){Object(we.a)(V,Q);var y=N(V);function V(D){var _;Object(ue.a)(this,V),_=y.call(this,D),_.onKeyDown=function(S){var C=_.props,u=C.onKeyDown,s=C.onPressEnter;if(S.keyCode===ae.a.UP){var g=_.getRatio(S);_.up(S,g,null),_.stop()}else if(S.keyCode===ae.a.DOWN){var x=_.getRatio(S);_.down(S,x,null),_.stop()}else S.keyCode===ae.a.ENTER&&s&&s(S);if(_.recordCursorPosition(),_.lastKeyCode=S.keyCode,u){for(var U=arguments.length,le=new Array(U>1?U-1:0),Ee=1;Ee<U;Ee++)le[Ee-1]=arguments[Ee];u.apply(void 0,[S].concat(le))}},_.onKeyUp=function(S){var C=_.props.onKeyUp;if(_.stop(),_.recordCursorPosition(),C){for(var u=arguments.length,s=new Array(u>1?u-1:0),g=1;g<u;g++)s[g-1]=arguments[g];C.apply(void 0,[S].concat(s))}},_.onChange=function(S){var C=_.props.onChange;_.state.focused&&(_.inputting=!0),_.rawInput=_.props.parser(_.getValueFromEvent(S)),_.setState({inputValue:_.rawInput}),C(_.toNumber(_.rawInput))},_.onMouseUp=function(){var S=_.props.onMouseUp;_.recordCursorPosition(),S&&S.apply(void 0,arguments)},_.onFocus=function(){var S;_.setState({focused:!0}),(S=_.props).onFocus.apply(S,arguments)},_.onBlur=function(){var S=_.props.onBlur;_.inputting=!1,_.setState({focused:!1});var C=_.getCurrentValidValue(_.state.inputValue),u=_.setValue(C,I);if(S){var s=_.input.value,g=_.getInputDisplayValue({focus:!1,value:u});_.input.value=g&&Number(g),S.apply(void 0,arguments),_.input.value=s}},_.getRatio=function(S){var C=1;return S.metaKey||S.ctrlKey?C=.1:S.shiftKey&&(C=10),C},_.getFullNum=function(S){return isNaN(S)?S:/e/i.test(String(S))?Number(S).toFixed(18).replace(/\.?0+$/,""):S},_.getPrecision=function(S){if(be(_.props.precision))return _.props.precision;var C=String(S);if(C.indexOf("e-")>=0)return parseInt(C.slice(C.indexOf("e-")+2),10);var u=0;return C.indexOf(".")>=0&&(u=C.length-C.indexOf(".")-1),u},_.getInputDisplayValue=function(S){var C=S||_.state,u=C.focused,s=C.inputValue,g=C.value,x;u?x=s:x=_.toPrecisionAsStep(g),x==null&&(x="");var U=_.formatWrapper(x);return be(_.props.decimalSeparator)&&(U=U.toString().replace(".",_.props.decimalSeparator)),U},_.recordCursorPosition=function(){try{_.cursorStart=_.input.selectionStart,_.cursorEnd=_.input.selectionEnd,_.currentValue=_.input.value,_.cursorBefore=_.input.value.substring(0,_.cursorStart),_.cursorAfter=_.input.value.substring(_.cursorEnd)}catch(S){}},_.restoreByAfter=function(S){if(S===void 0)return!1;var C=_.input.value,u=C.lastIndexOf(S);if(u===-1)return!1;var s=_.cursorBefore.length;return _.lastKeyCode===ae.a.DELETE&&_.cursorBefore.charAt(s-1)===S[0]?(_.fixCaret(s,s),!0):u+S.length===C.length?(_.fixCaret(u,u),!0):!1},_.partRestoreByAfter=function(S){return S===void 0?!1:Array.prototype.some.call(S,function(C,u){var s=S.substring(u);return _.restoreByAfter(s)})},_.isNotCompleteNumber=function(S){return isNaN(S)||S===""||S===null||S&&S.toString().indexOf(".")===S.toString().length-1},_.stop=function(){_.autoStepTimer&&clearTimeout(_.autoStepTimer)},_.down=function(S,C,u){_.pressingUpOrDown=!0,_.step("down",S,C,u)},_.up=function(S,C,u){_.pressingUpOrDown=!0,_.step("up",S,C,u)},_.saveInput=function(S){_.input=S};var G=D.value;G===void 0&&(G=D.defaultValue),_.state={focused:D.autoFocus};var R=_.getValidValue(_.toNumber(G));return _.state=$($({},_.state),{},{inputValue:_.toPrecisionAsStep(R),value:R}),_}return Object(ke.a)(V,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(_){var G=this.props,R=G.value,S=G.onChange,C=G.max,u=G.min,s=this.state.focused;if(_){if(!Re(_.value,R)||!Re(_.max,C)||!Re(_.min,u)){var g=s?R:this.getValidValue(R),x;this.pressingUpOrDown?x=g:this.inputting?x=this.rawInput:x=this.toPrecisionAsStep(g),this.setState({value:g,inputValue:x})}var U="value"in this.props?R:this.state.value;"max"in this.props&&_.max!==C&&typeof U=="number"&&U>C&&S&&S(C),"min"in this.props&&_.min!==u&&typeof U=="number"&&U<u&&S&&S(u)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var le=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===ae.a.BACKSPACE?le=this.cursorStart-1:this.lastKeyCode===ae.a.DELETE&&(le=this.cursorStart):le=this.input.value.length,this.fixCaret(le,le)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case ae.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case ae.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ee){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(_){var G=_;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(_){var G=_.target.value.trim().replace(/。/g,".");return be(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(_){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,S=parseFloat(_);return isNaN(S)?_:(S<G&&(S=G),S>R&&(S=R),S)}},{key:"setValue",value:function(_,G){var R=this.props.precision,S=this.isNotCompleteNumber(parseFloat(_))?null:parseFloat(_),C=this.state.value,u=C===void 0?null:C,s=this.state.inputValue,g=s===void 0?null:s,x=typeof S=="number"?S.toFixed(R):"".concat(S),U=S!==u||x!=="".concat(g);return"value"in this.props?(g=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:g},G)):this.setState({value:S,inputValue:this.toPrecisionAsStep(_)},G),U&&this.props.onChange(S),S}},{key:"getMaxPrecision",value:function(_){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,R=this.props,S=R.precision,C=R.step;if(be(S))return S;var u=this.getPrecision(G),s=this.getPrecision(C),g=this.getPrecision(_);return _?Math.max(g,u+s):u+s}},{key:"getPrecisionFactor",value:function(_){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,R=this.getMaxPrecision(_,G);return Math.pow(10,R)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(_){return this.props.formatter?this.props.formatter(_):_}},{key:"toPrecisionAsStep",value:function(_){if(this.isNotCompleteNumber(_)||_==="")return _;var G=Math.abs(this.getMaxPrecision(_));return isNaN(G)?_.toString():Number(_).toFixed(G)}},{key:"toNumber",value:function(_){var G=this.props.precision,R=this.state.focused,S=_&&_.length>16&&R;return this.isNotCompleteNumber(_)||S?_:be(G)?Math.round(_*Math.pow(10,G))/Math.pow(10,G):Number(_)}},{key:"upStep",value:function(_,G){var R=this.props.step,S=this.getPrecisionFactor(_,G),C=Math.abs(this.getMaxPrecision(_,G)),u=((S*_+S*R*G)/S).toFixed(C);return this.toNumber(u)}},{key:"downStep",value:function(_,G){var R=this.props.step,S=this.getPrecisionFactor(_,G),C=Math.abs(this.getMaxPrecision(_,G)),u=((S*_-S*R*G)/S).toFixed(C);return this.toNumber(u)}},{key:"step",value:function(_,G){var R=this,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var u=this.props;if(u.disabled)return;var s=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(s))return;var g=this["".concat(_,"Step")](s,S),x=g>u.max||g<u.min;if(g>u.max?g=u.max:g<u.min&&(g=u.min),this.setValue(g,null),this.setState({focused:!0},function(){R.pressingUpOrDown=!1}),x)return;this.autoStepTimer=setTimeout(function(){R[_](G,S,!0)},C?Ce:We)}},{key:"fixCaret",value:function(_,G){if(_===void 0||G===void 0||!this.input||!this.input.value)return;try{var R=this.input.selectionStart,S=this.input.selectionEnd;(_!==R||G!==S)&&this.input.setSelectionRange(_,G)}catch(C){}}},{key:"render",value:function(){var _,G=this.props,R=G.prefixCls,S=G.disabled,C=G.readOnly,u=G.useTouch,s=G.autoComplete,g=G.upHandler,x=G.downHandler,U=G.className,le=G.max,Ee=G.min,ce=G.style,xe=G.title,Z=G.onMouseEnter,q=G.onMouseLeave,K=G.onMouseOver,ee=G.onMouseOut,p=G.required,k=G.onClick,m=G.tabIndex,j=G.type,ne=G.placeholder,z=G.id,oe=G.inputMode,Se=G.pattern,Te=G.step,ge=G.maxLength,ve=G.autoFocus,De=G.name,Ie=G.onPaste,Pe=G.onInput,Ue=Object(W.a)(G,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Ke=this.state,tt=Ke.value,Xe=Ke.focused,Ye=J()(R,(_={},Object(_e.a)(_,U,!!U),Object(_e.a)(_,"".concat(R,"-disabled"),S),Object(_e.a)(_,"".concat(R,"-focused"),Xe),_)),Oe={};Object.keys(Ue).forEach(function(E){(E.substr(0,5)==="data-"||E.substr(0,5)==="aria-"||E==="role")&&(Oe[E]=Ue[E])});var at=!C&&!S,Ze=this.getInputDisplayValue(null),Me=(tt||tt===0)&&(isNaN(tt)||Number(tt)>=le),He=(tt||tt===0)&&(isNaN(tt)||Number(tt)<=Ee),X=Me||S||C,F=He||S||C,T=J()("".concat(R,"-handler"),"".concat(R,"-handler-up"),Object(_e.a)({},"".concat(R,"-handler-up-disabled"),X)),f=J()("".concat(R,"-handler"),"".concat(R,"-handler-down"),Object(_e.a)({},"".concat(R,"-handler-down-disabled"),F)),v=u?{onTouchStart:X?I:this.up,onTouchEnd:this.stop}:{onMouseDown:X?I:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},b=u?{onTouchStart:F?I:this.down,onTouchEnd:this.stop}:{onMouseDown:F?I:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return w.a.createElement("div",{className:Ye,style:ce,title:xe,onMouseEnter:Z,onMouseLeave:q,onMouseOver:K,onMouseOut:ee,onFocus:function(){return null},onBlur:function(){return null}},w.a.createElement("div",{className:"".concat(R,"-handler-wrap")},w.a.createElement("span",Object.assign({unselectable:"on"},v,{role:"button","aria-label":"Increase Value","aria-disabled":X,className:T}),g||w.a.createElement("span",{unselectable:"on",className:"".concat(R,"-handler-up-inner"),onClick:B})),w.a.createElement("span",Object.assign({unselectable:"on"},b,{role:"button","aria-label":"Decrease Value","aria-disabled":F,className:f}),x||w.a.createElement("span",{unselectable:"on",className:"".concat(R,"-handler-down-inner"),onClick:B}))),w.a.createElement("div",{className:"".concat(R,"-input-wrap")},w.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ee,"aria-valuemax":le,"aria-valuenow":tt,required:p,type:j,placeholder:ne,onPaste:Ie,onClick:k,onMouseUp:this.onMouseUp,className:"".concat(R,"-input"),tabIndex:m,autoComplete:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:at?this.onKeyDown:I,onKeyUp:at?this.onKeyUp:I,autoFocus:ve,maxLength:ge,readOnly:C,disabled:S,max:le,min:Ee,step:Te,name:De,title:xe,id:z,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ze),pattern:Se,inputMode:oe,onInput:Pe},Oe))))}}]),V}(w.a.Component);pe.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:he,min:-he,step:1,style:{},onChange:I,onKeyDown:I,onPressEnter:I,onFocus:I,onBlur:I,parser:ie,required:!1,autoComplete:"off"};var de=pe,Ae=Be.a=de},gHQ5:function(nt,Be,h){"use strict";h.r(Be);var W=h("+L6B"),_e=h("2/Rp"),ue=h("5NDa"),ke=h("5rEg"),we=h("k1fw"),Y=h("9og8"),M=h("y8nQ"),A=h("Vl3Y"),w=h("tJVT"),H=h("CiB2"),J=h("WmNS"),ae=h.n(J),fe=h("q1tI"),$=h.n(fe),N=h("3vs6"),P=h("l3Yi"),I=h.n(P),B=h("Ot1p"),ie=h("500L"),Ce=h("ErOA"),We=h("Ty5D"),he=h("9kvl"),be=function(pe){var de;Object(H.a)(pe);var Ae=Object(fe.useState)({}),Q=Object(w.a)(Ae,2),y=Q[0],V=Q[1],D=A.a.useForm(),_=Object(w.a)(D,1),G=_[0],R=Object(fe.useState)(!0),S=Object(w.a)(R,2),C=S[0],u=S[1],s=Object(fe.useState)(!1),g=Object(w.a)(s,2),x=g[0],U=g[1],le=Object(fe.useState)(!1),Ee=Object(w.a)(le,2),ce=Ee[0],xe=Ee[1],Z=Object(We.i)(),q=Z==null?void 0:Z.virtual_spacesId;Object(fe.useEffect)(function(){Z!=null&&Z.id?K():xe(!0)},[]);var K=function(){var p=Object(Y.a)(ae.a.mark(function k(){var m,j;return ae.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(Ce.a)("/api/virtual_classrooms/".concat(q,"/syllabuses/").concat(Z==null?void 0:Z.id,"/edit.json"),{method:"get"});case 2:m=z.sent,m&&(j={title:m.title,description:m.description,attachment_ids:Object(ie.a)(m.attachments)},console.log(j,"formData"),G.setFieldsValue(Object(we.a)({},j)),V(Object(we.a)({},j)),xe(!0));case 4:case"end":return z.stop()}},k)}));return function(){return p.apply(this,arguments)}}(),ee=function(){var p=Object(Y.a)(ae.a.mark(function k(m){var j,ne,z,oe,Se;return ae.a.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(ne=Object(we.a)({},y),ne.attachment_ids&&(ne.attachment_ids=ne==null||((z=ne.attachment_ids)===null||z===void 0)?void 0:z.map(function(ve){return ve.response.id})),U(!0),!(Z!=null&&Z.id)){ge.next=9;break}return ge.next=6,Object(Ce.a)("/api/virtual_classrooms/".concat(q,"/syllabuses/").concat(Z==null?void 0:Z.id,".json"),{method:"put",body:Object(we.a)({},ne)});case 6:oe=ge.sent,ge.next=12;break;case 9:return ge.next=11,Object(Ce.a)("/api/virtual_classrooms/".concat(q,"/syllabuses.json"),{method:"post",body:Object(we.a)({},ne)});case 11:oe=ge.sent;case 12:(j=oe)!==null&&j!==void 0&&j.virtual_classroom_id&&he.d.push("/vspaces/".concat(q,"/syllabuses/").concat((Se=oe)===null||Se===void 0?void 0:Se.id,"/detail")),U(!1);case 14:case"end":return ge.stop()}},k)}));return function(m){return p.apply(this,arguments)}}();return $.a.createElement("div",{className:I.a.wrap},$.a.createElement(N.a,null),$.a.createElement("div",{className:I.a.form},$.a.createElement("div",{className:I.a.title},$.a.createElement("span",{onClick:function(){return he.d.push("/vspaces/".concat(q,"/syllabuses"))}},$.a.createElement("i",{className:"iconfont icon-zuoshangjiaofanhui"}),"\u8FD4\u56DE"),$.a.createElement("span",null,"\u65B0\u5EFA\u6559\u5B66\u5927\u7EB2")),$.a.createElement(A.a,{colon:!1,form:G,scrollToFirstError:!0,onValuesChange:function(){V(Object(we.a)({},G.getFieldsValue()))},onFinish:ee},$.a.createElement(A.a.Item,{name:"title",label:"\u5927\u7EB2\u6807\u9898",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5927\u7EB2\u6807\u9898"}]},$.a.createElement(ke.a,{maxLength:60,suffix:"".concat(((de=y.title)===null||de===void 0?void 0:de.length)||0,"/60"),placeholder:"\u8BF7\u8F93\u5165\u5927\u7EB2\u6807\u9898"})),$.a.createElement("div",{style:{margin:"20px 0 12px 10px"}},"\u5927\u7EB2\u5185\u5BB9"),$.a.createElement(A.a.Item,{className:"ml10",name:"description",rules:[{max:5e4,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u523650000\u4E2A\u5B57\u7B26"}]},$.a.createElement(B.a,{watch:!0,defaultValue:y.description})),$.a.createElement(A.a.Item,{className:"ml10",name:"attachment_ids",label:"\u9644\u4EF6"},ce&&$.a.createElement(ie.b,{className:I.a.file,title:$.a.createElement("span",null,$.a.createElement("i",{className:"iconfont icon-shangchuan1 font14 mr5"}),"\u4E0A\u4F20\u9644\u4EF6")})),$.a.createElement("div",{style:{textAlign:"right"}},$.a.createElement(A.a.Item,null,$.a.createElement(_e.a,{onClick:function(){return he.d.push("/vspaces/".concat(q,"/syllabuses"))},className:"mr10"},"\u53D6\u6D88"),$.a.createElement(_e.a,{type:"primary",htmlType:"submit",loading:x},"\u786E\u8BA4"))))))};Be.default=be},h78n:function(nt,Be,h){"use strict";h.d(Be,"a",function(){return _});var W=h("q1tI"),_e=h.n(W),ue=h("TSYQ"),ke=h.n(ue),we={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},Y=function(S){var C=S.map(function(){return Object(W.useRef)()}),u=Object(W.useRef)();return Object(W.useEffect)(function(){var s=Date.now(),g=!1;Object.keys(C).forEach(function(x){var U=C[x].current;if(!U)return;g=!0;var le=U.style;le.transitionDuration=".3s, .3s, .3s, .06s",u.current&&s-u.current<100&&(le.transitionDuration="0s, 0s")}),g&&(u.current=Date.now())}),[C]};function M(){return M=Object.assign||function(R){for(var S=1;S<arguments.length;S++){var C=arguments[S];for(var u in C)Object.prototype.hasOwnProperty.call(C,u)&&(R[u]=C[u])}return R},M.apply(this,arguments)}function A(R,S){return fe(R)||ae(R,S)||H(R,S)||w()}function w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H(R,S){if(!R)return;if(typeof R=="string")return J(R,S);var C=Object.prototype.toString.call(R).slice(8,-1);if(C==="Object"&&R.constructor&&(C=R.constructor.name),C==="Map"||C==="Set")return Array.from(R);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return J(R,S)}function J(R,S){(S==null||S>R.length)&&(S=R.length);for(var C=0,u=new Array(S);C<S;C++)u[C]=R[C];return u}function ae(R,S){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(R)))return;var C=[],u=!0,s=!1,g=void 0;try{for(var x=R[Symbol.iterator](),U;!(u=(U=x.next()).done)&&!(C.push(U.value),S&&C.length===S);u=!0);}catch(le){s=!0,g=le}finally{try{!u&&x.return!=null&&x.return()}finally{if(s)throw g}}return C}function fe(R){if(Array.isArray(R))return R}function $(R,S){if(R==null)return{};var C=N(R,S),u,s;if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(R);for(s=0;s<g.length;s++){if(u=g[s],S.indexOf(u)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(R,u))continue;C[u]=R[u]}}return C}function N(R,S){if(R==null)return{};var C={},u=Object.keys(R),s,g;for(g=0;g<u.length;g++){if(s=u[g],S.indexOf(s)>=0)continue;C[s]=R[s]}return C}var P=function(S){var C=S.className,u=S.percent,s=S.prefixCls,g=S.strokeColor,x=S.strokeLinecap,U=S.strokeWidth,le=S.style,Ee=S.trailColor,ce=S.trailWidth,xe=S.transition,Z=$(S,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Z.gapPosition;var q=Array.isArray(u)?u:[u],K=Array.isArray(g)?g:[g],ee=Y(q),p=A(ee,1),k=p[0],m=U/2,j=100-U/2,ne="M ".concat(x==="round"?m:0,",").concat(m,`
L `).concat(x==="round"?j:100,",").concat(m),z="0 0 100 ".concat(U),oe=0;return _e.a.createElement("svg",M({className:ke()("".concat(s,"-line"),C),viewBox:z,preserveAspectRatio:"none",style:le},Z),_e.a.createElement("path",{className:"".concat(s,"-line-trail"),d:ne,strokeLinecap:x,stroke:Ee,strokeWidth:ce||U,fillOpacity:"0"}),q.map(function(Se,Te){var ge={strokeDasharray:"".concat(Se,"px, 100px"),strokeDashoffset:"-".concat(oe,"px"),transition:xe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ve=K[Te]||K[K.length-1];return oe+=Se,_e.a.createElement("path",{key:Te,className:"".concat(s,"-line-path"),d:ne,strokeLinecap:x,stroke:ve,strokeWidth:U,fillOpacity:"0",ref:k[Te],style:ge})}))};P.defaultProps=we;var I=P;function B(){return B=Object.assign||function(R){for(var S=1;S<arguments.length;S++){var C=arguments[S];for(var u in C)Object.prototype.hasOwnProperty.call(C,u)&&(R[u]=C[u])}return R},B.apply(this,arguments)}function ie(R,S){return Re(R)||be(R,S)||We(R,S)||Ce()}function Ce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function We(R,S){if(!R)return;if(typeof R=="string")return he(R,S);var C=Object.prototype.toString.call(R).slice(8,-1);if(C==="Object"&&R.constructor&&(C=R.constructor.name),C==="Map"||C==="Set")return Array.from(R);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return he(R,S)}function he(R,S){(S==null||S>R.length)&&(S=R.length);for(var C=0,u=new Array(S);C<S;C++)u[C]=R[C];return u}function be(R,S){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(R)))return;var C=[],u=!0,s=!1,g=void 0;try{for(var x=R[Symbol.iterator](),U;!(u=(U=x.next()).done)&&!(C.push(U.value),S&&C.length===S);u=!0);}catch(le){s=!0,g=le}finally{try{!u&&x.return!=null&&x.return()}finally{if(s)throw g}}return C}function Re(R){if(Array.isArray(R))return R}function pe(R,S){if(R==null)return{};var C=de(R,S),u,s;if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(R);for(s=0;s<g.length;s++){if(u=g[s],S.indexOf(u)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(R,u))continue;C[u]=R[u]}}return C}function de(R,S){if(R==null)return{};var C={},u=Object.keys(R),s,g;for(g=0;g<u.length;g++){if(s=u[g],S.indexOf(s)>=0)continue;C[s]=R[s]}return C}var Ae=0;function Q(R){return+R.replace("%","")}function y(R){return Array.isArray(R)?R:[R]}function V(R,S,C,u){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,g=arguments.length>5?arguments[5]:void 0,x=50-u/2,U=0,le=-x,Ee=0,ce=-2*x;switch(g){case"left":U=-x,le=0,Ee=2*x,ce=0;break;case"right":U=x,le=0,Ee=-2*x,ce=0;break;case"bottom":le=x,ce=2*x;break;default:}var xe="M 50,50 m ".concat(U,",").concat(le,`
a `).concat(x,",").concat(x," 0 1 1 ").concat(Ee,",").concat(-ce,`
a `).concat(x,",").concat(x," 0 1 1 ").concat(-Ee,",").concat(ce),Z=Math.PI*2*x,q={stroke:C,strokeDasharray:"".concat(S/100*(Z-s),"px ").concat(Z,"px"),strokeDashoffset:"-".concat(s/2+R/100*(Z-s),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:xe,pathStyle:q}}var D=function(S){var C=S.prefixCls,u=S.strokeWidth,s=S.trailWidth,g=S.gapDegree,x=S.gapPosition,U=S.trailColor,le=S.strokeLinecap,Ee=S.style,ce=S.className,xe=S.strokeColor,Z=S.percent,q=pe(S,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),K=Object(W.useMemo)(function(){return Ae+=1,Ae},[]),ee=V(0,100,U,u,g,x),p=ee.pathString,k=ee.pathStyle,m=y(Z),j=y(xe),ne=j.find(function(ge){return Object.prototype.toString.call(ge)==="[object Object]"}),z=Y(m),oe=ie(z,1),Se=oe[0],Te=function(){var ve=0;return m.map(function(De,Ie){var Pe=j[Ie]||j[j.length-1],Ue=Object.prototype.toString.call(Pe)==="[object Object]"?"url(#".concat(C,"-gradient-").concat(K,")"):"",Ke=V(ve,De,Pe,u,g,x);return ve+=De,_e.a.createElement("path",{key:Ie,className:"".concat(C,"-circle-path"),d:Ke.pathString,stroke:Ue,strokeLinecap:le,strokeWidth:u,opacity:De===0?0:1,fillOpacity:"0",style:Ke.pathStyle,ref:Se[Ie]})})};return _e.a.createElement("svg",B({className:ke()("".concat(C,"-circle"),ce),viewBox:"0 0 100 100",style:Ee},q),ne&&_e.a.createElement("defs",null,_e.a.createElement("linearGradient",{id:"".concat(C,"-gradient-").concat(K),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ne).sort(function(ge,ve){return Q(ge)-Q(ve)}).map(function(ge,ve){return _e.a.createElement("stop",{key:ve,offset:ge,stopColor:ne[ge]})}))),_e.a.createElement("path",{className:"".concat(C,"-circle-trail"),d:p,stroke:U,strokeLinecap:le,strokeWidth:s||u,fillOpacity:"0",style:k}),Te().reverse())};D.defaultProps=we;var _=D,G={Line:I,Circle:_}},kSUc:function(nt,Be,h){},l3Yi:function(nt,Be,h){nt.exports={flex_box_center:"flex_box_center___354pw",flex_space_between:"flex_space_between___10PE2",flex_box_vertical_center:"flex_box_vertical_center___YT9_A",flex_box_center_end:"flex_box_center_end___1qNoU",flex_box_column:"flex_box_column___2E4_8",wrap:"wrap___1umYZ",form:"form___2x_Sk",title:"title___idVlc",file:"file___1g_02"}},lZu9:function(nt,Be,h){(function(W){W(h("VrN/"),h("1eCo"),h("8EBN"))})(function(W){"use strict";W.defineMode("markdown",function(_e,ue){var ke=W.getMode(_e,"text/html"),we=ke.name=="null";function Y(u){if(W.findModeByName){var s=W.findModeByName(u);s&&(u=s.mime||s.mimes[0])}var g=W.getMode(_e,u);return g.name=="null"?null:g}ue.highlightFormatting===void 0&&(ue.highlightFormatting=!1),ue.maxBlockquoteDepth===void 0&&(ue.maxBlockquoteDepth=0),ue.taskLists===void 0&&(ue.taskLists=!1),ue.strikethrough===void 0&&(ue.strikethrough=!1),ue.emoji===void 0&&(ue.emoji=!1),ue.fencedCodeBlockHighlighting===void 0&&(ue.fencedCodeBlockHighlighting=!0),ue.fencedCodeBlockDefaultMode===void 0&&(ue.fencedCodeBlockDefaultMode="text/plain"),ue.xml===void 0&&(ue.xml=!0),ue.tokenTypeOverrides===void 0&&(ue.tokenTypeOverrides={});var M={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var A in M)M.hasOwnProperty(A)&&ue.tokenTypeOverrides[A]&&(M[A]=ue.tokenTypeOverrides[A]);var w=/^([*\-_])(?:\s*\1){2,}\s*$/,H=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,J=/^\[(x| )\](?=\s)/i,ae=ue.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,fe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,$=/^[^#!\[\]*_\\<>` "'(~:]+/,N=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,P=/^\s*\[[^\]]+?\]:.*$/,I=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,B=" ";function ie(u,s,g){return s.f=s.inline=g,g(u,s)}function Ce(u,s,g){return s.f=s.block=g,g(u,s)}function We(u){return!u||!/\S/.test(u.string)}function he(u){if(u.linkTitle=!1,u.linkHref=!1,u.linkText=!1,u.em=!1,u.strong=!1,u.strikethrough=!1,u.quote=0,u.indentedCode=!1,u.f==Re){var s=we;if(!s){var g=W.innerMode(ke,u.htmlState);s=g.mode.name=="xml"&&g.state.tagStart===null&&!g.state.context&&g.state.tokenize.isInText}s&&(u.f=Q,u.block=be,u.htmlState=null)}return u.trailingSpace=0,u.trailingSpaceNewLine=!1,u.prevLine=u.thisLine,u.thisLine={stream:null},null}function be(u,s){var g=u.column()===s.indentation,x=We(s.prevLine.stream),U=s.indentedCode,le=s.prevLine.hr,Ee=s.list!==!1,ce=(s.listStack[s.listStack.length-1]||0)+3;s.indentedCode=!1;var xe=s.indentation;if(s.indentationDiff===null&&(s.indentationDiff=s.indentation,Ee)){for(s.list=null;xe<s.listStack[s.listStack.length-1];)s.listStack.pop(),s.listStack.length?s.indentation=s.listStack[s.listStack.length-1]:s.list=!1;s.list!==!1&&(s.indentationDiff=xe-s.listStack[s.listStack.length-1])}var Z=!x&&!le&&!s.prevLine.header&&(!Ee||!U)&&!s.prevLine.fencedCodeEnd,q=(s.list===!1||le||x)&&s.indentation<=ce&&u.match(w),K=null;if(s.indentationDiff>=4&&(U||s.prevLine.fencedCodeEnd||s.prevLine.header||x))return u.skipToEnd(),s.indentedCode=!0,M.code;if(u.eatSpace())return null;if(g&&s.indentation<=ce&&(K=u.match(ae))&&K[1].length<=6)return s.quote=0,s.header=K[1].length,s.thisLine.header=!0,ue.highlightFormatting&&(s.formatting="header"),s.f=s.inline,de(s);if(s.indentation<=ce&&u.eat(">"))return s.quote=g?1:s.quote+1,ue.highlightFormatting&&(s.formatting="quote"),u.eatSpace(),de(s);if(!q&&!s.setext&&g&&s.indentation<=ce&&(K=u.match(H))){var ee=K[1]?"ol":"ul";return s.indentation=xe+u.current().length,s.list=!0,s.quote=0,s.listStack.push(s.indentation),s.em=!1,s.strong=!1,s.code=!1,s.strikethrough=!1,ue.taskLists&&u.match(J,!1)&&(s.taskList=!0),s.f=s.inline,ue.highlightFormatting&&(s.formatting=["list","list-"+ee]),de(s)}else{if(g&&s.indentation<=ce&&(K=u.match(N,!0)))return s.quote=0,s.fencedEndRE=new RegExp(K[1]+"+ *$"),s.localMode=ue.fencedCodeBlockHighlighting&&Y(K[2]||ue.fencedCodeBlockDefaultMode),s.localMode&&(s.localState=W.startState(s.localMode)),s.f=s.block=pe,ue.highlightFormatting&&(s.formatting="code-block"),s.code=-1,de(s);if(s.setext||(!Z||!Ee)&&!s.quote&&s.list===!1&&!s.code&&!q&&!P.test(u.string)&&(K=u.lookAhead(1))&&(K=K.match(fe)))return s.setext?(s.header=s.setext,s.setext=0,u.skipToEnd(),ue.highlightFormatting&&(s.formatting="header")):(s.header=K[0].charAt(0)=="="?1:2,s.setext=s.header),s.thisLine.header=!0,s.f=s.inline,de(s);if(q)return u.skipToEnd(),s.hr=!0,s.thisLine.hr=!0,M.hr;if(u.peek()==="[")return ie(u,s,G)}return ie(u,s,s.inline)}function Re(u,s){var g=ke.token(u,s.htmlState);if(!we){var x=W.innerMode(ke,s.htmlState);(x.mode.name=="xml"&&x.state.tagStart===null&&!x.state.context&&x.state.tokenize.isInText||s.md_inside&&u.current().indexOf(">")>-1)&&(s.f=Q,s.block=be,s.htmlState=null)}return g}function pe(u,s){var g=s.listStack[s.listStack.length-1]||0,x=s.indentation<g,U=g+3;if(s.fencedEndRE&&s.indentation<=U&&(x||u.match(s.fencedEndRE))){ue.highlightFormatting&&(s.formatting="code-block");var le;return x||(le=de(s)),s.localMode=s.localState=null,s.block=be,s.f=Q,s.fencedEndRE=null,s.code=0,s.thisLine.fencedCodeEnd=!0,x?Ce(u,s,s.block):le}else return s.localMode?s.localMode.token(u,s.localState):(u.skipToEnd(),M.code)}function de(u){var s=[];if(u.formatting){s.push(M.formatting),typeof u.formatting=="string"&&(u.formatting=[u.formatting]);for(var g=0;g<u.formatting.length;g++)s.push(M.formatting+"-"+u.formatting[g]),u.formatting[g]==="header"&&s.push(M.formatting+"-"+u.formatting[g]+"-"+u.header),u.formatting[g]==="quote"&&(!ue.maxBlockquoteDepth||ue.maxBlockquoteDepth>=u.quote?s.push(M.formatting+"-"+u.formatting[g]+"-"+u.quote):s.push("error"))}if(u.taskOpen)return s.push("meta"),s.length?s.join(" "):null;if(u.taskClosed)return s.push("property"),s.length?s.join(" "):null;if(u.linkHref?s.push(M.linkHref,"url"):(u.strong&&s.push(M.strong),u.em&&s.push(M.em),u.strikethrough&&s.push(M.strikethrough),u.emoji&&s.push(M.emoji),u.linkText&&s.push(M.linkText),u.code&&s.push(M.code),u.image&&s.push(M.image),u.imageAltText&&s.push(M.imageAltText,"link"),u.imageMarker&&s.push(M.imageMarker)),u.header&&s.push(M.header,M.header+"-"+u.header),u.quote&&(s.push(M.quote),!ue.maxBlockquoteDepth||ue.maxBlockquoteDepth>=u.quote?s.push(M.quote+"-"+u.quote):s.push(M.quote+"-"+ue.maxBlockquoteDepth)),u.list!==!1){var x=(u.listStack.length-1)%3;x?x===1?s.push(M.list2):s.push(M.list3):s.push(M.list1)}return u.trailingSpaceNewLine?s.push("trailing-space-new-line"):u.trailingSpace&&s.push("trailing-space-"+(u.trailingSpace%2?"a":"b")),s.length?s.join(" "):null}function Ae(u,s){return u.match($,!0)?de(s):void 0}function Q(u,s){var g=s.text(u,s);if(typeof g!="undefined")return g;if(s.list)return s.list=null,de(s);if(s.taskList){var x=u.match(J,!0)[1]===" ";return x?s.taskOpen=!0:s.taskClosed=!0,ue.highlightFormatting&&(s.formatting="task"),s.taskList=!1,de(s)}if(s.taskOpen=!1,s.taskClosed=!1,s.header&&u.match(/^#+$/,!0))return ue.highlightFormatting&&(s.formatting="header"),de(s);var U=u.next();if(s.linkTitle){s.linkTitle=!1;var le=U;U==="("&&(le=")"),le=(le+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ee="^\\s*(?:[^"+le+"\\\\]+|\\\\\\\\|\\\\.)"+le;if(u.match(new RegExp(Ee),!0))return M.linkHref}if(U==="`"){var ce=s.formatting;ue.highlightFormatting&&(s.formatting="code"),u.eatWhile("`");var xe=u.current().length;if(s.code==0&&(!s.quote||xe==1))return s.code=xe,de(s);if(xe==s.code){var Z=de(s);return s.code=0,Z}else return s.formatting=ce,de(s)}else if(s.code)return de(s);if(U==="\\"&&(u.next(),ue.highlightFormatting)){var q=de(s),K=M.formatting+"-escape";return q?q+" "+K:K}if(U==="!"&&u.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return s.imageMarker=!0,s.image=!0,ue.highlightFormatting&&(s.formatting="image"),de(s);if(U==="["&&s.imageMarker&&u.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return s.imageMarker=!1,s.imageAltText=!0,ue.highlightFormatting&&(s.formatting="image"),de(s);if(U==="]"&&s.imageAltText){ue.highlightFormatting&&(s.formatting="image");var q=de(s);return s.imageAltText=!1,s.image=!1,s.inline=s.f=V,q}if(U==="["&&!s.image)return s.linkText&&u.match(/^.*?\]/)||(s.linkText=!0,ue.highlightFormatting&&(s.formatting="link")),de(s);if(U==="]"&&s.linkText){ue.highlightFormatting&&(s.formatting="link");var q=de(s);return s.linkText=!1,s.inline=s.f=u.match(/\(.*?\)| ?\[.*?\]/,!1)?V:Q,q}if(U==="<"&&u.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=y,ue.highlightFormatting&&(s.formatting="link");var q=de(s);return q?q+=" ":q="",q+M.linkInline}if(U==="<"&&u.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=y,ue.highlightFormatting&&(s.formatting="link");var q=de(s);return q?q+=" ":q="",q+M.linkEmail}if(ue.xml&&U==="<"&&u.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ee=u.string.indexOf(">",u.pos);if(ee!=-1){var p=u.string.substring(u.start,ee);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(p)&&(s.md_inside=!0)}return u.backUp(1),s.htmlState=W.startState(ke),Ce(u,s,Re)}if(ue.xml&&U==="<"&&u.match(/^\/\w*?>/))return s.md_inside=!1,"tag";if(U==="*"||U==="_"){for(var k=1,m=u.pos==1?" ":u.string.charAt(u.pos-2);k<3&&u.eat(U);)k++;var j=u.peek()||" ",ne=!/\s/.test(j)&&(!I.test(j)||/\s/.test(m)||I.test(m)),z=!/\s/.test(m)&&(!I.test(m)||/\s/.test(j)||I.test(j)),oe=null,Se=null;if(k%2&&(!s.em&&ne&&(U==="*"||!z||I.test(m))?oe=!0:s.em==U&&z&&(U==="*"||!ne||I.test(j))&&(oe=!1)),k>1&&(!s.strong&&ne&&(U==="*"||!z||I.test(m))?Se=!0:s.strong==U&&z&&(U==="*"||!ne||I.test(j))&&(Se=!1)),Se!=null||oe!=null){ue.highlightFormatting&&(s.formatting=oe==null?"strong":Se==null?"em":"strong em"),oe===!0&&(s.em=U),Se===!0&&(s.strong=U);var Z=de(s);return oe===!1&&(s.em=!1),Se===!1&&(s.strong=!1),Z}}else if(U===" "&&(u.eat("*")||u.eat("_"))){if(u.peek()===" ")return de(s);u.backUp(1)}if(ue.strikethrough){if(U==="~"&&u.eatWhile(U)){if(s.strikethrough){ue.highlightFormatting&&(s.formatting="strikethrough");var Z=de(s);return s.strikethrough=!1,Z}else if(u.match(/^[^\s]/,!1))return s.strikethrough=!0,ue.highlightFormatting&&(s.formatting="strikethrough"),de(s)}else if(U===" "&&u.match(/^~~/,!0)){if(u.peek()===" ")return de(s);u.backUp(2)}}if(ue.emoji&&U===":"&&u.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){s.emoji=!0,ue.highlightFormatting&&(s.formatting="emoji");var Te=de(s);return s.emoji=!1,Te}return U===" "&&(u.match(/^ +$/,!1)?s.trailingSpace++:s.trailingSpace&&(s.trailingSpaceNewLine=!0)),de(s)}function y(u,s){var g=u.next();if(g===">"){s.f=s.inline=Q,ue.highlightFormatting&&(s.formatting="link");var x=de(s);return x?x+=" ":x="",x+M.linkInline}return u.match(/^[^>]+/,!0),M.linkInline}function V(u,s){if(u.eatSpace())return null;var g=u.next();return g==="("||g==="["?(s.f=s.inline=_(g==="("?")":"]"),ue.highlightFormatting&&(s.formatting="link-string"),s.linkHref=!0,de(s)):"error"}var D={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function _(u){return function(s,g){var x=s.next();if(x===u){g.f=g.inline=Q,ue.highlightFormatting&&(g.formatting="link-string");var U=de(g);return g.linkHref=!1,U}return s.match(D[u]),g.linkHref=!0,de(g)}}function G(u,s){return u.match(/^([^\]\\]|\\.)*\]:/,!1)?(s.f=R,u.next(),ue.highlightFormatting&&(s.formatting="link"),s.linkText=!0,de(s)):ie(u,s,Q)}function R(u,s){if(u.match(/^\]:/,!0)){s.f=s.inline=S,ue.highlightFormatting&&(s.formatting="link");var g=de(s);return s.linkText=!1,g}return u.match(/^([^\]\\]|\\.)+/,!0),M.linkText}function S(u,s){return u.eatSpace()?null:(u.match(/^[^\s]+/,!0),u.peek()===void 0?s.linkTitle=!0:u.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),s.f=s.inline=Q,M.linkHref+" url")}var C={startState:function(){return{f:be,prevLine:{stream:null},thisLine:{stream:null},block:be,htmlState:null,indentation:0,inline:Q,text:Ae,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(u){return{f:u.f,prevLine:u.prevLine,thisLine:u.thisLine,block:u.block,htmlState:u.htmlState&&W.copyState(ke,u.htmlState),indentation:u.indentation,localMode:u.localMode,localState:u.localMode?W.copyState(u.localMode,u.localState):null,inline:u.inline,text:u.text,formatting:!1,linkText:u.linkText,linkTitle:u.linkTitle,linkHref:u.linkHref,code:u.code,em:u.em,strong:u.strong,strikethrough:u.strikethrough,emoji:u.emoji,header:u.header,setext:u.setext,hr:u.hr,taskList:u.taskList,list:u.list,listStack:u.listStack.slice(0),quote:u.quote,indentedCode:u.indentedCode,trailingSpace:u.trailingSpace,trailingSpaceNewLine:u.trailingSpaceNewLine,md_inside:u.md_inside,fencedEndRE:u.fencedEndRE}},token:function(u,s){if(s.formatting=!1,u!=s.thisLine.stream){if(s.header=0,s.hr=!1,u.match(/^\s*$/,!0))return he(s),null;if(s.prevLine=s.thisLine,s.thisLine={stream:u},s.taskList=!1,s.trailingSpace=0,s.trailingSpaceNewLine=!1,!s.localState&&(s.f=s.block,s.f!=Re)){var g=u.match(/^\s*/,!0)[0].replace(/\t/g,B).length;if(s.indentation=g,s.indentationDiff=null,g>0)return null}}return s.f(u,s)},innerMode:function(u){return u.block==Re?{state:u.htmlState,mode:ke}:u.localState?{state:u.localState,mode:u.localMode}:{state:u,mode:C}},indent:function(u,s,g){return u.block==Re&&ke.indent?ke.indent(u.htmlState,s,g):u.localState&&u.localMode.indent?u.localMode.indent(u.localState,s,g):W.Pass},blankLine:he,getType:de,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return C},"xml"),W.defineMIME("text/markdown","markdown"),W.defineMIME("text/x-markdown","markdown")})},mOS8:function(nt,Be,h){nt.exports=h.p+"static/403Qrcode.6c17b6f4.png"},osHv:function(nt,Be,h){(function(W){W(h("VrN/"))})(function(W){"use strict";var _e=W.Pos;function ue(I,B){return I.line-B.line||I.ch-B.ch}var ke="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",we=ke+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Y=new RegExp("<(/?)(["+ke+"]["+we+"]*)","g");function M(I,B,ie,Ce){this.line=B,this.ch=ie,this.cm=I,this.text=I.getLine(B),this.min=Ce?Math.max(Ce.from,I.firstLine()):I.firstLine(),this.max=Ce?Math.min(Ce.to-1,I.lastLine()):I.lastLine()}function A(I,B){var ie=I.cm.getTokenTypeAt(_e(I.line,B));return ie&&/\btag\b/.test(ie)}function w(I){return I.line>=I.max?void 0:(I.ch=0,I.text=I.cm.getLine(++I.line),!0)}function H(I){return I.line<=I.min?void 0:(I.text=I.cm.getLine(--I.line),I.ch=I.text.length,!0)}function J(I){for(;;){var B=I.text.indexOf(">",I.ch);if(B==-1){if(w(I))continue;return}if(!A(I,B+1)){I.ch=B+1;continue}var ie=I.text.lastIndexOf("/",B),Ce=ie>-1&&!/\S/.test(I.text.slice(ie+1,B));return I.ch=B+1,Ce?"selfClose":"regular"}}function ae(I){for(;;){var B=I.ch?I.text.lastIndexOf("<",I.ch-1):-1;if(B==-1){if(H(I))continue;return}if(!A(I,B+1)){I.ch=B;continue}Y.lastIndex=B,I.ch=B;var ie=Y.exec(I.text);if(ie&&ie.index==B)return ie}}function fe(I){for(;;){Y.lastIndex=I.ch;var B=Y.exec(I.text);if(!B){if(w(I))continue;return}if(!A(I,B.index+1)){I.ch=B.index+1;continue}return I.ch=B.index+B[0].length,B}}function $(I){for(;;){var B=I.ch?I.text.lastIndexOf(">",I.ch-1):-1;if(B==-1){if(H(I))continue;return}if(!A(I,B+1)){I.ch=B;continue}var ie=I.text.lastIndexOf("/",B),Ce=ie>-1&&!/\S/.test(I.text.slice(ie+1,B));return I.ch=B+1,Ce?"selfClose":"regular"}}function N(I,B){for(var ie=[];;){var Ce=fe(I),We,he=I.line,be=I.ch-(Ce?Ce[0].length:0);if(!Ce||!(We=J(I)))return;if(We=="selfClose")continue;if(Ce[1]){for(var Re=ie.length-1;Re>=0;--Re)if(ie[Re]==Ce[2]){ie.length=Re;break}if(Re<0&&(!B||B==Ce[2]))return{tag:Ce[2],from:_e(he,be),to:_e(I.line,I.ch)}}else ie.push(Ce[2])}}function P(I,B){for(var ie=[];;){var Ce=$(I);if(!Ce)return;if(Ce=="selfClose"){ae(I);continue}var We=I.line,he=I.ch,be=ae(I);if(!be)return;if(be[1])ie.push(be[2]);else{for(var Re=ie.length-1;Re>=0;--Re)if(ie[Re]==be[2]){ie.length=Re;break}if(Re<0&&(!B||B==be[2]))return{tag:be[2],from:_e(I.line,I.ch),to:_e(We,he)}}}}W.registerHelper("fold","xml",function(I,B){for(var ie=new M(I,B.line,0);;){var Ce=fe(ie);if(!Ce||ie.line!=B.line)return;var We=J(ie);if(!We)return;if(!Ce[1]&&We!="selfClose"){var he=_e(ie.line,ie.ch),be=N(ie,Ce[2]);return be&&ue(be.from,he)>0?{from:he,to:be.from}:null}}}),W.findMatchingTag=function(I,B,ie){var Ce=new M(I,B.line,B.ch,ie);if(Ce.text.indexOf(">")==-1&&Ce.text.indexOf("<")==-1)return;var We=J(Ce),he=We&&_e(Ce.line,Ce.ch),be=We&&ae(Ce);if(!We||!be||ue(Ce,B)>0)return;var Re={from:_e(Ce.line,Ce.ch),to:he,tag:be[2]};return We=="selfClose"?{open:Re,close:null,at:"open"}:be[1]?{open:P(Ce,be[2]),close:Re,at:"close"}:(Ce=new M(I,he.line,he.ch,ie),{open:Re,close:N(Ce,be[2]),at:"open"})},W.findEnclosingTag=function(I,B,ie,Ce){for(var We=new M(I,B.line,B.ch,ie);;){var he=P(We,Ce);if(!he)break;var be=new M(I,B.line,B.ch,ie),Re=N(be,he.tag);if(Re)return{open:he,close:Re}}},W.scanForClosingTag=function(I,B,ie,Ce){var We=new M(I,B.line,B.ch,Ce?{from:0,to:Ce}:null);return N(We,ie)}})},p5ED:function(nt,Be,h){"use strict";var W=h("+L6B"),_e=h("2/Rp"),ue=h("5Dmo"),ke=h("3S7+"),we=h("k1fw"),Y=h("tJVT"),M=h("q1tI"),A=h.n(M),w=h("vHTk"),H=h.n(w),J=h("yEEn"),ae=h("ZW9T"),fe=h("1vsH");Be.a=function($){var N=$.name,P=$.data,I=$.theme,B=$.type,ie=$.filename,Ce=$.monacoEditor,We=$.className,he=$.style,be=$.close,Re=$.onClose,pe=$.hasMask,de=Object(M.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Ae=Object(Y.a)(de,2),Q=Ae[0],y=Ae[1],V=Object(M.useState)(""),D=Object(Y.a)(V,2),_=D[0],G=D[1],R=Object(M.useRef)();ie&&(Ce.filename=ie),Object(M.useEffect)(function(){var u,s,g=(u=document.cookie)===null||u===void 0||((s=u.replace(/\s/g,""))===null||s===void 0)?void 0:s.split(";");g==null||g.map(function(x){var U=x.split("=");U[0]==="_educoder_session"&&G(U[1])})},[]);var S=function(){if(P.startsWith("http")||P.startsWith("/")){C();return}Object(fe.y)(ie||"educoder",P,ie)},C=function(){Object(fe.w)(ie||N,P)};return console.log("data:",P,"fileanme:",ie," name:",N),A.a.createElement("div",{style:Object(we.a)({},he||{}),className:"".concat(pe&&H.a.bgBlack," ").concat(B?H.a.wrp:"hide")},be&&A.a.createElement("div",{className:H.a.close,ref:R},A.a.createElement(ke.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return R.current}},A.a.createElement("span",{onClick:C},A.a.createElement("i",{className:"icon-quxiaozhiding"}))),A.a.createElement(ke.a,{title:"\u5173\u95ED",getPopupContainer:function(){return R.current}},A.a.createElement("span",{className:"",onClick:Re},A.a.createElement("i",{className:"icon-guanbi1"})))),A.a.createElement("div",{className:"".concat(H.a[We]," ").concat(We," ").concat(H.a.monaco," ").concat(B==="txt"?"show":"hide")},B==="txt"&&A.a.createElement(ae.b,Ce)),B==="audio"&&A.a.createElement("audio",{src:"".concat(P!=null&&P.startsWith("/")||(P==null?void 0:P.indexOf("https://"))>-1?P:"data:audio/mp3;base64,").concat(P),autoPlay:!0}),B==="video"&&A.a.createElement(A.a.Fragment,null,P!=null&&P.startsWith("/")?A.a.createElement("video",{controls:!0,src:"".concat(P),autoPlay:!0}):A.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(P),autoPlay:!0})),B==="pdf"&&A.a.createElement("embed",{className:H.a.embed,src:P}),B==="image"&&A.a.createElement(A.a.Fragment,null,A.a.createElement("img",{src:"".concat(P!=null&&P.startsWith("/")||(P==null?void 0:P.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(P)})),B==="other"&&A.a.createElement("div",null,A.a.createElement(_e.a,{type:"primary",size:"large",onClick:S},A.a.createElement(J.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(B==="download"||B==="office")&&A.a.createElement(_e.a,{type:"primary",size:"large",onClick:S},A.a.createElement(J.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(nt,Be,h){},"rAM+":function(nt,Be,h){"use strict";h.d(Be,"a",function(){return _e});var W=h("Qw5x");function _e(ue,ke){var we;if(typeof Symbol=="undefined"||ue[Symbol.iterator]==null){if(Array.isArray(ue)||(we=Object(W.a)(ue))||ke&&ue&&typeof ue.length=="number"){we&&(ue=we);var Y=0,M=function(){};return{s:M,n:function(){return Y>=ue.length?{done:!0}:{done:!1,value:ue[Y++]}},e:function(ae){throw ae},f:M}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var A=!0,w=!1,H;return{s:function(){we=ue[Symbol.iterator]()},n:function(){var ae=we.next();return A=ae.done,ae},e:function(ae){w=!0,H=ae},f:function(){try{!A&&we.return!=null&&we.return()}finally{if(w)throw H}}}}},rUJ1:function(nt,Be){const h=/[&<>"']/,W=/[&<>"']/g,_e=/[<>"']|&(?!#?\w+;)/,ue=/[<>"']|&(?!#?\w+;)/g,ke={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=pe=>ke[pe];function Y(pe,de){if(de){if(h.test(pe))return pe.replace(W,we)}else if(_e.test(pe))return pe.replace(ue,we);return pe}const M=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function A(pe){return pe.replace(M,(de,Ae)=>(Ae=Ae.toLowerCase(),Ae==="colon"?":":Ae.charAt(0)==="#"?Ae.charAt(1)==="x"?String.fromCharCode(parseInt(Ae.substring(2),16)):String.fromCharCode(+Ae.substring(1)):""))}const w=/(^|[^\[])\^/g;function H(pe,de){pe=pe.source||pe,de=de||"";const Ae={replace:(Q,y)=>(y=y.source||y,y=y.replace(w,"$1"),pe=pe.replace(Q,y),Ae),getRegex:()=>new RegExp(pe,de)};return Ae}const J=/[^\w:]/g,ae=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function fe(pe,de,Ae){if(pe){let Q;try{Q=decodeURIComponent(A(Ae)).replace(J,"").toLowerCase()}catch(y){return null}if(Q.indexOf("javascript:")===0||Q.indexOf("vbscript:")===0||Q.indexOf("data:")===0)return null}de&&!ae.test(Ae)&&(Ae=B(de,Ae));try{Ae=encodeURI(Ae).replace(/%25/g,"%")}catch(Q){return null}return Ae}const $={},N=/^[^:]+:\/*[^/]*$/,P=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function B(pe,de){$[" "+pe]||(N.test(pe)?$[" "+pe]=pe+"/":$[" "+pe]=he(pe,"/",!0)),pe=$[" "+pe];const Ae=pe.indexOf(":")===-1;return de.substring(0,2)==="//"?Ae?de:pe.replace(P,"$1")+de:de.charAt(0)==="/"?Ae?de:pe.replace(I,"$1")+de:pe+de}const ie={exec:function(){}};function Ce(pe){let de=1,Ae,Q;for(;de<arguments.length;de++){Ae=arguments[de];for(Q in Ae)Object.prototype.hasOwnProperty.call(Ae,Q)&&(pe[Q]=Ae[Q])}return pe}function We(pe,de){const Ae=pe.replace(/\|/g,(V,D,_)=>{let G=!1,R=D;for(;--R>=0&&_[R]==="\\";)G=!G;return G?"|":" |"}),Q=Ae.split(/ \|/);let y=0;if(Q.length>de)Q.splice(de);else for(;Q.length<de;)Q.push("");for(;y<Q.length;y++)Q[y]=Q[y].trim().replace(/\\\|/g,"|");return Q}function he(pe,de,Ae){const Q=pe.length;if(Q===0)return"";let y=0;for(;y<Q;){const V=pe.charAt(Q-y-1);if(V===de&&!Ae)y++;else if(V!==de&&Ae)y++;else break}return pe.substr(0,Q-y)}function be(pe,de){if(pe.indexOf(de[1])===-1)return-1;const Ae=pe.length;let Q=0,y=0;for(;y<Ae;y++)if(pe[y]==="\\")y++;else if(pe[y]===de[0])Q++;else if(pe[y]===de[1]&&(Q--,Q<0))return y;return-1}function Re(pe){pe&&pe.sanitize&&!pe.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}nt.exports={escape:Y,unescape:A,edit:H,cleanUrl:fe,resolveUrl:B,noopTest:ie,merge:Ce,splitCells:We,rtrim:he,findClosingBracket:be,checkSanitizeDeprecation:Re}},ttuQ:function(nt,Be,h){nt.exports={bg:"bg___3F6Km",name:"name___1NsJT",member:"member___2pzzt"}},vHTk:function(nt,Be,h){nt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wMS7:function(nt,Be,h){/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */(function(W,_e){nt.exports=_e()})(this,function(){"use strict";function W(m){if(Array.isArray(m)){for(var j=0,ne=Array(m.length);j<m.length;j++)ne[j]=m[j];return ne}else return Array.from(m)}var _e=Object.hasOwnProperty,ue=Object.setPrototypeOf,ke=Object.isFrozen,we=Object.keys,Y=Object.freeze,M=Object.seal,A=Object.create,w=typeof Reflect!="undefined"&&Reflect,H=w.apply,J=w.construct;H||(H=function(j,ne,z){return j.apply(ne,z)}),Y||(Y=function(j){return j}),M||(M=function(j){return j}),J||(J=function(j,ne){return new(Function.prototype.bind.apply(j,[null].concat(W(ne))))});var ae=de(Array.prototype.forEach),fe=de(Array.prototype.indexOf),$=de(Array.prototype.join),N=de(Array.prototype.pop),P=de(Array.prototype.push),I=de(Array.prototype.slice),B=de(String.prototype.toLowerCase),ie=de(String.prototype.match),Ce=de(String.prototype.replace),We=de(String.prototype.indexOf),he=de(String.prototype.trim),be=de(RegExp.prototype.test),Re=Ae(RegExp),pe=Ae(TypeError);function de(m){return function(j){for(var ne=arguments.length,z=Array(ne>1?ne-1:0),oe=1;oe<ne;oe++)z[oe-1]=arguments[oe];return H(m,j,z)}}function Ae(m){return function(){for(var j=arguments.length,ne=Array(j),z=0;z<j;z++)ne[z]=arguments[z];return J(m,ne)}}function Q(m,j){ue&&ue(m,null);for(var ne=j.length;ne--;){var z=j[ne];if(typeof z=="string"){var oe=B(z);oe!==z&&(ke(j)||(j[ne]=oe),z=oe)}m[z]=!0}return m}function y(m){var j=A(null),ne=void 0;for(ne in m)H(_e,m,[ne])&&(j[ne]=m[ne]);return j}var V=Y(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=Y(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),_=Y(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),G=Y(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),R=Y(["#text"]),S=Y(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),C=Y(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),u=Y(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),s=Y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),g=M(/\{\{[\s\S]*|[\s\S]*\}\}/gm),x=M(/<%[\s\S]*|[\s\S]*%>/gm),U=M(/^data-[\-\w.\u00B7-\uFFFF]/),le=M(/^aria-[\-\w]+$/),Ee=M(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ce=M(/^(?:\w+script|data):/i),xe=M(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m};function q(m){if(Array.isArray(m)){for(var j=0,ne=Array(m.length);j<m.length;j++)ne[j]=m[j];return ne}else return Array.from(m)}var K=function(){return typeof window=="undefined"?null:window},ee=function(j,ne){if((typeof j=="undefined"?"undefined":Z(j))!=="object"||typeof j.createPolicy!="function")return null;var z=null,oe="data-tt-policy-suffix";ne.currentScript&&ne.currentScript.hasAttribute(oe)&&(z=ne.currentScript.getAttribute(oe));var Se="dompurify"+(z?"#"+z:"");try{return j.createPolicy(Se,{createHTML:function(ge){return ge}})}catch(Te){return console.warn("TrustedTypes policy "+Se+" could not be created."),null}};function p(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:K(),j=function(ye){return p(ye)};if(j.version="2.0.15",j.removed=[],!m||!m.document||m.document.nodeType!==9)return j.isSupported=!1,j;var ne=m.document,z=!1,oe=m.document,Se=m.DocumentFragment,Te=m.HTMLTemplateElement,ge=m.Node,ve=m.NodeFilter,De=m.NamedNodeMap,Ie=De===void 0?m.NamedNodeMap||m.MozNamedAttrMap:De,Pe=m.Text,Ue=m.Comment,Ke=m.DOMParser,tt=m.trustedTypes;if(typeof Te=="function"){var Xe=oe.createElement("template");Xe.content&&Xe.content.ownerDocument&&(oe=Xe.content.ownerDocument)}var Ye=ee(tt,ne),Oe=Ye&&Rn?Ye.createHTML(""):"",at=oe,Ze=at.implementation,Me=at.createNodeIterator,He=at.getElementsByTagName,X=at.createDocumentFragment,F=ne.importNode,T=y(oe).documentMode?oe.documentMode:{},f={};j.isSupported=Ze&&typeof Ze.createHTMLDocument!="undefined"&&T!==9;var v=g,b=x,E=U,re=le,me=ce,je=xe,rt=Ee,it=null,lt=Q({},[].concat(q(V),q(D),q(_),q(G),q(R))),_t=null,bt=Q({},[].concat(q(S),q(C),q(u),q(s))),ht=null,Ft=null,wt=!0,Ht=!0,Rt=!1,yt=!1,on=!1,wn=!1,sn=!1,Cn=!1,tn=!1,nr=!1,An=!1,Rn=!1,Bn=!0,kt=!0,qe=!1,Qt={},Gn=Q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),hn=null,xt=Q({},["audio","video","img","source","image","track"]),Sn=null,Pn=Q({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Dn=null,Fe=oe.createElement("form"),dt=function(ye){if(Dn&&Dn===ye)return;(!ye||(typeof ye=="undefined"?"undefined":Z(ye))!=="object")&&(ye={}),ye=y(ye),it="ALLOWED_TAGS"in ye?Q({},ye.ALLOWED_TAGS):lt,_t="ALLOWED_ATTR"in ye?Q({},ye.ALLOWED_ATTR):bt,Sn="ADD_URI_SAFE_ATTR"in ye?Q(y(Pn),ye.ADD_URI_SAFE_ATTR):Pn,hn="ADD_DATA_URI_TAGS"in ye?Q(y(xt),ye.ADD_DATA_URI_TAGS):xt,ht="FORBID_TAGS"in ye?Q({},ye.FORBID_TAGS):{},Ft="FORBID_ATTR"in ye?Q({},ye.FORBID_ATTR):{},Qt="USE_PROFILES"in ye?ye.USE_PROFILES:!1,wt=ye.ALLOW_ARIA_ATTR!==!1,Ht=ye.ALLOW_DATA_ATTR!==!1,Rt=ye.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=ye.SAFE_FOR_JQUERY||!1,on=ye.SAFE_FOR_TEMPLATES||!1,wn=ye.WHOLE_DOCUMENT||!1,tn=ye.RETURN_DOM||!1,nr=ye.RETURN_DOM_FRAGMENT||!1,An=ye.RETURN_DOM_IMPORT||!1,Rn=ye.RETURN_TRUSTED_TYPE||!1,Cn=ye.FORCE_BODY||!1,Bn=ye.SANITIZE_DOM!==!1,kt=ye.KEEP_CONTENT!==!1,qe=ye.IN_PLACE||!1,rt=ye.ALLOWED_URI_REGEXP||rt,on&&(Ht=!1),nr&&(tn=!0),Qt&&(it=Q({},[].concat(q(R))),_t=[],Qt.html===!0&&(Q(it,V),Q(_t,S)),Qt.svg===!0&&(Q(it,D),Q(_t,C),Q(_t,s)),Qt.svgFilters===!0&&(Q(it,_),Q(_t,C),Q(_t,s)),Qt.mathMl===!0&&(Q(it,G),Q(_t,u),Q(_t,s))),ye.ADD_TAGS&&(it===lt&&(it=y(it)),Q(it,ye.ADD_TAGS)),ye.ADD_ATTR&&(_t===bt&&(_t=y(_t)),Q(_t,ye.ADD_ATTR)),ye.ADD_URI_SAFE_ATTR&&Q(Sn,ye.ADD_URI_SAFE_ATTR),kt&&(it["#text"]=!0),wn&&Q(it,["html","head","body"]),it.table&&(Q(it,["tbody"]),delete ht.tbody),Y&&Y(ye),Dn=ye},On=function(ye){P(j.removed,{element:ye});try{ye.parentNode.removeChild(ye)}catch(Qe){ye.outerHTML=Oe}},Ln=function(ye,Qe){try{P(j.removed,{attribute:Qe.getAttributeNode(ye),from:Qe})}catch(ot){P(j.removed,{attribute:null,from:Qe})}Qe.removeAttribute(ye)},Ge=function(ye){var Qe=void 0,ot=void 0;if(Cn)ye="<remove></remove>"+ye;else{var Ct=ie(ye,/^[\r\n\t ]+/);ot=Ct&&Ct[0]}var cn=Ye?Ye.createHTML(ye):ye;try{Qe=new Ke().parseFromString(cn,"text/html")}catch(Dt){}if(z&&Q(ht,["title"]),!Qe||!Qe.documentElement){Qe=Ze.createHTMLDocument("");var Gt=Qe,Pt=Gt.body;Pt.parentNode.removeChild(Pt.parentNode.firstElementChild),Pt.outerHTML=cn}return ye&&ot&&Qe.body.insertBefore(oe.createTextNode(ot),Qe.body.childNodes[0]||null),He.call(Qe,wn?"html":"body")[0]};j.isSupported&&function(){try{var ut=Ge("<x/><title>&lt;/title&gt;&lt;img&gt;");be(/<\/title/,ut.querySelector("title").innerHTML)&&(z=!0)}catch(ye){}}();var Xn=function(ye){return Me.call(ye.ownerDocument||ye,ye,ve.SHOW_ELEMENT|ve.SHOW_COMMENT|ve.SHOW_TEXT,function(){return ve.FILTER_ACCEPT},!1)},Tr=function(ye){return ye instanceof Pe||ye instanceof Ue?!1:typeof ye.nodeName!="string"||typeof ye.textContent!="string"||typeof ye.removeChild!="function"||!(ye.attributes instanceof Ie)||typeof ye.removeAttribute!="function"||typeof ye.setAttribute!="function"||typeof ye.namespaceURI!="string"},ct=function(ye){return(typeof ge=="undefined"?"undefined":Z(ge))==="object"?ye instanceof ge:ye&&(typeof ye=="undefined"?"undefined":Z(ye))==="object"&&typeof ye.nodeType=="number"&&typeof ye.nodeName=="string"},ln=function(ye,Qe,ot){if(!f[ye])return;ae(f[ye],function(Ct){Ct.call(j,Qe,ot,Dn)})},Wn=function(ye){var Qe=void 0;if(ln("beforeSanitizeElements",ye,null),Tr(ye))return On(ye),!0;if(ie(ye.nodeName,/[\u0080-\uFFFF]/))return On(ye),!0;var ot=B(ye.nodeName);if(ln("uponSanitizeElement",ye,{tagName:ot,allowedTags:it}),(ot==="svg"||ot==="math")&&ye.querySelectorAll("p, br").length!==0)return On(ye),!0;if(!it[ot]||ht[ot]){if(kt&&!Gn[ot]&&typeof ye.insertAdjacentHTML=="function")try{var Ct=ye.innerHTML;ye.insertAdjacentHTML("AfterEnd",Ye?Ye.createHTML(Ct):Ct)}catch(cn){}return On(ye),!0}return ot==="noscript"&&be(/<\/noscript/i,ye.innerHTML)||ot==="noembed"&&be(/<\/noembed/i,ye.innerHTML)?(On(ye),!0):(yt&&!ct(ye.firstElementChild)&&(!ct(ye.content)||!ct(ye.content.firstElementChild))&&be(/</g,ye.textContent)&&(P(j.removed,{element:ye.cloneNode()}),ye.innerHTML?ye.innerHTML=Ce(ye.innerHTML,/</g,"&lt;"):ye.innerHTML=Ce(ye.textContent,/</g,"&lt;")),on&&ye.nodeType===3&&(Qe=ye.textContent,Qe=Ce(Qe,v," "),Qe=Ce(Qe,b," "),ye.textContent!==Qe&&(P(j.removed,{element:ye.cloneNode()}),ye.textContent=Qe)),ln("afterSanitizeElements",ye,null),!1)},$n=function(ye,Qe,ot){if(Bn&&(Qe==="id"||Qe==="name")&&(ot in oe||ot in Fe))return!1;if(!(Ht&&be(E,Qe))){if(!(wt&&be(re,Qe))){if(!_t[Qe]||Ft[Qe])return!1;if(!Sn[Qe]){if(!be(rt,Ce(ot,je,""))){if(!((Qe==="src"||Qe==="xlink:href"||Qe==="href")&&ye!=="script"&&We(ot,"data:")===0&&hn[ye])){if(!(Rt&&!be(me,Ce(ot,je,"")))){if(ot)return!1}}}}}}return!0},un=function(ye){var Qe=void 0,ot=void 0,Ct=void 0,cn=void 0,Gt=void 0;ln("beforeSanitizeAttributes",ye,null);var Pt=ye.attributes;if(!Pt)return;var Dt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_t};for(Gt=Pt.length;Gt--;){Qe=Pt[Gt];var kr=Qe,_n=kr.name,jn=kr.namespaceURI;if(ot=he(Qe.value),Ct=B(_n),Dt.attrName=Ct,Dt.attrValue=ot,Dt.keepAttr=!0,Dt.forceKeepAttr=void 0,ln("uponSanitizeAttribute",ye,Dt),ot=Dt.attrValue,Dt.forceKeepAttr)continue;if(Ct==="name"&&ye.nodeName==="IMG"&&Pt.id)cn=Pt.id,Pt=I(Pt,[]),Ln("id",ye),Ln(_n,ye),fe(Pt,cn)>Gt&&ye.setAttribute("id",cn.value);else{if(ye.nodeName==="INPUT"&&Ct==="type"&&ot==="file"&&Dt.keepAttr&&(_t[Ct]||!Ft[Ct]))continue;_n==="id"&&ye.setAttribute(_n,""),Ln(_n,ye)}if(!Dt.keepAttr)continue;if(yt&&be(/\/>/i,ot)){Ln(_n,ye);continue}if(be(/svg|math/i,ye.namespaceURI)&&be(Re("</("+$(we(Gn),"|")+")","i"),ot)){Ln(_n,ye);continue}on&&(ot=Ce(ot,v," "),ot=Ce(ot,b," "));var pn=ye.nodeName.toLowerCase();if(!$n(pn,Ct,ot))continue;try{jn?ye.setAttributeNS(jn,_n,ot):ye.setAttribute(_n,ot),N(j.removed)}catch(Si){}}ln("afterSanitizeAttributes",ye,null)},Mn=function ut(ye){var Qe=void 0,ot=Xn(ye);for(ln("beforeSanitizeShadowDOM",ye,null);Qe=ot.nextNode();){if(ln("uponSanitizeShadowNode",Qe,null),Wn(Qe))continue;Qe.content instanceof Se&&ut(Qe.content),un(Qe)}ln("afterSanitizeShadowDOM",ye,null)};return j.sanitize=function(ut,ye){var Qe=void 0,ot=void 0,Ct=void 0,cn=void 0,Gt=void 0;if(ut||(ut="<!-->"),typeof ut!="string"&&!ct(ut)){if(typeof ut.toString!="function")throw pe("toString is not a function");if(ut=ut.toString(),typeof ut!="string")throw pe("dirty is not a string, aborting")}if(!j.isSupported){if(Z(m.toStaticHTML)==="object"||typeof m.toStaticHTML=="function"){if(typeof ut=="string")return m.toStaticHTML(ut);if(ct(ut))return m.toStaticHTML(ut.outerHTML)}return ut}if(sn||dt(ye),j.removed=[],typeof ut=="string"&&(qe=!1),!qe)if(ut instanceof ge)Qe=Ge("<!-->"),ot=Qe.ownerDocument.importNode(ut,!0),ot.nodeType===1&&ot.nodeName==="BODY"||ot.nodeName==="HTML"?Qe=ot:Qe.appendChild(ot);else{if(!tn&&!on&&!wn&&ut.indexOf("<")===-1)return Ye&&Rn?Ye.createHTML(ut):ut;if(Qe=Ge(ut),!Qe)return tn?null:Oe}Qe&&Cn&&On(Qe.firstChild);for(var Pt=Xn(qe?ut:Qe);Ct=Pt.nextNode();){if(Ct.nodeType===3&&Ct===cn)continue;if(Wn(Ct))continue;Ct.content instanceof Se&&Mn(Ct.content),un(Ct),cn=Ct}if(cn=null,qe)return ut;if(tn){if(nr)for(Gt=X.call(Qe.ownerDocument);Qe.firstChild;)Gt.appendChild(Qe.firstChild);else Gt=Qe;return An&&(Gt=F.call(ne,Gt,!0)),Gt}var Dt=wn?Qe.outerHTML:Qe.innerHTML;return on&&(Dt=Ce(Dt,v," "),Dt=Ce(Dt,b," ")),Ye&&Rn?Ye.createHTML(Dt):Dt},j.setConfig=function(ut){dt(ut),sn=!0},j.clearConfig=function(){Dn=null,sn=!1},j.isValidAttribute=function(ut,ye,Qe){Dn||dt({});var ot=B(ut),Ct=B(ye);return $n(ot,Ct,Qe)},j.addHook=function(ut,ye){if(typeof ye!="function")return;f[ut]=f[ut]||[],P(f[ut],ye)},j.removeHook=function(ut){f[ut]&&N(f[ut])},j.removeHooks=function(ut){f[ut]&&(f[ut]=[])},j.removeAllHooks=function(){f={}},j}var k=p();return k})},wzkS:function(nt,Be,h){"use strict";h.d(Be,"c",function(){return we}),h.d(Be,"b",function(){return Y}),h.d(Be,"d",function(){return M}),h.d(Be,"a",function(){return w}),h.d(Be,"e",function(){return H});var W=h("9og8"),_e=h("WmNS"),ue=h.n(_e),ke=h("ErOA");function we(J){return Object(ke.c)("libraries/".concat(J,".json"))}function Y(){return Object(ke.c)("library_tags.json")}function M(J){return A.apply(this,arguments)}function A(){return A=Object(W.a)(ue.a.mark(function J(ae){var fe;return ue.a.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,Object(ke.b)("attachments/".concat(ae,".json"));case 2:return fe=N.sent,N.abrupt("return",fe.status===0);case 4:case"end":return N.stop()}},J)})),A.apply(this,arguments)}function w(J){return Object(ke.f)("libraries.json",J)}function H(J,ae){return Object(ke.g)("libraries/".concat(J,".json"),ae)}},y5JW:function(nt,Be,h){"use strict";h.d(Be,"c",function(){return P}),h.d(Be,"a",function(){return I});var W=h("DZo9"),_e=h("8z0m"),ue=h("+L6B"),ke=h("2/Rp"),we=h("9og8"),Y=h("k1fw"),M=h("oBTY"),A=h("miYZ"),w=h("tsqr"),H=h("WmNS"),J=h.n(H),ae=h("q1tI"),fe=h.n(ae),$=h("m3rI"),N=h("wzkS"),P="\u3000\u3000";function I(B){var ie=["Bytes","KB","MB","GB","TB"];if(B==0)return"0 Byte";var Ce=parseInt(""+Math.floor(Math.log(B)/Math.log(1024)),10);return(B/Math.pow(1024,Ce)).toFixed(1)+" "+ie[Ce]}Be.b=function(B){var ie=B.value,Ce=ie===void 0?[]:ie,We=B.action,he=B.onChange,be=B.className,Re=B.maxSize,pe=Re===void 0?150:Re,de=B.title,Ae=de===void 0?"\u6587\u4EF6\u4E0A\u4F20":de,Q=B.accept,y=Q===void 0?null:Q,V={multiple:!1,fileList:Ce,accept:y,withCredentials:!0,beforeUpload:function(G){var R=G.size/1024/1024;return R<pe?!0:(w.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(pe,"MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20")),Promise.reject())},action:"".concat($.a.API_SERVER,"/api/attachments.json"),onChange:function(G){var R=Object(M.a)(G.fileList);R=R.map(function(S){return S.name.indexOf(P)===-1&&(S.name="".concat(S.name).concat(P).concat(I(S.size))),Object(Y.a)({},S)}),he(R)},onRemove:function(){var _=Object(we.a)(J.a.mark(function R(S){var C,u,s;return J.a.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(C=S.size/1024/1024,!(S.status==="uploading")){x.next=3;break}return x.abrupt("return",!0);case 3:if(C<pe){x.next=7;break}return x.abrupt("return",!0);case 7:if(u=S.response?S.response.id:S.uid,!u){x.next=15;break}return x.next=11,Object(N.d)(S.response?S.response.id:S.id);case 11:return s=x.sent,x.abrupt("return",s);case 15:return x.abrupt("return",!0);case 16:case"end":return x.stop()}},R)}));function G(R){return _.apply(this,arguments)}return G}()};function D(_){_.preventDefault(),_.stopPropagation()}return fe.a.createElement("div",{className:"single-upload ".concat(be||"")},fe.a.createElement(_e.a,V,fe.a.createElement(ke.a,{type:"primary",title:Ce.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:Ce.length>0,ghost:!0},Ae),fe.a.createElement("span",{onClick:D,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",pe,"M) ")))}}}]);