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

122 lines
394 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[157,6,7],{"+NIl":function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){"use strict";j.defineMode("stex",function(ve,te){"use strict";function we(ie,U){ie.cmdState.push(U)}function be(ie){return ie.cmdState.length>0?ie.cmdState[ie.cmdState.length-1]:null}function $(ie){var U=ie.cmdState.pop();U&&U.closeBracket()}function P(ie){for(var U=ie.cmdState,F=U.length-1;F>=0;F--){var I=U[F];if(I.name=="DEFAULT")continue;return I}return{styleIdentifier:function(){return null}}}function M(ie,U,F){return function(){this.name=ie,this.bracketNo=0,this.style=U,this.styles=F,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var b={};b.importmodule=M("importmodule","tag",["string","builtin"]),b.documentclass=M("documentclass","tag",["","atom"]),b.usepackage=M("usepackage","tag",["atom"]),b.begin=M("begin","tag",["atom"]),b.end=M("end","tag",["atom"]),b.label=M("label","tag",["atom"]),b.ref=M("ref","tag",["atom"]),b.eqref=M("eqref","tag",["atom"]),b.cite=M("cite","tag",["atom"]),b.bibitem=M("bibitem","tag",["atom"]),b.Bibitem=M("Bibitem","tag",["atom"]),b.RBibitem=M("RBibitem","tag",["atom"]),b.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function H(ie,U){ie.f=U}function K(ie,U){var F;if(ie.match(/^\\[a-zA-Z@]+/)){var I=ie.current().slice(1);return F=b.hasOwnProperty(I)?b[I]:b.DEFAULT,F=new F,we(U,F),H(U,Ee),F.style}if(ie.match(/^\\[$&%#{}_]/))return"tag";if(ie.match(/^\\[,;!\/\\]/))return"tag";if(ie.match("\\["))return H(U,function(ae,Re){return re(ae,Re,"\\]")}),"keyword";if(ie.match("\\("))return H(U,function(ae,Re){return re(ae,Re,"\\)")}),"keyword";if(ie.match("$$"))return H(U,function(ae,Re){return re(ae,Re,"$$")}),"keyword";if(ie.match("$"))return H(U,function(ae,Re){return re(ae,Re,"$")}),"keyword";var se=ie.next();if(se=="%")return ie.skipToEnd(),"comment";if(se=="}"||se=="]"){if(F=be(U),F)F.closeBracket(se),H(U,Ee);else return"error";return"bracket"}else return se=="{"||se=="["?(F=b.DEFAULT,F=new F,we(U,F),"bracket"):/\d/.test(se)?(ie.eatWhile(/[\w.%]/),"atom"):(ie.eatWhile(/[\w\-_]/),F=P(U),F.name=="begin"&&(F.argument=ie.current()),F.styleIdentifier())}function re(ie,U,F){if(ie.eatSpace())return null;if(F&&ie.match(F))return H(U,K),"keyword";if(ie.match(/^\\[a-zA-Z@]+/))return"tag";if(ie.match(/^[a-zA-Z]+/))return"variable-2";if(ie.match(/^\\[$&%#{}_]/))return"tag";if(ie.match(/^\\[,;!\/]/))return"tag";if(ie.match(/^[\^_&]/))return"tag";if(ie.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ie.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var I=ie.next();return I=="{"||I=="}"||I=="["||I=="]"||I=="("||I==")"?"bracket":I=="%"?(ie.skipToEnd(),"comment"):"error"}function Ee(ie,U){var F=ie.peek(),I;return F=="{"||F=="["?(I=be(U),I.openBracket(F),ie.eat(F),H(U,K),"bracket"):/[ \t\r]/.test(F)?(ie.eat(F),null):(H(U,K),$(U),K(ie,U))}return{startState:function(){var ie=te.inMathMode?function(U,F){return re(U,F)}:K;return{cmdState:[],f:ie}},copyState:function(ie){return{cmdState:ie.cmdState.slice(),f:ie.f}},token:function(ie,U){return U.f(ie,U)},blankLine:function(ie){ie.f=K,ie.cmdState.length=0},lineComment:"%"}}),j.defineMIME("text/x-stex","stex"),j.defineMIME("text/x-latex","stex")})},"19Vz":function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){j.defineOption("placeholder","",function(M,b,H){var K=H&&H!=j.Init;if(b&&!K)M.on("blur",be),M.on("change",$),M.on("swapDoc",$),j.on(M.getInputField(),"compositionupdate",M.state.placeholderCompose=function(){we(M)}),$(M);else if(!b&&K){M.off("blur",be),M.off("change",$),M.off("swapDoc",$),j.off(M.getInputField(),"compositionupdate",M.state.placeholderCompose),ve(M);var re=M.getWrapperElement();re.className=re.className.replace(" CodeMirror-empty","")}b&&!M.hasFocus()&&be(M)});function ve(M){M.state.placeholder&&(M.state.placeholder.parentNode.removeChild(M.state.placeholder),M.state.placeholder=null)}function te(M){ve(M);var b=M.state.placeholder=document.createElement("pre");b.style.cssText="height: 0; overflow: visible",b.style.direction=M.getOption("direction"),b.className="CodeMirror-placeholder CodeMirror-line-like";var H=M.getOption("placeholder");typeof H=="string"&&(H=document.createTextNode(H)),b.appendChild(H),M.display.lineSpace.insertBefore(b,M.display.lineSpace.firstChild)}function we(M){setTimeout(function(){var b=!1,H=M.getInputField();H.nodeName=="TEXTAREA"?b=!H.value:M.lineCount()==1&&(b=!/[^\u200b]/.test(H.querySelector(".CodeMirror-line").textContent)),b?te(M):ve(M)},20)}function be(M){P(M)&&te(M)}function $(M){var b=M.getWrapperElement(),H=P(M);b.className=b.className.replace(" CodeMirror-empty","")+(H?" CodeMirror-empty":""),H?te(M):ve(M)}function P(M){return M.lineCount()===1&&M.getLine(0)===""}})},"1eCo":function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){"use strict";var ve={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},te={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};j.defineMode("xml",function(we,be){var $=we.indentUnit,P={},M=be.htmlMode?ve:te;for(var b in M)P[b]=M[b];for(var b in be)P[b]=be[b];var H,K;function re(y,z){function W(N){return z.tokenize=N,N(y,z)}var w=y.next();if(w=="<")return y.eat("!")?y.eat("[")?y.match("CDATA[")?W(U("atom","]]>")):null:y.match("--")?W(U("comment","-->")):y.match("DOCTYPE",!0,!0)?(y.eatWhile(/[\w\._\-]/),W(F(1))):null:y.eat("?")?(y.eatWhile(/[\w\._\-]/),z.tokenize=U("meta","?>"),"meta"):(H=y.eat("/")?"closeTag":"openTag",z.tokenize=Ee,"tag bracket");if(w=="&"){var Y;return y.eat("#")?y.eat("x")?Y=y.eatWhile(/[a-fA-F\d]/)&&y.eat(";"):Y=y.eatWhile(/[\d]/)&&y.eat(";"):Y=y.eatWhile(/[\w\.\-:]/)&&y.eat(";"),Y?"atom":"error"}else return y.eatWhile(/[^&<]/),null}re.isInText=!0;function Ee(y,z){var W=y.next();if(W==">"||W=="/"&&y.eat(">"))return z.tokenize=re,H=W==">"?"endTag":"selfcloseTag","tag bracket";if(W=="=")return H="equals",null;if(W=="<"){z.tokenize=re,z.state=Re,z.tagName=z.tagStart=null;var w=z.tokenize(y,z);return w?w+" tag error":"tag error"}else return/[\'\"]/.test(W)?(z.tokenize=ie(W),z.stringStartCol=y.column(),z.tokenize(y,z)):(y.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ie(y){var z=function(W,w){for(;!W.eol();)if(W.next()==y){w.tokenize=Ee;break}return"string"};return z.isInAttribute=!0,z}function U(y,z){return function(W,w){for(;!W.eol();){if(W.match(z)){w.tokenize=re;break}W.next()}return y}}function F(y){return function(z,W){for(var w;(w=z.next())!=null;){if(w=="<")return W.tokenize=F(y+1),W.tokenize(z,W);if(w==">")if(y==1){W.tokenize=re;break}else return W.tokenize=F(y-1),W.tokenize(z,W)}return"meta"}}function I(y,z,W){this.prev=y.context,this.tagName=z,this.indent=y.indented,this.startOfLine=W,(P.doNotIndent.hasOwnProperty(z)||y.context&&y.context.noIndent)&&(this.noIndent=!0)}function se(y){y.context&&(y.context=y.context.prev)}function ae(y,z){for(var W;;){if(!y.context)return;if(W=y.context.tagName,!P.contextGrabbers.hasOwnProperty(W)||!P.contextGrabbers[W].hasOwnProperty(z))return;se(y)}}function Re(y,z,W){return y=="openTag"?(W.tagStart=z.column(),He):y=="closeTag"?de:Re}function He(y,z,W){return y=="word"?(W.tagName=z.current(),K="tag",me):P.allowMissingTagName&&y=="endTag"?(K="tag bracket",me(y,z,W)):(K="error",He)}function de(y,z,W){if(y=="word"){var w=z.current();return W.context&&W.context.tagName!=w&&P.implicitlyClosed.hasOwnProperty(W.context.tagName)&&se(W),W.context&&W.context.tagName==w||P.matchClosing===!1?(K="tag",Oe):(K="tag error",De)}else return P.allowMissingTagName&&y=="endTag"?(K="tag bracket",Oe(y,z,W)):(K="error",De)}function Oe(y,z,W){return y!="endTag"?(K="error",Oe):(se(W),Re)}function De(y,z,W){return K="error",Oe(y,z,W)}function me(y,z,W){if(y=="word")return K="attribute",ge;if(y=="endTag"||y=="selfcloseTag"){var w=W.tagName,Y=W.tagStart;return W.tagName=W.tagStart=null,y=="selfcloseTag"||P.autoSelfClosers.hasOwnProperty(w)?ae(W,w):(ae(W,w),W.context=new I(W,w,Y==W.indented)),Re}return K="error",me}function ge(y,z,W){return y=="equals"?le:(P.allowMissing||(K="error"),me(y,z,W))}function le(y,z,W){return y=="string"?Z:y=="word"&&P.allowUnquoted?(K="string",me):(K="error",me(y,z,W))}function Z(y,z,W){return y=="string"?Z:me(y,z,W)}return{startState:function(y){var z={tokenize:re,state:Re,indented:y||0,tagName:null,tagStart:null,context:null};return y!=null&&(z.baseIndent=y),z},token:function(y,z){if(!z.tagName&&y.sol()&&(z.indented=y.indentation()),y.eatSpace())return null;H=null;var W=z.tokenize(y,z);return(W||H)&&W!="comment"&&(K=null,z.state=z.state(H||W,y,z),K&&(W=K=="error"?W+" error":K)),W},indent:function(y,z,W){var w=y.context;if(y.tokenize.isInAttribute)return y.tagStart==y.indented?y.stringStartCol+1:y.indented+$;if(w&&w.noIndent)return j.Pass;if(y.tokenize!=Ee&&y.tokenize!=re)return W?W.match(/^(\s*)/)[0].length:0;if(y.tagName)return P.multilineTagIndentPastTag!==!1?y.tagStart+y.tagName.length+2:y.tagStart+$*(P.multilineTagIndentFactor||1);if(P.alignCDATA&&/<!\[CDATA\[/.test(z))return 0;var Y=z&&/^<(\/)?([\w_:\.-]*)/.exec(z);if(Y&&Y[1])for(;w;)if(w.tagName==Y[2]){w=w.prev;break}else if(P.implicitlyClosed.hasOwnProperty(w.tagName))w=w.prev;else break;else if(Y)for(;w;){var N=P.contextGrabbers[w.tagName];if(N&&N.hasOwnProperty(Y[2]))w=w.prev;else break}for(;w&&w.prev&&!w.startOfLine;)w=w.prev;return w?w.indent+$:y.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:P.htmlMode?"html":"xml",helperType:P.htmlMode?"html":"xml",skipAttribute:function(y){y.state==le&&(y.state=me)},xmlCurrentTag:function(y){return y.tagName?{name:y.tagName,close:y.type=="closeTag"}:null},xmlCurrentContext:function(y){for(var z=[],W=y.context;W;W=W.prev)W.tagName&&z.push(W.tagName);return z.reverse()}}}),j.defineMIME("text/xml","xml"),j.defineMIME("application/xml","xml"),j.mimeModes.hasOwnProperty("text/html")||j.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"55Ip":function(ot,ze,x){"use strict";x.d(ze,"a",function(){return ae}),x.d(ze,"b",function(){return me});var j=x("Ty5D"),ve=x("dI71"),te=x("q1tI"),we=x.n(te),be=x("YS25"),$=x("17x9"),P=x.n($),M=x("wx14"),b=x("zLVn"),H=x("9R94"),K=function(le){Object(ve.a)(Z,le);function Z(){for(var z,W=arguments.length,w=new Array(W),Y=0;Y<W;Y++)w[Y]=arguments[Y];return z=le.call.apply(le,[this].concat(w))||this,z.history=Object(be.a)(z.props),z}var y=Z.prototype;return y.render=function(){return we.a.createElement(j.c,{history:this.history,children:this.props.children})},Z}(we.a.Component),re=function(le){Object(ve.a)(Z,le);function Z(){for(var z,W=arguments.length,w=new Array(W),Y=0;Y<W;Y++)w[Y]=arguments[Y];return z=le.call.apply(le,[this].concat(w))||this,z.history=Object(be.b)(z.props),z}var y=Z.prototype;return y.render=function(){return we.a.createElement(j.c,{history:this.history,children:this.props.children})},Z}(we.a.Component),Ee=function(Z,y){return typeof Z=="function"?Z(y):Z},ie=function(Z,y){return typeof Z=="string"?Object(be.c)(Z,null,null,y):Z},U=function(Z){return Z},F=we.a.forwardRef;typeof F=="undefined"&&(F=U);function I(le){return!!(le.metaKey||le.altKey||le.ctrlKey||le.shiftKey)}var se=F(function(le,Z){var y=le.innerRef,z=le.navigate,W=le.onClick,w=Object(b.a)(le,["innerRef","navigate","onClick"]),Y=w.target,N=Object(M.a)({},w,{onClick:function(S){try{W&&W(S)}catch(c){throw S.preventDefault(),c}!S.defaultPrevented&&S.button===0&&(!Y||Y==="_self")&&!I(S)&&(S.preventDefault(),z())}});return U!==F?N.ref=Z||y:N.ref=y,we.a.createElement("a",N)}),ae=F(function(le,Z){var y=le.component,z=y===void 0?se:y,W=le.replace,w=le.to,Y=le.innerRef,N=Object(b.a)(le,["component","replace","to","innerRef"]);return we.a.createElement(j.e.Consumer,null,function(L){L||Object(H.a)(!1);var S=L.history,c=ie(Ee(w,L.location),L.location),l=c?S.createHref(c):"",p=Object(M.a)({},N,{href:l,navigate:function(){var R=Ee(w,L.location),q=W?S.replace:S.push;q(R)}});return U!==F?p.ref=Z||Y:p.innerRef=Y,we.a.createElement(z,p)})});if(!1)var Re,He;var de=function(Z){return Z},Oe=we.a.forwardRef;typeof Oe=="undefined"&&(Oe=de);function De(){for(var le=arguments.length,Z=new Array(le),y=0;y<le;y++)Z[y]=arguments[y];return Z.filter(function(z){return z}).join(" ")}var me=Oe(function(le,Z){var y=le["aria-current"],z=y===void 0?"page":y,W=le.activeClassName,w=W===void 0?"active":W,Y=le.activeStyle,N=le.className,L=le.exact,S=le.isActive,c=le.location,l=le.sensitive,p=le.strict,C=le.style,R=le.to,q=le.innerRef,ye=Object(b.a)(le,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return we.a.createElement(j.e.Consumer,null,function(oe){oe||Object(H.a)(!1);var Se=c||oe.location,ne=ie(Ee(R,Se),Se),fe=ne.pathname,B=fe&&fe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Q=B?Object(j.f)(Se.pathname,{path:B,exact:L,sensitive:l,strict:p}):null,h=!!(S?S(Q,Se):Q),T=h?De(N,w):N,v=h?Object(M.a)({},C,{},Y):C,ee=Object(M.a)({"aria-current":h&&z||null,className:T,style:v,to:ne},ye);return de!==Oe?ee.ref=Z||q:ee.innerRef=q,we.a.createElement(ae,ee)})});if(!1)var ge},"7ahc":function(ot,ze,x){"use strict";x.d(ze,"a",function(){return He});var j=x("k1fw"),ve=x("0Owb"),te=x("+L6B"),we=x("2/Rp"),be=x("y8nQ"),$=x("Vl3Y"),P=x("tJVT"),M=x("OaEy"),b=x("2fM7"),H=x("q1tI"),K=x.n(H),re=x("VrN/"),Ee=x.n(re),ie=x("p77/"),U=x.n(ie),F=x("c5Ni"),I=x.n(F),se=b.a.Option,ae={labelCol:{span:4},wrapperCol:{span:20}},Re={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};ze.b=function(de){var Oe=de.callback,De=de.onCancel,me=Object(H.useState)("python"),ge=Object(P.a)(me,2),le=ge[0],Z=ge[1];function y(W){Z(Re[W][1])}function z(W){Oe(W)}return K.a.createElement($.a,Object(ve.a)({},ae,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:z}),K.a.createElement($.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},K.a.createElement(b.a,{onChange:y},Object.keys(Re).map(function(W){return K.a.createElement(se,{key:W,value:W},Re[W][0])}))),K.a.createElement($.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},K.a.createElement(He,{mode:le})),K.a.createElement("div",{className:"flex-container flex-end"},K.a.createElement(we.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),K.a.createElement(we.a,{type:"ghost",onClick:De},"\u53D6\u6D88")))};function He(de){var Oe=de.value,De=de.onChange,me=de.mode,ge=de.options,le=ge===void 0?{}:ge,Z=Object(H.useRef)(),y=Object(H.useState)(),z=Object(P.a)(y,2),W=z[0],w=z[1];return Object(H.useEffect)(function(){if(W){function Y(N){var L=N.getValue();De&&De(L)}return W.on("change",Y),function(){W.off("change",Y)}}},[W,De]),Object(H.useEffect)(function(){W&&W.setOption("mode",me)},[W,me]),Object(H.useEffect)(function(){W&&((Oe!==W.getValue()||Oe==="")&&setTimeout(function(){W.setValue(Oe||" ")},300))},[W,Oe]),Object(H.useEffect)(function(){if(Z.current&&!W){var Y=Ee.a.fromTextArea(Z.current,Object(j.a)({mode:me,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},le));w(Y)}},[Z.current,W]),K.a.createElement("div",{className:"my-codemirror-container"},K.a.createElement("textarea",{ref:Z}))}},"7ixt":function(ot,ze,x){"use strict";x.d(ze,"a",function(){return te});var j={adjustX:1,adjustY:1},ve=[0,0],te={left:{points:["cr","cl"],overflow:j,offset:[-4,0],targetOffset:ve},right:{points:["cl","cr"],overflow:j,offset:[4,0],targetOffset:ve},top:{points:["bc","tc"],overflow:j,offset:[0,-4],targetOffset:ve},bottom:{points:["tc","bc"],overflow:j,offset:[0,4],targetOffset:ve},topLeft:{points:["bl","tl"],overflow:j,offset:[0,-4],targetOffset:ve},leftTop:{points:["tr","tl"],overflow:j,offset:[-4,0],targetOffset:ve},topRight:{points:["br","tr"],overflow:j,offset:[0,-4],targetOffset:ve},rightTop:{points:["tl","tr"],overflow:j,offset:[4,0],targetOffset:ve},bottomRight:{points:["tr","br"],overflow:j,offset:[0,4],targetOffset:ve},rightBottom:{points:["bl","br"],overflow:j,offset:[4,0],targetOffset:ve},bottomLeft:{points:["tl","bl"],overflow:j,offset:[0,4],targetOffset:ve},leftBottom:{points:["br","bl"],overflow:j,offset:[-4,0],targetOffset:ve}},we=te},"8EBN":function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){"use strict";j.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 ve=0;ve<j.modeInfo.length;ve++){var te=j.modeInfo[ve];te.mimes&&(te.mime=te.mimes[0])}j.findModeByMIME=function(we){we=we.toLowerCase();for(var be=0;be<j.modeInfo.length;be++){var $=j.modeInfo[be];if($.mime==we)return $;if($.mimes){for(var P=0;P<$.mimes.length;P++)if($.mimes[P]==we)return $}}if(/\+xml$/.test(we))return j.findModeByMIME("application/xml");if(/\+json$/.test(we))return j.findModeByMIME("application/json")},j.findModeByExtension=function(we){we=we.toLowerCase();for(var be=0;be<j.modeInfo.length;be++){var $=j.modeInfo[be];if($.ext){for(var P=0;P<$.ext.length;P++)if($.ext[P]==we)return $}}},j.findModeByFileName=function(we){for(var be=0;be<j.modeInfo.length;be++){var $=j.modeInfo[be];if($.file&&$.file.test(we))return $}var P=we.lastIndexOf("."),M=P>-1&&we.substring(P+1,we.length);if(M)return j.findModeByExtension(M)},j.findModeByName=function(we){we=we.toLowerCase();for(var be=0;be<j.modeInfo.length;be++){var $=j.modeInfo[be];if($.name.toLowerCase()==we)return $;if($.alias){for(var P=0;P<$.alias.length;P++)if($.alias[P].toLowerCase()==we)return $}}}})},"9Bee":function(ot,ze,x){"use strict";var j=x("k1fw"),ve=x("tJVT"),te=x("q1tI"),we=x.n(te),be=x("vg9a"),$=x("DlQD"),P=x.n($),M=x("rUJ1");function b(p,C){var R=p.match(/^(\s+)(?:```)/);if(R===null)return C;var q=R[1];return C.split(`
`).map(function(ye){var oe=ye.match(/^\s+/);if(oe===null)return ye;var Se=Object(ve.a)(oe,1),ne=Se[0];return ne.length>=q.length?ye.slice(q.length):ye}).join(`
`)}var H=[],K=["<ul>"],re=new P.a.Renderer,Ee=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ie(){H.length=0,K=["<ul>"]}var U={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function F(p,C,R,q){if(C>=p.length||p[C].level<=R)return C;var ye=p[C];q.push("<li><a href='#"+ye.anchor+"'>"+ye.text+"</a>"),C++;var oe=[];return C=F(p,C,ye.level,oe),oe.length>0&&(q.push("<ul>"),oe.forEach(function(Se){q.push(Se)}),q.push("</ul>")),q.push("</li>"),C=F(p,C,R,q),C}function I(){return F(H,0,0,K),K.push("</ul>"),K.join("")}var se={heading:function(C){var R=Ee.exec(C);if(R)return{type:"heading",raw:R[0],depth:R[1].length,text:R[2]}},fences:function(C){var R=this.rules.block.fences.exec(C);if(R){var q=R[0],ye=b(q,R[3]||""),oe=R[2]?R[2].trim():R[2];if(["latex","katex","math"].indexOf(oe)>=0){var Se=He(),ne=ye;ye=Se,de[Se]={type:"block",expression:ne}}return{type:"code",raw:q,lang:oe,text:ye}}}},ae=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Re=0,He=function(){return"__special_katext_id_".concat(Re++,"__")},de={};function Oe(){return de}function De(){Re=0,de={}}function me(p){return p=p.replace(ae,function(C,R){var q=He();return de[q]={type:"inline",expression:R},q}),p}var ge=re.listitem;re.listitem=function(p){return ge(me(p))};var le=re.paragraph;re.paragraph=function(p){return le(me(p))};var Z=re.tablecell;re.tablecell=function(p,C){return Z(me(p),C)},re.code=function(p,C,R){var q=(C||"").match(/\S*/)[0];return q?["latex","katex","math"].indexOf(q)>=0?"<p class='editormd-tex'>".concat(p,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(C,'">').concat(R?p:Object(M.escape)(p,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(R?p:Object(M.escape)(p,!0))+"</code></pre>"},re.heading=function(p,C,R){var q=this.options.headerPrefix+R.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return H.push({anchor:q,level:C,text:p}),"<h"+C+' id="'+q+'">'+p+"</h"+C+">"},P.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),P.a.use({tokenizer:se,renderer:re});var y=P.a,z=x("SJMd"),W=x("ulZh"),w=x.n(W),Y=x("m3rI"),N=x("Oy/b"),L=x("p5ED"),S=/<pre[^>]*>/g;function c(p){var C=document.createElement("div");return C.innerHTML=p,C.childNodes.length===0?"":C.childNodes[0].nodeValue}var l=ze.a=function(p){var C=p.value,R=C===void 0?"":C,q=p.className,ye=p.showTextOnly,oe=p.showLines,Se=p.style,ne=Se===void 0?{}:Se,fe=p.stylesPrev,B=fe===void 0?{}:fe,Q=String(R),h=Object(te.useState)(""),T=Object(ve.a)(h,2),v=T[0],ee=T[1],ue=Object(te.useMemo)(function(){try{var Le=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ae=/\"\/api\/attachments\/|\"\/attachments\/download\//g,pe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Q=Q.replace(Le,"("+Y.a.API_SERVER+"/api/attachments/").replace(Ae,'"'+Y.a.API_SERVER+"/api/attachments/").replace(pe,'"'+Y.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,`
`),Q=Q.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Xe){}var Ce=y(Q),Ie=Oe();if(Q.match(/\[TOC\]/)&&(Ce=Ce.replace("<p>[TOC]</p>",I()),ie()),Ce=Ce.replace(/(__special_katext_id_\d+__)/g,function(Xe,Ke){var nt=Ie[Ke],qe=nt.type,Ve=nt.expression;return Object(N.renderToString)(c(Ve)||"",{displayMode:qe==="block",throwOnError:!1,output:"html"})}),Ce=Ce.replace(/▁/g,"\u2581\u2581\u2581"),De(),ye){var Ye=document.createElement("div");return Ye.innerHTML=Ce,Ye.innerText}return setTimeout(function(){return _e()},500),Ce},[Q]),G=Object(te.useRef)();U.WebkitLineClamp=oe,oe&&(ne=Object(j.a)(Object(j.a)({},ne),U));function he(Le){var Ae=Le.target;if(Ae.tagName.toUpperCase()==="A"){var pe=Ae.getAttribute("href");if(pe.indexOf("office")>-1)Le.preventDefault(),ee(pe);else if(pe.startsWith("#")){Le.preventDefault();var Ce=document.getElementById(pe.replace("#",""));Ce&&Ce.scrollIntoView(!0)}}}var _e=function(){var Ae,pe=(Ae=G.current)===null||Ae===void 0?void 0:Ae.querySelectorAll("video");pe==null||pe.forEach(function(Ce){if(Ce.oncontextmenu=function(){return!1},Ce.src.indexOf(".m3u8")>-1&&!Ce.canPlayType("application/vnd.apple.mpegurl")){if(w.a.isSupported()){var Ie=new w.a;Ie.loadSource(Ce.src),Ie.attachMedia(Ce)}}})};return Object(te.useEffect)(function(){if(G.current&&ue&&(ue.match(S)&&window.PR.prettyPrint()),G.current)return G.current.addEventListener("click",he),function(){G.current.removeEventListener("click",he),De(),ie()}},[ue,G.current,he]),we.a.createElement(we.a.Fragment,null,we.a.createElement("div",{ref:G,style:Object(j.a)({},ne),className:"".concat(q||""," markdown-body "),dangerouslySetInnerHTML:{__html:ue}}),we.a.createElement(L.a,{close:!0,data:v,type:v!=null&&v.length?"office":"",style:Object(j.a)({},B),onClose:function(){return ee("")}}))}},"9VGf":function(ot,ze,x){"use strict";x.d(ze,"a",function(){return te});var j=x("q1tI"),ve=x.n(j);function te(we,be){var $=Object(j.useRef)();Object(j.useEffect)(function(){$.current=we}),Object(j.useEffect)(function(){function P(){$.current()}if(be!==null){var M=setInterval(P,be);return function(){return clearInterval(M)}}},[be])}},Bd2K:function(ot,ze,x){(function(j){j(x("VrN/"),x("osHv"))})(function(j){j.defineOption("autoCloseTags",!1,function(b,H,K){if(K!=j.Init&&K&&b.removeKeyMap("autoCloseTags"),!H)return;var re={name:"autoCloseTags"};(typeof H!="object"||H.whenClosing!==!1)&&(re["'/'"]=function(Ee){return $(Ee)}),(typeof H!="object"||H.whenOpening!==!1)&&(re["'>'"]=function(Ee){return we(Ee)}),b.addKeyMap(re)});var ve=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],te=["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 we(b){if(b.getOption("disableInput"))return j.Pass;for(var H=b.listSelections(),K=[],re=b.getOption("autoCloseTags"),Ee=0;Ee<H.length;Ee++){if(!H[Ee].empty())return j.Pass;var ie=H[Ee].head,U=b.getTokenAt(ie),F=j.innerMode(b.getMode(),U.state),I=F.state,se=F.mode.xmlCurrentTag&&F.mode.xmlCurrentTag(I),ae=se&&se.name;if(!ae)return j.Pass;var Re=F.mode.configuration=="html",He=typeof re=="object"&&re.dontCloseTags||Re&&ve,de=typeof re=="object"&&re.indentTags||Re&&te;U.end>ie.ch&&(ae=ae.slice(0,ae.length-U.end+ie.ch));var Oe=ae.toLowerCase();if(!ae||U.type=="string"&&(U.end!=ie.ch||!/[\"\']/.test(U.string.charAt(U.string.length-1))||U.string.length==1)||U.type=="tag"&&se.close||U.string.indexOf("/")==ie.ch-U.start-1||He&&P(He,Oe)>-1||M(b,F.mode.xmlCurrentContext&&F.mode.xmlCurrentContext(I)||[],ae,ie,!0))return j.Pass;var De=typeof re=="object"&&re.emptyTags;if(De&&P(De,ae)>-1){K[Ee]={text:"/>",newPos:j.Pos(ie.line,ie.ch+2)};continue}var me=de&&P(de,Oe)>-1;K[Ee]={indent:me,text:">"+(me?`
`:"")+"</"+ae+">",newPos:me?j.Pos(ie.line+1,0):j.Pos(ie.line,ie.ch+1)}}for(var ge=typeof re=="object"&&re.dontIndentOnAutoClose,Ee=H.length-1;Ee>=0;Ee--){var le=K[Ee];b.replaceRange(le.text,H[Ee].head,H[Ee].anchor,"+insert");var Z=b.listSelections().slice(0);Z[Ee]={head:le.newPos,anchor:le.newPos},b.setSelections(Z),!ge&&le.indent&&(b.indentLine(le.newPos.line,null,!0),b.indentLine(le.newPos.line+1,null,!0))}}function be(b,H){for(var K=b.listSelections(),re=[],Ee=H?"/":"</",ie=b.getOption("autoCloseTags"),U=typeof ie=="object"&&ie.dontIndentOnSlash,F=0;F<K.length;F++){if(!K[F].empty())return j.Pass;var I=K[F].head,se=b.getTokenAt(I),ae=j.innerMode(b.getMode(),se.state),Re=ae.state;if(H&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=I.ch-1))return j.Pass;var He,de=ae.mode.name!="xml"&&b.getMode().name=="htmlmixed";if(de&&ae.mode.name=="javascript")He=Ee+"script";else if(de&&ae.mode.name=="css")He=Ee+"style";else{var Oe=ae.mode.xmlCurrentContext&&ae.mode.xmlCurrentContext(Re);if(!Oe||Oe.length&&M(b,Oe,Oe[Oe.length-1],I))return j.Pass;He=Ee+Oe[Oe.length-1]}b.getLine(I.line).charAt(se.end)!=">"&&(He+=">"),re[F]=He}if(b.replaceSelections(re),K=b.listSelections(),!U)for(var F=0;F<K.length;F++)(F==K.length-1||K[F].head.line<K[F+1].head.line)&&b.indentLine(K[F].head.line)}function $(b){return b.getOption("disableInput")?j.Pass:be(b,!0)}j.commands.closeTag=function(b){return be(b)};function P(b,H){if(b.indexOf)return b.indexOf(H);for(var K=0,re=b.length;K<re;++K)if(b[K]==H)return K;return-1}function M(b,H,K,re,Ee){if(!j.scanForClosingTag)return!1;var ie=Math.min(b.lastLine()+1,re.line+500),U=j.scanForClosingTag(b,re,null,ie);if(!U||U.tag!=K)return!1;for(var F=Ee?1:0,I=H.length-1;I>=0&&H[I]==K;I--)++F;re=U.to;for(var I=1;I<F;I++){var se=j.scanForClosingTag(b,re,null,ie);if(!se||se.tag!=K)return!1;re=se.to}return!0}})},BjJ7:function(ot,ze,x){"use strict";x.d(ze,"d",function(){return ve}),x.d(ze,"c",function(){return te}),x.d(ze,"e",function(){return we}),x.d(ze,"b",function(){return be}),x.d(ze,"a",function(){return P});var j=x("m3rI");function ve(M){var b=!0;if(M.length>0){for(var H=0;H<M.length;H++)if(M[H].compile_success==0||!M[H].compile_success){b=!1;break}}else b=!1;return b}function te(M){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",H=[],K=0;K<M.length;K++){var re=M[K],Ee=b?"".concat(b,"/").concat(re.name):"".concat(re.name);H.push({title:re.name,isLeaf:!(re.type==="tree"),key:Ee})}return H}function we(M,b,H){for(var K=0;K<M.length;K++){var re=M[K];if(re.key===b){re.children=H;break}re.children&&we(re.children,b,H)}return M}function be(M,b,H){var K;return function(){var re=this,Ee=arguments,ie=function(){K=null,H||M.apply(re,Ee)},U=H&&!K;clearTimeout(K),K=setTimeout(ie,b),U&&M.apply(re,Ee)}}var $=!0,P=j.a.API_SERVER},"C+DQ":function(ot,ze,x){},DlQD:function(ot,ze,x){(function(j,ve){ot.exports=ve()})(this,function(){"use strict";function j(_,O){for(var D=0;D<O.length;D++){var f=O[D];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(_,f.key,f)}}function ve(_,O,D){return O&&j(_.prototype,O),D&&j(_,D),_}function te(_,O){if(!_)return;if(typeof _=="string")return we(_,O);var D=Object.prototype.toString.call(_).slice(8,-1);if(D==="Object"&&_.constructor&&(D=_.constructor.name),D==="Map"||D==="Set")return Array.from(_);if(D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D))return we(_,O)}function we(_,O){(O==null||O>_.length)&&(O=_.length);for(var D=0,f=new Array(O);D<O;D++)f[D]=_[D];return f}function be(_,O){var D;if(typeof Symbol=="undefined"||_[Symbol.iterator]==null){if(Array.isArray(_)||(D=te(_))||O&&_&&typeof _.length=="number"){D&&(_=D);var f=0;return function(){return f>=_.length?{done:!0}:{done:!1,value:_[f++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return D=_[Symbol.iterator](),D.next.bind(D)}function $(_,O){return O={exports:{}},_(O,O.exports),O.exports}var P=$(function(_){function O(){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 D(f){_.exports.defaults=f}_.exports={defaults:O(),getDefaults:O,changeDefaults:D}}),M=P.defaults,b=P.getDefaults,H=P.changeDefaults,K=/[&<>"']/,re=/[&<>"']/g,Ee=/[<>"']|&(?!#?\w+;)/,ie=/[<>"']|&(?!#?\w+;)/g,U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},F=function(O){return U[O]};function I(_,O){if(O){if(K.test(_))return _.replace(re,F)}else if(Ee.test(_))return _.replace(ie,F);return _}var se=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ae(_){return _.replace(se,function(O,D){return D=D.toLowerCase(),D==="colon"?":":D.charAt(0)==="#"?D.charAt(1)==="x"?String.fromCharCode(parseInt(D.substring(2),16)):String.fromCharCode(+D.substring(1)):""})}var Re=/(^|[^\[])\^/g;function He(_,O){_=_.source||_,O=O||"";var D={replace:function(m,g){return g=g.source||g,g=g.replace(Re,"$1"),_=_.replace(m,g),D},getRegex:function(){return new RegExp(_,O)}};return D}var de=/[^\w:]/g,Oe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function De(_,O,D){if(_){var f;try{f=decodeURIComponent(ae(D)).replace(de,"").toLowerCase()}catch(m){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}O&&!Oe.test(D)&&(D=y(O,D));try{D=encodeURI(D).replace(/%25/g,"%")}catch(m){return null}return D}var me={},ge=/^[^:]+:\/*[^/]*$/,le=/^([^:]+:)[\s\S]*$/,Z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(_,O){me[" "+_]||(ge.test(_)?me[" "+_]=_+"/":me[" "+_]=Y(_,"/",!0)),_=me[" "+_];var D=_.indexOf(":")===-1;return O.substring(0,2)==="//"?D?O:_.replace(le,"$1")+O:O.charAt(0)==="/"?D?O:_.replace(Z,"$1")+O:_+O}var z={exec:function(){}};function W(_){for(var O=1,D,f;O<arguments.length;O++){D=arguments[O];for(f in D)Object.prototype.hasOwnProperty.call(D,f)&&(_[f]=D[f])}return _}function w(_,O){var D=_.replace(/\|/g,function(g,E,V){for(var ce=!1,Pe=E;--Pe>=0&&V[Pe]==="\\";)ce=!ce;return ce?"|":" |"}),f=D.split(/ \|/),m=0;if(f.length>O)f.splice(O);else for(;f.length<O;)f.push("");for(;m<f.length;m++)f[m]=f[m].trim().replace(/\\\|/g,"|");return f}function Y(_,O,D){var f=_.length;if(f===0)return"";for(var m=0;m<f;){var g=_.charAt(f-m-1);if(g===O&&!D)m++;else if(g!==O&&D)m++;else break}return _.substr(0,f-m)}function N(_,O){if(_.indexOf(O[1])===-1)return-1;for(var D=_.length,f=0,m=0;m<D;m++)if(_[m]==="\\")m++;else if(_[m]===O[0])f++;else if(_[m]===O[1]&&(f--,f<0))return m;return-1}function L(_){_&&_.sanitize&&!_.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 S={escape:I,unescape:ae,edit:He,cleanUrl:De,resolveUrl:y,noopTest:z,merge:W,splitCells:w,rtrim:Y,findClosingBracket:N,checkSanitizeDeprecation:L},c=P.defaults,l=S.rtrim,p=S.splitCells,C=S.escape,R=S.findClosingBracket;function q(_,O,D){var f=O.href,m=O.title?C(O.title):null,g=_[1].replace(/\\([\[\]])/g,"$1");return _[0].charAt(0)!=="!"?{type:"link",raw:D,href:f,title:m,text:g}:{type:"image",raw:D,href:f,title:m,text:C(g)}}function ye(_,O){var D=_.match(/^(\s+)(?:```)/);if(D===null)return O;var f=D[1];return O.split(`
`).map(function(m){var g=m.match(/^\s+/);if(g===null)return m;var E=g[0];return E.length>=f.length?m.slice(f.length):m}).join(`
`)}var oe=function(){function _(D){this.options=D||c}var O=_.prototype;return O.space=function(f){var m=this.rules.block.newline.exec(f);if(m)return m[0].length>1?{type:"space",raw:m[0]}:{raw:`
`}},O.code=function(f,m){var g=this.rules.block.code.exec(f);if(g){var E=m[m.length-1];if(E&&E.type==="paragraph")return{raw:g[0],text:g[0].trimRight()};var V=g[0].replace(/^ {4}/gm,"");return{type:"code",raw:g[0],codeBlockStyle:"indented",text:this.options.pedantic?V:l(V,`
`)}}},O.fences=function(f){var m=this.rules.block.fences.exec(f);if(m){var g=m[0],E=ye(g,m[3]||"");return{type:"code",raw:g,lang:m[2]?m[2].trim():m[2],text:E}}},O.heading=function(f){var m=this.rules.block.heading.exec(f);if(m)return{type:"heading",raw:m[0],depth:m[1].length,text:m[2]}},O.nptable=function(f){var m=this.rules.block.nptable.exec(f);if(m){var g={type:"table",header:p(m[1].replace(/^ *| *\| *$/g,"")),align:m[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:m[3]?m[3].replace(/\n$/,"").split(`
`):[],raw:m[0]};if(g.header.length===g.align.length){var E=g.align.length,V;for(V=0;V<E;V++)/^ *-+: *$/.test(g.align[V])?g.align[V]="right":/^ *:-+: *$/.test(g.align[V])?g.align[V]="center":/^ *:-+ *$/.test(g.align[V])?g.align[V]="left":g.align[V]=null;for(E=g.cells.length,V=0;V<E;V++)g.cells[V]=p(g.cells[V],g.header.length);return g}}},O.hr=function(f){var m=this.rules.block.hr.exec(f);if(m)return{type:"hr",raw:m[0]}},O.blockquote=function(f){var m=this.rules.block.blockquote.exec(f);if(m){var g=m[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:m[0],text:g}}},O.list=function(f){var m=this.rules.block.list.exec(f);if(m){for(var g=m[0],E=m[2],V=E.length>1,ce=E[E.length-1]===")",Pe={type:"list",raw:g,ordered:V,start:V?+E.slice(0,-1):"",loose:!1,items:[]},tt=m[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],g=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],(V?pt.length===1||!ce&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==E)&&(lt=tt.slice(mt+1).join(`
`),Pe.raw=Pe.raw.substring(0,Pe.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&&(Pe.loose=!0),bt=/^\[[ xX]\] /.test(at),$t=void 0,bt&&($t=at[1]!==" ",at=at.replace(/^\[[ xX]\] +/,"")),Pe.items.push({type:"list_item",raw:g,task:bt,checked:$t,loose:Bt,text:at});return Pe}},O.html=function(f){var m=this.rules.block.html.exec(f);if(m)return{type:this.options.sanitize?"paragraph":"html",raw:m[0],pre:!this.options.sanitizer&&(m[1]==="pre"||m[1]==="script"||m[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(m[0]):C(m[0]):m[0]}},O.def=function(f){var m=this.rules.block.def.exec(f);if(m){m[3]&&(m[3]=m[3].substring(1,m[3].length-1));var g=m[1].toLowerCase().replace(/\s+/g," ");return{tag:g,raw:m[0],href:m[2],title:m[3]}}},O.table=function(f){var m=this.rules.block.table.exec(f);if(m){var g={type:"table",header:p(m[1].replace(/^ *| *\| *$/g,"")),align:m[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:m[3]?m[3].replace(/\n$/,"").split(`
`):[]};if(g.header.length===g.align.length){g.raw=m[0];var E=g.align.length,V;for(V=0;V<E;V++)/^ *-+: *$/.test(g.align[V])?g.align[V]="right":/^ *:-+: *$/.test(g.align[V])?g.align[V]="center":/^ *:-+ *$/.test(g.align[V])?g.align[V]="left":g.align[V]=null;for(E=g.cells.length,V=0;V<E;V++)g.cells[V]=p(g.cells[V].replace(/^ *\| *| *\| *$/g,""),g.header.length);return g}}},O.lheading=function(f){var m=this.rules.block.lheading.exec(f);if(m)return{type:"heading",raw:m[0],depth:m[2].charAt(0)==="="?1:2,text:m[1]}},O.paragraph=function(f){var m=this.rules.block.paragraph.exec(f);if(m)return{type:"paragraph",raw:m[0],text:m[1].charAt(m[1].length-1)===`
`?m[1].slice(0,-1):m[1]}},O.text=function(f,m){var g=this.rules.block.text.exec(f);if(g){var E=m[m.length-1];return E&&E.type==="text"?{raw:g[0],text:g[0]}:{type:"text",raw:g[0],text:g[0]}}},O.escape=function(f){var m=this.rules.inline.escape.exec(f);if(m)return{type:"escape",raw:m[0],text:C(m[1])}},O.tag=function(f,m,g){var E=this.rules.inline.tag.exec(f);if(E)return!m&&/^<a /i.test(E[0])?m=!0:m&&/^<\/a>/i.test(E[0])&&(m=!1),!g&&/^<(pre|code|kbd|script)(\s|>)/i.test(E[0])?g=!0:g&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(E[0])&&(g=!1),{type:this.options.sanitize?"text":"html",raw:E[0],inLink:m,inRawBlock:g,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(E[0]):C(E[0]):E[0]}},O.link=function(f){var m=this.rules.inline.link.exec(f);if(m){var g=R(m[2],"()");if(g>-1){var E=m[0].indexOf("!")===0?5:4,V=E+m[1].length+g;m[2]=m[2].substring(0,g),m[0]=m[0].substring(0,V).trim(),m[3]=""}var ce=m[2],Pe="";if(this.options.pedantic){var tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ce);tt?(ce=tt[1],Pe=tt[3]):Pe=""}else Pe=m[3]?m[3].slice(1,-1):"";ce=ce.trim().replace(/^<([\s\S]*)>$/,"$1");var ft=q(m,{href:ce&&ce.replace(this.rules.inline._escapes,"$1"),title:Pe&&Pe.replace(this.rules.inline._escapes,"$1")},m[0]);return ft}},O.reflink=function(f,m){var g;if((g=this.rules.inline.reflink.exec(f))||(g=this.rules.inline.nolink.exec(f))){var E=(g[2]||g[1]).replace(/\s+/g," ");if(E=m[E.toLowerCase()],!E||!E.href){var V=g[0].charAt(0);return{type:"text",raw:V,text:V}}var ce=q(g,E,g[0]);return ce}},O.strong=function(f,m,g){g===void 0&&(g="");var E=this.rules.inline.strong.start.exec(f);if(E&&(!E[1]||E[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){m=m.slice(-1*f.length);var V=E[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;V.lastIndex=0;for(var ce;(E=V.exec(m))!=null;)if(ce=this.rules.inline.strong.middle.exec(m.slice(0,E.index+3)),ce)return{type:"strong",raw:f.slice(0,ce[0].length),text:f.slice(2,ce[0].length-2)}}},O.em=function(f,m,g){g===void 0&&(g="");var E=this.rules.inline.em.start.exec(f);if(E&&(!E[1]||E[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){m=m.slice(-1*f.length);var V=E[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;V.lastIndex=0;for(var ce;(E=V.exec(m))!=null;)if(ce=this.rules.inline.em.middle.exec(m.slice(0,E.index+2)),ce)return{type:"em",raw:f.slice(0,ce[0].length),text:f.slice(1,ce[0].length-1)}}},O.codespan=function(f){var m=this.rules.inline.code.exec(f);if(m){var g=m[2].replace(/\n/g," "),E=/[^ ]/.test(g),V=g.startsWith(" ")&&g.endsWith(" ");return E&&V&&(g=g.substring(1,g.length-1)),g=C(g,!0),{type:"codespan",raw:m[0],text:g}}},O.br=function(f){var m=this.rules.inline.br.exec(f);if(m)return{type:"br",raw:m[0]}},O.del=function(f){var m=this.rules.inline.del.exec(f);if(m)return{type:"del",raw:m[0],text:m[1]}},O.autolink=function(f,m){var g=this.rules.inline.autolink.exec(f);if(g){var E,V;return g[2]==="@"?(E=C(this.options.mangle?m(g[1]):g[1]),V="mailto:"+E):(E=C(g[1]),V=E),{type:"link",raw:g[0],text:E,href:V,tokens:[{type:"text",raw:E,text:E}]}}},O.url=function(f,m){var g;if(g=this.rules.inline.url.exec(f)){var E,V;if(g[2]==="@")E=C(this.options.mangle?m(g[0]):g[0]),V="mailto:"+E;else{var ce;do ce=g[0],g[0]=this.rules.inline._backpedal.exec(g[0])[0];while(ce!==g[0]);E=C(g[0]),g[1]==="www."?V="http://"+E:V=E}return{type:"link",raw:g[0],text:E,href:V,tokens:[{type:"text",raw:E,text:E}]}}},O.inlineText=function(f,m,g){var E=this.rules.inline.text.exec(f);if(E){var V;return m?V=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(E[0]):C(E[0]):E[0]:V=C(this.options.smartypants?g(E[0]):E[0]),{type:"text",raw:E[0],text:V}}},_}(),Se=S.noopTest,ne=S.edit,fe=S.merge,B={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:Se,table:Se,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};B._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,B._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,B.def=ne(B.def).replace("label",B._label).replace("title",B._title).getRegex(),B.bullet=/(?:[*+-]|\d{1,9}[.)])/,B.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,B.item=ne(B.item,"gm").replace(/bull/g,B.bullet).getRegex(),B.list=ne(B.list).replace(/bull/g,B.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+B.def.source+")").getRegex(),B._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",B._comment=/<!--(?!-?>)[\s\S]*?-->/,B.html=ne(B.html,"i").replace("comment",B._comment).replace("tag",B._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B.paragraph=ne(B._paragraph).replace("hr",B.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",B._tag).getRegex(),B.blockquote=ne(B.blockquote).replace("paragraph",B.paragraph).getRegex(),B.normal=fe({},B),B.gfm=fe({},B.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*|$)"}),B.gfm.nptable=ne(B.gfm.nptable).replace("hr",B.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",B._tag).getRegex(),B.gfm.table=ne(B.gfm.table).replace("hr",B.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",B._tag).getRegex(),B.pedantic=fe({},B.normal,{html:ne(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",B._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:Se,paragraph:ne(B.normal._paragraph).replace("hr",B.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",B.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Se,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:Se,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Q._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Q.punctuation=ne(Q.punctuation).replace(/punctuation/g,Q._punctuation).getRegex(),Q._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Q._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Q.em.start=ne(Q.em.start).replace(/punctuation/g,Q._punctuation).getRegex(),Q.em.middle=ne(Q.em.middle).replace(/punctuation/g,Q._punctuation).replace(/overlapSkip/g,Q._overlapSkip).getRegex(),Q.em.endAst=ne(Q.em.endAst,"g").replace(/punctuation/g,Q._punctuation).getRegex(),Q.em.endUnd=ne(Q.em.endUnd,"g").replace(/punctuation/g,Q._punctuation).getRegex(),Q.strong.start=ne(Q.strong.start).replace(/punctuation/g,Q._punctuation).getRegex(),Q.strong.middle=ne(Q.strong.middle).replace(/punctuation/g,Q._punctuation).replace(/blockSkip/g,Q._blockSkip).getRegex(),Q.strong.endAst=ne(Q.strong.endAst,"g").replace(/punctuation/g,Q._punctuation).getRegex(),Q.strong.endUnd=ne(Q.strong.endUnd,"g").replace(/punctuation/g,Q._punctuation).getRegex(),Q.blockSkip=ne(Q._blockSkip,"g").getRegex(),Q.overlapSkip=ne(Q._overlapSkip,"g").getRegex(),Q._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Q._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Q._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])?)+(?![-_])/,Q.autolink=ne(Q.autolink).replace("scheme",Q._scheme).replace("email",Q._email).getRegex(),Q._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Q.tag=ne(Q.tag).replace("comment",B._comment).replace("attribute",Q._attribute).getRegex(),Q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Q._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Q.link=ne(Q.link).replace("label",Q._label).replace("href",Q._href).replace("title",Q._title).getRegex(),Q.reflink=ne(Q.reflink).replace("label",Q._label).getRegex(),Q.reflinkSearch=ne(Q.reflinkSearch,"g").replace("reflink",Q.reflink).replace("nolink",Q.nolink).getRegex(),Q.normal=fe({},Q),Q.pedantic=fe({},Q.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:ne(/^!?\[(label)\]\((.*?)\)/).replace("label",Q._label).getRegex(),reflink:ne(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Q._label).getRegex()}),Q.gfm=fe({},Q.normal,{escape:ne(Q.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Q.gfm.url=ne(Q.gfm.url,"i").replace("email",Q.gfm._extended_email).getRegex(),Q.breaks=fe({},Q.gfm,{br:ne(Q.br).replace("{2,}","*").getRegex(),text:ne(Q.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var h={block:B,inline:Q},T=P.defaults,v=h.block,ee=h.inline;function ue(_){return _.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 G(_){var O="",D,f,m=_.length;for(D=0;D<m;D++)f=_.charCodeAt(D),Math.random()>.5&&(f="x"+f.toString(16)),O+="&#"+f+";";return O}var he=function(){function _(D){this.tokens=[],this.tokens.links=Object.create(null),this.options=D||T,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:v.normal,inline:ee.normal};this.options.pedantic?(f.block=v.pedantic,f.inline=ee.pedantic):this.options.gfm&&(f.block=v.gfm,this.options.breaks?f.inline=ee.breaks:f.inline=ee.gfm),this.tokenizer.rules=f}_.lex=function(f,m){var g=new _(m);return g.lex(f)};var O=_.prototype;return O.lex=function(f){return f=f.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(f,this.tokens,!0),this.inline(this.tokens),this.tokens},O.blockTokens=function(f,m,g){m===void 0&&(m=[]),g===void 0&&(g=!0),f=f.replace(/^ +$/gm,"");for(var E,V,ce,Pe;f;){if(E=this.tokenizer.space(f)){f=f.substring(E.raw.length),E.type&&m.push(E);continue}if(E=this.tokenizer.code(f,m)){f=f.substring(E.raw.length),E.type?m.push(E):(Pe=m[m.length-1],Pe.raw+=`
`+E.raw,Pe.text+=`
`+E.text);continue}if(E=this.tokenizer.fences(f)){f=f.substring(E.raw.length),m.push(E);continue}if(E=this.tokenizer.heading(f)){f=f.substring(E.raw.length),m.push(E);continue}if(E=this.tokenizer.nptable(f)){f=f.substring(E.raw.length),m.push(E);continue}if(E=this.tokenizer.hr(f)){f=f.substring(E.raw.length),m.push(E);continue}if(E=this.tokenizer.blockquote(f)){f=f.substring(E.raw.length),E.tokens=this.blockTokens(E.text,[],g),m.push(E);continue}if(E=this.tokenizer.list(f)){for(f=f.substring(E.raw.length),ce=E.items.length,V=0;V<ce;V++)E.items[V].tokens=this.blockTokens(E.items[V].text,[],!1);m.push(E);continue}if(E=this.tokenizer.html(f)){f=f.substring(E.raw.length),m.push(E);continue}if(g&&(E=this.tokenizer.def(f))){f=f.substring(E.raw.length),this.tokens.links[E.tag]||(this.tokens.links[E.tag]={href:E.href,title:E.title});continue}if(E=this.tokenizer.table(f)){f=f.substring(E.raw.length),m.push(E);continue}if(E=this.tokenizer.lheading(f)){f=f.substring(E.raw.length),m.push(E);continue}if(g&&(E=this.tokenizer.paragraph(f))){f=f.substring(E.raw.length),m.push(E);continue}if(E=this.tokenizer.text(f,m)){f=f.substring(E.raw.length),E.type?m.push(E):(Pe=m[m.length-1],Pe.raw+=`
`+E.raw,Pe.text+=`
`+E.text);continue}if(f){var tt="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return m},O.inline=function(f){var m,g,E,V,ce,Pe,tt=f.length;for(m=0;m<tt;m++){Pe=f[m];switch(Pe.type){case"paragraph":case"text":case"heading":{Pe.tokens=[],this.inlineTokens(Pe.text,Pe.tokens);break}case"table":{for(Pe.tokens={header:[],cells:[]},V=Pe.header.length,g=0;g<V;g++)Pe.tokens.header[g]=[],this.inlineTokens(Pe.header[g],Pe.tokens.header[g]);for(V=Pe.cells.length,g=0;g<V;g++)for(ce=Pe.cells[g],Pe.tokens.cells[g]=[],E=0;E<ce.length;E++)Pe.tokens.cells[g][E]=[],this.inlineTokens(ce[E],Pe.tokens.cells[g][E]);break}case"blockquote":{this.inline(Pe.tokens);break}case"list":{for(V=Pe.items.length,g=0;g<V;g++)this.inline(Pe.items[g].tokens);break}}}return f},O.inlineTokens=function(f,m,g,E,V){m===void 0&&(m=[]),g===void 0&&(g=!1),E===void 0&&(E=!1),V===void 0&&(V="");var ce,Pe=f,tt;if(this.tokens.links){var ft=Object.keys(this.tokens.links);if(ft.length>0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(Pe))!=null;)ft.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(Pe=Pe.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(Pe))!=null;)Pe=Pe.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(ce=this.tokenizer.escape(f)){f=f.substring(ce.raw.length),m.push(ce);continue}if(ce=this.tokenizer.tag(f,g,E)){f=f.substring(ce.raw.length),g=ce.inLink,E=ce.inRawBlock,m.push(ce);continue}if(ce=this.tokenizer.link(f)){f=f.substring(ce.raw.length),ce.type==="link"&&(ce.tokens=this.inlineTokens(ce.text,[],!0,E)),m.push(ce);continue}if(ce=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(ce.raw.length),ce.type==="link"&&(ce.tokens=this.inlineTokens(ce.text,[],!0,E)),m.push(ce);continue}if(ce=this.tokenizer.strong(f,Pe,V)){f=f.substring(ce.raw.length),ce.tokens=this.inlineTokens(ce.text,[],g,E),m.push(ce);continue}if(ce=this.tokenizer.em(f,Pe,V)){f=f.substring(ce.raw.length),ce.tokens=this.inlineTokens(ce.text,[],g,E),m.push(ce);continue}if(ce=this.tokenizer.codespan(f)){f=f.substring(ce.raw.length),m.push(ce);continue}if(ce=this.tokenizer.br(f)){f=f.substring(ce.raw.length),m.push(ce);continue}if(ce=this.tokenizer.del(f)){f=f.substring(ce.raw.length),ce.tokens=this.inlineTokens(ce.text,[],g,E),m.push(ce);continue}if(ce=this.tokenizer.autolink(f,G)){f=f.substring(ce.raw.length),m.push(ce);continue}if(!g&&(ce=this.tokenizer.url(f,G))){f=f.substring(ce.raw.length),m.push(ce);continue}if(ce=this.tokenizer.inlineText(f,E,ue)){f=f.substring(ce.raw.length),V=ce.raw.slice(-1),m.push(ce);continue}if(f){var at="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return m},ve(_,null,[{key:"rules",get:function(){return{block:v,inline:ee}}}]),_}(),_e=P.defaults,Le=S.cleanUrl,Ae=S.escape,pe=function(){function _(D){this.options=D||_e}var O=_.prototype;return O.code=function(f,m,g){var E=(m||"").match(/\S*/)[0];if(this.options.highlight){var V=this.options.highlight(f,E);V!=null&&V!==f&&(g=!0,f=V)}return E?'<pre><code class="'+this.options.langPrefix+Ae(E,!0)+'">'+(g?f:Ae(f,!0))+`</code></pre>
`:"<pre><code>"+(g?f:Ae(f,!0))+`</code></pre>
`},O.blockquote=function(f){return`<blockquote>
`+f+`</blockquote>
`},O.html=function(f){return f},O.heading=function(f,m,g,E){return this.options.headerIds?"<h"+m+' id="'+this.options.headerPrefix+E.slug(g)+'">'+f+"</h"+m+`>
`:"<h"+m+">"+f+"</h"+m+`>
`},O.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},O.list=function(f,m,g){var E=m?"ol":"ul",V=m&&g!==1?' start="'+g+'"':"";return"<"+E+V+`>
`+f+"</"+E+`>
`},O.listitem=function(f){return"<li>"+f+`</li>
`},O.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},O.paragraph=function(f){return"<p>"+f+`</p>
`},O.table=function(f,m){return m&&(m="<tbody>"+m+"</tbody>"),`<table>
<thead>
`+f+`</thead>
`+m+`</table>
`},O.tablerow=function(f){return`<tr>
`+f+`</tr>
`},O.tablecell=function(f,m){var g=m.header?"th":"td",E=m.align?"<"+g+' align="'+m.align+'">':"<"+g+">";return E+f+"</"+g+`>
`},O.strong=function(f){return"<strong>"+f+"</strong>"},O.em=function(f){return"<em>"+f+"</em>"},O.codespan=function(f){return"<code>"+f+"</code>"},O.br=function(){return this.options.xhtml?"<br/>":"<br>"},O.del=function(f){return"<del>"+f+"</del>"},O.link=function(f,m,g){if(f=Le(this.options.sanitize,this.options.baseUrl,f),f===null)return g;var E='<a href="'+Ae(f)+'"';return m&&(E+=' title="'+m+'"'),E+=">"+g+"</a>",E},O.image=function(f,m,g){if(f=Le(this.options.sanitize,this.options.baseUrl,f),f===null)return g;var E='<img src="'+f+'" alt="'+g+'"';return m&&(E+=' title="'+m+'"'),E+=this.options.xhtml?"/>":">",E},O.text=function(f){return f},_}(),Ce=function(){function _(){}var O=_.prototype;return O.strong=function(f){return f},O.em=function(f){return f},O.codespan=function(f){return f},O.del=function(f){return f},O.html=function(f){return f},O.text=function(f){return f},O.link=function(f,m,g){return""+g},O.image=function(f,m,g){return""+g},O.br=function(){return""},_}(),Ie=function(){function _(){this.seen={}}var O=_.prototype;return O.slug=function(f){var m=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(m)){var g=m;do this.seen[g]++,m=g+"-"+this.seen[g];while(this.seen.hasOwnProperty(m))}return this.seen[m]=0,m},_}(),Ye=P.defaults,Xe=S.unescape,Ke=function(){function _(D){this.options=D||Ye,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ce,this.slugger=new Ie}_.parse=function(f,m){var g=new _(m);return g.parse(f)};var O=_.prototype;return O.parse=function(f,m){m===void 0&&(m=!0);var g="",E,V,ce,Pe,tt,ft,at,Pt,pt,lt,Bt,bt,$t,Wt,mt,Cn,Kn,un,kn=f.length;for(E=0;E<kn;E++){lt=f[E];switch(lt.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{g+=this.renderer.heading(this.parseInline(lt.tokens),lt.depth,Xe(this.parseInline(lt.tokens,this.textRenderer)),this.slugger);continue}case"code":{g+=this.renderer.code(lt.text,lt.lang,lt.escaped);continue}case"table":{for(Pt="",at="",Pe=lt.header.length,V=0;V<Pe;V++)at+=this.renderer.tablecell(this.parseInline(lt.tokens.header[V]),{header:!0,align:lt.align[V]});for(Pt+=this.renderer.tablerow(at),pt="",Pe=lt.cells.length,V=0;V<Pe;V++){for(ft=lt.tokens.cells[V],at="",tt=ft.length,ce=0;ce<tt;ce++)at+=this.renderer.tablecell(this.parseInline(ft[ce]),{header:!1,align:lt.align[ce]});pt+=this.renderer.tablerow(at)}g+=this.renderer.table(Pt,pt);continue}case"blockquote":{pt=this.parse(lt.tokens),g+=this.renderer.blockquote(pt);continue}case"list":{for(Bt=lt.ordered,bt=lt.start,$t=lt.loose,Pe=lt.items.length,pt="",V=0;V<Pe;V++)mt=lt.items[V],Cn=mt.checked,Kn=mt.task,Wt="",mt.task&&(un=this.renderer.checkbox(Cn),$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,Kn,Cn);g+=this.renderer.list(pt,Bt,bt);continue}case"html":{g+=this.renderer.html(lt.text);continue}case"paragraph":{g+=this.renderer.paragraph(this.parseInline(lt.tokens));continue}case"text":{for(pt=lt.tokens?this.parseInline(lt.tokens):lt.text;E+1<kn&&f[E+1].type==="text";)lt=f[++E],pt+=`
`+(lt.tokens?this.parseInline(lt.tokens):lt.text);g+=m?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 g},O.parseInline=function(f,m){m=m||this.renderer;var g="",E,V,ce=f.length;for(E=0;E<ce;E++){V=f[E];switch(V.type){case"escape":{g+=m.text(V.text);break}case"html":{g+=m.html(V.text);break}case"link":{g+=m.link(V.href,V.title,this.parseInline(V.tokens,m));break}case"image":{g+=m.image(V.href,V.title,V.text);break}case"strong":{g+=m.strong(this.parseInline(V.tokens,m));break}case"em":{g+=m.em(this.parseInline(V.tokens,m));break}case"codespan":{g+=m.codespan(V.text);break}case"br":{g+=m.br();break}case"del":{g+=m.del(this.parseInline(V.tokens,m));break}case"text":{g+=m.text(V.text);break}default:{var Pe='Token with "'+V.type+'" type was not found.';if(this.options.silent){console.error(Pe);return}else throw new Error(Pe)}}}return g},_}(),nt=S.merge,qe=S.checkSanitizeDeprecation,Ve=S.escape,xe=P.getDefaults,rt=P.changeDefaults,Je=P.defaults;function Te(_,O,D){if(typeof _=="undefined"||_===null)throw new Error("marked(): input parameter is undefined or null");if(typeof _!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(_)+", string expected");if(typeof O=="function"&&(D=O,O=null),O=nt({},Te.defaults,O||{}),qe(O),D){var f=O.highlight,m;try{m=he.lex(_,O)}catch(ce){return D(ce)}var g=function(Pe){var tt;if(!Pe)try{tt=Ke.parse(m,O)}catch(ft){Pe=ft}return O.highlight=f,Pe?D(Pe):D(null,tt)};if(!f||f.length<3)return g();if(delete O.highlight,!m.length)return g();var E=0;Te.walkTokens(m,function(ce){ce.type==="code"&&(E++,setTimeout(function(){f(ce.text,ce.lang,function(Pe,tt){if(Pe)return g(Pe);tt!=null&&tt!==ce.text&&(ce.text=tt,ce.escaped=!0),E--,E===0&&g()})},0))}),E===0&&g();return}try{var V=he.lex(_,O);return O.walkTokens&&Te.walkTokens(V,O.walkTokens),Ke.parse(V,O)}catch(ce){if(ce.message+=`
Please report this to https://github.com/markedjs/marked.`,O.silent)return"<p>An error occurred:</p><pre>"+Ve(ce.message+"",!0)+"</pre>";throw ce}}Te.options=Te.setOptions=function(_){return nt(Te.defaults,_),rt(Te.defaults),Te},Te.getDefaults=xe,Te.defaults=Je,Te.use=function(_){var O=nt({},_);if(_.renderer&&function(){var f=Te.defaults.renderer||new pe,m=function(V){var ce=f[V];f[V]=function(){for(var Pe=arguments.length,tt=new Array(Pe),ft=0;ft<Pe;ft++)tt[ft]=arguments[ft];var at=_.renderer[V].apply(f,tt);return at===!1&&(at=ce.apply(f,tt)),at}};for(var g in _.renderer)m(g);O.renderer=f}(),_.tokenizer&&function(){var f=Te.defaults.tokenizer||new oe,m=function(V){var ce=f[V];f[V]=function(){for(var Pe=arguments.length,tt=new Array(Pe),ft=0;ft<Pe;ft++)tt[ft]=arguments[ft];var at=_.tokenizer[V].apply(f,tt);return at===!1&&(at=ce.apply(f,tt)),at}};for(var g in _.tokenizer)m(g);O.tokenizer=f}(),_.walkTokens){var D=Te.defaults.walkTokens;O.walkTokens=function(f){_.walkTokens(f),D&&D(f)}}Te.setOptions(O)},Te.walkTokens=function(_,O){for(var D=be(_),f;!(f=D()).done;){var m=f.value;O(m);switch(m.type){case"table":{for(var g=be(m.tokens.header),E;!(E=g()).done;){var V=E.value;Te.walkTokens(V,O)}for(var ce=be(m.tokens.cells),Pe;!(Pe=ce()).done;)for(var tt=Pe.value,ft=be(tt),at;!(at=ft()).done;){var Pt=at.value;Te.walkTokens(Pt,O)}break}case"list":{Te.walkTokens(m.items,O);break}default:m.tokens&&Te.walkTokens(m.tokens,O)}}},Te.Parser=Ke,Te.parser=Ke.parse,Te.Renderer=pe,Te.TextRenderer=Ce,Te.Lexer=he,Te.lexer=he.lex,Te.Tokenizer=oe,Te.Slugger=Ie,Te.parse=Te;var Fe=Te;return Fe})},ELLl:function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){var ve={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},te=j.Pos;j.defineOption("autoCloseBrackets",!1,function(U,F,I){I&&I!=j.Init&&(U.removeKeyMap(be),U.state.closeBrackets=null),F&&($(we(F,"pairs")),U.state.closeBrackets=F,U.addKeyMap(be))});function we(U,F){return F=="pairs"&&typeof U=="string"?U:typeof U=="object"&&U[F]!=null?U[F]:ve[F]}var be={Backspace:b,Enter:H};function $(U){for(var F=0;F<U.length;F++){var I=U.charAt(F),se="'"+I+"'";be[se]||(be[se]=P(I))}}$(ve.pairs+"`");function P(U){return function(F){return re(F,U)}}function M(U){var F=U.state.closeBrackets;if(!F||F.override)return F;var I=U.getModeAt(U.getCursor());return I.closeBrackets||F}function b(U){var F=M(U);if(!F||U.getOption("disableInput"))return j.Pass;for(var I=we(F,"pairs"),se=U.listSelections(),ae=0;ae<se.length;ae++){if(!se[ae].empty())return j.Pass;var Re=Ee(U,se[ae].head);if(!Re||I.indexOf(Re)%2!=0)return j.Pass}for(var ae=se.length-1;ae>=0;ae--){var He=se[ae].head;U.replaceRange("",te(He.line,He.ch-1),te(He.line,He.ch+1),"+delete")}}function H(U){var F=M(U),I=F&&we(F,"explode");if(!I||U.getOption("disableInput"))return j.Pass;for(var se=U.listSelections(),ae=0;ae<se.length;ae++){if(!se[ae].empty())return j.Pass;var Re=Ee(U,se[ae].head);if(!Re||I.indexOf(Re)%2!=0)return j.Pass}U.operation(function(){var He=U.lineSeparator()||`
`;U.replaceSelection(He+He,null),U.execCommand("goCharLeft"),se=U.listSelections();for(var de=0;de<se.length;de++){var Oe=se[de].head.line;U.indentLine(Oe,null,!0),U.indentLine(Oe+1,null,!0)}})}function K(U){var F=j.cmpPos(U.anchor,U.head)>0;return{anchor:new te(U.anchor.line,U.anchor.ch+(F?-1:1)),head:new te(U.head.line,U.head.ch+(F?1:-1))}}function re(U,F){var I=M(U);if(!I||U.getOption("disableInput"))return j.Pass;var se=we(I,"pairs"),ae=se.indexOf(F);if(ae==-1)return j.Pass;for(var Re=we(I,"closeBefore"),He=we(I,"triples"),de=se.charAt(ae+1)==F,Oe=U.listSelections(),De=ae%2==0,me,ge=0;ge<Oe.length;ge++){var le=Oe[ge],Z=le.head,y,z=U.getRange(Z,te(Z.line,Z.ch+1));if(De&&!le.empty())y="surround";else if((de||!De)&&z==F)de&&ie(U,Z)?y="both":He.indexOf(F)>=0&&U.getRange(Z,te(Z.line,Z.ch+3))==F+F+F?y="skipThree":y="skip";else if(de&&Z.ch>1&&He.indexOf(F)>=0&&U.getRange(te(Z.line,Z.ch-2),Z)==F+F){if(Z.ch>2&&/\bstring/.test(U.getTokenTypeAt(te(Z.line,Z.ch-2))))return j.Pass;y="addFour"}else if(de){var W=Z.ch==0?" ":U.getRange(te(Z.line,Z.ch-1),Z);if(!j.isWordChar(z)&&W!=F&&!j.isWordChar(W))y="both";else return j.Pass}else if(De&&(z.length===0||/\s/.test(z)||Re.indexOf(z)>-1))y="both";else return j.Pass;if(!me)me=y;else if(me!=y)return j.Pass}var w=ae%2?se.charAt(ae-1):F,Y=ae%2?F:se.charAt(ae+1);U.operation(function(){if(me=="skip")U.execCommand("goCharRight");else if(me=="skipThree")for(var N=0;N<3;N++)U.execCommand("goCharRight");else if(me=="surround"){for(var L=U.getSelections(),N=0;N<L.length;N++)L[N]=w+L[N]+Y;U.replaceSelections(L,"around"),L=U.listSelections().slice();for(var N=0;N<L.length;N++)L[N]=K(L[N]);U.setSelections(L)}else me=="both"?(U.replaceSelection(w+Y,null),U.triggerElectric(w+Y),U.execCommand("goCharLeft")):me=="addFour"&&(U.replaceSelection(w+w+w+w,"before"),U.execCommand("goCharRight"))})}function Ee(U,F){var I=U.getRange(te(F.line,F.ch-1),te(F.line,F.ch+1));return I.length==2?I:null}function ie(U,F){var I=U.getTokenAt(te(F.line,F.ch+1));return/\bstring/.test(I.type)&&I.start==F.ch&&(F.ch==0||!/\bstring/.test(U.getTokenTypeAt(F)))}})},GfqC:function(ot,ze,x){"use strict";var j=x("q1tI"),ve=x.n(j),te=x("TSYQ"),we=x.n(te);function be(S,c){var l="cannot "+S.method+" "+S.action+" "+c.status+"'",p=new Error(l);return p.status=c.status,p.method=S.method,p.url=S.action,p}function $(S){var c=S.responseText||S.response;if(!c)return c;try{return JSON.parse(c)}catch(l){return c}}function P(S){var c=new XMLHttpRequest;S.onProgress&&c.upload&&(c.upload.onprogress=function(R){R.total>0&&(R.percent=R.loaded/R.total*100),S.onProgress(R)});var l=new FormData;S.data&&Object.keys(S.data).forEach(function(C){var R=S.data[C];if(Array.isArray(R)){R.forEach(function(q){l.append(C+"[]",q)});return}l.append(C,S.data[C])}),S.file instanceof Blob?l.append(S.filename,S.file,S.file.name):l.append(S.filename,S.file),c.onerror=function(R){S.onError(R)},c.onload=function(){return c.status<200||c.status>=300?S.onError(be(S,c),$(c)):S.onSuccess($(c),c)},c.open(S.method,S.action,!0),S.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var p=S.headers||{};return p["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(p).forEach(function(C){p[C]!==null&&c.setRequestHeader(C,p[C])}),c.send(l),{abort:function(){c.abort()}}}var M=+new Date,b=0;function H(){return"rc-upload-"+M+"-"+ ++b}function K(S,c){return S.indexOf(c,S.length-c.length)!==-1}var re=function(S,c){if(S&&c){var l=Array.isArray(c)?c:c.split(","),p=S.name||"",C=S.type||"",R=C.replace(/\/.*$/,"");return l.some(function(q){var ye=q.trim();return ye.charAt(0)==="."?K(p.toLowerCase(),ye.toLowerCase()):/\/\*$/.test(ye)?R===ye.replace(/\/.*$/,""):C===ye})}return!0};function Ee(S,c){var l=S.createReader(),p=[];function C(){l.readEntries(function(R){var q=Array.prototype.slice.apply(R);p=p.concat(q);var ye=!q.length;ye?c(p):C()})}C()}var ie=function(c,l,p){var C=function R(q,ye){ye=ye||"",q.isFile?q.file(function(oe){p(oe)&&(q.fullPath&&!oe.webkitRelativePath&&(Object.defineProperties(oe,{webkitRelativePath:{writable:!0}}),oe.webkitRelativePath=q.fullPath.replace(/^\//,""),Object.defineProperties(oe,{webkitRelativePath:{writable:!1}})),l([oe]))}):q.isDirectory&&Ee(q,function(oe){oe.forEach(function(Se){R(Se,""+ye+q.name+"/")})})};c.forEach(function(R){C(R.webkitGetAsEntry())})},U=ie,F=Object.assign||function(S){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(S[p]=l[p])}return S},I=function(){function S(c,l){var p=[],C=!0,R=!1,q=void 0;try{for(var ye=c[Symbol.iterator](),oe;!(C=(oe=ye.next()).done)&&!(p.push(oe.value),l&&p.length===l);C=!0);}catch(Se){R=!0,q=Se}finally{try{!C&&ye.return&&ye.return()}finally{if(R)throw q}}return p}return function(c,l){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return S(c,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),se=function(){function S(c,l){for(var p=0;p<l.length;p++){var C=l[p];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(c,C.key,C)}}return function(c,l,p){return l&&S(c.prototype,l),p&&S(c,p),c}}();function ae(S,c,l){return c in S?Object.defineProperty(S,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):S[c]=l,S}function Re(S,c){var l={};for(var p in S){if(c.indexOf(p)>=0)continue;if(!Object.prototype.hasOwnProperty.call(S,p))continue;l[p]=S[p]}return l}function He(S,c){if(!(S instanceof c))throw new TypeError("Cannot call a class as a function")}function de(S,c){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:S}function Oe(S,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);S.prototype=Object.create(c&&c.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(S,c):S.__proto__=c)}var De=function(c){return Object.keys(c).reduce(function(l,p){return(p.substr(0,5)==="data-"||p.substr(0,5)==="aria-"||p==="role")&&(l[p]=c[p]),l},{})},me=function(S){Oe(c,S);function c(){var l,p,C,R;He(this,c);for(var q=arguments.length,ye=Array(q),oe=0;oe<q;oe++)ye[oe]=arguments[oe];return R=(p=(C=de(this,(l=c.__proto__||Object.getPrototypeOf(c)).call.apply(l,[this].concat(ye))),C),C.state={uid:H()},C.reqs={},C.onChange=function(Se){var ne=Se.target.files;C.uploadFiles(ne),C.reset()},C.onClick=function(Se){var ne=C.fileInput;if(!ne)return;var fe=C.props,B=fe.children,Q=fe.onClick;B&&B.type==="button"&&(ne.parentNode.focus(),ne.parentNode.querySelector("button").blur()),ne.click(),Q&&Q(Se)},C.onKeyDown=function(Se){Se.key==="Enter"&&C.onClick()},C.onFileDrop=function(Se){var ne=C.props.multiple;if(Se.preventDefault(),Se.type==="dragover")return;if(C.props.directory)U(Array.prototype.slice.call(Se.dataTransfer.items),C.uploadFiles,function(B){return re(B,C.props.accept)});else{var fe=Array.prototype.slice.call(Se.dataTransfer.files).filter(function(B){return re(B,C.props.accept)});ne===!1&&(fe=fe.slice(0,1)),C.uploadFiles(fe)}},C.uploadFiles=function(Se){var ne=Array.prototype.slice.call(Se);ne.map(function(fe){return fe.uid=H(),fe}).forEach(function(fe){C.upload(fe,ne)})},C.saveFileInput=function(Se){C.fileInput=Se},p),de(C,R)}return se(c,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(p,C){var R=this,q=this.props;if(!q.beforeUpload)return setTimeout(function(){return R.post(p)},0);var ye=q.beforeUpload(p,C);ye&&ye.then?ye.then(function(oe){var Se=Object.prototype.toString.call(oe);return Se==="[object File]"||Se==="[object Blob]"?R.post(oe):R.post(p)}).catch(function(oe){console.log(oe)}):ye!==!1&&setTimeout(function(){return R.post(p)},0);return}},{key:"post",value:function(p){var C=this;if(!this._isMounted)return;var R=this.props,q=R.onStart,ye=R.onProgress,oe=R.transformFile,Se=oe===void 0?function(ne){return ne}:oe;new Promise(function(ne){var fe=R.action;return typeof fe=="function"&&(fe=fe(p)),ne(fe)}).then(function(ne){var fe=p.uid,B=R.customRequest||P,Q=Promise.resolve(Se(p)).then(function(h){var T=R.data;return typeof T=="function"&&(T=T(h)),Promise.all([h,T])}).catch(function(h){console.error(h)});Q.then(function(h){var T=I(h,2),v=T[0],ee=T[1],ue={action:ne,filename:R.name,data:ee,file:v,headers:R.headers,withCredentials:R.withCredentials,method:R.method||"post",onProgress:ye?function(G){ye(G,p)}:null,onSuccess:function(he,_e){delete C.reqs[fe],R.onSuccess(he,p,_e)},onError:function(he,_e){delete C.reqs[fe],R.onError(he,_e,p)}};q(p),C.reqs[fe]=B(ue)})})}},{key:"reset",value:function(){this.setState({uid:H()})}},{key:"abort",value:function(p){var C=this.reqs;if(p){var R=p;p&&p.uid&&(R=p.uid),C[R]&&C[R].abort&&C[R].abort(),delete C[R]}else Object.keys(C).forEach(function(q){C[q]&&C[q].abort&&C[q].abort(),delete C[q]})}},{key:"render",value:function(){var p,C=this.props,R=C.component,q=C.prefixCls,ye=C.className,oe=C.disabled,Se=C.id,ne=C.style,fe=C.multiple,B=C.accept,Q=C.children,h=C.directory,T=C.openFileDialogOnClick,v=C.onMouseEnter,ee=C.onMouseLeave,ue=Re(C,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),G=we()((p={},ae(p,q,!0),ae(p,q+"-disabled",oe),ae(p,ye,ye),p)),he=oe?{}:{onClick:T?this.onClick:function(){},onKeyDown:T?this.onKeyDown:function(){},onMouseEnter:v,onMouseLeave:ee,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return ve.a.createElement(R,F({},he,{className:G,role:"button",style:ne}),ve.a.createElement("input",F({},De(ue),{id:Se,type:"file",ref:this.saveFileInput,onClick:function(Le){return Le.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:B,directory:h?"directory":null,webkitdirectory:h?"webkitdirectory":null,multiple:fe,onChange:this.onChange})),Q)}}]),c}(j.Component),ge=me,le=Object.assign||function(S){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(S[p]=l[p])}return S},Z=function(){function S(c,l){for(var p=0;p<l.length;p++){var C=l[p];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(c,C.key,C)}}return function(c,l,p){return l&&S(c.prototype,l),p&&S(c,p),c}}();function y(S,c){if(!(S instanceof c))throw new TypeError("Cannot call a class as a function")}function z(S,c){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:S}function W(S,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);S.prototype=Object.create(c&&c.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(S,c):S.__proto__=c)}function w(){}var Y=function(S){W(c,S);function c(){var l,p,C,R;y(this,c);for(var q=arguments.length,ye=Array(q),oe=0;oe<q;oe++)ye[oe]=arguments[oe];return R=(p=(C=z(this,(l=c.__proto__||Object.getPrototypeOf(c)).call.apply(l,[this].concat(ye))),C),C.saveUploader=function(Se){C.uploader=Se},p),z(C,R)}return Z(c,[{key:"abort",value:function(p){this.uploader.abort(p)}},{key:"render",value:function(){return ve.a.createElement(ge,le({},this.props,{ref:this.saveUploader}))}}]),c}(j.Component);Y.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:w,onError:w,onSuccess:w,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var N=Y,L=ze.a=N},Gytx:function(ot,ze){ot.exports=function(j,ve,te,we){var be=te?te.call(we,j,ve):void 0;if(be!==void 0)return!!be;if(j===ve)return!0;if(typeof j!="object"||!j||typeof ve!="object"||!ve)return!1;var $=Object.keys(j),P=Object.keys(ve);if($.length!==P.length)return!1;for(var M=Object.prototype.hasOwnProperty.bind(ve),b=0;b<$.length;b++){var H=$[b];if(!M(H))return!1;var K=j[H],re=ve[H];if(be=te?te.call(we,K,re,H):void 0,be===!1||be===void 0&&K!==re)return!1}return!0}},HmJG:function(ot,ze,x){},LdHM:function(ot,ze,x){"use strict";x.d(ze,"b",function(){return Re}),x.d(ze,"a",function(){return de});var j=x("1OyB"),ve=x("vuIU"),te=x("Ji7U"),we=x("LK+K"),be=x("q1tI"),$=x("rePB"),P=x("Ff2n"),M=x("ODXe"),b=x("4IlW"),H=x("bX4T"),K=x("YrtM"),re=x("TSYQ"),Ee=x.n(re),ie=x("+nKL"),U=x("8OUc"),F=function(p,C){var R=p.prefixCls,q=p.id,ye=p.flattenOptions,oe=p.childrenAsData,Se=p.values,ne=p.searchValue,fe=p.multiple,B=p.defaultActiveFirstOption,Q=p.height,h=p.itemHeight,T=p.notFoundContent,v=p.open,ee=p.menuItemSelectedIcon,ue=p.virtual,G=p.onSelect,he=p.onToggleOpen,_e=p.onActiveValue,Le=p.onScroll,Ae=p.onMouseEnter,pe="".concat(R,"-item"),Ce=Object(K.a)(function(){return ye},[v,ye],function(Fe,_){return _[0]&&Fe[1]!==_[1]}),Ie=be.useRef(null),Ye=function(_){_.preventDefault()},Xe=function(_){Ie.current&&Ie.current.scrollTo({index:_})},Ke=function(_){for(var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,D=Ce.length,f=0;f<D;f+=1){var m=(_+f*O+D)%D,g=Ce[m],E=g.group,V=g.data;if(!E&&!V.disabled)return m}return-1},nt=be.useState(function(){return Ke(0)}),qe=Object(M.a)(nt,2),Ve=qe[0],xe=qe[1],rt=function(_){xe(_);var O=Ce[_];if(!O){_e(null,-1);return}_e(O.data.value,_)};be.useEffect(function(){rt(B!==!1?Ke(0):-1)},[Ce.length,ne]),be.useEffect(function(){var Fe=setTimeout(function(){if(!fe&&v&&Se.size===1){var _=Array.from(Se)[0],O=Ce.findIndex(function(D){var f=D.data;return f.value===_});rt(O),Xe(O)}});return function(){return clearTimeout(Fe)}},[v]);var Je=function(_){_!==void 0&&G(_,{selected:!Se.has(_)}),fe||he(!1)};if(be.useImperativeHandle(C,function(){return{onKeyDown:function(_){var O=_.which;switch(O){case b.a.UP:case b.a.DOWN:{var D=0;if(O===b.a.UP?D=-1:O===b.a.DOWN&&(D=1),D!==0){var f=Ke(Ve+D,D);Xe(f),rt(f)}break}case b.a.ENTER:{var m=Ce[Ve];m&&!m.data.disabled?Je(m.data.value):Je(void 0),v&&_.preventDefault();break}case b.a.ESC:he(!1)}},onKeyUp:function(){},scrollTo:function(_){Xe(_)}}}),Ce.length===0)return be.createElement("div",{role:"listbox",id:"".concat(q,"_list"),className:"".concat(pe,"-empty"),onMouseDown:Ye},T);function Te(Fe){var _=Ce[Fe];if(!_)return null;var O=_.data||{},D=O.value,f=O.label,m=O.children,g=Object(H.a)(O,!0),E=oe?m:f;return _?be.createElement("div",Object.assign({"aria-label":typeof E=="string"?E:null},g,{key:Fe,role:"option",id:"".concat(q,"_list_").concat(Fe),"aria-selected":Se.has(D)}),D):null}return be.createElement(be.Fragment,null,be.createElement("div",{role:"listbox",id:"".concat(q,"_list"),style:{height:0,width:0,overflow:"hidden"}},Te(Ve-1),Te(Ve),Te(Ve+1)),be.createElement(ie.a,{itemKey:"key",ref:Ie,data:Ce,height:Q,itemHeight:h,fullHeight:!1,onMouseDown:Ye,onScroll:Le,virtual:ue,onMouseEnter:Ae},function(Fe,_){var O,D=Fe.group,f=Fe.groupOption,m=Fe.data,g=m.label,E=m.key;if(D)return be.createElement("div",{className:Ee()(pe,"".concat(pe,"-group"))},g!==void 0?g:E);var V=m.disabled,ce=m.value,Pe=m.title,tt=m.children,ft=m.style,at=m.className,Pt=Object(P.a)(m,["disabled","value","title","children","style","className"]),pt=Se.has(ce),lt="".concat(pe,"-option"),Bt=Ee()(pe,lt,at,(O={},Object($.a)(O,"".concat(lt,"-grouped"),f),Object($.a)(O,"".concat(lt,"-active"),Ve===_&&!V),Object($.a)(O,"".concat(lt,"-disabled"),V),Object($.a)(O,"".concat(lt,"-selected"),pt),O)),bt=oe?tt:g,$t=!ee||typeof ee=="function"||pt;return be.createElement("div",Object.assign({},Pt,{"aria-selected":pt,className:Bt,title:Pe,onMouseMove:function(){if(Ve===_||V)return;rt(_)},onClick:function(){V||Je(ce)},style:ft}),be.createElement("div",{className:"".concat(lt,"-content")},bt||ce),be.isValidElement(ee)||pt,$t&&be.createElement(U.a,{className:"".concat(pe,"-option-state"),customizeIcon:ee,customizeIconProps:{isSelected:pt}},pt?"\u2713":null))}))},I=be.forwardRef(F);I.displayName="OptionList";var se=I,ae=function(){return null};ae.isSelectOption=!0;var Re=ae,He=function(){return null};He.isSelectOptGroup=!0;var de=He,Oe=x("VTBJ"),De=x("Zm9Q");function me(l){var p=l.key,C=l.props,R=C.children,q=C.value,ye=Object(P.a)(C,["children","value"]);return Object(Oe.a)({key:p,value:q!==void 0?q:p,children:R},ye)}function ge(l){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(De.a)(l).map(function(C,R){if(!be.isValidElement(C)||!C.type)return null;var q=C.type.isSelectOptGroup,ye=C.key,oe=C.props,Se=oe.children,ne=Object(P.a)(oe,["children"]);return p||!q?me(C):Object(Oe.a)(Object(Oe.a)({key:"__RC_SELECT_GRP__".concat(ye===null?R:ye,"__"),label:ye},ne),{},{options:ge(Se)})}).filter(function(C){return C})}var le=x("2Qr1"),Z=x("qNPg"),y=x("U8pU"),z=x("Kwbf"),W=x("WKfj");function w(l){var p=l.mode,C=l.options,R=l.children,q=l.backfill,ye=l.allowClear,oe=l.placeholder,Se=l.getInputElement,ne=l.showSearch,fe=l.onSearch,B=l.defaultOpen,Q=l.autoFocus,h=l.labelInValue,T=l.value,v=l.inputValue,ee=l.optionLabelProp,ue=p==="multiple"||p==="tags",G=ne!==void 0?ne:ue||p==="combobox",he=C||ge(R);if(Object(z.a)(p!=="tags"||he.every(function(pe){return!pe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),p==="tags"||p==="combobox"){var _e=he.some(function(pe){return pe.options?pe.options.some(function(Ce){return typeof("value"in Ce?Ce.value:Ce.key)=="number"}):typeof("value"in pe?pe.value:pe.key)=="number"});Object(z.a)(!_e,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(z.a)(p!=="combobox"||!ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(z.a)(p==="combobox"||!q,"`backfill` only works with `combobox` mode."),Object(z.a)(p==="combobox"||!Se,"`getInputElement` only work with `combobox` mode."),Object(z.b)(p!=="combobox"||!Se||!ye||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),fe&&!G&&p!=="combobox"&&p!=="tags"&&Object(z.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(z.b)(!B||Q,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),T!=null){var Le=Object(W.d)(T);Object(z.a)(!h||Le.every(function(pe){return Object(y.a)(pe)==="object"&&("key"in pe||"value"in pe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(z.a)(!ue||Array.isArray(T),"`value` should be array when `mode` is `multiple` or `tags`")}if(R){var Ae=null;Object(De.a)(R).some(function(pe){if(!be.isValidElement(pe)||!pe.type)return!1;var Ce=pe.type;if(Ce.isSelectOption)return!1;if(Ce.isSelectOptGroup){var Ie=Object(De.a)(pe.props.children).every(function(Ye){return!be.isValidElement(Ye)||!pe.type||Ye.type.isSelectOption?!0:(Ae=Ye.type,!1)});return!Ie}return Ae=Ce,!0}),Ae&&Object(z.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ae.displayName||Ae.name||Ae,"`.")),Object(z.a)(v===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var Y=w,N=Object(Z.a)({prefixCls:"rc-select",components:{optionList:se},convertChildrenToData:ge,flattenOptions:le.d,getLabeledValue:le.e,filterOptions:le.b,isValueDisabled:le.g,findValueOption:le.c,warningProps:Y,fillOptionsWithMissingValue:le.a}),L=function(l){Object(te.a)(C,l);var p=Object(we.a)(C);function C(){var R;return Object(j.a)(this,C),R=p.apply(this,arguments),R.selectRef=be.createRef(),R.focus=function(){R.selectRef.current.focus()},R.blur=function(){R.selectRef.current.blur()},R}return Object(ve.a)(C,[{key:"render",value:function(){return be.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),C}(be.Component);L.Option=Re,L.OptGroup=de;var S=L,c=ze.c=S},M8RZ:function(ot,ze,x){"use strict";x.d(ze,"a",function(){return b});var j=x("fWQN"),ve=x("mtLc"),te=x("yKVA"),we=x("879j"),be=x("q1tI"),$=x.n(be),P=x("i8i4"),M=x.n(P),b=function(H){Object(te.a)(re,H);var K=Object(we.a)(re);function re(Ee){var ie;Object(j.a)(this,re),ie=K.call(this,Ee);var U=window.document;return ie.node=U.createElement("div"),U.body.appendChild(ie.node),ie}return Object(ve.a)(re,[{key:"render",value:function(){var ie=this.props.children;return Object(P.createPortal)(ie,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),re}($.a.Component)},OLES:function(ot,ze,x){"use strict";var j=x("U8pU"),ve=x("VTBJ"),te=x("Ff2n"),we=x("q1tI"),be=x("uciX"),$=x("7ixt"),P=function(Ee){var ie=Ee.overlay,U=Ee.prefixCls,F=Ee.id,I=Ee.overlayInnerStyle;return we.createElement("div",{className:"".concat(U,"-inner"),id:F,role:"tooltip",style:I},typeof ie=="function"?ie():ie)},M=P,b=function(Ee,ie){var U=Ee.overlayClassName,F=Ee.trigger,I=F===void 0?["hover"]:F,se=Ee.mouseEnterDelay,ae=se===void 0?0:se,Re=Ee.mouseLeaveDelay,He=Re===void 0?.1:Re,de=Ee.overlayStyle,Oe=Ee.prefixCls,De=Oe===void 0?"rc-tooltip":Oe,me=Ee.children,ge=Ee.onVisibleChange,le=Ee.afterVisibleChange,Z=Ee.transitionName,y=Ee.animation,z=Ee.placement,W=z===void 0?"right":z,w=Ee.align,Y=w===void 0?{}:w,N=Ee.destroyTooltipOnHide,L=N===void 0?!1:N,S=Ee.defaultVisible,c=Ee.getTooltipContainer,l=Ee.overlayInnerStyle,p=Object(te.a)(Ee,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),C=Object(we.useRef)(null);Object(we.useImperativeHandle)(ie,function(){return C.current});var R=Object(ve.a)({},p);"visible"in Ee&&(R.popupVisible=Ee.visible);var q=function(){var fe=Ee.arrowContent,B=fe===void 0?null:fe,Q=Ee.overlay,h=Ee.id;return[we.createElement("div",{className:"".concat(De,"-arrow"),key:"arrow"},B),we.createElement(M,{key:"content",prefixCls:De,id:h,overlay:Q,overlayInnerStyle:l})]},ye=!1,oe=!1;if(typeof L=="boolean")ye=L;else if(L&&Object(j.a)(L)==="object"){var Se=L.keepParent;ye=Se===!0,oe=Se===!1}return we.createElement(be.a,Object.assign({popupClassName:U,prefixCls:De,popup:q,action:I,builtinPlacements:$.a,popupPlacement:W,ref:C,popupAlign:Y,getPopupContainer:c,onPopupVisibleChange:ge,afterPopupVisibleChange:le,popupTransitionName:Z,popupAnimation:y,defaultPopupVisible:S,destroyPopupOnHide:ye,autoDestroy:oe,mouseLeaveDelay:He,popupStyle:de,mouseEnterDelay:ae},R),me)},H=Object(we.forwardRef)(b),K=ze.a=H},Ot1p:function(ot,ze,x){"use strict";var j=x("2qtc"),ve=x("kLXV"),te=x("rAM+"),we=x("miYZ"),be=x("tsqr"),$=x("tJVT"),P=x("jrin"),M=x("q1tI"),b=x.n(M),H=x("VrN/"),K=x.n(H),re=x("bdgK"),Ee=x("p77/"),ie=x("Bd2K"),U=x("ELLl"),F=x("19Vz"),I=x("lZu9"),se=x("+NIl"),ae=x("kSUc"),Re=x("9Bee"),He=function(_){var O=_.value,D=O===void 0?"":O,f=_.className,m=_.showTextOnly,g=_.showLines,E=_.style,V=E===void 0?{}:E,ce=Object(M.useMemo)(function(){return""},[D]);return b.a.createElement(b.a.Fragment,null,b.a.createElement("div",{dangerouslySetInnerHTML:{__html:ce}}))},de=x("0Owb"),Oe=x("dejd"),De=x("C+DQ"),me=[{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 ge(_){var O=_.onActionCallback,D=_.title,f=_.icon,m=_.actionName,g=_.className,E=g===void 0?"":g,V=_.children;function ce(){O(m)}return b.a.createElement("a",{title:D,className:E,onClick:ce},b.a.createElement("i",{className:"md-iconfont ".concat(f)}),V)}var le=function(_){var O=_.watch,D=_.showNullButton,f=_.onActionCallback,m=_.fullScreen,g=_.insertTemp,E=_.hidetoolBar,V=[].concat(me,[{title:"".concat(O?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(O?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return b.a.createElement("ul",{className:"markdown-toolbar-container"},!E&&V.map(function(ce,Pe){return b.a.createElement("li",{key:Pe},ce.actionName?b.a.createElement(ge,Object(de.a)({},ce,{onActionCallback:f})):b.a.createElement("span",{className:"v-line"}))}),D?b.a.createElement("li",null,b.a.createElement(ge,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:f},b.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,g&&b.a.createElement("li",null,b.a.createElement(ge,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(g),onActionCallback:f},b.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),b.a.createElement("li",{className:"btn-full-screen"},b.a.createElement(ge,{icon:"".concat(m?"icon-shrink":"icon-enlarge"),title:m?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:f})))},Z=x("M8RZ"),y=x("+L6B"),z=x("2/Rp"),W=x("y8nQ"),w=x("Vl3Y"),Y=x("5NDa"),N=x("5rEg"),L={labelCol:{span:4},wrapperCol:{span:20}},S=function(_){var O=_.callback,D=_.onCancel;function f(m){O(m)}return b.a.createElement(w.a,Object(de.a)({},L,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:f}),b.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},b.a.createElement(N.a,null)),b.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},b.a.createElement(N.a,null)),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(z.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))},c=x("7ahc"),l=x("HmJG"),p=x("BjJ7"),C=w.a.useForm,R={width:280,marginRight:10},q={labelCol:{span:5},wrapperCol:{span:19}},ye=function(_){var O=_.callback,D=_.onCancel,f=C(),m=Object($.a)(f,1),g=m[0];function E(Pe){O(Pe)}function V(Pe,tt){g.setFieldsValue({src:"/api/attachments/".concat(Pe.id),type:tt.type})}function ce(Pe){var tt=Pe.target.files[0];Se(tt,V)}return b.a.createElement(w.a,Object(de.a)({form:g},q,{className:"upload-image-panel",onFinish:E}),b.a.createElement(w.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},b.a.createElement("div",{className:"flex-container"},b.a.createElement(w.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},b.a.createElement(N.a,{style:R})),b.a.createElement(oe,{onFileChange:ce}))),b.a.createElement(w.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},b.a.createElement(N.a,{style:{width:264}})),b.a.createElement(w.a.Item,{style:{textAlign:"right"}},b.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(z.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function oe(_){var O=_.onFileChange;return b.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",b.a.createElement("input",{type:"file",onChange:O}))}function Se(_,O){if(!_)throw new String("\u6CA1\u6709\u6587\u4EF6");var D=new FormData;D.append("editormd-image-file",_),D.append("file_param_name","editormd-image-file"),D.append("byxhr","true");var f=new window.XMLHttpRequest;f.withCredentials=!0,f.addEventListener("load",function(m){O(JSON.parse(m.target.responseText),_)},!1),f.addEventListener("error",function(m){console.error(m)},!1),f.open("POST","".concat(p.a,"/api/attachments.json")),f.send(D)}var ne=x("giR+"),fe=x("fyUT"),B=x("7Kak"),Q=x("9yH6"),h=Q.a.Group,T={margin:"0 8px"},v=function(_){var O=_.callback,D=_.onCancel;function f(m){O(m)}return b.a.createElement(w.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:f},b.a.createElement("div",{className:"flex-container"},b.a.createElement("span",{style:T},"\u5355\u5143\u683C\u6570\uFF1A"),b.a.createElement("span",{style:T},"\u884C\u6570"),b.a.createElement(w.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},b.a.createElement(fe.a,null)),b.a.createElement("span",{style:T},"\u5217\u6570"),b.a.createElement(w.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},b.a.createElement(fe.a,null))),b.a.createElement("div",{className:"flex-container",style:{marginTop:12}},b.a.createElement("span",{style:T},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),b.a.createElement(w.a.Item,{name:"align"},b.a.createElement(h,null,b.a.createElement(Q.a,{value:"default"},b.a.createElement("i",{className:"fa fa-align-justify"})),b.a.createElement(Q.a,{value:"left"},b.a.createElement("i",{className:"fa fa-align-left"})),b.a.createElement(Q.a,{value:"center"},b.a.createElement("i",{className:"fa fa-align-center"})),b.a.createElement(Q.a,{value:"right"},b.a.createElement("i",{className:"fa fa-align-right"}))))),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(z.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))},ee=x("m3rI"),ue="link",G="upload-image",he="code-block",_e="add-table",Le="------------",Ae={default:Le,left:":".concat(Le),center:":".concat(Le,":"),right:"".concat(Le,":")},pe=x("9VGf"),Ce,Ie;function Ye(){}var Xe=0,Ke=1e4,nt="\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(_){return/^\d+$/.test(_)?"".concat(_,"px"):_}var xe=navigator.platform.toUpperCase().indexOf("MAC")>=0,rt=xe?"Cmd":"Ctrl",Je=(Ce={},Object(P.a)(Ce,rt+"-B","bold"),Object(P.a)(Ce,rt+"-I","italic"),Ce),Te=(Ie={},Object(P.a)(Ie,ue,"\u6DFB\u52A0\u94FE\u63A5"),Object(P.a)(Ie,he,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(P.a)(Ie,G,"\u6DFB\u52A0\u56FE\u7247"),Object(P.a)(Ie,_e,"\u6DFB\u52A0\u8868\u683C"),Ie),Fe=ze.a=function(_){var O=_.defaultValue,D=O===void 0?"":O,f=_.onChange,m=_.width,g=m===void 0?"100%":m,E=_.height,V=E===void 0?400:E,ce=_.miniToolbar,Pe=ce===void 0?!1:ce,tt=_.isFocus,ft=tt===void 0?!1:tt,at=_.watch,Pt=_.insertTemp,pt=_.mode,lt=pt===void 0?"markdown":pt,Bt=_.id,bt=Bt===void 0?"markdown-editor-id":Bt,$t=_.showResizeBar,Wt=$t===void 0?!1:$t,mt=_.noStorage,Cn=mt===void 0?!1:mt,Kn=_.showNullButton,un=Kn===void 0?!1:Kn,kn=_.hidetoolBar,pn=kn===void 0?!1:kn,bi=_.fullScreen,cn=bi===void 0?!1:bi,Vn=_.onBlur,dr=_.onCMBeforeChange,St=_.onFullScreen,Ze=_.className,Sn=Ze===void 0?"":Ze,fr=_.disablePaste,dn=fr===void 0?!1:fr,gt=_.placeholder,_n=gt===void 0?"":gt,Rn=_.values,$n=Rn===void 0?"":Rn,Ne=Object(M.useState)(null),ut=Object($.a)(Ne,2),Ue=ut[0],Ir=ut[1],hr=Object(M.useState)(D),Yn=Object($.a)(hr,2),Jn=Yn[0],st=Yn[1],Zi=Object(M.useState)(at),Fr=Object($.a)(Zi,2),fn=Fr[0],on=Fr[1],yi=Object(M.useState)(cn),Ur=Object($.a)(yi,2),nn=Ur[0],pr=Ur[1],xi=Object(M.useState)(""),mr=Object($.a)(xi,2),Tn=mr[0],On=mr[1],wi=Object(M.useState)(0),Br=Object($.a)(wi,2),Zn=Br[0],Wr=Br[1],Ei=Object(M.useState)(V),hn=Object($.a)(Ei,2),Ci=hn[0],ki=hn[1],gr=Object(M.useState)(!1),Dn=Object($.a)(gr,2),Ia=Dn[0],Hr=Dn[1],qn=Object(M.useRef)(),zr=Object(M.useRef)(),Pn=Object(M.useRef)(),Qn=Object(M.useRef)();Object(M.useEffect)(function(){st($n),Ue==null||Ue.setValue($n)},[$n]),Object(M.useEffect)(function(){St==null||St(nn)},[nn]),Object(M.useEffect)(function(){if(qn.current){var Qe=K.a.fromTextArea(qn.current,{mode:lt,lineNumbers:!Pe,lineWrapping:!0,value:D,autoCloseTags:!0,autoCloseBrackets:!0});ft&&Qe.focus();function ct(dt,xt){if(dn){xt.preventDefault();return}var wt=xt.clipboardData;if(wt){var Ct=wt.types.toString(),Lt=wt.items,_t=["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(Ct==="Files"||wt.types.indexOf("Files")>-1){if(xt.preventDefault(),lt=="stex")return;try{var Xt,mn=Lt[1];((Xt=Lt[0])===null||Xt===void 0?void 0:Xt.kind)==="file"&&(mn=Lt[0]);var kt=mn.getAsFile(),Nn=kt.name.split(".").pop();Se(kt,function(Gt){if(Gt.id){var jn,In,br;(kt==null||((jn=kt.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?Qe.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):(kt==null||((In=kt.type)===null||In===void 0)?void 0:In.indexOf("video"))>-1?Qe.replaceSelection('<video width="100%" controls src="'.concat(ee.a.API_SERVER,"/api/attachments/").concat(Gt.id,'"></video>')):(kt==null||((br=kt.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?Qe.replaceSelection('<a href="'.concat(ee.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(kt.type,'&disposition=inline" target="_blank">').concat(kt.name,"</a>")):_t.includes(Nn)?Qe.replaceSelection('<a href="'.concat(ee.a.API_SERVER,"/api/attachments/").concat(Gt.id,'?type=office&disposition=inline" target="_blank">').concat(kt.name,"</a>")):Qe.replaceSelection("[".concat(kt.name,"](").concat(ee.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})}catch(Gt){be.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Qe.on("paste",ct),Ir(Qe),function(){Qe.off("paste",ct)}}},[]);var Si=Object(M.useCallback)(function(){if(zr.current)try{}catch(Qe){console.log(Qe,"---- to set md editor body height")}},[Ci,zr,nn]);Object(M.useEffect)(function(){function Qe(){var dt=new re.default(function(xt){var wt=Object(te.a)(xt),Ct;try{for(wt.s();!(Ct=wt.n()).done;){var Lt=Ct.value;(Lt.target.offsetHeight>0||Lt.target.offsetWidth>0)&&(Si(),Ue.setSize("100%","100%"),Ue.refresh())}}catch(_t){wt.e(_t)}finally{wt.f()}});return dt.observe(qn.current.parentElement),dt}if(Ue){var ct=Qe();return function(){ct.unobserve(qn.current.parentElement)}}},[Ue,Si]),Object(M.useEffect)(function(){if(Ue){for(var Qe=[],ct=function(){var Lt=xt[dt];wt=Object($.a)(Lt,2);var _t=wt[0],Xt=wt[1],mn=Object(P.a)({},_t,function(){Xr(Xt)});Qe.push(mn),Ue.addKeyMap(mn)},dt=0,xt=Object.entries(Je);dt<xt.length;dt++){var wt;ct()}return function(){var Ct=Object(te.a)(Qe),Lt;try{for(Ct.s();!(Lt=Ct.n()).done;){var _t=Lt.value;Ue.removeKeyMap(_t)}}catch(Xt){Ct.e(Xt)}finally{Ct.f()}}}},[Ue]),Object(M.useEffect)(function(){cn!==nn&&pr(cn)},[cn]),Object(pe.a)(function(){if(!Cn&&Zn>0){var Qe=new Date().getTime(),ct=window.sessionStorage.getItem(bt);Qe>=Zn+Ke&&(!ct||ct!==Jn)&&(window.sessionStorage.setItem(bt,Jn),Hr(!0))}},Ke),Object(M.useEffect)(function(){on(at)},[Ue,at]),Object(M.useEffect)(function(){Ue&&(ft&&Ue.focus())},[Ue,ft]),Object(M.useEffect)(function(){if(fn&&Ue){var Qe=Ue.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)}}},[Ue,fn]),Object(M.useEffect)(function(){if(Ue&&dr){function Qe(ct,dt){dr(ct,dt)}return Ue.on("beforeChange",Qe),function(){Ue.off("beforeChange",Qe)}}},[Ue,dr]),Object(M.useEffect)(function(){if(Ue&&Vn){function Qe(){Vn(Ue.getValue())}return Ue.on("blur",Qe),function(){Ue.off("blur",Qe)}}},[Ue,Vn]),Object(M.useEffect)(function(){if(Ue){function Qe(ct){var dt=ct.getValue();st(dt),Wr(new Date().getTime()),ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),f&&f(dt)}return Ue.on("change",Qe),function(){Ue.off("change",Qe)}}},[Ue,f]),Object(M.useEffect)(function(){Ue&&(D==null?(Ue.setValue(""),st("")):D!==Ue.getValue()&&(Ue.setValue(D),st(D),Ue.setCursor(Ue.lineCount(),0)))},[Ue,D]);var Xr=Object(M.useCallback)(function(Qe){var ct=Ue.getCursor(),dt=Ue.getSelection(),xt=dt.split(`
`);switch(Qe){case"bold":return Ue.replaceSelection("**"+dt+"**"),dt===""&&Ue.setCursor(ct.line,ct.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+dt+"*"),dt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+dt+"`"),dt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.focus();case"inline-latex":return Ue.replaceSelection("`$$"+dt+"$$`"),dt===""&&Ue.setCursor(ct.line,ct.ch+3),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+dt+"\n```"),Ue.setCursor(ct.line+1,dt.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`<br/>
`),Ue.focus();case"list-ul":return dt===""?Ue.replaceSelection("- "+dt):Ue.replaceSelection(xt.map(function(wt){return wt===""?"":"- ".concat(wt)}).join(`
`)),Ue.focus();case"list-ol":return dt===""?Ue.replaceSelection("1. "+dt):Ue.replaceSelection(xt.map(function(wt,Ct){return wt===""?"":"".concat(Ct+1,". ").concat(wt)}).join(`
`)),Ue.focus();case"add-null-ch":return dt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.replaceSelection(nt),Ue.focus();case"inster-template-1":return dt===""&&Ue.setCursor(ct.line,ct.ch),Ue.replaceSelection(qe),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return on(!fn),Ue.focus();case"trigger-full-screen":return pr(!nn),Ue.focus();case ue:On(ue);return;case he:On(he);return;case G:On(G);return;case _e:On(_e);return;default:throw new Error}},[Ue,fn,nn]),er=Object(M.useCallback)(function(Qe){On("");switch(Tn){case ue:var ct=Qe.title,dt=Qe.link;return Ue.replaceSelection("[".concat(ct,"](").concat(dt,")")),Ue.focus();case he:var xt=Qe.language,wt=Qe.content;return Ue.replaceSelection(["```"+xt,wt,"```"].join(`
`)),Ue.focus();case G:var Ct=Qe.src,Lt=Qe.alt;return Ue.replaceSelection("![ ".concat(Lt," ]( ").concat(Ct,' "').concat(Lt,'" )')),Ue.focus();case _e:for(var _t=Qe.row,Xt=Qe.col,mn=Qe.align,kt=`
`,Nn=0;Nn<_t;Nn++){for(var Gt=[],jn=[],In=0;In<Xt;In++)Nn===1&&jn.push(Ae[mn]),Gt.push(" ");Nn===1&&(kt+="| ".concat(jn.join(" | "),` |
`)),kt+="| ".concat(Gt.join(Xt===1?"":" | "),` |
`)}return Ue.replaceSelection(kt+`
`),Ue.focus();default:throw new Error}},[Ue,Tn]),vr=Object(M.useMemo)(function(){switch(Tn){case ue:return b.a.createElement(S,{callback:er,onCancel:yn});case he:return b.a.createElement(c.b,{callback:er,onCancel:yn});case G:return b.a.createElement(ye,{callback:er,onCancel:yn});case _e:return b.a.createElement(v,{callback:er,onCancel:yn});default:return null}},[Tn]);function yn(){On("")}Object(M.useEffect)(function(){if(Pn.current){var Qe=Pn.current,ct=!1,dt=0;function xt(Lt){ct=!0,dt=Lt.pageY}function wt(){ct=!1}function Ct(Lt){if(ct){var _t=Lt.pageY-dt;_t<0&&(_t=0),_t>300&&(_t=300);var Xt=V+_t+"px";ki(Xt)}}return Qe.addEventListener("mousedown",xt),document.addEventListener("mousemove",Ct),document.addEventListener("mouseup",wt),function(){Qe.removeEventListener("mousedown",xt),document.removeEventListener("mousemove",Ct),document.removeEventListener("mouseup",wt)}}},[Ue,Pn]),Object(M.useEffect)(function(){ki(V)},[V]);var Gr=Ve(g),_i=Ve(Ci),Ti={width:Gr,height:_i},Kr=Object(M.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 Fa(){window.sessionStorage.removeItem(bt),Hr(!1),Wr(0)}function qi(){Hr(!1),Wr(0),Ue.setValue(window.sessionStorage.getItem(bt))}return b.a.createElement(M.Fragment,null,b.a.createElement("div",{className:"markdown-editor-wrapper",ref:zr},b.a.createElement("div",{className:"markdown-editor-container ".concat(Sn," ").concat(fn?"on-preview":""," ").concat(Pe?"mini":""," ").concat(nn?"full-screen":""),style:Ti},b.a.createElement(le,{insertTemp:Pt,watch:fn,fullScreen:nn,showNullButton:un,onActionCallback:Xr,hidetoolBar:pn}),b.a.createElement("div",{className:"markdown-editor-body"},b.a.createElement("div",{className:"codemirror-container"},b.a.createElement("textarea",{ref:qn,placeholder:_n})),fn?b.a.createElement("div",{ref:Qn,className:"preview-container"},lt==="stex"&&b.a.createElement(He,{value:Jn}),lt!=="stex"&&b.a.createElement(Re.a,{value:Jn})):null))),Wt?b.a.createElement("a",{ref:Pn,className:"editor-resize"}):null,b.a.createElement(Z.a,null,Te[Tn]?b.a.createElement(ve.a,{centered:!0,title:Te[Tn],visible:!0,onCancel:yn,footer:null},vr):null))}},SJMd:function(ot,ze){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var x,j,ve,te=!1,we,be;window.PR_SHOULD_USE_CONTINUATION=!0;var $,P;(function(){var M=window,b=["break,continue,do,else,for,if,return,while"],H=[b,"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"],K=[H,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],re=[K,"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"],Ee=[K,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],ie=[K,"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"],U="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",F=[K,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],I="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",se=[b,"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"],ae=[b,"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"],Re=[b,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],He=[re,ie,Ee,F,I,se,ae,Re],de=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Oe="str",De="kwd",me="com",ge="typ",le="lit",Z="pun",y="pln",z="tag",W="dec",w="src",Y="atn",N="atv",L="nocode",S="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(G){for(var he=0,_e=!1,Le=!1,Ae=0,pe=G.length;Ae<pe;++Ae){var Ce=G[Ae];if(Ce.ignoreCase)Le=!0;else if(/[a-z]/i.test(Ce.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){_e=!0,Le=!1;break}}var Ie={b:8,t:9,n:10,v:11,f:12,r:13};function Ye(Ve){var xe=Ve.charCodeAt(0);if(xe!==92)return xe;var rt=Ve.charAt(1);return xe=Ie[rt],xe||("0"<=rt&&rt<="7"?parseInt(Ve.substring(1),8):rt==="u"||rt==="x"?parseInt(Ve.substring(2),16):Ve.charCodeAt(1))}function Xe(Ve){if(Ve<32)return(Ve<16?"\\x0":"\\x")+Ve.toString(16);var xe=String.fromCharCode(Ve);return xe==="\\"||xe==="-"||xe==="]"||xe==="^"?"\\"+xe:xe}function Ke(Ve){var xe=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")),rt=[],Je=xe[0]==="^",Te=["["];Je&&Te.push("^");for(var Fe=Je?1:0,_=xe.length;Fe<_;++Fe){var O=xe[Fe];if(/\\[bdsw]/i.test(O))Te.push(O);else{var D=Ye(O),f;Fe+2<_&&xe[Fe+1]==="-"?(f=Ye(xe[Fe+2]),Fe+=2):f=D,rt.push([D,f]),f<65||D>122||(f<65||D>90||rt.push([Math.max(65,D)|32,Math.min(f,90)|32]),f<97||D>122||rt.push([Math.max(97,D)&~32,Math.min(f,122)&~32]))}}rt.sort(function(V,ce){return V[0]-ce[0]||ce[1]-V[1]});for(var m=[],g=[],Fe=0;Fe<rt.length;++Fe){var E=rt[Fe];E[0]<=g[1]+1?g[1]=Math.max(g[1],E[1]):m.push(g=E)}for(var Fe=0;Fe<m.length;++Fe){var E=m[Fe];Te.push(Xe(E[0])),E[1]>E[0]&&(E[1]+1>E[0]&&Te.push("-"),Te.push(Xe(E[1])))}return Te.push("]"),Te.join("")}function nt(Ve){for(var xe=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")),rt=xe.length,Je=[],Te=0,Fe=0;Te<rt;++Te){var _=xe[Te];if(_==="(")++Fe;else if(_.charAt(0)==="\\"){var O=+_.substring(1);O&&(O<=Fe?Je[O]=-1:xe[Te]=Xe(O))}}for(var Te=1;Te<Je.length;++Te)Je[Te]===-1&&(Je[Te]=++he);for(var Te=0,Fe=0;Te<rt;++Te){var _=xe[Te];if(_==="(")++Fe,Je[Fe]||(xe[Te]="(?:");else if(_.charAt(0)==="\\"){var O=+_.substring(1);O&&O<=Fe&&(xe[Te]="\\"+Je[O])}}for(var Te=0;Te<rt;++Te)xe[Te]==="^"&&xe[Te+1]!=="^"&&(xe[Te]="");if(Ve.ignoreCase&&_e)for(var Te=0;Te<rt;++Te){var _=xe[Te],D=_.charAt(0);_.length>=2&&D==="["?xe[Te]=Ke(_):D!=="\\"&&(xe[Te]=_.replace(/[a-zA-Z]/g,function(g){var E=g.charCodeAt(0);return"["+String.fromCharCode(E&~32,E|32)+"]"}))}return xe.join("")}for(var qe=[],Ae=0,pe=G.length;Ae<pe;++Ae){var Ce=G[Ae];if(Ce.global||Ce.multiline)throw new Error(""+Ce);qe.push("(?:"+nt(Ce)+")")}return new RegExp(qe.join("|"),Le?"gi":"g")}function l(G,he){var _e=/(?:^|\s)nocode(?:\s|$)/,Le=[],Ae=0,pe=[],Ce=0;function Ie(Ye){var Xe=Ye.nodeType;if(Xe==1){if(_e.test(Ye.className))return;for(var Ke=Ye.firstChild;Ke;Ke=Ke.nextSibling)Ie(Ke);var nt=Ye.nodeName.toLowerCase();(nt==="br"||nt==="li")&&(Le[Ce]=`
`,pe[Ce<<1]=Ae++,pe[Ce++<<1|1]=Ye)}else if(Xe==3||Xe==4){var qe=Ye.nodeValue;qe.length&&(he?qe=qe.replace(/\r\n?/g,`
`):qe=qe.replace(/[ \t\r\n]+/g," "),Le[Ce]=qe,pe[Ce<<1]=Ae,Ae+=qe.length,pe[Ce++<<1|1]=Ye)}}return Ie(G),{sourceCode:Le.join("").replace(/\n$/,""),spans:pe}}function p(G,he,_e,Le,Ae){if(!_e)return;var pe={sourceNode:G,pre:1,langExtension:null,numberLines:null,sourceCode:_e,spans:null,basePos:he,decorations:null};Le(pe),Ae.push.apply(Ae,pe.decorations)}var C=/\S/;function R(G){for(var he=void 0,_e=G.firstChild;_e;_e=_e.nextSibling){var Le=_e.nodeType;he=Le===1?he?G:_e:Le===3&&C.test(_e.nodeValue)?G:he}return he===G?void 0:he}function q(G,he){var _e={},Le;(function(){for(var Ce=G.concat(he),Ie=[],Ye={},Xe=0,Ke=Ce.length;Xe<Ke;++Xe){var nt=Ce[Xe],qe=nt[3];if(qe)for(var Ve=qe.length;--Ve>=0;)_e[qe.charAt(Ve)]=nt;var xe=nt[1],rt=""+xe;Ye.hasOwnProperty(rt)||(Ie.push(xe),Ye[rt]=null)}Ie.push(/[\0-\uffff]/),Le=c(Ie)})();var Ae=he.length,pe=function(Ce){for(var Ie=Ce.sourceCode,Ye=Ce.basePos,Xe=Ce.sourceNode,Ke=[Ye,y],nt=0,qe=Ie.match(Le)||[],Ve={},xe=0,rt=qe.length;xe<rt;++xe){var Je=qe[xe],Te=Ve[Je],Fe=void 0,_;if(typeof Te=="string")_=!1;else{var O=_e[Je.charAt(0)];if(O)Fe=Je.match(O[1]),Te=O[0];else{for(var D=0;D<Ae;++D)if(O=he[D],Fe=Je.match(O[1]),Fe){Te=O[0];break}Fe||(Te=y)}_=Te.length>=5&&Te.substring(0,5)==="lang-",_&&!(Fe&&typeof Fe[1]=="string")&&(_=!1,Te=w),_||(Ve[Je]=Te)}var f=nt;if(nt+=Je.length,!_)Ke.push(Ye+f,Te);else{var m=Fe[1],g=Je.indexOf(m),E=g+m.length;Fe[2]&&(E=Je.length-Fe[2].length,g=E-m.length);var V=Te.substring(5);p(Xe,Ye+f,Je.substring(0,g),pe,Ke),p(Xe,Ye+f+g,m,Q(V,m),Ke),p(Xe,Ye+f+E,Je.substring(E),pe,Ke)}}Ce.decorations=Ke};return pe}function ye(G){var he=[],_e=[];G.tripleQuotedStrings?he.push([Oe,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):G.multiLineStrings?he.push([Oe,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):he.push([Oe,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),G.verbatimStrings&&_e.push([Oe,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Le=G.hashComments;Le&&(G.cStyleComments?(Le>1?he.push([me,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):he.push([me,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),_e.push([Oe,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):he.push([me,/^#[^\r\n]*/,null,"#"])),G.cStyleComments&&(_e.push([me,/^\/\/[^\r\n]*/,null]),_e.push([me,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ae=G.regexLiterals;if(Ae){var pe=Ae>1?"":`
\r`,Ce=pe?".":"[\\S\\s]",Ie="/(?=[^/*"+pe+"])(?:[^/\\x5B\\x5C"+pe+"]|\\x5C"+Ce+"|\\x5B(?:[^\\x5C\\x5D"+pe+"]|\\x5C"+Ce+")*(?:\\x5D|$))+/";_e.push(["lang-regex",RegExp("^"+S+"("+Ie+")")])}var Ye=G.types;Ye&&_e.push([ge,Ye]);var Xe=(""+G.keywords).replace(/^ | $/g,"");Xe.length&&_e.push([De,new RegExp("^(?:"+Xe.replace(/[\s,]+/g,"|")+")\\b"),null]),he.push([y,/^\s+/,null,` \r
\xA0`]);var Ke="^.[^\\s\\w.$@'\"`/\\\\]*";return G.regexLiterals&&(Ke+="(?!s*/)"),_e.push([le,/^@[a-z_$][a-z_$@0-9]*/i,null],[ge,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[y,/^[a-z_$][a-z_$@0-9]*/i,null],[le,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[y,/^\\[\s\S]?/,null],[Z,new RegExp(Ke),null]),q(he,_e)}var oe=ye({keywords:He,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Se(G,he,_e){for(var Le=/(?:^|\s)nocode(?:\s|$)/,Ae=/\r\n?|\n/,pe=G.ownerDocument,Ce=pe.createElement("li");G.firstChild;)Ce.appendChild(G.firstChild);var Ie=[Ce];function Ye(xe){var rt=xe.nodeType;if(rt==1&&!Le.test(xe.className))if(xe.nodeName==="br")Xe(xe),xe.parentNode&&xe.parentNode.removeChild(xe);else for(var Je=xe.firstChild;Je;Je=Je.nextSibling)Ye(Je);else if((rt==3||rt==4)&&_e){var Te=xe.nodeValue,Fe=Te.match(Ae);if(Fe){var _=Te.substring(0,Fe.index);xe.nodeValue=_;var O=Te.substring(Fe.index+Fe[0].length);if(O){var D=xe.parentNode;D.insertBefore(pe.createTextNode(O),xe.nextSibling)}Xe(xe),_||xe.parentNode.removeChild(xe)}}}function Xe(xe){for(;!xe.nextSibling;)if(xe=xe.parentNode,!xe)return;function rt(Fe,_){var O=_?Fe.cloneNode(!1):Fe,D=Fe.parentNode;if(D){var f=rt(D,1),m=Fe.nextSibling;f.appendChild(O);for(var g=m;g;g=m)m=g.nextSibling,f.appendChild(g)}return O}for(var Je=rt(xe.nextSibling,0),Te;(Te=Je.parentNode)&&Te.nodeType===1;)Je=Te;Ie.push(Je)}for(var Ke=0;Ke<Ie.length;++Ke)Ye(Ie[Ke]);he===(he|0)&&Ie[0].setAttribute("value",he);var nt=pe.createElement("ol");nt.className="linenums";for(var qe=Math.max(0,he-1|0)||0,Ke=0,Ve=Ie.length;Ke<Ve;++Ke)Ce=Ie[Ke],Ce.className="L"+(Ke+qe)%10,Ce.firstChild||Ce.appendChild(pe.createTextNode("\xA0")),nt.appendChild(Ce);G.appendChild(nt)}function ne(G){var he=/\bMSIE\s(\d+)/.exec(navigator.userAgent);he=he&&+he[1]<=8;var _e=/\n/g,Le=G.sourceCode,Ae=Le.length,pe=0,Ce=G.spans,Ie=Ce.length,Ye=0,Xe=G.decorations,Ke=Xe.length,nt=0;Xe[Ke]=Ae;var qe,Ve;for(Ve=qe=0;Ve<Ke;)Xe[Ve]!==Xe[Ve+2]?(Xe[qe++]=Xe[Ve++],Xe[qe++]=Xe[Ve++]):Ve+=2;for(Ke=qe,Ve=qe=0;Ve<Ke;){for(var xe=Xe[Ve],rt=Xe[Ve+1],Je=Ve+2;Je+2<=Ke&&Xe[Je+1]===rt;)Je+=2;Xe[qe++]=xe,Xe[qe++]=rt,Ve=Je}Ke=Xe.length=qe;var Te=G.sourceNode,Fe="";Te&&(Fe=Te.style.display,Te.style.display="none");try{for(var _=null;Ye<Ie;){var O=Ce[Ye],D=Ce[Ye+2]||Ae,f=Xe[nt+2]||Ae,Je=Math.min(D,f),m=Ce[Ye+1],g;if(m.nodeType!==1&&(g=Le.substring(pe,Je))){he&&(g=g.replace(_e,"\r")),m.nodeValue=g;var E=m.ownerDocument,V=E.createElement("span");V.className=Xe[nt+1];var ce=m.parentNode;ce.replaceChild(V,m),V.appendChild(m),pe<D&&(Ce[Ye+1]=m=E.createTextNode(Le.substring(Je,D)),ce.insertBefore(m,V.nextSibling))}pe=Je,pe>=D&&(Ye+=2),pe>=f&&(nt+=2)}}finally{Te&&(Te.style.display=Fe)}}var fe={};function B(G,he){for(var _e=he.length;--_e>=0;){var Le=he[_e];fe.hasOwnProperty(Le)?M.console&&console.warn("cannot override language handler %s",Le):fe[Le]=G}}function Q(G,he){return G&&fe.hasOwnProperty(G)||(G=/^\s*</.test(he)?"default-markup":"default-code"),fe[G]}B(oe,["default-code"]),B(q([],[[y,/^[^<?]+/],[W,/^<!\w[^>]*(?:>|$)/],[me,/^<\!--[\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"]),B(q([[y,/^[\s]+/,null,` \r
`],[N,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[z,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Y,/^(?!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"]),B(q([],[[N,/^[\s\S]+/]]),["uq.val"]),B(ye({keywords:re,hashComments:!0,cStyleComments:!0,types:de}),["c","cc","cpp","cxx","cyc","m"]),B(ye({keywords:"null,true,false"}),["json"]),B(ye({keywords:ie,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:de}),["cs"]),B(ye({keywords:Ee,cStyleComments:!0}),["java"]),B(ye({keywords:Re,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),B(ye({keywords:se,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),B(ye({keywords:I,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),B(ye({keywords:ae,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),B(ye({keywords:F,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),B(ye({keywords:U,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),B(q([],[[Oe,/^[\s\S]+/]]),["regex"]);function h(G){var he=G.langExtension;try{var _e=l(G.sourceNode,G.pre),Le=_e.sourceCode;G.sourceCode=Le,G.spans=_e.spans,G.basePos=0,Q(he,Le)(G),ne(G)}catch(Ae){M.console&&console.log(Ae&&Ae.stack||Ae)}}function T(G,he,_e){var Le=_e||!1,Ae=he||null,pe=document.createElement("div");pe.innerHTML="<pre>"+G+"</pre>",pe=pe.firstChild,Le&&Se(pe,Le,!0);var Ce={langExtension:Ae,numberLines:Le,sourceNode:pe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return h(Ce),pe.innerHTML}function v(G,he){var _e=he||document.body,Le=_e.ownerDocument||document;function Ae(O){return _e.getElementsByTagName(O)}for(var pe=[Ae("pre"),Ae("code"),Ae("xmp")],Ce=[],Ie=0;Ie<pe.length;++Ie)for(var Ye=0,Xe=pe[Ie].length;Ye<Xe;++Ye)Ce.push(pe[Ie][Ye]);pe=null;var Ke=Date;Ke.now||(Ke={now:function(){return+new Date}});var nt=0,qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ve=/\bprettyprint\b/,xe=/\bprettyprinted\b/,rt=/pre|xmp/i,Je=/^code$/i,Te=/^(?:pre|code|xmp)$/i,Fe={};function _(){for(var O=M.PR_SHOULD_USE_CONTINUATION?Ke.now()+250:Infinity;nt<Ce.length&&Ke.now()<O;nt++){for(var D=Ce[nt],f=Fe,m=D;m=m.previousSibling;){var g=m.nodeType,E=(g===7||g===8)&&m.nodeValue;if(E?!/^\??prettify\b/.test(E):g!==3||/\S/.test(m.nodeValue))break;if(E){f={},E.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Wt,mt,Cn){f[mt]=Cn});break}}var V=D.className;if((f!==Fe||Ve.test(V))&&!xe.test(V)){for(var ce=!1,Pe=D.parentNode;Pe;Pe=Pe.parentNode){var tt=Pe.tagName;if(Te.test(tt)&&Pe.className&&Ve.test(Pe.className)){ce=!0;break}}if(!ce){D.className+=" prettyprinted";var ft=f.lang;if(!ft){ft=V.match(qe);var at;!ft&&(at=R(D))&&Je.test(at.tagName)&&(ft=at.className.match(qe)),ft&&(ft=ft[1])}var Pt;if(rt.test(D.tagName))Pt=1;else{var pt=D.currentStyle,lt=Le.defaultView,Bt=pt?pt.whiteSpace:lt&&lt.getComputedStyle?lt.getComputedStyle(D,null).getPropertyValue("white-space"):0;Pt=Bt&&Bt.substring(0,3)==="pre"}var bt=f.linenums;(bt=bt==="true"||+bt)||(bt=V.match(/\blinenums\b(?::(\d+))?/),bt=bt?bt[1]&&bt[1].length?+bt[1]:!0:!1),bt&&Se(D,bt,Pt);var $t={langExtension:ft,sourceNode:D,numberLines:bt,pre:Pt,sourceCode:null,basePos:null,spans:null,decorations:null};h($t)}}}nt<Ce.length?M.setTimeout(_,250):typeof G=="function"&&G()}_()}var ee=M.PR={createSimpleLexer:q,registerLangHandler:B,sourceDecorator:ye,PR_ATTRIB_NAME:Y,PR_ATTRIB_VALUE:N,PR_COMMENT:me,PR_DECLARATION:W,PR_KEYWORD:De,PR_LITERAL:le,PR_NOCODE:L,PR_PLAIN:y,PR_PUNCTUATION:Z,PR_SOURCE:w,PR_STRING:Oe,PR_TAG:z,PR_TYPE:ge,prettyPrintOne:te?M.prettyPrintOne=T:$=T,prettyPrint:P=te?M.prettyPrint=v:P=v},ue=M.define;typeof ue=="function"&&ue.amd&&ue("google-code-prettify",[],function(){return ee})})()},"VrN/":function(ot,ze,x){(function(j,ve){ot.exports=ve()})(this,function(){"use strict";var j=navigator.userAgent,ve=navigator.platform,te=/gecko\/\d/i.test(j),we=/MSIE \d/.test(j),be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(j),$=/Edge\/(\d+)/.exec(j),P=we||be||$,M=P&&(we?document.documentMode||6:+($||be)[1]),b=!$&&/WebKit\//.test(j),H=b&&/Qt\/\d+\.\d+/.test(j),K=!$&&/Chrome\//.test(j),re=/Opera\//.test(j),Ee=/Apple Computer/.test(navigator.vendor),ie=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(j),U=/PhantomJS/.test(j),F=!$&&/AppleWebKit/.test(j)&&/Mobile\/\w+/.test(j),I=/Android/.test(j),se=F||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(j),ae=F||/Mac/.test(ve),Re=/\bCrOS\b/.test(j),He=/win/i.test(ve),de=re&&j.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(re=!1,b=!0);var Oe=ae&&(H||re&&(de==null||de<12.11)),De=te||P&&M>=9;function me(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ge=function(e,t){var r=e.className,n=me(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 le(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Z(e,t){return le(e).appendChild(t)}function y(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function z(e,t,r,n){var i=y(e,t,r,n);return i.setAttribute("role","presentation"),i}var W;document.createRange?W=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:W=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 Y(){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 N(e,t){var r=e.className;me(t).test(r)||(e.className+=(r?" ":"")+t)}function L(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!me(r[n]).test(t)&&(t+=" "+r[n]);return t}var S=function(e){e.select()};F?S=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:P&&(S=function(e){try{e.select()}catch(t){}});function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function l(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 p(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 C=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};C.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},C.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 R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var q=50,ye={toString:function(){return"CodeMirror.Pass"}},oe={scroll:!1},Se={origin:"*mouse"},ne={origin:"+move"};function fe(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 B=[""];function Q(e){for(;B.length<=e;)B.push(h(B)+" ");return B[e]}function h(e){return e[e.length-1]}function T(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function v(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function ee(){}function ue(e,t){var r;return Object.create?r=Object.create(e):(ee.prototype=e,r=new ee),t&&l(t,r),r}var G=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function he(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||G.test(e))}function _e(e,t){return t?t.source.indexOf("\\w")>-1&&he(e)?!0:t.test(e):he(e)}function Le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ae=/[\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 pe(e){return e.charCodeAt(0)>=768&&Ae.test(e)}function Ce(e,t,r){for(;(r<0?t>0:t<e.length)&&pe(e.charAt(t));)t+=r;return t}function Ie(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function Ye(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 Xe=null;function Ke(e,t,r){var n;Xe=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:Xe=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:Xe=i)}return n!=null?n:Xe}var nt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function u(d,k,A){this.level=d,this.from=k,this.to=A}return function(d,k){var A=k=="ltr"?"L":"R";if(d.length==0||k=="ltr"&&!n.test(d))return!1;for(var J=d.length,X=[],ke=0;ke<J;++ke)X.push(r(d.charCodeAt(ke)));for(var Me=0,je=A;Me<J;++Me){var Be=X[Me];Be=="m"?X[Me]=je:je=Be}for(var Ge=0,We=A;Ge<J;++Ge){var $e=X[Ge];$e=="1"&&We=="r"?X[Ge]="n":a.test($e)&&(We=$e,$e=="r"&&(X[Ge]="R"))}for(var it=1,et=X[0];it<J-1;++it){var ht=X[it];ht=="+"&&et=="1"&&X[it+1]=="1"?X[it]="1":ht==","&&et==X[it+1]&&(et=="1"||et=="n")&&(X[it]=et),et=ht}for(var Et=0;Et<J;++Et){var Ft=X[Et];if(Ft==",")X[Et]="N";else if(Ft=="%"){var Ot=void 0;for(Ot=Et+1;Ot<J&&X[Ot]=="%";++Ot);for(var an=Et&&X[Et-1]=="!"||Ot<J&&X[Ot]=="1"?"1":"N",Qt=Et;Qt<Ot;++Qt)X[Qt]=an;Et=Ot-1}}for(var Rt=0,en=A;Rt<J;++Rt){var zt=X[Rt];en=="L"&&zt=="1"?X[Rt]="L":a.test(zt)&&(en=zt)}for(var Nt=0;Nt<J;++Nt)if(i.test(X[Nt])){var Dt=void 0;for(Dt=Nt+1;Dt<J&&i.test(X[Dt]);++Dt);for(var At=(Nt?X[Nt-1]:A)=="L",tn=(Dt<J?X[Dt]:A)=="L",Nr=At==tn?At?"L":"R":A,Gn=Nt;Gn<Dt;++Gn)X[Gn]=Nr;Nt=Dt-1}for(var Vt=[],En,Ut=0;Ut<J;)if(o.test(X[Ut])){var Na=Ut;for(++Ut;Ut<J&&o.test(X[Ut]);++Ut);Vt.push(new u(0,Na,Ut))}else{var Mn=Ut,ur=Vt.length,cr=k=="rtl"?1:0;for(++Ut;Ut<J&&X[Ut]!="L";++Ut);for(var Jt=Mn;Jt<Ut;)if(s.test(X[Jt])){Mn<Jt&&(Vt.splice(ur,0,new u(1,Mn,Jt)),ur+=cr);var jr=Jt;for(++Jt;Jt<Ut&&s.test(X[Jt]);++Jt);Vt.splice(ur,0,new u(2,jr,Jt)),ur+=cr,Mn=Jt}else++Jt;Mn<Ut&&Vt.splice(ur,0,new u(1,Mn,Ut))}return k=="ltr"&&(Vt[0].level==1&&(En=d.match(/^\s+/))&&(Vt[0].from=En[0].length,Vt.unshift(new u(0,0,En[0].length))),h(Vt).level==1&&(En=d.match(/\s+$/))&&(h(Vt).to-=En[0].length,Vt.push(new u(0,J-En[0].length,J)))),k=="rtl"?Vt.reverse():Vt}}();function qe(e,t){var r=e.order;return r==null&&(r=e.order=nt(e.text,t)),r}var Ve=[],xe=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 rt(e,t){return e._handlers&&e._handlers[t]||Ve}function Je(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=R(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Te(e,t){var r=rt(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Fe(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Te(e,r||t.type,e,t),g(t)||t.codemirrorIgnore}function _(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)R(r,t[n])==-1&&r.push(t[n])}function O(e,t){return rt(e,t).length>0}function D(e){e.prototype.on=function(t,r){xe(this,t,r)},e.prototype.off=function(t,r){Je(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function m(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function g(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function E(e){f(e),m(e)}function V(e){return e.target||e.srcElement}function ce(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ae&&e.ctrlKey&&t==1&&(t=3),t}var Pe=function(){if(P&&M<9)return!1;var e=y("div");return"draggable"in e||"dragDrop"in e}(),tt;function ft(e){if(tt==null){var t=y("span","\u200B");Z(e,y("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(tt=t.offsetWidth<=1&&t.offsetHeight>2&&!(P&&M<8))}var r=tt?y("span","\u200B"):y("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=W(t,0,1).getBoundingClientRect(),n=W(t,1,2).getBoundingClientRect();return le(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=y("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,y("span","x")),r=t.getBoundingClientRect(),n=W(t,0,1).getBoundingClientRect();return bt=Math.abs(r.left-n.left)>1}var Wt={},mt={};function Cn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wt[e]=t}function Kn(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=ue(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 kn(e,t){t=un(t);var r=Wt[t.name];if(!r)return kn(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]={};l(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=p(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?p(this.string,this.lineStart,this.tabSize):0)},St.prototype.indentation=function(){return p(this.string,null,this.tabSize)-(this.lineStart?p(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=R(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 _n(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],u=s.height;if(t<u)break;t-=u}return r+o}function Rn(e,t){return t>=e.first&&t<e.first+e.size}function $n(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ne(e,t,r){if(r===void 0&&(r=null),!(this instanceof Ne))return new Ne(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 Ue(e,t){return e.sticky==t.sticky&&ut(e,t)==0}function Ir(e){return Ne(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 Ne(e.first,0);var r=e.first+e.size-1;return t.line>r?Ne(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?Ne(e.line,t):r<0?Ne(e.line,0):e}function Fr(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(d,k){return i.push(d,k)},a,n);for(var o=r.state,s=function(d){r.baseTokens=i;var k=e.state.overlays[d],A=1,J=0;r.state=!0,Br(e,t.text,k.mode,r,function(X,ke){for(var Me=A;J<X;){var je=i[A];je>X&&i.splice(A,1,X,i[A+1],je),A+=2,J=Math.min(X,je)}if(!ke)return;if(k.opaque)i.splice(Me,A-Me,X,"overlay "+ke),A=Me+2;else for(;Me<A;Me+=2){var Be=i[Me+1];i[Me+1]=(Be?Be+" ":"")+"overlay "+ke}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)s(u);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function Ur(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(u){pr(e,u.text,s);var d=s.line;u.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<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),u=nn(e,t.line,r),d=new St(s.text,e.options.tabSize,u),k;for(n&&(k=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=mr(a,d,u.state),n&&k.push(new Tn(d,o,cn(i.mode,u.state)));return n?k:new Tn(d,o,u.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 u=0,d=null,k=new St(t,e.options.tabSize,n),A,J=e.options.addModeClass&&[null];for(t==""&&wi(xi(r,n.state),a);!k.eol();){if(k.pos>e.options.maxHighlightLength?(s=!1,o&&pr(e,t,n,k.pos),k.pos=t.length,A=null):A=wi(mr(r,k,n.state,J),a),J){var X=J[0].name;X&&(A="m-"+(A?X+" "+A:X))}if(!s||d!=A){for(;u<k.start;)u=Math.min(k.start,u+5e3),i(u,d);d=A}k.start=k.pos}for(;u<k.pos;){var ke=Math.min(k.pos,u+5e3);i(ke,d),u=ke}}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 u=Ze(a,s-1),d=u.stateAfter;if(d&&(!r||s+(d instanceof fn?d.lookAhead:0)<=a.modeFrontier))return s;var k=p(u.text,null,e.options.tabSize);(i==null||n>k)&&(i=s-1,n=k)}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 Ci(){Ei=!0}function ki(){hn=!0}function gr(e,t,r){this.marker=e,this.from=t,this.to=r}function Dn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Ia(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Hr(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 u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new gr(o,a.from,u?null:a.to))}}return n}function zr(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 u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new gr(o,u?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Pn(e,t){if(t.full)return null;var r=Rn(e,t.from.line)&&Ze(e,t.from.line).markedSpans,n=Rn(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),u=zr(n,a,o),d=t.text.length==1,k=h(t.text).length+(d?i:0);if(s)for(var A=0;A<s.length;++A){var J=s[A];if(J.to==null){var X=Dn(u,J.marker);X?d&&(J.to=X.to==null?null:X.to+k):J.to=i}}if(u)for(var ke=0;ke<u.length;++ke){var Me=u[ke];if(Me.to!=null&&(Me.to+=k),Me.from==null){var je=Dn(s,Me.marker);je||(Me.from=k,d&&(s||(s=[])).push(Me))}else Me.from+=k,d&&(s||(s=[])).push(Me)}s&&(s=Qn(s)),u&&u!=s&&(u=Qn(u));var Be=[s];if(!d){var Ge=t.text.length-2,We;if(Ge>0&&s)for(var $e=0;$e<s.length;++$e)s[$e].to==null&&(We||(We=[])).push(new gr(s[$e].marker,null,null));for(var it=0;it<Ge;++it)Be.push(We);Be.push(u)}return Be}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(X){if(X.markedSpans)for(var ke=0;ke<X.markedSpans.length;++ke){var Me=X.markedSpans[ke].marker;Me.readOnly&&(!n||R(n,Me)==-1)&&(n||(n=[])).push(Me)}}),!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),u=0;u<i.length;++u){var d=i[u];if(ut(d.to,s.from)<0||ut(d.from,s.to)>0)continue;var k=[u,1],A=ut(d.from,s.from),J=ut(d.to,s.to);(A<0||!o.inclusiveLeft&&!A)&&k.push({from:d.from,to:s.from}),(J>0||!o.inclusiveRight&&!J)&&k.push({from:s.to,to:d.to}),i.splice.apply(i,k),u+=k.length-3}return i}function Xr(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 Gr(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 _i(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||Gr(n,i.marker)<0)&&(n=i.marker);return n}function Ti(e){return _i(e,!0)}function Kr(e){return _i(e,!1)}function Fa(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||Gr(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 u=o[s];if(!u.marker.collapsed)continue;var d=u.marker.find(0),k=ut(d.from,r)||vr(u.marker)-vr(i),A=ut(d.to,n)||yn(u.marker)-yn(i);if(k>=0&&A<=0||k<=0&&A>=0)continue;if(k<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.to,r)>=0:ut(d.to,r)>0)||k>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.from,n)<=0:ut(d.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=Kr(e);)e=t.find(1,!0).line;return e}function dt(e){for(var t,r;t=Kr(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(!Ct(e,r))return t;for(;n=Kr(r);)r=n.find(1,!0).line;return gt(r)+1}function Ct(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&&Lt(e,t,n))return!0}}function Lt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Lt(e,n.line,Dn(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)&&Lt(e,t,i))return!0}function _t(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 Xt(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=Kr(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=Xt(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Xt(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var kt=function(e,t,r){this.text=e,er(this,t),this.height=r?r(this):1};kt.prototype.lineNo=function(){return gt(this)},D(kt);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),Xr(e),er(e,r);var i=n?n(e):1;i!=e.height&&dn(e,i)}function Gt(e){e.parent=null,Xr(e)}var jn={},In={};function br(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?In:jn;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Ua(e,t){var r=z("span",null,null,b?"padding-right: .1px":null),n={pre:z("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&&gt(a);Os(a,n,Ur(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=L(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=L(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(b){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Te(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=L(n.pre.className,n.textClass||"")),n}function ks(e){var t=y("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ss(e,t,r,n,i,a,o){if(!t)return;var s=e.splitSpaces?_s(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,k;if(!u.test(t))e.col+=t.length,k=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,k),P&&M<9&&(d=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var A=0;;){u.lastIndex=A;var J=u.exec(t),X=J?J.index-A:t.length-A;if(X){var ke=document.createTextNode(s.slice(A,A+X));P&&M<9?k.appendChild(y("span",[ke])):k.appendChild(ke),e.map.push(e.pos,e.pos+X,ke),e.col+=X,e.pos+=X}if(!J)break;A+=X+1;var Me=void 0;if(J[0]==" "){var je=e.cm.options.tabSize,Be=je-e.col%je;Me=k.appendChild(y("span",Q(Be),"cm-tab")),Me.setAttribute("role","presentation"),Me.setAttribute("cm-text"," "),e.col+=Be}else J[0]=="\r"||J[0]==`
`?(Me=k.appendChild(y("span",J[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Me.setAttribute("cm-text",J[0]),e.col+=1):(Me=e.cm.options.specialCharPlaceholder(J[0]),Me.setAttribute("cm-text",J[0]),P&&M<9?k.appendChild(y("span",[Me])):k.appendChild(Me),e.col+=1);e.map.push(e.pos,e.pos+1,Me),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var Ge=r||"";n&&(Ge+=n),i&&(Ge+=i);var We=y("span",[k],Ge,a);if(o)for(var $e in o)o.hasOwnProperty($e)&&$e!="style"&&$e!="class"&&We.setAttribute($e,o[$e]);return e.content.appendChild(We)}e.content.appendChild(k)}function _s(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,u){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,k=d+n.length;;){for(var A=void 0,J=0;J<t.length&&!(A=t[J],A.to>d&&A.from<=d);J++);if(A.to>=k)return e(r,n,i,a,o,s,u);e(r,n.slice(0,A.to-d),i,a,null,s,u),a=null,n=n.slice(A.to-d),d=A.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,u=0,d=1,k="",A,J,X=0,ke,Me,je,Be,Ge;;){if(X==u){ke=Me=je=J="",Ge=null,Be=null,X=Infinity;for(var We=[],$e=void 0,it=0;it<n.length;++it){var et=n[it],ht=et.marker;if(ht.type=="bookmark"&&et.from==u&&ht.widgetNode)We.push(ht);else if(et.from<=u&&(et.to==null||et.to>u||ht.collapsed&&et.to==u&&et.from==u)){if(et.to!=null&&et.to!=u&&X>et.to&&(X=et.to,Me=""),ht.className&&(ke+=" "+ht.className),ht.css&&(J=(J?J+";":"")+ht.css),ht.startStyle&&et.from==u&&(je+=" "+ht.startStyle),ht.endStyle&&et.to==X&&($e||($e=[])).push(ht.endStyle,et.to),ht.title&&((Ge||(Ge={})).title=ht.title),ht.attributes)for(var Et in ht.attributes)(Ge||(Ge={}))[Et]=ht.attributes[Et];ht.collapsed&&(!Be||Gr(Be.marker,ht)<0)&&(Be=et)}else et.from>u&&X>et.from&&(X=et.from)}if($e)for(var Ft=0;Ft<$e.length;Ft+=2)$e[Ft+1]==X&&(Me+=" "+$e[Ft]);if(!Be||Be.from==u)for(var Ot=0;Ot<We.length;++Ot)Ba(t,0,We[Ot]);if(Be&&(Be.from||0)==u){if(Ba(t,(Be.to==null?s+1:Be.to)-u,Be.marker,Be.from==null),Be.to==null)return;Be.to==u&&(Be=!1)}}if(u>=s)break;for(var an=Math.min(s,X);;){if(k){var Qt=u+k.length;if(!Be){var Rt=Qt>an?k.slice(0,an-u):k;t.addToken(t,Rt,A?A+ke:ke,je,u+Rt.length==X?Me:"",J,Ge)}if(Qt>=an){k=k.slice(an-u),u=an;break}u=Qt,je=""}k=i.slice(a,a=r[d++]),A=br(r[d++],t.cm.options)}}}function Wa(e,t,r){this.line=t,this.rest=dt(t),this.size=this.rest?gt(h(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ct(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 As(e){yr?yr.ops.push(e):e.ownsGroup=yr={ops:[e],delayedCallbacks:[]}}function Ls(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Ms(e,t){var r=e.ownsGroup;if(!r)return;try{Ls(r)}finally{yr=null,t(r)}}var Vr=null;function Ht(e,t){var r=rt(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(Rs,0));for(var a=function(s){i.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Rs(){var e=Vr;Vr=null;for(var t=0;t<e.length;++t)e[t]()}function Ha(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ps(e,t):a=="gutter"?Xa(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=y("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),P&&M<8&&(e.node.style.zIndex=2)),e.node}function Ds(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(y("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function za(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Ua(e,t)}function Ps(e,t){var r=t.text.className,n=za(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){Ds(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 Xa(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=y("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=$r(t),s=t.gutter=y("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(y("div",$n(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var d=e.display.gutterSpecs[u].className,k=a.hasOwnProperty(d)&&a[d];k&&s.appendChild(y("div",[k],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function Ns(e,t,r){t.alignable&&(t.alignable=null);for(var n=me("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Ga(e,t,r)}function js(e,t,r,n){var i=za(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Qi(e,t),Xa(e,t,r,n),Ga(e,t,n),t.node}function Ga(e,t,r){if(Ka(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ka(e,t.rest[n],t,r,!1)}function Ka(e,t,r,n,i){if(!t.widgets)return;for(var a=$r(r),o=0,s=t.widgets;o<s.length;++o){var u=s[o],d=y("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||d.setAttribute("cm-ignore-events","true"),Is(u,d,r,n),e.display.input.setUneditable(d),i&&u.above?a.insertBefore(d,r.gutter||r.text):a.appendChild(d),Ht(u,"redraw")}}function Is(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function 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,y("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function An(e,t){for(var r=V(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 Ai(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,y("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function xn(e){return q-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 Fs(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 u=o[s],d=o[s+1];Math.abs(u.bottom-d.bottom)>2&&a.push((u.bottom+d.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 Us(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=Ua(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&&(Ha(e,n,r,la(e)),e.curOp.forceUpdate=!0),n||(n=Us(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||(Fs(e,t.view,t.rect),t.hasHeights=!0),o=Ws(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Ja={left:0,right:0,top:0,bottom:0};function Za(e,t,r){for(var n,i,a,o,s,u,d=0;d<e.length;d+=3)if(s=e[d],u=e[d+1],t<s?(i=0,a=1,o="left"):t<u?(i=t-s,a=i+1):(d==e.length-3||t==u&&e[d+3]>t)&&(a=u-s,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[d+2],s==u&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[(d-=3)+2],o="left";if(r=="right"&&i==u-s)for(;d<e.length-3&&e[d+3]==e[d+4]&&!e[d+5].insertLeft;)n=e[(d+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:s,coverEnd:u}}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,u=i.collapse,d;if(a.nodeType==3){for(var k=0;k<4;k++){for(;o&&pe(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s<i.coverEnd&&pe(t.line.text.charAt(i.coverStart+s));)++s;if(P&&M<9&&o==0&&s==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Bs(W(a,o,s).getClientRects(),n),d.left||d.right||o==0)break;s=o,o=o-1,u="right"}P&&M<11&&(d=Hs(e.display.measure,d))}else{o>0&&(u=n="right");var A;e.options.lineWrapping&&(A=a.getClientRects()).length>1?d=A[n=="right"?A.length-1:0]:d=a.getBoundingClientRect()}if(P&&M<9&&!o&&(!d||!d.left&&!d.right)){var J=a.parentNode.getClientRects()[0];J?d={left:J.left,right:J.left+Er(e.display),top:J.top,bottom:J.bottom}:d=Ja}for(var X=d.top-t.rect.top,ke=d.bottom-t.rect.top,Me=(X+ke)/2,je=t.view.measure.heights,Be=0;Be<je.length-1&&!(Me<je[Be]);Be++);var Ge=Be?je[Be-1]:0,We=je[Be],$e={left:(u=="right"?d.right:d.left)-t.rect.left,right:(u=="left"?d.left:d.right)-t.rect.left,top:Ge,bottom:We};return!d.left&&!d.right&&($e.bogus=!0),e.options.singleCursorHeightPerLine||($e.rtop=X,$e.rbottom=ke),$e}function Hs(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,le(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 K&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function to(){return K&&I?-(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 Li(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=_t(t);if(n=="local"?o+=Ai(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:to());var u=s.left+(n=="window"?0:eo());r.left+=u,r.right+=u}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)),Li(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(ke,Me){var je=wn(e,i,ke,Me?"right":"left",a);return Me?je.left=je.right:je.right=je.left,Li(e,n,je,r)}var s=qe(n,e.doc.direction),u=t.ch,d=t.sticky;if(u>=n.text.length?(u=n.text.length,d="before"):u<=0&&(u=0,d="after"),!s)return o(d=="before"?u-1:u,d=="before");function k(ke,Me,je){var Be=s[Me],Ge=Be.level==1;return o(je?ke-1:ke,Ge!=je)}var A=Ke(s,u,d),J=Xe,X=k(u,A,d=="before");return J!=null&&(X.other=k(u,J,d!="before")),X}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=_t(n)+Ai(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function aa(e,t,r,n,i){var a=Ne(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=_n(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=zs(e,o,i,t,r),u=Fa(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var d=u.find(1);if(d.line==i)return d;o=Ze(n,i=d.line)}}function io(e,t,r,n){n-=ra(t);var i=t.text.length,a=Ie(function(o){return wn(e,r,o-1).bottom<=n},i,0);return i=Ie(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=Li(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 zs(e,t,r,n,i){i-=_t(t);var a=xr(e,t),o=ra(t),s=0,u=t.text.length,d=!0,k=qe(t,e.doc.direction);if(k){var A=(e.options.lineWrapping?Gs:Xs)(e,t,r,a,k,n,i);d=A.level!=1,s=d?A.from:A.to-1,u=d?A.to:A.from-1}var J=null,X=null,ke=Ie(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,X=et),!0):!1},s,u),Me,je,Be=!1;if(X){var Ge=n-X.left<X.right-n,We=Ge==d;ke=J+(We?0:1),je=We?"after":"before",Me=Ge?X.left:X.right}else{!d&&(ke==u||ke==s)&&ke++,je=ke==0?"after":ke==t.text.length?"before":wn(e,a,ke-(d?1:0)).bottom+o<=i==d?"after":"before";var $e=gn(e,Ne(r,ke,je),"line",t,a);Me=$e.left,Be=i<$e.top?-1:i>=$e.bottom?1:0}return ke=Ce(t.text,ke,1),aa(r,ke,je,Be,n-Me)}function Xs(e,t,r,n,i,a,o){var s=Ie(function(A){var J=i[A],X=J.level!=1;return sa(gn(e,Ne(r,X?J.to:J.from,X?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[s];if(s>0){var d=u.level!=1,k=gn(e,Ne(r,d?u.from:u.to,d?"after":"before"),"line",t,n);sa(k,a,o,!0)&&k.top>o&&(u=i[s-1])}return u}function Gs(e,t,r,n,i,a,o){var s=io(e,t,n,o),u=s.begin,d=s.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var k=null,A=null,J=0;J<i.length;J++){var X=i[J];if(X.from>=d||X.to<=u)continue;var ke=X.level!=1,Me=wn(e,n,ke?Math.min(d,X.to)-1:Math.max(u,X.from)).right,je=Me<a?a-Me+1e9:Me-a;(!k||A>je)&&(k=X,A=je)}return k||(k=i[i.length-1]),k.from<u&&(k={from:u,to:k.to,level:k.level}),k.to>d&&(k={from:k.from,to:d,level:k.level}),k}var nr;function wr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(nr==null){nr=y("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nr.appendChild(document.createTextNode("x")),nr.appendChild(y("br"));nr.appendChild(document.createTextNode("x"))}Z(e.measure,nr);var r=nr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),le(e.measure),r||1}function Er(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=y("span","xxxxxxxxxx"),r=y("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(Ct(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&&V(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(A){return null}var u=oa(e,a,o),d;if(n&&u.xRel>0&&(d=Ze(e.doc,u.line).text).length==u.ch){var k=p(d,d.length,e.options.tabSize)-d.length;u=Ne(u.line,Math.max(0,Math.round((a-Va(e.display).left)/Er(e.display))-k))}return u}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&&Un(e);else if(r<=i.viewFrom)hn&&wt(e.doc,r+n)>i.viewFrom?Un(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Un(e);else if(t<=i.viewFrom){var a=Mi(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Un(e)}else if(r>=i.viewTo){var o=Mi(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Un(e)}else{var s=Mi(e,t,t,-1),u=Mi(e,r,r+n,1);s&&u?(i.view=i.view.slice(0,s.index).concat(Oi(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):Un(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function Fn(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=[]);R(o,r)==-1&&o.push(r)}function Un(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Mi(e,t,r,n){var i=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,u=0;u<i;u++)s+=o[u].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 Ks(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 u=s.empty();(u||e.options.showCursorWhenSelecting)&&uo(e,s.head,i),u||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(y("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var a=r.appendChild(y("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Ri(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=Va(e.display),s=o.left,u=Math.max(n.sizerWidth,tr(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function k(We,$e,it,et){$e<0&&($e=0),$e=Math.round($e),et=Math.round(et),a.appendChild(y("div",null,"CodeMirror-selected","position: absolute; left: "+We+`px;
top: `+$e+"px; width: "+(it==null?u-We:it)+`px;
height: `+(et-$e)+"px"))}function A(We,$e,it){var et=Ze(i,We),ht=et.text.length,Et,Ft;function Ot(Rt,en){return ia(e,Ne(We,Rt),"div",et,en)}function an(Rt,en,zt){var Nt=ao(e,et,null,Rt),Dt=en=="ltr"==(zt=="after")?"left":"right",At=zt=="after"?Nt.begin:Nt.end-(/\s/.test(et.text.charAt(Nt.end-1))?2:1);return Ot(At,Dt)[Dt]}var Qt=qe(et,i.direction);return Ye(Qt,$e||0,it==null?ht:it,function(Rt,en,zt,Nt){var Dt=zt=="ltr",At=Ot(Rt,Dt?"left":"right"),tn=Ot(en-1,Dt?"right":"left"),Nr=$e==null&&Rt==0,Gn=it==null&&en==ht,Vt=Nt==0,En=!Qt||Nt==Qt.length-1;if(tn.top-At.top<=3){var Ut=(d?Nr:Gn)&&Vt,Na=(d?Gn:Nr)&&En,Mn=Ut?s:(Dt?At:tn).left,ur=Na?u:(Dt?tn:At).right;k(Mn,At.top,ur-Mn,At.bottom)}else{var cr,Jt,jr,ja;Dt?(cr=d&&Nr&&Vt?s:At.left,Jt=d?u:an(Rt,zt,"before"),jr=d?s:an(en,zt,"after"),ja=d&&Gn&&En?u:tn.right):(cr=d?an(Rt,zt,"before"):s,Jt=!d&&Nr&&Vt?u:At.right,jr=!d&&Gn&&En?s:tn.left,ja=d?an(en,zt,"after"):u),k(cr,At.top,Jt-cr,At.bottom),At.bottom<tn.top&&k(s,At.bottom,null,tn.top),k(jr,tn.top,ja-jr,tn.bottom)}(!Et||Ri(At,Et)<0)&&(Et=At),Ri(tn,Et)<0&&(Et=tn),(!Ft||Ri(At,Ft)<0)&&(Ft=At),Ri(tn,Ft)<0&&(Ft=tn)}),{start:Et,end:Ft}}var J=t.from(),X=t.to();if(J.line==X.line)A(J.line,J.ch,X.ch);else{var ke=Ze(i,J.line),Me=Ze(i,X.line),je=Qe(ke)==Qe(Me),Be=A(J.line,J.ch,je?ke.text.length+1:null).end,Ge=A(X.line,je?0:null,X.ch).start;je&&(Be.top<Ge.top-2?(k(Be.right,Be.top,null,Be.bottom),k(s,Ge.top,Ge.left,Ge.bottom)):k(Be.right,Be.top,Ge.left-Be.right,Be.bottom)),Be.bottom<Ge.top&&k(s,Be.bottom,null,Ge.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()||Cr(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,Cr(e))},100)}function fa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Te(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),b&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),da(e)}function Cr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Te(e,"blur",e,t),e.state.focused=!1,ge(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Di(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(P&&M<8){var u=i.node.offsetTop+i.node.offsetHeight;o=u-r,r=u}else{var d=i.node.getBoundingClientRect();o=d.bottom-d.top,!a&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var k=i.line.height-o;if((k>.005||k<-.005)&&(dn(i.line,o),ho(i.line),i.rest))for(var A=0;A<i.rest.length;A++)ho(i.rest[A]);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-Ai(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,a=_n(t,n),o=_n(t,i);if(r&&r.ensure){var s=r.ensure.from.line,u=r.ensure.to.line;s<a?(a=s,o=_n(t,_t(Ze(t,s))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=_n(t,_t(Ze(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function $s(e,t){if(Fe(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!U){var a=y("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Ai(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?Ne(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Ne(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=gn(e,t),u=!r||r==t?s:gn(e,r);i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-n,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+n};var d=ha(e,i),k=e.doc.scrollTop,A=e.doc.scrollLeft;if(d.scrollTop!=null&&(Qr(e,d.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(o=!0)),d.scrollLeft!=null&&(ar(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-A)>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),u=t.top<n,d=t.bottom>s-n;if(t.top<i)o.scrollTop=u?0:t.top;else if(t.bottom>i+a){var k=Math.min(t.top,(d?s:t.bottom)-a);k!=i&&(o.scrollTop=k)}var A=e.options.fixedGutter?0:r.gutters.offsetWidth,J=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-A,X=tr(e)-r.gutters.offsetWidth,ke=t.right-t.left>X;return ke&&(t.right=t.left+X),t.left<10?o.scrollLeft=0:t.left<J?o.scrollLeft=Math.max(0,t.left+A-(ke?0:10)):t.right>X+J-3&&(o.scrollLeft=t.right+(ke?0:10)-X),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 kr(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;te||ga(e,{top:t}),mo(e,t,!0),te&&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=y("div",[y("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=y("div",[y("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),xe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),xe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,P&&M<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=ae&&!ie?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new C,this.disableVert=new C},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&&Di(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&&ge(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),xe(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&&N(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},As(e.curOp)}function lr(e){var t=e.curOp;t&&Ms(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Qs(r)})}function Qs(e){for(var t=e.ops,r=0;r<t.length;r++)el(t[r]);for(var n=0;n<t.length;n++)tl(t[n]);for(var i=0;i<t.length;i++)nl(t[i]);for(var a=0;a<t.length;a++)rl(t[a]);for(var o=0;o<t.length;o++)il(t[o])}function el(e){var t=e.cm,r=t.display;ol(t),e.updateMaxLine&&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 ji(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&&Di(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==Y();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||Te(a[s],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&Te(o[u],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Te(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 jt(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 It(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,c(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,u=yi(e,a,n,!0);s&&(n.state=s),a.styles=u.styles;var d=a.styleClasses,k=u.classes;k?a.styleClasses=k:d&&(a.styleClasses=null);for(var A=!o||o.length!=a.styles.length||d!=k&&(!d||!k||d.bgClass!=k.bgClass||d.textClass!=k.textClass),J=0;!A&&J<o.length;++J)A=o[J]!=a.styles[J];A&&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++)Fn(e,i[a],"text")})}var ji=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=[]};ji.prototype.signal=function(e,t){O(e,t)&&this.events.push(arguments)},ji.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Te.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=Y();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==Y())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 Un(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)&&(Un(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;Ks(e,a,o),r.viewOffset=_t(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=so(e);if(!s&&u==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var d=sl(e);return u>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(d),le(r.cursorDiv),le(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;Di(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 ji(e,t);if(ma(e,r)){Di(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(ke){var Me=ke.nextSibling;return b&&ae&&e.display.currentWheelTarget==ke?ke.style.display="none":ke.parentNode.removeChild(ke),Me}for(var u=n.view,d=n.viewFrom,k=0;k<u.length;k++){var A=u[k];if(!A.hidden)if(!A.node||A.node.parentNode!=a){var J=js(e,A,d,r);a.insertBefore(J,o)}else{for(;o!=A.node;)o=s(o);var X=i&&t!=null&&t<=d&&A.lineNumber;A.changes&&(R(A.changes,"gutter")>-1&&(X=!1),Ha(e,A,d,r)),X&&(le(A.lineNumber),A.lineNumber.appendChild(document.createTextNode($n(e.options,d)))),o=A.node.nextSibling}d+=A.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 u=0;u<s.length;u++)s[u].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(y("div",[y("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",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;le(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(y("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=y("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=y("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=z("div",null,"CodeMirror-code"),i.selectionDiv=y("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=y("div",null,"CodeMirror-cursors"),i.measure=y("div",null,"CodeMirror-measure"),i.lineMeasure=y("div",null,"CodeMirror-measure"),i.lineSpace=z("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=z("div",[i.lineSpace],"CodeMirror-lines");i.mover=y("div",[a],null,"position: relative"),i.sizer=y("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=y("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),i.gutters=y("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=y("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=y("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),P&&M<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!b&&!(te&&se)&&(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 Ii=0,sn=null;P?sn=-.53:te?sn=15:K?sn=-.7:Ee&&(sn=-1/3);function Co(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function dl(e){var t=Co(e);return t.x*=sn,t.y*=sn,t}function ko(e,t){var r=Co(t),n=r.x,i=r.y,a=e.display,o=a.scroller,s=o.scrollWidth>o.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&s||i&&u))return;if(i&&ae&&b){e:for(var d=t.target,k=a.view;d!=o;d=d.parentNode)for(var A=0;A<k.length;A++)if(k[A].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!te&&!re&&sn!=null){i&&u&&Qr(e,Math.max(0,o.scrollTop+i*sn)),ar(e,Math.max(0,o.scrollLeft+n*sn)),(!i||i&&u)&&f(t),a.wheelStartX=null;return}if(i&&sn!=null){var J=i*sn,X=e.doc.scrollTop,ke=X+a.wrapper.clientHeight;J<0?X=Math.max(0,X+J-50):ke=Math.min(e.doc.height,ke+J+50),ga(e,{top:X,bottom:ke})}Ii<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 Me=o.scrollLeft-a.wheelStartX,je=o.scrollTop-a.wheelStartY,Be=je&&a.wheelDY&&je/a.wheelDY||Me&&a.wheelDX&&Me/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!Be)return;sn=(sn*Ii+Be)/(Ii+1),++Ii},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(!Ue(r.anchor,n.anchor)||!Ue(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(Ir(this.ranges[t].anchor),Ir(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,X){return ut(J.from(),X.from())}),r=R(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],u=ut(s.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var d=Yn(s.from(),o.from()),k=hr(s.to(),o.to()),A=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new vt(A?k:d,A?d:k))}}return new ln(t,r)}function Bn(e,t){return new ln([new vt(e,t||e)],0)}function Wn(e){return e.text?Ne(e.from.line+e.text.length-1,h(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),Ne(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 _o(e,t,r){return e.line==t.line?Ne(r.line,e.ch-t.ch+r.ch):Ne(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Ne(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],u=_o(s.from,i,a),d=_o(Wn(s),i,a);if(i=s.to,a=d,r=="around"){var k=e.sel.ranges[o],A=ut(k.head,k.anchor)<0;n[o]=new vt(A?d:u,A?u:d)}else n[o]=new vt(u,u)}return new ln(n,e.sel.primIndex)}function wa(e){e.doc.mode=kn(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&&h(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ea(e,t,r,n){function i(Ge){return r?r[Ge]:null}function a(Ge,We,$e){Nn(Ge,We,$e,n),Ht(Ge,"change",Ge,t)}function o(Ge,We){for(var $e=[],it=Ge;it<We;++it)$e.push(new kt(d[it],i(it),n));return $e}var s=t.from,u=t.to,d=t.text,k=Ze(e,s.line),A=Ze(e,u.line),J=h(d),X=i(d.length-1),ke=u.line-s.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(To(e,t)){var Me=o(0,d.length-1);a(A,A.text,X),ke&&e.remove(s.line,ke),Me.length&&e.insert(s.line,Me)}else if(k==A)if(d.length==1)a(k,k.text.slice(0,s.ch)+J+k.text.slice(u.ch),X);else{var je=o(1,d.length-1);je.push(new kt(J+k.text.slice(u.ch),X,n)),a(k,k.text.slice(0,s.ch)+d[0],i(0)),e.insert(s.line+1,je)}else if(d.length==1)a(k,k.text.slice(0,s.ch)+d[0]+A.text.slice(u.ch),i(0)),e.remove(s.line+1,ke);else{a(k,k.text.slice(0,s.ch)+d[0],i(0)),a(A,J+A.text.slice(u.ch),X);var Be=o(1,d.length-1);ke>1&&e.remove(s.line+1,ke-1),e.insert(s.line+1,Be)}Ht(e,"change",e,t)}function Hn(e,t,r){function n(i,a,o){if(i.linked)for(var s=0;s<i.linked.length;++s){var u=i.linked[s];if(u.doc==a)continue;var d=o&&u.sharedHist;if(r&&!d)continue;t(u.doc,d),n(u.doc,i,d)}}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),Ao(e),e.options.lineWrapping||mn(e),e.options.mode=t.modeOption,Zt(e)}function Ao(e){(e.doc.direction=="rtl"?N:ge)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){rn(e,function(){Ao(e),Zt(e)})}function Fi(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ca(e,t){var r={from:Ir(t.from),to:Wn(t),text:Sn(e,t.from,t.to)};return Ro(e,r,t.from.line,t.to.line+1),Hn(e,function(n){return Ro(n,r,t.from.line,t.to.line+1)},!0),r}function Lo(e){for(;e.length;){var t=h(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Lo(e.done),h(e.done);if(e.done.length&&!h(e.done).ranges)return h(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),h(e.done)}function Mo(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=h(o.changes),ut(t.from,t.to)==0&&ut(t.from,s.to)==0?s.to=Wn(t):o.changes.push(Ca(e,t));else{var u=h(i.done);for((!u||!u.ranges)&&Ui(e.sel,i.done),o={changes:[Ca(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||Te(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,h(i.done),t))?i.done[i.done.length-1]=t:Ui(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Lo(i.undone)}function Ui(e,t){var r=h(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ro(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function Do(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 u=o[s],d=0;d<a.length;++d)if(a[d].marker==u.marker)continue e;a.push(u)}}else o&&(r[i]=o)}return r}function _r(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 u=0;u<o.length;++u){var d=o[u],k=void 0;if(s.push({from:d.from,to:d.to,text:d.text}),t)for(var A in d)(k=A.match(/^spans_(\d+)$/))&&(R(t,Number(k[1]))>-1&&(h(s)[A]=d[A],delete d[A]))}}return n}function ka(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)),Kt(e,new ln([ka(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]=ka(e.sel.ranges[a],t[a],null,i);var o=vn(e.cm,n,e.sel.primIndex);Kt(e,o,r)}function Sa(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Kt(e,vn(e.cm,i,e.sel.primIndex),n)}function No(e,t,r,n){Kt(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 Te(e,"beforeSelectionChange",e,n),e.cm&&Te(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?vn(e.cm,n.ranges,n.ranges.length-1):t}function jo(e,t,r){var n=e.history.done,i=h(n);i&&i.ranges?(n[n.length-1]=t,Wi(e,t,r)):Kt(e,t,r)}function Kt(e,t,r){Wi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Wi(e,t,r){(O(e,"beforeSelectionChange")||e.cm&&O(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);Io(e,Uo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&kr(e.cm)}function Io(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,_(e.cm)),Ht(e,"cursorActivity",e)}function Fo(e){Io(e,Uo(e,e.sel,null,!1))}function Uo(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],u=Hi(e,o.anchor,s&&s.anchor,r,n),d=Hi(e,o.head,s&&s.head,r,n);(i||u!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new vt(u,d))}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],u=s.marker,d="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,k="selectRight"in u?!u.selectRight:u.inclusiveRight;if((s.from==null||(d?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(k?s.to>=t.ch:s.to>t.ch))){if(i&&(Te(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(r){var A=u.find(n<0?1:-1),J=void 0;if((n<0?k:d)&&(A=Bo(e,A,-n,A&&A.line==t.line?a:null)),A&&A.line==t.line&&(J=ut(A,r))&&(n<0?J<0:J>0))return Tr(e,A,t,n,i)}var X=u.find(n<0?-1:1);return(n<0?d:k)&&(X=Bo(e,X,n,X.line==t.line?a:null)),X?Tr(e,X,t,n,i):null}}return t}function Hi(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,Ne(e.first,0))}function Bo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?st(e,Ne(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line<e.first+e.size-1?Ne(t.line+1,0):null:new Ne(t.line,t.ch+r)}function Wo(e){e.setSelection(Ne(e.firstLine(),0),Ne(e.lastLine()),oe)}function Ho(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,a,o,s){i&&(n.from=st(e,i)),a&&(n.to=st(e,a)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),Te(e,"beforeChange",e,n),e.cm&&Te(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 jt(e.cm,Or)(e,t,r);if(e.cm.state.suppressEdits)return}if((O(e,"beforeChange")||e.cm&&O(e.cm,"beforeChange"))&&(t=Ho(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)zo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else zo(e,t)}function zo(e,t){if(t.text.length==1&&t.text[0]==""&&ut(t.from,t.to)==0)return;var r=xa(e,t);Mo(e,t,r,e.cm?e.cm.curOp.id:NaN),ai(e,t,r,Pn(e,t));var n=[];Hn(e,function(i,a){!a&&R(n,i.history)==-1&&(Vo(i.history,t),n.push(i.history)),ai(i,t,null,Pn(i,t))})}function zi(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,u=t=="undo"?i.undone:i.done,d=0;d<s.length&&!(a=s[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==s.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Ui(a,u),r&&!a.equals(e.sel)){Kt(e,a,{clearRedo:!1});return}o=a}else if(n){s.push(a);return}else break;var k=[];Ui(o,u),u.push({changes:k,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var A=O(e,"beforeChange")||e.cm&&O(e.cm,"beforeChange"),J=function(Me){var je=a.changes[Me];if(je.origin=t,A&&!Ho(e,je,!1))return s.length=0,{};k.push(Ca(e,je));var Be=Me?xa(e,je):h(s);ai(e,je,Be,Do(e,je)),!Me&&e.cm&&e.cm.scrollIntoView({from:je.from,to:Wn(je)});var Ge=[];Hn(e,function(We,$e){!$e&&R(Ge,We.history)==-1&&(Vo(We.history,je),Ge.push(We.history)),ai(We,je,null,Do(We,je))})},X=a.changes.length-1;X>=0;--X){var ke=J(X);if(ke)return ke.v}}function Xo(e,t){if(t==0)return;if(e.first+=t,e.sel=new ln(T(e.sel.ranges,function(i){return new vt(Ne(i.anchor.line+t,i.anchor.ch),Ne(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++)Fn(e.cm,n,"gutter")}}function ai(e,t,r,n){if(e.cm&&!e.cm.curOp)return jt(e.cm,ai)(e,t,r,n);if(t.to.line<e.first){Xo(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);Xo(e,i),t={from:Ne(e.first,0),to:Ne(t.to.line+i,t.to.ch),text:[h(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Ne(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,oe),e.cantEdit&&Hi(e,Ne(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,u=a.line;e.options.lineWrapping||(u=gt(Qe(Ze(n,a.line))),n.iter(u,o.line+1,function(X){if(X==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&_(e),Ea(n,t,r,oo(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(X){var ke=Xt(X);ke>i.maxLineLength&&(i.maxLine=X,i.maxLineLength=ke,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Wr(n,a.line),ni(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?Zt(e):a.line==o.line&&t.text.length==1&&!To(e.doc,t)?Fn(e,a.line,"text"):Zt(e,a.line,o.line+1,d);var k=O(e,"changes"),A=O(e,"change");if(A||k){var J={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};A&&Ht(e,"change",e,J),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(J)}e.display.selForContextMenu=null}function Ar(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 Go(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Ko(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++)Go(a.ranges[s].anchor,t,r,n),Go(a.ranges[s].head,t,r,n);continue}for(var u=0;u<a.changes.length;++u){var d=a.changes[u];if(r<d.from.line)d.from=Ne(d.from.line+n,d.from.ch),d.to=Ne(d.to.line+n,d.to.ch);else if(t<=d.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function Vo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Ko(e.done,r,n,i),Ko(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&&Fn(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,Gt(i),Ht(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 u=new si(i.lines.slice(s,s+=25));i.height-=u.height,this.children.splice(++n,0,u),u.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=R(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),Fn(e,n,"widget")}),Ht(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;Ct(this.doc,n)||dn(n,n.height+i),r&&rn(r,function(){r.curOp.forceUpdate=!0,$o(r,n,i),Ht(r,"lineWidgetChanged",r,e,gt(n))})},D(ui);function $o(e,t,r){_t(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&&!Ct(e,o)){var u=_t(o)<e.scrollTop;dn(o,o.height+Yr(i)),u&&pa(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Ht(a,"lineWidgetAdded",a,i,typeof t=="number"?t:gt(t)),i}var Yo=0,zn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Yo};zn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&sr(e),O(this,"clear")){var r=this.find();r&&Ht(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=Dn(o.markedSpans,this);e&&!this.collapsed?Fn(e,gt(o),"text"):e&&(s.to!=null&&(i=gt(o)),s.from!=null&&(n=gt(o))),o.markedSpans=Ia(o.markedSpans,s),s.from==null&&this.collapsed&&!Ct(this.doc,o)&&e&&dn(o,wr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var d=Qe(this.lines[u]),k=Xt(d);k>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=k,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&&Fo(e.doc)),e&&Ht(e,"markerCleared",e,this,n,i),t&&lr(e),this.parent&&this.parent.clear()},zn.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=Dn(a.markedSpans,this);if(o.from!=null&&(r=Ne(t?a:gt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Ne(t?a:gt(a),o.to),e==1))return n}return r&&{from:r,to:n}},zn.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,!Ct(r.doc,i)&&r.height!=null){var s=r.height;r.height=null;var u=Yr(r)-s;u&&dn(i,i.height+u)}Ht(n,"markerChanged",n,e)})},zn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||R(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},zn.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},D(zn);function Lr(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return jt(e.cm,Lr)(e,t,r,n,i);var a=new zn(e,i),o=ut(t,r);if(n&&l(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=z("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");ki()}a.addToHistory&&Mo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,u=e.cm,d;if(e.iter(s,r.line+1,function(A){u&&a.collapsed&&!u.options.lineWrapping&&Qe(A)==u.display.maxLine&&(d=!0),a.collapsed&&s!=t.line&&dn(A,0),Hr(A,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(A){Ct(e,A)&&dn(A,0)}),a.clearOnEnter&&xe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Ci(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Yo,a.atomic=!0),u){if(d&&(u.curOp.updateMaxLine=!0),a.collapsed)Zt(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var k=t.line;k<=r.line;k++)Fn(u,k,"text");a.atomic&&Fo(u.doc),Ht(u,"markerAdded",u,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();Ht(this,"clear")},ci.prototype.find=function(e,t){return this.primary.find(e,t)},D(ci);function El(e,t,r,n,i){n=l(n),n.shared=!1;var a=[Lr(e,t,r,n,i)],o=a[0],s=n.widgetNode;return Hn(e,function(u){s&&(n.widgetNode=s.cloneNode(!0)),a.push(Lr(u,st(u,t),st(u,r),n,i));for(var d=0;d<u.linked.length;++d)if(u.linked[d].isParent)return;o=h(a)}),new ci(a,o)}function Jo(e){return e.findMarks(Ne(e.first,0),e.clipPos(Ne(e.lastLine())),function(t){return t.parent})}function Cl(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=Lr(e,a,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function kl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];Hn(i.primary.doc,function(u){return a.push(u)});for(var o=0;o<i.markers.length;o++){var s=i.markers[o];R(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 kt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Ne(r,0);this.sel=Bn(a),this.history=new Fi(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ea(this,{from:a,to:a,text:e}),Kt(this,Bn(a),oe)};qt.prototype=ue(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:It(function(e){var t=Ne(this.first,0),r=this.first+this.size-1;Or(this,{from:t,to:Ne(r,Ze(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&qr(this.cm,0,0),Kt(this,Bn(t),oe)}),replaceRange:function(e,t,r,n){t=st(this,t),r=r?st(this,r):t,Ar(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(Rn(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:It(function(e,t,r){No(this,st(this,typeof e=="number"?Ne(e,t||0):e),null,r)}),setSelection:It(function(e,t,r){No(this,st(this,e),st(this,t||e),r)}),extendSelection:It(function(e,t,r){Bi(this,st(this,e),t&&st(this,t),r)}),extendSelections:It(function(e,t){Po(this,Fr(this,e),t)}),extendSelectionsBy:It(function(e,t){var r=T(this.sel.ranges,e);Po(this,Fr(this,r),t)}),setSelections:It(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)),Kt(this,vn(this.cm,n,t),r)}),addSelection:It(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vt(st(this,e),st(this,t||e))),Kt(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:It(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),u=n.length-1;u>=0;u--)Or(this,n[u]);s?jo(this,s):this.cm&&kr(this.cm)}),undo:It(function(){zi(this,"undo")}),redo:It(function(){zi(this,"redo")}),undoSelection:It(function(){zi(this,"undo",!0)}),redoSelection:It(function(){zi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Fi(this.history.maxGeneration),Hn(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:_r(this.history.done),undone:_r(this.history.undone)}},setHistory:function(e){var t=this.history=new Fi(this.history.maxGeneration);t.done=_r(e.done.slice(0),null,!0),t.undone=_r(e.undone.slice(0),null,!0)},setGutterMarker:It(function(e,t,r){return oi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Le(i)&&(n.gutterMarkers=null),!0})}),clearGutter:It(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&oi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Le(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Rn(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:It(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(me(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:It(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(me(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:It(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Lr(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),Lr(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 u=o[s];!(u.to!=null&&i==e.line&&e.ch>=u.to||u.from==null&&i!=e.line||u.from!=null&&i==t.line&&u.from>=t.ch)&&(!r||r(u.marker))&&n.push(u.marker.parent||u.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,Ne(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}],Cl(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),kl(Jo(this));break}if(e.history==this.history){var n=[e.id];Hn(e,function(i){return n.push(i.id)},!0),e.history=new Fi(null),e.history.done=_r(this.history.done,n),e.history.undone=_r(this.history.undone,n)}},iterLinkedDocs:function(e){Hn(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:It(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 _l(e){var t=this;if(qo(t),Fe(t,e)||An(t.display,e))return;f(e),P&&(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&&jt(t,function(){r=st(t.doc,r);var X={from:r,to:r,text:t.doc.splitLines(a.filter(function(ke){return ke!=null}).join(t.doc.lineSeparator())),origin:"paste"};Or(t.doc,X),jo(t.doc,Bn(st(t.doc,r),st(t.doc,Wn(X))))})()},u=function(X,ke){if(t.options.allowDropFileTypes&&R(t.options.allowDropFileTypes,X.type)==-1){s();return}var Me=new FileReader;Me.onerror=function(){return s()},Me.onload=function(){var je=Me.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(je)){s();return}a[ke]=je,s()},Me.readAsText(X)},d=0;d<n.length;d++)u(n[d],d);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var k=e.dataTransfer.getData("Text");if(k){var A;if(t.state.draggingText&&!t.state.draggingText.copy&&(A=t.listSelections()),Wi(t.doc,Bn(r,r)),A)for(var J=0;J<A.length;++J)Ar(t.doc,"",A[J].anchor,A[J].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch(X){}}}function Tl(e,t){if(P&&(!e.state.draggingText||+new Date-Zo<100)){E(t);return}if(Fe(e,t)||An(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ee){var r=y("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",re&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),re&&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=y("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 Al(){if(es)return;Ll(),es=!0}function Ll(){var e;xe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Qo(Ml)},100))}),xe(window,"blur",function(){return Qo(Cr)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Xn={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++)Xn[di+48]=Xn[di+96]=String(di);for(var Xi=65;Xi<=90;Xi++)Xn[Xi]=String.fromCharCode(Xi);for(var fi=1;fi<=12;fi++)Xn[fi+111]=Xn[fi+63235]="F"+fi;var Ln={};Ln.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"},Ln.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"},Ln.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"},Ln.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"]},Ln.default=ae?Ln.macDefault:Ln.pcDefault;function Rl(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 Dl(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=T(r.split(" "),Rl),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 u=t[s];if(!u)t[s]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var d in t)e[d]=t[d];return e}function Mr(e,t,r,n){t=Gi(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 Mr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Mr(e,t.fallthrough[a],r,n);if(o)return o}}}function ts(e){var t=typeof e=="string"?e:Xn[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),(Oe?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Oe?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function rs(e,t){if(re&&e.keyCode==34&&e.char)return!1;var r=Xn[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ns(r,e,t))}function Gi(e){return typeof e=="string"?Ln[e]:e}function Rr(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,h(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--)Ar(e.doc,"",n[s].from,n[s].to,"+delete");kr(e)})}function _a(e,t,r){var n=Ce(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ta(e,t,r){var n=_a(e,t.ch,r);return n==null?null:new Ne(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?h(a):a[0],s=i<0==(o.level==1),u=s?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var k=xr(t,r);d=i<0?r.text.length-1:0;var A=wn(t,k,d).top;d=Ie(function(J){return wn(t,k,J).top==A},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=_a(r,d,1))}else d=i<0?o.to:o.from;return new Ne(n,d,u)}}return new Ne(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(Be,Ge){return _a(t,Be instanceof Ne?Be.ch:Be,Ge)},u,d=function(Be){return e.options.lineWrapping?(u=u||xr(e,t),ao(e,t,u,Be)):{begin:0,end:t.text.length}},k=d(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var A=o.level==1==n<0,J=s(r,A?1:-1);if(J!=null&&(A?J<=o.to&&J<=k.end:J>=o.from&&J>=k.begin)){var X=A?"before":"after";return new Ne(r.line,J,X)}}var ke=function(Be,Ge,We){for(var $e=function(Et,Ft){return Ft?new Ne(r.line,s(Et,1),"before"):new Ne(r.line,Et,"after")};Be>=0&&Be<i.length;Be+=Ge){var it=i[Be],et=Ge>0==(it.level!=1),ht=et?We.begin:s(We.end,-1);if(it.from<=ht&&ht<it.to)return $e(ht,et);if(ht=et?it.from:s(it.to,-1),We.begin<=ht&&ht<We.end)return $e(ht,et)}},Me=ke(a+n,n,k);if(Me)return Me;var je=n>0?k.end:s(k.begin,-1);return je!=null&&!(n>0&&je==t.text.length)&&(Me=ke(n>0?0:i.length-1,n,d(je)),Me)?Me:null}var hi={selectAll:Wo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return Rr(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:Ne(t.head.line+1,0)}:{from:t.head,to:Ne(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Rr(e,function(t){return{from:Ne(t.from().line,0),to:st(e.doc,Ne(t.to().line+1,0))}})},delLineLeft:function(e){return Rr(e,function(t){return{from:Ne(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Rr(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 Rr(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(Ne(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ne(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")},ne)},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")},ne)},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},ne)},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=p(e.getLine(a.line),a.ch,n);t.push(Q(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 Ne(i.line,i.ch-1)),i.ch>0)i=new Ne(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Ne(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 Ne(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Ne(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);kr(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 Ne(r.line,o?0:a,r.sticky)}return r}function Ki(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)!=ye}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function jl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Mr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Mr(t,e.options.extraKeys,r,e)||Mr(t,e.options.keyMap,r,e)}var Il=new C;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:Il.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=jl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Ht(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(f(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 Ki(e,n,!0)})||pi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Ki(e,n)}):pi(e,r,t,function(n){return Ki(e,n)}):!1}function Fl(e,t,r){return pi(e,"'"+r+"'",t,function(n){return Ki(e,n,!0)})}var Aa=null;function ls(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=Y(),Fe(t,e))return;P&&M<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ss(t,e);re&&(Aa=n?r:null,!n&&r==88&&!Bt&&(ae?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),te&&!ae&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ul(t)}function Ul(e){var t=e.display.lineDiv;N(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(ge(t,"CodeMirror-crosshair"),Je(document,"keyup",r),Je(document,"mouseover",r))}xe(document,"keyup",r),xe(document,"mouseover",r)}function us(e){e.keyCode==16&&(this.doc.sel.shift=!1),Fe(this,e)}function cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(An(t.display,e)||Fe(t,e)||e.ctrlKey&&!e.altKey||ae&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(re&&r==Aa){Aa=null,f(e);return}if(re&&(!e.which||e.which<10)&&ss(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Fl(t,e,i))return;t.display.input.onKeyPress(e)}var Bl=400,La=function(e,t,r){this.time=e,this.pos=t,this.button=r};La.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 La(r,e,t),mi=null,"double"):(mi=new La(r,e,t),gi=null,"single")}function ds(e){var t=this,r=t.display;if(Fe(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,An(r,e)){b||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ma(t,e))return;var n=rr(t,e),i=ce(e),a=n?Wl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&Hl(t,i,n,a,e))return;i==1?n?Xl(t,n,a,e):V(e)==r.scroller&&f(e):i==2?(n&&Bi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(De?t.display.input.onContextMenu(e):fo(t))}function Hl(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)!=ye}finally{e.state.suppressEdits=!1}return s})}function zl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=Re?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=ae?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ae?r.altKey:r.ctrlKey)),i}function Xl(e,t,r,n){P?setTimeout(c(co,e),0):e.curOp.focus=Y();var i=zl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Pe&&!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)?Gl(e,n,t,i):Kl(e,n,t,i)}function Gl(e,t,r,n){var i=e.display,a=!1,o=jt(e,function(d){b&&(i.scroller.draggable=!1),e.state.draggingText=!1,Je(i.wrapper.ownerDocument,"mouseup",o),Je(i.wrapper.ownerDocument,"mousemove",s),Je(i.scroller,"dragstart",u),Je(i.scroller,"drop",o),a||(f(d),n.addNew||Bi(e.doc,r,null,null,n.extend),b&&!Ee||P&&M==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},u=function(){return a=!0};b&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),xe(i.wrapper.ownerDocument,"mouseup",o),xe(i.wrapper.ownerDocument,"mousemove",s),xe(i.scroller,"dragstart",u),xe(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(Ne(t.line,0),st(e.doc,Ne(t.line+1,0)));var n=r(e,t);return new vt(n.from,n.to)}function Kl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,s,u=a.sel,d=u.ranges;if(n.addNew&&!n.extend?(s=a.sel.contains(r),s>-1?o=d[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 k=fs(e,r,n.unit);n.extend?o=ka(o,k.anchor,k.head,n.extend):o=k}n.addNew?s==-1?(s=d.length,Kt(a,vn(e,d.concat([o]),s),{scroll:!1,origin:"*mouse"})):d.length>1&&d[s].empty()&&n.unit=="char"&&!n.extend?(Kt(a,vn(e,d.slice(0,s).concat(d.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Sa(a,s,o,Se):(s=0,Kt(a,new ln([o],0),Se),u=a.sel);var A=r;function J(We){if(ut(A,We)==0)return;if(A=We,n.unit=="rectangle"){for(var $e=[],it=e.options.tabSize,et=p(Ze(a,r.line).text,r.ch,it),ht=p(Ze(a,We.line).text,We.ch,it),Et=Math.min(et,ht),Ft=Math.max(et,ht),Ot=Math.min(r.line,We.line),an=Math.min(e.lastLine(),Math.max(r.line,We.line));Ot<=an;Ot++){var Qt=Ze(a,Ot).text,Rt=fe(Qt,Et,it);Et==Ft?$e.push(new vt(Ne(Ot,Rt),Ne(Ot,Rt))):Qt.length>Rt&&$e.push(new vt(Ne(Ot,Rt),Ne(Ot,fe(Qt,Ft,it))))}$e.length||$e.push(new vt(r,r)),Kt(a,vn(e,u.ranges.slice(0,s).concat($e),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(We)}else{var en=o,zt=fs(e,We,n.unit),Nt=en.anchor,Dt;ut(zt.anchor,Nt)>0?(Dt=zt.head,Nt=Yn(en.from(),zt.anchor)):(Dt=zt.anchor,Nt=hr(en.to(),zt.head));var At=u.ranges.slice(0);At[s]=Vl(e,new vt(st(a,Nt),Dt)),Kt(a,vn(e,At,s),Se)}}var X=i.wrapper.getBoundingClientRect(),ke=0;function Me(We){var $e=++ke,it=rr(e,We,!0,n.unit=="rectangle");if(!it)return;if(ut(it,A)!=0){e.curOp.focus=Y(),J(it);var et=Pi(i,a);(it.line>=et.to||it.line<et.from)&&setTimeout(jt(e,function(){ke==$e&&Me(We)}),150)}else{var ht=We.clientY<X.top?-20:We.clientY>X.bottom?20:0;ht&&setTimeout(jt(e,function(){if(ke!=$e)return;i.scroller.scrollTop+=ht,Me(We)}),50)}}function je(We){e.state.selectingText=!1,ke=Infinity,We&&(f(We),i.input.focus()),Je(i.wrapper.ownerDocument,"mousemove",Be),Je(i.wrapper.ownerDocument,"mouseup",Ge),a.history.lastSelOrigin=null}var Be=jt(e,function(We){We.buttons===0||!ce(We)?je(We):Me(We)}),Ge=jt(e,je);e.state.selectingText=Ge,xe(i.wrapper.ownerDocument,"mousemove",Be),xe(i.wrapper.ownerDocument,"mouseup",Ge)}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 u=o+(s.from==r.ch==(s.level!=1)?0:1);if(u==0||u==a.length)return t;var d;if(n.line!=r.line)d=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=Ke(a,n.ch,n.sticky),A=k-o||(n.ch-r.ch)*(s.level==1?-1:1);k==u-1||k==u?d=A<0:d=A>0}var J=a[u+(d?-1:0)],X=d==(J.level==1),ke=X?J.from:J.to,Me=X?"after":"before";return r.ch==ke&&r.sticky==Me?t:new vt(new Ne(r.line,ke,Me),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&&f(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!O(e,r))return g(t);a-=s.top-o.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var d=o.gutters.childNodes[u];if(d&&d.getBoundingClientRect().right>=i){var k=_n(e.doc,a),A=e.display.gutterSpecs[u];return Te(e,r,e,k,A.className,t),g(t)}}}function Ma(e,t){return hs(e,t,"gutterClick",!0)}function ps(e,t){if(An(e.display,t)||$l(e,t))return;if(Fe(e,t,"contextmenu"))return;De||e.display.input.onContextMenu(t)}function $l(e,t){return O(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 Dr={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,u,d){d!=Dr&&a(s,u,d)}:a)}e.defineOption=r,e.Init=Dr,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(u){for(var d=0;;){var k=u.text.indexOf(i,d);if(k==-1)break;d=k+i.length,a.push(Ne(o,k))}o++});for(var s=a.length-1;s>=0;s--)Ar(n.doc,i,a[s],Ne(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!=Dr&&n.refresh()}),r("specialCharPlaceholder",ks,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",se?"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",!He),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ms(n),ri(n)},!0),r("keyMap","default",function(n,i,a){var o=Gi(i),s=a!=Dr&&Gi(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"&&(Cr(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!=Dr;if(!t!=!n){var i=e.display.dragFunctions,a=t?xe:Je;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?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ge(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?l(t):{},l(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 C,keySeq:null,specialChars:null},t.autofocus&&!se&&a.input.focus(),P&&M<11&&setTimeout(function(){return r.display.input.reset(!0)},20),ql(this),Al(),sr(this),this.curOp.forceUpdate=!0,Oo(this,n),t.autofocus&&!se||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&fa(r)},20):Cr(this);for(var o in Vi)Vi.hasOwnProperty(o)&&Vi[o](this,t[o],Dr);wo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Ra.length;++s)Ra[s](this);lr(this),b&&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;xe(t.scroller,"mousedown",jt(e,ds)),P&&M<11?xe(t.scroller,"dblclick",jt(e,function(u){if(Fe(e,u))return;var d=rr(e,u);if(!d||Ma(e,u)||An(e.display,u))return;f(u);var k=e.findWordAt(d);Bi(e.doc,k.anchor,k.head)})):xe(t.scroller,"dblclick",function(u){return Fe(e,u)||f(u)}),xe(t.scroller,"contextmenu",function(u){return ps(e,u)}),xe(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||ps(e,u)});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(u){if(u.touches.length!=1)return!1;var d=u.touches[0];return d.radiusX<=1&&d.radiusY<=1}function o(u,d){if(d.left==null)return!0;var k=d.left-u.left,A=d.top-u.top;return k*k+A*A>20*20}xe(t.scroller,"touchstart",function(u){if(!Fe(e,u)&&!a(u)&&!Ma(e,u)){t.input.ensurePolled(),clearTimeout(r);var d=+new Date;t.activeTouch={start:d,moved:!1,prev:d-n.end<=300?n:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),xe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),xe(t.scroller,"touchend",function(u){var d=t.activeTouch;if(d&&!An(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var k=e.coordsChar(t.activeTouch,"page"),A;!d.prev||o(d,d.prev)?A=new vt(k,k):!d.prev.prev||o(d,d.prev.prev)?A=e.findWordAt(k):A=new vt(Ne(k.line,0),st(e.doc,Ne(k.line+1,0))),e.setSelection(A.anchor,A.head),e.focus(),f(u)}i()}),xe(t.scroller,"touchcancel",i),xe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qr(e,t.scroller.scrollTop),ar(e,t.scroller.scrollLeft,!0),Te(e,"scroll",e))}),xe(t.scroller,"mousewheel",function(u){return ko(e,u)}),xe(t.scroller,"DOMMouseScroll",function(u){return ko(e,u)}),xe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Fe(e,u)||E(u)},over:function(u){Fe(e,u)||(Ol(e,u),E(u))},start:function(u){return Tl(e,u)},drop:jt(e,_l),leave:function(u){Fe(e,u)||qo(e)}};var s=t.input.getField();xe(s,"keyup",function(u){return us.call(e,u)}),xe(s,"keydown",jt(e,ls)),xe(s,"keypress",jt(e,cs)),xe(s,"focus",function(u){return fa(e,u)}),xe(s,"blur",function(u){return Cr(e,u)})}var Ra=[];Tt.defineInitHook=function(e){return Ra.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),u=p(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var d=s.text.match(/^\s*/)[0],k;if(!n&&!/\S/.test(s.text))k=0,r="not";else if(r=="smart"&&(k=i.mode.indent(a,s.text.slice(d.length),s.text),k==ye||k>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?k=p(Ze(i,t-1).text,null,o):k=0:r=="add"?k=u+e.options.indentUnit:r=="subtract"?k=u-e.options.indentUnit:typeof r=="number"&&(k=u+r),k=Math.max(0,k);var A="",J=0;if(e.options.indentWithTabs)for(var X=Math.floor(k/o);X;--X)J+=o,A+=" ";if(J<k&&(A+=Q(k-J)),A!=d)return Ar(i,A,Ne(t,0),Ne(t,d.length),"+input"),s.stateAfter=null,!0;for(var ke=0;ke<i.sel.ranges.length;ke++){var Me=i.sel.ranges[ke];if(Me.head.line==t&&Me.head.ch<d.length){var je=Ne(t,d.length);Sa(i,ke,new vt(je,je));break}}}var bn=null;function $i(e){bn=e}function Da(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,u=pt(t),d=null;if(s&&n.ranges.length>1)if(bn&&bn.text.join(`
`)==t){if(n.ranges.length%bn.text.length==0){d=[];for(var k=0;k<bn.text.length;k++)d.push(a.splitLines(bn.text[k]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=T(u,function(Be){return[Be]}));for(var A=e.curOp.updateInput,J=n.ranges.length-1;J>=0;J--){var X=n.ranges[J],ke=X.from(),Me=X.to();X.empty()&&(r&&r>0?ke=Ne(ke.line,ke.ch-r):e.state.overwrite&&!s?Me=Ne(Me.line,Math.min(Ze(a,Me.line).text.length,Me.ch+h(u).length)):s&&bn&&bn.lineWise&&bn.text.join(`
`)==u.join(`
`)&&(ke=Me=Ne(ke.line,0)));var je={from:ke,to:Me,text:d?d[J%d.length]:u,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Or(e.doc,je),Ht(e,"inputRead",e,je)}t&&!s&&bs(e,t),kr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=A),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 Da(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&&Ht(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:Ne(i,0),head:Ne(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=y("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=y("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?e.style.width="1000px":e.setAttribute("wrap","off"),F&&(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)&&jt(this,t[n])(this,i,o),Te(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"](Gi(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.");v(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"),Rn(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&&kr(this));else{var u=s.from(),d=s.to(),k=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var A=k;A<a;++A)vi(this,A,n);var J=this.doc.sel.ranges;u.ch==0&&i.length==J.length&&J[o].from().ch>0&&Sa(this.doc,o,new vt(u,J[o].to()),oe)}}}),getTokenAt:function(n,i){return On(this,n,i)},getLineTokens:function(n,i){return On(this,Ne(n),i,!0)},getTokenTypeAt:function(n){n=st(this.doc,n);var i=Ur(this,Ze(this.doc,n.line)),a=0,o=(i.length-1)/2,s=n.ch,u;if(s==0)u=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=s)o=d;else if(i[d*2+1]<s)a=d+1;else{u=i[d*2+2];break}}var k=u?u.indexOf("overlay "):-1;return k<0?u:k==0?null:u.slice(0,k-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 u=0;u<s[i].length;u++){var d=o[s[i][u]];d&&a.push(d)}else s.helperType&&o[s.helperType]?a.push(o[s.helperType]):o[s.name]&&a.push(o[s.name]);for(var k=0;k<o._global.length;k++){var A=o._global[k];A.pred(s,this)&&R(a,A.val)==-1&&a.push(A.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,_n(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,s;if(typeof n=="number"){var u=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>u&&(n=u,o=!0),s=Ze(this.doc,n)}else s=n;return Li(this,s,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-_t(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 u=this.display;n=gn(this,st(this.doc,n));var d=n.bottom,k=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),u.sizer.appendChild(i),o=="over")d=n.top;else if(o=="above"||o=="near"){var A=Math.max(u.wrapper.clientHeight,this.doc.height),J=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>A)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=A&&(d=n.bottom),k+i.offsetWidth>J&&(k=J-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",s=="right"?(k=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?k=0:s=="middle"&&(k=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=k+"px"),a&&Js(this,{left:k,top:d,right:k+i.offsetWidth,bottom:d+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 u=st(this.doc,n),d=0;d<i&&!(u=Pa(this.doc,u,s,a,o),u.hitSide);++d);return u},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()},ne)}),deleteH:Yt(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Rr(this,function(s){var u=Pa(o,s.head,n,i,!1);return n<0?{from:u,to:s.head}:{from:s.head,to:u}})}),findPosV:function(n,i,a,o){var s=1,u=o;i<0&&(s=-1,i=-i);for(var d=st(this.doc,n),k=0;k<i;++k){var A=gn(this,d,"div");if(u==null?u=A.left:A.left=u,d=Es(this,A,s,a),d.hitSide)break}return d},moveV:Yt(function(n,i){var a=this,o=this.doc,s=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(k){if(u)return n<0?k.from():k.to();var A=gn(a,k.head,"div");k.goalColumn!=null&&(A.left=k.goalColumn),s.push(A.left);var J=Es(a,A,n,i);return i=="page"&&k==o.sel.primary()&&pa(a,ia(a,J,"div").top-A.top),J},ne),s.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=s[d]}),findWordAt:function(n){var i=this.doc,a=Ze(i,n.line).text,o=n.ch,s=n.ch;if(a){var u=this.getHelper(n,"wordChars");(n.sticky=="before"||s==a.length)&&o?--o:++s;for(var d=a.charAt(o),k=_e(d,u)?function(A){return _e(A,u)}:/\s/.test(d)?function(A){return/\s/.test(A)}:function(A){return!/\s/.test(A)&&!_e(A)};o>0&&k(a.charAt(o-1));)--o;for(;s<a.length&&k(a.charAt(s));)++s}return new vt(Ne(n.line,o),Ne(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?N(this.display.cursorDiv,"CodeMirror-overwrite"):ge(this.display.cursorDiv,"CodeMirror-overwrite"),Te(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==Y()},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:Ne(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(u){return typeof u=="number"||/^\d+$/.test(String(u))?u+"px":u};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(u){if(u.widgets){for(var d=0;d<u.widgets.length;d++)if(u.widgets[d].noHScroll){Fn(a,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,Te(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),Te(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,Ht(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}},D(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),u=i&&e.direction=="rtl"?-r:r;function d(){var Ge=t.line+u;return Ge<e.first||Ge>=e.first+e.size?!1:(t=new Ne(Ge,t.ch,t.sticky),s=Ze(e,Ge))}function k(Ge){var We;if(n=="codepoint"){var $e=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN($e)?We=null:We=new Ne(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*($e>=55296&&$e<56320?2:1))),-r)}else i?We=Pl(e.cm,s,t,r):We=Ta(s,t,r);if(We==null)if(!Ge&&d())t=Oa(i,e.cm,s,t.line,u);else return!1;else t=We;return!0}if(n=="char"||n=="codepoint")k();else if(n=="column")k(!0);else if(n=="word"||n=="group")for(var A=null,J=n=="group",X=e.cm&&e.cm.getHelper(t,"wordChars"),ke=!0;!(r<0&&!k(!ke));ke=!1){var Me=s.text.charAt(t.ch)||`
`,je=_e(Me,X)?"w":J&&Me==`
`?"n":!J||/\s/.test(Me)?null:"p";if(J&&!ke&&!je&&(je="s"),A&&A!=je){r<0&&(r=1,k(),t.sticky="after");break}if(je&&(A=je),r>0&&!k(!ke))break}var Be=Hi(e,t,a,o,!0);return Ue(a,Be)&&(Be.hitSide=!0),Be}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),u=Math.max(s-.5*wr(e.display),3);o=(r>0?t.bottom:t.top)+r*u}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var d;!(d=oa(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var yt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new C,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 u=s.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}xe(i,"paste",function(s){if(!a(s)||Fe(n,s)||vs(s,n))return;M<=11&&setTimeout(jt(n,function(){return t.updateFromDOM()}),20)}),xe(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),xe(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),xe(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),xe(i,"touchstart",function(){return r.forceCompositionEnd()}),xe(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!a(s)||Fe(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 u=ys(n);$i({lineWise:!0,text:u.text}),s.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,oe),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var d=bn.text.join(`
`);if(s.clipboardData.setData("Text",d),s.clipboardData.getData("Text")==d){s.preventDefault();return}}var k=ws(),A=k.firstChild;n.display.lineSpace.insertBefore(k,n.display.lineSpace.firstChild),A.value=bn.text.join(`
`);var J=document.activeElement;S(A),setTimeout(function(){n.display.lineSpace.removeChild(k),J.focus(),J==i&&r.showPrimarySelection()},50)}xe(i,"copy",o),xe(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,u=n.line>=t.display.viewFrom&&Cs(t,n)||{node:s[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&Cs(t,i);if(!d){var k=s[s.length-1].measure,A=k.maps?k.maps[k.maps.length-1]:k.map;d={node:A[A.length-1],offset:A[A.length-2]-A[A.length-3]}}if(!u||!d){e.removeAllRanges();return}var J=e.rangeCount&&e.getRangeAt(0),X;try{X=W(u.node,u.offset,d.offset,d.node)}catch(ke){}X&&(!te&&t.state.focused?(e.collapse(u.node,u.offset),X.collapsed||(e.removeAllRanges(),e.addRange(X))):(e.removeAllRanges(),e.addRange(X)),J&&e.anchorNode==null?e.addRange(J):te&&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(I&&K&&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(){Kt(t.doc,Bn(r,n),oe),(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=Ne(n.line-1,Ze(e.doc,n.line-1).length)),i.ch==Ze(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Ne(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 u=ir(e,i.line),d,k;if(u==t.view.length-1?(d=t.viewTo-1,k=t.lineDiv.lastChild):(d=gt(t.view[u+1].line)-1,k=t.view[u+1].node.previousSibling),!s)return!1;for(var A=e.doc.splitLines(tu(e,s,k,o,d)),J=Sn(e.doc,Ne(o,0),Ne(d,Ze(e.doc,d).text.length));A.length>1&&J.length>1;)if(h(A)==h(J))A.pop(),J.pop(),d--;else if(A[0]==J[0])A.shift(),J.shift(),o++;else break;for(var X=0,ke=0,Me=A[0],je=J[0],Be=Math.min(Me.length,je.length);X<Be&&Me.charCodeAt(X)==je.charCodeAt(X);)++X;for(var Ge=h(A),We=h(J),$e=Math.min(Ge.length-(A.length==1?X:0),We.length-(J.length==1?X:0));ke<$e&&Ge.charCodeAt(Ge.length-ke-1)==We.charCodeAt(We.length-ke-1);)++ke;if(A.length==1&&J.length==1&&o==n.line)for(;X&&X>n.ch&&Ge.charCodeAt(Ge.length-ke-1)==We.charCodeAt(We.length-ke-1);)X--,ke++;A[A.length-1]=Ge.slice(0,Ge.length-ke).replace(/^\u200b+/,""),A[0]=A[0].slice(X).replace(/\u200b+$/,"");var it=Ne(o,X),et=Ne(d,J.length?h(J).length-ke:0);if(A.length>1||A[0]||ut(it,et))return Ar(e.doc,A,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()||jt(this.cm,Da)(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 Cs(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 u=Za(i.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}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(),u=!1;function d(X){return function(ke){return ke.id==X}}function k(){o&&(a+=s,u&&(a+=s),o=u=!1)}function A(X){X&&(k(),a+=X)}function J(X){if(X.nodeType==1){var ke=X.getAttribute("cm-text");if(ke){A(ke);return}var Me=X.getAttribute("cm-marker"),je;if(Me){var Be=e.findMarks(Ne(n,0),Ne(i+1,0),d(+Me));Be.length&&(je=Be[0].find(0))&&A(Sn(e.doc,je.from,je.to).join(s));return}if(X.getAttribute("contenteditable")=="false")return;var Ge=/^(pre|div|p|li|table|br)$/i.test(X.nodeName);if(!/^br$/i.test(X.nodeName)&&X.textContent.length==0)return;Ge&&k();for(var We=0;We<X.childNodes.length;We++)J(X.childNodes[We]);/^(pre|p)$/i.test(X.nodeName)&&(u=!0),Ge&&(o=!0)}else X.nodeType==3&&A(X.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(J(t),t==r);)t=t.nextSibling,u=!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(Ne(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(Ne(gt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?h(e.rest):e.line;return Pr(Ne(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 u=e.measure,d=u.maps;function k(je,Be,Ge){for(var We=-1;We<(d?d.length:0);We++)for(var $e=We<0?u.map:d[We],it=0;it<$e.length;it+=3){var et=$e[it+2];if(et==je||et==Be){var ht=gt(We<0?e.line:e.rest[We]),Et=$e[it]+Ge;return(Ge<0||et!=je)&&(Et=$e[it+(Ge?1:0)]),Ne(ht,Et)}}}var A=k(o,s,r);if(A)return Pr(A,i);for(var J=s.nextSibling,X=o?o.nodeValue.length-r:0;J;J=J.nextSibling){if(A=k(J,J.firstChild,0),A)return Pr(Ne(A.line,A.ch-X),i);X+=J.textContent.length}for(var ke=s.previousSibling,Me=r;ke;ke=ke.previousSibling){if(A=k(ke,ke.firstChild,-1),A)return Pr(Ne(A.line,A.ch+Me),i);Me+=ke.textContent.length}}var Mt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new C,this.hasSelection=!1,this.composing=null};Mt.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),F&&(i.style.width="0px"),xe(i,"input",function(){P&&M>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),xe(i,"paste",function(o){if(Fe(n,o)||vs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Fe(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,oe):(r.prevInput="",i.value=s.text.join(`
`),S(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}xe(i,"cut",a),xe(i,"copy",a),xe(e.scroller,"paste",function(o){if(An(e,o)||Fe(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,i.dispatchEvent(s)}),xe(e.lineSpace,"selectstart",function(o){An(e,o)||f(o)}),xe(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"})}}),xe(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Mt.prototype.createField=function(e){this.wrapper=ws(),this.textarea=this.wrapper.firstChild},Mt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Mt.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},Mt.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")},Mt.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&&S(this.textarea),P&&M>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",P&&M>=9&&(this.hasSelection=null))},Mt.prototype.getField=function(){return this.textarea},Mt.prototype.supportsTouch=function(){return!1},Mt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!se||Y()!=this.textarea))try{this.textarea.focus()}catch(e){}},Mt.prototype.blur=function(){this.textarea.blur()},Mt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Mt.prototype.receivedFocus=function(){this.slowPoll()},Mt.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()})},Mt.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)},Mt.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(P&&M>=9&&this.hasSelection===i||ae&&/[\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(){Da(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},Mt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Mt.prototype.onKeyPress=function(){P&&M>=9&&(this.hasSelection=null),this.fastPoll()},Mt.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||re)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&jt(r,Kt)(r.doc,Bn(a),oe);var u=i.style.cssText,d=t.wrapper.style.cssText,k=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-k.top-5)+"px; left: "+(e.clientX-k.left-5)+`px;
z-index: 1000; background: `+(P?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var A;b&&(A=window.scrollY),n.input.focus(),b&&window.scrollTo(null,A),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=X,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function J(){if(i.selectionStart!=null){var Me=r.somethingSelected(),je="\u200B"+(Me?i.value:"");i.value="\u21DA",i.value=je,t.prevInput=Me?"":"\u200B",i.selectionStart=1,i.selectionEnd=je.length,n.selForContextMenu=r.doc.sel}}function X(){if(t.contextMenuPending!=X)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,P&&M<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!P||P&&M<9)&&J();var Me=0,je=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?jt(r,Wo)(r):Me++<10?n.detectingSelectAll=setTimeout(je,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(je,200)}}if(P&&M>=9&&J(),De){E(e);var ke=function(){Je(window,"mouseup",ke),setTimeout(X,20)};xe(window,"mouseup",ke)}else setTimeout(X,50)},Mt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Mt.prototype.setUneditable=function(){},Mt.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?l(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=Y();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(xe(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(u){}}t.finishInit=function(u){u.save=n,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,n(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(Je(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=Tt(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return s}function iu(e){e.off=Je,e.on=xe,e.wheelEventPixels=dl,e.Doc=qt,e.splitLines=pt,e.countColumn=p,e.findColumn=fe,e.isWordChar=he,e.Pass=ye,e.signal=Te,e.Line=kt,e.changeEnd=Wn,e.scrollbarModel=vo,e.Pos=Ne,e.cmpPos=ut,e.modes=Wt,e.mimeModes=mt,e.resolveMode=un,e.getMode=kn,e.modeExtensions=pn,e.extendMode=bi,e.copyState=cn,e.startState=dr,e.innerMode=Vn,e.commands=hi,e.keyMap=Ln,e.keyName=rs,e.isModifierKey=ts,e.lookupKey=Mr,e.normalizeKeyMap=Dl,e.StringStream=St,e.SharedTextMarker=ci,e.TextMarker=zn,e.LineWidget=ui,e.e_preventDefault=f,e.e_stopPropagation=m,e.e_stop=E,e.addClass=N,e.contains=w,e.rmClass=ge,e.keyNames=Xn}Yl(Tt),Ql(Tt);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ji in qt.prototype)qt.prototype.hasOwnProperty(Ji)&&R(au,Ji)<0&&(Tt.prototype[Ji]=function(e){return function(){return e.apply(this.doc,arguments)}}(qt.prototype[Ji]));return D(qt),Tt.inputStyles={textarea:Mt,contenteditable:yt},Tt.defineMode=function(e){!Tt.defaults.mode&&e!="null"&&(Tt.defaults.mode=e),Cn.apply(this,arguments)},Tt.defineMIME=Kn,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})},X0ci:function(ot,ze,x){},Y1PL:function(ot,ze,x){"use strict";x.r(ze),x.d(ze,"ResizableTextArea",function(){return R});var j=x("wx14"),ve=x("1OyB"),te=x("vuIU"),we=x("Ji7U"),be=x("LK+K"),$=x("q1tI"),P=x("VTBJ"),M=x("rePB"),b=x("Zm9Q"),H=x("Kwbf"),K=x("c+Xe"),re=x("m+aA"),Ee=x("bdgK"),ie=new Map;function U(oe){oe.forEach(function(Se){var ne,fe=Se.target;(ne=ie.get(fe))===null||ne===void 0||ne.forEach(function(B){return B(fe)})})}var F=new Ee.default(U),I=null,se=null;function ae(oe,Se){ie.has(oe)||(ie.set(oe,new Set),F.observe(oe)),ie.get(oe).add(Se)}function Re(oe,Se){ie.has(oe)&&(ie.get(oe).delete(Se),ie.get(oe).size||(F.unobserve(oe),ie.delete(oe)))}var He=function(oe){Object(we.a)(ne,oe);var Se=Object(be.a)(ne);function ne(){return Object(ve.a)(this,ne),Se.apply(this,arguments)}return Object(te.a)(ne,[{key:"render",value:function(){return this.props.children}}]),ne}($.Component),de=$.createContext(null);function Oe(oe){var Se=oe.children,ne=oe.onBatchResize,fe=$.useRef(0),B=$.useRef([]),Q=$.useContext(de),h=$.useCallback(function(T,v,ee){fe.current+=1;var ue=fe.current;B.current.push({size:T,element:v,data:ee}),Promise.resolve().then(function(){ue===fe.current&&(ne==null||ne(B.current),B.current=[])}),Q==null||Q(T,v,ee)},[ne,Q]);return $.createElement(de.Provider,{value:h},Se)}function De(oe){var Se=oe.children,ne=oe.disabled,fe=$.useRef(null),B=$.useRef(null),Q=$.useContext(de),h=$.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),T=$.isValidElement(Se)&&Object(K.c)(Se),v=T?Se.ref:null,ee=$.useMemo(function(){return Object(K.a)(v,fe)},[v,fe]),ue=$.useRef(oe);ue.current=oe;var G=$.useCallback(function(he){var _e=ue.current,Le=_e.onResize,Ae=_e.data,pe=he.getBoundingClientRect(),Ce=pe.width,Ie=pe.height,Ye=he.offsetWidth,Xe=he.offsetHeight,Ke=Math.floor(Ce),nt=Math.floor(Ie);if(h.current.width!==Ke||h.current.height!==nt||h.current.offsetWidth!==Ye||h.current.offsetHeight!==Xe){var qe={width:Ke,height:nt,offsetWidth:Ye,offsetHeight:Xe};h.current=qe;var Ve=Ye===Math.round(Ce)?Ce:Ye,xe=Xe===Math.round(Ie)?Ie:Xe,rt=Object(P.a)(Object(P.a)({},qe),{},{offsetWidth:Ve,offsetHeight:xe});Q==null||Q(rt,he,Ae),Le&&Promise.resolve().then(function(){Le(rt,he)})}},[]);return $.useEffect(function(){var he=Object(re.a)(fe.current)||Object(re.a)(B.current);return he&&!ne&&ae(he,G),function(){return Re(he,G)}},[fe.current,ne]),$.createElement(He,{ref:B},T?$.cloneElement(Se,{ref:ee}):Se)}var me="rc-observer-key";function ge(oe){var Se=oe.children,ne=Object(b.a)(Se);return ne.map(function(fe,B){var Q=(fe==null?void 0:fe.key)||"".concat(me,"-").concat(B);return $.createElement(De,Object(j.a)({},oe,{key:Q}),fe)})}ge.Collection=Oe;var le=ge,Z=x("bT9E"),y=x("TSYQ"),z=x.n(y),W=`
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"],Y={},N;function L(oe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ne=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(Se&&Y[ne])return Y[ne];var fe=window.getComputedStyle(oe),B=fe.getPropertyValue("box-sizing")||fe.getPropertyValue("-moz-box-sizing")||fe.getPropertyValue("-webkit-box-sizing"),Q=parseFloat(fe.getPropertyValue("padding-bottom"))+parseFloat(fe.getPropertyValue("padding-top")),h=parseFloat(fe.getPropertyValue("border-bottom-width"))+parseFloat(fe.getPropertyValue("border-top-width")),T=w.map(function(ee){return"".concat(ee,":").concat(fe.getPropertyValue(ee))}).join(";"),v={sizingStyle:T,paddingSize:Q,borderSize:h,boxSizing:B};return Se&&ne&&(Y[ne]=v),v}function S(oe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;N||(N=document.createElement("textarea"),N.setAttribute("tab-index","-1"),N.setAttribute("aria-hidden","true"),document.body.appendChild(N)),oe.getAttribute("wrap")?N.setAttribute("wrap",oe.getAttribute("wrap")):N.removeAttribute("wrap");var B=L(oe,Se),Q=B.paddingSize,h=B.borderSize,T=B.boxSizing,v=B.sizingStyle;N.setAttribute("style","".concat(v,";").concat(W)),N.value=oe.value||oe.placeholder||"";var ee=Number.MIN_SAFE_INTEGER,ue=Number.MAX_SAFE_INTEGER,G=N.scrollHeight,he;if(T==="border-box"?G+=h:T==="content-box"&&(G-=Q),ne!==null||fe!==null){N.value=" ";var _e=N.scrollHeight-Q;ne!==null&&(ee=_e*ne,T==="border-box"&&(ee=ee+Q+h),G=Math.max(ee,G)),fe!==null&&(ue=_e*fe,T==="border-box"&&(ue=ue+Q+h),he=G>ue?"":"hidden",G=Math.min(ue,G))}return{height:G,minHeight:ee,maxHeight:ue,overflowY:he,resize:"none"}}var c=x("Gytx"),l=x.n(c),p;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(p||(p={}));var C=function(oe){Object(we.a)(ne,oe);var Se=Object(be.a)(ne);function ne(fe){var B;return Object(ve.a)(this,ne),B=Se.call(this,fe),B.nextFrameActionId=void 0,B.resizeFrameId=void 0,B.textArea=void 0,B.saveTextArea=function(Q){B.textArea=Q},B.handleResize=function(Q){var h=B.state.resizeStatus,T=B.props,v=T.autoSize,ee=T.onResize;if(h!==p.NONE)return;typeof ee=="function"&&ee(Q),v&&B.resizeOnNextFrame()},B.resizeOnNextFrame=function(){cancelAnimationFrame(B.nextFrameActionId),B.nextFrameActionId=requestAnimationFrame(B.resizeTextarea)},B.resizeTextarea=function(){var Q=B.props.autoSize;if(!Q||!B.textArea)return;var h=Q.minRows,T=Q.maxRows,v=S(B.textArea,!1,h,T);B.setState({textareaStyles:v,resizeStatus:p.RESIZING},function(){cancelAnimationFrame(B.resizeFrameId),B.resizeFrameId=requestAnimationFrame(function(){B.setState({resizeStatus:p.RESIZED},function(){B.resizeFrameId=requestAnimationFrame(function(){B.setState({resizeStatus:p.NONE}),B.fixFirefoxAutoScroll()})})})})},B.renderTextArea=function(){var Q=B.props,h=Q.prefixCls,T=h===void 0?"rc-textarea":h,v=Q.autoSize,ee=Q.onResize,ue=Q.className,G=Q.disabled,he=B.state,_e=he.textareaStyles,Le=he.resizeStatus,Ae=Object(Z.a)(B.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),pe=z()(T,ue,Object(M.a)({},"".concat(T,"-disabled"),G));"value"in Ae&&(Ae.value=Ae.value||"");var Ce=Object(P.a)(Object(P.a)(Object(P.a)({},B.props.style),_e),Le===p.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return $.createElement(le,{onResize:B.handleResize,disabled:!(v||ee)},$.createElement("textarea",Object(j.a)({},Ae,{className:pe,style:Ce,ref:B.saveTextArea})))},B.state={textareaStyles:{},resizeStatus:p.NONE},B}return Object(te.a)(ne,[{key:"componentDidUpdate",value:function(B){(B.value!==this.props.value||!l()(B.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 B=this.textArea.selectionStart,Q=this.textArea.selectionEnd;this.textArea.setSelectionRange(B,Q)}}catch(h){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ne}($.Component),R=C,q=function(oe){Object(we.a)(ne,oe);var Se=Object(be.a)(ne);function ne(fe){var B;Object(ve.a)(this,ne),B=Se.call(this,fe),B.resizableTextArea=void 0,B.focus=function(){B.resizableTextArea.textArea.focus()},B.saveTextArea=function(h){B.resizableTextArea=h},B.handleChange=function(h){var T=B.props.onChange;B.setValue(h.target.value,function(){B.resizableTextArea.resizeTextarea()}),T&&T(h)},B.handleKeyDown=function(h){var T=B.props,v=T.onPressEnter,ee=T.onKeyDown;h.keyCode===13&&v&&v(h),ee&&ee(h)};var Q=typeof fe.value=="undefined"||fe.value===null?fe.defaultValue:fe.value;return B.state={value:Q},B}return Object(te.a)(ne,[{key:"setValue",value:function(B,Q){"value"in this.props||this.setState({value:B},Q)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return $.createElement(R,Object(j.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(B){return"value"in B?{value:B.value}:null}}]),ne}($.Component),ye=ze.default=q},ZW9T:function(ot,ze,x){"use strict";x.d(ze,"a",function(){return He});var j=x("k1fw"),ve=x("miYZ"),te=x("tsqr"),we=x("rAM+"),be=x("tJVT"),$=x("PpiC"),P=x("q1tI"),M=x.n(P),b=x("bdgK");function H(de,Oe,De,me,ge){var le=Oe.getWordUntilPosition(De),Z={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:le.startColumn,endColumn:le.endColumn},y=me.map(function(z){return{label:z,kind:de.languages.CompletionItemKind.Keyword,insertText:z,insertTextRules:de.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Z}});return ge.map(function(z){y.push(Object(j.a)(Object(j.a)({},z),{},{range:Z}))}),y}var K=function(de){var Oe={label:"ifelse",kind:de.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:de.languages.CompletionItemInsertTextRule.InsertAsSnippet},De=["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"];de.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Z,y){var z=H(de,Z,y,De,[Oe]);return{suggestions:z}}});var me=["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"];de.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Z,y){var z=[{label:"print",kind:de.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:de.languages.CompletionItemInsertTextRule.InsertAsSnippet}],W=H(de,Z,y,me,z);return{suggestions:W}}});var ge=["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"];de.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Z,y){var z=[Oe,{label:"main",kind:de.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:de.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:de.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:de.languages.CompletionItemInsertTextRule.InsertAsSnippet}],W=H(de,Z,y,ge,z);return{suggestions:W}}})},re="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",Ee=x("LvDl");function ie(de){return/^\d+$/.test(de)?"".concat(de,"px"):de}function U(){}var F=!1,I={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function se(){var de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Oe=de;if(Array.isArray(de)){for(var De=0;De<de.length;De++){var me=I[de[De]];if(me)return me}return Oe[0]}return I[Oe]||Oe}var ae=null,Re=ze.b=function(de){var Oe=de.width,De=Oe===void 0?"100%":Oe,me=de.height,ge=me===void 0?"100%":me,le=de.value,Z=de.language,y=Z===void 0?"javascript":Z,z=de.style,W=z===void 0?{}:z,w=de.options,Y=w===void 0?{}:w,N=de.overrideServices,L=N===void 0?{}:N,S=de.theme,c=S===void 0?"vs-dark":S,l=de.onEditBlur,p=de.onSave,C=de.autoHeight,R=C===void 0?!1:C,q=de.forbidCopy,ye=q===void 0?!1:q,oe=de.onChange,Se=oe===void 0?U:oe,ne=de.editorDidMount,fe=ne===void 0?U:ne,B=de.onFocus,Q=B===void 0?U:B,h=de.filename,T=h===void 0?"educoder.txt":h,v=Object($.a)(de,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),ee=Object(P.useRef)(),ue=Object(P.useRef)({}),G=Object(P.useRef)(),he=Object(P.useRef)(!1),_e=Object(P.useRef)(),Le=Object(P.useState)(!1),Ae=Object(be.a)(Le,2),pe=Ae[0],Ce=Ae[1];function Ie(){var g;return ee.current&&(g=new b.default(function(E){var V=Object(we.a)(E),ce;try{for(V.s();!(ce=V.n()).done;){var Pe=ce.value;(Pe.target.offsetHeight>0||Pe.target.offsetWidth>0)&&ue.current.instance.layout()}}catch(tt){V.e(tt)}finally{V.f()}}),g.observe(ee.current)),g}function Ye(){te.b.warn(decodeURIComponent(re))}var Xe=function(){var E=ue.current.instance;if(le!=null&&E&&pe){var V=E.getModel();V&&le!==V.getValue()&&(F=!0,V.setValue(le),E.layout(),F=!1)}};Object(P.useEffect)(function(){G.current&&clearTimeout(G.current),G.current=setTimeout(function(){Xe()},500)},[le,pe,ue.current]);function Ke(){var g=ue.current.instance;if(g){var E=g.getSelection(),V=ue.current.pastePos||{},ce=new ae.Range(V.startLineNumber||E.endLineNumber,V.startColumn||E.endColumn,V.endLineNumber||E.endLineNumber,V.endColumn||E.endColumn);setTimeout(function(){g.executeEdits("",[{range:ce,text:""}])},300)}}function nt(g){(window.navigator.platform.match("Mac")?g.metaKey:g.ctrlKey)&&g.keyCode==83&&(g.preventDefault(),p())}var qe=function(){if(R&&ue.current.instance){var E=ue.current.instance.getContentHeight();f(E<ge?ge:E)}else f(ge)};function Ve(g){var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent(E)}function xe(g,E){var V=window.URL||window.webkitURL||window,ce=new Blob([E]),Pe=document.createElementNS("http://www.w3.org/1999/xhtml","a");Pe.href=V.createObjectURL(ce),Pe.download=g,Ve(Pe)}Object(P.useEffect)(function(){qe()},[qe]),Object(P.useEffect)(function(){ee.current&&!pe&&x.e(26).then(x.t.bind(null,"M/lh",7)).then(function(g){try{ae=g,ue.current.instance=ae.editor.create(ee.current,{value:le,language:se(y),theme:c,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},L);var E=ue.current.instance;if(fe(E,ae),setTimeout(function(){qe(),ue.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){xe(T||"educoder.txt",E.getValue())}})},500),ue.current.subscription=E.onDidChangeModelContent(function(ce){he.current?clearTimeout(_e.current):(qe(),Se(E.getValue(),ce)),_e.current=setTimeout(function(){he.current=!1},500)}),window.Monaco||K(ae),ye&&(E.addCommand(ae.KeyMod.CtrlCmd|ae.KeyMod.Shift|ae.KeyCode.KEY_V,function(){return Ye(),null}),E.addCommand(ae.KeyMod.CtrlCmd|ae.KeyCode.KEY_C,function(){return Ye(),null})),window.Monaco=ae,l&&E.onDidBlurEditorWidget(function(){l(E.getValue())}),Q&&E.onDidFocusEditorText(function(){Q(E.getValue())}),ye){E.addCommand(ae.KeyMod.CtrlCmd|ae.KeyCode.KEY_V,function(){return Ye(),null}),E.onDidPaste(function(ce){ue.current.pastePos=ce});try{window.addEventListener("paste",Ke)}catch(ce){}}var V=Ie();return Ce(!0),function(){var ce=ue.current.instance;ce.dispose();var Pe=ce.getModel();Pe&&Pe.dispose(),ue.current.subscription&&ue.current.subscription.dispose(),ye&&window.removeEventListener("paste",Ke),V.unobserve(ee.current)}}catch(ce){}})},[]),Object(P.useEffect)(function(){var g=ue.current.instance;if(g&&pe)return document.addEventListener("keydown",nt,!1),function(){document.removeEventListener("keydown",nt)}},[p,pe]),Object(P.useEffect)(function(){var g=ue.current.instance;if(g&&pe){var E=se(y);ae.editor.setModelLanguage(g.getModel(),E),console.log("language:",y,g.getModel(),E)}},[y,pe]),Object(P.useEffect)(function(){var g=ue.current.instance;g&&pe&&ae.editor.setTheme(c)},[c,pe]),Object(P.useEffect)(function(){var g=ue.current.instance;g&&pe&&(g.updateOptions(Object(j.a)({},Y)),setTimeout(function(){g.getModel().updateOptions(Object(j.a)({},Y))},200))},[JSON.stringify(Y),pe]),Object(P.useEffect)(function(){var g=ue.current.instance;g&&pe&&g.layout()},[De,ge,pe]);var rt=Object(P.useState)(ie(De)),Je=Object(be.a)(rt,2),Te=Je[0],Fe=Je[1],_=Object(P.useState)(ie(ge)),O=Object(be.a)(_,2),D=O[0],f=O[1],m=Object(j.a)(Object(j.a)({},W),{},{width:Te,height:D});return M.a.createElement("div",{className:"my-monaco-editor",ref:ee,style:m})};function He(de){var Oe=de.width,De=Oe===void 0?"100%":Oe,me=de.height,ge=me===void 0?"100%":me,le=de.original,Z=de.modified,y=de.language,z=de.options,W=z===void 0?{}:z,w=Object(P.useRef)(),Y=Object(P.useState)(null),N=Object(be.a)(Y,2),L=N[0],S=N[1];function c(R){var q;return w.current&&(q=new b.default(function(ye){var oe=Object(we.a)(ye),Se;try{for(oe.s();!(Se=oe.n()).done;){var ne=Se.value;(ne.target.offsetHeight>0||ne.target.offsetWidth>0)&&R.layout()}}catch(fe){oe.e(fe)}finally{oe.f()}}),q.observe(w.current)),q}Object(P.useEffect)(function(){w.current&&x.e(26).then(x.t.bind(null,"M/lh",7)).then(function(R){ae=R;var q=ae.editor.createDiffEditor(w.current,Object(j.a)(Object(j.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},W),{},{wordWrap:!0}));S(q);var ye=c(q);return function(){q.dispose();var oe=q.getModel();oe&&oe.dispose(),ye.unobserve(w.current)}})},[]),Object(P.useEffect)(function(){L&&L.setModel({original:ae.editor.createModel(le,y),modified:ae.editor.createModel(Z,y)})},[le,Z,y,L]);var l=ie(De),p=ie(ge),C={width:l,height:p};return M.a.createElement("div",{className:"my-diff-editor",ref:w,style:C})}},ZpRC:function(ot,ze,x){"use strict";function j(K){return typeof K=="object"&&K!=null&&K.nodeType===1}function ve(K,re){return(!re||K!=="hidden")&&K!=="visible"&&K!=="clip"}function te(K,re){if(K.clientHeight<K.scrollHeight||K.clientWidth<K.scrollWidth){var Ee=getComputedStyle(K,null);return ve(Ee.overflowY,re)||ve(Ee.overflowX,re)||function(ie){var U=function(F){if(!F.ownerDocument||!F.ownerDocument.defaultView)return null;try{return F.ownerDocument.defaultView.frameElement}catch(I){return null}}(ie);return!!U&&(U.clientHeight<ie.scrollHeight||U.clientWidth<ie.scrollWidth)}(K)}return!1}function we(K,re,Ee,ie,U,F,I,se){return F<K&&I>re||F>K&&I<re?0:F<=K&&se<=Ee||I>=re&&se>=Ee?F-K-ie:I>re&&se<Ee||F<K&&se>Ee?I-re+U:0}var be=function(K,re){var Ee=window,ie=re.scrollMode,U=re.block,F=re.inline,I=re.boundary,se=re.skipOverflowHiddenElements,ae=typeof I=="function"?I:function(_e){return _e!==I};if(!j(K))throw new TypeError("Invalid target");for(var Re=document.scrollingElement||document.documentElement,He=[],de=K;j(de)&&ae(de);){if((de=de.parentElement)===Re){He.push(de);break}de!=null&&de===document.body&&te(de)&&!te(document.documentElement)||de!=null&&te(de,se)&&He.push(de)}for(var Oe=Ee.visualViewport?Ee.visualViewport.width:innerWidth,De=Ee.visualViewport?Ee.visualViewport.height:innerHeight,me=window.scrollX||pageXOffset,ge=window.scrollY||pageYOffset,le=K.getBoundingClientRect(),Z=le.height,y=le.width,z=le.top,W=le.right,w=le.bottom,Y=le.left,N=U==="start"||U==="nearest"?z:U==="end"?w:z+Z/2,L=F==="center"?Y+y/2:F==="end"?W:Y,S=[],c=0;c<He.length;c++){var l=He[c],p=l.getBoundingClientRect(),C=p.height,R=p.width,q=p.top,ye=p.right,oe=p.bottom,Se=p.left;if(ie==="if-needed"&&z>=0&&Y>=0&&w<=De&&W<=Oe&&z>=q&&w<=oe&&Y>=Se&&W<=ye)return S;var ne=getComputedStyle(l),fe=parseInt(ne.borderLeftWidth,10),B=parseInt(ne.borderTopWidth,10),Q=parseInt(ne.borderRightWidth,10),h=parseInt(ne.borderBottomWidth,10),T=0,v=0,ee="offsetWidth"in l?l.offsetWidth-l.clientWidth-fe-Q:0,ue="offsetHeight"in l?l.offsetHeight-l.clientHeight-B-h:0;if(Re===l)T=U==="start"?N:U==="end"?N-De:U==="nearest"?we(ge,ge+De,De,B,h,ge+N,ge+N+Z,Z):N-De/2,v=F==="start"?L:F==="center"?L-Oe/2:F==="end"?L-Oe:we(me,me+Oe,Oe,fe,Q,me+L,me+L+y,y),T=Math.max(0,T+ge),v=Math.max(0,v+me);else{T=U==="start"?N-q-B:U==="end"?N-oe+h+ue:U==="nearest"?we(q,oe,C,B,h+ue,N,N+Z,Z):N-(q+C/2)+ue/2,v=F==="start"?L-Se-fe:F==="center"?L-(Se+R/2)+ee/2:F==="end"?L-ye+Q+ee:we(Se,ye,R,fe,Q+ee,L,L+y,y);var G=l.scrollLeft,he=l.scrollTop;N+=he-(T=Math.max(0,Math.min(he+T,l.scrollHeight-C+ue))),L+=G-(v=Math.max(0,Math.min(G+v,l.scrollWidth-R+ee)))}S.push({el:l,top:T,left:v})}return S};function $(K){return K===Object(K)&&Object.keys(K).length!==0}function P(K,re){re===void 0&&(re="auto");var Ee="scrollBehavior"in document.body.style;K.forEach(function(ie){var U=ie.el,F=ie.top,I=ie.left;U.scroll&&Ee?U.scroll({top:F,left:I,behavior:re}):(U.scrollTop=F,U.scrollLeft=I)})}function M(K){return K===!1?{block:"end",inline:"nearest"}:$(K)?K:{block:"start",inline:"nearest"}}function b(K,re){var Ee=!K.ownerDocument.documentElement.contains(K);if($(re)&&typeof re.behavior=="function")return re.behavior(Ee?[]:be(K,re));if(Ee)return;var ie=M(re);return P(be(K,ie),ie.behavior)}var H=ze.a=b},Zss7:function(ot,ze,x){var j;(function(ve){var te=/^\s+/,we=/\s+$/,be=0,$=ve.round,P=ve.min,M=ve.max,b=ve.random;function H(h,T){if(h=h||"",T=T||{},h instanceof H)return h;if(!(this instanceof H))return new H(h,T);var v=K(h);this._originalInput=h,this._r=v.r,this._g=v.g,this._b=v.b,this._a=v.a,this._roundA=$(100*this._a)/100,this._format=T.format||v.format,this._gradientType=T.gradientType,this._r<1&&(this._r=$(this._r)),this._g<1&&(this._g=$(this._g)),this._b<1&&(this._b=$(this._b)),this._ok=v.ok,this._tc_id=be++}H.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),T,v,ee,ue,G,he;return T=h.r/255,v=h.g/255,ee=h.b/255,T<=.03928?ue=T/12.92:ue=ve.pow((T+.055)/1.055,2.4),v<=.03928?G=v/12.92:G=ve.pow((v+.055)/1.055,2.4),ee<=.03928?he=ee/12.92:he=ve.pow((ee+.055)/1.055,2.4),.2126*ue+.7152*G+.0722*he},setAlpha:function(h){return this._a=S(h),this._roundA=$(100*this._a)/100,this},toHsv:function(){var h=U(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=U(this._r,this._g,this._b),T=$(h.h*360),v=$(h.s*100),ee=$(h.v*100);return this._a==1?"hsv("+T+", "+v+"%, "+ee+"%)":"hsva("+T+", "+v+"%, "+ee+"%, "+this._roundA+")"},toHsl:function(){var h=Ee(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=Ee(this._r,this._g,this._b),T=$(h.h*360),v=$(h.s*100),ee=$(h.l*100);return this._a==1?"hsl("+T+", "+v+"%, "+ee+"%)":"hsla("+T+", "+v+"%, "+ee+"%, "+this._roundA+")"},toHex:function(h){return I(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return se(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:$(this._r),g:$(this._g),b:$(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+$(this._r)+", "+$(this._g)+", "+$(this._b)+")":"rgba("+$(this._r)+", "+$(this._g)+", "+$(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:$(c(this._r,255)*100)+"%",g:$(c(this._g,255)*100)+"%",b:$(c(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+$(c(this._r,255)*100)+"%, "+$(c(this._g,255)*100)+"%, "+$(c(this._b,255)*100)+"%)":"rgba("+$(c(this._r,255)*100)+"%, "+$(c(this._g,255)*100)+"%, "+$(c(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:N[I(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var T="#"+ae(this._r,this._g,this._b,this._a),v=T,ee=this._gradientType?"GradientType = 1, ":"";if(h){var ue=H(h);v="#"+ae(ue._r,ue._g,ue._b,ue._a)}return"progid:DXImageTransform.Microsoft.gradient("+ee+"startColorstr="+T+",endColorstr="+v+")"},toString:function(h){var T=!!h;h=h||this._format;var v=!1,ee=this._a<1&&this._a>=0,ue=!T&&ee&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return ue?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(v=this.toRgbString()),h==="prgb"&&(v=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(v=this.toHexString()),h==="hex3"&&(v=this.toHexString(!0)),h==="hex4"&&(v=this.toHex8String(!0)),h==="hex8"&&(v=this.toHex8String()),h==="name"&&(v=this.toName()),h==="hsl"&&(v=this.toHslString()),h==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(h,T){var v=h.apply(null,[this].concat([].slice.call(T)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(Oe,arguments)},brighten:function(){return this._applyModification(De,arguments)},darken:function(){return this._applyModification(me,arguments)},desaturate:function(){return this._applyModification(Re,arguments)},saturate:function(){return this._applyModification(He,arguments)},greyscale:function(){return this._applyModification(de,arguments)},spin:function(){return this._applyModification(ge,arguments)},_applyCombination:function(h,T){return h.apply(null,[this].concat([].slice.call(T)))},analogous:function(){return this._applyCombination(W,arguments)},complement:function(){return this._applyCombination(le,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(Z,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},H.fromRatio=function(h,T){if(typeof h=="object"){var v={};for(var ee in h)h.hasOwnProperty(ee)&&(ee==="a"?v[ee]=h[ee]:v[ee]=ye(h[ee]));h=v}return H(h,T)};function K(h){var T={r:0,g:0,b:0},v=1,ee=null,ue=null,G=null,he=!1,_e=!1;return typeof h=="string"&&(h=B(h)),typeof h=="object"&&(fe(h.r)&&fe(h.g)&&fe(h.b)?(T=re(h.r,h.g,h.b),he=!0,_e=String(h.r).substr(-1)==="%"?"prgb":"rgb"):fe(h.h)&&fe(h.s)&&fe(h.v)?(ee=ye(h.s),ue=ye(h.v),T=F(h.h,ee,ue),he=!0,_e="hsv"):fe(h.h)&&fe(h.s)&&fe(h.l)&&(ee=ye(h.s),G=ye(h.l),T=ie(h.h,ee,G),he=!0,_e="hsl"),h.hasOwnProperty("a")&&(v=h.a)),v=S(v),{ok:he,format:h.format||_e,r:P(255,M(T.r,0)),g:P(255,M(T.g,0)),b:P(255,M(T.b,0)),a:v}}function re(h,T,v){return{r:c(h,255)*255,g:c(T,255)*255,b:c(v,255)*255}}function Ee(h,T,v){h=c(h,255),T=c(T,255),v=c(v,255);var ee=M(h,T,v),ue=P(h,T,v),G,he,_e=(ee+ue)/2;if(ee==ue)G=he=0;else{var Le=ee-ue;he=_e>.5?Le/(2-ee-ue):Le/(ee+ue);switch(ee){case h:G=(T-v)/Le+(T<v?6:0);break;case T:G=(v-h)/Le+2;break;case v:G=(h-T)/Le+4;break}G/=6}return{h:G,s:he,l:_e}}function ie(h,T,v){var ee,ue,G;h=c(h,360),T=c(T,100),v=c(v,100);function he(Ae,pe,Ce){return Ce<0&&(Ce+=1),Ce>1&&(Ce-=1),Ce<1/6?Ae+(pe-Ae)*6*Ce:Ce<1/2?pe:Ce<2/3?Ae+(pe-Ae)*(2/3-Ce)*6:Ae}if(T===0)ee=ue=G=v;else{var _e=v<.5?v*(1+T):v+T-v*T,Le=2*v-_e;ee=he(Le,_e,h+1/3),ue=he(Le,_e,h),G=he(Le,_e,h-1/3)}return{r:ee*255,g:ue*255,b:G*255}}function U(h,T,v){h=c(h,255),T=c(T,255),v=c(v,255);var ee=M(h,T,v),ue=P(h,T,v),G,he,_e=ee,Le=ee-ue;if(he=ee===0?0:Le/ee,ee==ue)G=0;else{switch(ee){case h:G=(T-v)/Le+(T<v?6:0);break;case T:G=(v-h)/Le+2;break;case v:G=(h-T)/Le+4;break}G/=6}return{h:G,s:he,v:_e}}function F(h,T,v){h=c(h,360)*6,T=c(T,100),v=c(v,100);var ee=ve.floor(h),ue=h-ee,G=v*(1-T),he=v*(1-ue*T),_e=v*(1-(1-ue)*T),Le=ee%6,Ae=[v,he,G,G,_e,v][Le],pe=[_e,v,v,he,G,G][Le],Ce=[G,G,_e,v,v,he][Le];return{r:Ae*255,g:pe*255,b:Ce*255}}function I(h,T,v,ee){var ue=[q($(h).toString(16)),q($(T).toString(16)),q($(v).toString(16))];return ee&&ue[0].charAt(0)==ue[0].charAt(1)&&ue[1].charAt(0)==ue[1].charAt(1)&&ue[2].charAt(0)==ue[2].charAt(1)?ue[0].charAt(0)+ue[1].charAt(0)+ue[2].charAt(0):ue.join("")}function se(h,T,v,ee,ue){var G=[q($(h).toString(16)),q($(T).toString(16)),q($(v).toString(16)),q(oe(ee))];return ue&&G[0].charAt(0)==G[0].charAt(1)&&G[1].charAt(0)==G[1].charAt(1)&&G[2].charAt(0)==G[2].charAt(1)&&G[3].charAt(0)==G[3].charAt(1)?G[0].charAt(0)+G[1].charAt(0)+G[2].charAt(0)+G[3].charAt(0):G.join("")}function ae(h,T,v,ee){var ue=[q(oe(ee)),q($(h).toString(16)),q($(T).toString(16)),q($(v).toString(16))];return ue.join("")}H.equals=function(h,T){return!h||!T?!1:H(h).toRgbString()==H(T).toRgbString()},H.random=function(){return H.fromRatio({r:b(),g:b(),b:b()})};function Re(h,T){T=T===0?0:T||10;var v=H(h).toHsl();return v.s-=T/100,v.s=l(v.s),H(v)}function He(h,T){T=T===0?0:T||10;var v=H(h).toHsl();return v.s+=T/100,v.s=l(v.s),H(v)}function de(h){return H(h).desaturate(100)}function Oe(h,T){T=T===0?0:T||10;var v=H(h).toHsl();return v.l+=T/100,v.l=l(v.l),H(v)}function De(h,T){T=T===0?0:T||10;var v=H(h).toRgb();return v.r=M(0,P(255,v.r-$(255*-(T/100)))),v.g=M(0,P(255,v.g-$(255*-(T/100)))),v.b=M(0,P(255,v.b-$(255*-(T/100)))),H(v)}function me(h,T){T=T===0?0:T||10;var v=H(h).toHsl();return v.l-=T/100,v.l=l(v.l),H(v)}function ge(h,T){var v=H(h).toHsl(),ee=(v.h+T)%360;return v.h=ee<0?360+ee:ee,H(v)}function le(h){var T=H(h).toHsl();return T.h=(T.h+180)%360,H(T)}function Z(h){var T=H(h).toHsl(),v=T.h;return[H(h),H({h:(v+120)%360,s:T.s,l:T.l}),H({h:(v+240)%360,s:T.s,l:T.l})]}function y(h){var T=H(h).toHsl(),v=T.h;return[H(h),H({h:(v+90)%360,s:T.s,l:T.l}),H({h:(v+180)%360,s:T.s,l:T.l}),H({h:(v+270)%360,s:T.s,l:T.l})]}function z(h){var T=H(h).toHsl(),v=T.h;return[H(h),H({h:(v+72)%360,s:T.s,l:T.l}),H({h:(v+216)%360,s:T.s,l:T.l})]}function W(h,T,v){T=T||6,v=v||30;var ee=H(h).toHsl(),ue=360/v,G=[H(h)];for(ee.h=(ee.h-(ue*T>>1)+720)%360;--T;)ee.h=(ee.h+ue)%360,G.push(H(ee));return G}function w(h,T){T=T||6;for(var v=H(h).toHsv(),ee=v.h,ue=v.s,G=v.v,he=[],_e=1/T;T--;)he.push(H({h:ee,s:ue,v:G})),G=(G+_e)%1;return he}H.mix=function(h,T,v){v=v===0?0:v||50;var ee=H(h).toRgb(),ue=H(T).toRgb(),G=v/100,he={r:(ue.r-ee.r)*G+ee.r,g:(ue.g-ee.g)*G+ee.g,b:(ue.b-ee.b)*G+ee.b,a:(ue.a-ee.a)*G+ee.a};return H(he)},H.readability=function(h,T){var v=H(h),ee=H(T);return(ve.max(v.getLuminance(),ee.getLuminance())+.05)/(ve.min(v.getLuminance(),ee.getLuminance())+.05)},H.isReadable=function(h,T,v){var ee=H.readability(h,T),ue,G;G=!1,ue=Q(v);switch(ue.level+ue.size){case"AAsmall":case"AAAlarge":G=ee>=4.5;break;case"AAlarge":G=ee>=3;break;case"AAAsmall":G=ee>=7;break}return G},H.mostReadable=function(h,T,v){var ee=null,ue=0,G,he,_e,Le;v=v||{},he=v.includeFallbackColors,_e=v.level,Le=v.size;for(var Ae=0;Ae<T.length;Ae++)G=H.readability(h,T[Ae]),G>ue&&(ue=G,ee=H(T[Ae]));return H.isReadable(h,ee,{level:_e,size:Le})||!he?ee:(v.includeFallbackColors=!1,H.mostReadable(h,["#fff","#000"],v))};var Y=H.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=H.hexNames=L(Y);function L(h){var T={};for(var v in h)h.hasOwnProperty(v)&&(T[h[v]]=v);return T}function S(h){return h=parseFloat(h),(isNaN(h)||h<0||h>1)&&(h=1),h}function c(h,T){C(h)&&(h="100%");var v=R(h);return h=P(T,M(0,parseFloat(h))),v&&(h=parseInt(h*T,10)/100),ve.abs(h-T)<1e-6?1:h%T/parseFloat(T)}function l(h){return P(1,M(0,h))}function p(h){return parseInt(h,16)}function C(h){return typeof h=="string"&&h.indexOf(".")!=-1&&parseFloat(h)===1}function R(h){return typeof h=="string"&&h.indexOf("%")!=-1}function q(h){return h.length==1?"0"+h:""+h}function ye(h){return h<=1&&(h=h*100+"%"),h}function oe(h){return ve.round(parseFloat(h)*255).toString(16)}function Se(h){return p(h)/255}var ne=function(){var h="[-\\+]?\\d+%?",T="[-\\+]?\\d*\\.\\d+%?",v="(?:"+T+")|(?:"+h+")",ee="[\\s|\\(]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")\\s*\\)?",ue="[\\s|\\(]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")\\s*\\)?";return{CSS_UNIT:new RegExp(v),rgb:new RegExp("rgb"+ee),rgba:new RegExp("rgba"+ue),hsl:new RegExp("hsl"+ee),hsla:new RegExp("hsla"+ue),hsv:new RegExp("hsv"+ee),hsva:new RegExp("hsva"+ue),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function fe(h){return!!ne.CSS_UNIT.exec(h)}function B(h){h=h.replace(te,"").replace(we,"").toLowerCase();var T=!1;if(Y[h])h=Y[h],T=!0;else if(h=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var v;return(v=ne.rgb.exec(h))?{r:v[1],g:v[2],b:v[3]}:(v=ne.rgba.exec(h))?{r:v[1],g:v[2],b:v[3],a:v[4]}:(v=ne.hsl.exec(h))?{h:v[1],s:v[2],l:v[3]}:(v=ne.hsla.exec(h))?{h:v[1],s:v[2],l:v[3],a:v[4]}:(v=ne.hsv.exec(h))?{h:v[1],s:v[2],v:v[3]}:(v=ne.hsva.exec(h))?{h:v[1],s:v[2],v:v[3],a:v[4]}:(v=ne.hex8.exec(h))?{r:p(v[1]),g:p(v[2]),b:p(v[3]),a:Se(v[4]),format:T?"name":"hex8"}:(v=ne.hex6.exec(h))?{r:p(v[1]),g:p(v[2]),b:p(v[3]),format:T?"name":"hex"}:(v=ne.hex4.exec(h))?{r:p(v[1]+""+v[1]),g:p(v[2]+""+v[2]),b:p(v[3]+""+v[3]),a:Se(v[4]+""+v[4]),format:T?"name":"hex8"}:(v=ne.hex3.exec(h))?{r:p(v[1]+""+v[1]),g:p(v[2]+""+v[2]),b:p(v[3]+""+v[3]),format:T?"name":"hex"}:!1}function Q(h){var T,v;return h=h||{level:"AA",size:"small"},T=(h.level||"AA").toUpperCase(),v=(h.size||"small").toLowerCase(),T!=="AA"&&T!=="AAA"&&(T="AA"),v!=="small"&&v!=="large"&&(v="small"),{level:T,size:v}}ot.exports?ot.exports=H:!(j=function(){return H}.call(ze,x,ze,ot),j!==void 0&&(ot.exports=j))})(Math)},bT9E:function(ot,ze,x){"use strict";x.d(ze,"a",function(){return ve});var j=x("VTBJ");function ve(te,we){var be=Object(j.a)({},te);return Array.isArray(we)&&we.forEach(function($){delete be[$]}),be}},c5Ni:function(ot,ze,x){},dejd:function(ot,ze,x){},dmUQ:function(ot,ze,x){"use strict";var j=x("Ff2n"),ve=x("rePB"),te=x("1OyB"),we=x("vuIU"),be=x("Ji7U"),$=x("md7G"),P=x("foSv"),M=x("q1tI"),b=x.n(M),H=x("TSYQ"),K=x.n(H),re=x("4IlW");function Ee(Z,y){var z=Object.keys(Z);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(Z);y&&(W=W.filter(function(w){return Object.getOwnPropertyDescriptor(Z,w).enumerable})),z.push.apply(z,W)}return z}function ie(Z){for(var y=1;y<arguments.length;y++){var z=arguments[y]!=null?arguments[y]:{};y%2?Ee(Object(z),!0).forEach(function(W){Object(ve.a)(Z,W,z[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(z)):Ee(Object(z)).forEach(function(W){Object.defineProperty(Z,W,Object.getOwnPropertyDescriptor(z,W))})}return Z}function U(Z){var y=F();return function(){var W=Object(P.a)(Z),w;if(y){var Y=Object(P.a)(this).constructor;w=Reflect.construct(W,arguments,Y)}else w=W.apply(this,arguments);return Object($.a)(this,w)}}function F(){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 I(){}function se(Z){Z.preventDefault()}var ae=function(y){return y.replace(/[^\w.-]+/g,"")},Re=200,He=600,de=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Oe=function(y){return y!=null},De=function(y,z){return z===y||typeof z=="number"&&typeof y=="number"&&isNaN(z)&&isNaN(y)},me=function(Z){Object(be.a)(z,Z);var y=U(z);function z(W){var w;Object(te.a)(this,z),w=y.call(this,W),w.onKeyDown=function(L){var S=w.props,c=S.onKeyDown,l=S.onPressEnter;if(L.keyCode===re.a.UP){var p=w.getRatio(L);w.up(L,p,null),w.stop()}else if(L.keyCode===re.a.DOWN){var C=w.getRatio(L);w.down(L,C,null),w.stop()}else L.keyCode===re.a.ENTER&&l&&l(L);if(w.recordCursorPosition(),w.lastKeyCode=L.keyCode,c){for(var R=arguments.length,q=new Array(R>1?R-1:0),ye=1;ye<R;ye++)q[ye-1]=arguments[ye];c.apply(void 0,[L].concat(q))}},w.onKeyUp=function(L){var S=w.props.onKeyUp;if(w.stop(),w.recordCursorPosition(),S){for(var c=arguments.length,l=new Array(c>1?c-1:0),p=1;p<c;p++)l[p-1]=arguments[p];S.apply(void 0,[L].concat(l))}},w.onChange=function(L){var S=w.props.onChange;w.state.focused&&(w.inputting=!0),w.rawInput=w.props.parser(w.getValueFromEvent(L)),w.setState({inputValue:w.rawInput}),S(w.toNumber(w.rawInput))},w.onMouseUp=function(){var L=w.props.onMouseUp;w.recordCursorPosition(),L&&L.apply(void 0,arguments)},w.onFocus=function(){var L;w.setState({focused:!0}),(L=w.props).onFocus.apply(L,arguments)},w.onBlur=function(){var L=w.props.onBlur;w.inputting=!1,w.setState({focused:!1});var S=w.getCurrentValidValue(w.state.inputValue),c=w.setValue(S,I);if(L){var l=w.input.value,p=w.getInputDisplayValue({focus:!1,value:c});w.input.value=p&&Number(p),L.apply(void 0,arguments),w.input.value=l}},w.getRatio=function(L){var S=1;return L.metaKey||L.ctrlKey?S=.1:L.shiftKey&&(S=10),S},w.getFullNum=function(L){return isNaN(L)?L:/e/i.test(String(L))?Number(L).toFixed(18).replace(/\.?0+$/,""):L},w.getPrecision=function(L){if(Oe(w.props.precision))return w.props.precision;var S=String(L);if(S.indexOf("e-")>=0)return parseInt(S.slice(S.indexOf("e-")+2),10);var c=0;return S.indexOf(".")>=0&&(c=S.length-S.indexOf(".")-1),c},w.getInputDisplayValue=function(L){var S=L||w.state,c=S.focused,l=S.inputValue,p=S.value,C;c?C=l:C=w.toPrecisionAsStep(p),C==null&&(C="");var R=w.formatWrapper(C);return Oe(w.props.decimalSeparator)&&(R=R.toString().replace(".",w.props.decimalSeparator)),R},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(L){}},w.restoreByAfter=function(L){if(L===void 0)return!1;var S=w.input.value,c=S.lastIndexOf(L);if(c===-1)return!1;var l=w.cursorBefore.length;return w.lastKeyCode===re.a.DELETE&&w.cursorBefore.charAt(l-1)===L[0]?(w.fixCaret(l,l),!0):c+L.length===S.length?(w.fixCaret(c,c),!0):!1},w.partRestoreByAfter=function(L){return L===void 0?!1:Array.prototype.some.call(L,function(S,c){var l=L.substring(c);return w.restoreByAfter(l)})},w.isNotCompleteNumber=function(L){return isNaN(L)||L===""||L===null||L&&L.toString().indexOf(".")===L.toString().length-1},w.stop=function(){w.autoStepTimer&&clearTimeout(w.autoStepTimer)},w.down=function(L,S,c){w.pressingUpOrDown=!0,w.step("down",L,S,c)},w.up=function(L,S,c){w.pressingUpOrDown=!0,w.step("up",L,S,c)},w.saveInput=function(L){w.input=L};var Y=W.value;Y===void 0&&(Y=W.defaultValue),w.state={focused:W.autoFocus};var N=w.getValidValue(w.toNumber(Y));return w.state=ie(ie({},w.state),{},{inputValue:w.toPrecisionAsStep(N),value:N}),w}return Object(we.a)(z,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(w){var Y=this.props,N=Y.value,L=Y.onChange,S=Y.max,c=Y.min,l=this.state.focused;if(w){if(!De(w.value,N)||!De(w.max,S)||!De(w.min,c)){var p=l?N:this.getValidValue(N),C;this.pressingUpOrDown?C=p:this.inputting?C=this.rawInput:C=this.toPrecisionAsStep(p),this.setState({value:p,inputValue:C})}var R="value"in this.props?N:this.state.value;"max"in this.props&&w.max!==S&&typeof R=="number"&&R>S&&L&&L(S),"min"in this.props&&w.min!==c&&typeof R=="number"&&R<c&&L&&L(c)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var q=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===re.a.BACKSPACE?q=this.cursorStart-1:this.lastKeyCode===re.a.DELETE&&(q=this.cursorStart):q=this.input.value.length,this.fixCaret(q,q)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case re.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case re.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ye){}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 Y=w;return Y===""?Y="":this.isNotCompleteNumber(parseFloat(Y))?Y=this.state.value:Y=this.getValidValue(Y),this.toNumber(Y)}},{key:"getValueFromEvent",value:function(w){var Y=w.target.value.trim().replace(/。/g,".");return Oe(this.props.decimalSeparator)&&(Y=Y.replace(this.props.decimalSeparator,".")),Y}},{key:"getValidValue",value:function(w){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,L=parseFloat(w);return isNaN(L)?w:(L<Y&&(L=Y),L>N&&(L=N),L)}},{key:"setValue",value:function(w,Y){var N=this.props.precision,L=this.isNotCompleteNumber(parseFloat(w))?null:parseFloat(w),S=this.state.value,c=S===void 0?null:S,l=this.state.inputValue,p=l===void 0?null:l,C=typeof L=="number"?L.toFixed(N):"".concat(L),R=L!==c||C!=="".concat(p);return"value"in this.props?(p=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:p},Y)):this.setState({value:L,inputValue:this.toPrecisionAsStep(w)},Y),R&&this.props.onChange(L),L}},{key:"getMaxPrecision",value:function(w){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.props,L=N.precision,S=N.step;if(Oe(L))return L;var c=this.getPrecision(Y),l=this.getPrecision(S),p=this.getPrecision(w);return w?Math.max(p,c+l):c+l}},{key:"getPrecisionFactor",value:function(w){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.getMaxPrecision(w,Y);return Math.pow(10,N)}},{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 Y=Math.abs(this.getMaxPrecision(w));return isNaN(Y)?w.toString():Number(w).toFixed(Y)}},{key:"toNumber",value:function(w){var Y=this.props.precision,N=this.state.focused,L=w&&w.length>16&&N;return this.isNotCompleteNumber(w)||L?w:Oe(Y)?Math.round(w*Math.pow(10,Y))/Math.pow(10,Y):Number(w)}},{key:"upStep",value:function(w,Y){var N=this.props.step,L=this.getPrecisionFactor(w,Y),S=Math.abs(this.getMaxPrecision(w,Y)),c=((L*w+L*N*Y)/L).toFixed(S);return this.toNumber(c)}},{key:"downStep",value:function(w,Y){var N=this.props.step,L=this.getPrecisionFactor(w,Y),S=Math.abs(this.getMaxPrecision(w,Y)),c=((L*w-L*N*Y)/L).toFixed(S);return this.toNumber(c)}},{key:"step",value:function(w,Y){var N=this,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=arguments.length>3?arguments[3]:void 0;this.stop(),Y&&(Y.persist(),Y.preventDefault());var c=this.props;if(c.disabled)return;var l=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(l))return;var p=this["".concat(w,"Step")](l,L),C=p>c.max||p<c.min;if(p>c.max?p=c.max:p<c.min&&(p=c.min),this.setValue(p,null),this.setState({focused:!0},function(){N.pressingUpOrDown=!1}),C)return;this.autoStepTimer=setTimeout(function(){N[w](Y,L,!0)},S?Re:He)}},{key:"fixCaret",value:function(w,Y){if(w===void 0||Y===void 0||!this.input||!this.input.value)return;try{var N=this.input.selectionStart,L=this.input.selectionEnd;(w!==N||Y!==L)&&this.input.setSelectionRange(w,Y)}catch(S){}}},{key:"render",value:function(){var w,Y=this.props,N=Y.prefixCls,L=Y.disabled,S=Y.readOnly,c=Y.useTouch,l=Y.autoComplete,p=Y.upHandler,C=Y.downHandler,R=Y.className,q=Y.max,ye=Y.min,oe=Y.style,Se=Y.title,ne=Y.onMouseEnter,fe=Y.onMouseLeave,B=Y.onMouseOver,Q=Y.onMouseOut,h=Y.required,T=Y.onClick,v=Y.tabIndex,ee=Y.type,ue=Y.placeholder,G=Y.id,he=Y.inputMode,_e=Y.pattern,Le=Y.step,Ae=Y.maxLength,pe=Y.autoFocus,Ce=Y.name,Ie=Y.onPaste,Ye=Y.onInput,Xe=Object(j.a)(Y,["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,nt=Ke.value,qe=Ke.focused,Ve=K()(N,(w={},Object(ve.a)(w,R,!!R),Object(ve.a)(w,"".concat(N,"-disabled"),L),Object(ve.a)(w,"".concat(N,"-focused"),qe),w)),xe={};Object.keys(Xe).forEach(function(E){(E.substr(0,5)==="data-"||E.substr(0,5)==="aria-"||E==="role")&&(xe[E]=Xe[E])});var rt=!S&&!L,Je=this.getInputDisplayValue(null),Te=(nt||nt===0)&&(isNaN(nt)||Number(nt)>=q),Fe=(nt||nt===0)&&(isNaN(nt)||Number(nt)<=ye),_=Te||L||S,O=Fe||L||S,D=K()("".concat(N,"-handler"),"".concat(N,"-handler-up"),Object(ve.a)({},"".concat(N,"-handler-up-disabled"),_)),f=K()("".concat(N,"-handler"),"".concat(N,"-handler-down"),Object(ve.a)({},"".concat(N,"-handler-down-disabled"),O)),m=c?{onTouchStart:_?I:this.up,onTouchEnd:this.stop}:{onMouseDown:_?I:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},g=c?{onTouchStart:O?I:this.down,onTouchEnd:this.stop}:{onMouseDown:O?I:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return b.a.createElement("div",{className:Ve,style:oe,title:Se,onMouseEnter:ne,onMouseLeave:fe,onMouseOver:B,onMouseOut:Q,onFocus:function(){return null},onBlur:function(){return null}},b.a.createElement("div",{className:"".concat(N,"-handler-wrap")},b.a.createElement("span",Object.assign({unselectable:"on"},m,{role:"button","aria-label":"Increase Value","aria-disabled":_,className:D}),p||b.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-up-inner"),onClick:se})),b.a.createElement("span",Object.assign({unselectable:"on"},g,{role:"button","aria-label":"Decrease Value","aria-disabled":O,className:f}),C||b.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-down-inner"),onClick:se}))),b.a.createElement("div",{className:"".concat(N,"-input-wrap")},b.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ye,"aria-valuemax":q,"aria-valuenow":nt,required:h,type:ee,placeholder:ue,onPaste:Ie,onClick:T,onMouseUp:this.onMouseUp,className:"".concat(N,"-input"),tabIndex:v,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:I,onKeyUp:rt?this.onKeyUp:I,autoFocus:pe,maxLength:Ae,readOnly:S,disabled:L,max:q,min:ye,step:Le,name:Ce,title:Se,id:G,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Je),pattern:_e,inputMode:he,onInput:Ye},xe))))}}]),z}(b.a.Component);me.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:de,min:-de,step:1,style:{},onChange:I,onKeyDown:I,onPressEnter:I,onFocus:I,onBlur:I,parser:ae,required:!1,autoComplete:"off"};var ge=me,le=ze.a=ge},h78n:function(ot,ze,x){"use strict";x.d(ze,"a",function(){return w});var j=x("q1tI"),ve=x.n(j),te=x("TSYQ"),we=x.n(te),be={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},$=function(L){var S=L.map(function(){return Object(j.useRef)()}),c=Object(j.useRef)();return Object(j.useEffect)(function(){var l=Date.now(),p=!1;Object.keys(S).forEach(function(C){var R=S[C].current;if(!R)return;p=!0;var q=R.style;q.transitionDuration=".3s, .3s, .3s, .06s",c.current&&l-c.current<100&&(q.transitionDuration="0s, 0s")}),p&&(c.current=Date.now())}),[S]};function P(){return P=Object.assign||function(N){for(var L=1;L<arguments.length;L++){var S=arguments[L];for(var c in S)Object.prototype.hasOwnProperty.call(S,c)&&(N[c]=S[c])}return N},P.apply(this,arguments)}function M(N,L){return Ee(N)||re(N,L)||H(N,L)||b()}function b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H(N,L){if(!N)return;if(typeof N=="string")return K(N,L);var S=Object.prototype.toString.call(N).slice(8,-1);if(S==="Object"&&N.constructor&&(S=N.constructor.name),S==="Map"||S==="Set")return Array.from(N);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return K(N,L)}function K(N,L){(L==null||L>N.length)&&(L=N.length);for(var S=0,c=new Array(L);S<L;S++)c[S]=N[S];return c}function re(N,L){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(N)))return;var S=[],c=!0,l=!1,p=void 0;try{for(var C=N[Symbol.iterator](),R;!(c=(R=C.next()).done)&&!(S.push(R.value),L&&S.length===L);c=!0);}catch(q){l=!0,p=q}finally{try{!c&&C.return!=null&&C.return()}finally{if(l)throw p}}return S}function Ee(N){if(Array.isArray(N))return N}function ie(N,L){if(N==null)return{};var S=U(N,L),c,l;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(N);for(l=0;l<p.length;l++){if(c=p[l],L.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(N,c))continue;S[c]=N[c]}}return S}function U(N,L){if(N==null)return{};var S={},c=Object.keys(N),l,p;for(p=0;p<c.length;p++){if(l=c[p],L.indexOf(l)>=0)continue;S[l]=N[l]}return S}var F=function(L){var S=L.className,c=L.percent,l=L.prefixCls,p=L.strokeColor,C=L.strokeLinecap,R=L.strokeWidth,q=L.style,ye=L.trailColor,oe=L.trailWidth,Se=L.transition,ne=ie(L,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ne.gapPosition;var fe=Array.isArray(c)?c:[c],B=Array.isArray(p)?p:[p],Q=$(fe),h=M(Q,1),T=h[0],v=R/2,ee=100-R/2,ue="M ".concat(C==="round"?v:0,",").concat(v,`
L `).concat(C==="round"?ee:100,",").concat(v),G="0 0 100 ".concat(R),he=0;return ve.a.createElement("svg",P({className:we()("".concat(l,"-line"),S),viewBox:G,preserveAspectRatio:"none",style:q},ne),ve.a.createElement("path",{className:"".concat(l,"-line-trail"),d:ue,strokeLinecap:C,stroke:ye,strokeWidth:oe||R,fillOpacity:"0"}),fe.map(function(_e,Le){var Ae={strokeDasharray:"".concat(_e,"px, 100px"),strokeDashoffset:"-".concat(he,"px"),transition:Se||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},pe=B[Le]||B[B.length-1];return he+=_e,ve.a.createElement("path",{key:Le,className:"".concat(l,"-line-path"),d:ue,strokeLinecap:C,stroke:pe,strokeWidth:R,fillOpacity:"0",ref:T[Le],style:Ae})}))};F.defaultProps=be;var I=F;function se(){return se=Object.assign||function(N){for(var L=1;L<arguments.length;L++){var S=arguments[L];for(var c in S)Object.prototype.hasOwnProperty.call(S,c)&&(N[c]=S[c])}return N},se.apply(this,arguments)}function ae(N,L){return De(N)||Oe(N,L)||He(N,L)||Re()}function Re(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(N,L){if(!N)return;if(typeof N=="string")return de(N,L);var S=Object.prototype.toString.call(N).slice(8,-1);if(S==="Object"&&N.constructor&&(S=N.constructor.name),S==="Map"||S==="Set")return Array.from(N);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return de(N,L)}function de(N,L){(L==null||L>N.length)&&(L=N.length);for(var S=0,c=new Array(L);S<L;S++)c[S]=N[S];return c}function Oe(N,L){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(N)))return;var S=[],c=!0,l=!1,p=void 0;try{for(var C=N[Symbol.iterator](),R;!(c=(R=C.next()).done)&&!(S.push(R.value),L&&S.length===L);c=!0);}catch(q){l=!0,p=q}finally{try{!c&&C.return!=null&&C.return()}finally{if(l)throw p}}return S}function De(N){if(Array.isArray(N))return N}function me(N,L){if(N==null)return{};var S=ge(N,L),c,l;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(N);for(l=0;l<p.length;l++){if(c=p[l],L.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(N,c))continue;S[c]=N[c]}}return S}function ge(N,L){if(N==null)return{};var S={},c=Object.keys(N),l,p;for(p=0;p<c.length;p++){if(l=c[p],L.indexOf(l)>=0)continue;S[l]=N[l]}return S}var le=0;function Z(N){return+N.replace("%","")}function y(N){return Array.isArray(N)?N:[N]}function z(N,L,S,c){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,p=arguments.length>5?arguments[5]:void 0,C=50-c/2,R=0,q=-C,ye=0,oe=-2*C;switch(p){case"left":R=-C,q=0,ye=2*C,oe=0;break;case"right":R=C,q=0,ye=-2*C,oe=0;break;case"bottom":q=C,oe=2*C;break;default:}var Se="M 50,50 m ".concat(R,",").concat(q,`
a `).concat(C,",").concat(C," 0 1 1 ").concat(ye,",").concat(-oe,`
a `).concat(C,",").concat(C," 0 1 1 ").concat(-ye,",").concat(oe),ne=Math.PI*2*C,fe={stroke:S,strokeDasharray:"".concat(L/100*(ne-l),"px ").concat(ne,"px"),strokeDashoffset:"-".concat(l/2+N/100*(ne-l),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:Se,pathStyle:fe}}var W=function(L){var S=L.prefixCls,c=L.strokeWidth,l=L.trailWidth,p=L.gapDegree,C=L.gapPosition,R=L.trailColor,q=L.strokeLinecap,ye=L.style,oe=L.className,Se=L.strokeColor,ne=L.percent,fe=me(L,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),B=Object(j.useMemo)(function(){return le+=1,le},[]),Q=z(0,100,R,c,p,C),h=Q.pathString,T=Q.pathStyle,v=y(ne),ee=y(Se),ue=ee.find(function(Ae){return Object.prototype.toString.call(Ae)==="[object Object]"}),G=$(v),he=ae(G,1),_e=he[0],Le=function(){var pe=0;return v.map(function(Ce,Ie){var Ye=ee[Ie]||ee[ee.length-1],Xe=Object.prototype.toString.call(Ye)==="[object Object]"?"url(#".concat(S,"-gradient-").concat(B,")"):"",Ke=z(pe,Ce,Ye,c,p,C);return pe+=Ce,ve.a.createElement("path",{key:Ie,className:"".concat(S,"-circle-path"),d:Ke.pathString,stroke:Xe,strokeLinecap:q,strokeWidth:c,opacity:Ce===0?0:1,fillOpacity:"0",style:Ke.pathStyle,ref:_e[Ie]})})};return ve.a.createElement("svg",se({className:we()("".concat(S,"-circle"),oe),viewBox:"0 0 100 100",style:ye},fe),ue&&ve.a.createElement("defs",null,ve.a.createElement("linearGradient",{id:"".concat(S,"-gradient-").concat(B),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ue).sort(function(Ae,pe){return Z(Ae)-Z(pe)}).map(function(Ae,pe){return ve.a.createElement("stop",{key:pe,offset:Ae,stopColor:ue[Ae]})}))),ve.a.createElement("path",{className:"".concat(S,"-circle-trail"),d:h,stroke:R,strokeLinecap:q,strokeWidth:l||c,fillOpacity:"0",style:T}),Le().reverse())};W.defaultProps=be;var w=W,Y={Line:I,Circle:w}},iIVh:function(ot,ze,x){},kSUc:function(ot,ze,x){},lZu9:function(ot,ze,x){(function(j){j(x("VrN/"),x("1eCo"),x("8EBN"))})(function(j){"use strict";j.defineMode("markdown",function(ve,te){var we=j.getMode(ve,"text/html"),be=we.name=="null";function $(c){if(j.findModeByName){var l=j.findModeByName(c);l&&(c=l.mime||l.mimes[0])}var p=j.getMode(ve,c);return p.name=="null"?null:p}te.highlightFormatting===void 0&&(te.highlightFormatting=!1),te.maxBlockquoteDepth===void 0&&(te.maxBlockquoteDepth=0),te.taskLists===void 0&&(te.taskLists=!1),te.strikethrough===void 0&&(te.strikethrough=!1),te.emoji===void 0&&(te.emoji=!1),te.fencedCodeBlockHighlighting===void 0&&(te.fencedCodeBlockHighlighting=!0),te.fencedCodeBlockDefaultMode===void 0&&(te.fencedCodeBlockDefaultMode="text/plain"),te.xml===void 0&&(te.xml=!0),te.tokenTypeOverrides===void 0&&(te.tokenTypeOverrides={});var P={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 M in P)P.hasOwnProperty(M)&&te.tokenTypeOverrides[M]&&(P[M]=te.tokenTypeOverrides[M]);var b=/^([*\-_])(?:\s*\1){2,}\s*$/,H=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,K=/^\[(x| )\](?=\s)/i,re=te.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ee=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ie=/^[^#!\[\]*_\\<>` "'(~:]+/,U=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,F=/^\s*\[[^\]]+?\]:.*$/,I=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function ae(c,l,p){return l.f=l.inline=p,p(c,l)}function Re(c,l,p){return l.f=l.block=p,p(c,l)}function He(c){return!c||!/\S/.test(c.string)}function de(c){if(c.linkTitle=!1,c.linkHref=!1,c.linkText=!1,c.em=!1,c.strong=!1,c.strikethrough=!1,c.quote=0,c.indentedCode=!1,c.f==De){var l=be;if(!l){var p=j.innerMode(we,c.htmlState);l=p.mode.name=="xml"&&p.state.tagStart===null&&!p.state.context&&p.state.tokenize.isInText}l&&(c.f=Z,c.block=Oe,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function Oe(c,l){var p=c.column()===l.indentation,C=He(l.prevLine.stream),R=l.indentedCode,q=l.prevLine.hr,ye=l.list!==!1,oe=(l.listStack[l.listStack.length-1]||0)+3;l.indentedCode=!1;var Se=l.indentation;if(l.indentationDiff===null&&(l.indentationDiff=l.indentation,ye)){for(l.list=null;Se<l.listStack[l.listStack.length-1];)l.listStack.pop(),l.listStack.length?l.indentation=l.listStack[l.listStack.length-1]:l.list=!1;l.list!==!1&&(l.indentationDiff=Se-l.listStack[l.listStack.length-1])}var ne=!C&&!q&&!l.prevLine.header&&(!ye||!R)&&!l.prevLine.fencedCodeEnd,fe=(l.list===!1||q||C)&&l.indentation<=oe&&c.match(b),B=null;if(l.indentationDiff>=4&&(R||l.prevLine.fencedCodeEnd||l.prevLine.header||C))return c.skipToEnd(),l.indentedCode=!0,P.code;if(c.eatSpace())return null;if(p&&l.indentation<=oe&&(B=c.match(re))&&B[1].length<=6)return l.quote=0,l.header=B[1].length,l.thisLine.header=!0,te.highlightFormatting&&(l.formatting="header"),l.f=l.inline,ge(l);if(l.indentation<=oe&&c.eat(">"))return l.quote=p?1:l.quote+1,te.highlightFormatting&&(l.formatting="quote"),c.eatSpace(),ge(l);if(!fe&&!l.setext&&p&&l.indentation<=oe&&(B=c.match(H))){var Q=B[1]?"ol":"ul";return l.indentation=Se+c.current().length,l.list=!0,l.quote=0,l.listStack.push(l.indentation),l.em=!1,l.strong=!1,l.code=!1,l.strikethrough=!1,te.taskLists&&c.match(K,!1)&&(l.taskList=!0),l.f=l.inline,te.highlightFormatting&&(l.formatting=["list","list-"+Q]),ge(l)}else{if(p&&l.indentation<=oe&&(B=c.match(U,!0)))return l.quote=0,l.fencedEndRE=new RegExp(B[1]+"+ *$"),l.localMode=te.fencedCodeBlockHighlighting&&$(B[2]||te.fencedCodeBlockDefaultMode),l.localMode&&(l.localState=j.startState(l.localMode)),l.f=l.block=me,te.highlightFormatting&&(l.formatting="code-block"),l.code=-1,ge(l);if(l.setext||(!ne||!ye)&&!l.quote&&l.list===!1&&!l.code&&!fe&&!F.test(c.string)&&(B=c.lookAhead(1))&&(B=B.match(Ee)))return l.setext?(l.header=l.setext,l.setext=0,c.skipToEnd(),te.highlightFormatting&&(l.formatting="header")):(l.header=B[0].charAt(0)=="="?1:2,l.setext=l.header),l.thisLine.header=!0,l.f=l.inline,ge(l);if(fe)return c.skipToEnd(),l.hr=!0,l.thisLine.hr=!0,P.hr;if(c.peek()==="[")return ae(c,l,Y)}return ae(c,l,l.inline)}function De(c,l){var p=we.token(c,l.htmlState);if(!be){var C=j.innerMode(we,l.htmlState);(C.mode.name=="xml"&&C.state.tagStart===null&&!C.state.context&&C.state.tokenize.isInText||l.md_inside&&c.current().indexOf(">")>-1)&&(l.f=Z,l.block=Oe,l.htmlState=null)}return p}function me(c,l){var p=l.listStack[l.listStack.length-1]||0,C=l.indentation<p,R=p+3;if(l.fencedEndRE&&l.indentation<=R&&(C||c.match(l.fencedEndRE))){te.highlightFormatting&&(l.formatting="code-block");var q;return C||(q=ge(l)),l.localMode=l.localState=null,l.block=Oe,l.f=Z,l.fencedEndRE=null,l.code=0,l.thisLine.fencedCodeEnd=!0,C?Re(c,l,l.block):q}else return l.localMode?l.localMode.token(c,l.localState):(c.skipToEnd(),P.code)}function ge(c){var l=[];if(c.formatting){l.push(P.formatting),typeof c.formatting=="string"&&(c.formatting=[c.formatting]);for(var p=0;p<c.formatting.length;p++)l.push(P.formatting+"-"+c.formatting[p]),c.formatting[p]==="header"&&l.push(P.formatting+"-"+c.formatting[p]+"-"+c.header),c.formatting[p]==="quote"&&(!te.maxBlockquoteDepth||te.maxBlockquoteDepth>=c.quote?l.push(P.formatting+"-"+c.formatting[p]+"-"+c.quote):l.push("error"))}if(c.taskOpen)return l.push("meta"),l.length?l.join(" "):null;if(c.taskClosed)return l.push("property"),l.length?l.join(" "):null;if(c.linkHref?l.push(P.linkHref,"url"):(c.strong&&l.push(P.strong),c.em&&l.push(P.em),c.strikethrough&&l.push(P.strikethrough),c.emoji&&l.push(P.emoji),c.linkText&&l.push(P.linkText),c.code&&l.push(P.code),c.image&&l.push(P.image),c.imageAltText&&l.push(P.imageAltText,"link"),c.imageMarker&&l.push(P.imageMarker)),c.header&&l.push(P.header,P.header+"-"+c.header),c.quote&&(l.push(P.quote),!te.maxBlockquoteDepth||te.maxBlockquoteDepth>=c.quote?l.push(P.quote+"-"+c.quote):l.push(P.quote+"-"+te.maxBlockquoteDepth)),c.list!==!1){var C=(c.listStack.length-1)%3;C?C===1?l.push(P.list2):l.push(P.list3):l.push(P.list1)}return c.trailingSpaceNewLine?l.push("trailing-space-new-line"):c.trailingSpace&&l.push("trailing-space-"+(c.trailingSpace%2?"a":"b")),l.length?l.join(" "):null}function le(c,l){return c.match(ie,!0)?ge(l):void 0}function Z(c,l){var p=l.text(c,l);if(typeof p!="undefined")return p;if(l.list)return l.list=null,ge(l);if(l.taskList){var C=c.match(K,!0)[1]===" ";return C?l.taskOpen=!0:l.taskClosed=!0,te.highlightFormatting&&(l.formatting="task"),l.taskList=!1,ge(l)}if(l.taskOpen=!1,l.taskClosed=!1,l.header&&c.match(/^#+$/,!0))return te.highlightFormatting&&(l.formatting="header"),ge(l);var R=c.next();if(l.linkTitle){l.linkTitle=!1;var q=R;R==="("&&(q=")"),q=(q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ye="^\\s*(?:[^"+q+"\\\\]+|\\\\\\\\|\\\\.)"+q;if(c.match(new RegExp(ye),!0))return P.linkHref}if(R==="`"){var oe=l.formatting;te.highlightFormatting&&(l.formatting="code"),c.eatWhile("`");var Se=c.current().length;if(l.code==0&&(!l.quote||Se==1))return l.code=Se,ge(l);if(Se==l.code){var ne=ge(l);return l.code=0,ne}else return l.formatting=oe,ge(l)}else if(l.code)return ge(l);if(R==="\\"&&(c.next(),te.highlightFormatting)){var fe=ge(l),B=P.formatting+"-escape";return fe?fe+" "+B:B}if(R==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return l.imageMarker=!0,l.image=!0,te.highlightFormatting&&(l.formatting="image"),ge(l);if(R==="["&&l.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return l.imageMarker=!1,l.imageAltText=!0,te.highlightFormatting&&(l.formatting="image"),ge(l);if(R==="]"&&l.imageAltText){te.highlightFormatting&&(l.formatting="image");var fe=ge(l);return l.imageAltText=!1,l.image=!1,l.inline=l.f=z,fe}if(R==="["&&!l.image)return l.linkText&&c.match(/^.*?\]/)||(l.linkText=!0,te.highlightFormatting&&(l.formatting="link")),ge(l);if(R==="]"&&l.linkText){te.highlightFormatting&&(l.formatting="link");var fe=ge(l);return l.linkText=!1,l.inline=l.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?z:Z,fe}if(R==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=y,te.highlightFormatting&&(l.formatting="link");var fe=ge(l);return fe?fe+=" ":fe="",fe+P.linkInline}if(R==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=y,te.highlightFormatting&&(l.formatting="link");var fe=ge(l);return fe?fe+=" ":fe="",fe+P.linkEmail}if(te.xml&&R==="<"&&c.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Q=c.string.indexOf(">",c.pos);if(Q!=-1){var h=c.string.substring(c.start,Q);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(h)&&(l.md_inside=!0)}return c.backUp(1),l.htmlState=j.startState(we),Re(c,l,De)}if(te.xml&&R==="<"&&c.match(/^\/\w*?>/))return l.md_inside=!1,"tag";if(R==="*"||R==="_"){for(var T=1,v=c.pos==1?" ":c.string.charAt(c.pos-2);T<3&&c.eat(R);)T++;var ee=c.peek()||" ",ue=!/\s/.test(ee)&&(!I.test(ee)||/\s/.test(v)||I.test(v)),G=!/\s/.test(v)&&(!I.test(v)||/\s/.test(ee)||I.test(ee)),he=null,_e=null;if(T%2&&(!l.em&&ue&&(R==="*"||!G||I.test(v))?he=!0:l.em==R&&G&&(R==="*"||!ue||I.test(ee))&&(he=!1)),T>1&&(!l.strong&&ue&&(R==="*"||!G||I.test(v))?_e=!0:l.strong==R&&G&&(R==="*"||!ue||I.test(ee))&&(_e=!1)),_e!=null||he!=null){te.highlightFormatting&&(l.formatting=he==null?"strong":_e==null?"em":"strong em"),he===!0&&(l.em=R),_e===!0&&(l.strong=R);var ne=ge(l);return he===!1&&(l.em=!1),_e===!1&&(l.strong=!1),ne}}else if(R===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return ge(l);c.backUp(1)}if(te.strikethrough){if(R==="~"&&c.eatWhile(R)){if(l.strikethrough){te.highlightFormatting&&(l.formatting="strikethrough");var ne=ge(l);return l.strikethrough=!1,ne}else if(c.match(/^[^\s]/,!1))return l.strikethrough=!0,te.highlightFormatting&&(l.formatting="strikethrough"),ge(l)}else if(R===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return ge(l);c.backUp(2)}}if(te.emoji&&R===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){l.emoji=!0,te.highlightFormatting&&(l.formatting="emoji");var Le=ge(l);return l.emoji=!1,Le}return R===" "&&(c.match(/^ +$/,!1)?l.trailingSpace++:l.trailingSpace&&(l.trailingSpaceNewLine=!0)),ge(l)}function y(c,l){var p=c.next();if(p===">"){l.f=l.inline=Z,te.highlightFormatting&&(l.formatting="link");var C=ge(l);return C?C+=" ":C="",C+P.linkInline}return c.match(/^[^>]+/,!0),P.linkInline}function z(c,l){if(c.eatSpace())return null;var p=c.next();return p==="("||p==="["?(l.f=l.inline=w(p==="("?")":"]"),te.highlightFormatting&&(l.formatting="link-string"),l.linkHref=!0,ge(l)):"error"}var W={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(c){return function(l,p){var C=l.next();if(C===c){p.f=p.inline=Z,te.highlightFormatting&&(p.formatting="link-string");var R=ge(p);return p.linkHref=!1,R}return l.match(W[c]),p.linkHref=!0,ge(p)}}function Y(c,l){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(l.f=N,c.next(),te.highlightFormatting&&(l.formatting="link"),l.linkText=!0,ge(l)):ae(c,l,Z)}function N(c,l){if(c.match(/^\]:/,!0)){l.f=l.inline=L,te.highlightFormatting&&(l.formatting="link");var p=ge(l);return l.linkText=!1,p}return c.match(/^([^\]\\]|\\.)+/,!0),P.linkText}function L(c,l){return c.eatSpace()?null:(c.match(/^[^\s]+/,!0),c.peek()===void 0?l.linkTitle=!0:c.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),l.f=l.inline=Z,P.linkHref+" url")}var S={startState:function(){return{f:Oe,prevLine:{stream:null},thisLine:{stream:null},block:Oe,htmlState:null,indentation:0,inline:Z,text:le,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(c){return{f:c.f,prevLine:c.prevLine,thisLine:c.thisLine,block:c.block,htmlState:c.htmlState&&j.copyState(we,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?j.copyState(c.localMode,c.localState):null,inline:c.inline,text:c.text,formatting:!1,linkText:c.linkText,linkTitle:c.linkTitle,linkHref:c.linkHref,code:c.code,em:c.em,strong:c.strong,strikethrough:c.strikethrough,emoji:c.emoji,header:c.header,setext:c.setext,hr:c.hr,taskList:c.taskList,list:c.list,listStack:c.listStack.slice(0),quote:c.quote,indentedCode:c.indentedCode,trailingSpace:c.trailingSpace,trailingSpaceNewLine:c.trailingSpaceNewLine,md_inside:c.md_inside,fencedEndRE:c.fencedEndRE}},token:function(c,l){if(l.formatting=!1,c!=l.thisLine.stream){if(l.header=0,l.hr=!1,c.match(/^\s*$/,!0))return de(l),null;if(l.prevLine=l.thisLine,l.thisLine={stream:c},l.taskList=!1,l.trailingSpace=0,l.trailingSpaceNewLine=!1,!l.localState&&(l.f=l.block,l.f!=De)){var p=c.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(l.indentation=p,l.indentationDiff=null,p>0)return null}}return l.f(c,l)},innerMode:function(c){return c.block==De?{state:c.htmlState,mode:we}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:S}},indent:function(c,l,p){return c.block==De&&we.indent?we.indent(c.htmlState,l,p):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,l,p):j.Pass},blankLine:de,getType:ge,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return S},"xml"),j.defineMIME("text/markdown","markdown"),j.defineMIME("text/x-markdown","markdown")})},nojB:function(ot,ze,x){"use strict";x.r(ze);var j=x("T2oS"),ve=x("W9HT"),te=x("9og8"),we=x("tJVT"),be=x("k1fw"),$=x("WmNS"),P=x.n($),M=x("q1tI"),b=x.n(M),H=x("X0ci"),K=x("iIVh"),re=x("Ty5D"),Ee=x("55Ip"),ie=x("+L6B"),U=x("2/Rp"),F=x("5NDa"),I=x("5rEg"),se=x("2qtc"),ae=x("kLXV"),Re=x("miYZ"),He=x("tsqr"),de=x("PpiC"),Oe=x("y8nQ"),De=x("Vl3Y"),me=x("DZo9"),ge=x("8z0m"),le=x("sRBo"),Z=x("kaz8"),y=x("LtfV"),z=x("m3rI"),W=x("Ot1p"),w=Z.a.Group,Y=ge.a.Dragger;function N(R,q){var ye=new FileReader;ye.addEventListener("load",function(){return q(ye.result)}),ye.readAsDataURL(R)}var L=function(R){var q=R.callback,ye=R.tags,oe=ye===void 0?[]:ye,Se=R.initialValues,ne=Se===void 0?{}:Se,fe=R.removeAttachment,B=Object(M.useState)(""),Q=Object(we.a)(B,2),h=Q[0],T=Q[1],v=De.a.useForm(),ee=Object(we.a)(v,1),ue=ee[0];function G(pe){var Ce=pe.cover_id,Ie=pe.attachment_ids,Ye=Object(de.a)(pe,["cover_id","attachment_ids"]);q(Object(be.a)(Object(be.a)({},Ye),{},{cover_id:Ce==null?void 0:Ce.map(function(Xe){return Xe.response?Xe.response.id:Xe.uid})[(Ce==null?void 0:Ce.length)-1],attachment_ids:Ie?Ie==null?void 0:Ie.map(function(Xe){return Xe.response?Xe.response.id:Xe.uid}):[]}))}function he(pe){return Array.isArray(pe)?pe:pe&&pe.fileList}var _e={multiple:!0,beforeUpload:function(Ce){var Ie=Ce.size/1024/1024<100;if(!Ie)return He.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(100MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"),Ie},action:"".concat(z.a.API_SERVER,"/api/attachments.json"),onRemove:function(Ce){ae.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){return fe(Ce.response?Ce.response.id:Ce.uid)},onCancel:function(){return!1}})}};function Le(pe){pe.file.status==="done"&&N(pe.file.originFileObj,function(Ce){return T(Ce)})}var Ae={showUploadList:!1,withCredentials:!0,action:"".concat(z.a.API_SERVER,"/api/attachments.json"),onChange:Le};return Object(M.useEffect)(function(){ne.title&&(ue.setFieldsValue(ne),ne.cover_id.length>0&&T(z.a.IMG_SERVER+ne.cover_id[0].url))},[ne]),b.a.createElement(De.a,{form:ue,initialValues:ne,className:"moop-panel",onFinish:G},b.a.createElement(De.a.Item,{label:"\u6807\u9898",name:"title",extra:b.a.createElement("p",{className:"tip"},"\u7B80\u660E\u627C\u8981\u4ECB\u7ECD\u6587\u6863/\u89C6\u9891\u6240\u5305\u542B\u7684\u4E3B\u8981\u7684\u5185\u5BB9"),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},b.a.createElement(I.a,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),b.a.createElement("div",{className:"flex-container"},b.a.createElement(De.a.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},b.a.createElement(I.a,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),b.a.createElement(De.a.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},b.a.createElement(I.a,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),b.a.createElement(De.a.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},b.a.createElement(w,null,oe.map(function(pe){return b.a.createElement(Z.a,{key:pe.id,value:pe.id}," ",pe.name," ")}))),b.a.createElement(De.a.Item,{name:"publish",valuePropName:"checked"},b.a.createElement(Z.a,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),b.a.createElement(De.a.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},b.a.createElement(W.a,{id:"moop_cases_content",height:400})),b.a.createElement(De.a.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:he},b.a.createElement(Y,_e,b.a.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),b.a.createElement("p",{className:"c-grey-c"},"\u4ECE\u6211\u7684\u7535\u8111\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u6863\uFF1A\u6309\u4F4FCTRL\u53EF\u4EE5\u4E0A\u4F20\u591A\u4EFD\u6587\u6863\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\uFF1A100MB"))),b.a.createElement(De.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:he,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},b.a.createElement(ge.a,Ae,h?b.a.createElement("img",{src:h,width:120}):b.a.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",b.a.createElement(y.a,null)," "))),b.a.createElement("div",{className:"desc"},b.a.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),b.a.createElement("p",null," \u5E73\u53F0\u7BA1\u7406\u5458\u5C06\u5BF9\u6BCF\u5929\u65B0\u4E0A\u4F20\u7684\u6587\u6863\u8FDB\u884C\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u7684\u6587\u6863\u5C06\u516C\u5F00\u663E\u793A\uFF0C\u5426\u5219\u5C06\u79C1\u6709\u5316\u6216\u79FB\u9664 ")),b.a.createElement("div",{className:"desc"},b.a.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),b.a.createElement("ul",{style:{padding:0}},b.a.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),b.a.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",b.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",b.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34798",target:"_blank"},"\u6848\u4F8B\u4F7F\u7528\u8BF4\u660E\u4E66"),"\u4EE5\u53CA\u5176\u4ED6\u8D44\u6599\u7B49\uFF0C\u4E0A\u4F20\u652F\u6301\u7684\u6587\u4EF6\u6700\u5927\u5BB9\u91CF\uFF1A100MB\uFF1B"),b.a.createElement("li",null,"3.\u8BF7\u786E\u4FDD\u4E0A\u4F20\u5185\u5BB9\u65E0\u4FB5\u6743\u6216\u8FDD\u53CD\u56FD\u5BB6\u5173\u4E8E\u4E92\u8054\u7F51\u653F\u7B56\u7684\u4E0D\u826F\u884C\u4E3A\uFF1B"),b.a.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),b.a.createElement(De.a.Item,{style:{marginTop:10}},b.a.createElement(U.a,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},S=x("wzkS"),c={loading:!1,data:{},tags:[]},l;(function(R){R[R.GET_DATA=0]="GET_DATA",R[R.SET_LOADING=1]="SET_LOADING",R[R.GET_TAGS=2]="GET_TAGS"})(l||(l={}));function p(R,q){switch(q.type){case l.GET_DATA:return Object(be.a)(Object(be.a)({},R),q.payload);case l.GET_TAGS:return Object(be.a)(Object(be.a)({},R),{},{tags:q.payload});case l.SET_LOADING:return Object(be.a)(Object(be.a)({},R),{},{loading:q.payload});default:throw new Error}}var C=ze.default=function(){var R=Object(re.i)(),q=R.caseId,ye=Object(re.g)(),oe=Object(M.useReducer)(p,c),Se=Object(we.a)(oe,2),ne=Se[0],fe=Se[1],B=ne.loading,Q=ne.tags,h=ne.data;Object(M.useEffect)(function(){function ue(){return G.apply(this,arguments)}function G(){return G=Object(te.a)(P.a.mark(function he(){var _e;return P.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Ae.next=2,Object(S.b)();case 2:_e=Ae.sent,fe({type:l.GET_TAGS,payload:_e.library_tags});case 4:case"end":return Ae.stop()}},he)})),G.apply(this,arguments)}ue()},[]),Object(M.useEffect)(function(){var ue=!1;function G(){return he.apply(this,arguments)}function he(){return he=Object(te.a)(P.a.mark(function _e(){var Le,Ae,pe,Ce,Ie,Ye,Xe,Ke,nt;return P.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return fe({type:l.SET_LOADING,payload:!1}),Ve.next=3,Object(S.c)(q);case 3:Le=Ve.sent,Ae=Le.author_name,pe=Le.author_school_name,Ce=Le.content,Ie=Le.cover,Ye=Le.attachments,Xe=Le.status,Ke=Le.title,nt=Le.tags,ue||(Le.status===404?ye.push("/moop_cases"):fe({type:l.GET_DATA,payload:{data:{title:Ke,author_name:Ae,author_school_name:pe,content:Ce,tag_ids:nt.map(function(xe){return xe.id}),publish:Xe==="published",attachment_ids:Ye.map(function(xe){return{uid:xe.id,id:xe.id,name:xe.title,url:xe.url,filesize:xe.filesize,status:"done"}}),cover_id:Ie!=null&&Ie.id?[{uid:Ie==null?void 0:Ie.id,id:Ie==null?void 0:Ie.id,name:Ie==null?void 0:Ie.title,url:Ie==null?void 0:Ie.url,filesize:Ie==null?void 0:Ie.filesize,status:"done"}]:[]},loading:!1}}));case 6:case"end":return Ve.stop()}},_e)})),he.apply(this,arguments)}return!ue&&q&&G(),function(){ue=!0}},[q]);function T(ue){return v.apply(this,arguments)}function v(){return v=Object(te.a)(P.a.mark(function ue(G){var he,_e;return P.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(!q){Ae.next=6;break}return Ae.next=3,Object(S.e)(q,G);case 3:ye.push("/moop_cases/".concat(q,"/publish-success")),Ae.next=11;break;case 6:return Ae.next=8,Object(S.a)(G);case 8:he=Ae.sent,_e=he.id,_e&&ye.push("/moop_cases/".concat(_e,"/publish-success"));case 11:case"end":return Ae.stop()}},ue)})),v.apply(this,arguments)}var ee={initialValues:h,tags:Q,removeAttachment:S.d,callback:T};return b.a.createElement(ve.a,{spinning:B,delay:500},b.a.createElement("div",{className:"moop-info"},b.a.createElement("div",{className:"crumb"},b.a.createElement(Ee.a,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),b.a.createElement("span",null,"\u65B0\u5EFA")),b.a.createElement("div",{className:"title"},b.a.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),b.a.createElement(Ee.a,{to:"/moop_cases"},"\u8FD4\u56DE")),b.a.createElement(L,ee)))}},osHv:function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){"use strict";var ve=j.Pos;function te(I,se){return I.line-se.line||I.ch-se.ch}var we="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",be=we+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",$=new RegExp("<(/?)(["+we+"]["+be+"]*)","g");function P(I,se,ae,Re){this.line=se,this.ch=ae,this.cm=I,this.text=I.getLine(se),this.min=Re?Math.max(Re.from,I.firstLine()):I.firstLine(),this.max=Re?Math.min(Re.to-1,I.lastLine()):I.lastLine()}function M(I,se){var ae=I.cm.getTokenTypeAt(ve(I.line,se));return ae&&/\btag\b/.test(ae)}function b(I){return I.line>=I.max?void 0:(I.ch=0,I.text=I.cm.getLine(++I.line),!0)}function H(I){return I.line<=I.min?void 0:(I.text=I.cm.getLine(--I.line),I.ch=I.text.length,!0)}function K(I){for(;;){var se=I.text.indexOf(">",I.ch);if(se==-1){if(b(I))continue;return}if(!M(I,se+1)){I.ch=se+1;continue}var ae=I.text.lastIndexOf("/",se),Re=ae>-1&&!/\S/.test(I.text.slice(ae+1,se));return I.ch=se+1,Re?"selfClose":"regular"}}function re(I){for(;;){var se=I.ch?I.text.lastIndexOf("<",I.ch-1):-1;if(se==-1){if(H(I))continue;return}if(!M(I,se+1)){I.ch=se;continue}$.lastIndex=se,I.ch=se;var ae=$.exec(I.text);if(ae&&ae.index==se)return ae}}function Ee(I){for(;;){$.lastIndex=I.ch;var se=$.exec(I.text);if(!se){if(b(I))continue;return}if(!M(I,se.index+1)){I.ch=se.index+1;continue}return I.ch=se.index+se[0].length,se}}function ie(I){for(;;){var se=I.ch?I.text.lastIndexOf(">",I.ch-1):-1;if(se==-1){if(H(I))continue;return}if(!M(I,se+1)){I.ch=se;continue}var ae=I.text.lastIndexOf("/",se),Re=ae>-1&&!/\S/.test(I.text.slice(ae+1,se));return I.ch=se+1,Re?"selfClose":"regular"}}function U(I,se){for(var ae=[];;){var Re=Ee(I),He,de=I.line,Oe=I.ch-(Re?Re[0].length:0);if(!Re||!(He=K(I)))return;if(He=="selfClose")continue;if(Re[1]){for(var De=ae.length-1;De>=0;--De)if(ae[De]==Re[2]){ae.length=De;break}if(De<0&&(!se||se==Re[2]))return{tag:Re[2],from:ve(de,Oe),to:ve(I.line,I.ch)}}else ae.push(Re[2])}}function F(I,se){for(var ae=[];;){var Re=ie(I);if(!Re)return;if(Re=="selfClose"){re(I);continue}var He=I.line,de=I.ch,Oe=re(I);if(!Oe)return;if(Oe[1])ae.push(Oe[2]);else{for(var De=ae.length-1;De>=0;--De)if(ae[De]==Oe[2]){ae.length=De;break}if(De<0&&(!se||se==Oe[2]))return{tag:Oe[2],from:ve(I.line,I.ch),to:ve(He,de)}}}}j.registerHelper("fold","xml",function(I,se){for(var ae=new P(I,se.line,0);;){var Re=Ee(ae);if(!Re||ae.line!=se.line)return;var He=K(ae);if(!He)return;if(!Re[1]&&He!="selfClose"){var de=ve(ae.line,ae.ch),Oe=U(ae,Re[2]);return Oe&&te(Oe.from,de)>0?{from:de,to:Oe.from}:null}}}),j.findMatchingTag=function(I,se,ae){var Re=new P(I,se.line,se.ch,ae);if(Re.text.indexOf(">")==-1&&Re.text.indexOf("<")==-1)return;var He=K(Re),de=He&&ve(Re.line,Re.ch),Oe=He&&re(Re);if(!He||!Oe||te(Re,se)>0)return;var De={from:ve(Re.line,Re.ch),to:de,tag:Oe[2]};return He=="selfClose"?{open:De,close:null,at:"open"}:Oe[1]?{open:F(Re,Oe[2]),close:De,at:"close"}:(Re=new P(I,de.line,de.ch,ae),{open:De,close:U(Re,Oe[2]),at:"open"})},j.findEnclosingTag=function(I,se,ae,Re){for(var He=new P(I,se.line,se.ch,ae);;){var de=F(He,Re);if(!de)break;var Oe=new P(I,se.line,se.ch,ae),De=U(Oe,de.tag);if(De)return{open:de,close:De}}},j.scanForClosingTag=function(I,se,ae,Re){var He=new P(I,se.line,se.ch,Re?{from:0,to:Re}:null);return U(He,ae)}})},p5ED:function(ot,ze,x){"use strict";var j=x("+L6B"),ve=x("2/Rp"),te=x("5Dmo"),we=x("3S7+"),be=x("k1fw"),$=x("tJVT"),P=x("q1tI"),M=x.n(P),b=x("vHTk"),H=x.n(b),K=x("yEEn"),re=x("ZW9T"),Ee=x("1vsH");ze.a=function(ie){var U=ie.name,F=ie.data,I=ie.theme,se=ie.type,ae=ie.filename,Re=ie.monacoEditor,He=ie.className,de=ie.style,Oe=ie.close,De=ie.onClose,me=ie.hasMask,ge=Object(P.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),le=Object($.a)(ge,2),Z=le[0],y=le[1],z=Object(P.useState)(""),W=Object($.a)(z,2),w=W[0],Y=W[1],N=Object(P.useRef)();ae&&(Re.filename=ae),Object(P.useEffect)(function(){var c,l,p=(c=document.cookie)===null||c===void 0||((l=c.replace(/\s/g,""))===null||l===void 0)?void 0:l.split(";");p==null||p.map(function(C){var R=C.split("=");R[0]==="_educoder_session"&&Y(R[1])})},[]);var L=function(){if(F.startsWith("http")||F.startsWith("/")){S();return}Object(Ee.x)(ae||"educoder",F,ae)},S=function(){Object(Ee.v)(ae||U,F)};return M.a.createElement("div",{style:Object(be.a)({},de||{}),className:"".concat(me&&H.a.bgBlack," ").concat(se?H.a.wrp:"hide")},Oe&&M.a.createElement("div",{className:H.a.close,ref:N},M.a.createElement(we.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return N.current}},M.a.createElement("span",{onClick:S},M.a.createElement("i",{className:"icon-quxiaozhiding"}))),M.a.createElement(we.a,{title:"\u5173\u95ED",getPopupContainer:function(){return N.current}},M.a.createElement("span",{className:"",onClick:De},M.a.createElement("i",{className:"icon-guanbi1"})))),M.a.createElement("div",{className:"".concat(H.a[He]," ").concat(He," ").concat(H.a.monaco," ").concat(se==="txt"?"show":"hide")},se==="txt"&&M.a.createElement(re.b,Re)),se==="audio"&&M.a.createElement("audio",{src:"".concat(F!=null&&F.startsWith("/")||(F==null?void 0:F.indexOf("https://"))>-1?F:"data:audio/mp3;base64,").concat(F),autoPlay:!0}),se==="video"&&M.a.createElement(M.a.Fragment,null,F!=null&&F.startsWith("/")?M.a.createElement("video",{controls:!0,src:"".concat(F),autoPlay:!0}):M.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(F),autoPlay:!0})),se==="pdf"&&M.a.createElement("embed",{className:H.a.embed,src:F}),se==="image"&&M.a.createElement(M.a.Fragment,null,M.a.createElement("img",{src:"".concat(F!=null&&F.startsWith("/")||(F==null?void 0:F.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(F)})),se==="other"&&M.a.createElement("div",null,M.a.createElement(ve.a,{type:"primary",size:"large",onClick:L},M.a.createElement(K.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(se==="download"||se==="office")&&M.a.createElement(ve.a,{type:"primary",size:"large",onClick:L},M.a.createElement(K.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ot,ze,x){},"rAM+":function(ot,ze,x){"use strict";x.d(ze,"a",function(){return ve});var j=x("Qw5x");function ve(te,we){var be;if(typeof Symbol=="undefined"||te[Symbol.iterator]==null){if(Array.isArray(te)||(be=Object(j.a)(te))||we&&te&&typeof te.length=="number"){be&&(te=be);var $=0,P=function(){};return{s:P,n:function(){return $>=te.length?{done:!0}:{done:!1,value:te[$++]}},e:function(re){throw re},f:P}}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 M=!0,b=!1,H;return{s:function(){be=te[Symbol.iterator]()},n:function(){var re=be.next();return M=re.done,re},e:function(re){b=!0,H=re},f:function(){try{!M&&be.return!=null&&be.return()}finally{if(b)throw H}}}}},rUJ1:function(ot,ze){const x=/[&<>"']/,j=/[&<>"']/g,ve=/[<>"']|&(?!#?\w+;)/,te=/[<>"']|&(?!#?\w+;)/g,we={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},be=me=>we[me];function $(me,ge){if(ge){if(x.test(me))return me.replace(j,be)}else if(ve.test(me))return me.replace(te,be);return me}const P=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function M(me){return me.replace(P,(ge,le)=>(le=le.toLowerCase(),le==="colon"?":":le.charAt(0)==="#"?le.charAt(1)==="x"?String.fromCharCode(parseInt(le.substring(2),16)):String.fromCharCode(+le.substring(1)):""))}const b=/(^|[^\[])\^/g;function H(me,ge){me=me.source||me,ge=ge||"";const le={replace:(Z,y)=>(y=y.source||y,y=y.replace(b,"$1"),me=me.replace(Z,y),le),getRegex:()=>new RegExp(me,ge)};return le}const K=/[^\w:]/g,re=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ee(me,ge,le){if(me){let Z;try{Z=decodeURIComponent(M(le)).replace(K,"").toLowerCase()}catch(y){return null}if(Z.indexOf("javascript:")===0||Z.indexOf("vbscript:")===0||Z.indexOf("data:")===0)return null}ge&&!re.test(le)&&(le=se(ge,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch(Z){return null}return le}const ie={},U=/^[^:]+:\/*[^/]*$/,F=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function se(me,ge){ie[" "+me]||(U.test(me)?ie[" "+me]=me+"/":ie[" "+me]=de(me,"/",!0)),me=ie[" "+me];const le=me.indexOf(":")===-1;return ge.substring(0,2)==="//"?le?ge:me.replace(F,"$1")+ge:ge.charAt(0)==="/"?le?ge:me.replace(I,"$1")+ge:me+ge}const ae={exec:function(){}};function Re(me){let ge=1,le,Z;for(;ge<arguments.length;ge++){le=arguments[ge];for(Z in le)Object.prototype.hasOwnProperty.call(le,Z)&&(me[Z]=le[Z])}return me}function He(me,ge){const le=me.replace(/\|/g,(z,W,w)=>{let Y=!1,N=W;for(;--N>=0&&w[N]==="\\";)Y=!Y;return Y?"|":" |"}),Z=le.split(/ \|/);let y=0;if(Z.length>ge)Z.splice(ge);else for(;Z.length<ge;)Z.push("");for(;y<Z.length;y++)Z[y]=Z[y].trim().replace(/\\\|/g,"|");return Z}function de(me,ge,le){const Z=me.length;if(Z===0)return"";let y=0;for(;y<Z;){const z=me.charAt(Z-y-1);if(z===ge&&!le)y++;else if(z!==ge&&le)y++;else break}return me.substr(0,Z-y)}function Oe(me,ge){if(me.indexOf(ge[1])===-1)return-1;const le=me.length;let Z=0,y=0;for(;y<le;y++)if(me[y]==="\\")y++;else if(me[y]===ge[0])Z++;else if(me[y]===ge[1]&&(Z--,Z<0))return y;return-1}function De(me){me&&me.sanitize&&!me.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:$,unescape:M,edit:H,cleanUrl:Ee,resolveUrl:se,noopTest:ae,merge:Re,splitCells:He,rtrim:de,findClosingBracket:Oe,checkSanitizeDeprecation:De}},vHTk:function(ot,ze,x){ot.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS:function(ot,ze,x){"use strict";x.d(ze,"c",function(){return be}),x.d(ze,"b",function(){return $}),x.d(ze,"d",function(){return P}),x.d(ze,"a",function(){return b}),x.d(ze,"e",function(){return H});var j=x("9og8"),ve=x("WmNS"),te=x.n(ve),we=x("ErOA");function be(K){return Object(we.c)("libraries/".concat(K,".json"))}function $(){return Object(we.c)("library_tags.json")}function P(K){return M.apply(this,arguments)}function M(){return M=Object(j.a)(te.a.mark(function K(re){var Ee;return te.a.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,Object(we.b)("attachments/".concat(re,".json"));case 2:return Ee=U.sent,U.abrupt("return",Ee.status===0);case 4:case"end":return U.stop()}},K)})),M.apply(this,arguments)}function b(K){return Object(we.f)("libraries.json",K)}function H(K,re){return Object(we.g)("libraries/".concat(K,".json"),re)}}}]);