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__Shixuns__Edit__body__Lev...

117 lines
379 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[214,7],{"+NIl":function(ft,We,g){(function(L){L(g("VrN/"))})(function(L){"use strict";L.defineMode("stex",function(Ce,W){"use strict";function de(j,M){j.cmdState.push(M)}function le(j){return j.cmdState.length>0?j.cmdState[j.cmdState.length-1]:null}function ee(j){var M=j.cmdState.pop();M&&M.closeBracket()}function S(j){for(var M=j.cmdState,T=M.length-1;T>=0;T--){var A=M[T];if(A.name=="DEFAULT")continue;return A}return{styleIdentifier:function(){return null}}}function k(j,M,T){return function(){this.name=j,this.bracketNo=0,this.style=M,this.styles=T,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var _={};_.importmodule=k("importmodule","tag",["string","builtin"]),_.documentclass=k("documentclass","tag",["","atom"]),_.usepackage=k("usepackage","tag",["atom"]),_.begin=k("begin","tag",["atom"]),_.end=k("end","tag",["atom"]),_.label=k("label","tag",["atom"]),_.ref=k("ref","tag",["atom"]),_.eqref=k("eqref","tag",["atom"]),_.cite=k("cite","tag",["atom"]),_.bibitem=k("bibitem","tag",["atom"]),_.Bibitem=k("Bibitem","tag",["atom"]),_.RBibitem=k("RBibitem","tag",["atom"]),_.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ie(j,M){j.f=M}function P(j,M){var T;if(j.match(/^\\[a-zA-Z@]+/)){var A=j.current().slice(1);return T=_.hasOwnProperty(A)?_[A]:_.DEFAULT,T=new T,de(M,T),ie(M,ue),T.style}if(j.match(/^\\[$&%#{}_]/))return"tag";if(j.match(/^\\[,;!\/\\]/))return"tag";if(j.match("\\["))return ie(M,function(H,ge){return z(H,ge,"\\]")}),"keyword";if(j.match("\\("))return ie(M,function(H,ge){return z(H,ge,"\\)")}),"keyword";if(j.match("$$"))return ie(M,function(H,ge){return z(H,ge,"$$")}),"keyword";if(j.match("$"))return ie(M,function(H,ge){return z(H,ge,"$")}),"keyword";var X=j.next();if(X=="%")return j.skipToEnd(),"comment";if(X=="}"||X=="]"){if(T=le(M),T)T.closeBracket(X),ie(M,ue);else return"error";return"bracket"}else return X=="{"||X=="["?(T=_.DEFAULT,T=new T,de(M,T),"bracket"):/\d/.test(X)?(j.eatWhile(/[\w.%]/),"atom"):(j.eatWhile(/[\w\-_]/),T=S(M),T.name=="begin"&&(T.argument=j.current()),T.styleIdentifier())}function z(j,M,T){if(j.eatSpace())return null;if(T&&j.match(T))return ie(M,P),"keyword";if(j.match(/^\\[a-zA-Z@]+/))return"tag";if(j.match(/^[a-zA-Z]+/))return"variable-2";if(j.match(/^\\[$&%#{}_]/))return"tag";if(j.match(/^\\[,;!\/]/))return"tag";if(j.match(/^[\^_&]/))return"tag";if(j.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(j.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var A=j.next();return A=="{"||A=="}"||A=="["||A=="]"||A=="("||A==")"?"bracket":A=="%"?(j.skipToEnd(),"comment"):"error"}function ue(j,M){var T=j.peek(),A;return T=="{"||T=="["?(A=le(M),A.openBracket(T),j.eat(T),ie(M,P),"bracket"):/[ \t\r]/.test(T)?(j.eat(T),null):(ie(M,P),ee(M),P(j,M))}return{startState:function(){var j=W.inMathMode?function(M,T){return z(M,T)}:P;return{cmdState:[],f:j}},copyState:function(j){return{cmdState:j.cmdState.slice(),f:j.f}},token:function(j,M){return M.f(j,M)},blankLine:function(j){j.f=P,j.cmdState.length=0},lineComment:"%"}}),L.defineMIME("text/x-stex","stex"),L.defineMIME("text/x-latex","stex")})},"19Vz":function(ft,We,g){(function(L){L(g("VrN/"))})(function(L){L.defineOption("placeholder","",function(k,_,ie){var P=ie&&ie!=L.Init;if(_&&!P)k.on("blur",le),k.on("change",ee),k.on("swapDoc",ee),L.on(k.getInputField(),"compositionupdate",k.state.placeholderCompose=function(){de(k)}),ee(k);else if(!_&&P){k.off("blur",le),k.off("change",ee),k.off("swapDoc",ee),L.off(k.getInputField(),"compositionupdate",k.state.placeholderCompose),Ce(k);var z=k.getWrapperElement();z.className=z.className.replace(" CodeMirror-empty","")}_&&!k.hasFocus()&&le(k)});function Ce(k){k.state.placeholder&&(k.state.placeholder.parentNode.removeChild(k.state.placeholder),k.state.placeholder=null)}function W(k){Ce(k);var _=k.state.placeholder=document.createElement("pre");_.style.cssText="height: 0; overflow: visible",_.style.direction=k.getOption("direction"),_.className="CodeMirror-placeholder CodeMirror-line-like";var ie=k.getOption("placeholder");typeof ie=="string"&&(ie=document.createTextNode(ie)),_.appendChild(ie),k.display.lineSpace.insertBefore(_,k.display.lineSpace.firstChild)}function de(k){setTimeout(function(){var _=!1,ie=k.getInputField();ie.nodeName=="TEXTAREA"?_=!ie.value:k.lineCount()==1&&(_=!/[^\u200b]/.test(ie.querySelector(".CodeMirror-line").textContent)),_?W(k):Ce(k)},20)}function le(k){S(k)&&W(k)}function ee(k){var _=k.getWrapperElement(),ie=S(k);_.className=_.className.replace(" CodeMirror-empty","")+(ie?" CodeMirror-empty":""),ie?W(k):Ce(k)}function S(k){return k.lineCount()===1&&k.getLine(0)===""}})},"1eCo":function(ft,We,g){(function(L){L(g("VrN/"))})(function(L){"use strict";var Ce={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},W={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};L.defineMode("xml",function(de,le){var ee=de.indentUnit,S={},k=le.htmlMode?Ce:W;for(var _ in k)S[_]=k[_];for(var _ in le)S[_]=le[_];var ie,P;function z(b,G){function N(ce){return G.tokenize=ce,ce(b,G)}var x=b.next();if(x=="<")return b.eat("!")?b.eat("[")?b.match("CDATA[")?N(M("atom","]]>")):null:b.match("--")?N(M("comment","-->")):b.match("DOCTYPE",!0,!0)?(b.eatWhile(/[\w\._\-]/),N(T(1))):null:b.eat("?")?(b.eatWhile(/[\w\._\-]/),G.tokenize=M("meta","?>"),"meta"):(ie=b.eat("/")?"closeTag":"openTag",G.tokenize=ue,"tag bracket");if(x=="&"){var V;return b.eat("#")?b.eat("x")?V=b.eatWhile(/[a-fA-F\d]/)&&b.eat(";"):V=b.eatWhile(/[\d]/)&&b.eat(";"):V=b.eatWhile(/[\w\.\-:]/)&&b.eat(";"),V?"atom":"error"}else return b.eatWhile(/[^&<]/),null}z.isInText=!0;function ue(b,G){var N=b.next();if(N==">"||N=="/"&&b.eat(">"))return G.tokenize=z,ie=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return ie="equals",null;if(N=="<"){G.tokenize=z,G.state=ge,G.tagName=G.tagStart=null;var x=G.tokenize(b,G);return x?x+" tag error":"tag error"}else return/[\'\"]/.test(N)?(G.tokenize=j(N),G.stringStartCol=b.column(),G.tokenize(b,G)):(b.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function j(b){var G=function(N,x){for(;!N.eol();)if(N.next()==b){x.tokenize=ue;break}return"string"};return G.isInAttribute=!0,G}function M(b,G){return function(N,x){for(;!N.eol();){if(N.match(G)){x.tokenize=z;break}N.next()}return b}}function T(b){return function(G,N){for(var x;(x=G.next())!=null;){if(x=="<")return N.tokenize=T(b+1),N.tokenize(G,N);if(x==">")if(b==1){N.tokenize=z;break}else return N.tokenize=T(b-1),N.tokenize(G,N)}return"meta"}}function A(b,G,N){this.prev=b.context,this.tagName=G,this.indent=b.indented,this.startOfLine=N,(S.doNotIndent.hasOwnProperty(G)||b.context&&b.context.noIndent)&&(this.noIndent=!0)}function X(b){b.context&&(b.context=b.context.prev)}function H(b,G){for(var N;;){if(!b.context)return;if(N=b.context.tagName,!S.contextGrabbers.hasOwnProperty(N)||!S.contextGrabbers[N].hasOwnProperty(G))return;X(b)}}function ge(b,G,N){return b=="openTag"?(N.tagStart=G.column(),Be):b=="closeTag"?Z:ge}function Be(b,G,N){return b=="word"?(N.tagName=G.current(),P="tag",F):S.allowMissingTagName&&b=="endTag"?(P="tag bracket",F(b,G,N)):(P="error",Be)}function Z(b,G,N){if(b=="word"){var x=G.current();return N.context&&N.context.tagName!=x&&S.implicitlyClosed.hasOwnProperty(N.context.tagName)&&X(N),N.context&&N.context.tagName==x||S.matchClosing===!1?(P="tag",ae):(P="tag error",Se)}else return S.allowMissingTagName&&b=="endTag"?(P="tag bracket",ae(b,G,N)):(P="error",Se)}function ae(b,G,N){return b!="endTag"?(P="error",ae):(X(N),ge)}function Se(b,G,N){return P="error",ae(b,G,N)}function F(b,G,N){if(b=="word")return P="attribute",Q;if(b=="endTag"||b=="selfcloseTag"){var x=N.tagName,V=N.tagStart;return N.tagName=N.tagStart=null,b=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(x)?H(N,x):(H(N,x),N.context=new A(N,x,V==N.indented)),ge}return P="error",F}function Q(b,G,N){return b=="equals"?we:(S.allowMissing||(P="error"),F(b,G,N))}function we(b,G,N){return b=="string"?B:b=="word"&&S.allowUnquoted?(P="string",F):(P="error",F(b,G,N))}function B(b,G,N){return b=="string"?B:F(b,G,N)}return{startState:function(b){var G={tokenize:z,state:ge,indented:b||0,tagName:null,tagStart:null,context:null};return b!=null&&(G.baseIndent=b),G},token:function(b,G){if(!G.tagName&&b.sol()&&(G.indented=b.indentation()),b.eatSpace())return null;ie=null;var N=G.tokenize(b,G);return(N||ie)&&N!="comment"&&(P=null,G.state=G.state(ie||N,b,G),P&&(N=P=="error"?N+" error":P)),N},indent:function(b,G,N){var x=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+ee;if(x&&x.noIndent)return L.Pass;if(b.tokenize!=ue&&b.tokenize!=z)return N?N.match(/^(\s*)/)[0].length:0;if(b.tagName)return S.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+ee*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(G))return 0;var V=G&&/^<(\/)?([\w_:\.-]*)/.exec(G);if(V&&V[1])for(;x;)if(x.tagName==V[2]){x=x.prev;break}else if(S.implicitlyClosed.hasOwnProperty(x.tagName))x=x.prev;else break;else if(V)for(;x;){var ce=S.contextGrabbers[x.tagName];if(ce&&ce.hasOwnProperty(V[2]))x=x.prev;else break}for(;x&&x.prev&&!x.startOfLine;)x=x.prev;return x?x.indent+ee:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(b){b.state==we&&(b.state=F)},xmlCurrentTag:function(b){return b.tagName?{name:b.tagName,close:b.type=="closeTag"}:null},xmlCurrentContext:function(b){for(var G=[],N=b.context;N;N=N.prev)N.tagName&&G.push(N.tagName);return G.reverse()}}}),L.defineMIME("text/xml","xml"),L.defineMIME("application/xml","xml"),L.mimeModes.hasOwnProperty("text/html")||L.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"389U":function(ft,We,g){"use strict";g.r(We);var L=g("+L6B"),Ce=g("2/Rp"),W=g("oBTY"),de=g("giR+"),le=g("fyUT"),ee=g("5Dmo"),S=g("3S7+"),k=g("sRBo"),_=g("kaz8"),ie=g("2qtc"),P=g("kLXV"),z=g("miYZ"),ue=g("tsqr"),j=g("k1fw"),M=g("9og8"),T=g("tJVT"),A=g("PpiC"),X=g("5NDa"),H=g("5rEg"),ge=g("OaEy"),Be=g("2fM7"),Z=g("WmNS"),ae=g.n(Z),Se=g("q1tI"),F=g.n(Se),Q=g("9kvl"),we=g("Ot1p"),B=g("HBuW"),b=g("LvDl"),G=g.n(b),N=g("bNIU"),x=g.n(N),V=g("9ZNV"),ce=g("fnXi"),$=g("nuEh"),Te=g("UqFu"),v=Be.a.Option,d=H.a.TextArea,O=function(q){var Le=q.shixunsDetail,Ie=q.dispatch,pe=q.match,Ne=q.practiceSetting,ve=Object(A.a)(q,["shixunsDetail","dispatch","match","practiceSetting"]),be=Object(Se.useState)({}),I=Object(T.a)(be,2),K=I[0],Ae=I[1],Je=Object(Se.useState)([]),xe=Object(T.a)(Je,2),ne=xe[0],Oe=xe[1],me=Object(Se.useState)(!1),he=Object(T.a)(me,2),Re=he[0],Ke=he[1],je=Object(Se.useRef)(null),ye=Object(Se.useRef)({editData:null,answerList:null}),Me=Object(Se.useState)(!0),Xe=Object(T.a)(Me,2),Ve=Xe[0],ze=Xe[1];Object(Se.useEffect)(function(){qe()},[]),Object(Se.useEffect)(function(){oe()},[K,ne]);var qe=function(){var re=Object(M.a)(ae.a.mark(function fe(){return ae.a.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return ze(!0),w.next=3,ut();case 3:return w.next=5,et();case 5:ze(!1);case 6:case"end":return w.stop()}},fe)}));return function(){return re.apply(this,arguments)}}(),ut=function(){var re=Object(M.a)(ae.a.mark(function fe(){var C;return ae.a.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,Object(B.E)({id:pe.params.id,challengeId:pe.params.challengesId,tab:2});case 2:C=p.sent,ye.current.editData=C,C&&Ae(C);case 5:case"end":return p.stop()}},fe)}));return function(){return re.apply(this,arguments)}}(),et=function(){var re=Object(M.a)(ae.a.mark(function fe(){var C,w;return ae.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Object(B.F)({id:pe.params.id,challengeId:pe.params.challengesId});case 2:C=c.sent,w=C.map(function(f){return Object(j.a)(Object(j.a)({},f),{},{contents:Object(Te.a)(f.contents)})}),ye.current.answerList=w,C&&Oe(w);case 6:case"end":return c.stop()}},fe)}));return function(){return re.apply(this,arguments)}}(),He=function(){var re=Object(M.a)(ae.a.mark(function fe(){var C,w,p;return ae.a.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(Ke(!0),C=ne.map(function(h){return h.score}),w=C.reduce(function(h,m){return h+m},0),!(w!==100&&ne!==null&&ne!==void 0&&ne.length)){f.next=7;break}return Ke(!1),ue.b.info("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),f.abrupt("return");case 7:if(ne.every(function(h){return h.name})){f.next=11;break}return Ke(!1),ue.b.info("\u8BF7\u5148\u586B\u5199\u53C2\u8003\u7B54\u6848\u540D\u79F0"),f.abrupt("return");case 11:if(ne.every(function(h){return h.contents})){f.next=15;break}return Ke(!1),ue.b.info("\u8BF7\u5148\u586B\u5199\u53C2\u8003\u7B54\u6848\u5185\u5BB9"),f.abrupt("return");case 15:return f.next=17,Object(B.Fb)({id:pe.params.id,challengeId:pe.params.challengesId,challenge_answer:ne,hide_answer:K==null?void 0:K.hide_answer,disable_copy:K==null?void 0:K.disable_copy});case 17:p=f.sent,Ke(!1),Ie({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}}),p!=null&&p.message&&ue.b.info(p.message),p.status===1&&Q.d.push("/shixuns/".concat(pe.params.id,"/edit/").concat(pe.params.challengesId,"/tab=4"));case 22:case"end":return f.stop()}},fe)}));return function(){return re.apply(this,arguments)}}(),oe=function(){clearTimeout(je.current),je.current=setTimeout(rt,500)},rt=function(){!Object(b.isEqual)(ye.current.editData,K)||!Object(b.isEqual)(ye.current.answerList,ne)?Ie({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}}):Ie({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})},$e=function(){var fe,C=function(){Q.d.push("/shixuns/".concat(pe.params.id,"/challenges")),Ie({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};Ne!=null&&(fe=Ne.sideBar)!==null&&fe!==void 0&&fe.confirmLeave?P.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){C()}}):C()};return F.a.createElement("section",{className:x.a.bg},F.a.createElement("div",{className:x.a.formWrap},F.a.createElement(ce.a,{activeIndex:2}),F.a.createElement("div",{className:x.a.check},F.a.createElement("div",null,F.a.createElement(_.a,{checked:K==null?void 0:K.hide_answer,onChange:function(fe){return Ae(Object(j.a)(Object(j.a)({},K),{},{hide_answer:fe.target.checked}))}},"\u9690\u85CF\u53C2\u8003\u7B54\u6848\u6A21\u5757")),F.a.createElement("div",null,F.a.createElement(_.a,{checked:K==null?void 0:K.disable_copy,onChange:function(fe){return Ae(Object(j.a)(Object(j.a)({},K),{},{disable_copy:fe.target.checked}))}},"\u7981\u6B62\u590D\u5236\u53C2\u8003\u7B54\u6848"))),F.a.createElement("div",{className:x.a.fieldWrap},F.a.createElement("p",null,"\u53EF\u4EE5\u5C06\u53C2\u8003\u7B54\u6848\u5206\u7EA7\u8BBE\u7F6E\uFF0C\u8BA9\u5B66\u5458\u81EA\u884C\u9009\u62E9\u7EA7\u522B\uFF0C\u6BCF\u7EA7\u67E5\u770B\u540E\u6309\u7167\u6BD4\u4F8B\u6263\u5206\u503C\uFF08\u5B66\u5458\u5DF2\u5B8C\u6210\u4EFB\u52A1\u518D\u67E5\u770B\uFF0C\u5219\u4E0D\u5F71\u54CD\u5B66\u5458\u5DF2\u83B7\u5F97\u7684\u6210\u7EE9\uFF09"),F.a.createElement("p",null,"\u793A\u4F8B\uFF1A\u7EA7\u522B1\uFF0C\u6263\u51CF\u5206\u503C\u5360\u6BD425%\uFF1B\u7EA7\u522B2\uFF0C\u6263\u51CF\u5206\u503C\u5360\u6BD435%\uFF1B\u7EA7\u522B3\uFF0C\u6263\u51CF\u5206\u503C\u5360\u6BD440%\uFF1B"),F.a.createElement("p",null,"\u82E5\u5B66\u5458\u9009\u62E9\u67E5\u770B\u7EA7\u522B1\u7684\u7B54\u6848\uFF0C\u5C06\u88AB\u6263\u51CF25%\u7684\u5206\u503C\uFF1B\u9009\u62E9\u67E5\u770B\u7EA7\u522B2\u7684\u7B54\u6848\uFF0C\u5C06\u88AB\u6263\u51CF60%\u7684\u5206\u503C\uFF1B\u9009\u62E9\u67E5\u770B\u7EA7\u522B3\u7684\u7B54\u6848\uFF0C\u5C06\u88AB\u6263\u51CF100%\u7684\u5206\u503C\u3002"),ne==null?void 0:ne.map(function(re,fe){return F.a.createElement("div",{key:fe,className:"mt30 pb5"},F.a.createElement("div",{className:x.a.flexRow},F.a.createElement("b",{className:"font16"},"\u7EA7\u522B\uFF1A",fe+1),F.a.createElement("div",{className:"tr flex1"},F.a.createElement(S.a,{placement:"bottom",title:"\u5220\u9664"},F.a.createElement("span",{className:"font14 c-red current",onClick:function(){var w=ne.filter(function(f,h){return h!==fe}),p=Math.floor(100/w.length),c=p+100%w.length;w=w.map(function(f,h){return h===w.length-1?Object(j.a)(Object(j.a)({},f),{},{score:c}):Object(j.a)(Object(j.a)({},f),{},{score:p})}),Oe(w)}},"\u5220\xA0\u9664")))),F.a.createElement("div",{className:x.a.contentWrap},F.a.createElement("div",{className:x.a.flexRow},F.a.createElement("div",null,F.a.createElement("p",{className:"font16"},"\u540D\u79F0\uFF1A"),F.a.createElement(H.a,{bordered:!1,value:re.name,onChange:function(w){var p=ne.map(function(c,f){return f===fe?Object(j.a)(Object(j.a)({},c),{},{name:w.target.value}):c});Oe(p)}})),F.a.createElement("div",{className:"ml10"},F.a.createElement("p",{className:"font16"},"\u6263\u51CF\u5206\u503C\u5360\u6BD4\uFF1A"),F.a.createElement(le.a,{min:0,max:100,value:re.score,onChange:function(w){var p=ne.map(function(c,f){return f===fe?Object(j.a)(Object(j.a)({},c),{},{score:w}):c});Oe(p)}})))),F.a.createElement("div",{className:"mt10 mb10"},F.a.createElement("div",{className:"font16 mb20"},"\u5185\u5BB9\uFF1A"),F.a.createElement(we.a,{placeholder:"\u5EFA\u8BAE\u63D0\u4F9B\u5305\u62EC\u6587\u4EF6\u6240\u6709\u4EE3\u7801\u7684\u5B8C\u6574\u7B54\u6848",defaultValue:re.contents,onChange:function(w){var p=ne.map(function(c,f){return f===fe?Object(j.a)(Object(j.a)({},c),{},{contents:w}):c});Oe(p)}})))}),F.a.createElement("div",null,F.a.createElement(Ce.a,{type:"primary",size:"large",ghost:!0,style:{width:200},className:"mt10",onClick:function(){var fe=[].concat(Object(W.a)(ne),[{name:"\u89E3\u9898\u601D\u8DEF".concat(ne.length+1),contents:"",score:0,id:null,level:null}]),C=Math.floor(100/fe.length),w=C+100%fe.length;fe=fe.map(function(p,c){return c===fe.length-1?Object(j.a)(Object(j.a)({},p),{},{score:w}):Object(j.a)(Object(j.a)({},p),{},{score:C})}),Oe(fe)}},"\u65B0\u589E\u53C2\u8003\u7B54\u6848")))),F.a.createElement(V.a,{onOk:He,className:"customFixedButton",onCancel:$e,loading:Re}),F.a.createElement($.a,{loading:Ve}))};We.default=Object(Q.a)(function(te){var q=te.shixunsDetail,Le=te.newCourse,Ie=te.globalSetting,pe=te.practiceSetting;return{shixunsDetail:q,newCourse:Le,globalSetting:Ie,practiceSetting:pe}})(O)},"7ahc":function(ft,We,g){"use strict";g.d(We,"a",function(){return Be});var L=g("k1fw"),Ce=g("0Owb"),W=g("+L6B"),de=g("2/Rp"),le=g("y8nQ"),ee=g("Vl3Y"),S=g("tJVT"),k=g("OaEy"),_=g("2fM7"),ie=g("q1tI"),P=g.n(ie),z=g("VrN/"),ue=g.n(z),j=g("p77/"),M=g.n(j),T=g("c5Ni"),A=g.n(T),X=_.a.Option,H={labelCol:{span:4},wrapperCol:{span:20}},ge={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"]};We.b=function(Z){var ae=Z.callback,Se=Z.onCancel,F=Object(ie.useState)("python"),Q=Object(S.a)(F,2),we=Q[0],B=Q[1];function b(N){B(ge[N][1])}function G(N){ae(N)}return P.a.createElement(ee.a,Object(Ce.a)({},H,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:G}),P.a.createElement(ee.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},P.a.createElement(_.a,{onChange:b},Object.keys(ge).map(function(N){return P.a.createElement(X,{key:N,value:N},ge[N][0])}))),P.a.createElement(ee.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},P.a.createElement(Be,{mode:we})),P.a.createElement("div",{className:"flex-container flex-end"},P.a.createElement(de.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),P.a.createElement(de.a,{type:"ghost",onClick:Se},"\u53D6\u6D88")))};function Be(Z){var ae=Z.value,Se=Z.onChange,F=Z.mode,Q=Z.options,we=Q===void 0?{}:Q,B=Object(ie.useRef)(),b=Object(ie.useState)(),G=Object(S.a)(b,2),N=G[0],x=G[1];return Object(ie.useEffect)(function(){if(N){function V(ce){var $=ce.getValue();Se&&Se($)}return N.on("change",V),function(){N.off("change",V)}}},[N,Se]),Object(ie.useEffect)(function(){N&&N.setOption("mode",F)},[N,F]),Object(ie.useEffect)(function(){N&&((ae!==N.getValue()||ae==="")&&setTimeout(function(){N.setValue(ae||" ")},300))},[N,ae]),Object(ie.useEffect)(function(){if(B.current&&!N){var V=ue.a.fromTextArea(B.current,Object(L.a)({mode:F,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},we));x(V)}},[B.current,N]),P.a.createElement("div",{className:"my-codemirror-container"},P.a.createElement("textarea",{ref:B}))}},"7ixt":function(ft,We,g){"use strict";g.d(We,"a",function(){return W});var L={adjustX:1,adjustY:1},Ce=[0,0],W={left:{points:["cr","cl"],overflow:L,offset:[-4,0],targetOffset:Ce},right:{points:["cl","cr"],overflow:L,offset:[4,0],targetOffset:Ce},top:{points:["bc","tc"],overflow:L,offset:[0,-4],targetOffset:Ce},bottom:{points:["tc","bc"],overflow:L,offset:[0,4],targetOffset:Ce},topLeft:{points:["bl","tl"],overflow:L,offset:[0,-4],targetOffset:Ce},leftTop:{points:["tr","tl"],overflow:L,offset:[-4,0],targetOffset:Ce},topRight:{points:["br","tr"],overflow:L,offset:[0,-4],targetOffset:Ce},rightTop:{points:["tl","tr"],overflow:L,offset:[4,0],targetOffset:Ce},bottomRight:{points:["tr","br"],overflow:L,offset:[0,4],targetOffset:Ce},rightBottom:{points:["bl","br"],overflow:L,offset:[4,0],targetOffset:Ce},bottomLeft:{points:["tl","bl"],overflow:L,offset:[0,4],targetOffset:Ce},leftBottom:{points:["br","bl"],overflow:L,offset:[-4,0],targetOffset:Ce}},de=W},"8EBN":function(ft,We,g){(function(L){L(g("VrN/"))})(function(L){"use strict";L.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 Ce=0;Ce<L.modeInfo.length;Ce++){var W=L.modeInfo[Ce];W.mimes&&(W.mime=W.mimes[0])}L.findModeByMIME=function(de){de=de.toLowerCase();for(var le=0;le<L.modeInfo.length;le++){var ee=L.modeInfo[le];if(ee.mime==de)return ee;if(ee.mimes){for(var S=0;S<ee.mimes.length;S++)if(ee.mimes[S]==de)return ee}}if(/\+xml$/.test(de))return L.findModeByMIME("application/xml");if(/\+json$/.test(de))return L.findModeByMIME("application/json")},L.findModeByExtension=function(de){de=de.toLowerCase();for(var le=0;le<L.modeInfo.length;le++){var ee=L.modeInfo[le];if(ee.ext){for(var S=0;S<ee.ext.length;S++)if(ee.ext[S]==de)return ee}}},L.findModeByFileName=function(de){for(var le=0;le<L.modeInfo.length;le++){var ee=L.modeInfo[le];if(ee.file&&ee.file.test(de))return ee}var S=de.lastIndexOf("."),k=S>-1&&de.substring(S+1,de.length);if(k)return L.findModeByExtension(k)},L.findModeByName=function(de){de=de.toLowerCase();for(var le=0;le<L.modeInfo.length;le++){var ee=L.modeInfo[le];if(ee.name.toLowerCase()==de)return ee;if(ee.alias){for(var S=0;S<ee.alias.length;S++)if(ee.alias[S].toLowerCase()==de)return ee}}}})},"93VE":function(ft,We,g){},"9Bee":function(ft,We,g){"use strict";var L=g("k1fw"),Ce=g("tJVT"),W=g("q1tI"),de=g.n(W),le=g("vg9a"),ee=g("DlQD"),S=g.n(ee),k=g("rUJ1");function _(O,te){var q=O.match(/^(\s+)(?:```)/);if(q===null)return te;var Le=q[1];return te.split(`
`).map(function(Ie){var pe=Ie.match(/^\s+/);if(pe===null)return Ie;var Ne=Object(Ce.a)(pe,1),ve=Ne[0];return ve.length>=Le.length?Ie.slice(Le.length):Ie}).join(`
`)}var ie=[],P=["<ul>"],z=new S.a.Renderer,ue=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function j(){ie.length=0,P=["<ul>"]}var M={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function T(O,te,q,Le){if(te>=O.length||O[te].level<=q)return te;var Ie=O[te];Le.push("<li><a href='#"+Ie.anchor+"'>"+Ie.text+"</a>"),te++;var pe=[];return te=T(O,te,Ie.level,pe),pe.length>0&&(Le.push("<ul>"),pe.forEach(function(Ne){Le.push(Ne)}),Le.push("</ul>")),Le.push("</li>"),te=T(O,te,q,Le),te}function A(){return T(ie,0,0,P),P.push("</ul>"),P.join("")}var X={heading:function(te){var q=ue.exec(te);if(q)return{type:"heading",raw:q[0],depth:q[1].length,text:q[2]}},fences:function(te){var q=this.rules.block.fences.exec(te);if(q){var Le=q[0],Ie=_(Le,q[3]||""),pe=q[2]?q[2].trim():q[2];if(["latex","katex","math"].indexOf(pe)>=0){var Ne=Be(),ve=Ie;Ie=Ne,Z[Ne]={type:"block",expression:ve}}return{type:"code",raw:Le,lang:pe,text:Ie}}}},H=/(?:\${2})([^\n`]+?)(?:\${2})/gi,ge=0,Be=function(){return"__special_katext_id_".concat(ge++,"__")},Z={};function ae(){return Z}function Se(){ge=0,Z={}}function F(O){return O=O.replace(H,function(te,q){var Le=Be();return Z[Le]={type:"inline",expression:q},Le}),O}var Q=z.listitem;z.listitem=function(O){return Q(F(O))};var we=z.paragraph;z.paragraph=function(O){return we(F(O))};var B=z.tablecell;z.tablecell=function(O,te){return B(F(O),te)},z.code=function(O,te,q){var Le=(te||"").match(/\S*/)[0];return Le?["latex","katex","math"].indexOf(Le)>=0?"<p class='editormd-tex'>".concat(O,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(te,'">').concat(q?O:Object(k.escape)(O,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(q?O:Object(k.escape)(O,!0))+"</code></pre>"},z.heading=function(O,te,q){var Le=this.options.headerPrefix+q.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ie.push({anchor:Le,level:te,text:O}),"<h"+te+' id="'+Le+'">'+O+"</h"+te+">"},S.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),S.a.use({tokenizer:X,renderer:z});var b=S.a,G=g("SJMd"),N=g("ulZh"),x=g.n(N),V=g("m3rI"),ce=g("Oy/b"),$=g("p5ED"),Te=/<pre[^>]*>/g;function v(O){var te=document.createElement("div");return te.innerHTML=O,te.childNodes.length===0?"":te.childNodes[0].nodeValue}var d=We.a=function(O){var te,q=O.value,Le=q===void 0?"":q,Ie=O.className,pe=O.showTextOnly,Ne=O.showLines,ve=O.style,be=ve===void 0?{}:ve,I=O.stylesPrev,K=I===void 0?{}:I,Ae=(te=String(Le))===null||te===void 0?void 0:te.replace(/<script.*?>|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),Je=Object(W.useState)(""),xe=Object(Ce.a)(Je,2),ne=xe[0],Oe=xe[1],me=Object(W.useMemo)(function(){try{var je=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ye=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Me=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ae=Ae.replace(je,"("+V.a.API_SERVER+"/api/attachments/").replace(ye,'"'+V.a.API_SERVER+"/api/attachments/").replace(Me,'"'+V.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),Ae=Ae.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(qe){}var Xe=b(Ae),Ve=ae();if(Ae.match(/\[TOC\]/)&&(Xe=Xe.replace("<p>[TOC]</p>",A()),j()),Xe=Xe.replace(/(__special_katext_id_\d+__)/g,function(qe,ut){var et=Ve[ut],He=et.type,oe=et.expression;return Object(ce.renderToString)(v(oe)||"",{displayMode:He==="block",throwOnError:!1,output:"html"})}),Xe=Xe.replace(/▁/g,"\u2581\u2581\u2581"),Se(),pe){var ze=document.createElement("div");return ze.innerHTML=Xe,ze.innerText}return setTimeout(function(){return Ke()},500),Xe},[Ae]),he=Object(W.useRef)();M.WebkitLineClamp=Ne,Ne&&(be=Object(L.a)(Object(L.a)({},be),M));function Re(je){var ye=je.target;if(ye.tagName.toUpperCase()==="A"){var Me=ye.getAttribute("href");if(Me.indexOf("office")>-1)je.preventDefault(),Oe(Me);else if(Me.startsWith("#")){je.preventDefault();var Xe=document.getElementById(Me.replace("#",""));Xe&&Xe.scrollIntoView(!0)}}}var Ke=function(){var ye,Me=(ye=he.current)===null||ye===void 0?void 0:ye.querySelectorAll("video");Me==null||Me.forEach(function(Xe){if(Xe.oncontextmenu=function(){return!1},Xe.src.indexOf(".m3u8")>-1&&!Xe.canPlayType("application/vnd.apple.mpegurl")){if(x.a.isSupported()){var Ve=new x.a;Ve.loadSource(Xe.src),Ve.attachMedia(Xe)}}})};return Object(W.useEffect)(function(){if(he.current&&me&&(me.match(Te)&&window.PR.prettyPrint()),he.current)return he.current.addEventListener("click",Re),function(){he.current.removeEventListener("click",Re),Se(),j()}},[me,he.current,Re]),de.a.createElement(de.a.Fragment,null,de.a.createElement("div",{ref:he,style:Object(L.a)({},be),className:"".concat(Ie||""," markdown-body "),dangerouslySetInnerHTML:{__html:me}}),de.a.createElement($.a,{close:!0,data:ne,type:ne!=null&&ne.length?"office":"",style:Object(L.a)({},K),onClose:function(){return Oe("")}}))}},"9VGf":function(ft,We,g){"use strict";g.d(We,"a",function(){return W});var L=g("q1tI"),Ce=g.n(L);function W(de,le){var ee=Object(L.useRef)();Object(L.useEffect)(function(){ee.current=de}),Object(L.useEffect)(function(){function S(){ee.current()}if(le!==null){var k=setInterval(S,le);return function(){return clearInterval(k)}}},[le])}},"9ZNV":function(ft,We,g){"use strict";g.d(We,"a",function(){return ie});var L=g("0Owb"),Ce=g("+L6B"),W=g("2/Rp"),de=g("q1tI"),le=g.n(de),ee=g("UUDw"),S=g.n(ee),k=g("TSYQ"),_=g.n(k),ie=function(z){var ue=z.cancelText,j=ue===void 0?"\u53D6\u6D88":ue,M=z.okText,T=M===void 0?"\u786E\u5B9A":M,A=z.loading,X=A===void 0?!1:A,H=z.hasOkBtn,ge=H===void 0?!0:H,Be=z.okButtonProps,Z=Be===void 0?{}:Be,ae=z.onCancel,Se=ae===void 0?function(){}:ae,F=z.onOk,Q=F===void 0?function(){}:F,we=z.className,B=we===void 0?"":we;return le.a.createElement("div",{className:_()(S.a.buttonFixed,B)},le.a.createElement("div",{className:S.a.buttonWrap},le.a.createElement(W.a,{size:"large",className:"".concat(S.a.button," mr20"),onClick:Se},j),ge&&le.a.createElement(W.a,Object(L.a)({size:"large",type:"primary",className:"".concat(S.a.button," mr20"),loading:X,onClick:Q},Z),T)))}},Bd2K:function(ft,We,g){(function(L){L(g("VrN/"),g("osHv"))})(function(L){L.defineOption("autoCloseTags",!1,function(_,ie,P){if(P!=L.Init&&P&&_.removeKeyMap("autoCloseTags"),!ie)return;var z={name:"autoCloseTags"};(typeof ie!="object"||ie.whenClosing!==!1)&&(z["'/'"]=function(ue){return ee(ue)}),(typeof ie!="object"||ie.whenOpening!==!1)&&(z["'>'"]=function(ue){return de(ue)}),_.addKeyMap(z)});var Ce=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],W=["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 de(_){if(_.getOption("disableInput"))return L.Pass;for(var ie=_.listSelections(),P=[],z=_.getOption("autoCloseTags"),ue=0;ue<ie.length;ue++){if(!ie[ue].empty())return L.Pass;var j=ie[ue].head,M=_.getTokenAt(j),T=L.innerMode(_.getMode(),M.state),A=T.state,X=T.mode.xmlCurrentTag&&T.mode.xmlCurrentTag(A),H=X&&X.name;if(!H)return L.Pass;var ge=T.mode.configuration=="html",Be=typeof z=="object"&&z.dontCloseTags||ge&&Ce,Z=typeof z=="object"&&z.indentTags||ge&&W;M.end>j.ch&&(H=H.slice(0,H.length-M.end+j.ch));var ae=H.toLowerCase();if(!H||M.type=="string"&&(M.end!=j.ch||!/[\"\']/.test(M.string.charAt(M.string.length-1))||M.string.length==1)||M.type=="tag"&&X.close||M.string.indexOf("/")==j.ch-M.start-1||Be&&S(Be,ae)>-1||k(_,T.mode.xmlCurrentContext&&T.mode.xmlCurrentContext(A)||[],H,j,!0))return L.Pass;var Se=typeof z=="object"&&z.emptyTags;if(Se&&S(Se,H)>-1){P[ue]={text:"/>",newPos:L.Pos(j.line,j.ch+2)};continue}var F=Z&&S(Z,ae)>-1;P[ue]={indent:F,text:">"+(F?`
`:"")+"</"+H+">",newPos:F?L.Pos(j.line+1,0):L.Pos(j.line,j.ch+1)}}for(var Q=typeof z=="object"&&z.dontIndentOnAutoClose,ue=ie.length-1;ue>=0;ue--){var we=P[ue];_.replaceRange(we.text,ie[ue].head,ie[ue].anchor,"+insert");var B=_.listSelections().slice(0);B[ue]={head:we.newPos,anchor:we.newPos},_.setSelections(B),!Q&&we.indent&&(_.indentLine(we.newPos.line,null,!0),_.indentLine(we.newPos.line+1,null,!0))}}function le(_,ie){for(var P=_.listSelections(),z=[],ue=ie?"/":"</",j=_.getOption("autoCloseTags"),M=typeof j=="object"&&j.dontIndentOnSlash,T=0;T<P.length;T++){if(!P[T].empty())return L.Pass;var A=P[T].head,X=_.getTokenAt(A),H=L.innerMode(_.getMode(),X.state),ge=H.state;if(ie&&(X.type=="string"||X.string.charAt(0)!="<"||X.start!=A.ch-1))return L.Pass;var Be,Z=H.mode.name!="xml"&&_.getMode().name=="htmlmixed";if(Z&&H.mode.name=="javascript")Be=ue+"script";else if(Z&&H.mode.name=="css")Be=ue+"style";else{var ae=H.mode.xmlCurrentContext&&H.mode.xmlCurrentContext(ge);if(!ae||ae.length&&k(_,ae,ae[ae.length-1],A))return L.Pass;Be=ue+ae[ae.length-1]}_.getLine(A.line).charAt(X.end)!=">"&&(Be+=">"),z[T]=Be}if(_.replaceSelections(z),P=_.listSelections(),!M)for(var T=0;T<P.length;T++)(T==P.length-1||P[T].head.line<P[T+1].head.line)&&_.indentLine(P[T].head.line)}function ee(_){return _.getOption("disableInput")?L.Pass:le(_,!0)}L.commands.closeTag=function(_){return le(_)};function S(_,ie){if(_.indexOf)return _.indexOf(ie);for(var P=0,z=_.length;P<z;++P)if(_[P]==ie)return P;return-1}function k(_,ie,P,z,ue){if(!L.scanForClosingTag)return!1;var j=Math.min(_.lastLine()+1,z.line+500),M=L.scanForClosingTag(_,z,null,j);if(!M||M.tag!=P)return!1;for(var T=ue?1:0,A=ie.length-1;A>=0&&ie[A]==P;A--)++T;z=M.to;for(var A=1;A<T;A++){var X=L.scanForClosingTag(_,z,null,j);if(!X||X.tag!=P)return!1;z=X.to}return!0}})},BjJ7:function(ft,We,g){"use strict";g.d(We,"d",function(){return Ce}),g.d(We,"c",function(){return W}),g.d(We,"e",function(){return de}),g.d(We,"b",function(){return le}),g.d(We,"a",function(){return S});var L=g("m3rI");function Ce(k){var _=!0;if(k.length>0){for(var ie=0;ie<k.length;ie++)if(k[ie].compile_success==0||!k[ie].compile_success){_=!1;break}}else _=!1;return _}function W(k){for(var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ie=[],P=0;P<k.length;P++){var z=k[P],ue=_?"".concat(_,"/").concat(z.name):"".concat(z.name);ie.push({title:z.name,isLeaf:!(z.type==="tree"),key:ue})}return ie}function de(k,_,ie){for(var P=0;P<k.length;P++){var z=k[P];if(z.key===_){z.children=ie;break}z.children&&de(z.children,_,ie)}return k}function le(k,_,ie){var P;return function(){var z=this,ue=arguments,j=function(){P=null,ie||k.apply(z,ue)},M=ie&&!P;clearTimeout(P),P=setTimeout(j,_),M&&k.apply(z,ue)}}var ee=!0,S=L.a.API_SERVER},"C+DQ":function(ft,We,g){},DlQD:function(ft,We,g){(function(L,Ce){ft.exports=Ce()})(this,function(){"use strict";function L(C,w){for(var p=0;p<w.length;p++){var c=w[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(C,c.key,c)}}function Ce(C,w,p){return w&&L(C.prototype,w),p&&L(C,p),C}function W(C,w){if(!C)return;if(typeof C=="string")return de(C,w);var p=Object.prototype.toString.call(C).slice(8,-1);if(p==="Object"&&C.constructor&&(p=C.constructor.name),p==="Map"||p==="Set")return Array.from(C);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return de(C,w)}function de(C,w){(w==null||w>C.length)&&(w=C.length);for(var p=0,c=new Array(w);p<w;p++)c[p]=C[p];return c}function le(C,w){var p;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(p=W(C))||w&&C&&typeof C.length=="number"){p&&(C=p);var c=0;return function(){return c>=C.length?{done:!0}:{done:!1,value:C[c++]}}}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 p=C[Symbol.iterator](),p.next.bind(p)}function ee(C,w){return w={exports:{}},C(w,w.exports),w.exports}var S=ee(function(C){function w(){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 p(c){C.exports.defaults=c}C.exports={defaults:w(),getDefaults:w,changeDefaults:p}}),k=S.defaults,_=S.getDefaults,ie=S.changeDefaults,P=/[&<>"']/,z=/[&<>"']/g,ue=/[<>"']|&(?!#?\w+;)/,j=/[<>"']|&(?!#?\w+;)/g,M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},T=function(w){return M[w]};function A(C,w){if(w){if(P.test(C))return C.replace(z,T)}else if(ue.test(C))return C.replace(j,T);return C}var X=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function H(C){return C.replace(X,function(w,p){return p=p.toLowerCase(),p==="colon"?":":p.charAt(0)==="#"?p.charAt(1)==="x"?String.fromCharCode(parseInt(p.substring(2),16)):String.fromCharCode(+p.substring(1)):""})}var ge=/(^|[^\[])\^/g;function Be(C,w){C=C.source||C,w=w||"";var p={replace:function(f,h){return h=h.source||h,h=h.replace(ge,"$1"),C=C.replace(f,h),p},getRegex:function(){return new RegExp(C,w)}};return p}var Z=/[^\w:]/g,ae=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Se(C,w,p){if(C){var c;try{c=decodeURIComponent(H(p)).replace(Z,"").toLowerCase()}catch(f){return null}if(c.indexOf("javascript:")===0||c.indexOf("vbscript:")===0||c.indexOf("data:")===0)return null}w&&!ae.test(p)&&(p=b(w,p));try{p=encodeURI(p).replace(/%25/g,"%")}catch(f){return null}return p}var F={},Q=/^[^:]+:\/*[^/]*$/,we=/^([^:]+:)[\s\S]*$/,B=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(C,w){F[" "+C]||(Q.test(C)?F[" "+C]=C+"/":F[" "+C]=V(C,"/",!0)),C=F[" "+C];var p=C.indexOf(":")===-1;return w.substring(0,2)==="//"?p?w:C.replace(we,"$1")+w:w.charAt(0)==="/"?p?w:C.replace(B,"$1")+w:C+w}var G={exec:function(){}};function N(C){for(var w=1,p,c;w<arguments.length;w++){p=arguments[w];for(c in p)Object.prototype.hasOwnProperty.call(p,c)&&(C[c]=p[c])}return C}function x(C,w){var p=C.replace(/\|/g,function(h,m,R){for(var Y=!1,Ee=m;--Ee>=0&&R[Ee]==="\\";)Y=!Y;return Y?"|":" |"}),c=p.split(/ \|/),f=0;if(c.length>w)c.splice(w);else for(;c.length<w;)c.push("");for(;f<c.length;f++)c[f]=c[f].trim().replace(/\\\|/g,"|");return c}function V(C,w,p){var c=C.length;if(c===0)return"";for(var f=0;f<c;){var h=C.charAt(c-f-1);if(h===w&&!p)f++;else if(h!==w&&p)f++;else break}return C.substr(0,c-f)}function ce(C,w){if(C.indexOf(w[1])===-1)return-1;for(var p=C.length,c=0,f=0;f<p;f++)if(C[f]==="\\")f++;else if(C[f]===w[0])c++;else if(C[f]===w[1]&&(c--,c<0))return f;return-1}function $(C){C&&C.sanitize&&!C.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 Te={escape:A,unescape:H,edit:Be,cleanUrl:Se,resolveUrl:b,noopTest:G,merge:N,splitCells:x,rtrim:V,findClosingBracket:ce,checkSanitizeDeprecation:$},v=S.defaults,d=Te.rtrim,O=Te.splitCells,te=Te.escape,q=Te.findClosingBracket;function Le(C,w,p){var c=w.href,f=w.title?te(w.title):null,h=C[1].replace(/\\([\[\]])/g,"$1");return C[0].charAt(0)!=="!"?{type:"link",raw:p,href:c,title:f,text:h}:{type:"image",raw:p,href:c,title:f,text:te(h)}}function Ie(C,w){var p=C.match(/^(\s+)(?:```)/);if(p===null)return w;var c=p[1];return w.split(`
`).map(function(f){var h=f.match(/^\s+/);if(h===null)return f;var m=h[0];return m.length>=c.length?f.slice(c.length):f}).join(`
`)}var pe=function(){function C(p){this.options=p||v}var w=C.prototype;return w.space=function(c){var f=this.rules.block.newline.exec(c);if(f)return f[0].length>1?{type:"space",raw:f[0]}:{raw:`
`}},w.code=function(c,f){var h=this.rules.block.code.exec(c);if(h){var m=f[f.length-1];if(m&&m.type==="paragraph")return{raw:h[0],text:h[0].trimRight()};var R=h[0].replace(/^ {4}/gm,"");return{type:"code",raw:h[0],codeBlockStyle:"indented",text:this.options.pedantic?R:d(R,`
`)}}},w.fences=function(c){var f=this.rules.block.fences.exec(c);if(f){var h=f[0],m=Ie(h,f[3]||"");return{type:"code",raw:h,lang:f[2]?f[2].trim():f[2],text:m}}},w.heading=function(c){var f=this.rules.block.heading.exec(c);if(f)return{type:"heading",raw:f[0],depth:f[1].length,text:f[2]}},w.nptable=function(c){var f=this.rules.block.nptable.exec(c);if(f){var h={type:"table",header:O(f[1].replace(/^ *| *\| *$/g,"")),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3]?f[3].replace(/\n$/,"").split(`
`):[],raw:f[0]};if(h.header.length===h.align.length){var m=h.align.length,R;for(R=0;R<m;R++)/^ *-+: *$/.test(h.align[R])?h.align[R]="right":/^ *:-+: *$/.test(h.align[R])?h.align[R]="center":/^ *:-+ *$/.test(h.align[R])?h.align[R]="left":h.align[R]=null;for(m=h.cells.length,R=0;R<m;R++)h.cells[R]=O(h.cells[R],h.header.length);return h}}},w.hr=function(c){var f=this.rules.block.hr.exec(c);if(f)return{type:"hr",raw:f[0]}},w.blockquote=function(c){var f=this.rules.block.blockquote.exec(c);if(f){var h=f[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:f[0],text:h}}},w.list=function(c){var f=this.rules.block.list.exec(c);if(f){for(var h=f[0],m=f[2],R=m.length>1,Y=m[m.length-1]===")",Ee={type:"list",raw:h,ordered:R,start:R?+m.slice(0,-1):"",loose:!1,items:[]},tt=f[0].match(this.rules.block.item),nt=!1,ot,xt,bt,ht,Ut,_t,Ht,Rt=tt.length,yt=0;yt<Rt;yt++)ot=tt[yt],h=ot,xt=ot.length,ot=ot.replace(/^ *([*+-]|\d+[.)]) */,""),~ot.indexOf(`
`)&&(xt-=ot.length,ot=this.options.pedantic?ot.replace(/^ {1,4}/gm,""):ot.replace(new RegExp("^ {1,"+xt+"}","gm"),"")),yt!==Rt-1&&(bt=this.rules.block.bullet.exec(tt[yt+1])[0],(R?bt.length===1||!Y&&bt[bt.length-1]===")":bt.length>1||this.options.smartLists&&bt!==m)&&(ht=tt.slice(yt+1).join(`
`),Ee.raw=Ee.raw.substring(0,Ee.raw.length-ht.length),yt=Rt-1)),Ut=nt||/\n\n(?!\s*$)/.test(ot),yt!==Rt-1&&(nt=ot.charAt(ot.length-1)===`
`,Ut||(Ut=nt)),Ut&&(Ee.loose=!0),_t=/^\[[ xX]\] /.test(ot),Ht=void 0,_t&&(Ht=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),Ee.items.push({type:"list_item",raw:h,task:_t,checked:Ht,loose:Ut,text:ot});return Ee}},w.html=function(c){var f=this.rules.block.html.exec(c);if(f)return{type:this.options.sanitize?"paragraph":"html",raw:f[0],pre:!this.options.sanitizer&&(f[1]==="pre"||f[1]==="script"||f[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(f[0]):te(f[0]):f[0]}},w.def=function(c){var f=this.rules.block.def.exec(c);if(f){f[3]&&(f[3]=f[3].substring(1,f[3].length-1));var h=f[1].toLowerCase().replace(/\s+/g," ");return{tag:h,raw:f[0],href:f[2],title:f[3]}}},w.table=function(c){var f=this.rules.block.table.exec(c);if(f){var h={type:"table",header:O(f[1].replace(/^ *| *\| *$/g,"")),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3]?f[3].replace(/\n$/,"").split(`
`):[]};if(h.header.length===h.align.length){h.raw=f[0];var m=h.align.length,R;for(R=0;R<m;R++)/^ *-+: *$/.test(h.align[R])?h.align[R]="right":/^ *:-+: *$/.test(h.align[R])?h.align[R]="center":/^ *:-+ *$/.test(h.align[R])?h.align[R]="left":h.align[R]=null;for(m=h.cells.length,R=0;R<m;R++)h.cells[R]=O(h.cells[R].replace(/^ *\| *| *\| *$/g,""),h.header.length);return h}}},w.lheading=function(c){var f=this.rules.block.lheading.exec(c);if(f)return{type:"heading",raw:f[0],depth:f[2].charAt(0)==="="?1:2,text:f[1]}},w.paragraph=function(c){var f=this.rules.block.paragraph.exec(c);if(f)return{type:"paragraph",raw:f[0],text:f[1].charAt(f[1].length-1)===`
`?f[1].slice(0,-1):f[1]}},w.text=function(c,f){var h=this.rules.block.text.exec(c);if(h){var m=f[f.length-1];return m&&m.type==="text"?{raw:h[0],text:h[0]}:{type:"text",raw:h[0],text:h[0]}}},w.escape=function(c){var f=this.rules.inline.escape.exec(c);if(f)return{type:"escape",raw:f[0],text:te(f[1])}},w.tag=function(c,f,h){var m=this.rules.inline.tag.exec(c);if(m)return!f&&/^<a /i.test(m[0])?f=!0:f&&/^<\/a>/i.test(m[0])&&(f=!1),!h&&/^<(pre|code|kbd|script)(\s|>)/i.test(m[0])?h=!0:h&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(m[0])&&(h=!1),{type:this.options.sanitize?"text":"html",raw:m[0],inLink:f,inRawBlock:h,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(m[0]):te(m[0]):m[0]}},w.link=function(c){var f=this.rules.inline.link.exec(c);if(f){var h=q(f[2],"()");if(h>-1){var m=f[0].indexOf("!")===0?5:4,R=m+f[1].length+h;f[2]=f[2].substring(0,h),f[0]=f[0].substring(0,R).trim(),f[3]=""}var Y=f[2],Ee="";if(this.options.pedantic){var tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Y);tt?(Y=tt[1],Ee=tt[3]):Ee=""}else Ee=f[3]?f[3].slice(1,-1):"";Y=Y.trim().replace(/^<([\s\S]*)>$/,"$1");var nt=Le(f,{href:Y&&Y.replace(this.rules.inline._escapes,"$1"),title:Ee&&Ee.replace(this.rules.inline._escapes,"$1")},f[0]);return nt}},w.reflink=function(c,f){var h;if((h=this.rules.inline.reflink.exec(c))||(h=this.rules.inline.nolink.exec(c))){var m=(h[2]||h[1]).replace(/\s+/g," ");if(m=f[m.toLowerCase()],!m||!m.href){var R=h[0].charAt(0);return{type:"text",raw:R,text:R}}var Y=Le(h,m,h[0]);return Y}},w.strong=function(c,f,h){h===void 0&&(h="");var m=this.rules.inline.strong.start.exec(c);if(m&&(!m[1]||m[1]&&(h===""||this.rules.inline.punctuation.exec(h)))){f=f.slice(-1*c.length);var R=m[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;R.lastIndex=0;for(var Y;(m=R.exec(f))!=null;)if(Y=this.rules.inline.strong.middle.exec(f.slice(0,m.index+3)),Y)return{type:"strong",raw:c.slice(0,Y[0].length),text:c.slice(2,Y[0].length-2)}}},w.em=function(c,f,h){h===void 0&&(h="");var m=this.rules.inline.em.start.exec(c);if(m&&(!m[1]||m[1]&&(h===""||this.rules.inline.punctuation.exec(h)))){f=f.slice(-1*c.length);var R=m[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;R.lastIndex=0;for(var Y;(m=R.exec(f))!=null;)if(Y=this.rules.inline.em.middle.exec(f.slice(0,m.index+2)),Y)return{type:"em",raw:c.slice(0,Y[0].length),text:c.slice(1,Y[0].length-1)}}},w.codespan=function(c){var f=this.rules.inline.code.exec(c);if(f){var h=f[2].replace(/\n/g," "),m=/[^ ]/.test(h),R=h.startsWith(" ")&&h.endsWith(" ");return m&&R&&(h=h.substring(1,h.length-1)),h=te(h,!0),{type:"codespan",raw:f[0],text:h}}},w.br=function(c){var f=this.rules.inline.br.exec(c);if(f)return{type:"br",raw:f[0]}},w.del=function(c){var f=this.rules.inline.del.exec(c);if(f)return{type:"del",raw:f[0],text:f[1]}},w.autolink=function(c,f){var h=this.rules.inline.autolink.exec(c);if(h){var m,R;return h[2]==="@"?(m=te(this.options.mangle?f(h[1]):h[1]),R="mailto:"+m):(m=te(h[1]),R=m),{type:"link",raw:h[0],text:m,href:R,tokens:[{type:"text",raw:m,text:m}]}}},w.url=function(c,f){var h;if(h=this.rules.inline.url.exec(c)){var m,R;if(h[2]==="@")m=te(this.options.mangle?f(h[0]):h[0]),R="mailto:"+m;else{var Y;do Y=h[0],h[0]=this.rules.inline._backpedal.exec(h[0])[0];while(Y!==h[0]);m=te(h[0]),h[1]==="www."?R="http://"+m:R=m}return{type:"link",raw:h[0],text:m,href:R,tokens:[{type:"text",raw:m,text:m}]}}},w.inlineText=function(c,f,h){var m=this.rules.inline.text.exec(c);if(m){var R;return f?R=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(m[0]):te(m[0]):m[0]:R=te(this.options.smartypants?h(m[0]):m[0]),{type:"text",raw:m[0],text:R}}},C}(),Ne=Te.noopTest,ve=Te.edit,be=Te.merge,I={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:Ne,table:Ne,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};I._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,I._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,I.def=ve(I.def).replace("label",I._label).replace("title",I._title).getRegex(),I.bullet=/(?:[*+-]|\d{1,9}[.)])/,I.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,I.item=ve(I.item,"gm").replace(/bull/g,I.bullet).getRegex(),I.list=ve(I.list).replace(/bull/g,I.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+I.def.source+")").getRegex(),I._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",I._comment=/<!--(?!-?>)[\s\S]*?-->/,I.html=ve(I.html,"i").replace("comment",I._comment).replace("tag",I._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),I.paragraph=ve(I._paragraph).replace("hr",I.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",I._tag).getRegex(),I.blockquote=ve(I.blockquote).replace("paragraph",I.paragraph).getRegex(),I.normal=be({},I),I.gfm=be({},I.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*|$)"}),I.gfm.nptable=ve(I.gfm.nptable).replace("hr",I.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",I._tag).getRegex(),I.gfm.table=ve(I.gfm.table).replace("hr",I.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",I._tag).getRegex(),I.pedantic=be({},I.normal,{html:ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",I._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:Ne,paragraph:ve(I.normal._paragraph).replace("hr",I.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",I.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var K={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ne,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:Ne,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};K._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",K.punctuation=ve(K.punctuation).replace(/punctuation/g,K._punctuation).getRegex(),K._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",K._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",K.em.start=ve(K.em.start).replace(/punctuation/g,K._punctuation).getRegex(),K.em.middle=ve(K.em.middle).replace(/punctuation/g,K._punctuation).replace(/overlapSkip/g,K._overlapSkip).getRegex(),K.em.endAst=ve(K.em.endAst,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.em.endUnd=ve(K.em.endUnd,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.strong.start=ve(K.strong.start).replace(/punctuation/g,K._punctuation).getRegex(),K.strong.middle=ve(K.strong.middle).replace(/punctuation/g,K._punctuation).replace(/blockSkip/g,K._blockSkip).getRegex(),K.strong.endAst=ve(K.strong.endAst,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.strong.endUnd=ve(K.strong.endUnd,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.blockSkip=ve(K._blockSkip,"g").getRegex(),K.overlapSkip=ve(K._overlapSkip,"g").getRegex(),K._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,K._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,K._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])?)+(?![-_])/,K.autolink=ve(K.autolink).replace("scheme",K._scheme).replace("email",K._email).getRegex(),K._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,K.tag=ve(K.tag).replace("comment",I._comment).replace("attribute",K._attribute).getRegex(),K._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,K._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,K._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,K.link=ve(K.link).replace("label",K._label).replace("href",K._href).replace("title",K._title).getRegex(),K.reflink=ve(K.reflink).replace("label",K._label).getRegex(),K.reflinkSearch=ve(K.reflinkSearch,"g").replace("reflink",K.reflink).replace("nolink",K.nolink).getRegex(),K.normal=be({},K),K.pedantic=be({},K.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:ve(/^!?\[(label)\]\((.*?)\)/).replace("label",K._label).getRegex(),reflink:ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",K._label).getRegex()}),K.gfm=be({},K.normal,{escape:ve(K.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),K.gfm.url=ve(K.gfm.url,"i").replace("email",K.gfm._extended_email).getRegex(),K.breaks=be({},K.gfm,{br:ve(K.br).replace("{2,}","*").getRegex(),text:ve(K.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ae={block:I,inline:K},Je=S.defaults,xe=Ae.block,ne=Ae.inline;function Oe(C){return C.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 me(C){var w="",p,c,f=C.length;for(p=0;p<f;p++)c=C.charCodeAt(p),Math.random()>.5&&(c="x"+c.toString(16)),w+="&#"+c+";";return w}var he=function(){function C(p){this.tokens=[],this.tokens.links=Object.create(null),this.options=p||Je,this.options.tokenizer=this.options.tokenizer||new pe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var c={block:xe.normal,inline:ne.normal};this.options.pedantic?(c.block=xe.pedantic,c.inline=ne.pedantic):this.options.gfm&&(c.block=xe.gfm,this.options.breaks?c.inline=ne.breaks:c.inline=ne.gfm),this.tokenizer.rules=c}C.lex=function(c,f){var h=new C(f);return h.lex(c)};var w=C.prototype;return w.lex=function(c){return c=c.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(c,this.tokens,!0),this.inline(this.tokens),this.tokens},w.blockTokens=function(c,f,h){f===void 0&&(f=[]),h===void 0&&(h=!0),c=c.replace(/^ +$/gm,"");for(var m,R,Y,Ee;c;){if(m=this.tokenizer.space(c)){c=c.substring(m.raw.length),m.type&&f.push(m);continue}if(m=this.tokenizer.code(c,f)){c=c.substring(m.raw.length),m.type?f.push(m):(Ee=f[f.length-1],Ee.raw+=`
`+m.raw,Ee.text+=`
`+m.text);continue}if(m=this.tokenizer.fences(c)){c=c.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.heading(c)){c=c.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.nptable(c)){c=c.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.hr(c)){c=c.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.blockquote(c)){c=c.substring(m.raw.length),m.tokens=this.blockTokens(m.text,[],h),f.push(m);continue}if(m=this.tokenizer.list(c)){for(c=c.substring(m.raw.length),Y=m.items.length,R=0;R<Y;R++)m.items[R].tokens=this.blockTokens(m.items[R].text,[],!1);f.push(m);continue}if(m=this.tokenizer.html(c)){c=c.substring(m.raw.length),f.push(m);continue}if(h&&(m=this.tokenizer.def(c))){c=c.substring(m.raw.length),this.tokens.links[m.tag]||(this.tokens.links[m.tag]={href:m.href,title:m.title});continue}if(m=this.tokenizer.table(c)){c=c.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.lheading(c)){c=c.substring(m.raw.length),f.push(m);continue}if(h&&(m=this.tokenizer.paragraph(c))){c=c.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.text(c,f)){c=c.substring(m.raw.length),m.type?f.push(m):(Ee=f[f.length-1],Ee.raw+=`
`+m.raw,Ee.text+=`
`+m.text);continue}if(c){var tt="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return f},w.inline=function(c){var f,h,m,R,Y,Ee,tt=c.length;for(f=0;f<tt;f++){Ee=c[f];switch(Ee.type){case"paragraph":case"text":case"heading":{Ee.tokens=[],this.inlineTokens(Ee.text,Ee.tokens);break}case"table":{for(Ee.tokens={header:[],cells:[]},R=Ee.header.length,h=0;h<R;h++)Ee.tokens.header[h]=[],this.inlineTokens(Ee.header[h],Ee.tokens.header[h]);for(R=Ee.cells.length,h=0;h<R;h++)for(Y=Ee.cells[h],Ee.tokens.cells[h]=[],m=0;m<Y.length;m++)Ee.tokens.cells[h][m]=[],this.inlineTokens(Y[m],Ee.tokens.cells[h][m]);break}case"blockquote":{this.inline(Ee.tokens);break}case"list":{for(R=Ee.items.length,h=0;h<R;h++)this.inline(Ee.items[h].tokens);break}}}return c},w.inlineTokens=function(c,f,h,m,R){f===void 0&&(f=[]),h===void 0&&(h=!1),m===void 0&&(m=!1),R===void 0&&(R="");var Y,Ee=c,tt;if(this.tokens.links){var nt=Object.keys(this.tokens.links);if(nt.length>0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(Ee))!=null;)nt.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(Ee=Ee.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Ee.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(Ee))!=null;)Ee=Ee.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Ee.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;c;){if(Y=this.tokenizer.escape(c)){c=c.substring(Y.raw.length),f.push(Y);continue}if(Y=this.tokenizer.tag(c,h,m)){c=c.substring(Y.raw.length),h=Y.inLink,m=Y.inRawBlock,f.push(Y);continue}if(Y=this.tokenizer.link(c)){c=c.substring(Y.raw.length),Y.type==="link"&&(Y.tokens=this.inlineTokens(Y.text,[],!0,m)),f.push(Y);continue}if(Y=this.tokenizer.reflink(c,this.tokens.links)){c=c.substring(Y.raw.length),Y.type==="link"&&(Y.tokens=this.inlineTokens(Y.text,[],!0,m)),f.push(Y);continue}if(Y=this.tokenizer.strong(c,Ee,R)){c=c.substring(Y.raw.length),Y.tokens=this.inlineTokens(Y.text,[],h,m),f.push(Y);continue}if(Y=this.tokenizer.em(c,Ee,R)){c=c.substring(Y.raw.length),Y.tokens=this.inlineTokens(Y.text,[],h,m),f.push(Y);continue}if(Y=this.tokenizer.codespan(c)){c=c.substring(Y.raw.length),f.push(Y);continue}if(Y=this.tokenizer.br(c)){c=c.substring(Y.raw.length),f.push(Y);continue}if(Y=this.tokenizer.del(c)){c=c.substring(Y.raw.length),Y.tokens=this.inlineTokens(Y.text,[],h,m),f.push(Y);continue}if(Y=this.tokenizer.autolink(c,me)){c=c.substring(Y.raw.length),f.push(Y);continue}if(!h&&(Y=this.tokenizer.url(c,me))){c=c.substring(Y.raw.length),f.push(Y);continue}if(Y=this.tokenizer.inlineText(c,m,Oe)){c=c.substring(Y.raw.length),R=Y.raw.slice(-1),f.push(Y);continue}if(c){var ot="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return f},Ce(C,null,[{key:"rules",get:function(){return{block:xe,inline:ne}}}]),C}(),Re=S.defaults,Ke=Te.cleanUrl,je=Te.escape,ye=function(){function C(p){this.options=p||Re}var w=C.prototype;return w.code=function(c,f,h){var m=(f||"").match(/\S*/)[0];if(this.options.highlight){var R=this.options.highlight(c,m);R!=null&&R!==c&&(h=!0,c=R)}return m?'<pre><code class="'+this.options.langPrefix+je(m,!0)+'">'+(h?c:je(c,!0))+`</code></pre>
`:"<pre><code>"+(h?c:je(c,!0))+`</code></pre>
`},w.blockquote=function(c){return`<blockquote>
`+c+`</blockquote>
`},w.html=function(c){return c},w.heading=function(c,f,h,m){return this.options.headerIds?"<h"+f+' id="'+this.options.headerPrefix+m.slug(h)+'">'+c+"</h"+f+`>
`:"<h"+f+">"+c+"</h"+f+`>
`},w.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},w.list=function(c,f,h){var m=f?"ol":"ul",R=f&&h!==1?' start="'+h+'"':"";return"<"+m+R+`>
`+c+"</"+m+`>
`},w.listitem=function(c){return"<li>"+c+`</li>
`},w.checkbox=function(c){return"<input "+(c?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},w.paragraph=function(c){return"<p>"+c+`</p>
`},w.table=function(c,f){return f&&(f="<tbody>"+f+"</tbody>"),`<table>
<thead>
`+c+`</thead>
`+f+`</table>
`},w.tablerow=function(c){return`<tr>
`+c+`</tr>
`},w.tablecell=function(c,f){var h=f.header?"th":"td",m=f.align?"<"+h+' align="'+f.align+'">':"<"+h+">";return m+c+"</"+h+`>
`},w.strong=function(c){return"<strong>"+c+"</strong>"},w.em=function(c){return"<em>"+c+"</em>"},w.codespan=function(c){return"<code>"+c+"</code>"},w.br=function(){return this.options.xhtml?"<br/>":"<br>"},w.del=function(c){return"<del>"+c+"</del>"},w.link=function(c,f,h){if(c=Ke(this.options.sanitize,this.options.baseUrl,c),c===null)return h;var m='<a href="'+je(c)+'"';return f&&(m+=' title="'+f+'"'),m+=">"+h+"</a>",m},w.image=function(c,f,h){if(c=Ke(this.options.sanitize,this.options.baseUrl,c),c===null)return h;var m='<img src="'+c+'" alt="'+h+'"';return f&&(m+=' title="'+f+'"'),m+=this.options.xhtml?"/>":">",m},w.text=function(c){return c},C}(),Me=function(){function C(){}var w=C.prototype;return w.strong=function(c){return c},w.em=function(c){return c},w.codespan=function(c){return c},w.del=function(c){return c},w.html=function(c){return c},w.text=function(c){return c},w.link=function(c,f,h){return""+h},w.image=function(c,f,h){return""+h},w.br=function(){return""},C}(),Xe=function(){function C(){this.seen={}}var w=C.prototype;return w.slug=function(c){var f=c.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(f)){var h=f;do this.seen[h]++,f=h+"-"+this.seen[h];while(this.seen.hasOwnProperty(f))}return this.seen[f]=0,f},C}(),Ve=S.defaults,ze=Te.unescape,qe=function(){function C(p){this.options=p||Ve,this.options.renderer=this.options.renderer||new ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Me,this.slugger=new Xe}C.parse=function(c,f){var h=new C(f);return h.parse(c)};var w=C.prototype;return w.parse=function(c,f){f===void 0&&(f=!0);var h="",m,R,Y,Ee,tt,nt,ot,xt,bt,ht,Ut,_t,Ht,Rt,yt,on,_n,sn,Cn=c.length;for(m=0;m<Cn;m++){ht=c[m];switch(ht.type){case"space":continue;case"hr":{h+=this.renderer.hr();continue}case"heading":{h+=this.renderer.heading(this.parseInline(ht.tokens),ht.depth,ze(this.parseInline(ht.tokens,this.textRenderer)),this.slugger);continue}case"code":{h+=this.renderer.code(ht.text,ht.lang,ht.escaped);continue}case"table":{for(xt="",ot="",Ee=ht.header.length,R=0;R<Ee;R++)ot+=this.renderer.tablecell(this.parseInline(ht.tokens.header[R]),{header:!0,align:ht.align[R]});for(xt+=this.renderer.tablerow(ot),bt="",Ee=ht.cells.length,R=0;R<Ee;R++){for(nt=ht.tokens.cells[R],ot="",tt=nt.length,Y=0;Y<tt;Y++)ot+=this.renderer.tablecell(this.parseInline(nt[Y]),{header:!1,align:ht.align[Y]});bt+=this.renderer.tablerow(ot)}h+=this.renderer.table(xt,bt);continue}case"blockquote":{bt=this.parse(ht.tokens),h+=this.renderer.blockquote(bt);continue}case"list":{for(Ut=ht.ordered,_t=ht.start,Ht=ht.loose,Ee=ht.items.length,bt="",R=0;R<Ee;R++)yt=ht.items[R],on=yt.checked,_n=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,_n,on);h+=this.renderer.list(bt,Ut,_t);continue}case"html":{h+=this.renderer.html(ht.text);continue}case"paragraph":{h+=this.renderer.paragraph(this.parseInline(ht.tokens));continue}case"text":{for(bt=ht.tokens?this.parseInline(ht.tokens):ht.text;m+1<Cn&&c[m+1].type==="text";)ht=c[++m],bt+=`
`+(ht.tokens?this.parseInline(ht.tokens):ht.text);h+=f?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 h},w.parseInline=function(c,f){f=f||this.renderer;var h="",m,R,Y=c.length;for(m=0;m<Y;m++){R=c[m];switch(R.type){case"escape":{h+=f.text(R.text);break}case"html":{h+=f.html(R.text);break}case"link":{h+=f.link(R.href,R.title,this.parseInline(R.tokens,f));break}case"image":{h+=f.image(R.href,R.title,R.text);break}case"strong":{h+=f.strong(this.parseInline(R.tokens,f));break}case"em":{h+=f.em(this.parseInline(R.tokens,f));break}case"codespan":{h+=f.codespan(R.text);break}case"br":{h+=f.br();break}case"del":{h+=f.del(this.parseInline(R.tokens,f));break}case"text":{h+=f.text(R.text);break}default:{var Ee='Token with "'+R.type+'" type was not found.';if(this.options.silent){console.error(Ee);return}else throw new Error(Ee)}}}return h},C}(),ut=Te.merge,et=Te.checkSanitizeDeprecation,He=Te.escape,oe=S.getDefaults,rt=S.changeDefaults,$e=S.defaults;function re(C,w,p){if(typeof C=="undefined"||C===null)throw new Error("marked(): input parameter is undefined or null");if(typeof C!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(C)+", string expected");if(typeof w=="function"&&(p=w,w=null),w=ut({},re.defaults,w||{}),et(w),p){var c=w.highlight,f;try{f=he.lex(C,w)}catch(Y){return p(Y)}var h=function(Ee){var tt;if(!Ee)try{tt=qe.parse(f,w)}catch(nt){Ee=nt}return w.highlight=c,Ee?p(Ee):p(null,tt)};if(!c||c.length<3)return h();if(delete w.highlight,!f.length)return h();var m=0;re.walkTokens(f,function(Y){Y.type==="code"&&(m++,setTimeout(function(){c(Y.text,Y.lang,function(Ee,tt){if(Ee)return h(Ee);tt!=null&&tt!==Y.text&&(Y.text=tt,Y.escaped=!0),m--,m===0&&h()})},0))}),m===0&&h();return}try{var R=he.lex(C,w);return w.walkTokens&&re.walkTokens(R,w.walkTokens),qe.parse(R,w)}catch(Y){if(Y.message+=`
Please report this to https://github.com/markedjs/marked.`,w.silent)return"<p>An error occurred:</p><pre>"+He(Y.message+"",!0)+"</pre>";throw Y}}re.options=re.setOptions=function(C){return ut(re.defaults,C),rt(re.defaults),re},re.getDefaults=oe,re.defaults=$e,re.use=function(C){var w=ut({},C);if(C.renderer&&function(){var c=re.defaults.renderer||new ye,f=function(R){var Y=c[R];c[R]=function(){for(var Ee=arguments.length,tt=new Array(Ee),nt=0;nt<Ee;nt++)tt[nt]=arguments[nt];var ot=C.renderer[R].apply(c,tt);return ot===!1&&(ot=Y.apply(c,tt)),ot}};for(var h in C.renderer)f(h);w.renderer=c}(),C.tokenizer&&function(){var c=re.defaults.tokenizer||new pe,f=function(R){var Y=c[R];c[R]=function(){for(var Ee=arguments.length,tt=new Array(Ee),nt=0;nt<Ee;nt++)tt[nt]=arguments[nt];var ot=C.tokenizer[R].apply(c,tt);return ot===!1&&(ot=Y.apply(c,tt)),ot}};for(var h in C.tokenizer)f(h);w.tokenizer=c}(),C.walkTokens){var p=re.defaults.walkTokens;w.walkTokens=function(c){C.walkTokens(c),p&&p(c)}}re.setOptions(w)},re.walkTokens=function(C,w){for(var p=le(C),c;!(c=p()).done;){var f=c.value;w(f);switch(f.type){case"table":{for(var h=le(f.tokens.header),m;!(m=h()).done;){var R=m.value;re.walkTokens(R,w)}for(var Y=le(f.tokens.cells),Ee;!(Ee=Y()).done;)for(var tt=Ee.value,nt=le(tt),ot;!(ot=nt()).done;){var xt=ot.value;re.walkTokens(xt,w)}break}case"list":{re.walkTokens(f.items,w);break}default:f.tokens&&re.walkTokens(f.tokens,w)}}},re.Parser=qe,re.parser=qe.parse,re.Renderer=ye,re.TextRenderer=Me,re.Lexer=he,re.lexer=he.lex,re.Tokenizer=pe,re.Slugger=Xe,re.parse=re;var fe=re;return fe})},ELLl:function(ft,We,g){(function(L){L(g("VrN/"))})(function(L){var Ce={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},W=L.Pos;L.defineOption("autoCloseBrackets",!1,function(M,T,A){A&&A!=L.Init&&(M.removeKeyMap(le),M.state.closeBrackets=null),T&&(ee(de(T,"pairs")),M.state.closeBrackets=T,M.addKeyMap(le))});function de(M,T){return T=="pairs"&&typeof M=="string"?M:typeof M=="object"&&M[T]!=null?M[T]:Ce[T]}var le={Backspace:_,Enter:ie};function ee(M){for(var T=0;T<M.length;T++){var A=M.charAt(T),X="'"+A+"'";le[X]||(le[X]=S(A))}}ee(Ce.pairs+"`");function S(M){return function(T){return z(T,M)}}function k(M){var T=M.state.closeBrackets;if(!T||T.override)return T;var A=M.getModeAt(M.getCursor());return A.closeBrackets||T}function _(M){var T=k(M);if(!T||M.getOption("disableInput"))return L.Pass;for(var A=de(T,"pairs"),X=M.listSelections(),H=0;H<X.length;H++){if(!X[H].empty())return L.Pass;var ge=ue(M,X[H].head);if(!ge||A.indexOf(ge)%2!=0)return L.Pass}for(var H=X.length-1;H>=0;H--){var Be=X[H].head;M.replaceRange("",W(Be.line,Be.ch-1),W(Be.line,Be.ch+1),"+delete")}}function ie(M){var T=k(M),A=T&&de(T,"explode");if(!A||M.getOption("disableInput"))return L.Pass;for(var X=M.listSelections(),H=0;H<X.length;H++){if(!X[H].empty())return L.Pass;var ge=ue(M,X[H].head);if(!ge||A.indexOf(ge)%2!=0)return L.Pass}M.operation(function(){var Be=M.lineSeparator()||`
`;M.replaceSelection(Be+Be,null),M.execCommand("goCharLeft"),X=M.listSelections();for(var Z=0;Z<X.length;Z++){var ae=X[Z].head.line;M.indentLine(ae,null,!0),M.indentLine(ae+1,null,!0)}})}function P(M){var T=L.cmpPos(M.anchor,M.head)>0;return{anchor:new W(M.anchor.line,M.anchor.ch+(T?-1:1)),head:new W(M.head.line,M.head.ch+(T?1:-1))}}function z(M,T){var A=k(M);if(!A||M.getOption("disableInput"))return L.Pass;var X=de(A,"pairs"),H=X.indexOf(T);if(H==-1)return L.Pass;for(var ge=de(A,"closeBefore"),Be=de(A,"triples"),Z=X.charAt(H+1)==T,ae=M.listSelections(),Se=H%2==0,F,Q=0;Q<ae.length;Q++){var we=ae[Q],B=we.head,b,G=M.getRange(B,W(B.line,B.ch+1));if(Se&&!we.empty())b="surround";else if((Z||!Se)&&G==T)Z&&j(M,B)?b="both":Be.indexOf(T)>=0&&M.getRange(B,W(B.line,B.ch+3))==T+T+T?b="skipThree":b="skip";else if(Z&&B.ch>1&&Be.indexOf(T)>=0&&M.getRange(W(B.line,B.ch-2),B)==T+T){if(B.ch>2&&/\bstring/.test(M.getTokenTypeAt(W(B.line,B.ch-2))))return L.Pass;b="addFour"}else if(Z){var N=B.ch==0?" ":M.getRange(W(B.line,B.ch-1),B);if(!L.isWordChar(G)&&N!=T&&!L.isWordChar(N))b="both";else return L.Pass}else if(Se&&(G.length===0||/\s/.test(G)||ge.indexOf(G)>-1))b="both";else return L.Pass;if(!F)F=b;else if(F!=b)return L.Pass}var x=H%2?X.charAt(H-1):T,V=H%2?T:X.charAt(H+1);M.operation(function(){if(F=="skip")M.execCommand("goCharRight");else if(F=="skipThree")for(var ce=0;ce<3;ce++)M.execCommand("goCharRight");else if(F=="surround"){for(var $=M.getSelections(),ce=0;ce<$.length;ce++)$[ce]=x+$[ce]+V;M.replaceSelections($,"around"),$=M.listSelections().slice();for(var ce=0;ce<$.length;ce++)$[ce]=P($[ce]);M.setSelections($)}else F=="both"?(M.replaceSelection(x+V,null),M.triggerElectric(x+V),M.execCommand("goCharLeft")):F=="addFour"&&(M.replaceSelection(x+x+x+x,"before"),M.execCommand("goCharRight"))})}function ue(M,T){var A=M.getRange(W(T.line,T.ch-1),W(T.line,T.ch+1));return A.length==2?A:null}function j(M,T){var A=M.getTokenAt(W(T.line,T.ch+1));return/\bstring/.test(A.type)&&A.start==T.ch&&(T.ch==0||!/\bstring/.test(M.getTokenTypeAt(T)))}})},F8wB:function(ft,We,g){ft.exports={loading:"loading___1SIOG"}},Gytx:function(ft,We){ft.exports=function(L,Ce,W,de){var le=W?W.call(de,L,Ce):void 0;if(le!==void 0)return!!le;if(L===Ce)return!0;if(typeof L!="object"||!L||typeof Ce!="object"||!Ce)return!1;var ee=Object.keys(L),S=Object.keys(Ce);if(ee.length!==S.length)return!1;for(var k=Object.prototype.hasOwnProperty.bind(Ce),_=0;_<ee.length;_++){var ie=ee[_];if(!k(ie))return!1;var P=L[ie],z=Ce[ie];if(le=W?W.call(de,P,z,ie):void 0,le===!1||le===void 0&&P!==z)return!1}return!0}},HmJG:function(ft,We,g){},LdHM:function(ft,We,g){"use strict";g.d(We,"b",function(){return ge}),g.d(We,"a",function(){return Z});var L=g("1OyB"),Ce=g("vuIU"),W=g("Ji7U"),de=g("LK+K"),le=g("q1tI"),ee=g("rePB"),S=g("Ff2n"),k=g("ODXe"),_=g("4IlW"),ie=g("bX4T"),P=g("YrtM"),z=g("TSYQ"),ue=g.n(z),j=g("+nKL"),M=g("8OUc"),T=function(O,te){var q=O.prefixCls,Le=O.id,Ie=O.flattenOptions,pe=O.childrenAsData,Ne=O.values,ve=O.searchValue,be=O.multiple,I=O.defaultActiveFirstOption,K=O.height,Ae=O.itemHeight,Je=O.notFoundContent,xe=O.open,ne=O.menuItemSelectedIcon,Oe=O.virtual,me=O.onSelect,he=O.onToggleOpen,Re=O.onActiveValue,Ke=O.onScroll,je=O.onMouseEnter,ye="".concat(q,"-item"),Me=Object(P.a)(function(){return Ie},[xe,Ie],function(fe,C){return C[0]&&fe[1]!==C[1]}),Xe=le.useRef(null),Ve=function(C){C.preventDefault()},ze=function(C){Xe.current&&Xe.current.scrollTo({index:C})},qe=function(C){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,p=Me.length,c=0;c<p;c+=1){var f=(C+c*w+p)%p,h=Me[f],m=h.group,R=h.data;if(!m&&!R.disabled)return f}return-1},ut=le.useState(function(){return qe(0)}),et=Object(k.a)(ut,2),He=et[0],oe=et[1],rt=function(C){oe(C);var w=Me[C];if(!w){Re(null,-1);return}Re(w.data.value,C)};le.useEffect(function(){rt(I!==!1?qe(0):-1)},[Me.length,ve]),le.useEffect(function(){var fe=setTimeout(function(){if(!be&&xe&&Ne.size===1){var C=Array.from(Ne)[0],w=Me.findIndex(function(p){var c=p.data;return c.value===C});rt(w),ze(w)}});return function(){return clearTimeout(fe)}},[xe]);var $e=function(C){C!==void 0&&me(C,{selected:!Ne.has(C)}),be||he(!1)};if(le.useImperativeHandle(te,function(){return{onKeyDown:function(C){var w=C.which;switch(w){case _.a.UP:case _.a.DOWN:{var p=0;if(w===_.a.UP?p=-1:w===_.a.DOWN&&(p=1),p!==0){var c=qe(He+p,p);ze(c),rt(c)}break}case _.a.ENTER:{var f=Me[He];f&&!f.data.disabled?$e(f.data.value):$e(void 0),xe&&C.preventDefault();break}case _.a.ESC:he(!1)}},onKeyUp:function(){},scrollTo:function(C){ze(C)}}}),Me.length===0)return le.createElement("div",{role:"listbox",id:"".concat(Le,"_list"),className:"".concat(ye,"-empty"),onMouseDown:Ve},Je);function re(fe){var C=Me[fe];if(!C)return null;var w=C.data||{},p=w.value,c=w.label,f=w.children,h=Object(ie.a)(w,!0),m=pe?f:c;return C?le.createElement("div",Object.assign({"aria-label":typeof m=="string"?m:null},h,{key:fe,role:"option",id:"".concat(Le,"_list_").concat(fe),"aria-selected":Ne.has(p)}),p):null}return le.createElement(le.Fragment,null,le.createElement("div",{role:"listbox",id:"".concat(Le,"_list"),style:{height:0,width:0,overflow:"hidden"}},re(He-1),re(He),re(He+1)),le.createElement(j.a,{itemKey:"key",ref:Xe,data:Me,height:K,itemHeight:Ae,fullHeight:!1,onMouseDown:Ve,onScroll:Ke,virtual:Oe,onMouseEnter:je},function(fe,C){var w,p=fe.group,c=fe.groupOption,f=fe.data,h=f.label,m=f.key;if(p)return le.createElement("div",{className:ue()(ye,"".concat(ye,"-group"))},h!==void 0?h:m);var R=f.disabled,Y=f.value,Ee=f.title,tt=f.children,nt=f.style,ot=f.className,xt=Object(S.a)(f,["disabled","value","title","children","style","className"]),bt=Ne.has(Y),ht="".concat(ye,"-option"),Ut=ue()(ye,ht,ot,(w={},Object(ee.a)(w,"".concat(ht,"-grouped"),c),Object(ee.a)(w,"".concat(ht,"-active"),He===C&&!R),Object(ee.a)(w,"".concat(ht,"-disabled"),R),Object(ee.a)(w,"".concat(ht,"-selected"),bt),w)),_t=pe?tt:h,Ht=!ne||typeof ne=="function"||bt;return le.createElement("div",Object.assign({},xt,{"aria-selected":bt,className:Ut,title:Ee,onMouseMove:function(){if(He===C||R)return;rt(C)},onClick:function(){R||$e(Y)},style:nt}),le.createElement("div",{className:"".concat(ht,"-content")},_t||Y),le.isValidElement(ne)||bt,Ht&&le.createElement(M.a,{className:"".concat(ye,"-option-state"),customizeIcon:ne,customizeIconProps:{isSelected:bt}},bt?"\u2713":null))}))},A=le.forwardRef(T);A.displayName="OptionList";var X=A,H=function(){return null};H.isSelectOption=!0;var ge=H,Be=function(){return null};Be.isSelectOptGroup=!0;var Z=Be,ae=g("VTBJ"),Se=g("Zm9Q");function F(d){var O=d.key,te=d.props,q=te.children,Le=te.value,Ie=Object(S.a)(te,["children","value"]);return Object(ae.a)({key:O,value:Le!==void 0?Le:O,children:q},Ie)}function Q(d){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Se.a)(d).map(function(te,q){if(!le.isValidElement(te)||!te.type)return null;var Le=te.type.isSelectOptGroup,Ie=te.key,pe=te.props,Ne=pe.children,ve=Object(S.a)(pe,["children"]);return O||!Le?F(te):Object(ae.a)(Object(ae.a)({key:"__RC_SELECT_GRP__".concat(Ie===null?q:Ie,"__"),label:Ie},ve),{},{options:Q(Ne)})}).filter(function(te){return te})}var we=g("2Qr1"),B=g("qNPg"),b=g("U8pU"),G=g("Kwbf"),N=g("WKfj");function x(d){var O=d.mode,te=d.options,q=d.children,Le=d.backfill,Ie=d.allowClear,pe=d.placeholder,Ne=d.getInputElement,ve=d.showSearch,be=d.onSearch,I=d.defaultOpen,K=d.autoFocus,Ae=d.labelInValue,Je=d.value,xe=d.inputValue,ne=d.optionLabelProp,Oe=O==="multiple"||O==="tags",me=ve!==void 0?ve:Oe||O==="combobox",he=te||Q(q);if(Object(G.a)(O!=="tags"||he.every(function(ye){return!ye.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),O==="tags"||O==="combobox"){var Re=he.some(function(ye){return ye.options?ye.options.some(function(Me){return typeof("value"in Me?Me.value:Me.key)=="number"}):typeof("value"in ye?ye.value:ye.key)=="number"});Object(G.a)(!Re,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(G.a)(O!=="combobox"||!ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(G.a)(O==="combobox"||!Le,"`backfill` only works with `combobox` mode."),Object(G.a)(O==="combobox"||!Ne,"`getInputElement` only work with `combobox` mode."),Object(G.b)(O!=="combobox"||!Ne||!Ie||!pe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!me&&O!=="combobox"&&O!=="tags"&&Object(G.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(G.b)(!I||K,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Je!=null){var Ke=Object(N.d)(Je);Object(G.a)(!Ae||Ke.every(function(ye){return Object(b.a)(ye)==="object"&&("key"in ye||"value"in ye)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(G.a)(!Oe||Array.isArray(Je),"`value` should be array when `mode` is `multiple` or `tags`")}if(q){var je=null;Object(Se.a)(q).some(function(ye){if(!le.isValidElement(ye)||!ye.type)return!1;var Me=ye.type;if(Me.isSelectOption)return!1;if(Me.isSelectOptGroup){var Xe=Object(Se.a)(ye.props.children).every(function(Ve){return!le.isValidElement(Ve)||!ye.type||Ve.type.isSelectOption?!0:(je=Ve.type,!1)});return!Xe}return je=Me,!0}),je&&Object(G.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(je.displayName||je.name||je,"`.")),Object(G.a)(xe===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var V=x,ce=Object(B.a)({prefixCls:"rc-select",components:{optionList:X},convertChildrenToData:Q,flattenOptions:we.d,getLabeledValue:we.e,filterOptions:we.b,isValueDisabled:we.g,findValueOption:we.c,warningProps:V,fillOptionsWithMissingValue:we.a}),$=function(d){Object(W.a)(te,d);var O=Object(de.a)(te);function te(){var q;return Object(L.a)(this,te),q=O.apply(this,arguments),q.selectRef=le.createRef(),q.focus=function(){q.selectRef.current.focus()},q.blur=function(){q.selectRef.current.blur()},q}return Object(Ce.a)(te,[{key:"render",value:function(){return le.createElement(ce,Object.assign({ref:this.selectRef},this.props))}}]),te}(le.Component);$.Option=ge,$.OptGroup=Z;var Te=$,v=We.c=Te},M8RZ:function(ft,We,g){"use strict";g.d(We,"a",function(){return _});var L=g("fWQN"),Ce=g("mtLc"),W=g("yKVA"),de=g("879j"),le=g("q1tI"),ee=g.n(le),S=g("i8i4"),k=g.n(S),_=function(ie){Object(W.a)(z,ie);var P=Object(de.a)(z);function z(ue){var j;Object(L.a)(this,z),j=P.call(this,ue);var M=window.document;return j.node=M.createElement("div"),M.body.appendChild(j.node),j}return Object(Ce.a)(z,[{key:"render",value:function(){var j=this.props.children;return Object(S.createPortal)(j,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),z}(ee.a.Component)},OLES:function(ft,We,g){"use strict";var L=g("U8pU"),Ce=g("VTBJ"),W=g("Ff2n"),de=g("q1tI"),le=g("uciX"),ee=g("7ixt"),S=function(ue){var j=ue.overlay,M=ue.prefixCls,T=ue.id,A=ue.overlayInnerStyle;return de.createElement("div",{className:"".concat(M,"-inner"),id:T,role:"tooltip",style:A},typeof j=="function"?j():j)},k=S,_=function(ue,j){var M=ue.overlayClassName,T=ue.trigger,A=T===void 0?["hover"]:T,X=ue.mouseEnterDelay,H=X===void 0?0:X,ge=ue.mouseLeaveDelay,Be=ge===void 0?.1:ge,Z=ue.overlayStyle,ae=ue.prefixCls,Se=ae===void 0?"rc-tooltip":ae,F=ue.children,Q=ue.onVisibleChange,we=ue.afterVisibleChange,B=ue.transitionName,b=ue.animation,G=ue.placement,N=G===void 0?"right":G,x=ue.align,V=x===void 0?{}:x,ce=ue.destroyTooltipOnHide,$=ce===void 0?!1:ce,Te=ue.defaultVisible,v=ue.getTooltipContainer,d=ue.overlayInnerStyle,O=Object(W.a)(ue,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),te=Object(de.useRef)(null);Object(de.useImperativeHandle)(j,function(){return te.current});var q=Object(Ce.a)({},O);"visible"in ue&&(q.popupVisible=ue.visible);var Le=function(){var be=ue.arrowContent,I=be===void 0?null:be,K=ue.overlay,Ae=ue.id;return[de.createElement("div",{className:"".concat(Se,"-arrow"),key:"arrow"},I),de.createElement(k,{key:"content",prefixCls:Se,id:Ae,overlay:K,overlayInnerStyle:d})]},Ie=!1,pe=!1;if(typeof $=="boolean")Ie=$;else if($&&Object(L.a)($)==="object"){var Ne=$.keepParent;Ie=Ne===!0,pe=Ne===!1}return de.createElement(le.a,Object.assign({popupClassName:M,prefixCls:Se,popup:Le,action:A,builtinPlacements:ee.a,popupPlacement:N,ref:te,popupAlign:V,getPopupContainer:v,onPopupVisibleChange:Q,afterPopupVisibleChange:we,popupTransitionName:B,popupAnimation:b,defaultPopupVisible:Te,destroyPopupOnHide:Ie,autoDestroy:pe,mouseLeaveDelay:Be,popupStyle:Z,mouseEnterDelay:H},q),F)},ie=Object(de.forwardRef)(_),P=We.a=ie},Ot1p:function(ft,We,g){"use strict";var L=g("2qtc"),Ce=g("kLXV"),W=g("rAM+"),de=g("miYZ"),le=g("tsqr"),ee=g("tJVT"),S=g("jrin"),k=g("q1tI"),_=g.n(k),ie=g("VrN/"),P=g.n(ie),z=g("bdgK"),ue=g("p77/"),j=g("Bd2K"),M=g("ELLl"),T=g("19Vz"),A=g("lZu9"),X=g("+NIl"),H=g("kSUc"),ge=g("9Bee"),Be=function(p){var c=p.value,f=c===void 0?"":c,h=p.className,m=p.showTextOnly,R=p.showLines,Y=p.style,Ee=Y===void 0?{}:Y,tt=Object(k.useMemo)(function(){return""},[f]);return _.a.createElement(_.a.Fragment,null,_.a.createElement("div",{dangerouslySetInnerHTML:{__html:tt}}))},Z=g("0Owb"),ae=g("dejd"),Se=g("C+DQ"),F=[{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 Q(p){var c=p.onActionCallback,f=p.title,h=p.icon,m=p.actionName,R=p.className,Y=R===void 0?"":R,Ee=p.children;function tt(){c(m)}return _.a.createElement("a",{title:f,className:Y,onClick:tt},_.a.createElement("i",{className:"md-iconfont ".concat(h)}),Ee)}var we=function(p){var c=p.watch,f=p.showNullButton,h=p.onActionCallback,m=p.fullScreen,R=p.insertTemp,Y=p.hidetoolBar,Ee=[].concat(F,[{title:"".concat(c?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(c?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return _.a.createElement("ul",{className:"markdown-toolbar-container"},!Y&&Ee.map(function(tt,nt){return _.a.createElement("li",{key:nt},tt.actionName?_.a.createElement(Q,Object(Z.a)({},tt,{onActionCallback:h})):_.a.createElement("span",{className:"v-line"}))}),f?_.a.createElement("li",null,_.a.createElement(Q,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:h},_.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,R&&_.a.createElement("li",null,_.a.createElement(Q,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(R),onActionCallback:h},_.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_.a.createElement("li",{className:"btn-full-screen"},_.a.createElement(Q,{icon:"".concat(m?"icon-shrink":"icon-enlarge"),title:m?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:h})))},B=g("M8RZ"),b=g("+L6B"),G=g("2/Rp"),N=g("y8nQ"),x=g("Vl3Y"),V=g("5NDa"),ce=g("5rEg"),$={labelCol:{span:4},wrapperCol:{span:20}},Te=function(p){var c=p.callback,f=p.onCancel;function h(m){c(m)}return _.a.createElement(x.a,Object(Z.a)({},$,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:h}),_.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},_.a.createElement(ce.a,null)),_.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},_.a.createElement(ce.a,null)),_.a.createElement("div",{className:"flex-container flex-end"},_.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(G.a,{type:"ghost",onClick:f},"\u53D6\u6D88")))},v=g("7ahc"),d=g("HmJG"),O=g("BjJ7"),te=x.a.useForm,q={width:280,marginRight:10},Le={labelCol:{span:5},wrapperCol:{span:19}},Ie=function(p){var c=p.callback,f=p.onCancel,h=te(),m=Object(ee.a)(h,1),R=m[0];function Y(nt){c(nt)}function Ee(nt,ot){R.setFieldsValue({src:"/api/attachments/".concat(nt.id),type:ot.type})}function tt(nt){var ot=nt.target.files[0];Ne(ot,Ee)}return _.a.createElement(x.a,Object(Z.a)({form:R},Le,{className:"upload-image-panel",onFinish:Y}),_.a.createElement(x.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},_.a.createElement("div",{className:"flex-container"},_.a.createElement(x.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},_.a.createElement(ce.a,{style:q})),_.a.createElement(pe,{onFileChange:tt}))),_.a.createElement(x.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},_.a.createElement(ce.a,{style:{width:264}})),_.a.createElement(x.a.Item,{style:{textAlign:"right"}},_.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(G.a,{type:"ghost",onClick:f},"\u53D6\u6D88")))};function pe(p){var c=p.onFileChange;return _.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",_.a.createElement("input",{type:"file",onChange:c}))}function Ne(p,c){if(!p)throw new String("\u6CA1\u6709\u6587\u4EF6");var f=new FormData;f.append("editormd-image-file",p),f.append("file_param_name","editormd-image-file"),f.append("byxhr","true");var h=new window.XMLHttpRequest;h.withCredentials=!0,h.addEventListener("load",function(m){c(JSON.parse(m.target.responseText),p)},!1),h.addEventListener("error",function(m){console.error(m)},!1),h.open("POST","".concat(O.a,"/api/attachments.json")),h.send(f)}var ve=g("giR+"),be=g("fyUT"),I=g("7Kak"),K=g("9yH6"),Ae=K.a.Group,Je={margin:"0 8px"},xe=function(p){var c=p.callback,f=p.onCancel;function h(m){c(m)}return _.a.createElement(x.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:h},_.a.createElement("div",{className:"flex-container"},_.a.createElement("span",{style:Je},"\u5355\u5143\u683C\u6570\uFF1A"),_.a.createElement("span",{style:Je},"\u884C\u6570"),_.a.createElement(x.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},_.a.createElement(be.a,null)),_.a.createElement("span",{style:Je},"\u5217\u6570"),_.a.createElement(x.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},_.a.createElement(be.a,null))),_.a.createElement("div",{className:"flex-container",style:{marginTop:12}},_.a.createElement("span",{style:Je},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),_.a.createElement(x.a.Item,{name:"align"},_.a.createElement(Ae,null,_.a.createElement(K.a,{value:"default"},_.a.createElement("i",{className:"fa fa-align-justify"})),_.a.createElement(K.a,{value:"left"},_.a.createElement("i",{className:"fa fa-align-left"})),_.a.createElement(K.a,{value:"center"},_.a.createElement("i",{className:"fa fa-align-center"})),_.a.createElement(K.a,{value:"right"},_.a.createElement("i",{className:"fa fa-align-right"}))))),_.a.createElement("div",{className:"flex-container flex-end"},_.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(G.a,{type:"ghost",onClick:f},"\u53D6\u6D88")))},ne=g("m3rI"),Oe=g("wMS7"),me=g.n(Oe),he="link",Re="upload-image",Ke="code-block",je="add-table",ye="------------",Me={default:ye,left:":".concat(ye),center:":".concat(ye,":"),right:"".concat(ye,":")},Xe=g("9VGf"),Ve,ze;function qe(){}var ut=0,et=1e4,He="\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 rt(p){return/^\d+$/.test(p)?"".concat(p,"px"):p}var $e=navigator.platform.toUpperCase().indexOf("MAC")>=0,re=$e?"Cmd":"Ctrl",fe=(Ve={},Object(S.a)(Ve,re+"-B","bold"),Object(S.a)(Ve,re+"-I","italic"),Ve),C=(ze={},Object(S.a)(ze,he,"\u6DFB\u52A0\u94FE\u63A5"),Object(S.a)(ze,Ke,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(S.a)(ze,Re,"\u6DFB\u52A0\u56FE\u7247"),Object(S.a)(ze,je,"\u6DFB\u52A0\u8868\u683C"),ze),w=We.a=function(p){var c=p.defaultValue,f=c===void 0?"":c,h=p.onChange,m=p.width,R=m===void 0?"100%":m,Y=p.height,Ee=Y===void 0?400:Y,tt=p.miniToolbar,nt=tt===void 0?!1:tt,ot=p.isFocus,xt=ot===void 0?!1:ot,bt=p.watch,ht=p.insertTemp,Ut=p.mode,_t=Ut===void 0?"markdown":Ut,Ht=p.id,Rt=Ht===void 0?"markdown-editor-id":Ht,yt=p.showResizeBar,on=yt===void 0?!1:yt,_n=p.noStorage,sn=_n===void 0?!1:_n,Cn=p.showNullButton,tn=Cn===void 0?!1:Cn,nr=p.hidetoolBar,An=nr===void 0?!1:nr,Rn=p.fullScreen,Bn=Rn===void 0?!1:Rn,Ot=p.onBlur,Ze=p.onCMBeforeChange,Qt=p.onFullScreen,Gn=p.className,hn=Gn===void 0?"":Gn,wt=p.disablePaste,Sn=wt===void 0?!1:wt,Pn=p.placeholder,Ln=Pn===void 0?"":Pn,ke=p.values,ct=ke===void 0?"":ke,kn=Object(k.useState)(null),Mn=Object(ee.a)(kn,2),Pe=Mn[0],Xn=Mn[1],Tr=Object(k.useState)(f),lt=Object(ee.a)(Tr,2),ln=lt[0],Wn=lt[1],$n=Object(k.useState)(bt),un=Object(ee.a)($n,2),Dn=un[0],st=un[1],J=Object(k.useState)(Bn),Ye=Object(ee.a)(J,2),it=Ye[0],Ct=Ye[1],cn=Object(k.useState)(""),Gt=Object(ee.a)(cn,2),Pt=Gt[0],Lt=Gt[1],Or=Object(k.useState)(0),xn=Object(ee.a)(Or,2),Nn=xn[0],pn=xn[1],Si=Object(k.useState)(Ee),ki=Object(ee.a)(Si,2),pr=ki[0],rr=ki[1],Qi=Object(k.useState)(!1),Ti=Object(ee.a)(Qi,2),Fa=Ti[0],Jr=Ti[1],Vn=Object(k.useRef)(),Ar=Object(k.useRef)(),Lr=Object(k.useRef)(),mr=Object(k.useRef)();Object(k.useEffect)(function(){Wn(ct),Pe==null||Pe.setValue(ct)},[ct]),Object(k.useEffect)(function(){Qt==null||Qt(it)},[it]),Object(k.useEffect)(function(){if(Vn.current){var pt=P.a.fromTextArea(Vn.current,{mode:_t,lineNumbers:!nt,lineWrapping:!0,value:f,autoCloseTags:!0,autoCloseBrackets:!0});xt&&pt.focus();function mt(gt,Et){if(Sn){Et.preventDefault();return}var kt=Et.clipboardData;if(kt){var Mt=kt.types.toString(),It=kt.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(Mt==="Files"||kt.types.indexOf("Files")>-1){if(Et.preventDefault(),_t=="stex")return;try{var $t,Jn=It[1];(($t=It[0])===null||$t===void 0?void 0:$t.kind)==="file"&&(Jn=It[0]);var Bt=Jn.getAsFile(),ar=Bt.name.split(".").pop();Ne(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(ne.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(ne.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(ne.a.API_SERVER,"/api/attachments/").concat(nn.id,'?type=office&disposition=inline" target="_blank">').concat(Bt.name,"</a>")):pt.replaceSelection("[".concat(Bt.name,"](").concat(ne.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){le.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(k.useCallback)(function(){if(Ar.current)try{}catch(pt){console.log(pt,"---- to set md editor body height")}},[pr,Ar,it]);Object(k.useEffect)(function(){function pt(){var gt=new z.default(function(Et){var kt=Object(W.a)(Et),Mt;try{for(kt.s();!(Mt=kt.n()).done;){var It=Mt.value;(It.target.offsetHeight>0||It.target.offsetWidth>0)&&(Zr(),Pe.setSize("100%","100%"),Pe.refresh())}}catch(Xt){kt.e(Xt)}finally{kt.f()}});return gt.observe(Vn.current.parentElement),gt}if(Pe){var mt=pt();return function(){mt.unobserve(Vn.current.parentElement)}}},[Pe,Zr]),Object(k.useEffect)(function(){if(Pe){for(var pt=[],mt=function(){var It=Et[gt];kt=Object(ee.a)(It,2);var Xt=kt[0],$t=kt[1],Jn=Object(S.a)({},Xt,function(){gr($t)});pt.push(Jn),Pe.addKeyMap(Jn)},gt=0,Et=Object.entries(fe);gt<Et.length;gt++){var kt;mt()}return function(){var Mt=Object(W.a)(pt),It;try{for(Mt.s();!(It=Mt.n()).done;){var Xt=It.value;Pe.removeKeyMap(Xt)}}catch($t){Mt.e($t)}finally{Mt.f()}}}},[Pe]),Object(k.useEffect)(function(){Bn!==it&&Ct(Bn)},[Bn]),Object(Xe.a)(function(){if(!sn&&Nn>0){var pt=new Date().getTime(),mt=window.sessionStorage.getItem(Rt);pt>=Nn+et&&(!mt||mt!==ln)&&(window.sessionStorage.setItem(Rt,ln),Jr(!0))}},et),Object(k.useEffect)(function(){st(bt)},[Pe,bt]),Object(k.useEffect)(function(){Pe&&(xt&&Pe.focus())},[Pe,xt]),Object(k.useEffect)(function(){if(Dn&&Pe){var pt=Pe.getScrollerElement();function mt(gt){var Et=gt.target;if(mr.current){var kt=Et.scrollTop/Et.scrollHeight;mr.current.scrollTop=mr.current.scrollHeight*kt}}return pt.addEventListener("scroll",mt),function(){pt.removeEventListener("scroll",mt)}}},[Pe,Dn]),Object(k.useEffect)(function(){if(Pe&&Ze){function pt(mt,gt){Ze(mt,gt)}return Pe.on("beforeChange",pt),function(){Pe.off("beforeChange",pt)}}},[Pe,Ze]),Object(k.useEffect)(function(){if(Pe&&Ot){function pt(){Ot(Pe.getValue())}return Pe.on("blur",pt),function(){Pe.off("blur",pt)}}},[Pe,Ot]),Object(k.useEffect)(function(){if(Pe){function pt(mt){var gt=me.a.sanitize(mt.getValue());Wn(gt),pn(new Date().getTime()),mt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),h&&h(gt)}return Pe.on("change",pt),function(){Pe.off("change",pt)}}},[Pe,h]),Object(k.useEffect)(function(){Pe&&(f==null?(Pe.setValue(""),Wn("")):f!==Pe.getValue()&&(Pe.setValue(f),Wn(f),Pe.setCursor(Pe.lineCount(),0)))},[Pe,f]);var gr=Object(k.useCallback)(function(pt){var mt=Pe.getCursor(),gt=Pe.getSelection(),Et=gt.split(`
`);switch(pt){case"bold":return Pe.replaceSelection("**"+gt+"**"),gt===""&&Pe.setCursor(mt.line,mt.ch+2),Pe.focus();case"italic":return Pe.replaceSelection("*"+gt+"*"),gt===""&&Pe.setCursor(mt.line,mt.ch+1),Pe.focus();case"code":return Pe.replaceSelection("`"+gt+"`"),gt===""&&Pe.setCursor(mt.line,mt.ch+1),Pe.focus();case"inline-latex":return Pe.replaceSelection("`$$"+gt+"$$`"),gt===""&&Pe.setCursor(mt.line,mt.ch+3),Pe.focus();case"latex":return Pe.replaceSelection("```latex\n"+gt+"\n```"),Pe.setCursor(mt.line+1,gt.length+1),Pe.focus();case"line-break":return Pe.replaceSelection(`<br/>
`),Pe.focus();case"list-ul":return gt===""?Pe.replaceSelection("- "+gt):Pe.replaceSelection(Et.map(function(kt){return kt===""?"":"- ".concat(kt)}).join(`
`)),Pe.focus();case"list-ol":return gt===""?Pe.replaceSelection("1. "+gt):Pe.replaceSelection(Et.map(function(kt,Mt){return kt===""?"":"".concat(Mt+1,". ").concat(kt)}).join(`
`)),Pe.focus();case"add-null-ch":return gt===""&&Pe.setCursor(mt.line,mt.ch+1),Pe.replaceSelection(He),Pe.focus();case"inster-template-1":return gt===""&&Pe.setCursor(mt.line,mt.ch),Pe.replaceSelection(oe),Pe.focus();case"eraser":return Pe.setValue(""),Pe.focus();case"trigger-watch":return st(!Dn),Pe.focus();case"trigger-full-screen":return Ct(!it),Pe.focus();case he:Lt(he);return;case Ke:Lt(Ke);return;case Re:Lt(Re);return;case je:Lt(je);return;default:throw new Error}},[Pe,Dn,it]),Yn=Object(k.useCallback)(function(pt){Lt("");switch(Pt){case he:var mt=pt.title,gt=pt.link;return Pe.replaceSelection("[".concat(mt,"](").concat(gt,")")),Pe.focus();case Ke:var Et=pt.language,kt=pt.content;return Pe.replaceSelection(["```"+Et,kt,"```"].join(`
`)),Pe.focus();case Re:var Mt=pt.src,It=pt.alt;return Pe.replaceSelection("![ ".concat(It," ]( ").concat(Mt,' "').concat(It,'" )')),Pe.focus();case je: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(Me[Jn]),nn.push(" ");ar===1&&(Bt+="| ".concat(Zn.join(" | "),` |
`)),Bt+="| ".concat(nn.join($t===1?"":" | "),` |
`)}return Pe.replaceSelection(Bt+`
`),Pe.focus();default:throw new Error}},[Pe,Pt]),Qr=Object(k.useMemo)(function(){switch(Pt){case he:return _.a.createElement(Te,{callback:Yn,onCancel:ir});case Ke:return _.a.createElement(v.b,{callback:Yn,onCancel:ir});case Re:return _.a.createElement(Ie,{callback:Yn,onCancel:ir});case je:return _.a.createElement(xe,{callback:Yn,onCancel:ir});default:return null}},[Pt]);function ir(){Lt("")}Object(k.useEffect)(function(){if(Lr.current){var pt=Lr.current,mt=!1,gt=0;function Et(It){mt=!0,gt=It.pageY}function kt(){mt=!1}function Mt(It){if(mt){var Xt=It.pageY-gt;Xt<0&&(Xt=0),Xt>300&&(Xt=300);var $t=Ee+Xt+"px";rr($t)}}return pt.addEventListener("mousedown",Et),document.addEventListener("mousemove",Mt),document.addEventListener("mouseup",kt),function(){pt.removeEventListener("mousedown",Et),document.removeEventListener("mousemove",Mt),document.removeEventListener("mouseup",kt)}}},[Pe,Lr]),Object(k.useEffect)(function(){rr(Ee)},[Ee]);var Oi=rt(R),Mr=rt(pr),qi={width:Oi,height:Mr},ea=Object(k.useMemo)(function(){if(Nn){var pt=new Date(Nn),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},[Nn]);function In(){window.sessionStorage.removeItem(Rt),Jr(!1),pn(0)}function Ba(){Jr(!1),pn(0),Pe.setValue(window.sessionStorage.getItem(Rt))}return _.a.createElement(k.Fragment,null,_.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ar},_.a.createElement("div",{className:"markdown-editor-container ".concat(hn," ").concat(Dn?"on-preview":""," ").concat(nt?"mini":""," ").concat(it?"full-screen":""),style:qi},_.a.createElement(we,{insertTemp:ht,watch:Dn,fullScreen:it,showNullButton:tn,onActionCallback:gr,hidetoolBar:An}),_.a.createElement("div",{className:"markdown-editor-body"},_.a.createElement("div",{className:"codemirror-container"},_.a.createElement("textarea",{ref:Vn,placeholder:Ln})),Dn?_.a.createElement("div",{ref:mr,className:"preview-container"},_t==="stex"&&_.a.createElement(Be,{value:ln}),_t!=="stex"&&_.a.createElement(ge.a,{value:ln})):null))),on?_.a.createElement("a",{ref:Lr,className:"editor-resize"}):null,_.a.createElement(B.a,null,C[Pt]?_.a.createElement(Ce.a,{centered:!0,title:C[Pt],visible:!0,onCancel:ir,footer:null},Qr):null))}},SJMd:function(ft,We){/**
* @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 g,L,Ce,W=!1,de,le;window.PR_SHOULD_USE_CONTINUATION=!0;var ee,S;(function(){var k=window,_=["break,continue,do,else,for,if,return,while"],ie=[_,"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"],P=[ie,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],z=[P,"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"],ue=[P,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],j=[P,"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"],M="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",T=[P,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],A="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",X=[_,"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"],H=[_,"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"],ge=[_,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Be=[z,j,ue,T,A,X,H,ge],Z=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,ae="str",Se="kwd",F="com",Q="typ",we="lit",B="pun",b="pln",G="tag",N="dec",x="src",V="atn",ce="atv",$="nocode",Te="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function v(me){for(var he=0,Re=!1,Ke=!1,je=0,ye=me.length;je<ye;++je){var Me=me[je];if(Me.ignoreCase)Ke=!0;else if(/[a-z]/i.test(Me.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Re=!0,Ke=!1;break}}var Xe={b:8,t:9,n:10,v:11,f:12,r:13};function Ve(He){var oe=He.charCodeAt(0);if(oe!==92)return oe;var rt=He.charAt(1);return oe=Xe[rt],oe||("0"<=rt&&rt<="7"?parseInt(He.substring(1),8):rt==="u"||rt==="x"?parseInt(He.substring(2),16):He.charCodeAt(1))}function ze(He){if(He<32)return(He<16?"\\x0":"\\x")+He.toString(16);var oe=String.fromCharCode(He);return oe==="\\"||oe==="-"||oe==="]"||oe==="^"?"\\"+oe:oe}function qe(He){var oe=He.substring(1,He.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")),rt=[],$e=oe[0]==="^",re=["["];$e&&re.push("^");for(var fe=$e?1:0,C=oe.length;fe<C;++fe){var w=oe[fe];if(/\\[bdsw]/i.test(w))re.push(w);else{var p=Ve(w),c;fe+2<C&&oe[fe+1]==="-"?(c=Ve(oe[fe+2]),fe+=2):c=p,rt.push([p,c]),c<65||p>122||(c<65||p>90||rt.push([Math.max(65,p)|32,Math.min(c,90)|32]),c<97||p>122||rt.push([Math.max(97,p)&~32,Math.min(c,122)&~32]))}}rt.sort(function(R,Y){return R[0]-Y[0]||Y[1]-R[1]});for(var f=[],h=[],fe=0;fe<rt.length;++fe){var m=rt[fe];m[0]<=h[1]+1?h[1]=Math.max(h[1],m[1]):f.push(h=m)}for(var fe=0;fe<f.length;++fe){var m=f[fe];re.push(ze(m[0])),m[1]>m[0]&&(m[1]+1>m[0]&&re.push("-"),re.push(ze(m[1])))}return re.push("]"),re.join("")}function ut(He){for(var oe=He.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")),rt=oe.length,$e=[],re=0,fe=0;re<rt;++re){var C=oe[re];if(C==="(")++fe;else if(C.charAt(0)==="\\"){var w=+C.substring(1);w&&(w<=fe?$e[w]=-1:oe[re]=ze(w))}}for(var re=1;re<$e.length;++re)$e[re]===-1&&($e[re]=++he);for(var re=0,fe=0;re<rt;++re){var C=oe[re];if(C==="(")++fe,$e[fe]||(oe[re]="(?:");else if(C.charAt(0)==="\\"){var w=+C.substring(1);w&&w<=fe&&(oe[re]="\\"+$e[w])}}for(var re=0;re<rt;++re)oe[re]==="^"&&oe[re+1]!=="^"&&(oe[re]="");if(He.ignoreCase&&Re)for(var re=0;re<rt;++re){var C=oe[re],p=C.charAt(0);C.length>=2&&p==="["?oe[re]=qe(C):p!=="\\"&&(oe[re]=C.replace(/[a-zA-Z]/g,function(h){var m=h.charCodeAt(0);return"["+String.fromCharCode(m&~32,m|32)+"]"}))}return oe.join("")}for(var et=[],je=0,ye=me.length;je<ye;++je){var Me=me[je];if(Me.global||Me.multiline)throw new Error(""+Me);et.push("(?:"+ut(Me)+")")}return new RegExp(et.join("|"),Ke?"gi":"g")}function d(me,he){var Re=/(?:^|\s)nocode(?:\s|$)/,Ke=[],je=0,ye=[],Me=0;function Xe(Ve){var ze=Ve.nodeType;if(ze==1){if(Re.test(Ve.className))return;for(var qe=Ve.firstChild;qe;qe=qe.nextSibling)Xe(qe);var ut=Ve.nodeName.toLowerCase();(ut==="br"||ut==="li")&&(Ke[Me]=`
`,ye[Me<<1]=je++,ye[Me++<<1|1]=Ve)}else if(ze==3||ze==4){var et=Ve.nodeValue;et.length&&(he?et=et.replace(/\r\n?/g,`
`):et=et.replace(/[ \t\r\n]+/g," "),Ke[Me]=et,ye[Me<<1]=je,je+=et.length,ye[Me++<<1|1]=Ve)}}return Xe(me),{sourceCode:Ke.join("").replace(/\n$/,""),spans:ye}}function O(me,he,Re,Ke,je){if(!Re)return;var ye={sourceNode:me,pre:1,langExtension:null,numberLines:null,sourceCode:Re,spans:null,basePos:he,decorations:null};Ke(ye),je.push.apply(je,ye.decorations)}var te=/\S/;function q(me){for(var he=void 0,Re=me.firstChild;Re;Re=Re.nextSibling){var Ke=Re.nodeType;he=Ke===1?he?me:Re:Ke===3&&te.test(Re.nodeValue)?me:he}return he===me?void 0:he}function Le(me,he){var Re={},Ke;(function(){for(var Me=me.concat(he),Xe=[],Ve={},ze=0,qe=Me.length;ze<qe;++ze){var ut=Me[ze],et=ut[3];if(et)for(var He=et.length;--He>=0;)Re[et.charAt(He)]=ut;var oe=ut[1],rt=""+oe;Ve.hasOwnProperty(rt)||(Xe.push(oe),Ve[rt]=null)}Xe.push(/[\0-\uffff]/),Ke=v(Xe)})();var je=he.length,ye=function(Me){for(var Xe=Me.sourceCode,Ve=Me.basePos,ze=Me.sourceNode,qe=[Ve,b],ut=0,et=Xe.match(Ke)||[],He={},oe=0,rt=et.length;oe<rt;++oe){var $e=et[oe],re=He[$e],fe=void 0,C;if(typeof re=="string")C=!1;else{var w=Re[$e.charAt(0)];if(w)fe=$e.match(w[1]),re=w[0];else{for(var p=0;p<je;++p)if(w=he[p],fe=$e.match(w[1]),fe){re=w[0];break}fe||(re=b)}C=re.length>=5&&re.substring(0,5)==="lang-",C&&!(fe&&typeof fe[1]=="string")&&(C=!1,re=x),C||(He[$e]=re)}var c=ut;if(ut+=$e.length,!C)qe.push(Ve+c,re);else{var f=fe[1],h=$e.indexOf(f),m=h+f.length;fe[2]&&(m=$e.length-fe[2].length,h=m-f.length);var R=re.substring(5);O(ze,Ve+c,$e.substring(0,h),ye,qe),O(ze,Ve+c+h,f,K(R,f),qe),O(ze,Ve+c+m,$e.substring(m),ye,qe)}}Me.decorations=qe};return ye}function Ie(me){var he=[],Re=[];me.tripleQuotedStrings?he.push([ae,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):me.multiLineStrings?he.push([ae,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):he.push([ae,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),me.verbatimStrings&&Re.push([ae,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ke=me.hashComments;Ke&&(me.cStyleComments?(Ke>1?he.push([F,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):he.push([F,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Re.push([ae,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):he.push([F,/^#[^\r\n]*/,null,"#"])),me.cStyleComments&&(Re.push([F,/^\/\/[^\r\n]*/,null]),Re.push([F,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var je=me.regexLiterals;if(je){var ye=je>1?"":`
\r`,Me=ye?".":"[\\S\\s]",Xe="/(?=[^/*"+ye+"])(?:[^/\\x5B\\x5C"+ye+"]|\\x5C"+Me+"|\\x5B(?:[^\\x5C\\x5D"+ye+"]|\\x5C"+Me+")*(?:\\x5D|$))+/";Re.push(["lang-regex",RegExp("^"+Te+"("+Xe+")")])}var Ve=me.types;Ve&&Re.push([Q,Ve]);var ze=(""+me.keywords).replace(/^ | $/g,"");ze.length&&Re.push([Se,new RegExp("^(?:"+ze.replace(/[\s,]+/g,"|")+")\\b"),null]),he.push([b,/^\s+/,null,` \r
\xA0`]);var qe="^.[^\\s\\w.$@'\"`/\\\\]*";return me.regexLiterals&&(qe+="(?!s*/)"),Re.push([we,/^@[a-z_$][a-z_$@0-9]*/i,null],[Q,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[b,/^[a-z_$][a-z_$@0-9]*/i,null],[we,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[b,/^\\[\s\S]?/,null],[B,new RegExp(qe),null]),Le(he,Re)}var pe=Ie({keywords:Be,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ne(me,he,Re){for(var Ke=/(?:^|\s)nocode(?:\s|$)/,je=/\r\n?|\n/,ye=me.ownerDocument,Me=ye.createElement("li");me.firstChild;)Me.appendChild(me.firstChild);var Xe=[Me];function Ve(oe){var rt=oe.nodeType;if(rt==1&&!Ke.test(oe.className))if(oe.nodeName==="br")ze(oe),oe.parentNode&&oe.parentNode.removeChild(oe);else for(var $e=oe.firstChild;$e;$e=$e.nextSibling)Ve($e);else if((rt==3||rt==4)&&Re){var re=oe.nodeValue,fe=re.match(je);if(fe){var C=re.substring(0,fe.index);oe.nodeValue=C;var w=re.substring(fe.index+fe[0].length);if(w){var p=oe.parentNode;p.insertBefore(ye.createTextNode(w),oe.nextSibling)}ze(oe),C||oe.parentNode.removeChild(oe)}}}function ze(oe){for(;!oe.nextSibling;)if(oe=oe.parentNode,!oe)return;function rt(fe,C){var w=C?fe.cloneNode(!1):fe,p=fe.parentNode;if(p){var c=rt(p,1),f=fe.nextSibling;c.appendChild(w);for(var h=f;h;h=f)f=h.nextSibling,c.appendChild(h)}return w}for(var $e=rt(oe.nextSibling,0),re;(re=$e.parentNode)&&re.nodeType===1;)$e=re;Xe.push($e)}for(var qe=0;qe<Xe.length;++qe)Ve(Xe[qe]);he===(he|0)&&Xe[0].setAttribute("value",he);var ut=ye.createElement("ol");ut.className="linenums";for(var et=Math.max(0,he-1|0)||0,qe=0,He=Xe.length;qe<He;++qe)Me=Xe[qe],Me.className="L"+(qe+et)%10,Me.firstChild||Me.appendChild(ye.createTextNode("\xA0")),ut.appendChild(Me);me.appendChild(ut)}function ve(me){var he=/\bMSIE\s(\d+)/.exec(navigator.userAgent);he=he&&+he[1]<=8;var Re=/\n/g,Ke=me.sourceCode,je=Ke.length,ye=0,Me=me.spans,Xe=Me.length,Ve=0,ze=me.decorations,qe=ze.length,ut=0;ze[qe]=je;var et,He;for(He=et=0;He<qe;)ze[He]!==ze[He+2]?(ze[et++]=ze[He++],ze[et++]=ze[He++]):He+=2;for(qe=et,He=et=0;He<qe;){for(var oe=ze[He],rt=ze[He+1],$e=He+2;$e+2<=qe&&ze[$e+1]===rt;)$e+=2;ze[et++]=oe,ze[et++]=rt,He=$e}qe=ze.length=et;var re=me.sourceNode,fe="";re&&(fe=re.style.display,re.style.display="none");try{for(var C=null;Ve<Xe;){var w=Me[Ve],p=Me[Ve+2]||je,c=ze[ut+2]||je,$e=Math.min(p,c),f=Me[Ve+1],h;if(f.nodeType!==1&&(h=Ke.substring(ye,$e))){he&&(h=h.replace(Re,"\r")),f.nodeValue=h;var m=f.ownerDocument,R=m.createElement("span");R.className=ze[ut+1];var Y=f.parentNode;Y.replaceChild(R,f),R.appendChild(f),ye<p&&(Me[Ve+1]=f=m.createTextNode(Ke.substring($e,p)),Y.insertBefore(f,R.nextSibling))}ye=$e,ye>=p&&(Ve+=2),ye>=c&&(ut+=2)}}finally{re&&(re.style.display=fe)}}var be={};function I(me,he){for(var Re=he.length;--Re>=0;){var Ke=he[Re];be.hasOwnProperty(Ke)?k.console&&console.warn("cannot override language handler %s",Ke):be[Ke]=me}}function K(me,he){return me&&be.hasOwnProperty(me)||(me=/^\s*</.test(he)?"default-markup":"default-code"),be[me]}I(pe,["default-code"]),I(Le([],[[b,/^[^<?]+/],[N,/^<!\w[^>]*(?:>|$)/],[F,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[B,/^(?:<[%?]|[%?]>)/],["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"]),I(Le([[b,/^[\s]+/,null,` \r
`],[ce,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[G,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[V,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[B,/^[=<>\/]+/],["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"]),I(Le([],[[ce,/^[\s\S]+/]]),["uq.val"]),I(Ie({keywords:z,hashComments:!0,cStyleComments:!0,types:Z}),["c","cc","cpp","cxx","cyc","m"]),I(Ie({keywords:"null,true,false"}),["json"]),I(Ie({keywords:j,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Z}),["cs"]),I(Ie({keywords:ue,cStyleComments:!0}),["java"]),I(Ie({keywords:ge,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),I(Ie({keywords:X,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),I(Ie({keywords:A,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),I(Ie({keywords:H,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),I(Ie({keywords:T,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),I(Ie({keywords:M,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),I(Le([],[[ae,/^[\s\S]+/]]),["regex"]);function Ae(me){var he=me.langExtension;try{var Re=d(me.sourceNode,me.pre),Ke=Re.sourceCode;me.sourceCode=Ke,me.spans=Re.spans,me.basePos=0,K(he,Ke)(me),ve(me)}catch(je){k.console&&console.log(je&&je.stack||je)}}function Je(me,he,Re){var Ke=Re||!1,je=he||null,ye=document.createElement("div");ye.innerHTML="<pre>"+me+"</pre>",ye=ye.firstChild,Ke&&Ne(ye,Ke,!0);var Me={langExtension:je,numberLines:Ke,sourceNode:ye,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ae(Me),ye.innerHTML}function xe(me,he){var Re=he||document.body,Ke=Re.ownerDocument||document;function je(w){return Re.getElementsByTagName(w)}for(var ye=[je("pre"),je("code"),je("xmp")],Me=[],Xe=0;Xe<ye.length;++Xe)for(var Ve=0,ze=ye[Xe].length;Ve<ze;++Ve)Me.push(ye[Xe][Ve]);ye=null;var qe=Date;qe.now||(qe={now:function(){return+new Date}});var ut=0,et=/\blang(?:uage)?-([\w.]+)(?!\S)/,He=/\bprettyprint\b/,oe=/\bprettyprinted\b/,rt=/pre|xmp/i,$e=/^code$/i,re=/^(?:pre|code|xmp)$/i,fe={};function C(){for(var w=k.PR_SHOULD_USE_CONTINUATION?qe.now()+250:Infinity;ut<Me.length&&qe.now()<w;ut++){for(var p=Me[ut],c=fe,f=p;f=f.previousSibling;){var h=f.nodeType,m=(h===7||h===8)&&f.nodeValue;if(m?!/^\??prettify\b/.test(m):h!==3||/\S/.test(f.nodeValue))break;if(m){c={},m.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Rt,yt,on){c[yt]=on});break}}var R=p.className;if((c!==fe||He.test(R))&&!oe.test(R)){for(var Y=!1,Ee=p.parentNode;Ee;Ee=Ee.parentNode){var tt=Ee.tagName;if(re.test(tt)&&Ee.className&&He.test(Ee.className)){Y=!0;break}}if(!Y){p.className+=" prettyprinted";var nt=c.lang;if(!nt){nt=R.match(et);var ot;!nt&&(ot=q(p))&&$e.test(ot.tagName)&&(nt=ot.className.match(et)),nt&&(nt=nt[1])}var xt;if(rt.test(p.tagName))xt=1;else{var bt=p.currentStyle,ht=Ke.defaultView,Ut=bt?bt.whiteSpace:ht&&ht.getComputedStyle?ht.getComputedStyle(p,null).getPropertyValue("white-space"):0;xt=Ut&&Ut.substring(0,3)==="pre"}var _t=c.linenums;(_t=_t==="true"||+_t)||(_t=R.match(/\blinenums\b(?::(\d+))?/),_t=_t?_t[1]&&_t[1].length?+_t[1]:!0:!1),_t&&Ne(p,_t,xt);var Ht={langExtension:nt,sourceNode:p,numberLines:_t,pre:xt,sourceCode:null,basePos:null,spans:null,decorations:null};Ae(Ht)}}}ut<Me.length?k.setTimeout(C,250):typeof me=="function"&&me()}C()}var ne=k.PR={createSimpleLexer:Le,registerLangHandler:I,sourceDecorator:Ie,PR_ATTRIB_NAME:V,PR_ATTRIB_VALUE:ce,PR_COMMENT:F,PR_DECLARATION:N,PR_KEYWORD:Se,PR_LITERAL:we,PR_NOCODE:$,PR_PLAIN:b,PR_PUNCTUATION:B,PR_SOURCE:x,PR_STRING:ae,PR_TAG:G,PR_TYPE:Q,prettyPrintOne:W?k.prettyPrintOne=Je:ee=Je,prettyPrint:S=W?k.prettyPrint=xe:S=xe},Oe=k.define;typeof Oe=="function"&&Oe.amd&&Oe("google-code-prettify",[],function(){return ne})})()},UUDw:function(ft,We,g){ft.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},UqFu:function(ft,We,g){"use strict";g.d(We,"a",function(){return L});var L=function(W){var de=document.createElement("textarea");return de.value=W,de.value}},"VrN/":function(ft,We,g){(function(L,Ce){ft.exports=Ce()})(this,function(){"use strict";var L=navigator.userAgent,Ce=navigator.platform,W=/gecko\/\d/i.test(L),de=/MSIE \d/.test(L),le=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(L),ee=/Edge\/(\d+)/.exec(L),S=de||le||ee,k=S&&(de?document.documentMode||6:+(ee||le)[1]),_=!ee&&/WebKit\//.test(L),ie=_&&/Qt\/\d+\.\d+/.test(L),P=!ee&&/Chrome\//.test(L),z=/Opera\//.test(L),ue=/Apple Computer/.test(navigator.vendor),j=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(L),M=/PhantomJS/.test(L),T=!ee&&/AppleWebKit/.test(L)&&/Mobile\/\w+/.test(L),A=/Android/.test(L),X=T||A||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(L),H=T||/Mac/.test(Ce),ge=/\bCrOS\b/.test(L),Be=/win/i.test(Ce),Z=z&&L.match(/Version\/(\d*\.\d*)/);Z&&(Z=Number(Z[1])),Z&&Z>=15&&(z=!1,_=!0);var ae=H&&(ie||z&&(Z==null||Z<12.11)),Se=W||S&&k>=9;function F(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var r=e.className,n=F(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 we(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function B(e,t){return we(e).appendChild(t)}function b(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 G(e,t,r,n){var i=b(e,t,r,n);return i.setAttribute("role","presentation"),i}var N;document.createRange?N=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:N=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 x(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 V(){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 ce(e,t){var r=e.className;F(t).test(r)||(e.className+=(r?" ":"")+t)}function $(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!F(r[n]).test(t)&&(t+=" "+r[n]);return t}var Te=function(e){e.select()};T?Te=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(Te=function(e){try{e.select()}catch(t){}});function v(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function d(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 O(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 s=e.indexOf(" ",a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=r-o%r,a=s+1}}var te=function(){this.id=null,this.f=null,this.time=0,this.handler=v(this.onTimeout,this)};te.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},te.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 q(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Le=50,Ie={toString:function(){return"CodeMirror.Pass"}},pe={scroll:!1},Ne={origin:"*mouse"},ve={origin:"+move"};function be(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 I=[""];function K(e){for(;I.length<=e;)I.push(Ae(I)+" ");return I[e]}function Ae(e){return e[e.length-1]}function Je(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function xe(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function ne(){}function Oe(e,t){var r;return Object.create?r=Object.create(e):(ne.prototype=e,r=new ne),t&&d(t,r),r}var me=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function he(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||me.test(e))}function Re(e,t){return t?t.source.indexOf("\\w")>-1&&he(e)?!0:t.test(e):he(e)}function Ke(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var je=/[\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 ye(e){return e.charCodeAt(0)>=768&&je.test(e)}function Me(e,t,r){for(;(r<0?t>0:t<e.length)&&ye(e.charAt(t));)t+=r;return t}function Xe(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 Ve(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 ze=null;function qe(e,t,r){var n;ze=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:ze=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:ze=i)}return n!=null?n:ze}var ut=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function l(u,y,E){this.level=u,this.from=y,this.to=E}return function(u,y){var E=y=="ltr"?"L":"R";if(u.length==0||y=="ltr"&&!n.test(u))return!1;for(var U=u.length,D=[],se=0;se<U;++se)D.push(r(u.charCodeAt(se)));for(var _e=0,De=E;_e<U;++_e){var Ue=D[_e];Ue=="m"?D[_e]=De:De=Ue}for(var Ge=0,Fe=E;Ge<U;++Ge){var Qe=D[Ge];Qe=="1"&&Fe=="r"?D[Ge]="n":a.test(Qe)&&(Fe=Qe,Qe=="r"&&(D[Ge]="R"))}for(var dt=1,at=D[0];dt<U-1;++dt){var vt=D[dt];vt=="+"&&at=="1"&&D[dt+1]=="1"?D[dt]="1":vt==","&&at==D[dt+1]&&(at=="1"||at=="n")&&(D[dt]=at),at=vt}for(var At=0;At<U;++At){var Jt=D[At];if(Jt==",")D[At]="N";else if(Jt=="%"){var Nt=void 0;for(Nt=At+1;Nt<U&&D[Nt]=="%";++Nt);for(var En=At&&D[At-1]=="!"||Nt<U&&D[Nt]=="1"?"1":"N",vn=At;vn<Nt;++vn)D[vn]=En;At=Nt-1}}for(var Wt=0,bn=E;Wt<U;++Wt){var en=D[Wt];bn=="L"&&en=="1"?D[Wt]="L":a.test(en)&&(bn=en)}for(var Kt=0;Kt<U;++Kt)if(i.test(D[Kt])){var zt=void 0;for(zt=Kt+1;zt<U&&i.test(D[zt]);++zt);for(var jt=(Kt?D[Kt-1]:E)=="L",yn=(zt<U?D[zt]:E)=="L",Vr=jt==yn?jt?"L":"R":E,hr=Kt;hr<zt;++hr)D[hr]=Vr;Kt=zt-1}for(var an=[],Kn,Zt=0;Zt<U;)if(o.test(D[Zt])){var ja=Zt;for(++Zt;Zt<U&&o.test(D[Zt]);++Zt);an.push(new l(0,ja,Zt))}else{var tr=Zt,Sr=an.length,kr=y=="rtl"?1:0;for(++Zt;Zt<U&&D[Zt]!="L";++Zt);for(var fn=tr;fn<Zt;)if(s.test(D[fn])){tr<fn&&(an.splice(Sr,0,new l(1,tr,fn)),Sr+=kr);var Yr=fn;for(++fn;fn<Zt&&s.test(D[fn]);++fn);an.splice(Sr,0,new l(2,Yr,fn)),Sr+=kr,tr=fn}else++fn;tr<Zt&&an.splice(Sr,0,new l(1,tr,Zt))}return y=="ltr"&&(an[0].level==1&&(Kn=u.match(/^\s+/))&&(an[0].from=Kn[0].length,an.unshift(new l(0,0,Kn[0].length))),Ae(an).level==1&&(Kn=u.match(/\s+$/))&&(Ae(an).to-=Kn[0].length,an.push(new l(0,U-Kn[0].length,U)))),y=="rtl"?an.reverse():an}}();function et(e,t){var r=e.order;return r==null&&(r=e.order=ut(e.text,t)),r}var He=[],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]||He).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||He}function $e(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=q(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function re(e,t){var r=rt(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 fe(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),re(e,r||t.type,e,t),h(t)||t.codemirrorIgnore}function C(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)q(r,t[n])==-1&&r.push(t[n])}function w(e,t){return rt(e,t).length>0}function p(e){e.prototype.on=function(t,r){oe(this,t,r)},e.prototype.off=function(t,r){$e(this,t,r)}}function c(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function f(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function h(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function m(e){c(e),f(e)}function R(e){return e.target||e.srcElement}function Y(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),H&&e.ctrlKey&&t==1&&(t=3),t}var Ee=function(){if(S&&k<9)return!1;var e=b("div");return"draggable"in e||"dragDrop"in e}(),tt;function nt(e){if(tt==null){var t=b("span","\u200B");B(e,b("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(tt=t.offsetWidth<=1&&t.offsetHeight>2&&!(S&&k<8))}var r=tt?b("span","\u200B"):b("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var ot;function xt(e){if(ot!=null)return ot;var t=B(e,document.createTextNode("A\u062EA")),r=N(t,0,1).getBoundingClientRect(),n=N(t,1,2).getBoundingClientRect();return we(e),!r||r.left==r.right?!1:ot=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},Ut=function(){var e=b("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function Ht(e){if(_t!=null)return _t;var t=B(e,b("span","x")),r=t.getBoundingClientRect(),n=N(t,0,1).getBoundingClientRect();return _t=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 _n(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=Oe(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]={};d(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 Ot=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};Ot.prototype.eol=function(){return this.pos>=this.string.length},Ot.prototype.sol=function(){return this.pos==this.lineStart},Ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ot.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ot.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},Ot.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ot.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ot.prototype.skipToEnd=function(){this.pos=this.string.length},Ot.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ot.prototype.backUp=function(e){this.pos-=e},Ot.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=O(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?O(this.string,this.lineStart,this.tabSize):0)},Ot.prototype.indentation=function(){return O(this.string,null,this.tabSize)-(this.lineStart?O(this.string,this.lineStart,this.tabSize):0)},Ot.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)}},Ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ot.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ot.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ot.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ze(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 wt(e){if(e.parent==null)return null;for(var t=e.parent,r=q(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 s=e.lines[o],l=s.height;if(t<l)break;t-=l}return r+o}function Pn(e,t){return t>=e.first&&t<e.first+e.size}function Ln(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ke(e,t,r){if(r===void 0&&(r=null),!(this instanceof ke))return new ke(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ct(e,t){return e.line-t.line||e.ch-t.ch}function kn(e,t){return e.sticky==t.sticky&&ct(e,t)==0}function Mn(e){return ke(e.line,e.ch)}function Pe(e,t){return ct(e,t)<0?t:e}function Xn(e,t){return ct(e,t)<0?e:t}function Tr(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function lt(e,t){if(t.line<e.first)return ke(e.first,0);var r=e.first+e.size-1;return t.line>r?ke(r,Ze(e,r).text.length):ln(t,Ze(e,t.line).text.length)}function ln(e,t){var r=e.ch;return r==null||r>t?ke(e.line,t):r<0?ke(e.line,0):e}function Wn(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=lt(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 Dn(e,t,r,n){var i=[e.state.modeGen],a={};Lt(e,t.text,e.doc.mode,r,function(u,y){return i.push(u,y)},a,n);for(var o=r.state,s=function(u){r.baseTokens=i;var y=e.state.overlays[u],E=1,U=0;r.state=!0,Lt(e,t.text,y.mode,r,function(D,se){for(var _e=E;U<D;){var De=i[E];De>D&&i.splice(E,1,D,i[E+1],De),E+=2,U=Math.min(D,De)}if(!se)return;if(y.opaque)i.splice(_e,E-_e,D,"overlay "+se),E=_e+2;else for(;_e<E;_e+=2){var Ue=i[_e+1];i[_e+1]=(Ue?Ue+" ":"")+"overlay "+se}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function st(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=J(e,wt(t)),i=t.text.length>e.options.maxHighlightLength&&An(e.doc.mode,n.state),a=Dn(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 J(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new un(n,!0,t);var a=Or(e,t,r),o=a>n.first&&Ze(n,a-1).stateAfter,s=o?un.fromSaved(n,o,a):new un(n,Bn(n.mode),a);return n.iter(a,t,function(l){Ye(e,l.text,s);var u=s.line;l.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Ye(e,t,r,n){var i=e.doc.mode,a=new Ot(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&it(i,r.state);!a.eol();)Ct(i,a,r.state),a.start=a.pos}function it(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=lt(i,t);var s=Ze(i,t.line),l=J(e,t.line,r),u=new Ot(s.text,e.options.tabSize,l),y;for(n&&(y=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=Ct(a,u,l.state),n&&y.push(new cn(u,o,An(i.mode,l.state)));return n?y:new cn(u,o,l.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 Lt(e,t,r,n,i,a,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var l=0,u=null,y=new Ot(t,e.options.tabSize,n),E,U=e.options.addModeClass&&[null];for(t==""&&Pt(it(r,n.state),a);!y.eol();){if(y.pos>e.options.maxHighlightLength?(s=!1,o&&Ye(e,t,n,y.pos),y.pos=t.length,E=null):E=Pt(Ct(r,y,n.state,U),a),U){var D=U[0].name;D&&(E="m-"+(E?D+" "+E:D))}if(!s||u!=E){for(;l<y.start;)l=Math.min(y.start,l+5e3),i(l,u);u=E}y.start=y.pos}for(;l<y.pos;){var se=Math.min(y.pos,l+5e3);i(se,u),l=se}}function Or(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Ze(a,s-1),u=l.stateAfter;if(u&&(!r||s+(u instanceof $n?u.lookAhead:0)<=a.modeFrontier))return s;var y=O(l.text,null,e.options.tabSize);(i==null||n>y)&&(i=s-1,n=y)}return i}function xn(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=Ze(e,n).stateAfter;if(i&&(!(i instanceof $n)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Nn=!1,pn=!1;function Si(){Nn=!0}function ki(){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 Fa(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(s||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var l=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new pr(o,a.from,l?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,s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(s||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var l=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new pr(o,l?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)&&Ze(e,t.from.line).markedSpans,n=Pn(e,t.to.line)&&Ze(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=ct(t.from,t.to)==0,s=Fa(r,i,o),l=Jr(n,a,o),u=t.text.length==1,y=Ae(t.text).length+(u?i:0);if(s)for(var E=0;E<s.length;++E){var U=s[E];if(U.to==null){var D=rr(l,U.marker);D?u&&(U.to=D.to==null?null:D.to+y):U.to=i}}if(l)for(var se=0;se<l.length;++se){var _e=l[se];if(_e.to!=null&&(_e.to+=y),_e.from==null){var De=rr(s,_e.marker);De||(_e.from=y,u&&(s||(s=[])).push(_e))}else _e.from+=y,u&&(s||(s=[])).push(_e)}s&&(s=Ar(s)),l&&l!=s&&(l=Ar(l));var Ue=[s];if(!u){var Ge=t.text.length-2,Fe;if(Ge>0&&s)for(var Qe=0;Qe<s.length;++Qe)s[Qe].to==null&&(Fe||(Fe=[])).push(new pr(s[Qe].marker,null,null));for(var dt=0;dt<Ge;++dt)Ue.push(Fe);Ue.push(l)}return Ue}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 Lr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(D){if(D.markedSpans)for(var se=0;se<D.markedSpans.length;++se){var _e=D.markedSpans[se].marker;_e.readOnly&&(!n||q(n,_e)==-1)&&(n||(n=[])).push(_e)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],s=o.find(0),l=0;l<i.length;++l){var u=i[l];if(ct(u.to,s.from)<0||ct(u.from,s.to)>0)continue;var y=[l,1],E=ct(u.from,s.from),U=ct(u.to,s.to);(E<0||!o.inclusiveLeft&&!E)&&y.push({from:u.from,to:s.from}),(U>0||!o.inclusiveRight&&!U)&&y.push({from:s.to,to:u.to}),i.splice.apply(i,y),l+=y.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=ct(n.from,i.from)||gr(e)-gr(t);if(a)return-a;var o=ct(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 Oi(e){return ir(e,!0)}function Mr(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=Ze(e,t),o=pn&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var l=o[s];if(!l.marker.collapsed)continue;var u=l.marker.find(0),y=ct(u.from,r)||gr(l.marker)-gr(i),E=ct(u.to,n)||Yn(l.marker)-Yn(i);if(y>=0&&E<=0||y<=0&&E>=0)continue;if(y<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ct(u.to,r)>=0:ct(u.to,r)>0)||y>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ct(u.from,n)<=0:ct(u.from,n)<0))return!0}}function In(e){for(var t;t=Oi(e);)e=t.find(-1,!0).line;return e}function Ba(e){for(var t;t=Mr(e);)e=t.find(1,!0).line;return e}function pt(e){for(var t,r;t=Mr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function mt(e,t){var r=Ze(e,t),n=In(r);return r==n?t:wt(n)}function gt(e,t){if(t>e.lastLine())return t;var r=Ze(e,t),n;if(!Et(e,r))return t;for(;n=Mr(r);)r=n.find(1,!0).line;return wt(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&&kt(e,t,n))return!0}}function kt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return kt(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)&&kt(e,t,i))return!0}function Mt(e){e=In(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 s=a.children[o];if(s==r)break;t+=s.height}return t}function It(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Oi(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Mr(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=Ze(r,r.first),t.maxLineLength=It(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=It(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 wt(this)},p($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=G("span",null,null,_?"padding-right: .1px":null),n={pre:G("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,xt(e.display.measure)&&(o=et(a,e.doc.direction))&&(n.addToken=Ts(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&wt(a);Os(a,n,st(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=$(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=$(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(nt(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(_){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return re(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=$(n.pre.className,n.textClass||"")),n}function qr(e){var t=b("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 s=e.splitSpaces?ks(t,e.trailingSpace):t,l=e.cm.state.specialChars,u=!1,y;if(!l.test(t))e.col+=t.length,y=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,y),S&&k<9&&(u=!0),e.pos+=t.length;else{y=document.createDocumentFragment();for(var E=0;;){l.lastIndex=E;var U=l.exec(t),D=U?U.index-E:t.length-E;if(D){var se=document.createTextNode(s.slice(E,E+D));S&&k<9?y.appendChild(b("span",[se])):y.appendChild(se),e.map.push(e.pos,e.pos+D,se),e.col+=D,e.pos+=D}if(!U)break;E+=D+1;var _e=void 0;if(U[0]==" "){var De=e.cm.options.tabSize,Ue=De-e.col%De;_e=y.appendChild(b("span",K(Ue),"cm-tab")),_e.setAttribute("role","presentation"),_e.setAttribute("cm-text"," "),e.col+=Ue}else U[0]=="\r"||U[0]==`
`?(_e=y.appendChild(b("span",U[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),_e.setAttribute("cm-text",U[0]),e.col+=1):(_e=e.cm.options.specialCharPlaceholder(U[0]),_e.setAttribute("cm-text",U[0]),S&&k<9?y.appendChild(b("span",[_e])):y.appendChild(_e),e.col+=1);e.map.push(e.pos,e.pos+1,_e),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||u||a||o){var Ge=r||"";n&&(Ge+=n),i&&(Ge+=i);var Fe=b("span",[y],Ge,a);if(o)for(var Qe in o)o.hasOwnProperty(Qe)&&Qe!="style"&&Qe!="class"&&Fe.setAttribute(Qe,o[Qe]);return e.content.appendChild(Fe)}e.content.appendChild(y)}function ks(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,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,y=u+n.length;;){for(var E=void 0,U=0;U<t.length&&!(E=t[U],E.to>u&&E.from<=u);U++);if(E.to>=y)return e(r,n,i,a,o,s,l);e(r,n.slice(0,E.to-u),i,a,null,s,l),a=null,n=n.slice(E.to-u),u=E.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 Os(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 s=i.length,l=0,u=1,y="",E,U,D=0,se,_e,De,Ue,Ge;;){if(D==l){se=_e=De=U="",Ge=null,Ue=null,D=Infinity;for(var Fe=[],Qe=void 0,dt=0;dt<n.length;++dt){var at=n[dt],vt=at.marker;if(vt.type=="bookmark"&&at.from==l&&vt.widgetNode)Fe.push(vt);else if(at.from<=l&&(at.to==null||at.to>l||vt.collapsed&&at.to==l&&at.from==l)){if(at.to!=null&&at.to!=l&&D>at.to&&(D=at.to,_e=""),vt.className&&(se+=" "+vt.className),vt.css&&(U=(U?U+";":"")+vt.css),vt.startStyle&&at.from==l&&(De+=" "+vt.startStyle),vt.endStyle&&at.to==D&&(Qe||(Qe=[])).push(vt.endStyle,at.to),vt.title&&((Ge||(Ge={})).title=vt.title),vt.attributes)for(var At in vt.attributes)(Ge||(Ge={}))[At]=vt.attributes[At];vt.collapsed&&(!Ue||Qr(Ue.marker,vt)<0)&&(Ue=at)}else at.from>l&&D>at.from&&(D=at.from)}if(Qe)for(var Jt=0;Jt<Qe.length;Jt+=2)Qe[Jt+1]==D&&(_e+=" "+Qe[Jt]);if(!Ue||Ue.from==l)for(var Nt=0;Nt<Fe.length;++Nt)Wa(t,0,Fe[Nt]);if(Ue&&(Ue.from||0)==l){if(Wa(t,(Ue.to==null?s+1:Ue.to)-l,Ue.marker,Ue.from==null),Ue.to==null)return;Ue.to==l&&(Ue=!1)}}if(l>=s)break;for(var En=Math.min(s,D);;){if(y){var vn=l+y.length;if(!Ue){var Wt=vn>En?y.slice(0,En-l):y;t.addToken(t,Wt,E?E+se:se,De,l+Wt.length==D?_e:"",U,Ge)}if(vn>=En){y=y.slice(En-l),l=En;break}l=vn,De=""}y=i.slice(a,a=r[u++]),E=Zn(r[u++],t.cm.options)}}}function za(e,t,r){this.line=t,this.rest=pt(t),this.size=this.rest?wt(Ae(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,Ze(e.doc,a),a);i=a+o.size,n.push(o)}return n}var Dr=null;function As(e){Dr?Dr.ops.push(e):e.ownsGroup=Dr={ops:[e],delayedCallbacks:[]}}function Ls(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 Ms(e,t){var r=e.ownsGroup;if(!r)return;try{Ls(r)}finally{Dr=null,t(r)}}var ei=null;function qt(e,t){var r=rt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;Dr?i=Dr.delayedCallbacks:ei?i=ei:(i=ei=[],setTimeout(Ds,0));for(var a=function(s){i.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ds(){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"&&Ns(e,t,n)}t.changes=null}function ti(e){return e.node==e.text&&(e.node=b("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&k<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(b("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=b("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),s=t.gutter=b("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=s.appendChild(b("div",Ln(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var l=0;l<e.display.gutterSpecs.length;++l){var u=e.display.gutterSpecs[l].className,y=a.hasOwnProperty(u)&&a[u];y&&s.appendChild(b("div",[y],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Ns(e,t,r){t.alignable&&(t.alignable=null);for(var n=F("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 Is(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,s=t.widgets;o<s.length;++o){var l=s[o],u=b("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),js(l,u,r,n),e.display.input.setUneditable(u),i&&l.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),qt(l,"redraw")}}function js(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(!x(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;"),B(t.display.measure,b("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function qn(e,t){for(var r=R(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 Li(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=B(e.measure,b("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 Us(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(),s=0;s<o.length-1;s++){var l=o[s],u=o[s+1];Math.abs(l.bottom-u.bottom)>2&&a.push((l.bottom+u.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(wt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=In(t);var r=wt(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,B(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[xr(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=wt(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=Fs(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||(Us(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,s,l,u=0;u<e.length;u+=3)if(s=e[u],l=e[u+1],t<s?(i=0,a=1,o="left"):t<l?(i=t-s,a=i+1):(u==e.length-3||t==l&&e[u+3]>t)&&(a=l-s,i=a-1,t>=l&&(o="right")),i!=null){if(n=e[u+2],s==l&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],o="left";if(r=="right"&&i==l-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:s,coverEnd:l}}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,s=i.end,l=i.collapse,u;if(a.nodeType==3){for(var y=0;y<4;y++){for(;o&&ye(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s<i.coverEnd&&ye(t.line.text.charAt(i.coverStart+s));)++s;if(S&&k<9&&o==0&&s==i.coverEnd-i.coverStart?u=a.parentNode.getBoundingClientRect():u=Bs(N(a,o,s).getClientRects(),n),u.left||u.right||o==0)break;s=o,o=o-1,l="right"}S&&k<11&&(u=zs(e.display.measure,u))}else{o>0&&(l=n="right");var E;e.options.lineWrapping&&(E=a.getClientRects()).length>1?u=E[n=="right"?E.length-1:0]:u=a.getBoundingClientRect()}if(S&&k<9&&!o&&(!u||!u.left&&!u.right)){var U=a.parentNode.getClientRects()[0];U?u={left:U.left,right:U.left+Nr(e.display),top:U.top,bottom:U.bottom}:u=Za}for(var D=u.top-t.rect.top,se=u.bottom-t.rect.top,_e=(D+se)/2,De=t.view.measure.heights,Ue=0;Ue<De.length-1&&!(_e<De[Ue]);Ue++);var Ge=Ue?De[Ue-1]:0,Fe=De[Ue],Qe={left:(l=="right"?u.right:u.left)-t.rect.left,right:(l=="left"?u.left:u.right)-t.rect.left,top:Ge,bottom:Fe};return!u.left&&!u.right&&(Qe.bogus=!0),e.options.singleCursorHeightPerLine||(Qe.rtop=D,Qe.rbottom=se),Qe}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,we(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 P&&A?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function no(){return P&&A?-(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 Mi(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=Mt(t);if(n=="local"?o+=Li(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:no());var l=s.left+(n=="window"?0:to());r.left+=l,r.right+=l}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=Ze(e.doc,t.line)),Mi(e,n,Ja(e,n,t.ch,i),r)}function jn(e,t,r,n,i,a){n=n||Ze(e.doc,t.line),i||(i=Rr(e,n));function o(se,_e){var De=Hn(e,i,se,_e?"right":"left",a);return _e?De.left=De.right:De.right=De.left,Mi(e,n,De,r)}var s=et(n,e.doc.direction),l=t.ch,u=t.sticky;if(l>=n.text.length?(l=n.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return o(u=="before"?l-1:l,u=="before");function y(se,_e,De){var Ue=s[_e],Ge=Ue.level==1;return o(De?se-1:se,Ge!=De)}var E=qe(s,l,u),U=ze,D=y(l,E,u=="before");return U!=null&&(D.other=y(l,U,u!="before")),D}function io(e,t){var r=0;t=lt(e.doc,t),e.options.lineWrapping||(r=Nr(e.display)*t.ch);var n=Ze(e.doc,t.line),i=Mt(n)+Li(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function sa(e,t,r,n,i){var a=ke(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,Ze(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ze(n,i);;){var s=Hs(e,o,i,t,r),l=qi(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;o=Ze(n,i=u.line)}}function ao(e,t,r,n){n-=aa(t);var i=t.text.length,a=Xe(function(o){return Hn(e,r,o-1).bottom<=n},i,0);return i=Xe(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=Mi(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-=Mt(t);var a=Rr(e,t),o=aa(t),s=0,l=t.text.length,u=!0,y=et(t,e.doc.direction);if(y){var E=(e.options.lineWrapping?Gs:Ks)(e,t,r,a,y,n,i);u=E.level!=1,s=u?E.from:E.to-1,l=u?E.to:E.from-1}var U=null,D=null,se=Xe(function(dt){var at=Hn(e,a,dt);return at.top+=o,at.bottom+=o,ua(at,n,i,!1)?(at.top<=i&&at.left<=n&&(U=dt,D=at),!0):!1},s,l),_e,De,Ue=!1;if(D){var Ge=n-D.left<D.right-n,Fe=Ge==u;se=U+(Fe?0:1),De=Fe?"after":"before",_e=Ge?D.left:D.right}else{!u&&(se==l||se==s)&&se++,De=se==0?"after":se==t.text.length?"before":Hn(e,a,se-(u?1:0)).bottom+o<=i==u?"after":"before";var Qe=jn(e,ke(r,se,De),"line",t,a);_e=Qe.left,Ue=i<Qe.top?-1:i>=Qe.bottom?1:0}return se=Me(t.text,se,1),sa(r,se,De,Ue,n-_e)}function Ks(e,t,r,n,i,a,o){var s=Xe(function(E){var U=i[E],D=U.level!=1;return ua(jn(e,ke(r,D?U.to:U.from,D?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),l=i[s];if(s>0){var u=l.level!=1,y=jn(e,ke(r,u?l.from:l.to,u?"after":"before"),"line",t,n);ua(y,a,o,!0)&&y.top>o&&(l=i[s-1])}return l}function Gs(e,t,r,n,i,a,o){var s=ao(e,t,n,o),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var y=null,E=null,U=0;U<i.length;U++){var D=i[U];if(D.from>=u||D.to<=l)continue;var se=D.level!=1,_e=Hn(e,n,se?Math.min(u,D.to)-1:Math.max(l,D.from)).right,De=_e<a?a-_e+1e9:_e-a;(!y||E>De)&&(y=D,E=De)}return y||(y=i[i.length-1]),y.from<l&&(y={from:l,to:y.to,level:y.level}),y.to>u&&(y={from:y.from,to:u,level:y.level}),y}var br;function Pr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(br==null){br=b("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)br.appendChild(document.createTextNode("x")),br.appendChild(b("br"));br.appendChild(document.createTextNode("x"))}B(e.measure,br);var r=br.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),we(e.measure),r||1}function Nr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=b("span","xxxxxxxxxx"),r=b("pre",[t],"CodeMirror-line-like");B(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 s=e.display.gutterSpecs[o].className;r[s]=a.offsetLeft+a.clientLeft+i,n[s]=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/Nr(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&&R(t).getAttribute("cm-not-content")=="true")return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(E){return null}var l=la(e,a,o),u;if(n&&l.xRel>0&&(u=Ze(e.doc,l.line).text).length==l.ch){var y=O(u,u.length,e.options.tabSize)-u.length;l=ke(l.line,Math.max(0,Math.round((a-Va(e.display).left)/Nr(e.display))-y))}return l}function xr(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=Di(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=Di(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):sr(e)}else{var s=Di(e,t,t,-1),l=Di(e,r,r+n,1);s&&l?(i.view=i.view.slice(0,s.index).concat(Ai(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):sr(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.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[xr(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);q(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 Di(e,t,r,n){var i=xr(e,t),a,o=e.display.view;if(!pn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=e.display.viewFrom,l=0;l<i;l++)s+=o[l].size;if(s!=t){if(n>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-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(xr(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,xr(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 s=r.sel.ranges[o];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)continue;var l=s.empty();(l||e.options.showCursorWhenSelecting)&&co(e,s.head,i),l||$s(e,s,a)}return n}function co(e,t,r){var n=jn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(b("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(b("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),s=o.left,l=Math.max(n.sizerWidth,vr(e)-n.sizer.offsetLeft)-o.right,u=i.direction=="ltr";function y(Fe,Qe,dt,at){Qe<0&&(Qe=0),Qe=Math.round(Qe),at=Math.round(at),a.appendChild(b("div",null,"CodeMirror-selected","position: absolute; left: "+Fe+`px;
top: `+Qe+"px; width: "+(dt==null?l-Fe:dt)+`px;
height: `+(at-Qe)+"px"))}function E(Fe,Qe,dt){var at=Ze(i,Fe),vt=at.text.length,At,Jt;function Nt(Wt,bn){return oa(e,ke(Fe,Wt),"div",at,bn)}function En(Wt,bn,en){var Kt=oo(e,at,null,Wt),zt=bn=="ltr"==(en=="after")?"left":"right",jt=en=="after"?Kt.begin:Kt.end-(/\s/.test(at.text.charAt(Kt.end-1))?2:1);return Nt(jt,zt)[zt]}var vn=et(at,i.direction);return Ve(vn,Qe||0,dt==null?vt:dt,function(Wt,bn,en,Kt){var zt=en=="ltr",jt=Nt(Wt,zt?"left":"right"),yn=Nt(bn-1,zt?"right":"left"),Vr=Qe==null&&Wt==0,hr=dt==null&&bn==vt,an=Kt==0,Kn=!vn||Kt==vn.length-1;if(yn.top-jt.top<=3){var Zt=(u?Vr:hr)&&an,ja=(u?hr:Vr)&&Kn,tr=Zt?s:(zt?jt:yn).left,Sr=ja?l:(zt?yn:jt).right;y(tr,jt.top,Sr-tr,jt.bottom)}else{var kr,fn,Yr,Ua;zt?(kr=u&&Vr&&an?s:jt.left,fn=u?l:En(Wt,en,"before"),Yr=u?s:En(bn,en,"after"),Ua=u&&hr&&Kn?l:yn.right):(kr=u?En(Wt,en,"before"):s,fn=!u&&Vr&&an?l:jt.right,Yr=!u&&hr&&Kn?s:yn.left,Ua=u?En(bn,en,"after"):l),y(kr,jt.top,fn-kr,jt.bottom),jt.bottom<yn.top&&y(s,jt.bottom,null,yn.top),y(Yr,yn.top,Ua-Yr,yn.bottom)}(!At||Ri(jt,At)<0)&&(At=jt),Ri(yn,At)<0&&(At=yn),(!Jt||Ri(jt,Jt)<0)&&(Jt=jt),Ri(yn,Jt)<0&&(Jt=yn)}),{start:At,end:Jt}}var U=t.from(),D=t.to();if(U.line==D.line)E(U.line,U.ch,D.ch);else{var se=Ze(i,U.line),_e=Ze(i,D.line),De=In(se)==In(_e),Ue=E(U.line,U.ch,De?se.text.length+1:null).end,Ge=E(D.line,De?0:null,D.ch).start;De&&(Ue.top<Ge.top-2?(y(Ue.right,Ue.top,null,Ue.bottom),y(s,Ge.top,Ge.left,Ge.bottom)):y(Ue.right,Ue.top,Ge.left-Ue.right,Ue.bottom)),Ue.bottom<Ge.top&&y(s,Ue.bottom,null,Ge.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()||Ir(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,Ir(e))},100)}function pa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(re(e,"focus",e,t),e.state.focused=!0,ce(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),_&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ha(e)}function Ir(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(re(e,"blur",e,t),e.state.focused=!1,Q(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,s=0;if(i.hidden)continue;if(S&&k<8){var l=i.node.offsetTop+i.node.offsetHeight;o=l-r,r=l}else{var u=i.node.getBoundingClientRect();o=u.bottom-u.top,!a&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var y=i.line.height-o;if((y>.005||y<-.005)&&(hn(i.line,o),po(i.line),i.rest))for(var E=0;E<i.rest.length;E++)po(i.rest[E]);if(s>e.display.sizerWidth){var U=Math.ceil(s/Nr(e.display));U>e.display.maxLineLength&&(e.display.maxLineLength=U,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 Ni(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Li(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 s=r.ensure.from.line,l=r.ensure.to.line;s<a?(a=s,o=Sn(t,Mt(Ze(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(a=Sn(t,Mt(Ze(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Vs(e,t){if(fe(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&&!M){var a=b("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Li(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?ke(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?ke(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=jn(e,t),l=!r||r==t?s:jn(e,r);i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n};var u=ma(e,i),y=e.doc.scrollTop,E=e.doc.scrollLeft;if(u.scrollTop!=null&&(oi(e,u.scrollTop),Math.abs(e.doc.scrollTop-y)>1&&(o=!0)),u.scrollLeft!=null&&(wr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-E)>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&&wr(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 s=e.doc.height+na(r),l=t.top<n,u=t.bottom>s-n;if(t.top<i)o.scrollTop=l?0:t.top;else if(t.bottom>i+a){var y=Math.min(t.top,(u?s:t.bottom)-a);y!=i&&(o.scrollTop=y)}var E=e.options.fixedGutter?0:r.gutters.offsetWidth,U=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-E,D=vr(e)-r.gutters.offsetWidth,se=t.right-t.left>D;return se&&(t.right=t.left+D),t.left<10?o.scrollLeft=0:t.left<U?o.scrollLeft=Math.max(0,t.left+E-(se?0:10)):t.right>D+U-3&&(o.scrollLeft=t.right+(se?0:10)-D),o}function ga(e,t){if(t==null)return;Ii(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function jr(e){Ii(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)&&Ii(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Zs(e,t){Ii(e),e.curOp.scrollToPos=t}function Ii(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;W||ba(e,{top:t}),go(e,t,!0),W&&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 wr(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,wo(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=b("div",[b("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=b("div",[b("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,S&&k<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=H&&!j?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new te,this.disableVert=new te},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 Ur(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&&Q(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"?wr(e,t):oi(e,t)},e),e.display.scrollbars.addClass&&ce(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function _r(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&&Ms(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 ji(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&&wr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==V();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&xa(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&&xo(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&&wr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,lt(n,e.scrollToPos.from),lt(n,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||re(a[s],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&re(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&re(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function wn(e,t){if(e.curOp)return t();_r(e);try{return t()}finally{Cr(e)}}function Vt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);_r(e);try{return t.apply(e,arguments)}finally{Cr(e)}}}function dn(e){return function(){if(this.curOp)return e.apply(this,arguments);_r(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);_r(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,v(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=J(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,s=a.text.length>e.options.maxHighlightLength?An(t.mode,n.state):null,l=Dn(e,a,n,!0);s&&(n.state=s),a.styles=l.styles;var u=a.styleClasses,y=l.classes;y?a.styleClasses=y:u&&(a.styleClasses=null);for(var E=!o||o.length!=a.styles.length||u!=y&&(!u||!y||u.bgClass!=y.bgClass||u.textClass!=y.textClass),U=0;!E&&U<o.length;++U)E=o[U]!=a.styles[U];E&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Ye(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&&wn(e,function(){for(var a=0;a<i.length;a++)or(e,i[a],"text")})}var ji=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ni(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=[]};ji.prototype.signal=function(e,t){w(e,t)&&this.events.push(arguments)},ji.prototype.finish=function(){for(var e=0;e<this.events.length;e++)re.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=V();if(!t||!x(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&x(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==V())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&x(document.body,e.anchorNode)&&x(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 s=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Xs(e,a,o),r.viewOffset=Mt(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=lo(e);if(!s&&l==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=sl(e);return l>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(u),we(r.cursorDiv),we(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ui(e,400)),r.updateLineNumbers=null,!0}function xo(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=Ni(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ni(e.display,e.doc,r));if(!va(e,t))break;Pi(e);var i=si(e);ii(e),Ur(e,i),xa(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 ji(e,t);if(va(e,r)){Pi(e),xo(e,r);var n=si(e);ii(e),Ur(e,n),xa(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(se){var _e=se.nextSibling;return _&&H&&e.display.currentWheelTarget==se?se.style.display="none":se.parentNode.removeChild(se),_e}for(var l=n.view,u=n.viewFrom,y=0;y<l.length;y++){var E=l[y];if(!E.hidden)if(!E.node||E.node.parentNode!=a){var U=Is(e,E,u,r);a.insertBefore(U,o)}else{for(;o!=E.node;)o=s(o);var D=i&&t!=null&&t<=u&&E.lineNumber;E.changes&&(q(E.changes,"gutter")>-1&&(D=!1),Ha(e,E,u,r)),D&&(we(E.lineNumber),E.lineNumber.appendChild(document.createTextNode(Ln(e.options,u)))),o=E.node.nextSibling}u+=E.size}for(;o;)o=s(o)}function ya(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function xa(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 wo(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 s=r[o].alignable;if(s)for(var l=0;l<s.length;l++)s[l].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=Ln(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(b("div",[b("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 wa(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 _o(e){var t=e.gutters,r=e.gutterSpecs;we(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],a=i.className,o=i.style,s=t.appendChild(b("div",null,"CodeMirror-gutter "+a));o&&(s.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ya(e)}function ci(e){_o(e.display),mn(e),wo(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=b("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=b("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=G("div",null,"CodeMirror-code"),i.selectionDiv=b("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=b("div",null,"CodeMirror-cursors"),i.measure=b("div",null,"CodeMirror-measure"),i.lineMeasure=b("div",null,"CodeMirror-measure"),i.lineSpace=G("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=G("div",[i.lineSpace],"CodeMirror-lines");i.mover=b("div",[a],null,"position: relative"),i.sizer=b("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=b("div",null,null,"position: absolute; height: "+Le+"px; width: 1px;"),i.gutters=b("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=b("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=b("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),S&&k<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!_&&!(W&&X)&&(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=wa(n.gutters,n.lineNumbers),_o(i),r.init(i)}var Ui=0,Tn=null;S?Tn=-.53:W?Tn=15:P?Tn=-.7:ue&&(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,s=o.scrollWidth>o.clientWidth,l=o.scrollHeight>o.clientHeight;if(!(n&&s||i&&l))return;if(i&&H&&_){e:for(var u=t.target,y=a.view;u!=o;u=u.parentNode)for(var E=0;E<y.length;E++)if(y[E].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!W&&!z&&Tn!=null){i&&l&&oi(e,Math.max(0,o.scrollTop+i*Tn)),wr(e,Math.max(0,o.scrollLeft+n*Tn)),(!i||i&&l)&&c(t),a.wheelStartX=null;return}if(i&&Tn!=null){var U=i*Tn,D=e.doc.scrollTop,se=D+a.wrapper.clientHeight;U<0?D=Math.max(0,D+U-50):se=Math.min(e.doc.height,se+U+50),ba(e,{top:D,bottom:se})}Ui<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 _e=o.scrollLeft-a.wheelStartX,De=o.scrollTop-a.wheelStartY,Ue=De&&a.wheelDY&&De/a.wheelDY||_e&&a.wheelDX&&_e/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!Ue)return;Tn=(Tn*Ui+Ue)/(Ui+1),++Ui},200)):(a.wheelDX+=n,a.wheelDY+=i))}var On=function(e,t){this.ranges=e,this.primIndex=t};On.prototype.primary=function(){return this.ranges[this.primIndex]},On.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(!kn(r.anchor,n.anchor)||!kn(r.head,n.head))return!1}return!0},On.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new St(Mn(this.ranges[t].anchor),Mn(this.ranges[t].head));return new On(e,this.primIndex)},On.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},On.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ct(t,n.from())>=0&&ct(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 Pe(this.anchor,this.head)},St.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Un(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(U,D){return ct(U.from(),D.from())}),r=q(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],l=ct(s.to(),o.from());if(n&&!o.empty()?l>0:l>=0){var u=Xn(s.from(),o.from()),y=Pe(s.to(),o.to()),E=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new St(E?y:u,E?u:y))}}return new On(t,r)}function lr(e,t){return new On([new St(e,t||e)],0)}function ur(e){return e.text?ke(e.from.line+e.text.length-1,Ae(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ko(e,t){if(ct(e,t.from)<0)return e;if(ct(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),ke(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(ko(i.anchor,t),ko(i.head,t)))}return Un(e.cm,r,e.sel.primIndex)}function To(e,t,r){return e.line==t.line?ke(r.line,e.ch-t.ch+r.ch):ke(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=ke(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],l=To(s.from,i,a),u=To(ur(s),i,a);if(i=s.to,a=u,r=="around"){var y=e.sel.ranges[o],E=ct(y.head,y.anchor)<0;n[o]=new St(E?u:l,E?l:u)}else n[o]=new St(l,l)}return new On(n,e.sel.primIndex)}function _a(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 Oo(e,t){return t.from.ch==0&&t.to.ch==0&&Ae(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ca(e,t,r,n){function i(Ge){return r?r[Ge]:null}function a(Ge,Fe,Qe){Jn(Ge,Fe,Qe,n),qt(Ge,"change",Ge,t)}function o(Ge,Fe){for(var Qe=[],dt=Ge;dt<Fe;++dt)Qe.push(new $t(u[dt],i(dt),n));return Qe}var s=t.from,l=t.to,u=t.text,y=Ze(e,s.line),E=Ze(e,l.line),U=Ae(u),D=i(u.length-1),se=l.line-s.line;if(t.full)e.insert(0,o(0,u.length)),e.remove(u.length,e.size-u.length);else if(Oo(e,t)){var _e=o(0,u.length-1);a(E,E.text,D),se&&e.remove(s.line,se),_e.length&&e.insert(s.line,_e)}else if(y==E)if(u.length==1)a(y,y.text.slice(0,s.ch)+U+y.text.slice(l.ch),D);else{var De=o(1,u.length-1);De.push(new $t(U+y.text.slice(l.ch),D,n)),a(y,y.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,De)}else if(u.length==1)a(y,y.text.slice(0,s.ch)+u[0]+E.text.slice(l.ch),i(0)),e.remove(s.line+1,se);else{a(y,y.text.slice(0,s.ch)+u[0],i(0)),a(E,U+E.text.slice(l.ch),D);var Ue=o(1,u.length-1);se>1&&e.remove(s.line+1,se-1),e.insert(s.line+1,Ue)}qt(e,"change",e,t)}function cr(e,t,r){function n(i,a,o){if(i.linked)for(var s=0;s<i.linked.length;++s){var l=i.linked[s];if(l.doc==a)continue;var u=o&&l.sharedHist;if(r&&!u)continue;t(l.doc,u),n(l.doc,i,u)}}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),_a(e),Lo(e),e.options.lineWrapping||Xt(e),e.options.mode=t.modeOption,mn(e)}function Lo(e){(e.doc.direction=="rtl"?ce:Q)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){wn(e,function(){Lo(e),mn(e)})}function Fi(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:Mn(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 Mo(e){for(;e.length;){var t=Ae(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Mo(e.done),Ae(e.done);if(e.done.length&&!Ae(e.done).ranges)return Ae(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ae(e.done)}function Do(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,s;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)))s=Ae(o.changes),ct(t.from,t.to)==0&&ct(t.from,s.to)==0?s.to=ur(t):o.changes.push(Sa(e,t));else{var l=Ae(i.done);for((!l||!l.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,s||re(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,Ae(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&&Mo(i.undone)}function Bi(e,t){var r=Ae(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 s=0;s<o.length;++s){for(var l=o[s],u=0;u<a.length;++u)if(a[u].marker==l.marker)continue e;a.push(l)}}else o&&(r[i]=o)}return r}function Fr(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?On.prototype.deepCopy.call(a):a);continue}var o=a.changes,s=[];n.push({changes:s});for(var l=0;l<o.length;++l){var u=o[l],y=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var E in u)(y=E.match(/^spans_(\d+)$/))&&(q(t,Number(y[1]))>-1&&(Ae(s)[E]=u[E],delete u[E]))}}return n}function ka(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ct(t,i)<0;a!=ct(r,i)<0?(i=t,t=r):a!=ct(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 On([ka(e.sel.primary(),t,r,i)],0),n)}function No(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]=ka(e.sel.ranges[a],t[a],null,i);var o=Un(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,Un(e.cm,i,e.sel.primIndex),n)}function Io(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(lt(e,i[a].anchor),lt(e,i[a].head))},origin:r&&r.origin};return re(e,"beforeSelectionChange",e,n),e.cm&&re(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Un(e.cm,n.ranges,n.ranges.length-1):t}function jo(e,t,r){var n=e.history.done,i=Ae(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){(w(e,"beforeSelectionChange")||e.cm&&w(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ct(t.primary().head,e.sel.primary().head)<0?-1:1);Uo(e,Bo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&jr(e.cm)}function Uo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,C(e.cm)),qt(e,"cursorActivity",e)}function Fo(e){Uo(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],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],l=Hi(e,o.anchor,s&&s.anchor,r,n),u=Hi(e,o.head,s&&s.head,r,n);(i||l!=o.anchor||u!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new St(l,u))}return i?Un(e.cm,i,t.primIndex):t}function Br(e,t,r,n,i){var a=Ze(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],l=s.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,y="selectRight"in l?!l.selectRight:l.inclusiveRight;if((s.from==null||(u?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(y?s.to>=t.ch:s.to>t.ch))){if(i&&(re(l,"beforeCursorEnter"),l.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!l.atomic)continue;if(r){var E=l.find(n<0?1:-1),U=void 0;if((n<0?y:u)&&(E=Wo(e,E,-n,E&&E.line==t.line?a:null)),E&&E.line==t.line&&(U=ct(E,r))&&(n<0?U<0:U>0))return Br(e,E,t,n,i)}var D=l.find(n<0?-1:1);return(n<0?u:y)&&(D=Wo(e,D,n,D.line==t.line?a:null)),D?Br(e,D,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,ke(e.first,0))}function Wo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?lt(e,ke(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line<e.first+e.size-1?ke(t.line+1,0):null:new ke(t.line,t.ch+r)}function zo(e){e.setSelection(ke(e.firstLine(),0),ke(e.lastLine()),pe)}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,s){i&&(n.from=lt(e,i)),a&&(n.to=lt(e,a)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),re(e,"beforeChange",e,n),e.cm&&re(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((w(e,"beforeChange")||e.cm&&w(e.cm,"beforeChange"))&&(t=Ho(e,t,!0),!t))return;var n=Nn&&!r&&Lr(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]==""&&ct(t.from,t.to)==0)return;var r=Ea(e,t);Do(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&&q(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,s=t=="undo"?i.done:i.undone,l=t=="undo"?i.undone:i.done,u=0;u<s.length&&!(a=s[u],r?a.ranges&&!a.equals(e.sel):!a.ranges);u++);if(u==s.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Bi(a,l),r&&!a.equals(e.sel)){rn(e,a,{clearRedo:!1});return}o=a}else if(n){s.push(a);return}else break;var y=[];Bi(o,l),l.push({changes:y,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var E=w(e,"beforeChange")||e.cm&&w(e.cm,"beforeChange"),U=function(_e){var De=a.changes[_e];if(De.origin=t,E&&!Ho(e,De,!1))return s.length=0,{};y.push(Sa(e,De));var Ue=_e?Ea(e,De):Ae(s);fi(e,De,Ue,Po(e,De)),!_e&&e.cm&&e.cm.scrollIntoView({from:De.from,to:ur(De)});var Ge=[];cr(e,function(Fe,Qe){!Qe&&q(Ge,Fe.history)==-1&&(Vo(Fe.history,De),Ge.push(Fe.history)),fi(Fe,De,null,Po(Fe,De))})},D=a.changes.length-1;D>=0;--D){var se=U(D);if(se)return se.v}}function Go(e,t){if(t==0)return;if(e.first+=t,e.sel=new On(Je(e.sel.ranges,function(i){return new St(ke(i.anchor.line+t,i.anchor.ch),ke(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:ke(e.first,0),to:ke(t.to.line+i,t.to.ch),text:[Ae(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:ke(a,Ze(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?xl(e.cm,t,n):Ca(e,t,n),zi(e,r,pe),e.cantEdit&&Hi(e,ke(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=wt(In(Ze(n,a.line))),n.iter(l,o.line+1,function(D){if(D==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&C(e),Ca(n,t,r,so(e)),e.options.lineWrapping||(n.iter(l,a.line+t.text.length,function(D){var se=It(D);se>i.maxLineLength&&(i.maxLine=D,i.maxLineLength=se,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),xn(n,a.line),ui(e,400);var u=t.text.length-(o.line-a.line)-1;t.full?mn(e):a.line==o.line&&t.text.length==1&&!Oo(e.doc,t)?or(e,a.line,"text"):mn(e,a.line,o.line+1,u);var y=w(e,"changes"),E=w(e,"change");if(E||y){var U={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};E&&qt(e,"change",e,U),y&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(U)}e.display.selForContextMenu=null}function zr(e,t,r,n,i){var a;n||(n=r),ct(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 s=0;s<a.ranges.length;s++)Xo(a.ranges[s].anchor,t,r,n),Xo(a.ranges[s].head,t,r,n);continue}for(var l=0;l<a.changes.length;++l){var u=a.changes[l];if(r<u.from.line)u.from=ke(u.from.line+n,u.from.ch),u.to=ke(u.to.line+n,u.to.ch);else if(t<=u.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=Ze(e,Tr(e,t)):i=wt(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 s=[];this.collapse(s),this.children=[new pi(s)],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,s=o;s<i.lines.length;){var l=new pi(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++n,0,l),l.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=q(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=wt(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&&(wn(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&&wn(r,function(){r.curOp.forceUpdate=!0,Yo(r,n,i),qt(r,"lineWidgetChanged",r,e,wt(n))})},p(gi);function Yo(e,t,r){Mt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ga(e,r)}function wl(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 s=o.widgets||(o.widgets=[]);if(i.insertAt==null?s.push(i):s.splice(Math.min(s.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!Et(e,o)){var l=Mt(o)<e.scrollTop;hn(o,o.height+ni(i)),l&&ga(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&qt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:wt(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&&_r(e),w(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],s=rr(o.markedSpans,this);e&&!this.collapsed?or(e,wt(o),"text"):e&&(s.to!=null&&(i=wt(o)),s.from!=null&&(n=wt(o))),o.markedSpans=Qi(o.markedSpans,s),s.from==null&&this.collapsed&&!Et(this.doc,o)&&e&&hn(o,Pr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=In(this.lines[l]),y=It(u);y>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=y,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&&Fo(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=ke(t?a:wt(a),o.from),e==-1))return r;if(o.to!=null&&(n=ke(t?a:wt(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;wn(n,function(){var i=t.line,a=wt(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 s=r.height;r.height=null;var l=ni(r)-s;l&&hn(i,i.height+l)}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||q(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},dr.prototype.detachLine=function(e){if(this.lines.splice(q(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},p(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=ct(t,r);if(n&&d(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=G("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");ki()}a.addToHistory&&Do(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,l=e.cm,u;if(e.iter(s,r.line+1,function(E){l&&a.collapsed&&!l.options.lineWrapping&&In(E)==l.display.maxLine&&(u=!0),a.collapsed&&s!=t.line&&hn(E,0),Ti(E,new pr(a,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),a.collapsed&&e.iter(t.line,r.line+1,function(E){Et(e,E)&&hn(E,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),l){if(u&&(l.curOp.updateMaxLine=!0),a.collapsed)mn(l,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var y=t.line;y<=r.line;y++)or(l,y,"text");a.atomic&&Fo(l.doc),qt(l,"markerAdded",l,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)},p(vi);function El(e,t,r,n,i){n=d(n),n.shared=!1;var a=[Hr(e,t,r,n,i)],o=a[0],s=n.widgetNode;return cr(e,function(l){s&&(n.widgetNode=s.cloneNode(!0)),a.push(Hr(l,lt(l,t),lt(l,r),n,i));for(var u=0;u<l.linked.length;++u)if(l.linked[u].isParent)return;o=Ae(a)}),new vi(a,o)}function Zo(e){return e.findMarks(ke(e.first,0),e.clipPos(ke(e.lastLine())),function(t){return t.parent})}function _l(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(ct(a,o)){var s=Hr(e,a,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Cl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];cr(i.primary.doc,function(l){return a.push(l)});for(var o=0;o<i.markers.length;o++){var s=i.markers[o];q(a,s.doc)==-1&&(s.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=ke(r,0);this.sel=lr(a),this.history=new Fi(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),pe)};gn.prototype=Oe(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=ke(this.first,0),r=this.first+this.size-1;Wr(this,{from:t,to:ke(r,Ze(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ai(this.cm,0,0),rn(this,lr(t),pe)}),replaceRange:function(e,t,r,n){t=lt(this,t),r=r?lt(this,r):t,zr(this,e,t,r,n)},getRange:function(e,t,r){var n=Qt(this,lt(this,e),lt(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 Ze(this,e)},getLineNumber:function(e){return wt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ze(this,e)),In(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return lt(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){Io(this,lt(this,typeof e=="number"?ke(e,t||0):e),null,r)}),setSelection:Yt(function(e,t,r){Io(this,lt(this,e),lt(this,t||e),r)}),extendSelection:Yt(function(e,t,r){Wi(this,lt(this,e),t&&lt(this,t),r)}),extendSelections:Yt(function(e,t){No(this,Wn(this,e),t)}),extendSelectionsBy:Yt(function(e,t){var r=Je(this.sel.ranges,e);No(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(lt(this,e[i].anchor),lt(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rn(this,Un(this.cm,n,t),r)}),addSelection:Yt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new St(lt(this,e),lt(this,t||e))),rn(this,Un(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 s=t&&t!="end"&&fl(this,n,t),l=n.length-1;l>=0;l--)Wr(this,n[l]);s?jo(this,s):this.cm&&jr(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 Fi(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:Fr(this.history.done),undone:Fr(this.history.undone)}},setHistory:function(e){var t=this.history=new Fi(this.history.maxGeneration);t.done=Fr(e.done.slice(0),null,!0),t.undone=Fr(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&&Ke(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,Ke(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=Ze(this,e),!e)return null}else if(t=wt(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(F(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(F(r));if(!o)return!1;var s=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||s==a.length?"":" ")+a.slice(s)||null}else return!1;return!0})}),addLineWidget:Yt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Hr(this,lt(this,e),lt(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=lt(this,e),Hr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=lt(this,e);var t=[],r=Ze(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=lt(this,e),t=lt(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 s=0;s<o.length;s++){var l=o[s];!(l.to!=null&&i==e.line&&e.ch>=l.to||l.from==null&&i!=e.line||l.from!=null&&i==t.line&&l.from>=t.ch)&&(!r||r(l.marker))&&n.push(l.marker.parent||l.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}),lt(this,ke(r,t))},indexFromPos:function(e){e=lt(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}],_l(n,Zo(this)),n},unlinkDoc:function(e){if(e instanceof Dt&&(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 Fi(null),e.history.done=Fr(this.history.done,n),e.history.undone=Fr(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 kl(e){var t=this;if(qo(t),fe(t,e)||qn(t.display,e))return;c(e),S&&(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,s=function(){++o==i&&Vt(t,function(){r=lt(t.doc,r);var D={from:r,to:r,text:t.doc.splitLines(a.filter(function(se){return se!=null}).join(t.doc.lineSeparator())),origin:"paste"};Wr(t.doc,D),jo(t.doc,lr(lt(t.doc,r),lt(t.doc,ur(D))))})()},l=function(D,se){if(t.options.allowDropFileTypes&&q(t.options.allowDropFileTypes,D.type)==-1){s();return}var _e=new FileReader;_e.onerror=function(){return s()},_e.onload=function(){var De=_e.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(De)){s();return}a[se]=De,s()},_e.readAsText(D)},u=0;u<n.length;u++)l(n[u],u);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 y=e.dataTransfer.getData("Text");if(y){var E;if(t.state.draggingText&&!t.state.draggingText.copy&&(E=t.listSelections()),zi(t.doc,lr(r,r)),E)for(var U=0;U<E.length;++U)zr(t.doc,"",E[U].anchor,E[U].head,"drag");t.replaceSelection(y,"around","paste"),t.display.input.focus()}}catch(D){}}}function Tl(e,t){if(S&&(!e.state.draggingText||+new Date-Qo<100)){m(t);return}if(fe(e,t)||qn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ue){var r=b("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",z&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),z&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=yr(e,t);if(!r)return;var n=document.createDocumentFragment();co(e,r,n),e.display.dragCursor||(e.display.dragCursor=b("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),B(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;Ll(),ts=!0}function Ll(){var e;oe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,es(Ml)},100))}),oe(window,"blur",function(){return es(Ir)})}function Ml(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=H?er.macDefault:er.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw new Error("Unrecognized modifier name: "+s)}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=Je(r.split(" "),Dl),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=n):(s=i.slice(0,a+1).join(" "),o="...");var l=t[s];if(!l)t[s]=o;else if(l!=o)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var u in t)e[u]=t[u];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),(ae?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(ae?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function is(e,t){if(z&&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&&ct(a.from,Ae(n).to)<=0;){var o=n.pop();if(ct(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}wn(e,function(){for(var s=n.length-1;s>=0;s--)zr(e.doc,"",n[s].from,n[s].to,"+delete");jr(e)})}function Oa(e,t,r){var n=Me(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Aa(e,t,r){var n=Oa(e,t.ch,r);return n==null?null:new ke(t.line,n,r<0?"after":"before")}function La(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=et(r,t.doc.direction);if(a){var o=i<0?Ae(a):a[0],s=i<0==(o.level==1),l=s?"after":"before",u;if(o.level>0||t.doc.direction=="rtl"){var y=Rr(t,r);u=i<0?r.text.length-1:0;var E=Hn(t,y,u).top;u=Xe(function(U){return Hn(t,y,U).top==E},i<0==(o.level==1)?o.from:o.to-1,u),l=="before"&&(u=Oa(r,u,1))}else u=i<0?o.to:o.from;return new ke(n,u,l)}}return new ke(n,i<0?r.text.length:0,i<0?"before":"after")}function Pl(e,t,r,n){var i=et(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=qe(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 s=function(Ue,Ge){return Oa(t,Ue instanceof ke?Ue.ch:Ue,Ge)},l,u=function(Ue){return e.options.lineWrapping?(l=l||Rr(e,t),oo(e,t,l,Ue)):{begin:0,end:t.text.length}},y=u(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var E=o.level==1==n<0,U=s(r,E?1:-1);if(U!=null&&(E?U<=o.to&&U<=y.end:U>=o.from&&U>=y.begin)){var D=E?"before":"after";return new ke(r.line,U,D)}}var se=function(Ue,Ge,Fe){for(var Qe=function(At,Jt){return Jt?new ke(r.line,s(At,1),"before"):new ke(r.line,At,"after")};Ue>=0&&Ue<i.length;Ue+=Ge){var dt=i[Ue],at=Ge>0==(dt.level!=1),vt=at?Fe.begin:s(Fe.end,-1);if(dt.from<=vt&&vt<dt.to)return Qe(vt,at);if(vt=at?dt.from:s(dt.to,-1),Fe.begin<=vt&&vt<Fe.end)return Qe(vt,at)}},_e=se(a+n,n,y);if(_e)return _e;var De=n>0?y.end:s(y.begin,-1);return De!=null&&!(n>0&&De==t.text.length)&&(_e=se(n>0?0:i.length-1,n,u(De)),_e)?_e:null}var xi={selectAll:zo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),pe)},killLine:function(e){return Gr(e,function(t){if(t.empty()){var r=Ze(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ke(t.head.line+1,0)}:{from:t.head,to:ke(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Gr(e,function(t){return{from:ke(t.from().line,0),to:lt(e.doc,ke(t.to().line+1,0))}})},delLineLeft:function(e){return Gr(e,function(t){return{from:ke(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(ke(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ke(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 Nl(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")},ve)},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")},ve)},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},ve)},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=O(e.getLine(a.line),a.ch,n);t.push(K(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wn(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=Ze(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new ke(i.line,i.ch-1)),i.ch>0)i=new ke(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),ke(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ze(e.doc,i.line-1).text;o&&(i=new ke(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),ke(i.line-1,o.length-1),i,"+transpose"))}}r.push(new St(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return wn(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);jr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function as(e,t){var r=Ze(e.doc,t),n=In(r);return n!=r&&(t=wt(n)),La(!0,e,n,t,1)}function Nl(e,t){var r=Ze(e.doc,t),n=Ba(r);return n!=r&&(t=wt(n)),La(!0,e,r,t,-1)}function os(e,t){var r=as(e,t.line),n=Ze(e.doc,r.line),i=et(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 ke(r.line,o?0:a,r.sticky)}return r}function $i(e,t,r){if(typeof t=="string"&&(t=xi[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)!=Ie}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function Il(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 jl=new te;function wi(e,t,r,n){var i=e.state.keySeq;if(i){if(ns(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:jl.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=Il(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&qt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(c(r),ha(e)),!!i}function ls(e,t){var r=is(t,!0);return r?t.shiftKey&&!e.state.keySeq?wi(e,"Shift-"+r,t,function(n){return $i(e,n,!0)})||wi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $i(e,n)}):wi(e,r,t,function(n){return $i(e,n)}):!1}function Ul(e,t,r){return wi(e,"'"+r+"'",t,function(n){return $i(e,n,!0)})}var Ma=null;function us(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=V(),fe(t,e))return;S&&k<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ls(t,e);z&&(Ma=n?r:null,!n&&r==88&&!Ut&&(H?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),W&&!H&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;ce(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(Q(t,"CodeMirror-crosshair"),$e(document,"keyup",r),$e(document,"mouseover",r))}oe(document,"keyup",r),oe(document,"mouseover",r)}function cs(e){e.keyCode==16&&(this.doc.sel.shift=!1),fe(this,e)}function ds(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(qn(t.display,e)||fe(t,e)||e.ctrlKey&&!e.altKey||H&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(z&&r==Ma){Ma=null,c(e);return}if(z&&(!e.which||e.which<10)&&ls(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Ul(t,e,i))return;t.display.input.onKeyPress(e)}var Bl=400,Da=function(e,t,r){this.time=e,this.pos=t,this.button=r};Da.prototype.compare=function(e,t,r){return this.time+Bl>e&&ct(t,this.pos)==0&&r==this.button};var Ei,_i;function Wl(e,t){var r=+new Date;return _i&&_i.compare(r,e,t)?(Ei=_i=null,"triple"):Ei&&Ei.compare(r,e,t)?(_i=new Da(r,e,t),Ei=null,"double"):(Ei=new Da(r,e,t),_i=null,"single")}function fs(e){var t=this,r=t.display;if(fe(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,qn(r,e)){_||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ra(t,e))return;var n=yr(t,e),i=Y(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):R(e)==r.scroller&&c(e):i==2?(n&&Wi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(Se?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,wi(e,rs(a,i),i,function(o){if(typeof o=="string"&&(o=xi[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=Ie}finally{e.state.suppressEdits=!1}return s})}function Hl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=ge?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=H?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(H?r.altKey:r.ctrlKey)),i}function Kl(e,t,r,n){S?setTimeout(v(fo,e),0):e.curOp.focus=V();var i=Hl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Ee&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ct((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ct(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(u){_&&(i.scroller.draggable=!1),e.state.draggingText=!1,$e(i.wrapper.ownerDocument,"mouseup",o),$e(i.wrapper.ownerDocument,"mousemove",s),$e(i.scroller,"dragstart",l),$e(i.scroller,"drop",o),a||(c(u),n.addNew||Wi(e.doc,r,null,null,n.extend),_&&!ue||S&&k==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(u){a=a||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},l=function(){return a=!0};_&&(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",s),oe(i.scroller,"dragstart",l),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(ke(t.line,0),lt(e.doc,ke(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;c(t);var o,s,l=a.sel,u=l.ranges;if(n.addNew&&!n.extend?(s=a.sel.contains(r),s>-1?o=u[s]:o=new St(r,r)):(o=a.sel.primary(),s=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new St(r,r)),r=yr(e,t,!0,!0),s=-1;else{var y=hs(e,r,n.unit);n.extend?o=ka(o,y.anchor,y.head,n.extend):o=y}n.addNew?s==-1?(s=u.length,rn(a,Un(e,u.concat([o]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&n.unit=="char"&&!n.extend?(rn(a,Un(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):Ta(a,s,o,Ne):(s=0,rn(a,new On([o],0),Ne),l=a.sel);var E=r;function U(Fe){if(ct(E,Fe)==0)return;if(E=Fe,n.unit=="rectangle"){for(var Qe=[],dt=e.options.tabSize,at=O(Ze(a,r.line).text,r.ch,dt),vt=O(Ze(a,Fe.line).text,Fe.ch,dt),At=Math.min(at,vt),Jt=Math.max(at,vt),Nt=Math.min(r.line,Fe.line),En=Math.min(e.lastLine(),Math.max(r.line,Fe.line));Nt<=En;Nt++){var vn=Ze(a,Nt).text,Wt=be(vn,At,dt);At==Jt?Qe.push(new St(ke(Nt,Wt),ke(Nt,Wt))):vn.length>Wt&&Qe.push(new St(ke(Nt,Wt),ke(Nt,be(vn,Jt,dt))))}Qe.length||Qe.push(new St(r,r)),rn(a,Un(e,l.ranges.slice(0,s).concat(Qe),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Fe)}else{var bn=o,en=hs(e,Fe,n.unit),Kt=bn.anchor,zt;ct(en.anchor,Kt)>0?(zt=en.head,Kt=Xn(bn.from(),en.anchor)):(zt=en.anchor,Kt=Pe(bn.to(),en.head));var jt=l.ranges.slice(0);jt[s]=$l(e,new St(lt(a,Kt),zt)),rn(a,Un(e,jt,s),Ne)}}var D=i.wrapper.getBoundingClientRect(),se=0;function _e(Fe){var Qe=++se,dt=yr(e,Fe,!0,n.unit=="rectangle");if(!dt)return;if(ct(dt,E)!=0){e.curOp.focus=V(),U(dt);var at=Ni(i,a);(dt.line>=at.to||dt.line<at.from)&&setTimeout(Vt(e,function(){se==Qe&&_e(Fe)}),150)}else{var vt=Fe.clientY<D.top?-20:Fe.clientY>D.bottom?20:0;vt&&setTimeout(Vt(e,function(){if(se!=Qe)return;i.scroller.scrollTop+=vt,_e(Fe)}),50)}}function De(Fe){e.state.selectingText=!1,se=Infinity,Fe&&(c(Fe),i.input.focus()),$e(i.wrapper.ownerDocument,"mousemove",Ue),$e(i.wrapper.ownerDocument,"mouseup",Ge),a.history.lastSelOrigin=null}var Ue=Vt(e,function(Fe){Fe.buttons===0||!Y(Fe)?De(Fe):_e(Fe)}),Ge=Vt(e,De);e.state.selectingText=Ge,oe(i.wrapper.ownerDocument,"mousemove",Ue),oe(i.wrapper.ownerDocument,"mouseup",Ge)}function $l(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(ct(r,n)==0&&r.sticky==n.sticky)return t;var a=et(i);if(!a)return t;var o=qe(a,r.ch,r.sticky),s=a[o];if(s.from!=r.ch&&s.to!=r.ch)return t;var l=o+(s.from==r.ch==(s.level!=1)?0:1);if(l==0||l==a.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var y=qe(a,n.ch,n.sticky),E=y-o||(n.ch-r.ch)*(s.level==1?-1:1);y==l-1||y==l?u=E<0:u=E>0}var U=a[l+(u?-1:0)],D=u==(U.level==1),se=D?U.from:U.to,_e=D?"after":"before";return r.ch==se&&r.sticky==_e?t:new St(new ke(r.line,se,_e),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(U){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&c(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!w(e,r))return h(t);a-=s.top-o.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var u=o.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=i){var y=Sn(e.doc,a),E=e.display.gutterSpecs[l];return re(e,r,e,y,E.className,t),h(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(fe(e,t,"contextmenu"))return;Se||e.display.input.onContextMenu(t)}function Vl(e,t){return w(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(s,l,u){u!=Xr&&a(s,l,u)}: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,_a(n)},!0),r("indentUnit",2,_a,!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(l){for(var u=0;;){var y=l.text.indexOf(i,u);if(y==-1)break;u=y+i.length,a.push(ke(o,y))}o++});for(var s=a.length-1;s>=0;s--)zr(n.doc,i,a[s],ke(a[s].line,a[s].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",X?"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",!Be),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){gs(n),ci(n)},!0),r("keyMap","default",function(n,i,a){var o=Xi(i),s=a!=Xr&&Xi(a);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=wa(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 Ur(n)},!0),r("scrollbarStyle","native",function(n){yo(n),Ur(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=wa(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"&&(Ir(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:$e;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?(ce(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Q(e.display.wrapper,"CodeMirror-wrap"),Xt(e)),fa(e),mn(e),ri(e),setTimeout(function(){return Ur(e)},100)}function Dt(e,t){var r=this;if(!(this instanceof Dt))return new Dt(e,t);this.options=t=t?d(t):{},d(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 Dt.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 te,keySeq:null,specialChars:null},t.autofocus&&!X&&a.input.focus(),S&&k<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ql(this),Al(),_r(this),this.curOp.forceUpdate=!0,Ao(this,n),t.autofocus&&!X||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&pa(r)},20):Ir(this);for(var o in Vi)Vi.hasOwnProperty(o)&&Vi[o](this,t[o],Xr);Eo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Pa.length;++s)Pa[s](this);Cr(this),_&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Dt.defaults=vs,Dt.optionHandlers=Vi;function Ql(e){var t=e.display;oe(t.scroller,"mousedown",Vt(e,fs)),S&&k<11?oe(t.scroller,"dblclick",Vt(e,function(l){if(fe(e,l))return;var u=yr(e,l);if(!u||Ra(e,l)||qn(e.display,l))return;c(l);var y=e.findWordAt(u);Wi(e.doc,y.anchor,y.head)})):oe(t.scroller,"dblclick",function(l){return fe(e,l)||c(l)}),oe(t.scroller,"contextmenu",function(l){return ms(e,l)}),oe(t.input.getField(),"contextmenu",function(l){t.scroller.contains(l.target)||ms(e,l)});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(l){if(l.touches.length!=1)return!1;var u=l.touches[0];return u.radiusX<=1&&u.radiusY<=1}function o(l,u){if(u.left==null)return!0;var y=u.left-l.left,E=u.top-l.top;return y*y+E*E>20*20}oe(t.scroller,"touchstart",function(l){if(!fe(e,l)&&!a(l)&&!Ra(e,l)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},l.touches.length==1&&(t.activeTouch.left=l.touches[0].pageX,t.activeTouch.top=l.touches[0].pageY)}}),oe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),oe(t.scroller,"touchend",function(l){var u=t.activeTouch;if(u&&!qn(t,l)&&u.left!=null&&!u.moved&&new Date-u.start<300){var y=e.coordsChar(t.activeTouch,"page"),E;!u.prev||o(u,u.prev)?E=new St(y,y):!u.prev.prev||o(u,u.prev.prev)?E=e.findWordAt(y):E=new St(ke(y.line,0),lt(e.doc,ke(y.line+1,0))),e.setSelection(E.anchor,E.head),e.focus(),c(l)}i()}),oe(t.scroller,"touchcancel",i),oe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(oi(e,t.scroller.scrollTop),wr(e,t.scroller.scrollLeft,!0),re(e,"scroll",e))}),oe(t.scroller,"mousewheel",function(l){return So(e,l)}),oe(t.scroller,"DOMMouseScroll",function(l){return So(e,l)}),oe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(l){fe(e,l)||m(l)},over:function(l){fe(e,l)||(Ol(e,l),m(l))},start:function(l){return Tl(e,l)},drop:Vt(e,kl),leave:function(l){fe(e,l)||qo(e)}};var s=t.input.getField();oe(s,"keyup",function(l){return cs.call(e,l)}),oe(s,"keydown",Vt(e,us)),oe(s,"keypress",Vt(e,ds)),oe(s,"focus",function(l){return pa(e,l)}),oe(s,"blur",function(l){return Ir(e,l)})}var Pa=[];Dt.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=J(e,t).state:r="prev");var o=e.options.tabSize,s=Ze(i,t),l=O(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var u=s.text.match(/^\s*/)[0],y;if(!n&&!/\S/.test(s.text))y=0,r="not";else if(r=="smart"&&(y=i.mode.indent(a,s.text.slice(u.length),s.text),y==Ie||y>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?y=O(Ze(i,t-1).text,null,o):y=0:r=="add"?y=l+e.options.indentUnit:r=="subtract"?y=l-e.options.indentUnit:typeof r=="number"&&(y=l+r),y=Math.max(0,y);var E="",U=0;if(e.options.indentWithTabs)for(var D=Math.floor(y/o);D;--D)U+=o,E+=" ";if(U<y&&(E+=K(y-U)),E!=u)return zr(i,E,ke(t,0),ke(t,u.length),"+input"),s.stateAfter=null,!0;for(var se=0;se<i.sel.ranges.length;se++){var _e=i.sel.ranges[se];if(_e.head.line==t&&_e.head.ch<u.length){var De=ke(t,u.length);Ta(i,se,new St(De,De));break}}}var Fn=null;function Yi(e){Fn=e}function Na(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,s=i=="paste"||e.state.pasteIncoming>o,l=bt(t),u=null;if(s&&n.ranges.length>1)if(Fn&&Fn.text.join(`
`)==t){if(n.ranges.length%Fn.text.length==0){u=[];for(var y=0;y<Fn.text.length;y++)u.push(a.splitLines(Fn.text[y]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Je(l,function(Ue){return[Ue]}));for(var E=e.curOp.updateInput,U=n.ranges.length-1;U>=0;U--){var D=n.ranges[U],se=D.from(),_e=D.to();D.empty()&&(r&&r>0?se=ke(se.line,se.ch-r):e.state.overwrite&&!s?_e=ke(_e.line,Math.min(Ze(a,_e.line).text.length,_e.ch+Ae(l).length)):s&&Fn&&Fn.lineWise&&Fn.text.join(`
`)==l.join(`
`)&&(se=_e=ke(se.line,0)));var De={from:se,to:_e,text:u?u[U%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Wr(e.doc,De),qt(e,"inputRead",e,De)}t&&!s&&ys(e,t),jr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=E),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&&wn(t,function(){return Na(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 s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=Ci(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(Ze(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 xs(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:ke(i,0),head:ke(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function ws(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Es(){var e=b("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=b("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return _?e.style.width="1000px":e.setAttribute("wrap","off"),T&&(e.style.border="1px solid black"),ws(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),re(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.");xe(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 s=i[o];if(s.empty())s.head.line>a&&(Ci(this,s.head.line,n,!0),a=s.head.line,o==this.doc.sel.primIndex&&jr(this));else{var l=s.from(),u=s.to(),y=Math.max(a,l.line);a=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var E=y;E<a;++E)Ci(this,E,n);var U=this.doc.sel.ranges;l.ch==0&&i.length==U.length&&U[o].from().ch>0&&Ta(this.doc,o,new St(l,U[o].to()),pe)}}}),getTokenAt:function(n,i){return Gt(this,n,i)},getLineTokens:function(n,i){return Gt(this,ke(n),i,!0)},getTokenTypeAt:function(n){n=lt(this.doc,n);var i=st(this,Ze(this.doc,n.line)),a=0,o=(i.length-1)/2,s=n.ch,l;if(s==0)l=i[2];else for(;;){var u=a+o>>1;if((u?i[u*2-1]:0)>=s)o=u;else if(i[u*2+1]<s)a=u+1;else{l=i[u*2+2];break}}var y=l?l.indexOf("overlay "):-1;return y<0?l:y==0?null:l.slice(0,y-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],s=this.getModeAt(n);if(typeof s[i]=="string")o[s[i]]&&a.push(o[s[i]]);else if(s[i])for(var l=0;l<s[i].length;l++){var u=o[s[i][l]];u&&a.push(u)}else s.helperType&&o[s.helperType]?a.push(o[s.helperType]):o[s.name]&&a.push(o[s.name]);for(var y=0;y<o._global.length;y++){var E=o._global[y];E.pred(s,this)&&q(a,E.val)==-1&&a.push(E.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=Tr(a,n==null?a.first+a.size-1:n),J(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=lt(this.doc,n):a=n?o.from():o.to(),jn(this,a,i||"page")},charCoords:function(n,i){return oa(this,lt(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,s;if(typeof n=="number"){var l=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>l&&(n=l,o=!0),s=Ze(this.doc,n)}else s=n;return Mi(this,s,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Mt(s):0)},defaultTextHeight:function(){return Pr(this.display)},defaultCharWidth:function(){return Nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,s){var l=this.display;n=jn(this,lt(this.doc,n));var u=n.bottom,y=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),l.sizer.appendChild(i),o=="over")u=n.top;else if(o=="above"||o=="near"){var E=Math.max(l.wrapper.clientHeight,this.doc.height),U=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>E)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=E&&(u=n.bottom),y+i.offsetWidth>U&&(y=U-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",s=="right"?(y=l.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?y=0:s=="middle"&&(y=(l.sizer.clientWidth-i.offsetWidth)/2),i.style.left=y+"px"),a&&Js(this,{left:y,top:u,right:y+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:dn(us),triggerOnKeyPress:dn(ds),triggerOnKeyUp:cs,triggerOnMouseDown:dn(fs),execCommand:function(n){if(xi.hasOwnProperty(n))return xi[n].call(null,this)},triggerElectric:dn(function(n){ys(this,n)}),findPosH:function(n,i,a,o){var s=1;i<0&&(s=-1,i=-i);for(var l=lt(this.doc,n),u=0;u<i&&!(l=Ia(this.doc,l,s,a,o),l.hitSide);++u);return l},moveH:dn(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Ia(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},ve)}),deleteH:dn(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Gr(this,function(s){var l=Ia(o,s.head,n,i,!1);return n<0?{from:l,to:s.head}:{from:s.head,to:l}})}),findPosV:function(n,i,a,o){var s=1,l=o;i<0&&(s=-1,i=-i);for(var u=lt(this.doc,n),y=0;y<i;++y){var E=jn(this,u,"div");if(l==null?l=E.left:E.left=l,u=_s(this,E,s,a),u.hitSide)break}return u},moveV:dn(function(n,i){var a=this,o=this.doc,s=[],l=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(y){if(l)return n<0?y.from():y.to();var E=jn(a,y.head,"div");y.goalColumn!=null&&(E.left=y.goalColumn),s.push(E.left);var U=_s(a,E,n,i);return i=="page"&&y==o.sel.primary()&&ga(a,oa(a,U,"div").top-E.top),U},ve),s.length)for(var u=0;u<o.sel.ranges.length;u++)o.sel.ranges[u].goalColumn=s[u]}),findWordAt:function(n){var i=this.doc,a=Ze(i,n.line).text,o=n.ch,s=n.ch;if(a){var l=this.getHelper(n,"wordChars");(n.sticky=="before"||s==a.length)&&o?--o:++s;for(var u=a.charAt(o),y=Re(u,l)?function(E){return Re(E,l)}:/\s/.test(u)?function(E){return/\s/.test(E)}:function(E){return!/\s/.test(E)&&!Re(E)};o>0&&y(a.charAt(o-1));)--o;for(;s<a.length&&y(a.charAt(s));)++s}return new St(ke(n.line,o),ke(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?ce(this.display.cursorDiv,"CodeMirror-overwrite"):Q(this.display.cursorDiv,"CodeMirror-overwrite"),re(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==V()},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:ke(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(l){return typeof l=="number"||/^\d+$/.test(String(l))?l+"px":l};n!=null&&(this.display.wrapper.style.width=o(n)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&eo(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(l){if(l.widgets){for(var u=0;u<l.widgets.length;u++)if(l.widgets[u].noHScroll){or(a,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,re(this,"refresh",this)}),operation:function(n){return wn(this,n)},startOperation:function(){return _r(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),re(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}},p(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 Ia(e,t,r,n,i){var a=t,o=r,s=Ze(e,t.line),l=i&&e.direction=="rtl"?-r:r;function u(){var Ge=t.line+l;return Ge<e.first||Ge>=e.first+e.size?!1:(t=new ke(Ge,t.ch,t.sticky),s=Ze(e,Ge))}function y(Ge){var Fe;if(n=="codepoint"){var Qe=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Qe)?Fe=null:Fe=new ke(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(Qe>=55296&&Qe<56320?2:1))),-r)}else i?Fe=Pl(e.cm,s,t,r):Fe=Aa(s,t,r);if(Fe==null)if(!Ge&&u())t=La(i,e.cm,s,t.line,l);else return!1;else t=Fe;return!0}if(n=="char"||n=="codepoint")y();else if(n=="column")y(!0);else if(n=="word"||n=="group")for(var E=null,U=n=="group",D=e.cm&&e.cm.getHelper(t,"wordChars"),se=!0;!(r<0&&!y(!se));se=!1){var _e=s.text.charAt(t.ch)||`
`,De=Re(_e,D)?"w":U&&_e==`
`?"n":!U||/\s/.test(_e)?null:"p";if(U&&!se&&!De&&(De="s"),E&&E!=De){r<0&&(r=1,y(),t.sticky="after");break}if(De&&(E=De),r>0&&!y(!se))break}var Ue=Hi(e,t,a,o,!0);return kn(a,Ue)&&(Ue.hitSide=!0),Ue}function _s(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*Pr(e.display),3);o=(r>0?t.bottom:t.top)+r*l}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var u;!(u=la(e,a,o),!u.outside);){if(r<0?o<=0:o>=i.height){u.hitSide=!0;break}o+=r*5}return u}var Tt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new te,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;ws(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(s){for(var l=s.target;l;l=l.parentNode){if(l==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(l.className))break}return!1}oe(i,"paste",function(s){if(!a(s)||fe(n,s)||bs(s,n))return;k<=11&&setTimeout(Vt(n,function(){return t.updateFromDOM()}),20)}),oe(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),oe(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),oe(i,"compositionend",function(s){t.composing&&(s.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(s){if(!a(s)||fe(n,s))return;if(n.somethingSelected())Yi({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var l=xs(n);Yi({lineWise:!0,text:l.text}),s.type=="cut"&&n.operation(function(){n.setSelections(l.ranges,0,pe),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var u=Fn.text.join(`
`);if(s.clipboardData.setData("Text",u),s.clipboardData.getData("Text")==u){s.preventDefault();return}}var y=Es(),E=y.firstChild;n.display.lineSpace.insertBefore(y,n.display.lineSpace.firstChild),E.value=Fn.text.join(`
`);var U=document.activeElement;Te(E),setTimeout(function(){n.display.lineSpace.removeChild(y),U.focus(),U==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&&ct(Xn(a,o),n)==0&&ct(Pe(a,o),i)==0)return;var s=t.display.view,l=n.line>=t.display.viewFrom&&Cs(t,n)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Cs(t,i);if(!u){var y=s[s.length-1].measure,E=y.maps?y.maps[y.maps.length-1]:y.map;u={node:E[E.length-1],offset:E[E.length-2]-E[E.length-3]}}if(!l||!u){e.removeAllRanges();return}var U=e.rangeCount&&e.getRangeAt(0),D;try{D=N(l.node,l.offset,u.offset,u.node)}catch(se){}D&&(!W&&t.state.focused?(e.collapse(l.node,l.offset),D.collapsed||(e.removeAllRanges(),e.addRange(D))):(e.removeAllRanges(),e.addRange(D)),U&&e.anchorNode==null?e.addRange(U):W&&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){B(this.cm.display.cursorDiv,e.cursors),B(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 x(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():wn(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(A&&P&&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&&wn(t,function(){rn(t.doc,lr(r,n),pe),(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=ke(n.line-1,Ze(e.doc,n.line-1).length)),i.ch==Ze(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=ke(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;n.line==t.viewFrom||(a=xr(e,n.line))==0?(o=wt(t.view[0].line),s=t.view[0].node):(o=wt(t.view[a].line),s=t.view[a-1].node.nextSibling);var l=xr(e,i.line),u,y;if(l==t.view.length-1?(u=t.viewTo-1,y=t.lineDiv.lastChild):(u=wt(t.view[l+1].line)-1,y=t.view[l+1].node.previousSibling),!s)return!1;for(var E=e.doc.splitLines(tu(e,s,y,o,u)),U=Qt(e.doc,ke(o,0),ke(u,Ze(e.doc,u).text.length));E.length>1&&U.length>1;)if(Ae(E)==Ae(U))E.pop(),U.pop(),u--;else if(E[0]==U[0])E.shift(),U.shift(),o++;else break;for(var D=0,se=0,_e=E[0],De=U[0],Ue=Math.min(_e.length,De.length);D<Ue&&_e.charCodeAt(D)==De.charCodeAt(D);)++D;for(var Ge=Ae(E),Fe=Ae(U),Qe=Math.min(Ge.length-(E.length==1?D:0),Fe.length-(U.length==1?D:0));se<Qe&&Ge.charCodeAt(Ge.length-se-1)==Fe.charCodeAt(Fe.length-se-1);)++se;if(E.length==1&&U.length==1&&o==n.line)for(;D&&D>n.ch&&Ge.charCodeAt(Ge.length-se-1)==Fe.charCodeAt(Fe.length-se-1);)D--,se++;E[E.length-1]=Ge.slice(0,Ge.length-se).replace(/^\u200b+/,""),E[0]=E[0].slice(D).replace(/\u200b+$/,"");var dt=ke(o,D),at=ke(u,U.length?Ae(U).length-se:0);if(E.length>1||E[0]||ct(dt,at))return zr(e.doc,E,dt,at,"+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())&&wn(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,Na)(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=Ze(e.doc,t.line),i=Ya(r,n,t.line),a=et(n,e.doc.direction),o="left";if(a){var s=qe(a,t.ch);o=s%2?"right":"left"}var l=Qa(i.map,t.ch,o);return l.offset=l.collapse=="right"?l.end:l.start,l}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,s=e.doc.lineSeparator(),l=!1;function u(D){return function(se){return se.id==D}}function y(){o&&(a+=s,l&&(a+=s),o=l=!1)}function E(D){D&&(y(),a+=D)}function U(D){if(D.nodeType==1){var se=D.getAttribute("cm-text");if(se){E(se);return}var _e=D.getAttribute("cm-marker"),De;if(_e){var Ue=e.findMarks(ke(n,0),ke(i+1,0),u(+_e));Ue.length&&(De=Ue[0].find(0))&&E(Qt(e.doc,De.from,De.to).join(s));return}if(D.getAttribute("contenteditable")=="false")return;var Ge=/^(pre|div|p|li|table|br)$/i.test(D.nodeName);if(!/^br$/i.test(D.nodeName)&&D.textContent.length==0)return;Ge&&y();for(var Fe=0;Fe<D.childNodes.length;Fe++)U(D.childNodes[Fe]);/^(pre|p)$/i.test(D.nodeName)&&(l=!0),Ge&&(o=!0)}else D.nodeType==3&&E(D.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(U(t),t==r);)t=t.nextSibling,l=!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(ke(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||!x(n,t))return $r(ke(wt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?Ae(e.rest):e.line;return $r(ke(wt(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var l=e.measure,u=l.maps;function y(De,Ue,Ge){for(var Fe=-1;Fe<(u?u.length:0);Fe++)for(var Qe=Fe<0?l.map:u[Fe],dt=0;dt<Qe.length;dt+=3){var at=Qe[dt+2];if(at==De||at==Ue){var vt=wt(Fe<0?e.line:e.rest[Fe]),At=Qe[dt]+Ge;return(Ge<0||at!=De)&&(At=Qe[dt+(Ge?1:0)]),ke(vt,At)}}}var E=y(o,s,r);if(E)return $r(E,i);for(var U=s.nextSibling,D=o?o.nodeValue.length-r:0;U;U=U.nextSibling){if(E=y(U,U.firstChild,0),E)return $r(ke(E.line,E.ch-D),i);D+=U.textContent.length}for(var se=s.previousSibling,_e=r;se;se=se.previousSibling){if(E=y(se,se.firstChild,-1),E)return $r(ke(E.line,E.ch+_e),i);_e+=se.textContent.length}}var Ft=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new te,this.hasSelection=!1,this.composing=null};Ft.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),T&&(i.style.width="0px"),oe(i,"input",function(){S&&k>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),oe(i,"paste",function(o){if(fe(n,o)||bs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(fe(n,o))return;if(n.somethingSelected())Yi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=xs(n);Yi({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,pe):(r.prevInput="",i.value=s.text.join(`
`),Te(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)||fe(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,i.dispatchEvent(s)}),oe(e.lineSpace,"selectstart",function(o){qn(e,o)||c(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)})},Ft.prototype.createField=function(e){this.wrapper=Es(),this.textarea=this.wrapper.firstChild},Ft.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ft.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=uo(e);if(e.options.moveInputWithCursor){var i=jn(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},Ft.prototype.showSelection=function(e){var t=this.cm,r=t.display;B(r.cursorDiv,e.cursors),B(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ft.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&&Te(this.textarea),S&&k>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",S&&k>=9&&(this.hasSelection=null))},Ft.prototype.getField=function(){return this.textarea},Ft.prototype.supportsTouch=function(){return!1},Ft.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!X||V()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ft.prototype.blur=function(){this.textarea.blur()},Ft.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ft.prototype.receivedFocus=function(){this.slowPoll()},Ft.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()})},Ft.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)},Ft.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(S&&k>=9&&this.hasSelection===i||H&&/[\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,s=Math.min(n.length,i.length);o<s&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return wn(t,function(){Na(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},Ft.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ft.prototype.onKeyPress=function(){S&&k>=9&&(this.hasSelection=null),this.fastPoll()},Ft.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||z)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&Vt(r,rn)(r.doc,lr(a),pe);var l=i.style.cssText,u=t.wrapper.style.cssText,y=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-y.top-5)+"px; left: "+(e.clientX-y.left-5)+`px;
z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var E;_&&(E=window.scrollY),n.input.focus(),_&&window.scrollTo(null,E),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=D,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function U(){if(i.selectionStart!=null){var _e=r.somethingSelected(),De="\u200B"+(_e?i.value:"");i.value="\u21DA",i.value=De,t.prevInput=_e?"":"\u200B",i.selectionStart=1,i.selectionEnd=De.length,n.selForContextMenu=r.doc.sel}}function D(){if(t.contextMenuPending!=D)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=l,S&&k<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!S||S&&k<9)&&U();var _e=0,De=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Vt(r,zo)(r):_e++<10?n.detectingSelectAll=setTimeout(De,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(De,200)}}if(S&&k>=9&&U(),Se){m(e);var se=function(){$e(window,"mouseup",se),setTimeout(D,20)};oe(window,"mouseup",se)}else setTimeout(D,50)},Ft.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ft.prototype.setUneditable=function(){},Ft.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?d(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=V();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.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(l){}}t.finishInit=function(l){l.save=n,l.getTextArea=function(){return e},l.toTextArea=function(){l.toTextArea=isNaN,n(),e.parentNode.removeChild(l.getWrapperElement()),e.style.display="",e.form&&($e(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=Dt(function(l){return e.parentNode.insertBefore(l,e.nextSibling)},t);return s}function iu(e){e.off=$e,e.on=oe,e.wheelEventPixels=dl,e.Doc=gn,e.splitLines=bt,e.countColumn=O,e.findColumn=be,e.isWordChar=he,e.Pass=Ie,e.signal=re,e.Line=$t,e.changeEnd=ur,e.scrollbarModel=bo,e.Pos=ke,e.cmpPos=ct,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=xi,e.keyMap=er,e.keyName=is,e.isModifierKey=ns,e.lookupKey=Kr,e.normalizeKeyMap=Rl,e.StringStream=Ot,e.SharedTextMarker=vi,e.TextMarker=dr,e.LineWidget=gi,e.e_preventDefault=c,e.e_stopPropagation=f,e.e_stop=m,e.addClass=ce,e.contains=x,e.rmClass=Q,e.keyNames=fr}Yl(Dt),ql(Dt);var au="iter insert remove copy getEditor constructor".split(" ");for(var Zi in gn.prototype)gn.prototype.hasOwnProperty(Zi)&&q(au,Zi)<0&&(Dt.prototype[Zi]=function(e){return function(){return e.apply(this.doc,arguments)}}(gn.prototype[Zi]));return p(gn),Dt.inputStyles={textarea:Ft,contenteditable:Tt},Dt.defineMode=function(e){!Dt.defaults.mode&&e!="null"&&(Dt.defaults.mode=e),on.apply(this,arguments)},Dt.defineMIME=_n,Dt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Dt.defineMIME("text/plain","null"),Dt.defineExtension=function(e,t){Dt.prototype[e]=t},Dt.defineDocExtension=function(e,t){gn.prototype[e]=t},Dt.fromTextArea=ru,iu(Dt),Dt.version="5.58.2",Dt})},Y1PL:function(ft,We,g){"use strict";g.r(We),g.d(We,"ResizableTextArea",function(){return q});var L=g("wx14"),Ce=g("1OyB"),W=g("vuIU"),de=g("Ji7U"),le=g("LK+K"),ee=g("q1tI"),S=g("VTBJ"),k=g("rePB"),_=g("Zm9Q"),ie=g("Kwbf"),P=g("c+Xe"),z=g("m+aA"),ue=g("bdgK"),j=new Map;function M(pe){pe.forEach(function(Ne){var ve,be=Ne.target;(ve=j.get(be))===null||ve===void 0||ve.forEach(function(I){return I(be)})})}var T=new ue.default(M),A=null,X=null;function H(pe,Ne){j.has(pe)||(j.set(pe,new Set),T.observe(pe)),j.get(pe).add(Ne)}function ge(pe,Ne){j.has(pe)&&(j.get(pe).delete(Ne),j.get(pe).size||(T.unobserve(pe),j.delete(pe)))}var Be=function(pe){Object(de.a)(ve,pe);var Ne=Object(le.a)(ve);function ve(){return Object(Ce.a)(this,ve),Ne.apply(this,arguments)}return Object(W.a)(ve,[{key:"render",value:function(){return this.props.children}}]),ve}(ee.Component),Z=ee.createContext(null);function ae(pe){var Ne=pe.children,ve=pe.onBatchResize,be=ee.useRef(0),I=ee.useRef([]),K=ee.useContext(Z),Ae=ee.useCallback(function(Je,xe,ne){be.current+=1;var Oe=be.current;I.current.push({size:Je,element:xe,data:ne}),Promise.resolve().then(function(){Oe===be.current&&(ve==null||ve(I.current),I.current=[])}),K==null||K(Je,xe,ne)},[ve,K]);return ee.createElement(Z.Provider,{value:Ae},Ne)}function Se(pe){var Ne=pe.children,ve=pe.disabled,be=ee.useRef(null),I=ee.useRef(null),K=ee.useContext(Z),Ae=ee.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Je=ee.isValidElement(Ne)&&Object(P.c)(Ne),xe=Je?Ne.ref:null,ne=ee.useMemo(function(){return Object(P.a)(xe,be)},[xe,be]),Oe=ee.useRef(pe);Oe.current=pe;var me=ee.useCallback(function(he){var Re=Oe.current,Ke=Re.onResize,je=Re.data,ye=he.getBoundingClientRect(),Me=ye.width,Xe=ye.height,Ve=he.offsetWidth,ze=he.offsetHeight,qe=Math.floor(Me),ut=Math.floor(Xe);if(Ae.current.width!==qe||Ae.current.height!==ut||Ae.current.offsetWidth!==Ve||Ae.current.offsetHeight!==ze){var et={width:qe,height:ut,offsetWidth:Ve,offsetHeight:ze};Ae.current=et;var He=Ve===Math.round(Me)?Me:Ve,oe=ze===Math.round(Xe)?Xe:ze,rt=Object(S.a)(Object(S.a)({},et),{},{offsetWidth:He,offsetHeight:oe});K==null||K(rt,he,je),Ke&&Promise.resolve().then(function(){Ke(rt,he)})}},[]);return ee.useEffect(function(){var he=Object(z.a)(be.current)||Object(z.a)(I.current);return he&&!ve&&H(he,me),function(){return ge(he,me)}},[be.current,ve]),ee.createElement(Be,{ref:I},Je?ee.cloneElement(Ne,{ref:ne}):Ne)}var F="rc-observer-key";function Q(pe){var Ne=pe.children,ve=Object(_.a)(Ne);return ve.map(function(be,I){var K=(be==null?void 0:be.key)||"".concat(F,"-").concat(I);return ee.createElement(Se,Object(L.a)({},pe,{key:K}),be)})}Q.Collection=ae;var we=Q,B=g("bT9E"),b=g("TSYQ"),G=g.n(b),N=`
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
`,x=["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"],V={},ce;function $(pe){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=pe.getAttribute("id")||pe.getAttribute("data-reactid")||pe.getAttribute("name");if(Ne&&V[ve])return V[ve];var be=window.getComputedStyle(pe),I=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),K=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),Ae=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),Je=x.map(function(ne){return"".concat(ne,":").concat(be.getPropertyValue(ne))}).join(";"),xe={sizingStyle:Je,paddingSize:K,borderSize:Ae,boxSizing:I};return Ne&&ve&&(V[ve]=xe),xe}function Te(pe){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ce||(ce=document.createElement("textarea"),ce.setAttribute("tab-index","-1"),ce.setAttribute("aria-hidden","true"),document.body.appendChild(ce)),pe.getAttribute("wrap")?ce.setAttribute("wrap",pe.getAttribute("wrap")):ce.removeAttribute("wrap");var I=$(pe,Ne),K=I.paddingSize,Ae=I.borderSize,Je=I.boxSizing,xe=I.sizingStyle;ce.setAttribute("style","".concat(xe,";").concat(N)),ce.value=pe.value||pe.placeholder||"";var ne=Number.MIN_SAFE_INTEGER,Oe=Number.MAX_SAFE_INTEGER,me=ce.scrollHeight,he;if(Je==="border-box"?me+=Ae:Je==="content-box"&&(me-=K),ve!==null||be!==null){ce.value=" ";var Re=ce.scrollHeight-K;ve!==null&&(ne=Re*ve,Je==="border-box"&&(ne=ne+K+Ae),me=Math.max(ne,me)),be!==null&&(Oe=Re*be,Je==="border-box"&&(Oe=Oe+K+Ae),he=me>Oe?"":"hidden",me=Math.min(Oe,me))}return{height:me,minHeight:ne,maxHeight:Oe,overflowY:he,resize:"none"}}var v=g("Gytx"),d=g.n(v),O;(function(pe){pe[pe.NONE=0]="NONE",pe[pe.RESIZING=1]="RESIZING",pe[pe.RESIZED=2]="RESIZED"})(O||(O={}));var te=function(pe){Object(de.a)(ve,pe);var Ne=Object(le.a)(ve);function ve(be){var I;return Object(Ce.a)(this,ve),I=Ne.call(this,be),I.nextFrameActionId=void 0,I.resizeFrameId=void 0,I.textArea=void 0,I.saveTextArea=function(K){I.textArea=K},I.handleResize=function(K){var Ae=I.state.resizeStatus,Je=I.props,xe=Je.autoSize,ne=Je.onResize;if(Ae!==O.NONE)return;typeof ne=="function"&&ne(K),xe&&I.resizeOnNextFrame()},I.resizeOnNextFrame=function(){cancelAnimationFrame(I.nextFrameActionId),I.nextFrameActionId=requestAnimationFrame(I.resizeTextarea)},I.resizeTextarea=function(){var K=I.props.autoSize;if(!K||!I.textArea)return;var Ae=K.minRows,Je=K.maxRows,xe=Te(I.textArea,!1,Ae,Je);I.setState({textareaStyles:xe,resizeStatus:O.RESIZING},function(){cancelAnimationFrame(I.resizeFrameId),I.resizeFrameId=requestAnimationFrame(function(){I.setState({resizeStatus:O.RESIZED},function(){I.resizeFrameId=requestAnimationFrame(function(){I.setState({resizeStatus:O.NONE}),I.fixFirefoxAutoScroll()})})})})},I.renderTextArea=function(){var K=I.props,Ae=K.prefixCls,Je=Ae===void 0?"rc-textarea":Ae,xe=K.autoSize,ne=K.onResize,Oe=K.className,me=K.disabled,he=I.state,Re=he.textareaStyles,Ke=he.resizeStatus,je=Object(B.a)(I.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ye=G()(Je,Oe,Object(k.a)({},"".concat(Je,"-disabled"),me));"value"in je&&(je.value=je.value||"");var Me=Object(S.a)(Object(S.a)(Object(S.a)({},I.props.style),Re),Ke===O.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ee.createElement(we,{onResize:I.handleResize,disabled:!(xe||ne)},ee.createElement("textarea",Object(L.a)({},je,{className:ye,style:Me,ref:I.saveTextArea})))},I.state={textareaStyles:{},resizeStatus:O.NONE},I}return Object(W.a)(ve,[{key:"componentDidUpdate",value:function(I){(I.value!==this.props.value||!d()(I.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 I=this.textArea.selectionStart,K=this.textArea.selectionEnd;this.textArea.setSelectionRange(I,K)}}catch(Ae){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ve}(ee.Component),q=te,Le=function(pe){Object(de.a)(ve,pe);var Ne=Object(le.a)(ve);function ve(be){var I;Object(Ce.a)(this,ve),I=Ne.call(this,be),I.resizableTextArea=void 0,I.focus=function(){I.resizableTextArea.textArea.focus()},I.saveTextArea=function(Ae){I.resizableTextArea=Ae},I.handleChange=function(Ae){var Je=I.props.onChange;I.setValue(Ae.target.value,function(){I.resizableTextArea.resizeTextarea()}),Je&&Je(Ae)},I.handleKeyDown=function(Ae){var Je=I.props,xe=Je.onPressEnter,ne=Je.onKeyDown;Ae.keyCode===13&&xe&&xe(Ae),ne&&ne(Ae)};var K=typeof be.value=="undefined"||be.value===null?be.defaultValue:be.value;return I.state={value:K},I}return Object(W.a)(ve,[{key:"setValue",value:function(I,K){"value"in this.props||this.setState({value:I},K)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ee.createElement(q,Object(L.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(I){return"value"in I?{value:I.value}:null}}]),ve}(ee.Component),Ie=We.default=Le},ZW9T:function(ft,We,g){"use strict";g.d(We,"a",function(){return Be});var L=g("k1fw"),Ce=g("miYZ"),W=g("tsqr"),de=g("rAM+"),le=g("tJVT"),ee=g("PpiC"),S=g("q1tI"),k=g.n(S),_=g("bdgK");function ie(Z,ae,Se,F,Q){var we=ae.getWordUntilPosition(Se),B={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},b=F.map(function(G){return{label:G,kind:Z.languages.CompletionItemKind.Keyword,insertText:G,insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:B}});return Q.map(function(G){b.push(Object(L.a)(Object(L.a)({},G),{},{range:B}))}),b}var P=function(Z){var ae={label:"ifelse",kind:Z.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet},Se=["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"];Z.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(B,b){var G=ie(Z,B,b,Se,[ae]);return{suggestions:G}}});var F=["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"];Z.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(B,b){var G=[{label:"print",kind:Z.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=ie(Z,B,b,F,G);return{suggestions:N}}});var Q=["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"];Z.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(B,b){var G=[ae,{label:"main",kind:Z.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:Z.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=ie(Z,B,b,Q,G);return{suggestions:N}}})},z="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",ue=g("LvDl");function j(Z){return/^\d+$/.test(Z)?"".concat(Z,"px"):Z}function M(){}var T=!1,A={"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 X(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ae=Z;if(Array.isArray(Z)){for(var Se=0;Se<Z.length;Se++){var F=A[Z[Se]];if(F)return F}return ae[0]}return A[ae]||ae}var H=null,ge=We.b=function(Z){var ae=Z.width,Se=ae===void 0?"100%":ae,F=Z.height,Q=F===void 0?"100%":F,we=Z.value,B=Z.language,b=B===void 0?"javascript":B,G=Z.style,N=G===void 0?{}:G,x=Z.options,V=x===void 0?{}:x,ce=Z.overrideServices,$=ce===void 0?{}:ce,Te=Z.theme,v=Te===void 0?"vs-dark":Te,d=Z.onEditBlur,O=Z.onSave,te=Z.autoHeight,q=te===void 0?!1:te,Le=Z.forbidCopy,Ie=Le===void 0?!1:Le,pe=Z.onChange,Ne=pe===void 0?M:pe,ve=Z.editorDidMount,be=ve===void 0?M:ve,I=Z.onFocus,K=I===void 0?M:I,Ae=Z.filename,Je=Ae===void 0?"educoder.txt":Ae,xe=Object(ee.a)(Z,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),ne=Object(S.useRef)(),Oe=Object(S.useRef)({}),me=Object(S.useRef)(),he=Object(S.useRef)(!1),Re=Object(S.useRef)(),Ke=Object(S.useState)(!1),je=Object(le.a)(Ke,2),ye=je[0],Me=je[1];function Xe(){var h;return ne.current&&(h=new _.default(function(m){var R=Object(de.a)(m),Y;try{for(R.s();!(Y=R.n()).done;){var Ee=Y.value;(Ee.target.offsetHeight>0||Ee.target.offsetWidth>0)&&Oe.current.instance.layout()}}catch(tt){R.e(tt)}finally{R.f()}}),h.observe(ne.current)),h}function Ve(){W.b.warn(decodeURIComponent(z))}var ze=function(){var m=Oe.current.instance;if(we!=null&&m&&ye){var R=m.getModel();R&&we!==R.getValue()&&(T=!0,R.setValue(we),m.layout(),T=!1)}};Object(S.useEffect)(function(){me.current&&clearTimeout(me.current),me.current=setTimeout(function(){ze()},500)},[we,ye,Oe.current]);function qe(){var h=Oe.current.instance;if(h){var m=h.getSelection(),R=Oe.current.pastePos||{},Y=new H.Range(R.startLineNumber||m.endLineNumber,R.startColumn||m.endColumn,R.endLineNumber||m.endLineNumber,R.endColumn||m.endColumn);setTimeout(function(){h.executeEdits("",[{range:Y,text:""}])},300)}}function ut(h){(window.navigator.platform.match("Mac")?h.metaKey:h.ctrlKey)&&h.keyCode==83&&(h.preventDefault(),O())}var et=function(){if(q&&Oe.current.instance){var m=Oe.current.instance.getContentHeight();c(m<Q?Q:m)}else c(Q)};function He(h){var m=document.createEvent("MouseEvents");m.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),h.dispatchEvent(m)}function oe(h,m){var R=window.URL||window.webkitURL||window,Y=new Blob([m]),Ee=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ee.href=R.createObjectURL(Y),Ee.download=h,He(Ee)}Object(S.useEffect)(function(){et()},[et]),Object(S.useEffect)(function(){ne.current&&!ye&&g.e(26).then(g.t.bind(null,"M/lh",7)).then(function(h){try{H=h,Oe.current.instance=H.editor.create(ne.current,{value:we,language:X(b),theme:v,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},$);var m=Oe.current.instance;if(be(m,H),setTimeout(function(){et(),Oe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){oe(Je||"educoder.txt",m.getValue())}})},500),Oe.current.subscription=m.onDidChangeModelContent(function(Y){he.current?clearTimeout(Re.current):(et(),Ne(m.getValue(),Y)),Re.current=setTimeout(function(){he.current=!1},500)}),window.Monaco||P(H),Ie&&(m.addCommand(H.KeyMod.CtrlCmd|H.KeyMod.Shift|H.KeyCode.KEY_V,function(){return Ve(),null}),m.addCommand(H.KeyMod.CtrlCmd|H.KeyCode.KEY_C,function(){return Ve(),null})),window.Monaco=H,d&&m.onDidBlurEditorWidget(function(){d(m.getValue())}),K&&m.onDidFocusEditorText(function(){K(m.getValue())}),Ie){m.addCommand(H.KeyMod.CtrlCmd|H.KeyCode.KEY_V,function(){return Ve(),null}),m.onDidPaste(function(Y){Oe.current.pastePos=Y});try{window.addEventListener("paste",qe)}catch(Y){}}var R=Xe();return Me(!0),function(){var Y=Oe.current.instance;Y.dispose();var Ee=Y.getModel();Ee&&Ee.dispose(),Oe.current.subscription&&Oe.current.subscription.dispose(),Ie&&window.removeEventListener("paste",qe),R.unobserve(ne.current)}}catch(Y){}})},[]),Object(S.useEffect)(function(){var h=Oe.current.instance;if(h&&ye)return document.addEventListener("keydown",ut,!1),function(){document.removeEventListener("keydown",ut)}},[O,ye]),Object(S.useEffect)(function(){var h=Oe.current.instance;if(h&&ye){var m=X(b);H.editor.setModelLanguage(h.getModel(),m),console.log("language:",b,h.getModel(),m)}},[b,ye]),Object(S.useEffect)(function(){var h=Oe.current.instance;h&&ye&&H.editor.setTheme(v)},[v,ye]),Object(S.useEffect)(function(){var h=Oe.current.instance;h&&ye&&(h.updateOptions(Object(L.a)({},V)),setTimeout(function(){h.getModel().updateOptions(Object(L.a)({},V))},200))},[JSON.stringify(V),ye]),Object(S.useEffect)(function(){var h=Oe.current.instance;h&&ye&&h.layout()},[Se,Q,ye]);var rt=Object(S.useState)(j(Se)),$e=Object(le.a)(rt,2),re=$e[0],fe=$e[1],C=Object(S.useState)(j(Q)),w=Object(le.a)(C,2),p=w[0],c=w[1],f=Object(L.a)(Object(L.a)({},N),{},{width:re,height:p});return k.a.createElement("div",{className:"my-monaco-editor",ref:ne,style:f})};function Be(Z){var ae=Z.width,Se=ae===void 0?"100%":ae,F=Z.height,Q=F===void 0?"100%":F,we=Z.original,B=Z.modified,b=Z.language,G=Z.options,N=G===void 0?{}:G,x=Object(S.useRef)(),V=Object(S.useState)(null),ce=Object(le.a)(V,2),$=ce[0],Te=ce[1];function v(q){var Le;return x.current&&(Le=new _.default(function(Ie){var pe=Object(de.a)(Ie),Ne;try{for(pe.s();!(Ne=pe.n()).done;){var ve=Ne.value;(ve.target.offsetHeight>0||ve.target.offsetWidth>0)&&q.layout()}}catch(be){pe.e(be)}finally{pe.f()}}),Le.observe(x.current)),Le}Object(S.useEffect)(function(){x.current&&g.e(26).then(g.t.bind(null,"M/lh",7)).then(function(q){H=q;var Le=H.editor.createDiffEditor(x.current,Object(L.a)(Object(L.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},N),{},{wordWrap:!0}));Te(Le);var Ie=v(Le);return function(){Le.dispose();var pe=Le.getModel();pe&&pe.dispose(),Ie.unobserve(x.current)}})},[]),Object(S.useEffect)(function(){$&&$.setModel({original:H.editor.createModel(we,b),modified:H.editor.createModel(B,b)})},[we,B,b,$]);var d=j(Se),O=j(Q),te={width:d,height:O};return k.a.createElement("div",{className:"my-diff-editor",ref:x,style:te})}},ZpRC:function(ft,We,g){"use strict";function L(P){return typeof P=="object"&&P!=null&&P.nodeType===1}function Ce(P,z){return(!z||P!=="hidden")&&P!=="visible"&&P!=="clip"}function W(P,z){if(P.clientHeight<P.scrollHeight||P.clientWidth<P.scrollWidth){var ue=getComputedStyle(P,null);return Ce(ue.overflowY,z)||Ce(ue.overflowX,z)||function(j){var M=function(T){if(!T.ownerDocument||!T.ownerDocument.defaultView)return null;try{return T.ownerDocument.defaultView.frameElement}catch(A){return null}}(j);return!!M&&(M.clientHeight<j.scrollHeight||M.clientWidth<j.scrollWidth)}(P)}return!1}function de(P,z,ue,j,M,T,A,X){return T<P&&A>z||T>P&&A<z?0:T<=P&&X<=ue||A>=z&&X>=ue?T-P-j:A>z&&X<ue||T<P&&X>ue?A-z+M:0}var le=function(P,z){var ue=window,j=z.scrollMode,M=z.block,T=z.inline,A=z.boundary,X=z.skipOverflowHiddenElements,H=typeof A=="function"?A:function(Re){return Re!==A};if(!L(P))throw new TypeError("Invalid target");for(var ge=document.scrollingElement||document.documentElement,Be=[],Z=P;L(Z)&&H(Z);){if((Z=Z.parentElement)===ge){Be.push(Z);break}Z!=null&&Z===document.body&&W(Z)&&!W(document.documentElement)||Z!=null&&W(Z,X)&&Be.push(Z)}for(var ae=ue.visualViewport?ue.visualViewport.width:innerWidth,Se=ue.visualViewport?ue.visualViewport.height:innerHeight,F=window.scrollX||pageXOffset,Q=window.scrollY||pageYOffset,we=P.getBoundingClientRect(),B=we.height,b=we.width,G=we.top,N=we.right,x=we.bottom,V=we.left,ce=M==="start"||M==="nearest"?G:M==="end"?x:G+B/2,$=T==="center"?V+b/2:T==="end"?N:V,Te=[],v=0;v<Be.length;v++){var d=Be[v],O=d.getBoundingClientRect(),te=O.height,q=O.width,Le=O.top,Ie=O.right,pe=O.bottom,Ne=O.left;if(j==="if-needed"&&G>=0&&V>=0&&x<=Se&&N<=ae&&G>=Le&&x<=pe&&V>=Ne&&N<=Ie)return Te;var ve=getComputedStyle(d),be=parseInt(ve.borderLeftWidth,10),I=parseInt(ve.borderTopWidth,10),K=parseInt(ve.borderRightWidth,10),Ae=parseInt(ve.borderBottomWidth,10),Je=0,xe=0,ne="offsetWidth"in d?d.offsetWidth-d.clientWidth-be-K:0,Oe="offsetHeight"in d?d.offsetHeight-d.clientHeight-I-Ae:0;if(ge===d)Je=M==="start"?ce:M==="end"?ce-Se:M==="nearest"?de(Q,Q+Se,Se,I,Ae,Q+ce,Q+ce+B,B):ce-Se/2,xe=T==="start"?$:T==="center"?$-ae/2:T==="end"?$-ae:de(F,F+ae,ae,be,K,F+$,F+$+b,b),Je=Math.max(0,Je+Q),xe=Math.max(0,xe+F);else{Je=M==="start"?ce-Le-I:M==="end"?ce-pe+Ae+Oe:M==="nearest"?de(Le,pe,te,I,Ae+Oe,ce,ce+B,B):ce-(Le+te/2)+Oe/2,xe=T==="start"?$-Ne-be:T==="center"?$-(Ne+q/2)+ne/2:T==="end"?$-Ie+K+ne:de(Ne,Ie,q,be,K+ne,$,$+b,b);var me=d.scrollLeft,he=d.scrollTop;ce+=he-(Je=Math.max(0,Math.min(he+Je,d.scrollHeight-te+Oe))),$+=me-(xe=Math.max(0,Math.min(me+xe,d.scrollWidth-q+ne)))}Te.push({el:d,top:Je,left:xe})}return Te};function ee(P){return P===Object(P)&&Object.keys(P).length!==0}function S(P,z){z===void 0&&(z="auto");var ue="scrollBehavior"in document.body.style;P.forEach(function(j){var M=j.el,T=j.top,A=j.left;M.scroll&&ue?M.scroll({top:T,left:A,behavior:z}):(M.scrollTop=T,M.scrollLeft=A)})}function k(P){return P===!1?{block:"end",inline:"nearest"}:ee(P)?P:{block:"start",inline:"nearest"}}function _(P,z){var ue=!P.ownerDocument.documentElement.contains(P);if(ee(z)&&typeof z.behavior=="function")return z.behavior(ue?[]:le(P,z));if(ue)return;var j=k(z);return S(le(P,j),j.behavior)}var ie=We.a=_},bNIU:function(ft,We,g){ft.exports={flex_box_center:"flex_box_center___4ZFPv",flex_space_between:"flex_space_between___1poVp",flex_box_vertical_center:"flex_box_vertical_center___2vHuy",flex_box_center_end:"flex_box_center_end___3AGfr",flex_box_column:"flex_box_column___9QgjS",bg:"bg___2D1BG",flexRow:"flexRow___3qWci",flexJustifyCenter:"flexJustifyCenter___ONt7G",flexAlignEnd:"flexAlignEnd___XXRbD",flexAlingCenter:"flexAlingCenter___3bK98",flexAlignCenter:"flexAlignCenter___2Ct2A",flexColumn:"flexColumn___JTR6P",formWrap:"formWrap___3QUHG",titleWrap:"titleWrap___1MIxp",fieldWrap:"fieldWrap___YXlbk",mdWrap:"mdWrap___ZlPmu",backgroundFa:"backgroundFa___2s4Lu",button:"button___KQ_S9",icons:"icons___zqUcb",navBar:"navBar___3taGH",active:"active____5MwL",tipWrap:"tipWrap___2wfhG",tip:"tip___3fuVl",width300:"width300___1tL-J",popover:"popover___2mWr7",groupWrap:"groupWrap___2zY7s",check:"check___3Eies"}},bT9E:function(ft,We,g){"use strict";g.d(We,"a",function(){return Ce});var L=g("VTBJ");function Ce(W,de){var le=Object(L.a)({},W);return Array.isArray(de)&&de.forEach(function(ee){delete le[ee]}),le}},c5Ni:function(ft,We,g){},dejd:function(ft,We,g){},dmUQ:function(ft,We,g){"use strict";var L=g("Ff2n"),Ce=g("rePB"),W=g("1OyB"),de=g("vuIU"),le=g("Ji7U"),ee=g("md7G"),S=g("foSv"),k=g("q1tI"),_=g.n(k),ie=g("TSYQ"),P=g.n(ie),z=g("4IlW");function ue(B,b){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(B);b&&(N=N.filter(function(x){return Object.getOwnPropertyDescriptor(B,x).enumerable})),G.push.apply(G,N)}return G}function j(B){for(var b=1;b<arguments.length;b++){var G=arguments[b]!=null?arguments[b]:{};b%2?ue(Object(G),!0).forEach(function(N){Object(Ce.a)(B,N,G[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(B,Object.getOwnPropertyDescriptors(G)):ue(Object(G)).forEach(function(N){Object.defineProperty(B,N,Object.getOwnPropertyDescriptor(G,N))})}return B}function M(B){var b=T();return function(){var N=Object(S.a)(B),x;if(b){var V=Object(S.a)(this).constructor;x=Reflect.construct(N,arguments,V)}else x=N.apply(this,arguments);return Object(ee.a)(this,x)}}function T(){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(B){return!1}}function A(){}function X(B){B.preventDefault()}var H=function(b){return b.replace(/[^\w.-]+/g,"")},ge=200,Be=600,Z=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,ae=function(b){return b!=null},Se=function(b,G){return G===b||typeof G=="number"&&typeof b=="number"&&isNaN(G)&&isNaN(b)},F=function(B){Object(le.a)(G,B);var b=M(G);function G(N){var x;Object(W.a)(this,G),x=b.call(this,N),x.onKeyDown=function($){var Te=x.props,v=Te.onKeyDown,d=Te.onPressEnter;if($.keyCode===z.a.UP){var O=x.getRatio($);x.up($,O,null),x.stop()}else if($.keyCode===z.a.DOWN){var te=x.getRatio($);x.down($,te,null),x.stop()}else $.keyCode===z.a.ENTER&&d&&d($);if(x.recordCursorPosition(),x.lastKeyCode=$.keyCode,v){for(var q=arguments.length,Le=new Array(q>1?q-1:0),Ie=1;Ie<q;Ie++)Le[Ie-1]=arguments[Ie];v.apply(void 0,[$].concat(Le))}},x.onKeyUp=function($){var Te=x.props.onKeyUp;if(x.stop(),x.recordCursorPosition(),Te){for(var v=arguments.length,d=new Array(v>1?v-1:0),O=1;O<v;O++)d[O-1]=arguments[O];Te.apply(void 0,[$].concat(d))}},x.onChange=function($){var Te=x.props.onChange;x.state.focused&&(x.inputting=!0),x.rawInput=x.props.parser(x.getValueFromEvent($)),x.setState({inputValue:x.rawInput}),Te(x.toNumber(x.rawInput))},x.onMouseUp=function(){var $=x.props.onMouseUp;x.recordCursorPosition(),$&&$.apply(void 0,arguments)},x.onFocus=function(){var $;x.setState({focused:!0}),($=x.props).onFocus.apply($,arguments)},x.onBlur=function(){var $=x.props.onBlur;x.inputting=!1,x.setState({focused:!1});var Te=x.getCurrentValidValue(x.state.inputValue),v=x.setValue(Te,A);if($){var d=x.input.value,O=x.getInputDisplayValue({focus:!1,value:v});x.input.value=O&&Number(O),$.apply(void 0,arguments),x.input.value=d}},x.getRatio=function($){var Te=1;return $.metaKey||$.ctrlKey?Te=.1:$.shiftKey&&(Te=10),Te},x.getFullNum=function($){return isNaN($)?$:/e/i.test(String($))?Number($).toFixed(18).replace(/\.?0+$/,""):$},x.getPrecision=function($){if(ae(x.props.precision))return x.props.precision;var Te=String($);if(Te.indexOf("e-")>=0)return parseInt(Te.slice(Te.indexOf("e-")+2),10);var v=0;return Te.indexOf(".")>=0&&(v=Te.length-Te.indexOf(".")-1),v},x.getInputDisplayValue=function($){var Te=$||x.state,v=Te.focused,d=Te.inputValue,O=Te.value,te;v?te=d:te=x.toPrecisionAsStep(O),te==null&&(te="");var q=x.formatWrapper(te);return ae(x.props.decimalSeparator)&&(q=q.toString().replace(".",x.props.decimalSeparator)),q},x.recordCursorPosition=function(){try{x.cursorStart=x.input.selectionStart,x.cursorEnd=x.input.selectionEnd,x.currentValue=x.input.value,x.cursorBefore=x.input.value.substring(0,x.cursorStart),x.cursorAfter=x.input.value.substring(x.cursorEnd)}catch($){}},x.restoreByAfter=function($){if($===void 0)return!1;var Te=x.input.value,v=Te.lastIndexOf($);if(v===-1)return!1;var d=x.cursorBefore.length;return x.lastKeyCode===z.a.DELETE&&x.cursorBefore.charAt(d-1)===$[0]?(x.fixCaret(d,d),!0):v+$.length===Te.length?(x.fixCaret(v,v),!0):!1},x.partRestoreByAfter=function($){return $===void 0?!1:Array.prototype.some.call($,function(Te,v){var d=$.substring(v);return x.restoreByAfter(d)})},x.isNotCompleteNumber=function($){return isNaN($)||$===""||$===null||$&&$.toString().indexOf(".")===$.toString().length-1},x.stop=function(){x.autoStepTimer&&clearTimeout(x.autoStepTimer)},x.down=function($,Te,v){x.pressingUpOrDown=!0,x.step("down",$,Te,v)},x.up=function($,Te,v){x.pressingUpOrDown=!0,x.step("up",$,Te,v)},x.saveInput=function($){x.input=$};var V=N.value;V===void 0&&(V=N.defaultValue),x.state={focused:N.autoFocus};var ce=x.getValidValue(x.toNumber(V));return x.state=j(j({},x.state),{},{inputValue:x.toPrecisionAsStep(ce),value:ce}),x}return Object(de.a)(G,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(x){var V=this.props,ce=V.value,$=V.onChange,Te=V.max,v=V.min,d=this.state.focused;if(x){if(!Se(x.value,ce)||!Se(x.max,Te)||!Se(x.min,v)){var O=d?ce:this.getValidValue(ce),te;this.pressingUpOrDown?te=O:this.inputting?te=this.rawInput:te=this.toPrecisionAsStep(O),this.setState({value:O,inputValue:te})}var q="value"in this.props?ce:this.state.value;"max"in this.props&&x.max!==Te&&typeof q=="number"&&q>Te&&$&&$(Te),"min"in this.props&&x.min!==v&&typeof q=="number"&&q<v&&$&&$(v)}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===z.a.BACKSPACE?Le=this.cursorStart-1:this.lastKeyCode===z.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 z.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case z.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ie){}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(x){var V=x;return V===""?V="":this.isNotCompleteNumber(parseFloat(V))?V=this.state.value:V=this.getValidValue(V),this.toNumber(V)}},{key:"getValueFromEvent",value:function(x){var V=x.target.value.trim().replace(/。/g,".");return ae(this.props.decimalSeparator)&&(V=V.replace(this.props.decimalSeparator,".")),V}},{key:"getValidValue",value:function(x){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,$=parseFloat(x);return isNaN($)?x:($<V&&($=V),$>ce&&($=ce),$)}},{key:"setValue",value:function(x,V){var ce=this.props.precision,$=this.isNotCompleteNumber(parseFloat(x))?null:parseFloat(x),Te=this.state.value,v=Te===void 0?null:Te,d=this.state.inputValue,O=d===void 0?null:d,te=typeof $=="number"?$.toFixed(ce):"".concat($),q=$!==v||te!=="".concat(O);return"value"in this.props?(O=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:O},V)):this.setState({value:$,inputValue:this.toPrecisionAsStep(x)},V),q&&this.props.onChange($),$}},{key:"getMaxPrecision",value:function(x){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ce=this.props,$=ce.precision,Te=ce.step;if(ae($))return $;var v=this.getPrecision(V),d=this.getPrecision(Te),O=this.getPrecision(x);return x?Math.max(O,v+d):v+d}},{key:"getPrecisionFactor",value:function(x){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ce=this.getMaxPrecision(x,V);return Math.pow(10,ce)}},{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(x){return this.props.formatter?this.props.formatter(x):x}},{key:"toPrecisionAsStep",value:function(x){if(this.isNotCompleteNumber(x)||x==="")return x;var V=Math.abs(this.getMaxPrecision(x));return isNaN(V)?x.toString():Number(x).toFixed(V)}},{key:"toNumber",value:function(x){var V=this.props.precision,ce=this.state.focused,$=x&&x.length>16&&ce;return this.isNotCompleteNumber(x)||$?x:ae(V)?Math.round(x*Math.pow(10,V))/Math.pow(10,V):Number(x)}},{key:"upStep",value:function(x,V){var ce=this.props.step,$=this.getPrecisionFactor(x,V),Te=Math.abs(this.getMaxPrecision(x,V)),v=(($*x+$*ce*V)/$).toFixed(Te);return this.toNumber(v)}},{key:"downStep",value:function(x,V){var ce=this.props.step,$=this.getPrecisionFactor(x,V),Te=Math.abs(this.getMaxPrecision(x,V)),v=(($*x-$*ce*V)/$).toFixed(Te);return this.toNumber(v)}},{key:"step",value:function(x,V){var ce=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Te=arguments.length>3?arguments[3]:void 0;this.stop(),V&&(V.persist(),V.preventDefault());var v=this.props;if(v.disabled)return;var d=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(d))return;var O=this["".concat(x,"Step")](d,$),te=O>v.max||O<v.min;if(O>v.max?O=v.max:O<v.min&&(O=v.min),this.setValue(O,null),this.setState({focused:!0},function(){ce.pressingUpOrDown=!1}),te)return;this.autoStepTimer=setTimeout(function(){ce[x](V,$,!0)},Te?ge:Be)}},{key:"fixCaret",value:function(x,V){if(x===void 0||V===void 0||!this.input||!this.input.value)return;try{var ce=this.input.selectionStart,$=this.input.selectionEnd;(x!==ce||V!==$)&&this.input.setSelectionRange(x,V)}catch(Te){}}},{key:"render",value:function(){var x,V=this.props,ce=V.prefixCls,$=V.disabled,Te=V.readOnly,v=V.useTouch,d=V.autoComplete,O=V.upHandler,te=V.downHandler,q=V.className,Le=V.max,Ie=V.min,pe=V.style,Ne=V.title,ve=V.onMouseEnter,be=V.onMouseLeave,I=V.onMouseOver,K=V.onMouseOut,Ae=V.required,Je=V.onClick,xe=V.tabIndex,ne=V.type,Oe=V.placeholder,me=V.id,he=V.inputMode,Re=V.pattern,Ke=V.step,je=V.maxLength,ye=V.autoFocus,Me=V.name,Xe=V.onPaste,Ve=V.onInput,ze=Object(L.a)(V,["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"]),qe=this.state,ut=qe.value,et=qe.focused,He=P()(ce,(x={},Object(Ce.a)(x,q,!!q),Object(Ce.a)(x,"".concat(ce,"-disabled"),$),Object(Ce.a)(x,"".concat(ce,"-focused"),et),x)),oe={};Object.keys(ze).forEach(function(m){(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(oe[m]=ze[m])});var rt=!Te&&!$,$e=this.getInputDisplayValue(null),re=(ut||ut===0)&&(isNaN(ut)||Number(ut)>=Le),fe=(ut||ut===0)&&(isNaN(ut)||Number(ut)<=Ie),C=re||$||Te,w=fe||$||Te,p=P()("".concat(ce,"-handler"),"".concat(ce,"-handler-up"),Object(Ce.a)({},"".concat(ce,"-handler-up-disabled"),C)),c=P()("".concat(ce,"-handler"),"".concat(ce,"-handler-down"),Object(Ce.a)({},"".concat(ce,"-handler-down-disabled"),w)),f=v?{onTouchStart:C?A:this.up,onTouchEnd:this.stop}:{onMouseDown:C?A:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},h=v?{onTouchStart:w?A:this.down,onTouchEnd:this.stop}:{onMouseDown:w?A:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return _.a.createElement("div",{className:He,style:pe,title:Ne,onMouseEnter:ve,onMouseLeave:be,onMouseOver:I,onMouseOut:K,onFocus:function(){return null},onBlur:function(){return null}},_.a.createElement("div",{className:"".concat(ce,"-handler-wrap")},_.a.createElement("span",Object.assign({unselectable:"on"},f,{role:"button","aria-label":"Increase Value","aria-disabled":C,className:p}),O||_.a.createElement("span",{unselectable:"on",className:"".concat(ce,"-handler-up-inner"),onClick:X})),_.a.createElement("span",Object.assign({unselectable:"on"},h,{role:"button","aria-label":"Decrease Value","aria-disabled":w,className:c}),te||_.a.createElement("span",{unselectable:"on",className:"".concat(ce,"-handler-down-inner"),onClick:X}))),_.a.createElement("div",{className:"".concat(ce,"-input-wrap")},_.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ie,"aria-valuemax":Le,"aria-valuenow":ut,required:Ae,type:ne,placeholder:Oe,onPaste:Xe,onClick:Je,onMouseUp:this.onMouseUp,className:"".concat(ce,"-input"),tabIndex:xe,autoComplete:d,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:A,onKeyUp:rt?this.onKeyUp:A,autoFocus:ye,maxLength:je,readOnly:Te,disabled:$,max:Le,min:Ie,step:Ke,name:Me,title:Ne,id:me,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum($e),pattern:Re,inputMode:he,onInput:Ve},oe))))}}]),G}(_.a.Component);F.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Z,min:-Z,step:1,style:{},onChange:A,onKeyDown:A,onPressEnter:A,onFocus:A,onBlur:A,parser:H,required:!1,autoComplete:"off"};var Q=F,we=We.a=Q},fnXi:function(ft,We,g){"use strict";var L=g("2qtc"),Ce=g("kLXV"),W=g("q1tI"),de=g.n(W),le=g("Ty5D"),ee=g("9kvl"),S=g("93VE"),k=g.n(S),_=function(P){var z=P.activeIndex,ue=P.isEdit,j=ue===void 0?!0:ue,M=P.dispatch,T=P.practiceSetting,A=Object(le.i)(),X=A.id,H=A.challengesId,ge=Object(W.useMemo)(function(){return[{name:"\u672C\u5173\u4EFB\u52A1",url:"/shixuns/".concat(X,"/edit/").concat(H,"/editcheckpoint")},{name:"\u8BC4\u6D4B\u8BBE\u7F6E",url:"/shixuns/".concat(X,"/edit/").concat(H,"/tab=2")},{name:"\u53C2\u8003\u7B54\u6848",url:"/shixuns/".concat(X,"/edit/").concat(H,"/tab=3")},{name:"\u5173\u5361\u6392\u884C\u699C",url:"/shixuns/".concat(X,"/edit/").concat(H,"/tab=4")}]},[X,H]),Be=function(ae){var Se,F=function(){ee.d.push(ae),M({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};T!=null&&(Se=T.sideBar)!==null&&Se!==void 0&&Se.confirmLeave?Ce.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){F()}}):F()};return de.a.createElement("ul",{className:"challenge-nav"},j?ge.map(function(Z,ae){return z===ae?de.a.createElement("li",{key:Z.url}," ",de.a.createElement("a",{className:"active"},Z.name)," "):de.a.createElement("li",{key:Z.url}," ",de.a.createElement("a",{onClick:function(){return Be(Z.url)}},Z.name)," ")}):de.a.createElement("li",{key:ge[0].url}," ",de.a.createElement("a",{className:"active"},ge[0].name)," "))};We.a=Object(ee.a)(function(ie){var P=ie.globalSetting,z=ie.practiceSetting;return{globalSetting:P,practiceSetting:z}})(_)},kSUc:function(ft,We,g){},lZu9:function(ft,We,g){(function(L){L(g("VrN/"),g("1eCo"),g("8EBN"))})(function(L){"use strict";L.defineMode("markdown",function(Ce,W){var de=L.getMode(Ce,"text/html"),le=de.name=="null";function ee(v){if(L.findModeByName){var d=L.findModeByName(v);d&&(v=d.mime||d.mimes[0])}var O=L.getMode(Ce,v);return O.name=="null"?null:O}W.highlightFormatting===void 0&&(W.highlightFormatting=!1),W.maxBlockquoteDepth===void 0&&(W.maxBlockquoteDepth=0),W.taskLists===void 0&&(W.taskLists=!1),W.strikethrough===void 0&&(W.strikethrough=!1),W.emoji===void 0&&(W.emoji=!1),W.fencedCodeBlockHighlighting===void 0&&(W.fencedCodeBlockHighlighting=!0),W.fencedCodeBlockDefaultMode===void 0&&(W.fencedCodeBlockDefaultMode="text/plain"),W.xml===void 0&&(W.xml=!0),W.tokenTypeOverrides===void 0&&(W.tokenTypeOverrides={});var S={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 k in S)S.hasOwnProperty(k)&&W.tokenTypeOverrides[k]&&(S[k]=W.tokenTypeOverrides[k]);var _=/^([*\-_])(?:\s*\1){2,}\s*$/,ie=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,P=/^\[(x| )\](?=\s)/i,z=W.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ue=/^ {0,3}(?:\={1,}|-{2,})\s*$/,j=/^[^#!\[\]*_\\<>` "'(~:]+/,M=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,T=/^\s*\[[^\]]+?\]:.*$/,A=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,X=" ";function H(v,d,O){return d.f=d.inline=O,O(v,d)}function ge(v,d,O){return d.f=d.block=O,O(v,d)}function Be(v){return!v||!/\S/.test(v.string)}function Z(v){if(v.linkTitle=!1,v.linkHref=!1,v.linkText=!1,v.em=!1,v.strong=!1,v.strikethrough=!1,v.quote=0,v.indentedCode=!1,v.f==Se){var d=le;if(!d){var O=L.innerMode(de,v.htmlState);d=O.mode.name=="xml"&&O.state.tagStart===null&&!O.state.context&&O.state.tokenize.isInText}d&&(v.f=B,v.block=ae,v.htmlState=null)}return v.trailingSpace=0,v.trailingSpaceNewLine=!1,v.prevLine=v.thisLine,v.thisLine={stream:null},null}function ae(v,d){var O=v.column()===d.indentation,te=Be(d.prevLine.stream),q=d.indentedCode,Le=d.prevLine.hr,Ie=d.list!==!1,pe=(d.listStack[d.listStack.length-1]||0)+3;d.indentedCode=!1;var Ne=d.indentation;if(d.indentationDiff===null&&(d.indentationDiff=d.indentation,Ie)){for(d.list=null;Ne<d.listStack[d.listStack.length-1];)d.listStack.pop(),d.listStack.length?d.indentation=d.listStack[d.listStack.length-1]:d.list=!1;d.list!==!1&&(d.indentationDiff=Ne-d.listStack[d.listStack.length-1])}var ve=!te&&!Le&&!d.prevLine.header&&(!Ie||!q)&&!d.prevLine.fencedCodeEnd,be=(d.list===!1||Le||te)&&d.indentation<=pe&&v.match(_),I=null;if(d.indentationDiff>=4&&(q||d.prevLine.fencedCodeEnd||d.prevLine.header||te))return v.skipToEnd(),d.indentedCode=!0,S.code;if(v.eatSpace())return null;if(O&&d.indentation<=pe&&(I=v.match(z))&&I[1].length<=6)return d.quote=0,d.header=I[1].length,d.thisLine.header=!0,W.highlightFormatting&&(d.formatting="header"),d.f=d.inline,Q(d);if(d.indentation<=pe&&v.eat(">"))return d.quote=O?1:d.quote+1,W.highlightFormatting&&(d.formatting="quote"),v.eatSpace(),Q(d);if(!be&&!d.setext&&O&&d.indentation<=pe&&(I=v.match(ie))){var K=I[1]?"ol":"ul";return d.indentation=Ne+v.current().length,d.list=!0,d.quote=0,d.listStack.push(d.indentation),d.em=!1,d.strong=!1,d.code=!1,d.strikethrough=!1,W.taskLists&&v.match(P,!1)&&(d.taskList=!0),d.f=d.inline,W.highlightFormatting&&(d.formatting=["list","list-"+K]),Q(d)}else{if(O&&d.indentation<=pe&&(I=v.match(M,!0)))return d.quote=0,d.fencedEndRE=new RegExp(I[1]+"+ *$"),d.localMode=W.fencedCodeBlockHighlighting&&ee(I[2]||W.fencedCodeBlockDefaultMode),d.localMode&&(d.localState=L.startState(d.localMode)),d.f=d.block=F,W.highlightFormatting&&(d.formatting="code-block"),d.code=-1,Q(d);if(d.setext||(!ve||!Ie)&&!d.quote&&d.list===!1&&!d.code&&!be&&!T.test(v.string)&&(I=v.lookAhead(1))&&(I=I.match(ue)))return d.setext?(d.header=d.setext,d.setext=0,v.skipToEnd(),W.highlightFormatting&&(d.formatting="header")):(d.header=I[0].charAt(0)=="="?1:2,d.setext=d.header),d.thisLine.header=!0,d.f=d.inline,Q(d);if(be)return v.skipToEnd(),d.hr=!0,d.thisLine.hr=!0,S.hr;if(v.peek()==="[")return H(v,d,V)}return H(v,d,d.inline)}function Se(v,d){var O=de.token(v,d.htmlState);if(!le){var te=L.innerMode(de,d.htmlState);(te.mode.name=="xml"&&te.state.tagStart===null&&!te.state.context&&te.state.tokenize.isInText||d.md_inside&&v.current().indexOf(">")>-1)&&(d.f=B,d.block=ae,d.htmlState=null)}return O}function F(v,d){var O=d.listStack[d.listStack.length-1]||0,te=d.indentation<O,q=O+3;if(d.fencedEndRE&&d.indentation<=q&&(te||v.match(d.fencedEndRE))){W.highlightFormatting&&(d.formatting="code-block");var Le;return te||(Le=Q(d)),d.localMode=d.localState=null,d.block=ae,d.f=B,d.fencedEndRE=null,d.code=0,d.thisLine.fencedCodeEnd=!0,te?ge(v,d,d.block):Le}else return d.localMode?d.localMode.token(v,d.localState):(v.skipToEnd(),S.code)}function Q(v){var d=[];if(v.formatting){d.push(S.formatting),typeof v.formatting=="string"&&(v.formatting=[v.formatting]);for(var O=0;O<v.formatting.length;O++)d.push(S.formatting+"-"+v.formatting[O]),v.formatting[O]==="header"&&d.push(S.formatting+"-"+v.formatting[O]+"-"+v.header),v.formatting[O]==="quote"&&(!W.maxBlockquoteDepth||W.maxBlockquoteDepth>=v.quote?d.push(S.formatting+"-"+v.formatting[O]+"-"+v.quote):d.push("error"))}if(v.taskOpen)return d.push("meta"),d.length?d.join(" "):null;if(v.taskClosed)return d.push("property"),d.length?d.join(" "):null;if(v.linkHref?d.push(S.linkHref,"url"):(v.strong&&d.push(S.strong),v.em&&d.push(S.em),v.strikethrough&&d.push(S.strikethrough),v.emoji&&d.push(S.emoji),v.linkText&&d.push(S.linkText),v.code&&d.push(S.code),v.image&&d.push(S.image),v.imageAltText&&d.push(S.imageAltText,"link"),v.imageMarker&&d.push(S.imageMarker)),v.header&&d.push(S.header,S.header+"-"+v.header),v.quote&&(d.push(S.quote),!W.maxBlockquoteDepth||W.maxBlockquoteDepth>=v.quote?d.push(S.quote+"-"+v.quote):d.push(S.quote+"-"+W.maxBlockquoteDepth)),v.list!==!1){var te=(v.listStack.length-1)%3;te?te===1?d.push(S.list2):d.push(S.list3):d.push(S.list1)}return v.trailingSpaceNewLine?d.push("trailing-space-new-line"):v.trailingSpace&&d.push("trailing-space-"+(v.trailingSpace%2?"a":"b")),d.length?d.join(" "):null}function we(v,d){return v.match(j,!0)?Q(d):void 0}function B(v,d){var O=d.text(v,d);if(typeof O!="undefined")return O;if(d.list)return d.list=null,Q(d);if(d.taskList){var te=v.match(P,!0)[1]===" ";return te?d.taskOpen=!0:d.taskClosed=!0,W.highlightFormatting&&(d.formatting="task"),d.taskList=!1,Q(d)}if(d.taskOpen=!1,d.taskClosed=!1,d.header&&v.match(/^#+$/,!0))return W.highlightFormatting&&(d.formatting="header"),Q(d);var q=v.next();if(d.linkTitle){d.linkTitle=!1;var Le=q;q==="("&&(Le=")"),Le=(Le+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ie="^\\s*(?:[^"+Le+"\\\\]+|\\\\\\\\|\\\\.)"+Le;if(v.match(new RegExp(Ie),!0))return S.linkHref}if(q==="`"){var pe=d.formatting;W.highlightFormatting&&(d.formatting="code"),v.eatWhile("`");var Ne=v.current().length;if(d.code==0&&(!d.quote||Ne==1))return d.code=Ne,Q(d);if(Ne==d.code){var ve=Q(d);return d.code=0,ve}else return d.formatting=pe,Q(d)}else if(d.code)return Q(d);if(q==="\\"&&(v.next(),W.highlightFormatting)){var be=Q(d),I=S.formatting+"-escape";return be?be+" "+I:I}if(q==="!"&&v.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return d.imageMarker=!0,d.image=!0,W.highlightFormatting&&(d.formatting="image"),Q(d);if(q==="["&&d.imageMarker&&v.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return d.imageMarker=!1,d.imageAltText=!0,W.highlightFormatting&&(d.formatting="image"),Q(d);if(q==="]"&&d.imageAltText){W.highlightFormatting&&(d.formatting="image");var be=Q(d);return d.imageAltText=!1,d.image=!1,d.inline=d.f=G,be}if(q==="["&&!d.image)return d.linkText&&v.match(/^.*?\]/)||(d.linkText=!0,W.highlightFormatting&&(d.formatting="link")),Q(d);if(q==="]"&&d.linkText){W.highlightFormatting&&(d.formatting="link");var be=Q(d);return d.linkText=!1,d.inline=d.f=v.match(/\(.*?\)| ?\[.*?\]/,!1)?G:B,be}if(q==="<"&&v.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=b,W.highlightFormatting&&(d.formatting="link");var be=Q(d);return be?be+=" ":be="",be+S.linkInline}if(q==="<"&&v.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=b,W.highlightFormatting&&(d.formatting="link");var be=Q(d);return be?be+=" ":be="",be+S.linkEmail}if(W.xml&&q==="<"&&v.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var K=v.string.indexOf(">",v.pos);if(K!=-1){var Ae=v.string.substring(v.start,K);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ae)&&(d.md_inside=!0)}return v.backUp(1),d.htmlState=L.startState(de),ge(v,d,Se)}if(W.xml&&q==="<"&&v.match(/^\/\w*?>/))return d.md_inside=!1,"tag";if(q==="*"||q==="_"){for(var Je=1,xe=v.pos==1?" ":v.string.charAt(v.pos-2);Je<3&&v.eat(q);)Je++;var ne=v.peek()||" ",Oe=!/\s/.test(ne)&&(!A.test(ne)||/\s/.test(xe)||A.test(xe)),me=!/\s/.test(xe)&&(!A.test(xe)||/\s/.test(ne)||A.test(ne)),he=null,Re=null;if(Je%2&&(!d.em&&Oe&&(q==="*"||!me||A.test(xe))?he=!0:d.em==q&&me&&(q==="*"||!Oe||A.test(ne))&&(he=!1)),Je>1&&(!d.strong&&Oe&&(q==="*"||!me||A.test(xe))?Re=!0:d.strong==q&&me&&(q==="*"||!Oe||A.test(ne))&&(Re=!1)),Re!=null||he!=null){W.highlightFormatting&&(d.formatting=he==null?"strong":Re==null?"em":"strong em"),he===!0&&(d.em=q),Re===!0&&(d.strong=q);var ve=Q(d);return he===!1&&(d.em=!1),Re===!1&&(d.strong=!1),ve}}else if(q===" "&&(v.eat("*")||v.eat("_"))){if(v.peek()===" ")return Q(d);v.backUp(1)}if(W.strikethrough){if(q==="~"&&v.eatWhile(q)){if(d.strikethrough){W.highlightFormatting&&(d.formatting="strikethrough");var ve=Q(d);return d.strikethrough=!1,ve}else if(v.match(/^[^\s]/,!1))return d.strikethrough=!0,W.highlightFormatting&&(d.formatting="strikethrough"),Q(d)}else if(q===" "&&v.match(/^~~/,!0)){if(v.peek()===" ")return Q(d);v.backUp(2)}}if(W.emoji&&q===":"&&v.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){d.emoji=!0,W.highlightFormatting&&(d.formatting="emoji");var Ke=Q(d);return d.emoji=!1,Ke}return q===" "&&(v.match(/^ +$/,!1)?d.trailingSpace++:d.trailingSpace&&(d.trailingSpaceNewLine=!0)),Q(d)}function b(v,d){var O=v.next();if(O===">"){d.f=d.inline=B,W.highlightFormatting&&(d.formatting="link");var te=Q(d);return te?te+=" ":te="",te+S.linkInline}return v.match(/^[^>]+/,!0),S.linkInline}function G(v,d){if(v.eatSpace())return null;var O=v.next();return O==="("||O==="["?(d.f=d.inline=x(O==="("?")":"]"),W.highlightFormatting&&(d.formatting="link-string"),d.linkHref=!0,Q(d)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function x(v){return function(d,O){var te=d.next();if(te===v){O.f=O.inline=B,W.highlightFormatting&&(O.formatting="link-string");var q=Q(O);return O.linkHref=!1,q}return d.match(N[v]),O.linkHref=!0,Q(O)}}function V(v,d){return v.match(/^([^\]\\]|\\.)*\]:/,!1)?(d.f=ce,v.next(),W.highlightFormatting&&(d.formatting="link"),d.linkText=!0,Q(d)):H(v,d,B)}function ce(v,d){if(v.match(/^\]:/,!0)){d.f=d.inline=$,W.highlightFormatting&&(d.formatting="link");var O=Q(d);return d.linkText=!1,O}return v.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function $(v,d){return v.eatSpace()?null:(v.match(/^[^\s]+/,!0),v.peek()===void 0?d.linkTitle=!0:v.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),d.f=d.inline=B,S.linkHref+" url")}var Te={startState:function(){return{f:ae,prevLine:{stream:null},thisLine:{stream:null},block:ae,htmlState:null,indentation:0,inline:B,text:we,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(v){return{f:v.f,prevLine:v.prevLine,thisLine:v.thisLine,block:v.block,htmlState:v.htmlState&&L.copyState(de,v.htmlState),indentation:v.indentation,localMode:v.localMode,localState:v.localMode?L.copyState(v.localMode,v.localState):null,inline:v.inline,text:v.text,formatting:!1,linkText:v.linkText,linkTitle:v.linkTitle,linkHref:v.linkHref,code:v.code,em:v.em,strong:v.strong,strikethrough:v.strikethrough,emoji:v.emoji,header:v.header,setext:v.setext,hr:v.hr,taskList:v.taskList,list:v.list,listStack:v.listStack.slice(0),quote:v.quote,indentedCode:v.indentedCode,trailingSpace:v.trailingSpace,trailingSpaceNewLine:v.trailingSpaceNewLine,md_inside:v.md_inside,fencedEndRE:v.fencedEndRE}},token:function(v,d){if(d.formatting=!1,v!=d.thisLine.stream){if(d.header=0,d.hr=!1,v.match(/^\s*$/,!0))return Z(d),null;if(d.prevLine=d.thisLine,d.thisLine={stream:v},d.taskList=!1,d.trailingSpace=0,d.trailingSpaceNewLine=!1,!d.localState&&(d.f=d.block,d.f!=Se)){var O=v.match(/^\s*/,!0)[0].replace(/\t/g,X).length;if(d.indentation=O,d.indentationDiff=null,O>0)return null}}return d.f(v,d)},innerMode:function(v){return v.block==Se?{state:v.htmlState,mode:de}:v.localState?{state:v.localState,mode:v.localMode}:{state:v,mode:Te}},indent:function(v,d,O){return v.block==Se&&de.indent?de.indent(v.htmlState,d,O):v.localState&&v.localMode.indent?v.localMode.indent(v.localState,d,O):L.Pass},blankLine:Z,getType:Q,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Te},"xml"),L.defineMIME("text/markdown","markdown"),L.defineMIME("text/x-markdown","markdown")})},nuEh:function(ft,We,g){"use strict";var L=g("T2oS"),Ce=g("W9HT"),W=g("q1tI"),de=g.n(W),le=g("F8wB"),ee=g.n(le),S=function(_){var ie=_.loading;return ie?de.a.createElement("div",{className:ee.a.loading},de.a.createElement(Ce.a,null)):de.a.createElement(de.a.Fragment,null)};We.a=S},osHv:function(ft,We,g){(function(L){L(g("VrN/"))})(function(L){"use strict";var Ce=L.Pos;function W(A,X){return A.line-X.line||A.ch-X.ch}var de="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",le=de+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ee=new RegExp("<(/?)(["+de+"]["+le+"]*)","g");function S(A,X,H,ge){this.line=X,this.ch=H,this.cm=A,this.text=A.getLine(X),this.min=ge?Math.max(ge.from,A.firstLine()):A.firstLine(),this.max=ge?Math.min(ge.to-1,A.lastLine()):A.lastLine()}function k(A,X){var H=A.cm.getTokenTypeAt(Ce(A.line,X));return H&&/\btag\b/.test(H)}function _(A){return A.line>=A.max?void 0:(A.ch=0,A.text=A.cm.getLine(++A.line),!0)}function ie(A){return A.line<=A.min?void 0:(A.text=A.cm.getLine(--A.line),A.ch=A.text.length,!0)}function P(A){for(;;){var X=A.text.indexOf(">",A.ch);if(X==-1){if(_(A))continue;return}if(!k(A,X+1)){A.ch=X+1;continue}var H=A.text.lastIndexOf("/",X),ge=H>-1&&!/\S/.test(A.text.slice(H+1,X));return A.ch=X+1,ge?"selfClose":"regular"}}function z(A){for(;;){var X=A.ch?A.text.lastIndexOf("<",A.ch-1):-1;if(X==-1){if(ie(A))continue;return}if(!k(A,X+1)){A.ch=X;continue}ee.lastIndex=X,A.ch=X;var H=ee.exec(A.text);if(H&&H.index==X)return H}}function ue(A){for(;;){ee.lastIndex=A.ch;var X=ee.exec(A.text);if(!X){if(_(A))continue;return}if(!k(A,X.index+1)){A.ch=X.index+1;continue}return A.ch=X.index+X[0].length,X}}function j(A){for(;;){var X=A.ch?A.text.lastIndexOf(">",A.ch-1):-1;if(X==-1){if(ie(A))continue;return}if(!k(A,X+1)){A.ch=X;continue}var H=A.text.lastIndexOf("/",X),ge=H>-1&&!/\S/.test(A.text.slice(H+1,X));return A.ch=X+1,ge?"selfClose":"regular"}}function M(A,X){for(var H=[];;){var ge=ue(A),Be,Z=A.line,ae=A.ch-(ge?ge[0].length:0);if(!ge||!(Be=P(A)))return;if(Be=="selfClose")continue;if(ge[1]){for(var Se=H.length-1;Se>=0;--Se)if(H[Se]==ge[2]){H.length=Se;break}if(Se<0&&(!X||X==ge[2]))return{tag:ge[2],from:Ce(Z,ae),to:Ce(A.line,A.ch)}}else H.push(ge[2])}}function T(A,X){for(var H=[];;){var ge=j(A);if(!ge)return;if(ge=="selfClose"){z(A);continue}var Be=A.line,Z=A.ch,ae=z(A);if(!ae)return;if(ae[1])H.push(ae[2]);else{for(var Se=H.length-1;Se>=0;--Se)if(H[Se]==ae[2]){H.length=Se;break}if(Se<0&&(!X||X==ae[2]))return{tag:ae[2],from:Ce(A.line,A.ch),to:Ce(Be,Z)}}}}L.registerHelper("fold","xml",function(A,X){for(var H=new S(A,X.line,0);;){var ge=ue(H);if(!ge||H.line!=X.line)return;var Be=P(H);if(!Be)return;if(!ge[1]&&Be!="selfClose"){var Z=Ce(H.line,H.ch),ae=M(H,ge[2]);return ae&&W(ae.from,Z)>0?{from:Z,to:ae.from}:null}}}),L.findMatchingTag=function(A,X,H){var ge=new S(A,X.line,X.ch,H);if(ge.text.indexOf(">")==-1&&ge.text.indexOf("<")==-1)return;var Be=P(ge),Z=Be&&Ce(ge.line,ge.ch),ae=Be&&z(ge);if(!Be||!ae||W(ge,X)>0)return;var Se={from:Ce(ge.line,ge.ch),to:Z,tag:ae[2]};return Be=="selfClose"?{open:Se,close:null,at:"open"}:ae[1]?{open:T(ge,ae[2]),close:Se,at:"close"}:(ge=new S(A,Z.line,Z.ch,H),{open:Se,close:M(ge,ae[2]),at:"open"})},L.findEnclosingTag=function(A,X,H,ge){for(var Be=new S(A,X.line,X.ch,H);;){var Z=T(Be,ge);if(!Z)break;var ae=new S(A,X.line,X.ch,H),Se=M(ae,Z.tag);if(Se)return{open:Z,close:Se}}},L.scanForClosingTag=function(A,X,H,ge){var Be=new S(A,X.line,X.ch,ge?{from:0,to:ge}:null);return M(Be,H)}})},p5ED:function(ft,We,g){"use strict";var L=g("+L6B"),Ce=g("2/Rp"),W=g("5Dmo"),de=g("3S7+"),le=g("k1fw"),ee=g("tJVT"),S=g("q1tI"),k=g.n(S),_=g("vHTk"),ie=g.n(_),P=g("yEEn"),z=g("ZW9T"),ue=g("1vsH");We.a=function(j){var M=j.name,T=j.data,A=j.theme,X=j.type,H=j.filename,ge=j.monacoEditor,Be=j.className,Z=j.style,ae=j.close,Se=j.onClose,F=j.hasMask,Q=Object(S.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),we=Object(ee.a)(Q,2),B=we[0],b=we[1],G=Object(S.useState)(""),N=Object(ee.a)(G,2),x=N[0],V=N[1],ce=Object(S.useRef)();H&&(ge.filename=H),Object(S.useEffect)(function(){var v,d,O=(v=document.cookie)===null||v===void 0||((d=v.replace(/\s/g,""))===null||d===void 0)?void 0:d.split(";");O==null||O.map(function(te){var q=te.split("=");q[0]==="_educoder_session"&&V(q[1])})},[]);var $=function(){if(T.startsWith("http")||T.startsWith("/")){Te();return}Object(ue.y)(H||"educoder",T,H)},Te=function(){Object(ue.w)(H||M,T)};return console.log("data:",T,"fileanme:",H," name:",M),k.a.createElement("div",{style:Object(le.a)({},Z||{}),className:"".concat(F&&ie.a.bgBlack," ").concat(X?ie.a.wrp:"hide")},ae&&k.a.createElement("div",{className:ie.a.close,ref:ce},k.a.createElement(de.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return ce.current}},k.a.createElement("span",{onClick:Te},k.a.createElement("i",{className:"icon-quxiaozhiding"}))),k.a.createElement(de.a,{title:"\u5173\u95ED",getPopupContainer:function(){return ce.current}},k.a.createElement("span",{className:"",onClick:Se},k.a.createElement("i",{className:"icon-guanbi1"})))),k.a.createElement("div",{className:"".concat(ie.a[Be]," ").concat(Be," ").concat(ie.a.monaco," ").concat(X==="txt"?"show":"hide")},X==="txt"&&k.a.createElement(z.b,ge)),X==="audio"&&k.a.createElement("audio",{src:"".concat(T!=null&&T.startsWith("/")||(T==null?void 0:T.indexOf("https://"))>-1?T:"data:audio/mp3;base64,").concat(T),autoPlay:!0}),X==="video"&&k.a.createElement(k.a.Fragment,null,T!=null&&T.startsWith("/")?k.a.createElement("video",{controls:!0,src:"".concat(T),autoPlay:!0}):k.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(T),autoPlay:!0})),X==="pdf"&&k.a.createElement("embed",{className:ie.a.embed,src:T}),X==="image"&&k.a.createElement(k.a.Fragment,null,k.a.createElement("img",{src:"".concat(T!=null&&T.startsWith("/")||(T==null?void 0:T.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(T)})),X==="other"&&k.a.createElement("div",null,k.a.createElement(Ce.a,{type:"primary",size:"large",onClick:$},k.a.createElement(P.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(X==="download"||X==="office")&&k.a.createElement(Ce.a,{type:"primary",size:"large",onClick:$},k.a.createElement(P.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ft,We,g){},"rAM+":function(ft,We,g){"use strict";g.d(We,"a",function(){return Ce});var L=g("Qw5x");function Ce(W,de){var le;if(typeof Symbol=="undefined"||W[Symbol.iterator]==null){if(Array.isArray(W)||(le=Object(L.a)(W))||de&&W&&typeof W.length=="number"){le&&(W=le);var ee=0,S=function(){};return{s:S,n:function(){return ee>=W.length?{done:!0}:{done:!1,value:W[ee++]}},e:function(z){throw z},f:S}}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 k=!0,_=!1,ie;return{s:function(){le=W[Symbol.iterator]()},n:function(){var z=le.next();return k=z.done,z},e:function(z){_=!0,ie=z},f:function(){try{!k&&le.return!=null&&le.return()}finally{if(_)throw ie}}}}},rUJ1:function(ft,We){const g=/[&<>"']/,L=/[&<>"']/g,Ce=/[<>"']|&(?!#?\w+;)/,W=/[<>"']|&(?!#?\w+;)/g,de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},le=F=>de[F];function ee(F,Q){if(Q){if(g.test(F))return F.replace(L,le)}else if(Ce.test(F))return F.replace(W,le);return F}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function k(F){return F.replace(S,(Q,we)=>(we=we.toLowerCase(),we==="colon"?":":we.charAt(0)==="#"?we.charAt(1)==="x"?String.fromCharCode(parseInt(we.substring(2),16)):String.fromCharCode(+we.substring(1)):""))}const _=/(^|[^\[])\^/g;function ie(F,Q){F=F.source||F,Q=Q||"";const we={replace:(B,b)=>(b=b.source||b,b=b.replace(_,"$1"),F=F.replace(B,b),we),getRegex:()=>new RegExp(F,Q)};return we}const P=/[^\w:]/g,z=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ue(F,Q,we){if(F){let B;try{B=decodeURIComponent(k(we)).replace(P,"").toLowerCase()}catch(b){return null}if(B.indexOf("javascript:")===0||B.indexOf("vbscript:")===0||B.indexOf("data:")===0)return null}Q&&!z.test(we)&&(we=X(Q,we));try{we=encodeURI(we).replace(/%25/g,"%")}catch(B){return null}return we}const j={},M=/^[^:]+:\/*[^/]*$/,T=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function X(F,Q){j[" "+F]||(M.test(F)?j[" "+F]=F+"/":j[" "+F]=Z(F,"/",!0)),F=j[" "+F];const we=F.indexOf(":")===-1;return Q.substring(0,2)==="//"?we?Q:F.replace(T,"$1")+Q:Q.charAt(0)==="/"?we?Q:F.replace(A,"$1")+Q:F+Q}const H={exec:function(){}};function ge(F){let Q=1,we,B;for(;Q<arguments.length;Q++){we=arguments[Q];for(B in we)Object.prototype.hasOwnProperty.call(we,B)&&(F[B]=we[B])}return F}function Be(F,Q){const we=F.replace(/\|/g,(G,N,x)=>{let V=!1,ce=N;for(;--ce>=0&&x[ce]==="\\";)V=!V;return V?"|":" |"}),B=we.split(/ \|/);let b=0;if(B.length>Q)B.splice(Q);else for(;B.length<Q;)B.push("");for(;b<B.length;b++)B[b]=B[b].trim().replace(/\\\|/g,"|");return B}function Z(F,Q,we){const B=F.length;if(B===0)return"";let b=0;for(;b<B;){const G=F.charAt(B-b-1);if(G===Q&&!we)b++;else if(G!==Q&&we)b++;else break}return F.substr(0,B-b)}function ae(F,Q){if(F.indexOf(Q[1])===-1)return-1;const we=F.length;let B=0,b=0;for(;b<we;b++)if(F[b]==="\\")b++;else if(F[b]===Q[0])B++;else if(F[b]===Q[1]&&(B--,B<0))return b;return-1}function Se(F){F&&F.sanitize&&!F.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")}ft.exports={escape:ee,unescape:k,edit:ie,cleanUrl:ue,resolveUrl:X,noopTest:H,merge:ge,splitCells:Be,rtrim:Z,findClosingBracket:ae,checkSanitizeDeprecation:Se}},vHTk:function(ft,We,g){ft.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wMS7:function(ft,We,g){/*! @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(L,Ce){ft.exports=Ce()})(this,function(){"use strict";function L(xe){if(Array.isArray(xe)){for(var ne=0,Oe=Array(xe.length);ne<xe.length;ne++)Oe[ne]=xe[ne];return Oe}else return Array.from(xe)}var Ce=Object.hasOwnProperty,W=Object.setPrototypeOf,de=Object.isFrozen,le=Object.keys,ee=Object.freeze,S=Object.seal,k=Object.create,_=typeof Reflect!="undefined"&&Reflect,ie=_.apply,P=_.construct;ie||(ie=function(ne,Oe,me){return ne.apply(Oe,me)}),ee||(ee=function(ne){return ne}),S||(S=function(ne){return ne}),P||(P=function(ne,Oe){return new(Function.prototype.bind.apply(ne,[null].concat(L(Oe))))});var z=Q(Array.prototype.forEach),ue=Q(Array.prototype.indexOf),j=Q(Array.prototype.join),M=Q(Array.prototype.pop),T=Q(Array.prototype.push),A=Q(Array.prototype.slice),X=Q(String.prototype.toLowerCase),H=Q(String.prototype.match),ge=Q(String.prototype.replace),Be=Q(String.prototype.indexOf),Z=Q(String.prototype.trim),ae=Q(RegExp.prototype.test),Se=we(RegExp),F=we(TypeError);function Q(xe){return function(ne){for(var Oe=arguments.length,me=Array(Oe>1?Oe-1:0),he=1;he<Oe;he++)me[he-1]=arguments[he];return ie(xe,ne,me)}}function we(xe){return function(){for(var ne=arguments.length,Oe=Array(ne),me=0;me<ne;me++)Oe[me]=arguments[me];return P(xe,Oe)}}function B(xe,ne){W&&W(xe,null);for(var Oe=ne.length;Oe--;){var me=ne[Oe];if(typeof me=="string"){var he=X(me);he!==me&&(de(ne)||(ne[Oe]=he),me=he)}xe[me]=!0}return xe}function b(xe){var ne=k(null),Oe=void 0;for(Oe in xe)ie(Ce,xe,[Oe])&&(ne[Oe]=xe[Oe]);return ne}var G=ee(["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"]),N=ee(["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"]),x=ee(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),V=ee(["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"]),ce=ee(["#text"]),$=ee(["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"]),Te=ee(["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"]),v=ee(["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"]),d=ee(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),O=S(/\{\{[\s\S]*|[\s\S]*\}\}/gm),te=S(/<%[\s\S]*|[\s\S]*%>/gm),q=S(/^data-[\-\w.\u00B7-\uFFFF]/),Le=S(/^aria-[\-\w]+$/),Ie=S(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pe=S(/^(?:\w+script|data):/i),Ne=S(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(xe){return typeof xe}:function(xe){return xe&&typeof Symbol=="function"&&xe.constructor===Symbol&&xe!==Symbol.prototype?"symbol":typeof xe};function be(xe){if(Array.isArray(xe)){for(var ne=0,Oe=Array(xe.length);ne<xe.length;ne++)Oe[ne]=xe[ne];return Oe}else return Array.from(xe)}var I=function(){return typeof window=="undefined"?null:window},K=function(ne,Oe){if((typeof ne=="undefined"?"undefined":ve(ne))!=="object"||typeof ne.createPolicy!="function")return null;var me=null,he="data-tt-policy-suffix";Oe.currentScript&&Oe.currentScript.hasAttribute(he)&&(me=Oe.currentScript.getAttribute(he));var Re="dompurify"+(me?"#"+me:"");try{return ne.createPolicy(Re,{createHTML:function(je){return je}})}catch(Ke){return console.warn("TrustedTypes policy "+Re+" could not be created."),null}};function Ae(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I(),ne=function(J){return Ae(J)};if(ne.version="2.0.15",ne.removed=[],!xe||!xe.document||xe.document.nodeType!==9)return ne.isSupported=!1,ne;var Oe=xe.document,me=!1,he=xe.document,Re=xe.DocumentFragment,Ke=xe.HTMLTemplateElement,je=xe.Node,ye=xe.NodeFilter,Me=xe.NamedNodeMap,Xe=Me===void 0?xe.NamedNodeMap||xe.MozNamedAttrMap:Me,Ve=xe.Text,ze=xe.Comment,qe=xe.DOMParser,ut=xe.trustedTypes;if(typeof Ke=="function"){var et=he.createElement("template");et.content&&et.content.ownerDocument&&(he=et.content.ownerDocument)}var He=K(ut,Oe),oe=He&&Rn?He.createHTML(""):"",rt=he,$e=rt.implementation,re=rt.createNodeIterator,fe=rt.getElementsByTagName,C=rt.createDocumentFragment,w=Oe.importNode,p=b(he).documentMode?he.documentMode:{},c={};ne.isSupported=$e&&typeof $e.createHTMLDocument!="undefined"&&p!==9;var f=O,h=te,m=q,R=Le,Y=pe,Ee=Ne,tt=Ie,nt=null,ot=B({},[].concat(be(G),be(N),be(x),be(V),be(ce))),xt=null,bt=B({},[].concat(be($),be(Te),be(v),be(d))),ht=null,Ut=null,_t=!0,Ht=!0,Rt=!1,yt=!1,on=!1,_n=!1,sn=!1,Cn=!1,tn=!1,nr=!1,An=!1,Rn=!1,Bn=!0,Ot=!0,Ze=!1,Qt={},Gn=B({},["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,wt=B({},["audio","video","img","source","image","track"]),Sn=null,Pn=B({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ln=null,ke=he.createElement("form"),ct=function(J){if(Ln&&Ln===J)return;(!J||(typeof J=="undefined"?"undefined":ve(J))!=="object")&&(J={}),J=b(J),nt="ALLOWED_TAGS"in J?B({},J.ALLOWED_TAGS):ot,xt="ALLOWED_ATTR"in J?B({},J.ALLOWED_ATTR):bt,Sn="ADD_URI_SAFE_ATTR"in J?B(b(Pn),J.ADD_URI_SAFE_ATTR):Pn,hn="ADD_DATA_URI_TAGS"in J?B(b(wt),J.ADD_DATA_URI_TAGS):wt,ht="FORBID_TAGS"in J?B({},J.FORBID_TAGS):{},Ut="FORBID_ATTR"in J?B({},J.FORBID_ATTR):{},Qt="USE_PROFILES"in J?J.USE_PROFILES:!1,_t=J.ALLOW_ARIA_ATTR!==!1,Ht=J.ALLOW_DATA_ATTR!==!1,Rt=J.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=J.SAFE_FOR_JQUERY||!1,on=J.SAFE_FOR_TEMPLATES||!1,_n=J.WHOLE_DOCUMENT||!1,tn=J.RETURN_DOM||!1,nr=J.RETURN_DOM_FRAGMENT||!1,An=J.RETURN_DOM_IMPORT||!1,Rn=J.RETURN_TRUSTED_TYPE||!1,Cn=J.FORCE_BODY||!1,Bn=J.SANITIZE_DOM!==!1,Ot=J.KEEP_CONTENT!==!1,Ze=J.IN_PLACE||!1,tt=J.ALLOWED_URI_REGEXP||tt,on&&(Ht=!1),nr&&(tn=!0),Qt&&(nt=B({},[].concat(be(ce))),xt=[],Qt.html===!0&&(B(nt,G),B(xt,$)),Qt.svg===!0&&(B(nt,N),B(xt,Te),B(xt,d)),Qt.svgFilters===!0&&(B(nt,x),B(xt,Te),B(xt,d)),Qt.mathMl===!0&&(B(nt,V),B(xt,v),B(xt,d))),J.ADD_TAGS&&(nt===ot&&(nt=b(nt)),B(nt,J.ADD_TAGS)),J.ADD_ATTR&&(xt===bt&&(xt=b(xt)),B(xt,J.ADD_ATTR)),J.ADD_URI_SAFE_ATTR&&B(Sn,J.ADD_URI_SAFE_ATTR),Ot&&(nt["#text"]=!0),_n&&B(nt,["html","head","body"]),nt.table&&(B(nt,["tbody"]),delete ht.tbody),ee&&ee(J),Ln=J},kn=function(J){T(ne.removed,{element:J});try{J.parentNode.removeChild(J)}catch(Ye){J.outerHTML=oe}},Mn=function(J,Ye){try{T(ne.removed,{attribute:Ye.getAttributeNode(J),from:Ye})}catch(it){T(ne.removed,{attribute:null,from:Ye})}Ye.removeAttribute(J)},Pe=function(J){var Ye=void 0,it=void 0;if(Cn)J="<remove></remove>"+J;else{var Ct=H(J,/^[\r\n\t ]+/);it=Ct&&Ct[0]}var cn=He?He.createHTML(J):J;try{Ye=new qe().parseFromString(cn,"text/html")}catch(Lt){}if(me&&B(ht,["title"]),!Ye||!Ye.documentElement){Ye=$e.createHTMLDocument("");var Gt=Ye,Pt=Gt.body;Pt.parentNode.removeChild(Pt.parentNode.firstElementChild),Pt.outerHTML=cn}return J&&it&&Ye.body.insertBefore(he.createTextNode(it),Ye.body.childNodes[0]||null),fe.call(Ye,_n?"html":"body")[0]};ne.isSupported&&function(){try{var st=Pe("<x/><title>&lt;/title&gt;&lt;img&gt;");ae(/<\/title/,st.querySelector("title").innerHTML)&&(me=!0)}catch(J){}}();var Xn=function(J){return re.call(J.ownerDocument||J,J,ye.SHOW_ELEMENT|ye.SHOW_COMMENT|ye.SHOW_TEXT,function(){return ye.FILTER_ACCEPT},!1)},Tr=function(J){return J instanceof Ve||J instanceof ze?!1:typeof J.nodeName!="string"||typeof J.textContent!="string"||typeof J.removeChild!="function"||!(J.attributes instanceof Xe)||typeof J.removeAttribute!="function"||typeof J.setAttribute!="function"||typeof J.namespaceURI!="string"},lt=function(J){return(typeof je=="undefined"?"undefined":ve(je))==="object"?J instanceof je:J&&(typeof J=="undefined"?"undefined":ve(J))==="object"&&typeof J.nodeType=="number"&&typeof J.nodeName=="string"},ln=function(J,Ye,it){if(!c[J])return;z(c[J],function(Ct){Ct.call(ne,Ye,it,Ln)})},Wn=function(J){var Ye=void 0;if(ln("beforeSanitizeElements",J,null),Tr(J))return kn(J),!0;if(H(J.nodeName,/[\u0080-\uFFFF]/))return kn(J),!0;var it=X(J.nodeName);if(ln("uponSanitizeElement",J,{tagName:it,allowedTags:nt}),(it==="svg"||it==="math")&&J.querySelectorAll("p, br").length!==0)return kn(J),!0;if(!nt[it]||ht[it]){if(Ot&&!Gn[it]&&typeof J.insertAdjacentHTML=="function")try{var Ct=J.innerHTML;J.insertAdjacentHTML("AfterEnd",He?He.createHTML(Ct):Ct)}catch(cn){}return kn(J),!0}return it==="noscript"&&ae(/<\/noscript/i,J.innerHTML)||it==="noembed"&&ae(/<\/noembed/i,J.innerHTML)?(kn(J),!0):(yt&&!lt(J.firstElementChild)&&(!lt(J.content)||!lt(J.content.firstElementChild))&&ae(/</g,J.textContent)&&(T(ne.removed,{element:J.cloneNode()}),J.innerHTML?J.innerHTML=ge(J.innerHTML,/</g,"&lt;"):J.innerHTML=ge(J.textContent,/</g,"&lt;")),on&&J.nodeType===3&&(Ye=J.textContent,Ye=ge(Ye,f," "),Ye=ge(Ye,h," "),J.textContent!==Ye&&(T(ne.removed,{element:J.cloneNode()}),J.textContent=Ye)),ln("afterSanitizeElements",J,null),!1)},$n=function(J,Ye,it){if(Bn&&(Ye==="id"||Ye==="name")&&(it in he||it in ke))return!1;if(!(Ht&&ae(m,Ye))){if(!(_t&&ae(R,Ye))){if(!xt[Ye]||Ut[Ye])return!1;if(!Sn[Ye]){if(!ae(tt,ge(it,Ee,""))){if(!((Ye==="src"||Ye==="xlink:href"||Ye==="href")&&J!=="script"&&Be(it,"data:")===0&&hn[J])){if(!(Rt&&!ae(Y,ge(it,Ee,"")))){if(it)return!1}}}}}}return!0},un=function(J){var Ye=void 0,it=void 0,Ct=void 0,cn=void 0,Gt=void 0;ln("beforeSanitizeAttributes",J,null);var Pt=J.attributes;if(!Pt)return;var Lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt};for(Gt=Pt.length;Gt--;){Ye=Pt[Gt];var Or=Ye,xn=Or.name,Nn=Or.namespaceURI;if(it=Z(Ye.value),Ct=X(xn),Lt.attrName=Ct,Lt.attrValue=it,Lt.keepAttr=!0,Lt.forceKeepAttr=void 0,ln("uponSanitizeAttribute",J,Lt),it=Lt.attrValue,Lt.forceKeepAttr)continue;if(Ct==="name"&&J.nodeName==="IMG"&&Pt.id)cn=Pt.id,Pt=A(Pt,[]),Mn("id",J),Mn(xn,J),ue(Pt,cn)>Gt&&J.setAttribute("id",cn.value);else{if(J.nodeName==="INPUT"&&Ct==="type"&&it==="file"&&Lt.keepAttr&&(xt[Ct]||!Ut[Ct]))continue;xn==="id"&&J.setAttribute(xn,""),Mn(xn,J)}if(!Lt.keepAttr)continue;if(yt&&ae(/\/>/i,it)){Mn(xn,J);continue}if(ae(/svg|math/i,J.namespaceURI)&&ae(Se("</("+j(le(Gn),"|")+")","i"),it)){Mn(xn,J);continue}on&&(it=ge(it,f," "),it=ge(it,h," "));var pn=J.nodeName.toLowerCase();if(!$n(pn,Ct,it))continue;try{Nn?J.setAttributeNS(Nn,xn,it):J.setAttribute(xn,it),M(ne.removed)}catch(Si){}}ln("afterSanitizeAttributes",J,null)},Dn=function st(J){var Ye=void 0,it=Xn(J);for(ln("beforeSanitizeShadowDOM",J,null);Ye=it.nextNode();){if(ln("uponSanitizeShadowNode",Ye,null),Wn(Ye))continue;Ye.content instanceof Re&&st(Ye.content),un(Ye)}ln("afterSanitizeShadowDOM",J,null)};return ne.sanitize=function(st,J){var Ye=void 0,it=void 0,Ct=void 0,cn=void 0,Gt=void 0;if(st||(st="<!-->"),typeof st!="string"&&!lt(st)){if(typeof st.toString!="function")throw F("toString is not a function");if(st=st.toString(),typeof st!="string")throw F("dirty is not a string, aborting")}if(!ne.isSupported){if(ve(xe.toStaticHTML)==="object"||typeof xe.toStaticHTML=="function"){if(typeof st=="string")return xe.toStaticHTML(st);if(lt(st))return xe.toStaticHTML(st.outerHTML)}return st}if(sn||ct(J),ne.removed=[],typeof st=="string"&&(Ze=!1),!Ze)if(st instanceof je)Ye=Pe("<!-->"),it=Ye.ownerDocument.importNode(st,!0),it.nodeType===1&&it.nodeName==="BODY"||it.nodeName==="HTML"?Ye=it:Ye.appendChild(it);else{if(!tn&&!on&&!_n&&st.indexOf("<")===-1)return He&&Rn?He.createHTML(st):st;if(Ye=Pe(st),!Ye)return tn?null:oe}Ye&&Cn&&kn(Ye.firstChild);for(var Pt=Xn(Ze?st:Ye);Ct=Pt.nextNode();){if(Ct.nodeType===3&&Ct===cn)continue;if(Wn(Ct))continue;Ct.content instanceof Re&&Dn(Ct.content),un(Ct),cn=Ct}if(cn=null,Ze)return st;if(tn){if(nr)for(Gt=C.call(Ye.ownerDocument);Ye.firstChild;)Gt.appendChild(Ye.firstChild);else Gt=Ye;return An&&(Gt=w.call(Oe,Gt,!0)),Gt}var Lt=_n?Ye.outerHTML:Ye.innerHTML;return on&&(Lt=ge(Lt,f," "),Lt=ge(Lt,h," ")),He&&Rn?He.createHTML(Lt):Lt},ne.setConfig=function(st){ct(st),sn=!0},ne.clearConfig=function(){Ln=null,sn=!1},ne.isValidAttribute=function(st,J,Ye){Ln||ct({});var it=X(st),Ct=X(J);return $n(it,Ct,Ye)},ne.addHook=function(st,J){if(typeof J!="function")return;c[st]=c[st]||[],T(c[st],J)},ne.removeHook=function(st){c[st]&&M(c[st])},ne.removeHooks=function(st){c[st]&&(c[st]=[])},ne.removeAllHooks=function(){c={}},ne}var Je=Ae();return Je})}}]);