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__Forums__New.a6efa203.asy...

122 lines
389 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[146,6,7],{"+NIl":function(dt,Ge,C){(function(U){U(C("VrN/"))})(function(U){"use strict";U.defineMode("stex",function(me,re){"use strict";function Se(ie,F){ie.cmdState.push(F)}function ye(ie){return ie.cmdState.length>0?ie.cmdState[ie.cmdState.length-1]:null}function $(ie){var F=ie.cmdState.pop();F&&F.closeBracket()}function R(ie){for(var F=ie.cmdState,P=F.length-1;P>=0;P--){var I=F[P];if(I.name=="DEFAULT")continue;return I}return{styleIdentifier:function(){return null}}}function D(ie,F,P){return function(){this.name=ie,this.bracketNo=0,this.style=F,this.styles=P,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var T={};T.importmodule=D("importmodule","tag",["string","builtin"]),T.documentclass=D("documentclass","tag",["","atom"]),T.usepackage=D("usepackage","tag",["atom"]),T.begin=D("begin","tag",["atom"]),T.end=D("end","tag",["atom"]),T.label=D("label","tag",["atom"]),T.ref=D("ref","tag",["atom"]),T.eqref=D("eqref","tag",["atom"]),T.cite=D("cite","tag",["atom"]),T.bibitem=D("bibitem","tag",["atom"]),T.Bibitem=D("Bibitem","tag",["atom"]),T.RBibitem=D("RBibitem","tag",["atom"]),T.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function H(ie,F){ie.f=F}function X(ie,F){var P;if(ie.match(/^\\[a-zA-Z@]+/)){var I=ie.current().slice(1);return P=T.hasOwnProperty(I)?T[I]:T.DEFAULT,P=new P,Se(F,P),H(F,be),P.style}if(ie.match(/^\\[$&%#{}_]/))return"tag";if(ie.match(/^\\[,;!\/\\]/))return"tag";if(ie.match("\\["))return H(F,function(ne,Le){return ee(ne,Le,"\\]")}),"keyword";if(ie.match("\\("))return H(F,function(ne,Le){return ee(ne,Le,"\\)")}),"keyword";if(ie.match("$$"))return H(F,function(ne,Le){return ee(ne,Le,"$$")}),"keyword";if(ie.match("$"))return H(F,function(ne,Le){return ee(ne,Le,"$")}),"keyword";var ae=ie.next();if(ae=="%")return ie.skipToEnd(),"comment";if(ae=="}"||ae=="]"){if(P=ye(F),P)P.closeBracket(ae),H(F,be);else return"error";return"bracket"}else return ae=="{"||ae=="["?(P=T.DEFAULT,P=new P,Se(F,P),"bracket"):/\d/.test(ae)?(ie.eatWhile(/[\w.%]/),"atom"):(ie.eatWhile(/[\w\-_]/),P=R(F),P.name=="begin"&&(P.argument=ie.current()),P.styleIdentifier())}function ee(ie,F,P){if(ie.eatSpace())return null;if(P&&ie.match(P))return H(F,X),"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 be(ie,F){var P=ie.peek(),I;return P=="{"||P=="["?(I=ye(F),I.openBracket(P),ie.eat(P),H(F,X),"bracket"):/[ \t\r]/.test(P)?(ie.eat(P),null):(H(F,X),$(F),X(ie,F))}return{startState:function(){var ie=re.inMathMode?function(F,P){return ee(F,P)}:X;return{cmdState:[],f:ie}},copyState:function(ie){return{cmdState:ie.cmdState.slice(),f:ie.f}},token:function(ie,F){return F.f(ie,F)},blankLine:function(ie){ie.f=X,ie.cmdState.length=0},lineComment:"%"}}),U.defineMIME("text/x-stex","stex"),U.defineMIME("text/x-latex","stex")})},"19Vz":function(dt,Ge,C){(function(U){U(C("VrN/"))})(function(U){U.defineOption("placeholder","",function(D,T,H){var X=H&&H!=U.Init;if(T&&!X)D.on("blur",ye),D.on("change",$),D.on("swapDoc",$),U.on(D.getInputField(),"compositionupdate",D.state.placeholderCompose=function(){Se(D)}),$(D);else if(!T&&X){D.off("blur",ye),D.off("change",$),D.off("swapDoc",$),U.off(D.getInputField(),"compositionupdate",D.state.placeholderCompose),me(D);var ee=D.getWrapperElement();ee.className=ee.className.replace(" CodeMirror-empty","")}T&&!D.hasFocus()&&ye(D)});function me(D){D.state.placeholder&&(D.state.placeholder.parentNode.removeChild(D.state.placeholder),D.state.placeholder=null)}function re(D){me(D);var T=D.state.placeholder=document.createElement("pre");T.style.cssText="height: 0; overflow: visible",T.style.direction=D.getOption("direction"),T.className="CodeMirror-placeholder CodeMirror-line-like";var H=D.getOption("placeholder");typeof H=="string"&&(H=document.createTextNode(H)),T.appendChild(H),D.display.lineSpace.insertBefore(T,D.display.lineSpace.firstChild)}function Se(D){setTimeout(function(){var T=!1,H=D.getInputField();H.nodeName=="TEXTAREA"?T=!H.value:D.lineCount()==1&&(T=!/[^\u200b]/.test(H.querySelector(".CodeMirror-line").textContent)),T?re(D):me(D)},20)}function ye(D){R(D)&&re(D)}function $(D){var T=D.getWrapperElement(),H=R(D);T.className=T.className.replace(" CodeMirror-empty","")+(H?" CodeMirror-empty":""),H?re(D):me(D)}function R(D){return D.lineCount()===1&&D.getLine(0)===""}})},"1eCo":function(dt,Ge,C){(function(U){U(C("VrN/"))})(function(U){"use strict";var me={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},re={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};U.defineMode("xml",function(Se,ye){var $=Se.indentUnit,R={},D=ye.htmlMode?me:re;for(var T in D)R[T]=D[T];for(var T in ye)R[T]=ye[T];var H,X;function ee(y,Y){function z(j){return Y.tokenize=j,j(y,Y)}var w=y.next();if(w=="<")return y.eat("!")?y.eat("[")?y.match("CDATA[")?z(F("atom","]]>")):null:y.match("--")?z(F("comment","-->")):y.match("DOCTYPE",!0,!0)?(y.eatWhile(/[\w\._\-]/),z(P(1))):null:y.eat("?")?(y.eatWhile(/[\w\._\-]/),Y.tokenize=F("meta","?>"),"meta"):(H=y.eat("/")?"closeTag":"openTag",Y.tokenize=be,"tag bracket");if(w=="&"){var Q;return y.eat("#")?y.eat("x")?Q=y.eatWhile(/[a-fA-F\d]/)&&y.eat(";"):Q=y.eatWhile(/[\d]/)&&y.eat(";"):Q=y.eatWhile(/[\w\.\-:]/)&&y.eat(";"),Q?"atom":"error"}else return y.eatWhile(/[^&<]/),null}ee.isInText=!0;function be(y,Y){var z=y.next();if(z==">"||z=="/"&&y.eat(">"))return Y.tokenize=ee,H=z==">"?"endTag":"selfcloseTag","tag bracket";if(z=="=")return H="equals",null;if(z=="<"){Y.tokenize=ee,Y.state=Le,Y.tagName=Y.tagStart=null;var w=Y.tokenize(y,Y);return w?w+" tag error":"tag error"}else return/[\'\"]/.test(z)?(Y.tokenize=ie(z),Y.stringStartCol=y.column(),Y.tokenize(y,Y)):(y.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ie(y){var Y=function(z,w){for(;!z.eol();)if(z.next()==y){w.tokenize=be;break}return"string"};return Y.isInAttribute=!0,Y}function F(y,Y){return function(z,w){for(;!z.eol();){if(z.match(Y)){w.tokenize=ee;break}z.next()}return y}}function P(y){return function(Y,z){for(var w;(w=Y.next())!=null;){if(w=="<")return z.tokenize=P(y+1),z.tokenize(Y,z);if(w==">")if(y==1){z.tokenize=ee;break}else return z.tokenize=P(y-1),z.tokenize(Y,z)}return"meta"}}function I(y,Y,z){this.prev=y.context,this.tagName=Y,this.indent=y.indented,this.startOfLine=z,(R.doNotIndent.hasOwnProperty(Y)||y.context&&y.context.noIndent)&&(this.noIndent=!0)}function ae(y){y.context&&(y.context=y.context.prev)}function ne(y,Y){for(var z;;){if(!y.context)return;if(z=y.context.tagName,!R.contextGrabbers.hasOwnProperty(z)||!R.contextGrabbers[z].hasOwnProperty(Y))return;ae(y)}}function Le(y,Y,z){return y=="openTag"?(z.tagStart=Y.column(),Fe):y=="closeTag"?ce:Le}function Fe(y,Y,z){return y=="word"?(z.tagName=Y.current(),X="tag",J):R.allowMissingTagName&&y=="endTag"?(X="tag bracket",J(y,Y,z)):(X="error",Fe)}function ce(y,Y,z){if(y=="word"){var w=Y.current();return z.context&&z.context.tagName!=w&&R.implicitlyClosed.hasOwnProperty(z.context.tagName)&&ae(z),z.context&&z.context.tagName==w||R.matchClosing===!1?(X="tag",Ce):(X="tag error",De)}else return R.allowMissingTagName&&y=="endTag"?(X="tag bracket",Ce(y,Y,z)):(X="error",De)}function Ce(y,Y,z){return y!="endTag"?(X="error",Ce):(ae(z),Le)}function De(y,Y,z){return X="error",Ce(y,Y,z)}function J(y,Y,z){if(y=="word")return X="attribute",pe;if(y=="endTag"||y=="selfcloseTag"){var w=z.tagName,Q=z.tagStart;return z.tagName=z.tagStart=null,y=="selfcloseTag"||R.autoSelfClosers.hasOwnProperty(w)?ne(z,w):(ne(z,w),z.context=new I(z,w,Q==z.indented)),Le}return X="error",J}function pe(y,Y,z){return y=="equals"?Oe:(R.allowMissing||(X="error"),J(y,Y,z))}function Oe(y,Y,z){return y=="string"?fe:y=="word"&&R.allowUnquoted?(X="string",J):(X="error",J(y,Y,z))}function fe(y,Y,z){return y=="string"?fe:J(y,Y,z)}return{startState:function(y){var Y={tokenize:ee,state:Le,indented:y||0,tagName:null,tagStart:null,context:null};return y!=null&&(Y.baseIndent=y),Y},token:function(y,Y){if(!Y.tagName&&y.sol()&&(Y.indented=y.indentation()),y.eatSpace())return null;H=null;var z=Y.tokenize(y,Y);return(z||H)&&z!="comment"&&(X=null,Y.state=Y.state(H||z,y,Y),X&&(z=X=="error"?z+" error":X)),z},indent:function(y,Y,z){var w=y.context;if(y.tokenize.isInAttribute)return y.tagStart==y.indented?y.stringStartCol+1:y.indented+$;if(w&&w.noIndent)return U.Pass;if(y.tokenize!=be&&y.tokenize!=ee)return z?z.match(/^(\s*)/)[0].length:0;if(y.tagName)return R.multilineTagIndentPastTag!==!1?y.tagStart+y.tagName.length+2:y.tagStart+$*(R.multilineTagIndentFactor||1);if(R.alignCDATA&&/<!\[CDATA\[/.test(Y))return 0;var Q=Y&&/^<(\/)?([\w_:\.-]*)/.exec(Y);if(Q&&Q[1])for(;w;)if(w.tagName==Q[2]){w=w.prev;break}else if(R.implicitlyClosed.hasOwnProperty(w.tagName))w=w.prev;else break;else if(Q)for(;w;){var j=R.contextGrabbers[w.tagName];if(j&&j.hasOwnProperty(Q[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:R.htmlMode?"html":"xml",helperType:R.htmlMode?"html":"xml",skipAttribute:function(y){y.state==Oe&&(y.state=J)},xmlCurrentTag:function(y){return y.tagName?{name:y.tagName,close:y.type=="closeTag"}:null},xmlCurrentContext:function(y){for(var Y=[],z=y.context;z;z=z.prev)z.tagName&&Y.push(z.tagName);return Y.reverse()}}}),U.defineMIME("text/xml","xml"),U.defineMIME("application/xml","xml"),U.mimeModes.hasOwnProperty("text/html")||U.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7/Dv":function(dt,Ge,C){dt.exports={bg:"bg___2rJyo",head:"head___23PFV",formWrap:"formWrap___2b6uL"}},"7ahc":function(dt,Ge,C){"use strict";C.d(Ge,"a",function(){return Fe});var U=C("k1fw"),me=C("0Owb"),re=C("+L6B"),Se=C("2/Rp"),ye=C("y8nQ"),$=C("Vl3Y"),R=C("tJVT"),D=C("OaEy"),T=C("2fM7"),H=C("q1tI"),X=C.n(H),ee=C("VrN/"),be=C.n(ee),ie=C("p77/"),F=C.n(ie),P=C("c5Ni"),I=C.n(P),ae=T.a.Option,ne={labelCol:{span:4},wrapperCol:{span:20}},Le={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"]};Ge.b=function(ce){var Ce=ce.callback,De=ce.onCancel,J=Object(H.useState)("python"),pe=Object(R.a)(J,2),Oe=pe[0],fe=pe[1];function y(z){fe(Le[z][1])}function Y(z){Ce(z)}return X.a.createElement($.a,Object(me.a)({},ne,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Y}),X.a.createElement($.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},X.a.createElement(T.a,{onChange:y},Object.keys(Le).map(function(z){return X.a.createElement(ae,{key:z,value:z},Le[z][0])}))),X.a.createElement($.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},X.a.createElement(Fe,{mode:Oe})),X.a.createElement("div",{className:"flex-container flex-end"},X.a.createElement(Se.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),X.a.createElement(Se.a,{type:"ghost",onClick:De},"\u53D6\u6D88")))};function Fe(ce){var Ce=ce.value,De=ce.onChange,J=ce.mode,pe=ce.options,Oe=pe===void 0?{}:pe,fe=Object(H.useRef)(),y=Object(H.useState)(),Y=Object(R.a)(y,2),z=Y[0],w=Y[1];return Object(H.useEffect)(function(){if(z){function Q(j){var M=j.getValue();De&&De(M)}return z.on("change",Q),function(){z.off("change",Q)}}},[z,De]),Object(H.useEffect)(function(){z&&z.setOption("mode",J)},[z,J]),Object(H.useEffect)(function(){z&&((Ce!==z.getValue()||Ce==="")&&setTimeout(function(){z.setValue(Ce||" ")},300))},[z,Ce]),Object(H.useEffect)(function(){if(fe.current&&!z){var Q=be.a.fromTextArea(fe.current,Object(U.a)({mode:J,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Oe));w(Q)}},[fe.current,z]),X.a.createElement("div",{className:"my-codemirror-container"},X.a.createElement("textarea",{ref:fe}))}},"7ixt":function(dt,Ge,C){"use strict";C.d(Ge,"a",function(){return re});var U={adjustX:1,adjustY:1},me=[0,0],re={left:{points:["cr","cl"],overflow:U,offset:[-4,0],targetOffset:me},right:{points:["cl","cr"],overflow:U,offset:[4,0],targetOffset:me},top:{points:["bc","tc"],overflow:U,offset:[0,-4],targetOffset:me},bottom:{points:["tc","bc"],overflow:U,offset:[0,4],targetOffset:me},topLeft:{points:["bl","tl"],overflow:U,offset:[0,-4],targetOffset:me},leftTop:{points:["tr","tl"],overflow:U,offset:[-4,0],targetOffset:me},topRight:{points:["br","tr"],overflow:U,offset:[0,-4],targetOffset:me},rightTop:{points:["tl","tr"],overflow:U,offset:[4,0],targetOffset:me},bottomRight:{points:["tr","br"],overflow:U,offset:[0,4],targetOffset:me},rightBottom:{points:["bl","br"],overflow:U,offset:[4,0],targetOffset:me},bottomLeft:{points:["tl","bl"],overflow:U,offset:[0,4],targetOffset:me},leftBottom:{points:["br","bl"],overflow:U,offset:[-4,0],targetOffset:me}},Se=re},"8EBN":function(dt,Ge,C){(function(U){U(C("VrN/"))})(function(U){"use strict";U.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 me=0;me<U.modeInfo.length;me++){var re=U.modeInfo[me];re.mimes&&(re.mime=re.mimes[0])}U.findModeByMIME=function(Se){Se=Se.toLowerCase();for(var ye=0;ye<U.modeInfo.length;ye++){var $=U.modeInfo[ye];if($.mime==Se)return $;if($.mimes){for(var R=0;R<$.mimes.length;R++)if($.mimes[R]==Se)return $}}if(/\+xml$/.test(Se))return U.findModeByMIME("application/xml");if(/\+json$/.test(Se))return U.findModeByMIME("application/json")},U.findModeByExtension=function(Se){Se=Se.toLowerCase();for(var ye=0;ye<U.modeInfo.length;ye++){var $=U.modeInfo[ye];if($.ext){for(var R=0;R<$.ext.length;R++)if($.ext[R]==Se)return $}}},U.findModeByFileName=function(Se){for(var ye=0;ye<U.modeInfo.length;ye++){var $=U.modeInfo[ye];if($.file&&$.file.test(Se))return $}var R=Se.lastIndexOf("."),D=R>-1&&Se.substring(R+1,Se.length);if(D)return U.findModeByExtension(D)},U.findModeByName=function(Se){Se=Se.toLowerCase();for(var ye=0;ye<U.modeInfo.length;ye++){var $=U.modeInfo[ye];if($.name.toLowerCase()==Se)return $;if($.alias){for(var R=0;R<$.alias.length;R++)if($.alias[R].toLowerCase()==Se)return $}}}})},"9Bee":function(dt,Ge,C){"use strict";var U=C("k1fw"),me=C("tJVT"),re=C("q1tI"),Se=C.n(re),ye=C("vg9a"),$=C("DlQD"),R=C.n($),D=C("rUJ1");function T(m,E){var N=m.match(/^(\s+)(?:```)/);if(N===null)return E;var oe=N[1];return E.split(`
`).map(function(xe){var te=xe.match(/^\s+/);if(te===null)return xe;var _e=Object(me.a)(te,1),se=_e[0];return se.length>=oe.length?xe.slice(oe.length):xe}).join(`
`)}var H=[],X=["<ul>"],ee=new R.a.Renderer,be=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ie(){H.length=0,X=["<ul>"]}var F={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function P(m,E,N,oe){if(E>=m.length||m[E].level<=N)return E;var xe=m[E];oe.push("<li><a href='#"+xe.anchor+"'>"+xe.text+"</a>"),E++;var te=[];return E=P(m,E,xe.level,te),te.length>0&&(oe.push("<ul>"),te.forEach(function(_e){oe.push(_e)}),oe.push("</ul>")),oe.push("</li>"),E=P(m,E,N,oe),E}function I(){return P(H,0,0,X),X.push("</ul>"),X.join("")}var ae={heading:function(E){var N=be.exec(E);if(N)return{type:"heading",raw:N[0],depth:N[1].length,text:N[2]}},fences:function(E){var N=this.rules.block.fences.exec(E);if(N){var oe=N[0],xe=T(oe,N[3]||""),te=N[2]?N[2].trim():N[2];if(["latex","katex","math"].indexOf(te)>=0){var _e=Fe(),se=xe;xe=_e,ce[_e]={type:"block",expression:se}}return{type:"code",raw:oe,lang:te,text:xe}}}},ne=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Le=0,Fe=function(){return"__special_katext_id_".concat(Le++,"__")},ce={};function Ce(){return ce}function De(){Le=0,ce={}}function J(m){return m=m.replace(ne,function(E,N){var oe=Fe();return ce[oe]={type:"inline",expression:N},oe}),m}var pe=ee.listitem;ee.listitem=function(m){return pe(J(m))};var Oe=ee.paragraph;ee.paragraph=function(m){return Oe(J(m))};var fe=ee.tablecell;ee.tablecell=function(m,E){return fe(J(m),E)},ee.code=function(m,E,N){var oe=(E||"").match(/\S*/)[0];return oe?["latex","katex","math"].indexOf(oe)>=0?"<p class='editormd-tex'>".concat(m,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(E,'">').concat(N?m:Object(D.escape)(m,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(N?m:Object(D.escape)(m,!0))+"</code></pre>"},ee.heading=function(m,E,N){var oe=this.options.headerPrefix+N.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return H.push({anchor:oe,level:E,text:m}),"<h"+E+' id="'+oe+'">'+m+"</h"+E+">"},R.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),R.a.use({tokenizer:ae,renderer:ee});var y=R.a,Y=C("SJMd"),z=C("ulZh"),w=C.n(z),Q=C("m3rI"),j=C("Oy/b"),M=C("p5ED"),O=/<pre[^>]*>/g;function c(m){var E=document.createElement("div");return E.innerHTML=m,E.childNodes.length===0?"":E.childNodes[0].nodeValue}var l=Ge.a=function(m){var E=m.value,N=E===void 0?"":E,oe=m.className,xe=m.showTextOnly,te=m.showLines,_e=m.style,se=_e===void 0?{}:_e,de=m.stylesPrev,W=de===void 0?{}:de,q=String(N),h=Object(re.useState)(""),S=Object(me.a)(h,2),v=S[0],Z=S[1],ue=Object(re.useMemo)(function(){try{var Pe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ne=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ee=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;q=q.replace(Pe,"("+Q.a.API_SERVER+"/api/attachments/").replace(Ne,'"'+Q.a.API_SERVER+"/api/attachments/").replace(Ee,'"'+Q.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),q=q.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Ve){}var ke=y(q),Je=Ce();if(q.match(/\[TOC\]/)&&(ke=ke.replace("<p>[TOC]</p>",I()),ie()),ke=ke.replace(/(__special_katext_id_\d+__)/g,function(Ve,Ke){var at=Je[Ke],et=at.type,qe=at.expression;return Object(j.renderToString)(c(qe)||"",{displayMode:et==="block",throwOnError:!1,output:"html"})}),ke=ke.replace(/▁/g,"\u2581\u2581\u2581"),De(),xe){var Ye=document.createElement("div");return Ye.innerHTML=ke,Ye.innerText}return setTimeout(function(){return Te()},500),ke},[q]),G=Object(re.useRef)();F.WebkitLineClamp=te,te&&(se=Object(U.a)(Object(U.a)({},se),F));function he(Pe){var Ne=Pe.target;if(Ne.tagName.toUpperCase()==="A"){var Ee=Ne.getAttribute("href");if(Ee.indexOf("office")>-1)Pe.preventDefault(),Z(Ee);else if(Ee.startsWith("#")){Pe.preventDefault();var ke=document.getElementById(Ee.replace("#",""));ke&&ke.scrollIntoView(!0)}}}var Te=function(){var Ne,Ee=(Ne=G.current)===null||Ne===void 0?void 0:Ne.querySelectorAll("video");Ee==null||Ee.forEach(function(ke){if(ke.oncontextmenu=function(){return!1},ke.src.indexOf(".m3u8")>-1&&!ke.canPlayType("application/vnd.apple.mpegurl")){if(w.a.isSupported()){var Je=new w.a;Je.loadSource(ke.src),Je.attachMedia(ke)}}})};return Object(re.useEffect)(function(){if(G.current&&ue&&(ue.match(O)&&window.PR.prettyPrint()),G.current)return G.current.addEventListener("click",he),function(){G.current.removeEventListener("click",he),De(),ie()}},[ue,G.current,he]),Se.a.createElement(Se.a.Fragment,null,Se.a.createElement("div",{ref:G,style:Object(U.a)({},se),className:"".concat(oe||""," markdown-body "),dangerouslySetInnerHTML:{__html:ue}}),Se.a.createElement(M.a,{close:!0,data:v,type:v!=null&&v.length?"office":"",style:Object(U.a)({},W),onClose:function(){return Z("")}}))}},"9VGf":function(dt,Ge,C){"use strict";C.d(Ge,"a",function(){return re});var U=C("q1tI"),me=C.n(U);function re(Se,ye){var $=Object(U.useRef)();Object(U.useEffect)(function(){$.current=Se}),Object(U.useEffect)(function(){function R(){$.current()}if(ye!==null){var D=setInterval(R,ye);return function(){return clearInterval(D)}}},[ye])}},Bd2K:function(dt,Ge,C){(function(U){U(C("VrN/"),C("osHv"))})(function(U){U.defineOption("autoCloseTags",!1,function(T,H,X){if(X!=U.Init&&X&&T.removeKeyMap("autoCloseTags"),!H)return;var ee={name:"autoCloseTags"};(typeof H!="object"||H.whenClosing!==!1)&&(ee["'/'"]=function(be){return $(be)}),(typeof H!="object"||H.whenOpening!==!1)&&(ee["'>'"]=function(be){return Se(be)}),T.addKeyMap(ee)});var me=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],re=["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 Se(T){if(T.getOption("disableInput"))return U.Pass;for(var H=T.listSelections(),X=[],ee=T.getOption("autoCloseTags"),be=0;be<H.length;be++){if(!H[be].empty())return U.Pass;var ie=H[be].head,F=T.getTokenAt(ie),P=U.innerMode(T.getMode(),F.state),I=P.state,ae=P.mode.xmlCurrentTag&&P.mode.xmlCurrentTag(I),ne=ae&&ae.name;if(!ne)return U.Pass;var Le=P.mode.configuration=="html",Fe=typeof ee=="object"&&ee.dontCloseTags||Le&&me,ce=typeof ee=="object"&&ee.indentTags||Le&&re;F.end>ie.ch&&(ne=ne.slice(0,ne.length-F.end+ie.ch));var Ce=ne.toLowerCase();if(!ne||F.type=="string"&&(F.end!=ie.ch||!/[\"\']/.test(F.string.charAt(F.string.length-1))||F.string.length==1)||F.type=="tag"&&ae.close||F.string.indexOf("/")==ie.ch-F.start-1||Fe&&R(Fe,Ce)>-1||D(T,P.mode.xmlCurrentContext&&P.mode.xmlCurrentContext(I)||[],ne,ie,!0))return U.Pass;var De=typeof ee=="object"&&ee.emptyTags;if(De&&R(De,ne)>-1){X[be]={text:"/>",newPos:U.Pos(ie.line,ie.ch+2)};continue}var J=ce&&R(ce,Ce)>-1;X[be]={indent:J,text:">"+(J?`
`:"")+"</"+ne+">",newPos:J?U.Pos(ie.line+1,0):U.Pos(ie.line,ie.ch+1)}}for(var pe=typeof ee=="object"&&ee.dontIndentOnAutoClose,be=H.length-1;be>=0;be--){var Oe=X[be];T.replaceRange(Oe.text,H[be].head,H[be].anchor,"+insert");var fe=T.listSelections().slice(0);fe[be]={head:Oe.newPos,anchor:Oe.newPos},T.setSelections(fe),!pe&&Oe.indent&&(T.indentLine(Oe.newPos.line,null,!0),T.indentLine(Oe.newPos.line+1,null,!0))}}function ye(T,H){for(var X=T.listSelections(),ee=[],be=H?"/":"</",ie=T.getOption("autoCloseTags"),F=typeof ie=="object"&&ie.dontIndentOnSlash,P=0;P<X.length;P++){if(!X[P].empty())return U.Pass;var I=X[P].head,ae=T.getTokenAt(I),ne=U.innerMode(T.getMode(),ae.state),Le=ne.state;if(H&&(ae.type=="string"||ae.string.charAt(0)!="<"||ae.start!=I.ch-1))return U.Pass;var Fe,ce=ne.mode.name!="xml"&&T.getMode().name=="htmlmixed";if(ce&&ne.mode.name=="javascript")Fe=be+"script";else if(ce&&ne.mode.name=="css")Fe=be+"style";else{var Ce=ne.mode.xmlCurrentContext&&ne.mode.xmlCurrentContext(Le);if(!Ce||Ce.length&&D(T,Ce,Ce[Ce.length-1],I))return U.Pass;Fe=be+Ce[Ce.length-1]}T.getLine(I.line).charAt(ae.end)!=">"&&(Fe+=">"),ee[P]=Fe}if(T.replaceSelections(ee),X=T.listSelections(),!F)for(var P=0;P<X.length;P++)(P==X.length-1||X[P].head.line<X[P+1].head.line)&&T.indentLine(X[P].head.line)}function $(T){return T.getOption("disableInput")?U.Pass:ye(T,!0)}U.commands.closeTag=function(T){return ye(T)};function R(T,H){if(T.indexOf)return T.indexOf(H);for(var X=0,ee=T.length;X<ee;++X)if(T[X]==H)return X;return-1}function D(T,H,X,ee,be){if(!U.scanForClosingTag)return!1;var ie=Math.min(T.lastLine()+1,ee.line+500),F=U.scanForClosingTag(T,ee,null,ie);if(!F||F.tag!=X)return!1;for(var P=be?1:0,I=H.length-1;I>=0&&H[I]==X;I--)++P;ee=F.to;for(var I=1;I<P;I++){var ae=U.scanForClosingTag(T,ee,null,ie);if(!ae||ae.tag!=X)return!1;ee=ae.to}return!0}})},BjJ7:function(dt,Ge,C){"use strict";C.d(Ge,"d",function(){return me}),C.d(Ge,"c",function(){return re}),C.d(Ge,"e",function(){return Se}),C.d(Ge,"b",function(){return ye}),C.d(Ge,"a",function(){return R});var U=C("m3rI");function me(D){var T=!0;if(D.length>0){for(var H=0;H<D.length;H++)if(D[H].compile_success==0||!D[H].compile_success){T=!1;break}}else T=!1;return T}function re(D){for(var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",H=[],X=0;X<D.length;X++){var ee=D[X],be=T?"".concat(T,"/").concat(ee.name):"".concat(ee.name);H.push({title:ee.name,isLeaf:!(ee.type==="tree"),key:be})}return H}function Se(D,T,H){for(var X=0;X<D.length;X++){var ee=D[X];if(ee.key===T){ee.children=H;break}ee.children&&Se(ee.children,T,H)}return D}function ye(D,T,H){var X;return function(){var ee=this,be=arguments,ie=function(){X=null,H||D.apply(ee,be)},F=H&&!X;clearTimeout(X),X=setTimeout(ie,T),F&&D.apply(ee,be)}}var $=!0,R=U.a.API_SERVER},"C+DQ":function(dt,Ge,C){},CKgm:function(dt,Ge,C){"use strict";C.r(Ge);var U=C("+L6B"),me=C("2/Rp"),re=C("7Kak"),Se=C("9yH6"),ye=C("14J3"),$=C("BMrR"),R=C("5NDa"),D=C("5rEg"),T=C("k1fw"),H=C("miYZ"),X=C("tsqr"),ee=C("oBTY"),be=C("9og8"),ie=C("y8nQ"),F=C("Vl3Y"),P=C("tJVT"),I=C("PpiC"),ae=C("DZo9"),ne=C("8z0m"),Le=C("OaEy"),Fe=C("2fM7"),ce=C("WmNS"),Ce=C.n(ce),De=C("q1tI"),J=C.n(De),pe=C("Ty5D"),Oe=C("9kvl"),fe=C("Ot1p"),y=C("7/Dv"),Y=C.n(y),z=C("LtfV"),w=C("m3rI"),Q=C("ErOA"),j=Fe.a.Option,M=ne.a.Dragger,O=function(l){var m,E=l.forumsDetail,N=l.globalSetting,oe=l.dispatch,xe=Object(I.a)(l,["forumsDetail","globalSetting","dispatch"]),te=Object(pe.i)(),_e=F.a.useForm(),se=Object(P.a)(_e,1),de=se[0],W=Object(De.useState)({}),q=Object(P.a)(W,2),h=q[0],S=q[1],v=Object(De.useState)([]),Z=Object(P.a)(v,2),ue=Z[0],G=Z[1],he=Object(De.useState)(1),Te=Object(P.a)(he,2),Pe=Te[0],Ne=Te[1],Ee=Object(De.useState)(!1),ke=Object(P.a)(Ee,2),Je=ke[0],Ye=ke[1],Ve=Object(De.useState)(void 0),Ke=Object(P.a)(Ve,2),at=Ke[0],et=Ke[1],qe=Object(De.useState)([]),ve=Object(P.a)(qe,2),tt=ve[0],$e=ve[1],we=Object(De.useState)([]),Ie=Object(P.a)(we,2),_=Ie[0],k=Ie[1],L=Object(De.useRef)([]);console.log(ue,h,"fileList"),Object(De.useEffect)(function(){p()},[]),Object(De.useEffect)(function(){p(),te.memoId&&Pe===2&&f()},[te.memoId,Pe]);var f=function(){var bt=Object(be.a)(Ce.a.mark(function Ze(){var He,lt,ut,yt,kt,ht;return Ce.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return He="/api/memos/".concat(te.memoId,"/edit.json"),Gt.next=3,Object(Q.a)(He,{method:"get"});case 3:lt=Gt.sent,console.log(lt,22),lt&&(yt={subject:lt.subject,content:lt.content,forum_id:lt==null?void 0:lt.forum_section.forum_id,children_forum_id:lt==null?void 0:lt.forum_section_id,tag_id:lt.tag_id,is_original:lt.is_original?1:2,reprint_link:(lt==null?void 0:lt.reprint_link)||""},kt=tt.find(function(Xt){return Xt.id===yt.forum_id}),ht=lt==null||((ut=lt.attachments_url)===null||ut===void 0)?void 0:ut.map(function(Xt,gn){return{name:Xt.title,uid:gn,percent:100,response:Xt}}),G(ht),k((kt==null?void 0:kt.children_tags)||[]),de.setFieldsValue(yt),S(yt),et(lt.memo_image_info));case 6:case"end":return Gt.stop()}},Ze)}));return function(){return bt.apply(this,arguments)}}(),p=function(){var bt=Object(be.a)(Ce.a.mark(function Ze(){var He;return Ce.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return ut.next=2,Object(Q.a)("/api/forum_sections.json",{method:"get"});case 2:He=ut.sent,He&&He.forum_sections&&($e(He.forum_sections),Ne(2));case 4:case"end":return ut.stop()}},Ze)}));return function(){return bt.apply(this,arguments)}}(),g=function(Ze){if(Ze.file.status==="done"){var He;if(G(Ze.fileList),L.current=Object(ee.a)(Ze.fileList),!Ze.file.response)return;if((He=Ze.file.response)!==null&&He!==void 0&&He.id)return}},b=function(){var bt=Object(be.a)(Ce.a.mark(function Ze(He){var lt;return Ce.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(He.response){yt.next=3;break}return X.b.info("\u8FD8\u672A\u4E0A\u4F20\u5B8C\u6210\uFF0C\u65E0\u6CD5\u8FDB\u884C\u5220\u9664\u64CD\u4F5C\uFF01"),yt.abrupt("return");case 3:lt=ue.filter(function(kt){return kt.uid!==He.uid}),G(lt),L.current=Object(ee.a)(lt),X.b.info("\u5220\u9664\u6210\u529F");case 7:case"end":return yt.stop()}},Ze)}));return function(He){return bt.apply(this,arguments)}}(),K=function(Ze){if(ue!=null&&ue.some(function(lt){return lt.name===Ze.name}))return X.b.info("".concat(Ze.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Ze.size/1024/1024>50)return X.b.info("\u6587\u4EF6\u8D85\u8FC750M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var He={name:Ze.name,uid:Ze.uid,file:Ze,percent:0};ue.push(He),L.current=Object(ee.a)(ue),G(Object(ee.a)(ue))},le={name:"file",multiple:!0,fileList:ue,action:"".concat(w.a.API_SERVER,"/api/attachments.json"),onChange:g,onRemove:b,beforeUpload:K};function Me(bt){et(bt)}var nt=function(){var bt=Object(be.a)(Ce.a.mark(function Ze(He){var lt,ut,yt;return Ce.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Ye(!0),lt={forum_id:He.forum_id,attachment_id:at&&at.id,children_forum_id:He.children_forum_id,attachments:ue==null?void 0:ue.map(function(an){var Gt;return an==null||((Gt=an.response)===null||Gt===void 0)?void 0:Gt.id}),memo:{subject:He.subject,content:He.content,tag_id:He.tag_id,is_original:He.is_original,reprint_link:He.reprint_link}},!te.memoId){ht.next=9;break}return ht.next=5,Object(Q.a)("/api/memos/".concat(te.memoId,".json"),{method:"put",body:lt});case 5:ut=ht.sent,ut.status===1&&(X.b.success(ut==null?void 0:ut.message),Oe.d.push("/forums/".concat(te.memoId))),ht.next=13;break;case 9:return ht.next=11,Object(Q.a)("/api/memos.json",{method:"post",body:lt});case 11:yt=ht.sent,yt.status===1&&(X.b.success(yt==null?void 0:yt.message),Oe.d.push("/forums/".concat(yt.memo_id)));case 13:Ye(!1);case 14:case"end":return ht.stop()}},Ze)}));return function(He){return bt.apply(this,arguments)}}(),pt=function(){Oe.d.goBack()},ot=function(Ze){if(S(Object(T.a)(Object(T.a)({},h),Ze)),"forum_id"in Ze){var He,lt,ut=tt.find(function(kt){return kt.id===Ze.forum_id}),yt=(ut==null||((He=ut.children_tags)===null||He===void 0||((lt=He[0])===null||lt===void 0))?void 0:lt.id)||void 0;k((ut==null?void 0:ut.children_tags)||[]),de.setFieldsValue({children_forum_id:yt}),S(Object(T.a)(Object(T.a)({},h),{},{children_forum_id:yt}))}};return J.a.createElement("section",{className:Y.a.bg},J.a.createElement("div",{className:Y.a.head},te.memoId?"\u7F16\u8F91":"\u65B0\u5EFA"),J.a.createElement(F.a,{form:de,className:Y.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:ot,onFinish:nt},J.a.createElement(F.a.Item,{name:"subject",label:"\u6807\u9898",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},J.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",maxLength:50,suffix:"".concat(((m=h.subject)===null||m===void 0?void 0:m.length)||0,"/50")})),J.a.createElement(F.a.Item,{name:"content",label:"\u5185\u5BB9",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},J.a.createElement(fe.a,{defaultValue:h.content||"",watch:!0})),J.a.createElement(M,le,J.a.createElement("p",{className:"ant-upload-drag-icon"},J.a.createElement(z.a,null)),J.a.createElement("p",{className:"ant-upload-text"},"\u62D6\u52A8\u6587\u4EF6\u6216",J.a.createElement("span",{className:"c-light-primary"},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20"))),J.a.createElement($.a,{className:"mt20",align:"bottom"},J.a.createElement(F.a.Item,{name:"forum_id",label:"\u4E3B\u9898\u677F\u5757",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E3B\u9898\u677F\u5757"}]},J.a.createElement(Fe.a,{placeholder:"\u8BF7\u9009\u62E9\u4E3B\u9898\u677F\u5757",style:{width:260}},tt==null?void 0:tt.map(function(bt){return J.a.createElement(j,{value:bt.id},bt.name)}))),J.a.createElement(F.a.Item,{name:"children_forum_id",label:""},J.a.createElement(Fe.a,{style:{width:260,marginLeft:20}},_==null?void 0:_.map(function(bt){return J.a.createElement(j,{value:bt.id},bt.title)})))),J.a.createElement(F.a.Item,{name:"tag_id",label:"\u5E16\u5B50\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5E16\u5B50\u6807\u7B7E"}]},J.a.createElement(Fe.a,{style:{width:"260px"}},J.a.createElement(j,{value:1},"\u4EA4\u6D41"),J.a.createElement(j,{value:2},"\u6C42\u52A9"))),J.a.createElement(F.a.Item,{name:"is_original",label:"\u662F\u5426\u539F\u521B",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u539F\u521B"}]},J.a.createElement(Se.a.Group,null,J.a.createElement(Se.a,{value:1},"\u662F"),J.a.createElement(Se.a,{value:2},"\u5426"))),(h==null?void 0:h.is_original)===2&&J.a.createElement(F.a.Item,{name:"reprint_link",label:"\u8F6C\u8F7D\u81EA"},J.a.createElement(D.a,{style:{width:"260px"},placeholder:"\u8F6C\u8F7D\u94FE\u63A5"})),J.a.createElement($.a,{className:"mt20",align:"middle"},J.a.createElement(me.a,{onClick:pt},"\u8FD4\u56DE"),J.a.createElement(me.a,{loading:Je,className:"ml20",type:"primary",onClick:function(){return de.submit()}},"\u4FDD\u5B58"))))};Ge.default=Object(Oe.a)(function(c){var l=c.forumsDetail,m=c.globalSetting;return{forumsDetail:l,globalSetting:m}})(O)},DlQD:function(dt,Ge,C){(function(U,me){dt.exports=me()})(this,function(){"use strict";function U(_,k){for(var L=0;L<k.length;L++){var f=k[L];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(_,f.key,f)}}function me(_,k,L){return k&&U(_.prototype,k),L&&U(_,L),_}function re(_,k){if(!_)return;if(typeof _=="string")return Se(_,k);var L=Object.prototype.toString.call(_).slice(8,-1);if(L==="Object"&&_.constructor&&(L=_.constructor.name),L==="Map"||L==="Set")return Array.from(_);if(L==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(L))return Se(_,k)}function Se(_,k){(k==null||k>_.length)&&(k=_.length);for(var L=0,f=new Array(k);L<k;L++)f[L]=_[L];return f}function ye(_,k){var L;if(typeof Symbol=="undefined"||_[Symbol.iterator]==null){if(Array.isArray(_)||(L=re(_))||k&&_&&typeof _.length=="number"){L&&(_=L);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 L=_[Symbol.iterator](),L.next.bind(L)}function $(_,k){return k={exports:{}},_(k,k.exports),k.exports}var R=$(function(_){function k(){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 L(f){_.exports.defaults=f}_.exports={defaults:k(),getDefaults:k,changeDefaults:L}}),D=R.defaults,T=R.getDefaults,H=R.changeDefaults,X=/[&<>"']/,ee=/[&<>"']/g,be=/[<>"']|&(?!#?\w+;)/,ie=/[<>"']|&(?!#?\w+;)/g,F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P=function(k){return F[k]};function I(_,k){if(k){if(X.test(_))return _.replace(ee,P)}else if(be.test(_))return _.replace(ie,P);return _}var ae=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ne(_){return _.replace(ae,function(k,L){return L=L.toLowerCase(),L==="colon"?":":L.charAt(0)==="#"?L.charAt(1)==="x"?String.fromCharCode(parseInt(L.substring(2),16)):String.fromCharCode(+L.substring(1)):""})}var Le=/(^|[^\[])\^/g;function Fe(_,k){_=_.source||_,k=k||"";var L={replace:function(p,g){return g=g.source||g,g=g.replace(Le,"$1"),_=_.replace(p,g),L},getRegex:function(){return new RegExp(_,k)}};return L}var ce=/[^\w:]/g,Ce=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function De(_,k,L){if(_){var f;try{f=decodeURIComponent(ne(L)).replace(ce,"").toLowerCase()}catch(p){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}k&&!Ce.test(L)&&(L=y(k,L));try{L=encodeURI(L).replace(/%25/g,"%")}catch(p){return null}return L}var J={},pe=/^[^:]+:\/*[^/]*$/,Oe=/^([^:]+:)[\s\S]*$/,fe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(_,k){J[" "+_]||(pe.test(_)?J[" "+_]=_+"/":J[" "+_]=Q(_,"/",!0)),_=J[" "+_];var L=_.indexOf(":")===-1;return k.substring(0,2)==="//"?L?k:_.replace(Oe,"$1")+k:k.charAt(0)==="/"?L?k:_.replace(fe,"$1")+k:_+k}var Y={exec:function(){}};function z(_){for(var k=1,L,f;k<arguments.length;k++){L=arguments[k];for(f in L)Object.prototype.hasOwnProperty.call(L,f)&&(_[f]=L[f])}return _}function w(_,k){var L=_.replace(/\|/g,function(g,b,K){for(var le=!1,Me=b;--Me>=0&&K[Me]==="\\";)le=!le;return le?"|":" |"}),f=L.split(/ \|/),p=0;if(f.length>k)f.splice(k);else for(;f.length<k;)f.push("");for(;p<f.length;p++)f[p]=f[p].trim().replace(/\\\|/g,"|");return f}function Q(_,k,L){var f=_.length;if(f===0)return"";for(var p=0;p<f;){var g=_.charAt(f-p-1);if(g===k&&!L)p++;else if(g!==k&&L)p++;else break}return _.substr(0,f-p)}function j(_,k){if(_.indexOf(k[1])===-1)return-1;for(var L=_.length,f=0,p=0;p<L;p++)if(_[p]==="\\")p++;else if(_[p]===k[0])f++;else if(_[p]===k[1]&&(f--,f<0))return p;return-1}function M(_){_&&_.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 O={escape:I,unescape:ne,edit:Fe,cleanUrl:De,resolveUrl:y,noopTest:Y,merge:z,splitCells:w,rtrim:Q,findClosingBracket:j,checkSanitizeDeprecation:M},c=R.defaults,l=O.rtrim,m=O.splitCells,E=O.escape,N=O.findClosingBracket;function oe(_,k,L){var f=k.href,p=k.title?E(k.title):null,g=_[1].replace(/\\([\[\]])/g,"$1");return _[0].charAt(0)!=="!"?{type:"link",raw:L,href:f,title:p,text:g}:{type:"image",raw:L,href:f,title:p,text:E(g)}}function xe(_,k){var L=_.match(/^(\s+)(?:```)/);if(L===null)return k;var f=L[1];return k.split(`
`).map(function(p){var g=p.match(/^\s+/);if(g===null)return p;var b=g[0];return b.length>=f.length?p.slice(f.length):p}).join(`
`)}var te=function(){function _(L){this.options=L||c}var k=_.prototype;return k.space=function(f){var p=this.rules.block.newline.exec(f);if(p)return p[0].length>1?{type:"space",raw:p[0]}:{raw:`
`}},k.code=function(f,p){var g=this.rules.block.code.exec(f);if(g){var b=p[p.length-1];if(b&&b.type==="paragraph")return{raw:g[0],text:g[0].trimRight()};var K=g[0].replace(/^ {4}/gm,"");return{type:"code",raw:g[0],codeBlockStyle:"indented",text:this.options.pedantic?K:l(K,`
`)}}},k.fences=function(f){var p=this.rules.block.fences.exec(f);if(p){var g=p[0],b=xe(g,p[3]||"");return{type:"code",raw:g,lang:p[2]?p[2].trim():p[2],text:b}}},k.heading=function(f){var p=this.rules.block.heading.exec(f);if(p)return{type:"heading",raw:p[0],depth:p[1].length,text:p[2]}},k.nptable=function(f){var p=this.rules.block.nptable.exec(f);if(p){var g={type:"table",header:m(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(`
`):[],raw:p[0]};if(g.header.length===g.align.length){var b=g.align.length,K;for(K=0;K<b;K++)/^ *-+: *$/.test(g.align[K])?g.align[K]="right":/^ *:-+: *$/.test(g.align[K])?g.align[K]="center":/^ *:-+ *$/.test(g.align[K])?g.align[K]="left":g.align[K]=null;for(b=g.cells.length,K=0;K<b;K++)g.cells[K]=m(g.cells[K],g.header.length);return g}}},k.hr=function(f){var p=this.rules.block.hr.exec(f);if(p)return{type:"hr",raw:p[0]}},k.blockquote=function(f){var p=this.rules.block.blockquote.exec(f);if(p){var g=p[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:p[0],text:g}}},k.list=function(f){var p=this.rules.block.list.exec(f);if(p){for(var g=p[0],b=p[2],K=b.length>1,le=b[b.length-1]===")",Me={type:"list",raw:g,ordered:K,start:K?+b.slice(0,-1):"",loose:!1,items:[]},nt=p[0].match(this.rules.block.item),pt=!1,ot,bt,Ze,He,lt,ut,yt,kt=nt.length,ht=0;ht<kt;ht++)ot=nt[ht],g=ot,bt=ot.length,ot=ot.replace(/^ *([*+-]|\d+[.)]) */,""),~ot.indexOf(`
`)&&(bt-=ot.length,ot=this.options.pedantic?ot.replace(/^ {1,4}/gm,""):ot.replace(new RegExp("^ {1,"+bt+"}","gm"),"")),ht!==kt-1&&(Ze=this.rules.block.bullet.exec(nt[ht+1])[0],(K?Ze.length===1||!le&&Ze[Ze.length-1]===")":Ze.length>1||this.options.smartLists&&Ze!==b)&&(He=nt.slice(ht+1).join(`
`),Me.raw=Me.raw.substring(0,Me.raw.length-He.length),ht=kt-1)),lt=pt||/\n\n(?!\s*$)/.test(ot),ht!==kt-1&&(pt=ot.charAt(ot.length-1)===`
`,lt||(lt=pt)),lt&&(Me.loose=!0),ut=/^\[[ xX]\] /.test(ot),yt=void 0,ut&&(yt=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),Me.items.push({type:"list_item",raw:g,task:ut,checked:yt,loose:lt,text:ot});return Me}},k.html=function(f){var p=this.rules.block.html.exec(f);if(p)return{type:this.options.sanitize?"paragraph":"html",raw:p[0],pre:!this.options.sanitizer&&(p[1]==="pre"||p[1]==="script"||p[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(p[0]):E(p[0]):p[0]}},k.def=function(f){var p=this.rules.block.def.exec(f);if(p){p[3]&&(p[3]=p[3].substring(1,p[3].length-1));var g=p[1].toLowerCase().replace(/\s+/g," ");return{tag:g,raw:p[0],href:p[2],title:p[3]}}},k.table=function(f){var p=this.rules.block.table.exec(f);if(p){var g={type:"table",header:m(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(`
`):[]};if(g.header.length===g.align.length){g.raw=p[0];var b=g.align.length,K;for(K=0;K<b;K++)/^ *-+: *$/.test(g.align[K])?g.align[K]="right":/^ *:-+: *$/.test(g.align[K])?g.align[K]="center":/^ *:-+ *$/.test(g.align[K])?g.align[K]="left":g.align[K]=null;for(b=g.cells.length,K=0;K<b;K++)g.cells[K]=m(g.cells[K].replace(/^ *\| *| *\| *$/g,""),g.header.length);return g}}},k.lheading=function(f){var p=this.rules.block.lheading.exec(f);if(p)return{type:"heading",raw:p[0],depth:p[2].charAt(0)==="="?1:2,text:p[1]}},k.paragraph=function(f){var p=this.rules.block.paragraph.exec(f);if(p)return{type:"paragraph",raw:p[0],text:p[1].charAt(p[1].length-1)===`
`?p[1].slice(0,-1):p[1]}},k.text=function(f,p){var g=this.rules.block.text.exec(f);if(g){var b=p[p.length-1];return b&&b.type==="text"?{raw:g[0],text:g[0]}:{type:"text",raw:g[0],text:g[0]}}},k.escape=function(f){var p=this.rules.inline.escape.exec(f);if(p)return{type:"escape",raw:p[0],text:E(p[1])}},k.tag=function(f,p,g){var b=this.rules.inline.tag.exec(f);if(b)return!p&&/^<a /i.test(b[0])?p=!0:p&&/^<\/a>/i.test(b[0])&&(p=!1),!g&&/^<(pre|code|kbd|script)(\s|>)/i.test(b[0])?g=!0:g&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(b[0])&&(g=!1),{type:this.options.sanitize?"text":"html",raw:b[0],inLink:p,inRawBlock:g,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):E(b[0]):b[0]}},k.link=function(f){var p=this.rules.inline.link.exec(f);if(p){var g=N(p[2],"()");if(g>-1){var b=p[0].indexOf("!")===0?5:4,K=b+p[1].length+g;p[2]=p[2].substring(0,g),p[0]=p[0].substring(0,K).trim(),p[3]=""}var le=p[2],Me="";if(this.options.pedantic){var nt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(le);nt?(le=nt[1],Me=nt[3]):Me=""}else Me=p[3]?p[3].slice(1,-1):"";le=le.trim().replace(/^<([\s\S]*)>$/,"$1");var pt=oe(p,{href:le&&le.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},p[0]);return pt}},k.reflink=function(f,p){var g;if((g=this.rules.inline.reflink.exec(f))||(g=this.rules.inline.nolink.exec(f))){var b=(g[2]||g[1]).replace(/\s+/g," ");if(b=p[b.toLowerCase()],!b||!b.href){var K=g[0].charAt(0);return{type:"text",raw:K,text:K}}var le=oe(g,b,g[0]);return le}},k.strong=function(f,p,g){g===void 0&&(g="");var b=this.rules.inline.strong.start.exec(f);if(b&&(!b[1]||b[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){p=p.slice(-1*f.length);var K=b[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;K.lastIndex=0;for(var le;(b=K.exec(p))!=null;)if(le=this.rules.inline.strong.middle.exec(p.slice(0,b.index+3)),le)return{type:"strong",raw:f.slice(0,le[0].length),text:f.slice(2,le[0].length-2)}}},k.em=function(f,p,g){g===void 0&&(g="");var b=this.rules.inline.em.start.exec(f);if(b&&(!b[1]||b[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){p=p.slice(-1*f.length);var K=b[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;K.lastIndex=0;for(var le;(b=K.exec(p))!=null;)if(le=this.rules.inline.em.middle.exec(p.slice(0,b.index+2)),le)return{type:"em",raw:f.slice(0,le[0].length),text:f.slice(1,le[0].length-1)}}},k.codespan=function(f){var p=this.rules.inline.code.exec(f);if(p){var g=p[2].replace(/\n/g," "),b=/[^ ]/.test(g),K=g.startsWith(" ")&&g.endsWith(" ");return b&&K&&(g=g.substring(1,g.length-1)),g=E(g,!0),{type:"codespan",raw:p[0],text:g}}},k.br=function(f){var p=this.rules.inline.br.exec(f);if(p)return{type:"br",raw:p[0]}},k.del=function(f){var p=this.rules.inline.del.exec(f);if(p)return{type:"del",raw:p[0],text:p[1]}},k.autolink=function(f,p){var g=this.rules.inline.autolink.exec(f);if(g){var b,K;return g[2]==="@"?(b=E(this.options.mangle?p(g[1]):g[1]),K="mailto:"+b):(b=E(g[1]),K=b),{type:"link",raw:g[0],text:b,href:K,tokens:[{type:"text",raw:b,text:b}]}}},k.url=function(f,p){var g;if(g=this.rules.inline.url.exec(f)){var b,K;if(g[2]==="@")b=E(this.options.mangle?p(g[0]):g[0]),K="mailto:"+b;else{var le;do le=g[0],g[0]=this.rules.inline._backpedal.exec(g[0])[0];while(le!==g[0]);b=E(g[0]),g[1]==="www."?K="http://"+b:K=b}return{type:"link",raw:g[0],text:b,href:K,tokens:[{type:"text",raw:b,text:b}]}}},k.inlineText=function(f,p,g){var b=this.rules.inline.text.exec(f);if(b){var K;return p?K=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):E(b[0]):b[0]:K=E(this.options.smartypants?g(b[0]):b[0]),{type:"text",raw:b[0],text:K}}},_}(),_e=O.noopTest,se=O.edit,de=O.merge,W={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:_e,table:_e,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};W._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,W._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,W.def=se(W.def).replace("label",W._label).replace("title",W._title).getRegex(),W.bullet=/(?:[*+-]|\d{1,9}[.)])/,W.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,W.item=se(W.item,"gm").replace(/bull/g,W.bullet).getRegex(),W.list=se(W.list).replace(/bull/g,W.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+W.def.source+")").getRegex(),W._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",W._comment=/<!--(?!-?>)[\s\S]*?-->/,W.html=se(W.html,"i").replace("comment",W._comment).replace("tag",W._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W.paragraph=se(W._paragraph).replace("hr",W.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",W._tag).getRegex(),W.blockquote=se(W.blockquote).replace("paragraph",W.paragraph).getRegex(),W.normal=de({},W),W.gfm=de({},W.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*|$)"}),W.gfm.nptable=se(W.gfm.nptable).replace("hr",W.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",W._tag).getRegex(),W.gfm.table=se(W.gfm.table).replace("hr",W.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",W._tag).getRegex(),W.pedantic=de({},W.normal,{html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W._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:_e,paragraph:se(W.normal._paragraph).replace("hr",W.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",W.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_e,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:_e,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};q._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",q.punctuation=se(q.punctuation).replace(/punctuation/g,q._punctuation).getRegex(),q._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",q._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",q.em.start=se(q.em.start).replace(/punctuation/g,q._punctuation).getRegex(),q.em.middle=se(q.em.middle).replace(/punctuation/g,q._punctuation).replace(/overlapSkip/g,q._overlapSkip).getRegex(),q.em.endAst=se(q.em.endAst,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.em.endUnd=se(q.em.endUnd,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.strong.start=se(q.strong.start).replace(/punctuation/g,q._punctuation).getRegex(),q.strong.middle=se(q.strong.middle).replace(/punctuation/g,q._punctuation).replace(/blockSkip/g,q._blockSkip).getRegex(),q.strong.endAst=se(q.strong.endAst,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.strong.endUnd=se(q.strong.endUnd,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.blockSkip=se(q._blockSkip,"g").getRegex(),q.overlapSkip=se(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=se(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=se(q.tag).replace("comment",W._comment).replace("attribute",q._attribute).getRegex(),q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,q.link=se(q.link).replace("label",q._label).replace("href",q._href).replace("title",q._title).getRegex(),q.reflink=se(q.reflink).replace("label",q._label).getRegex(),q.reflinkSearch=se(q.reflinkSearch,"g").replace("reflink",q.reflink).replace("nolink",q.nolink).getRegex(),q.normal=de({},q),q.pedantic=de({},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:se(/^!?\[(label)\]\((.*?)\)/).replace("label",q._label).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q._label).getRegex()}),q.gfm=de({},q.normal,{escape:se(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=se(q.gfm.url,"i").replace("email",q.gfm._extended_email).getRegex(),q.breaks=de({},q.gfm,{br:se(q.br).replace("{2,}","*").getRegex(),text:se(q.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var h={block:W,inline:q},S=R.defaults,v=h.block,Z=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 k="",L,f,p=_.length;for(L=0;L<p;L++)f=_.charCodeAt(L),Math.random()>.5&&(f="x"+f.toString(16)),k+="&#"+f+";";return k}var he=function(){function _(L){this.tokens=[],this.tokens.links=Object.create(null),this.options=L||S,this.options.tokenizer=this.options.tokenizer||new te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:v.normal,inline:Z.normal};this.options.pedantic?(f.block=v.pedantic,f.inline=Z.pedantic):this.options.gfm&&(f.block=v.gfm,this.options.breaks?f.inline=Z.breaks:f.inline=Z.gfm),this.tokenizer.rules=f}_.lex=function(f,p){var g=new _(p);return g.lex(f)};var k=_.prototype;return k.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},k.blockTokens=function(f,p,g){p===void 0&&(p=[]),g===void 0&&(g=!0),f=f.replace(/^ +$/gm,"");for(var b,K,le,Me;f;){if(b=this.tokenizer.space(f)){f=f.substring(b.raw.length),b.type&&p.push(b);continue}if(b=this.tokenizer.code(f,p)){f=f.substring(b.raw.length),b.type?p.push(b):(Me=p[p.length-1],Me.raw+=`
`+b.raw,Me.text+=`
`+b.text);continue}if(b=this.tokenizer.fences(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.heading(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.nptable(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.hr(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.blockquote(f)){f=f.substring(b.raw.length),b.tokens=this.blockTokens(b.text,[],g),p.push(b);continue}if(b=this.tokenizer.list(f)){for(f=f.substring(b.raw.length),le=b.items.length,K=0;K<le;K++)b.items[K].tokens=this.blockTokens(b.items[K].text,[],!1);p.push(b);continue}if(b=this.tokenizer.html(f)){f=f.substring(b.raw.length),p.push(b);continue}if(g&&(b=this.tokenizer.def(f))){f=f.substring(b.raw.length),this.tokens.links[b.tag]||(this.tokens.links[b.tag]={href:b.href,title:b.title});continue}if(b=this.tokenizer.table(f)){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.lheading(f)){f=f.substring(b.raw.length),p.push(b);continue}if(g&&(b=this.tokenizer.paragraph(f))){f=f.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.text(f,p)){f=f.substring(b.raw.length),b.type?p.push(b):(Me=p[p.length-1],Me.raw+=`
`+b.raw,Me.text+=`
`+b.text);continue}if(f){var nt="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(nt);break}else throw new Error(nt)}}return p},k.inline=function(f){var p,g,b,K,le,Me,nt=f.length;for(p=0;p<nt;p++){Me=f[p];switch(Me.type){case"paragraph":case"text":case"heading":{Me.tokens=[],this.inlineTokens(Me.text,Me.tokens);break}case"table":{for(Me.tokens={header:[],cells:[]},K=Me.header.length,g=0;g<K;g++)Me.tokens.header[g]=[],this.inlineTokens(Me.header[g],Me.tokens.header[g]);for(K=Me.cells.length,g=0;g<K;g++)for(le=Me.cells[g],Me.tokens.cells[g]=[],b=0;b<le.length;b++)Me.tokens.cells[g][b]=[],this.inlineTokens(le[b],Me.tokens.cells[g][b]);break}case"blockquote":{this.inline(Me.tokens);break}case"list":{for(K=Me.items.length,g=0;g<K;g++)this.inline(Me.items[g].tokens);break}}}return f},k.inlineTokens=function(f,p,g,b,K){p===void 0&&(p=[]),g===void 0&&(g=!1),b===void 0&&(b=!1),K===void 0&&(K="");var le,Me=f,nt;if(this.tokens.links){var pt=Object.keys(this.tokens.links);if(pt.length>0)for(;(nt=this.tokenizer.rules.inline.reflinkSearch.exec(Me))!=null;)pt.includes(nt[0].slice(nt[0].lastIndexOf("[")+1,-1))&&(Me=Me.slice(0,nt.index)+"["+"a".repeat(nt[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(nt=this.tokenizer.rules.inline.blockSkip.exec(Me))!=null;)Me=Me.slice(0,nt.index)+"["+"a".repeat(nt[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(le=this.tokenizer.escape(f)){f=f.substring(le.raw.length),p.push(le);continue}if(le=this.tokenizer.tag(f,g,b)){f=f.substring(le.raw.length),g=le.inLink,b=le.inRawBlock,p.push(le);continue}if(le=this.tokenizer.link(f)){f=f.substring(le.raw.length),le.type==="link"&&(le.tokens=this.inlineTokens(le.text,[],!0,b)),p.push(le);continue}if(le=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(le.raw.length),le.type==="link"&&(le.tokens=this.inlineTokens(le.text,[],!0,b)),p.push(le);continue}if(le=this.tokenizer.strong(f,Me,K)){f=f.substring(le.raw.length),le.tokens=this.inlineTokens(le.text,[],g,b),p.push(le);continue}if(le=this.tokenizer.em(f,Me,K)){f=f.substring(le.raw.length),le.tokens=this.inlineTokens(le.text,[],g,b),p.push(le);continue}if(le=this.tokenizer.codespan(f)){f=f.substring(le.raw.length),p.push(le);continue}if(le=this.tokenizer.br(f)){f=f.substring(le.raw.length),p.push(le);continue}if(le=this.tokenizer.del(f)){f=f.substring(le.raw.length),le.tokens=this.inlineTokens(le.text,[],g,b),p.push(le);continue}if(le=this.tokenizer.autolink(f,G)){f=f.substring(le.raw.length),p.push(le);continue}if(!g&&(le=this.tokenizer.url(f,G))){f=f.substring(le.raw.length),p.push(le);continue}if(le=this.tokenizer.inlineText(f,b,ue)){f=f.substring(le.raw.length),K=le.raw.slice(-1),p.push(le);continue}if(f){var ot="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return p},me(_,null,[{key:"rules",get:function(){return{block:v,inline:Z}}}]),_}(),Te=R.defaults,Pe=O.cleanUrl,Ne=O.escape,Ee=function(){function _(L){this.options=L||Te}var k=_.prototype;return k.code=function(f,p,g){var b=(p||"").match(/\S*/)[0];if(this.options.highlight){var K=this.options.highlight(f,b);K!=null&&K!==f&&(g=!0,f=K)}return b?'<pre><code class="'+this.options.langPrefix+Ne(b,!0)+'">'+(g?f:Ne(f,!0))+`</code></pre>
`:"<pre><code>"+(g?f:Ne(f,!0))+`</code></pre>
`},k.blockquote=function(f){return`<blockquote>
`+f+`</blockquote>
`},k.html=function(f){return f},k.heading=function(f,p,g,b){return this.options.headerIds?"<h"+p+' id="'+this.options.headerPrefix+b.slug(g)+'">'+f+"</h"+p+`>
`:"<h"+p+">"+f+"</h"+p+`>
`},k.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},k.list=function(f,p,g){var b=p?"ol":"ul",K=p&&g!==1?' start="'+g+'"':"";return"<"+b+K+`>
`+f+"</"+b+`>
`},k.listitem=function(f){return"<li>"+f+`</li>
`},k.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},k.paragraph=function(f){return"<p>"+f+`</p>
`},k.table=function(f,p){return p&&(p="<tbody>"+p+"</tbody>"),`<table>
<thead>
`+f+`</thead>
`+p+`</table>
`},k.tablerow=function(f){return`<tr>
`+f+`</tr>
`},k.tablecell=function(f,p){var g=p.header?"th":"td",b=p.align?"<"+g+' align="'+p.align+'">':"<"+g+">";return b+f+"</"+g+`>
`},k.strong=function(f){return"<strong>"+f+"</strong>"},k.em=function(f){return"<em>"+f+"</em>"},k.codespan=function(f){return"<code>"+f+"</code>"},k.br=function(){return this.options.xhtml?"<br/>":"<br>"},k.del=function(f){return"<del>"+f+"</del>"},k.link=function(f,p,g){if(f=Pe(this.options.sanitize,this.options.baseUrl,f),f===null)return g;var b='<a href="'+Ne(f)+'"';return p&&(b+=' title="'+p+'"'),b+=">"+g+"</a>",b},k.image=function(f,p,g){if(f=Pe(this.options.sanitize,this.options.baseUrl,f),f===null)return g;var b='<img src="'+f+'" alt="'+g+'"';return p&&(b+=' title="'+p+'"'),b+=this.options.xhtml?"/>":">",b},k.text=function(f){return f},_}(),ke=function(){function _(){}var k=_.prototype;return k.strong=function(f){return f},k.em=function(f){return f},k.codespan=function(f){return f},k.del=function(f){return f},k.html=function(f){return f},k.text=function(f){return f},k.link=function(f,p,g){return""+g},k.image=function(f,p,g){return""+g},k.br=function(){return""},_}(),Je=function(){function _(){this.seen={}}var k=_.prototype;return k.slug=function(f){var p=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(p)){var g=p;do this.seen[g]++,p=g+"-"+this.seen[g];while(this.seen.hasOwnProperty(p))}return this.seen[p]=0,p},_}(),Ye=R.defaults,Ve=O.unescape,Ke=function(){function _(L){this.options=L||Ye,this.options.renderer=this.options.renderer||new Ee,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ke,this.slugger=new Je}_.parse=function(f,p){var g=new _(p);return g.parse(f)};var k=_.prototype;return k.parse=function(f,p){p===void 0&&(p=!0);var g="",b,K,le,Me,nt,pt,ot,bt,Ze,He,lt,ut,yt,kt,ht,an,Gt,Xt,gn=f.length;for(b=0;b<gn;b++){He=f[b];switch(He.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{g+=this.renderer.heading(this.parseInline(He.tokens),He.depth,Ve(this.parseInline(He.tokens,this.textRenderer)),this.slugger);continue}case"code":{g+=this.renderer.code(He.text,He.lang,He.escaped);continue}case"table":{for(bt="",ot="",Me=He.header.length,K=0;K<Me;K++)ot+=this.renderer.tablecell(this.parseInline(He.tokens.header[K]),{header:!0,align:He.align[K]});for(bt+=this.renderer.tablerow(ot),Ze="",Me=He.cells.length,K=0;K<Me;K++){for(pt=He.tokens.cells[K],ot="",nt=pt.length,le=0;le<nt;le++)ot+=this.renderer.tablecell(this.parseInline(pt[le]),{header:!1,align:He.align[le]});Ze+=this.renderer.tablerow(ot)}g+=this.renderer.table(bt,Ze);continue}case"blockquote":{Ze=this.parse(He.tokens),g+=this.renderer.blockquote(Ze);continue}case"list":{for(lt=He.ordered,ut=He.start,yt=He.loose,Me=He.items.length,Ze="",K=0;K<Me;K++)ht=He.items[K],an=ht.checked,Gt=ht.task,kt="",ht.task&&(Xt=this.renderer.checkbox(an),yt?ht.tokens.length>0&&ht.tokens[0].type==="text"?(ht.tokens[0].text=Xt+" "+ht.tokens[0].text,ht.tokens[0].tokens&&ht.tokens[0].tokens.length>0&&ht.tokens[0].tokens[0].type==="text"&&(ht.tokens[0].tokens[0].text=Xt+" "+ht.tokens[0].tokens[0].text)):ht.tokens.unshift({type:"text",text:Xt}):kt+=Xt),kt+=this.parse(ht.tokens,yt),Ze+=this.renderer.listitem(kt,Gt,an);g+=this.renderer.list(Ze,lt,ut);continue}case"html":{g+=this.renderer.html(He.text);continue}case"paragraph":{g+=this.renderer.paragraph(this.parseInline(He.tokens));continue}case"text":{for(Ze=He.tokens?this.parseInline(He.tokens):He.text;b+1<gn&&f[b+1].type==="text";)He=f[++b],Ze+=`
`+(He.tokens?this.parseInline(He.tokens):He.text);g+=p?this.renderer.paragraph(Ze):Ze;continue}default:{var vn='Token with "'+He.type+'" type was not found.';if(this.options.silent){console.error(vn);return}else throw new Error(vn)}}}return g},k.parseInline=function(f,p){p=p||this.renderer;var g="",b,K,le=f.length;for(b=0;b<le;b++){K=f[b];switch(K.type){case"escape":{g+=p.text(K.text);break}case"html":{g+=p.html(K.text);break}case"link":{g+=p.link(K.href,K.title,this.parseInline(K.tokens,p));break}case"image":{g+=p.image(K.href,K.title,K.text);break}case"strong":{g+=p.strong(this.parseInline(K.tokens,p));break}case"em":{g+=p.em(this.parseInline(K.tokens,p));break}case"codespan":{g+=p.codespan(K.text);break}case"br":{g+=p.br();break}case"del":{g+=p.del(this.parseInline(K.tokens,p));break}case"text":{g+=p.text(K.text);break}default:{var Me='Token with "'+K.type+'" type was not found.';if(this.options.silent){console.error(Me);return}else throw new Error(Me)}}}return g},_}(),at=O.merge,et=O.checkSanitizeDeprecation,qe=O.escape,ve=R.getDefaults,tt=R.changeDefaults,$e=R.defaults;function we(_,k,L){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 k=="function"&&(L=k,k=null),k=at({},we.defaults,k||{}),et(k),L){var f=k.highlight,p;try{p=he.lex(_,k)}catch(le){return L(le)}var g=function(Me){var nt;if(!Me)try{nt=Ke.parse(p,k)}catch(pt){Me=pt}return k.highlight=f,Me?L(Me):L(null,nt)};if(!f||f.length<3)return g();if(delete k.highlight,!p.length)return g();var b=0;we.walkTokens(p,function(le){le.type==="code"&&(b++,setTimeout(function(){f(le.text,le.lang,function(Me,nt){if(Me)return g(Me);nt!=null&&nt!==le.text&&(le.text=nt,le.escaped=!0),b--,b===0&&g()})},0))}),b===0&&g();return}try{var K=he.lex(_,k);return k.walkTokens&&we.walkTokens(K,k.walkTokens),Ke.parse(K,k)}catch(le){if(le.message+=`
Please report this to https://github.com/markedjs/marked.`,k.silent)return"<p>An error occurred:</p><pre>"+qe(le.message+"",!0)+"</pre>";throw le}}we.options=we.setOptions=function(_){return at(we.defaults,_),tt(we.defaults),we},we.getDefaults=ve,we.defaults=$e,we.use=function(_){var k=at({},_);if(_.renderer&&function(){var f=we.defaults.renderer||new Ee,p=function(K){var le=f[K];f[K]=function(){for(var Me=arguments.length,nt=new Array(Me),pt=0;pt<Me;pt++)nt[pt]=arguments[pt];var ot=_.renderer[K].apply(f,nt);return ot===!1&&(ot=le.apply(f,nt)),ot}};for(var g in _.renderer)p(g);k.renderer=f}(),_.tokenizer&&function(){var f=we.defaults.tokenizer||new te,p=function(K){var le=f[K];f[K]=function(){for(var Me=arguments.length,nt=new Array(Me),pt=0;pt<Me;pt++)nt[pt]=arguments[pt];var ot=_.tokenizer[K].apply(f,nt);return ot===!1&&(ot=le.apply(f,nt)),ot}};for(var g in _.tokenizer)p(g);k.tokenizer=f}(),_.walkTokens){var L=we.defaults.walkTokens;k.walkTokens=function(f){_.walkTokens(f),L&&L(f)}}we.setOptions(k)},we.walkTokens=function(_,k){for(var L=ye(_),f;!(f=L()).done;){var p=f.value;k(p);switch(p.type){case"table":{for(var g=ye(p.tokens.header),b;!(b=g()).done;){var K=b.value;we.walkTokens(K,k)}for(var le=ye(p.tokens.cells),Me;!(Me=le()).done;)for(var nt=Me.value,pt=ye(nt),ot;!(ot=pt()).done;){var bt=ot.value;we.walkTokens(bt,k)}break}case"list":{we.walkTokens(p.items,k);break}default:p.tokens&&we.walkTokens(p.tokens,k)}}},we.Parser=Ke,we.parser=Ke.parse,we.Renderer=Ee,we.TextRenderer=ke,we.Lexer=he,we.lexer=he.lex,we.Tokenizer=te,we.Slugger=Je,we.parse=we;var Ie=we;return Ie})},ELLl:function(dt,Ge,C){(function(U){U(C("VrN/"))})(function(U){var me={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},re=U.Pos;U.defineOption("autoCloseBrackets",!1,function(F,P,I){I&&I!=U.Init&&(F.removeKeyMap(ye),F.state.closeBrackets=null),P&&($(Se(P,"pairs")),F.state.closeBrackets=P,F.addKeyMap(ye))});function Se(F,P){return P=="pairs"&&typeof F=="string"?F:typeof F=="object"&&F[P]!=null?F[P]:me[P]}var ye={Backspace:T,Enter:H};function $(F){for(var P=0;P<F.length;P++){var I=F.charAt(P),ae="'"+I+"'";ye[ae]||(ye[ae]=R(I))}}$(me.pairs+"`");function R(F){return function(P){return ee(P,F)}}function D(F){var P=F.state.closeBrackets;if(!P||P.override)return P;var I=F.getModeAt(F.getCursor());return I.closeBrackets||P}function T(F){var P=D(F);if(!P||F.getOption("disableInput"))return U.Pass;for(var I=Se(P,"pairs"),ae=F.listSelections(),ne=0;ne<ae.length;ne++){if(!ae[ne].empty())return U.Pass;var Le=be(F,ae[ne].head);if(!Le||I.indexOf(Le)%2!=0)return U.Pass}for(var ne=ae.length-1;ne>=0;ne--){var Fe=ae[ne].head;F.replaceRange("",re(Fe.line,Fe.ch-1),re(Fe.line,Fe.ch+1),"+delete")}}function H(F){var P=D(F),I=P&&Se(P,"explode");if(!I||F.getOption("disableInput"))return U.Pass;for(var ae=F.listSelections(),ne=0;ne<ae.length;ne++){if(!ae[ne].empty())return U.Pass;var Le=be(F,ae[ne].head);if(!Le||I.indexOf(Le)%2!=0)return U.Pass}F.operation(function(){var Fe=F.lineSeparator()||`
`;F.replaceSelection(Fe+Fe,null),F.execCommand("goCharLeft"),ae=F.listSelections();for(var ce=0;ce<ae.length;ce++){var Ce=ae[ce].head.line;F.indentLine(Ce,null,!0),F.indentLine(Ce+1,null,!0)}})}function X(F){var P=U.cmpPos(F.anchor,F.head)>0;return{anchor:new re(F.anchor.line,F.anchor.ch+(P?-1:1)),head:new re(F.head.line,F.head.ch+(P?1:-1))}}function ee(F,P){var I=D(F);if(!I||F.getOption("disableInput"))return U.Pass;var ae=Se(I,"pairs"),ne=ae.indexOf(P);if(ne==-1)return U.Pass;for(var Le=Se(I,"closeBefore"),Fe=Se(I,"triples"),ce=ae.charAt(ne+1)==P,Ce=F.listSelections(),De=ne%2==0,J,pe=0;pe<Ce.length;pe++){var Oe=Ce[pe],fe=Oe.head,y,Y=F.getRange(fe,re(fe.line,fe.ch+1));if(De&&!Oe.empty())y="surround";else if((ce||!De)&&Y==P)ce&&ie(F,fe)?y="both":Fe.indexOf(P)>=0&&F.getRange(fe,re(fe.line,fe.ch+3))==P+P+P?y="skipThree":y="skip";else if(ce&&fe.ch>1&&Fe.indexOf(P)>=0&&F.getRange(re(fe.line,fe.ch-2),fe)==P+P){if(fe.ch>2&&/\bstring/.test(F.getTokenTypeAt(re(fe.line,fe.ch-2))))return U.Pass;y="addFour"}else if(ce){var z=fe.ch==0?" ":F.getRange(re(fe.line,fe.ch-1),fe);if(!U.isWordChar(Y)&&z!=P&&!U.isWordChar(z))y="both";else return U.Pass}else if(De&&(Y.length===0||/\s/.test(Y)||Le.indexOf(Y)>-1))y="both";else return U.Pass;if(!J)J=y;else if(J!=y)return U.Pass}var w=ne%2?ae.charAt(ne-1):P,Q=ne%2?P:ae.charAt(ne+1);F.operation(function(){if(J=="skip")F.execCommand("goCharRight");else if(J=="skipThree")for(var j=0;j<3;j++)F.execCommand("goCharRight");else if(J=="surround"){for(var M=F.getSelections(),j=0;j<M.length;j++)M[j]=w+M[j]+Q;F.replaceSelections(M,"around"),M=F.listSelections().slice();for(var j=0;j<M.length;j++)M[j]=X(M[j]);F.setSelections(M)}else J=="both"?(F.replaceSelection(w+Q,null),F.triggerElectric(w+Q),F.execCommand("goCharLeft")):J=="addFour"&&(F.replaceSelection(w+w+w+w,"before"),F.execCommand("goCharRight"))})}function be(F,P){var I=F.getRange(re(P.line,P.ch-1),re(P.line,P.ch+1));return I.length==2?I:null}function ie(F,P){var I=F.getTokenAt(re(P.line,P.ch+1));return/\bstring/.test(I.type)&&I.start==P.ch&&(P.ch==0||!/\bstring/.test(F.getTokenTypeAt(P)))}})},GfqC:function(dt,Ge,C){"use strict";var U=C("q1tI"),me=C.n(U),re=C("TSYQ"),Se=C.n(re);function ye(O,c){var l="cannot "+O.method+" "+O.action+" "+c.status+"'",m=new Error(l);return m.status=c.status,m.method=O.method,m.url=O.action,m}function $(O){var c=O.responseText||O.response;if(!c)return c;try{return JSON.parse(c)}catch(l){return c}}function R(O){var c=new XMLHttpRequest;O.onProgress&&c.upload&&(c.upload.onprogress=function(N){N.total>0&&(N.percent=N.loaded/N.total*100),O.onProgress(N)});var l=new FormData;O.data&&Object.keys(O.data).forEach(function(E){var N=O.data[E];if(Array.isArray(N)){N.forEach(function(oe){l.append(E+"[]",oe)});return}l.append(E,O.data[E])}),O.file instanceof Blob?l.append(O.filename,O.file,O.file.name):l.append(O.filename,O.file),c.onerror=function(N){O.onError(N)},c.onload=function(){return c.status<200||c.status>=300?O.onError(ye(O,c),$(c)):O.onSuccess($(c),c)},c.open(O.method,O.action,!0),O.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var m=O.headers||{};return m["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(m).forEach(function(E){m[E]!==null&&c.setRequestHeader(E,m[E])}),c.send(l),{abort:function(){c.abort()}}}var D=+new Date,T=0;function H(){return"rc-upload-"+D+"-"+ ++T}function X(O,c){return O.indexOf(c,O.length-c.length)!==-1}var ee=function(O,c){if(O&&c){var l=Array.isArray(c)?c:c.split(","),m=O.name||"",E=O.type||"",N=E.replace(/\/.*$/,"");return l.some(function(oe){var xe=oe.trim();return xe.charAt(0)==="."?X(m.toLowerCase(),xe.toLowerCase()):/\/\*$/.test(xe)?N===xe.replace(/\/.*$/,""):E===xe})}return!0};function be(O,c){var l=O.createReader(),m=[];function E(){l.readEntries(function(N){var oe=Array.prototype.slice.apply(N);m=m.concat(oe);var xe=!oe.length;xe?c(m):E()})}E()}var ie=function(c,l,m){var E=function N(oe,xe){xe=xe||"",oe.isFile?oe.file(function(te){m(te)&&(oe.fullPath&&!te.webkitRelativePath&&(Object.defineProperties(te,{webkitRelativePath:{writable:!0}}),te.webkitRelativePath=oe.fullPath.replace(/^\//,""),Object.defineProperties(te,{webkitRelativePath:{writable:!1}})),l([te]))}):oe.isDirectory&&be(oe,function(te){te.forEach(function(_e){N(_e,""+xe+oe.name+"/")})})};c.forEach(function(N){E(N.webkitGetAsEntry())})},F=ie,P=Object.assign||function(O){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var m in l)Object.prototype.hasOwnProperty.call(l,m)&&(O[m]=l[m])}return O},I=function(){function O(c,l){var m=[],E=!0,N=!1,oe=void 0;try{for(var xe=c[Symbol.iterator](),te;!(E=(te=xe.next()).done)&&!(m.push(te.value),l&&m.length===l);E=!0);}catch(_e){N=!0,oe=_e}finally{try{!E&&xe.return&&xe.return()}finally{if(N)throw oe}}return m}return function(c,l){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return O(c,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ae=function(){function O(c,l){for(var m=0;m<l.length;m++){var E=l[m];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(c,E.key,E)}}return function(c,l,m){return l&&O(c.prototype,l),m&&O(c,m),c}}();function ne(O,c,l){return c in O?Object.defineProperty(O,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):O[c]=l,O}function Le(O,c){var l={};for(var m in O){if(c.indexOf(m)>=0)continue;if(!Object.prototype.hasOwnProperty.call(O,m))continue;l[m]=O[m]}return l}function Fe(O,c){if(!(O instanceof c))throw new TypeError("Cannot call a class as a function")}function ce(O,c){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:O}function Ce(O,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);O.prototype=Object.create(c&&c.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(O,c):O.__proto__=c)}var De=function(c){return Object.keys(c).reduce(function(l,m){return(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(l[m]=c[m]),l},{})},J=function(O){Ce(c,O);function c(){var l,m,E,N;Fe(this,c);for(var oe=arguments.length,xe=Array(oe),te=0;te<oe;te++)xe[te]=arguments[te];return N=(m=(E=ce(this,(l=c.__proto__||Object.getPrototypeOf(c)).call.apply(l,[this].concat(xe))),E),E.state={uid:H()},E.reqs={},E.onChange=function(_e){var se=_e.target.files;E.uploadFiles(se),E.reset()},E.onClick=function(_e){var se=E.fileInput;if(!se)return;var de=E.props,W=de.children,q=de.onClick;W&&W.type==="button"&&(se.parentNode.focus(),se.parentNode.querySelector("button").blur()),se.click(),q&&q(_e)},E.onKeyDown=function(_e){_e.key==="Enter"&&E.onClick()},E.onFileDrop=function(_e){var se=E.props.multiple;if(_e.preventDefault(),_e.type==="dragover")return;if(E.props.directory)F(Array.prototype.slice.call(_e.dataTransfer.items),E.uploadFiles,function(W){return ee(W,E.props.accept)});else{var de=Array.prototype.slice.call(_e.dataTransfer.files).filter(function(W){return ee(W,E.props.accept)});se===!1&&(de=de.slice(0,1)),E.uploadFiles(de)}},E.uploadFiles=function(_e){var se=Array.prototype.slice.call(_e);se.map(function(de){return de.uid=H(),de}).forEach(function(de){E.upload(de,se)})},E.saveFileInput=function(_e){E.fileInput=_e},m),ce(E,N)}return ae(c,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(m,E){var N=this,oe=this.props;if(!oe.beforeUpload)return setTimeout(function(){return N.post(m)},0);var xe=oe.beforeUpload(m,E);xe&&xe.then?xe.then(function(te){var _e=Object.prototype.toString.call(te);return _e==="[object File]"||_e==="[object Blob]"?N.post(te):N.post(m)}).catch(function(te){console.log(te)}):xe!==!1&&setTimeout(function(){return N.post(m)},0);return}},{key:"post",value:function(m){var E=this;if(!this._isMounted)return;var N=this.props,oe=N.onStart,xe=N.onProgress,te=N.transformFile,_e=te===void 0?function(se){return se}:te;new Promise(function(se){var de=N.action;return typeof de=="function"&&(de=de(m)),se(de)}).then(function(se){var de=m.uid,W=N.customRequest||R,q=Promise.resolve(_e(m)).then(function(h){var S=N.data;return typeof S=="function"&&(S=S(h)),Promise.all([h,S])}).catch(function(h){console.error(h)});q.then(function(h){var S=I(h,2),v=S[0],Z=S[1],ue={action:se,filename:N.name,data:Z,file:v,headers:N.headers,withCredentials:N.withCredentials,method:N.method||"post",onProgress:xe?function(G){xe(G,m)}:null,onSuccess:function(he,Te){delete E.reqs[de],N.onSuccess(he,m,Te)},onError:function(he,Te){delete E.reqs[de],N.onError(he,Te,m)}};oe(m),E.reqs[de]=W(ue)})})}},{key:"reset",value:function(){this.setState({uid:H()})}},{key:"abort",value:function(m){var E=this.reqs;if(m){var N=m;m&&m.uid&&(N=m.uid),E[N]&&E[N].abort&&E[N].abort(),delete E[N]}else Object.keys(E).forEach(function(oe){E[oe]&&E[oe].abort&&E[oe].abort(),delete E[oe]})}},{key:"render",value:function(){var m,E=this.props,N=E.component,oe=E.prefixCls,xe=E.className,te=E.disabled,_e=E.id,se=E.style,de=E.multiple,W=E.accept,q=E.children,h=E.directory,S=E.openFileDialogOnClick,v=E.onMouseEnter,Z=E.onMouseLeave,ue=Le(E,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),G=Se()((m={},ne(m,oe,!0),ne(m,oe+"-disabled",te),ne(m,xe,xe),m)),he=te?{}:{onClick:S?this.onClick:function(){},onKeyDown:S?this.onKeyDown:function(){},onMouseEnter:v,onMouseLeave:Z,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return me.a.createElement(N,P({},he,{className:G,role:"button",style:se}),me.a.createElement("input",P({},De(ue),{id:_e,type:"file",ref:this.saveFileInput,onClick:function(Pe){return Pe.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:W,directory:h?"directory":null,webkitdirectory:h?"webkitdirectory":null,multiple:de,onChange:this.onChange})),q)}}]),c}(U.Component),pe=J,Oe=Object.assign||function(O){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var m in l)Object.prototype.hasOwnProperty.call(l,m)&&(O[m]=l[m])}return O},fe=function(){function O(c,l){for(var m=0;m<l.length;m++){var E=l[m];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(c,E.key,E)}}return function(c,l,m){return l&&O(c.prototype,l),m&&O(c,m),c}}();function y(O,c){if(!(O instanceof c))throw new TypeError("Cannot call a class as a function")}function Y(O,c){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:O}function z(O,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);O.prototype=Object.create(c&&c.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(O,c):O.__proto__=c)}function w(){}var Q=function(O){z(c,O);function c(){var l,m,E,N;y(this,c);for(var oe=arguments.length,xe=Array(oe),te=0;te<oe;te++)xe[te]=arguments[te];return N=(m=(E=Y(this,(l=c.__proto__||Object.getPrototypeOf(c)).call.apply(l,[this].concat(xe))),E),E.saveUploader=function(_e){E.uploader=_e},m),Y(E,N)}return fe(c,[{key:"abort",value:function(m){this.uploader.abort(m)}},{key:"render",value:function(){return me.a.createElement(pe,Oe({},this.props,{ref:this.saveUploader}))}}]),c}(U.Component);Q.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 j=Q,M=Ge.a=j},Gytx:function(dt,Ge){dt.exports=function(U,me,re,Se){var ye=re?re.call(Se,U,me):void 0;if(ye!==void 0)return!!ye;if(U===me)return!0;if(typeof U!="object"||!U||typeof me!="object"||!me)return!1;var $=Object.keys(U),R=Object.keys(me);if($.length!==R.length)return!1;for(var D=Object.prototype.hasOwnProperty.bind(me),T=0;T<$.length;T++){var H=$[T];if(!D(H))return!1;var X=U[H],ee=me[H];if(ye=re?re.call(Se,X,ee,H):void 0,ye===!1||ye===void 0&&X!==ee)return!1}return!0}},HmJG:function(dt,Ge,C){},LdHM:function(dt,Ge,C){"use strict";C.d(Ge,"b",function(){return Le}),C.d(Ge,"a",function(){return ce});var U=C("1OyB"),me=C("vuIU"),re=C("Ji7U"),Se=C("LK+K"),ye=C("q1tI"),$=C("rePB"),R=C("Ff2n"),D=C("ODXe"),T=C("4IlW"),H=C("bX4T"),X=C("YrtM"),ee=C("TSYQ"),be=C.n(ee),ie=C("+nKL"),F=C("8OUc"),P=function(m,E){var N=m.prefixCls,oe=m.id,xe=m.flattenOptions,te=m.childrenAsData,_e=m.values,se=m.searchValue,de=m.multiple,W=m.defaultActiveFirstOption,q=m.height,h=m.itemHeight,S=m.notFoundContent,v=m.open,Z=m.menuItemSelectedIcon,ue=m.virtual,G=m.onSelect,he=m.onToggleOpen,Te=m.onActiveValue,Pe=m.onScroll,Ne=m.onMouseEnter,Ee="".concat(N,"-item"),ke=Object(X.a)(function(){return xe},[v,xe],function(Ie,_){return _[0]&&Ie[1]!==_[1]}),Je=ye.useRef(null),Ye=function(_){_.preventDefault()},Ve=function(_){Je.current&&Je.current.scrollTo({index:_})},Ke=function(_){for(var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=ke.length,f=0;f<L;f+=1){var p=(_+f*k+L)%L,g=ke[p],b=g.group,K=g.data;if(!b&&!K.disabled)return p}return-1},at=ye.useState(function(){return Ke(0)}),et=Object(D.a)(at,2),qe=et[0],ve=et[1],tt=function(_){ve(_);var k=ke[_];if(!k){Te(null,-1);return}Te(k.data.value,_)};ye.useEffect(function(){tt(W!==!1?Ke(0):-1)},[ke.length,se]),ye.useEffect(function(){var Ie=setTimeout(function(){if(!de&&v&&_e.size===1){var _=Array.from(_e)[0],k=ke.findIndex(function(L){var f=L.data;return f.value===_});tt(k),Ve(k)}});return function(){return clearTimeout(Ie)}},[v]);var $e=function(_){_!==void 0&&G(_,{selected:!_e.has(_)}),de||he(!1)};if(ye.useImperativeHandle(E,function(){return{onKeyDown:function(_){var k=_.which;switch(k){case T.a.UP:case T.a.DOWN:{var L=0;if(k===T.a.UP?L=-1:k===T.a.DOWN&&(L=1),L!==0){var f=Ke(qe+L,L);Ve(f),tt(f)}break}case T.a.ENTER:{var p=ke[qe];p&&!p.data.disabled?$e(p.data.value):$e(void 0),v&&_.preventDefault();break}case T.a.ESC:he(!1)}},onKeyUp:function(){},scrollTo:function(_){Ve(_)}}}),ke.length===0)return ye.createElement("div",{role:"listbox",id:"".concat(oe,"_list"),className:"".concat(Ee,"-empty"),onMouseDown:Ye},S);function we(Ie){var _=ke[Ie];if(!_)return null;var k=_.data||{},L=k.value,f=k.label,p=k.children,g=Object(H.a)(k,!0),b=te?p:f;return _?ye.createElement("div",Object.assign({"aria-label":typeof b=="string"?b:null},g,{key:Ie,role:"option",id:"".concat(oe,"_list_").concat(Ie),"aria-selected":_e.has(L)}),L):null}return ye.createElement(ye.Fragment,null,ye.createElement("div",{role:"listbox",id:"".concat(oe,"_list"),style:{height:0,width:0,overflow:"hidden"}},we(qe-1),we(qe),we(qe+1)),ye.createElement(ie.a,{itemKey:"key",ref:Je,data:ke,height:q,itemHeight:h,fullHeight:!1,onMouseDown:Ye,onScroll:Pe,virtual:ue,onMouseEnter:Ne},function(Ie,_){var k,L=Ie.group,f=Ie.groupOption,p=Ie.data,g=p.label,b=p.key;if(L)return ye.createElement("div",{className:be()(Ee,"".concat(Ee,"-group"))},g!==void 0?g:b);var K=p.disabled,le=p.value,Me=p.title,nt=p.children,pt=p.style,ot=p.className,bt=Object(R.a)(p,["disabled","value","title","children","style","className"]),Ze=_e.has(le),He="".concat(Ee,"-option"),lt=be()(Ee,He,ot,(k={},Object($.a)(k,"".concat(He,"-grouped"),f),Object($.a)(k,"".concat(He,"-active"),qe===_&&!K),Object($.a)(k,"".concat(He,"-disabled"),K),Object($.a)(k,"".concat(He,"-selected"),Ze),k)),ut=te?nt:g,yt=!Z||typeof Z=="function"||Ze;return ye.createElement("div",Object.assign({},bt,{"aria-selected":Ze,className:lt,title:Me,onMouseMove:function(){if(qe===_||K)return;tt(_)},onClick:function(){K||$e(le)},style:pt}),ye.createElement("div",{className:"".concat(He,"-content")},ut||le),ye.isValidElement(Z)||Ze,yt&&ye.createElement(F.a,{className:"".concat(Ee,"-option-state"),customizeIcon:Z,customizeIconProps:{isSelected:Ze}},Ze?"\u2713":null))}))},I=ye.forwardRef(P);I.displayName="OptionList";var ae=I,ne=function(){return null};ne.isSelectOption=!0;var Le=ne,Fe=function(){return null};Fe.isSelectOptGroup=!0;var ce=Fe,Ce=C("VTBJ"),De=C("Zm9Q");function J(l){var m=l.key,E=l.props,N=E.children,oe=E.value,xe=Object(R.a)(E,["children","value"]);return Object(Ce.a)({key:m,value:oe!==void 0?oe:m,children:N},xe)}function pe(l){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(De.a)(l).map(function(E,N){if(!ye.isValidElement(E)||!E.type)return null;var oe=E.type.isSelectOptGroup,xe=E.key,te=E.props,_e=te.children,se=Object(R.a)(te,["children"]);return m||!oe?J(E):Object(Ce.a)(Object(Ce.a)({key:"__RC_SELECT_GRP__".concat(xe===null?N:xe,"__"),label:xe},se),{},{options:pe(_e)})}).filter(function(E){return E})}var Oe=C("2Qr1"),fe=C("qNPg"),y=C("U8pU"),Y=C("Kwbf"),z=C("WKfj");function w(l){var m=l.mode,E=l.options,N=l.children,oe=l.backfill,xe=l.allowClear,te=l.placeholder,_e=l.getInputElement,se=l.showSearch,de=l.onSearch,W=l.defaultOpen,q=l.autoFocus,h=l.labelInValue,S=l.value,v=l.inputValue,Z=l.optionLabelProp,ue=m==="multiple"||m==="tags",G=se!==void 0?se:ue||m==="combobox",he=E||pe(N);if(Object(Y.a)(m!=="tags"||he.every(function(Ee){return!Ee.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),m==="tags"||m==="combobox"){var Te=he.some(function(Ee){return Ee.options?Ee.options.some(function(ke){return typeof("value"in ke?ke.value:ke.key)=="number"}):typeof("value"in Ee?Ee.value:Ee.key)=="number"});Object(Y.a)(!Te,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(Y.a)(m!=="combobox"||!Z,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(Y.a)(m==="combobox"||!oe,"`backfill` only works with `combobox` mode."),Object(Y.a)(m==="combobox"||!_e,"`getInputElement` only work with `combobox` mode."),Object(Y.b)(m!=="combobox"||!_e||!xe||!te,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),de&&!G&&m!=="combobox"&&m!=="tags"&&Object(Y.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(Y.b)(!W||q,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),S!=null){var Pe=Object(z.d)(S);Object(Y.a)(!h||Pe.every(function(Ee){return Object(y.a)(Ee)==="object"&&("key"in Ee||"value"in Ee)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(Y.a)(!ue||Array.isArray(S),"`value` should be array when `mode` is `multiple` or `tags`")}if(N){var Ne=null;Object(De.a)(N).some(function(Ee){if(!ye.isValidElement(Ee)||!Ee.type)return!1;var ke=Ee.type;if(ke.isSelectOption)return!1;if(ke.isSelectOptGroup){var Je=Object(De.a)(Ee.props.children).every(function(Ye){return!ye.isValidElement(Ye)||!Ee.type||Ye.type.isSelectOption?!0:(Ne=Ye.type,!1)});return!Je}return Ne=ke,!0}),Ne&&Object(Y.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ne.displayName||Ne.name||Ne,"`.")),Object(Y.a)(v===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var Q=w,j=Object(fe.a)({prefixCls:"rc-select",components:{optionList:ae},convertChildrenToData:pe,flattenOptions:Oe.d,getLabeledValue:Oe.e,filterOptions:Oe.b,isValueDisabled:Oe.g,findValueOption:Oe.c,warningProps:Q,fillOptionsWithMissingValue:Oe.a}),M=function(l){Object(re.a)(E,l);var m=Object(Se.a)(E);function E(){var N;return Object(U.a)(this,E),N=m.apply(this,arguments),N.selectRef=ye.createRef(),N.focus=function(){N.selectRef.current.focus()},N.blur=function(){N.selectRef.current.blur()},N}return Object(me.a)(E,[{key:"render",value:function(){return ye.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),E}(ye.Component);M.Option=Le,M.OptGroup=ce;var O=M,c=Ge.c=O},M8RZ:function(dt,Ge,C){"use strict";C.d(Ge,"a",function(){return T});var U=C("fWQN"),me=C("mtLc"),re=C("yKVA"),Se=C("879j"),ye=C("q1tI"),$=C.n(ye),R=C("i8i4"),D=C.n(R),T=function(H){Object(re.a)(ee,H);var X=Object(Se.a)(ee);function ee(be){var ie;Object(U.a)(this,ee),ie=X.call(this,be);var F=window.document;return ie.node=F.createElement("div"),F.body.appendChild(ie.node),ie}return Object(me.a)(ee,[{key:"render",value:function(){var ie=this.props.children;return Object(R.createPortal)(ie,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),ee}($.a.Component)},OLES:function(dt,Ge,C){"use strict";var U=C("U8pU"),me=C("VTBJ"),re=C("Ff2n"),Se=C("q1tI"),ye=C("uciX"),$=C("7ixt"),R=function(be){var ie=be.overlay,F=be.prefixCls,P=be.id,I=be.overlayInnerStyle;return Se.createElement("div",{className:"".concat(F,"-inner"),id:P,role:"tooltip",style:I},typeof ie=="function"?ie():ie)},D=R,T=function(be,ie){var F=be.overlayClassName,P=be.trigger,I=P===void 0?["hover"]:P,ae=be.mouseEnterDelay,ne=ae===void 0?0:ae,Le=be.mouseLeaveDelay,Fe=Le===void 0?.1:Le,ce=be.overlayStyle,Ce=be.prefixCls,De=Ce===void 0?"rc-tooltip":Ce,J=be.children,pe=be.onVisibleChange,Oe=be.afterVisibleChange,fe=be.transitionName,y=be.animation,Y=be.placement,z=Y===void 0?"right":Y,w=be.align,Q=w===void 0?{}:w,j=be.destroyTooltipOnHide,M=j===void 0?!1:j,O=be.defaultVisible,c=be.getTooltipContainer,l=be.overlayInnerStyle,m=Object(re.a)(be,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),E=Object(Se.useRef)(null);Object(Se.useImperativeHandle)(ie,function(){return E.current});var N=Object(me.a)({},m);"visible"in be&&(N.popupVisible=be.visible);var oe=function(){var de=be.arrowContent,W=de===void 0?null:de,q=be.overlay,h=be.id;return[Se.createElement("div",{className:"".concat(De,"-arrow"),key:"arrow"},W),Se.createElement(D,{key:"content",prefixCls:De,id:h,overlay:q,overlayInnerStyle:l})]},xe=!1,te=!1;if(typeof M=="boolean")xe=M;else if(M&&Object(U.a)(M)==="object"){var _e=M.keepParent;xe=_e===!0,te=_e===!1}return Se.createElement(ye.a,Object.assign({popupClassName:F,prefixCls:De,popup:oe,action:I,builtinPlacements:$.a,popupPlacement:z,ref:E,popupAlign:Q,getPopupContainer:c,onPopupVisibleChange:pe,afterPopupVisibleChange:Oe,popupTransitionName:fe,popupAnimation:y,defaultPopupVisible:O,destroyPopupOnHide:xe,autoDestroy:te,mouseLeaveDelay:Fe,popupStyle:ce,mouseEnterDelay:ne},N),J)},H=Object(Se.forwardRef)(T),X=Ge.a=H},Ot1p:function(dt,Ge,C){"use strict";var U=C("2qtc"),me=C("kLXV"),re=C("rAM+"),Se=C("miYZ"),ye=C("tsqr"),$=C("tJVT"),R=C("jrin"),D=C("q1tI"),T=C.n(D),H=C("VrN/"),X=C.n(H),ee=C("bdgK"),be=C("p77/"),ie=C("Bd2K"),F=C("ELLl"),P=C("19Vz"),I=C("lZu9"),ae=C("+NIl"),ne=C("kSUc"),Le=C("9Bee"),Fe=function(_){var k=_.value,L=k===void 0?"":k,f=_.className,p=_.showTextOnly,g=_.showLines,b=_.style,K=b===void 0?{}:b,le=Object(D.useMemo)(function(){return""},[L]);return T.a.createElement(T.a.Fragment,null,T.a.createElement("div",{dangerouslySetInnerHTML:{__html:le}}))},ce=C("0Owb"),Ce=C("dejd"),De=C("C+DQ"),J=[{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 pe(_){var k=_.onActionCallback,L=_.title,f=_.icon,p=_.actionName,g=_.className,b=g===void 0?"":g,K=_.children;function le(){k(p)}return T.a.createElement("a",{title:L,className:b,onClick:le},T.a.createElement("i",{className:"md-iconfont ".concat(f)}),K)}var Oe=function(_){var k=_.watch,L=_.showNullButton,f=_.onActionCallback,p=_.fullScreen,g=_.insertTemp,b=_.hidetoolBar,K=[].concat(J,[{title:"".concat(k?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(k?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return T.a.createElement("ul",{className:"markdown-toolbar-container"},!b&&K.map(function(le,Me){return T.a.createElement("li",{key:Me},le.actionName?T.a.createElement(pe,Object(ce.a)({},le,{onActionCallback:f})):T.a.createElement("span",{className:"v-line"}))}),L?T.a.createElement("li",null,T.a.createElement(pe,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:f},T.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,g&&T.a.createElement("li",null,T.a.createElement(pe,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(g),onActionCallback:f},T.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),T.a.createElement("li",{className:"btn-full-screen"},T.a.createElement(pe,{icon:"".concat(p?"icon-shrink":"icon-enlarge"),title:p?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:f})))},fe=C("M8RZ"),y=C("+L6B"),Y=C("2/Rp"),z=C("y8nQ"),w=C("Vl3Y"),Q=C("5NDa"),j=C("5rEg"),M={labelCol:{span:4},wrapperCol:{span:20}},O=function(_){var k=_.callback,L=_.onCancel;function f(p){k(p)}return T.a.createElement(w.a,Object(ce.a)({},M,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:f}),T.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},T.a.createElement(j.a,null)),T.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},T.a.createElement(j.a,null)),T.a.createElement("div",{className:"flex-container flex-end"},T.a.createElement(Y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(Y.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))},c=C("7ahc"),l=C("HmJG"),m=C("BjJ7"),E=w.a.useForm,N={width:280,marginRight:10},oe={labelCol:{span:5},wrapperCol:{span:19}},xe=function(_){var k=_.callback,L=_.onCancel,f=E(),p=Object($.a)(f,1),g=p[0];function b(Me){k(Me)}function K(Me,nt){g.setFieldsValue({src:"/api/attachments/".concat(Me.id),type:nt.type})}function le(Me){var nt=Me.target.files[0];_e(nt,K)}return T.a.createElement(w.a,Object(ce.a)({form:g},oe,{className:"upload-image-panel",onFinish:b}),T.a.createElement(w.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},T.a.createElement("div",{className:"flex-container"},T.a.createElement(w.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},T.a.createElement(j.a,{style:N})),T.a.createElement(te,{onFileChange:le}))),T.a.createElement(w.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},T.a.createElement(j.a,{style:{width:264}})),T.a.createElement(w.a.Item,{style:{textAlign:"right"}},T.a.createElement(Y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(Y.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function te(_){var k=_.onFileChange;return T.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",T.a.createElement("input",{type:"file",onChange:k}))}function _e(_,k){if(!_)throw new String("\u6CA1\u6709\u6587\u4EF6");var L=new FormData;L.append("editormd-image-file",_),L.append("file_param_name","editormd-image-file"),L.append("byxhr","true");var f=new window.XMLHttpRequest;f.withCredentials=!0,f.addEventListener("load",function(p){k(JSON.parse(p.target.responseText),_)},!1),f.addEventListener("error",function(p){console.error(p)},!1),f.open("POST","".concat(m.a,"/api/attachments.json")),f.send(L)}var se=C("giR+"),de=C("fyUT"),W=C("7Kak"),q=C("9yH6"),h=q.a.Group,S={margin:"0 8px"},v=function(_){var k=_.callback,L=_.onCancel;function f(p){k(p)}return T.a.createElement(w.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:f},T.a.createElement("div",{className:"flex-container"},T.a.createElement("span",{style:S},"\u5355\u5143\u683C\u6570\uFF1A"),T.a.createElement("span",{style:S},"\u884C\u6570"),T.a.createElement(w.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},T.a.createElement(de.a,null)),T.a.createElement("span",{style:S},"\u5217\u6570"),T.a.createElement(w.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},T.a.createElement(de.a,null))),T.a.createElement("div",{className:"flex-container",style:{marginTop:12}},T.a.createElement("span",{style:S},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),T.a.createElement(w.a.Item,{name:"align"},T.a.createElement(h,null,T.a.createElement(q.a,{value:"default"},T.a.createElement("i",{className:"fa fa-align-justify"})),T.a.createElement(q.a,{value:"left"},T.a.createElement("i",{className:"fa fa-align-left"})),T.a.createElement(q.a,{value:"center"},T.a.createElement("i",{className:"fa fa-align-center"})),T.a.createElement(q.a,{value:"right"},T.a.createElement("i",{className:"fa fa-align-right"}))))),T.a.createElement("div",{className:"flex-container flex-end"},T.a.createElement(Y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(Y.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))},Z=C("m3rI"),ue="link",G="upload-image",he="code-block",Te="add-table",Pe="------------",Ne={default:Pe,left:":".concat(Pe),center:":".concat(Pe,":"),right:"".concat(Pe,":")},Ee=C("9VGf"),ke,Je;function Ye(){}var Ve=0,Ke=1e4,at="\u2581",et=`
**\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 qe(_){return/^\d+$/.test(_)?"".concat(_,"px"):_}var ve=navigator.platform.toUpperCase().indexOf("MAC")>=0,tt=ve?"Cmd":"Ctrl",$e=(ke={},Object(R.a)(ke,tt+"-B","bold"),Object(R.a)(ke,tt+"-I","italic"),ke),we=(Je={},Object(R.a)(Je,ue,"\u6DFB\u52A0\u94FE\u63A5"),Object(R.a)(Je,he,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(R.a)(Je,G,"\u6DFB\u52A0\u56FE\u7247"),Object(R.a)(Je,Te,"\u6DFB\u52A0\u8868\u683C"),Je),Ie=Ge.a=function(_){var k=_.defaultValue,L=k===void 0?"":k,f=_.onChange,p=_.width,g=p===void 0?"100%":p,b=_.height,K=b===void 0?400:b,le=_.miniToolbar,Me=le===void 0?!1:le,nt=_.isFocus,pt=nt===void 0?!1:nt,ot=_.watch,bt=_.insertTemp,Ze=_.mode,He=Ze===void 0?"markdown":Ze,lt=_.id,ut=lt===void 0?"markdown-editor-id":lt,yt=_.showResizeBar,kt=yt===void 0?!1:yt,ht=_.noStorage,an=ht===void 0?!1:ht,Gt=_.showNullButton,Xt=Gt===void 0?!1:Gt,gn=_.hidetoolBar,vn=gn===void 0?!1:gn,bi=_.fullScreen,fn=bi===void 0?!1:bi,Vn=_.onBlur,dr=_.onCMBeforeChange,At=_.onFullScreen,Qe=_.className,Sn=Qe===void 0?"":Qe,fr=_.disablePaste,hn=fr===void 0?!1:fr,xt=_.placeholder,Tn=xt===void 0?"":xt,Rn=_.values,$n=Rn===void 0?"":Rn,Re=Object(D.useState)(null),ft=Object($.a)(Re,2),Ue=ft[0],Ir=ft[1],hr=Object(D.useState)(L),Yn=Object($.a)(hr,2),Jn=Yn[0],ct=Yn[1],qi=Object(D.useState)(ot),Ur=Object($.a)(qi,2),pn=Ur[0],un=Ur[1],yi=Object(D.useState)(fn),Fr=Object($.a)(yi,2),on=Fr[0],pr=Fr[1],xi=Object(D.useState)(""),mr=Object($.a)(xi,2),On=mr[0],An=mr[1],wi=Object(D.useState)(0),Wr=Object($.a)(wi,2),qn=Wr[0],Br=Wr[1],Ei=Object(D.useState)(K),mn=Object($.a)(Ei,2),Ci=mn[0],_i=mn[1],gr=Object(D.useState)(!1),Pn=Object($.a)(gr,2),Ia=Pn[0],Hr=Pn[1],Zn=Object(D.useRef)(),zr=Object(D.useRef)(),Nn=Object(D.useRef)(),Qn=Object(D.useRef)();Object(D.useEffect)(function(){ct($n),Ue==null||Ue.setValue($n)},[$n]),Object(D.useEffect)(function(){At==null||At(on)},[on]),Object(D.useEffect)(function(){if(Zn.current){var rt=X.a.fromTextArea(Zn.current,{mode:He,lineNumbers:!Me,lineWrapping:!0,value:L,autoCloseTags:!0,autoCloseBrackets:!0});pt&&rt.focus();function mt(gt,Ct){if(hn){Ct.preventDefault();return}var _t=Ct.clipboardData;if(_t){var Tt=_t.types.toString(),Pt=_t.items,Lt=["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(Tt==="Files"||_t.types.indexOf("Files")>-1){if(Ct.preventDefault(),He=="stex")return;try{var Vt,bn=Pt[1];((Vt=Pt[0])===null||Vt===void 0?void 0:Vt.kind)==="file"&&(bn=Pt[0]);var Ot=bn.getAsFile(),jn=Ot.name.split(".").pop();_e(Ot,function($t){if($t.id){var In,Un,br;(Ot==null||((In=Ot.type)===null||In===void 0)?void 0:In.indexOf("image"))>-1?rt.replaceSelection("![,](/api/attachments/".concat($t.id,"?type=").concat($t.content_type,")")):(Ot==null||((Un=Ot.type)===null||Un===void 0)?void 0:Un.indexOf("video"))>-1?rt.replaceSelection('<video width="100%" controls src="'.concat(Z.a.API_SERVER,"/api/attachments/").concat($t.id,'"></video>')):(Ot==null||((br=Ot.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?rt.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat($t.id,"?type=").concat(Ot.type,'&disposition=inline" target="_blank">').concat(Ot.name,"</a>")):Lt.includes(jn)?rt.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat($t.id,'?type=office&disposition=inline" target="_blank">').concat(Ot.name,"</a>")):rt.replaceSelection("[".concat(Ot.name,"](").concat(Z.a.API_SERVER,"/api/attachments/").concat($t.id,"?type=").concat($t.content_type,")"))}else($t==null?void 0:$t.status)===401&&(document.location.href="/user/login")})}catch($t){ye.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return rt.on("paste",mt),Ir(rt),function(){rt.off("paste",mt)}}},[]);var ki=Object(D.useCallback)(function(){if(zr.current)try{}catch(rt){console.log(rt,"---- to set md editor body height")}},[Ci,zr,on]);Object(D.useEffect)(function(){function rt(){var gt=new ee.default(function(Ct){var _t=Object(re.a)(Ct),Tt;try{for(_t.s();!(Tt=_t.n()).done;){var Pt=Tt.value;(Pt.target.offsetHeight>0||Pt.target.offsetWidth>0)&&(ki(),Ue.setSize("100%","100%"),Ue.refresh())}}catch(Lt){_t.e(Lt)}finally{_t.f()}});return gt.observe(Zn.current.parentElement),gt}if(Ue){var mt=rt();return function(){mt.unobserve(Zn.current.parentElement)}}},[Ue,ki]),Object(D.useEffect)(function(){if(Ue){for(var rt=[],mt=function(){var Pt=Ct[gt];_t=Object($.a)(Pt,2);var Lt=_t[0],Vt=_t[1],bn=Object(R.a)({},Lt,function(){Kr(Vt)});rt.push(bn),Ue.addKeyMap(bn)},gt=0,Ct=Object.entries($e);gt<Ct.length;gt++){var _t;mt()}return function(){var Tt=Object(re.a)(rt),Pt;try{for(Tt.s();!(Pt=Tt.n()).done;){var Lt=Pt.value;Ue.removeKeyMap(Lt)}}catch(Vt){Tt.e(Vt)}finally{Tt.f()}}}},[Ue]),Object(D.useEffect)(function(){fn!==on&&pr(fn)},[fn]),Object(Ee.a)(function(){if(!an&&qn>0){var rt=new Date().getTime(),mt=window.sessionStorage.getItem(ut);rt>=qn+Ke&&(!mt||mt!==Jn)&&(window.sessionStorage.setItem(ut,Jn),Hr(!0))}},Ke),Object(D.useEffect)(function(){un(ot)},[Ue,ot]),Object(D.useEffect)(function(){Ue&&(pt&&Ue.focus())},[Ue,pt]),Object(D.useEffect)(function(){if(pn&&Ue){var rt=Ue.getScrollerElement();function mt(gt){var Ct=gt.target;if(Qn.current){var _t=Ct.scrollTop/Ct.scrollHeight;Qn.current.scrollTop=Qn.current.scrollHeight*_t}}return rt.addEventListener("scroll",mt),function(){rt.removeEventListener("scroll",mt)}}},[Ue,pn]),Object(D.useEffect)(function(){if(Ue&&dr){function rt(mt,gt){dr(mt,gt)}return Ue.on("beforeChange",rt),function(){Ue.off("beforeChange",rt)}}},[Ue,dr]),Object(D.useEffect)(function(){if(Ue&&Vn){function rt(){Vn(Ue.getValue())}return Ue.on("blur",rt),function(){Ue.off("blur",rt)}}},[Ue,Vn]),Object(D.useEffect)(function(){if(Ue){function rt(mt){var gt=mt.getValue();ct(gt),Br(new Date().getTime()),mt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),f&&f(gt)}return Ue.on("change",rt),function(){Ue.off("change",rt)}}},[Ue,f]),Object(D.useEffect)(function(){Ue&&(L==null?(Ue.setValue(""),ct("")):L!==Ue.getValue()&&(Ue.setValue(L),ct(L),Ue.setCursor(Ue.lineCount(),0)))},[Ue,L]);var Kr=Object(D.useCallback)(function(rt){var mt=Ue.getCursor(),gt=Ue.getSelection(),Ct=gt.split(`
`);switch(rt){case"bold":return Ue.replaceSelection("**"+gt+"**"),gt===""&&Ue.setCursor(mt.line,mt.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+gt+"*"),gt===""&&Ue.setCursor(mt.line,mt.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+gt+"`"),gt===""&&Ue.setCursor(mt.line,mt.ch+1),Ue.focus();case"inline-latex":return Ue.replaceSelection("`$$"+gt+"$$`"),gt===""&&Ue.setCursor(mt.line,mt.ch+3),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+gt+"\n```"),Ue.setCursor(mt.line+1,gt.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`<br/>
`),Ue.focus();case"list-ul":return gt===""?Ue.replaceSelection("- "+gt):Ue.replaceSelection(Ct.map(function(_t){return _t===""?"":"- ".concat(_t)}).join(`
`)),Ue.focus();case"list-ol":return gt===""?Ue.replaceSelection("1. "+gt):Ue.replaceSelection(Ct.map(function(_t,Tt){return _t===""?"":"".concat(Tt+1,". ").concat(_t)}).join(`
`)),Ue.focus();case"add-null-ch":return gt===""&&Ue.setCursor(mt.line,mt.ch+1),Ue.replaceSelection(at),Ue.focus();case"inster-template-1":return gt===""&&Ue.setCursor(mt.line,mt.ch),Ue.replaceSelection(et),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return un(!pn),Ue.focus();case"trigger-full-screen":return pr(!on),Ue.focus();case ue:An(ue);return;case he:An(he);return;case G:An(G);return;case Te:An(Te);return;default:throw new Error}},[Ue,pn,on]),er=Object(D.useCallback)(function(rt){An("");switch(On){case ue:var mt=rt.title,gt=rt.link;return Ue.replaceSelection("[".concat(mt,"](").concat(gt,")")),Ue.focus();case he:var Ct=rt.language,_t=rt.content;return Ue.replaceSelection(["```"+Ct,_t,"```"].join(`
`)),Ue.focus();case G:var Tt=rt.src,Pt=rt.alt;return Ue.replaceSelection("![ ".concat(Pt," ]( ").concat(Tt,' "').concat(Pt,'" )')),Ue.focus();case Te:for(var Lt=rt.row,Vt=rt.col,bn=rt.align,Ot=`
`,jn=0;jn<Lt;jn++){for(var $t=[],In=[],Un=0;Un<Vt;Un++)jn===1&&In.push(Ne[bn]),$t.push(" ");jn===1&&(Ot+="| ".concat(In.join(" | "),` |
`)),Ot+="| ".concat($t.join(Vt===1?"":" | "),` |
`)}return Ue.replaceSelection(Ot+`
`),Ue.focus();default:throw new Error}},[Ue,On]),vr=Object(D.useMemo)(function(){switch(On){case ue:return T.a.createElement(O,{callback:er,onCancel:En});case he:return T.a.createElement(c.b,{callback:er,onCancel:En});case G:return T.a.createElement(xe,{callback:er,onCancel:En});case Te:return T.a.createElement(v,{callback:er,onCancel:En});default:return null}},[On]);function En(){An("")}Object(D.useEffect)(function(){if(Nn.current){var rt=Nn.current,mt=!1,gt=0;function Ct(Pt){mt=!0,gt=Pt.pageY}function _t(){mt=!1}function Tt(Pt){if(mt){var Lt=Pt.pageY-gt;Lt<0&&(Lt=0),Lt>300&&(Lt=300);var Vt=K+Lt+"px";_i(Vt)}}return rt.addEventListener("mousedown",Ct),document.addEventListener("mousemove",Tt),document.addEventListener("mouseup",_t),function(){rt.removeEventListener("mousedown",Ct),document.removeEventListener("mousemove",Tt),document.removeEventListener("mouseup",_t)}}},[Ue,Nn]),Object(D.useEffect)(function(){_i(K)},[K]);var Gr=qe(g),Si=qe(Ci),Ti={width:Gr,height:Si},Xr=Object(D.useMemo)(function(){if(qn){var rt=new Date(qn),mt=rt.getHours(),gt=rt.getMinutes(),Ct=rt.getSeconds();return mt=mt<10?"0"+mt:mt,gt=gt<10?"0"+gt:gt,Ct=Ct<10?"0"+Ct:Ct,"".concat(mt,":").concat(gt,":").concat(Ct)}return 0},[qn]);function Ua(){window.sessionStorage.removeItem(ut),Hr(!1),Br(0)}function Zi(){Hr(!1),Br(0),Ue.setValue(window.sessionStorage.getItem(ut))}return T.a.createElement(D.Fragment,null,T.a.createElement("div",{className:"markdown-editor-wrapper",ref:zr},T.a.createElement("div",{className:"markdown-editor-container ".concat(Sn," ").concat(pn?"on-preview":""," ").concat(Me?"mini":""," ").concat(on?"full-screen":""),style:Ti},T.a.createElement(Oe,{insertTemp:bt,watch:pn,fullScreen:on,showNullButton:Xt,onActionCallback:Kr,hidetoolBar:vn}),T.a.createElement("div",{className:"markdown-editor-body"},T.a.createElement("div",{className:"codemirror-container"},T.a.createElement("textarea",{ref:Zn,placeholder:Tn})),pn?T.a.createElement("div",{ref:Qn,className:"preview-container"},He==="stex"&&T.a.createElement(Fe,{value:Jn}),He!=="stex"&&T.a.createElement(Le.a,{value:Jn})):null))),kt?T.a.createElement("a",{ref:Nn,className:"editor-resize"}):null,T.a.createElement(fe.a,null,we[On]?T.a.createElement(me.a,{centered:!0,title:we[On],visible:!0,onCancel:En,footer:null},vr):null))}},SJMd:function(dt,Ge){/**
* @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 C,U,me,re=!1,Se,ye;window.PR_SHOULD_USE_CONTINUATION=!0;var $,R;(function(){var D=window,T=["break,continue,do,else,for,if,return,while"],H=[T,"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"],X=[H,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],ee=[X,"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"],be=[X,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],ie=[X,"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"],F="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",P=[X,"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",ae=[T,"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"],ne=[T,"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"],Le=[T,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Fe=[ee,ie,be,P,I,ae,ne,Le],ce=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Ce="str",De="kwd",J="com",pe="typ",Oe="lit",fe="pun",y="pln",Y="tag",z="dec",w="src",Q="atn",j="atv",M="nocode",O="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(G){for(var he=0,Te=!1,Pe=!1,Ne=0,Ee=G.length;Ne<Ee;++Ne){var ke=G[Ne];if(ke.ignoreCase)Pe=!0;else if(/[a-z]/i.test(ke.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Te=!0,Pe=!1;break}}var Je={b:8,t:9,n:10,v:11,f:12,r:13};function Ye(qe){var ve=qe.charCodeAt(0);if(ve!==92)return ve;var tt=qe.charAt(1);return ve=Je[tt],ve||("0"<=tt&&tt<="7"?parseInt(qe.substring(1),8):tt==="u"||tt==="x"?parseInt(qe.substring(2),16):qe.charCodeAt(1))}function Ve(qe){if(qe<32)return(qe<16?"\\x0":"\\x")+qe.toString(16);var ve=String.fromCharCode(qe);return ve==="\\"||ve==="-"||ve==="]"||ve==="^"?"\\"+ve:ve}function Ke(qe){var ve=qe.substring(1,qe.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")),tt=[],$e=ve[0]==="^",we=["["];$e&&we.push("^");for(var Ie=$e?1:0,_=ve.length;Ie<_;++Ie){var k=ve[Ie];if(/\\[bdsw]/i.test(k))we.push(k);else{var L=Ye(k),f;Ie+2<_&&ve[Ie+1]==="-"?(f=Ye(ve[Ie+2]),Ie+=2):f=L,tt.push([L,f]),f<65||L>122||(f<65||L>90||tt.push([Math.max(65,L)|32,Math.min(f,90)|32]),f<97||L>122||tt.push([Math.max(97,L)&~32,Math.min(f,122)&~32]))}}tt.sort(function(K,le){return K[0]-le[0]||le[1]-K[1]});for(var p=[],g=[],Ie=0;Ie<tt.length;++Ie){var b=tt[Ie];b[0]<=g[1]+1?g[1]=Math.max(g[1],b[1]):p.push(g=b)}for(var Ie=0;Ie<p.length;++Ie){var b=p[Ie];we.push(Ve(b[0])),b[1]>b[0]&&(b[1]+1>b[0]&&we.push("-"),we.push(Ve(b[1])))}return we.push("]"),we.join("")}function at(qe){for(var ve=qe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),tt=ve.length,$e=[],we=0,Ie=0;we<tt;++we){var _=ve[we];if(_==="(")++Ie;else if(_.charAt(0)==="\\"){var k=+_.substring(1);k&&(k<=Ie?$e[k]=-1:ve[we]=Ve(k))}}for(var we=1;we<$e.length;++we)$e[we]===-1&&($e[we]=++he);for(var we=0,Ie=0;we<tt;++we){var _=ve[we];if(_==="(")++Ie,$e[Ie]||(ve[we]="(?:");else if(_.charAt(0)==="\\"){var k=+_.substring(1);k&&k<=Ie&&(ve[we]="\\"+$e[k])}}for(var we=0;we<tt;++we)ve[we]==="^"&&ve[we+1]!=="^"&&(ve[we]="");if(qe.ignoreCase&&Te)for(var we=0;we<tt;++we){var _=ve[we],L=_.charAt(0);_.length>=2&&L==="["?ve[we]=Ke(_):L!=="\\"&&(ve[we]=_.replace(/[a-zA-Z]/g,function(g){var b=g.charCodeAt(0);return"["+String.fromCharCode(b&~32,b|32)+"]"}))}return ve.join("")}for(var et=[],Ne=0,Ee=G.length;Ne<Ee;++Ne){var ke=G[Ne];if(ke.global||ke.multiline)throw new Error(""+ke);et.push("(?:"+at(ke)+")")}return new RegExp(et.join("|"),Pe?"gi":"g")}function l(G,he){var Te=/(?:^|\s)nocode(?:\s|$)/,Pe=[],Ne=0,Ee=[],ke=0;function Je(Ye){var Ve=Ye.nodeType;if(Ve==1){if(Te.test(Ye.className))return;for(var Ke=Ye.firstChild;Ke;Ke=Ke.nextSibling)Je(Ke);var at=Ye.nodeName.toLowerCase();(at==="br"||at==="li")&&(Pe[ke]=`
`,Ee[ke<<1]=Ne++,Ee[ke++<<1|1]=Ye)}else if(Ve==3||Ve==4){var et=Ye.nodeValue;et.length&&(he?et=et.replace(/\r\n?/g,`
`):et=et.replace(/[ \t\r\n]+/g," "),Pe[ke]=et,Ee[ke<<1]=Ne,Ne+=et.length,Ee[ke++<<1|1]=Ye)}}return Je(G),{sourceCode:Pe.join("").replace(/\n$/,""),spans:Ee}}function m(G,he,Te,Pe,Ne){if(!Te)return;var Ee={sourceNode:G,pre:1,langExtension:null,numberLines:null,sourceCode:Te,spans:null,basePos:he,decorations:null};Pe(Ee),Ne.push.apply(Ne,Ee.decorations)}var E=/\S/;function N(G){for(var he=void 0,Te=G.firstChild;Te;Te=Te.nextSibling){var Pe=Te.nodeType;he=Pe===1?he?G:Te:Pe===3&&E.test(Te.nodeValue)?G:he}return he===G?void 0:he}function oe(G,he){var Te={},Pe;(function(){for(var ke=G.concat(he),Je=[],Ye={},Ve=0,Ke=ke.length;Ve<Ke;++Ve){var at=ke[Ve],et=at[3];if(et)for(var qe=et.length;--qe>=0;)Te[et.charAt(qe)]=at;var ve=at[1],tt=""+ve;Ye.hasOwnProperty(tt)||(Je.push(ve),Ye[tt]=null)}Je.push(/[\0-\uffff]/),Pe=c(Je)})();var Ne=he.length,Ee=function(ke){for(var Je=ke.sourceCode,Ye=ke.basePos,Ve=ke.sourceNode,Ke=[Ye,y],at=0,et=Je.match(Pe)||[],qe={},ve=0,tt=et.length;ve<tt;++ve){var $e=et[ve],we=qe[$e],Ie=void 0,_;if(typeof we=="string")_=!1;else{var k=Te[$e.charAt(0)];if(k)Ie=$e.match(k[1]),we=k[0];else{for(var L=0;L<Ne;++L)if(k=he[L],Ie=$e.match(k[1]),Ie){we=k[0];break}Ie||(we=y)}_=we.length>=5&&we.substring(0,5)==="lang-",_&&!(Ie&&typeof Ie[1]=="string")&&(_=!1,we=w),_||(qe[$e]=we)}var f=at;if(at+=$e.length,!_)Ke.push(Ye+f,we);else{var p=Ie[1],g=$e.indexOf(p),b=g+p.length;Ie[2]&&(b=$e.length-Ie[2].length,g=b-p.length);var K=we.substring(5);m(Ve,Ye+f,$e.substring(0,g),Ee,Ke),m(Ve,Ye+f+g,p,q(K,p),Ke),m(Ve,Ye+f+b,$e.substring(b),Ee,Ke)}}ke.decorations=Ke};return Ee}function xe(G){var he=[],Te=[];G.tripleQuotedStrings?he.push([Ce,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):G.multiLineStrings?he.push([Ce,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):he.push([Ce,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),G.verbatimStrings&&Te.push([Ce,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Pe=G.hashComments;Pe&&(G.cStyleComments?(Pe>1?he.push([J,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):he.push([J,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Te.push([Ce,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):he.push([J,/^#[^\r\n]*/,null,"#"])),G.cStyleComments&&(Te.push([J,/^\/\/[^\r\n]*/,null]),Te.push([J,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ne=G.regexLiterals;if(Ne){var Ee=Ne>1?"":`
\r`,ke=Ee?".":"[\\S\\s]",Je="/(?=[^/*"+Ee+"])(?:[^/\\x5B\\x5C"+Ee+"]|\\x5C"+ke+"|\\x5B(?:[^\\x5C\\x5D"+Ee+"]|\\x5C"+ke+")*(?:\\x5D|$))+/";Te.push(["lang-regex",RegExp("^"+O+"("+Je+")")])}var Ye=G.types;Ye&&Te.push([pe,Ye]);var Ve=(""+G.keywords).replace(/^ | $/g,"");Ve.length&&Te.push([De,new RegExp("^(?:"+Ve.replace(/[\s,]+/g,"|")+")\\b"),null]),he.push([y,/^\s+/,null,` \r
\xA0`]);var Ke="^.[^\\s\\w.$@'\"`/\\\\]*";return G.regexLiterals&&(Ke+="(?!s*/)"),Te.push([Oe,/^@[a-z_$][a-z_$@0-9]*/i,null],[pe,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[y,/^[a-z_$][a-z_$@0-9]*/i,null],[Oe,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[y,/^\\[\s\S]?/,null],[fe,new RegExp(Ke),null]),oe(he,Te)}var te=xe({keywords:Fe,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function _e(G,he,Te){for(var Pe=/(?:^|\s)nocode(?:\s|$)/,Ne=/\r\n?|\n/,Ee=G.ownerDocument,ke=Ee.createElement("li");G.firstChild;)ke.appendChild(G.firstChild);var Je=[ke];function Ye(ve){var tt=ve.nodeType;if(tt==1&&!Pe.test(ve.className))if(ve.nodeName==="br")Ve(ve),ve.parentNode&&ve.parentNode.removeChild(ve);else for(var $e=ve.firstChild;$e;$e=$e.nextSibling)Ye($e);else if((tt==3||tt==4)&&Te){var we=ve.nodeValue,Ie=we.match(Ne);if(Ie){var _=we.substring(0,Ie.index);ve.nodeValue=_;var k=we.substring(Ie.index+Ie[0].length);if(k){var L=ve.parentNode;L.insertBefore(Ee.createTextNode(k),ve.nextSibling)}Ve(ve),_||ve.parentNode.removeChild(ve)}}}function Ve(ve){for(;!ve.nextSibling;)if(ve=ve.parentNode,!ve)return;function tt(Ie,_){var k=_?Ie.cloneNode(!1):Ie,L=Ie.parentNode;if(L){var f=tt(L,1),p=Ie.nextSibling;f.appendChild(k);for(var g=p;g;g=p)p=g.nextSibling,f.appendChild(g)}return k}for(var $e=tt(ve.nextSibling,0),we;(we=$e.parentNode)&&we.nodeType===1;)$e=we;Je.push($e)}for(var Ke=0;Ke<Je.length;++Ke)Ye(Je[Ke]);he===(he|0)&&Je[0].setAttribute("value",he);var at=Ee.createElement("ol");at.className="linenums";for(var et=Math.max(0,he-1|0)||0,Ke=0,qe=Je.length;Ke<qe;++Ke)ke=Je[Ke],ke.className="L"+(Ke+et)%10,ke.firstChild||ke.appendChild(Ee.createTextNode("\xA0")),at.appendChild(ke);G.appendChild(at)}function se(G){var he=/\bMSIE\s(\d+)/.exec(navigator.userAgent);he=he&&+he[1]<=8;var Te=/\n/g,Pe=G.sourceCode,Ne=Pe.length,Ee=0,ke=G.spans,Je=ke.length,Ye=0,Ve=G.decorations,Ke=Ve.length,at=0;Ve[Ke]=Ne;var et,qe;for(qe=et=0;qe<Ke;)Ve[qe]!==Ve[qe+2]?(Ve[et++]=Ve[qe++],Ve[et++]=Ve[qe++]):qe+=2;for(Ke=et,qe=et=0;qe<Ke;){for(var ve=Ve[qe],tt=Ve[qe+1],$e=qe+2;$e+2<=Ke&&Ve[$e+1]===tt;)$e+=2;Ve[et++]=ve,Ve[et++]=tt,qe=$e}Ke=Ve.length=et;var we=G.sourceNode,Ie="";we&&(Ie=we.style.display,we.style.display="none");try{for(var _=null;Ye<Je;){var k=ke[Ye],L=ke[Ye+2]||Ne,f=Ve[at+2]||Ne,$e=Math.min(L,f),p=ke[Ye+1],g;if(p.nodeType!==1&&(g=Pe.substring(Ee,$e))){he&&(g=g.replace(Te,"\r")),p.nodeValue=g;var b=p.ownerDocument,K=b.createElement("span");K.className=Ve[at+1];var le=p.parentNode;le.replaceChild(K,p),K.appendChild(p),Ee<L&&(ke[Ye+1]=p=b.createTextNode(Pe.substring($e,L)),le.insertBefore(p,K.nextSibling))}Ee=$e,Ee>=L&&(Ye+=2),Ee>=f&&(at+=2)}}finally{we&&(we.style.display=Ie)}}var de={};function W(G,he){for(var Te=he.length;--Te>=0;){var Pe=he[Te];de.hasOwnProperty(Pe)?D.console&&console.warn("cannot override language handler %s",Pe):de[Pe]=G}}function q(G,he){return G&&de.hasOwnProperty(G)||(G=/^\s*</.test(he)?"default-markup":"default-code"),de[G]}W(te,["default-code"]),W(oe([],[[y,/^[^<?]+/],[z,/^<!\w[^>]*(?:>|$)/],[J,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[fe,/^(?:<[%?]|[%?]>)/],["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"]),W(oe([[y,/^[\s]+/,null,` \r
`],[j,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Y,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Q,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[fe,/^[=<>\/]+/],["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"]),W(oe([],[[j,/^[\s\S]+/]]),["uq.val"]),W(xe({keywords:ee,hashComments:!0,cStyleComments:!0,types:ce}),["c","cc","cpp","cxx","cyc","m"]),W(xe({keywords:"null,true,false"}),["json"]),W(xe({keywords:ie,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:ce}),["cs"]),W(xe({keywords:be,cStyleComments:!0}),["java"]),W(xe({keywords:Le,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),W(xe({keywords:ae,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),W(xe({keywords:I,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),W(xe({keywords:ne,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),W(xe({keywords:P,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),W(xe({keywords:F,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),W(oe([],[[Ce,/^[\s\S]+/]]),["regex"]);function h(G){var he=G.langExtension;try{var Te=l(G.sourceNode,G.pre),Pe=Te.sourceCode;G.sourceCode=Pe,G.spans=Te.spans,G.basePos=0,q(he,Pe)(G),se(G)}catch(Ne){D.console&&console.log(Ne&&Ne.stack||Ne)}}function S(G,he,Te){var Pe=Te||!1,Ne=he||null,Ee=document.createElement("div");Ee.innerHTML="<pre>"+G+"</pre>",Ee=Ee.firstChild,Pe&&_e(Ee,Pe,!0);var ke={langExtension:Ne,numberLines:Pe,sourceNode:Ee,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return h(ke),Ee.innerHTML}function v(G,he){var Te=he||document.body,Pe=Te.ownerDocument||document;function Ne(k){return Te.getElementsByTagName(k)}for(var Ee=[Ne("pre"),Ne("code"),Ne("xmp")],ke=[],Je=0;Je<Ee.length;++Je)for(var Ye=0,Ve=Ee[Je].length;Ye<Ve;++Ye)ke.push(Ee[Je][Ye]);Ee=null;var Ke=Date;Ke.now||(Ke={now:function(){return+new Date}});var at=0,et=/\blang(?:uage)?-([\w.]+)(?!\S)/,qe=/\bprettyprint\b/,ve=/\bprettyprinted\b/,tt=/pre|xmp/i,$e=/^code$/i,we=/^(?:pre|code|xmp)$/i,Ie={};function _(){for(var k=D.PR_SHOULD_USE_CONTINUATION?Ke.now()+250:Infinity;at<ke.length&&Ke.now()<k;at++){for(var L=ke[at],f=Ie,p=L;p=p.previousSibling;){var g=p.nodeType,b=(g===7||g===8)&&p.nodeValue;if(b?!/^\??prettify\b/.test(b):g!==3||/\S/.test(p.nodeValue))break;if(b){f={},b.replace(/\b(\w+)=([\w:.%+-]+)/g,function(kt,ht,an){f[ht]=an});break}}var K=L.className;if((f!==Ie||qe.test(K))&&!ve.test(K)){for(var le=!1,Me=L.parentNode;Me;Me=Me.parentNode){var nt=Me.tagName;if(we.test(nt)&&Me.className&&qe.test(Me.className)){le=!0;break}}if(!le){L.className+=" prettyprinted";var pt=f.lang;if(!pt){pt=K.match(et);var ot;!pt&&(ot=N(L))&&$e.test(ot.tagName)&&(pt=ot.className.match(et)),pt&&(pt=pt[1])}var bt;if(tt.test(L.tagName))bt=1;else{var Ze=L.currentStyle,He=Pe.defaultView,lt=Ze?Ze.whiteSpace:He&&He.getComputedStyle?He.getComputedStyle(L,null).getPropertyValue("white-space"):0;bt=lt&&lt.substring(0,3)==="pre"}var ut=f.linenums;(ut=ut==="true"||+ut)||(ut=K.match(/\blinenums\b(?::(\d+))?/),ut=ut?ut[1]&&ut[1].length?+ut[1]:!0:!1),ut&&_e(L,ut,bt);var yt={langExtension:pt,sourceNode:L,numberLines:ut,pre:bt,sourceCode:null,basePos:null,spans:null,decorations:null};h(yt)}}}at<ke.length?D.setTimeout(_,250):typeof G=="function"&&G()}_()}var Z=D.PR={createSimpleLexer:oe,registerLangHandler:W,sourceDecorator:xe,PR_ATTRIB_NAME:Q,PR_ATTRIB_VALUE:j,PR_COMMENT:J,PR_DECLARATION:z,PR_KEYWORD:De,PR_LITERAL:Oe,PR_NOCODE:M,PR_PLAIN:y,PR_PUNCTUATION:fe,PR_SOURCE:w,PR_STRING:Ce,PR_TAG:Y,PR_TYPE:pe,prettyPrintOne:re?D.prettyPrintOne=S:$=S,prettyPrint:R=re?D.prettyPrint=v:R=v},ue=D.define;typeof ue=="function"&&ue.amd&&ue("google-code-prettify",[],function(){return Z})})()},"VrN/":function(dt,Ge,C){(function(U,me){dt.exports=me()})(this,function(){"use strict";var U=navigator.userAgent,me=navigator.platform,re=/gecko\/\d/i.test(U),Se=/MSIE \d/.test(U),ye=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(U),$=/Edge\/(\d+)/.exec(U),R=Se||ye||$,D=R&&(Se?document.documentMode||6:+($||ye)[1]),T=!$&&/WebKit\//.test(U),H=T&&/Qt\/\d+\.\d+/.test(U),X=!$&&/Chrome\//.test(U),ee=/Opera\//.test(U),be=/Apple Computer/.test(navigator.vendor),ie=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(U),F=/PhantomJS/.test(U),P=!$&&/AppleWebKit/.test(U)&&/Mobile\/\w+/.test(U),I=/Android/.test(U),ae=P||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(U),ne=P||/Mac/.test(me),Le=/\bCrOS\b/.test(U),Fe=/win/i.test(me),ce=ee&&U.match(/Version\/(\d*\.\d*)/);ce&&(ce=Number(ce[1])),ce&&ce>=15&&(ee=!1,T=!0);var Ce=ne&&(H||ee&&(ce==null||ce<12.11)),De=re||R&&D>=9;function J(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var pe=function(e,t){var r=e.className,n=J(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 Oe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function fe(e,t){return Oe(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 Y(e,t,r,n){var i=y(e,t,r,n);return i.setAttribute("role","presentation"),i}var z;document.createRange?z=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:z=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 Q(){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 j(e,t){var r=e.className;J(t).test(r)||(e.className+=(r?" ":"")+t)}function M(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!J(r[n]).test(t)&&(t+=" "+r[n]);return t}var O=function(e){e.select()};P?O=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:R&&(O=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 m(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 E=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};E.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},E.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 N(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var oe=50,xe={toString:function(){return"CodeMirror.Pass"}},te={scroll:!1},_e={origin:"*mouse"},se={origin:"+move"};function de(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 W=[""];function q(e){for(;W.length<=e;)W.push(h(W)+" ");return W[e]}function h(e){return e[e.length-1]}function S(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 Z(){}function ue(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),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 Te(e,t){return t?t.source.indexOf("\\w")>-1&&he(e)?!0:t.test(e):he(e)}function Pe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ne=/[\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 Ee(e){return e.charCodeAt(0)>=768&&Ne.test(e)}function ke(e,t,r){for(;(r<0?t>0:t<e.length)&&Ee(e.charAt(t));)t+=r;return t}function Je(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 Ve=null;function Ke(e,t,r){var n;Ve=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:Ve=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:Ve=i)}return n!=null?n:Ve}var at=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,x,A){this.level=d,this.from=x,this.to=A}return function(d,x){var A=x=="ltr"?"L":"R";if(d.length==0||x=="ltr"&&!n.test(d))return!1;for(var V=d.length,B=[],ge=0;ge<V;++ge)B.push(r(d.charCodeAt(ge)));for(var Ae=0,je=A;Ae<V;++Ae){var We=B[Ae];We=="m"?B[Ae]=je:je=We}for(var ze=0,Be=A;ze<V;++ze){var Xe=B[ze];Xe=="1"&&Be=="r"?B[ze]="n":a.test(Xe)&&(Be=Xe,Xe=="r"&&(B[ze]="R"))}for(var st=1,it=B[0];st<V-1;++st){var vt=B[st];vt=="+"&&it=="1"&&B[st+1]=="1"?B[st]="1":vt==","&&it==B[st+1]&&(it=="1"||it=="n")&&(B[st]=it),it=vt}for(var St=0;St<V;++St){var Bt=B[St];if(Bt==",")B[St]="N";else if(Bt=="%"){var Dt=void 0;for(Dt=St+1;Dt<V&&B[Dt]=="%";++Dt);for(var ln=St&&B[St-1]=="!"||Dt<V&&B[Dt]=="1"?"1":"N",tn=St;tn<Dt;++tn)B[tn]=ln;St=Dt-1}}for(var jt=0,nn=A;jt<V;++jt){var Kt=B[jt];nn=="L"&&Kt=="1"?B[jt]="L":a.test(Kt)&&(nn=Kt)}for(var Ut=0;Ut<V;++Ut)if(i.test(B[Ut])){var It=void 0;for(It=Ut+1;It<V&&i.test(B[It]);++It);for(var Rt=(Ut?B[Ut-1]:A)=="L",rn=(It<V?B[It]:A)=="L",Nr=Rt==rn?Rt?"L":"R":A,Xn=Ut;Xn<It;++Xn)B[Xn]=Nr;Ut=It-1}for(var Jt=[],kn,Ht=0;Ht<V;)if(o.test(B[Ht])){var Na=Ht;for(++Ht;Ht<V&&o.test(B[Ht]);++Ht);Jt.push(new u(0,Na,Ht))}else{var Dn=Ht,ur=Jt.length,cr=x=="rtl"?1:0;for(++Ht;Ht<V&&B[Ht]!="L";++Ht);for(var Zt=Dn;Zt<Ht;)if(s.test(B[Zt])){Dn<Zt&&(Jt.splice(ur,0,new u(1,Dn,Zt)),ur+=cr);var jr=Zt;for(++Zt;Zt<Ht&&s.test(B[Zt]);++Zt);Jt.splice(ur,0,new u(2,jr,Zt)),ur+=cr,Dn=Zt}else++Zt;Dn<Ht&&Jt.splice(ur,0,new u(1,Dn,Ht))}return x=="ltr"&&(Jt[0].level==1&&(kn=d.match(/^\s+/))&&(Jt[0].from=kn[0].length,Jt.unshift(new u(0,0,kn[0].length))),h(Jt).level==1&&(kn=d.match(/\s+$/))&&(h(Jt).to-=kn[0].length,Jt.push(new u(0,V-kn[0].length,V)))),x=="rtl"?Jt.reverse():Jt}}();function et(e,t){var r=e.order;return r==null&&(r=e.order=at(e.text,t)),r}var qe=[],ve=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]||qe).concat(r)}};function tt(e,t){return e._handlers&&e._handlers[t]||qe}function $e(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var a=N(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function we(e,t){var r=tt(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 Ie(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),we(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)N(r,t[n])==-1&&r.push(t[n])}function k(e,t){return tt(e,t).length>0}function L(e){e.prototype.on=function(t,r){ve(this,t,r)},e.prototype.off=function(t,r){$e(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function p(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function g(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function b(e){f(e),p(e)}function K(e){return e.target||e.srcElement}function le(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ne&&e.ctrlKey&&t==1&&(t=3),t}var Me=function(){if(R&&D<9)return!1;var e=y("div");return"draggable"in e||"dragDrop"in e}(),nt;function pt(e){if(nt==null){var t=y("span","\u200B");fe(e,y("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(nt=t.offsetWidth<=1&&t.offsetHeight>2&&!(R&&D<8))}var r=nt?y("span","\u200B"):y("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var ot;function bt(e){if(ot!=null)return ot;var t=fe(e,document.createTextNode("A\u062EA")),r=z(t,0,1).getBoundingClientRect(),n=z(t,1,2).getBoundingClientRect();return Oe(e),!r||r.left==r.right?!1:ot=n.right-r.right<3}var Ze=`
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/)},He=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},lt=function(){var e=y("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ut=null;function yt(e){if(ut!=null)return ut;var t=fe(e,y("span","x")),r=t.getBoundingClientRect(),n=z(t,0,1).getBoundingClientRect();return ut=Math.abs(r.left-n.left)>1}var kt={},ht={};function an(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),kt[e]=t}function Gt(e,t){ht[e]=t}function Xt(e){if(typeof e=="string"&&ht.hasOwnProperty(e))e=ht[e];else if(e&&typeof e.name=="string"&&ht.hasOwnProperty(e.name)){var t=ht[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 Xt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gn(e,t){t=Xt(t);var r=kt[t.name];if(!r)return gn(e,"text/plain");var n=r(e,t);if(vn.hasOwnProperty(t.name)){var i=vn[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 vn={};function bi(e,t){var r=vn.hasOwnProperty(e)?vn[e]:vn[e]={};l(t,r)}function fn(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 At=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};At.prototype.eol=function(){return this.pos>=this.string.length},At.prototype.sol=function(){return this.pos==this.lineStart},At.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},At.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},At.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},At.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},At.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},At.prototype.skipToEnd=function(){this.pos=this.string.length},At.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},At.prototype.backUp=function(e){this.pos-=e},At.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=m(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},At.prototype.indentation=function(){return m(this.string,null,this.tabSize)-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},At.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)}},At.prototype.current=function(){return this.string.slice(this.start,this.pos)},At.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},At.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},At.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Qe(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t<a){r=i;break}t-=a}return r.lines[t]}function 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 hn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function xt(e){if(e.parent==null)return null;for(var t=e.parent,r=N(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 Tn(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 Re(e,t,r){if(r===void 0&&(r=null),!(this instanceof Re))return new Re(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ft(e,t){return e.line-t.line||e.ch-t.ch}function Ue(e,t){return e.sticky==t.sticky&&ft(e,t)==0}function Ir(e){return Re(e.line,e.ch)}function hr(e,t){return ft(e,t)<0?t:e}function Yn(e,t){return ft(e,t)<0?e:t}function Jn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ct(e,t){if(t.line<e.first)return Re(e.first,0);var r=e.first+e.size-1;return t.line>r?Re(r,Qe(e,r).text.length):qi(t,Qe(e,t.line).text.length)}function qi(e,t){var r=e.ch;return r==null||r>t?Re(e.line,t):r<0?Re(e.line,0):e}function Ur(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ct(e,t[n]);return r}var pn=function(e,t){this.state=e,this.lookAhead=t},un=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},un.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(e,t,r){return t instanceof pn?new un(e,fn(e.mode,t.state),r,t.lookAhead):new un(e,fn(e.mode,t),r)},un.prototype.save=function(e){var t=e!==!1?fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pn(t,this.maxLookAhead):t};function yi(e,t,r,n){var i=[e.state.modeGen],a={};Wr(e,t.text,e.doc.mode,r,function(d,x){return i.push(d,x)},a,n);for(var o=r.state,s=function(d){r.baseTokens=i;var x=e.state.overlays[d],A=1,V=0;r.state=!0,Wr(e,t.text,x.mode,r,function(B,ge){for(var Ae=A;V<B;){var je=i[A];je>B&&i.splice(A,1,B,i[A+1],je),A+=2,V=Math.min(B,je)}if(!ge)return;if(x.opaque)i.splice(Ae,A-Ae,B,"overlay "+ge),A=Ae+2;else for(;Ae<A;Ae+=2){var We=i[Ae+1];i[Ae+1]=(We?We+" ":"")+"overlay "+ge}},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 Fr(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=on(e,xt(t)),i=t.text.length>e.options.maxHighlightLength&&fn(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 on(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new un(n,!0,t);var a=qn(e,t,r),o=a>n.first&&Qe(n,a-1).stateAfter,s=o?un.fromSaved(n,o,a):new un(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 At(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 On=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function An(e,t,r,n){var i=e.doc,a=i.mode,o;t=ct(i,t);var s=Qe(i,t.line),u=on(e,t.line,r),d=new At(s.text,e.options.tabSize,u),x;for(n&&(x=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=mr(a,d,u.state),n&&x.push(new On(d,o,fn(i.mode,u.state)));return n?x:new On(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 Wr(e,t,r,n,i,a,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var u=0,d=null,x=new At(t,e.options.tabSize,n),A,V=e.options.addModeClass&&[null];for(t==""&&wi(xi(r,n.state),a);!x.eol();){if(x.pos>e.options.maxHighlightLength?(s=!1,o&&pr(e,t,n,x.pos),x.pos=t.length,A=null):A=wi(mr(r,x,n.state,V),a),V){var B=V[0].name;B&&(A="m-"+(A?B+" "+A:B))}if(!s||d!=A){for(;u<x.start;)u=Math.min(x.start,u+5e3),i(u,d);d=A}x.start=x.pos}for(;u<x.pos;){var ge=Math.min(x.pos,u+5e3);i(ge,d),u=ge}}function qn(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=Qe(a,s-1),d=u.stateAfter;if(d&&(!r||s+(d instanceof pn?d.lookAhead:0)<=a.modeFrontier))return s;var x=m(u.text,null,e.options.tabSize);(i==null||n>x)&&(i=s-1,n=x)}return i}function Br(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=Qe(e,n).stateAfter;if(i&&(!(i instanceof pn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Ei=!1,mn=!1;function Ci(){Ei=!0}function _i(){mn=!0}function gr(e,t,r){this.marker=e,this.from=t,this.to=r}function Pn(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 Zn(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 Nn(e,t){if(t.full)return null;var r=Rn(e,t.from.line)&&Qe(e,t.from.line).markedSpans,n=Rn(e,t.to.line)&&Qe(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=ft(t.from,t.to)==0,s=Zn(r,i,o),u=zr(n,a,o),d=t.text.length==1,x=h(t.text).length+(d?i:0);if(s)for(var A=0;A<s.length;++A){var V=s[A];if(V.to==null){var B=Pn(u,V.marker);B?d&&(V.to=B.to==null?null:B.to+x):V.to=i}}if(u)for(var ge=0;ge<u.length;++ge){var Ae=u[ge];if(Ae.to!=null&&(Ae.to+=x),Ae.from==null){var je=Pn(s,Ae.marker);je||(Ae.from=x,d&&(s||(s=[])).push(Ae))}else Ae.from+=x,d&&(s||(s=[])).push(Ae)}s&&(s=Qn(s)),u&&u!=s&&(u=Qn(u));var We=[s];if(!d){var ze=t.text.length-2,Be;if(ze>0&&s)for(var Xe=0;Xe<s.length;++Xe)s[Xe].to==null&&(Be||(Be=[])).push(new gr(s[Xe].marker,null,null));for(var st=0;st<ze;++st)We.push(Be);We.push(u)}return We}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 ki(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(B){if(B.markedSpans)for(var ge=0;ge<B.markedSpans.length;++ge){var Ae=B.markedSpans[ge].marker;Ae.readOnly&&(!n||N(n,Ae)==-1)&&(n||(n=[])).push(Ae)}}),!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(ft(d.to,s.from)<0||ft(d.from,s.to)>0)continue;var x=[u,1],A=ft(d.from,s.from),V=ft(d.to,s.to);(A<0||!o.inclusiveLeft&&!A)&&x.push({from:d.from,to:s.from}),(V>0||!o.inclusiveRight&&!V)&&x.push({from:s.to,to:d.to}),i.splice.apply(i,x),u+=x.length-3}return i}function Kr(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function er(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function vr(e){return e.inclusiveLeft?-1:0}function En(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=ft(n.from,i.from)||vr(e)-vr(t);if(a)return-a;var o=ft(n.to,i.to)||En(e)-En(t);return o||t.id-e.id}function Si(e,t){var r=mn&&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 Si(e,!0)}function Xr(e){return Si(e,!1)}function Ua(e,t){var r=mn&&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 Zi(e,t,r,n,i){var a=Qe(e,t),o=mn&&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),x=ft(d.from,r)||vr(u.marker)-vr(i),A=ft(d.to,n)||En(u.marker)-En(i);if(x>=0&&A<=0||x<=0&&A>=0)continue;if(x<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ft(d.to,r)>=0:ft(d.to,r)>0)||x>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ft(d.from,n)<=0:ft(d.from,n)<0))return!0}}function rt(e){for(var t;t=Ti(e);)e=t.find(-1,!0).line;return e}function mt(e){for(var t;t=Xr(e);)e=t.find(1,!0).line;return e}function gt(e){for(var t,r;t=Xr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Ct(e,t){var r=Qe(e,t),n=rt(r);return r==n?t:xt(n)}function _t(e,t){if(t>e.lastLine())return t;var r=Qe(e,t),n;if(!Tt(e,r))return t;for(;n=Xr(r);)r=n.find(1,!0).line;return xt(r)+1}function Tt(e,t){var r=mn&&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&&Pt(e,t,n))return!0}}function Pt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Pt(e,n.line,Pn(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)&&Pt(e,t,i))return!0}function Lt(e){e=rt(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 Vt(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=Xr(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 bn(e){var t=e.display,r=e.doc;t.maxLine=Qe(r,r.first),t.maxLineLength=Vt(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Vt(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var Ot=function(e,t,r){this.text=e,er(this,t),this.height=r?r(this):1};Ot.prototype.lineNo=function(){return xt(this)},L(Ot);function jn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Kr(e),er(e,r);var i=n?n(e):1;i!=e.height&&hn(e,i)}function $t(e){e.parent=null,Kr(e)}var In={},Un={};function br(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Un:In;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Fa(e,t){var r=Y("span",null,null,T?"padding-right: .1px":null),n={pre:Y("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=ks,bt(e.display.measure)&&(o=et(a,e.doc.direction))&&(n.addToken=Ts(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&xt(a);Os(a,n,Fr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=M(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=M(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(pt(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(T){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 we(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=M(n.pre.className,n.textClass||"")),n}function _s(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 ks(e,t,r,n,i,a,o){if(!t)return;var s=e.splitSpaces?Ss(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,x;if(!u.test(t))e.col+=t.length,x=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,x),R&&D<9&&(d=!0),e.pos+=t.length;else{x=document.createDocumentFragment();for(var A=0;;){u.lastIndex=A;var V=u.exec(t),B=V?V.index-A:t.length-A;if(B){var ge=document.createTextNode(s.slice(A,A+B));R&&D<9?x.appendChild(y("span",[ge])):x.appendChild(ge),e.map.push(e.pos,e.pos+B,ge),e.col+=B,e.pos+=B}if(!V)break;A+=B+1;var Ae=void 0;if(V[0]==" "){var je=e.cm.options.tabSize,We=je-e.col%je;Ae=x.appendChild(y("span",q(We),"cm-tab")),Ae.setAttribute("role","presentation"),Ae.setAttribute("cm-text"," "),e.col+=We}else V[0]=="\r"||V[0]==`
`?(Ae=x.appendChild(y("span",V[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ae.setAttribute("cm-text",V[0]),e.col+=1):(Ae=e.cm.options.specialCharPlaceholder(V[0]),Ae.setAttribute("cm-text",V[0]),R&&D<9?x.appendChild(y("span",[Ae])):x.appendChild(Ae),e.col+=1);e.map.push(e.pos,e.pos+1,Ae),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var ze=r||"";n&&(ze+=n),i&&(ze+=i);var Be=y("span",[x],ze,a);if(o)for(var Xe in o)o.hasOwnProperty(Xe)&&Xe!="style"&&Xe!="class"&&Be.setAttribute(Xe,o[Xe]);return e.content.appendChild(Be)}e.content.appendChild(x)}function Ss(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,x=d+n.length;;){for(var A=void 0,V=0;V<t.length&&!(A=t[V],A.to>d&&A.from<=d);V++);if(A.to>=x)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 Wa(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Os(e,t,r){var n=e.markedSpans,i=e.text,a=0;if(!n){for(var o=1;o<r.length;o+=2)t.addToken(t,i.slice(a,a=r[o]),br(r[o+1],t.cm.options));return}for(var s=i.length,u=0,d=1,x="",A,V,B=0,ge,Ae,je,We,ze;;){if(B==u){ge=Ae=je=V="",ze=null,We=null,B=Infinity;for(var Be=[],Xe=void 0,st=0;st<n.length;++st){var it=n[st],vt=it.marker;if(vt.type=="bookmark"&&it.from==u&&vt.widgetNode)Be.push(vt);else if(it.from<=u&&(it.to==null||it.to>u||vt.collapsed&&it.to==u&&it.from==u)){if(it.to!=null&&it.to!=u&&B>it.to&&(B=it.to,Ae=""),vt.className&&(ge+=" "+vt.className),vt.css&&(V=(V?V+";":"")+vt.css),vt.startStyle&&it.from==u&&(je+=" "+vt.startStyle),vt.endStyle&&it.to==B&&(Xe||(Xe=[])).push(vt.endStyle,it.to),vt.title&&((ze||(ze={})).title=vt.title),vt.attributes)for(var St in vt.attributes)(ze||(ze={}))[St]=vt.attributes[St];vt.collapsed&&(!We||Gr(We.marker,vt)<0)&&(We=it)}else it.from>u&&B>it.from&&(B=it.from)}if(Xe)for(var Bt=0;Bt<Xe.length;Bt+=2)Xe[Bt+1]==B&&(Ae+=" "+Xe[Bt]);if(!We||We.from==u)for(var Dt=0;Dt<Be.length;++Dt)Wa(t,0,Be[Dt]);if(We&&(We.from||0)==u){if(Wa(t,(We.to==null?s+1:We.to)-u,We.marker,We.from==null),We.to==null)return;We.to==u&&(We=!1)}}if(u>=s)break;for(var ln=Math.min(s,B);;){if(x){var tn=u+x.length;if(!We){var jt=tn>ln?x.slice(0,ln-u):x;t.addToken(t,jt,A?A+ge:ge,je,u+jt.length==B?Ae:"",V,ze)}if(tn>=ln){x=x.slice(ln-u),u=ln;break}u=tn,je=""}x=i.slice(a,a=r[d++]),A=br(r[d++],t.cm.options)}}}function Ba(e,t,r){this.line=t,this.rest=gt(t),this.size=this.rest?xt(h(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Tt(e,t)}function Oi(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Ba(e.doc,Qe(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 zt(e,t){var r=tt(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(Ds,0));for(var a=function(s){i.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ds(){var e=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"?Ka(e,t,r,n):a=="class"?Qi(e,t):a=="widget"&&Ns(e,t,n)}t.changes=null}function $r(e){return e.node==e.text&&(e.node=y("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),R&&D<8&&(e.node.style.zIndex=2)),e.node}function Rs(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=$r(t);t.background=n.insertBefore(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):Fa(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){Rs(e,t),t.line.wrapClass?$r(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Ka(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=$r(t);t.gutterBackground=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,x=a.hasOwnProperty(d)&&a[d];x&&s.appendChild(y("div",[x],"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=J("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),Ka(e,t,r,n),Ga(e,t,n),t.node}function Ga(e,t,r){if(Xa(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Xa(e,t.rest[n],t,r,!1)}function Xa(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),zt(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;"),fe(t.display.measure,y("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Ln(e,t){for(var r=K(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=fe(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 Cn(e){return oe-e.display.nativeBarWidth}function tr(e){return e.display.scroller.clientWidth-Cn(e)-e.display.barWidth}function ta(e){return e.display.scroller.clientHeight-Cn(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&tr(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var 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(xt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=rt(t);var r=xt(t),n=e.display.externalMeasured=new Ba(e.doc,t,r);n.lineN=r;var i=n.built=Fa(e,n);return n.text=i.pre,fe(e.display.lineMeasure,i.pre),n}function Ya(e,t,r,n){return _n(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=xt(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=Fs(e,t));var i=$a(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function _n(e,t,r,n,i){t.before&&(r=-1);var a=r+(n||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Us(e,t.view,t.rect),t.hasHeights=!0),o=Bs(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 qa(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 Ws(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 Bs(e,t,r,n){var i=qa(t.map,r,n),a=i.node,o=i.start,s=i.end,u=i.collapse,d;if(a.nodeType==3){for(var x=0;x<4;x++){for(;o&&Ee(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s<i.coverEnd&&Ee(t.line.text.charAt(i.coverStart+s));)++s;if(R&&D<9&&o==0&&s==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Ws(z(a,o,s).getClientRects(),n),d.left||d.right||o==0)break;s=o,o=o-1,u="right"}R&&D<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(R&&D<9&&!o&&(!d||!d.left&&!d.right)){var V=a.parentNode.getClientRects()[0];V?d={left:V.left,right:V.left+Er(e.display),top:V.top,bottom:V.bottom}:d=Ja}for(var B=d.top-t.rect.top,ge=d.bottom-t.rect.top,Ae=(B+ge)/2,je=t.view.measure.heights,We=0;We<je.length-1&&!(Ae<je[We]);We++);var ze=We?je[We-1]:0,Be=je[We],Xe={left:(u=="right"?d.right:d.left)-t.rect.left,right:(u=="left"?d.left:d.right)-t.rect.left,top:ze,bottom:Be};return!d.left&&!d.right&&(Xe.bogus=!0),e.options.singleCursorHeightPerLine||(Xe.rtop=B,Xe.rbottom=ge),Xe}function Hs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!yt(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 Za(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,Oe(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Za(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 X&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function to(){return X&&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=Lt(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=Qe(e.doc,t.line)),Li(e,n,Ya(e,n,t.ch,i),r)}function yn(e,t,r,n,i,a){n=n||Qe(e.doc,t.line),i||(i=xr(e,n));function o(ge,Ae){var je=_n(e,i,ge,Ae?"right":"left",a);return Ae?je.left=je.right:je.right=je.left,Li(e,n,je,r)}var s=et(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 x(ge,Ae,je){var We=s[Ae],ze=We.level==1;return o(je?ge-1:ge,ze!=je)}var A=Ke(s,u,d),V=Ve,B=x(u,A,d=="before");return V!=null&&(B.other=x(u,V,d!="before")),B}function ro(e,t){var r=0;t=ct(e.doc,t),e.options.lineWrapping||(r=Er(e.display)*t.ch);var n=Qe(e.doc,t.line),i=Lt(n)+Ai(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function aa(e,t,r,n,i){var a=Re(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=Tn(n,r),a=n.first+n.size-1;if(i>a)return aa(n.first+n.size-1,Qe(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=Qe(n,i);;){var s=zs(e,o,i,t,r),u=Ua(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=Qe(n,i=d.line)}}function io(e,t,r,n){n-=ra(t);var i=t.text.length,a=Je(function(o){return _n(e,r,o-1).bottom<=n},i,0);return i=Je(function(o){return _n(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,_n(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-=Lt(t);var a=xr(e,t),o=ra(t),s=0,u=t.text.length,d=!0,x=et(t,e.doc.direction);if(x){var A=(e.options.lineWrapping?Gs:Ks)(e,t,r,a,x,n,i);d=A.level!=1,s=d?A.from:A.to-1,u=d?A.to:A.from-1}var V=null,B=null,ge=Je(function(st){var it=_n(e,a,st);return it.top+=o,it.bottom+=o,sa(it,n,i,!1)?(it.top<=i&&it.left<=n&&(V=st,B=it),!0):!1},s,u),Ae,je,We=!1;if(B){var ze=n-B.left<B.right-n,Be=ze==d;ge=V+(Be?0:1),je=Be?"after":"before",Ae=ze?B.left:B.right}else{!d&&(ge==u||ge==s)&&ge++,je=ge==0?"after":ge==t.text.length?"before":_n(e,a,ge-(d?1:0)).bottom+o<=i==d?"after":"before";var Xe=yn(e,Re(r,ge,je),"line",t,a);Ae=Xe.left,We=i<Xe.top?-1:i>=Xe.bottom?1:0}return ge=ke(t.text,ge,1),aa(r,ge,je,We,n-Ae)}function Ks(e,t,r,n,i,a,o){var s=Je(function(A){var V=i[A],B=V.level!=1;return sa(yn(e,Re(r,B?V.to:V.from,B?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[s];if(s>0){var d=u.level!=1,x=yn(e,Re(r,d?u.from:u.to,d?"after":"before"),"line",t,n);sa(x,a,o,!0)&&x.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 x=null,A=null,V=0;V<i.length;V++){var B=i[V];if(B.from>=d||B.to<=u)continue;var ge=B.level!=1,Ae=_n(e,n,ge?Math.min(d,B.to)-1:Math.max(u,B.from)).right,je=Ae<a?a-Ae+1e9:Ae-a;(!x||A>je)&&(x=B,A=je)}return x||(x=i[i.length-1]),x.from<u&&(x={from:u,to:x.to,level:x.level}),x.to>d&&(x={from:x.from,to:d,level:x.level}),x}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"))}fe(e.measure,nr);var r=nr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Oe(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");fe(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(Tt(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&&hn(n,i)})}function rr(e,t,r,n){var i=e.display;if(!r&&K(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=Qe(e.doc,u.line).text).length==u.ch){var x=m(d,d.length,e.options.tabSize)-d.length;u=Re(u.line,Math.max(0,Math.round((a-Va(e.display).left)/Er(e.display))-x))}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 Qt(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)mn&&Ct(e.doc,t)<i.viewTo&&Wn(e);else if(r<=i.viewFrom)mn&&_t(e.doc,r+n)>i.viewFrom?Wn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Wn(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):Wn(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):Wn(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):Wn(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=[]);N(o,r)==-1&&o.push(r)}function Wn(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(!mn||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(;Ct(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Xs(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=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 qr(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=yn(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 Di(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 x(Be,Xe,st,it){Xe<0&&(Xe=0),Xe=Math.round(Xe),it=Math.round(it),a.appendChild(y("div",null,"CodeMirror-selected","position: absolute; left: "+Be+`px;
top: `+Xe+"px; width: "+(st==null?u-Be:st)+`px;
height: `+(it-Xe)+"px"))}function A(Be,Xe,st){var it=Qe(i,Be),vt=it.text.length,St,Bt;function Dt(jt,nn){return ia(e,Re(Be,jt),"div",it,nn)}function ln(jt,nn,Kt){var Ut=ao(e,it,null,jt),It=nn=="ltr"==(Kt=="after")?"left":"right",Rt=Kt=="after"?Ut.begin:Ut.end-(/\s/.test(it.text.charAt(Ut.end-1))?2:1);return Dt(Rt,It)[It]}var tn=et(it,i.direction);return Ye(tn,Xe||0,st==null?vt:st,function(jt,nn,Kt,Ut){var It=Kt=="ltr",Rt=Dt(jt,It?"left":"right"),rn=Dt(nn-1,It?"right":"left"),Nr=Xe==null&&jt==0,Xn=st==null&&nn==vt,Jt=Ut==0,kn=!tn||Ut==tn.length-1;if(rn.top-Rt.top<=3){var Ht=(d?Nr:Xn)&&Jt,Na=(d?Xn:Nr)&&kn,Dn=Ht?s:(It?Rt:rn).left,ur=Na?u:(It?rn:Rt).right;x(Dn,Rt.top,ur-Dn,Rt.bottom)}else{var cr,Zt,jr,ja;It?(cr=d&&Nr&&Jt?s:Rt.left,Zt=d?u:ln(jt,Kt,"before"),jr=d?s:ln(nn,Kt,"after"),ja=d&&Xn&&kn?u:rn.right):(cr=d?ln(jt,Kt,"before"):s,Zt=!d&&Nr&&Jt?u:Rt.right,jr=!d&&Xn&&kn?s:rn.left,ja=d?ln(nn,Kt,"after"):u),x(cr,Rt.top,Zt-cr,Rt.bottom),Rt.bottom<rn.top&&x(s,Rt.bottom,null,rn.top),x(jr,rn.top,ja-jr,rn.bottom)}(!St||Di(Rt,St)<0)&&(St=Rt),Di(rn,St)<0&&(St=rn),(!Bt||Di(Rt,Bt)<0)&&(Bt=Rt),Di(rn,Bt)<0&&(Bt=rn)}),{start:St,end:Bt}}var V=t.from(),B=t.to();if(V.line==B.line)A(V.line,V.ch,B.ch);else{var ge=Qe(i,V.line),Ae=Qe(i,B.line),je=rt(ge)==rt(Ae),We=A(V.line,V.ch,je?ge.text.length+1:null).end,ze=A(B.line,je?0:null,B.ch).start;je&&(We.top<ze.top-2?(x(We.right,We.top,null,We.bottom),x(s,ze.top,ze.left,ze.bottom)):x(We.right,We.top,ze.left-We.right,We.bottom)),We.bottom<ze.top&&x(s,We.bottom,null,ze.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||(we(e,"focus",e,t),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),T&&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&&(we(e,"blur",e,t),e.state.focused=!1,pe(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ri(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],a=e.options.lineWrapping,o=void 0,s=0;if(i.hidden)continue;if(R&&D<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 x=i.line.height-o;if((x>.005||x<-.005)&&(hn(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 V=Math.ceil(s/Er(e.display));V>e.display.maxLineLength&&(e.display.maxLineLength=V,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=Tn(t,n),o=Tn(t,i);if(r&&r.ensure){var s=r.ensure.from.line,u=r.ensure.to.line;s<a?(a=s,o=Tn(t,Lt(Qe(t,s))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=Tn(t,Lt(Qe(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function $s(e,t){if(Ie(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&&!F){var a=y("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Ai(e.display))+`px;
height: `+(t.bottom-t.top+Cn(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?Re(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Re(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=yn(e,t),u=!r||r==t?s:yn(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),x=e.doc.scrollTop,A=e.doc.scrollLeft;if(d.scrollTop!=null&&(Qr(e,d.scrollTop),Math.abs(e.doc.scrollTop-x)>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 x=Math.min(t.top,(d?s:t.bottom)-a);x!=i&&(o.scrollTop=x)}var A=e.options.fixedGutter?0:r.gutters.offsetWidth,V=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-A,B=tr(e)-r.gutters.offsetWidth,ge=t.right-t.left>B;return ge&&(t.right=t.left+B),t.left<10?o.scrollLeft=0:t.left<V?o.scrollLeft=Math.max(0,t.left+A-(ge?0:10)):t.right>B+V-3&&(o.scrollLeft=t.right+(ge?0:10)-B),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 _r(e){Ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Zr(e,t,r){(t!=null||r!=null)&&Ni(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function qs(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});Zr(e,i.scrollLeft,i.scrollTop)}function Qr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;re||ga(e,{top:t}),mo(e,t,!0),re&&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+Cn(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),ve(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,R&&D<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=ne&&!ie?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new E,this.disableVert=new E},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 kr(e,t){t||(t=ei(e));var r=e.display.barWidth,n=e.display.barHeight;go(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Ri(e),go(e,ei(e)),r=e.display.barWidth,n=e.display.barHeight}function go(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var vo={native:or,null:ti};function bo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&pe(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),ve(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&&j(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=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:++Zs},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&&bn(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&&Ri(t),e.barMeasure=ei(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ya(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Cn(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==Q();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&kr(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,ct(n,e.scrollToPos.from),ct(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||we(a[s],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&we(o[u],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&we(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function sn(e,t){if(e.curOp)return t();sr(e);try{return t()}finally{lr(e)}}function Ft(e,t){return function(){if(e.curOp)return t.apply(e,arguments);sr(e);try{return t.apply(e,arguments)}finally{lr(e)}}}function qt(e){return function(){if(this.curOp)return e.apply(this,arguments);sr(this);try{return e.apply(this,arguments)}finally{lr(this)}}}function Wt(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=on(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?fn(t.mode,n.state):null,u=yi(e,a,n,!0);s&&(n.state=s),a.styles=u.styles;var d=a.styleClasses,x=u.classes;x?a.styleClasses=x:d&&(a.styleClasses=null);for(var A=!o||o.length!=a.styles.length||d!=x&&(!d||!x||d.bgClass!=x.bgClass||d.textClass!=x.textClass),V=0;!A&&V<o.length;++V)A=o[V]!=a.styles[V];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&&sn(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){k(e,t)&&this.events.push(arguments)},ji.prototype.finish=function(){for(var e=0;e<this.events.length;e++)we.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=Cn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Cn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=Q();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==Q())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 Wn(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)&&(Wn(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)),mn&&(a=Ct(e.doc,a),o=_t(e.doc,o));var s=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Xs(e,a,o),r.viewOffset=Lt(Qe(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),Oe(r.cursorDiv),Oe(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ni(e,400)),r.updateLineNumbers=null,!0}function yo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==tr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ea(e.display)-ta(e),r.top)}),t.visible=Pi(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Pi(e.display,e.doc,r));if(!ma(e,t))break;Ri(e);var i=ei(e);qr(e),kr(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)){Ri(e),yo(e,r);var n=ei(e);qr(e),kr(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(ge){var Ae=ge.nextSibling;return T&&ne&&e.display.currentWheelTarget==ge?ge.style.display="none":ge.parentNode.removeChild(ge),Ae}for(var u=n.view,d=n.viewFrom,x=0;x<u.length;x++){var A=u[x];if(!A.hidden)if(!A.node||A.node.parentNode!=a){var V=js(e,A,d,r);a.insertBefore(V,o)}else{for(;o!=A.node;)o=s(o);var B=i&&t!=null&&t<=d&&A.lineNumber;A.changes&&(N(A.changes,"gutter")>-1&&(B=!1),Ha(e,A,d,r)),B&&(Oe(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+Cn(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;Oe(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),Qt(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=Y("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=Y("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=Y("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: "+oe+"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"),R&&D<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!T&&!(re&&ae)&&(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,cn=null;R?cn=-.53:re?cn=15:X?cn=-.7:be&&(cn=-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*=cn,t.y*=cn,t}function _o(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&&ne&&T){e:for(var d=t.target,x=a.view;d!=o;d=d.parentNode)for(var A=0;A<x.length;A++)if(x[A].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!re&&!ee&&cn!=null){i&&u&&Qr(e,Math.max(0,o.scrollTop+i*cn)),ar(e,Math.max(0,o.scrollLeft+n*cn)),(!i||i&&u)&&f(t),a.wheelStartX=null;return}if(i&&cn!=null){var V=i*cn,B=e.doc.scrollTop,ge=B+a.wrapper.clientHeight;V<0?B=Math.max(0,B+V-50):ge=Math.min(e.doc.height,ge+V+50),ga(e,{top:B,bottom:ge})}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 Ae=o.scrollLeft-a.wheelStartX,je=o.scrollTop-a.wheelStartY,We=je&&a.wheelDY&&je/a.wheelDY||Ae&&a.wheelDX&&Ae/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!We)return;cn=(cn*Ii+We)/(Ii+1),++Ii},200)):(a.wheelDX+=n,a.wheelDY+=i))}var dn=function(e,t){this.ranges=e,this.primIndex=t};dn.prototype.primary=function(){return this.ranges[this.primIndex]},dn.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},dn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new wt(Ir(this.ranges[t].anchor),Ir(this.ranges[t].head));return new dn(e,this.primIndex)},dn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},dn.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ft(t,n.from())>=0&&ft(e,n.to())<=0)return r}return-1};var wt=function(e,t){this.anchor=e,this.head=t};wt.prototype.from=function(){return Yn(this.anchor,this.head)},wt.prototype.to=function(){return hr(this.anchor,this.head)},wt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function xn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(V,B){return ft(V.from(),B.from())}),r=N(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],u=ft(s.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var d=Yn(s.from(),o.from()),x=hr(s.to(),o.to()),A=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new wt(A?x:d,A?d:x))}}return new dn(t,r)}function Bn(e,t){return new dn([new wt(e,t||e)],0)}function Hn(e){return e.text?Re(e.from.line+e.text.length-1,h(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ko(e,t){if(ft(e,t.from)<0)return e;if(ft(e,t.to)<=0)return Hn(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+=Hn(t).ch-t.to.ch),Re(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 wt(ko(i.anchor,t),ko(i.head,t)))}return xn(e.cm,r,e.sel.primIndex)}function So(e,t,r){return e.line==t.line?Re(r.line,e.ch-t.ch+r.ch):Re(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Re(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],u=So(s.from,i,a),d=So(Hn(s),i,a);if(i=s.to,a=d,r=="around"){var x=e.sel.ranges[o],A=ft(x.head,x.anchor)<0;n[o]=new wt(A?d:u,A?u:d)}else n[o]=new wt(u,u)}return new dn(n,e.sel.primIndex)}function wa(e){e.doc.mode=gn(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&&Qt(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(ze){return r?r[ze]:null}function a(ze,Be,Xe){jn(ze,Be,Xe,n),zt(ze,"change",ze,t)}function o(ze,Be){for(var Xe=[],st=ze;st<Be;++st)Xe.push(new Ot(d[st],i(st),n));return Xe}var s=t.from,u=t.to,d=t.text,x=Qe(e,s.line),A=Qe(e,u.line),V=h(d),B=i(d.length-1),ge=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 Ae=o(0,d.length-1);a(A,A.text,B),ge&&e.remove(s.line,ge),Ae.length&&e.insert(s.line,Ae)}else if(x==A)if(d.length==1)a(x,x.text.slice(0,s.ch)+V+x.text.slice(u.ch),B);else{var je=o(1,d.length-1);je.push(new Ot(V+x.text.slice(u.ch),B,n)),a(x,x.text.slice(0,s.ch)+d[0],i(0)),e.insert(s.line+1,je)}else if(d.length==1)a(x,x.text.slice(0,s.ch)+d[0]+A.text.slice(u.ch),i(0)),e.remove(s.line+1,ge);else{a(x,x.text.slice(0,s.ch)+d[0],i(0)),a(A,V+A.text.slice(u.ch),B);var We=o(1,d.length-1);ge>1&&e.remove(s.line+1,ge-1),e.insert(s.line+1,We)}zt(e,"change",e,t)}function zn(e,t,r){function n(i,a,o){if(i.linked)for(var s=0;s<i.linked.length;++s){var 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||bn(e),e.options.mode=t.modeOption,Qt(e)}function Ao(e){(e.doc.direction=="rtl"?j:pe)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){sn(e,function(){Ao(e),Qt(e)})}function Ui(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ca(e,t){var r={from:Ir(t.from),to:Hn(t),text:Sn(e,t.from,t.to)};return Do(e,r,t.from.line,t.to.line+1),zn(e,function(n){return Do(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),ft(t.from,t.to)==0&&ft(t.from,s.to)==0?s.to=Hn(t):o.changes.push(Ca(e,t));else{var u=h(i.done);for((!u||!u.ranges)&&Fi(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||we(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:Fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Lo(i.undone)}function Fi(e,t){var r=h(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Do(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function Ro(e,t){var r=bl(e,t),n=Nn(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 Sr(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?dn.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],x=void 0;if(s.push({from:d.from,to:d.to,text:d.text}),t)for(var A in d)(x=A.match(/^spans_(\d+)$/))&&(N(t,Number(x[1]))>-1&&(h(s)[A]=d[A],delete d[A]))}}return n}function _a(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ft(t,i)<0;a!=ft(r,i)<0?(i=t,t=r):a!=ft(t,r)<0&&(t=r)}return new wt(i,t)}else return new wt(r||t,t)}function Wi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Yt(e,new dn([_a(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]=_a(e.sel.ranges[a],t[a],null,i);var o=xn(e.cm,n,e.sel.primIndex);Yt(e,o,r)}function ka(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Yt(e,xn(e.cm,i,e.sel.primIndex),n)}function No(e,t,r,n){Yt(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 wt(ct(e,i[a].anchor),ct(e,i[a].head))},origin:r&&r.origin};return we(e,"beforeSelectionChange",e,n),e.cm&&we(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?xn(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,Bi(e,t,r)):Yt(e,t,r)}function Yt(e,t,r){Bi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Bi(e,t,r){(k(e,"beforeSelectionChange")||e.cm&&k(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ft(t.primary().head,e.sel.primary().head)<0?-1:1);Io(e,Fo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&_r(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)),zt(e,"cursorActivity",e)}function Uo(e){Io(e,Fo(e,e.sel,null,!1))}function Fo(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],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 wt(u,d))}return i?xn(e.cm,i,t.primIndex):t}function Tr(e,t,r,n,i){var a=Qe(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,x="selectRight"in u?!u.selectRight:u.inclusiveRight;if((s.from==null||(d?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(x?s.to>=t.ch:s.to>t.ch))){if(i&&(we(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),V=void 0;if((n<0?x:d)&&(A=Wo(e,A,-n,A&&A.line==t.line?a:null)),A&&A.line==t.line&&(V=ft(A,r))&&(n<0?V<0:V>0))return Tr(e,A,t,n,i)}var B=u.find(n<0?-1:1);return(n<0?d:x)&&(B=Wo(e,B,n,B.line==t.line?a:null)),B?Tr(e,B,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,Re(e.first,0))}function Wo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ct(e,Re(t.line-1)):null:r>0&&t.ch==(n||Qe(e,t.line)).text.length?t.line<e.first+e.size-1?Re(t.line+1,0):null:new Re(t.line,t.ch+r)}function Bo(e){e.setSelection(Re(e.firstLine(),0),Re(e.lastLine()),te)}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=ct(e,i)),a&&(n.to=ct(e,a)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),we(e,"beforeChange",e,n),e.cm&&we(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 Ft(e.cm,Or)(e,t,r);if(e.cm.state.suppressEdits)return}if((k(e,"beforeChange")||e.cm&&k(e.cm,"beforeChange"))&&(t=Ho(e,t,!0),!t))return;var n=Ei&&!r&&ki(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]==""&&ft(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,Nn(e,t));var n=[];zn(e,function(i,a){!a&&N(n,i.history)==-1&&(Vo(i.history,t),n.push(i.history)),ai(i,t,null,Nn(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(Fi(a,u),r&&!a.equals(e.sel)){Yt(e,a,{clearRedo:!1});return}o=a}else if(n){s.push(a);return}else break;var x=[];Fi(o,u),u.push({changes:x,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var A=k(e,"beforeChange")||e.cm&&k(e.cm,"beforeChange"),V=function(Ae){var je=a.changes[Ae];if(je.origin=t,A&&!Ho(e,je,!1))return s.length=0,{};x.push(Ca(e,je));var We=Ae?xa(e,je):h(s);ai(e,je,We,Ro(e,je)),!Ae&&e.cm&&e.cm.scrollIntoView({from:je.from,to:Hn(je)});var ze=[];zn(e,function(Be,Xe){!Xe&&N(ze,Be.history)==-1&&(Vo(Be.history,je),ze.push(Be.history)),ai(Be,je,null,Ro(Be,je))})},B=a.changes.length-1;B>=0;--B){var ge=V(B);if(ge)return ge.v}}function Ko(e,t){if(t==0)return;if(e.first+=t,e.sel=new dn(S(e.sel.ranges,function(i){return new wt(Re(i.anchor.line+t,i.anchor.ch),Re(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){Qt(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 Ft(e.cm,ai)(e,t,r,n);if(t.to.line<e.first){Ko(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Ko(e,i),t={from:Re(e.first,0),to:Re(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:Re(a,Qe(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),Bi(e,r,te),e.cantEdit&&Hi(e,Re(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=xt(rt(Qe(n,a.line))),n.iter(u,o.line+1,function(B){if(B==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(B){var ge=Vt(B);ge>i.maxLineLength&&(i.maxLine=B,i.maxLineLength=ge,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Br(n,a.line),ni(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?Qt(e):a.line==o.line&&t.text.length==1&&!To(e.doc,t)?Fn(e,a.line,"text"):Qt(e,a.line,o.line+1,d);var x=k(e,"changes"),A=k(e,"change");if(A||x){var V={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};A&&zt(e,"change",e,V),x&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(V)}e.display.selForContextMenu=null}function Ar(e,t,r,n,i){var a;n||(n=r),ft(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 Xo(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=Re(d.from.line+n,d.from.ch),d.to=Re(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;Xo(e.done,r,n,i),Xo(e.undone,r,n,i)}function oi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=Qe(e,Jn(e,t)):i=xt(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,$t(i),zt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function li(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}li.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var a=Math.min(t,i-e),o=n.height;if(n.removeInner(e,a),this.height-=o-n.height,i==a&&(this.children.splice(r--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof si))){var s=[];this.collapse(s),this.children=[new si(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var 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=N(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=xt(r);if(n==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var a=Yr(this);hn(r,Math.max(0,r.height-a)),e&&(sn(e,function(){$o(e,r,-a),Fn(e,n,"widget")}),zt(e,"lineWidgetCleared",e,this,n))},ui.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Yr(this)-t;if(!i)return;Tt(this.doc,n)||hn(n,n.height+i),r&&sn(r,function(){r.curOp.forceUpdate=!0,$o(r,n,i),zt(r,"lineWidgetChanged",r,e,xt(n))})},L(ui);function $o(e,t,r){Lt(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&&!Tt(e,o)){var u=Lt(o)<e.scrollTop;hn(o,o.height+Yr(i)),u&&pa(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&zt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:xt(t)),i}var Yo=0,Kn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Yo};Kn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&sr(e),k(this,"clear")){var r=this.find();r&&zt(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=Pn(o.markedSpans,this);e&&!this.collapsed?Fn(e,xt(o),"text"):e&&(s.to!=null&&(i=xt(o)),s.from!=null&&(n=xt(o))),o.markedSpans=Ia(o.markedSpans,s),s.from==null&&this.collapsed&&!Tt(this.doc,o)&&e&&hn(o,wr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var d=rt(this.lines[u]),x=Vt(d);x>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=x,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Qt(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&zt(e,"markerCleared",e,this,n,i),t&&lr(e),this.parent&&this.parent.clear()},Kn.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=Pn(a.markedSpans,this);if(o.from!=null&&(r=Re(t?a:xt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Re(t?a:xt(a),o.to),e==1))return n}return r&&{from:r,to:n}},Kn.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;sn(n,function(){var i=t.line,a=xt(t.line),o=na(n,a);if(o&&(Za(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Tt(r.doc,i)&&r.height!=null){var s=r.height;r.height=null;var u=Yr(r)-s;u&&hn(i,i.height+u)}zt(n,"markerChanged",n,e)})},Kn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||N(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Kn.prototype.detachLine=function(e){if(this.lines.splice(N(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},L(Kn);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 Ft(e.cm,Lr)(e,t,r,n,i);var a=new Kn(e,i),o=ft(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=Y("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Zi(e,t.line,t,r,a)||t.line!=r.line&&Zi(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");_i()}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&&rt(A)==u.display.maxLine&&(d=!0),a.collapsed&&s!=t.line&&hn(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){Tt(e,A)&&hn(A,0)}),a.clearOnEnter&&ve(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)Qt(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var x=t.line;x<=r.line;x++)Fn(u,x,"text");a.atomic&&Uo(u.doc),zt(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();zt(this,"clear")},ci.prototype.find=function(e,t){return this.primary.find(e,t)},L(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 zn(e,function(u){s&&(n.widgetNode=s.cloneNode(!0)),a.push(Lr(u,ct(u,t),ct(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(Re(e.first,0),e.clipPos(Re(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(ft(a,o)){var s=Lr(e,a,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function _l(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];zn(i.primary.doc,function(u){return a.push(u)});for(var o=0;o<i.markers.length;o++){var s=i.markers[o];N(a,s.doc)==-1&&(s.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var kl=0,en=function(e,t,r,n,i){if(!(this instanceof en))return new en(e,t,r,n,i);r==null&&(r=0),li.call(this,[new si([new Ot("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Re(r,0);this.sel=Bn(a),this.history=new Ui(null),this.id=++kl,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}),Yt(this,Bn(a),te)};en.prototype=ue(li.prototype,{constructor:en,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:Wt(function(e){var t=Re(this.first,0),r=this.first+this.size-1;Or(this,{from:t,to:Re(r,Qe(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Zr(this.cm,0,0),Yt(this,Bn(t),te)}),replaceRange:function(e,t,r,n){t=ct(this,t),r=r?ct(this,r):t,Ar(this,e,t,r,n)},getRange:function(e,t,r){var n=Sn(this,ct(this,e),ct(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Rn(this,e))return Qe(this,e)},getLineNumber:function(e){return xt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Qe(this,e)),rt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ct(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wt(function(e,t,r){No(this,ct(this,typeof e=="number"?Re(e,t||0):e),null,r)}),setSelection:Wt(function(e,t,r){No(this,ct(this,e),ct(this,t||e),r)}),extendSelection:Wt(function(e,t,r){Wi(this,ct(this,e),t&&ct(this,t),r)}),extendSelections:Wt(function(e,t){Po(this,Ur(this,e),t)}),extendSelectionsBy:Wt(function(e,t){var r=S(this.sel.ranges,e);Po(this,Ur(this,r),t)}),setSelections:Wt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new wt(ct(this,e[i].anchor),ct(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Yt(this,xn(this.cm,n,t),r)}),addSelection:Wt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new wt(ct(this,e),ct(this,t||e))),Yt(this,xn(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:Wt(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&&_r(this.cm)}),undo:Wt(function(){zi(this,"undo")}),redo:Wt(function(){zi(this,"redo")}),undoSelection:Wt(function(){zi(this,"undo",!0)}),redoSelection:Wt(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 Ui(this.history.maxGeneration),zn(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Sr(this.history.done),undone:Sr(this.history.undone)}},setHistory:function(e){var t=this.history=new Ui(this.history.maxGeneration);t.done=Sr(e.done.slice(0),null,!0),t.undone=Sr(e.undone.slice(0),null,!0)},setGutterMarker:Wt(function(e,t,r){return oi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Pe(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Wt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&oi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Pe(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=Qe(this,e),!e)return null}else if(t=xt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Wt(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(J(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Wt(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(J(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:Wt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Lr(this,ct(this,e),ct(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ct(this,e),Lr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ct(this,e);var t=[],r=Qe(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=ct(this,e),t=ct(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var 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}),ct(this,Re(r,t))},indexFromPos:function(e){e=ct(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new en(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 en(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 Mt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),_l(Jo(this));break}if(e.history==this.history){var n=[e.id];zn(e,function(i){return n.push(i.id)},!0),e.history=new Ui(null),e.history.done=Sr(this.history.done,n),e.history.undone=Sr(this.history.undone,n)}},iterLinkedDocs:function(e){zn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ze(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Wt(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)})}),en.prototype.eachLine=en.prototype.iter;var qo=0;function Sl(e){var t=this;if(Zo(t),Ie(t,e)||Ln(t.display,e))return;f(e),R&&(qo=+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&&Ft(t,function(){r=ct(t.doc,r);var B={from:r,to:r,text:t.doc.splitLines(a.filter(function(ge){return ge!=null}).join(t.doc.lineSeparator())),origin:"paste"};Or(t.doc,B),jo(t.doc,Bn(ct(t.doc,r),ct(t.doc,Hn(B))))})()},u=function(B,ge){if(t.options.allowDropFileTypes&&N(t.options.allowDropFileTypes,B.type)==-1){s();return}var Ae=new FileReader;Ae.onerror=function(){return s()},Ae.onload=function(){var je=Ae.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(je)){s();return}a[ge]=je,s()},Ae.readAsText(B)},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 x=e.dataTransfer.getData("Text");if(x){var A;if(t.state.draggingText&&!t.state.draggingText.copy&&(A=t.listSelections()),Bi(t.doc,Bn(r,r)),A)for(var V=0;V<A.length;++V)Ar(t.doc,"",A[V].anchor,A[V].head,"drag");t.replaceSelection(x,"around","paste"),t.display.input.focus()}}catch(B){}}}function Tl(e,t){if(R&&(!e.state.draggingText||+new Date-qo<100)){b(t);return}if(Ie(e,t)||Ln(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!be){var r=y("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ee&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),ee&&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)),fe(e.display.dragCursor,n)}function Zo(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;ve(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Qo(Ml)},100))}),ve(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 Gn={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++)Gn[di+48]=Gn[di+96]=String(di);for(var Ki=65;Ki<=90;Ki++)Gn[Ki]=String.fromCharCode(Ki);for(var fi=1;fi<=12;fi++)Gn[fi+111]=Gn[fi+63235]="F"+fi;var Mn={};Mn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Mn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Mn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Mn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Mn.default=ne?Mn.macDefault:Mn.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw new Error("Unrecognized modifier name: "+s)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Rl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=S(r.split(" "),Dl),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=n):(s=i.slice(0,a+1).join(" "),o="...");var 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:Gn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ns(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Ce?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Ce?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function rs(e,t){if(ee&&e.keyCode==34&&e.char)return!1;var r=Gn[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"?Mn[e]:e}function Dr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&ft(a.from,h(n).to)<=0;){var o=n.pop();if(ft(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}sn(e,function(){for(var s=n.length-1;s>=0;s--)Ar(e.doc,"",n[s].from,n[s].to,"+delete");_r(e)})}function Sa(e,t,r){var n=ke(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ta(e,t,r){var n=Sa(e,t.ch,r);return n==null?null:new Re(t.line,n,r<0?"after":"before")}function Oa(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=et(r,t.doc.direction);if(a){var o=i<0?h(a):a[0],s=i<0==(o.level==1),u=s?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var x=xr(t,r);d=i<0?r.text.length-1:0;var A=_n(t,x,d).top;d=Je(function(V){return _n(t,x,V).top==A},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=Sa(r,d,1))}else d=i<0?o.to:o.from;return new Re(n,d,u)}}return new Re(n,i<0?r.text.length:0,i<0?"before":"after")}function Pl(e,t,r,n){var i=et(t,e.doc.direction);if(!i)return 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(We,ze){return Sa(t,We instanceof Re?We.ch:We,ze)},u,d=function(We){return e.options.lineWrapping?(u=u||xr(e,t),ao(e,t,u,We)):{begin:0,end:t.text.length}},x=d(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var A=o.level==1==n<0,V=s(r,A?1:-1);if(V!=null&&(A?V<=o.to&&V<=x.end:V>=o.from&&V>=x.begin)){var B=A?"before":"after";return new Re(r.line,V,B)}}var ge=function(We,ze,Be){for(var Xe=function(St,Bt){return Bt?new Re(r.line,s(St,1),"before"):new Re(r.line,St,"after")};We>=0&&We<i.length;We+=ze){var st=i[We],it=ze>0==(st.level!=1),vt=it?Be.begin:s(Be.end,-1);if(st.from<=vt&&vt<st.to)return Xe(vt,it);if(vt=it?st.from:s(st.to,-1),Be.begin<=vt&&vt<Be.end)return Xe(vt,it)}},Ae=ge(a+n,n,x);if(Ae)return Ae;var je=n>0?x.end:s(x.begin,-1);return je!=null&&!(n>0&&je==t.text.length)&&(Ae=ge(n>0?0:i.length-1,n,d(je)),Ae)?Ae:null}var hi={selectAll:Bo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),te)},killLine:function(e){return Dr(e,function(t){if(t.empty()){var r=Qe(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Re(t.head.line+1,0)}:{from:t.head,to:Re(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Dr(e,function(t){return{from:Re(t.from().line,0),to:ct(e.doc,Re(t.to().line+1,0))}})},delLineLeft:function(e){return Dr(e,function(t){return{from:Re(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Dr(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 Dr(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(Re(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Re(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")},se)},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")},se)},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},se)},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=m(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 sn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,a=Qe(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Re(i.line,i.ch-1)),i.ch>0)i=new Re(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Re(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Qe(e.doc,i.line-1).text;o&&(i=new Re(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Re(i.line-1,o.length-1),i,"+transpose"))}}r.push(new wt(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return sn(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);_r(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var r=Qe(e.doc,t),n=rt(r);return n!=r&&(t=xt(n)),Oa(!0,e,n,t,1)}function Nl(e,t){var r=Qe(e.doc,t),n=mt(r);return n!=r&&(t=xt(n)),Oa(!0,e,r,t,-1)}function as(e,t){var r=is(e,t.line),n=Qe(e.doc,r.line),i=et(n,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=a&&t.ch;return Re(r.line,o?0:a,r.sticky)}return r}function Xi(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)!=xe}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 E;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"&&zt(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 Xi(e,n,!0)})||pi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Xi(e,n)}):pi(e,r,t,function(n){return Xi(e,n)}):!1}function Ul(e,t,r){return pi(e,"'"+r+"'",t,function(n){return Xi(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=Q(),Ie(t,e))return;R&&D<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ss(t,e);ee&&(Aa=n?r:null,!n&&r==88&&!lt&&(ne?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),re&&!ne&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;j(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(pe(t,"CodeMirror-crosshair"),$e(document,"keyup",r),$e(document,"mouseover",r))}ve(document,"keyup",r),ve(document,"mouseover",r)}function us(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ie(this,e)}function cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Ln(t.display,e)||Ie(t,e)||e.ctrlKey&&!e.altKey||ne&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(ee&&r==Aa){Aa=null,f(e);return}if(ee&&(!e.which||e.which<10)&&ss(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Ul(t,e,i))return;t.display.input.onKeyPress(e)}var Wl=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+Wl>e&&ft(t,this.pos)==0&&r==this.button};var mi,gi;function Bl(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(Ie(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Ln(r,e)){T||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ma(t,e))return;var n=rr(t,e),i=le(e),a=n?Bl(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?Kl(t,n,a,e):K(e)==r.scroller&&f(e):i==2?(n&&Wi(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)!=xe}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=Le?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=ne?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ne?r.altKey:r.ctrlKey)),i}function Kl(e,t,r,n){R?setTimeout(c(co,e),0):e.curOp.focus=Q();var i=zl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Me&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ft((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ft(o.to(),t)>0||t.xRel<0)?Gl(e,n,t,i):Xl(e,n,t,i)}function Gl(e,t,r,n){var i=e.display,a=!1,o=Ft(e,function(d){T&&(i.scroller.draggable=!1),e.state.draggingText=!1,$e(i.wrapper.ownerDocument,"mouseup",o),$e(i.wrapper.ownerDocument,"mousemove",s),$e(i.scroller,"dragstart",u),$e(i.scroller,"drop",o),a||(f(d),n.addNew||Wi(e.doc,r,null,null,n.extend),T&&!be||R&&D==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};T&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ve(i.wrapper.ownerDocument,"mouseup",o),ve(i.wrapper.ownerDocument,"mousemove",s),ve(i.scroller,"dragstart",u),ve(i.scroller,"drop",o),fo(e),setTimeout(function(){return i.input.focus()},20)}function fs(e,t,r){if(r=="char")return new wt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new wt(Re(t.line,0),ct(e.doc,Re(t.line+1,0)));var n=r(e,t);return new wt(n.from,n.to)}function Xl(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 wt(r,r)):(o=a.sel.primary(),s=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new wt(r,r)),r=rr(e,t,!0,!0),s=-1;else{var x=fs(e,r,n.unit);n.extend?o=_a(o,x.anchor,x.head,n.extend):o=x}n.addNew?s==-1?(s=d.length,Yt(a,xn(e,d.concat([o]),s),{scroll:!1,origin:"*mouse"})):d.length>1&&d[s].empty()&&n.unit=="char"&&!n.extend?(Yt(a,xn(e,d.slice(0,s).concat(d.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):ka(a,s,o,_e):(s=0,Yt(a,new dn([o],0),_e),u=a.sel);var A=r;function V(Be){if(ft(A,Be)==0)return;if(A=Be,n.unit=="rectangle"){for(var Xe=[],st=e.options.tabSize,it=m(Qe(a,r.line).text,r.ch,st),vt=m(Qe(a,Be.line).text,Be.ch,st),St=Math.min(it,vt),Bt=Math.max(it,vt),Dt=Math.min(r.line,Be.line),ln=Math.min(e.lastLine(),Math.max(r.line,Be.line));Dt<=ln;Dt++){var tn=Qe(a,Dt).text,jt=de(tn,St,st);St==Bt?Xe.push(new wt(Re(Dt,jt),Re(Dt,jt))):tn.length>jt&&Xe.push(new wt(Re(Dt,jt),Re(Dt,de(tn,Bt,st))))}Xe.length||Xe.push(new wt(r,r)),Yt(a,xn(e,u.ranges.slice(0,s).concat(Xe),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Be)}else{var nn=o,Kt=fs(e,Be,n.unit),Ut=nn.anchor,It;ft(Kt.anchor,Ut)>0?(It=Kt.head,Ut=Yn(nn.from(),Kt.anchor)):(It=Kt.anchor,Ut=hr(nn.to(),Kt.head));var Rt=u.ranges.slice(0);Rt[s]=Vl(e,new wt(ct(a,Ut),It)),Yt(a,xn(e,Rt,s),_e)}}var B=i.wrapper.getBoundingClientRect(),ge=0;function Ae(Be){var Xe=++ge,st=rr(e,Be,!0,n.unit=="rectangle");if(!st)return;if(ft(st,A)!=0){e.curOp.focus=Q(),V(st);var it=Pi(i,a);(st.line>=it.to||st.line<it.from)&&setTimeout(Ft(e,function(){ge==Xe&&Ae(Be)}),150)}else{var vt=Be.clientY<B.top?-20:Be.clientY>B.bottom?20:0;vt&&setTimeout(Ft(e,function(){if(ge!=Xe)return;i.scroller.scrollTop+=vt,Ae(Be)}),50)}}function je(Be){e.state.selectingText=!1,ge=Infinity,Be&&(f(Be),i.input.focus()),$e(i.wrapper.ownerDocument,"mousemove",We),$e(i.wrapper.ownerDocument,"mouseup",ze),a.history.lastSelOrigin=null}var We=Ft(e,function(Be){Be.buttons===0||!le(Be)?je(Be):Ae(Be)}),ze=Ft(e,je);e.state.selectingText=ze,ve(i.wrapper.ownerDocument,"mousemove",We),ve(i.wrapper.ownerDocument,"mouseup",ze)}function Vl(e,t){var r=t.anchor,n=t.head,i=Qe(e.doc,r.line);if(ft(r,n)==0&&r.sticky==n.sticky)return t;var a=et(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 x=Ke(a,n.ch,n.sticky),A=x-o||(n.ch-r.ch)*(s.level==1?-1:1);x==u-1||x==u?d=A<0:d=A>0}var V=a[u+(d?-1:0)],B=d==(V.level==1),ge=B?V.from:V.to,Ae=B?"after":"before";return r.ch==ge&&r.sticky==Ae?t:new wt(new Re(r.line,ge,Ae),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(V){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||!k(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 x=Tn(e.doc,a),A=e.display.gutterSpecs[u];return we(e,r,e,x,A.className,t),g(t)}}}function Ma(e,t){return hs(e,t,"gutterClick",!0)}function ps(e,t){if(Ln(e.display,t)||$l(e,t))return;if(Ie(e,t,"contextmenu"))return;De||e.display.input.onContextMenu(t)}function $l(e,t){return k(e,"gutterContextMenu")?hs(e,t,"gutterContextMenu",!1):!1}function ms(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Jr(e)}var Rr={toString:function(){return"CodeMirror.Init"}},gs={},Vi={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(s,u,d){d!=Rr&&a(s,u,d)}:a)}e.defineOption=r,e.Init=Rr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,wa(n)},!0),r("indentUnit",2,wa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){ii(n),Jr(n),Qt(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 x=u.text.indexOf(i,d);if(x==-1)break;d=x+i.length,a.push(Re(o,x))}o++});for(var s=a.length-1;s>=0;s--)Ar(n.doc,i,a[s],Re(a[s].line,a[s].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Rr&&n.refresh()}),r("specialCharPlaceholder",_s,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",ae?"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",!Fe),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!=Rr&&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,ql,!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 kr(n)},!0),r("scrollbarStyle","native",function(n){bo(n),kr(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,qr,!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,qr,!0),r("singleCursorHeightPerLine",!0,qr,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ii,!0),r("addModeClass",!1,ii,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,ii,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=Rr;if(!t!=!n){var i=e.display.dragFunctions,a=t?ve:$e;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function ql(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(pe(e.display.wrapper,"CodeMirror-wrap"),bn(e)),ca(e),Qt(e),Jr(e),setTimeout(function(){return kr(e)},100)}function Mt(e,t){var r=this;if(!(this instanceof Mt))return new Mt(e,t);this.options=t=t?l(t):{},l(gs,t,!1);var n=t.value;typeof n=="string"?n=new en(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Mt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,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 E,keySeq:null,specialChars:null},t.autofocus&&!ae&&a.input.focus(),R&&D<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Al(),sr(this),this.curOp.forceUpdate=!0,Oo(this,n),t.autofocus&&!ae||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],Rr);wo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Da.length;++s)Da[s](this);lr(this),T&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Mt.defaults=gs,Mt.optionHandlers=Vi;function Zl(e){var t=e.display;ve(t.scroller,"mousedown",Ft(e,ds)),R&&D<11?ve(t.scroller,"dblclick",Ft(e,function(u){if(Ie(e,u))return;var d=rr(e,u);if(!d||Ma(e,u)||Ln(e.display,u))return;f(u);var x=e.findWordAt(d);Wi(e.doc,x.anchor,x.head)})):ve(t.scroller,"dblclick",function(u){return Ie(e,u)||f(u)}),ve(t.scroller,"contextmenu",function(u){return ps(e,u)}),ve(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 x=d.left-u.left,A=d.top-u.top;return x*x+A*A>20*20}ve(t.scroller,"touchstart",function(u){if(!Ie(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)}}),ve(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ve(t.scroller,"touchend",function(u){var d=t.activeTouch;if(d&&!Ln(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var x=e.coordsChar(t.activeTouch,"page"),A;!d.prev||o(d,d.prev)?A=new wt(x,x):!d.prev.prev||o(d,d.prev.prev)?A=e.findWordAt(x):A=new wt(Re(x.line,0),ct(e.doc,Re(x.line+1,0))),e.setSelection(A.anchor,A.head),e.focus(),f(u)}i()}),ve(t.scroller,"touchcancel",i),ve(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qr(e,t.scroller.scrollTop),ar(e,t.scroller.scrollLeft,!0),we(e,"scroll",e))}),ve(t.scroller,"mousewheel",function(u){return _o(e,u)}),ve(t.scroller,"DOMMouseScroll",function(u){return _o(e,u)}),ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Ie(e,u)||b(u)},over:function(u){Ie(e,u)||(Ol(e,u),b(u))},start:function(u){return Tl(e,u)},drop:Ft(e,Sl),leave:function(u){Ie(e,u)||Zo(e)}};var s=t.input.getField();ve(s,"keyup",function(u){return us.call(e,u)}),ve(s,"keydown",Ft(e,ls)),ve(s,"keypress",Ft(e,cs)),ve(s,"focus",function(u){return fa(e,u)}),ve(s,"blur",function(u){return Cr(e,u)})}var Da=[];Mt.defineInitHook=function(e){return Da.push(e)};function vi(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=on(e,t).state:r="prev");var o=e.options.tabSize,s=Qe(i,t),u=m(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var d=s.text.match(/^\s*/)[0],x;if(!n&&!/\S/.test(s.text))x=0,r="not";else if(r=="smart"&&(x=i.mode.indent(a,s.text.slice(d.length),s.text),x==xe||x>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?x=m(Qe(i,t-1).text,null,o):x=0:r=="add"?x=u+e.options.indentUnit:r=="subtract"?x=u-e.options.indentUnit:typeof r=="number"&&(x=u+r),x=Math.max(0,x);var A="",V=0;if(e.options.indentWithTabs)for(var B=Math.floor(x/o);B;--B)V+=o,A+=" ";if(V<x&&(A+=q(x-V)),A!=d)return Ar(i,A,Re(t,0),Re(t,d.length),"+input"),s.stateAfter=null,!0;for(var ge=0;ge<i.sel.ranges.length;ge++){var Ae=i.sel.ranges[ge];if(Ae.head.line==t&&Ae.head.ch<d.length){var je=Re(t,d.length);ka(i,ge,new wt(je,je));break}}}var wn=null;function $i(e){wn=e}function Ra(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,s=i=="paste"||e.state.pasteIncoming>o,u=Ze(t),d=null;if(s&&n.ranges.length>1)if(wn&&wn.text.join(`
`)==t){if(n.ranges.length%wn.text.length==0){d=[];for(var x=0;x<wn.text.length;x++)d.push(a.splitLines(wn.text[x]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=S(u,function(We){return[We]}));for(var A=e.curOp.updateInput,V=n.ranges.length-1;V>=0;V--){var B=n.ranges[V],ge=B.from(),Ae=B.to();B.empty()&&(r&&r>0?ge=Re(ge.line,ge.ch-r):e.state.overwrite&&!s?Ae=Re(Ae.line,Math.min(Qe(a,Ae.line).text.length,Ae.ch+h(u).length)):s&&wn&&wn.lineWise&&wn.text.join(`
`)==u.join(`
`)&&(ge=Ae=Re(ge.line,0)));var je={from:ge,to:Ae,text:d?d[V%d.length]:u,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Or(e.doc,je),zt(e,"inputRead",e,je)}t&&!s&&bs(e,t),_r(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&&sn(t,function(){return Ra(t,r,0,null,"paste")}),!0}function bs(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=vi(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(Qe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=vi(e,i.head.line,"smart")));o&&zt(e,"electricInput",e,i.head.line)}}function ys(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,a={anchor:Re(i,0),head:Re(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 T?e.style.width="1000px":e.setAttribute("wrap","off"),P&&(e.style.border="1px solid black"),xs(e),t}function Ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var a=this.options,o=a[n];if(a[n]==i&&n!="mode")return;a[n]=i,t.hasOwnProperty(n)&&Ft(this,t[n])(this,i,o),we(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:qt(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++,Qt(this)}),removeOverlay:qt(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++,Qt(this);return}}}),indentLine:qt(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:qt(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&&_r(this));else{var u=s.from(),d=s.to(),x=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var A=x;A<a;++A)vi(this,A,n);var V=this.doc.sel.ranges;u.ch==0&&i.length==V.length&&V[o].from().ch>0&&ka(this.doc,o,new wt(u,V[o].to()),te)}}}),getTokenAt:function(n,i){return An(this,n,i)},getLineTokens:function(n,i){return An(this,Re(n),i,!0)},getTokenTypeAt:function(n){n=ct(this.doc,n);var i=Fr(this,Qe(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 x=u?u.indexOf("overlay "):-1;return x<0?u:x==0?null:u.slice(0,x-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 x=0;x<o._global.length;x++){var A=o._global[x];A.pred(s,this)&&N(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),on(this,n+1,i).state},cursorCoords:function(n,i){var a,o=this.doc.sel.primary();return n==null?a=o.head:typeof n=="object"?a=ct(this.doc,n):a=n?o.from():o.to(),yn(this,a,i||"page")},charCoords:function(n,i){return ia(this,ct(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,Tn(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=Qe(this.doc,n)}else s=n;return Li(this,s,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Lt(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=yn(this,ct(this.doc,n));var d=n.bottom,x=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),V=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),x+i.offsetWidth>V&&(x=V-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",s=="right"?(x=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?x=0:s=="middle"&&(x=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=x+"px"),a&&Js(this,{left:x,top:d,right:x+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:qt(ls),triggerOnKeyPress:qt(cs),triggerOnKeyUp:us,triggerOnMouseDown:qt(ds),execCommand:function(n){if(hi.hasOwnProperty(n))return hi[n].call(null,this)},triggerElectric:qt(function(n){bs(this,n)}),findPosH:function(n,i,a,o){var s=1;i<0&&(s=-1,i=-i);for(var u=ct(this.doc,n),d=0;d<i&&!(u=Pa(this.doc,u,s,a,o),u.hitSide);++d);return u},moveH:qt(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()},se)}),deleteH:qt(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Dr(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=ct(this.doc,n),x=0;x<i;++x){var A=yn(this,d,"div");if(u==null?u=A.left:A.left=u,d=Es(this,A,s,a),d.hitSide)break}return d},moveV:qt(function(n,i){var a=this,o=this.doc,s=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(x){if(u)return n<0?x.from():x.to();var A=yn(a,x.head,"div");x.goalColumn!=null&&(A.left=x.goalColumn),s.push(A.left);var V=Es(a,A,n,i);return i=="page"&&x==o.sel.primary()&&pa(a,ia(a,V,"div").top-A.top),V},se),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=Qe(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),x=Te(d,u)?function(A){return Te(A,u)}:/\s/.test(d)?function(A){return/\s/.test(A)}:function(A){return!/\s/.test(A)&&!Te(A)};o>0&&x(a.charAt(o-1));)--o;for(;s<a.length&&x(a.charAt(s));)++s}return new wt(Re(n.line,o),Re(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):pe(this.display.cursorDiv,"CodeMirror-overwrite"),we(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==Q()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:qt(function(n,i){Zr(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Cn(this)-this.display.barHeight,width:n.scrollWidth-Cn(this)-this.display.barWidth,clientHeight:ta(this),clientWidth:tr(this)}},scrollIntoView:qt(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:Re(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?qs(this,n):po(this,n.from,n.to,n.margin)}),setSize:qt(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,we(this,"refresh",this)}),operation:function(n){return sn(this,n)},startOperation:function(){return sr(this)},endOperation:function(){return lr(this)},refresh:qt(function(){var n=this.display.cachedTextHeight;Qt(this),this.curOp.forceUpdate=!0,Jr(this),Zr(this,this.doc.scrollLeft,this.doc.scrollTop),va(this.display),(n==null||Math.abs(n-wr(this.display))>.5||this.options.lineWrapping)&&ca(this),we(this,"refresh",this)}),swapDoc:qt(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(),Zr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,zt(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},L(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=Qe(e,t.line),u=i&&e.direction=="rtl"?-r:r;function d(){var ze=t.line+u;return ze<e.first||ze>=e.first+e.size?!1:(t=new Re(ze,t.ch,t.sticky),s=Qe(e,ze))}function x(ze){var Be;if(n=="codepoint"){var Xe=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Xe)?Be=null:Be=new Re(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(Xe>=55296&&Xe<56320?2:1))),-r)}else i?Be=Pl(e.cm,s,t,r):Be=Ta(s,t,r);if(Be==null)if(!ze&&d())t=Oa(i,e.cm,s,t.line,u);else return!1;else t=Be;return!0}if(n=="char"||n=="codepoint")x();else if(n=="column")x(!0);else if(n=="word"||n=="group")for(var A=null,V=n=="group",B=e.cm&&e.cm.getHelper(t,"wordChars"),ge=!0;!(r<0&&!x(!ge));ge=!1){var Ae=s.text.charAt(t.ch)||`
`,je=Te(Ae,B)?"w":V&&Ae==`
`?"n":!V||/\s/.test(Ae)?null:"p";if(V&&!ge&&!je&&(je="s"),A&&A!=je){r<0&&(r=1,x(),t.sticky="after");break}if(je&&(A=je),r>0&&!x(!ge))break}var We=Hi(e,t,a,o,!0);return Ue(a,We)&&(We.hitSide=!0),We}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 Et=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new E,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Et.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}ve(i,"paste",function(s){if(!a(s)||Ie(n,s)||vs(s,n))return;D<=11&&setTimeout(Ft(n,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),ve(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),ve(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return r.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!a(s)||Ie(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,te),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var d=wn.text.join(`
`);if(s.clipboardData.setData("Text",d),s.clipboardData.getData("Text")==d){s.preventDefault();return}}var x=ws(),A=x.firstChild;n.display.lineSpace.insertBefore(x,n.display.lineSpace.firstChild),A.value=wn.text.join(`
`);var V=document.activeElement;O(A),setTimeout(function(){n.display.lineSpace.removeChild(x),V.focus(),V==i&&r.showPrimarySelection()},50)}ve(i,"copy",o),ve(i,"cut",o)},Et.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Et.prototype.prepareSelection=function(){var e=lo(this.cm,!1);return e.focus=document.activeElement==this.div,e},Et.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Et.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Et.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&&ft(Yn(a,o),n)==0&&ft(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 x=s[s.length-1].measure,A=x.maps?x.maps[x.maps.length-1]:x.map;d={node:A[A.length-1],offset:A[A.length-2]-A[A.length-3]}}if(!u||!d){e.removeAllRanges();return}var V=e.rangeCount&&e.getRangeAt(0),B;try{B=z(u.node,u.offset,d.offset,d.node)}catch(ge){}B&&(!re&&t.state.focused?(e.collapse(u.node,u.offset),B.collapsed||(e.removeAllRanges(),e.addRange(B))):(e.removeAllRanges(),e.addRange(B)),V&&e.anchorNode==null?e.addRange(V):re&&this.startGracePeriod()),this.rememberSelection()},Et.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)},Et.prototype.showMultipleSelections=function(e){fe(this.cm.display.cursorDiv,e.cursors),fe(this.cm.display.selectionDiv,e.selection)},Et.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Et.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return w(this.div,t)},Et.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Et.prototype.blur=function(){this.div.blur()},Et.prototype.getField=function(){return this.div},Et.prototype.supportsTouch=function(){return!0},Et.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():sn(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)},Et.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Et.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(I&&X&&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&&sn(t,function(){Yt(t.doc,Bn(r,n),te),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},Et.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=Re(n.line-1,Qe(e.doc,n.line-1).length)),i.ch==Qe(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Re(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=xt(t.view[0].line),s=t.view[0].node):(o=xt(t.view[a].line),s=t.view[a-1].node.nextSibling);var u=ir(e,i.line),d,x;if(u==t.view.length-1?(d=t.viewTo-1,x=t.lineDiv.lastChild):(d=xt(t.view[u+1].line)-1,x=t.view[u+1].node.previousSibling),!s)return!1;for(var A=e.doc.splitLines(tu(e,s,x,o,d)),V=Sn(e.doc,Re(o,0),Re(d,Qe(e.doc,d).text.length));A.length>1&&V.length>1;)if(h(A)==h(V))A.pop(),V.pop(),d--;else if(A[0]==V[0])A.shift(),V.shift(),o++;else break;for(var B=0,ge=0,Ae=A[0],je=V[0],We=Math.min(Ae.length,je.length);B<We&&Ae.charCodeAt(B)==je.charCodeAt(B);)++B;for(var ze=h(A),Be=h(V),Xe=Math.min(ze.length-(A.length==1?B:0),Be.length-(V.length==1?B:0));ge<Xe&&ze.charCodeAt(ze.length-ge-1)==Be.charCodeAt(Be.length-ge-1);)++ge;if(A.length==1&&V.length==1&&o==n.line)for(;B&&B>n.ch&&ze.charCodeAt(ze.length-ge-1)==Be.charCodeAt(Be.length-ge-1);)B--,ge++;A[A.length-1]=ze.slice(0,ze.length-ge).replace(/^\u200b+/,""),A[0]=A[0].slice(B).replace(/\u200b+$/,"");var st=Re(o,B),it=Re(d,V.length?h(V).length-ge:0);if(A.length>1||A[0]||ft(st,it))return Ar(e.doc,A,st,it,"+input"),!0},Et.prototype.ensurePolled=function(){this.forceCompositionEnd()},Et.prototype.reset=function(){this.forceCompositionEnd()},Et.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Et.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)},Et.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&sn(this.cm,function(){return Qt(e.cm)})},Et.prototype.setUneditable=function(e){e.contentEditable="false"},Et.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Ft(this.cm,Ra)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Et.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Et.prototype.onContextMenu=function(){},Et.prototype.resetPosition=function(){},Et.prototype.needsContentAttribute=!0;function Cs(e,t){var r=na(e,t.line);if(!r||r.hidden)return null;var n=Qe(e.doc,t.line),i=$a(r,n,t.line),a=et(n,e.doc.direction),o="left";if(a){var s=Ke(a,t.ch);o=s%2?"right":"left"}var u=qa(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(B){return function(ge){return ge.id==B}}function x(){o&&(a+=s,u&&(a+=s),o=u=!1)}function A(B){B&&(x(),a+=B)}function V(B){if(B.nodeType==1){var ge=B.getAttribute("cm-text");if(ge){A(ge);return}var Ae=B.getAttribute("cm-marker"),je;if(Ae){var We=e.findMarks(Re(n,0),Re(i+1,0),d(+Ae));We.length&&(je=We[0].find(0))&&A(Sn(e.doc,je.from,je.to).join(s));return}if(B.getAttribute("contenteditable")=="false")return;var ze=/^(pre|div|p|li|table|br)$/i.test(B.nodeName);if(!/^br$/i.test(B.nodeName)&&B.textContent.length==0)return;ze&&x();for(var Be=0;Be<B.childNodes.length;Be++)V(B.childNodes[Be]);/^(pre|p)$/i.test(B.nodeName)&&(u=!0),ze&&(o=!0)}else B.nodeType==3&&A(B.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(V(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(Re(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(Re(xt(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(Re(xt(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 x(je,We,ze){for(var Be=-1;Be<(d?d.length:0);Be++)for(var Xe=Be<0?u.map:d[Be],st=0;st<Xe.length;st+=3){var it=Xe[st+2];if(it==je||it==We){var vt=xt(Be<0?e.line:e.rest[Be]),St=Xe[st]+ze;return(ze<0||it!=je)&&(St=Xe[st+(ze?1:0)]),Re(vt,St)}}}var A=x(o,s,r);if(A)return Pr(A,i);for(var V=s.nextSibling,B=o?o.nodeValue.length-r:0;V;V=V.nextSibling){if(A=x(V,V.firstChild,0),A)return Pr(Re(A.line,A.ch-B),i);B+=V.textContent.length}for(var ge=s.previousSibling,Ae=r;ge;ge=ge.previousSibling){if(A=x(ge,ge.firstChild,-1),A)return Pr(Re(A.line,A.ch+Ae),i);Ae+=ge.textContent.length}}var Nt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new E,this.hasSelection=!1,this.composing=null};Nt.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),P&&(i.style.width="0px"),ve(i,"input",function(){R&&D>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),ve(i,"paste",function(o){if(Ie(n,o)||vs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Ie(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,te):(r.prevInput="",i.value=s.text.join(`
`),O(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}ve(i,"cut",a),ve(i,"copy",a),ve(e.scroller,"paste",function(o){if(Ln(e,o)||Ie(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)}),ve(e.lineSpace,"selectstart",function(o){Ln(e,o)||f(o)}),ve(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"})}}),ve(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Nt.prototype.createField=function(e){this.wrapper=ws(),this.textarea=this.wrapper.firstChild},Nt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Nt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=lo(e);if(e.options.moveInputWithCursor){var i=yn(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},Nt.prototype.showSelection=function(e){var t=this.cm,r=t.display;fe(r.cursorDiv,e.cursors),fe(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Nt.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&&O(this.textarea),R&&D>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",R&&D>=9&&(this.hasSelection=null))},Nt.prototype.getField=function(){return this.textarea},Nt.prototype.supportsTouch=function(){return!1},Nt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ae||Q()!=this.textarea))try{this.textarea.focus()}catch(e){}},Nt.prototype.blur=function(){this.textarea.blur()},Nt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Nt.prototype.receivedFocus=function(){this.slowPoll()},Nt.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()})},Nt.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)},Nt.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(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(R&&D>=9&&this.hasSelection===i||ne&&/[\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 sn(t,function(){Ra(t,i.slice(o),n.length-o,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Nt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Nt.prototype.onKeyPress=function(){R&&D>=9&&(this.hasSelection=null),this.fastPoll()},Nt.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||ee)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&Ft(r,Yt)(r.doc,Bn(a),te);var u=i.style.cssText,d=t.wrapper.style.cssText,x=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-x.top-5)+"px; left: "+(e.clientX-x.left-5)+`px;
z-index: 1000; background: `+(R?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var A;T&&(A=window.scrollY),n.input.focus(),T&&window.scrollTo(null,A),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=B,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function V(){if(i.selectionStart!=null){var Ae=r.somethingSelected(),je="\u200B"+(Ae?i.value:"");i.value="\u21DA",i.value=je,t.prevInput=Ae?"":"\u200B",i.selectionStart=1,i.selectionEnd=je.length,n.selForContextMenu=r.doc.sel}}function B(){if(t.contextMenuPending!=B)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,R&&D<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!R||R&&D<9)&&V();var Ae=0,je=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Ft(r,Bo)(r):Ae++<10?n.detectingSelectAll=setTimeout(je,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(je,200)}}if(R&&D>=9&&V(),De){b(e);var ge=function(){$e(window,"mouseup",ge),setTimeout(B,20)};ve(window,"mouseup",ge)}else setTimeout(B,50)},Nt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Nt.prototype.setUneditable=function(){},Nt.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=Q();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(ve(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&&($e(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=Mt(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return s}function iu(e){e.off=$e,e.on=ve,e.wheelEventPixels=dl,e.Doc=en,e.splitLines=Ze,e.countColumn=m,e.findColumn=de,e.isWordChar=he,e.Pass=xe,e.signal=we,e.Line=Ot,e.changeEnd=Hn,e.scrollbarModel=vo,e.Pos=Re,e.cmpPos=ft,e.modes=kt,e.mimeModes=ht,e.resolveMode=Xt,e.getMode=gn,e.modeExtensions=vn,e.extendMode=bi,e.copyState=fn,e.startState=dr,e.innerMode=Vn,e.commands=hi,e.keyMap=Mn,e.keyName=rs,e.isModifierKey=ts,e.lookupKey=Mr,e.normalizeKeyMap=Rl,e.StringStream=At,e.SharedTextMarker=ci,e.TextMarker=Kn,e.LineWidget=ui,e.e_preventDefault=f,e.e_stopPropagation=p,e.e_stop=b,e.addClass=j,e.contains=w,e.rmClass=pe,e.keyNames=Gn}Yl(Mt),Ql(Mt);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ji in en.prototype)en.prototype.hasOwnProperty(Ji)&&N(au,Ji)<0&&(Mt.prototype[Ji]=function(e){return function(){return e.apply(this.doc,arguments)}}(en.prototype[Ji]));return L(en),Mt.inputStyles={textarea:Nt,contenteditable:Et},Mt.defineMode=function(e){!Mt.defaults.mode&&e!="null"&&(Mt.defaults.mode=e),an.apply(this,arguments)},Mt.defineMIME=Gt,Mt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Mt.defineMIME("text/plain","null"),Mt.defineExtension=function(e,t){Mt.prototype[e]=t},Mt.defineDocExtension=function(e,t){en.prototype[e]=t},Mt.fromTextArea=ru,iu(Mt),Mt.version="5.58.2",Mt})},Y1PL:function(dt,Ge,C){"use strict";C.r(Ge),C.d(Ge,"ResizableTextArea",function(){return N});var U=C("wx14"),me=C("1OyB"),re=C("vuIU"),Se=C("Ji7U"),ye=C("LK+K"),$=C("q1tI"),R=C("VTBJ"),D=C("rePB"),T=C("Zm9Q"),H=C("Kwbf"),X=C("c+Xe"),ee=C("m+aA"),be=C("bdgK"),ie=new Map;function F(te){te.forEach(function(_e){var se,de=_e.target;(se=ie.get(de))===null||se===void 0||se.forEach(function(W){return W(de)})})}var P=new be.default(F),I=null,ae=null;function ne(te,_e){ie.has(te)||(ie.set(te,new Set),P.observe(te)),ie.get(te).add(_e)}function Le(te,_e){ie.has(te)&&(ie.get(te).delete(_e),ie.get(te).size||(P.unobserve(te),ie.delete(te)))}var Fe=function(te){Object(Se.a)(se,te);var _e=Object(ye.a)(se);function se(){return Object(me.a)(this,se),_e.apply(this,arguments)}return Object(re.a)(se,[{key:"render",value:function(){return this.props.children}}]),se}($.Component),ce=$.createContext(null);function Ce(te){var _e=te.children,se=te.onBatchResize,de=$.useRef(0),W=$.useRef([]),q=$.useContext(ce),h=$.useCallback(function(S,v,Z){de.current+=1;var ue=de.current;W.current.push({size:S,element:v,data:Z}),Promise.resolve().then(function(){ue===de.current&&(se==null||se(W.current),W.current=[])}),q==null||q(S,v,Z)},[se,q]);return $.createElement(ce.Provider,{value:h},_e)}function De(te){var _e=te.children,se=te.disabled,de=$.useRef(null),W=$.useRef(null),q=$.useContext(ce),h=$.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),S=$.isValidElement(_e)&&Object(X.c)(_e),v=S?_e.ref:null,Z=$.useMemo(function(){return Object(X.a)(v,de)},[v,de]),ue=$.useRef(te);ue.current=te;var G=$.useCallback(function(he){var Te=ue.current,Pe=Te.onResize,Ne=Te.data,Ee=he.getBoundingClientRect(),ke=Ee.width,Je=Ee.height,Ye=he.offsetWidth,Ve=he.offsetHeight,Ke=Math.floor(ke),at=Math.floor(Je);if(h.current.width!==Ke||h.current.height!==at||h.current.offsetWidth!==Ye||h.current.offsetHeight!==Ve){var et={width:Ke,height:at,offsetWidth:Ye,offsetHeight:Ve};h.current=et;var qe=Ye===Math.round(ke)?ke:Ye,ve=Ve===Math.round(Je)?Je:Ve,tt=Object(R.a)(Object(R.a)({},et),{},{offsetWidth:qe,offsetHeight:ve});q==null||q(tt,he,Ne),Pe&&Promise.resolve().then(function(){Pe(tt,he)})}},[]);return $.useEffect(function(){var he=Object(ee.a)(de.current)||Object(ee.a)(W.current);return he&&!se&&ne(he,G),function(){return Le(he,G)}},[de.current,se]),$.createElement(Fe,{ref:W},S?$.cloneElement(_e,{ref:Z}):_e)}var J="rc-observer-key";function pe(te){var _e=te.children,se=Object(T.a)(_e);return se.map(function(de,W){var q=(de==null?void 0:de.key)||"".concat(J,"-").concat(W);return $.createElement(De,Object(U.a)({},te,{key:q}),de)})}pe.Collection=Ce;var Oe=pe,fe=C("bT9E"),y=C("TSYQ"),Y=C.n(y),z=`
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"],Q={},j;function M(te){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,se=te.getAttribute("id")||te.getAttribute("data-reactid")||te.getAttribute("name");if(_e&&Q[se])return Q[se];var de=window.getComputedStyle(te),W=de.getPropertyValue("box-sizing")||de.getPropertyValue("-moz-box-sizing")||de.getPropertyValue("-webkit-box-sizing"),q=parseFloat(de.getPropertyValue("padding-bottom"))+parseFloat(de.getPropertyValue("padding-top")),h=parseFloat(de.getPropertyValue("border-bottom-width"))+parseFloat(de.getPropertyValue("border-top-width")),S=w.map(function(Z){return"".concat(Z,":").concat(de.getPropertyValue(Z))}).join(";"),v={sizingStyle:S,paddingSize:q,borderSize:h,boxSizing:W};return _e&&se&&(Q[se]=v),v}function O(te){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,de=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;j||(j=document.createElement("textarea"),j.setAttribute("tab-index","-1"),j.setAttribute("aria-hidden","true"),document.body.appendChild(j)),te.getAttribute("wrap")?j.setAttribute("wrap",te.getAttribute("wrap")):j.removeAttribute("wrap");var W=M(te,_e),q=W.paddingSize,h=W.borderSize,S=W.boxSizing,v=W.sizingStyle;j.setAttribute("style","".concat(v,";").concat(z)),j.value=te.value||te.placeholder||"";var Z=Number.MIN_SAFE_INTEGER,ue=Number.MAX_SAFE_INTEGER,G=j.scrollHeight,he;if(S==="border-box"?G+=h:S==="content-box"&&(G-=q),se!==null||de!==null){j.value=" ";var Te=j.scrollHeight-q;se!==null&&(Z=Te*se,S==="border-box"&&(Z=Z+q+h),G=Math.max(Z,G)),de!==null&&(ue=Te*de,S==="border-box"&&(ue=ue+q+h),he=G>ue?"":"hidden",G=Math.min(ue,G))}return{height:G,minHeight:Z,maxHeight:ue,overflowY:he,resize:"none"}}var c=C("Gytx"),l=C.n(c),m;(function(te){te[te.NONE=0]="NONE",te[te.RESIZING=1]="RESIZING",te[te.RESIZED=2]="RESIZED"})(m||(m={}));var E=function(te){Object(Se.a)(se,te);var _e=Object(ye.a)(se);function se(de){var W;return Object(me.a)(this,se),W=_e.call(this,de),W.nextFrameActionId=void 0,W.resizeFrameId=void 0,W.textArea=void 0,W.saveTextArea=function(q){W.textArea=q},W.handleResize=function(q){var h=W.state.resizeStatus,S=W.props,v=S.autoSize,Z=S.onResize;if(h!==m.NONE)return;typeof Z=="function"&&Z(q),v&&W.resizeOnNextFrame()},W.resizeOnNextFrame=function(){cancelAnimationFrame(W.nextFrameActionId),W.nextFrameActionId=requestAnimationFrame(W.resizeTextarea)},W.resizeTextarea=function(){var q=W.props.autoSize;if(!q||!W.textArea)return;var h=q.minRows,S=q.maxRows,v=O(W.textArea,!1,h,S);W.setState({textareaStyles:v,resizeStatus:m.RESIZING},function(){cancelAnimationFrame(W.resizeFrameId),W.resizeFrameId=requestAnimationFrame(function(){W.setState({resizeStatus:m.RESIZED},function(){W.resizeFrameId=requestAnimationFrame(function(){W.setState({resizeStatus:m.NONE}),W.fixFirefoxAutoScroll()})})})})},W.renderTextArea=function(){var q=W.props,h=q.prefixCls,S=h===void 0?"rc-textarea":h,v=q.autoSize,Z=q.onResize,ue=q.className,G=q.disabled,he=W.state,Te=he.textareaStyles,Pe=he.resizeStatus,Ne=Object(fe.a)(W.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ee=Y()(S,ue,Object(D.a)({},"".concat(S,"-disabled"),G));"value"in Ne&&(Ne.value=Ne.value||"");var ke=Object(R.a)(Object(R.a)(Object(R.a)({},W.props.style),Te),Pe===m.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return $.createElement(Oe,{onResize:W.handleResize,disabled:!(v||Z)},$.createElement("textarea",Object(U.a)({},Ne,{className:Ee,style:ke,ref:W.saveTextArea})))},W.state={textareaStyles:{},resizeStatus:m.NONE},W}return Object(re.a)(se,[{key:"componentDidUpdate",value:function(W){(W.value!==this.props.value||!l()(W.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 W=this.textArea.selectionStart,q=this.textArea.selectionEnd;this.textArea.setSelectionRange(W,q)}}catch(h){}}},{key:"render",value:function(){return this.renderTextArea()}}]),se}($.Component),N=E,oe=function(te){Object(Se.a)(se,te);var _e=Object(ye.a)(se);function se(de){var W;Object(me.a)(this,se),W=_e.call(this,de),W.resizableTextArea=void 0,W.focus=function(){W.resizableTextArea.textArea.focus()},W.saveTextArea=function(h){W.resizableTextArea=h},W.handleChange=function(h){var S=W.props.onChange;W.setValue(h.target.value,function(){W.resizableTextArea.resizeTextarea()}),S&&S(h)},W.handleKeyDown=function(h){var S=W.props,v=S.onPressEnter,Z=S.onKeyDown;h.keyCode===13&&v&&v(h),Z&&Z(h)};var q=typeof de.value=="undefined"||de.value===null?de.defaultValue:de.value;return W.state={value:q},W}return Object(re.a)(se,[{key:"setValue",value:function(W,q){"value"in this.props||this.setState({value:W},q)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return $.createElement(N,Object(U.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(W){return"value"in W?{value:W.value}:null}}]),se}($.Component),xe=Ge.default=oe},ZW9T:function(dt,Ge,C){"use strict";C.d(Ge,"a",function(){return Fe});var U=C("k1fw"),me=C("miYZ"),re=C("tsqr"),Se=C("rAM+"),ye=C("tJVT"),$=C("PpiC"),R=C("q1tI"),D=C.n(R),T=C("bdgK");function H(ce,Ce,De,J,pe){var Oe=Ce.getWordUntilPosition(De),fe={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},y=J.map(function(Y){return{label:Y,kind:ce.languages.CompletionItemKind.Keyword,insertText:Y,insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}});return pe.map(function(Y){y.push(Object(U.a)(Object(U.a)({},Y),{},{range:fe}))}),y}var X=function(ce){var Ce={label:"ifelse",kind:ce.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:ce.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"];ce.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(fe,y){var Y=H(ce,fe,y,De,[Ce]);return{suggestions:Y}}});var J=["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"];ce.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(fe,y){var Y=[{label:"print",kind:ce.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet}],z=H(ce,fe,y,J,Y);return{suggestions:z}}});var pe=["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"];ce.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(fe,y){var Y=[Ce,{label:"main",kind:ce.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:ce.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet}],z=H(ce,fe,y,pe,Y);return{suggestions:z}}})},ee="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",be=C("LvDl");function ie(ce){return/^\d+$/.test(ce)?"".concat(ce,"px"):ce}function F(){}var P=!1,I={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function ae(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ce=ce;if(Array.isArray(ce)){for(var De=0;De<ce.length;De++){var J=I[ce[De]];if(J)return J}return Ce[0]}return I[Ce]||Ce}var ne=null,Le=Ge.b=function(ce){var Ce=ce.width,De=Ce===void 0?"100%":Ce,J=ce.height,pe=J===void 0?"100%":J,Oe=ce.value,fe=ce.language,y=fe===void 0?"javascript":fe,Y=ce.style,z=Y===void 0?{}:Y,w=ce.options,Q=w===void 0?{}:w,j=ce.overrideServices,M=j===void 0?{}:j,O=ce.theme,c=O===void 0?"vs-dark":O,l=ce.onEditBlur,m=ce.onSave,E=ce.autoHeight,N=E===void 0?!1:E,oe=ce.forbidCopy,xe=oe===void 0?!1:oe,te=ce.onChange,_e=te===void 0?F:te,se=ce.editorDidMount,de=se===void 0?F:se,W=ce.onFocus,q=W===void 0?F:W,h=ce.filename,S=h===void 0?"educoder.txt":h,v=Object($.a)(ce,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Z=Object(R.useRef)(),ue=Object(R.useRef)({}),G=Object(R.useRef)(),he=Object(R.useRef)(!1),Te=Object(R.useRef)(),Pe=Object(R.useState)(!1),Ne=Object(ye.a)(Pe,2),Ee=Ne[0],ke=Ne[1];function Je(){var g;return Z.current&&(g=new T.default(function(b){var K=Object(Se.a)(b),le;try{for(K.s();!(le=K.n()).done;){var Me=le.value;(Me.target.offsetHeight>0||Me.target.offsetWidth>0)&&ue.current.instance.layout()}}catch(nt){K.e(nt)}finally{K.f()}}),g.observe(Z.current)),g}function Ye(){re.b.warn(decodeURIComponent(ee))}var Ve=function(){var b=ue.current.instance;if(Oe!=null&&b&&Ee){var K=b.getModel();K&&Oe!==K.getValue()&&(P=!0,K.setValue(Oe),b.layout(),P=!1)}};Object(R.useEffect)(function(){G.current&&clearTimeout(G.current),G.current=setTimeout(function(){Ve()},500)},[Oe,Ee,ue.current]);function Ke(){var g=ue.current.instance;if(g){var b=g.getSelection(),K=ue.current.pastePos||{},le=new ne.Range(K.startLineNumber||b.endLineNumber,K.startColumn||b.endColumn,K.endLineNumber||b.endLineNumber,K.endColumn||b.endColumn);setTimeout(function(){g.executeEdits("",[{range:le,text:""}])},300)}}function at(g){(window.navigator.platform.match("Mac")?g.metaKey:g.ctrlKey)&&g.keyCode==83&&(g.preventDefault(),m())}var et=function(){if(N&&ue.current.instance){var b=ue.current.instance.getContentHeight();f(b<pe?pe:b)}else f(pe)};function qe(g){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent(b)}function ve(g,b){var K=window.URL||window.webkitURL||window,le=new Blob([b]),Me=document.createElementNS("http://www.w3.org/1999/xhtml","a");Me.href=K.createObjectURL(le),Me.download=g,qe(Me)}Object(R.useEffect)(function(){et()},[et]),Object(R.useEffect)(function(){Z.current&&!Ee&&C.e(27).then(C.t.bind(null,"M/lh",7)).then(function(g){try{ne=g,ue.current.instance=ne.editor.create(Z.current,{value:Oe,language:ae(y),theme:c,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},M);var b=ue.current.instance;if(de(b,ne),setTimeout(function(){et(),ue.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ve(S||"educoder.txt",b.getValue())}})},500),ue.current.subscription=b.onDidChangeModelContent(function(le){he.current?clearTimeout(Te.current):(et(),_e(b.getValue(),le)),Te.current=setTimeout(function(){he.current=!1},500)}),window.Monaco||X(ne),xe&&(b.addCommand(ne.KeyMod.CtrlCmd|ne.KeyMod.Shift|ne.KeyCode.KEY_V,function(){return Ye(),null}),b.addCommand(ne.KeyMod.CtrlCmd|ne.KeyCode.KEY_C,function(){return Ye(),null})),window.Monaco=ne,l&&b.onDidBlurEditorWidget(function(){l(b.getValue())}),q&&b.onDidFocusEditorText(function(){q(b.getValue())}),xe){b.addCommand(ne.KeyMod.CtrlCmd|ne.KeyCode.KEY_V,function(){return Ye(),null}),b.onDidPaste(function(le){ue.current.pastePos=le});try{window.addEventListener("paste",Ke)}catch(le){}}var K=Je();return ke(!0),function(){var le=ue.current.instance;le.dispose();var Me=le.getModel();Me&&Me.dispose(),ue.current.subscription&&ue.current.subscription.dispose(),xe&&window.removeEventListener("paste",Ke),K.unobserve(Z.current)}}catch(le){}})},[]),Object(R.useEffect)(function(){var g=ue.current.instance;if(g&&Ee)return document.addEventListener("keydown",at,!1),function(){document.removeEventListener("keydown",at)}},[m,Ee]),Object(R.useEffect)(function(){var g=ue.current.instance;if(g&&Ee){var b=ae(y);ne.editor.setModelLanguage(g.getModel(),b),console.log("language:",y,g.getModel(),b)}},[y,Ee]),Object(R.useEffect)(function(){var g=ue.current.instance;g&&Ee&&ne.editor.setTheme(c)},[c,Ee]),Object(R.useEffect)(function(){var g=ue.current.instance;g&&Ee&&(g.updateOptions(Object(U.a)({},Q)),setTimeout(function(){g.getModel().updateOptions(Object(U.a)({},Q))},200))},[JSON.stringify(Q),Ee]),Object(R.useEffect)(function(){var g=ue.current.instance;g&&Ee&&g.layout()},[De,pe,Ee]);var tt=Object(R.useState)(ie(De)),$e=Object(ye.a)(tt,2),we=$e[0],Ie=$e[1],_=Object(R.useState)(ie(pe)),k=Object(ye.a)(_,2),L=k[0],f=k[1],p=Object(U.a)(Object(U.a)({},z),{},{width:we,height:L});return D.a.createElement("div",{className:"my-monaco-editor",ref:Z,style:p})};function Fe(ce){var Ce=ce.width,De=Ce===void 0?"100%":Ce,J=ce.height,pe=J===void 0?"100%":J,Oe=ce.original,fe=ce.modified,y=ce.language,Y=ce.options,z=Y===void 0?{}:Y,w=Object(R.useRef)(),Q=Object(R.useState)(null),j=Object(ye.a)(Q,2),M=j[0],O=j[1];function c(N){var oe;return w.current&&(oe=new T.default(function(xe){var te=Object(Se.a)(xe),_e;try{for(te.s();!(_e=te.n()).done;){var se=_e.value;(se.target.offsetHeight>0||se.target.offsetWidth>0)&&N.layout()}}catch(de){te.e(de)}finally{te.f()}}),oe.observe(w.current)),oe}Object(R.useEffect)(function(){w.current&&C.e(27).then(C.t.bind(null,"M/lh",7)).then(function(N){ne=N;var oe=ne.editor.createDiffEditor(w.current,Object(U.a)(Object(U.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},z),{},{wordWrap:!0}));O(oe);var xe=c(oe);return function(){oe.dispose();var te=oe.getModel();te&&te.dispose(),xe.unobserve(w.current)}})},[]),Object(R.useEffect)(function(){M&&M.setModel({original:ne.editor.createModel(Oe,y),modified:ne.editor.createModel(fe,y)})},[Oe,fe,y,M]);var l=ie(De),m=ie(pe),E={width:l,height:m};return D.a.createElement("div",{className:"my-diff-editor",ref:w,style:E})}},ZpRC:function(dt,Ge,C){"use strict";function U(X){return typeof X=="object"&&X!=null&&X.nodeType===1}function me(X,ee){return(!ee||X!=="hidden")&&X!=="visible"&&X!=="clip"}function re(X,ee){if(X.clientHeight<X.scrollHeight||X.clientWidth<X.scrollWidth){var be=getComputedStyle(X,null);return me(be.overflowY,ee)||me(be.overflowX,ee)||function(ie){var F=function(P){if(!P.ownerDocument||!P.ownerDocument.defaultView)return null;try{return P.ownerDocument.defaultView.frameElement}catch(I){return null}}(ie);return!!F&&(F.clientHeight<ie.scrollHeight||F.clientWidth<ie.scrollWidth)}(X)}return!1}function Se(X,ee,be,ie,F,P,I,ae){return P<X&&I>ee||P>X&&I<ee?0:P<=X&&ae<=be||I>=ee&&ae>=be?P-X-ie:I>ee&&ae<be||P<X&&ae>be?I-ee+F:0}var ye=function(X,ee){var be=window,ie=ee.scrollMode,F=ee.block,P=ee.inline,I=ee.boundary,ae=ee.skipOverflowHiddenElements,ne=typeof I=="function"?I:function(Te){return Te!==I};if(!U(X))throw new TypeError("Invalid target");for(var Le=document.scrollingElement||document.documentElement,Fe=[],ce=X;U(ce)&&ne(ce);){if((ce=ce.parentElement)===Le){Fe.push(ce);break}ce!=null&&ce===document.body&&re(ce)&&!re(document.documentElement)||ce!=null&&re(ce,ae)&&Fe.push(ce)}for(var Ce=be.visualViewport?be.visualViewport.width:innerWidth,De=be.visualViewport?be.visualViewport.height:innerHeight,J=window.scrollX||pageXOffset,pe=window.scrollY||pageYOffset,Oe=X.getBoundingClientRect(),fe=Oe.height,y=Oe.width,Y=Oe.top,z=Oe.right,w=Oe.bottom,Q=Oe.left,j=F==="start"||F==="nearest"?Y:F==="end"?w:Y+fe/2,M=P==="center"?Q+y/2:P==="end"?z:Q,O=[],c=0;c<Fe.length;c++){var l=Fe[c],m=l.getBoundingClientRect(),E=m.height,N=m.width,oe=m.top,xe=m.right,te=m.bottom,_e=m.left;if(ie==="if-needed"&&Y>=0&&Q>=0&&w<=De&&z<=Ce&&Y>=oe&&w<=te&&Q>=_e&&z<=xe)return O;var se=getComputedStyle(l),de=parseInt(se.borderLeftWidth,10),W=parseInt(se.borderTopWidth,10),q=parseInt(se.borderRightWidth,10),h=parseInt(se.borderBottomWidth,10),S=0,v=0,Z="offsetWidth"in l?l.offsetWidth-l.clientWidth-de-q:0,ue="offsetHeight"in l?l.offsetHeight-l.clientHeight-W-h:0;if(Le===l)S=F==="start"?j:F==="end"?j-De:F==="nearest"?Se(pe,pe+De,De,W,h,pe+j,pe+j+fe,fe):j-De/2,v=P==="start"?M:P==="center"?M-Ce/2:P==="end"?M-Ce:Se(J,J+Ce,Ce,de,q,J+M,J+M+y,y),S=Math.max(0,S+pe),v=Math.max(0,v+J);else{S=F==="start"?j-oe-W:F==="end"?j-te+h+ue:F==="nearest"?Se(oe,te,E,W,h+ue,j,j+fe,fe):j-(oe+E/2)+ue/2,v=P==="start"?M-_e-de:P==="center"?M-(_e+N/2)+Z/2:P==="end"?M-xe+q+Z:Se(_e,xe,N,de,q+Z,M,M+y,y);var G=l.scrollLeft,he=l.scrollTop;j+=he-(S=Math.max(0,Math.min(he+S,l.scrollHeight-E+ue))),M+=G-(v=Math.max(0,Math.min(G+v,l.scrollWidth-N+Z)))}O.push({el:l,top:S,left:v})}return O};function $(X){return X===Object(X)&&Object.keys(X).length!==0}function R(X,ee){ee===void 0&&(ee="auto");var be="scrollBehavior"in document.body.style;X.forEach(function(ie){var F=ie.el,P=ie.top,I=ie.left;F.scroll&&be?F.scroll({top:P,left:I,behavior:ee}):(F.scrollTop=P,F.scrollLeft=I)})}function D(X){return X===!1?{block:"end",inline:"nearest"}:$(X)?X:{block:"start",inline:"nearest"}}function T(X,ee){var be=!X.ownerDocument.documentElement.contains(X);if($(ee)&&typeof ee.behavior=="function")return ee.behavior(be?[]:ye(X,ee));if(be)return;var ie=D(ee);return R(ye(X,ie),ie.behavior)}var H=Ge.a=T},Zss7:function(dt,Ge,C){var U;(function(me){var re=/^\s+/,Se=/\s+$/,ye=0,$=me.round,R=me.min,D=me.max,T=me.random;function H(h,S){if(h=h||"",S=S||{},h instanceof H)return h;if(!(this instanceof H))return new H(h,S);var v=X(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=S.format||v.format,this._gradientType=S.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=ye++}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(),S,v,Z,ue,G,he;return S=h.r/255,v=h.g/255,Z=h.b/255,S<=.03928?ue=S/12.92:ue=me.pow((S+.055)/1.055,2.4),v<=.03928?G=v/12.92:G=me.pow((v+.055)/1.055,2.4),Z<=.03928?he=Z/12.92:he=me.pow((Z+.055)/1.055,2.4),.2126*ue+.7152*G+.0722*he},setAlpha:function(h){return this._a=O(h),this._roundA=$(100*this._a)/100,this},toHsv:function(){var h=F(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=F(this._r,this._g,this._b),S=$(h.h*360),v=$(h.s*100),Z=$(h.v*100);return this._a==1?"hsv("+S+", "+v+"%, "+Z+"%)":"hsva("+S+", "+v+"%, "+Z+"%, "+this._roundA+")"},toHsl:function(){var h=be(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=be(this._r,this._g,this._b),S=$(h.h*360),v=$(h.s*100),Z=$(h.l*100);return this._a==1?"hsl("+S+", "+v+"%, "+Z+"%)":"hsla("+S+", "+v+"%, "+Z+"%, "+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 ae(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:j[I(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var S="#"+ne(this._r,this._g,this._b,this._a),v=S,Z=this._gradientType?"GradientType = 1, ":"";if(h){var ue=H(h);v="#"+ne(ue._r,ue._g,ue._b,ue._a)}return"progid:DXImageTransform.Microsoft.gradient("+Z+"startColorstr="+S+",endColorstr="+v+")"},toString:function(h){var S=!!h;h=h||this._format;var v=!1,Z=this._a<1&&this._a>=0,ue=!S&&Z&&(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,S){var v=h.apply(null,[this].concat([].slice.call(S)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(Ce,arguments)},brighten:function(){return this._applyModification(De,arguments)},darken:function(){return this._applyModification(J,arguments)},desaturate:function(){return this._applyModification(Le,arguments)},saturate:function(){return this._applyModification(Fe,arguments)},greyscale:function(){return this._applyModification(ce,arguments)},spin:function(){return this._applyModification(pe,arguments)},_applyCombination:function(h,S){return h.apply(null,[this].concat([].slice.call(S)))},analogous:function(){return this._applyCombination(z,arguments)},complement:function(){return this._applyCombination(Oe,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(Y,arguments)},triad:function(){return this._applyCombination(fe,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},H.fromRatio=function(h,S){if(typeof h=="object"){var v={};for(var Z in h)h.hasOwnProperty(Z)&&(Z==="a"?v[Z]=h[Z]:v[Z]=xe(h[Z]));h=v}return H(h,S)};function X(h){var S={r:0,g:0,b:0},v=1,Z=null,ue=null,G=null,he=!1,Te=!1;return typeof h=="string"&&(h=W(h)),typeof h=="object"&&(de(h.r)&&de(h.g)&&de(h.b)?(S=ee(h.r,h.g,h.b),he=!0,Te=String(h.r).substr(-1)==="%"?"prgb":"rgb"):de(h.h)&&de(h.s)&&de(h.v)?(Z=xe(h.s),ue=xe(h.v),S=P(h.h,Z,ue),he=!0,Te="hsv"):de(h.h)&&de(h.s)&&de(h.l)&&(Z=xe(h.s),G=xe(h.l),S=ie(h.h,Z,G),he=!0,Te="hsl"),h.hasOwnProperty("a")&&(v=h.a)),v=O(v),{ok:he,format:h.format||Te,r:R(255,D(S.r,0)),g:R(255,D(S.g,0)),b:R(255,D(S.b,0)),a:v}}function ee(h,S,v){return{r:c(h,255)*255,g:c(S,255)*255,b:c(v,255)*255}}function be(h,S,v){h=c(h,255),S=c(S,255),v=c(v,255);var Z=D(h,S,v),ue=R(h,S,v),G,he,Te=(Z+ue)/2;if(Z==ue)G=he=0;else{var Pe=Z-ue;he=Te>.5?Pe/(2-Z-ue):Pe/(Z+ue);switch(Z){case h:G=(S-v)/Pe+(S<v?6:0);break;case S:G=(v-h)/Pe+2;break;case v:G=(h-S)/Pe+4;break}G/=6}return{h:G,s:he,l:Te}}function ie(h,S,v){var Z,ue,G;h=c(h,360),S=c(S,100),v=c(v,100);function he(Ne,Ee,ke){return ke<0&&(ke+=1),ke>1&&(ke-=1),ke<1/6?Ne+(Ee-Ne)*6*ke:ke<1/2?Ee:ke<2/3?Ne+(Ee-Ne)*(2/3-ke)*6:Ne}if(S===0)Z=ue=G=v;else{var Te=v<.5?v*(1+S):v+S-v*S,Pe=2*v-Te;Z=he(Pe,Te,h+1/3),ue=he(Pe,Te,h),G=he(Pe,Te,h-1/3)}return{r:Z*255,g:ue*255,b:G*255}}function F(h,S,v){h=c(h,255),S=c(S,255),v=c(v,255);var Z=D(h,S,v),ue=R(h,S,v),G,he,Te=Z,Pe=Z-ue;if(he=Z===0?0:Pe/Z,Z==ue)G=0;else{switch(Z){case h:G=(S-v)/Pe+(S<v?6:0);break;case S:G=(v-h)/Pe+2;break;case v:G=(h-S)/Pe+4;break}G/=6}return{h:G,s:he,v:Te}}function P(h,S,v){h=c(h,360)*6,S=c(S,100),v=c(v,100);var Z=me.floor(h),ue=h-Z,G=v*(1-S),he=v*(1-ue*S),Te=v*(1-(1-ue)*S),Pe=Z%6,Ne=[v,he,G,G,Te,v][Pe],Ee=[Te,v,v,he,G,G][Pe],ke=[G,G,Te,v,v,he][Pe];return{r:Ne*255,g:Ee*255,b:ke*255}}function I(h,S,v,Z){var ue=[oe($(h).toString(16)),oe($(S).toString(16)),oe($(v).toString(16))];return Z&&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 ae(h,S,v,Z,ue){var G=[oe($(h).toString(16)),oe($(S).toString(16)),oe($(v).toString(16)),oe(te(Z))];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 ne(h,S,v,Z){var ue=[oe(te(Z)),oe($(h).toString(16)),oe($(S).toString(16)),oe($(v).toString(16))];return ue.join("")}H.equals=function(h,S){return!h||!S?!1:H(h).toRgbString()==H(S).toRgbString()},H.random=function(){return H.fromRatio({r:T(),g:T(),b:T()})};function Le(h,S){S=S===0?0:S||10;var v=H(h).toHsl();return v.s-=S/100,v.s=l(v.s),H(v)}function Fe(h,S){S=S===0?0:S||10;var v=H(h).toHsl();return v.s+=S/100,v.s=l(v.s),H(v)}function ce(h){return H(h).desaturate(100)}function Ce(h,S){S=S===0?0:S||10;var v=H(h).toHsl();return v.l+=S/100,v.l=l(v.l),H(v)}function De(h,S){S=S===0?0:S||10;var v=H(h).toRgb();return v.r=D(0,R(255,v.r-$(255*-(S/100)))),v.g=D(0,R(255,v.g-$(255*-(S/100)))),v.b=D(0,R(255,v.b-$(255*-(S/100)))),H(v)}function J(h,S){S=S===0?0:S||10;var v=H(h).toHsl();return v.l-=S/100,v.l=l(v.l),H(v)}function pe(h,S){var v=H(h).toHsl(),Z=(v.h+S)%360;return v.h=Z<0?360+Z:Z,H(v)}function Oe(h){var S=H(h).toHsl();return S.h=(S.h+180)%360,H(S)}function fe(h){var S=H(h).toHsl(),v=S.h;return[H(h),H({h:(v+120)%360,s:S.s,l:S.l}),H({h:(v+240)%360,s:S.s,l:S.l})]}function y(h){var S=H(h).toHsl(),v=S.h;return[H(h),H({h:(v+90)%360,s:S.s,l:S.l}),H({h:(v+180)%360,s:S.s,l:S.l}),H({h:(v+270)%360,s:S.s,l:S.l})]}function Y(h){var S=H(h).toHsl(),v=S.h;return[H(h),H({h:(v+72)%360,s:S.s,l:S.l}),H({h:(v+216)%360,s:S.s,l:S.l})]}function z(h,S,v){S=S||6,v=v||30;var Z=H(h).toHsl(),ue=360/v,G=[H(h)];for(Z.h=(Z.h-(ue*S>>1)+720)%360;--S;)Z.h=(Z.h+ue)%360,G.push(H(Z));return G}function w(h,S){S=S||6;for(var v=H(h).toHsv(),Z=v.h,ue=v.s,G=v.v,he=[],Te=1/S;S--;)he.push(H({h:Z,s:ue,v:G})),G=(G+Te)%1;return he}H.mix=function(h,S,v){v=v===0?0:v||50;var Z=H(h).toRgb(),ue=H(S).toRgb(),G=v/100,he={r:(ue.r-Z.r)*G+Z.r,g:(ue.g-Z.g)*G+Z.g,b:(ue.b-Z.b)*G+Z.b,a:(ue.a-Z.a)*G+Z.a};return H(he)},H.readability=function(h,S){var v=H(h),Z=H(S);return(me.max(v.getLuminance(),Z.getLuminance())+.05)/(me.min(v.getLuminance(),Z.getLuminance())+.05)},H.isReadable=function(h,S,v){var Z=H.readability(h,S),ue,G;G=!1,ue=q(v);switch(ue.level+ue.size){case"AAsmall":case"AAAlarge":G=Z>=4.5;break;case"AAlarge":G=Z>=3;break;case"AAAsmall":G=Z>=7;break}return G},H.mostReadable=function(h,S,v){var Z=null,ue=0,G,he,Te,Pe;v=v||{},he=v.includeFallbackColors,Te=v.level,Pe=v.size;for(var Ne=0;Ne<S.length;Ne++)G=H.readability(h,S[Ne]),G>ue&&(ue=G,Z=H(S[Ne]));return H.isReadable(h,Z,{level:Te,size:Pe})||!he?Z:(v.includeFallbackColors=!1,H.mostReadable(h,["#fff","#000"],v))};var Q=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"},j=H.hexNames=M(Q);function M(h){var S={};for(var v in h)h.hasOwnProperty(v)&&(S[h[v]]=v);return S}function O(h){return h=parseFloat(h),(isNaN(h)||h<0||h>1)&&(h=1),h}function c(h,S){E(h)&&(h="100%");var v=N(h);return h=R(S,D(0,parseFloat(h))),v&&(h=parseInt(h*S,10)/100),me.abs(h-S)<1e-6?1:h%S/parseFloat(S)}function l(h){return R(1,D(0,h))}function m(h){return parseInt(h,16)}function E(h){return typeof h=="string"&&h.indexOf(".")!=-1&&parseFloat(h)===1}function N(h){return typeof h=="string"&&h.indexOf("%")!=-1}function oe(h){return h.length==1?"0"+h:""+h}function xe(h){return h<=1&&(h=h*100+"%"),h}function te(h){return me.round(parseFloat(h)*255).toString(16)}function _e(h){return m(h)/255}var se=function(){var h="[-\\+]?\\d+%?",S="[-\\+]?\\d*\\.\\d+%?",v="(?:"+S+")|(?:"+h+")",Z="[\\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"+Z),rgba:new RegExp("rgba"+ue),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+ue),hsv:new RegExp("hsv"+Z),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 de(h){return!!se.CSS_UNIT.exec(h)}function W(h){h=h.replace(re,"").replace(Se,"").toLowerCase();var S=!1;if(Q[h])h=Q[h],S=!0;else if(h=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var v;return(v=se.rgb.exec(h))?{r:v[1],g:v[2],b:v[3]}:(v=se.rgba.exec(h))?{r:v[1],g:v[2],b:v[3],a:v[4]}:(v=se.hsl.exec(h))?{h:v[1],s:v[2],l:v[3]}:(v=se.hsla.exec(h))?{h:v[1],s:v[2],l:v[3],a:v[4]}:(v=se.hsv.exec(h))?{h:v[1],s:v[2],v:v[3]}:(v=se.hsva.exec(h))?{h:v[1],s:v[2],v:v[3],a:v[4]}:(v=se.hex8.exec(h))?{r:m(v[1]),g:m(v[2]),b:m(v[3]),a:_e(v[4]),format:S?"name":"hex8"}:(v=se.hex6.exec(h))?{r:m(v[1]),g:m(v[2]),b:m(v[3]),format:S?"name":"hex"}:(v=se.hex4.exec(h))?{r:m(v[1]+""+v[1]),g:m(v[2]+""+v[2]),b:m(v[3]+""+v[3]),a:_e(v[4]+""+v[4]),format:S?"name":"hex8"}:(v=se.hex3.exec(h))?{r:m(v[1]+""+v[1]),g:m(v[2]+""+v[2]),b:m(v[3]+""+v[3]),format:S?"name":"hex"}:!1}function q(h){var S,v;return h=h||{level:"AA",size:"small"},S=(h.level||"AA").toUpperCase(),v=(h.size||"small").toLowerCase(),S!=="AA"&&S!=="AAA"&&(S="AA"),v!=="small"&&v!=="large"&&(v="small"),{level:S,size:v}}dt.exports?dt.exports=H:!(U=function(){return H}.call(Ge,C,Ge,dt),U!==void 0&&(dt.exports=U))})(Math)},bT9E:function(dt,Ge,C){"use strict";C.d(Ge,"a",function(){return me});var U=C("VTBJ");function me(re,Se){var ye=Object(U.a)({},re);return Array.isArray(Se)&&Se.forEach(function($){delete ye[$]}),ye}},c5Ni:function(dt,Ge,C){},dejd:function(dt,Ge,C){},dmUQ:function(dt,Ge,C){"use strict";var U=C("Ff2n"),me=C("rePB"),re=C("1OyB"),Se=C("vuIU"),ye=C("Ji7U"),$=C("md7G"),R=C("foSv"),D=C("q1tI"),T=C.n(D),H=C("TSYQ"),X=C.n(H),ee=C("4IlW");function be(fe,y){var Y=Object.keys(fe);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(fe);y&&(z=z.filter(function(w){return Object.getOwnPropertyDescriptor(fe,w).enumerable})),Y.push.apply(Y,z)}return Y}function ie(fe){for(var y=1;y<arguments.length;y++){var Y=arguments[y]!=null?arguments[y]:{};y%2?be(Object(Y),!0).forEach(function(z){Object(me.a)(fe,z,Y[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(fe,Object.getOwnPropertyDescriptors(Y)):be(Object(Y)).forEach(function(z){Object.defineProperty(fe,z,Object.getOwnPropertyDescriptor(Y,z))})}return fe}function F(fe){var y=P();return function(){var z=Object(R.a)(fe),w;if(y){var Q=Object(R.a)(this).constructor;w=Reflect.construct(z,arguments,Q)}else w=z.apply(this,arguments);return Object($.a)(this,w)}}function P(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(fe){return!1}}function I(){}function ae(fe){fe.preventDefault()}var ne=function(y){return y.replace(/[^\w.-]+/g,"")},Le=200,Fe=600,ce=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Ce=function(y){return y!=null},De=function(y,Y){return Y===y||typeof Y=="number"&&typeof y=="number"&&isNaN(Y)&&isNaN(y)},J=function(fe){Object(ye.a)(Y,fe);var y=F(Y);function Y(z){var w;Object(re.a)(this,Y),w=y.call(this,z),w.onKeyDown=function(M){var O=w.props,c=O.onKeyDown,l=O.onPressEnter;if(M.keyCode===ee.a.UP){var m=w.getRatio(M);w.up(M,m,null),w.stop()}else if(M.keyCode===ee.a.DOWN){var E=w.getRatio(M);w.down(M,E,null),w.stop()}else M.keyCode===ee.a.ENTER&&l&&l(M);if(w.recordCursorPosition(),w.lastKeyCode=M.keyCode,c){for(var N=arguments.length,oe=new Array(N>1?N-1:0),xe=1;xe<N;xe++)oe[xe-1]=arguments[xe];c.apply(void 0,[M].concat(oe))}},w.onKeyUp=function(M){var O=w.props.onKeyUp;if(w.stop(),w.recordCursorPosition(),O){for(var c=arguments.length,l=new Array(c>1?c-1:0),m=1;m<c;m++)l[m-1]=arguments[m];O.apply(void 0,[M].concat(l))}},w.onChange=function(M){var O=w.props.onChange;w.state.focused&&(w.inputting=!0),w.rawInput=w.props.parser(w.getValueFromEvent(M)),w.setState({inputValue:w.rawInput}),O(w.toNumber(w.rawInput))},w.onMouseUp=function(){var M=w.props.onMouseUp;w.recordCursorPosition(),M&&M.apply(void 0,arguments)},w.onFocus=function(){var M;w.setState({focused:!0}),(M=w.props).onFocus.apply(M,arguments)},w.onBlur=function(){var M=w.props.onBlur;w.inputting=!1,w.setState({focused:!1});var O=w.getCurrentValidValue(w.state.inputValue),c=w.setValue(O,I);if(M){var l=w.input.value,m=w.getInputDisplayValue({focus:!1,value:c});w.input.value=m&&Number(m),M.apply(void 0,arguments),w.input.value=l}},w.getRatio=function(M){var O=1;return M.metaKey||M.ctrlKey?O=.1:M.shiftKey&&(O=10),O},w.getFullNum=function(M){return isNaN(M)?M:/e/i.test(String(M))?Number(M).toFixed(18).replace(/\.?0+$/,""):M},w.getPrecision=function(M){if(Ce(w.props.precision))return w.props.precision;var O=String(M);if(O.indexOf("e-")>=0)return parseInt(O.slice(O.indexOf("e-")+2),10);var c=0;return O.indexOf(".")>=0&&(c=O.length-O.indexOf(".")-1),c},w.getInputDisplayValue=function(M){var O=M||w.state,c=O.focused,l=O.inputValue,m=O.value,E;c?E=l:E=w.toPrecisionAsStep(m),E==null&&(E="");var N=w.formatWrapper(E);return Ce(w.props.decimalSeparator)&&(N=N.toString().replace(".",w.props.decimalSeparator)),N},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(M){}},w.restoreByAfter=function(M){if(M===void 0)return!1;var O=w.input.value,c=O.lastIndexOf(M);if(c===-1)return!1;var l=w.cursorBefore.length;return w.lastKeyCode===ee.a.DELETE&&w.cursorBefore.charAt(l-1)===M[0]?(w.fixCaret(l,l),!0):c+M.length===O.length?(w.fixCaret(c,c),!0):!1},w.partRestoreByAfter=function(M){return M===void 0?!1:Array.prototype.some.call(M,function(O,c){var l=M.substring(c);return w.restoreByAfter(l)})},w.isNotCompleteNumber=function(M){return isNaN(M)||M===""||M===null||M&&M.toString().indexOf(".")===M.toString().length-1},w.stop=function(){w.autoStepTimer&&clearTimeout(w.autoStepTimer)},w.down=function(M,O,c){w.pressingUpOrDown=!0,w.step("down",M,O,c)},w.up=function(M,O,c){w.pressingUpOrDown=!0,w.step("up",M,O,c)},w.saveInput=function(M){w.input=M};var Q=z.value;Q===void 0&&(Q=z.defaultValue),w.state={focused:z.autoFocus};var j=w.getValidValue(w.toNumber(Q));return w.state=ie(ie({},w.state),{},{inputValue:w.toPrecisionAsStep(j),value:j}),w}return Object(Se.a)(Y,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(w){var Q=this.props,j=Q.value,M=Q.onChange,O=Q.max,c=Q.min,l=this.state.focused;if(w){if(!De(w.value,j)||!De(w.max,O)||!De(w.min,c)){var m=l?j:this.getValidValue(j),E;this.pressingUpOrDown?E=m:this.inputting?E=this.rawInput:E=this.toPrecisionAsStep(m),this.setState({value:m,inputValue:E})}var N="value"in this.props?j:this.state.value;"max"in this.props&&w.max!==O&&typeof N=="number"&&N>O&&M&&M(O),"min"in this.props&&w.min!==c&&typeof N=="number"&&N<c&&M&&M(c)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var oe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===ee.a.BACKSPACE?oe=this.cursorStart-1:this.lastKeyCode===ee.a.DELETE&&(oe=this.cursorStart):oe=this.input.value.length,this.fixCaret(oe,oe)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case ee.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case ee.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(xe){}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 Q=w;return Q===""?Q="":this.isNotCompleteNumber(parseFloat(Q))?Q=this.state.value:Q=this.getValidValue(Q),this.toNumber(Q)}},{key:"getValueFromEvent",value:function(w){var Q=w.target.value.trim().replace(/。/g,".");return Ce(this.props.decimalSeparator)&&(Q=Q.replace(this.props.decimalSeparator,".")),Q}},{key:"getValidValue",value:function(w){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,M=parseFloat(w);return isNaN(M)?w:(M<Q&&(M=Q),M>j&&(M=j),M)}},{key:"setValue",value:function(w,Q){var j=this.props.precision,M=this.isNotCompleteNumber(parseFloat(w))?null:parseFloat(w),O=this.state.value,c=O===void 0?null:O,l=this.state.inputValue,m=l===void 0?null:l,E=typeof M=="number"?M.toFixed(j):"".concat(M),N=M!==c||E!=="".concat(m);return"value"in this.props?(m=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:m},Q)):this.setState({value:M,inputValue:this.toPrecisionAsStep(w)},Q),N&&this.props.onChange(M),M}},{key:"getMaxPrecision",value:function(w){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.props,M=j.precision,O=j.step;if(Ce(M))return M;var c=this.getPrecision(Q),l=this.getPrecision(O),m=this.getPrecision(w);return w?Math.max(m,c+l):c+l}},{key:"getPrecisionFactor",value:function(w){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.getMaxPrecision(w,Q);return Math.pow(10,j)}},{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 Q=Math.abs(this.getMaxPrecision(w));return isNaN(Q)?w.toString():Number(w).toFixed(Q)}},{key:"toNumber",value:function(w){var Q=this.props.precision,j=this.state.focused,M=w&&w.length>16&&j;return this.isNotCompleteNumber(w)||M?w:Ce(Q)?Math.round(w*Math.pow(10,Q))/Math.pow(10,Q):Number(w)}},{key:"upStep",value:function(w,Q){var j=this.props.step,M=this.getPrecisionFactor(w,Q),O=Math.abs(this.getMaxPrecision(w,Q)),c=((M*w+M*j*Q)/M).toFixed(O);return this.toNumber(c)}},{key:"downStep",value:function(w,Q){var j=this.props.step,M=this.getPrecisionFactor(w,Q),O=Math.abs(this.getMaxPrecision(w,Q)),c=((M*w-M*j*Q)/M).toFixed(O);return this.toNumber(c)}},{key:"step",value:function(w,Q){var j=this,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=arguments.length>3?arguments[3]:void 0;this.stop(),Q&&(Q.persist(),Q.preventDefault());var c=this.props;if(c.disabled)return;var l=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(l))return;var m=this["".concat(w,"Step")](l,M),E=m>c.max||m<c.min;if(m>c.max?m=c.max:m<c.min&&(m=c.min),this.setValue(m,null),this.setState({focused:!0},function(){j.pressingUpOrDown=!1}),E)return;this.autoStepTimer=setTimeout(function(){j[w](Q,M,!0)},O?Le:Fe)}},{key:"fixCaret",value:function(w,Q){if(w===void 0||Q===void 0||!this.input||!this.input.value)return;try{var j=this.input.selectionStart,M=this.input.selectionEnd;(w!==j||Q!==M)&&this.input.setSelectionRange(w,Q)}catch(O){}}},{key:"render",value:function(){var w,Q=this.props,j=Q.prefixCls,M=Q.disabled,O=Q.readOnly,c=Q.useTouch,l=Q.autoComplete,m=Q.upHandler,E=Q.downHandler,N=Q.className,oe=Q.max,xe=Q.min,te=Q.style,_e=Q.title,se=Q.onMouseEnter,de=Q.onMouseLeave,W=Q.onMouseOver,q=Q.onMouseOut,h=Q.required,S=Q.onClick,v=Q.tabIndex,Z=Q.type,ue=Q.placeholder,G=Q.id,he=Q.inputMode,Te=Q.pattern,Pe=Q.step,Ne=Q.maxLength,Ee=Q.autoFocus,ke=Q.name,Je=Q.onPaste,Ye=Q.onInput,Ve=Object(U.a)(Q,["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,at=Ke.value,et=Ke.focused,qe=X()(j,(w={},Object(me.a)(w,N,!!N),Object(me.a)(w,"".concat(j,"-disabled"),M),Object(me.a)(w,"".concat(j,"-focused"),et),w)),ve={};Object.keys(Ve).forEach(function(b){(b.substr(0,5)==="data-"||b.substr(0,5)==="aria-"||b==="role")&&(ve[b]=Ve[b])});var tt=!O&&!M,$e=this.getInputDisplayValue(null),we=(at||at===0)&&(isNaN(at)||Number(at)>=oe),Ie=(at||at===0)&&(isNaN(at)||Number(at)<=xe),_=we||M||O,k=Ie||M||O,L=X()("".concat(j,"-handler"),"".concat(j,"-handler-up"),Object(me.a)({},"".concat(j,"-handler-up-disabled"),_)),f=X()("".concat(j,"-handler"),"".concat(j,"-handler-down"),Object(me.a)({},"".concat(j,"-handler-down-disabled"),k)),p=c?{onTouchStart:_?I:this.up,onTouchEnd:this.stop}:{onMouseDown:_?I:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},g=c?{onTouchStart:k?I:this.down,onTouchEnd:this.stop}:{onMouseDown:k?I:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return T.a.createElement("div",{className:qe,style:te,title:_e,onMouseEnter:se,onMouseLeave:de,onMouseOver:W,onMouseOut:q,onFocus:function(){return null},onBlur:function(){return null}},T.a.createElement("div",{className:"".concat(j,"-handler-wrap")},T.a.createElement("span",Object.assign({unselectable:"on"},p,{role:"button","aria-label":"Increase Value","aria-disabled":_,className:L}),m||T.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-up-inner"),onClick:ae})),T.a.createElement("span",Object.assign({unselectable:"on"},g,{role:"button","aria-label":"Decrease Value","aria-disabled":k,className:f}),E||T.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-down-inner"),onClick:ae}))),T.a.createElement("div",{className:"".concat(j,"-input-wrap")},T.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":xe,"aria-valuemax":oe,"aria-valuenow":at,required:h,type:Z,placeholder:ue,onPaste:Je,onClick:S,onMouseUp:this.onMouseUp,className:"".concat(j,"-input"),tabIndex:v,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:I,onKeyUp:tt?this.onKeyUp:I,autoFocus:Ee,maxLength:Ne,readOnly:O,disabled:M,max:oe,min:xe,step:Pe,name:ke,title:_e,id:G,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum($e),pattern:Te,inputMode:he,onInput:Ye},ve))))}}]),Y}(T.a.Component);J.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:ce,min:-ce,step:1,style:{},onChange:I,onKeyDown:I,onPressEnter:I,onFocus:I,onBlur:I,parser:ne,required:!1,autoComplete:"off"};var pe=J,Oe=Ge.a=pe},h78n:function(dt,Ge,C){"use strict";C.d(Ge,"a",function(){return w});var U=C("q1tI"),me=C.n(U),re=C("TSYQ"),Se=C.n(re),ye={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},$=function(M){var O=M.map(function(){return Object(U.useRef)()}),c=Object(U.useRef)();return Object(U.useEffect)(function(){var l=Date.now(),m=!1;Object.keys(O).forEach(function(E){var N=O[E].current;if(!N)return;m=!0;var oe=N.style;oe.transitionDuration=".3s, .3s, .3s, .06s",c.current&&l-c.current<100&&(oe.transitionDuration="0s, 0s")}),m&&(c.current=Date.now())}),[O]};function R(){return R=Object.assign||function(j){for(var M=1;M<arguments.length;M++){var O=arguments[M];for(var c in O)Object.prototype.hasOwnProperty.call(O,c)&&(j[c]=O[c])}return j},R.apply(this,arguments)}function D(j,M){return be(j)||ee(j,M)||H(j,M)||T()}function T(){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(j,M){if(!j)return;if(typeof j=="string")return X(j,M);var O=Object.prototype.toString.call(j).slice(8,-1);if(O==="Object"&&j.constructor&&(O=j.constructor.name),O==="Map"||O==="Set")return Array.from(j);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return X(j,M)}function X(j,M){(M==null||M>j.length)&&(M=j.length);for(var O=0,c=new Array(M);O<M;O++)c[O]=j[O];return c}function ee(j,M){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(j)))return;var O=[],c=!0,l=!1,m=void 0;try{for(var E=j[Symbol.iterator](),N;!(c=(N=E.next()).done)&&!(O.push(N.value),M&&O.length===M);c=!0);}catch(oe){l=!0,m=oe}finally{try{!c&&E.return!=null&&E.return()}finally{if(l)throw m}}return O}function be(j){if(Array.isArray(j))return j}function ie(j,M){if(j==null)return{};var O=F(j,M),c,l;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(j);for(l=0;l<m.length;l++){if(c=m[l],M.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(j,c))continue;O[c]=j[c]}}return O}function F(j,M){if(j==null)return{};var O={},c=Object.keys(j),l,m;for(m=0;m<c.length;m++){if(l=c[m],M.indexOf(l)>=0)continue;O[l]=j[l]}return O}var P=function(M){var O=M.className,c=M.percent,l=M.prefixCls,m=M.strokeColor,E=M.strokeLinecap,N=M.strokeWidth,oe=M.style,xe=M.trailColor,te=M.trailWidth,_e=M.transition,se=ie(M,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete se.gapPosition;var de=Array.isArray(c)?c:[c],W=Array.isArray(m)?m:[m],q=$(de),h=D(q,1),S=h[0],v=N/2,Z=100-N/2,ue="M ".concat(E==="round"?v:0,",").concat(v,`
L `).concat(E==="round"?Z:100,",").concat(v),G="0 0 100 ".concat(N),he=0;return me.a.createElement("svg",R({className:Se()("".concat(l,"-line"),O),viewBox:G,preserveAspectRatio:"none",style:oe},se),me.a.createElement("path",{className:"".concat(l,"-line-trail"),d:ue,strokeLinecap:E,stroke:xe,strokeWidth:te||N,fillOpacity:"0"}),de.map(function(Te,Pe){var Ne={strokeDasharray:"".concat(Te,"px, 100px"),strokeDashoffset:"-".concat(he,"px"),transition:_e||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ee=W[Pe]||W[W.length-1];return he+=Te,me.a.createElement("path",{key:Pe,className:"".concat(l,"-line-path"),d:ue,strokeLinecap:E,stroke:Ee,strokeWidth:N,fillOpacity:"0",ref:S[Pe],style:Ne})}))};P.defaultProps=ye;var I=P;function ae(){return ae=Object.assign||function(j){for(var M=1;M<arguments.length;M++){var O=arguments[M];for(var c in O)Object.prototype.hasOwnProperty.call(O,c)&&(j[c]=O[c])}return j},ae.apply(this,arguments)}function ne(j,M){return De(j)||Ce(j,M)||Fe(j,M)||Le()}function Le(){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 Fe(j,M){if(!j)return;if(typeof j=="string")return ce(j,M);var O=Object.prototype.toString.call(j).slice(8,-1);if(O==="Object"&&j.constructor&&(O=j.constructor.name),O==="Map"||O==="Set")return Array.from(j);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return ce(j,M)}function ce(j,M){(M==null||M>j.length)&&(M=j.length);for(var O=0,c=new Array(M);O<M;O++)c[O]=j[O];return c}function Ce(j,M){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(j)))return;var O=[],c=!0,l=!1,m=void 0;try{for(var E=j[Symbol.iterator](),N;!(c=(N=E.next()).done)&&!(O.push(N.value),M&&O.length===M);c=!0);}catch(oe){l=!0,m=oe}finally{try{!c&&E.return!=null&&E.return()}finally{if(l)throw m}}return O}function De(j){if(Array.isArray(j))return j}function J(j,M){if(j==null)return{};var O=pe(j,M),c,l;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(j);for(l=0;l<m.length;l++){if(c=m[l],M.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(j,c))continue;O[c]=j[c]}}return O}function pe(j,M){if(j==null)return{};var O={},c=Object.keys(j),l,m;for(m=0;m<c.length;m++){if(l=c[m],M.indexOf(l)>=0)continue;O[l]=j[l]}return O}var Oe=0;function fe(j){return+j.replace("%","")}function y(j){return Array.isArray(j)?j:[j]}function Y(j,M,O,c){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,m=arguments.length>5?arguments[5]:void 0,E=50-c/2,N=0,oe=-E,xe=0,te=-2*E;switch(m){case"left":N=-E,oe=0,xe=2*E,te=0;break;case"right":N=E,oe=0,xe=-2*E,te=0;break;case"bottom":oe=E,te=2*E;break;default:}var _e="M 50,50 m ".concat(N,",").concat(oe,`
a `).concat(E,",").concat(E," 0 1 1 ").concat(xe,",").concat(-te,`
a `).concat(E,",").concat(E," 0 1 1 ").concat(-xe,",").concat(te),se=Math.PI*2*E,de={stroke:O,strokeDasharray:"".concat(M/100*(se-l),"px ").concat(se,"px"),strokeDashoffset:"-".concat(l/2+j/100*(se-l),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:_e,pathStyle:de}}var z=function(M){var O=M.prefixCls,c=M.strokeWidth,l=M.trailWidth,m=M.gapDegree,E=M.gapPosition,N=M.trailColor,oe=M.strokeLinecap,xe=M.style,te=M.className,_e=M.strokeColor,se=M.percent,de=J(M,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),W=Object(U.useMemo)(function(){return Oe+=1,Oe},[]),q=Y(0,100,N,c,m,E),h=q.pathString,S=q.pathStyle,v=y(se),Z=y(_e),ue=Z.find(function(Ne){return Object.prototype.toString.call(Ne)==="[object Object]"}),G=$(v),he=ne(G,1),Te=he[0],Pe=function(){var Ee=0;return v.map(function(ke,Je){var Ye=Z[Je]||Z[Z.length-1],Ve=Object.prototype.toString.call(Ye)==="[object Object]"?"url(#".concat(O,"-gradient-").concat(W,")"):"",Ke=Y(Ee,ke,Ye,c,m,E);return Ee+=ke,me.a.createElement("path",{key:Je,className:"".concat(O,"-circle-path"),d:Ke.pathString,stroke:Ve,strokeLinecap:oe,strokeWidth:c,opacity:ke===0?0:1,fillOpacity:"0",style:Ke.pathStyle,ref:Te[Je]})})};return me.a.createElement("svg",ae({className:Se()("".concat(O,"-circle"),te),viewBox:"0 0 100 100",style:xe},de),ue&&me.a.createElement("defs",null,me.a.createElement("linearGradient",{id:"".concat(O,"-gradient-").concat(W),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ue).sort(function(Ne,Ee){return fe(Ne)-fe(Ee)}).map(function(Ne,Ee){return me.a.createElement("stop",{key:Ee,offset:Ne,stopColor:ue[Ne]})}))),me.a.createElement("path",{className:"".concat(O,"-circle-trail"),d:h,stroke:N,strokeLinecap:oe,strokeWidth:l||c,fillOpacity:"0",style:S}),Pe().reverse())};z.defaultProps=ye;var w=z,Q={Line:I,Circle:w}},kSUc:function(dt,Ge,C){},lZu9:function(dt,Ge,C){(function(U){U(C("VrN/"),C("1eCo"),C("8EBN"))})(function(U){"use strict";U.defineMode("markdown",function(me,re){var Se=U.getMode(me,"text/html"),ye=Se.name=="null";function $(c){if(U.findModeByName){var l=U.findModeByName(c);l&&(c=l.mime||l.mimes[0])}var m=U.getMode(me,c);return m.name=="null"?null:m}re.highlightFormatting===void 0&&(re.highlightFormatting=!1),re.maxBlockquoteDepth===void 0&&(re.maxBlockquoteDepth=0),re.taskLists===void 0&&(re.taskLists=!1),re.strikethrough===void 0&&(re.strikethrough=!1),re.emoji===void 0&&(re.emoji=!1),re.fencedCodeBlockHighlighting===void 0&&(re.fencedCodeBlockHighlighting=!0),re.fencedCodeBlockDefaultMode===void 0&&(re.fencedCodeBlockDefaultMode="text/plain"),re.xml===void 0&&(re.xml=!0),re.tokenTypeOverrides===void 0&&(re.tokenTypeOverrides={});var R={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 D in R)R.hasOwnProperty(D)&&re.tokenTypeOverrides[D]&&(R[D]=re.tokenTypeOverrides[D]);var T=/^([*\-_])(?:\s*\1){2,}\s*$/,H=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,X=/^\[(x| )\](?=\s)/i,ee=re.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,be=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ie=/^[^#!\[\]*_\\<>` "'(~:]+/,F=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,P=/^\s*\[[^\]]+?\]:.*$/,I=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,ae=" ";function ne(c,l,m){return l.f=l.inline=m,m(c,l)}function Le(c,l,m){return l.f=l.block=m,m(c,l)}function Fe(c){return!c||!/\S/.test(c.string)}function ce(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=ye;if(!l){var m=U.innerMode(Se,c.htmlState);l=m.mode.name=="xml"&&m.state.tagStart===null&&!m.state.context&&m.state.tokenize.isInText}l&&(c.f=fe,c.block=Ce,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function Ce(c,l){var m=c.column()===l.indentation,E=Fe(l.prevLine.stream),N=l.indentedCode,oe=l.prevLine.hr,xe=l.list!==!1,te=(l.listStack[l.listStack.length-1]||0)+3;l.indentedCode=!1;var _e=l.indentation;if(l.indentationDiff===null&&(l.indentationDiff=l.indentation,xe)){for(l.list=null;_e<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=_e-l.listStack[l.listStack.length-1])}var se=!E&&!oe&&!l.prevLine.header&&(!xe||!N)&&!l.prevLine.fencedCodeEnd,de=(l.list===!1||oe||E)&&l.indentation<=te&&c.match(T),W=null;if(l.indentationDiff>=4&&(N||l.prevLine.fencedCodeEnd||l.prevLine.header||E))return c.skipToEnd(),l.indentedCode=!0,R.code;if(c.eatSpace())return null;if(m&&l.indentation<=te&&(W=c.match(ee))&&W[1].length<=6)return l.quote=0,l.header=W[1].length,l.thisLine.header=!0,re.highlightFormatting&&(l.formatting="header"),l.f=l.inline,pe(l);if(l.indentation<=te&&c.eat(">"))return l.quote=m?1:l.quote+1,re.highlightFormatting&&(l.formatting="quote"),c.eatSpace(),pe(l);if(!de&&!l.setext&&m&&l.indentation<=te&&(W=c.match(H))){var q=W[1]?"ol":"ul";return l.indentation=_e+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,re.taskLists&&c.match(X,!1)&&(l.taskList=!0),l.f=l.inline,re.highlightFormatting&&(l.formatting=["list","list-"+q]),pe(l)}else{if(m&&l.indentation<=te&&(W=c.match(F,!0)))return l.quote=0,l.fencedEndRE=new RegExp(W[1]+"+ *$"),l.localMode=re.fencedCodeBlockHighlighting&&$(W[2]||re.fencedCodeBlockDefaultMode),l.localMode&&(l.localState=U.startState(l.localMode)),l.f=l.block=J,re.highlightFormatting&&(l.formatting="code-block"),l.code=-1,pe(l);if(l.setext||(!se||!xe)&&!l.quote&&l.list===!1&&!l.code&&!de&&!P.test(c.string)&&(W=c.lookAhead(1))&&(W=W.match(be)))return l.setext?(l.header=l.setext,l.setext=0,c.skipToEnd(),re.highlightFormatting&&(l.formatting="header")):(l.header=W[0].charAt(0)=="="?1:2,l.setext=l.header),l.thisLine.header=!0,l.f=l.inline,pe(l);if(de)return c.skipToEnd(),l.hr=!0,l.thisLine.hr=!0,R.hr;if(c.peek()==="[")return ne(c,l,Q)}return ne(c,l,l.inline)}function De(c,l){var m=Se.token(c,l.htmlState);if(!ye){var E=U.innerMode(Se,l.htmlState);(E.mode.name=="xml"&&E.state.tagStart===null&&!E.state.context&&E.state.tokenize.isInText||l.md_inside&&c.current().indexOf(">")>-1)&&(l.f=fe,l.block=Ce,l.htmlState=null)}return m}function J(c,l){var m=l.listStack[l.listStack.length-1]||0,E=l.indentation<m,N=m+3;if(l.fencedEndRE&&l.indentation<=N&&(E||c.match(l.fencedEndRE))){re.highlightFormatting&&(l.formatting="code-block");var oe;return E||(oe=pe(l)),l.localMode=l.localState=null,l.block=Ce,l.f=fe,l.fencedEndRE=null,l.code=0,l.thisLine.fencedCodeEnd=!0,E?Le(c,l,l.block):oe}else return l.localMode?l.localMode.token(c,l.localState):(c.skipToEnd(),R.code)}function pe(c){var l=[];if(c.formatting){l.push(R.formatting),typeof c.formatting=="string"&&(c.formatting=[c.formatting]);for(var m=0;m<c.formatting.length;m++)l.push(R.formatting+"-"+c.formatting[m]),c.formatting[m]==="header"&&l.push(R.formatting+"-"+c.formatting[m]+"-"+c.header),c.formatting[m]==="quote"&&(!re.maxBlockquoteDepth||re.maxBlockquoteDepth>=c.quote?l.push(R.formatting+"-"+c.formatting[m]+"-"+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(R.linkHref,"url"):(c.strong&&l.push(R.strong),c.em&&l.push(R.em),c.strikethrough&&l.push(R.strikethrough),c.emoji&&l.push(R.emoji),c.linkText&&l.push(R.linkText),c.code&&l.push(R.code),c.image&&l.push(R.image),c.imageAltText&&l.push(R.imageAltText,"link"),c.imageMarker&&l.push(R.imageMarker)),c.header&&l.push(R.header,R.header+"-"+c.header),c.quote&&(l.push(R.quote),!re.maxBlockquoteDepth||re.maxBlockquoteDepth>=c.quote?l.push(R.quote+"-"+c.quote):l.push(R.quote+"-"+re.maxBlockquoteDepth)),c.list!==!1){var E=(c.listStack.length-1)%3;E?E===1?l.push(R.list2):l.push(R.list3):l.push(R.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 Oe(c,l){return c.match(ie,!0)?pe(l):void 0}function fe(c,l){var m=l.text(c,l);if(typeof m!="undefined")return m;if(l.list)return l.list=null,pe(l);if(l.taskList){var E=c.match(X,!0)[1]===" ";return E?l.taskOpen=!0:l.taskClosed=!0,re.highlightFormatting&&(l.formatting="task"),l.taskList=!1,pe(l)}if(l.taskOpen=!1,l.taskClosed=!1,l.header&&c.match(/^#+$/,!0))return re.highlightFormatting&&(l.formatting="header"),pe(l);var N=c.next();if(l.linkTitle){l.linkTitle=!1;var oe=N;N==="("&&(oe=")"),oe=(oe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var xe="^\\s*(?:[^"+oe+"\\\\]+|\\\\\\\\|\\\\.)"+oe;if(c.match(new RegExp(xe),!0))return R.linkHref}if(N==="`"){var te=l.formatting;re.highlightFormatting&&(l.formatting="code"),c.eatWhile("`");var _e=c.current().length;if(l.code==0&&(!l.quote||_e==1))return l.code=_e,pe(l);if(_e==l.code){var se=pe(l);return l.code=0,se}else return l.formatting=te,pe(l)}else if(l.code)return pe(l);if(N==="\\"&&(c.next(),re.highlightFormatting)){var de=pe(l),W=R.formatting+"-escape";return de?de+" "+W:W}if(N==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return l.imageMarker=!0,l.image=!0,re.highlightFormatting&&(l.formatting="image"),pe(l);if(N==="["&&l.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return l.imageMarker=!1,l.imageAltText=!0,re.highlightFormatting&&(l.formatting="image"),pe(l);if(N==="]"&&l.imageAltText){re.highlightFormatting&&(l.formatting="image");var de=pe(l);return l.imageAltText=!1,l.image=!1,l.inline=l.f=Y,de}if(N==="["&&!l.image)return l.linkText&&c.match(/^.*?\]/)||(l.linkText=!0,re.highlightFormatting&&(l.formatting="link")),pe(l);if(N==="]"&&l.linkText){re.highlightFormatting&&(l.formatting="link");var de=pe(l);return l.linkText=!1,l.inline=l.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?Y:fe,de}if(N==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=y,re.highlightFormatting&&(l.formatting="link");var de=pe(l);return de?de+=" ":de="",de+R.linkInline}if(N==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=y,re.highlightFormatting&&(l.formatting="link");var de=pe(l);return de?de+=" ":de="",de+R.linkEmail}if(re.xml&&N==="<"&&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=U.startState(Se),Le(c,l,De)}if(re.xml&&N==="<"&&c.match(/^\/\w*?>/))return l.md_inside=!1,"tag";if(N==="*"||N==="_"){for(var S=1,v=c.pos==1?" ":c.string.charAt(c.pos-2);S<3&&c.eat(N);)S++;var Z=c.peek()||" ",ue=!/\s/.test(Z)&&(!I.test(Z)||/\s/.test(v)||I.test(v)),G=!/\s/.test(v)&&(!I.test(v)||/\s/.test(Z)||I.test(Z)),he=null,Te=null;if(S%2&&(!l.em&&ue&&(N==="*"||!G||I.test(v))?he=!0:l.em==N&&G&&(N==="*"||!ue||I.test(Z))&&(he=!1)),S>1&&(!l.strong&&ue&&(N==="*"||!G||I.test(v))?Te=!0:l.strong==N&&G&&(N==="*"||!ue||I.test(Z))&&(Te=!1)),Te!=null||he!=null){re.highlightFormatting&&(l.formatting=he==null?"strong":Te==null?"em":"strong em"),he===!0&&(l.em=N),Te===!0&&(l.strong=N);var se=pe(l);return he===!1&&(l.em=!1),Te===!1&&(l.strong=!1),se}}else if(N===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return pe(l);c.backUp(1)}if(re.strikethrough){if(N==="~"&&c.eatWhile(N)){if(l.strikethrough){re.highlightFormatting&&(l.formatting="strikethrough");var se=pe(l);return l.strikethrough=!1,se}else if(c.match(/^[^\s]/,!1))return l.strikethrough=!0,re.highlightFormatting&&(l.formatting="strikethrough"),pe(l)}else if(N===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return pe(l);c.backUp(2)}}if(re.emoji&&N===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){l.emoji=!0,re.highlightFormatting&&(l.formatting="emoji");var Pe=pe(l);return l.emoji=!1,Pe}return N===" "&&(c.match(/^ +$/,!1)?l.trailingSpace++:l.trailingSpace&&(l.trailingSpaceNewLine=!0)),pe(l)}function y(c,l){var m=c.next();if(m===">"){l.f=l.inline=fe,re.highlightFormatting&&(l.formatting="link");var E=pe(l);return E?E+=" ":E="",E+R.linkInline}return c.match(/^[^>]+/,!0),R.linkInline}function Y(c,l){if(c.eatSpace())return null;var m=c.next();return m==="("||m==="["?(l.f=l.inline=w(m==="("?")":"]"),re.highlightFormatting&&(l.formatting="link-string"),l.linkHref=!0,pe(l)):"error"}var z={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(c){return function(l,m){var E=l.next();if(E===c){m.f=m.inline=fe,re.highlightFormatting&&(m.formatting="link-string");var N=pe(m);return m.linkHref=!1,N}return l.match(z[c]),m.linkHref=!0,pe(m)}}function Q(c,l){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(l.f=j,c.next(),re.highlightFormatting&&(l.formatting="link"),l.linkText=!0,pe(l)):ne(c,l,fe)}function j(c,l){if(c.match(/^\]:/,!0)){l.f=l.inline=M,re.highlightFormatting&&(l.formatting="link");var m=pe(l);return l.linkText=!1,m}return c.match(/^([^\]\\]|\\.)+/,!0),R.linkText}function M(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=fe,R.linkHref+" url")}var O={startState:function(){return{f:Ce,prevLine:{stream:null},thisLine:{stream:null},block:Ce,htmlState:null,indentation:0,inline:fe,text:Oe,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&&U.copyState(Se,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?U.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 ce(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 m=c.match(/^\s*/,!0)[0].replace(/\t/g,ae).length;if(l.indentation=m,l.indentationDiff=null,m>0)return null}}return l.f(c,l)},innerMode:function(c){return c.block==De?{state:c.htmlState,mode:Se}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:O}},indent:function(c,l,m){return c.block==De&&Se.indent?Se.indent(c.htmlState,l,m):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,l,m):U.Pass},blankLine:ce,getType:pe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O},"xml"),U.defineMIME("text/markdown","markdown"),U.defineMIME("text/x-markdown","markdown")})},osHv:function(dt,Ge,C){(function(U){U(C("VrN/"))})(function(U){"use strict";var me=U.Pos;function re(I,ae){return I.line-ae.line||I.ch-ae.ch}var Se="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",ye=Se+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",$=new RegExp("<(/?)(["+Se+"]["+ye+"]*)","g");function R(I,ae,ne,Le){this.line=ae,this.ch=ne,this.cm=I,this.text=I.getLine(ae),this.min=Le?Math.max(Le.from,I.firstLine()):I.firstLine(),this.max=Le?Math.min(Le.to-1,I.lastLine()):I.lastLine()}function D(I,ae){var ne=I.cm.getTokenTypeAt(me(I.line,ae));return ne&&/\btag\b/.test(ne)}function T(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 X(I){for(;;){var ae=I.text.indexOf(">",I.ch);if(ae==-1){if(T(I))continue;return}if(!D(I,ae+1)){I.ch=ae+1;continue}var ne=I.text.lastIndexOf("/",ae),Le=ne>-1&&!/\S/.test(I.text.slice(ne+1,ae));return I.ch=ae+1,Le?"selfClose":"regular"}}function ee(I){for(;;){var ae=I.ch?I.text.lastIndexOf("<",I.ch-1):-1;if(ae==-1){if(H(I))continue;return}if(!D(I,ae+1)){I.ch=ae;continue}$.lastIndex=ae,I.ch=ae;var ne=$.exec(I.text);if(ne&&ne.index==ae)return ne}}function be(I){for(;;){$.lastIndex=I.ch;var ae=$.exec(I.text);if(!ae){if(T(I))continue;return}if(!D(I,ae.index+1)){I.ch=ae.index+1;continue}return I.ch=ae.index+ae[0].length,ae}}function ie(I){for(;;){var ae=I.ch?I.text.lastIndexOf(">",I.ch-1):-1;if(ae==-1){if(H(I))continue;return}if(!D(I,ae+1)){I.ch=ae;continue}var ne=I.text.lastIndexOf("/",ae),Le=ne>-1&&!/\S/.test(I.text.slice(ne+1,ae));return I.ch=ae+1,Le?"selfClose":"regular"}}function F(I,ae){for(var ne=[];;){var Le=be(I),Fe,ce=I.line,Ce=I.ch-(Le?Le[0].length:0);if(!Le||!(Fe=X(I)))return;if(Fe=="selfClose")continue;if(Le[1]){for(var De=ne.length-1;De>=0;--De)if(ne[De]==Le[2]){ne.length=De;break}if(De<0&&(!ae||ae==Le[2]))return{tag:Le[2],from:me(ce,Ce),to:me(I.line,I.ch)}}else ne.push(Le[2])}}function P(I,ae){for(var ne=[];;){var Le=ie(I);if(!Le)return;if(Le=="selfClose"){ee(I);continue}var Fe=I.line,ce=I.ch,Ce=ee(I);if(!Ce)return;if(Ce[1])ne.push(Ce[2]);else{for(var De=ne.length-1;De>=0;--De)if(ne[De]==Ce[2]){ne.length=De;break}if(De<0&&(!ae||ae==Ce[2]))return{tag:Ce[2],from:me(I.line,I.ch),to:me(Fe,ce)}}}}U.registerHelper("fold","xml",function(I,ae){for(var ne=new R(I,ae.line,0);;){var Le=be(ne);if(!Le||ne.line!=ae.line)return;var Fe=X(ne);if(!Fe)return;if(!Le[1]&&Fe!="selfClose"){var ce=me(ne.line,ne.ch),Ce=F(ne,Le[2]);return Ce&&re(Ce.from,ce)>0?{from:ce,to:Ce.from}:null}}}),U.findMatchingTag=function(I,ae,ne){var Le=new R(I,ae.line,ae.ch,ne);if(Le.text.indexOf(">")==-1&&Le.text.indexOf("<")==-1)return;var Fe=X(Le),ce=Fe&&me(Le.line,Le.ch),Ce=Fe&&ee(Le);if(!Fe||!Ce||re(Le,ae)>0)return;var De={from:me(Le.line,Le.ch),to:ce,tag:Ce[2]};return Fe=="selfClose"?{open:De,close:null,at:"open"}:Ce[1]?{open:P(Le,Ce[2]),close:De,at:"close"}:(Le=new R(I,ce.line,ce.ch,ne),{open:De,close:F(Le,Ce[2]),at:"open"})},U.findEnclosingTag=function(I,ae,ne,Le){for(var Fe=new R(I,ae.line,ae.ch,ne);;){var ce=P(Fe,Le);if(!ce)break;var Ce=new R(I,ae.line,ae.ch,ne),De=F(Ce,ce.tag);if(De)return{open:ce,close:De}}},U.scanForClosingTag=function(I,ae,ne,Le){var Fe=new R(I,ae.line,ae.ch,Le?{from:0,to:Le}:null);return F(Fe,ne)}})},p5ED:function(dt,Ge,C){"use strict";var U=C("+L6B"),me=C("2/Rp"),re=C("5Dmo"),Se=C("3S7+"),ye=C("k1fw"),$=C("tJVT"),R=C("q1tI"),D=C.n(R),T=C("vHTk"),H=C.n(T),X=C("yEEn"),ee=C("ZW9T"),be=C("1vsH");Ge.a=function(ie){var F=ie.name,P=ie.data,I=ie.theme,ae=ie.type,ne=ie.filename,Le=ie.monacoEditor,Fe=ie.className,ce=ie.style,Ce=ie.close,De=ie.onClose,J=ie.hasMask,pe=Object(R.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Oe=Object($.a)(pe,2),fe=Oe[0],y=Oe[1],Y=Object(R.useState)(""),z=Object($.a)(Y,2),w=z[0],Q=z[1],j=Object(R.useRef)();ne&&(Le.filename=ne),Object(R.useEffect)(function(){var c,l,m=(c=document.cookie)===null||c===void 0||((l=c.replace(/\s/g,""))===null||l===void 0)?void 0:l.split(";");m==null||m.map(function(E){var N=E.split("=");N[0]==="_educoder_session"&&Q(N[1])})},[]);var M=function(){if(P.startsWith("http")||P.startsWith("/")){O();return}Object(be.x)(ne||"educoder",P,ne)},O=function(){Object(be.v)(ne||F,P)};return console.log("data:",P,"fileanme:",ne," name:",F),D.a.createElement("div",{style:Object(ye.a)({},ce||{}),className:"".concat(J&&H.a.bgBlack," ").concat(ae?H.a.wrp:"hide")},Ce&&D.a.createElement("div",{className:H.a.close,ref:j},D.a.createElement(Se.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return j.current}},D.a.createElement("span",{onClick:O},D.a.createElement("i",{className:"icon-quxiaozhiding"}))),D.a.createElement(Se.a,{title:"\u5173\u95ED",getPopupContainer:function(){return j.current}},D.a.createElement("span",{className:"",onClick:De},D.a.createElement("i",{className:"icon-guanbi1"})))),D.a.createElement("div",{className:"".concat(H.a[Fe]," ").concat(Fe," ").concat(H.a.monaco," ").concat(ae==="txt"?"show":"hide")},ae==="txt"&&D.a.createElement(ee.b,Le)),ae==="audio"&&D.a.createElement("audio",{src:"".concat(P!=null&&P.startsWith("/")||(P==null?void 0:P.indexOf("https://"))>-1?P:"data:audio/mp3;base64,").concat(P),autoPlay:!0}),ae==="video"&&D.a.createElement(D.a.Fragment,null,P!=null&&P.startsWith("/")?D.a.createElement("video",{controls:!0,src:"".concat(P),autoPlay:!0}):D.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(P),autoPlay:!0})),ae==="pdf"&&D.a.createElement("embed",{className:H.a.embed,src:P}),ae==="image"&&D.a.createElement(D.a.Fragment,null,D.a.createElement("img",{src:"".concat(P!=null&&P.startsWith("/")||(P==null?void 0:P.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(P)})),ae==="other"&&D.a.createElement("div",null,D.a.createElement(me.a,{type:"primary",size:"large",onClick:M},D.a.createElement(X.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(ae==="download"||ae==="office")&&D.a.createElement(me.a,{type:"primary",size:"large",onClick:M},D.a.createElement(X.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(dt,Ge,C){},"rAM+":function(dt,Ge,C){"use strict";C.d(Ge,"a",function(){return me});var U=C("Qw5x");function me(re,Se){var ye;if(typeof Symbol=="undefined"||re[Symbol.iterator]==null){if(Array.isArray(re)||(ye=Object(U.a)(re))||Se&&re&&typeof re.length=="number"){ye&&(re=ye);var $=0,R=function(){};return{s:R,n:function(){return $>=re.length?{done:!0}:{done:!1,value:re[$++]}},e:function(ee){throw ee},f:R}}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 D=!0,T=!1,H;return{s:function(){ye=re[Symbol.iterator]()},n:function(){var ee=ye.next();return D=ee.done,ee},e:function(ee){T=!0,H=ee},f:function(){try{!D&&ye.return!=null&&ye.return()}finally{if(T)throw H}}}}},rUJ1:function(dt,Ge){const C=/[&<>"']/,U=/[&<>"']/g,me=/[<>"']|&(?!#?\w+;)/,re=/[<>"']|&(?!#?\w+;)/g,Se={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ye=J=>Se[J];function $(J,pe){if(pe){if(C.test(J))return J.replace(U,ye)}else if(me.test(J))return J.replace(re,ye);return J}const R=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function D(J){return J.replace(R,(pe,Oe)=>(Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""))}const T=/(^|[^\[])\^/g;function H(J,pe){J=J.source||J,pe=pe||"";const Oe={replace:(fe,y)=>(y=y.source||y,y=y.replace(T,"$1"),J=J.replace(fe,y),Oe),getRegex:()=>new RegExp(J,pe)};return Oe}const X=/[^\w:]/g,ee=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function be(J,pe,Oe){if(J){let fe;try{fe=decodeURIComponent(D(Oe)).replace(X,"").toLowerCase()}catch(y){return null}if(fe.indexOf("javascript:")===0||fe.indexOf("vbscript:")===0||fe.indexOf("data:")===0)return null}pe&&!ee.test(Oe)&&(Oe=ae(pe,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(fe){return null}return Oe}const ie={},F=/^[^:]+:\/*[^/]*$/,P=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ae(J,pe){ie[" "+J]||(F.test(J)?ie[" "+J]=J+"/":ie[" "+J]=ce(J,"/",!0)),J=ie[" "+J];const Oe=J.indexOf(":")===-1;return pe.substring(0,2)==="//"?Oe?pe:J.replace(P,"$1")+pe:pe.charAt(0)==="/"?Oe?pe:J.replace(I,"$1")+pe:J+pe}const ne={exec:function(){}};function Le(J){let pe=1,Oe,fe;for(;pe<arguments.length;pe++){Oe=arguments[pe];for(fe in Oe)Object.prototype.hasOwnProperty.call(Oe,fe)&&(J[fe]=Oe[fe])}return J}function Fe(J,pe){const Oe=J.replace(/\|/g,(Y,z,w)=>{let Q=!1,j=z;for(;--j>=0&&w[j]==="\\";)Q=!Q;return Q?"|":" |"}),fe=Oe.split(/ \|/);let y=0;if(fe.length>pe)fe.splice(pe);else for(;fe.length<pe;)fe.push("");for(;y<fe.length;y++)fe[y]=fe[y].trim().replace(/\\\|/g,"|");return fe}function ce(J,pe,Oe){const fe=J.length;if(fe===0)return"";let y=0;for(;y<fe;){const Y=J.charAt(fe-y-1);if(Y===pe&&!Oe)y++;else if(Y!==pe&&Oe)y++;else break}return J.substr(0,fe-y)}function Ce(J,pe){if(J.indexOf(pe[1])===-1)return-1;const Oe=J.length;let fe=0,y=0;for(;y<Oe;y++)if(J[y]==="\\")y++;else if(J[y]===pe[0])fe++;else if(J[y]===pe[1]&&(fe--,fe<0))return y;return-1}function De(J){J&&J.sanitize&&!J.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")}dt.exports={escape:$,unescape:D,edit:H,cleanUrl:be,resolveUrl:ae,noopTest:ne,merge:Le,splitCells:Fe,rtrim:ce,findClosingBracket:Ce,checkSanitizeDeprecation:De}},vHTk:function(dt,Ge,C){dt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);