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.
117 lines
361 KiB
117 lines
361 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[212,7],{"+NIl":function(ot,Be,p){(function(M){M(p("VrN/"))})(function(M){"use strict";M.defineMode("stex",function(we,W){"use strict";function le(U,D){U.cmdState.push(D)}function ae(U){return U.cmdState.length>0?U.cmdState[U.cmdState.length-1]:null}function te(U){var D=U.cmdState.pop();D&&D.closeBracket()}function k(U){for(var D=U.cmdState,L=D.length-1;L>=0;L--){var O=D[L];if(O.name=="DEFAULT")continue;return O}return{styleIdentifier:function(){return null}}}function S(U,D,L){return function(){this.name=U,this.bracketNo=0,this.style=D,this.styles=L,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var C={};C.importmodule=S("importmodule","tag",["string","builtin"]),C.documentclass=S("documentclass","tag",["","atom"]),C.usepackage=S("usepackage","tag",["atom"]),C.begin=S("begin","tag",["atom"]),C.end=S("end","tag",["atom"]),C.label=S("label","tag",["atom"]),C.ref=S("ref","tag",["atom"]),C.eqref=S("eqref","tag",["atom"]),C.cite=S("cite","tag",["atom"]),C.bibitem=S("bibitem","tag",["atom"]),C.Bibitem=S("Bibitem","tag",["atom"]),C.RBibitem=S("RBibitem","tag",["atom"]),C.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function re(U,D){U.f=D}function N(U,D){var L;if(U.match(/^\\[a-zA-Z@]+/)){var O=U.current().slice(1);return L=C.hasOwnProperty(O)?C[O]:C.DEFAULT,L=new L,le(D,L),re(D,oe),L.style}if(U.match(/^\\[$&%#{}_]/))return"tag";if(U.match(/^\\[,;!\/\\]/))return"tag";if(U.match("\\["))return re(D,function(H,me){return z(H,me,"\\]")}),"keyword";if(U.match("\\("))return re(D,function(H,me){return z(H,me,"\\)")}),"keyword";if(U.match("$$"))return re(D,function(H,me){return z(H,me,"$$")}),"keyword";if(U.match("$"))return re(D,function(H,me){return z(H,me,"$")}),"keyword";var G=U.next();if(G=="%")return U.skipToEnd(),"comment";if(G=="}"||G=="]"){if(L=ae(D),L)L.closeBracket(G),re(D,oe);else return"error";return"bracket"}else return G=="{"||G=="["?(L=C.DEFAULT,L=new L,le(D,L),"bracket"):/\d/.test(G)?(U.eatWhile(/[\w.%]/),"atom"):(U.eatWhile(/[\w\-_]/),L=k(D),L.name=="begin"&&(L.argument=U.current()),L.styleIdentifier())}function z(U,D,L){if(U.eatSpace())return null;if(L&&U.match(L))return re(D,N),"keyword";if(U.match(/^\\[a-zA-Z@]+/))return"tag";if(U.match(/^[a-zA-Z]+/))return"variable-2";if(U.match(/^\\[$&%#{}_]/))return"tag";if(U.match(/^\\[,;!\/]/))return"tag";if(U.match(/^[\^_&]/))return"tag";if(U.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(U.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var O=U.next();return O=="{"||O=="}"||O=="["||O=="]"||O=="("||O==")"?"bracket":O=="%"?(U.skipToEnd(),"comment"):"error"}function oe(U,D){var L=U.peek(),O;return L=="{"||L=="["?(O=ae(D),O.openBracket(L),U.eat(L),re(D,N),"bracket"):/[ \t\r]/.test(L)?(U.eat(L),null):(re(D,N),te(D),N(U,D))}return{startState:function(){var U=W.inMathMode?function(D,L){return z(D,L)}:N;return{cmdState:[],f:U}},copyState:function(U){return{cmdState:U.cmdState.slice(),f:U.f}},token:function(U,D){return D.f(U,D)},blankLine:function(U){U.f=N,U.cmdState.length=0},lineComment:"%"}}),M.defineMIME("text/x-stex","stex"),M.defineMIME("text/x-latex","stex")})},"19Vz":function(ot,Be,p){(function(M){M(p("VrN/"))})(function(M){M.defineOption("placeholder","",function(S,C,re){var N=re&&re!=M.Init;if(C&&!N)S.on("blur",ae),S.on("change",te),S.on("swapDoc",te),M.on(S.getInputField(),"compositionupdate",S.state.placeholderCompose=function(){le(S)}),te(S);else if(!C&&N){S.off("blur",ae),S.off("change",te),S.off("swapDoc",te),M.off(S.getInputField(),"compositionupdate",S.state.placeholderCompose),we(S);var z=S.getWrapperElement();z.className=z.className.replace(" CodeMirror-empty","")}C&&!S.hasFocus()&&ae(S)});function we(S){S.state.placeholder&&(S.state.placeholder.parentNode.removeChild(S.state.placeholder),S.state.placeholder=null)}function W(S){we(S);var C=S.state.placeholder=document.createElement("pre");C.style.cssText="height: 0; overflow: visible",C.style.direction=S.getOption("direction"),C.className="CodeMirror-placeholder CodeMirror-line-like";var re=S.getOption("placeholder");typeof re=="string"&&(re=document.createTextNode(re)),C.appendChild(re),S.display.lineSpace.insertBefore(C,S.display.lineSpace.firstChild)}function le(S){setTimeout(function(){var C=!1,re=S.getInputField();re.nodeName=="TEXTAREA"?C=!re.value:S.lineCount()==1&&(C=!/[^\u200b]/.test(re.querySelector(".CodeMirror-line").textContent)),C?W(S):we(S)},20)}function ae(S){k(S)&&W(S)}function te(S){var C=S.getWrapperElement(),re=k(S);C.className=C.className.replace(" CodeMirror-empty","")+(re?" CodeMirror-empty":""),re?W(S):we(S)}function k(S){return S.lineCount()===1&&S.getLine(0)===""}})},"1eCo":function(ot,Be,p){(function(M){M(p("VrN/"))})(function(M){"use strict";var we={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};M.defineMode("xml",function(le,ae){var te=le.indentUnit,k={},S=ae.htmlMode?we:W;for(var C in S)k[C]=S[C];for(var C in ae)k[C]=ae[C];var re,N;function z(x,K){function P(se){return K.tokenize=se,se(x,K)}var w=x.next();if(w=="<")return x.eat("!")?x.eat("[")?x.match("CDATA[")?P(D("atom","]]>")):null:x.match("--")?P(D("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),P(L(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),K.tokenize=D("meta","?>"),"meta"):(re=x.eat("/")?"closeTag":"openTag",K.tokenize=oe,"tag bracket");if(w=="&"){var V;return x.eat("#")?x.eat("x")?V=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):V=x.eatWhile(/[\d]/)&&x.eat(";"):V=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),V?"atom":"error"}else return x.eatWhile(/[^&<]/),null}z.isInText=!0;function oe(x,K){var P=x.next();if(P==">"||P=="/"&&x.eat(">"))return K.tokenize=z,re=P==">"?"endTag":"selfcloseTag","tag bracket";if(P=="=")return re="equals",null;if(P=="<"){K.tokenize=z,K.state=me,K.tagName=K.tagStart=null;var w=K.tokenize(x,K);return w?w+" tag error":"tag error"}else return/[\'\"]/.test(P)?(K.tokenize=U(P),K.stringStartCol=x.column(),K.tokenize(x,K)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function U(x){var K=function(P,w){for(;!P.eol();)if(P.next()==x){w.tokenize=oe;break}return"string"};return K.isInAttribute=!0,K}function D(x,K){return function(P,w){for(;!P.eol();){if(P.match(K)){w.tokenize=z;break}P.next()}return x}}function L(x){return function(K,P){for(var w;(w=K.next())!=null;){if(w=="<")return P.tokenize=L(x+1),P.tokenize(K,P);if(w==">")if(x==1){P.tokenize=z;break}else return P.tokenize=L(x-1),P.tokenize(K,P)}return"meta"}}function O(x,K,P){this.prev=x.context,this.tagName=K,this.indent=x.indented,this.startOfLine=P,(k.doNotIndent.hasOwnProperty(K)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function G(x){x.context&&(x.context=x.context.prev)}function H(x,K){for(var P;;){if(!x.context)return;if(P=x.context.tagName,!k.contextGrabbers.hasOwnProperty(P)||!k.contextGrabbers[P].hasOwnProperty(K))return;G(x)}}function me(x,K,P){return x=="openTag"?(P.tagStart=K.column(),Ie):x=="closeTag"?Y:me}function Ie(x,K,P){return x=="word"?(P.tagName=K.current(),N="tag",F):k.allowMissingTagName&&x=="endTag"?(N="tag bracket",F(x,K,P)):(N="error",Ie)}function Y(x,K,P){if(x=="word"){var w=K.current();return P.context&&P.context.tagName!=w&&k.implicitlyClosed.hasOwnProperty(P.context.tagName)&&G(P),P.context&&P.context.tagName==w||k.matchClosing===!1?(N="tag",ce):(N="tag error",xe)}else return k.allowMissingTagName&&x=="endTag"?(N="tag bracket",ce(x,K,P)):(N="error",xe)}function ce(x,K,P){return x!="endTag"?(N="error",ce):(G(P),me)}function xe(x,K,P){return N="error",ce(x,K,P)}function F(x,K,P){if(x=="word")return N="attribute",ee;if(x=="endTag"||x=="selfcloseTag"){var w=P.tagName,V=P.tagStart;return P.tagName=P.tagStart=null,x=="selfcloseTag"||k.autoSelfClosers.hasOwnProperty(w)?H(P,w):(H(P,w),P.context=new O(P,w,V==P.indented)),me}return N="error",F}function ee(x,K,P){return x=="equals"?ge:(k.allowMissing||(N="error"),F(x,K,P))}function ge(x,K,P){return x=="string"?Z:x=="word"&&k.allowUnquoted?(N="string",F):(N="error",F(x,K,P))}function Z(x,K,P){return x=="string"?Z:F(x,K,P)}return{startState:function(x){var K={tokenize:z,state:me,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(K.baseIndent=x),K},token:function(x,K){if(!K.tagName&&x.sol()&&(K.indented=x.indentation()),x.eatSpace())return null;re=null;var P=K.tokenize(x,K);return(P||re)&&P!="comment"&&(N=null,K.state=K.state(re||P,x,K),N&&(P=N=="error"?P+" error":N)),P},indent:function(x,K,P){var w=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+te;if(w&&w.noIndent)return M.Pass;if(x.tokenize!=oe&&x.tokenize!=z)return P?P.match(/^(\s*)/)[0].length:0;if(x.tagName)return k.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+te*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/<!\[CDATA\[/.test(K))return 0;var V=K&&/^<(\/)?([\w_:\.-]*)/.exec(K);if(V&&V[1])for(;w;)if(w.tagName==V[2]){w=w.prev;break}else if(k.implicitlyClosed.hasOwnProperty(w.tagName))w=w.prev;else break;else if(V)for(;w;){var se=k.contextGrabbers[w.tagName];if(se&&se.hasOwnProperty(V[2]))w=w.prev;else break}for(;w&&w.prev&&!w.startOfLine;)w=w.prev;return w?w.indent+te:x.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(x){x.state==ge&&(x.state=F)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var K=[],P=x.context;P;P=P.prev)P.tagName&&K.push(P.tagName);return K.reverse()}}}),M.defineMIME("text/xml","xml"),M.defineMIME("application/xml","xml"),M.mimeModes.hasOwnProperty("text/html")||M.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"389U":function(ot,Be,p){"use strict";p.r(Be);var M=p("+L6B"),we=p("2/Rp"),W=p("oBTY"),le=p("giR+"),ae=p("fyUT"),te=p("5Dmo"),k=p("3S7+"),S=p("sRBo"),C=p("kaz8"),re=p("2qtc"),N=p("kLXV"),z=p("miYZ"),oe=p("tsqr"),U=p("k1fw"),D=p("9og8"),L=p("tJVT"),O=p("PpiC"),G=p("5NDa"),H=p("5rEg"),me=p("OaEy"),Ie=p("2fM7"),Y=p("WmNS"),ce=p.n(Y),xe=p("q1tI"),F=p.n(xe),ee=p("9kvl"),ge=p("Ot1p"),Z=p("HBuW"),x=p("LvDl"),K=p.n(x),P=p("bNIU"),w=p.n(P),V=p("9ZNV"),se=p("fnXi"),X=p("nuEh"),Se=p("UqFu"),v=Ie.a.Option,c=H.a.TextArea,T=function(J){var ke=J.shixunsDetail,De=J.dispatch,de=J.match,Le=J.practiceSetting,fe=Object(O.a)(J,["shixunsDetail","dispatch","match","practiceSetting"]),be=Object(xe.useState)({}),I=Object(L.a)(be,2),B=I[0],Oe=I[1],He=Object(xe.useState)([]),$e=Object(L.a)(He,2),Ae=$e[0],je=$e[1],ye=Object(xe.useState)(!1),Ee=Object(L.a)(ye,2),Re=Ee[0],Ue=Ee[1],Fe=Object(xe.useRef)(null),he=Object(xe.useRef)({editData:null,answerList:null}),_e=Object(xe.useState)(!0),Ye=Object(L.a)(_e,2),Je=Ye[0],Ge=Ye[1];Object(xe.useEffect)(function(){Ke()},[]),Object(xe.useEffect)(function(){ie()},[B,Ae]);var Ke=function(){var q=Object(D.a)(ce.a.mark(function ue(){return ce.a.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return Ge(!0),b.next=3,rt();case 3:return b.next=5,Qe();case 5:Ge(!1);case 6:case"end":return b.stop()}},ue)}));return function(){return q.apply(this,arguments)}}(),rt=function(){var q=Object(D.a)(ce.a.mark(function ue(){var g;return ce.a.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,Object(Z.D)({id:de.params.id,challengeId:de.params.challengesId,tab:2});case 2:g=E.sent,he.current.editData=g,g&&Oe(g);case 5:case"end":return E.stop()}},ue)}));return function(){return q.apply(this,arguments)}}(),Qe=function(){var q=Object(D.a)(ce.a.mark(function ue(){var g,b;return ce.a.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Object(Z.E)({id:de.params.id,challengeId:de.params.challengesId});case 2:g=d.sent,b=g.map(function(f){return Object(U.a)(Object(U.a)({},f),{},{contents:Object(Se.a)(f.contents)})}),he.current.answerList=b,g&&je(b);case 6:case"end":return d.stop()}},ue)}));return function(){return q.apply(this,arguments)}}(),Ve=function(){var q=Object(D.a)(ce.a.mark(function ue(){var g,b,E;return ce.a.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(Ue(!0),g=Ae.map(function(h){return h.score}),b=g.reduce(function(h,m){return h+m},0),!(b!==100&&Ae!==null&&Ae!==void 0&&Ae.length)){f.next=7;break}return Ue(!1),oe.b.info("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),f.abrupt("return");case 7:if(Ae.every(function(h){return h.name})){f.next=11;break}return Ue(!1),oe.b.info("\u8BF7\u5148\u586B\u5199\u53C2\u8003\u7B54\u6848\u540D\u79F0"),f.abrupt("return");case 11:if(Ae.every(function(h){return h.contents})){f.next=15;break}return Ue(!1),oe.b.info("\u8BF7\u5148\u586B\u5199\u53C2\u8003\u7B54\u6848\u5185\u5BB9"),f.abrupt("return");case 15:return f.next=17,Object(Z.Eb)({id:de.params.id,challengeId:de.params.challengesId,challenge_answer:Ae,hide_answer:B==null?void 0:B.hide_answer,disable_copy:B==null?void 0:B.disable_copy});case 17:E=f.sent,Ue(!1),De({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}}),E!=null&&E.message&&oe.b.info(E.message),E.status===1&&ee.e.push("/shixuns/".concat(de.params.id,"/edit/").concat(de.params.challengesId,"/tab=4"));case 22:case"end":return f.stop()}},ue)}));return function(){return q.apply(this,arguments)}}(),ie=function(){clearTimeout(Fe.current),Fe.current=setTimeout(nt,500)},nt=function(){!Object(x.isEqual)(he.current.editData,B)||!Object(x.isEqual)(he.current.answerList,Ae)?De({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}}):De({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})},Xe=function(){var ue,g=function(){ee.e.push("/shixuns/".concat(de.params.id,"/challenges")),De({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};Le!=null&&(ue=Le.sideBar)!==null&&ue!==void 0&&ue.confirmLeave?N.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(){g()}}):g()};return F.a.createElement("section",{className:w.a.bg},F.a.createElement("div",{className:w.a.formWrap},F.a.createElement(se.a,{activeIndex:2}),F.a.createElement("div",{className:w.a.check},F.a.createElement("div",null,F.a.createElement(C.a,{checked:B==null?void 0:B.hide_answer,onChange:function(ue){return Oe(Object(U.a)(Object(U.a)({},B),{},{hide_answer:ue.target.checked}))}},"\u9690\u85CF\u53C2\u8003\u7B54\u6848\u6A21\u5757")),F.a.createElement("div",null,F.a.createElement(C.a,{checked:B==null?void 0:B.disable_copy,onChange:function(ue){return Oe(Object(U.a)(Object(U.a)({},B),{},{disable_copy:ue.target.checked}))}},"\u7981\u6B62\u590D\u5236\u53C2\u8003\u7B54\u6848"))),F.a.createElement("div",{className:w.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"),Ae==null?void 0:Ae.map(function(q,ue){return F.a.createElement("div",{key:ue,className:"mt30 pb5"},F.a.createElement("div",{className:w.a.flexRow},F.a.createElement("b",{className:"font16"},"\u7EA7\u522B\uFF1A",ue+1),F.a.createElement("div",{className:"tr flex1"},F.a.createElement(k.a,{placement:"bottom",title:"\u5220\u9664"},F.a.createElement("span",{className:"font14 c-red current",onClick:function(){var b=Ae.filter(function(f,h){return h!==ue}),E=Math.floor(100/b.length),d=E+100%b.length;b=b.map(function(f,h){return h===b.length-1?Object(U.a)(Object(U.a)({},f),{},{score:d}):Object(U.a)(Object(U.a)({},f),{},{score:E})}),je(b)}},"\u5220\xA0\u9664")))),F.a.createElement("div",{className:w.a.contentWrap},F.a.createElement("div",{className:w.a.flexRow},F.a.createElement("div",null,F.a.createElement("p",{className:"font16"},"\u540D\u79F0\uFF1A"),F.a.createElement(H.a,{bordered:!1,value:q.name,onChange:function(b){var E=Ae.map(function(d,f){return f===ue?Object(U.a)(Object(U.a)({},d),{},{name:b.target.value}):d});je(E)}})),F.a.createElement("div",{className:"ml10"},F.a.createElement("p",{className:"font16"},"\u6263\u51CF\u5206\u503C\u5360\u6BD4\uFF1A"),F.a.createElement(ae.a,{min:0,max:100,value:q.score,onChange:function(b){var E=Ae.map(function(d,f){return f===ue?Object(U.a)(Object(U.a)({},d),{},{score:b}):d});je(E)}})))),F.a.createElement("div",{className:"mt10 mb10"},F.a.createElement("div",{className:"font16 mb20"},"\u5185\u5BB9\uFF1A"),F.a.createElement(ge.a,{placeholder:"\u5EFA\u8BAE\u63D0\u4F9B\u5305\u62EC\u6587\u4EF6\u6240\u6709\u4EE3\u7801\u7684\u5B8C\u6574\u7B54\u6848",defaultValue:q.contents,onChange:function(b){var E=Ae.map(function(d,f){return f===ue?Object(U.a)(Object(U.a)({},d),{},{contents:b}):d});je(E)}})))}),F.a.createElement("div",null,F.a.createElement(we.a,{type:"primary",size:"large",ghost:!0,style:{width:200},className:"mt10",onClick:function(){var ue=[].concat(Object(W.a)(Ae),[{name:"\u89E3\u9898\u601D\u8DEF".concat(Ae.length+1),contents:"",score:0,id:null,level:null}]),g=Math.floor(100/ue.length),b=g+100%ue.length;ue=ue.map(function(E,d){return d===ue.length-1?Object(U.a)(Object(U.a)({},E),{},{score:b}):Object(U.a)(Object(U.a)({},E),{},{score:g})}),je(ue)}},"\u65B0\u589E\u53C2\u8003\u7B54\u6848")))),F.a.createElement(V.a,{onOk:Ve,className:"customFixedButton",onCancel:Xe,loading:Re}),F.a.createElement(X.a,{loading:Je}))};Be.default=Object(ee.b)(function(Q){var J=Q.shixunsDetail,ke=Q.newCourse,De=Q.globalSetting,de=Q.practiceSetting;return{shixunsDetail:J,newCourse:ke,globalSetting:De,practiceSetting:de}})(T)},"7ahc":function(ot,Be,p){"use strict";p.d(Be,"a",function(){return Ie});var M=p("k1fw"),we=p("0Owb"),W=p("+L6B"),le=p("2/Rp"),ae=p("y8nQ"),te=p("Vl3Y"),k=p("tJVT"),S=p("OaEy"),C=p("2fM7"),re=p("q1tI"),N=p.n(re),z=p("VrN/"),oe=p.n(z),U=p("p77/"),D=p.n(U),L=p("c5Ni"),O=p.n(L),G=C.a.Option,H={labelCol:{span:4},wrapperCol:{span:20}},me={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Be.b=function(Y){var ce=Y.callback,xe=Y.onCancel,F=Object(re.useState)("python"),ee=Object(k.a)(F,2),ge=ee[0],Z=ee[1];function x(P){Z(me[P][1])}function K(P){ce(P)}return N.a.createElement(te.a,Object(we.a)({},H,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:K}),N.a.createElement(te.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},N.a.createElement(C.a,{onChange:x},Object.keys(me).map(function(P){return N.a.createElement(G,{key:P,value:P},me[P][0])}))),N.a.createElement(te.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},N.a.createElement(Ie,{mode:ge})),N.a.createElement("div",{className:"flex-container flex-end"},N.a.createElement(le.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),N.a.createElement(le.a,{type:"ghost",onClick:xe},"\u53D6\u6D88")))};function Ie(Y){var ce=Y.value,xe=Y.onChange,F=Y.mode,ee=Y.options,ge=ee===void 0?{}:ee,Z=Object(re.useRef)(),x=Object(re.useState)(),K=Object(k.a)(x,2),P=K[0],w=K[1];return Object(re.useEffect)(function(){if(P){function V(se){var X=se.getValue();xe&&xe(X)}return P.on("change",V),function(){P.off("change",V)}}},[P,xe]),Object(re.useEffect)(function(){P&&P.setOption("mode",F)},[P,F]),Object(re.useEffect)(function(){P&&((ce!==P.getValue()||ce==="")&&setTimeout(function(){P.setValue(ce||" ")},300))},[P,ce]),Object(re.useEffect)(function(){if(Z.current&&!P){var V=oe.a.fromTextArea(Z.current,Object(M.a)({mode:F,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ge));w(V)}},[Z.current,P]),N.a.createElement("div",{className:"my-codemirror-container"},N.a.createElement("textarea",{ref:Z}))}},"7ixt":function(ot,Be,p){"use strict";p.d(Be,"a",function(){return W});var M={adjustX:1,adjustY:1},we=[0,0],W={left:{points:["cr","cl"],overflow:M,offset:[-4,0],targetOffset:we},right:{points:["cl","cr"],overflow:M,offset:[4,0],targetOffset:we},top:{points:["bc","tc"],overflow:M,offset:[0,-4],targetOffset:we},bottom:{points:["tc","bc"],overflow:M,offset:[0,4],targetOffset:we},topLeft:{points:["bl","tl"],overflow:M,offset:[0,-4],targetOffset:we},leftTop:{points:["tr","tl"],overflow:M,offset:[-4,0],targetOffset:we},topRight:{points:["br","tr"],overflow:M,offset:[0,-4],targetOffset:we},rightTop:{points:["tl","tr"],overflow:M,offset:[4,0],targetOffset:we},bottomRight:{points:["tr","br"],overflow:M,offset:[0,4],targetOffset:we},rightBottom:{points:["bl","br"],overflow:M,offset:[4,0],targetOffset:we},bottomLeft:{points:["tl","bl"],overflow:M,offset:[0,4],targetOffset:we},leftBottom:{points:["br","bl"],overflow:M,offset:[-4,0],targetOffset:we}},le=W},"8EBN":function(ot,Be,p){(function(M){M(p("VrN/"))})(function(M){"use strict";M.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 we=0;we<M.modeInfo.length;we++){var W=M.modeInfo[we];W.mimes&&(W.mime=W.mimes[0])}M.findModeByMIME=function(le){le=le.toLowerCase();for(var ae=0;ae<M.modeInfo.length;ae++){var te=M.modeInfo[ae];if(te.mime==le)return te;if(te.mimes){for(var k=0;k<te.mimes.length;k++)if(te.mimes[k]==le)return te}}if(/\+xml$/.test(le))return M.findModeByMIME("application/xml");if(/\+json$/.test(le))return M.findModeByMIME("application/json")},M.findModeByExtension=function(le){le=le.toLowerCase();for(var ae=0;ae<M.modeInfo.length;ae++){var te=M.modeInfo[ae];if(te.ext){for(var k=0;k<te.ext.length;k++)if(te.ext[k]==le)return te}}},M.findModeByFileName=function(le){for(var ae=0;ae<M.modeInfo.length;ae++){var te=M.modeInfo[ae];if(te.file&&te.file.test(le))return te}var k=le.lastIndexOf("."),S=k>-1&&le.substring(k+1,le.length);if(S)return M.findModeByExtension(S)},M.findModeByName=function(le){le=le.toLowerCase();for(var ae=0;ae<M.modeInfo.length;ae++){var te=M.modeInfo[ae];if(te.name.toLowerCase()==le)return te;if(te.alias){for(var k=0;k<te.alias.length;k++)if(te.alias[k].toLowerCase()==le)return te}}}})},"93VE":function(ot,Be,p){},"9Bee":function(ot,Be,p){"use strict";var M=p("k1fw"),we=p("tJVT"),W=p("q1tI"),le=p.n(W),ae=p("vg9a"),te=p("DlQD"),k=p.n(te),S=p("rUJ1");function C(T,Q){var J=T.match(/^(\s+)(?:```)/);if(J===null)return Q;var ke=J[1];return Q.split(`
|
|
`).map(function(De){var de=De.match(/^\s+/);if(de===null)return De;var Le=Object(we.a)(de,1),fe=Le[0];return fe.length>=ke.length?De.slice(ke.length):De}).join(`
|
|
`)}var re=[],N=["<ul>"],z=new k.a.Renderer,oe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function U(){re.length=0,N=["<ul>"]}var D={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function L(T,Q,J,ke){if(Q>=T.length||T[Q].level<=J)return Q;var De=T[Q];ke.push("<li><a href='#"+De.anchor+"'>"+De.text+"</a>"),Q++;var de=[];return Q=L(T,Q,De.level,de),de.length>0&&(ke.push("<ul>"),de.forEach(function(Le){ke.push(Le)}),ke.push("</ul>")),ke.push("</li>"),Q=L(T,Q,J,ke),Q}function O(){return L(re,0,0,N),N.push("</ul>"),N.join("")}var G={heading:function(Q){var J=oe.exec(Q);if(J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},fences:function(Q){var J=this.rules.block.fences.exec(Q);if(J){var ke=J[0],De=C(ke,J[3]||""),de=J[2]?J[2].trim():J[2];if(["latex","katex","math"].indexOf(de)>=0){var Le=Ie(),fe=De;De=Le,Y[Le]={type:"block",expression:fe}}return{type:"code",raw:ke,lang:de,text:De}}}},H=/(?:\${2})([^\n`]+?)(?:\${2})/gi,me=0,Ie=function(){return"__special_katext_id_".concat(me++,"__")},Y={};function ce(){return Y}function xe(){me=0,Y={}}function F(T){return T=T.replace(H,function(Q,J){var ke=Ie();return Y[ke]={type:"inline",expression:J},ke}),T}var ee=z.listitem;z.listitem=function(T){return ee(F(T))};var ge=z.paragraph;z.paragraph=function(T){return ge(F(T))};var Z=z.tablecell;z.tablecell=function(T,Q){return Z(F(T),Q)},z.code=function(T,Q,J){var ke=(Q||"").match(/\S*/)[0];return ke?["latex","katex","math"].indexOf(ke)>=0?"<p class='editormd-tex'>".concat(T,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(Q,'">').concat(J?T:Object(S.escape)(T,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(J?T:Object(S.escape)(T,!0))+"</code></pre>"},z.heading=function(T,Q,J){var ke=this.options.headerPrefix+J.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return re.push({anchor:ke,level:Q,text:T}),"<h"+Q+' id="'+ke+'">'+T+"</h"+Q+">"},k.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),k.a.use({tokenizer:G,renderer:z});var x=k.a,K=p("SJMd"),P=p("ulZh"),w=p.n(P),V=p("m3rI"),se=p("Oy/b"),X=p("p5ED"),Se=/<pre[^>]*>/g;function v(T){var Q=document.createElement("div");return Q.innerHTML=T,Q.childNodes.length===0?"":Q.childNodes[0].nodeValue}var c=Be.a=function(T){var Q=T.value,J=Q===void 0?"":Q,ke=T.className,De=T.showTextOnly,de=T.showLines,Le=T.style,fe=Le===void 0?{}:Le,be=T.stylesPrev,I=be===void 0?{}:be,B=String(J),Oe=Object(W.useState)(""),He=Object(we.a)(Oe,2),$e=He[0],Ae=He[1],je=Object(W.useMemo)(function(){try{var Ue=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Fe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,he=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;B=B.replace(Ue,"("+V.a.API_SERVER+"/api/attachments/").replace(Fe,'"'+V.a.API_SERVER+"/api/attachments/").replace(he,'"'+V.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),B=B.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(Ge){}var _e=x(B),Ye=ce();if(B.match(/\[TOC\]/)&&(_e=_e.replace("<p>[TOC]</p>",O()),U()),_e=_e.replace(/(__special_katext_id_\d+__)/g,function(Ge,Ke){var rt=Ye[Ke],Qe=rt.type,Ve=rt.expression;return Object(se.renderToString)(v(Ve)||"",{displayMode:Qe==="block",throwOnError:!1,output:"html"})}),_e=_e.replace(/▁/g,"\u2581\u2581\u2581"),xe(),De){var Je=document.createElement("div");return Je.innerHTML=_e,Je.innerText}return setTimeout(function(){return Re()},500),_e},[B]),ye=Object(W.useRef)();D.WebkitLineClamp=de,de&&(fe=Object(M.a)(Object(M.a)({},fe),D));function Ee(Ue){var Fe=Ue.target;if(Fe.tagName.toUpperCase()==="A"){var he=Fe.getAttribute("href");if(he.indexOf("office")>-1)Ue.preventDefault(),Ae(he);else if(he.startsWith("#")){Ue.preventDefault();var _e=document.getElementById(he.replace("#",""));_e&&_e.scrollIntoView(!0)}}}var Re=function(){var Fe,he=(Fe=ye.current)===null||Fe===void 0?void 0:Fe.querySelectorAll("video");he==null||he.forEach(function(_e){if(_e.oncontextmenu=function(){return!1},_e.src.indexOf(".m3u8")>-1&&!_e.canPlayType("application/vnd.apple.mpegurl")){if(w.a.isSupported()){var Ye=new w.a;Ye.loadSource(_e.src),Ye.attachMedia(_e)}}})};return Object(W.useEffect)(function(){if(ye.current&&je&&(je.match(Se)&&window.PR.prettyPrint()),ye.current)return ye.current.addEventListener("click",Ee),function(){ye.current.removeEventListener("click",Ee),xe(),U()}},[je,ye.current,Ee]),le.a.createElement(le.a.Fragment,null,le.a.createElement("div",{ref:ye,style:Object(M.a)({},fe),className:"".concat(ke||""," markdown-body "),dangerouslySetInnerHTML:{__html:je}}),le.a.createElement(X.a,{close:!0,data:$e,type:$e!=null&&$e.length?"office":"",style:Object(M.a)({},I),onClose:function(){return Ae("")}}))}},"9VGf":function(ot,Be,p){"use strict";p.d(Be,"a",function(){return W});var M=p("q1tI"),we=p.n(M);function W(le,ae){var te=Object(M.useRef)();Object(M.useEffect)(function(){te.current=le}),Object(M.useEffect)(function(){function k(){te.current()}if(ae!==null){var S=setInterval(k,ae);return function(){return clearInterval(S)}}},[ae])}},"9ZNV":function(ot,Be,p){"use strict";p.d(Be,"a",function(){return re});var M=p("0Owb"),we=p("+L6B"),W=p("2/Rp"),le=p("q1tI"),ae=p.n(le),te=p("UUDw"),k=p.n(te),S=p("TSYQ"),C=p.n(S),re=function(z){var oe=z.cancelText,U=oe===void 0?"\u53D6\u6D88":oe,D=z.okText,L=D===void 0?"\u786E\u5B9A":D,O=z.loading,G=O===void 0?!1:O,H=z.hasOkBtn,me=H===void 0?!0:H,Ie=z.okButtonProps,Y=Ie===void 0?{}:Ie,ce=z.onCancel,xe=ce===void 0?function(){}:ce,F=z.onOk,ee=F===void 0?function(){}:F,ge=z.className,Z=ge===void 0?"":ge;return ae.a.createElement("div",{className:C()(k.a.buttonFixed,Z)},ae.a.createElement("div",{className:k.a.buttonWrap},ae.a.createElement(W.a,{size:"large",className:"".concat(k.a.button," mr20"),onClick:xe},U),me&&ae.a.createElement(W.a,Object(M.a)({size:"large",type:"primary",className:"".concat(k.a.button," mr20"),loading:G,onClick:ee},Y),L)))}},Bd2K:function(ot,Be,p){(function(M){M(p("VrN/"),p("osHv"))})(function(M){M.defineOption("autoCloseTags",!1,function(C,re,N){if(N!=M.Init&&N&&C.removeKeyMap("autoCloseTags"),!re)return;var z={name:"autoCloseTags"};(typeof re!="object"||re.whenClosing!==!1)&&(z["'/'"]=function(oe){return te(oe)}),(typeof re!="object"||re.whenOpening!==!1)&&(z["'>'"]=function(oe){return le(oe)}),C.addKeyMap(z)});var we=["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 le(C){if(C.getOption("disableInput"))return M.Pass;for(var re=C.listSelections(),N=[],z=C.getOption("autoCloseTags"),oe=0;oe<re.length;oe++){if(!re[oe].empty())return M.Pass;var U=re[oe].head,D=C.getTokenAt(U),L=M.innerMode(C.getMode(),D.state),O=L.state,G=L.mode.xmlCurrentTag&&L.mode.xmlCurrentTag(O),H=G&&G.name;if(!H)return M.Pass;var me=L.mode.configuration=="html",Ie=typeof z=="object"&&z.dontCloseTags||me&&we,Y=typeof z=="object"&&z.indentTags||me&&W;D.end>U.ch&&(H=H.slice(0,H.length-D.end+U.ch));var ce=H.toLowerCase();if(!H||D.type=="string"&&(D.end!=U.ch||!/[\"\']/.test(D.string.charAt(D.string.length-1))||D.string.length==1)||D.type=="tag"&&G.close||D.string.indexOf("/")==U.ch-D.start-1||Ie&&k(Ie,ce)>-1||S(C,L.mode.xmlCurrentContext&&L.mode.xmlCurrentContext(O)||[],H,U,!0))return M.Pass;var xe=typeof z=="object"&&z.emptyTags;if(xe&&k(xe,H)>-1){N[oe]={text:"/>",newPos:M.Pos(U.line,U.ch+2)};continue}var F=Y&&k(Y,ce)>-1;N[oe]={indent:F,text:">"+(F?`
|
|
|
|
`:"")+"</"+H+">",newPos:F?M.Pos(U.line+1,0):M.Pos(U.line,U.ch+1)}}for(var ee=typeof z=="object"&&z.dontIndentOnAutoClose,oe=re.length-1;oe>=0;oe--){var ge=N[oe];C.replaceRange(ge.text,re[oe].head,re[oe].anchor,"+insert");var Z=C.listSelections().slice(0);Z[oe]={head:ge.newPos,anchor:ge.newPos},C.setSelections(Z),!ee&&ge.indent&&(C.indentLine(ge.newPos.line,null,!0),C.indentLine(ge.newPos.line+1,null,!0))}}function ae(C,re){for(var N=C.listSelections(),z=[],oe=re?"/":"</",U=C.getOption("autoCloseTags"),D=typeof U=="object"&&U.dontIndentOnSlash,L=0;L<N.length;L++){if(!N[L].empty())return M.Pass;var O=N[L].head,G=C.getTokenAt(O),H=M.innerMode(C.getMode(),G.state),me=H.state;if(re&&(G.type=="string"||G.string.charAt(0)!="<"||G.start!=O.ch-1))return M.Pass;var Ie,Y=H.mode.name!="xml"&&C.getMode().name=="htmlmixed";if(Y&&H.mode.name=="javascript")Ie=oe+"script";else if(Y&&H.mode.name=="css")Ie=oe+"style";else{var ce=H.mode.xmlCurrentContext&&H.mode.xmlCurrentContext(me);if(!ce||ce.length&&S(C,ce,ce[ce.length-1],O))return M.Pass;Ie=oe+ce[ce.length-1]}C.getLine(O.line).charAt(G.end)!=">"&&(Ie+=">"),z[L]=Ie}if(C.replaceSelections(z),N=C.listSelections(),!D)for(var L=0;L<N.length;L++)(L==N.length-1||N[L].head.line<N[L+1].head.line)&&C.indentLine(N[L].head.line)}function te(C){return C.getOption("disableInput")?M.Pass:ae(C,!0)}M.commands.closeTag=function(C){return ae(C)};function k(C,re){if(C.indexOf)return C.indexOf(re);for(var N=0,z=C.length;N<z;++N)if(C[N]==re)return N;return-1}function S(C,re,N,z,oe){if(!M.scanForClosingTag)return!1;var U=Math.min(C.lastLine()+1,z.line+500),D=M.scanForClosingTag(C,z,null,U);if(!D||D.tag!=N)return!1;for(var L=oe?1:0,O=re.length-1;O>=0&&re[O]==N;O--)++L;z=D.to;for(var O=1;O<L;O++){var G=M.scanForClosingTag(C,z,null,U);if(!G||G.tag!=N)return!1;z=G.to}return!0}})},BjJ7:function(ot,Be,p){"use strict";p.d(Be,"d",function(){return we}),p.d(Be,"c",function(){return W}),p.d(Be,"e",function(){return le}),p.d(Be,"b",function(){return ae}),p.d(Be,"a",function(){return k});var M=p("m3rI");function we(S){var C=!0;if(S.length>0){for(var re=0;re<S.length;re++)if(S[re].compile_success==0||!S[re].compile_success){C=!1;break}}else C=!1;return C}function W(S){for(var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",re=[],N=0;N<S.length;N++){var z=S[N],oe=C?"".concat(C,"/").concat(z.name):"".concat(z.name);re.push({title:z.name,isLeaf:!(z.type==="tree"),key:oe})}return re}function le(S,C,re){for(var N=0;N<S.length;N++){var z=S[N];if(z.key===C){z.children=re;break}z.children&&le(z.children,C,re)}return S}function ae(S,C,re){var N;return function(){var z=this,oe=arguments,U=function(){N=null,re||S.apply(z,oe)},D=re&&!N;clearTimeout(N),N=setTimeout(U,C),D&&S.apply(z,oe)}}var te=!0,k=M.a.API_SERVER},"C+DQ":function(ot,Be,p){},DlQD:function(ot,Be,p){(function(M,we){ot.exports=we()})(this,function(){"use strict";function M(g,b){for(var E=0;E<b.length;E++){var d=b[E];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}function we(g,b,E){return b&&M(g.prototype,b),E&&M(g,E),g}function W(g,b){if(!g)return;if(typeof g=="string")return le(g,b);var E=Object.prototype.toString.call(g).slice(8,-1);if(E==="Object"&&g.constructor&&(E=g.constructor.name),E==="Map"||E==="Set")return Array.from(g);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return le(g,b)}function le(g,b){(b==null||b>g.length)&&(b=g.length);for(var E=0,d=new Array(b);E<b;E++)d[E]=g[E];return d}function ae(g,b){var E;if(typeof Symbol=="undefined"||g[Symbol.iterator]==null){if(Array.isArray(g)||(E=W(g))||b&&g&&typeof g.length=="number"){E&&(g=E);var d=0;return function(){return d>=g.length?{done:!0}:{done:!1,value:g[d++]}}}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 E=g[Symbol.iterator](),E.next.bind(E)}function te(g,b){return b={exports:{}},g(b,b.exports),b.exports}var k=te(function(g){function b(){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 E(d){g.exports.defaults=d}g.exports={defaults:b(),getDefaults:b,changeDefaults:E}}),S=k.defaults,C=k.getDefaults,re=k.changeDefaults,N=/[&<>"']/,z=/[&<>"']/g,oe=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,D={"&":"&","<":"<",">":">",'"':""","'":"'"},L=function(b){return D[b]};function O(g,b){if(b){if(N.test(g))return g.replace(z,L)}else if(oe.test(g))return g.replace(U,L);return g}var G=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function H(g){return g.replace(G,function(b,E){return E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""})}var me=/(^|[^\[])\^/g;function Ie(g,b){g=g.source||g,b=b||"";var E={replace:function(f,h){return h=h.source||h,h=h.replace(me,"$1"),g=g.replace(f,h),E},getRegex:function(){return new RegExp(g,b)}};return E}var Y=/[^\w:]/g,ce=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function xe(g,b,E){if(g){var d;try{d=decodeURIComponent(H(E)).replace(Y,"").toLowerCase()}catch(f){return null}if(d.indexOf("javascript:")===0||d.indexOf("vbscript:")===0||d.indexOf("data:")===0)return null}b&&!ce.test(E)&&(E=x(b,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(f){return null}return E}var F={},ee=/^[^:]+:\/*[^/]*$/,ge=/^([^:]+:)[\s\S]*$/,Z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(g,b){F[" "+g]||(ee.test(g)?F[" "+g]=g+"/":F[" "+g]=V(g,"/",!0)),g=F[" "+g];var E=g.indexOf(":")===-1;return b.substring(0,2)==="//"?E?b:g.replace(ge,"$1")+b:b.charAt(0)==="/"?E?b:g.replace(Z,"$1")+b:g+b}var K={exec:function(){}};function P(g){for(var b=1,E,d;b<arguments.length;b++){E=arguments[b];for(d in E)Object.prototype.hasOwnProperty.call(E,d)&&(g[d]=E[d])}return g}function w(g,b){var E=g.replace(/\|/g,function(h,m,R){for(var $=!1,ve=m;--ve>=0&&R[ve]==="\\";)$=!$;return $?"|":" |"}),d=E.split(/ \|/),f=0;if(d.length>b)d.splice(b);else for(;d.length<b;)d.push("");for(;f<d.length;f++)d[f]=d[f].trim().replace(/\\\|/g,"|");return d}function V(g,b,E){var d=g.length;if(d===0)return"";for(var f=0;f<d;){var h=g.charAt(d-f-1);if(h===b&&!E)f++;else if(h!==b&&E)f++;else break}return g.substr(0,d-f)}function se(g,b){if(g.indexOf(b[1])===-1)return-1;for(var E=g.length,d=0,f=0;f<E;f++)if(g[f]==="\\")f++;else if(g[f]===b[0])d++;else if(g[f]===b[1]&&(d--,d<0))return f;return-1}function X(g){g&&g.sanitize&&!g.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 Se={escape:O,unescape:H,edit:Ie,cleanUrl:xe,resolveUrl:x,noopTest:K,merge:P,splitCells:w,rtrim:V,findClosingBracket:se,checkSanitizeDeprecation:X},v=k.defaults,c=Se.rtrim,T=Se.splitCells,Q=Se.escape,J=Se.findClosingBracket;function ke(g,b,E){var d=b.href,f=b.title?Q(b.title):null,h=g[1].replace(/\\([\[\]])/g,"$1");return g[0].charAt(0)!=="!"?{type:"link",raw:E,href:d,title:f,text:h}:{type:"image",raw:E,href:d,title:f,text:Q(h)}}function De(g,b){var E=g.match(/^(\s+)(?:```)/);if(E===null)return b;var d=E[1];return b.split(`
|
|
`).map(function(f){var h=f.match(/^\s+/);if(h===null)return f;var m=h[0];return m.length>=d.length?f.slice(d.length):f}).join(`
|
|
`)}var de=function(){function g(E){this.options=E||v}var b=g.prototype;return b.space=function(d){var f=this.rules.block.newline.exec(d);if(f)return f[0].length>1?{type:"space",raw:f[0]}:{raw:`
|
|
`}},b.code=function(d,f){var h=this.rules.block.code.exec(d);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:c(R,`
|
|
`)}}},b.fences=function(d){var f=this.rules.block.fences.exec(d);if(f){var h=f[0],m=De(h,f[3]||"");return{type:"code",raw:h,lang:f[2]?f[2].trim():f[2],text:m}}},b.heading=function(d){var f=this.rules.block.heading.exec(d);if(f)return{type:"heading",raw:f[0],depth:f[1].length,text:f[2]}},b.nptable=function(d){var f=this.rules.block.nptable.exec(d);if(f){var h={type:"table",header:T(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]=T(h.cells[R],h.header.length);return h}}},b.hr=function(d){var f=this.rules.block.hr.exec(d);if(f)return{type:"hr",raw:f[0]}},b.blockquote=function(d){var f=this.rules.block.blockquote.exec(d);if(f){var h=f[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:f[0],text:h}}},b.list=function(d){var f=this.rules.block.list.exec(d);if(f){for(var h=f[0],m=f[2],R=m.length>1,$=m[m.length-1]===")",ve={type:"list",raw:h,ordered:R,start:R?+m.slice(0,-1):"",loose:!1,items:[]},tt=f[0].match(this.rules.block.item),ft=!1,at,Pt,pt,lt,Bt,bt,$t,Wt=tt.length,mt=0;mt<Wt;mt++)at=tt[mt],h=at,Pt=at.length,at=at.replace(/^ *([*+-]|\d+[.)]) */,""),~at.indexOf(`
|
|
`)&&(Pt-=at.length,at=this.options.pedantic?at.replace(/^ {1,4}/gm,""):at.replace(new RegExp("^ {1,"+Pt+"}","gm"),"")),mt!==Wt-1&&(pt=this.rules.block.bullet.exec(tt[mt+1])[0],(R?pt.length===1||!$&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==m)&&(lt=tt.slice(mt+1).join(`
|
|
`),ve.raw=ve.raw.substring(0,ve.raw.length-lt.length),mt=Wt-1)),Bt=ft||/\n\n(?!\s*$)/.test(at),mt!==Wt-1&&(ft=at.charAt(at.length-1)===`
|
|
`,Bt||(Bt=ft)),Bt&&(ve.loose=!0),bt=/^\[[ xX]\] /.test(at),$t=void 0,bt&&($t=at[1]!==" ",at=at.replace(/^\[[ xX]\] +/,"")),ve.items.push({type:"list_item",raw:h,task:bt,checked:$t,loose:Bt,text:at});return ve}},b.html=function(d){var f=this.rules.block.html.exec(d);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]):Q(f[0]):f[0]}},b.def=function(d){var f=this.rules.block.def.exec(d);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]}}},b.table=function(d){var f=this.rules.block.table.exec(d);if(f){var h={type:"table",header:T(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]=T(h.cells[R].replace(/^ *\| *| *\| *$/g,""),h.header.length);return h}}},b.lheading=function(d){var f=this.rules.block.lheading.exec(d);if(f)return{type:"heading",raw:f[0],depth:f[2].charAt(0)==="="?1:2,text:f[1]}},b.paragraph=function(d){var f=this.rules.block.paragraph.exec(d);if(f)return{type:"paragraph",raw:f[0],text:f[1].charAt(f[1].length-1)===`
|
|
`?f[1].slice(0,-1):f[1]}},b.text=function(d,f){var h=this.rules.block.text.exec(d);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]}}},b.escape=function(d){var f=this.rules.inline.escape.exec(d);if(f)return{type:"escape",raw:f[0],text:Q(f[1])}},b.tag=function(d,f,h){var m=this.rules.inline.tag.exec(d);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]):Q(m[0]):m[0]}},b.link=function(d){var f=this.rules.inline.link.exec(d);if(f){var h=J(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 $=f[2],ve="";if(this.options.pedantic){var tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($);tt?($=tt[1],ve=tt[3]):ve=""}else ve=f[3]?f[3].slice(1,-1):"";$=$.trim().replace(/^<([\s\S]*)>$/,"$1");var ft=ke(f,{href:$&&$.replace(this.rules.inline._escapes,"$1"),title:ve&&ve.replace(this.rules.inline._escapes,"$1")},f[0]);return ft}},b.reflink=function(d,f){var h;if((h=this.rules.inline.reflink.exec(d))||(h=this.rules.inline.nolink.exec(d))){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 $=ke(h,m,h[0]);return $}},b.strong=function(d,f,h){h===void 0&&(h="");var m=this.rules.inline.strong.start.exec(d);if(m&&(!m[1]||m[1]&&(h===""||this.rules.inline.punctuation.exec(h)))){f=f.slice(-1*d.length);var R=m[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;R.lastIndex=0;for(var $;(m=R.exec(f))!=null;)if($=this.rules.inline.strong.middle.exec(f.slice(0,m.index+3)),$)return{type:"strong",raw:d.slice(0,$[0].length),text:d.slice(2,$[0].length-2)}}},b.em=function(d,f,h){h===void 0&&(h="");var m=this.rules.inline.em.start.exec(d);if(m&&(!m[1]||m[1]&&(h===""||this.rules.inline.punctuation.exec(h)))){f=f.slice(-1*d.length);var R=m[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;R.lastIndex=0;for(var $;(m=R.exec(f))!=null;)if($=this.rules.inline.em.middle.exec(f.slice(0,m.index+2)),$)return{type:"em",raw:d.slice(0,$[0].length),text:d.slice(1,$[0].length-1)}}},b.codespan=function(d){var f=this.rules.inline.code.exec(d);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=Q(h,!0),{type:"codespan",raw:f[0],text:h}}},b.br=function(d){var f=this.rules.inline.br.exec(d);if(f)return{type:"br",raw:f[0]}},b.del=function(d){var f=this.rules.inline.del.exec(d);if(f)return{type:"del",raw:f[0],text:f[1]}},b.autolink=function(d,f){var h=this.rules.inline.autolink.exec(d);if(h){var m,R;return h[2]==="@"?(m=Q(this.options.mangle?f(h[1]):h[1]),R="mailto:"+m):(m=Q(h[1]),R=m),{type:"link",raw:h[0],text:m,href:R,tokens:[{type:"text",raw:m,text:m}]}}},b.url=function(d,f){var h;if(h=this.rules.inline.url.exec(d)){var m,R;if(h[2]==="@")m=Q(this.options.mangle?f(h[0]):h[0]),R="mailto:"+m;else{var $;do $=h[0],h[0]=this.rules.inline._backpedal.exec(h[0])[0];while($!==h[0]);m=Q(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}]}}},b.inlineText=function(d,f,h){var m=this.rules.inline.text.exec(d);if(m){var R;return f?R=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(m[0]):Q(m[0]):m[0]:R=Q(this.options.smartypants?h(m[0]):m[0]),{type:"text",raw:m[0],text:R}}},g}(),Le=Se.noopTest,fe=Se.edit,be=Se.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:Le,table:Le,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=fe(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=fe(I.item,"gm").replace(/bull/g,I.bullet).getRegex(),I.list=fe(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=fe(I.html,"i").replace("comment",I._comment).replace("tag",I._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),I.paragraph=fe(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=fe(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=fe(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=fe(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:fe(`^ *(?: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:Le,paragraph:fe(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 B={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Le,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:Le,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};B._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",B.punctuation=fe(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",B._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",B.em.start=fe(B.em.start).replace(/punctuation/g,B._punctuation).getRegex(),B.em.middle=fe(B.em.middle).replace(/punctuation/g,B._punctuation).replace(/overlapSkip/g,B._overlapSkip).getRegex(),B.em.endAst=fe(B.em.endAst,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.em.endUnd=fe(B.em.endUnd,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.strong.start=fe(B.strong.start).replace(/punctuation/g,B._punctuation).getRegex(),B.strong.middle=fe(B.strong.middle).replace(/punctuation/g,B._punctuation).replace(/blockSkip/g,B._blockSkip).getRegex(),B.strong.endAst=fe(B.strong.endAst,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.strong.endUnd=fe(B.strong.endUnd,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=fe(B._blockSkip,"g").getRegex(),B.overlapSkip=fe(B._overlapSkip,"g").getRegex(),B._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,B._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,B._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])?)+(?![-_])/,B.autolink=fe(B.autolink).replace("scheme",B._scheme).replace("email",B._email).getRegex(),B._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,B.tag=fe(B.tag).replace("comment",I._comment).replace("attribute",B._attribute).getRegex(),B._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,B._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,B._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,B.link=fe(B.link).replace("label",B._label).replace("href",B._href).replace("title",B._title).getRegex(),B.reflink=fe(B.reflink).replace("label",B._label).getRegex(),B.reflinkSearch=fe(B.reflinkSearch,"g").replace("reflink",B.reflink).replace("nolink",B.nolink).getRegex(),B.normal=be({},B),B.pedantic=be({},B.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:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",B._label).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B._label).getRegex()}),B.gfm=be({},B.normal,{escape:fe(B.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),B.gfm.url=fe(B.gfm.url,"i").replace("email",B.gfm._extended_email).getRegex(),B.breaks=be({},B.gfm,{br:fe(B.br).replace("{2,}","*").getRegex(),text:fe(B.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Oe={block:I,inline:B},He=k.defaults,$e=Oe.block,Ae=Oe.inline;function je(g){return g.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 ye(g){var b="",E,d,f=g.length;for(E=0;E<f;E++)d=g.charCodeAt(E),Math.random()>.5&&(d="x"+d.toString(16)),b+="&#"+d+";";return b}var Ee=function(){function g(E){this.tokens=[],this.tokens.links=Object.create(null),this.options=E||He,this.options.tokenizer=this.options.tokenizer||new de,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var d={block:$e.normal,inline:Ae.normal};this.options.pedantic?(d.block=$e.pedantic,d.inline=Ae.pedantic):this.options.gfm&&(d.block=$e.gfm,this.options.breaks?d.inline=Ae.breaks:d.inline=Ae.gfm),this.tokenizer.rules=d}g.lex=function(d,f){var h=new g(f);return h.lex(d)};var b=g.prototype;return b.lex=function(d){return d=d.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(d,this.tokens,!0),this.inline(this.tokens),this.tokens},b.blockTokens=function(d,f,h){f===void 0&&(f=[]),h===void 0&&(h=!0),d=d.replace(/^ +$/gm,"");for(var m,R,$,ve;d;){if(m=this.tokenizer.space(d)){d=d.substring(m.raw.length),m.type&&f.push(m);continue}if(m=this.tokenizer.code(d,f)){d=d.substring(m.raw.length),m.type?f.push(m):(ve=f[f.length-1],ve.raw+=`
|
|
`+m.raw,ve.text+=`
|
|
`+m.text);continue}if(m=this.tokenizer.fences(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.heading(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.nptable(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.hr(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.blockquote(d)){d=d.substring(m.raw.length),m.tokens=this.blockTokens(m.text,[],h),f.push(m);continue}if(m=this.tokenizer.list(d)){for(d=d.substring(m.raw.length),$=m.items.length,R=0;R<$;R++)m.items[R].tokens=this.blockTokens(m.items[R].text,[],!1);f.push(m);continue}if(m=this.tokenizer.html(d)){d=d.substring(m.raw.length),f.push(m);continue}if(h&&(m=this.tokenizer.def(d))){d=d.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(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.lheading(d)){d=d.substring(m.raw.length),f.push(m);continue}if(h&&(m=this.tokenizer.paragraph(d))){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.text(d,f)){d=d.substring(m.raw.length),m.type?f.push(m):(ve=f[f.length-1],ve.raw+=`
|
|
`+m.raw,ve.text+=`
|
|
`+m.text);continue}if(d){var tt="Infinite loop on byte: "+d.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return f},b.inline=function(d){var f,h,m,R,$,ve,tt=d.length;for(f=0;f<tt;f++){ve=d[f];switch(ve.type){case"paragraph":case"text":case"heading":{ve.tokens=[],this.inlineTokens(ve.text,ve.tokens);break}case"table":{for(ve.tokens={header:[],cells:[]},R=ve.header.length,h=0;h<R;h++)ve.tokens.header[h]=[],this.inlineTokens(ve.header[h],ve.tokens.header[h]);for(R=ve.cells.length,h=0;h<R;h++)for($=ve.cells[h],ve.tokens.cells[h]=[],m=0;m<$.length;m++)ve.tokens.cells[h][m]=[],this.inlineTokens($[m],ve.tokens.cells[h][m]);break}case"blockquote":{this.inline(ve.tokens);break}case"list":{for(R=ve.items.length,h=0;h<R;h++)this.inline(ve.items[h].tokens);break}}}return d},b.inlineTokens=function(d,f,h,m,R){f===void 0&&(f=[]),h===void 0&&(h=!1),m===void 0&&(m=!1),R===void 0&&(R="");var $,ve=d,tt;if(this.tokens.links){var ft=Object.keys(this.tokens.links);if(ft.length>0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(ve))!=null;)ft.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(ve=ve.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+ve.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(ve))!=null;)ve=ve.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+ve.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;d;){if($=this.tokenizer.escape(d)){d=d.substring($.raw.length),f.push($);continue}if($=this.tokenizer.tag(d,h,m)){d=d.substring($.raw.length),h=$.inLink,m=$.inRawBlock,f.push($);continue}if($=this.tokenizer.link(d)){d=d.substring($.raw.length),$.type==="link"&&($.tokens=this.inlineTokens($.text,[],!0,m)),f.push($);continue}if($=this.tokenizer.reflink(d,this.tokens.links)){d=d.substring($.raw.length),$.type==="link"&&($.tokens=this.inlineTokens($.text,[],!0,m)),f.push($);continue}if($=this.tokenizer.strong(d,ve,R)){d=d.substring($.raw.length),$.tokens=this.inlineTokens($.text,[],h,m),f.push($);continue}if($=this.tokenizer.em(d,ve,R)){d=d.substring($.raw.length),$.tokens=this.inlineTokens($.text,[],h,m),f.push($);continue}if($=this.tokenizer.codespan(d)){d=d.substring($.raw.length),f.push($);continue}if($=this.tokenizer.br(d)){d=d.substring($.raw.length),f.push($);continue}if($=this.tokenizer.del(d)){d=d.substring($.raw.length),$.tokens=this.inlineTokens($.text,[],h,m),f.push($);continue}if($=this.tokenizer.autolink(d,ye)){d=d.substring($.raw.length),f.push($);continue}if(!h&&($=this.tokenizer.url(d,ye))){d=d.substring($.raw.length),f.push($);continue}if($=this.tokenizer.inlineText(d,m,je)){d=d.substring($.raw.length),R=$.raw.slice(-1),f.push($);continue}if(d){var at="Infinite loop on byte: "+d.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return f},we(g,null,[{key:"rules",get:function(){return{block:$e,inline:Ae}}}]),g}(),Re=k.defaults,Ue=Se.cleanUrl,Fe=Se.escape,he=function(){function g(E){this.options=E||Re}var b=g.prototype;return b.code=function(d,f,h){var m=(f||"").match(/\S*/)[0];if(this.options.highlight){var R=this.options.highlight(d,m);R!=null&&R!==d&&(h=!0,d=R)}return m?'<pre><code class="'+this.options.langPrefix+Fe(m,!0)+'">'+(h?d:Fe(d,!0))+`</code></pre>
|
|
`:"<pre><code>"+(h?d:Fe(d,!0))+`</code></pre>
|
|
`},b.blockquote=function(d){return`<blockquote>
|
|
`+d+`</blockquote>
|
|
`},b.html=function(d){return d},b.heading=function(d,f,h,m){return this.options.headerIds?"<h"+f+' id="'+this.options.headerPrefix+m.slug(h)+'">'+d+"</h"+f+`>
|
|
`:"<h"+f+">"+d+"</h"+f+`>
|
|
`},b.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},b.list=function(d,f,h){var m=f?"ol":"ul",R=f&&h!==1?' start="'+h+'"':"";return"<"+m+R+`>
|
|
`+d+"</"+m+`>
|
|
`},b.listitem=function(d){return"<li>"+d+`</li>
|
|
`},b.checkbox=function(d){return"<input "+(d?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},b.paragraph=function(d){return"<p>"+d+`</p>
|
|
`},b.table=function(d,f){return f&&(f="<tbody>"+f+"</tbody>"),`<table>
|
|
<thead>
|
|
`+d+`</thead>
|
|
`+f+`</table>
|
|
`},b.tablerow=function(d){return`<tr>
|
|
`+d+`</tr>
|
|
`},b.tablecell=function(d,f){var h=f.header?"th":"td",m=f.align?"<"+h+' align="'+f.align+'">':"<"+h+">";return m+d+"</"+h+`>
|
|
`},b.strong=function(d){return"<strong>"+d+"</strong>"},b.em=function(d){return"<em>"+d+"</em>"},b.codespan=function(d){return"<code>"+d+"</code>"},b.br=function(){return this.options.xhtml?"<br/>":"<br>"},b.del=function(d){return"<del>"+d+"</del>"},b.link=function(d,f,h){if(d=Ue(this.options.sanitize,this.options.baseUrl,d),d===null)return h;var m='<a href="'+Fe(d)+'"';return f&&(m+=' title="'+f+'"'),m+=">"+h+"</a>",m},b.image=function(d,f,h){if(d=Ue(this.options.sanitize,this.options.baseUrl,d),d===null)return h;var m='<img src="'+d+'" alt="'+h+'"';return f&&(m+=' title="'+f+'"'),m+=this.options.xhtml?"/>":">",m},b.text=function(d){return d},g}(),_e=function(){function g(){}var b=g.prototype;return b.strong=function(d){return d},b.em=function(d){return d},b.codespan=function(d){return d},b.del=function(d){return d},b.html=function(d){return d},b.text=function(d){return d},b.link=function(d,f,h){return""+h},b.image=function(d,f,h){return""+h},b.br=function(){return""},g}(),Ye=function(){function g(){this.seen={}}var b=g.prototype;return b.slug=function(d){var f=d.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},g}(),Je=k.defaults,Ge=Se.unescape,Ke=function(){function g(E){this.options=E||Je,this.options.renderer=this.options.renderer||new he,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _e,this.slugger=new Ye}g.parse=function(d,f){var h=new g(f);return h.parse(d)};var b=g.prototype;return b.parse=function(d,f){f===void 0&&(f=!0);var h="",m,R,$,ve,tt,ft,at,Pt,pt,lt,Bt,bt,$t,Wt,mt,_n,Gn,un,Cn=d.length;for(m=0;m<Cn;m++){lt=d[m];switch(lt.type){case"space":continue;case"hr":{h+=this.renderer.hr();continue}case"heading":{h+=this.renderer.heading(this.parseInline(lt.tokens),lt.depth,Ge(this.parseInline(lt.tokens,this.textRenderer)),this.slugger);continue}case"code":{h+=this.renderer.code(lt.text,lt.lang,lt.escaped);continue}case"table":{for(Pt="",at="",ve=lt.header.length,R=0;R<ve;R++)at+=this.renderer.tablecell(this.parseInline(lt.tokens.header[R]),{header:!0,align:lt.align[R]});for(Pt+=this.renderer.tablerow(at),pt="",ve=lt.cells.length,R=0;R<ve;R++){for(ft=lt.tokens.cells[R],at="",tt=ft.length,$=0;$<tt;$++)at+=this.renderer.tablecell(this.parseInline(ft[$]),{header:!1,align:lt.align[$]});pt+=this.renderer.tablerow(at)}h+=this.renderer.table(Pt,pt);continue}case"blockquote":{pt=this.parse(lt.tokens),h+=this.renderer.blockquote(pt);continue}case"list":{for(Bt=lt.ordered,bt=lt.start,$t=lt.loose,ve=lt.items.length,pt="",R=0;R<ve;R++)mt=lt.items[R],_n=mt.checked,Gn=mt.task,Wt="",mt.task&&(un=this.renderer.checkbox(_n),$t?mt.tokens.length>0&&mt.tokens[0].type==="text"?(mt.tokens[0].text=un+" "+mt.tokens[0].text,mt.tokens[0].tokens&&mt.tokens[0].tokens.length>0&&mt.tokens[0].tokens[0].type==="text"&&(mt.tokens[0].tokens[0].text=un+" "+mt.tokens[0].tokens[0].text)):mt.tokens.unshift({type:"text",text:un}):Wt+=un),Wt+=this.parse(mt.tokens,$t),pt+=this.renderer.listitem(Wt,Gn,_n);h+=this.renderer.list(pt,Bt,bt);continue}case"html":{h+=this.renderer.html(lt.text);continue}case"paragraph":{h+=this.renderer.paragraph(this.parseInline(lt.tokens));continue}case"text":{for(pt=lt.tokens?this.parseInline(lt.tokens):lt.text;m+1<Cn&&d[m+1].type==="text";)lt=d[++m],pt+=`
|
|
`+(lt.tokens?this.parseInline(lt.tokens):lt.text);h+=f?this.renderer.paragraph(pt):pt;continue}default:{var pn='Token with "'+lt.type+'" type was not found.';if(this.options.silent){console.error(pn);return}else throw new Error(pn)}}}return h},b.parseInline=function(d,f){f=f||this.renderer;var h="",m,R,$=d.length;for(m=0;m<$;m++){R=d[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 ve='Token with "'+R.type+'" type was not found.';if(this.options.silent){console.error(ve);return}else throw new Error(ve)}}}return h},g}(),rt=Se.merge,Qe=Se.checkSanitizeDeprecation,Ve=Se.escape,ie=k.getDefaults,nt=k.changeDefaults,Xe=k.defaults;function q(g,b,E){if(typeof g=="undefined"||g===null)throw new Error("marked(): input parameter is undefined or null");if(typeof g!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(g)+", string expected");if(typeof b=="function"&&(E=b,b=null),b=rt({},q.defaults,b||{}),Qe(b),E){var d=b.highlight,f;try{f=Ee.lex(g,b)}catch($){return E($)}var h=function(ve){var tt;if(!ve)try{tt=Ke.parse(f,b)}catch(ft){ve=ft}return b.highlight=d,ve?E(ve):E(null,tt)};if(!d||d.length<3)return h();if(delete b.highlight,!f.length)return h();var m=0;q.walkTokens(f,function($){$.type==="code"&&(m++,setTimeout(function(){d($.text,$.lang,function(ve,tt){if(ve)return h(ve);tt!=null&&tt!==$.text&&($.text=tt,$.escaped=!0),m--,m===0&&h()})},0))}),m===0&&h();return}try{var R=Ee.lex(g,b);return b.walkTokens&&q.walkTokens(R,b.walkTokens),Ke.parse(R,b)}catch($){if($.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,b.silent)return"<p>An error occurred:</p><pre>"+Ve($.message+"",!0)+"</pre>";throw $}}q.options=q.setOptions=function(g){return rt(q.defaults,g),nt(q.defaults),q},q.getDefaults=ie,q.defaults=Xe,q.use=function(g){var b=rt({},g);if(g.renderer&&function(){var d=q.defaults.renderer||new he,f=function(R){var $=d[R];d[R]=function(){for(var ve=arguments.length,tt=new Array(ve),ft=0;ft<ve;ft++)tt[ft]=arguments[ft];var at=g.renderer[R].apply(d,tt);return at===!1&&(at=$.apply(d,tt)),at}};for(var h in g.renderer)f(h);b.renderer=d}(),g.tokenizer&&function(){var d=q.defaults.tokenizer||new de,f=function(R){var $=d[R];d[R]=function(){for(var ve=arguments.length,tt=new Array(ve),ft=0;ft<ve;ft++)tt[ft]=arguments[ft];var at=g.tokenizer[R].apply(d,tt);return at===!1&&(at=$.apply(d,tt)),at}};for(var h in g.tokenizer)f(h);b.tokenizer=d}(),g.walkTokens){var E=q.defaults.walkTokens;b.walkTokens=function(d){g.walkTokens(d),E&&E(d)}}q.setOptions(b)},q.walkTokens=function(g,b){for(var E=ae(g),d;!(d=E()).done;){var f=d.value;b(f);switch(f.type){case"table":{for(var h=ae(f.tokens.header),m;!(m=h()).done;){var R=m.value;q.walkTokens(R,b)}for(var $=ae(f.tokens.cells),ve;!(ve=$()).done;)for(var tt=ve.value,ft=ae(tt),at;!(at=ft()).done;){var Pt=at.value;q.walkTokens(Pt,b)}break}case"list":{q.walkTokens(f.items,b);break}default:f.tokens&&q.walkTokens(f.tokens,b)}}},q.Parser=Ke,q.parser=Ke.parse,q.Renderer=he,q.TextRenderer=_e,q.Lexer=Ee,q.lexer=Ee.lex,q.Tokenizer=de,q.Slugger=Ye,q.parse=q;var ue=q;return ue})},ELLl:function(ot,Be,p){(function(M){M(p("VrN/"))})(function(M){var we={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},W=M.Pos;M.defineOption("autoCloseBrackets",!1,function(D,L,O){O&&O!=M.Init&&(D.removeKeyMap(ae),D.state.closeBrackets=null),L&&(te(le(L,"pairs")),D.state.closeBrackets=L,D.addKeyMap(ae))});function le(D,L){return L=="pairs"&&typeof D=="string"?D:typeof D=="object"&&D[L]!=null?D[L]:we[L]}var ae={Backspace:C,Enter:re};function te(D){for(var L=0;L<D.length;L++){var O=D.charAt(L),G="'"+O+"'";ae[G]||(ae[G]=k(O))}}te(we.pairs+"`");function k(D){return function(L){return z(L,D)}}function S(D){var L=D.state.closeBrackets;if(!L||L.override)return L;var O=D.getModeAt(D.getCursor());return O.closeBrackets||L}function C(D){var L=S(D);if(!L||D.getOption("disableInput"))return M.Pass;for(var O=le(L,"pairs"),G=D.listSelections(),H=0;H<G.length;H++){if(!G[H].empty())return M.Pass;var me=oe(D,G[H].head);if(!me||O.indexOf(me)%2!=0)return M.Pass}for(var H=G.length-1;H>=0;H--){var Ie=G[H].head;D.replaceRange("",W(Ie.line,Ie.ch-1),W(Ie.line,Ie.ch+1),"+delete")}}function re(D){var L=S(D),O=L&&le(L,"explode");if(!O||D.getOption("disableInput"))return M.Pass;for(var G=D.listSelections(),H=0;H<G.length;H++){if(!G[H].empty())return M.Pass;var me=oe(D,G[H].head);if(!me||O.indexOf(me)%2!=0)return M.Pass}D.operation(function(){var Ie=D.lineSeparator()||`
|
|
`;D.replaceSelection(Ie+Ie,null),D.execCommand("goCharLeft"),G=D.listSelections();for(var Y=0;Y<G.length;Y++){var ce=G[Y].head.line;D.indentLine(ce,null,!0),D.indentLine(ce+1,null,!0)}})}function N(D){var L=M.cmpPos(D.anchor,D.head)>0;return{anchor:new W(D.anchor.line,D.anchor.ch+(L?-1:1)),head:new W(D.head.line,D.head.ch+(L?1:-1))}}function z(D,L){var O=S(D);if(!O||D.getOption("disableInput"))return M.Pass;var G=le(O,"pairs"),H=G.indexOf(L);if(H==-1)return M.Pass;for(var me=le(O,"closeBefore"),Ie=le(O,"triples"),Y=G.charAt(H+1)==L,ce=D.listSelections(),xe=H%2==0,F,ee=0;ee<ce.length;ee++){var ge=ce[ee],Z=ge.head,x,K=D.getRange(Z,W(Z.line,Z.ch+1));if(xe&&!ge.empty())x="surround";else if((Y||!xe)&&K==L)Y&&U(D,Z)?x="both":Ie.indexOf(L)>=0&&D.getRange(Z,W(Z.line,Z.ch+3))==L+L+L?x="skipThree":x="skip";else if(Y&&Z.ch>1&&Ie.indexOf(L)>=0&&D.getRange(W(Z.line,Z.ch-2),Z)==L+L){if(Z.ch>2&&/\bstring/.test(D.getTokenTypeAt(W(Z.line,Z.ch-2))))return M.Pass;x="addFour"}else if(Y){var P=Z.ch==0?" ":D.getRange(W(Z.line,Z.ch-1),Z);if(!M.isWordChar(K)&&P!=L&&!M.isWordChar(P))x="both";else return M.Pass}else if(xe&&(K.length===0||/\s/.test(K)||me.indexOf(K)>-1))x="both";else return M.Pass;if(!F)F=x;else if(F!=x)return M.Pass}var w=H%2?G.charAt(H-1):L,V=H%2?L:G.charAt(H+1);D.operation(function(){if(F=="skip")D.execCommand("goCharRight");else if(F=="skipThree")for(var se=0;se<3;se++)D.execCommand("goCharRight");else if(F=="surround"){for(var X=D.getSelections(),se=0;se<X.length;se++)X[se]=w+X[se]+V;D.replaceSelections(X,"around"),X=D.listSelections().slice();for(var se=0;se<X.length;se++)X[se]=N(X[se]);D.setSelections(X)}else F=="both"?(D.replaceSelection(w+V,null),D.triggerElectric(w+V),D.execCommand("goCharLeft")):F=="addFour"&&(D.replaceSelection(w+w+w+w,"before"),D.execCommand("goCharRight"))})}function oe(D,L){var O=D.getRange(W(L.line,L.ch-1),W(L.line,L.ch+1));return O.length==2?O:null}function U(D,L){var O=D.getTokenAt(W(L.line,L.ch+1));return/\bstring/.test(O.type)&&O.start==L.ch&&(L.ch==0||!/\bstring/.test(D.getTokenTypeAt(L)))}})},F8wB:function(ot,Be,p){ot.exports={loading:"loading___1SIOG"}},Gytx:function(ot,Be){ot.exports=function(M,we,W,le){var ae=W?W.call(le,M,we):void 0;if(ae!==void 0)return!!ae;if(M===we)return!0;if(typeof M!="object"||!M||typeof we!="object"||!we)return!1;var te=Object.keys(M),k=Object.keys(we);if(te.length!==k.length)return!1;for(var S=Object.prototype.hasOwnProperty.bind(we),C=0;C<te.length;C++){var re=te[C];if(!S(re))return!1;var N=M[re],z=we[re];if(ae=W?W.call(le,N,z,re):void 0,ae===!1||ae===void 0&&N!==z)return!1}return!0}},HmJG:function(ot,Be,p){},LdHM:function(ot,Be,p){"use strict";p.d(Be,"b",function(){return me}),p.d(Be,"a",function(){return Y});var M=p("1OyB"),we=p("vuIU"),W=p("Ji7U"),le=p("LK+K"),ae=p("q1tI"),te=p("rePB"),k=p("Ff2n"),S=p("ODXe"),C=p("4IlW"),re=p("bX4T"),N=p("YrtM"),z=p("TSYQ"),oe=p.n(z),U=p("+nKL"),D=p("8OUc"),L=function(T,Q){var J=T.prefixCls,ke=T.id,De=T.flattenOptions,de=T.childrenAsData,Le=T.values,fe=T.searchValue,be=T.multiple,I=T.defaultActiveFirstOption,B=T.height,Oe=T.itemHeight,He=T.notFoundContent,$e=T.open,Ae=T.menuItemSelectedIcon,je=T.virtual,ye=T.onSelect,Ee=T.onToggleOpen,Re=T.onActiveValue,Ue=T.onScroll,Fe=T.onMouseEnter,he="".concat(J,"-item"),_e=Object(N.a)(function(){return De},[$e,De],function(ue,g){return g[0]&&ue[1]!==g[1]}),Ye=ae.useRef(null),Je=function(g){g.preventDefault()},Ge=function(g){Ye.current&&Ye.current.scrollTo({index:g})},Ke=function(g){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,E=_e.length,d=0;d<E;d+=1){var f=(g+d*b+E)%E,h=_e[f],m=h.group,R=h.data;if(!m&&!R.disabled)return f}return-1},rt=ae.useState(function(){return Ke(0)}),Qe=Object(S.a)(rt,2),Ve=Qe[0],ie=Qe[1],nt=function(g){ie(g);var b=_e[g];if(!b){Re(null,-1);return}Re(b.data.value,g)};ae.useEffect(function(){nt(I!==!1?Ke(0):-1)},[_e.length,fe]),ae.useEffect(function(){var ue=setTimeout(function(){if(!be&&$e&&Le.size===1){var g=Array.from(Le)[0],b=_e.findIndex(function(E){var d=E.data;return d.value===g});nt(b),Ge(b)}});return function(){return clearTimeout(ue)}},[$e]);var Xe=function(g){g!==void 0&&ye(g,{selected:!Le.has(g)}),be||Ee(!1)};if(ae.useImperativeHandle(Q,function(){return{onKeyDown:function(g){var b=g.which;switch(b){case C.a.UP:case C.a.DOWN:{var E=0;if(b===C.a.UP?E=-1:b===C.a.DOWN&&(E=1),E!==0){var d=Ke(Ve+E,E);Ge(d),nt(d)}break}case C.a.ENTER:{var f=_e[Ve];f&&!f.data.disabled?Xe(f.data.value):Xe(void 0),$e&&g.preventDefault();break}case C.a.ESC:Ee(!1)}},onKeyUp:function(){},scrollTo:function(g){Ge(g)}}}),_e.length===0)return ae.createElement("div",{role:"listbox",id:"".concat(ke,"_list"),className:"".concat(he,"-empty"),onMouseDown:Je},He);function q(ue){var g=_e[ue];if(!g)return null;var b=g.data||{},E=b.value,d=b.label,f=b.children,h=Object(re.a)(b,!0),m=de?f:d;return g?ae.createElement("div",Object.assign({"aria-label":typeof m=="string"?m:null},h,{key:ue,role:"option",id:"".concat(ke,"_list_").concat(ue),"aria-selected":Le.has(E)}),E):null}return ae.createElement(ae.Fragment,null,ae.createElement("div",{role:"listbox",id:"".concat(ke,"_list"),style:{height:0,width:0,overflow:"hidden"}},q(Ve-1),q(Ve),q(Ve+1)),ae.createElement(U.a,{itemKey:"key",ref:Ye,data:_e,height:B,itemHeight:Oe,fullHeight:!1,onMouseDown:Je,onScroll:Ue,virtual:je,onMouseEnter:Fe},function(ue,g){var b,E=ue.group,d=ue.groupOption,f=ue.data,h=f.label,m=f.key;if(E)return ae.createElement("div",{className:oe()(he,"".concat(he,"-group"))},h!==void 0?h:m);var R=f.disabled,$=f.value,ve=f.title,tt=f.children,ft=f.style,at=f.className,Pt=Object(k.a)(f,["disabled","value","title","children","style","className"]),pt=Le.has($),lt="".concat(he,"-option"),Bt=oe()(he,lt,at,(b={},Object(te.a)(b,"".concat(lt,"-grouped"),d),Object(te.a)(b,"".concat(lt,"-active"),Ve===g&&!R),Object(te.a)(b,"".concat(lt,"-disabled"),R),Object(te.a)(b,"".concat(lt,"-selected"),pt),b)),bt=de?tt:h,$t=!Ae||typeof Ae=="function"||pt;return ae.createElement("div",Object.assign({},Pt,{"aria-selected":pt,className:Bt,title:ve,onMouseMove:function(){if(Ve===g||R)return;nt(g)},onClick:function(){R||Xe($)},style:ft}),ae.createElement("div",{className:"".concat(lt,"-content")},bt||$),ae.isValidElement(Ae)||pt,$t&&ae.createElement(D.a,{className:"".concat(he,"-option-state"),customizeIcon:Ae,customizeIconProps:{isSelected:pt}},pt?"\u2713":null))}))},O=ae.forwardRef(L);O.displayName="OptionList";var G=O,H=function(){return null};H.isSelectOption=!0;var me=H,Ie=function(){return null};Ie.isSelectOptGroup=!0;var Y=Ie,ce=p("VTBJ"),xe=p("Zm9Q");function F(c){var T=c.key,Q=c.props,J=Q.children,ke=Q.value,De=Object(k.a)(Q,["children","value"]);return Object(ce.a)({key:T,value:ke!==void 0?ke:T,children:J},De)}function ee(c){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(xe.a)(c).map(function(Q,J){if(!ae.isValidElement(Q)||!Q.type)return null;var ke=Q.type.isSelectOptGroup,De=Q.key,de=Q.props,Le=de.children,fe=Object(k.a)(de,["children"]);return T||!ke?F(Q):Object(ce.a)(Object(ce.a)({key:"__RC_SELECT_GRP__".concat(De===null?J:De,"__"),label:De},fe),{},{options:ee(Le)})}).filter(function(Q){return Q})}var ge=p("2Qr1"),Z=p("qNPg"),x=p("U8pU"),K=p("Kwbf"),P=p("WKfj");function w(c){var T=c.mode,Q=c.options,J=c.children,ke=c.backfill,De=c.allowClear,de=c.placeholder,Le=c.getInputElement,fe=c.showSearch,be=c.onSearch,I=c.defaultOpen,B=c.autoFocus,Oe=c.labelInValue,He=c.value,$e=c.inputValue,Ae=c.optionLabelProp,je=T==="multiple"||T==="tags",ye=fe!==void 0?fe:je||T==="combobox",Ee=Q||ee(J);if(Object(K.a)(T!=="tags"||Ee.every(function(he){return!he.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),T==="tags"||T==="combobox"){var Re=Ee.some(function(he){return he.options?he.options.some(function(_e){return typeof("value"in _e?_e.value:_e.key)=="number"}):typeof("value"in he?he.value:he.key)=="number"});Object(K.a)(!Re,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(K.a)(T!=="combobox"||!Ae,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(K.a)(T==="combobox"||!ke,"`backfill` only works with `combobox` mode."),Object(K.a)(T==="combobox"||!Le,"`getInputElement` only work with `combobox` mode."),Object(K.b)(T!=="combobox"||!Le||!De||!de,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!ye&&T!=="combobox"&&T!=="tags"&&Object(K.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(K.b)(!I||B,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),He!=null){var Ue=Object(P.d)(He);Object(K.a)(!Oe||Ue.every(function(he){return Object(x.a)(he)==="object"&&("key"in he||"value"in he)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(K.a)(!je||Array.isArray(He),"`value` should be array when `mode` is `multiple` or `tags`")}if(J){var Fe=null;Object(xe.a)(J).some(function(he){if(!ae.isValidElement(he)||!he.type)return!1;var _e=he.type;if(_e.isSelectOption)return!1;if(_e.isSelectOptGroup){var Ye=Object(xe.a)(he.props.children).every(function(Je){return!ae.isValidElement(Je)||!he.type||Je.type.isSelectOption?!0:(Fe=Je.type,!1)});return!Ye}return Fe=_e,!0}),Fe&&Object(K.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Fe.displayName||Fe.name||Fe,"`.")),Object(K.a)($e===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var V=w,se=Object(Z.a)({prefixCls:"rc-select",components:{optionList:G},convertChildrenToData:ee,flattenOptions:ge.d,getLabeledValue:ge.e,filterOptions:ge.b,isValueDisabled:ge.g,findValueOption:ge.c,warningProps:V,fillOptionsWithMissingValue:ge.a}),X=function(c){Object(W.a)(Q,c);var T=Object(le.a)(Q);function Q(){var J;return Object(M.a)(this,Q),J=T.apply(this,arguments),J.selectRef=ae.createRef(),J.focus=function(){J.selectRef.current.focus()},J.blur=function(){J.selectRef.current.blur()},J}return Object(we.a)(Q,[{key:"render",value:function(){return ae.createElement(se,Object.assign({ref:this.selectRef},this.props))}}]),Q}(ae.Component);X.Option=me,X.OptGroup=Y;var Se=X,v=Be.c=Se},M8RZ:function(ot,Be,p){"use strict";p.d(Be,"a",function(){return C});var M=p("fWQN"),we=p("mtLc"),W=p("yKVA"),le=p("879j"),ae=p("q1tI"),te=p.n(ae),k=p("i8i4"),S=p.n(k),C=function(re){Object(W.a)(z,re);var N=Object(le.a)(z);function z(oe){var U;Object(M.a)(this,z),U=N.call(this,oe);var D=window.document;return U.node=D.createElement("div"),D.body.appendChild(U.node),U}return Object(we.a)(z,[{key:"render",value:function(){var U=this.props.children;return Object(k.createPortal)(U,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),z}(te.a.Component)},OLES:function(ot,Be,p){"use strict";var M=p("U8pU"),we=p("VTBJ"),W=p("Ff2n"),le=p("q1tI"),ae=p("uciX"),te=p("7ixt"),k=function(oe){var U=oe.overlay,D=oe.prefixCls,L=oe.id,O=oe.overlayInnerStyle;return le.createElement("div",{className:"".concat(D,"-inner"),id:L,role:"tooltip",style:O},typeof U=="function"?U():U)},S=k,C=function(oe,U){var D=oe.overlayClassName,L=oe.trigger,O=L===void 0?["hover"]:L,G=oe.mouseEnterDelay,H=G===void 0?0:G,me=oe.mouseLeaveDelay,Ie=me===void 0?.1:me,Y=oe.overlayStyle,ce=oe.prefixCls,xe=ce===void 0?"rc-tooltip":ce,F=oe.children,ee=oe.onVisibleChange,ge=oe.afterVisibleChange,Z=oe.transitionName,x=oe.animation,K=oe.placement,P=K===void 0?"right":K,w=oe.align,V=w===void 0?{}:w,se=oe.destroyTooltipOnHide,X=se===void 0?!1:se,Se=oe.defaultVisible,v=oe.getTooltipContainer,c=oe.overlayInnerStyle,T=Object(W.a)(oe,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Q=Object(le.useRef)(null);Object(le.useImperativeHandle)(U,function(){return Q.current});var J=Object(we.a)({},T);"visible"in oe&&(J.popupVisible=oe.visible);var ke=function(){var be=oe.arrowContent,I=be===void 0?null:be,B=oe.overlay,Oe=oe.id;return[le.createElement("div",{className:"".concat(xe,"-arrow"),key:"arrow"},I),le.createElement(S,{key:"content",prefixCls:xe,id:Oe,overlay:B,overlayInnerStyle:c})]},De=!1,de=!1;if(typeof X=="boolean")De=X;else if(X&&Object(M.a)(X)==="object"){var Le=X.keepParent;De=Le===!0,de=Le===!1}return le.createElement(ae.a,Object.assign({popupClassName:D,prefixCls:xe,popup:ke,action:O,builtinPlacements:te.a,popupPlacement:P,ref:Q,popupAlign:V,getPopupContainer:v,onPopupVisibleChange:ee,afterPopupVisibleChange:ge,popupTransitionName:Z,popupAnimation:x,defaultPopupVisible:Se,destroyPopupOnHide:De,autoDestroy:de,mouseLeaveDelay:Ie,popupStyle:Y,mouseEnterDelay:H},J),F)},re=Object(le.forwardRef)(C),N=Be.a=re},Ot1p:function(ot,Be,p){"use strict";var M=p("2qtc"),we=p("kLXV"),W=p("rAM+"),le=p("miYZ"),ae=p("tsqr"),te=p("tJVT"),k=p("jrin"),S=p("q1tI"),C=p.n(S),re=p("VrN/"),N=p.n(re),z=p("bdgK"),oe=p("p77/"),U=p("Bd2K"),D=p("ELLl"),L=p("19Vz"),O=p("lZu9"),G=p("+NIl"),H=p("kSUc"),me=p("9Bee"),Ie=function(g){var b=g.value,E=b===void 0?"":b,d=g.className,f=g.showTextOnly,h=g.showLines,m=g.style,R=m===void 0?{}:m,$=Object(S.useMemo)(function(){return""},[E]);return C.a.createElement(C.a.Fragment,null,C.a.createElement("div",{dangerouslySetInnerHTML:{__html:$}}))},Y=p("0Owb"),ce=p("dejd"),xe=p("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 ee(g){var b=g.onActionCallback,E=g.title,d=g.icon,f=g.actionName,h=g.className,m=h===void 0?"":h,R=g.children;function $(){b(f)}return C.a.createElement("a",{title:E,className:m,onClick:$},C.a.createElement("i",{className:"md-iconfont ".concat(d)}),R)}var ge=function(g){var b=g.watch,E=g.showNullButton,d=g.onActionCallback,f=g.fullScreen,h=g.insertTemp,m=g.hidetoolBar,R=[].concat(F,[{title:"".concat(b?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(b?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return C.a.createElement("ul",{className:"markdown-toolbar-container"},!m&&R.map(function($,ve){return C.a.createElement("li",{key:ve},$.actionName?C.a.createElement(ee,Object(Y.a)({},$,{onActionCallback:d})):C.a.createElement("span",{className:"v-line"}))}),E?C.a.createElement("li",null,C.a.createElement(ee,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:d},C.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,h&&C.a.createElement("li",null,C.a.createElement(ee,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(h),onActionCallback:d},C.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),C.a.createElement("li",{className:"btn-full-screen"},C.a.createElement(ee,{icon:"".concat(f?"icon-shrink":"icon-enlarge"),title:f?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:d})))},Z=p("M8RZ"),x=p("+L6B"),K=p("2/Rp"),P=p("y8nQ"),w=p("Vl3Y"),V=p("5NDa"),se=p("5rEg"),X={labelCol:{span:4},wrapperCol:{span:20}},Se=function(g){var b=g.callback,E=g.onCancel;function d(f){b(f)}return C.a.createElement(w.a,Object(Y.a)({},X,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:d}),C.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},C.a.createElement(se.a,null)),C.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},C.a.createElement(se.a,null)),C.a.createElement("div",{className:"flex-container flex-end"},C.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),C.a.createElement(K.a,{type:"ghost",onClick:E},"\u53D6\u6D88")))},v=p("7ahc"),c=p("HmJG"),T=p("BjJ7"),Q=w.a.useForm,J={width:280,marginRight:10},ke={labelCol:{span:5},wrapperCol:{span:19}},De=function(g){var b=g.callback,E=g.onCancel,d=Q(),f=Object(te.a)(d,1),h=f[0];function m(ve){b(ve)}function R(ve,tt){h.setFieldsValue({src:"/api/attachments/".concat(ve.id),type:tt.type})}function $(ve){var tt=ve.target.files[0];Le(tt,R)}return C.a.createElement(w.a,Object(Y.a)({form:h},ke,{className:"upload-image-panel",onFinish:m}),C.a.createElement(w.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},C.a.createElement("div",{className:"flex-container"},C.a.createElement(w.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},C.a.createElement(se.a,{style:J})),C.a.createElement(de,{onFileChange:$}))),C.a.createElement(w.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},C.a.createElement(se.a,{style:{width:264}})),C.a.createElement(w.a.Item,{style:{textAlign:"right"}},C.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),C.a.createElement(K.a,{type:"ghost",onClick:E},"\u53D6\u6D88")))};function de(g){var b=g.onFileChange;return C.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",C.a.createElement("input",{type:"file",onChange:b}))}function Le(g,b){if(!g)throw new String("\u6CA1\u6709\u6587\u4EF6");var E=new FormData;E.append("editormd-image-file",g),E.append("file_param_name","editormd-image-file"),E.append("byxhr","true");var d=new window.XMLHttpRequest;d.withCredentials=!0,d.addEventListener("load",function(f){b(JSON.parse(f.target.responseText),g)},!1),d.addEventListener("error",function(f){console.error(f)},!1),d.open("POST","".concat(T.a,"/api/attachments.json")),d.send(E)}var fe=p("giR+"),be=p("fyUT"),I=p("7Kak"),B=p("9yH6"),Oe=B.a.Group,He={margin:"0 8px"},$e=function(g){var b=g.callback,E=g.onCancel;function d(f){b(f)}return C.a.createElement(w.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:d},C.a.createElement("div",{className:"flex-container"},C.a.createElement("span",{style:He},"\u5355\u5143\u683C\u6570\uFF1A"),C.a.createElement("span",{style:He},"\u884C\u6570"),C.a.createElement(w.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},C.a.createElement(be.a,null)),C.a.createElement("span",{style:He},"\u5217\u6570"),C.a.createElement(w.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},C.a.createElement(be.a,null))),C.a.createElement("div",{className:"flex-container",style:{marginTop:12}},C.a.createElement("span",{style:He},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),C.a.createElement(w.a.Item,{name:"align"},C.a.createElement(Oe,null,C.a.createElement(B.a,{value:"default"},C.a.createElement("i",{className:"fa fa-align-justify"})),C.a.createElement(B.a,{value:"left"},C.a.createElement("i",{className:"fa fa-align-left"})),C.a.createElement(B.a,{value:"center"},C.a.createElement("i",{className:"fa fa-align-center"})),C.a.createElement(B.a,{value:"right"},C.a.createElement("i",{className:"fa fa-align-right"}))))),C.a.createElement("div",{className:"flex-container flex-end"},C.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),C.a.createElement(K.a,{type:"ghost",onClick:E},"\u53D6\u6D88")))},Ae=p("m3rI"),je="link",ye="upload-image",Ee="code-block",Re="add-table",Ue="------------",Fe={default:Ue,left:":".concat(Ue),center:":".concat(Ue,":"),right:"".concat(Ue,":")},he=p("9VGf"),_e,Ye;function Je(){}var Ge=0,Ke=1e4,rt="\u2581",Qe=`
|
|
**\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 Ve(g){return/^\d+$/.test(g)?"".concat(g,"px"):g}var ie=navigator.platform.toUpperCase().indexOf("MAC")>=0,nt=ie?"Cmd":"Ctrl",Xe=(_e={},Object(k.a)(_e,nt+"-B","bold"),Object(k.a)(_e,nt+"-I","italic"),_e),q=(Ye={},Object(k.a)(Ye,je,"\u6DFB\u52A0\u94FE\u63A5"),Object(k.a)(Ye,Ee,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(k.a)(Ye,ye,"\u6DFB\u52A0\u56FE\u7247"),Object(k.a)(Ye,Re,"\u6DFB\u52A0\u8868\u683C"),Ye),ue=Be.a=function(g){var b=g.defaultValue,E=b===void 0?"":b,d=g.onChange,f=g.width,h=f===void 0?"100%":f,m=g.height,R=m===void 0?400:m,$=g.miniToolbar,ve=$===void 0?!1:$,tt=g.isFocus,ft=tt===void 0?!1:tt,at=g.watch,Pt=g.insertTemp,pt=g.mode,lt=pt===void 0?"markdown":pt,Bt=g.id,bt=Bt===void 0?"markdown-editor-id":Bt,$t=g.showResizeBar,Wt=$t===void 0?!1:$t,mt=g.noStorage,_n=mt===void 0?!1:mt,Gn=g.showNullButton,un=Gn===void 0?!1:Gn,Cn=g.hidetoolBar,pn=Cn===void 0?!1:Cn,bi=g.fullScreen,cn=bi===void 0?!1:bi,Vn=g.onBlur,dr=g.onCMBeforeChange,St=g.onFullScreen,Ze=g.className,Sn=Ze===void 0?"":Ze,fr=g.disablePaste,dn=fr===void 0?!1:fr,gt=g.placeholder,kn=gt===void 0?"":gt,An=g.values,$n=An===void 0?"":An,Ce=Object(S.useState)(null),ut=Object(te.a)(Ce,2),Me=ut[0],jr=ut[1],hr=Object(S.useState)(E),Yn=Object(te.a)(hr,2),Jn=Yn[0],st=Yn[1],Zi=Object(S.useState)(at),Ur=Object(te.a)(Zi,2),fn=Ur[0],on=Ur[1],yi=Object(S.useState)(cn),Fr=Object(te.a)(yi,2),nn=Fr[0],pr=Fr[1],xi=Object(S.useState)(""),mr=Object(te.a)(xi,2),Tn=mr[0],On=mr[1],wi=Object(S.useState)(0),Br=Object(te.a)(wi,2),Zn=Br[0],Wr=Br[1],Ei=Object(S.useState)(R),hn=Object(te.a)(Ei,2),_i=hn[0],Ci=hn[1],gr=Object(S.useState)(!1),Rn=Object(te.a)(gr,2),ja=Rn[0],zr=Rn[1],Qn=Object(S.useRef)(),Hr=Object(S.useRef)(),Pn=Object(S.useRef)(),qn=Object(S.useRef)();Object(S.useEffect)(function(){st($n),Me==null||Me.setValue($n)},[$n]),Object(S.useEffect)(function(){St==null||St(nn)},[nn]),Object(S.useEffect)(function(){if(Qn.current){var qe=N.a.fromTextArea(Qn.current,{mode:lt,lineNumbers:!ve,lineWrapping:!0,value:E,autoCloseTags:!0,autoCloseBrackets:!0});ft&&qe.focus();function ct(dt,xt){if(dn){xt.preventDefault();return}var wt=xt.clipboardData;if(wt){var _t=wt.types.toString(),Mt=wt.items,kt=["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(_t==="Files"||wt.types.indexOf("Files")>-1){if(xt.preventDefault(),lt=="stex")return;try{var Kt,mn=Mt[1];((Kt=Mt[0])===null||Kt===void 0?void 0:Kt.kind)==="file"&&(mn=Mt[0]);var Ct=mn.getAsFile(),Nn=Ct.name.split(".").pop();Le(Ct,function(Xt){if(Xt.id){var In,jn,br;(Ct==null||((In=Ct.type)===null||In===void 0)?void 0:In.indexOf("image"))>-1?qe.replaceSelection(".concat(Xt.content_type,")")):(Ct==null||((jn=Ct.type)===null||jn===void 0)?void 0:jn.indexOf("video"))>-1?qe.replaceSelection('<video width="100%" controls src="'.concat(Ae.a.API_SERVER,"/api/attachments/").concat(Xt.id,'"></video>')):(Ct==null||((br=Ct.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?qe.replaceSelection('<a href="'.concat(Ae.a.API_SERVER,"/api/attachments/").concat(Xt.id,"?type=").concat(Ct.type,'&disposition=inline" target="_blank">').concat(Ct.name,"</a>")):kt.includes(Nn)?qe.replaceSelection('<a href="'.concat(Ae.a.API_SERVER,"/api/attachments/").concat(Xt.id,'?type=office&disposition=inline" target="_blank">').concat(Ct.name,"</a>")):qe.replaceSelection("[".concat(Ct.name,"](").concat(Ae.a.API_SERVER,"/api/attachments/").concat(Xt.id,"?type=").concat(Xt.content_type,")"))}else(Xt==null?void 0:Xt.status)===401&&(document.location.href="/user/login")})}catch(Xt){ae.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return qe.on("paste",ct),jr(qe),function(){qe.off("paste",ct)}}},[]);var Si=Object(S.useCallback)(function(){if(Hr.current)try{}catch(qe){console.log(qe,"---- to set md editor body height")}},[_i,Hr,nn]);Object(S.useEffect)(function(){function qe(){var dt=new z.default(function(xt){var wt=Object(W.a)(xt),_t;try{for(wt.s();!(_t=wt.n()).done;){var Mt=_t.value;(Mt.target.offsetHeight>0||Mt.target.offsetWidth>0)&&(Si(),Me.setSize("100%","100%"),Me.refresh())}}catch(kt){wt.e(kt)}finally{wt.f()}});return dt.observe(Qn.current.parentElement),dt}if(Me){var ct=qe();return function(){ct.unobserve(Qn.current.parentElement)}}},[Me,Si]),Object(S.useEffect)(function(){if(Me){for(var qe=[],ct=function(){var Mt=xt[dt];wt=Object(te.a)(Mt,2);var kt=wt[0],Kt=wt[1],mn=Object(k.a)({},kt,function(){Kr(Kt)});qe.push(mn),Me.addKeyMap(mn)},dt=0,xt=Object.entries(Xe);dt<xt.length;dt++){var wt;ct()}return function(){var _t=Object(W.a)(qe),Mt;try{for(_t.s();!(Mt=_t.n()).done;){var kt=Mt.value;Me.removeKeyMap(kt)}}catch(Kt){_t.e(Kt)}finally{_t.f()}}}},[Me]),Object(S.useEffect)(function(){cn!==nn&&pr(cn)},[cn]),Object(he.a)(function(){if(!_n&&Zn>0){var qe=new Date().getTime(),ct=window.sessionStorage.getItem(bt);qe>=Zn+Ke&&(!ct||ct!==Jn)&&(window.sessionStorage.setItem(bt,Jn),zr(!0))}},Ke),Object(S.useEffect)(function(){on(at)},[Me,at]),Object(S.useEffect)(function(){Me&&(ft&&Me.focus())},[Me,ft]),Object(S.useEffect)(function(){if(fn&&Me){var qe=Me.getScrollerElement();function ct(dt){var xt=dt.target;if(qn.current){var wt=xt.scrollTop/xt.scrollHeight;qn.current.scrollTop=qn.current.scrollHeight*wt}}return qe.addEventListener("scroll",ct),function(){qe.removeEventListener("scroll",ct)}}},[Me,fn]),Object(S.useEffect)(function(){if(Me&&dr){function qe(ct,dt){dr(ct,dt)}return Me.on("beforeChange",qe),function(){Me.off("beforeChange",qe)}}},[Me,dr]),Object(S.useEffect)(function(){if(Me&&Vn){function qe(){Vn(Me.getValue())}return Me.on("blur",qe),function(){Me.off("blur",qe)}}},[Me,Vn]),Object(S.useEffect)(function(){if(Me){function qe(ct){var dt=ct.getValue();st(dt),Wr(new Date().getTime()),ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),d&&d(dt)}return Me.on("change",qe),function(){Me.off("change",qe)}}},[Me,d]),Object(S.useEffect)(function(){Me&&(E==null?(Me.setValue(""),st("")):E!==Me.getValue()&&(Me.setValue(E),st(E),Me.setCursor(Me.lineCount(),0)))},[Me,E]);var Kr=Object(S.useCallback)(function(qe){var ct=Me.getCursor(),dt=Me.getSelection(),xt=dt.split(`
|
|
`);switch(qe){case"bold":return Me.replaceSelection("**"+dt+"**"),dt===""&&Me.setCursor(ct.line,ct.ch+2),Me.focus();case"italic":return Me.replaceSelection("*"+dt+"*"),dt===""&&Me.setCursor(ct.line,ct.ch+1),Me.focus();case"code":return Me.replaceSelection("`"+dt+"`"),dt===""&&Me.setCursor(ct.line,ct.ch+1),Me.focus();case"inline-latex":return Me.replaceSelection("`$$"+dt+"$$`"),dt===""&&Me.setCursor(ct.line,ct.ch+3),Me.focus();case"latex":return Me.replaceSelection("```latex\n"+dt+"\n```"),Me.setCursor(ct.line+1,dt.length+1),Me.focus();case"line-break":return Me.replaceSelection(`<br/>
|
|
`),Me.focus();case"list-ul":return dt===""?Me.replaceSelection("- "+dt):Me.replaceSelection(xt.map(function(wt){return wt===""?"":"- ".concat(wt)}).join(`
|
|
`)),Me.focus();case"list-ol":return dt===""?Me.replaceSelection("1. "+dt):Me.replaceSelection(xt.map(function(wt,_t){return wt===""?"":"".concat(_t+1,". ").concat(wt)}).join(`
|
|
`)),Me.focus();case"add-null-ch":return dt===""&&Me.setCursor(ct.line,ct.ch+1),Me.replaceSelection(rt),Me.focus();case"inster-template-1":return dt===""&&Me.setCursor(ct.line,ct.ch),Me.replaceSelection(Qe),Me.focus();case"eraser":return Me.setValue(""),Me.focus();case"trigger-watch":return on(!fn),Me.focus();case"trigger-full-screen":return pr(!nn),Me.focus();case je:On(je);return;case Ee:On(Ee);return;case ye:On(ye);return;case Re:On(Re);return;default:throw new Error}},[Me,fn,nn]),er=Object(S.useCallback)(function(qe){On("");switch(Tn){case je:var ct=qe.title,dt=qe.link;return Me.replaceSelection("[".concat(ct,"](").concat(dt,")")),Me.focus();case Ee:var xt=qe.language,wt=qe.content;return Me.replaceSelection(["```"+xt,wt,"```"].join(`
|
|
`)),Me.focus();case ye:var _t=qe.src,Mt=qe.alt;return Me.replaceSelection(".concat(_t,' "').concat(Mt,'" )')),Me.focus();case Re:for(var kt=qe.row,Kt=qe.col,mn=qe.align,Ct=`
|
|
`,Nn=0;Nn<kt;Nn++){for(var Xt=[],In=[],jn=0;jn<Kt;jn++)Nn===1&&In.push(Fe[mn]),Xt.push(" ");Nn===1&&(Ct+="| ".concat(In.join(" | "),` |
|
|
`)),Ct+="| ".concat(Xt.join(Kt===1?"":" | "),` |
|
|
`)}return Me.replaceSelection(Ct+`
|
|
`),Me.focus();default:throw new Error}},[Me,Tn]),vr=Object(S.useMemo)(function(){switch(Tn){case je:return C.a.createElement(Se,{callback:er,onCancel:yn});case Ee:return C.a.createElement(v.b,{callback:er,onCancel:yn});case ye:return C.a.createElement(De,{callback:er,onCancel:yn});case Re:return C.a.createElement($e,{callback:er,onCancel:yn});default:return null}},[Tn]);function yn(){On("")}Object(S.useEffect)(function(){if(Pn.current){var qe=Pn.current,ct=!1,dt=0;function xt(Mt){ct=!0,dt=Mt.pageY}function wt(){ct=!1}function _t(Mt){if(ct){var kt=Mt.pageY-dt;kt<0&&(kt=0),kt>300&&(kt=300);var Kt=R+kt+"px";Ci(Kt)}}return qe.addEventListener("mousedown",xt),document.addEventListener("mousemove",_t),document.addEventListener("mouseup",wt),function(){qe.removeEventListener("mousedown",xt),document.removeEventListener("mousemove",_t),document.removeEventListener("mouseup",wt)}}},[Me,Pn]),Object(S.useEffect)(function(){Ci(R)},[R]);var Xr=Ve(h),ki=Ve(_i),Ti={width:Xr,height:ki},Gr=Object(S.useMemo)(function(){if(Zn){var qe=new Date(Zn),ct=qe.getHours(),dt=qe.getMinutes(),xt=qe.getSeconds();return ct=ct<10?"0"+ct:ct,dt=dt<10?"0"+dt:dt,xt=xt<10?"0"+xt:xt,"".concat(ct,":").concat(dt,":").concat(xt)}return 0},[Zn]);function Ua(){window.sessionStorage.removeItem(bt),zr(!1),Wr(0)}function Qi(){zr(!1),Wr(0),Me.setValue(window.sessionStorage.getItem(bt))}return C.a.createElement(S.Fragment,null,C.a.createElement("div",{className:"markdown-editor-wrapper",ref:Hr},C.a.createElement("div",{className:"markdown-editor-container ".concat(Sn," ").concat(fn?"on-preview":""," ").concat(ve?"mini":""," ").concat(nn?"full-screen":""),style:Ti},C.a.createElement(ge,{insertTemp:Pt,watch:fn,fullScreen:nn,showNullButton:un,onActionCallback:Kr,hidetoolBar:pn}),C.a.createElement("div",{className:"markdown-editor-body"},C.a.createElement("div",{className:"codemirror-container"},C.a.createElement("textarea",{ref:Qn,placeholder:kn})),fn?C.a.createElement("div",{ref:qn,className:"preview-container"},lt==="stex"&&C.a.createElement(Ie,{value:Jn}),lt!=="stex"&&C.a.createElement(me.a,{value:Jn})):null))),Wt?C.a.createElement("a",{ref:Pn,className:"editor-resize"}):null,C.a.createElement(Z.a,null,q[Tn]?C.a.createElement(we.a,{centered:!0,title:q[Tn],visible:!0,onCancel:yn,footer:null},vr):null))}},SJMd:function(ot,Be){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var p,M,we,W=!1,le,ae;window.PR_SHOULD_USE_CONTINUATION=!0;var te,k;(function(){var S=window,C=["break,continue,do,else,for,if,return,while"],re=[C,"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"],N=[re,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],z=[N,"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"],oe=[N,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],U=[N,"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"],D="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",L=[N,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],O="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",G=[C,"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=[C,"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"],me=[C,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Ie=[z,U,oe,L,O,G,H,me],Y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,ce="str",xe="kwd",F="com",ee="typ",ge="lit",Z="pun",x="pln",K="tag",P="dec",w="src",V="atn",se="atv",X="nocode",Se="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function v(ye){for(var Ee=0,Re=!1,Ue=!1,Fe=0,he=ye.length;Fe<he;++Fe){var _e=ye[Fe];if(_e.ignoreCase)Ue=!0;else if(/[a-z]/i.test(_e.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Re=!0,Ue=!1;break}}var Ye={b:8,t:9,n:10,v:11,f:12,r:13};function Je(Ve){var ie=Ve.charCodeAt(0);if(ie!==92)return ie;var nt=Ve.charAt(1);return ie=Ye[nt],ie||("0"<=nt&&nt<="7"?parseInt(Ve.substring(1),8):nt==="u"||nt==="x"?parseInt(Ve.substring(2),16):Ve.charCodeAt(1))}function Ge(Ve){if(Ve<32)return(Ve<16?"\\x0":"\\x")+Ve.toString(16);var ie=String.fromCharCode(Ve);return ie==="\\"||ie==="-"||ie==="]"||ie==="^"?"\\"+ie:ie}function Ke(Ve){var ie=Ve.substring(1,Ve.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")),nt=[],Xe=ie[0]==="^",q=["["];Xe&&q.push("^");for(var ue=Xe?1:0,g=ie.length;ue<g;++ue){var b=ie[ue];if(/\\[bdsw]/i.test(b))q.push(b);else{var E=Je(b),d;ue+2<g&&ie[ue+1]==="-"?(d=Je(ie[ue+2]),ue+=2):d=E,nt.push([E,d]),d<65||E>122||(d<65||E>90||nt.push([Math.max(65,E)|32,Math.min(d,90)|32]),d<97||E>122||nt.push([Math.max(97,E)&~32,Math.min(d,122)&~32]))}}nt.sort(function(R,$){return R[0]-$[0]||$[1]-R[1]});for(var f=[],h=[],ue=0;ue<nt.length;++ue){var m=nt[ue];m[0]<=h[1]+1?h[1]=Math.max(h[1],m[1]):f.push(h=m)}for(var ue=0;ue<f.length;++ue){var m=f[ue];q.push(Ge(m[0])),m[1]>m[0]&&(m[1]+1>m[0]&&q.push("-"),q.push(Ge(m[1])))}return q.push("]"),q.join("")}function rt(Ve){for(var ie=Ve.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")),nt=ie.length,Xe=[],q=0,ue=0;q<nt;++q){var g=ie[q];if(g==="(")++ue;else if(g.charAt(0)==="\\"){var b=+g.substring(1);b&&(b<=ue?Xe[b]=-1:ie[q]=Ge(b))}}for(var q=1;q<Xe.length;++q)Xe[q]===-1&&(Xe[q]=++Ee);for(var q=0,ue=0;q<nt;++q){var g=ie[q];if(g==="(")++ue,Xe[ue]||(ie[q]="(?:");else if(g.charAt(0)==="\\"){var b=+g.substring(1);b&&b<=ue&&(ie[q]="\\"+Xe[b])}}for(var q=0;q<nt;++q)ie[q]==="^"&&ie[q+1]!=="^"&&(ie[q]="");if(Ve.ignoreCase&&Re)for(var q=0;q<nt;++q){var g=ie[q],E=g.charAt(0);g.length>=2&&E==="["?ie[q]=Ke(g):E!=="\\"&&(ie[q]=g.replace(/[a-zA-Z]/g,function(h){var m=h.charCodeAt(0);return"["+String.fromCharCode(m&~32,m|32)+"]"}))}return ie.join("")}for(var Qe=[],Fe=0,he=ye.length;Fe<he;++Fe){var _e=ye[Fe];if(_e.global||_e.multiline)throw new Error(""+_e);Qe.push("(?:"+rt(_e)+")")}return new RegExp(Qe.join("|"),Ue?"gi":"g")}function c(ye,Ee){var Re=/(?:^|\s)nocode(?:\s|$)/,Ue=[],Fe=0,he=[],_e=0;function Ye(Je){var Ge=Je.nodeType;if(Ge==1){if(Re.test(Je.className))return;for(var Ke=Je.firstChild;Ke;Ke=Ke.nextSibling)Ye(Ke);var rt=Je.nodeName.toLowerCase();(rt==="br"||rt==="li")&&(Ue[_e]=`
|
|
`,he[_e<<1]=Fe++,he[_e++<<1|1]=Je)}else if(Ge==3||Ge==4){var Qe=Je.nodeValue;Qe.length&&(Ee?Qe=Qe.replace(/\r\n?/g,`
|
|
`):Qe=Qe.replace(/[ \t\r\n]+/g," "),Ue[_e]=Qe,he[_e<<1]=Fe,Fe+=Qe.length,he[_e++<<1|1]=Je)}}return Ye(ye),{sourceCode:Ue.join("").replace(/\n$/,""),spans:he}}function T(ye,Ee,Re,Ue,Fe){if(!Re)return;var he={sourceNode:ye,pre:1,langExtension:null,numberLines:null,sourceCode:Re,spans:null,basePos:Ee,decorations:null};Ue(he),Fe.push.apply(Fe,he.decorations)}var Q=/\S/;function J(ye){for(var Ee=void 0,Re=ye.firstChild;Re;Re=Re.nextSibling){var Ue=Re.nodeType;Ee=Ue===1?Ee?ye:Re:Ue===3&&Q.test(Re.nodeValue)?ye:Ee}return Ee===ye?void 0:Ee}function ke(ye,Ee){var Re={},Ue;(function(){for(var _e=ye.concat(Ee),Ye=[],Je={},Ge=0,Ke=_e.length;Ge<Ke;++Ge){var rt=_e[Ge],Qe=rt[3];if(Qe)for(var Ve=Qe.length;--Ve>=0;)Re[Qe.charAt(Ve)]=rt;var ie=rt[1],nt=""+ie;Je.hasOwnProperty(nt)||(Ye.push(ie),Je[nt]=null)}Ye.push(/[\0-\uffff]/),Ue=v(Ye)})();var Fe=Ee.length,he=function(_e){for(var Ye=_e.sourceCode,Je=_e.basePos,Ge=_e.sourceNode,Ke=[Je,x],rt=0,Qe=Ye.match(Ue)||[],Ve={},ie=0,nt=Qe.length;ie<nt;++ie){var Xe=Qe[ie],q=Ve[Xe],ue=void 0,g;if(typeof q=="string")g=!1;else{var b=Re[Xe.charAt(0)];if(b)ue=Xe.match(b[1]),q=b[0];else{for(var E=0;E<Fe;++E)if(b=Ee[E],ue=Xe.match(b[1]),ue){q=b[0];break}ue||(q=x)}g=q.length>=5&&q.substring(0,5)==="lang-",g&&!(ue&&typeof ue[1]=="string")&&(g=!1,q=w),g||(Ve[Xe]=q)}var d=rt;if(rt+=Xe.length,!g)Ke.push(Je+d,q);else{var f=ue[1],h=Xe.indexOf(f),m=h+f.length;ue[2]&&(m=Xe.length-ue[2].length,h=m-f.length);var R=q.substring(5);T(Ge,Je+d,Xe.substring(0,h),he,Ke),T(Ge,Je+d+h,f,B(R,f),Ke),T(Ge,Je+d+m,Xe.substring(m),he,Ke)}}_e.decorations=Ke};return he}function De(ye){var Ee=[],Re=[];ye.tripleQuotedStrings?Ee.push([ce,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ye.multiLineStrings?Ee.push([ce,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ee.push([ce,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ye.verbatimStrings&&Re.push([ce,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ue=ye.hashComments;Ue&&(ye.cStyleComments?(Ue>1?Ee.push([F,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ee.push([F,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Re.push([ce,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ee.push([F,/^#[^\r\n]*/,null,"#"])),ye.cStyleComments&&(Re.push([F,/^\/\/[^\r\n]*/,null]),Re.push([F,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Fe=ye.regexLiterals;if(Fe){var he=Fe>1?"":`
|
|
\r`,_e=he?".":"[\\S\\s]",Ye="/(?=[^/*"+he+"])(?:[^/\\x5B\\x5C"+he+"]|\\x5C"+_e+"|\\x5B(?:[^\\x5C\\x5D"+he+"]|\\x5C"+_e+")*(?:\\x5D|$))+/";Re.push(["lang-regex",RegExp("^"+Se+"("+Ye+")")])}var Je=ye.types;Je&&Re.push([ee,Je]);var Ge=(""+ye.keywords).replace(/^ | $/g,"");Ge.length&&Re.push([xe,new RegExp("^(?:"+Ge.replace(/[\s,]+/g,"|")+")\\b"),null]),Ee.push([x,/^\s+/,null,` \r
|
|
\xA0`]);var Ke="^.[^\\s\\w.$@'\"`/\\\\]*";return ye.regexLiterals&&(Ke+="(?!s*/)"),Re.push([ge,/^@[a-z_$][a-z_$@0-9]*/i,null],[ee,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[x,/^[a-z_$][a-z_$@0-9]*/i,null],[ge,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[x,/^\\[\s\S]?/,null],[Z,new RegExp(Ke),null]),ke(Ee,Re)}var de=De({keywords:Ie,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Le(ye,Ee,Re){for(var Ue=/(?:^|\s)nocode(?:\s|$)/,Fe=/\r\n?|\n/,he=ye.ownerDocument,_e=he.createElement("li");ye.firstChild;)_e.appendChild(ye.firstChild);var Ye=[_e];function Je(ie){var nt=ie.nodeType;if(nt==1&&!Ue.test(ie.className))if(ie.nodeName==="br")Ge(ie),ie.parentNode&&ie.parentNode.removeChild(ie);else for(var Xe=ie.firstChild;Xe;Xe=Xe.nextSibling)Je(Xe);else if((nt==3||nt==4)&&Re){var q=ie.nodeValue,ue=q.match(Fe);if(ue){var g=q.substring(0,ue.index);ie.nodeValue=g;var b=q.substring(ue.index+ue[0].length);if(b){var E=ie.parentNode;E.insertBefore(he.createTextNode(b),ie.nextSibling)}Ge(ie),g||ie.parentNode.removeChild(ie)}}}function Ge(ie){for(;!ie.nextSibling;)if(ie=ie.parentNode,!ie)return;function nt(ue,g){var b=g?ue.cloneNode(!1):ue,E=ue.parentNode;if(E){var d=nt(E,1),f=ue.nextSibling;d.appendChild(b);for(var h=f;h;h=f)f=h.nextSibling,d.appendChild(h)}return b}for(var Xe=nt(ie.nextSibling,0),q;(q=Xe.parentNode)&&q.nodeType===1;)Xe=q;Ye.push(Xe)}for(var Ke=0;Ke<Ye.length;++Ke)Je(Ye[Ke]);Ee===(Ee|0)&&Ye[0].setAttribute("value",Ee);var rt=he.createElement("ol");rt.className="linenums";for(var Qe=Math.max(0,Ee-1|0)||0,Ke=0,Ve=Ye.length;Ke<Ve;++Ke)_e=Ye[Ke],_e.className="L"+(Ke+Qe)%10,_e.firstChild||_e.appendChild(he.createTextNode("\xA0")),rt.appendChild(_e);ye.appendChild(rt)}function fe(ye){var Ee=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ee=Ee&&+Ee[1]<=8;var Re=/\n/g,Ue=ye.sourceCode,Fe=Ue.length,he=0,_e=ye.spans,Ye=_e.length,Je=0,Ge=ye.decorations,Ke=Ge.length,rt=0;Ge[Ke]=Fe;var Qe,Ve;for(Ve=Qe=0;Ve<Ke;)Ge[Ve]!==Ge[Ve+2]?(Ge[Qe++]=Ge[Ve++],Ge[Qe++]=Ge[Ve++]):Ve+=2;for(Ke=Qe,Ve=Qe=0;Ve<Ke;){for(var ie=Ge[Ve],nt=Ge[Ve+1],Xe=Ve+2;Xe+2<=Ke&&Ge[Xe+1]===nt;)Xe+=2;Ge[Qe++]=ie,Ge[Qe++]=nt,Ve=Xe}Ke=Ge.length=Qe;var q=ye.sourceNode,ue="";q&&(ue=q.style.display,q.style.display="none");try{for(var g=null;Je<Ye;){var b=_e[Je],E=_e[Je+2]||Fe,d=Ge[rt+2]||Fe,Xe=Math.min(E,d),f=_e[Je+1],h;if(f.nodeType!==1&&(h=Ue.substring(he,Xe))){Ee&&(h=h.replace(Re,"\r")),f.nodeValue=h;var m=f.ownerDocument,R=m.createElement("span");R.className=Ge[rt+1];var $=f.parentNode;$.replaceChild(R,f),R.appendChild(f),he<E&&(_e[Je+1]=f=m.createTextNode(Ue.substring(Xe,E)),$.insertBefore(f,R.nextSibling))}he=Xe,he>=E&&(Je+=2),he>=d&&(rt+=2)}}finally{q&&(q.style.display=ue)}}var be={};function I(ye,Ee){for(var Re=Ee.length;--Re>=0;){var Ue=Ee[Re];be.hasOwnProperty(Ue)?S.console&&console.warn("cannot override language handler %s",Ue):be[Ue]=ye}}function B(ye,Ee){return ye&&be.hasOwnProperty(ye)||(ye=/^\s*</.test(Ee)?"default-markup":"default-code"),be[ye]}I(de,["default-code"]),I(ke([],[[x,/^[^<?]+/],[P,/^<!\w[^>]*(?:>|$)/],[F,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Z,/^(?:<[%?]|[%?]>)/],["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(ke([[x,/^[\s]+/,null,` \r
|
|
`],[se,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[K,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[V,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Z,/^[=<>\/]+/],["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(ke([],[[se,/^[\s\S]+/]]),["uq.val"]),I(De({keywords:z,hashComments:!0,cStyleComments:!0,types:Y}),["c","cc","cpp","cxx","cyc","m"]),I(De({keywords:"null,true,false"}),["json"]),I(De({keywords:U,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Y}),["cs"]),I(De({keywords:oe,cStyleComments:!0}),["java"]),I(De({keywords:me,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),I(De({keywords:G,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),I(De({keywords:O,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),I(De({keywords:H,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),I(De({keywords:L,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),I(De({keywords:D,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),I(ke([],[[ce,/^[\s\S]+/]]),["regex"]);function Oe(ye){var Ee=ye.langExtension;try{var Re=c(ye.sourceNode,ye.pre),Ue=Re.sourceCode;ye.sourceCode=Ue,ye.spans=Re.spans,ye.basePos=0,B(Ee,Ue)(ye),fe(ye)}catch(Fe){S.console&&console.log(Fe&&Fe.stack||Fe)}}function He(ye,Ee,Re){var Ue=Re||!1,Fe=Ee||null,he=document.createElement("div");he.innerHTML="<pre>"+ye+"</pre>",he=he.firstChild,Ue&&Le(he,Ue,!0);var _e={langExtension:Fe,numberLines:Ue,sourceNode:he,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Oe(_e),he.innerHTML}function $e(ye,Ee){var Re=Ee||document.body,Ue=Re.ownerDocument||document;function Fe(b){return Re.getElementsByTagName(b)}for(var he=[Fe("pre"),Fe("code"),Fe("xmp")],_e=[],Ye=0;Ye<he.length;++Ye)for(var Je=0,Ge=he[Ye].length;Je<Ge;++Je)_e.push(he[Ye][Je]);he=null;var Ke=Date;Ke.now||(Ke={now:function(){return+new Date}});var rt=0,Qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ve=/\bprettyprint\b/,ie=/\bprettyprinted\b/,nt=/pre|xmp/i,Xe=/^code$/i,q=/^(?:pre|code|xmp)$/i,ue={};function g(){for(var b=S.PR_SHOULD_USE_CONTINUATION?Ke.now()+250:Infinity;rt<_e.length&&Ke.now()<b;rt++){for(var E=_e[rt],d=ue,f=E;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){d={},m.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Wt,mt,_n){d[mt]=_n});break}}var R=E.className;if((d!==ue||Ve.test(R))&&!ie.test(R)){for(var $=!1,ve=E.parentNode;ve;ve=ve.parentNode){var tt=ve.tagName;if(q.test(tt)&&ve.className&&Ve.test(ve.className)){$=!0;break}}if(!$){E.className+=" prettyprinted";var ft=d.lang;if(!ft){ft=R.match(Qe);var at;!ft&&(at=J(E))&&Xe.test(at.tagName)&&(ft=at.className.match(Qe)),ft&&(ft=ft[1])}var Pt;if(nt.test(E.tagName))Pt=1;else{var pt=E.currentStyle,lt=Ue.defaultView,Bt=pt?pt.whiteSpace:lt&<.getComputedStyle?lt.getComputedStyle(E,null).getPropertyValue("white-space"):0;Pt=Bt&&Bt.substring(0,3)==="pre"}var bt=d.linenums;(bt=bt==="true"||+bt)||(bt=R.match(/\blinenums\b(?::(\d+))?/),bt=bt?bt[1]&&bt[1].length?+bt[1]:!0:!1),bt&&Le(E,bt,Pt);var $t={langExtension:ft,sourceNode:E,numberLines:bt,pre:Pt,sourceCode:null,basePos:null,spans:null,decorations:null};Oe($t)}}}rt<_e.length?S.setTimeout(g,250):typeof ye=="function"&&ye()}g()}var Ae=S.PR={createSimpleLexer:ke,registerLangHandler:I,sourceDecorator:De,PR_ATTRIB_NAME:V,PR_ATTRIB_VALUE:se,PR_COMMENT:F,PR_DECLARATION:P,PR_KEYWORD:xe,PR_LITERAL:ge,PR_NOCODE:X,PR_PLAIN:x,PR_PUNCTUATION:Z,PR_SOURCE:w,PR_STRING:ce,PR_TAG:K,PR_TYPE:ee,prettyPrintOne:W?S.prettyPrintOne=He:te=He,prettyPrint:k=W?S.prettyPrint=$e:k=$e},je=S.define;typeof je=="function"&&je.amd&&je("google-code-prettify",[],function(){return Ae})})()},UUDw:function(ot,Be,p){ot.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},UqFu:function(ot,Be,p){"use strict";p.d(Be,"a",function(){return M});var M=function(W){var le=document.createElement("textarea");return le.value=W,le.value}},"VrN/":function(ot,Be,p){(function(M,we){ot.exports=we()})(this,function(){"use strict";var M=navigator.userAgent,we=navigator.platform,W=/gecko\/\d/i.test(M),le=/MSIE \d/.test(M),ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(M),te=/Edge\/(\d+)/.exec(M),k=le||ae||te,S=k&&(le?document.documentMode||6:+(te||ae)[1]),C=!te&&/WebKit\//.test(M),re=C&&/Qt\/\d+\.\d+/.test(M),N=!te&&/Chrome\//.test(M),z=/Opera\//.test(M),oe=/Apple Computer/.test(navigator.vendor),U=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(M),D=/PhantomJS/.test(M),L=!te&&/AppleWebKit/.test(M)&&/Mobile\/\w+/.test(M),O=/Android/.test(M),G=L||O||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(M),H=L||/Mac/.test(we),me=/\bCrOS\b/.test(M),Ie=/win/i.test(we),Y=z&&M.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(z=!1,C=!0);var ce=H&&(re||z&&(Y==null||Y<12.11)),xe=W||k&&S>=9;function F(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ee=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 ge(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Z(e,t){return ge(e).appendChild(t)}function x(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 K(e,t,r,n){var i=x(e,t,r,n);return i.setAttribute("role","presentation"),i}var P;document.createRange?P=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:P=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 w(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 se(e,t){var r=e.className;F(t).test(r)||(e.className+=(r?" ":"")+t)}function X(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 Se=function(e){e.select()};L?Se=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:k&&(Se=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 c(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 T(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 Q=function(){this.id=null,this.f=null,this.time=0,this.handler=v(this.onTimeout,this)};Q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Q.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 J(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ke=50,De={toString:function(){return"CodeMirror.Pass"}},de={scroll:!1},Le={origin:"*mouse"},fe={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 B(e){for(;I.length<=e;)I.push(Oe(I)+" ");return I[e]}function Oe(e){return e[e.length-1]}function He(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function $e(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function Ae(){}function je(e,t){var r;return Object.create?r=Object.create(e):(Ae.prototype=e,r=new Ae),t&&c(t,r),r}var ye=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ee(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ye.test(e))}function Re(e,t){return t?t.source.indexOf("\\w")>-1&&Ee(e)?!0:t.test(e):Ee(e)}function Ue(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Fe=/[\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 he(e){return e.charCodeAt(0)>=768&&Fe.test(e)}function _e(e,t,r){for(;(r<0?t>0:t<e.length)&&he(e.charAt(t));)t+=r;return t}function Ye(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 Je(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 Ge=null;function Ke(e,t,r){var n;Ge=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:Ge=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:Ge=i)}return n!=null?n:Ge}var rt=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,_){this.level=u,this.from=y,this.to=_}return function(u,y){var _=y=="ltr"?"L":"R";if(u.length==0||y=="ltr"&&!n.test(u))return!1;for(var j=u.length,A=[],ne=0;ne<j;++ne)A.push(r(u.charCodeAt(ne)));for(var pe=0,Te=_;pe<j;++pe){var Pe=A[pe];Pe=="m"?A[pe]=Te:Te=Pe}for(var We=0,Ne=_;We<j;++We){var ze=A[We];ze=="1"&&Ne=="r"?A[We]="n":a.test(ze)&&(Ne=ze,ze=="r"&&(A[We]="R"))}for(var it=1,et=A[0];it<j-1;++it){var ht=A[it];ht=="+"&&et=="1"&&A[it+1]=="1"?A[it]="1":ht==","&&et==A[it+1]&&(et=="1"||et=="n")&&(A[it]=et),et=ht}for(var Et=0;Et<j;++Et){var Ut=A[Et];if(Ut==",")A[Et]="N";else if(Ut=="%"){var Ot=void 0;for(Ot=Et+1;Ot<j&&A[Ot]=="%";++Ot);for(var an=Et&&A[Et-1]=="!"||Ot<j&&A[Ot]=="1"?"1":"N",qt=Et;qt<Ot;++qt)A[qt]=an;Et=Ot-1}}for(var At=0,en=_;At<j;++At){var Ht=A[At];en=="L"&&Ht=="1"?A[At]="L":a.test(Ht)&&(en=Ht)}for(var Nt=0;Nt<j;++Nt)if(i.test(A[Nt])){var Rt=void 0;for(Rt=Nt+1;Rt<j&&i.test(A[Rt]);++Rt);for(var Lt=(Nt?A[Nt-1]:_)=="L",tn=(Rt<j?A[Rt]:_)=="L",Nr=Lt==tn?Lt?"L":"R":_,Xn=Nt;Xn<Rt;++Xn)A[Xn]=Nr;Nt=Rt-1}for(var Vt=[],En,Ft=0;Ft<j;)if(o.test(A[Ft])){var Na=Ft;for(++Ft;Ft<j&&o.test(A[Ft]);++Ft);Vt.push(new l(0,Na,Ft))}else{var Dn=Ft,ur=Vt.length,cr=y=="rtl"?1:0;for(++Ft;Ft<j&&A[Ft]!="L";++Ft);for(var Jt=Dn;Jt<Ft;)if(s.test(A[Jt])){Dn<Jt&&(Vt.splice(ur,0,new l(1,Dn,Jt)),ur+=cr);var Ir=Jt;for(++Jt;Jt<Ft&&s.test(A[Jt]);++Jt);Vt.splice(ur,0,new l(2,Ir,Jt)),ur+=cr,Dn=Jt}else++Jt;Dn<Ft&&Vt.splice(ur,0,new l(1,Dn,Ft))}return y=="ltr"&&(Vt[0].level==1&&(En=u.match(/^\s+/))&&(Vt[0].from=En[0].length,Vt.unshift(new l(0,0,En[0].length))),Oe(Vt).level==1&&(En=u.match(/\s+$/))&&(Oe(Vt).to-=En[0].length,Vt.push(new l(0,j-En[0].length,j)))),y=="rtl"?Vt.reverse():Vt}}();function Qe(e,t){var r=e.order;return r==null&&(r=e.order=rt(e.text,t)),r}var Ve=[],ie=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]||Ve).concat(r)}};function nt(e,t){return e._handlers&&e._handlers[t]||Ve}function Xe(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=J(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function q(e,t){var r=nt(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 ue(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),q(e,r||t.type,e,t),h(t)||t.codemirrorIgnore}function g(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)J(r,t[n])==-1&&r.push(t[n])}function b(e,t){return nt(e,t).length>0}function E(e){e.prototype.on=function(t,r){ie(this,t,r)},e.prototype.off=function(t,r){Xe(this,t,r)}}function d(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){d(e),f(e)}function R(e){return e.target||e.srcElement}function $(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 ve=function(){if(k&&S<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}(),tt;function ft(e){if(tt==null){var t=x("span","\u200B");Z(e,x("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(tt=t.offsetWidth<=1&&t.offsetHeight>2&&!(k&&S<8))}var r=tt?x("span","\u200B"):x("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var at;function Pt(e){if(at!=null)return at;var t=Z(e,document.createTextNode("A\u062EA")),r=P(t,0,1).getBoundingClientRect(),n=P(t,1,2).getBoundingClientRect();return ge(e),!r||r.left==r.right?!1:at=n.right-r.right<3}var pt=`
|
|
|
|
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/)},lt=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},Bt=function(){var e=x("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),bt=null;function $t(e){if(bt!=null)return bt;var t=Z(e,x("span","x")),r=t.getBoundingClientRect(),n=P(t,0,1).getBoundingClientRect();return bt=Math.abs(r.left-n.left)>1}var Wt={},mt={};function _n(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wt[e]=t}function Gn(e,t){mt[e]=t}function un(e){if(typeof e=="string"&&mt.hasOwnProperty(e))e=mt[e];else if(e&&typeof e.name=="string"&&mt.hasOwnProperty(e.name)){var t=mt[e.name];typeof t=="string"&&(t={name:t}),e=je(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return un("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return un("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Cn(e,t){t=un(t);var r=Wt[t.name];if(!r)return Cn(e,"text/plain");var n=r(e,t);if(pn.hasOwnProperty(t.name)){var i=pn[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 pn={};function bi(e,t){var r=pn.hasOwnProperty(e)?pn[e]:pn[e]={};c(t,r)}function cn(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 Vn(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 dr(e,t,r){return e.startState?e.startState(t,r):!0}var St=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};St.prototype.eol=function(){return this.pos>=this.string.length},St.prototype.sol=function(){return this.pos==this.lineStart},St.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},St.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},St.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},St.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},St.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},St.prototype.skipToEnd=function(){this.pos=this.string.length},St.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},St.prototype.backUp=function(e){this.pos-=e},St.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=T(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?T(this.string,this.lineStart,this.tabSize):0)},St.prototype.indentation=function(){return T(this.string,null,this.tabSize)-(this.lineStart?T(this.string,this.lineStart,this.tabSize):0)},St.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)}},St.prototype.current=function(){return this.string.slice(this.start,this.pos)},St.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},St.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},St.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 Sn(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 fr(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function dn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function gt(e){if(e.parent==null)return null;for(var t=e.parent,r=J(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 kn(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 An(e,t){return t>=e.first&&t<e.first+e.size}function $n(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ce(e,t,r){if(r===void 0&&(r=null),!(this instanceof Ce))return new Ce(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ut(e,t){return e.line-t.line||e.ch-t.ch}function Me(e,t){return e.sticky==t.sticky&&ut(e,t)==0}function jr(e){return Ce(e.line,e.ch)}function hr(e,t){return ut(e,t)<0?t:e}function Yn(e,t){return ut(e,t)<0?e:t}function Jn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return Ce(e.first,0);var r=e.first+e.size-1;return t.line>r?Ce(r,Ze(e,r).text.length):Zi(t,Ze(e,t.line).text.length)}function Zi(e,t){var r=e.ch;return r==null||r>t?Ce(e.line,t):r<0?Ce(e.line,0):e}function Ur(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=st(e,t[n]);return r}var fn=function(e,t){this.state=e,this.lookAhead=t},on=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};on.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},on.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}},on.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},on.fromSaved=function(e,t,r){return t instanceof fn?new on(e,cn(e.mode,t.state),r,t.lookAhead):new on(e,cn(e.mode,t),r)},on.prototype.save=function(e){var t=e!==!1?cn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fn(t,this.maxLookAhead):t};function yi(e,t,r,n){var i=[e.state.modeGen],a={};Br(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],_=1,j=0;r.state=!0,Br(e,t.text,y.mode,r,function(A,ne){for(var pe=_;j<A;){var Te=i[_];Te>A&&i.splice(_,1,A,i[_+1],Te),_+=2,j=Math.min(A,Te)}if(!ne)return;if(y.opaque)i.splice(pe,_-pe,A,"overlay "+ne),_=pe+2;else for(;pe<_;pe+=2){var Pe=i[pe+1];i[pe+1]=(Pe?Pe+" ":"")+"overlay "+ne}},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 Fr(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=nn(e,gt(t)),i=t.text.length>e.options.maxHighlightLength&&cn(e.doc.mode,n.state),a=yi(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 nn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new on(n,!0,t);var a=Zn(e,t,r),o=a>n.first&&Ze(n,a-1).stateAfter,s=o?on.fromSaved(n,o,a):new on(n,dr(n.mode),a);return n.iter(a,t,function(l){pr(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 pr(e,t,r,n){var i=e.doc.mode,a=new St(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&xi(i,r.state);!a.eol();)mr(i,a,r.state),a.start=a.pos}function xi(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Vn(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function mr(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Vn(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 Tn=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function On(e,t,r,n){var i=e.doc,a=i.mode,o;t=st(i,t);var s=Ze(i,t.line),l=nn(e,t.line,r),u=new St(s.text,e.options.tabSize,l),y;for(n&&(y=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=mr(a,u,l.state),n&&y.push(new Tn(u,o,cn(i.mode,l.state)));return n?y:new Tn(u,o,l.state)}function wi(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 Br(e,t,r,n,i,a,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var l=0,u=null,y=new St(t,e.options.tabSize,n),_,j=e.options.addModeClass&&[null];for(t==""&&wi(xi(r,n.state),a);!y.eol();){if(y.pos>e.options.maxHighlightLength?(s=!1,o&&pr(e,t,n,y.pos),y.pos=t.length,_=null):_=wi(mr(r,y,n.state,j),a),j){var A=j[0].name;A&&(_="m-"+(_?A+" "+_:A))}if(!s||u!=_){for(;l<y.start;)l=Math.min(y.start,l+5e3),i(l,u);u=_}y.start=y.pos}for(;l<y.pos;){var ne=Math.min(y.pos,l+5e3);i(ne,u),l=ne}}function Zn(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 fn?u.lookAhead:0)<=a.modeFrontier))return s;var y=T(l.text,null,e.options.tabSize);(i==null||n>y)&&(i=s-1,n=y)}return i}function Wr(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 fn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Ei=!1,hn=!1;function _i(){Ei=!0}function Ci(){hn=!0}function gr(e,t,r){this.marker=e,this.from=t,this.to=r}function Rn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function ja(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function zr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Qn(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 gr(o,a.from,l?null:a.to))}}return n}function Hr(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 gr(o,l?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Pn(e,t){if(t.full)return null;var r=An(e,t.from.line)&&Ze(e,t.from.line).markedSpans,n=An(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=ut(t.from,t.to)==0,s=Qn(r,i,o),l=Hr(n,a,o),u=t.text.length==1,y=Oe(t.text).length+(u?i:0);if(s)for(var _=0;_<s.length;++_){var j=s[_];if(j.to==null){var A=Rn(l,j.marker);A?u&&(j.to=A.to==null?null:A.to+y):j.to=i}}if(l)for(var ne=0;ne<l.length;++ne){var pe=l[ne];if(pe.to!=null&&(pe.to+=y),pe.from==null){var Te=Rn(s,pe.marker);Te||(pe.from=y,u&&(s||(s=[])).push(pe))}else pe.from+=y,u&&(s||(s=[])).push(pe)}s&&(s=qn(s)),l&&l!=s&&(l=qn(l));var Pe=[s];if(!u){var We=t.text.length-2,Ne;if(We>0&&s)for(var ze=0;ze<s.length;++ze)s[ze].to==null&&(Ne||(Ne=[])).push(new gr(s[ze].marker,null,null));for(var it=0;it<We;++it)Pe.push(Ne);Pe.push(l)}return Pe}function qn(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 Si(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(A){if(A.markedSpans)for(var ne=0;ne<A.markedSpans.length;++ne){var pe=A.markedSpans[ne].marker;pe.readOnly&&(!n||J(n,pe)==-1)&&(n||(n=[])).push(pe)}}),!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(ut(u.to,s.from)<0||ut(u.from,s.to)>0)continue;var y=[l,1],_=ut(u.from,s.from),j=ut(u.to,s.to);(_<0||!o.inclusiveLeft&&!_)&&y.push({from:u.from,to:s.from}),(j>0||!o.inclusiveRight&&!j)&&y.push({from:s.to,to:u.to}),i.splice.apply(i,y),l+=y.length-3}return i}function Kr(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 er(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function vr(e){return e.inclusiveLeft?-1:0}function yn(e){return e.inclusiveRight?1:0}function Xr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=ut(n.from,i.from)||vr(e)-vr(t);if(a)return-a;var o=ut(n.to,i.to)||yn(e)-yn(t);return o||t.id-e.id}function ki(e,t){var r=hn&&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||Xr(n,i.marker)<0)&&(n=i.marker);return n}function Ti(e){return ki(e,!0)}function Gr(e){return ki(e,!1)}function Ua(e,t){var r=hn&&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||Xr(n,a.marker)<0)&&(n=a.marker)}return n}function Qi(e,t,r,n,i){var a=Ze(e,t),o=hn&&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=ut(u.from,r)||vr(l.marker)-vr(i),_=ut(u.to,n)||yn(l.marker)-yn(i);if(y>=0&&_<=0||y<=0&&_>=0)continue;if(y<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ut(u.to,r)>=0:ut(u.to,r)>0)||y>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ut(u.from,n)<=0:ut(u.from,n)<0))return!0}}function qe(e){for(var t;t=Ti(e);)e=t.find(-1,!0).line;return e}function ct(e){for(var t;t=Gr(e);)e=t.find(1,!0).line;return e}function dt(e){for(var t,r;t=Gr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function xt(e,t){var r=Ze(e,t),n=qe(r);return r==n?t:gt(n)}function wt(e,t){if(t>e.lastLine())return t;var r=Ze(e,t),n;if(!_t(e,r))return t;for(;n=Gr(r);)r=n.find(1,!0).line;return gt(r)+1}function _t(e,t){var r=hn&&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&&Mt(e,t,n))return!0}}function Mt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Mt(e,n.line,Rn(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)&&Mt(e,t,i))return!0}function kt(e){e=qe(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 Kt(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ti(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Gr(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 mn(e){var t=e.display,r=e.doc;t.maxLine=Ze(r,r.first),t.maxLineLength=Kt(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Kt(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var Ct=function(e,t,r){this.text=e,er(this,t),this.height=r?r(this):1};Ct.prototype.lineNo=function(){return gt(this)},E(Ct);function Nn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Kr(e),er(e,r);var i=n?n(e):1;i!=e.height&&dn(e,i)}function Xt(e){e.parent=null,Kr(e)}var In={},jn={};function br(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?jn:In;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Fa(e,t){var r=K("span",null,null,C?"padding-right: .1px":null),n={pre:K("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,Pt(e.display.measure)&&(o=Qe(a,e.doc.direction))&&(n.addToken=Ts(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&>(a);Os(a,n,Fr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=X(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=X(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ft(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(C){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 q(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=X(n.pre.className,n.textClass||"")),n}function Cs(e){var t=x("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),k&&S<9&&(u=!0),e.pos+=t.length;else{y=document.createDocumentFragment();for(var _=0;;){l.lastIndex=_;var j=l.exec(t),A=j?j.index-_:t.length-_;if(A){var ne=document.createTextNode(s.slice(_,_+A));k&&S<9?y.appendChild(x("span",[ne])):y.appendChild(ne),e.map.push(e.pos,e.pos+A,ne),e.col+=A,e.pos+=A}if(!j)break;_+=A+1;var pe=void 0;if(j[0]==" "){var Te=e.cm.options.tabSize,Pe=Te-e.col%Te;pe=y.appendChild(x("span",B(Pe),"cm-tab")),pe.setAttribute("role","presentation"),pe.setAttribute("cm-text"," "),e.col+=Pe}else j[0]=="\r"||j[0]==`
|
|
`?(pe=y.appendChild(x("span",j[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),pe.setAttribute("cm-text",j[0]),e.col+=1):(pe=e.cm.options.specialCharPlaceholder(j[0]),pe.setAttribute("cm-text",j[0]),k&&S<9?y.appendChild(x("span",[pe])):y.appendChild(pe),e.col+=1);e.map.push(e.pos,e.pos+1,pe),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||u||a||o){var We=r||"";n&&(We+=n),i&&(We+=i);var Ne=x("span",[y],We,a);if(o)for(var ze in o)o.hasOwnProperty(ze)&&ze!="style"&&ze!="class"&&Ne.setAttribute(ze,o[ze]);return e.content.appendChild(Ne)}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 _=void 0,j=0;j<t.length&&!(_=t[j],_.to>u&&_.from<=u);j++);if(_.to>=y)return e(r,n,i,a,o,s,l);e(r,n.slice(0,_.to-u),i,a,null,s,l),a=null,n=n.slice(_.to-u),u=_.to}}}function Ba(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]),br(r[o+1],t.cm.options));return}for(var s=i.length,l=0,u=1,y="",_,j,A=0,ne,pe,Te,Pe,We;;){if(A==l){ne=pe=Te=j="",We=null,Pe=null,A=Infinity;for(var Ne=[],ze=void 0,it=0;it<n.length;++it){var et=n[it],ht=et.marker;if(ht.type=="bookmark"&&et.from==l&&ht.widgetNode)Ne.push(ht);else if(et.from<=l&&(et.to==null||et.to>l||ht.collapsed&&et.to==l&&et.from==l)){if(et.to!=null&&et.to!=l&&A>et.to&&(A=et.to,pe=""),ht.className&&(ne+=" "+ht.className),ht.css&&(j=(j?j+";":"")+ht.css),ht.startStyle&&et.from==l&&(Te+=" "+ht.startStyle),ht.endStyle&&et.to==A&&(ze||(ze=[])).push(ht.endStyle,et.to),ht.title&&((We||(We={})).title=ht.title),ht.attributes)for(var Et in ht.attributes)(We||(We={}))[Et]=ht.attributes[Et];ht.collapsed&&(!Pe||Xr(Pe.marker,ht)<0)&&(Pe=et)}else et.from>l&&A>et.from&&(A=et.from)}if(ze)for(var Ut=0;Ut<ze.length;Ut+=2)ze[Ut+1]==A&&(pe+=" "+ze[Ut]);if(!Pe||Pe.from==l)for(var Ot=0;Ot<Ne.length;++Ot)Ba(t,0,Ne[Ot]);if(Pe&&(Pe.from||0)==l){if(Ba(t,(Pe.to==null?s+1:Pe.to)-l,Pe.marker,Pe.from==null),Pe.to==null)return;Pe.to==l&&(Pe=!1)}}if(l>=s)break;for(var an=Math.min(s,A);;){if(y){var qt=l+y.length;if(!Pe){var At=qt>an?y.slice(0,an-l):y;t.addToken(t,At,_?_+ne:ne,Te,l+At.length==A?pe:"",j,We)}if(qt>=an){y=y.slice(an-l),l=an;break}l=qt,Te=""}y=i.slice(a,a=r[u++]),_=br(r[u++],t.cm.options)}}}function Wa(e,t,r){this.line=t,this.rest=dt(t),this.size=this.rest?gt(Oe(this.rest))-r+1:1,this.node=this.text=null,this.hidden=_t(e,t)}function Oi(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Wa(e.doc,Ze(e.doc,a),a);i=a+o.size,n.push(o)}return n}var yr=null;function Ls(e){yr?yr.ops.push(e):e.ownsGroup=yr={ops:[e],delayedCallbacks:[]}}function Ms(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 Ds(e,t){var r=e.ownsGroup;if(!r)return;try{Ms(r)}finally{yr=null,t(r)}}var Vr=null;function zt(e,t){var r=nt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;yr?i=yr.delayedCallbacks:Vr?i=Vr:(i=Vr=[],setTimeout(As,0));for(var a=function(s){i.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)a(o)}function As(){var e=Vr;Vr=null;for(var t=0;t<e.length;++t)e[t]()}function za(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"?Ka(e,t,r,n):a=="class"?qi(e,t):a=="widget"&&Ns(e,t,n)}t.changes=null}function $r(e){return e.node==e.text&&(e.node=x("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),k&&S<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=$r(t);t.background=n.insertBefore(x("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ha(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Fa(e,t)}function Ps(e,t){var r=t.text.className,n=Ha(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,qi(e,t)):r&&(t.text.className=r)}function qi(e,t){Rs(e,t),t.line.wrapClass?$r(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 Ka(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=$r(t);t.gutterBackground=x("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=$r(t),s=t.gutter=x("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(x("div",$n(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(x("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=Ha(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),qi(e,t),Ka(e,t,r,n),Xa(e,t,n),t.node}function Xa(e,t,r){if(Ga(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ga(e,t.rest[n],t,r,!1)}function Ga(e,t,r,n,i){if(!t.widgets)return;for(var a=$r(r),o=0,s=t.widgets;o<s.length;++o){var l=s[o],u=x("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),zt(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 Yr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!w(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;"),Z(t.display.measure,x("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Ln(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 ea(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Va(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Z(e.measure,x("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 xn(e){return ke-e.display.nativeBarWidth}function tr(e){return e.display.scroller.clientWidth-xn(e)-e.display.barWidth}function ta(e){return e.display.scroller.clientHeight-xn(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&tr(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 $a(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(gt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=qe(t);var r=gt(t),n=e.display.externalMeasured=new Wa(e.doc,t,r);n.lineN=r;var i=n.built=Fa(e,n);return n.text=i.pre,Z(e.display.lineMeasure,i.pre),n}function Ya(e,t,r,n){return wn(e,xr(e,t),r,n)}function na(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ir(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function xr(e,t){var r=gt(t),n=na(e,r);n&&!n.text?n=null:n&&n.changes&&(za(e,n,r,la(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var i=$a(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function wn(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 Ja={left:0,right:0,top:0,bottom:0};function Za(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=Ja;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=Za(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&&he(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s<i.coverEnd&&he(t.line.text.charAt(i.coverStart+s));)++s;if(k&&S<9&&o==0&&s==i.coverEnd-i.coverStart?u=a.parentNode.getBoundingClientRect():u=Bs(P(a,o,s).getClientRects(),n),u.left||u.right||o==0)break;s=o,o=o-1,l="right"}k&&S<11&&(u=zs(e.display.measure,u))}else{o>0&&(l=n="right");var _;e.options.lineWrapping&&(_=a.getClientRects()).length>1?u=_[n=="right"?_.length-1:0]:u=a.getBoundingClientRect()}if(k&&S<9&&!o&&(!u||!u.left&&!u.right)){var j=a.parentNode.getClientRects()[0];j?u={left:j.left,right:j.left+Er(e.display),top:j.top,bottom:j.bottom}:u=Ja}for(var A=u.top-t.rect.top,ne=u.bottom-t.rect.top,pe=(A+ne)/2,Te=t.view.measure.heights,Pe=0;Pe<Te.length-1&&!(pe<Te[Pe]);Pe++);var We=Pe?Te[Pe-1]:0,Ne=Te[Pe],ze={left:(l=="right"?u.right:u.left)-t.rect.left,right:(l=="left"?u.left:u.right)-t.rect.left,top:We,bottom:Ne};return!u.left&&!u.right&&(ze.bogus=!0),e.options.singleCursorHeightPerLine||(ze.rtop=A,ze.rbottom=ne),ze}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!$t(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 qa(e){e.display.externalMeasure=null,ge(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Qa(e.display.view[t])}function Jr(e){qa(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function eo(){return N&&O?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function to(){return N&&O?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ra(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Yr(e.widgets[r]));return t}function Mi(e,t,r,n,i){if(!i){var a=ra(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=kt(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:to());var l=s.left+(n=="window"?0:eo());r.left+=l,r.right+=l}return r.top+=o,r.bottom+=o,r}function no(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=eo(),i-=to();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 ia(e,t,r,n,i){return n||(n=Ze(e.doc,t.line)),Mi(e,n,Ya(e,n,t.ch,i),r)}function gn(e,t,r,n,i,a){n=n||Ze(e.doc,t.line),i||(i=xr(e,n));function o(ne,pe){var Te=wn(e,i,ne,pe?"right":"left",a);return pe?Te.left=Te.right:Te.right=Te.left,Mi(e,n,Te,r)}var s=Qe(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(ne,pe,Te){var Pe=s[pe],We=Pe.level==1;return o(Te?ne-1:ne,We!=Te)}var _=Ke(s,l,u),j=Ge,A=y(l,_,u=="before");return j!=null&&(A.other=y(l,j,u!="before")),A}function ro(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=Er(e.display)*t.ch);var n=Ze(e.doc,t.line),i=kt(n)+Li(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function aa(e,t,r,n,i){var a=Ce(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function oa(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return aa(n.first,0,null,-1,-1);var i=kn(n,r),a=n.first+n.size-1;if(i>a)return aa(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=Ua(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 io(e,t,r,n){n-=ra(t);var i=t.text.length,a=Ye(function(o){return wn(e,r,o-1).bottom<=n},i,0);return i=Ye(function(o){return wn(e,r,o).top>n},a,i),{begin:a,end:i}}function ao(e,t,r,n){r||(r=xr(e,t));var i=Mi(e,t,wn(e,r,n),"line").top;return io(e,t,r,i)}function sa(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-=kt(t);var a=xr(e,t),o=ra(t),s=0,l=t.text.length,u=!0,y=Qe(t,e.doc.direction);if(y){var _=(e.options.lineWrapping?Xs:Ks)(e,t,r,a,y,n,i);u=_.level!=1,s=u?_.from:_.to-1,l=u?_.to:_.from-1}var j=null,A=null,ne=Ye(function(it){var et=wn(e,a,it);return et.top+=o,et.bottom+=o,sa(et,n,i,!1)?(et.top<=i&&et.left<=n&&(j=it,A=et),!0):!1},s,l),pe,Te,Pe=!1;if(A){var We=n-A.left<A.right-n,Ne=We==u;ne=j+(Ne?0:1),Te=Ne?"after":"before",pe=We?A.left:A.right}else{!u&&(ne==l||ne==s)&&ne++,Te=ne==0?"after":ne==t.text.length?"before":wn(e,a,ne-(u?1:0)).bottom+o<=i==u?"after":"before";var ze=gn(e,Ce(r,ne,Te),"line",t,a);pe=ze.left,Pe=i<ze.top?-1:i>=ze.bottom?1:0}return ne=_e(t.text,ne,1),aa(r,ne,Te,Pe,n-pe)}function Ks(e,t,r,n,i,a,o){var s=Ye(function(_){var j=i[_],A=j.level!=1;return sa(gn(e,Ce(r,A?j.to:j.from,A?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),l=i[s];if(s>0){var u=l.level!=1,y=gn(e,Ce(r,u?l.from:l.to,u?"after":"before"),"line",t,n);sa(y,a,o,!0)&&y.top>o&&(l=i[s-1])}return l}function Xs(e,t,r,n,i,a,o){var s=io(e,t,n,o),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var y=null,_=null,j=0;j<i.length;j++){var A=i[j];if(A.from>=u||A.to<=l)continue;var ne=A.level!=1,pe=wn(e,n,ne?Math.min(u,A.to)-1:Math.max(l,A.from)).right,Te=pe<a?a-pe+1e9:pe-a;(!y||_>Te)&&(y=A,_=Te)}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 nr;function wr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(nr==null){nr=x("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nr.appendChild(document.createTextNode("x")),nr.appendChild(x("br"));nr.appendChild(document.createTextNode("x"))}Z(e.measure,nr);var r=nr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),ge(e.measure),r||1}function Er(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=x("span","xxxxxxxxxx"),r=x("pre",[t],"CodeMirror-line-like");Z(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function la(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:ua(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function ua(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function oo(e){var t=wr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Er(e.display)-3);return function(i){if(_t(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 ca(e){var t=e.doc,r=oo(e);t.iter(function(n){var i=r(n);i!=n.height&&dn(n,i)})}function rr(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(_){return null}var l=oa(e,a,o),u;if(n&&l.xRel>0&&(u=Ze(e.doc,l.line).text).length==l.ch){var y=T(u,u.length,e.options.tabSize)-u.length;l=Ce(l.line,Math.max(0,Math.round((a-Va(e.display).left)/Er(e.display))-y))}return l}function ir(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 Zt(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)hn&&xt(e.doc,t)<i.viewTo&&Fn(e);else if(r<=i.viewFrom)hn&&wt(e.doc,r+n)>i.viewFrom?Fn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Fn(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):Fn(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):Fn(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(Oi(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):Fn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function Un(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[ir(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);J(o,r)==-1&&o.push(r)}function Fn(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=ir(e,t),a,o=e.display.view;if(!hn||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(;xt(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 Gs(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Oi(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Oi(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ir(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Oi(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,ir(e,r)))),n.viewTo=r}function so(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 Zr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function lo(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)&&uo(e,s.head,i),l||Vs(e,s,a)}return n}function uo(e,t,r){var n=gn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(x("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(x("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 Ai(e,t){return e.top-t.top||e.left-t.left}function Vs(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,tr(e)-n.sizer.offsetLeft)-o.right,u=i.direction=="ltr";function y(Ne,ze,it,et){ze<0&&(ze=0),ze=Math.round(ze),et=Math.round(et),a.appendChild(x("div",null,"CodeMirror-selected","position: absolute; left: "+Ne+`px;
|
|
top: `+ze+"px; width: "+(it==null?l-Ne:it)+`px;
|
|
height: `+(et-ze)+"px"))}function _(Ne,ze,it){var et=Ze(i,Ne),ht=et.text.length,Et,Ut;function Ot(At,en){return ia(e,Ce(Ne,At),"div",et,en)}function an(At,en,Ht){var Nt=ao(e,et,null,At),Rt=en=="ltr"==(Ht=="after")?"left":"right",Lt=Ht=="after"?Nt.begin:Nt.end-(/\s/.test(et.text.charAt(Nt.end-1))?2:1);return Ot(Lt,Rt)[Rt]}var qt=Qe(et,i.direction);return Je(qt,ze||0,it==null?ht:it,function(At,en,Ht,Nt){var Rt=Ht=="ltr",Lt=Ot(At,Rt?"left":"right"),tn=Ot(en-1,Rt?"right":"left"),Nr=ze==null&&At==0,Xn=it==null&&en==ht,Vt=Nt==0,En=!qt||Nt==qt.length-1;if(tn.top-Lt.top<=3){var Ft=(u?Nr:Xn)&&Vt,Na=(u?Xn:Nr)&&En,Dn=Ft?s:(Rt?Lt:tn).left,ur=Na?l:(Rt?tn:Lt).right;y(Dn,Lt.top,ur-Dn,Lt.bottom)}else{var cr,Jt,Ir,Ia;Rt?(cr=u&&Nr&&Vt?s:Lt.left,Jt=u?l:an(At,Ht,"before"),Ir=u?s:an(en,Ht,"after"),Ia=u&&Xn&&En?l:tn.right):(cr=u?an(At,Ht,"before"):s,Jt=!u&&Nr&&Vt?l:Lt.right,Ir=!u&&Xn&&En?s:tn.left,Ia=u?an(en,Ht,"after"):l),y(cr,Lt.top,Jt-cr,Lt.bottom),Lt.bottom<tn.top&&y(s,Lt.bottom,null,tn.top),y(Ir,tn.top,Ia-Ir,tn.bottom)}(!Et||Ai(Lt,Et)<0)&&(Et=Lt),Ai(tn,Et)<0&&(Et=tn),(!Ut||Ai(Lt,Ut)<0)&&(Ut=Lt),Ai(tn,Ut)<0&&(Ut=tn)}),{start:Et,end:Ut}}var j=t.from(),A=t.to();if(j.line==A.line)_(j.line,j.ch,A.ch);else{var ne=Ze(i,j.line),pe=Ze(i,A.line),Te=qe(ne)==qe(pe),Pe=_(j.line,j.ch,Te?ne.text.length+1:null).end,We=_(A.line,Te?0:null,A.ch).start;Te&&(Pe.top<We.top-2?(y(Pe.right,Pe.top,null,Pe.bottom),y(s,We.top,We.left,We.bottom)):y(Pe.right,Pe.top,We.left-Pe.right,Pe.bottom)),Pe.bottom<We.top&&y(s,Pe.bottom,null,We.top)}r.appendChild(a)}function da(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()||_r(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function co(e){e.state.focused||(e.display.input.focus(),fa(e))}function fo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,_r(e))},100)}function fa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(q(e,"focus",e,t),e.state.focused=!0,se(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),C&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),da(e)}function _r(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(q(e,"blur",e,t),e.state.focused=!1,ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ri(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(k&&S<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)&&(dn(i.line,o),ho(i.line),i.rest))for(var _=0;_<i.rest.length;_++)ho(i.rest[_]);if(s>e.display.sizerWidth){var j=Math.ceil(s/Er(e.display));j>e.display.maxLineLength&&(e.display.maxLineLength=j,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function ho(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 Pi(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=kn(t,n),o=kn(t,i);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<a?(a=s,o=kn(t,kt(Ze(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(a=kn(t,kt(Ze(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function $s(e,t){if(ue(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&&!D){var a=x("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Li(e.display))+`px;
|
|
height: `+(t.bottom-t.top+xn(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?Ce(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Ce(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=gn(e,t),l=!r||r==t?s:gn(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=ha(e,i),y=e.doc.scrollTop,_=e.doc.scrollLeft;if(u.scrollTop!=null&&(qr(e,u.scrollTop),Math.abs(e.doc.scrollTop-y)>1&&(o=!0)),u.scrollLeft!=null&&(ar(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-_)>1&&(o=!0)),!o)break}return i}function Js(e,t){var r=ha(e,t);r.scrollTop!=null&&qr(e,r.scrollTop),r.scrollLeft!=null&&ar(e,r.scrollLeft)}function ha(e,t){var r=e.display,n=wr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=ta(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+ea(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.options.fixedGutter?0:r.gutters.offsetWidth,j=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-_,A=tr(e)-r.gutters.offsetWidth,ne=t.right-t.left>A;return ne&&(t.right=t.left+A),t.left<10?o.scrollLeft=0:t.left<j?o.scrollLeft=Math.max(0,t.left+_-(ne?0:10)):t.right>A+j-3&&(o.scrollLeft=t.right+(ne?0:10)-A),o}function pa(e,t){if(t==null)return;Ni(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Cr(e){Ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Qr(e,t,r){(t!=null||r!=null)&&Ni(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Zs(e,t){Ni(e),e.curOp.scrollToPos=t}function Ni(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=ro(e,t.from),n=ro(e,t.to);po(e,r,n,t.margin)}}function po(e,t,r,n){var i=ha(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});Qr(e,i.scrollLeft,i.scrollTop)}function qr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;W||ga(e,{top:t}),mo(e,t,!0),W&&ga(e),ni(e,100)}function mo(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 ar(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,xo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ei(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ea(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+xn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var or=function(e,t,r){this.cm=r;var n=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),ie(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ie(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,k&&S<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};or.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}},or.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},or.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},or.prototype.zeroWidthHack=function(){var e=H&&!U?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Q,this.disableVert=new Q},or.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)},or.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ti=function(){};ti.prototype.update=function(){return{bottom:0,right:0}},ti.prototype.setScrollLeft=function(){},ti.prototype.setScrollTop=function(){},ti.prototype.clear=function(){};function Sr(e,t){t||(t=ei(e));var r=e.display.barWidth,n=e.display.barHeight;go(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Ri(e),go(e,ei(e)),r=e.display.barWidth,n=e.display.barHeight}function go(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 vo={native:or,null:ti};function bo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ee(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new vo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ie(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"?ar(e,t):qr(e,t)},e),e.display.scrollbars.addClass&&se(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function sr(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},Ls(e.curOp)}function lr(e){var t=e.curOp;t&&Ds(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&&mn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&ma(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Ri(t),e.barMeasure=ei(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ya(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+xn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-tr(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&&ar(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)&&Sr(t,e.barMeasure),e.updatedDisplay&&ba(t,e.barMeasure),e.selectionChanged&&da(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&co(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&yo(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&mo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ar(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,st(n,e.scrollToPos.from),st(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||q(a[s],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&q(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&q(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function rn(e,t){if(e.curOp)return t();sr(e);try{return t()}finally{lr(e)}}function It(e,t){return function(){if(e.curOp)return t.apply(e,arguments);sr(e);try{return t.apply(e,arguments)}finally{lr(e)}}}function Yt(e){return function(){if(this.curOp)return e.apply(this,arguments);sr(this);try{return e.apply(this,arguments)}finally{lr(this)}}}function jt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);sr(t);try{return e.apply(this,arguments)}finally{lr(t)}}}function ni(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=nn(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?cn(t.mode,n.state):null,l=yi(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 _=!o||o.length!=a.styles.length||u!=y&&(!u||!y||u.bgClass!=y.bgClass||u.textClass!=y.textClass),j=0;!_&&j<o.length;++j)_=o[j]!=a.styles[j];_&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&pr(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ni(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&rn(e,function(){for(var a=0;a<i.length;a++)Un(e,i[a],"text")})}var Ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Pi(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=tr(e),this.force=r,this.dims=la(e),this.events=[]};Ii.prototype.signal=function(e,t){b(e,t)&&this.events.push(arguments)},Ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)q.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=xn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=xn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=V();if(!t||!w(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&w(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&&w(document.body,e.anchorNode)&&w(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 ma(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Fn(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&&so(e)==0)return!1;wo(e)&&(Fn(e),t.dims=la(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)),hn&&(a=xt(e.doc,a),o=wt(e.doc,o));var s=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Gs(e,a,o),r.viewOffset=kt(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=so(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),ge(r.cursorDiv),ge(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ni(e,400)),r.updateLineNumbers=null,!0}function yo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==tr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ea(e.display)-ta(e),r.top)}),t.visible=Pi(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Pi(e.display,e.doc,r));if(!ma(e,t))break;Ri(e);var i=ei(e);Zr(e),Sr(e,i),ba(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 ga(e,t){var r=new Ii(e,t);if(ma(e,r)){Ri(e),yo(e,r);var n=ei(e);Zr(e),Sr(e,n),ba(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(ne){var pe=ne.nextSibling;return C&&H&&e.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),pe}for(var l=n.view,u=n.viewFrom,y=0;y<l.length;y++){var _=l[y];if(!_.hidden)if(!_.node||_.node.parentNode!=a){var j=Is(e,_,u,r);a.insertBefore(j,o)}else{for(;o!=_.node;)o=s(o);var A=i&&t!=null&&t<=u&&_.lineNumber;_.changes&&(J(_.changes,"gutter")>-1&&(A=!1),za(e,_,u,r)),A&&(ge(_.lineNumber),_.lineNumber.appendChild(document.createTextNode($n(e.options,u)))),o=_.node.nextSibling}u+=_.size}for(;o;)o=s(o)}function va(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ba(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+xn(e)+"px"}function xo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=ua(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 wo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=$n(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(x("div",[x("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",va(e.display),!0}return!1}function ya(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 Eo(e){var t=e.gutters,r=e.gutterSpecs;ge(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(x("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",va(e)}function ri(e){Eo(e.display),Zt(e),xo(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=x("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=x("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=K("div",null,"CodeMirror-code"),i.selectionDiv=x("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=x("div",null,"CodeMirror-cursors"),i.measure=x("div",null,"CodeMirror-measure"),i.lineMeasure=x("div",null,"CodeMirror-measure"),i.lineSpace=K("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=K("div",[i.lineSpace],"CodeMirror-lines");i.mover=x("div",[a],null,"position: relative"),i.sizer=x("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=x("div",null,null,"position: absolute; height: "+ke+"px; width: 1px;"),i.gutters=x("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=x("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=x("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),k&&S<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!C&&!(W&&G)&&(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=ya(n.gutters,n.lineNumbers),Eo(i),r.init(i)}var ji=0,sn=null;k?sn=-.53:W?sn=15:N?sn=-.7:oe&&(sn=-1/3);function _o(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=_o(e);return t.x*=sn,t.y*=sn,t}function Co(e,t){var r=_o(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&&C){e:for(var u=t.target,y=a.view;u!=o;u=u.parentNode)for(var _=0;_<y.length;_++)if(y[_].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!W&&!z&&sn!=null){i&&l&&qr(e,Math.max(0,o.scrollTop+i*sn)),ar(e,Math.max(0,o.scrollLeft+n*sn)),(!i||i&&l)&&d(t),a.wheelStartX=null;return}if(i&&sn!=null){var j=i*sn,A=e.doc.scrollTop,ne=A+a.wrapper.clientHeight;j<0?A=Math.max(0,A+j-50):ne=Math.min(e.doc.height,ne+j+50),ga(e,{top:A,bottom:ne})}ji<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 pe=o.scrollLeft-a.wheelStartX,Te=o.scrollTop-a.wheelStartY,Pe=Te&&a.wheelDY&&Te/a.wheelDY||pe&&a.wheelDX&&pe/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!Pe)return;sn=(sn*ji+Pe)/(ji+1),++ji},200)):(a.wheelDX+=n,a.wheelDY+=i))}var ln=function(e,t){this.ranges=e,this.primIndex=t};ln.prototype.primary=function(){return this.ranges[this.primIndex]},ln.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(!Me(r.anchor,n.anchor)||!Me(r.head,n.head))return!1}return!0},ln.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new vt(jr(this.ranges[t].anchor),jr(this.ranges[t].head));return new ln(e,this.primIndex)},ln.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ln.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ut(t,n.from())>=0&&ut(e,n.to())<=0)return r}return-1};var vt=function(e,t){this.anchor=e,this.head=t};vt.prototype.from=function(){return Yn(this.anchor,this.head)},vt.prototype.to=function(){return hr(this.anchor,this.head)},vt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function vn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(j,A){return ut(j.from(),A.from())}),r=J(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],l=ut(s.to(),o.from());if(n&&!o.empty()?l>0:l>=0){var u=Yn(s.from(),o.from()),y=hr(s.to(),o.to()),_=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new vt(_?y:u,_?u:y))}}return new ln(t,r)}function Bn(e,t){return new ln([new vt(e,t||e)],0)}function Wn(e){return e.text?Ce(e.from.line+e.text.length-1,Oe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function So(e,t){if(ut(e,t.from)<0)return e;if(ut(e,t.to)<=0)return Wn(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+=Wn(t).ch-t.to.ch),Ce(r,n)}function xa(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new vt(So(i.anchor,t),So(i.head,t)))}return vn(e.cm,r,e.sel.primIndex)}function ko(e,t,r){return e.line==t.line?Ce(r.line,e.ch-t.ch+r.ch):Ce(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Ce(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],l=ko(s.from,i,a),u=ko(Wn(s),i,a);if(i=s.to,a=u,r=="around"){var y=e.sel.ranges[o],_=ut(y.head,y.anchor)<0;n[o]=new vt(_?u:l,_?l:u)}else n[o]=new vt(l,l)}return new ln(n,e.sel.primIndex)}function wa(e){e.doc.mode=Cn(e.options,e.doc.modeOption),ii(e)}function ii(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,ni(e,100),e.state.modeGen++,e.curOp&&Zt(e)}function To(e,t){return t.from.ch==0&&t.to.ch==0&&Oe(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ea(e,t,r,n){function i(We){return r?r[We]:null}function a(We,Ne,ze){Nn(We,Ne,ze,n),zt(We,"change",We,t)}function o(We,Ne){for(var ze=[],it=We;it<Ne;++it)ze.push(new Ct(u[it],i(it),n));return ze}var s=t.from,l=t.to,u=t.text,y=Ze(e,s.line),_=Ze(e,l.line),j=Oe(u),A=i(u.length-1),ne=l.line-s.line;if(t.full)e.insert(0,o(0,u.length)),e.remove(u.length,e.size-u.length);else if(To(e,t)){var pe=o(0,u.length-1);a(_,_.text,A),ne&&e.remove(s.line,ne),pe.length&&e.insert(s.line,pe)}else if(y==_)if(u.length==1)a(y,y.text.slice(0,s.ch)+j+y.text.slice(l.ch),A);else{var Te=o(1,u.length-1);Te.push(new Ct(j+y.text.slice(l.ch),A,n)),a(y,y.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,Te)}else if(u.length==1)a(y,y.text.slice(0,s.ch)+u[0]+_.text.slice(l.ch),i(0)),e.remove(s.line+1,ne);else{a(y,y.text.slice(0,s.ch)+u[0],i(0)),a(_,j+_.text.slice(l.ch),A);var Pe=o(1,u.length-1);ne>1&&e.remove(s.line+1,ne-1),e.insert(s.line+1,Pe)}zt(e,"change",e,t)}function zn(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 Oo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ca(e),wa(e),Lo(e),e.options.lineWrapping||mn(e),e.options.mode=t.modeOption,Zt(e)}function Lo(e){(e.doc.direction=="rtl"?se:ee)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){rn(e,function(){Lo(e),Zt(e)})}function Ui(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function _a(e,t){var r={from:jr(t.from),to:Wn(t),text:Sn(e,t.from,t.to)};return Ao(e,r,t.from.line,t.to.line+1),zn(e,function(n){return Ao(n,r,t.from.line,t.to.line+1)},!0),r}function Mo(e){for(;e.length;){var t=Oe(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Mo(e.done),Oe(e.done);if(e.done.length&&!Oe(e.done).ranges)return Oe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Oe(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=Oe(o.changes),ut(t.from,t.to)==0&&ut(t.from,s.to)==0?s.to=Wn(t):o.changes.push(_a(e,t));else{var l=Oe(i.done);for((!l||!l.ranges)&&Fi(e.sel,i.done),o={changes:[_a(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||q(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,Oe(i.done),t))?i.done[i.done.length-1]=t:Fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Mo(i.undone)}function Fi(e,t){var r=Oe(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ao(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 Ro(e,t){var r=bl(e,t),n=Pn(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 kr(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?ln.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 _ in u)(y=_.match(/^spans_(\d+)$/))&&(J(t,Number(y[1]))>-1&&(Oe(s)[_]=u[_],delete u[_]))}}return n}function Ca(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ut(t,i)<0;a!=ut(r,i)<0?(i=t,t=r):a!=ut(t,r)<0&&(t=r)}return new vt(i,t)}else return new vt(r||t,t)}function Bi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Gt(e,new ln([Ca(e.sel.primary(),t,r,i)],0),n)}function Po(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]=Ca(e.sel.ranges[a],t[a],null,i);var o=vn(e.cm,n,e.sel.primIndex);Gt(e,o,r)}function Sa(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Gt(e,vn(e.cm,i,e.sel.primIndex),n)}function No(e,t,r,n){Gt(e,Bn(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 vt(st(e,i[a].anchor),st(e,i[a].head))},origin:r&&r.origin};return q(e,"beforeSelectionChange",e,n),e.cm&&q(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?vn(e.cm,n.ranges,n.ranges.length-1):t}function Io(e,t,r){var n=e.history.done,i=Oe(n);i&&i.ranges?(n[n.length-1]=t,Wi(e,t,r)):Gt(e,t,r)}function Gt(e,t,r){Wi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Wi(e,t,r){(b(e,"beforeSelectionChange")||e.cm&&b(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);jo(e,Fo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Cr(e.cm)}function jo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,g(e.cm)),zt(e,"cursorActivity",e)}function Uo(e){jo(e,Fo(e,e.sel,null,!1))}function Fo(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=zi(e,o.anchor,s&&s.anchor,r,n),u=zi(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 vt(l,u))}return i?vn(e.cm,i,t.primIndex):t}function Tr(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&&(q(l,"beforeCursorEnter"),l.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!l.atomic)continue;if(r){var _=l.find(n<0?1:-1),j=void 0;if((n<0?y:u)&&(_=Bo(e,_,-n,_&&_.line==t.line?a:null)),_&&_.line==t.line&&(j=ut(_,r))&&(n<0?j<0:j>0))return Tr(e,_,t,n,i)}var A=l.find(n<0?-1:1);return(n<0?u:y)&&(A=Bo(e,A,n,A.line==t.line?a:null)),A?Tr(e,A,t,n,i):null}}return t}function zi(e,t,r,n,i){var a=n||1,o=Tr(e,t,r,a,i)||!i&&Tr(e,t,r,a,!0)||Tr(e,t,r,-a,i)||!i&&Tr(e,t,r,-a,!0);return o||(e.cantEdit=!0,Ce(e.first,0))}function Bo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?st(e,Ce(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line<e.first+e.size-1?Ce(t.line+1,0):null:new Ce(t.line,t.ch+r)}function Wo(e){e.setSelection(Ce(e.firstLine(),0),Ce(e.lastLine()),de)}function zo(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=st(e,i)),a&&(n.to=st(e,a)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),q(e,"beforeChange",e,n),e.cm&&q(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 Or(e,t,r){if(e.cm){if(!e.cm.curOp)return It(e.cm,Or)(e,t,r);if(e.cm.state.suppressEdits)return}if((b(e,"beforeChange")||e.cm&&b(e.cm,"beforeChange"))&&(t=zo(e,t,!0),!t))return;var n=Ei&&!r&&Si(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Ho(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Ho(e,t)}function Ho(e,t){if(t.text.length==1&&t.text[0]==""&&ut(t.from,t.to)==0)return;var r=xa(e,t);Do(e,t,r,e.cm?e.cm.curOp.id:NaN),ai(e,t,r,Pn(e,t));var n=[];zn(e,function(i,a){!a&&J(n,i.history)==-1&&(Vo(i.history,t),n.push(i.history)),ai(i,t,null,Pn(i,t))})}function Hi(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(Fi(a,l),r&&!a.equals(e.sel)){Gt(e,a,{clearRedo:!1});return}o=a}else if(n){s.push(a);return}else break;var y=[];Fi(o,l),l.push({changes:y,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var _=b(e,"beforeChange")||e.cm&&b(e.cm,"beforeChange"),j=function(pe){var Te=a.changes[pe];if(Te.origin=t,_&&!zo(e,Te,!1))return s.length=0,{};y.push(_a(e,Te));var Pe=pe?xa(e,Te):Oe(s);ai(e,Te,Pe,Ro(e,Te)),!pe&&e.cm&&e.cm.scrollIntoView({from:Te.from,to:Wn(Te)});var We=[];zn(e,function(Ne,ze){!ze&&J(We,Ne.history)==-1&&(Vo(Ne.history,Te),We.push(Ne.history)),ai(Ne,Te,null,Ro(Ne,Te))})},A=a.changes.length-1;A>=0;--A){var ne=j(A);if(ne)return ne.v}}function Ko(e,t){if(t==0)return;if(e.first+=t,e.sel=new ln(He(e.sel.ranges,function(i){return new vt(Ce(i.anchor.line+t,i.anchor.ch),Ce(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){Zt(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Un(e.cm,n,"gutter")}}function ai(e,t,r,n){if(e.cm&&!e.cm.curOp)return It(e.cm,ai)(e,t,r,n);if(t.to.line<e.first){Ko(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);Ko(e,i),t={from:Ce(e.first,0),to:Ce(t.to.line+i,t.to.ch),text:[Oe(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Ce(a,Ze(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Sn(e,t.from,t.to),r||(r=xa(e,t)),e.cm?xl(e.cm,t,n):Ea(e,t,n),Wi(e,r,de),e.cantEdit&&zi(e,Ce(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=gt(qe(Ze(n,a.line))),n.iter(l,o.line+1,function(A){if(A==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&g(e),Ea(n,t,r,oo(e)),e.options.lineWrapping||(n.iter(l,a.line+t.text.length,function(A){var ne=Kt(A);ne>i.maxLineLength&&(i.maxLine=A,i.maxLineLength=ne,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Wr(n,a.line),ni(e,400);var u=t.text.length-(o.line-a.line)-1;t.full?Zt(e):a.line==o.line&&t.text.length==1&&!To(e.doc,t)?Un(e,a.line,"text"):Zt(e,a.line,o.line+1,u);var y=b(e,"changes"),_=b(e,"change");if(_||y){var j={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};_&&zt(e,"change",e,j),y&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(j)}e.display.selForContextMenu=null}function Lr(e,t,r,n,i){var a;n||(n=r),ut(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Or(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 Go(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=Ce(u.from.line+n,u.from.ch),u.to=Ce(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;Go(e.done,r,n,i),Go(e.undone,r,n,i)}function oi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=Ze(e,Jn(e,t)):i=gt(t),i==null?null:(n(a,i)&&e.cm&&Un(e.cm,i,r),a)}function si(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}si.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,Xt(i),zt(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 li(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}li.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 si))){var s=[];this.collapse(s),this.children=[new si(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 si(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 li(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=J(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new li(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 ui=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};ui.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=gt(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=Yr(this);dn(r,Math.max(0,r.height-a)),e&&(rn(e,function(){$o(e,r,-a),Un(e,n,"widget")}),zt(e,"lineWidgetCleared",e,this,n))},ui.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Yr(this)-t;if(!i)return;_t(this.doc,n)||dn(n,n.height+i),r&&rn(r,function(){r.curOp.forceUpdate=!0,$o(r,n,i),zt(r,"lineWidgetChanged",r,e,gt(n))})},E(ui);function $o(e,t,r){kt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&pa(e,r)}function wl(e,t,r,n){var i=new ui(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),oi(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&&!_t(e,o)){var l=kt(o)<e.scrollTop;dn(o,o.height+Yr(i)),l&&pa(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&zt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:gt(t)),i}var Yo=0,Hn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Yo};Hn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&sr(e),b(this,"clear")){var r=this.find();r&&zt(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=Rn(o.markedSpans,this);e&&!this.collapsed?Un(e,gt(o),"text"):e&&(s.to!=null&&(i=gt(o)),s.from!=null&&(n=gt(o))),o.markedSpans=ja(o.markedSpans,s),s.from==null&&this.collapsed&&!_t(this.doc,o)&&e&&dn(o,wr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=qe(this.lines[l]),y=Kt(u);y>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=y,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Zt(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&zt(e,"markerCleared",e,this,n,i),t&&lr(e),this.parent&&this.parent.clear()},Hn.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=Rn(a.markedSpans,this);if(o.from!=null&&(r=Ce(t?a:gt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Ce(t?a:gt(a),o.to),e==1))return n}return r&&{from:r,to:n}},Hn.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;rn(n,function(){var i=t.line,a=gt(t.line),o=na(n,a);if(o&&(Qa(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!_t(r.doc,i)&&r.height!=null){var s=r.height;r.height=null;var l=Yr(r)-s;l&&dn(i,i.height+l)}zt(n,"markerChanged",n,e)})},Hn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||J(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Hn.prototype.detachLine=function(e){if(this.lines.splice(J(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},E(Hn);function Mr(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return It(e.cm,Mr)(e,t,r,n,i);var a=new Hn(e,i),o=ut(t,r);if(n&&c(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=K("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Qi(e,t.line,t,r,a)||t.line!=r.line&&Qi(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ci()}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(_){l&&a.collapsed&&!l.options.lineWrapping&&qe(_)==l.display.maxLine&&(u=!0),a.collapsed&&s!=t.line&&dn(_,0),zr(_,new gr(a,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),a.collapsed&&e.iter(t.line,r.line+1,function(_){_t(e,_)&&dn(_,0)}),a.clearOnEnter&&ie(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(_i(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Yo,a.atomic=!0),l){if(u&&(l.curOp.updateMaxLine=!0),a.collapsed)Zt(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++)Un(l,y,"text");a.atomic&&Uo(l.doc),zt(l,"markerAdded",l,a)}return a}var ci=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};ci.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();zt(this,"clear")},ci.prototype.find=function(e,t){return this.primary.find(e,t)},E(ci);function El(e,t,r,n,i){n=c(n),n.shared=!1;var a=[Mr(e,t,r,n,i)],o=a[0],s=n.widgetNode;return zn(e,function(l){s&&(n.widgetNode=s.cloneNode(!0)),a.push(Mr(l,st(l,t),st(l,r),n,i));for(var u=0;u<l.linked.length;++u)if(l.linked[u].isParent)return;o=Oe(a)}),new ci(a,o)}function Jo(e){return e.findMarks(Ce(e.first,0),e.clipPos(Ce(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(ut(a,o)){var s=Mr(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];zn(i.primary.doc,function(l){return a.push(l)});for(var o=0;o<i.markers.length;o++){var s=i.markers[o];J(a,s.doc)==-1&&(s.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,Qt=function(e,t,r,n,i){if(!(this instanceof Qt))return new Qt(e,t,r,n,i);r==null&&(r=0),li.call(this,[new si([new Ct("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Ce(r,0);this.sel=Bn(a),this.history=new Ui(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ea(this,{from:a,to:a,text:e}),Gt(this,Bn(a),de)};Qt.prototype=je(li.prototype,{constructor:Qt,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=fr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:jt(function(e){var t=Ce(this.first,0),r=this.first+this.size-1;Or(this,{from:t,to:Ce(r,Ze(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Qr(this.cm,0,0),Gt(this,Bn(t),de)}),replaceRange:function(e,t,r,n){t=st(this,t),r=r?st(this,r):t,Lr(this,e,t,r,n)},getRange:function(e,t,r){var n=Sn(this,st(this,e),st(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(An(this,e))return Ze(this,e)},getLineNumber:function(e){return gt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ze(this,e)),qe(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(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:jt(function(e,t,r){No(this,st(this,typeof e=="number"?Ce(e,t||0):e),null,r)}),setSelection:jt(function(e,t,r){No(this,st(this,e),st(this,t||e),r)}),extendSelection:jt(function(e,t,r){Bi(this,st(this,e),t&&st(this,t),r)}),extendSelections:jt(function(e,t){Po(this,Ur(this,e),t)}),extendSelectionsBy:jt(function(e,t){var r=He(this.sel.ranges,e);Po(this,Ur(this,r),t)}),setSelections:jt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new vt(st(this,e[i].anchor),st(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Gt(this,vn(this.cm,n,t),r)}),addSelection:jt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vt(st(this,e),st(this,t||e))),Gt(this,vn(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=Sn(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=Sn(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:jt(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--)Or(this,n[l]);s?Io(this,s):this.cm&&Cr(this.cm)}),undo:jt(function(){Hi(this,"undo")}),redo:jt(function(){Hi(this,"redo")}),undoSelection:jt(function(){Hi(this,"undo",!0)}),redoSelection:jt(function(){Hi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ui(this.history.maxGeneration),zn(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:kr(this.history.done),undone:kr(this.history.undone)}},setHistory:function(e){var t=this.history=new Ui(this.history.maxGeneration);t.done=kr(e.done.slice(0),null,!0),t.undone=kr(e.undone.slice(0),null,!0)},setGutterMarker:jt(function(e,t,r){return oi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Ue(i)&&(n.gutterMarkers=null),!0})}),clearGutter:jt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&oi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Ue(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!An(this,e))return null;if(t=e,e=Ze(this,e),!e)return null}else if(t=gt(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:jt(function(e,t,r){return oi(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:jt(function(e,t,r){return oi(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:jt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Mr(this,st(this,e),st(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=st(this,e),Mr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=st(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=st(this,e),t=st(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}),st(this,Ce(r,t))},indexFromPos:function(e){e=st(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 Qt(fr(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 Qt(fr(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,Jo(this)),n},unlinkDoc:function(e){if(e instanceof Tt&&(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(Jo(this));break}if(e.history==this.history){var n=[e.id];zn(e,function(i){return n.push(i.id)},!0),e.history=new Ui(null),e.history.done=kr(this.history.done,n),e.history.undone=kr(this.history.undone,n)}},iterLinkedDocs:function(e){zn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):pt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:jt(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)})}),Qt.prototype.eachLine=Qt.prototype.iter;var Zo=0;function kl(e){var t=this;if(Qo(t),ue(t,e)||Ln(t.display,e))return;d(e),k&&(Zo=+new Date);var r=rr(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&&It(t,function(){r=st(t.doc,r);var A={from:r,to:r,text:t.doc.splitLines(a.filter(function(ne){return ne!=null}).join(t.doc.lineSeparator())),origin:"paste"};Or(t.doc,A),Io(t.doc,Bn(st(t.doc,r),st(t.doc,Wn(A))))})()},l=function(A,ne){if(t.options.allowDropFileTypes&&J(t.options.allowDropFileTypes,A.type)==-1){s();return}var pe=new FileReader;pe.onerror=function(){return s()},pe.onload=function(){var Te=pe.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Te)){s();return}a[ne]=Te,s()},pe.readAsText(A)},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 _;if(t.state.draggingText&&!t.state.draggingText.copy&&(_=t.listSelections()),Wi(t.doc,Bn(r,r)),_)for(var j=0;j<_.length;++j)Lr(t.doc,"",_[j].anchor,_[j].head,"drag");t.replaceSelection(y,"around","paste"),t.display.input.focus()}}catch(A){}}}function Tl(e,t){if(k&&(!e.state.draggingText||+new Date-Zo<100)){m(t);return}if(ue(e,t)||Ln(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!oe){var r=x("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=rr(e,t);if(!r)return;var n=document.createDocumentFragment();uo(e,r,n),e.display.dragCursor||(e.display.dragCursor=x("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Z(e.display.dragCursor,n)}function Qo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function qo(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 es=!1;function Ll(){if(es)return;Ml(),es=!0}function Ml(){var e;ie(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,qo(Dl)},100))}),ie(window,"blur",function(){return qo(_r)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Kn={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"},di=0;di<10;di++)Kn[di+48]=Kn[di+96]=String(di);for(var Ki=65;Ki<=90;Ki++)Kn[Ki]=String.fromCharCode(Ki);for(var fi=1;fi<=12;fi++)Kn[fi+111]=Kn[fi+63235]="F"+fi;var Mn={};Mn.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"},Mn.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"},Mn.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"},Mn.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"]},Mn.default=H?Mn.macDefault:Mn.pcDefault;function Al(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=He(r.split(" "),Al),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 Dr(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 Dr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Dr(e,t.fallthrough[a],r,n);if(o)return o}}}function ts(e){var t=typeof e=="string"?e:Kn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ns(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(ce?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(ce?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function rs(e,t){if(z&&e.keyCode==34&&e.char)return!1;var r=Kn[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ns(r,e,t))}function Xi(e){return typeof e=="string"?Mn[e]:e}function Ar(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&ut(a.from,Oe(n).to)<=0;){var o=n.pop();if(ut(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}rn(e,function(){for(var s=n.length-1;s>=0;s--)Lr(e.doc,"",n[s].from,n[s].to,"+delete");Cr(e)})}function ka(e,t,r){var n=_e(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ta(e,t,r){var n=ka(e,t.ch,r);return n==null?null:new Ce(t.line,n,r<0?"after":"before")}function Oa(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=Qe(r,t.doc.direction);if(a){var o=i<0?Oe(a):a[0],s=i<0==(o.level==1),l=s?"after":"before",u;if(o.level>0||t.doc.direction=="rtl"){var y=xr(t,r);u=i<0?r.text.length-1:0;var _=wn(t,y,u).top;u=Ye(function(j){return wn(t,y,j).top==_},i<0==(o.level==1)?o.from:o.to-1,u),l=="before"&&(u=ka(r,u,1))}else u=i<0?o.to:o.from;return new Ce(n,u,l)}}return new Ce(n,i<0?r.text.length:0,i<0?"before":"after")}function Pl(e,t,r,n){var i=Qe(t,e.doc.direction);if(!i)return Ta(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var a=Ke(i,r.ch,r.sticky),o=i[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from<r.ch))return Ta(t,r,n);var s=function(Pe,We){return ka(t,Pe instanceof Ce?Pe.ch:Pe,We)},l,u=function(Pe){return e.options.lineWrapping?(l=l||xr(e,t),ao(e,t,l,Pe)):{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 _=o.level==1==n<0,j=s(r,_?1:-1);if(j!=null&&(_?j<=o.to&&j<=y.end:j>=o.from&&j>=y.begin)){var A=_?"before":"after";return new Ce(r.line,j,A)}}var ne=function(Pe,We,Ne){for(var ze=function(Et,Ut){return Ut?new Ce(r.line,s(Et,1),"before"):new Ce(r.line,Et,"after")};Pe>=0&&Pe<i.length;Pe+=We){var it=i[Pe],et=We>0==(it.level!=1),ht=et?Ne.begin:s(Ne.end,-1);if(it.from<=ht&&ht<it.to)return ze(ht,et);if(ht=et?it.from:s(it.to,-1),Ne.begin<=ht&&ht<Ne.end)return ze(ht,et)}},pe=ne(a+n,n,y);if(pe)return pe;var Te=n>0?y.end:s(y.begin,-1);return Te!=null&&!(n>0&&Te==t.text.length)&&(pe=ne(n>0?0:i.length-1,n,u(Te)),pe)?pe:null}var hi={selectAll:Wo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),de)},killLine:function(e){return Ar(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:Ce(t.head.line+1,0)}:{from:t.head,to:Ce(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ar(e,function(t){return{from:Ce(t.from().line,0),to:st(e.doc,Ce(t.to().line+1,0))}})},delLineLeft:function(e){return Ar(e,function(t){return{from:Ce(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Ar(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 Ar(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(Ce(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ce(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return as(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")},fe)},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")},fe)},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/)?as(e,t.head):n},fe)},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=T(e.getLine(a.line),a.ch,n);t.push(B(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return rn(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 Ce(i.line,i.ch-1)),i.ch>0)i=new Ce(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Ce(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 Ce(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Ce(i.line-1,o.length-1),i,"+transpose"))}}r.push(new vt(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return rn(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);Cr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var r=Ze(e.doc,t),n=qe(r);return n!=r&&(t=gt(n)),Oa(!0,e,n,t,1)}function Nl(e,t){var r=Ze(e.doc,t),n=ct(r);return n!=r&&(t=gt(n)),Oa(!0,e,r,t,-1)}function as(e,t){var r=is(e,t.line),n=Ze(e.doc,r.line),i=Qe(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 Ce(r.line,o?0:a,r.sticky)}return r}function Gi(e,t,r){if(typeof t=="string"&&(t=hi[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)!=De}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=Dr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Dr(t,e.options.extraKeys,r,e)||Dr(t,e.options.keyMap,r,e)}var jl=new Q;function pi(e,t,r,n){var i=e.state.keySeq;if(i){if(ts(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())}),os(e,i+" "+t,r,n))return!0}return os(e,t,r,n)}function os(e,t,r,n){var i=Il(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&zt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(d(r),da(e)),!!i}function ss(e,t){var r=rs(t,!0);return r?t.shiftKey&&!e.state.keySeq?pi(e,"Shift-"+r,t,function(n){return Gi(e,n,!0)})||pi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Gi(e,n)}):pi(e,r,t,function(n){return Gi(e,n)}):!1}function Ul(e,t,r){return pi(e,"'"+r+"'",t,function(n){return Gi(e,n,!0)})}var La=null;function ls(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=V(),ue(t,e))return;k&&S<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ss(t,e);z&&(La=n?r:null,!n&&r==88&&!Bt&&(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;se(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(ee(t,"CodeMirror-crosshair"),Xe(document,"keyup",r),Xe(document,"mouseover",r))}ie(document,"keyup",r),ie(document,"mouseover",r)}function us(e){e.keyCode==16&&(this.doc.sel.shift=!1),ue(this,e)}function cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Ln(t.display,e)||ue(t,e)||e.ctrlKey&&!e.altKey||H&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(z&&r==La){La=null,d(e);return}if(z&&(!e.which||e.which<10)&&ss(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,Ma=function(e,t,r){this.time=e,this.pos=t,this.button=r};Ma.prototype.compare=function(e,t,r){return this.time+Bl>e&&ut(t,this.pos)==0&&r==this.button};var mi,gi;function Wl(e,t){var r=+new Date;return gi&&gi.compare(r,e,t)?(mi=gi=null,"triple"):mi&&mi.compare(r,e,t)?(gi=new Ma(r,e,t),mi=null,"double"):(mi=new Ma(r,e,t),gi=null,"single")}function ds(e){var t=this,r=t.display;if(ue(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Ln(r,e)){C||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Da(t,e))return;var n=rr(t,e),i=$(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&&d(e):i==2?(n&&Bi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(xe?t.display.input.onContextMenu(e):fo(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,pi(e,ns(a,i),i,function(o){if(typeof o=="string"&&(o=hi[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=De}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=me?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){k?setTimeout(v(co,e),0):e.curOp.focus=V();var i=Hl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&ve&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ut((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ut(o.to(),t)>0||t.xRel<0)?Xl(e,n,t,i):Gl(e,n,t,i)}function Xl(e,t,r,n){var i=e.display,a=!1,o=It(e,function(u){C&&(i.scroller.draggable=!1),e.state.draggingText=!1,Xe(i.wrapper.ownerDocument,"mouseup",o),Xe(i.wrapper.ownerDocument,"mousemove",s),Xe(i.scroller,"dragstart",l),Xe(i.scroller,"drop",o),a||(d(u),n.addNew||Bi(e.doc,r,null,null,n.extend),C&&!oe||k&&S==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};C&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ie(i.wrapper.ownerDocument,"mouseup",o),ie(i.wrapper.ownerDocument,"mousemove",s),ie(i.scroller,"dragstart",l),ie(i.scroller,"drop",o),fo(e),setTimeout(function(){return i.input.focus()},20)}function fs(e,t,r){if(r=="char")return new vt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new vt(Ce(t.line,0),st(e.doc,Ce(t.line+1,0)));var n=r(e,t);return new vt(n.from,n.to)}function Gl(e,t,r,n){var i=e.display,a=e.doc;d(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 vt(r,r)):(o=a.sel.primary(),s=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new vt(r,r)),r=rr(e,t,!0,!0),s=-1;else{var y=fs(e,r,n.unit);n.extend?o=Ca(o,y.anchor,y.head,n.extend):o=y}n.addNew?s==-1?(s=u.length,Gt(a,vn(e,u.concat([o]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&n.unit=="char"&&!n.extend?(Gt(a,vn(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):Sa(a,s,o,Le):(s=0,Gt(a,new ln([o],0),Le),l=a.sel);var _=r;function j(Ne){if(ut(_,Ne)==0)return;if(_=Ne,n.unit=="rectangle"){for(var ze=[],it=e.options.tabSize,et=T(Ze(a,r.line).text,r.ch,it),ht=T(Ze(a,Ne.line).text,Ne.ch,it),Et=Math.min(et,ht),Ut=Math.max(et,ht),Ot=Math.min(r.line,Ne.line),an=Math.min(e.lastLine(),Math.max(r.line,Ne.line));Ot<=an;Ot++){var qt=Ze(a,Ot).text,At=be(qt,Et,it);Et==Ut?ze.push(new vt(Ce(Ot,At),Ce(Ot,At))):qt.length>At&&ze.push(new vt(Ce(Ot,At),Ce(Ot,be(qt,Ut,it))))}ze.length||ze.push(new vt(r,r)),Gt(a,vn(e,l.ranges.slice(0,s).concat(ze),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ne)}else{var en=o,Ht=fs(e,Ne,n.unit),Nt=en.anchor,Rt;ut(Ht.anchor,Nt)>0?(Rt=Ht.head,Nt=Yn(en.from(),Ht.anchor)):(Rt=Ht.anchor,Nt=hr(en.to(),Ht.head));var Lt=l.ranges.slice(0);Lt[s]=Vl(e,new vt(st(a,Nt),Rt)),Gt(a,vn(e,Lt,s),Le)}}var A=i.wrapper.getBoundingClientRect(),ne=0;function pe(Ne){var ze=++ne,it=rr(e,Ne,!0,n.unit=="rectangle");if(!it)return;if(ut(it,_)!=0){e.curOp.focus=V(),j(it);var et=Pi(i,a);(it.line>=et.to||it.line<et.from)&&setTimeout(It(e,function(){ne==ze&&pe(Ne)}),150)}else{var ht=Ne.clientY<A.top?-20:Ne.clientY>A.bottom?20:0;ht&&setTimeout(It(e,function(){if(ne!=ze)return;i.scroller.scrollTop+=ht,pe(Ne)}),50)}}function Te(Ne){e.state.selectingText=!1,ne=Infinity,Ne&&(d(Ne),i.input.focus()),Xe(i.wrapper.ownerDocument,"mousemove",Pe),Xe(i.wrapper.ownerDocument,"mouseup",We),a.history.lastSelOrigin=null}var Pe=It(e,function(Ne){Ne.buttons===0||!$(Ne)?Te(Ne):pe(Ne)}),We=It(e,Te);e.state.selectingText=We,ie(i.wrapper.ownerDocument,"mousemove",Pe),ie(i.wrapper.ownerDocument,"mouseup",We)}function Vl(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(ut(r,n)==0&&r.sticky==n.sticky)return t;var a=Qe(i);if(!a)return t;var o=Ke(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=Ke(a,n.ch,n.sticky),_=y-o||(n.ch-r.ch)*(s.level==1?-1:1);y==l-1||y==l?u=_<0:u=_>0}var j=a[l+(u?-1:0)],A=u==(j.level==1),ne=A?j.from:j.to,pe=A?"after":"before";return r.ch==ne&&r.sticky==pe?t:new vt(new Ce(r.line,ne,pe),n)}function hs(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(j){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&d(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!b(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=kn(e.doc,a),_=e.display.gutterSpecs[l];return q(e,r,e,y,_.className,t),h(t)}}}function Da(e,t){return hs(e,t,"gutterClick",!0)}function ps(e,t){if(Ln(e.display,t)||$l(e,t))return;if(ue(e,t,"contextmenu"))return;xe||e.display.input.onContextMenu(t)}function $l(e,t){return b(e,"gutterContextMenu")?hs(e,t,"gutterContextMenu",!1):!1}function ms(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Jr(e)}var Rr={toString:function(){return"CodeMirror.Init"}},gs={},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!=Rr&&a(s,l,u)}:a)}e.defineOption=r,e.Init=Rr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,wa(n)},!0),r("indentUnit",2,wa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){ii(n),Jr(n),Zt(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(Ce(o,y))}o++});for(var s=a.length-1;s>=0;s--)Lr(n.doc,i,a[s],Ce(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!=Rr&&n.refresh()}),r("specialCharPlaceholder",Cs,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",G?"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",!Ie),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ms(n),ri(n)},!0),r("keyMap","default",function(n,i,a){var o=Xi(i),s=a!=Rr&&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=ya(i,n.options.lineNumbers),ri(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?ua(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Sr(n)},!0),r("scrollbarStyle","native",function(n){bo(n),Sr(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=ya(n.options.gutters,i),ri(n)},!0),r("firstLineNumber",1,ri,!0),r("lineNumberFormatter",function(n){return n},ri,!0),r("showCursorWhenSelecting",!1,Zr,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(_r(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,Zr,!0),r("singleCursorHeightPerLine",!0,Zr,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ii,!0),r("addModeClass",!1,ii,!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,ii,!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!=Rr;if(!t!=!n){var i=e.display.dragFunctions,a=t?ie:Xe;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?(se(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ee(e.display.wrapper,"CodeMirror-wrap"),mn(e)),ca(e),Zt(e),Jr(e),setTimeout(function(){return Sr(e)},100)}function Tt(e,t){var r=this;if(!(this instanceof Tt))return new Tt(e,t);this.options=t=t?c(t):{},c(gs,t,!1);var n=t.value;typeof n=="string"?n=new Qt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Tt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,ms(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bo(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 Q,keySeq:null,specialChars:null},t.autofocus&&!G&&a.input.focus(),k&&S<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ql(this),Ll(),sr(this),this.curOp.forceUpdate=!0,Oo(this,n),t.autofocus&&!G||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&fa(r)},20):_r(this);for(var o in Vi)Vi.hasOwnProperty(o)&&Vi[o](this,t[o],Rr);wo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Aa.length;++s)Aa[s](this);lr(this),C&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Tt.defaults=gs,Tt.optionHandlers=Vi;function Ql(e){var t=e.display;ie(t.scroller,"mousedown",It(e,ds)),k&&S<11?ie(t.scroller,"dblclick",It(e,function(l){if(ue(e,l))return;var u=rr(e,l);if(!u||Da(e,l)||Ln(e.display,l))return;d(l);var y=e.findWordAt(u);Bi(e.doc,y.anchor,y.head)})):ie(t.scroller,"dblclick",function(l){return ue(e,l)||d(l)}),ie(t.scroller,"contextmenu",function(l){return ps(e,l)}),ie(t.input.getField(),"contextmenu",function(l){t.scroller.contains(l.target)||ps(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,_=u.top-l.top;return y*y+_*_>20*20}ie(t.scroller,"touchstart",function(l){if(!ue(e,l)&&!a(l)&&!Da(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)}}),ie(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ie(t.scroller,"touchend",function(l){var u=t.activeTouch;if(u&&!Ln(t,l)&&u.left!=null&&!u.moved&&new Date-u.start<300){var y=e.coordsChar(t.activeTouch,"page"),_;!u.prev||o(u,u.prev)?_=new vt(y,y):!u.prev.prev||o(u,u.prev.prev)?_=e.findWordAt(y):_=new vt(Ce(y.line,0),st(e.doc,Ce(y.line+1,0))),e.setSelection(_.anchor,_.head),e.focus(),d(l)}i()}),ie(t.scroller,"touchcancel",i),ie(t.scroller,"scroll",function(){t.scroller.clientHeight&&(qr(e,t.scroller.scrollTop),ar(e,t.scroller.scrollLeft,!0),q(e,"scroll",e))}),ie(t.scroller,"mousewheel",function(l){return Co(e,l)}),ie(t.scroller,"DOMMouseScroll",function(l){return Co(e,l)}),ie(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(l){ue(e,l)||m(l)},over:function(l){ue(e,l)||(Ol(e,l),m(l))},start:function(l){return Tl(e,l)},drop:It(e,kl),leave:function(l){ue(e,l)||Qo(e)}};var s=t.input.getField();ie(s,"keyup",function(l){return us.call(e,l)}),ie(s,"keydown",It(e,ls)),ie(s,"keypress",It(e,cs)),ie(s,"focus",function(l){return fa(e,l)}),ie(s,"blur",function(l){return _r(e,l)})}var Aa=[];Tt.defineInitHook=function(e){return Aa.push(e)};function vi(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=nn(e,t).state:r="prev");var o=e.options.tabSize,s=Ze(i,t),l=T(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==De||y>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?y=T(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 _="",j=0;if(e.options.indentWithTabs)for(var A=Math.floor(y/o);A;--A)j+=o,_+=" ";if(j<y&&(_+=B(y-j)),_!=u)return Lr(i,_,Ce(t,0),Ce(t,u.length),"+input"),s.stateAfter=null,!0;for(var ne=0;ne<i.sel.ranges.length;ne++){var pe=i.sel.ranges[ne];if(pe.head.line==t&&pe.head.ch<u.length){var Te=Ce(t,u.length);Sa(i,ne,new vt(Te,Te));break}}}var bn=null;function $i(e){bn=e}function Ra(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=pt(t),u=null;if(s&&n.ranges.length>1)if(bn&&bn.text.join(`
|
|
`)==t){if(n.ranges.length%bn.text.length==0){u=[];for(var y=0;y<bn.text.length;y++)u.push(a.splitLines(bn.text[y]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=He(l,function(Pe){return[Pe]}));for(var _=e.curOp.updateInput,j=n.ranges.length-1;j>=0;j--){var A=n.ranges[j],ne=A.from(),pe=A.to();A.empty()&&(r&&r>0?ne=Ce(ne.line,ne.ch-r):e.state.overwrite&&!s?pe=Ce(pe.line,Math.min(Ze(a,pe.line).text.length,pe.ch+Oe(l).length)):s&&bn&&bn.lineWise&&bn.text.join(`
|
|
`)==l.join(`
|
|
`)&&(ne=pe=Ce(ne.line,0)));var Te={from:ne,to:pe,text:u?u[j%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Or(e.doc,Te),zt(e,"inputRead",e,Te)}t&&!s&&bs(e,t),Cr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=_),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function vs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&rn(t,function(){return Ra(t,r,0,null,"paste")}),!0}function bs(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=vi(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=vi(e,i.head.line,"smart")));o&&zt(e,"electricInput",e,i.head.line)}}function ys(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:Ce(i,0),head:Ce(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function xs(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ws(){var e=x("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=x("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return C?e.style.width="1000px":e.setAttribute("wrap","off"),L&&(e.style.border="1px solid black"),xs(e),t}function ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var a=this.options,o=a[n];if(a[n]==i&&n!="mode")return;a[n]=i,t.hasOwnProperty(n)&&It(this,t[n])(this,i,o),q(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:Yt(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");$e(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,Zt(this)}),removeOverlay:Yt(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++,Zt(this);return}}}),indentLine:Yt(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),An(this.doc,n)&&vi(this,n,i,a)}),indentSelection:Yt(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&&(vi(this,s.head.line,n,!0),a=s.head.line,o==this.doc.sel.primIndex&&Cr(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 _=y;_<a;++_)vi(this,_,n);var j=this.doc.sel.ranges;l.ch==0&&i.length==j.length&&j[o].from().ch>0&&Sa(this.doc,o,new vt(l,j[o].to()),de)}}}),getTokenAt:function(n,i){return On(this,n,i)},getLineTokens:function(n,i){return On(this,Ce(n),i,!0)},getTokenTypeAt:function(n){n=st(this.doc,n);var i=Fr(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 _=o._global[y];_.pred(s,this)&&J(a,_.val)==-1&&a.push(_.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=Jn(a,n==null?a.first+a.size-1:n),nn(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=st(this.doc,n):a=n?o.from():o.to(),gn(this,a,i||"page")},charCoords:function(n,i){return ia(this,st(this.doc,n),i||"page")},coordsChar:function(n,i){return n=no(this,n,i||"page"),oa(this,n.left,n.top)},lineAtHeight:function(n,i){return n=no(this,{top:n,left:0},i||"page").top,kn(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-kt(s):0)},defaultTextHeight:function(){return wr(this.display)},defaultCharWidth:function(){return Er(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=gn(this,st(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 _=Math.max(l.wrapper.clientHeight,this.doc.height),j=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>_)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=_&&(u=n.bottom),y+i.offsetWidth>j&&(y=j-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:Yt(ls),triggerOnKeyPress:Yt(cs),triggerOnKeyUp:us,triggerOnMouseDown:Yt(ds),execCommand:function(n){if(hi.hasOwnProperty(n))return hi[n].call(null,this)},triggerElectric:Yt(function(n){bs(this,n)}),findPosH:function(n,i,a,o){var s=1;i<0&&(s=-1,i=-i);for(var l=st(this.doc,n),u=0;u<i&&!(l=Pa(this.doc,l,s,a,o),l.hitSide);++u);return l},moveH:Yt(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Pa(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},fe)}),deleteH:Yt(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Ar(this,function(s){var l=Pa(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=st(this.doc,n),y=0;y<i;++y){var _=gn(this,u,"div");if(l==null?l=_.left:_.left=l,u=Es(this,_,s,a),u.hitSide)break}return u},moveV:Yt(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 _=gn(a,y.head,"div");y.goalColumn!=null&&(_.left=y.goalColumn),s.push(_.left);var j=Es(a,_,n,i);return i=="page"&&y==o.sel.primary()&&pa(a,ia(a,j,"div").top-_.top),j},fe),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(_){return Re(_,l)}:/\s/.test(u)?function(_){return/\s/.test(_)}:function(_){return!/\s/.test(_)&&!Re(_)};o>0&&y(a.charAt(o-1));)--o;for(;s<a.length&&y(a.charAt(s));)++s}return new vt(Ce(n.line,o),Ce(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?se(this.display.cursorDiv,"CodeMirror-overwrite"):ee(this.display.cursorDiv,"CodeMirror-overwrite"),q(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==V()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Yt(function(n,i){Qr(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-xn(this)-this.display.barHeight,width:n.scrollWidth-xn(this)-this.display.barWidth,clientHeight:ta(this),clientWidth:tr(this)}},scrollIntoView:Yt(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:Ce(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):po(this,n.from,n.to,n.margin)}),setSize:Yt(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&&qa(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){Un(a,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,q(this,"refresh",this)}),operation:function(n){return rn(this,n)},startOperation:function(){return sr(this)},endOperation:function(){return lr(this)},refresh:Yt(function(){var n=this.display.cachedTextHeight;Zt(this),this.curOp.forceUpdate=!0,Jr(this),Qr(this,this.doc.scrollLeft,this.doc.scrollTop),va(this.display),(n==null||Math.abs(n-wr(this.display))>.5||this.options.lineWrapping)&&ca(this),q(this,"refresh",this)}),swapDoc:Yt(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Oo(this,n),Jr(this),this.display.input.reset(),Qr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,zt(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}},E(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 Pa(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 We=t.line+l;return We<e.first||We>=e.first+e.size?!1:(t=new Ce(We,t.ch,t.sticky),s=Ze(e,We))}function y(We){var Ne;if(n=="codepoint"){var ze=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(ze)?Ne=null:Ne=new Ce(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(ze>=55296&&ze<56320?2:1))),-r)}else i?Ne=Pl(e.cm,s,t,r):Ne=Ta(s,t,r);if(Ne==null)if(!We&&u())t=Oa(i,e.cm,s,t.line,l);else return!1;else t=Ne;return!0}if(n=="char"||n=="codepoint")y();else if(n=="column")y(!0);else if(n=="word"||n=="group")for(var _=null,j=n=="group",A=e.cm&&e.cm.getHelper(t,"wordChars"),ne=!0;!(r<0&&!y(!ne));ne=!1){var pe=s.text.charAt(t.ch)||`
|
|
`,Te=Re(pe,A)?"w":j&&pe==`
|
|
`?"n":!j||/\s/.test(pe)?null:"p";if(j&&!ne&&!Te&&(Te="s"),_&&_!=Te){r<0&&(r=1,y(),t.sticky="after");break}if(Te&&(_=Te),r>0&&!y(!ne))break}var Pe=zi(e,t,a,o,!0);return Me(a,Pe)&&(Pe.hitSide=!0),Pe}function Es(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*wr(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=oa(e,a,o),!u.outside);){if(r<0?o<=0:o>=i.height){u.hitSide=!0;break}o+=r*5}return u}var yt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};yt.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;xs(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(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}ie(i,"paste",function(s){if(!a(s)||ue(n,s)||vs(s,n))return;S<=11&&setTimeout(It(n,function(){return t.updateFromDOM()}),20)}),ie(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),ie(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),ie(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ie(i,"touchstart",function(){return r.forceCompositionEnd()}),ie(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!a(s)||ue(n,s))return;if(n.somethingSelected())$i({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var l=ys(n);$i({lineWise:!0,text:l.text}),s.type=="cut"&&n.operation(function(){n.setSelections(l.ranges,0,de),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var u=bn.text.join(`
|
|
`);if(s.clipboardData.setData("Text",u),s.clipboardData.getData("Text")==u){s.preventDefault();return}}var y=ws(),_=y.firstChild;n.display.lineSpace.insertBefore(y,n.display.lineSpace.firstChild),_.value=bn.text.join(`
|
|
`);var j=document.activeElement;Se(_),setTimeout(function(){n.display.lineSpace.removeChild(y),j.focus(),j==i&&r.showPrimarySelection()},50)}ie(i,"copy",o),ie(i,"cut",o)},yt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},yt.prototype.prepareSelection=function(){var e=lo(this.cm,!1);return e.focus=document.activeElement==this.div,e},yt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},yt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},yt.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=Yi(t,e.anchorNode,e.anchorOffset),o=Yi(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&ut(Yn(a,o),n)==0&&ut(hr(a,o),i)==0)return;var s=t.display.view,l=n.line>=t.display.viewFrom&&_s(t,n)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&_s(t,i);if(!u){var y=s[s.length-1].measure,_=y.maps?y.maps[y.maps.length-1]:y.map;u={node:_[_.length-1],offset:_[_.length-2]-_[_.length-3]}}if(!l||!u){e.removeAllRanges();return}var j=e.rangeCount&&e.getRangeAt(0),A;try{A=P(l.node,l.offset,u.offset,u.node)}catch(ne){}A&&(!W&&t.state.focused?(e.collapse(l.node,l.offset),A.collapsed||(e.removeAllRanges(),e.addRange(A))):(e.removeAllRanges(),e.addRange(A)),j&&e.anchorNode==null?e.addRange(j):W&&this.startGracePeriod()),this.rememberSelection()},yt.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)},yt.prototype.showMultipleSelections=function(e){Z(this.cm.display.cursorDiv,e.cursors),Z(this.cm.display.selectionDiv,e.selection)},yt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},yt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return w(this.div,t)},yt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},yt.prototype.blur=function(){this.div.blur()},yt.prototype.getField=function(){return this.div},yt.prototype.supportsTouch=function(){return!0},yt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():rn(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)},yt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},yt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(O&&N&&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=Yi(t,e.anchorNode,e.anchorOffset),n=Yi(t,e.focusNode,e.focusOffset);r&&n&&rn(t,function(){Gt(t.doc,Bn(r,n),de),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},yt.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=Ce(n.line-1,Ze(e.doc,n.line-1).length)),i.ch==Ze(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Ce(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;n.line==t.viewFrom||(a=ir(e,n.line))==0?(o=gt(t.view[0].line),s=t.view[0].node):(o=gt(t.view[a].line),s=t.view[a-1].node.nextSibling);var l=ir(e,i.line),u,y;if(l==t.view.length-1?(u=t.viewTo-1,y=t.lineDiv.lastChild):(u=gt(t.view[l+1].line)-1,y=t.view[l+1].node.previousSibling),!s)return!1;for(var _=e.doc.splitLines(tu(e,s,y,o,u)),j=Sn(e.doc,Ce(o,0),Ce(u,Ze(e.doc,u).text.length));_.length>1&&j.length>1;)if(Oe(_)==Oe(j))_.pop(),j.pop(),u--;else if(_[0]==j[0])_.shift(),j.shift(),o++;else break;for(var A=0,ne=0,pe=_[0],Te=j[0],Pe=Math.min(pe.length,Te.length);A<Pe&&pe.charCodeAt(A)==Te.charCodeAt(A);)++A;for(var We=Oe(_),Ne=Oe(j),ze=Math.min(We.length-(_.length==1?A:0),Ne.length-(j.length==1?A:0));ne<ze&&We.charCodeAt(We.length-ne-1)==Ne.charCodeAt(Ne.length-ne-1);)++ne;if(_.length==1&&j.length==1&&o==n.line)for(;A&&A>n.ch&&We.charCodeAt(We.length-ne-1)==Ne.charCodeAt(Ne.length-ne-1);)A--,ne++;_[_.length-1]=We.slice(0,We.length-ne).replace(/^\u200b+/,""),_[0]=_[0].slice(A).replace(/\u200b+$/,"");var it=Ce(o,A),et=Ce(u,j.length?Oe(j).length-ne:0);if(_.length>1||_[0]||ut(it,et))return Lr(e.doc,_,it,et,"+input"),!0},yt.prototype.ensurePolled=function(){this.forceCompositionEnd()},yt.prototype.reset=function(){this.forceCompositionEnd()},yt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},yt.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)},yt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&rn(this.cm,function(){return Zt(e.cm)})},yt.prototype.setUneditable=function(e){e.contentEditable="false"},yt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||It(this.cm,Ra)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},yt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},yt.prototype.onContextMenu=function(){},yt.prototype.resetPosition=function(){},yt.prototype.needsContentAttribute=!0;function _s(e,t){var r=na(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=$a(r,n,t.line),a=Qe(n,e.doc.direction),o="left";if(a){var s=Ke(a,t.ch);o=s%2?"right":"left"}var l=Za(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 Pr(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(A){return function(ne){return ne.id==A}}function y(){o&&(a+=s,l&&(a+=s),o=l=!1)}function _(A){A&&(y(),a+=A)}function j(A){if(A.nodeType==1){var ne=A.getAttribute("cm-text");if(ne){_(ne);return}var pe=A.getAttribute("cm-marker"),Te;if(pe){var Pe=e.findMarks(Ce(n,0),Ce(i+1,0),u(+pe));Pe.length&&(Te=Pe[0].find(0))&&_(Sn(e.doc,Te.from,Te.to).join(s));return}if(A.getAttribute("contenteditable")=="false")return;var We=/^(pre|div|p|li|table|br)$/i.test(A.nodeName);if(!/^br$/i.test(A.nodeName)&&A.textContent.length==0)return;We&&y();for(var Ne=0;Ne<A.childNodes.length;Ne++)j(A.childNodes[Ne]);/^(pre|p)$/i.test(A.nodeName)&&(l=!0),We&&(o=!0)}else A.nodeType==3&&_(A.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(j(t),t==r);)t=t.nextSibling,l=!1;return a}function Yi(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Pr(e.clipPos(Ce(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||!w(n,t))return Pr(Ce(gt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?Oe(e.rest):e.line;return Pr(Ce(gt(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(Te,Pe,We){for(var Ne=-1;Ne<(u?u.length:0);Ne++)for(var ze=Ne<0?l.map:u[Ne],it=0;it<ze.length;it+=3){var et=ze[it+2];if(et==Te||et==Pe){var ht=gt(Ne<0?e.line:e.rest[Ne]),Et=ze[it]+We;return(We<0||et!=Te)&&(Et=ze[it+(We?1:0)]),Ce(ht,Et)}}}var _=y(o,s,r);if(_)return Pr(_,i);for(var j=s.nextSibling,A=o?o.nodeValue.length-r:0;j;j=j.nextSibling){if(_=y(j,j.firstChild,0),_)return Pr(Ce(_.line,_.ch-A),i);A+=j.textContent.length}for(var ne=s.previousSibling,pe=r;ne;ne=ne.previousSibling){if(_=y(ne,ne.firstChild,-1),_)return Pr(Ce(_.line,_.ch+pe),i);pe+=ne.textContent.length}}var Dt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Q,this.hasSelection=!1,this.composing=null};Dt.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),L&&(i.style.width="0px"),ie(i,"input",function(){k&&S>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),ie(i,"paste",function(o){if(ue(n,o)||vs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(ue(n,o))return;if(n.somethingSelected())$i({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=ys(n);$i({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,de):(r.prevInput="",i.value=s.text.join(`
|
|
`),Se(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}ie(i,"cut",a),ie(i,"copy",a),ie(e.scroller,"paste",function(o){if(Ln(e,o)||ue(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)}),ie(e.lineSpace,"selectstart",function(o){Ln(e,o)||d(o)}),ie(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"})}}),ie(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Dt.prototype.createField=function(e){this.wrapper=ws(),this.textarea=this.wrapper.firstChild},Dt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Dt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=lo(e);if(e.options.moveInputWithCursor){var i=gn(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},Dt.prototype.showSelection=function(e){var t=this.cm,r=t.display;Z(r.cursorDiv,e.cursors),Z(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Dt.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&&Se(this.textarea),k&&S>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",k&&S>=9&&(this.hasSelection=null))},Dt.prototype.getField=function(){return this.textarea},Dt.prototype.supportsTouch=function(){return!1},Dt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!G||V()!=this.textarea))try{this.textarea.focus()}catch(e){}},Dt.prototype.blur=function(){this.textarea.blur()},Dt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Dt.prototype.receivedFocus=function(){this.slowPoll()},Dt.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()})},Dt.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)},Dt.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||lt(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(k&&S>=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 rn(t,function(){Ra(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},Dt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Dt.prototype.onKeyPress=function(){k&&S>=9&&(this.hasSelection=null),this.fastPoll()},Dt.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=rr(r,e),o=n.scroller.scrollTop;if(!a||z)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&It(r,Gt)(r.doc,Bn(a),de);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: `+(k?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var _;C&&(_=window.scrollY),n.input.focus(),C&&window.scrollTo(null,_),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=A,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function j(){if(i.selectionStart!=null){var pe=r.somethingSelected(),Te="\u200B"+(pe?i.value:"");i.value="\u21DA",i.value=Te,t.prevInput=pe?"":"\u200B",i.selectionStart=1,i.selectionEnd=Te.length,n.selForContextMenu=r.doc.sel}}function A(){if(t.contextMenuPending!=A)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=l,k&&S<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!k||k&&S<9)&&j();var pe=0,Te=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?It(r,Wo)(r):pe++<10?n.detectingSelectAll=setTimeout(Te,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Te,200)}}if(k&&S>=9&&j(),xe){m(e);var ne=function(){Xe(window,"mouseup",ne),setTimeout(A,20)};ie(window,"mouseup",ne)}else setTimeout(A,50)},Dt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Dt.prototype.setUneditable=function(){},Dt.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?c(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&&(ie(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&&(Xe(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=Tt(function(l){return e.parentNode.insertBefore(l,e.nextSibling)},t);return s}function iu(e){e.off=Xe,e.on=ie,e.wheelEventPixels=dl,e.Doc=Qt,e.splitLines=pt,e.countColumn=T,e.findColumn=be,e.isWordChar=Ee,e.Pass=De,e.signal=q,e.Line=Ct,e.changeEnd=Wn,e.scrollbarModel=vo,e.Pos=Ce,e.cmpPos=ut,e.modes=Wt,e.mimeModes=mt,e.resolveMode=un,e.getMode=Cn,e.modeExtensions=pn,e.extendMode=bi,e.copyState=cn,e.startState=dr,e.innerMode=Vn,e.commands=hi,e.keyMap=Mn,e.keyName=rs,e.isModifierKey=ts,e.lookupKey=Dr,e.normalizeKeyMap=Rl,e.StringStream=St,e.SharedTextMarker=ci,e.TextMarker=Hn,e.LineWidget=ui,e.e_preventDefault=d,e.e_stopPropagation=f,e.e_stop=m,e.addClass=se,e.contains=w,e.rmClass=ee,e.keyNames=Kn}Yl(Tt),ql(Tt);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ji in Qt.prototype)Qt.prototype.hasOwnProperty(Ji)&&J(au,Ji)<0&&(Tt.prototype[Ji]=function(e){return function(){return e.apply(this.doc,arguments)}}(Qt.prototype[Ji]));return E(Qt),Tt.inputStyles={textarea:Dt,contenteditable:yt},Tt.defineMode=function(e){!Tt.defaults.mode&&e!="null"&&(Tt.defaults.mode=e),_n.apply(this,arguments)},Tt.defineMIME=Gn,Tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Tt.defineMIME("text/plain","null"),Tt.defineExtension=function(e,t){Tt.prototype[e]=t},Tt.defineDocExtension=function(e,t){Qt.prototype[e]=t},Tt.fromTextArea=ru,iu(Tt),Tt.version="5.58.2",Tt})},Y1PL:function(ot,Be,p){"use strict";p.r(Be),p.d(Be,"ResizableTextArea",function(){return J});var M=p("wx14"),we=p("1OyB"),W=p("vuIU"),le=p("Ji7U"),ae=p("LK+K"),te=p("q1tI"),k=p("VTBJ"),S=p("rePB"),C=p("Zm9Q"),re=p("Kwbf"),N=p("c+Xe"),z=p("m+aA"),oe=p("bdgK"),U=new Map;function D(de){de.forEach(function(Le){var fe,be=Le.target;(fe=U.get(be))===null||fe===void 0||fe.forEach(function(I){return I(be)})})}var L=new oe.default(D),O=null,G=null;function H(de,Le){U.has(de)||(U.set(de,new Set),L.observe(de)),U.get(de).add(Le)}function me(de,Le){U.has(de)&&(U.get(de).delete(Le),U.get(de).size||(L.unobserve(de),U.delete(de)))}var Ie=function(de){Object(le.a)(fe,de);var Le=Object(ae.a)(fe);function fe(){return Object(we.a)(this,fe),Le.apply(this,arguments)}return Object(W.a)(fe,[{key:"render",value:function(){return this.props.children}}]),fe}(te.Component),Y=te.createContext(null);function ce(de){var Le=de.children,fe=de.onBatchResize,be=te.useRef(0),I=te.useRef([]),B=te.useContext(Y),Oe=te.useCallback(function(He,$e,Ae){be.current+=1;var je=be.current;I.current.push({size:He,element:$e,data:Ae}),Promise.resolve().then(function(){je===be.current&&(fe==null||fe(I.current),I.current=[])}),B==null||B(He,$e,Ae)},[fe,B]);return te.createElement(Y.Provider,{value:Oe},Le)}function xe(de){var Le=de.children,fe=de.disabled,be=te.useRef(null),I=te.useRef(null),B=te.useContext(Y),Oe=te.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),He=te.isValidElement(Le)&&Object(N.c)(Le),$e=He?Le.ref:null,Ae=te.useMemo(function(){return Object(N.a)($e,be)},[$e,be]),je=te.useRef(de);je.current=de;var ye=te.useCallback(function(Ee){var Re=je.current,Ue=Re.onResize,Fe=Re.data,he=Ee.getBoundingClientRect(),_e=he.width,Ye=he.height,Je=Ee.offsetWidth,Ge=Ee.offsetHeight,Ke=Math.floor(_e),rt=Math.floor(Ye);if(Oe.current.width!==Ke||Oe.current.height!==rt||Oe.current.offsetWidth!==Je||Oe.current.offsetHeight!==Ge){var Qe={width:Ke,height:rt,offsetWidth:Je,offsetHeight:Ge};Oe.current=Qe;var Ve=Je===Math.round(_e)?_e:Je,ie=Ge===Math.round(Ye)?Ye:Ge,nt=Object(k.a)(Object(k.a)({},Qe),{},{offsetWidth:Ve,offsetHeight:ie});B==null||B(nt,Ee,Fe),Ue&&Promise.resolve().then(function(){Ue(nt,Ee)})}},[]);return te.useEffect(function(){var Ee=Object(z.a)(be.current)||Object(z.a)(I.current);return Ee&&!fe&&H(Ee,ye),function(){return me(Ee,ye)}},[be.current,fe]),te.createElement(Ie,{ref:I},He?te.cloneElement(Le,{ref:Ae}):Le)}var F="rc-observer-key";function ee(de){var Le=de.children,fe=Object(C.a)(Le);return fe.map(function(be,I){var B=(be==null?void 0:be.key)||"".concat(F,"-").concat(I);return te.createElement(xe,Object(M.a)({},de,{key:B}),be)})}ee.Collection=ce;var ge=ee,Z=p("bT9E"),x=p("TSYQ"),K=p.n(x),P=`
|
|
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
|
|
`,w=["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={},se;function X(de){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=de.getAttribute("id")||de.getAttribute("data-reactid")||de.getAttribute("name");if(Le&&V[fe])return V[fe];var be=window.getComputedStyle(de),I=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),B=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),Oe=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),He=w.map(function(Ae){return"".concat(Ae,":").concat(be.getPropertyValue(Ae))}).join(";"),$e={sizingStyle:He,paddingSize:B,borderSize:Oe,boxSizing:I};return Le&&fe&&(V[fe]=$e),$e}function Se(de){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;se||(se=document.createElement("textarea"),se.setAttribute("tab-index","-1"),se.setAttribute("aria-hidden","true"),document.body.appendChild(se)),de.getAttribute("wrap")?se.setAttribute("wrap",de.getAttribute("wrap")):se.removeAttribute("wrap");var I=X(de,Le),B=I.paddingSize,Oe=I.borderSize,He=I.boxSizing,$e=I.sizingStyle;se.setAttribute("style","".concat($e,";").concat(P)),se.value=de.value||de.placeholder||"";var Ae=Number.MIN_SAFE_INTEGER,je=Number.MAX_SAFE_INTEGER,ye=se.scrollHeight,Ee;if(He==="border-box"?ye+=Oe:He==="content-box"&&(ye-=B),fe!==null||be!==null){se.value=" ";var Re=se.scrollHeight-B;fe!==null&&(Ae=Re*fe,He==="border-box"&&(Ae=Ae+B+Oe),ye=Math.max(Ae,ye)),be!==null&&(je=Re*be,He==="border-box"&&(je=je+B+Oe),Ee=ye>je?"":"hidden",ye=Math.min(je,ye))}return{height:ye,minHeight:Ae,maxHeight:je,overflowY:Ee,resize:"none"}}var v=p("Gytx"),c=p.n(v),T;(function(de){de[de.NONE=0]="NONE",de[de.RESIZING=1]="RESIZING",de[de.RESIZED=2]="RESIZED"})(T||(T={}));var Q=function(de){Object(le.a)(fe,de);var Le=Object(ae.a)(fe);function fe(be){var I;return Object(we.a)(this,fe),I=Le.call(this,be),I.nextFrameActionId=void 0,I.resizeFrameId=void 0,I.textArea=void 0,I.saveTextArea=function(B){I.textArea=B},I.handleResize=function(B){var Oe=I.state.resizeStatus,He=I.props,$e=He.autoSize,Ae=He.onResize;if(Oe!==T.NONE)return;typeof Ae=="function"&&Ae(B),$e&&I.resizeOnNextFrame()},I.resizeOnNextFrame=function(){cancelAnimationFrame(I.nextFrameActionId),I.nextFrameActionId=requestAnimationFrame(I.resizeTextarea)},I.resizeTextarea=function(){var B=I.props.autoSize;if(!B||!I.textArea)return;var Oe=B.minRows,He=B.maxRows,$e=Se(I.textArea,!1,Oe,He);I.setState({textareaStyles:$e,resizeStatus:T.RESIZING},function(){cancelAnimationFrame(I.resizeFrameId),I.resizeFrameId=requestAnimationFrame(function(){I.setState({resizeStatus:T.RESIZED},function(){I.resizeFrameId=requestAnimationFrame(function(){I.setState({resizeStatus:T.NONE}),I.fixFirefoxAutoScroll()})})})})},I.renderTextArea=function(){var B=I.props,Oe=B.prefixCls,He=Oe===void 0?"rc-textarea":Oe,$e=B.autoSize,Ae=B.onResize,je=B.className,ye=B.disabled,Ee=I.state,Re=Ee.textareaStyles,Ue=Ee.resizeStatus,Fe=Object(Z.a)(I.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),he=K()(He,je,Object(S.a)({},"".concat(He,"-disabled"),ye));"value"in Fe&&(Fe.value=Fe.value||"");var _e=Object(k.a)(Object(k.a)(Object(k.a)({},I.props.style),Re),Ue===T.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return te.createElement(ge,{onResize:I.handleResize,disabled:!($e||Ae)},te.createElement("textarea",Object(M.a)({},Fe,{className:he,style:_e,ref:I.saveTextArea})))},I.state={textareaStyles:{},resizeStatus:T.NONE},I}return Object(W.a)(fe,[{key:"componentDidUpdate",value:function(I){(I.value!==this.props.value||!c()(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,B=this.textArea.selectionEnd;this.textArea.setSelectionRange(I,B)}}catch(Oe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),fe}(te.Component),J=Q,ke=function(de){Object(le.a)(fe,de);var Le=Object(ae.a)(fe);function fe(be){var I;Object(we.a)(this,fe),I=Le.call(this,be),I.resizableTextArea=void 0,I.focus=function(){I.resizableTextArea.textArea.focus()},I.saveTextArea=function(Oe){I.resizableTextArea=Oe},I.handleChange=function(Oe){var He=I.props.onChange;I.setValue(Oe.target.value,function(){I.resizableTextArea.resizeTextarea()}),He&&He(Oe)},I.handleKeyDown=function(Oe){var He=I.props,$e=He.onPressEnter,Ae=He.onKeyDown;Oe.keyCode===13&&$e&&$e(Oe),Ae&&Ae(Oe)};var B=typeof be.value=="undefined"||be.value===null?be.defaultValue:be.value;return I.state={value:B},I}return Object(W.a)(fe,[{key:"setValue",value:function(I,B){"value"in this.props||this.setState({value:I},B)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return te.createElement(J,Object(M.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}}]),fe}(te.Component),De=Be.default=ke},ZW9T:function(ot,Be,p){"use strict";p.d(Be,"a",function(){return Ie});var M=p("k1fw"),we=p("miYZ"),W=p("tsqr"),le=p("rAM+"),ae=p("tJVT"),te=p("PpiC"),k=p("q1tI"),S=p.n(k),C=p("bdgK");function re(Y,ce,xe,F,ee){var ge=ce.getWordUntilPosition(xe),Z={startLineNumber:xe.lineNumber,endLineNumber:xe.lineNumber,startColumn:ge.startColumn,endColumn:ge.endColumn},x=F.map(function(K){return{label:K,kind:Y.languages.CompletionItemKind.Keyword,insertText:K,insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Z}});return ee.map(function(K){x.push(Object(M.a)(Object(M.a)({},K),{},{range:Z}))}),x}var N=function(Y){var ce={label:"ifelse",kind:Y.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet},xe=["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"];Y.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Z,x){var K=re(Y,Z,x,xe,[ce]);return{suggestions:K}}});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"];Y.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Z,x){var K=[{label:"print",kind:Y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],P=re(Y,Z,x,F,K);return{suggestions:P}}});var ee=["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"];Y.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Z,x){var K=[ce,{label:"main",kind:Y.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:Y.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],P=re(Y,Z,x,ee,K);return{suggestions:P}}})},z="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",oe=p("LvDl");function U(Y){return/^\d+$/.test(Y)?"".concat(Y,"px"):Y}function D(){}var L=!1,O={"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 G(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ce=Y;if(Array.isArray(Y)){for(var xe=0;xe<Y.length;xe++){var F=O[Y[xe]];if(F)return F}return ce[0]}return O[ce]||ce}var H=null,me=Be.b=function(Y){var ce=Y.width,xe=ce===void 0?"100%":ce,F=Y.height,ee=F===void 0?"100%":F,ge=Y.value,Z=Y.language,x=Z===void 0?"javascript":Z,K=Y.style,P=K===void 0?{}:K,w=Y.options,V=w===void 0?{}:w,se=Y.overrideServices,X=se===void 0?{}:se,Se=Y.theme,v=Se===void 0?"vs-dark":Se,c=Y.onEditBlur,T=Y.onSave,Q=Y.autoHeight,J=Q===void 0?!1:Q,ke=Y.forbidCopy,De=ke===void 0?!1:ke,de=Y.onChange,Le=de===void 0?D:de,fe=Y.editorDidMount,be=fe===void 0?D:fe,I=Y.onFocus,B=I===void 0?D:I,Oe=Y.filename,He=Oe===void 0?"educoder.txt":Oe,$e=Object(te.a)(Y,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Ae=Object(k.useRef)(),je=Object(k.useRef)({}),ye=Object(k.useRef)(),Ee=Object(k.useRef)(!1),Re=Object(k.useRef)(),Ue=Object(k.useState)(!1),Fe=Object(ae.a)(Ue,2),he=Fe[0],_e=Fe[1];function Ye(){var h;return Ae.current&&(h=new C.default(function(m){var R=Object(le.a)(m),$;try{for(R.s();!($=R.n()).done;){var ve=$.value;(ve.target.offsetHeight>0||ve.target.offsetWidth>0)&&je.current.instance.layout()}}catch(tt){R.e(tt)}finally{R.f()}}),h.observe(Ae.current)),h}function Je(){W.b.warn(decodeURIComponent(z))}var Ge=function(){var m=je.current.instance;if(ge!=null&&m&&he){var R=m.getModel();R&&ge!==R.getValue()&&(L=!0,R.setValue(ge),m.layout(),L=!1)}};Object(k.useEffect)(function(){ye.current&&clearTimeout(ye.current),ye.current=setTimeout(function(){Ge()},500)},[ge,he,je.current]);function Ke(){var h=je.current.instance;if(h){var m=h.getSelection(),R=je.current.pastePos||{},$=new H.Range(R.startLineNumber||m.endLineNumber,R.startColumn||m.endColumn,R.endLineNumber||m.endLineNumber,R.endColumn||m.endColumn);setTimeout(function(){h.executeEdits("",[{range:$,text:""}])},300)}}function rt(h){(window.navigator.platform.match("Mac")?h.metaKey:h.ctrlKey)&&h.keyCode==83&&(h.preventDefault(),T())}var Qe=function(){if(J&&je.current.instance){var m=je.current.instance.getContentHeight();d(m<ee?ee:m)}else d(ee)};function Ve(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 ie(h,m){var R=window.URL||window.webkitURL||window,$=new Blob([m]),ve=document.createElementNS("http://www.w3.org/1999/xhtml","a");ve.href=R.createObjectURL($),ve.download=h,Ve(ve)}Object(k.useEffect)(function(){Qe()},[Qe]),Object(k.useEffect)(function(){Ae.current&&!he&&p.e(26).then(p.t.bind(null,"M/lh",7)).then(function(h){try{H=h,je.current.instance=H.editor.create(Ae.current,{value:ge,language:G(x),theme:v,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},X);var m=je.current.instance;if(be(m,H),setTimeout(function(){Qe(),je.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ie(He||"educoder.txt",m.getValue())}})},500),je.current.subscription=m.onDidChangeModelContent(function($){Ee.current?clearTimeout(Re.current):(Qe(),Le(m.getValue(),$)),Re.current=setTimeout(function(){Ee.current=!1},500)}),window.Monaco||N(H),De&&(m.addCommand(H.KeyMod.CtrlCmd|H.KeyMod.Shift|H.KeyCode.KEY_V,function(){return Je(),null}),m.addCommand(H.KeyMod.CtrlCmd|H.KeyCode.KEY_C,function(){return Je(),null})),window.Monaco=H,c&&m.onDidBlurEditorWidget(function(){c(m.getValue())}),B&&m.onDidFocusEditorText(function(){B(m.getValue())}),De){m.addCommand(H.KeyMod.CtrlCmd|H.KeyCode.KEY_V,function(){return Je(),null}),m.onDidPaste(function($){je.current.pastePos=$});try{window.addEventListener("paste",Ke)}catch($){}}var R=Ye();return _e(!0),function(){var $=je.current.instance;$.dispose();var ve=$.getModel();ve&&ve.dispose(),je.current.subscription&&je.current.subscription.dispose(),De&&window.removeEventListener("paste",Ke),R.unobserve(Ae.current)}}catch($){}})},[]),Object(k.useEffect)(function(){var h=je.current.instance;if(h&&he)return document.addEventListener("keydown",rt,!1),function(){document.removeEventListener("keydown",rt)}},[T,he]),Object(k.useEffect)(function(){var h=je.current.instance;if(h&&he){var m=G(x);H.editor.setModelLanguage(h.getModel(),m),console.log("language:",x,h.getModel(),m)}},[x,he]),Object(k.useEffect)(function(){var h=je.current.instance;h&&he&&H.editor.setTheme(v)},[v,he]),Object(k.useEffect)(function(){var h=je.current.instance;h&&he&&(h.updateOptions(Object(M.a)({},V)),setTimeout(function(){h.getModel().updateOptions(Object(M.a)({},V))},200))},[JSON.stringify(V),he]),Object(k.useEffect)(function(){var h=je.current.instance;h&&he&&h.layout()},[xe,ee,he]);var nt=Object(k.useState)(U(xe)),Xe=Object(ae.a)(nt,2),q=Xe[0],ue=Xe[1],g=Object(k.useState)(U(ee)),b=Object(ae.a)(g,2),E=b[0],d=b[1],f=Object(M.a)(Object(M.a)({},P),{},{width:q,height:E});return S.a.createElement("div",{className:"my-monaco-editor",ref:Ae,style:f})};function Ie(Y){var ce=Y.width,xe=ce===void 0?"100%":ce,F=Y.height,ee=F===void 0?"100%":F,ge=Y.original,Z=Y.modified,x=Y.language,K=Y.options,P=K===void 0?{}:K,w=Object(k.useRef)(),V=Object(k.useState)(null),se=Object(ae.a)(V,2),X=se[0],Se=se[1];function v(J){var ke;return w.current&&(ke=new C.default(function(De){var de=Object(le.a)(De),Le;try{for(de.s();!(Le=de.n()).done;){var fe=Le.value;(fe.target.offsetHeight>0||fe.target.offsetWidth>0)&&J.layout()}}catch(be){de.e(be)}finally{de.f()}}),ke.observe(w.current)),ke}Object(k.useEffect)(function(){w.current&&p.e(26).then(p.t.bind(null,"M/lh",7)).then(function(J){H=J;var ke=H.editor.createDiffEditor(w.current,Object(M.a)(Object(M.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},P),{},{wordWrap:!0}));Se(ke);var De=v(ke);return function(){ke.dispose();var de=ke.getModel();de&&de.dispose(),De.unobserve(w.current)}})},[]),Object(k.useEffect)(function(){X&&X.setModel({original:H.editor.createModel(ge,x),modified:H.editor.createModel(Z,x)})},[ge,Z,x,X]);var c=U(xe),T=U(ee),Q={width:c,height:T};return S.a.createElement("div",{className:"my-diff-editor",ref:w,style:Q})}},ZpRC:function(ot,Be,p){"use strict";function M(N){return typeof N=="object"&&N!=null&&N.nodeType===1}function we(N,z){return(!z||N!=="hidden")&&N!=="visible"&&N!=="clip"}function W(N,z){if(N.clientHeight<N.scrollHeight||N.clientWidth<N.scrollWidth){var oe=getComputedStyle(N,null);return we(oe.overflowY,z)||we(oe.overflowX,z)||function(U){var D=function(L){if(!L.ownerDocument||!L.ownerDocument.defaultView)return null;try{return L.ownerDocument.defaultView.frameElement}catch(O){return null}}(U);return!!D&&(D.clientHeight<U.scrollHeight||D.clientWidth<U.scrollWidth)}(N)}return!1}function le(N,z,oe,U,D,L,O,G){return L<N&&O>z||L>N&&O<z?0:L<=N&&G<=oe||O>=z&&G>=oe?L-N-U:O>z&&G<oe||L<N&&G>oe?O-z+D:0}var ae=function(N,z){var oe=window,U=z.scrollMode,D=z.block,L=z.inline,O=z.boundary,G=z.skipOverflowHiddenElements,H=typeof O=="function"?O:function(Re){return Re!==O};if(!M(N))throw new TypeError("Invalid target");for(var me=document.scrollingElement||document.documentElement,Ie=[],Y=N;M(Y)&&H(Y);){if((Y=Y.parentElement)===me){Ie.push(Y);break}Y!=null&&Y===document.body&&W(Y)&&!W(document.documentElement)||Y!=null&&W(Y,G)&&Ie.push(Y)}for(var ce=oe.visualViewport?oe.visualViewport.width:innerWidth,xe=oe.visualViewport?oe.visualViewport.height:innerHeight,F=window.scrollX||pageXOffset,ee=window.scrollY||pageYOffset,ge=N.getBoundingClientRect(),Z=ge.height,x=ge.width,K=ge.top,P=ge.right,w=ge.bottom,V=ge.left,se=D==="start"||D==="nearest"?K:D==="end"?w:K+Z/2,X=L==="center"?V+x/2:L==="end"?P:V,Se=[],v=0;v<Ie.length;v++){var c=Ie[v],T=c.getBoundingClientRect(),Q=T.height,J=T.width,ke=T.top,De=T.right,de=T.bottom,Le=T.left;if(U==="if-needed"&&K>=0&&V>=0&&w<=xe&&P<=ce&&K>=ke&&w<=de&&V>=Le&&P<=De)return Se;var fe=getComputedStyle(c),be=parseInt(fe.borderLeftWidth,10),I=parseInt(fe.borderTopWidth,10),B=parseInt(fe.borderRightWidth,10),Oe=parseInt(fe.borderBottomWidth,10),He=0,$e=0,Ae="offsetWidth"in c?c.offsetWidth-c.clientWidth-be-B:0,je="offsetHeight"in c?c.offsetHeight-c.clientHeight-I-Oe:0;if(me===c)He=D==="start"?se:D==="end"?se-xe:D==="nearest"?le(ee,ee+xe,xe,I,Oe,ee+se,ee+se+Z,Z):se-xe/2,$e=L==="start"?X:L==="center"?X-ce/2:L==="end"?X-ce:le(F,F+ce,ce,be,B,F+X,F+X+x,x),He=Math.max(0,He+ee),$e=Math.max(0,$e+F);else{He=D==="start"?se-ke-I:D==="end"?se-de+Oe+je:D==="nearest"?le(ke,de,Q,I,Oe+je,se,se+Z,Z):se-(ke+Q/2)+je/2,$e=L==="start"?X-Le-be:L==="center"?X-(Le+J/2)+Ae/2:L==="end"?X-De+B+Ae:le(Le,De,J,be,B+Ae,X,X+x,x);var ye=c.scrollLeft,Ee=c.scrollTop;se+=Ee-(He=Math.max(0,Math.min(Ee+He,c.scrollHeight-Q+je))),X+=ye-($e=Math.max(0,Math.min(ye+$e,c.scrollWidth-J+Ae)))}Se.push({el:c,top:He,left:$e})}return Se};function te(N){return N===Object(N)&&Object.keys(N).length!==0}function k(N,z){z===void 0&&(z="auto");var oe="scrollBehavior"in document.body.style;N.forEach(function(U){var D=U.el,L=U.top,O=U.left;D.scroll&&oe?D.scroll({top:L,left:O,behavior:z}):(D.scrollTop=L,D.scrollLeft=O)})}function S(N){return N===!1?{block:"end",inline:"nearest"}:te(N)?N:{block:"start",inline:"nearest"}}function C(N,z){var oe=!N.ownerDocument.documentElement.contains(N);if(te(z)&&typeof z.behavior=="function")return z.behavior(oe?[]:ae(N,z));if(oe)return;var U=S(z);return k(ae(N,U),U.behavior)}var re=Be.a=C},bNIU:function(ot,Be,p){ot.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(ot,Be,p){"use strict";p.d(Be,"a",function(){return we});var M=p("VTBJ");function we(W,le){var ae=Object(M.a)({},W);return Array.isArray(le)&&le.forEach(function(te){delete ae[te]}),ae}},c5Ni:function(ot,Be,p){},dejd:function(ot,Be,p){},dmUQ:function(ot,Be,p){"use strict";var M=p("Ff2n"),we=p("rePB"),W=p("1OyB"),le=p("vuIU"),ae=p("Ji7U"),te=p("md7G"),k=p("foSv"),S=p("q1tI"),C=p.n(S),re=p("TSYQ"),N=p.n(re),z=p("4IlW");function oe(Z,x){var K=Object.keys(Z);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(Z);x&&(P=P.filter(function(w){return Object.getOwnPropertyDescriptor(Z,w).enumerable})),K.push.apply(K,P)}return K}function U(Z){for(var x=1;x<arguments.length;x++){var K=arguments[x]!=null?arguments[x]:{};x%2?oe(Object(K),!0).forEach(function(P){Object(we.a)(Z,P,K[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(K)):oe(Object(K)).forEach(function(P){Object.defineProperty(Z,P,Object.getOwnPropertyDescriptor(K,P))})}return Z}function D(Z){var x=L();return function(){var P=Object(k.a)(Z),w;if(x){var V=Object(k.a)(this).constructor;w=Reflect.construct(P,arguments,V)}else w=P.apply(this,arguments);return Object(te.a)(this,w)}}function L(){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(Z){return!1}}function O(){}function G(Z){Z.preventDefault()}var H=function(x){return x.replace(/[^\w.-]+/g,"")},me=200,Ie=600,Y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,ce=function(x){return x!=null},xe=function(x,K){return K===x||typeof K=="number"&&typeof x=="number"&&isNaN(K)&&isNaN(x)},F=function(Z){Object(ae.a)(K,Z);var x=D(K);function K(P){var w;Object(W.a)(this,K),w=x.call(this,P),w.onKeyDown=function(X){var Se=w.props,v=Se.onKeyDown,c=Se.onPressEnter;if(X.keyCode===z.a.UP){var T=w.getRatio(X);w.up(X,T,null),w.stop()}else if(X.keyCode===z.a.DOWN){var Q=w.getRatio(X);w.down(X,Q,null),w.stop()}else X.keyCode===z.a.ENTER&&c&&c(X);if(w.recordCursorPosition(),w.lastKeyCode=X.keyCode,v){for(var J=arguments.length,ke=new Array(J>1?J-1:0),De=1;De<J;De++)ke[De-1]=arguments[De];v.apply(void 0,[X].concat(ke))}},w.onKeyUp=function(X){var Se=w.props.onKeyUp;if(w.stop(),w.recordCursorPosition(),Se){for(var v=arguments.length,c=new Array(v>1?v-1:0),T=1;T<v;T++)c[T-1]=arguments[T];Se.apply(void 0,[X].concat(c))}},w.onChange=function(X){var Se=w.props.onChange;w.state.focused&&(w.inputting=!0),w.rawInput=w.props.parser(w.getValueFromEvent(X)),w.setState({inputValue:w.rawInput}),Se(w.toNumber(w.rawInput))},w.onMouseUp=function(){var X=w.props.onMouseUp;w.recordCursorPosition(),X&&X.apply(void 0,arguments)},w.onFocus=function(){var X;w.setState({focused:!0}),(X=w.props).onFocus.apply(X,arguments)},w.onBlur=function(){var X=w.props.onBlur;w.inputting=!1,w.setState({focused:!1});var Se=w.getCurrentValidValue(w.state.inputValue),v=w.setValue(Se,O);if(X){var c=w.input.value,T=w.getInputDisplayValue({focus:!1,value:v});w.input.value=T&&Number(T),X.apply(void 0,arguments),w.input.value=c}},w.getRatio=function(X){var Se=1;return X.metaKey||X.ctrlKey?Se=.1:X.shiftKey&&(Se=10),Se},w.getFullNum=function(X){return isNaN(X)?X:/e/i.test(String(X))?Number(X).toFixed(18).replace(/\.?0+$/,""):X},w.getPrecision=function(X){if(ce(w.props.precision))return w.props.precision;var Se=String(X);if(Se.indexOf("e-")>=0)return parseInt(Se.slice(Se.indexOf("e-")+2),10);var v=0;return Se.indexOf(".")>=0&&(v=Se.length-Se.indexOf(".")-1),v},w.getInputDisplayValue=function(X){var Se=X||w.state,v=Se.focused,c=Se.inputValue,T=Se.value,Q;v?Q=c:Q=w.toPrecisionAsStep(T),Q==null&&(Q="");var J=w.formatWrapper(Q);return ce(w.props.decimalSeparator)&&(J=J.toString().replace(".",w.props.decimalSeparator)),J},w.recordCursorPosition=function(){try{w.cursorStart=w.input.selectionStart,w.cursorEnd=w.input.selectionEnd,w.currentValue=w.input.value,w.cursorBefore=w.input.value.substring(0,w.cursorStart),w.cursorAfter=w.input.value.substring(w.cursorEnd)}catch(X){}},w.restoreByAfter=function(X){if(X===void 0)return!1;var Se=w.input.value,v=Se.lastIndexOf(X);if(v===-1)return!1;var c=w.cursorBefore.length;return w.lastKeyCode===z.a.DELETE&&w.cursorBefore.charAt(c-1)===X[0]?(w.fixCaret(c,c),!0):v+X.length===Se.length?(w.fixCaret(v,v),!0):!1},w.partRestoreByAfter=function(X){return X===void 0?!1:Array.prototype.some.call(X,function(Se,v){var c=X.substring(v);return w.restoreByAfter(c)})},w.isNotCompleteNumber=function(X){return isNaN(X)||X===""||X===null||X&&X.toString().indexOf(".")===X.toString().length-1},w.stop=function(){w.autoStepTimer&&clearTimeout(w.autoStepTimer)},w.down=function(X,Se,v){w.pressingUpOrDown=!0,w.step("down",X,Se,v)},w.up=function(X,Se,v){w.pressingUpOrDown=!0,w.step("up",X,Se,v)},w.saveInput=function(X){w.input=X};var V=P.value;V===void 0&&(V=P.defaultValue),w.state={focused:P.autoFocus};var se=w.getValidValue(w.toNumber(V));return w.state=U(U({},w.state),{},{inputValue:w.toPrecisionAsStep(se),value:se}),w}return Object(le.a)(K,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(w){var V=this.props,se=V.value,X=V.onChange,Se=V.max,v=V.min,c=this.state.focused;if(w){if(!xe(w.value,se)||!xe(w.max,Se)||!xe(w.min,v)){var T=c?se:this.getValidValue(se),Q;this.pressingUpOrDown?Q=T:this.inputting?Q=this.rawInput:Q=this.toPrecisionAsStep(T),this.setState({value:T,inputValue:Q})}var J="value"in this.props?se:this.state.value;"max"in this.props&&w.max!==Se&&typeof J=="number"&&J>Se&&X&&X(Se),"min"in this.props&&w.min!==v&&typeof J=="number"&&J<v&&X&&X(v)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ke=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===z.a.BACKSPACE?ke=this.cursorStart-1:this.lastKeyCode===z.a.DELETE&&(ke=this.cursorStart):ke=this.input.value.length,this.fixCaret(ke,ke)}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(De){}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(w){var V=w;return V===""?V="":this.isNotCompleteNumber(parseFloat(V))?V=this.state.value:V=this.getValidValue(V),this.toNumber(V)}},{key:"getValueFromEvent",value:function(w){var V=w.target.value.trim().replace(/。/g,".");return ce(this.props.decimalSeparator)&&(V=V.replace(this.props.decimalSeparator,".")),V}},{key:"getValidValue",value:function(w){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,X=parseFloat(w);return isNaN(X)?w:(X<V&&(X=V),X>se&&(X=se),X)}},{key:"setValue",value:function(w,V){var se=this.props.precision,X=this.isNotCompleteNumber(parseFloat(w))?null:parseFloat(w),Se=this.state.value,v=Se===void 0?null:Se,c=this.state.inputValue,T=c===void 0?null:c,Q=typeof X=="number"?X.toFixed(se):"".concat(X),J=X!==v||Q!=="".concat(T);return"value"in this.props?(T=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:T},V)):this.setState({value:X,inputValue:this.toPrecisionAsStep(w)},V),J&&this.props.onChange(X),X}},{key:"getMaxPrecision",value:function(w){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,se=this.props,X=se.precision,Se=se.step;if(ce(X))return X;var v=this.getPrecision(V),c=this.getPrecision(Se),T=this.getPrecision(w);return w?Math.max(T,v+c):v+c}},{key:"getPrecisionFactor",value:function(w){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,se=this.getMaxPrecision(w,V);return Math.pow(10,se)}},{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(w){return this.props.formatter?this.props.formatter(w):w}},{key:"toPrecisionAsStep",value:function(w){if(this.isNotCompleteNumber(w)||w==="")return w;var V=Math.abs(this.getMaxPrecision(w));return isNaN(V)?w.toString():Number(w).toFixed(V)}},{key:"toNumber",value:function(w){var V=this.props.precision,se=this.state.focused,X=w&&w.length>16&&se;return this.isNotCompleteNumber(w)||X?w:ce(V)?Math.round(w*Math.pow(10,V))/Math.pow(10,V):Number(w)}},{key:"upStep",value:function(w,V){var se=this.props.step,X=this.getPrecisionFactor(w,V),Se=Math.abs(this.getMaxPrecision(w,V)),v=((X*w+X*se*V)/X).toFixed(Se);return this.toNumber(v)}},{key:"downStep",value:function(w,V){var se=this.props.step,X=this.getPrecisionFactor(w,V),Se=Math.abs(this.getMaxPrecision(w,V)),v=((X*w-X*se*V)/X).toFixed(Se);return this.toNumber(v)}},{key:"step",value:function(w,V){var se=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Se=arguments.length>3?arguments[3]:void 0;this.stop(),V&&(V.persist(),V.preventDefault());var v=this.props;if(v.disabled)return;var c=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(c))return;var T=this["".concat(w,"Step")](c,X),Q=T>v.max||T<v.min;if(T>v.max?T=v.max:T<v.min&&(T=v.min),this.setValue(T,null),this.setState({focused:!0},function(){se.pressingUpOrDown=!1}),Q)return;this.autoStepTimer=setTimeout(function(){se[w](V,X,!0)},Se?me:Ie)}},{key:"fixCaret",value:function(w,V){if(w===void 0||V===void 0||!this.input||!this.input.value)return;try{var se=this.input.selectionStart,X=this.input.selectionEnd;(w!==se||V!==X)&&this.input.setSelectionRange(w,V)}catch(Se){}}},{key:"render",value:function(){var w,V=this.props,se=V.prefixCls,X=V.disabled,Se=V.readOnly,v=V.useTouch,c=V.autoComplete,T=V.upHandler,Q=V.downHandler,J=V.className,ke=V.max,De=V.min,de=V.style,Le=V.title,fe=V.onMouseEnter,be=V.onMouseLeave,I=V.onMouseOver,B=V.onMouseOut,Oe=V.required,He=V.onClick,$e=V.tabIndex,Ae=V.type,je=V.placeholder,ye=V.id,Ee=V.inputMode,Re=V.pattern,Ue=V.step,Fe=V.maxLength,he=V.autoFocus,_e=V.name,Ye=V.onPaste,Je=V.onInput,Ge=Object(M.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"]),Ke=this.state,rt=Ke.value,Qe=Ke.focused,Ve=N()(se,(w={},Object(we.a)(w,J,!!J),Object(we.a)(w,"".concat(se,"-disabled"),X),Object(we.a)(w,"".concat(se,"-focused"),Qe),w)),ie={};Object.keys(Ge).forEach(function(m){(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(ie[m]=Ge[m])});var nt=!Se&&!X,Xe=this.getInputDisplayValue(null),q=(rt||rt===0)&&(isNaN(rt)||Number(rt)>=ke),ue=(rt||rt===0)&&(isNaN(rt)||Number(rt)<=De),g=q||X||Se,b=ue||X||Se,E=N()("".concat(se,"-handler"),"".concat(se,"-handler-up"),Object(we.a)({},"".concat(se,"-handler-up-disabled"),g)),d=N()("".concat(se,"-handler"),"".concat(se,"-handler-down"),Object(we.a)({},"".concat(se,"-handler-down-disabled"),b)),f=v?{onTouchStart:g?O:this.up,onTouchEnd:this.stop}:{onMouseDown:g?O:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},h=v?{onTouchStart:b?O:this.down,onTouchEnd:this.stop}:{onMouseDown:b?O:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return C.a.createElement("div",{className:Ve,style:de,title:Le,onMouseEnter:fe,onMouseLeave:be,onMouseOver:I,onMouseOut:B,onFocus:function(){return null},onBlur:function(){return null}},C.a.createElement("div",{className:"".concat(se,"-handler-wrap")},C.a.createElement("span",Object.assign({unselectable:"on"},f,{role:"button","aria-label":"Increase Value","aria-disabled":g,className:E}),T||C.a.createElement("span",{unselectable:"on",className:"".concat(se,"-handler-up-inner"),onClick:G})),C.a.createElement("span",Object.assign({unselectable:"on"},h,{role:"button","aria-label":"Decrease Value","aria-disabled":b,className:d}),Q||C.a.createElement("span",{unselectable:"on",className:"".concat(se,"-handler-down-inner"),onClick:G}))),C.a.createElement("div",{className:"".concat(se,"-input-wrap")},C.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":De,"aria-valuemax":ke,"aria-valuenow":rt,required:Oe,type:Ae,placeholder:je,onPaste:Ye,onClick:He,onMouseUp:this.onMouseUp,className:"".concat(se,"-input"),tabIndex:$e,autoComplete:c,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:nt?this.onKeyDown:O,onKeyUp:nt?this.onKeyUp:O,autoFocus:he,maxLength:Fe,readOnly:Se,disabled:X,max:ke,min:De,step:Ue,name:_e,title:Le,id:ye,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Xe),pattern:Re,inputMode:Ee,onInput:Je},ie))))}}]),K}(C.a.Component);F.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Y,min:-Y,step:1,style:{},onChange:O,onKeyDown:O,onPressEnter:O,onFocus:O,onBlur:O,parser:H,required:!1,autoComplete:"off"};var ee=F,ge=Be.a=ee},fnXi:function(ot,Be,p){"use strict";var M=p("2qtc"),we=p("kLXV"),W=p("q1tI"),le=p.n(W),ae=p("Ty5D"),te=p("9kvl"),k=p("93VE"),S=p.n(k),C=function(N){var z=N.activeIndex,oe=N.isEdit,U=oe===void 0?!0:oe,D=N.dispatch,L=N.practiceSetting,O=Object(ae.i)(),G=O.id,H=O.challengesId,me=Object(W.useMemo)(function(){return[{name:"\u672C\u5173\u4EFB\u52A1",url:"/shixuns/".concat(G,"/edit/").concat(H,"/editcheckpoint")},{name:"\u8BC4\u6D4B\u8BBE\u7F6E",url:"/shixuns/".concat(G,"/edit/").concat(H,"/tab=2")},{name:"\u53C2\u8003\u7B54\u6848",url:"/shixuns/".concat(G,"/edit/").concat(H,"/tab=3")},{name:"\u5173\u5361\u6392\u884C\u699C",url:"/shixuns/".concat(G,"/edit/").concat(H,"/tab=4")}]},[G,H]),Ie=function(ce){var xe,F=function(){te.e.push(ce),D({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};L!=null&&(xe=L.sideBar)!==null&&xe!==void 0&&xe.confirmLeave?we.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 le.a.createElement("ul",{className:"challenge-nav"},U?me.map(function(Y,ce){return z===ce?le.a.createElement("li",{key:Y.url}," ",le.a.createElement("a",{className:"active"},Y.name)," "):le.a.createElement("li",{key:Y.url}," ",le.a.createElement("a",{onClick:function(){return Ie(Y.url)}},Y.name)," ")}):le.a.createElement("li",{key:me[0].url}," ",le.a.createElement("a",{className:"active"},me[0].name)," "))};Be.a=Object(te.b)(function(re){var N=re.globalSetting,z=re.practiceSetting;return{globalSetting:N,practiceSetting:z}})(C)},kSUc:function(ot,Be,p){},lZu9:function(ot,Be,p){(function(M){M(p("VrN/"),p("1eCo"),p("8EBN"))})(function(M){"use strict";M.defineMode("markdown",function(we,W){var le=M.getMode(we,"text/html"),ae=le.name=="null";function te(v){if(M.findModeByName){var c=M.findModeByName(v);c&&(v=c.mime||c.mimes[0])}var T=M.getMode(we,v);return T.name=="null"?null:T}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 k={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 S in k)k.hasOwnProperty(S)&&W.tokenTypeOverrides[S]&&(k[S]=W.tokenTypeOverrides[S]);var C=/^([*\-_])(?:\s*\1){2,}\s*$/,re=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,N=/^\[(x| )\](?=\s)/i,z=W.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,oe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,U=/^[^#!\[\]*_\\<>` "'(~:]+/,D=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,L=/^\s*\[[^\]]+?\]:.*$/,O=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,G=" ";function H(v,c,T){return c.f=c.inline=T,T(v,c)}function me(v,c,T){return c.f=c.block=T,T(v,c)}function Ie(v){return!v||!/\S/.test(v.string)}function Y(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==xe){var c=ae;if(!c){var T=M.innerMode(le,v.htmlState);c=T.mode.name=="xml"&&T.state.tagStart===null&&!T.state.context&&T.state.tokenize.isInText}c&&(v.f=Z,v.block=ce,v.htmlState=null)}return v.trailingSpace=0,v.trailingSpaceNewLine=!1,v.prevLine=v.thisLine,v.thisLine={stream:null},null}function ce(v,c){var T=v.column()===c.indentation,Q=Ie(c.prevLine.stream),J=c.indentedCode,ke=c.prevLine.hr,De=c.list!==!1,de=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var Le=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,De)){for(c.list=null;Le<c.listStack[c.listStack.length-1];)c.listStack.pop(),c.listStack.length?c.indentation=c.listStack[c.listStack.length-1]:c.list=!1;c.list!==!1&&(c.indentationDiff=Le-c.listStack[c.listStack.length-1])}var fe=!Q&&!ke&&!c.prevLine.header&&(!De||!J)&&!c.prevLine.fencedCodeEnd,be=(c.list===!1||ke||Q)&&c.indentation<=de&&v.match(C),I=null;if(c.indentationDiff>=4&&(J||c.prevLine.fencedCodeEnd||c.prevLine.header||Q))return v.skipToEnd(),c.indentedCode=!0,k.code;if(v.eatSpace())return null;if(T&&c.indentation<=de&&(I=v.match(z))&&I[1].length<=6)return c.quote=0,c.header=I[1].length,c.thisLine.header=!0,W.highlightFormatting&&(c.formatting="header"),c.f=c.inline,ee(c);if(c.indentation<=de&&v.eat(">"))return c.quote=T?1:c.quote+1,W.highlightFormatting&&(c.formatting="quote"),v.eatSpace(),ee(c);if(!be&&!c.setext&&T&&c.indentation<=de&&(I=v.match(re))){var B=I[1]?"ol":"ul";return c.indentation=Le+v.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,W.taskLists&&v.match(N,!1)&&(c.taskList=!0),c.f=c.inline,W.highlightFormatting&&(c.formatting=["list","list-"+B]),ee(c)}else{if(T&&c.indentation<=de&&(I=v.match(D,!0)))return c.quote=0,c.fencedEndRE=new RegExp(I[1]+"+ *$"),c.localMode=W.fencedCodeBlockHighlighting&&te(I[2]||W.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=M.startState(c.localMode)),c.f=c.block=F,W.highlightFormatting&&(c.formatting="code-block"),c.code=-1,ee(c);if(c.setext||(!fe||!De)&&!c.quote&&c.list===!1&&!c.code&&!be&&!L.test(v.string)&&(I=v.lookAhead(1))&&(I=I.match(oe)))return c.setext?(c.header=c.setext,c.setext=0,v.skipToEnd(),W.highlightFormatting&&(c.formatting="header")):(c.header=I[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,ee(c);if(be)return v.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,k.hr;if(v.peek()==="[")return H(v,c,V)}return H(v,c,c.inline)}function xe(v,c){var T=le.token(v,c.htmlState);if(!ae){var Q=M.innerMode(le,c.htmlState);(Q.mode.name=="xml"&&Q.state.tagStart===null&&!Q.state.context&&Q.state.tokenize.isInText||c.md_inside&&v.current().indexOf(">")>-1)&&(c.f=Z,c.block=ce,c.htmlState=null)}return T}function F(v,c){var T=c.listStack[c.listStack.length-1]||0,Q=c.indentation<T,J=T+3;if(c.fencedEndRE&&c.indentation<=J&&(Q||v.match(c.fencedEndRE))){W.highlightFormatting&&(c.formatting="code-block");var ke;return Q||(ke=ee(c)),c.localMode=c.localState=null,c.block=ce,c.f=Z,c.fencedEndRE=null,c.code=0,c.thisLine.fencedCodeEnd=!0,Q?me(v,c,c.block):ke}else return c.localMode?c.localMode.token(v,c.localState):(v.skipToEnd(),k.code)}function ee(v){var c=[];if(v.formatting){c.push(k.formatting),typeof v.formatting=="string"&&(v.formatting=[v.formatting]);for(var T=0;T<v.formatting.length;T++)c.push(k.formatting+"-"+v.formatting[T]),v.formatting[T]==="header"&&c.push(k.formatting+"-"+v.formatting[T]+"-"+v.header),v.formatting[T]==="quote"&&(!W.maxBlockquoteDepth||W.maxBlockquoteDepth>=v.quote?c.push(k.formatting+"-"+v.formatting[T]+"-"+v.quote):c.push("error"))}if(v.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(v.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(v.linkHref?c.push(k.linkHref,"url"):(v.strong&&c.push(k.strong),v.em&&c.push(k.em),v.strikethrough&&c.push(k.strikethrough),v.emoji&&c.push(k.emoji),v.linkText&&c.push(k.linkText),v.code&&c.push(k.code),v.image&&c.push(k.image),v.imageAltText&&c.push(k.imageAltText,"link"),v.imageMarker&&c.push(k.imageMarker)),v.header&&c.push(k.header,k.header+"-"+v.header),v.quote&&(c.push(k.quote),!W.maxBlockquoteDepth||W.maxBlockquoteDepth>=v.quote?c.push(k.quote+"-"+v.quote):c.push(k.quote+"-"+W.maxBlockquoteDepth)),v.list!==!1){var Q=(v.listStack.length-1)%3;Q?Q===1?c.push(k.list2):c.push(k.list3):c.push(k.list1)}return v.trailingSpaceNewLine?c.push("trailing-space-new-line"):v.trailingSpace&&c.push("trailing-space-"+(v.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function ge(v,c){return v.match(U,!0)?ee(c):void 0}function Z(v,c){var T=c.text(v,c);if(typeof T!="undefined")return T;if(c.list)return c.list=null,ee(c);if(c.taskList){var Q=v.match(N,!0)[1]===" ";return Q?c.taskOpen=!0:c.taskClosed=!0,W.highlightFormatting&&(c.formatting="task"),c.taskList=!1,ee(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&v.match(/^#+$/,!0))return W.highlightFormatting&&(c.formatting="header"),ee(c);var J=v.next();if(c.linkTitle){c.linkTitle=!1;var ke=J;J==="("&&(ke=")"),ke=(ke+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var De="^\\s*(?:[^"+ke+"\\\\]+|\\\\\\\\|\\\\.)"+ke;if(v.match(new RegExp(De),!0))return k.linkHref}if(J==="`"){var de=c.formatting;W.highlightFormatting&&(c.formatting="code"),v.eatWhile("`");var Le=v.current().length;if(c.code==0&&(!c.quote||Le==1))return c.code=Le,ee(c);if(Le==c.code){var fe=ee(c);return c.code=0,fe}else return c.formatting=de,ee(c)}else if(c.code)return ee(c);if(J==="\\"&&(v.next(),W.highlightFormatting)){var be=ee(c),I=k.formatting+"-escape";return be?be+" "+I:I}if(J==="!"&&v.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,W.highlightFormatting&&(c.formatting="image"),ee(c);if(J==="["&&c.imageMarker&&v.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,W.highlightFormatting&&(c.formatting="image"),ee(c);if(J==="]"&&c.imageAltText){W.highlightFormatting&&(c.formatting="image");var be=ee(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=K,be}if(J==="["&&!c.image)return c.linkText&&v.match(/^.*?\]/)||(c.linkText=!0,W.highlightFormatting&&(c.formatting="link")),ee(c);if(J==="]"&&c.linkText){W.highlightFormatting&&(c.formatting="link");var be=ee(c);return c.linkText=!1,c.inline=c.f=v.match(/\(.*?\)| ?\[.*?\]/,!1)?K:Z,be}if(J==="<"&&v.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=x,W.highlightFormatting&&(c.formatting="link");var be=ee(c);return be?be+=" ":be="",be+k.linkInline}if(J==="<"&&v.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=x,W.highlightFormatting&&(c.formatting="link");var be=ee(c);return be?be+=" ":be="",be+k.linkEmail}if(W.xml&&J==="<"&&v.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var B=v.string.indexOf(">",v.pos);if(B!=-1){var Oe=v.string.substring(v.start,B);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Oe)&&(c.md_inside=!0)}return v.backUp(1),c.htmlState=M.startState(le),me(v,c,xe)}if(W.xml&&J==="<"&&v.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(J==="*"||J==="_"){for(var He=1,$e=v.pos==1?" ":v.string.charAt(v.pos-2);He<3&&v.eat(J);)He++;var Ae=v.peek()||" ",je=!/\s/.test(Ae)&&(!O.test(Ae)||/\s/.test($e)||O.test($e)),ye=!/\s/.test($e)&&(!O.test($e)||/\s/.test(Ae)||O.test(Ae)),Ee=null,Re=null;if(He%2&&(!c.em&&je&&(J==="*"||!ye||O.test($e))?Ee=!0:c.em==J&&ye&&(J==="*"||!je||O.test(Ae))&&(Ee=!1)),He>1&&(!c.strong&&je&&(J==="*"||!ye||O.test($e))?Re=!0:c.strong==J&&ye&&(J==="*"||!je||O.test(Ae))&&(Re=!1)),Re!=null||Ee!=null){W.highlightFormatting&&(c.formatting=Ee==null?"strong":Re==null?"em":"strong em"),Ee===!0&&(c.em=J),Re===!0&&(c.strong=J);var fe=ee(c);return Ee===!1&&(c.em=!1),Re===!1&&(c.strong=!1),fe}}else if(J===" "&&(v.eat("*")||v.eat("_"))){if(v.peek()===" ")return ee(c);v.backUp(1)}if(W.strikethrough){if(J==="~"&&v.eatWhile(J)){if(c.strikethrough){W.highlightFormatting&&(c.formatting="strikethrough");var fe=ee(c);return c.strikethrough=!1,fe}else if(v.match(/^[^\s]/,!1))return c.strikethrough=!0,W.highlightFormatting&&(c.formatting="strikethrough"),ee(c)}else if(J===" "&&v.match(/^~~/,!0)){if(v.peek()===" ")return ee(c);v.backUp(2)}}if(W.emoji&&J===":"&&v.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,W.highlightFormatting&&(c.formatting="emoji");var Ue=ee(c);return c.emoji=!1,Ue}return J===" "&&(v.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),ee(c)}function x(v,c){var T=v.next();if(T===">"){c.f=c.inline=Z,W.highlightFormatting&&(c.formatting="link");var Q=ee(c);return Q?Q+=" ":Q="",Q+k.linkInline}return v.match(/^[^>]+/,!0),k.linkInline}function K(v,c){if(v.eatSpace())return null;var T=v.next();return T==="("||T==="["?(c.f=c.inline=w(T==="("?")":"]"),W.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,ee(c)):"error"}var P={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(v){return function(c,T){var Q=c.next();if(Q===v){T.f=T.inline=Z,W.highlightFormatting&&(T.formatting="link-string");var J=ee(T);return T.linkHref=!1,J}return c.match(P[v]),T.linkHref=!0,ee(T)}}function V(v,c){return v.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=se,v.next(),W.highlightFormatting&&(c.formatting="link"),c.linkText=!0,ee(c)):H(v,c,Z)}function se(v,c){if(v.match(/^\]:/,!0)){c.f=c.inline=X,W.highlightFormatting&&(c.formatting="link");var T=ee(c);return c.linkText=!1,T}return v.match(/^([^\]\\]|\\.)+/,!0),k.linkText}function X(v,c){return v.eatSpace()?null:(v.match(/^[^\s]+/,!0),v.peek()===void 0?c.linkTitle=!0:v.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),c.f=c.inline=Z,k.linkHref+" url")}var Se={startState:function(){return{f:ce,prevLine:{stream:null},thisLine:{stream:null},block:ce,htmlState:null,indentation:0,inline:Z,text:ge,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&&M.copyState(le,v.htmlState),indentation:v.indentation,localMode:v.localMode,localState:v.localMode?M.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,c){if(c.formatting=!1,v!=c.thisLine.stream){if(c.header=0,c.hr=!1,v.match(/^\s*$/,!0))return Y(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:v},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=xe)){var T=v.match(/^\s*/,!0)[0].replace(/\t/g,G).length;if(c.indentation=T,c.indentationDiff=null,T>0)return null}}return c.f(v,c)},innerMode:function(v){return v.block==xe?{state:v.htmlState,mode:le}:v.localState?{state:v.localState,mode:v.localMode}:{state:v,mode:Se}},indent:function(v,c,T){return v.block==xe&&le.indent?le.indent(v.htmlState,c,T):v.localState&&v.localMode.indent?v.localMode.indent(v.localState,c,T):M.Pass},blankLine:Y,getType:ee,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Se},"xml"),M.defineMIME("text/markdown","markdown"),M.defineMIME("text/x-markdown","markdown")})},nuEh:function(ot,Be,p){"use strict";var M=p("T2oS"),we=p("W9HT"),W=p("q1tI"),le=p.n(W),ae=p("F8wB"),te=p.n(ae),k=function(C){var re=C.loading;return re?le.a.createElement("div",{className:te.a.loading},le.a.createElement(we.a,null)):le.a.createElement(le.a.Fragment,null)};Be.a=k},osHv:function(ot,Be,p){(function(M){M(p("VrN/"))})(function(M){"use strict";var we=M.Pos;function W(O,G){return O.line-G.line||O.ch-G.ch}var le="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",ae=le+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",te=new RegExp("<(/?)(["+le+"]["+ae+"]*)","g");function k(O,G,H,me){this.line=G,this.ch=H,this.cm=O,this.text=O.getLine(G),this.min=me?Math.max(me.from,O.firstLine()):O.firstLine(),this.max=me?Math.min(me.to-1,O.lastLine()):O.lastLine()}function S(O,G){var H=O.cm.getTokenTypeAt(we(O.line,G));return H&&/\btag\b/.test(H)}function C(O){return O.line>=O.max?void 0:(O.ch=0,O.text=O.cm.getLine(++O.line),!0)}function re(O){return O.line<=O.min?void 0:(O.text=O.cm.getLine(--O.line),O.ch=O.text.length,!0)}function N(O){for(;;){var G=O.text.indexOf(">",O.ch);if(G==-1){if(C(O))continue;return}if(!S(O,G+1)){O.ch=G+1;continue}var H=O.text.lastIndexOf("/",G),me=H>-1&&!/\S/.test(O.text.slice(H+1,G));return O.ch=G+1,me?"selfClose":"regular"}}function z(O){for(;;){var G=O.ch?O.text.lastIndexOf("<",O.ch-1):-1;if(G==-1){if(re(O))continue;return}if(!S(O,G+1)){O.ch=G;continue}te.lastIndex=G,O.ch=G;var H=te.exec(O.text);if(H&&H.index==G)return H}}function oe(O){for(;;){te.lastIndex=O.ch;var G=te.exec(O.text);if(!G){if(C(O))continue;return}if(!S(O,G.index+1)){O.ch=G.index+1;continue}return O.ch=G.index+G[0].length,G}}function U(O){for(;;){var G=O.ch?O.text.lastIndexOf(">",O.ch-1):-1;if(G==-1){if(re(O))continue;return}if(!S(O,G+1)){O.ch=G;continue}var H=O.text.lastIndexOf("/",G),me=H>-1&&!/\S/.test(O.text.slice(H+1,G));return O.ch=G+1,me?"selfClose":"regular"}}function D(O,G){for(var H=[];;){var me=oe(O),Ie,Y=O.line,ce=O.ch-(me?me[0].length:0);if(!me||!(Ie=N(O)))return;if(Ie=="selfClose")continue;if(me[1]){for(var xe=H.length-1;xe>=0;--xe)if(H[xe]==me[2]){H.length=xe;break}if(xe<0&&(!G||G==me[2]))return{tag:me[2],from:we(Y,ce),to:we(O.line,O.ch)}}else H.push(me[2])}}function L(O,G){for(var H=[];;){var me=U(O);if(!me)return;if(me=="selfClose"){z(O);continue}var Ie=O.line,Y=O.ch,ce=z(O);if(!ce)return;if(ce[1])H.push(ce[2]);else{for(var xe=H.length-1;xe>=0;--xe)if(H[xe]==ce[2]){H.length=xe;break}if(xe<0&&(!G||G==ce[2]))return{tag:ce[2],from:we(O.line,O.ch),to:we(Ie,Y)}}}}M.registerHelper("fold","xml",function(O,G){for(var H=new k(O,G.line,0);;){var me=oe(H);if(!me||H.line!=G.line)return;var Ie=N(H);if(!Ie)return;if(!me[1]&&Ie!="selfClose"){var Y=we(H.line,H.ch),ce=D(H,me[2]);return ce&&W(ce.from,Y)>0?{from:Y,to:ce.from}:null}}}),M.findMatchingTag=function(O,G,H){var me=new k(O,G.line,G.ch,H);if(me.text.indexOf(">")==-1&&me.text.indexOf("<")==-1)return;var Ie=N(me),Y=Ie&&we(me.line,me.ch),ce=Ie&&z(me);if(!Ie||!ce||W(me,G)>0)return;var xe={from:we(me.line,me.ch),to:Y,tag:ce[2]};return Ie=="selfClose"?{open:xe,close:null,at:"open"}:ce[1]?{open:L(me,ce[2]),close:xe,at:"close"}:(me=new k(O,Y.line,Y.ch,H),{open:xe,close:D(me,ce[2]),at:"open"})},M.findEnclosingTag=function(O,G,H,me){for(var Ie=new k(O,G.line,G.ch,H);;){var Y=L(Ie,me);if(!Y)break;var ce=new k(O,G.line,G.ch,H),xe=D(ce,Y.tag);if(xe)return{open:Y,close:xe}}},M.scanForClosingTag=function(O,G,H,me){var Ie=new k(O,G.line,G.ch,me?{from:0,to:me}:null);return D(Ie,H)}})},p5ED:function(ot,Be,p){"use strict";var M=p("+L6B"),we=p("2/Rp"),W=p("5Dmo"),le=p("3S7+"),ae=p("k1fw"),te=p("tJVT"),k=p("q1tI"),S=p.n(k),C=p("vHTk"),re=p.n(C),N=p("yEEn"),z=p("ZW9T"),oe=p("1vsH");Be.a=function(U){var D=U.name,L=U.data,O=U.theme,G=U.type,H=U.filename,me=U.monacoEditor,Ie=U.className,Y=U.style,ce=U.close,xe=U.onClose,F=U.hasMask,ee=Object(k.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ge=Object(te.a)(ee,2),Z=ge[0],x=ge[1],K=Object(k.useState)(""),P=Object(te.a)(K,2),w=P[0],V=P[1],se=Object(k.useRef)();H&&(me.filename=H),Object(k.useEffect)(function(){var v,c,T=(v=document.cookie)===null||v===void 0||((c=v.replace(/\s/g,""))===null||c===void 0)?void 0:c.split(";");T==null||T.map(function(Q){var J=Q.split("=");J[0]==="_educoder_session"&&V(J[1])})},[]);var X=function(){if(L.startsWith("http")||L.startsWith("/")){Se();return}Object(oe.x)(H||"educoder",L,H)},Se=function(){Object(oe.v)(H||D,L)};return S.a.createElement("div",{style:Object(ae.a)({},Y||{}),className:"".concat(F&&re.a.bgBlack," ").concat(G?re.a.wrp:"hide")},ce&&S.a.createElement("div",{className:re.a.close,ref:se},S.a.createElement(le.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return se.current}},S.a.createElement("span",{onClick:Se},S.a.createElement("i",{className:"icon-quxiaozhiding"}))),S.a.createElement(le.a,{title:"\u5173\u95ED",getPopupContainer:function(){return se.current}},S.a.createElement("span",{className:"",onClick:xe},S.a.createElement("i",{className:"icon-guanbi1"})))),S.a.createElement("div",{className:"".concat(re.a[Ie]," ").concat(Ie," ").concat(re.a.monaco," ").concat(G==="txt"?"show":"hide")},G==="txt"&&S.a.createElement(z.b,me)),G==="audio"&&S.a.createElement("audio",{src:"".concat(L!=null&&L.startsWith("/")||(L==null?void 0:L.indexOf("https://"))>-1?L:"data:audio/mp3;base64,").concat(L),autoPlay:!0}),G==="video"&&S.a.createElement(S.a.Fragment,null,L!=null&&L.startsWith("/")?S.a.createElement("video",{controls:!0,src:"".concat(L),autoPlay:!0}):S.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(L),autoPlay:!0})),G==="pdf"&&S.a.createElement("embed",{className:re.a.embed,src:L}),G==="image"&&S.a.createElement(S.a.Fragment,null,S.a.createElement("img",{src:"".concat(L!=null&&L.startsWith("/")||(L==null?void 0:L.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(L)})),G==="other"&&S.a.createElement("div",null,S.a.createElement(we.a,{type:"primary",size:"large",onClick:X},S.a.createElement(N.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(G==="download"||G==="office")&&S.a.createElement(we.a,{type:"primary",size:"large",onClick:X},S.a.createElement(N.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ot,Be,p){},"rAM+":function(ot,Be,p){"use strict";p.d(Be,"a",function(){return we});var M=p("Qw5x");function we(W,le){var ae;if(typeof Symbol=="undefined"||W[Symbol.iterator]==null){if(Array.isArray(W)||(ae=Object(M.a)(W))||le&&W&&typeof W.length=="number"){ae&&(W=ae);var te=0,k=function(){};return{s:k,n:function(){return te>=W.length?{done:!0}:{done:!1,value:W[te++]}},e:function(z){throw z},f:k}}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 S=!0,C=!1,re;return{s:function(){ae=W[Symbol.iterator]()},n:function(){var z=ae.next();return S=z.done,z},e:function(z){C=!0,re=z},f:function(){try{!S&&ae.return!=null&&ae.return()}finally{if(C)throw re}}}}},rUJ1:function(ot,Be){const p=/[&<>"']/,M=/[&<>"']/g,we=/[<>"']|&(?!#?\w+;)/,W=/[<>"']|&(?!#?\w+;)/g,le={"&":"&","<":"<",">":">",'"':""","'":"'"},ae=F=>le[F];function te(F,ee){if(ee){if(p.test(F))return F.replace(M,ae)}else if(we.test(F))return F.replace(W,ae);return F}const k=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function S(F){return F.replace(k,(ee,ge)=>(ge=ge.toLowerCase(),ge==="colon"?":":ge.charAt(0)==="#"?ge.charAt(1)==="x"?String.fromCharCode(parseInt(ge.substring(2),16)):String.fromCharCode(+ge.substring(1)):""))}const C=/(^|[^\[])\^/g;function re(F,ee){F=F.source||F,ee=ee||"";const ge={replace:(Z,x)=>(x=x.source||x,x=x.replace(C,"$1"),F=F.replace(Z,x),ge),getRegex:()=>new RegExp(F,ee)};return ge}const N=/[^\w:]/g,z=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function oe(F,ee,ge){if(F){let Z;try{Z=decodeURIComponent(S(ge)).replace(N,"").toLowerCase()}catch(x){return null}if(Z.indexOf("javascript:")===0||Z.indexOf("vbscript:")===0||Z.indexOf("data:")===0)return null}ee&&!z.test(ge)&&(ge=G(ee,ge));try{ge=encodeURI(ge).replace(/%25/g,"%")}catch(Z){return null}return ge}const U={},D=/^[^:]+:\/*[^/]*$/,L=/^([^:]+:)[\s\S]*$/,O=/^([^:]+:\/*[^/]*)[\s\S]*$/;function G(F,ee){U[" "+F]||(D.test(F)?U[" "+F]=F+"/":U[" "+F]=Y(F,"/",!0)),F=U[" "+F];const ge=F.indexOf(":")===-1;return ee.substring(0,2)==="//"?ge?ee:F.replace(L,"$1")+ee:ee.charAt(0)==="/"?ge?ee:F.replace(O,"$1")+ee:F+ee}const H={exec:function(){}};function me(F){let ee=1,ge,Z;for(;ee<arguments.length;ee++){ge=arguments[ee];for(Z in ge)Object.prototype.hasOwnProperty.call(ge,Z)&&(F[Z]=ge[Z])}return F}function Ie(F,ee){const ge=F.replace(/\|/g,(K,P,w)=>{let V=!1,se=P;for(;--se>=0&&w[se]==="\\";)V=!V;return V?"|":" |"}),Z=ge.split(/ \|/);let x=0;if(Z.length>ee)Z.splice(ee);else for(;Z.length<ee;)Z.push("");for(;x<Z.length;x++)Z[x]=Z[x].trim().replace(/\\\|/g,"|");return Z}function Y(F,ee,ge){const Z=F.length;if(Z===0)return"";let x=0;for(;x<Z;){const K=F.charAt(Z-x-1);if(K===ee&&!ge)x++;else if(K!==ee&&ge)x++;else break}return F.substr(0,Z-x)}function ce(F,ee){if(F.indexOf(ee[1])===-1)return-1;const ge=F.length;let Z=0,x=0;for(;x<ge;x++)if(F[x]==="\\")x++;else if(F[x]===ee[0])Z++;else if(F[x]===ee[1]&&(Z--,Z<0))return x;return-1}function xe(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")}ot.exports={escape:te,unescape:S,edit:re,cleanUrl:oe,resolveUrl:G,noopTest:H,merge:me,splitCells:Ie,rtrim:Y,findClosingBracket:ce,checkSanitizeDeprecation:xe}},vHTk:function(ot,Be,p){ot.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);
|