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.
122 lines
406 KiB
122 lines
406 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[156,6,7],{"+NIl":function(ht,Je,k){(function(F){F(k("VrN/"))})(function(F){"use strict";F.defineMode("stex",function(ge,se){"use strict";function Ae(le,G){le.cmdState.push(G)}function Ee(le){return le.cmdState.length>0?le.cmdState[le.cmdState.length-1]:null}function X(le){var G=le.cmdState.pop();G&&G.closeBracket()}function D(le){for(var G=le.cmdState,j=G.length-1;j>=0;j--){var I=G[j];if(I.name=="DEFAULT")continue;return I}return{styleIdentifier:function(){return null}}}function L(le,G,j){return function(){this.name=le,this.bracketNo=0,this.style=G,this.styles=j,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=L("importmodule","tag",["string","builtin"]),T.documentclass=L("documentclass","tag",["","atom"]),T.usepackage=L("usepackage","tag",["atom"]),T.begin=L("begin","tag",["atom"]),T.end=L("end","tag",["atom"]),T.label=L("label","tag",["atom"]),T.ref=L("ref","tag",["atom"]),T.eqref=L("eqref","tag",["atom"]),T.cite=L("cite","tag",["atom"]),T.bibitem=L("bibitem","tag",["atom"]),T.Bibitem=L("Bibitem","tag",["atom"]),T.RBibitem=L("RBibitem","tag",["atom"]),T.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function H(le,G){le.f=G}function K(le,G){var j;if(le.match(/^\\[a-zA-Z@]+/)){var I=le.current().slice(1);return j=T.hasOwnProperty(I)?T[I]:T.DEFAULT,j=new j,Ae(G,j),H(G,Ce),j.style}if(le.match(/^\\[$&%#{}_]/))return"tag";if(le.match(/^\\[,;!\/\\]/))return"tag";if(le.match("\\["))return H(G,function(ae,_e){return q(ae,_e,"\\]")}),"keyword";if(le.match("\\("))return H(G,function(ae,_e){return q(ae,_e,"\\)")}),"keyword";if(le.match("$$"))return H(G,function(ae,_e){return q(ae,_e,"$$")}),"keyword";if(le.match("$"))return H(G,function(ae,_e){return q(ae,_e,"$")}),"keyword";var oe=le.next();if(oe=="%")return le.skipToEnd(),"comment";if(oe=="}"||oe=="]"){if(j=Ee(G),j)j.closeBracket(oe),H(G,Ce);else return"error";return"bracket"}else return oe=="{"||oe=="["?(j=T.DEFAULT,j=new j,Ae(G,j),"bracket"):/\d/.test(oe)?(le.eatWhile(/[\w.%]/),"atom"):(le.eatWhile(/[\w\-_]/),j=D(G),j.name=="begin"&&(j.argument=le.current()),j.styleIdentifier())}function q(le,G,j){if(le.eatSpace())return null;if(j&&le.match(j))return H(G,K),"keyword";if(le.match(/^\\[a-zA-Z@]+/))return"tag";if(le.match(/^[a-zA-Z]+/))return"variable-2";if(le.match(/^\\[$&%#{}_]/))return"tag";if(le.match(/^\\[,;!\/]/))return"tag";if(le.match(/^[\^_&]/))return"tag";if(le.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(le.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var I=le.next();return I=="{"||I=="}"||I=="["||I=="]"||I=="("||I==")"?"bracket":I=="%"?(le.skipToEnd(),"comment"):"error"}function Ce(le,G){var j=le.peek(),I;return j=="{"||j=="["?(I=Ee(G),I.openBracket(j),le.eat(j),H(G,K),"bracket"):/[ \t\r]/.test(j)?(le.eat(j),null):(H(G,K),X(G),K(le,G))}return{startState:function(){var le=se.inMathMode?function(G,j){return q(G,j)}:K;return{cmdState:[],f:le}},copyState:function(le){return{cmdState:le.cmdState.slice(),f:le.f}},token:function(le,G){return G.f(le,G)},blankLine:function(le){le.f=K,le.cmdState.length=0},lineComment:"%"}}),F.defineMIME("text/x-stex","stex"),F.defineMIME("text/x-latex","stex")})},"19Vz":function(ht,Je,k){(function(F){F(k("VrN/"))})(function(F){F.defineOption("placeholder","",function(L,T,H){var K=H&&H!=F.Init;if(T&&!K)L.on("blur",Ee),L.on("change",X),L.on("swapDoc",X),F.on(L.getInputField(),"compositionupdate",L.state.placeholderCompose=function(){Ae(L)}),X(L);else if(!T&&K){L.off("blur",Ee),L.off("change",X),L.off("swapDoc",X),F.off(L.getInputField(),"compositionupdate",L.state.placeholderCompose),ge(L);var q=L.getWrapperElement();q.className=q.className.replace(" CodeMirror-empty","")}T&&!L.hasFocus()&&Ee(L)});function ge(L){L.state.placeholder&&(L.state.placeholder.parentNode.removeChild(L.state.placeholder),L.state.placeholder=null)}function se(L){ge(L);var T=L.state.placeholder=document.createElement("pre");T.style.cssText="height: 0; overflow: visible",T.style.direction=L.getOption("direction"),T.className="CodeMirror-placeholder CodeMirror-line-like";var H=L.getOption("placeholder");typeof H=="string"&&(H=document.createTextNode(H)),T.appendChild(H),L.display.lineSpace.insertBefore(T,L.display.lineSpace.firstChild)}function Ae(L){setTimeout(function(){var T=!1,H=L.getInputField();H.nodeName=="TEXTAREA"?T=!H.value:L.lineCount()==1&&(T=!/[^\u200b]/.test(H.querySelector(".CodeMirror-line").textContent)),T?se(L):ge(L)},20)}function Ee(L){D(L)&&se(L)}function X(L){var T=L.getWrapperElement(),H=D(L);T.className=T.className.replace(" CodeMirror-empty","")+(H?" CodeMirror-empty":""),H?se(L):ge(L)}function D(L){return L.lineCount()===1&&L.getLine(0)===""}})},"1eCo":function(ht,Je,k){(function(F){F(k("VrN/"))})(function(F){"use strict";var ge={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},se={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};F.defineMode("xml",function(Ae,Ee){var X=Ae.indentUnit,D={},L=Ee.htmlMode?ge:se;for(var T in L)D[T]=L[T];for(var T in Ee)D[T]=Ee[T];var H,K;function q(b,J){function z(P){return J.tokenize=P,P(b,J)}var x=b.next();if(x=="<")return b.eat("!")?b.eat("[")?b.match("CDATA[")?z(G("atom","]]>")):null:b.match("--")?z(G("comment","-->")):b.match("DOCTYPE",!0,!0)?(b.eatWhile(/[\w\._\-]/),z(j(1))):null:b.eat("?")?(b.eatWhile(/[\w\._\-]/),J.tokenize=G("meta","?>"),"meta"):(H=b.eat("/")?"closeTag":"openTag",J.tokenize=Ce,"tag bracket");if(x=="&"){var ee;return b.eat("#")?b.eat("x")?ee=b.eatWhile(/[a-fA-F\d]/)&&b.eat(";"):ee=b.eatWhile(/[\d]/)&&b.eat(";"):ee=b.eatWhile(/[\w\.\-:]/)&&b.eat(";"),ee?"atom":"error"}else return b.eatWhile(/[^&<]/),null}q.isInText=!0;function Ce(b,J){var z=b.next();if(z==">"||z=="/"&&b.eat(">"))return J.tokenize=q,H=z==">"?"endTag":"selfcloseTag","tag bracket";if(z=="=")return H="equals",null;if(z=="<"){J.tokenize=q,J.state=_e,J.tagName=J.tagStart=null;var x=J.tokenize(b,J);return x?x+" tag error":"tag error"}else return/[\'\"]/.test(z)?(J.tokenize=le(z),J.stringStartCol=b.column(),J.tokenize(b,J)):(b.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function le(b){var J=function(z,x){for(;!z.eol();)if(z.next()==b){x.tokenize=Ce;break}return"string"};return J.isInAttribute=!0,J}function G(b,J){return function(z,x){for(;!z.eol();){if(z.match(J)){x.tokenize=q;break}z.next()}return b}}function j(b){return function(J,z){for(var x;(x=J.next())!=null;){if(x=="<")return z.tokenize=j(b+1),z.tokenize(J,z);if(x==">")if(b==1){z.tokenize=q;break}else return z.tokenize=j(b-1),z.tokenize(J,z)}return"meta"}}function I(b,J,z){this.prev=b.context,this.tagName=J,this.indent=b.indented,this.startOfLine=z,(D.doNotIndent.hasOwnProperty(J)||b.context&&b.context.noIndent)&&(this.noIndent=!0)}function oe(b){b.context&&(b.context=b.context.prev)}function ae(b,J){for(var z;;){if(!b.context)return;if(z=b.context.tagName,!D.contextGrabbers.hasOwnProperty(z)||!D.contextGrabbers[z].hasOwnProperty(J))return;oe(b)}}function _e(b,J,z){return b=="openTag"?(z.tagStart=J.column(),He):b=="closeTag"?pe:_e}function He(b,J,z){return b=="word"?(z.tagName=J.current(),K="tag",me):D.allowMissingTagName&&b=="endTag"?(K="tag bracket",me(b,J,z)):(K="error",He)}function pe(b,J,z){if(b=="word"){var x=J.current();return z.context&&z.context.tagName!=x&&D.implicitlyClosed.hasOwnProperty(z.context.tagName)&&oe(z),z.context&&z.context.tagName==x||D.matchClosing===!1?(K="tag",ke):(K="tag error",je)}else return D.allowMissingTagName&&b=="endTag"?(K="tag bracket",ke(b,J,z)):(K="error",je)}function ke(b,J,z){return b!="endTag"?(K="error",ke):(oe(z),_e)}function je(b,J,z){return K="error",ke(b,J,z)}function me(b,J,z){if(b=="word")return K="attribute",he;if(b=="endTag"||b=="selfcloseTag"){var x=z.tagName,ee=z.tagStart;return z.tagName=z.tagStart=null,b=="selfcloseTag"||D.autoSelfClosers.hasOwnProperty(x)?ae(z,x):(ae(z,x),z.context=new I(z,x,ee==z.indented)),_e}return K="error",me}function he(b,J,z){return b=="equals"?Oe:(D.allowMissing||(K="error"),me(b,J,z))}function Oe(b,J,z){return b=="string"?V:b=="word"&&D.allowUnquoted?(K="string",me):(K="error",me(b,J,z))}function V(b,J,z){return b=="string"?V:me(b,J,z)}return{startState:function(b){var J={tokenize:q,state:_e,indented:b||0,tagName:null,tagStart:null,context:null};return b!=null&&(J.baseIndent=b),J},token:function(b,J){if(!J.tagName&&b.sol()&&(J.indented=b.indentation()),b.eatSpace())return null;H=null;var z=J.tokenize(b,J);return(z||H)&&z!="comment"&&(K=null,J.state=J.state(H||z,b,J),K&&(z=K=="error"?z+" error":K)),z},indent:function(b,J,z){var x=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+X;if(x&&x.noIndent)return F.Pass;if(b.tokenize!=Ce&&b.tokenize!=q)return z?z.match(/^(\s*)/)[0].length:0;if(b.tagName)return D.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+X*(D.multilineTagIndentFactor||1);if(D.alignCDATA&&/<!\[CDATA\[/.test(J))return 0;var ee=J&&/^<(\/)?([\w_:\.-]*)/.exec(J);if(ee&&ee[1])for(;x;)if(x.tagName==ee[2]){x=x.prev;break}else if(D.implicitlyClosed.hasOwnProperty(x.tagName))x=x.prev;else break;else if(ee)for(;x;){var P=D.contextGrabbers[x.tagName];if(P&&P.hasOwnProperty(ee[2]))x=x.prev;else break}for(;x&&x.prev&&!x.startOfLine;)x=x.prev;return x?x.indent+X:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:D.htmlMode?"html":"xml",helperType:D.htmlMode?"html":"xml",skipAttribute:function(b){b.state==Oe&&(b.state=me)},xmlCurrentTag:function(b){return b.tagName?{name:b.tagName,close:b.type=="closeTag"}:null},xmlCurrentContext:function(b){for(var J=[],z=b.context;z;z=z.prev)z.tagName&&J.push(z.tagName);return J.reverse()}}}),F.defineMIME("text/xml","xml"),F.defineMIME("application/xml","xml"),F.mimeModes.hasOwnProperty("text/html")||F.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7ahc":function(ht,Je,k){"use strict";k.d(Je,"a",function(){return He});var F=k("k1fw"),ge=k("0Owb"),se=k("+L6B"),Ae=k("2/Rp"),Ee=k("y8nQ"),X=k("Vl3Y"),D=k("tJVT"),L=k("OaEy"),T=k("2fM7"),H=k("q1tI"),K=k.n(H),q=k("VrN/"),Ce=k.n(q),le=k("p77/"),G=k.n(le),j=k("c5Ni"),I=k.n(j),oe=T.a.Option,ae={labelCol:{span:4},wrapperCol:{span:20}},_e={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"]};Je.b=function(pe){var ke=pe.callback,je=pe.onCancel,me=Object(H.useState)("python"),he=Object(D.a)(me,2),Oe=he[0],V=he[1];function b(z){V(_e[z][1])}function J(z){ke(z)}return K.a.createElement(X.a,Object(ge.a)({},ae,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:J}),K.a.createElement(X.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},K.a.createElement(T.a,{onChange:b},Object.keys(_e).map(function(z){return K.a.createElement(oe,{key:z,value:z},_e[z][0])}))),K.a.createElement(X.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},K.a.createElement(He,{mode:Oe})),K.a.createElement("div",{className:"flex-container flex-end"},K.a.createElement(Ae.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),K.a.createElement(Ae.a,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function He(pe){var ke=pe.value,je=pe.onChange,me=pe.mode,he=pe.options,Oe=he===void 0?{}:he,V=Object(H.useRef)(),b=Object(H.useState)(),J=Object(D.a)(b,2),z=J[0],x=J[1];return Object(H.useEffect)(function(){if(z){function ee(P){var O=P.getValue();je&&je(O)}return z.on("change",ee),function(){z.off("change",ee)}}},[z,je]),Object(H.useEffect)(function(){z&&z.setOption("mode",me)},[z,me]),Object(H.useEffect)(function(){z&&((ke!==z.getValue()||ke==="")&&setTimeout(function(){z.setValue(ke||" ")},300))},[z,ke]),Object(H.useEffect)(function(){if(V.current&&!z){var ee=Ce.a.fromTextArea(V.current,Object(F.a)({mode:me,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Oe));x(ee)}},[V.current,z]),K.a.createElement("div",{className:"my-codemirror-container"},K.a.createElement("textarea",{ref:V}))}},"7ixt":function(ht,Je,k){"use strict";k.d(Je,"a",function(){return se});var F={adjustX:1,adjustY:1},ge=[0,0],se={left:{points:["cr","cl"],overflow:F,offset:[-4,0],targetOffset:ge},right:{points:["cl","cr"],overflow:F,offset:[4,0],targetOffset:ge},top:{points:["bc","tc"],overflow:F,offset:[0,-4],targetOffset:ge},bottom:{points:["tc","bc"],overflow:F,offset:[0,4],targetOffset:ge},topLeft:{points:["bl","tl"],overflow:F,offset:[0,-4],targetOffset:ge},leftTop:{points:["tr","tl"],overflow:F,offset:[-4,0],targetOffset:ge},topRight:{points:["br","tr"],overflow:F,offset:[0,-4],targetOffset:ge},rightTop:{points:["tl","tr"],overflow:F,offset:[4,0],targetOffset:ge},bottomRight:{points:["tr","br"],overflow:F,offset:[0,4],targetOffset:ge},rightBottom:{points:["bl","br"],overflow:F,offset:[4,0],targetOffset:ge},bottomLeft:{points:["tl","bl"],overflow:F,offset:[0,4],targetOffset:ge},leftBottom:{points:["br","bl"],overflow:F,offset:[-4,0],targetOffset:ge}},Ae=se},"8EBN":function(ht,Je,k){(function(F){F(k("VrN/"))})(function(F){"use strict";F.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 ge=0;ge<F.modeInfo.length;ge++){var se=F.modeInfo[ge];se.mimes&&(se.mime=se.mimes[0])}F.findModeByMIME=function(Ae){Ae=Ae.toLowerCase();for(var Ee=0;Ee<F.modeInfo.length;Ee++){var X=F.modeInfo[Ee];if(X.mime==Ae)return X;if(X.mimes){for(var D=0;D<X.mimes.length;D++)if(X.mimes[D]==Ae)return X}}if(/\+xml$/.test(Ae))return F.findModeByMIME("application/xml");if(/\+json$/.test(Ae))return F.findModeByMIME("application/json")},F.findModeByExtension=function(Ae){Ae=Ae.toLowerCase();for(var Ee=0;Ee<F.modeInfo.length;Ee++){var X=F.modeInfo[Ee];if(X.ext){for(var D=0;D<X.ext.length;D++)if(X.ext[D]==Ae)return X}}},F.findModeByFileName=function(Ae){for(var Ee=0;Ee<F.modeInfo.length;Ee++){var X=F.modeInfo[Ee];if(X.file&&X.file.test(Ae))return X}var D=Ae.lastIndexOf("."),L=D>-1&&Ae.substring(D+1,Ae.length);if(L)return F.findModeByExtension(L)},F.findModeByName=function(Ae){Ae=Ae.toLowerCase();for(var Ee=0;Ee<F.modeInfo.length;Ee++){var X=F.modeInfo[Ee];if(X.name.toLowerCase()==Ae)return X;if(X.alias){for(var D=0;D<X.alias.length;D++)if(X.alias[D].toLowerCase()==Ae)return X}}}})},"9Bee":function(ht,Je,k){"use strict";var F=k("k1fw"),ge=k("tJVT"),se=k("q1tI"),Ae=k.n(se),Ee=k("vg9a"),X=k("DlQD"),D=k.n(X),L=k("rUJ1");function T(m,w){var R=m.match(/^(\s+)(?:```)/);if(R===null)return w;var ue=R[1];return w.split(`
|
|
`).map(function(ye){var ne=ye.match(/^\s+/);if(ne===null)return ye;var be=Object(ge.a)(ne,1),ce=be[0];return ce.length>=ue.length?ye.slice(ue.length):ye}).join(`
|
|
`)}var H=[],K=["<ul>"],q=new D.a.Renderer,Ce=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function le(){H.length=0,K=["<ul>"]}var G={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function j(m,w,R,ue){if(w>=m.length||m[w].level<=R)return w;var ye=m[w];ue.push("<li><a href='#"+ye.anchor+"'>"+ye.text+"</a>"),w++;var ne=[];return w=j(m,w,ye.level,ne),ne.length>0&&(ue.push("<ul>"),ne.forEach(function(be){ue.push(be)}),ue.push("</ul>")),ue.push("</li>"),w=j(m,w,R,ue),w}function I(){return j(H,0,0,K),K.push("</ul>"),K.join("")}var oe={heading:function(w){var R=Ce.exec(w);if(R)return{type:"heading",raw:R[0],depth:R[1].length,text:R[2]}},fences:function(w){var R=this.rules.block.fences.exec(w);if(R){var ue=R[0],ye=T(ue,R[3]||""),ne=R[2]?R[2].trim():R[2];if(["latex","katex","math"].indexOf(ne)>=0){var be=He(),ce=ye;ye=be,pe[be]={type:"block",expression:ce}}return{type:"code",raw:ue,lang:ne,text:ye}}}},ae=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_e=0,He=function(){return"__special_katext_id_".concat(_e++,"__")},pe={};function ke(){return pe}function je(){_e=0,pe={}}function me(m){return m=m.replace(ae,function(w,R){var ue=He();return pe[ue]={type:"inline",expression:R},ue}),m}var he=q.listitem;q.listitem=function(m){return he(me(m))};var Oe=q.paragraph;q.paragraph=function(m){return Oe(me(m))};var V=q.tablecell;q.tablecell=function(m,w){return V(me(m),w)},q.code=function(m,w,R){var ue=(w||"").match(/\S*/)[0];return ue?["latex","katex","math"].indexOf(ue)>=0?"<p class='editormd-tex'>".concat(m,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(w,'">').concat(R?m:Object(L.escape)(m,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(R?m:Object(L.escape)(m,!0))+"</code></pre>"},q.heading=function(m,w,R){var ue=this.options.headerPrefix+R.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return H.push({anchor:ue,level:w,text:m}),"<h"+w+' id="'+ue+'">'+m+"</h"+w+">"},D.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),D.a.use({tokenizer:oe,renderer:q});var b=D.a,J=k("SJMd"),z=k("ulZh"),x=k.n(z),ee=k("m3rI"),P=k("Oy/b"),O=k("p5ED"),S=/<pre[^>]*>/g;function c(m){var w=document.createElement("div");return w.innerHTML=m,w.childNodes.length===0?"":w.childNodes[0].nodeValue}var s=Je.a=function(m){var w,R=m.value,ue=R===void 0?"":R,ye=m.className,ne=m.showTextOnly,be=m.showLines,ce=m.style,Q=ce===void 0?{}:ce,W=m.stylesPrev,re=W===void 0?{}:W,p=(w=String(ue))===null||w===void 0?void 0:w.replace(/<script.*?>|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),_=Object(se.useState)(""),g=Object(ge.a)(_,2),N=g[0],te=g[1],B=Object(se.useMemo)(function(){try{var Le=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,we=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Re=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;p=p.replace(Le,"("+ee.a.API_SERVER+"/api/attachments/").replace(we,'"'+ee.a.API_SERVER+"/api/attachments/").replace(Re,'"'+ee.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
|
|
`),p=p.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(Ze){}var Ve=b(p),Xe=ke();if(p.match(/\[TOC\]/)&&(Ve=Ve.replace("<p>[TOC]</p>",I()),le()),Ve=Ve.replace(/(__special_katext_id_\d+__)/g,function(Ze,ct){var rt=Xe[ct],Ye=rt.type,ve=rt.expression;return Object(P.renderToString)(c(ve)||"",{displayMode:Ye==="block",throwOnError:!1,output:"html"})}),Ve=Ve.replace(/▁/g,"\u2581\u2581\u2581"),je(),ne){var Ke=document.createElement("div");return Ke.innerHTML=Ve,Ke.innerText}return setTimeout(function(){return Ie()},500),Ve},[p]),ie=Object(se.useRef)();G.WebkitLineClamp=be,be&&(Q=Object(F.a)(Object(F.a)({},Q),G));function Te(Le){var we=Le.target;if(we.tagName.toUpperCase()==="A"){var Re=we.getAttribute("href");if(Re.indexOf("office")>-1)Le.preventDefault(),te(Re);else if(Re.startsWith("#")){Le.preventDefault();var Ve=document.getElementById(Re.replace("#",""));Ve&&Ve.scrollIntoView(!0)}}}var Ie=function(){var we,Re=(we=ie.current)===null||we===void 0?void 0:we.querySelectorAll("video");Re==null||Re.forEach(function(Ve){if(Ve.oncontextmenu=function(){return!1},Ve.src.indexOf(".m3u8")>-1&&!Ve.canPlayType("application/vnd.apple.mpegurl")){if(x.a.isSupported()){var Xe=new x.a;Xe.loadSource(Ve.src),Xe.attachMedia(Ve)}}})};return Object(se.useEffect)(function(){if(ie.current&&B&&(B.match(S)&&window.PR.prettyPrint()),ie.current)return ie.current.addEventListener("click",Te),function(){ie.current.removeEventListener("click",Te),je(),le()}},[B,ie.current,Te]),Ae.a.createElement(Ae.a.Fragment,null,Ae.a.createElement("div",{ref:ie,style:Object(F.a)({},Q),className:"".concat(ye||""," markdown-body "),dangerouslySetInnerHTML:{__html:B}}),Ae.a.createElement(O.a,{close:!0,data:N,type:N!=null&&N.length?"office":"",style:Object(F.a)({},re),onClose:function(){return te("")}}))}},"9VGf":function(ht,Je,k){"use strict";k.d(Je,"a",function(){return se});var F=k("q1tI"),ge=k.n(F);function se(Ae,Ee){var X=Object(F.useRef)();Object(F.useEffect)(function(){X.current=Ae}),Object(F.useEffect)(function(){function D(){X.current()}if(Ee!==null){var L=setInterval(D,Ee);return function(){return clearInterval(L)}}},[Ee])}},"9ivq":function(ht,Je,k){},Bd2K:function(ht,Je,k){(function(F){F(k("VrN/"),k("osHv"))})(function(F){F.defineOption("autoCloseTags",!1,function(T,H,K){if(K!=F.Init&&K&&T.removeKeyMap("autoCloseTags"),!H)return;var q={name:"autoCloseTags"};(typeof H!="object"||H.whenClosing!==!1)&&(q["'/'"]=function(Ce){return X(Ce)}),(typeof H!="object"||H.whenOpening!==!1)&&(q["'>'"]=function(Ce){return Ae(Ce)}),T.addKeyMap(q)});var ge=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],se=["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 Ae(T){if(T.getOption("disableInput"))return F.Pass;for(var H=T.listSelections(),K=[],q=T.getOption("autoCloseTags"),Ce=0;Ce<H.length;Ce++){if(!H[Ce].empty())return F.Pass;var le=H[Ce].head,G=T.getTokenAt(le),j=F.innerMode(T.getMode(),G.state),I=j.state,oe=j.mode.xmlCurrentTag&&j.mode.xmlCurrentTag(I),ae=oe&&oe.name;if(!ae)return F.Pass;var _e=j.mode.configuration=="html",He=typeof q=="object"&&q.dontCloseTags||_e&&ge,pe=typeof q=="object"&&q.indentTags||_e&&se;G.end>le.ch&&(ae=ae.slice(0,ae.length-G.end+le.ch));var ke=ae.toLowerCase();if(!ae||G.type=="string"&&(G.end!=le.ch||!/[\"\']/.test(G.string.charAt(G.string.length-1))||G.string.length==1)||G.type=="tag"&&oe.close||G.string.indexOf("/")==le.ch-G.start-1||He&&D(He,ke)>-1||L(T,j.mode.xmlCurrentContext&&j.mode.xmlCurrentContext(I)||[],ae,le,!0))return F.Pass;var je=typeof q=="object"&&q.emptyTags;if(je&&D(je,ae)>-1){K[Ce]={text:"/>",newPos:F.Pos(le.line,le.ch+2)};continue}var me=pe&&D(pe,ke)>-1;K[Ce]={indent:me,text:">"+(me?`
|
|
|
|
`:"")+"</"+ae+">",newPos:me?F.Pos(le.line+1,0):F.Pos(le.line,le.ch+1)}}for(var he=typeof q=="object"&&q.dontIndentOnAutoClose,Ce=H.length-1;Ce>=0;Ce--){var Oe=K[Ce];T.replaceRange(Oe.text,H[Ce].head,H[Ce].anchor,"+insert");var V=T.listSelections().slice(0);V[Ce]={head:Oe.newPos,anchor:Oe.newPos},T.setSelections(V),!he&&Oe.indent&&(T.indentLine(Oe.newPos.line,null,!0),T.indentLine(Oe.newPos.line+1,null,!0))}}function Ee(T,H){for(var K=T.listSelections(),q=[],Ce=H?"/":"</",le=T.getOption("autoCloseTags"),G=typeof le=="object"&&le.dontIndentOnSlash,j=0;j<K.length;j++){if(!K[j].empty())return F.Pass;var I=K[j].head,oe=T.getTokenAt(I),ae=F.innerMode(T.getMode(),oe.state),_e=ae.state;if(H&&(oe.type=="string"||oe.string.charAt(0)!="<"||oe.start!=I.ch-1))return F.Pass;var He,pe=ae.mode.name!="xml"&&T.getMode().name=="htmlmixed";if(pe&&ae.mode.name=="javascript")He=Ce+"script";else if(pe&&ae.mode.name=="css")He=Ce+"style";else{var ke=ae.mode.xmlCurrentContext&&ae.mode.xmlCurrentContext(_e);if(!ke||ke.length&&L(T,ke,ke[ke.length-1],I))return F.Pass;He=Ce+ke[ke.length-1]}T.getLine(I.line).charAt(oe.end)!=">"&&(He+=">"),q[j]=He}if(T.replaceSelections(q),K=T.listSelections(),!G)for(var j=0;j<K.length;j++)(j==K.length-1||K[j].head.line<K[j+1].head.line)&&T.indentLine(K[j].head.line)}function X(T){return T.getOption("disableInput")?F.Pass:Ee(T,!0)}F.commands.closeTag=function(T){return Ee(T)};function D(T,H){if(T.indexOf)return T.indexOf(H);for(var K=0,q=T.length;K<q;++K)if(T[K]==H)return K;return-1}function L(T,H,K,q,Ce){if(!F.scanForClosingTag)return!1;var le=Math.min(T.lastLine()+1,q.line+500),G=F.scanForClosingTag(T,q,null,le);if(!G||G.tag!=K)return!1;for(var j=Ce?1:0,I=H.length-1;I>=0&&H[I]==K;I--)++j;q=G.to;for(var I=1;I<j;I++){var oe=F.scanForClosingTag(T,q,null,le);if(!oe||oe.tag!=K)return!1;q=oe.to}return!0}})},BjJ7:function(ht,Je,k){"use strict";k.d(Je,"d",function(){return ge}),k.d(Je,"c",function(){return se}),k.d(Je,"e",function(){return Ae}),k.d(Je,"b",function(){return Ee}),k.d(Je,"a",function(){return D});var F=k("m3rI");function ge(L){var T=!0;if(L.length>0){for(var H=0;H<L.length;H++)if(L[H].compile_success==0||!L[H].compile_success){T=!1;break}}else T=!1;return T}function se(L){for(var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",H=[],K=0;K<L.length;K++){var q=L[K],Ce=T?"".concat(T,"/").concat(q.name):"".concat(q.name);H.push({title:q.name,isLeaf:!(q.type==="tree"),key:Ce})}return H}function Ae(L,T,H){for(var K=0;K<L.length;K++){var q=L[K];if(q.key===T){q.children=H;break}q.children&&Ae(q.children,T,H)}return L}function Ee(L,T,H){var K;return function(){var q=this,Ce=arguments,le=function(){K=null,H||L.apply(q,Ce)},G=H&&!K;clearTimeout(K),K=setTimeout(le,T),G&&L.apply(q,Ce)}}var X=!0,D=F.a.API_SERVER},"C+DQ":function(ht,Je,k){},DlQD:function(ht,Je,k){(function(F,ge){ht.exports=ge()})(this,function(){"use strict";function F(U,M){for(var E=0;E<M.length;E++){var f=M[E];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(U,f.key,f)}}function ge(U,M,E){return M&&F(U.prototype,M),E&&F(U,E),U}function se(U,M){if(!U)return;if(typeof U=="string")return Ae(U,M);var E=Object.prototype.toString.call(U).slice(8,-1);if(E==="Object"&&U.constructor&&(E=U.constructor.name),E==="Map"||E==="Set")return Array.from(U);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return Ae(U,M)}function Ae(U,M){(M==null||M>U.length)&&(M=U.length);for(var E=0,f=new Array(M);E<M;E++)f[E]=U[E];return f}function Ee(U,M){var E;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(E=se(U))||M&&U&&typeof U.length=="number"){E&&(U=E);var f=0;return function(){return f>=U.length?{done:!0}:{done:!1,value:U[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 E=U[Symbol.iterator](),E.next.bind(E)}function X(U,M){return M={exports:{}},U(M,M.exports),M.exports}var D=X(function(U){function M(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function E(f){U.exports.defaults=f}U.exports={defaults:M(),getDefaults:M,changeDefaults:E}}),L=D.defaults,T=D.getDefaults,H=D.changeDefaults,K=/[&<>"']/,q=/[&<>"']/g,Ce=/[<>"']|&(?!#?\w+;)/,le=/[<>"']|&(?!#?\w+;)/g,G={"&":"&","<":"<",">":">",'"':""","'":"'"},j=function(M){return G[M]};function I(U,M){if(M){if(K.test(U))return U.replace(q,j)}else if(Ce.test(U))return U.replace(le,j);return U}var oe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ae(U){return U.replace(oe,function(M,E){return E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""})}var _e=/(^|[^\[])\^/g;function He(U,M){U=U.source||U,M=M||"";var E={replace:function(h,v){return v=v.source||v,v=v.replace(_e,"$1"),U=U.replace(h,v),E},getRegex:function(){return new RegExp(U,M)}};return E}var pe=/[^\w:]/g,ke=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function je(U,M,E){if(U){var f;try{f=decodeURIComponent(ae(E)).replace(pe,"").toLowerCase()}catch(h){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}M&&!ke.test(E)&&(E=b(M,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(h){return null}return E}var me={},he=/^[^:]+:\/*[^/]*$/,Oe=/^([^:]+:)[\s\S]*$/,V=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(U,M){me[" "+U]||(he.test(U)?me[" "+U]=U+"/":me[" "+U]=ee(U,"/",!0)),U=me[" "+U];var E=U.indexOf(":")===-1;return M.substring(0,2)==="//"?E?M:U.replace(Oe,"$1")+M:M.charAt(0)==="/"?E?M:U.replace(V,"$1")+M:U+M}var J={exec:function(){}};function z(U){for(var M=1,E,f;M<arguments.length;M++){E=arguments[M];for(f in E)Object.prototype.hasOwnProperty.call(E,f)&&(U[f]=E[f])}return U}function x(U,M){var E=U.replace(/\|/g,function(v,y,Y){for(var de=!1,Me=y;--Me>=0&&Y[Me]==="\\";)de=!de;return de?"|":" |"}),f=E.split(/ \|/),h=0;if(f.length>M)f.splice(M);else for(;f.length<M;)f.push("");for(;h<f.length;h++)f[h]=f[h].trim().replace(/\\\|/g,"|");return f}function ee(U,M,E){var f=U.length;if(f===0)return"";for(var h=0;h<f;){var v=U.charAt(f-h-1);if(v===M&&!E)h++;else if(v!==M&&E)h++;else break}return U.substr(0,f-h)}function P(U,M){if(U.indexOf(M[1])===-1)return-1;for(var E=U.length,f=0,h=0;h<E;h++)if(U[h]==="\\")h++;else if(U[h]===M[0])f++;else if(U[h]===M[1]&&(f--,f<0))return h;return-1}function O(U){U&&U.sanitize&&!U.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var S={escape:I,unescape:ae,edit:He,cleanUrl:je,resolveUrl:b,noopTest:J,merge:z,splitCells:x,rtrim:ee,findClosingBracket:P,checkSanitizeDeprecation:O},c=D.defaults,s=S.rtrim,m=S.splitCells,w=S.escape,R=S.findClosingBracket;function ue(U,M,E){var f=M.href,h=M.title?w(M.title):null,v=U[1].replace(/\\([\[\]])/g,"$1");return U[0].charAt(0)!=="!"?{type:"link",raw:E,href:f,title:h,text:v}:{type:"image",raw:E,href:f,title:h,text:w(v)}}function ye(U,M){var E=U.match(/^(\s+)(?:```)/);if(E===null)return M;var f=E[1];return M.split(`
|
|
`).map(function(h){var v=h.match(/^\s+/);if(v===null)return h;var y=v[0];return y.length>=f.length?h.slice(f.length):h}).join(`
|
|
`)}var ne=function(){function U(E){this.options=E||c}var M=U.prototype;return M.space=function(f){var h=this.rules.block.newline.exec(f);if(h)return h[0].length>1?{type:"space",raw:h[0]}:{raw:`
|
|
`}},M.code=function(f,h){var v=this.rules.block.code.exec(f);if(v){var y=h[h.length-1];if(y&&y.type==="paragraph")return{raw:v[0],text:v[0].trimRight()};var Y=v[0].replace(/^ {4}/gm,"");return{type:"code",raw:v[0],codeBlockStyle:"indented",text:this.options.pedantic?Y:s(Y,`
|
|
`)}}},M.fences=function(f){var h=this.rules.block.fences.exec(f);if(h){var v=h[0],y=ye(v,h[3]||"");return{type:"code",raw:v,lang:h[2]?h[2].trim():h[2],text:y}}},M.heading=function(f){var h=this.rules.block.heading.exec(f);if(h)return{type:"heading",raw:h[0],depth:h[1].length,text:h[2]}},M.nptable=function(f){var h=this.rules.block.nptable.exec(f);if(h){var v={type:"table",header:m(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(`
|
|
`):[],raw:h[0]};if(v.header.length===v.align.length){var y=v.align.length,Y;for(Y=0;Y<y;Y++)/^ *-+: *$/.test(v.align[Y])?v.align[Y]="right":/^ *:-+: *$/.test(v.align[Y])?v.align[Y]="center":/^ *:-+ *$/.test(v.align[Y])?v.align[Y]="left":v.align[Y]=null;for(y=v.cells.length,Y=0;Y<y;Y++)v.cells[Y]=m(v.cells[Y],v.header.length);return v}}},M.hr=function(f){var h=this.rules.block.hr.exec(f);if(h)return{type:"hr",raw:h[0]}},M.blockquote=function(f){var h=this.rules.block.blockquote.exec(f);if(h){var v=h[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:h[0],text:v}}},M.list=function(f){var h=this.rules.block.list.exec(f);if(h){for(var v=h[0],y=h[2],Y=y.length>1,de=y[y.length-1]===")",Me={type:"list",raw:v,ordered:Y,start:Y?+y.slice(0,-1):"",loose:!1,items:[]},Ge=h[0].match(this.rules.block.item),$e=!1,ze,vt,bt,lt,Dt,Ct,Et,Tt=Ge.length,yt=0;yt<Tt;yt++)ze=Ge[yt],v=ze,vt=ze.length,ze=ze.replace(/^ *([*+-]|\d+[.)]) */,""),~ze.indexOf(`
|
|
`)&&(vt-=ze.length,ze=this.options.pedantic?ze.replace(/^ {1,4}/gm,""):ze.replace(new RegExp("^ {1,"+vt+"}","gm"),"")),yt!==Tt-1&&(bt=this.rules.block.bullet.exec(Ge[yt+1])[0],(Y?bt.length===1||!de&&bt[bt.length-1]===")":bt.length>1||this.options.smartLists&&bt!==y)&&(lt=Ge.slice(yt+1).join(`
|
|
`),Me.raw=Me.raw.substring(0,Me.raw.length-lt.length),yt=Tt-1)),Dt=$e||/\n\n(?!\s*$)/.test(ze),yt!==Tt-1&&($e=ze.charAt(ze.length-1)===`
|
|
`,Dt||(Dt=$e)),Dt&&(Me.loose=!0),Ct=/^\[[ xX]\] /.test(ze),Et=void 0,Ct&&(Et=ze[1]!==" ",ze=ze.replace(/^\[[ xX]\] +/,"")),Me.items.push({type:"list_item",raw:v,task:Ct,checked:Et,loose:Dt,text:ze});return Me}},M.html=function(f){var h=this.rules.block.html.exec(f);if(h)return{type:this.options.sanitize?"paragraph":"html",raw:h[0],pre:!this.options.sanitizer&&(h[1]==="pre"||h[1]==="script"||h[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(h[0]):w(h[0]):h[0]}},M.def=function(f){var h=this.rules.block.def.exec(f);if(h){h[3]&&(h[3]=h[3].substring(1,h[3].length-1));var v=h[1].toLowerCase().replace(/\s+/g," ");return{tag:v,raw:h[0],href:h[2],title:h[3]}}},M.table=function(f){var h=this.rules.block.table.exec(f);if(h){var v={type:"table",header:m(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(`
|
|
`):[]};if(v.header.length===v.align.length){v.raw=h[0];var y=v.align.length,Y;for(Y=0;Y<y;Y++)/^ *-+: *$/.test(v.align[Y])?v.align[Y]="right":/^ *:-+: *$/.test(v.align[Y])?v.align[Y]="center":/^ *:-+ *$/.test(v.align[Y])?v.align[Y]="left":v.align[Y]=null;for(y=v.cells.length,Y=0;Y<y;Y++)v.cells[Y]=m(v.cells[Y].replace(/^ *\| *| *\| *$/g,""),v.header.length);return v}}},M.lheading=function(f){var h=this.rules.block.lheading.exec(f);if(h)return{type:"heading",raw:h[0],depth:h[2].charAt(0)==="="?1:2,text:h[1]}},M.paragraph=function(f){var h=this.rules.block.paragraph.exec(f);if(h)return{type:"paragraph",raw:h[0],text:h[1].charAt(h[1].length-1)===`
|
|
`?h[1].slice(0,-1):h[1]}},M.text=function(f,h){var v=this.rules.block.text.exec(f);if(v){var y=h[h.length-1];return y&&y.type==="text"?{raw:v[0],text:v[0]}:{type:"text",raw:v[0],text:v[0]}}},M.escape=function(f){var h=this.rules.inline.escape.exec(f);if(h)return{type:"escape",raw:h[0],text:w(h[1])}},M.tag=function(f,h,v){var y=this.rules.inline.tag.exec(f);if(y)return!h&&/^<a /i.test(y[0])?h=!0:h&&/^<\/a>/i.test(y[0])&&(h=!1),!v&&/^<(pre|code|kbd|script)(\s|>)/i.test(y[0])?v=!0:v&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(y[0])&&(v=!1),{type:this.options.sanitize?"text":"html",raw:y[0],inLink:h,inRawBlock:v,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(y[0]):w(y[0]):y[0]}},M.link=function(f){var h=this.rules.inline.link.exec(f);if(h){var v=R(h[2],"()");if(v>-1){var y=h[0].indexOf("!")===0?5:4,Y=y+h[1].length+v;h[2]=h[2].substring(0,v),h[0]=h[0].substring(0,Y).trim(),h[3]=""}var de=h[2],Me="";if(this.options.pedantic){var Ge=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(de);Ge?(de=Ge[1],Me=Ge[3]):Me=""}else Me=h[3]?h[3].slice(1,-1):"";de=de.trim().replace(/^<([\s\S]*)>$/,"$1");var $e=ue(h,{href:de&&de.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},h[0]);return $e}},M.reflink=function(f,h){var v;if((v=this.rules.inline.reflink.exec(f))||(v=this.rules.inline.nolink.exec(f))){var y=(v[2]||v[1]).replace(/\s+/g," ");if(y=h[y.toLowerCase()],!y||!y.href){var Y=v[0].charAt(0);return{type:"text",raw:Y,text:Y}}var de=ue(v,y,v[0]);return de}},M.strong=function(f,h,v){v===void 0&&(v="");var y=this.rules.inline.strong.start.exec(f);if(y&&(!y[1]||y[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){h=h.slice(-1*f.length);var Y=y[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Y.lastIndex=0;for(var de;(y=Y.exec(h))!=null;)if(de=this.rules.inline.strong.middle.exec(h.slice(0,y.index+3)),de)return{type:"strong",raw:f.slice(0,de[0].length),text:f.slice(2,de[0].length-2)}}},M.em=function(f,h,v){v===void 0&&(v="");var y=this.rules.inline.em.start.exec(f);if(y&&(!y[1]||y[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){h=h.slice(-1*f.length);var Y=y[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Y.lastIndex=0;for(var de;(y=Y.exec(h))!=null;)if(de=this.rules.inline.em.middle.exec(h.slice(0,y.index+2)),de)return{type:"em",raw:f.slice(0,de[0].length),text:f.slice(1,de[0].length-1)}}},M.codespan=function(f){var h=this.rules.inline.code.exec(f);if(h){var v=h[2].replace(/\n/g," "),y=/[^ ]/.test(v),Y=v.startsWith(" ")&&v.endsWith(" ");return y&&Y&&(v=v.substring(1,v.length-1)),v=w(v,!0),{type:"codespan",raw:h[0],text:v}}},M.br=function(f){var h=this.rules.inline.br.exec(f);if(h)return{type:"br",raw:h[0]}},M.del=function(f){var h=this.rules.inline.del.exec(f);if(h)return{type:"del",raw:h[0],text:h[1]}},M.autolink=function(f,h){var v=this.rules.inline.autolink.exec(f);if(v){var y,Y;return v[2]==="@"?(y=w(this.options.mangle?h(v[1]):v[1]),Y="mailto:"+y):(y=w(v[1]),Y=y),{type:"link",raw:v[0],text:y,href:Y,tokens:[{type:"text",raw:y,text:y}]}}},M.url=function(f,h){var v;if(v=this.rules.inline.url.exec(f)){var y,Y;if(v[2]==="@")y=w(this.options.mangle?h(v[0]):v[0]),Y="mailto:"+y;else{var de;do de=v[0],v[0]=this.rules.inline._backpedal.exec(v[0])[0];while(de!==v[0]);y=w(v[0]),v[1]==="www."?Y="http://"+y:Y=y}return{type:"link",raw:v[0],text:y,href:Y,tokens:[{type:"text",raw:y,text:y}]}}},M.inlineText=function(f,h,v){var y=this.rules.inline.text.exec(f);if(y){var Y;return h?Y=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(y[0]):w(y[0]):y[0]:Y=w(this.options.smartypants?v(y[0]):y[0]),{type:"text",raw:y[0],text:Y}}},U}(),be=S.noopTest,ce=S.edit,Q=S.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:be,table:be,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=ce(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=ce(W.item,"gm").replace(/bull/g,W.bullet).getRegex(),W.list=ce(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=ce(W.html,"i").replace("comment",W._comment).replace("tag",W._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W.paragraph=ce(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=ce(W.blockquote).replace("paragraph",W.paragraph).getRegex(),W.normal=Q({},W),W.gfm=Q({},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=ce(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=ce(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=Q({},W.normal,{html:ce(`^ *(?: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:be,paragraph:ce(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 re={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:be,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:be,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};re._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",re.punctuation=ce(re.punctuation).replace(/punctuation/g,re._punctuation).getRegex(),re._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",re._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",re.em.start=ce(re.em.start).replace(/punctuation/g,re._punctuation).getRegex(),re.em.middle=ce(re.em.middle).replace(/punctuation/g,re._punctuation).replace(/overlapSkip/g,re._overlapSkip).getRegex(),re.em.endAst=ce(re.em.endAst,"g").replace(/punctuation/g,re._punctuation).getRegex(),re.em.endUnd=ce(re.em.endUnd,"g").replace(/punctuation/g,re._punctuation).getRegex(),re.strong.start=ce(re.strong.start).replace(/punctuation/g,re._punctuation).getRegex(),re.strong.middle=ce(re.strong.middle).replace(/punctuation/g,re._punctuation).replace(/blockSkip/g,re._blockSkip).getRegex(),re.strong.endAst=ce(re.strong.endAst,"g").replace(/punctuation/g,re._punctuation).getRegex(),re.strong.endUnd=ce(re.strong.endUnd,"g").replace(/punctuation/g,re._punctuation).getRegex(),re.blockSkip=ce(re._blockSkip,"g").getRegex(),re.overlapSkip=ce(re._overlapSkip,"g").getRegex(),re._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,re._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,re._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])?)+(?![-_])/,re.autolink=ce(re.autolink).replace("scheme",re._scheme).replace("email",re._email).getRegex(),re._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,re.tag=ce(re.tag).replace("comment",W._comment).replace("attribute",re._attribute).getRegex(),re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,re._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,re.link=ce(re.link).replace("label",re._label).replace("href",re._href).replace("title",re._title).getRegex(),re.reflink=ce(re.reflink).replace("label",re._label).getRegex(),re.reflinkSearch=ce(re.reflinkSearch,"g").replace("reflink",re.reflink).replace("nolink",re.nolink).getRegex(),re.normal=Q({},re),re.pedantic=Q({},re.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:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",re._label).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",re._label).getRegex()}),re.gfm=Q({},re.normal,{escape:ce(re.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),re.gfm.url=ce(re.gfm.url,"i").replace("email",re.gfm._extended_email).getRegex(),re.breaks=Q({},re.gfm,{br:ce(re.br).replace("{2,}","*").getRegex(),text:ce(re.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var p={block:W,inline:re},_=D.defaults,g=p.block,N=p.inline;function te(U){return U.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 B(U){var M="",E,f,h=U.length;for(E=0;E<h;E++)f=U.charCodeAt(E),Math.random()>.5&&(f="x"+f.toString(16)),M+="&#"+f+";";return M}var ie=function(){function U(E){this.tokens=[],this.tokens.links=Object.create(null),this.options=E||_,this.options.tokenizer=this.options.tokenizer||new ne,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:g.normal,inline:N.normal};this.options.pedantic?(f.block=g.pedantic,f.inline=N.pedantic):this.options.gfm&&(f.block=g.gfm,this.options.breaks?f.inline=N.breaks:f.inline=N.gfm),this.tokenizer.rules=f}U.lex=function(f,h){var v=new U(h);return v.lex(f)};var M=U.prototype;return M.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},M.blockTokens=function(f,h,v){h===void 0&&(h=[]),v===void 0&&(v=!0),f=f.replace(/^ +$/gm,"");for(var y,Y,de,Me;f;){if(y=this.tokenizer.space(f)){f=f.substring(y.raw.length),y.type&&h.push(y);continue}if(y=this.tokenizer.code(f,h)){f=f.substring(y.raw.length),y.type?h.push(y):(Me=h[h.length-1],Me.raw+=`
|
|
`+y.raw,Me.text+=`
|
|
`+y.text);continue}if(y=this.tokenizer.fences(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.heading(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.nptable(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.hr(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.blockquote(f)){f=f.substring(y.raw.length),y.tokens=this.blockTokens(y.text,[],v),h.push(y);continue}if(y=this.tokenizer.list(f)){for(f=f.substring(y.raw.length),de=y.items.length,Y=0;Y<de;Y++)y.items[Y].tokens=this.blockTokens(y.items[Y].text,[],!1);h.push(y);continue}if(y=this.tokenizer.html(f)){f=f.substring(y.raw.length),h.push(y);continue}if(v&&(y=this.tokenizer.def(f))){f=f.substring(y.raw.length),this.tokens.links[y.tag]||(this.tokens.links[y.tag]={href:y.href,title:y.title});continue}if(y=this.tokenizer.table(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.lheading(f)){f=f.substring(y.raw.length),h.push(y);continue}if(v&&(y=this.tokenizer.paragraph(f))){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.text(f,h)){f=f.substring(y.raw.length),y.type?h.push(y):(Me=h[h.length-1],Me.raw+=`
|
|
`+y.raw,Me.text+=`
|
|
`+y.text);continue}if(f){var Ge="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Ge);break}else throw new Error(Ge)}}return h},M.inline=function(f){var h,v,y,Y,de,Me,Ge=f.length;for(h=0;h<Ge;h++){Me=f[h];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:[]},Y=Me.header.length,v=0;v<Y;v++)Me.tokens.header[v]=[],this.inlineTokens(Me.header[v],Me.tokens.header[v]);for(Y=Me.cells.length,v=0;v<Y;v++)for(de=Me.cells[v],Me.tokens.cells[v]=[],y=0;y<de.length;y++)Me.tokens.cells[v][y]=[],this.inlineTokens(de[y],Me.tokens.cells[v][y]);break}case"blockquote":{this.inline(Me.tokens);break}case"list":{for(Y=Me.items.length,v=0;v<Y;v++)this.inline(Me.items[v].tokens);break}}}return f},M.inlineTokens=function(f,h,v,y,Y){h===void 0&&(h=[]),v===void 0&&(v=!1),y===void 0&&(y=!1),Y===void 0&&(Y="");var de,Me=f,Ge;if(this.tokens.links){var $e=Object.keys(this.tokens.links);if($e.length>0)for(;(Ge=this.tokenizer.rules.inline.reflinkSearch.exec(Me))!=null;)$e.includes(Ge[0].slice(Ge[0].lastIndexOf("[")+1,-1))&&(Me=Me.slice(0,Ge.index)+"["+"a".repeat(Ge[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ge=this.tokenizer.rules.inline.blockSkip.exec(Me))!=null;)Me=Me.slice(0,Ge.index)+"["+"a".repeat(Ge[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(de=this.tokenizer.escape(f)){f=f.substring(de.raw.length),h.push(de);continue}if(de=this.tokenizer.tag(f,v,y)){f=f.substring(de.raw.length),v=de.inLink,y=de.inRawBlock,h.push(de);continue}if(de=this.tokenizer.link(f)){f=f.substring(de.raw.length),de.type==="link"&&(de.tokens=this.inlineTokens(de.text,[],!0,y)),h.push(de);continue}if(de=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(de.raw.length),de.type==="link"&&(de.tokens=this.inlineTokens(de.text,[],!0,y)),h.push(de);continue}if(de=this.tokenizer.strong(f,Me,Y)){f=f.substring(de.raw.length),de.tokens=this.inlineTokens(de.text,[],v,y),h.push(de);continue}if(de=this.tokenizer.em(f,Me,Y)){f=f.substring(de.raw.length),de.tokens=this.inlineTokens(de.text,[],v,y),h.push(de);continue}if(de=this.tokenizer.codespan(f)){f=f.substring(de.raw.length),h.push(de);continue}if(de=this.tokenizer.br(f)){f=f.substring(de.raw.length),h.push(de);continue}if(de=this.tokenizer.del(f)){f=f.substring(de.raw.length),de.tokens=this.inlineTokens(de.text,[],v,y),h.push(de);continue}if(de=this.tokenizer.autolink(f,B)){f=f.substring(de.raw.length),h.push(de);continue}if(!v&&(de=this.tokenizer.url(f,B))){f=f.substring(de.raw.length),h.push(de);continue}if(de=this.tokenizer.inlineText(f,y,te)){f=f.substring(de.raw.length),Y=de.raw.slice(-1),h.push(de);continue}if(f){var ze="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(ze);break}else throw new Error(ze)}}return h},ge(U,null,[{key:"rules",get:function(){return{block:g,inline:N}}}]),U}(),Te=D.defaults,Ie=S.cleanUrl,Le=S.escape,we=function(){function U(E){this.options=E||Te}var M=U.prototype;return M.code=function(f,h,v){var y=(h||"").match(/\S*/)[0];if(this.options.highlight){var Y=this.options.highlight(f,y);Y!=null&&Y!==f&&(v=!0,f=Y)}return y?'<pre><code class="'+this.options.langPrefix+Le(y,!0)+'">'+(v?f:Le(f,!0))+`</code></pre>
|
|
`:"<pre><code>"+(v?f:Le(f,!0))+`</code></pre>
|
|
`},M.blockquote=function(f){return`<blockquote>
|
|
`+f+`</blockquote>
|
|
`},M.html=function(f){return f},M.heading=function(f,h,v,y){return this.options.headerIds?"<h"+h+' id="'+this.options.headerPrefix+y.slug(v)+'">'+f+"</h"+h+`>
|
|
`:"<h"+h+">"+f+"</h"+h+`>
|
|
`},M.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},M.list=function(f,h,v){var y=h?"ol":"ul",Y=h&&v!==1?' start="'+v+'"':"";return"<"+y+Y+`>
|
|
`+f+"</"+y+`>
|
|
`},M.listitem=function(f){return"<li>"+f+`</li>
|
|
`},M.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},M.paragraph=function(f){return"<p>"+f+`</p>
|
|
`},M.table=function(f,h){return h&&(h="<tbody>"+h+"</tbody>"),`<table>
|
|
<thead>
|
|
`+f+`</thead>
|
|
`+h+`</table>
|
|
`},M.tablerow=function(f){return`<tr>
|
|
`+f+`</tr>
|
|
`},M.tablecell=function(f,h){var v=h.header?"th":"td",y=h.align?"<"+v+' align="'+h.align+'">':"<"+v+">";return y+f+"</"+v+`>
|
|
`},M.strong=function(f){return"<strong>"+f+"</strong>"},M.em=function(f){return"<em>"+f+"</em>"},M.codespan=function(f){return"<code>"+f+"</code>"},M.br=function(){return this.options.xhtml?"<br/>":"<br>"},M.del=function(f){return"<del>"+f+"</del>"},M.link=function(f,h,v){if(f=Ie(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var y='<a href="'+Le(f)+'"';return h&&(y+=' title="'+h+'"'),y+=">"+v+"</a>",y},M.image=function(f,h,v){if(f=Ie(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var y='<img src="'+f+'" alt="'+v+'"';return h&&(y+=' title="'+h+'"'),y+=this.options.xhtml?"/>":">",y},M.text=function(f){return f},U}(),Re=function(){function U(){}var M=U.prototype;return M.strong=function(f){return f},M.em=function(f){return f},M.codespan=function(f){return f},M.del=function(f){return f},M.html=function(f){return f},M.text=function(f){return f},M.link=function(f,h,v){return""+v},M.image=function(f,h,v){return""+v},M.br=function(){return""},U}(),Ve=function(){function U(){this.seen={}}var M=U.prototype;return M.slug=function(f){var h=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(h)){var v=h;do this.seen[v]++,h=v+"-"+this.seen[v];while(this.seen.hasOwnProperty(h))}return this.seen[h]=0,h},U}(),Xe=D.defaults,Ke=S.unescape,Ze=function(){function U(E){this.options=E||Xe,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Re,this.slugger=new Ve}U.parse=function(f,h){var v=new U(h);return v.parse(f)};var M=U.prototype;return M.parse=function(f,h){h===void 0&&(h=!0);var v="",y,Y,de,Me,Ge,$e,ze,vt,bt,lt,Dt,Ct,Et,Tt,yt,Gt,Cn,sn,kn=f.length;for(y=0;y<kn;y++){lt=f[y];switch(lt.type){case"space":continue;case"hr":{v+=this.renderer.hr();continue}case"heading":{v+=this.renderer.heading(this.parseInline(lt.tokens),lt.depth,Ke(this.parseInline(lt.tokens,this.textRenderer)),this.slugger);continue}case"code":{v+=this.renderer.code(lt.text,lt.lang,lt.escaped);continue}case"table":{for(vt="",ze="",Me=lt.header.length,Y=0;Y<Me;Y++)ze+=this.renderer.tablecell(this.parseInline(lt.tokens.header[Y]),{header:!0,align:lt.align[Y]});for(vt+=this.renderer.tablerow(ze),bt="",Me=lt.cells.length,Y=0;Y<Me;Y++){for($e=lt.tokens.cells[Y],ze="",Ge=$e.length,de=0;de<Ge;de++)ze+=this.renderer.tablecell(this.parseInline($e[de]),{header:!1,align:lt.align[de]});bt+=this.renderer.tablerow(ze)}v+=this.renderer.table(vt,bt);continue}case"blockquote":{bt=this.parse(lt.tokens),v+=this.renderer.blockquote(bt);continue}case"list":{for(Dt=lt.ordered,Ct=lt.start,Et=lt.loose,Me=lt.items.length,bt="",Y=0;Y<Me;Y++)yt=lt.items[Y],Gt=yt.checked,Cn=yt.task,Tt="",yt.task&&(sn=this.renderer.checkbox(Gt),Et?yt.tokens.length>0&&yt.tokens[0].type==="text"?(yt.tokens[0].text=sn+" "+yt.tokens[0].text,yt.tokens[0].tokens&&yt.tokens[0].tokens.length>0&&yt.tokens[0].tokens[0].type==="text"&&(yt.tokens[0].tokens[0].text=sn+" "+yt.tokens[0].tokens[0].text)):yt.tokens.unshift({type:"text",text:sn}):Tt+=sn),Tt+=this.parse(yt.tokens,Et),bt+=this.renderer.listitem(Tt,Cn,Gt);v+=this.renderer.list(bt,Dt,Ct);continue}case"html":{v+=this.renderer.html(lt.text);continue}case"paragraph":{v+=this.renderer.paragraph(this.parseInline(lt.tokens));continue}case"text":{for(bt=lt.tokens?this.parseInline(lt.tokens):lt.text;y+1<kn&&f[y+1].type==="text";)lt=f[++y],bt+=`
|
|
`+(lt.tokens?this.parseInline(lt.tokens):lt.text);v+=h?this.renderer.paragraph(bt):bt;continue}default:{var nn='Token with "'+lt.type+'" type was not found.';if(this.options.silent){console.error(nn);return}else throw new Error(nn)}}}return v},M.parseInline=function(f,h){h=h||this.renderer;var v="",y,Y,de=f.length;for(y=0;y<de;y++){Y=f[y];switch(Y.type){case"escape":{v+=h.text(Y.text);break}case"html":{v+=h.html(Y.text);break}case"link":{v+=h.link(Y.href,Y.title,this.parseInline(Y.tokens,h));break}case"image":{v+=h.image(Y.href,Y.title,Y.text);break}case"strong":{v+=h.strong(this.parseInline(Y.tokens,h));break}case"em":{v+=h.em(this.parseInline(Y.tokens,h));break}case"codespan":{v+=h.codespan(Y.text);break}case"br":{v+=h.br();break}case"del":{v+=h.del(this.parseInline(Y.tokens,h));break}case"text":{v+=h.text(Y.text);break}default:{var Me='Token with "'+Y.type+'" type was not found.';if(this.options.silent){console.error(Me);return}else throw new Error(Me)}}}return v},U}(),ct=S.merge,rt=S.checkSanitizeDeprecation,Ye=S.escape,ve=D.getDefaults,it=D.changeDefaults,Qe=D.defaults;function Se(U,M,E){if(typeof U=="undefined"||U===null)throw new Error("marked(): input parameter is undefined or null");if(typeof U!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(U)+", string expected");if(typeof M=="function"&&(E=M,M=null),M=ct({},Se.defaults,M||{}),rt(M),E){var f=M.highlight,h;try{h=ie.lex(U,M)}catch(de){return E(de)}var v=function(Me){var Ge;if(!Me)try{Ge=Ze.parse(h,M)}catch($e){Me=$e}return M.highlight=f,Me?E(Me):E(null,Ge)};if(!f||f.length<3)return v();if(delete M.highlight,!h.length)return v();var y=0;Se.walkTokens(h,function(de){de.type==="code"&&(y++,setTimeout(function(){f(de.text,de.lang,function(Me,Ge){if(Me)return v(Me);Ge!=null&&Ge!==de.text&&(de.text=Ge,de.escaped=!0),y--,y===0&&v()})},0))}),y===0&&v();return}try{var Y=ie.lex(U,M);return M.walkTokens&&Se.walkTokens(Y,M.walkTokens),Ze.parse(Y,M)}catch(de){if(de.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,M.silent)return"<p>An error occurred:</p><pre>"+Ye(de.message+"",!0)+"</pre>";throw de}}Se.options=Se.setOptions=function(U){return ct(Se.defaults,U),it(Se.defaults),Se},Se.getDefaults=ve,Se.defaults=Qe,Se.use=function(U){var M=ct({},U);if(U.renderer&&function(){var f=Se.defaults.renderer||new we,h=function(Y){var de=f[Y];f[Y]=function(){for(var Me=arguments.length,Ge=new Array(Me),$e=0;$e<Me;$e++)Ge[$e]=arguments[$e];var ze=U.renderer[Y].apply(f,Ge);return ze===!1&&(ze=de.apply(f,Ge)),ze}};for(var v in U.renderer)h(v);M.renderer=f}(),U.tokenizer&&function(){var f=Se.defaults.tokenizer||new ne,h=function(Y){var de=f[Y];f[Y]=function(){for(var Me=arguments.length,Ge=new Array(Me),$e=0;$e<Me;$e++)Ge[$e]=arguments[$e];var ze=U.tokenizer[Y].apply(f,Ge);return ze===!1&&(ze=de.apply(f,Ge)),ze}};for(var v in U.tokenizer)h(v);M.tokenizer=f}(),U.walkTokens){var E=Se.defaults.walkTokens;M.walkTokens=function(f){U.walkTokens(f),E&&E(f)}}Se.setOptions(M)},Se.walkTokens=function(U,M){for(var E=Ee(U),f;!(f=E()).done;){var h=f.value;M(h);switch(h.type){case"table":{for(var v=Ee(h.tokens.header),y;!(y=v()).done;){var Y=y.value;Se.walkTokens(Y,M)}for(var de=Ee(h.tokens.cells),Me;!(Me=de()).done;)for(var Ge=Me.value,$e=Ee(Ge),ze;!(ze=$e()).done;){var vt=ze.value;Se.walkTokens(vt,M)}break}case"list":{Se.walkTokens(h.items,M);break}default:h.tokens&&Se.walkTokens(h.tokens,M)}}},Se.Parser=Ze,Se.parser=Ze.parse,Se.Renderer=we,Se.TextRenderer=Re,Se.Lexer=ie,Se.lexer=ie.lex,Se.Tokenizer=ne,Se.Slugger=Ve,Se.parse=Se;var Ne=Se;return Ne})},ELLl:function(ht,Je,k){(function(F){F(k("VrN/"))})(function(F){var ge={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},se=F.Pos;F.defineOption("autoCloseBrackets",!1,function(G,j,I){I&&I!=F.Init&&(G.removeKeyMap(Ee),G.state.closeBrackets=null),j&&(X(Ae(j,"pairs")),G.state.closeBrackets=j,G.addKeyMap(Ee))});function Ae(G,j){return j=="pairs"&&typeof G=="string"?G:typeof G=="object"&&G[j]!=null?G[j]:ge[j]}var Ee={Backspace:T,Enter:H};function X(G){for(var j=0;j<G.length;j++){var I=G.charAt(j),oe="'"+I+"'";Ee[oe]||(Ee[oe]=D(I))}}X(ge.pairs+"`");function D(G){return function(j){return q(j,G)}}function L(G){var j=G.state.closeBrackets;if(!j||j.override)return j;var I=G.getModeAt(G.getCursor());return I.closeBrackets||j}function T(G){var j=L(G);if(!j||G.getOption("disableInput"))return F.Pass;for(var I=Ae(j,"pairs"),oe=G.listSelections(),ae=0;ae<oe.length;ae++){if(!oe[ae].empty())return F.Pass;var _e=Ce(G,oe[ae].head);if(!_e||I.indexOf(_e)%2!=0)return F.Pass}for(var ae=oe.length-1;ae>=0;ae--){var He=oe[ae].head;G.replaceRange("",se(He.line,He.ch-1),se(He.line,He.ch+1),"+delete")}}function H(G){var j=L(G),I=j&&Ae(j,"explode");if(!I||G.getOption("disableInput"))return F.Pass;for(var oe=G.listSelections(),ae=0;ae<oe.length;ae++){if(!oe[ae].empty())return F.Pass;var _e=Ce(G,oe[ae].head);if(!_e||I.indexOf(_e)%2!=0)return F.Pass}G.operation(function(){var He=G.lineSeparator()||`
|
|
`;G.replaceSelection(He+He,null),G.execCommand("goCharLeft"),oe=G.listSelections();for(var pe=0;pe<oe.length;pe++){var ke=oe[pe].head.line;G.indentLine(ke,null,!0),G.indentLine(ke+1,null,!0)}})}function K(G){var j=F.cmpPos(G.anchor,G.head)>0;return{anchor:new se(G.anchor.line,G.anchor.ch+(j?-1:1)),head:new se(G.head.line,G.head.ch+(j?1:-1))}}function q(G,j){var I=L(G);if(!I||G.getOption("disableInput"))return F.Pass;var oe=Ae(I,"pairs"),ae=oe.indexOf(j);if(ae==-1)return F.Pass;for(var _e=Ae(I,"closeBefore"),He=Ae(I,"triples"),pe=oe.charAt(ae+1)==j,ke=G.listSelections(),je=ae%2==0,me,he=0;he<ke.length;he++){var Oe=ke[he],V=Oe.head,b,J=G.getRange(V,se(V.line,V.ch+1));if(je&&!Oe.empty())b="surround";else if((pe||!je)&&J==j)pe&&le(G,V)?b="both":He.indexOf(j)>=0&&G.getRange(V,se(V.line,V.ch+3))==j+j+j?b="skipThree":b="skip";else if(pe&&V.ch>1&&He.indexOf(j)>=0&&G.getRange(se(V.line,V.ch-2),V)==j+j){if(V.ch>2&&/\bstring/.test(G.getTokenTypeAt(se(V.line,V.ch-2))))return F.Pass;b="addFour"}else if(pe){var z=V.ch==0?" ":G.getRange(se(V.line,V.ch-1),V);if(!F.isWordChar(J)&&z!=j&&!F.isWordChar(z))b="both";else return F.Pass}else if(je&&(J.length===0||/\s/.test(J)||_e.indexOf(J)>-1))b="both";else return F.Pass;if(!me)me=b;else if(me!=b)return F.Pass}var x=ae%2?oe.charAt(ae-1):j,ee=ae%2?j:oe.charAt(ae+1);G.operation(function(){if(me=="skip")G.execCommand("goCharRight");else if(me=="skipThree")for(var P=0;P<3;P++)G.execCommand("goCharRight");else if(me=="surround"){for(var O=G.getSelections(),P=0;P<O.length;P++)O[P]=x+O[P]+ee;G.replaceSelections(O,"around"),O=G.listSelections().slice();for(var P=0;P<O.length;P++)O[P]=K(O[P]);G.setSelections(O)}else me=="both"?(G.replaceSelection(x+ee,null),G.triggerElectric(x+ee),G.execCommand("goCharLeft")):me=="addFour"&&(G.replaceSelection(x+x+x+x,"before"),G.execCommand("goCharRight"))})}function Ce(G,j){var I=G.getRange(se(j.line,j.ch-1),se(j.line,j.ch+1));return I.length==2?I:null}function le(G,j){var I=G.getTokenAt(se(j.line,j.ch+1));return/\bstring/.test(I.type)&&I.start==j.ch&&(j.ch==0||!/\bstring/.test(G.getTokenTypeAt(j)))}})},GfqC:function(ht,Je,k){"use strict";var F=k("q1tI"),ge=k.n(F),se=k("TSYQ"),Ae=k.n(se);function Ee(S,c){var s="cannot "+S.method+" "+S.action+" "+c.status+"'",m=new Error(s);return m.status=c.status,m.method=S.method,m.url=S.action,m}function X(S){var c=S.responseText||S.response;if(!c)return c;try{return JSON.parse(c)}catch(s){return c}}function D(S){var c=new XMLHttpRequest;S.onProgress&&c.upload&&(c.upload.onprogress=function(R){R.total>0&&(R.percent=R.loaded/R.total*100),S.onProgress(R)});var s=new FormData;S.data&&Object.keys(S.data).forEach(function(w){var R=S.data[w];if(Array.isArray(R)){R.forEach(function(ue){s.append(w+"[]",ue)});return}s.append(w,S.data[w])}),S.file instanceof Blob?s.append(S.filename,S.file,S.file.name):s.append(S.filename,S.file),c.onerror=function(R){S.onError(R)},c.onload=function(){return c.status<200||c.status>=300?S.onError(Ee(S,c),X(c)):S.onSuccess(X(c),c)},c.open(S.method,S.action,!0),S.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var m=S.headers||{};return m["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(m).forEach(function(w){m[w]!==null&&c.setRequestHeader(w,m[w])}),c.send(s),{abort:function(){c.abort()}}}var L=+new Date,T=0;function H(){return"rc-upload-"+L+"-"+ ++T}function K(S,c){return S.indexOf(c,S.length-c.length)!==-1}var q=function(S,c){if(S&&c){var s=Array.isArray(c)?c:c.split(","),m=S.name||"",w=S.type||"",R=w.replace(/\/.*$/,"");return s.some(function(ue){var ye=ue.trim();return ye.charAt(0)==="."?K(m.toLowerCase(),ye.toLowerCase()):/\/\*$/.test(ye)?R===ye.replace(/\/.*$/,""):w===ye})}return!0};function Ce(S,c){var s=S.createReader(),m=[];function w(){s.readEntries(function(R){var ue=Array.prototype.slice.apply(R);m=m.concat(ue);var ye=!ue.length;ye?c(m):w()})}w()}var le=function(c,s,m){var w=function R(ue,ye){ye=ye||"",ue.isFile?ue.file(function(ne){m(ne)&&(ue.fullPath&&!ne.webkitRelativePath&&(Object.defineProperties(ne,{webkitRelativePath:{writable:!0}}),ne.webkitRelativePath=ue.fullPath.replace(/^\//,""),Object.defineProperties(ne,{webkitRelativePath:{writable:!1}})),s([ne]))}):ue.isDirectory&&Ce(ue,function(ne){ne.forEach(function(be){R(be,""+ye+ue.name+"/")})})};c.forEach(function(R){w(R.webkitGetAsEntry())})},G=le,j=Object.assign||function(S){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var m in s)Object.prototype.hasOwnProperty.call(s,m)&&(S[m]=s[m])}return S},I=function(){function S(c,s){var m=[],w=!0,R=!1,ue=void 0;try{for(var ye=c[Symbol.iterator](),ne;!(w=(ne=ye.next()).done)&&!(m.push(ne.value),s&&m.length===s);w=!0);}catch(be){R=!0,ue=be}finally{try{!w&&ye.return&&ye.return()}finally{if(R)throw ue}}return m}return function(c,s){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return S(c,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function S(c,s){for(var m=0;m<s.length;m++){var w=s[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(c,w.key,w)}}return function(c,s,m){return s&&S(c.prototype,s),m&&S(c,m),c}}();function ae(S,c,s){return c in S?Object.defineProperty(S,c,{value:s,enumerable:!0,configurable:!0,writable:!0}):S[c]=s,S}function _e(S,c){var s={};for(var m in S){if(c.indexOf(m)>=0)continue;if(!Object.prototype.hasOwnProperty.call(S,m))continue;s[m]=S[m]}return s}function He(S,c){if(!(S instanceof c))throw new TypeError("Cannot call a class as a function")}function pe(S,c){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:S}function ke(S,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);S.prototype=Object.create(c&&c.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(S,c):S.__proto__=c)}var je=function(c){return Object.keys(c).reduce(function(s,m){return(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(s[m]=c[m]),s},{})},me=function(S){ke(c,S);function c(){var s,m,w,R;He(this,c);for(var ue=arguments.length,ye=Array(ue),ne=0;ne<ue;ne++)ye[ne]=arguments[ne];return R=(m=(w=pe(this,(s=c.__proto__||Object.getPrototypeOf(c)).call.apply(s,[this].concat(ye))),w),w.state={uid:H()},w.reqs={},w.onChange=function(be){var ce=be.target.files;w.uploadFiles(ce),w.reset()},w.onClick=function(be){var ce=w.fileInput;if(!ce)return;var Q=w.props,W=Q.children,re=Q.onClick;W&&W.type==="button"&&(ce.parentNode.focus(),ce.parentNode.querySelector("button").blur()),ce.click(),re&&re(be)},w.onKeyDown=function(be){be.key==="Enter"&&w.onClick()},w.onFileDrop=function(be){var ce=w.props.multiple;if(be.preventDefault(),be.type==="dragover")return;if(w.props.directory)G(Array.prototype.slice.call(be.dataTransfer.items),w.uploadFiles,function(W){return q(W,w.props.accept)});else{var Q=Array.prototype.slice.call(be.dataTransfer.files).filter(function(W){return q(W,w.props.accept)});ce===!1&&(Q=Q.slice(0,1)),w.uploadFiles(Q)}},w.uploadFiles=function(be){var ce=Array.prototype.slice.call(be);ce.map(function(Q){return Q.uid=H(),Q}).forEach(function(Q){w.upload(Q,ce)})},w.saveFileInput=function(be){w.fileInput=be},m),pe(w,R)}return oe(c,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(m,w){var R=this,ue=this.props;if(!ue.beforeUpload)return setTimeout(function(){return R.post(m)},0);var ye=ue.beforeUpload(m,w);ye&&ye.then?ye.then(function(ne){var be=Object.prototype.toString.call(ne);return be==="[object File]"||be==="[object Blob]"?R.post(ne):R.post(m)}).catch(function(ne){console.log(ne)}):ye!==!1&&setTimeout(function(){return R.post(m)},0);return}},{key:"post",value:function(m){var w=this;if(!this._isMounted)return;var R=this.props,ue=R.onStart,ye=R.onProgress,ne=R.transformFile,be=ne===void 0?function(ce){return ce}:ne;new Promise(function(ce){var Q=R.action;return typeof Q=="function"&&(Q=Q(m)),ce(Q)}).then(function(ce){var Q=m.uid,W=R.customRequest||D,re=Promise.resolve(be(m)).then(function(p){var _=R.data;return typeof _=="function"&&(_=_(p)),Promise.all([p,_])}).catch(function(p){console.error(p)});re.then(function(p){var _=I(p,2),g=_[0],N=_[1],te={action:ce,filename:R.name,data:N,file:g,headers:R.headers,withCredentials:R.withCredentials,method:R.method||"post",onProgress:ye?function(B){ye(B,m)}:null,onSuccess:function(ie,Te){delete w.reqs[Q],R.onSuccess(ie,m,Te)},onError:function(ie,Te){delete w.reqs[Q],R.onError(ie,Te,m)}};ue(m),w.reqs[Q]=W(te)})})}},{key:"reset",value:function(){this.setState({uid:H()})}},{key:"abort",value:function(m){var w=this.reqs;if(m){var R=m;m&&m.uid&&(R=m.uid),w[R]&&w[R].abort&&w[R].abort(),delete w[R]}else Object.keys(w).forEach(function(ue){w[ue]&&w[ue].abort&&w[ue].abort(),delete w[ue]})}},{key:"render",value:function(){var m,w=this.props,R=w.component,ue=w.prefixCls,ye=w.className,ne=w.disabled,be=w.id,ce=w.style,Q=w.multiple,W=w.accept,re=w.children,p=w.directory,_=w.openFileDialogOnClick,g=w.onMouseEnter,N=w.onMouseLeave,te=_e(w,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),B=Ae()((m={},ae(m,ue,!0),ae(m,ue+"-disabled",ne),ae(m,ye,ye),m)),ie=ne?{}:{onClick:_?this.onClick:function(){},onKeyDown:_?this.onKeyDown:function(){},onMouseEnter:g,onMouseLeave:N,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return ge.a.createElement(R,j({},ie,{className:B,role:"button",style:ce}),ge.a.createElement("input",j({},je(te),{id:be,type:"file",ref:this.saveFileInput,onClick:function(Ie){return Ie.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:W,directory:p?"directory":null,webkitdirectory:p?"webkitdirectory":null,multiple:Q,onChange:this.onChange})),re)}}]),c}(F.Component),he=me,Oe=Object.assign||function(S){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var m in s)Object.prototype.hasOwnProperty.call(s,m)&&(S[m]=s[m])}return S},V=function(){function S(c,s){for(var m=0;m<s.length;m++){var w=s[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(c,w.key,w)}}return function(c,s,m){return s&&S(c.prototype,s),m&&S(c,m),c}}();function b(S,c){if(!(S instanceof c))throw new TypeError("Cannot call a class as a function")}function J(S,c){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:S}function z(S,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);S.prototype=Object.create(c&&c.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(S,c):S.__proto__=c)}function x(){}var ee=function(S){z(c,S);function c(){var s,m,w,R;b(this,c);for(var ue=arguments.length,ye=Array(ue),ne=0;ne<ue;ne++)ye[ne]=arguments[ne];return R=(m=(w=J(this,(s=c.__proto__||Object.getPrototypeOf(c)).call.apply(s,[this].concat(ye))),w),w.saveUploader=function(be){w.uploader=be},m),J(w,R)}return V(c,[{key:"abort",value:function(m){this.uploader.abort(m)}},{key:"render",value:function(){return ge.a.createElement(he,Oe({},this.props,{ref:this.saveUploader}))}}]),c}(F.Component);ee.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:x,onError:x,onSuccess:x,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var P=ee,O=Je.a=P},Gytx:function(ht,Je){ht.exports=function(F,ge,se,Ae){var Ee=se?se.call(Ae,F,ge):void 0;if(Ee!==void 0)return!!Ee;if(F===ge)return!0;if(typeof F!="object"||!F||typeof ge!="object"||!ge)return!1;var X=Object.keys(F),D=Object.keys(ge);if(X.length!==D.length)return!1;for(var L=Object.prototype.hasOwnProperty.bind(ge),T=0;T<X.length;T++){var H=X[T];if(!L(H))return!1;var K=F[H],q=ge[H];if(Ee=se?se.call(Ae,K,q,H):void 0,Ee===!1||Ee===void 0&&K!==q)return!1}return!0}},HmJG:function(ht,Je,k){},LdHM:function(ht,Je,k){"use strict";k.d(Je,"b",function(){return _e}),k.d(Je,"a",function(){return pe});var F=k("1OyB"),ge=k("vuIU"),se=k("Ji7U"),Ae=k("LK+K"),Ee=k("q1tI"),X=k("rePB"),D=k("Ff2n"),L=k("ODXe"),T=k("4IlW"),H=k("bX4T"),K=k("YrtM"),q=k("TSYQ"),Ce=k.n(q),le=k("+nKL"),G=k("8OUc"),j=function(m,w){var R=m.prefixCls,ue=m.id,ye=m.flattenOptions,ne=m.childrenAsData,be=m.values,ce=m.searchValue,Q=m.multiple,W=m.defaultActiveFirstOption,re=m.height,p=m.itemHeight,_=m.notFoundContent,g=m.open,N=m.menuItemSelectedIcon,te=m.virtual,B=m.onSelect,ie=m.onToggleOpen,Te=m.onActiveValue,Ie=m.onScroll,Le=m.onMouseEnter,we="".concat(R,"-item"),Re=Object(K.a)(function(){return ye},[g,ye],function(Ne,U){return U[0]&&Ne[1]!==U[1]}),Ve=Ee.useRef(null),Xe=function(U){U.preventDefault()},Ke=function(U){Ve.current&&Ve.current.scrollTo({index:U})},Ze=function(U){for(var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,E=Re.length,f=0;f<E;f+=1){var h=(U+f*M+E)%E,v=Re[h],y=v.group,Y=v.data;if(!y&&!Y.disabled)return h}return-1},ct=Ee.useState(function(){return Ze(0)}),rt=Object(L.a)(ct,2),Ye=rt[0],ve=rt[1],it=function(U){ve(U);var M=Re[U];if(!M){Te(null,-1);return}Te(M.data.value,U)};Ee.useEffect(function(){it(W!==!1?Ze(0):-1)},[Re.length,ce]),Ee.useEffect(function(){var Ne=setTimeout(function(){if(!Q&&g&&be.size===1){var U=Array.from(be)[0],M=Re.findIndex(function(E){var f=E.data;return f.value===U});it(M),Ke(M)}});return function(){return clearTimeout(Ne)}},[g]);var Qe=function(U){U!==void 0&&B(U,{selected:!be.has(U)}),Q||ie(!1)};if(Ee.useImperativeHandle(w,function(){return{onKeyDown:function(U){var M=U.which;switch(M){case T.a.UP:case T.a.DOWN:{var E=0;if(M===T.a.UP?E=-1:M===T.a.DOWN&&(E=1),E!==0){var f=Ze(Ye+E,E);Ke(f),it(f)}break}case T.a.ENTER:{var h=Re[Ye];h&&!h.data.disabled?Qe(h.data.value):Qe(void 0),g&&U.preventDefault();break}case T.a.ESC:ie(!1)}},onKeyUp:function(){},scrollTo:function(U){Ke(U)}}}),Re.length===0)return Ee.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),className:"".concat(we,"-empty"),onMouseDown:Xe},_);function Se(Ne){var U=Re[Ne];if(!U)return null;var M=U.data||{},E=M.value,f=M.label,h=M.children,v=Object(H.a)(M,!0),y=ne?h:f;return U?Ee.createElement("div",Object.assign({"aria-label":typeof y=="string"?y:null},v,{key:Ne,role:"option",id:"".concat(ue,"_list_").concat(Ne),"aria-selected":be.has(E)}),E):null}return Ee.createElement(Ee.Fragment,null,Ee.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),style:{height:0,width:0,overflow:"hidden"}},Se(Ye-1),Se(Ye),Se(Ye+1)),Ee.createElement(le.a,{itemKey:"key",ref:Ve,data:Re,height:re,itemHeight:p,fullHeight:!1,onMouseDown:Xe,onScroll:Ie,virtual:te,onMouseEnter:Le},function(Ne,U){var M,E=Ne.group,f=Ne.groupOption,h=Ne.data,v=h.label,y=h.key;if(E)return Ee.createElement("div",{className:Ce()(we,"".concat(we,"-group"))},v!==void 0?v:y);var Y=h.disabled,de=h.value,Me=h.title,Ge=h.children,$e=h.style,ze=h.className,vt=Object(D.a)(h,["disabled","value","title","children","style","className"]),bt=be.has(de),lt="".concat(we,"-option"),Dt=Ce()(we,lt,ze,(M={},Object(X.a)(M,"".concat(lt,"-grouped"),f),Object(X.a)(M,"".concat(lt,"-active"),Ye===U&&!Y),Object(X.a)(M,"".concat(lt,"-disabled"),Y),Object(X.a)(M,"".concat(lt,"-selected"),bt),M)),Ct=ne?Ge:v,Et=!N||typeof N=="function"||bt;return Ee.createElement("div",Object.assign({},vt,{"aria-selected":bt,className:Dt,title:Me,onMouseMove:function(){if(Ye===U||Y)return;it(U)},onClick:function(){Y||Qe(de)},style:$e}),Ee.createElement("div",{className:"".concat(lt,"-content")},Ct||de),Ee.isValidElement(N)||bt,Et&&Ee.createElement(G.a,{className:"".concat(we,"-option-state"),customizeIcon:N,customizeIconProps:{isSelected:bt}},bt?"\u2713":null))}))},I=Ee.forwardRef(j);I.displayName="OptionList";var oe=I,ae=function(){return null};ae.isSelectOption=!0;var _e=ae,He=function(){return null};He.isSelectOptGroup=!0;var pe=He,ke=k("VTBJ"),je=k("Zm9Q");function me(s){var m=s.key,w=s.props,R=w.children,ue=w.value,ye=Object(D.a)(w,["children","value"]);return Object(ke.a)({key:m,value:ue!==void 0?ue:m,children:R},ye)}function he(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(je.a)(s).map(function(w,R){if(!Ee.isValidElement(w)||!w.type)return null;var ue=w.type.isSelectOptGroup,ye=w.key,ne=w.props,be=ne.children,ce=Object(D.a)(ne,["children"]);return m||!ue?me(w):Object(ke.a)(Object(ke.a)({key:"__RC_SELECT_GRP__".concat(ye===null?R:ye,"__"),label:ye},ce),{},{options:he(be)})}).filter(function(w){return w})}var Oe=k("2Qr1"),V=k("qNPg"),b=k("U8pU"),J=k("Kwbf"),z=k("WKfj");function x(s){var m=s.mode,w=s.options,R=s.children,ue=s.backfill,ye=s.allowClear,ne=s.placeholder,be=s.getInputElement,ce=s.showSearch,Q=s.onSearch,W=s.defaultOpen,re=s.autoFocus,p=s.labelInValue,_=s.value,g=s.inputValue,N=s.optionLabelProp,te=m==="multiple"||m==="tags",B=ce!==void 0?ce:te||m==="combobox",ie=w||he(R);if(Object(J.a)(m!=="tags"||ie.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),m==="tags"||m==="combobox"){var Te=ie.some(function(we){return we.options?we.options.some(function(Re){return typeof("value"in Re?Re.value:Re.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(J.a)(!Te,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(J.a)(m!=="combobox"||!N,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(J.a)(m==="combobox"||!ue,"`backfill` only works with `combobox` mode."),Object(J.a)(m==="combobox"||!be,"`getInputElement` only work with `combobox` mode."),Object(J.b)(m!=="combobox"||!be||!ye||!ne,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Q&&!B&&m!=="combobox"&&m!=="tags"&&Object(J.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(J.b)(!W||re,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),_!=null){var Ie=Object(z.d)(_);Object(J.a)(!p||Ie.every(function(we){return Object(b.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(J.a)(!te||Array.isArray(_),"`value` should be array when `mode` is `multiple` or `tags`")}if(R){var Le=null;Object(je.a)(R).some(function(we){if(!Ee.isValidElement(we)||!we.type)return!1;var Re=we.type;if(Re.isSelectOption)return!1;if(Re.isSelectOptGroup){var Ve=Object(je.a)(we.props.children).every(function(Xe){return!Ee.isValidElement(Xe)||!we.type||Xe.type.isSelectOption?!0:(Le=Xe.type,!1)});return!Ve}return Le=Re,!0}),Le&&Object(J.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Le.displayName||Le.name||Le,"`.")),Object(J.a)(g===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var ee=x,P=Object(V.a)({prefixCls:"rc-select",components:{optionList:oe},convertChildrenToData:he,flattenOptions:Oe.d,getLabeledValue:Oe.e,filterOptions:Oe.b,isValueDisabled:Oe.g,findValueOption:Oe.c,warningProps:ee,fillOptionsWithMissingValue:Oe.a}),O=function(s){Object(se.a)(w,s);var m=Object(Ae.a)(w);function w(){var R;return Object(F.a)(this,w),R=m.apply(this,arguments),R.selectRef=Ee.createRef(),R.focus=function(){R.selectRef.current.focus()},R.blur=function(){R.selectRef.current.blur()},R}return Object(ge.a)(w,[{key:"render",value:function(){return Ee.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),w}(Ee.Component);O.Option=_e,O.OptGroup=pe;var S=O,c=Je.c=S},M8RZ:function(ht,Je,k){"use strict";k.d(Je,"a",function(){return T});var F=k("fWQN"),ge=k("mtLc"),se=k("yKVA"),Ae=k("879j"),Ee=k("q1tI"),X=k.n(Ee),D=k("i8i4"),L=k.n(D),T=function(H){Object(se.a)(q,H);var K=Object(Ae.a)(q);function q(Ce){var le;Object(F.a)(this,q),le=K.call(this,Ce);var G=window.document;return le.node=G.createElement("div"),G.body.appendChild(le.node),le}return Object(ge.a)(q,[{key:"render",value:function(){var le=this.props.children;return Object(D.createPortal)(le,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),q}(X.a.Component)},OLES:function(ht,Je,k){"use strict";var F=k("U8pU"),ge=k("VTBJ"),se=k("Ff2n"),Ae=k("q1tI"),Ee=k("uciX"),X=k("7ixt"),D=function(Ce){var le=Ce.overlay,G=Ce.prefixCls,j=Ce.id,I=Ce.overlayInnerStyle;return Ae.createElement("div",{className:"".concat(G,"-inner"),id:j,role:"tooltip",style:I},typeof le=="function"?le():le)},L=D,T=function(Ce,le){var G=Ce.overlayClassName,j=Ce.trigger,I=j===void 0?["hover"]:j,oe=Ce.mouseEnterDelay,ae=oe===void 0?0:oe,_e=Ce.mouseLeaveDelay,He=_e===void 0?.1:_e,pe=Ce.overlayStyle,ke=Ce.prefixCls,je=ke===void 0?"rc-tooltip":ke,me=Ce.children,he=Ce.onVisibleChange,Oe=Ce.afterVisibleChange,V=Ce.transitionName,b=Ce.animation,J=Ce.placement,z=J===void 0?"right":J,x=Ce.align,ee=x===void 0?{}:x,P=Ce.destroyTooltipOnHide,O=P===void 0?!1:P,S=Ce.defaultVisible,c=Ce.getTooltipContainer,s=Ce.overlayInnerStyle,m=Object(se.a)(Ce,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),w=Object(Ae.useRef)(null);Object(Ae.useImperativeHandle)(le,function(){return w.current});var R=Object(ge.a)({},m);"visible"in Ce&&(R.popupVisible=Ce.visible);var ue=function(){var Q=Ce.arrowContent,W=Q===void 0?null:Q,re=Ce.overlay,p=Ce.id;return[Ae.createElement("div",{className:"".concat(je,"-arrow"),key:"arrow"},W),Ae.createElement(L,{key:"content",prefixCls:je,id:p,overlay:re,overlayInnerStyle:s})]},ye=!1,ne=!1;if(typeof O=="boolean")ye=O;else if(O&&Object(F.a)(O)==="object"){var be=O.keepParent;ye=be===!0,ne=be===!1}return Ae.createElement(Ee.a,Object.assign({popupClassName:G,prefixCls:je,popup:ue,action:I,builtinPlacements:X.a,popupPlacement:z,ref:w,popupAlign:ee,getPopupContainer:c,onPopupVisibleChange:he,afterPopupVisibleChange:Oe,popupTransitionName:V,popupAnimation:b,defaultPopupVisible:S,destroyPopupOnHide:ye,autoDestroy:ne,mouseLeaveDelay:He,popupStyle:pe,mouseEnterDelay:ae},R),me)},H=Object(Ae.forwardRef)(T),K=Je.a=H},Ot1p:function(ht,Je,k){"use strict";var F=k("2qtc"),ge=k("kLXV"),se=k("rAM+"),Ae=k("miYZ"),Ee=k("tsqr"),X=k("tJVT"),D=k("jrin"),L=k("q1tI"),T=k.n(L),H=k("VrN/"),K=k.n(H),q=k("bdgK"),Ce=k("p77/"),le=k("Bd2K"),G=k("ELLl"),j=k("19Vz"),I=k("lZu9"),oe=k("+NIl"),ae=k("kSUc"),_e=k("9Bee"),He=function(E){var f=E.value,h=f===void 0?"":f,v=E.className,y=E.showTextOnly,Y=E.showLines,de=E.style,Me=de===void 0?{}:de,Ge=Object(L.useMemo)(function(){return""},[h]);return T.a.createElement(T.a.Fragment,null,T.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ge}}))},pe=k("0Owb"),ke=k("dejd"),je=k("C+DQ"),me=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function he(E){var f=E.onActionCallback,h=E.title,v=E.icon,y=E.actionName,Y=E.className,de=Y===void 0?"":Y,Me=E.children;function Ge(){f(y)}return T.a.createElement("a",{title:h,className:de,onClick:Ge},T.a.createElement("i",{className:"md-iconfont ".concat(v)}),Me)}var Oe=function(E){var f=E.watch,h=E.showNullButton,v=E.onActionCallback,y=E.fullScreen,Y=E.insertTemp,de=E.hidetoolBar,Me=[].concat(me,[{title:"".concat(f?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(f?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return T.a.createElement("ul",{className:"markdown-toolbar-container"},!de&&Me.map(function(Ge,$e){return T.a.createElement("li",{key:$e},Ge.actionName?T.a.createElement(he,Object(pe.a)({},Ge,{onActionCallback:v})):T.a.createElement("span",{className:"v-line"}))}),h?T.a.createElement("li",null,T.a.createElement(he,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:v},T.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Y&&T.a.createElement("li",null,T.a.createElement(he,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Y),onActionCallback:v},T.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),T.a.createElement("li",{className:"btn-full-screen"},T.a.createElement(he,{icon:"".concat(y?"icon-shrink":"icon-enlarge"),title:y?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:v})))},V=k("M8RZ"),b=k("+L6B"),J=k("2/Rp"),z=k("y8nQ"),x=k("Vl3Y"),ee=k("5NDa"),P=k("5rEg"),O={labelCol:{span:4},wrapperCol:{span:20}},S=function(E){var f=E.callback,h=E.onCancel;function v(y){f(y)}return T.a.createElement(x.a,Object(pe.a)({},O,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:v}),T.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},T.a.createElement(P.a,null)),T.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},T.a.createElement(P.a,null)),T.a.createElement("div",{className:"flex-container flex-end"},T.a.createElement(J.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(J.a,{type:"ghost",onClick:h},"\u53D6\u6D88")))},c=k("7ahc"),s=k("HmJG"),m=k("BjJ7"),w=x.a.useForm,R={width:280,marginRight:10},ue={labelCol:{span:5},wrapperCol:{span:19}},ye=function(E){var f=E.callback,h=E.onCancel,v=w(),y=Object(X.a)(v,1),Y=y[0];function de($e){f($e)}function Me($e,ze){Y.setFieldsValue({src:"/api/attachments/".concat($e.id),type:ze.type})}function Ge($e){var ze=$e.target.files[0];be(ze,Me)}return T.a.createElement(x.a,Object(pe.a)({form:Y},ue,{className:"upload-image-panel",onFinish:de}),T.a.createElement(x.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},T.a.createElement("div",{className:"flex-container"},T.a.createElement(x.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},T.a.createElement(P.a,{style:R})),T.a.createElement(ne,{onFileChange:Ge}))),T.a.createElement(x.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},T.a.createElement(P.a,{style:{width:264}})),T.a.createElement(x.a.Item,{style:{textAlign:"right"}},T.a.createElement(J.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(J.a,{type:"ghost",onClick:h},"\u53D6\u6D88")))};function ne(E){var f=E.onFileChange;return T.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",T.a.createElement("input",{type:"file",onChange:f}))}function be(E,f){if(!E)throw new String("\u6CA1\u6709\u6587\u4EF6");var h=new FormData;h.append("editormd-image-file",E),h.append("file_param_name","editormd-image-file"),h.append("byxhr","true");var v=new window.XMLHttpRequest;v.withCredentials=!0,v.addEventListener("load",function(y){f(JSON.parse(y.target.responseText),E)},!1),v.addEventListener("error",function(y){console.error(y)},!1),v.open("POST","".concat(m.a,"/api/attachments.json")),v.send(h)}var ce=k("giR+"),Q=k("fyUT"),W=k("7Kak"),re=k("9yH6"),p=re.a.Group,_={margin:"0 8px"},g=function(E){var f=E.callback,h=E.onCancel;function v(y){f(y)}return T.a.createElement(x.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:v},T.a.createElement("div",{className:"flex-container"},T.a.createElement("span",{style:_},"\u5355\u5143\u683C\u6570\uFF1A"),T.a.createElement("span",{style:_},"\u884C\u6570"),T.a.createElement(x.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},T.a.createElement(Q.a,null)),T.a.createElement("span",{style:_},"\u5217\u6570"),T.a.createElement(x.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},T.a.createElement(Q.a,null))),T.a.createElement("div",{className:"flex-container",style:{marginTop:12}},T.a.createElement("span",{style:_},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),T.a.createElement(x.a.Item,{name:"align"},T.a.createElement(p,null,T.a.createElement(re.a,{value:"default"},T.a.createElement("i",{className:"fa fa-align-justify"})),T.a.createElement(re.a,{value:"left"},T.a.createElement("i",{className:"fa fa-align-left"})),T.a.createElement(re.a,{value:"center"},T.a.createElement("i",{className:"fa fa-align-center"})),T.a.createElement(re.a,{value:"right"},T.a.createElement("i",{className:"fa fa-align-right"}))))),T.a.createElement("div",{className:"flex-container flex-end"},T.a.createElement(J.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(J.a,{type:"ghost",onClick:h},"\u53D6\u6D88")))},N=k("m3rI"),te=k("wMS7"),B=k.n(te),ie="link",Te="upload-image",Ie="code-block",Le="add-table",we="------------",Re={default:we,left:":".concat(we),center:":".concat(we,":"),right:"".concat(we,":")},Ve=k("9VGf"),Xe,Ke;function Ze(){}var ct=0,rt=1e4,Ye="\u2581",ve=`
|
|
**\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 it(E){return/^\d+$/.test(E)?"".concat(E,"px"):E}var Qe=navigator.platform.toUpperCase().indexOf("MAC")>=0,Se=Qe?"Cmd":"Ctrl",Ne=(Xe={},Object(D.a)(Xe,Se+"-B","bold"),Object(D.a)(Xe,Se+"-I","italic"),Xe),U=(Ke={},Object(D.a)(Ke,ie,"\u6DFB\u52A0\u94FE\u63A5"),Object(D.a)(Ke,Ie,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(D.a)(Ke,Te,"\u6DFB\u52A0\u56FE\u7247"),Object(D.a)(Ke,Le,"\u6DFB\u52A0\u8868\u683C"),Ke),M=Je.a=function(E){var f=E.defaultValue,h=f===void 0?"":f,v=E.onChange,y=E.width,Y=y===void 0?"100%":y,de=E.height,Me=de===void 0?400:de,Ge=E.miniToolbar,$e=Ge===void 0?!1:Ge,ze=E.isFocus,vt=ze===void 0?!1:ze,bt=E.watch,lt=E.insertTemp,Dt=E.mode,Ct=Dt===void 0?"markdown":Dt,Et=E.id,Tt=Et===void 0?"markdown-editor-id":Et,yt=E.showResizeBar,Gt=yt===void 0?!1:yt,Cn=E.noStorage,sn=Cn===void 0?!1:Cn,kn=E.showNullButton,nn=kn===void 0?!1:kn,nr=E.hidetoolBar,On=nr===void 0?!1:nr,Rn=E.fullScreen,Hn=Rn===void 0?!1:Rn,Lt=E.onBlur,tt=E.onCMBeforeChange,Qt=E.onFullScreen,Xn=E.className,hn=Xn===void 0?"":Xn,wt=E.disablePaste,Sn=wt===void 0?!1:wt,Pn=E.placeholder,Ln=Pn===void 0?"":Pn,Pe=E.values,dt=Pe===void 0?"":Pe,Tn=Object(L.useState)(null),Mn=Object(X.a)(Tn,2),Fe=Mn[0],Kn=Mn[1],_r=Object(L.useState)(h),ut=Object(X.a)(_r,2),ln=ut[0],zn=ut[1],$n=Object(L.useState)(bt),un=Object(X.a)($n,2),Dn=un[0],st=un[1],fe=Object(L.useState)(Hn),et=Object(X.a)(fe,2),at=et[0],St=et[1],cn=Object(L.useState)(""),Kt=Object(X.a)(cn,2),jt=Kt[0],Rt=Kt[1],Ar=Object(L.useState)(0),xn=Object(X.a)(Ar,2),Nn=xn[0],pn=xn[1],Si=Object(L.useState)(Me),Ti=Object(X.a)(Si,2),pr=Ti[0],rr=Ti[1],Zi=Object(L.useState)(!1),_i=Object(X.a)(Zi,2),Fa=_i[0],qr=_i[1],Vn=Object(L.useRef)(),Or=Object(L.useRef)(),Lr=Object(L.useRef)(),mr=Object(L.useRef)();Object(L.useEffect)(function(){zn(dt),Fe==null||Fe.setValue(dt)},[dt]),Object(L.useEffect)(function(){Qt==null||Qt(at)},[at]),Object(L.useEffect)(function(){if(Vn.current){var pt=K.a.fromTextArea(Vn.current,{mode:Ct,lineNumbers:!$e,lineWrapping:!0,value:h,autoCloseTags:!0,autoCloseBrackets:!0});vt&&pt.focus();function mt(gt,kt){if(Sn){kt.preventDefault();return}var At=kt.clipboardData;if(At){var Pt=At.types.toString(),Ut=At.items,$t=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];if(Pt==="Files"||At.types.indexOf("Files")>-1){if(kt.preventDefault(),Ct=="stex")return;try{var Vt,qn=Ut[1];((Vt=Ut[0])===null||Vt===void 0?void 0:Vt.kind)==="file"&&(qn=Ut[0]);var zt=qn.getAsFile(),ar=zt.name.split(".").pop();be(zt,function(rn){if(rn.id){var Jn,Zn,Qr;(zt==null||((Jn=zt.type)===null||Jn===void 0)?void 0:Jn.indexOf("image"))>-1?pt.replaceSelection(".concat(rn.content_type,")")):(zt==null||((Zn=zt.type)===null||Zn===void 0)?void 0:Zn.indexOf("video"))>-1?pt.replaceSelection('<video width="100%" controls src="'.concat(N.a.API_SERVER,"/api/attachments/").concat(rn.id,'"></video>')):(zt==null||((Qr=zt.type)===null||Qr===void 0)?void 0:Qr.indexOf("pdf"))>-1?pt.replaceSelection('<a href="'.concat(N.a.API_SERVER,"/api/attachments/").concat(rn.id,"?type=").concat(zt.type,'&disposition=inline" target="_blank">').concat(zt.name,"</a>")):$t.includes(ar)?pt.replaceSelection('<a href="'.concat(N.a.API_SERVER,"/api/attachments/").concat(rn.id,'?type=office&disposition=inline" target="_blank">').concat(zt.name,"</a>")):pt.replaceSelection("[".concat(zt.name,"](").concat(N.a.API_SERVER,"/api/attachments/").concat(rn.id,"?type=").concat(rn.content_type,")"))}else(rn==null?void 0:rn.status)===401&&(document.location.href="/user/login")})}catch(rn){Ee.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return pt.on("paste",mt),Kn(pt),function(){pt.off("paste",mt)}}},[]);var Jr=Object(L.useCallback)(function(){if(Or.current)try{}catch(pt){console.log(pt,"---- to set md editor body height")}},[pr,Or,at]);Object(L.useEffect)(function(){function pt(){var gt=new q.default(function(kt){var At=Object(se.a)(kt),Pt;try{for(At.s();!(Pt=At.n()).done;){var Ut=Pt.value;(Ut.target.offsetHeight>0||Ut.target.offsetWidth>0)&&(Jr(),Fe.setSize("100%","100%"),Fe.refresh())}}catch($t){At.e($t)}finally{At.f()}});return gt.observe(Vn.current.parentElement),gt}if(Fe){var mt=pt();return function(){mt.unobserve(Vn.current.parentElement)}}},[Fe,Jr]),Object(L.useEffect)(function(){if(Fe){for(var pt=[],mt=function(){var Ut=kt[gt];At=Object(X.a)(Ut,2);var $t=At[0],Vt=At[1],qn=Object(D.a)({},$t,function(){gr(Vt)});pt.push(qn),Fe.addKeyMap(qn)},gt=0,kt=Object.entries(Ne);gt<kt.length;gt++){var At;mt()}return function(){var Pt=Object(se.a)(pt),Ut;try{for(Pt.s();!(Ut=Pt.n()).done;){var $t=Ut.value;Fe.removeKeyMap($t)}}catch(Vt){Pt.e(Vt)}finally{Pt.f()}}}},[Fe]),Object(L.useEffect)(function(){Hn!==at&&St(Hn)},[Hn]),Object(Ve.a)(function(){if(!sn&&Nn>0){var pt=new Date().getTime(),mt=window.sessionStorage.getItem(Tt);pt>=Nn+rt&&(!mt||mt!==ln)&&(window.sessionStorage.setItem(Tt,ln),qr(!0))}},rt),Object(L.useEffect)(function(){st(bt)},[Fe,bt]),Object(L.useEffect)(function(){Fe&&(vt&&Fe.focus())},[Fe,vt]),Object(L.useEffect)(function(){if(Dn&&Fe){var pt=Fe.getScrollerElement();function mt(gt){var kt=gt.target;if(mr.current){var At=kt.scrollTop/kt.scrollHeight;mr.current.scrollTop=mr.current.scrollHeight*At}}return pt.addEventListener("scroll",mt),function(){pt.removeEventListener("scroll",mt)}}},[Fe,Dn]),Object(L.useEffect)(function(){if(Fe&&tt){function pt(mt,gt){tt(mt,gt)}return Fe.on("beforeChange",pt),function(){Fe.off("beforeChange",pt)}}},[Fe,tt]),Object(L.useEffect)(function(){if(Fe&&Lt){function pt(){Lt(Fe.getValue())}return Fe.on("blur",pt),function(){Fe.off("blur",pt)}}},[Fe,Lt]),Object(L.useEffect)(function(){if(Fe){function pt(mt){var gt=B.a.sanitize(mt.getValue());zn(gt),pn(new Date().getTime()),mt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),v&&v(gt)}return Fe.on("change",pt),function(){Fe.off("change",pt)}}},[Fe,v]),Object(L.useEffect)(function(){Fe&&(h==null?(Fe.setValue(""),zn("")):h!==Fe.getValue()&&(Fe.setValue(h),zn(h),Fe.setCursor(Fe.lineCount(),0)))},[Fe,h]);var gr=Object(L.useCallback)(function(pt){var mt=Fe.getCursor(),gt=Fe.getSelection(),kt=gt.split(`
|
|
`);switch(pt){case"bold":return Fe.replaceSelection("**"+gt+"**"),gt===""&&Fe.setCursor(mt.line,mt.ch+2),Fe.focus();case"italic":return Fe.replaceSelection("*"+gt+"*"),gt===""&&Fe.setCursor(mt.line,mt.ch+1),Fe.focus();case"code":return Fe.replaceSelection("`"+gt+"`"),gt===""&&Fe.setCursor(mt.line,mt.ch+1),Fe.focus();case"inline-latex":return Fe.replaceSelection("`$$"+gt+"$$`"),gt===""&&Fe.setCursor(mt.line,mt.ch+3),Fe.focus();case"latex":return Fe.replaceSelection("```latex\n"+gt+"\n```"),Fe.setCursor(mt.line+1,gt.length+1),Fe.focus();case"line-break":return Fe.replaceSelection(`<br/>
|
|
`),Fe.focus();case"list-ul":return gt===""?Fe.replaceSelection("- "+gt):Fe.replaceSelection(kt.map(function(At){return At===""?"":"- ".concat(At)}).join(`
|
|
`)),Fe.focus();case"list-ol":return gt===""?Fe.replaceSelection("1. "+gt):Fe.replaceSelection(kt.map(function(At,Pt){return At===""?"":"".concat(Pt+1,". ").concat(At)}).join(`
|
|
`)),Fe.focus();case"add-null-ch":return gt===""&&Fe.setCursor(mt.line,mt.ch+1),Fe.replaceSelection(Ye),Fe.focus();case"inster-template-1":return gt===""&&Fe.setCursor(mt.line,mt.ch),Fe.replaceSelection(ve),Fe.focus();case"eraser":return Fe.setValue(""),Fe.focus();case"trigger-watch":return st(!Dn),Fe.focus();case"trigger-full-screen":return St(!at),Fe.focus();case ie:Rt(ie);return;case Ie:Rt(Ie);return;case Te:Rt(Te);return;case Le:Rt(Le);return;default:throw new Error}},[Fe,Dn,at]),Yn=Object(L.useCallback)(function(pt){Rt("");switch(jt){case ie:var mt=pt.title,gt=pt.link;return Fe.replaceSelection("[".concat(mt,"](").concat(gt,")")),Fe.focus();case Ie:var kt=pt.language,At=pt.content;return Fe.replaceSelection(["```"+kt,At,"```"].join(`
|
|
`)),Fe.focus();case Te:var Pt=pt.src,Ut=pt.alt;return Fe.replaceSelection(".concat(Pt,' "').concat(Ut,'" )')),Fe.focus();case Le:for(var $t=pt.row,Vt=pt.col,qn=pt.align,zt=`
|
|
`,ar=0;ar<$t;ar++){for(var rn=[],Jn=[],Zn=0;Zn<Vt;Zn++)ar===1&&Jn.push(Re[qn]),rn.push(" ");ar===1&&(zt+="| ".concat(Jn.join(" | "),` |
|
|
`)),zt+="| ".concat(rn.join(Vt===1?"":" | "),` |
|
|
`)}return Fe.replaceSelection(zt+`
|
|
`),Fe.focus();default:throw new Error}},[Fe,jt]),Zr=Object(L.useMemo)(function(){switch(jt){case ie:return T.a.createElement(S,{callback:Yn,onCancel:ir});case Ie:return T.a.createElement(c.b,{callback:Yn,onCancel:ir});case Te:return T.a.createElement(ye,{callback:Yn,onCancel:ir});case Le:return T.a.createElement(g,{callback:Yn,onCancel:ir});default:return null}},[jt]);function ir(){Rt("")}Object(L.useEffect)(function(){if(Lr.current){var pt=Lr.current,mt=!1,gt=0;function kt(Ut){mt=!0,gt=Ut.pageY}function At(){mt=!1}function Pt(Ut){if(mt){var $t=Ut.pageY-gt;$t<0&&($t=0),$t>300&&($t=300);var Vt=Me+$t+"px";rr(Vt)}}return pt.addEventListener("mousedown",kt),document.addEventListener("mousemove",Pt),document.addEventListener("mouseup",At),function(){pt.removeEventListener("mousedown",kt),document.removeEventListener("mousemove",Pt),document.removeEventListener("mouseup",At)}}},[Fe,Lr]),Object(L.useEffect)(function(){rr(Me)},[Me]);var Ai=it(Y),Mr=it(pr),Qi={width:Ai,height:Mr},ea=Object(L.useMemo)(function(){if(Nn){var pt=new Date(Nn),mt=pt.getHours(),gt=pt.getMinutes(),kt=pt.getSeconds();return mt=mt<10?"0"+mt:mt,gt=gt<10?"0"+gt:gt,kt=kt<10?"0"+kt:kt,"".concat(mt,":").concat(gt,":").concat(kt)}return 0},[Nn]);function jn(){window.sessionStorage.removeItem(Tt),qr(!1),pn(0)}function Ha(){qr(!1),pn(0),Fe.setValue(window.sessionStorage.getItem(Tt))}return T.a.createElement(L.Fragment,null,T.a.createElement("div",{className:"markdown-editor-wrapper",ref:Or},T.a.createElement("div",{className:"markdown-editor-container ".concat(hn," ").concat(Dn?"on-preview":""," ").concat($e?"mini":""," ").concat(at?"full-screen":""),style:Qi},T.a.createElement(Oe,{insertTemp:lt,watch:Dn,fullScreen:at,showNullButton:nn,onActionCallback:gr,hidetoolBar:On}),T.a.createElement("div",{className:"markdown-editor-body"},T.a.createElement("div",{className:"codemirror-container"},T.a.createElement("textarea",{ref:Vn,placeholder:Ln})),Dn?T.a.createElement("div",{ref:mr,className:"preview-container"},Ct==="stex"&&T.a.createElement(He,{value:ln}),Ct!=="stex"&&T.a.createElement(_e.a,{value:ln})):null))),Gt?T.a.createElement("a",{ref:Lr,className:"editor-resize"}):null,T.a.createElement(V.a,null,U[jt]?T.a.createElement(ge.a,{centered:!0,title:U[jt],visible:!0,onCancel:ir,footer:null},Zr):null))}},SJMd:function(ht,Je){/**
|
|
* @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 k,F,ge,se=!1,Ae,Ee;window.PR_SHOULD_USE_CONTINUATION=!0;var X,D;(function(){var L=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"],K=[H,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],q=[K,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],Ce=[K,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],le=[K,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],G="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",j=[K,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],I="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",oe=[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"],ae=[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"],_e=[T,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],He=[q,le,Ce,j,I,oe,ae,_e],pe=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,ke="str",je="kwd",me="com",he="typ",Oe="lit",V="pun",b="pln",J="tag",z="dec",x="src",ee="atn",P="atv",O="nocode",S="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(B){for(var ie=0,Te=!1,Ie=!1,Le=0,we=B.length;Le<we;++Le){var Re=B[Le];if(Re.ignoreCase)Ie=!0;else if(/[a-z]/i.test(Re.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Te=!0,Ie=!1;break}}var Ve={b:8,t:9,n:10,v:11,f:12,r:13};function Xe(Ye){var ve=Ye.charCodeAt(0);if(ve!==92)return ve;var it=Ye.charAt(1);return ve=Ve[it],ve||("0"<=it&&it<="7"?parseInt(Ye.substring(1),8):it==="u"||it==="x"?parseInt(Ye.substring(2),16):Ye.charCodeAt(1))}function Ke(Ye){if(Ye<32)return(Ye<16?"\\x0":"\\x")+Ye.toString(16);var ve=String.fromCharCode(Ye);return ve==="\\"||ve==="-"||ve==="]"||ve==="^"?"\\"+ve:ve}function Ze(Ye){var ve=Ye.substring(1,Ye.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),it=[],Qe=ve[0]==="^",Se=["["];Qe&&Se.push("^");for(var Ne=Qe?1:0,U=ve.length;Ne<U;++Ne){var M=ve[Ne];if(/\\[bdsw]/i.test(M))Se.push(M);else{var E=Xe(M),f;Ne+2<U&&ve[Ne+1]==="-"?(f=Xe(ve[Ne+2]),Ne+=2):f=E,it.push([E,f]),f<65||E>122||(f<65||E>90||it.push([Math.max(65,E)|32,Math.min(f,90)|32]),f<97||E>122||it.push([Math.max(97,E)&~32,Math.min(f,122)&~32]))}}it.sort(function(Y,de){return Y[0]-de[0]||de[1]-Y[1]});for(var h=[],v=[],Ne=0;Ne<it.length;++Ne){var y=it[Ne];y[0]<=v[1]+1?v[1]=Math.max(v[1],y[1]):h.push(v=y)}for(var Ne=0;Ne<h.length;++Ne){var y=h[Ne];Se.push(Ke(y[0])),y[1]>y[0]&&(y[1]+1>y[0]&&Se.push("-"),Se.push(Ke(y[1])))}return Se.push("]"),Se.join("")}function ct(Ye){for(var ve=Ye.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),it=ve.length,Qe=[],Se=0,Ne=0;Se<it;++Se){var U=ve[Se];if(U==="(")++Ne;else if(U.charAt(0)==="\\"){var M=+U.substring(1);M&&(M<=Ne?Qe[M]=-1:ve[Se]=Ke(M))}}for(var Se=1;Se<Qe.length;++Se)Qe[Se]===-1&&(Qe[Se]=++ie);for(var Se=0,Ne=0;Se<it;++Se){var U=ve[Se];if(U==="(")++Ne,Qe[Ne]||(ve[Se]="(?:");else if(U.charAt(0)==="\\"){var M=+U.substring(1);M&&M<=Ne&&(ve[Se]="\\"+Qe[M])}}for(var Se=0;Se<it;++Se)ve[Se]==="^"&&ve[Se+1]!=="^"&&(ve[Se]="");if(Ye.ignoreCase&&Te)for(var Se=0;Se<it;++Se){var U=ve[Se],E=U.charAt(0);U.length>=2&&E==="["?ve[Se]=Ze(U):E!=="\\"&&(ve[Se]=U.replace(/[a-zA-Z]/g,function(v){var y=v.charCodeAt(0);return"["+String.fromCharCode(y&~32,y|32)+"]"}))}return ve.join("")}for(var rt=[],Le=0,we=B.length;Le<we;++Le){var Re=B[Le];if(Re.global||Re.multiline)throw new Error(""+Re);rt.push("(?:"+ct(Re)+")")}return new RegExp(rt.join("|"),Ie?"gi":"g")}function s(B,ie){var Te=/(?:^|\s)nocode(?:\s|$)/,Ie=[],Le=0,we=[],Re=0;function Ve(Xe){var Ke=Xe.nodeType;if(Ke==1){if(Te.test(Xe.className))return;for(var Ze=Xe.firstChild;Ze;Ze=Ze.nextSibling)Ve(Ze);var ct=Xe.nodeName.toLowerCase();(ct==="br"||ct==="li")&&(Ie[Re]=`
|
|
`,we[Re<<1]=Le++,we[Re++<<1|1]=Xe)}else if(Ke==3||Ke==4){var rt=Xe.nodeValue;rt.length&&(ie?rt=rt.replace(/\r\n?/g,`
|
|
`):rt=rt.replace(/[ \t\r\n]+/g," "),Ie[Re]=rt,we[Re<<1]=Le,Le+=rt.length,we[Re++<<1|1]=Xe)}}return Ve(B),{sourceCode:Ie.join("").replace(/\n$/,""),spans:we}}function m(B,ie,Te,Ie,Le){if(!Te)return;var we={sourceNode:B,pre:1,langExtension:null,numberLines:null,sourceCode:Te,spans:null,basePos:ie,decorations:null};Ie(we),Le.push.apply(Le,we.decorations)}var w=/\S/;function R(B){for(var ie=void 0,Te=B.firstChild;Te;Te=Te.nextSibling){var Ie=Te.nodeType;ie=Ie===1?ie?B:Te:Ie===3&&w.test(Te.nodeValue)?B:ie}return ie===B?void 0:ie}function ue(B,ie){var Te={},Ie;(function(){for(var Re=B.concat(ie),Ve=[],Xe={},Ke=0,Ze=Re.length;Ke<Ze;++Ke){var ct=Re[Ke],rt=ct[3];if(rt)for(var Ye=rt.length;--Ye>=0;)Te[rt.charAt(Ye)]=ct;var ve=ct[1],it=""+ve;Xe.hasOwnProperty(it)||(Ve.push(ve),Xe[it]=null)}Ve.push(/[\0-\uffff]/),Ie=c(Ve)})();var Le=ie.length,we=function(Re){for(var Ve=Re.sourceCode,Xe=Re.basePos,Ke=Re.sourceNode,Ze=[Xe,b],ct=0,rt=Ve.match(Ie)||[],Ye={},ve=0,it=rt.length;ve<it;++ve){var Qe=rt[ve],Se=Ye[Qe],Ne=void 0,U;if(typeof Se=="string")U=!1;else{var M=Te[Qe.charAt(0)];if(M)Ne=Qe.match(M[1]),Se=M[0];else{for(var E=0;E<Le;++E)if(M=ie[E],Ne=Qe.match(M[1]),Ne){Se=M[0];break}Ne||(Se=b)}U=Se.length>=5&&Se.substring(0,5)==="lang-",U&&!(Ne&&typeof Ne[1]=="string")&&(U=!1,Se=x),U||(Ye[Qe]=Se)}var f=ct;if(ct+=Qe.length,!U)Ze.push(Xe+f,Se);else{var h=Ne[1],v=Qe.indexOf(h),y=v+h.length;Ne[2]&&(y=Qe.length-Ne[2].length,v=y-h.length);var Y=Se.substring(5);m(Ke,Xe+f,Qe.substring(0,v),we,Ze),m(Ke,Xe+f+v,h,re(Y,h),Ze),m(Ke,Xe+f+y,Qe.substring(y),we,Ze)}}Re.decorations=Ze};return we}function ye(B){var ie=[],Te=[];B.tripleQuotedStrings?ie.push([ke,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):B.multiLineStrings?ie.push([ke,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ie.push([ke,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),B.verbatimStrings&&Te.push([ke,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ie=B.hashComments;Ie&&(B.cStyleComments?(Ie>1?ie.push([me,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ie.push([me,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Te.push([ke,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ie.push([me,/^#[^\r\n]*/,null,"#"])),B.cStyleComments&&(Te.push([me,/^\/\/[^\r\n]*/,null]),Te.push([me,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Le=B.regexLiterals;if(Le){var we=Le>1?"":`
|
|
\r`,Re=we?".":"[\\S\\s]",Ve="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+Re+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+Re+")*(?:\\x5D|$))+/";Te.push(["lang-regex",RegExp("^"+S+"("+Ve+")")])}var Xe=B.types;Xe&&Te.push([he,Xe]);var Ke=(""+B.keywords).replace(/^ | $/g,"");Ke.length&&Te.push([je,new RegExp("^(?:"+Ke.replace(/[\s,]+/g,"|")+")\\b"),null]),ie.push([b,/^\s+/,null,` \r
|
|
\xA0`]);var Ze="^.[^\\s\\w.$@'\"`/\\\\]*";return B.regexLiterals&&(Ze+="(?!s*/)"),Te.push([Oe,/^@[a-z_$][a-z_$@0-9]*/i,null],[he,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[b,/^[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"],[b,/^\\[\s\S]?/,null],[V,new RegExp(Ze),null]),ue(ie,Te)}var ne=ye({keywords:He,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function be(B,ie,Te){for(var Ie=/(?:^|\s)nocode(?:\s|$)/,Le=/\r\n?|\n/,we=B.ownerDocument,Re=we.createElement("li");B.firstChild;)Re.appendChild(B.firstChild);var Ve=[Re];function Xe(ve){var it=ve.nodeType;if(it==1&&!Ie.test(ve.className))if(ve.nodeName==="br")Ke(ve),ve.parentNode&&ve.parentNode.removeChild(ve);else for(var Qe=ve.firstChild;Qe;Qe=Qe.nextSibling)Xe(Qe);else if((it==3||it==4)&&Te){var Se=ve.nodeValue,Ne=Se.match(Le);if(Ne){var U=Se.substring(0,Ne.index);ve.nodeValue=U;var M=Se.substring(Ne.index+Ne[0].length);if(M){var E=ve.parentNode;E.insertBefore(we.createTextNode(M),ve.nextSibling)}Ke(ve),U||ve.parentNode.removeChild(ve)}}}function Ke(ve){for(;!ve.nextSibling;)if(ve=ve.parentNode,!ve)return;function it(Ne,U){var M=U?Ne.cloneNode(!1):Ne,E=Ne.parentNode;if(E){var f=it(E,1),h=Ne.nextSibling;f.appendChild(M);for(var v=h;v;v=h)h=v.nextSibling,f.appendChild(v)}return M}for(var Qe=it(ve.nextSibling,0),Se;(Se=Qe.parentNode)&&Se.nodeType===1;)Qe=Se;Ve.push(Qe)}for(var Ze=0;Ze<Ve.length;++Ze)Xe(Ve[Ze]);ie===(ie|0)&&Ve[0].setAttribute("value",ie);var ct=we.createElement("ol");ct.className="linenums";for(var rt=Math.max(0,ie-1|0)||0,Ze=0,Ye=Ve.length;Ze<Ye;++Ze)Re=Ve[Ze],Re.className="L"+(Ze+rt)%10,Re.firstChild||Re.appendChild(we.createTextNode("\xA0")),ct.appendChild(Re);B.appendChild(ct)}function ce(B){var ie=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ie=ie&&+ie[1]<=8;var Te=/\n/g,Ie=B.sourceCode,Le=Ie.length,we=0,Re=B.spans,Ve=Re.length,Xe=0,Ke=B.decorations,Ze=Ke.length,ct=0;Ke[Ze]=Le;var rt,Ye;for(Ye=rt=0;Ye<Ze;)Ke[Ye]!==Ke[Ye+2]?(Ke[rt++]=Ke[Ye++],Ke[rt++]=Ke[Ye++]):Ye+=2;for(Ze=rt,Ye=rt=0;Ye<Ze;){for(var ve=Ke[Ye],it=Ke[Ye+1],Qe=Ye+2;Qe+2<=Ze&&Ke[Qe+1]===it;)Qe+=2;Ke[rt++]=ve,Ke[rt++]=it,Ye=Qe}Ze=Ke.length=rt;var Se=B.sourceNode,Ne="";Se&&(Ne=Se.style.display,Se.style.display="none");try{for(var U=null;Xe<Ve;){var M=Re[Xe],E=Re[Xe+2]||Le,f=Ke[ct+2]||Le,Qe=Math.min(E,f),h=Re[Xe+1],v;if(h.nodeType!==1&&(v=Ie.substring(we,Qe))){ie&&(v=v.replace(Te,"\r")),h.nodeValue=v;var y=h.ownerDocument,Y=y.createElement("span");Y.className=Ke[ct+1];var de=h.parentNode;de.replaceChild(Y,h),Y.appendChild(h),we<E&&(Re[Xe+1]=h=y.createTextNode(Ie.substring(Qe,E)),de.insertBefore(h,Y.nextSibling))}we=Qe,we>=E&&(Xe+=2),we>=f&&(ct+=2)}}finally{Se&&(Se.style.display=Ne)}}var Q={};function W(B,ie){for(var Te=ie.length;--Te>=0;){var Ie=ie[Te];Q.hasOwnProperty(Ie)?L.console&&console.warn("cannot override language handler %s",Ie):Q[Ie]=B}}function re(B,ie){return B&&Q.hasOwnProperty(B)||(B=/^\s*</.test(ie)?"default-markup":"default-code"),Q[B]}W(ne,["default-code"]),W(ue([],[[b,/^[^<?]+/],[z,/^<!\w[^>]*(?:>|$)/],[me,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[V,/^(?:<[%?]|[%?]>)/],["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(ue([[b,/^[\s]+/,null,` \r
|
|
`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[J,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[ee,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[V,/^[=<>\/]+/],["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(ue([],[[P,/^[\s\S]+/]]),["uq.val"]),W(ye({keywords:q,hashComments:!0,cStyleComments:!0,types:pe}),["c","cc","cpp","cxx","cyc","m"]),W(ye({keywords:"null,true,false"}),["json"]),W(ye({keywords:le,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:pe}),["cs"]),W(ye({keywords:Ce,cStyleComments:!0}),["java"]),W(ye({keywords:_e,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),W(ye({keywords:oe,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),W(ye({keywords:I,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),W(ye({keywords:ae,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),W(ye({keywords:j,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),W(ye({keywords:G,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),W(ue([],[[ke,/^[\s\S]+/]]),["regex"]);function p(B){var ie=B.langExtension;try{var Te=s(B.sourceNode,B.pre),Ie=Te.sourceCode;B.sourceCode=Ie,B.spans=Te.spans,B.basePos=0,re(ie,Ie)(B),ce(B)}catch(Le){L.console&&console.log(Le&&Le.stack||Le)}}function _(B,ie,Te){var Ie=Te||!1,Le=ie||null,we=document.createElement("div");we.innerHTML="<pre>"+B+"</pre>",we=we.firstChild,Ie&&be(we,Ie,!0);var Re={langExtension:Le,numberLines:Ie,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return p(Re),we.innerHTML}function g(B,ie){var Te=ie||document.body,Ie=Te.ownerDocument||document;function Le(M){return Te.getElementsByTagName(M)}for(var we=[Le("pre"),Le("code"),Le("xmp")],Re=[],Ve=0;Ve<we.length;++Ve)for(var Xe=0,Ke=we[Ve].length;Xe<Ke;++Xe)Re.push(we[Ve][Xe]);we=null;var Ze=Date;Ze.now||(Ze={now:function(){return+new Date}});var ct=0,rt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ye=/\bprettyprint\b/,ve=/\bprettyprinted\b/,it=/pre|xmp/i,Qe=/^code$/i,Se=/^(?:pre|code|xmp)$/i,Ne={};function U(){for(var M=L.PR_SHOULD_USE_CONTINUATION?Ze.now()+250:Infinity;ct<Re.length&&Ze.now()<M;ct++){for(var E=Re[ct],f=Ne,h=E;h=h.previousSibling;){var v=h.nodeType,y=(v===7||v===8)&&h.nodeValue;if(y?!/^\??prettify\b/.test(y):v!==3||/\S/.test(h.nodeValue))break;if(y){f={},y.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Tt,yt,Gt){f[yt]=Gt});break}}var Y=E.className;if((f!==Ne||Ye.test(Y))&&!ve.test(Y)){for(var de=!1,Me=E.parentNode;Me;Me=Me.parentNode){var Ge=Me.tagName;if(Se.test(Ge)&&Me.className&&Ye.test(Me.className)){de=!0;break}}if(!de){E.className+=" prettyprinted";var $e=f.lang;if(!$e){$e=Y.match(rt);var ze;!$e&&(ze=R(E))&&Qe.test(ze.tagName)&&($e=ze.className.match(rt)),$e&&($e=$e[1])}var vt;if(it.test(E.tagName))vt=1;else{var bt=E.currentStyle,lt=Ie.defaultView,Dt=bt?bt.whiteSpace:lt&<.getComputedStyle?lt.getComputedStyle(E,null).getPropertyValue("white-space"):0;vt=Dt&&Dt.substring(0,3)==="pre"}var Ct=f.linenums;(Ct=Ct==="true"||+Ct)||(Ct=Y.match(/\blinenums\b(?::(\d+))?/),Ct=Ct?Ct[1]&&Ct[1].length?+Ct[1]:!0:!1),Ct&&be(E,Ct,vt);var Et={langExtension:$e,sourceNode:E,numberLines:Ct,pre:vt,sourceCode:null,basePos:null,spans:null,decorations:null};p(Et)}}}ct<Re.length?L.setTimeout(U,250):typeof B=="function"&&B()}U()}var N=L.PR={createSimpleLexer:ue,registerLangHandler:W,sourceDecorator:ye,PR_ATTRIB_NAME:ee,PR_ATTRIB_VALUE:P,PR_COMMENT:me,PR_DECLARATION:z,PR_KEYWORD:je,PR_LITERAL:Oe,PR_NOCODE:O,PR_PLAIN:b,PR_PUNCTUATION:V,PR_SOURCE:x,PR_STRING:ke,PR_TAG:J,PR_TYPE:he,prettyPrintOne:se?L.prettyPrintOne=_:X=_,prettyPrint:D=se?L.prettyPrint=g:D=g},te=L.define;typeof te=="function"&&te.amd&&te("google-code-prettify",[],function(){return N})})()},"VrN/":function(ht,Je,k){(function(F,ge){ht.exports=ge()})(this,function(){"use strict";var F=navigator.userAgent,ge=navigator.platform,se=/gecko\/\d/i.test(F),Ae=/MSIE \d/.test(F),Ee=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(F),X=/Edge\/(\d+)/.exec(F),D=Ae||Ee||X,L=D&&(Ae?document.documentMode||6:+(X||Ee)[1]),T=!X&&/WebKit\//.test(F),H=T&&/Qt\/\d+\.\d+/.test(F),K=!X&&/Chrome\//.test(F),q=/Opera\//.test(F),Ce=/Apple Computer/.test(navigator.vendor),le=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(F),G=/PhantomJS/.test(F),j=!X&&/AppleWebKit/.test(F)&&/Mobile\/\w+/.test(F),I=/Android/.test(F),oe=j||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(F),ae=j||/Mac/.test(ge),_e=/\bCrOS\b/.test(F),He=/win/i.test(ge),pe=q&&F.match(/Version\/(\d*\.\d*)/);pe&&(pe=Number(pe[1])),pe&&pe>=15&&(q=!1,T=!0);var ke=ae&&(H||q&&(pe==null||pe<12.11)),je=se||D&&L>=9;function me(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var he=function(e,t){var r=e.className,n=me(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function Oe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function V(e,t){return Oe(e).appendChild(t)}function b(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function J(e,t,r,n){var i=b(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 x(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ee(){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 P(e,t){var r=e.className;me(t).test(r)||(e.className+=(r?" ":"")+t)}function O(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!me(r[n]).test(t)&&(t+=" "+r[n]);return t}var S=function(e){e.select()};j?S=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:D&&(S=function(e){try{e.select()}catch(t){}});function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function s(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function 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 l=e.indexOf(" ",a);if(l<0||l>=t)return o+(t-a);o+=l-a,o+=r-o%r,a=l+1}}var w=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};w.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},w.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ue=50,ye={toString:function(){return"CodeMirror.Pass"}},ne={scroll:!1},be={origin:"*mouse"},ce={origin:"+move"};function Q(e,t,r){for(var n=0,i=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var o=a-n;if(a==e.length||i+o>=t)return n+Math.min(o,t-i);if(i+=a-n,i+=r-i%r,n=a+1,i>=t)return n}}var W=[""];function re(e){for(;W.length<=e;)W.push(p(W)+" ");return W[e]}function p(e){return e[e.length-1]}function _(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function g(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function N(){}function te(e,t){var r;return Object.create?r=Object.create(e):(N.prototype=e,r=new N),t&&s(t,r),r}var B=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ie(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||B.test(e))}function Te(e,t){return t?t.source.indexOf("\\w")>-1&&ie(e)?!0:t.test(e):ie(e)}function Ie(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Le=/[\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 we(e){return e.charCodeAt(0)>=768&&Le.test(e)}function Re(e,t,r){for(;(r<0?t>0:t<e.length)&&we(e.charAt(t));)t+=r;return t}function Ve(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 Xe(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 Ke=null;function Ze(e,t,r){var n;Ke=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:Ke=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:Ke=i)}return n!=null?n:Ke}var ct=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function u(d,C,A){this.level=d,this.from=C,this.to=A}return function(d,C){var A=C=="ltr"?"L":"R";if(d.length==0||C=="ltr"&&!n.test(d))return!1;for(var Z=d.length,$=[],xe=0;xe<Z;++xe)$.push(r(d.charCodeAt(xe)));for(var De=0,Ue=A;De<Z;++De){var We=$[De];We=="m"?$[De]=Ue:Ue=We}for(var qe=0,Be=A;qe<Z;++qe){var nt=$[qe];nt=="1"&&Be=="r"?$[qe]="n":a.test(nt)&&(Be=nt,nt=="r"&&($[qe]="R"))}for(var ft=1,ot=$[0];ft<Z-1;++ft){var xt=$[ft];xt=="+"&&ot=="1"&&$[ft+1]=="1"?$[ft]="1":xt==","&&ot==$[ft+1]&&(ot=="1"||ot=="n")&&($[ft]=ot),ot=xt}for(var Mt=0;Mt<Z;++Mt){var Jt=$[Mt];if(Jt==",")$[Mt]="N";else if(Jt=="%"){var It=void 0;for(It=Mt+1;It<Z&&$[It]=="%";++It);for(var En=Mt&&$[Mt-1]=="!"||It<Z&&$[It]=="1"?"1":"N",vn=Mt;vn<It;++vn)$[vn]=En;Mt=It-1}}for(var Wt=0,bn=A;Wt<Z;++Wt){var tn=$[Wt];bn=="L"&&tn=="1"?$[Wt]="L":a.test(tn)&&(bn=tn)}for(var Xt=0;Xt<Z;++Xt)if(i.test($[Xt])){var Bt=void 0;for(Bt=Xt+1;Bt<Z&&i.test($[Bt]);++Bt);for(var Ft=(Xt?$[Xt-1]:A)=="L",yn=(Bt<Z?$[Bt]:A)=="L",Vr=Ft==yn?Ft?"L":"R":A,hr=Xt;hr<Bt;++hr)$[hr]=Vr;Xt=Bt-1}for(var on=[],Gn,Zt=0;Zt<Z;)if(o.test($[Zt])){var Ia=Zt;for(++Zt;Zt<Z&&o.test($[Zt]);++Zt);on.push(new u(0,Ia,Zt))}else{var tr=Zt,Sr=on.length,Tr=C=="rtl"?1:0;for(++Zt;Zt<Z&&$[Zt]!="L";++Zt);for(var fn=tr;fn<Zt;)if(l.test($[fn])){tr<fn&&(on.splice(Sr,0,new u(1,tr,fn)),Sr+=Tr);var Yr=fn;for(++fn;fn<Zt&&l.test($[fn]);++fn);on.splice(Sr,0,new u(2,Yr,fn)),Sr+=Tr,tr=fn}else++fn;tr<Zt&&on.splice(Sr,0,new u(1,tr,Zt))}return C=="ltr"&&(on[0].level==1&&(Gn=d.match(/^\s+/))&&(on[0].from=Gn[0].length,on.unshift(new u(0,0,Gn[0].length))),p(on).level==1&&(Gn=d.match(/\s+$/))&&(p(on).to-=Gn[0].length,on.push(new u(0,Z-Gn[0].length,Z)))),C=="rtl"?on.reverse():on}}();function rt(e,t){var r=e.order;return r==null&&(r=e.order=ct(e.text,t)),r}var Ye=[],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]||Ye).concat(r)}};function it(e,t){return e._handlers&&e._handlers[t]||Ye}function Qe(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var a=R(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Se(e,t){var r=it(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 Ne(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Se(e,r||t.type,e,t),v(t)||t.codemirrorIgnore}function U(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)R(r,t[n])==-1&&r.push(t[n])}function M(e,t){return it(e,t).length>0}function E(e){e.prototype.on=function(t,r){ve(this,t,r)},e.prototype.off=function(t,r){Qe(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function h(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function v(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function y(e){f(e),h(e)}function Y(e){return e.target||e.srcElement}function de(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ae&&e.ctrlKey&&t==1&&(t=3),t}var Me=function(){if(D&&L<9)return!1;var e=b("div");return"draggable"in e||"dragDrop"in e}(),Ge;function $e(e){if(Ge==null){var t=b("span","\u200B");V(e,b("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ge=t.offsetWidth<=1&&t.offsetHeight>2&&!(D&&L<8))}var r=Ge?b("span","\u200B"):b("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var ze;function vt(e){if(ze!=null)return ze;var t=V(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:ze=n.right-r.right<3}var bt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(r.push(a.slice(0,o)),t+=o+1):(r.push(a),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},lt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Dt=function(){var e=b("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ct=null;function Et(e){if(Ct!=null)return Ct;var t=V(e,b("span","x")),r=t.getBoundingClientRect(),n=z(t,0,1).getBoundingClientRect();return Ct=Math.abs(r.left-n.left)>1}var Tt={},yt={};function Gt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Tt[e]=t}function Cn(e,t){yt[e]=t}function sn(e){if(typeof e=="string"&&yt.hasOwnProperty(e))e=yt[e];else if(e&&typeof e.name=="string"&&yt.hasOwnProperty(e.name)){var t=yt[e.name];typeof t=="string"&&(t={name:t}),e=te(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return sn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return sn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function kn(e,t){t=sn(t);var r=Tt[t.name];if(!r)return kn(e,"text/plain");var n=r(e,t);if(nn.hasOwnProperty(t.name)){var i=nn[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 nn={};function nr(e,t){var r=nn.hasOwnProperty(e)?nn[e]:nn[e]={};s(t,r)}function On(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Rn(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Hn(e,t,r){return e.startState?e.startState(t,r):!0}var Lt=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};Lt.prototype.eol=function(){return this.pos>=this.string.length},Lt.prototype.sol=function(){return this.pos==this.lineStart},Lt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Lt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Lt.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},Lt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Lt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Lt.prototype.skipToEnd=function(){this.pos=this.string.length},Lt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Lt.prototype.backUp=function(e){this.pos-=e},Lt.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)},Lt.prototype.indentation=function(){return m(this.string,null,this.tabSize)-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},Lt.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)}},Lt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Lt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Lt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Lt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function tt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t<a){r=i;break}t-=a}return r.lines[t]}function Qt(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(a){var o=a.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function Xn(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function hn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function wt(e){if(e.parent==null)return null;for(var t=e.parent,r=R(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;!(n.children[i]==t);++i)r+=n.children[i].chunkSize();return r+t.first}function Sn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],a=i.height;if(t<a){e=i;continue e}t-=a,r+=i.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var l=e.lines[o],u=l.height;if(t<u)break;t-=u}return r+o}function Pn(e,t){return t>=e.first&&t<e.first+e.size}function Ln(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Pe(e,t,r){if(r===void 0&&(r=null),!(this instanceof Pe))return new Pe(e,t,r);this.line=e,this.ch=t,this.sticky=r}function dt(e,t){return e.line-t.line||e.ch-t.ch}function Tn(e,t){return e.sticky==t.sticky&&dt(e,t)==0}function Mn(e){return Pe(e.line,e.ch)}function Fe(e,t){return dt(e,t)<0?t:e}function Kn(e,t){return dt(e,t)<0?e:t}function _r(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ut(e,t){if(t.line<e.first)return Pe(e.first,0);var r=e.first+e.size-1;return t.line>r?Pe(r,tt(e,r).text.length):ln(t,tt(e,t.line).text.length)}function ln(e,t){var r=e.ch;return r==null||r>t?Pe(e.line,t):r<0?Pe(e.line,0):e}function zn(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ut(e,t[n]);return r}var $n=function(e,t){this.state=e,this.lookAhead=t},un=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},un.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(e,t,r){return t instanceof $n?new un(e,On(e.mode,t.state),r,t.lookAhead):new un(e,On(e.mode,t),r)},un.prototype.save=function(e){var t=e!==!1?On(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new $n(t,this.maxLookAhead):t};function Dn(e,t,r,n){var i=[e.state.modeGen],a={};Rt(e,t.text,e.doc.mode,r,function(d,C){return i.push(d,C)},a,n);for(var o=r.state,l=function(d){r.baseTokens=i;var C=e.state.overlays[d],A=1,Z=0;r.state=!0,Rt(e,t.text,C.mode,r,function($,xe){for(var De=A;Z<$;){var Ue=i[A];Ue>$&&i.splice(A,1,$,i[A+1],Ue),A+=2,Z=Math.min($,Ue)}if(!xe)return;if(C.opaque)i.splice(De,A-De,$,"overlay "+xe),A=De+2;else for(;De<A;De+=2){var We=i[De+1];i[De+1]=(We?We+" ":"")+"overlay "+xe}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)l(u);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function st(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=fe(e,wt(t)),i=t.text.length>e.options.maxHighlightLength&&On(e.doc.mode,n.state),a=Dn(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fe(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new un(n,!0,t);var a=Ar(e,t,r),o=a>n.first&&tt(n,a-1).stateAfter,l=o?un.fromSaved(n,o,a):new un(n,Hn(n.mode),a);return n.iter(a,t,function(u){et(e,u.text,l);var d=l.line;u.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function et(e,t,r,n){var i=e.doc.mode,a=new Lt(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&at(i,r.state);!a.eol();)St(i,a,r.state),a.start=a.pos}function at(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Rn(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function St(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Rn(e,r).mode);var a=e.token(t,r);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var cn=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Kt(e,t,r,n){var i=e.doc,a=i.mode,o;t=ut(i,t);var l=tt(i,t.line),u=fe(e,t.line,r),d=new Lt(l.text,e.options.tabSize,u),C;for(n&&(C=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=St(a,d,u.state),n&&C.push(new cn(d,o,On(i.mode,u.state)));return n?C:new cn(d,o,u.state)}function jt(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 Rt(e,t,r,n,i,a,o){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var u=0,d=null,C=new Lt(t,e.options.tabSize,n),A,Z=e.options.addModeClass&&[null];for(t==""&&jt(at(r,n.state),a);!C.eol();){if(C.pos>e.options.maxHighlightLength?(l=!1,o&&et(e,t,n,C.pos),C.pos=t.length,A=null):A=jt(St(r,C,n.state,Z),a),Z){var $=Z[0].name;$&&(A="m-"+(A?$+" "+A:$))}if(!l||d!=A){for(;u<C.start;)u=Math.min(C.start,u+5e3),i(u,d);d=A}C.start=C.pos}for(;u<C.pos;){var xe=Math.min(C.pos,u+5e3);i(xe,d),u=xe}}function Ar(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>o;--l){if(l<=a.first)return a.first;var u=tt(a,l-1),d=u.stateAfter;if(d&&(!r||l+(d instanceof $n?d.lookAhead:0)<=a.modeFrontier))return l;var C=m(u.text,null,e.options.tabSize);(i==null||n>C)&&(i=l-1,n=C)}return i}function xn(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=tt(e,n).stateAfter;if(i&&(!(i instanceof $n)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Nn=!1,pn=!1;function Si(){Nn=!0}function Ti(){pn=!0}function pr(e,t,r){this.marker=e,this.from=t,this.to=r}function rr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Zi(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function _i(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Fa(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(l||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new pr(o,a.from,u?null:a.to))}}return n}function qr(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(l||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new pr(o,u?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Vn(e,t){if(t.full)return null;var r=Pn(e,t.from.line)&&tt(e,t.from.line).markedSpans,n=Pn(e,t.to.line)&&tt(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=dt(t.from,t.to)==0,l=Fa(r,i,o),u=qr(n,a,o),d=t.text.length==1,C=p(t.text).length+(d?i:0);if(l)for(var A=0;A<l.length;++A){var Z=l[A];if(Z.to==null){var $=rr(u,Z.marker);$?d&&(Z.to=$.to==null?null:$.to+C):Z.to=i}}if(u)for(var xe=0;xe<u.length;++xe){var De=u[xe];if(De.to!=null&&(De.to+=C),De.from==null){var Ue=rr(l,De.marker);Ue||(De.from=C,d&&(l||(l=[])).push(De))}else De.from+=C,d&&(l||(l=[])).push(De)}l&&(l=Or(l)),u&&u!=l&&(u=Or(u));var We=[l];if(!d){var qe=t.text.length-2,Be;if(qe>0&&l)for(var nt=0;nt<l.length;++nt)l[nt].to==null&&(Be||(Be=[])).push(new pr(l[nt].marker,null,null));for(var ft=0;ft<qe;++ft)We.push(Be);We.push(u)}return We}function Or(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Lr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function($){if($.markedSpans)for(var xe=0;xe<$.markedSpans.length;++xe){var De=$.markedSpans[xe].marker;De.readOnly&&(!n||R(n,De)==-1)&&(n||(n=[])).push(De)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],l=o.find(0),u=0;u<i.length;++u){var d=i[u];if(dt(d.to,l.from)<0||dt(d.from,l.to)>0)continue;var C=[u,1],A=dt(d.from,l.from),Z=dt(d.to,l.to);(A<0||!o.inclusiveLeft&&!A)&&C.push({from:d.from,to:l.from}),(Z>0||!o.inclusiveRight&&!Z)&&C.push({from:l.to,to:d.to}),i.splice.apply(i,C),u+=C.length-3}return i}function mr(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function Jr(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function gr(e){return e.inclusiveLeft?-1:0}function Yn(e){return e.inclusiveRight?1:0}function Zr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=dt(n.from,i.from)||gr(e)-gr(t);if(a)return-a;var o=dt(n.to,i.to)||Yn(e)-Yn(t);return o||t.id-e.id}function ir(e,t){var r=pn&&e.markedSpans,n;if(r)for(var i=void 0,a=0;a<r.length;++a)i=r[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||Zr(n,i.marker)<0)&&(n=i.marker);return n}function Ai(e){return ir(e,!0)}function Mr(e){return ir(e,!1)}function Qi(e,t){var r=pn&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Zr(n,a.marker)<0)&&(n=a.marker)}return n}function ea(e,t,r,n,i){var a=tt(e,t),o=pn&&a.markedSpans;if(o)for(var l=0;l<o.length;++l){var u=o[l];if(!u.marker.collapsed)continue;var d=u.marker.find(0),C=dt(d.from,r)||gr(u.marker)-gr(i),A=dt(d.to,n)||Yn(u.marker)-Yn(i);if(C>=0&&A<=0||C<=0&&A>=0)continue;if(C<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?dt(d.to,r)>=0:dt(d.to,r)>0)||C>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?dt(d.from,n)<=0:dt(d.from,n)<0))return!0}}function jn(e){for(var t;t=Ai(e);)e=t.find(-1,!0).line;return e}function Ha(e){for(var t;t=Mr(e);)e=t.find(1,!0).line;return e}function pt(e){for(var t,r;t=Mr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function mt(e,t){var r=tt(e,t),n=jn(r);return r==n?t:wt(n)}function gt(e,t){if(t>e.lastLine())return t;var r=tt(e,t),n;if(!kt(e,r))return t;for(;n=Mr(r);)r=n.find(1,!0).line;return wt(r)+1}function kt(e,t){var r=pn&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i){if(n=r[i],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&At(e,t,n))return!0}}function At(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return At(e,n.line,rr(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&At(e,t,i))return!0}function Pt(e){e=jn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var a=r.parent;a;r=a,a=r.parent)for(var o=0;o<a.children.length;++o){var l=a.children[o];if(l==r)break;t+=l.height}return t}function Ut(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ai(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Mr(n);){var a=r.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function $t(e){var t=e.display,r=e.doc;t.maxLine=tt(r,r.first),t.maxLineLength=Ut(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Ut(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var Vt=function(e,t,r){this.text=e,Jr(this,t),this.height=r?r(this):1};Vt.prototype.lineNo=function(){return wt(this)},E(Vt);function qn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),mr(e),Jr(e,r);var i=n?n(e):1;i!=e.height&&hn(e,i)}function zt(e){e.parent=null,mr(e)}var ar={},rn={};function Jn(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?rn:ar;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zn(e,t){var r=J("span",null,null,T?"padding-right: .1px":null),n={pre:J("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;n.pos=0,n.addToken=Ss,vt(e.display.measure)&&(o=rt(a,e.doc.direction))&&(n.addToken=_s(n.addToken,o)),n.map=[];var l=t!=e.display.externalMeasured&&wt(a);As(a,n,st(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=O(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=O(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild($e(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 Se(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=O(n.pre.className,n.textClass||"")),n}function Qr(e){var t=b("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ss(e,t,r,n,i,a,o){if(!t)return;var l=e.splitSpaces?Ts(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,C;if(!u.test(t))e.col+=t.length,C=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,C),D&&L<9&&(d=!0),e.pos+=t.length;else{C=document.createDocumentFragment();for(var A=0;;){u.lastIndex=A;var Z=u.exec(t),$=Z?Z.index-A:t.length-A;if($){var xe=document.createTextNode(l.slice(A,A+$));D&&L<9?C.appendChild(b("span",[xe])):C.appendChild(xe),e.map.push(e.pos,e.pos+$,xe),e.col+=$,e.pos+=$}if(!Z)break;A+=$+1;var De=void 0;if(Z[0]==" "){var Ue=e.cm.options.tabSize,We=Ue-e.col%Ue;De=C.appendChild(b("span",re(We),"cm-tab")),De.setAttribute("role","presentation"),De.setAttribute("cm-text"," "),e.col+=We}else Z[0]=="\r"||Z[0]==`
|
|
`?(De=C.appendChild(b("span",Z[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),De.setAttribute("cm-text",Z[0]),e.col+=1):(De=e.cm.options.specialCharPlaceholder(Z[0]),De.setAttribute("cm-text",Z[0]),D&&L<9?C.appendChild(b("span",[De])):C.appendChild(De),e.col+=1);e.map.push(e.pos,e.pos+1,De),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var qe=r||"";n&&(qe+=n),i&&(qe+=i);var Be=b("span",[C],qe,a);if(o)for(var nt in o)o.hasOwnProperty(nt)&&nt!="style"&&nt!="class"&&Be.setAttribute(nt,o[nt]);return e.content.appendChild(Be)}e.content.appendChild(C)}function Ts(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 _s(e,t){return function(r,n,i,a,o,l,u){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,C=d+n.length;;){for(var A=void 0,Z=0;Z<t.length&&!(A=t[Z],A.to>d&&A.from<=d);Z++);if(A.to>=C)return e(r,n,i,a,o,l,u);e(r,n.slice(0,A.to-d),i,a,null,l,u),a=null,n=n.slice(A.to-d),d=A.to}}}function za(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 As(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]),Jn(r[o+1],t.cm.options));return}for(var l=i.length,u=0,d=1,C="",A,Z,$=0,xe,De,Ue,We,qe;;){if($==u){xe=De=Ue=Z="",qe=null,We=null,$=Infinity;for(var Be=[],nt=void 0,ft=0;ft<n.length;++ft){var ot=n[ft],xt=ot.marker;if(xt.type=="bookmark"&&ot.from==u&&xt.widgetNode)Be.push(xt);else if(ot.from<=u&&(ot.to==null||ot.to>u||xt.collapsed&&ot.to==u&&ot.from==u)){if(ot.to!=null&&ot.to!=u&&$>ot.to&&($=ot.to,De=""),xt.className&&(xe+=" "+xt.className),xt.css&&(Z=(Z?Z+";":"")+xt.css),xt.startStyle&&ot.from==u&&(Ue+=" "+xt.startStyle),xt.endStyle&&ot.to==$&&(nt||(nt=[])).push(xt.endStyle,ot.to),xt.title&&((qe||(qe={})).title=xt.title),xt.attributes)for(var Mt in xt.attributes)(qe||(qe={}))[Mt]=xt.attributes[Mt];xt.collapsed&&(!We||Zr(We.marker,xt)<0)&&(We=ot)}else ot.from>u&&$>ot.from&&($=ot.from)}if(nt)for(var Jt=0;Jt<nt.length;Jt+=2)nt[Jt+1]==$&&(De+=" "+nt[Jt]);if(!We||We.from==u)for(var It=0;It<Be.length;++It)za(t,0,Be[It]);if(We&&(We.from||0)==u){if(za(t,(We.to==null?l+1:We.to)-u,We.marker,We.from==null),We.to==null)return;We.to==u&&(We=!1)}}if(u>=l)break;for(var En=Math.min(l,$);;){if(C){var vn=u+C.length;if(!We){var Wt=vn>En?C.slice(0,En-u):C;t.addToken(t,Wt,A?A+xe:xe,Ue,u+Wt.length==$?De:"",Z,qe)}if(vn>=En){C=C.slice(En-u),u=En;break}u=vn,Ue=""}C=i.slice(a,a=r[d++]),A=Jn(r[d++],t.cm.options)}}}function Wa(e,t,r){this.line=t,this.rest=pt(t),this.size=this.rest?wt(p(this.rest))-r+1:1,this.node=this.text=null,this.hidden=kt(e,t)}function Oi(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Wa(e.doc,tt(e.doc,a),a);i=a+o.size,n.push(o)}return n}var Dr=null;function Os(e){Dr?Dr.ops.push(e):e.ownsGroup=Dr={ops:[e],delayedCallbacks:[]}}function Ls(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Ms(e,t){var r=e.ownsGroup;if(!r)return;try{Ls(r)}finally{Dr=null,t(r)}}var ei=null;function en(e,t){var r=it(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;Dr?i=Dr.delayedCallbacks:ei?i=ei:(i=ei=[],setTimeout(Ds,0));for(var a=function(l){i.push(function(){return r[l].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ds(){var e=ei;ei=null;for(var t=0;t<e.length;++t)e[t]()}function Ba(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ps(e,t):a=="gutter"?Xa(e,t,r,n):a=="class"?ta(e,t):a=="widget"&&Ns(e,t,n)}t.changes=null}function ti(e){return e.node==e.text&&(e.node=b("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),D&&L<8&&(e.node.style.zIndex=2)),e.node}function Rs(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ti(t);t.background=n.insertBefore(b("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ga(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zn(e,t)}function Ps(e,t){var r=t.text.className,n=Ga(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,ta(e,t)):r&&(t.text.className=r)}function ta(e,t){Rs(e,t),t.line.wrapClass?ti(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Xa(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ti(t);t.gutterBackground=b("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=ti(t),l=t.gutter=b("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),o.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(b("div",Ln(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var d=e.display.gutterSpecs[u].className,C=a.hasOwnProperty(d)&&a[d];C&&l.appendChild(b("div",[C],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function Ns(e,t,r){t.alignable&&(t.alignable=null);for(var n=me("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Ka(e,t,r)}function js(e,t,r,n){var i=Ga(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ta(e,t),Xa(e,t,r,n),Ka(e,t,n),t.node}function Ka(e,t,r){if($a(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)$a(e,t.rest[n],t,r,!1)}function $a(e,t,r,n,i){if(!t.widgets)return;for(var a=ti(r),o=0,l=t.widgets;o<l.length;++o){var u=l[o],d=b("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),en(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 ni(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!x(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),V(t.display.measure,b("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Qn(e,t){for(var r=Y(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Li(e){return e.lineSpace.offsetTop}function na(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Va(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=V(e.measure,b("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Wn(e){return ue-e.display.nativeBarWidth}function vr(e){return e.display.scroller.clientWidth-Wn(e)-e.display.barWidth}function ra(e){return e.display.scroller.clientHeight-Wn(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&vr(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var u=o[l],d=o[l+1];Math.abs(u.bottom-d.bottom)>2&&a.push((u.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function Ya(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(wt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=jn(t);var r=wt(t),n=e.display.externalMeasured=new Wa(e.doc,t,r);n.lineN=r;var i=n.built=Zn(e,n);return n.text=i.pre,V(e.display.lineMeasure,i.pre),n}function qa(e,t,r,n){return Bn(e,Rr(e,t),r,n)}function ia(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[xr(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Rr(e,t){var r=wt(t),n=ia(e,r);n&&!n.text?n=null:n&&n.changes&&(Ba(e,n,r,ca(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var i=Ya(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Bn(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=zs(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Ja={left:0,right:0,top:0,bottom:0};function Za(e,t,r){for(var n,i,a,o,l,u,d=0;d<e.length;d+=3)if(l=e[d],u=e[d+1],t<l?(i=0,a=1,o="left"):t<u?(i=t-l,a=i+1):(d==e.length-3||t==u&&e[d+3]>t)&&(a=u-l,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[d+2],l==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-l)for(;d<e.length-3&&e[d+3]==e[d+4]&&!e[d+5].insertLeft;)n=e[(d+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:l,coverEnd:u}}function Hs(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 zs(e,t,r,n){var i=Za(t.map,r,n),a=i.node,o=i.start,l=i.end,u=i.collapse,d;if(a.nodeType==3){for(var C=0;C<4;C++){for(;o&&we(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+l<i.coverEnd&&we(t.line.text.charAt(i.coverStart+l));)++l;if(D&&L<9&&o==0&&l==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Hs(z(a,o,l).getClientRects(),n),d.left||d.right||o==0)break;l=o,o=o-1,u="right"}D&&L<11&&(d=Ws(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(D&&L<9&&!o&&(!d||!d.left&&!d.right)){var Z=a.parentNode.getClientRects()[0];Z?d={left:Z.left,right:Z.left+Nr(e.display),top:Z.top,bottom:Z.bottom}:d=Ja}for(var $=d.top-t.rect.top,xe=d.bottom-t.rect.top,De=($+xe)/2,Ue=t.view.measure.heights,We=0;We<Ue.length-1&&!(De<Ue[We]);We++);var qe=We?Ue[We-1]:0,Be=Ue[We],nt={left:(u=="right"?d.right:d.left)-t.rect.left,right:(u=="left"?d.left:d.right)-t.rect.left,top:qe,bottom:Be};return!d.left&&!d.right&&(nt.bogus=!0),e.options.singleCursorHeightPerLine||(nt.rtop=$,nt.rbottom=xe),nt}function Ws(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Et(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Qa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function eo(e){e.display.externalMeasure=null,Oe(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Qa(e.display.view[t])}function ri(e){eo(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function to(){return K&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function no(){return K&&I?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function aa(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=ni(e.widgets[r]));return t}function Mi(e,t,r,n,i){if(!i){var a=aa(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=Pt(t);if(n=="local"?o+=Li(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();o+=l.top+(n=="window"?0:no());var u=l.left+(n=="window"?0:to());r.left+=u,r.right+=u}return r.top+=o,r.bottom+=o,r}function ro(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=to(),i-=no();else if(r=="local"||!r){var a=e.display.sizer.getBoundingClientRect();n+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:i-o.top}}function oa(e,t,r,n,i){return n||(n=tt(e.doc,t.line)),Mi(e,n,qa(e,n,t.ch,i),r)}function In(e,t,r,n,i,a){n=n||tt(e.doc,t.line),i||(i=Rr(e,n));function o(xe,De){var Ue=Bn(e,i,xe,De?"right":"left",a);return De?Ue.left=Ue.right:Ue.right=Ue.left,Mi(e,n,Ue,r)}var l=rt(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"),!l)return o(d=="before"?u-1:u,d=="before");function C(xe,De,Ue){var We=l[De],qe=We.level==1;return o(Ue?xe-1:xe,qe!=Ue)}var A=Ze(l,u,d),Z=Ke,$=C(u,A,d=="before");return Z!=null&&($.other=C(u,Z,d!="before")),$}function io(e,t){var r=0;t=ut(e.doc,t),e.options.lineWrapping||(r=Nr(e.display)*t.ch);var n=tt(e.doc,t.line),i=Pt(n)+Li(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function sa(e,t,r,n,i){var a=Pe(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function la(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return sa(n.first,0,null,-1,-1);var i=Sn(n,r),a=n.first+n.size-1;if(i>a)return sa(n.first+n.size-1,tt(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=tt(n,i);;){var l=Bs(e,o,i,t,r),u=Qi(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var d=u.find(1);if(d.line==i)return d;o=tt(n,i=d.line)}}function ao(e,t,r,n){n-=aa(t);var i=t.text.length,a=Ve(function(o){return Bn(e,r,o-1).bottom<=n},i,0);return i=Ve(function(o){return Bn(e,r,o).top>n},a,i),{begin:a,end:i}}function oo(e,t,r,n){r||(r=Rr(e,t));var i=Mi(e,t,Bn(e,r,n),"line").top;return ao(e,t,r,i)}function ua(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Bs(e,t,r,n,i){i-=Pt(t);var a=Rr(e,t),o=aa(t),l=0,u=t.text.length,d=!0,C=rt(t,e.doc.direction);if(C){var A=(e.options.lineWrapping?Xs:Gs)(e,t,r,a,C,n,i);d=A.level!=1,l=d?A.from:A.to-1,u=d?A.to:A.from-1}var Z=null,$=null,xe=Ve(function(ft){var ot=Bn(e,a,ft);return ot.top+=o,ot.bottom+=o,ua(ot,n,i,!1)?(ot.top<=i&&ot.left<=n&&(Z=ft,$=ot),!0):!1},l,u),De,Ue,We=!1;if($){var qe=n-$.left<$.right-n,Be=qe==d;xe=Z+(Be?0:1),Ue=Be?"after":"before",De=qe?$.left:$.right}else{!d&&(xe==u||xe==l)&&xe++,Ue=xe==0?"after":xe==t.text.length?"before":Bn(e,a,xe-(d?1:0)).bottom+o<=i==d?"after":"before";var nt=In(e,Pe(r,xe,Ue),"line",t,a);De=nt.left,We=i<nt.top?-1:i>=nt.bottom?1:0}return xe=Re(t.text,xe,1),sa(r,xe,Ue,We,n-De)}function Gs(e,t,r,n,i,a,o){var l=Ve(function(A){var Z=i[A],$=Z.level!=1;return ua(In(e,Pe(r,$?Z.to:Z.from,$?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[l];if(l>0){var d=u.level!=1,C=In(e,Pe(r,d?u.from:u.to,d?"after":"before"),"line",t,n);ua(C,a,o,!0)&&C.top>o&&(u=i[l-1])}return u}function Xs(e,t,r,n,i,a,o){var l=ao(e,t,n,o),u=l.begin,d=l.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var C=null,A=null,Z=0;Z<i.length;Z++){var $=i[Z];if($.from>=d||$.to<=u)continue;var xe=$.level!=1,De=Bn(e,n,xe?Math.min(d,$.to)-1:Math.max(u,$.from)).right,Ue=De<a?a-De+1e9:De-a;(!C||A>Ue)&&(C=$,A=Ue)}return C||(C=i[i.length-1]),C.from<u&&(C={from:u,to:C.to,level:C.level}),C.to>d&&(C={from:C.from,to:d,level:C.level}),C}var br;function Pr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(br==null){br=b("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)br.appendChild(document.createTextNode("x")),br.appendChild(b("br"));br.appendChild(document.createTextNode("x"))}V(e.measure,br);var r=br.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Oe(e.measure),r||1}function Nr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=b("span","xxxxxxxxxx"),r=b("pre",[t],"CodeMirror-line-like");V(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ca(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var l=e.display.gutterSpecs[o].className;r[l]=a.offsetLeft+a.clientLeft+i,n[l]=a.clientWidth}return{fixedPos:da(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function da(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function so(e){var t=Pr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Nr(e.display)-3);return function(i){if(kt(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return r?a+(Math.ceil(i.text.length/n)||1)*t:a+t}}function fa(e){var t=e.doc,r=so(e);t.iter(function(n){var i=r(n);i!=n.height&&hn(n,i)})}function yr(e,t,r,n){var i=e.display;if(!r&&Y(t).getAttribute("cm-not-content")=="true")return null;var a,o,l=i.lineSpace.getBoundingClientRect();try{a=t.clientX-l.left,o=t.clientY-l.top}catch(A){return null}var u=la(e,a,o),d;if(n&&u.xRel>0&&(d=tt(e.doc,u.line).text).length==u.ch){var C=m(d,d.length,e.options.tabSize)-d.length;u=Pe(u.line,Math.max(0,Math.round((a-Va(e.display).left)/Nr(e.display))-C))}return u}function xr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function mn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)pn&&mt(e.doc,t)<i.viewTo&&sr(e);else if(r<=i.viewFrom)pn&>(e.doc,r+n)>i.viewFrom?sr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)sr(e);else if(t<=i.viewFrom){var a=Di(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):sr(e)}else if(r>=i.viewTo){var o=Di(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):sr(e)}else{var l=Di(e,t,t,-1),u=Di(e,r,r+n,1);l&&u?(i.view=i.view.slice(0,l.index).concat(Oi(e,l.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):sr(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function or(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var a=n.view[xr(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);R(o,r)==-1&&o.push(r)}function sr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Di(e,t,r,n){var i=xr(e,t),a,o=e.display.view;if(!pn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,u=0;u<i;u++)l+=o[u].size;if(l!=t){if(n>0){if(i==o.length-1)return null;a=l+o[i].size-t,i++}else a=l-t;t+=a,r+=a}for(;mt(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Ks(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Oi(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Oi(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(xr(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,xr(e,r)))),n.viewTo=r}function lo(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function ii(e){e.display.input.showSelection(e.display.input.prepareSelection())}function uo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var l=r.sel.ranges[o];if(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)continue;var u=l.empty();(u||e.options.showCursorWhenSelecting)&&co(e,l.head,i),u||$s(e,l,a)}return n}function co(e,t,r){var n=In(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(b("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var a=r.appendChild(b("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Ri(e,t){return e.top-t.top||e.left-t.left}function $s(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=Va(e.display),l=o.left,u=Math.max(n.sizerWidth,vr(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function C(Be,nt,ft,ot){nt<0&&(nt=0),nt=Math.round(nt),ot=Math.round(ot),a.appendChild(b("div",null,"CodeMirror-selected","position: absolute; left: "+Be+`px;
|
|
top: `+nt+"px; width: "+(ft==null?u-Be:ft)+`px;
|
|
height: `+(ot-nt)+"px"))}function A(Be,nt,ft){var ot=tt(i,Be),xt=ot.text.length,Mt,Jt;function It(Wt,bn){return oa(e,Pe(Be,Wt),"div",ot,bn)}function En(Wt,bn,tn){var Xt=oo(e,ot,null,Wt),Bt=bn=="ltr"==(tn=="after")?"left":"right",Ft=tn=="after"?Xt.begin:Xt.end-(/\s/.test(ot.text.charAt(Xt.end-1))?2:1);return It(Ft,Bt)[Bt]}var vn=rt(ot,i.direction);return Xe(vn,nt||0,ft==null?xt:ft,function(Wt,bn,tn,Xt){var Bt=tn=="ltr",Ft=It(Wt,Bt?"left":"right"),yn=It(bn-1,Bt?"right":"left"),Vr=nt==null&&Wt==0,hr=ft==null&&bn==xt,on=Xt==0,Gn=!vn||Xt==vn.length-1;if(yn.top-Ft.top<=3){var Zt=(d?Vr:hr)&&on,Ia=(d?hr:Vr)&&Gn,tr=Zt?l:(Bt?Ft:yn).left,Sr=Ia?u:(Bt?yn:Ft).right;C(tr,Ft.top,Sr-tr,Ft.bottom)}else{var Tr,fn,Yr,Ua;Bt?(Tr=d&&Vr&&on?l:Ft.left,fn=d?u:En(Wt,tn,"before"),Yr=d?l:En(bn,tn,"after"),Ua=d&&hr&&Gn?u:yn.right):(Tr=d?En(Wt,tn,"before"):l,fn=!d&&Vr&&on?u:Ft.right,Yr=!d&&hr&&Gn?l:yn.left,Ua=d?En(bn,tn,"after"):u),C(Tr,Ft.top,fn-Tr,Ft.bottom),Ft.bottom<yn.top&&C(l,Ft.bottom,null,yn.top),C(Yr,yn.top,Ua-Yr,yn.bottom)}(!Mt||Ri(Ft,Mt)<0)&&(Mt=Ft),Ri(yn,Mt)<0&&(Mt=yn),(!Jt||Ri(Ft,Jt)<0)&&(Jt=Ft),Ri(yn,Jt)<0&&(Jt=yn)}),{start:Mt,end:Jt}}var Z=t.from(),$=t.to();if(Z.line==$.line)A(Z.line,Z.ch,$.ch);else{var xe=tt(i,Z.line),De=tt(i,$.line),Ue=jn(xe)==jn(De),We=A(Z.line,Z.ch,Ue?xe.text.length+1:null).end,qe=A($.line,Ue?0:null,$.ch).start;Ue&&(We.top<qe.top-2?(C(We.right,We.top,null,We.bottom),C(l,qe.top,qe.left,qe.bottom)):C(We.right,We.top,qe.left-We.right,We.bottom)),We.bottom<qe.top&&C(l,We.bottom,null,qe.top)}r.appendChild(a)}function ha(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||jr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function fo(e){e.state.focused||(e.display.input.focus(),pa(e))}function ho(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,jr(e))},100)}function pa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Se(e,"focus",e,t),e.state.focused=!0,P(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()),ha(e)}function jr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Se(e,"blur",e,t),e.state.focused=!1,he(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Pi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],a=e.options.lineWrapping,o=void 0,l=0;if(i.hidden)continue;if(D&&L<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&&(l=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var C=i.line.height-o;if((C>.005||C<-.005)&&(hn(i.line,o),po(i.line),i.rest))for(var A=0;A<i.rest.length;A++)po(i.rest[A]);if(l>e.display.sizerWidth){var Z=Math.ceil(l/Nr(e.display));Z>e.display.maxLineLength&&(e.display.maxLineLength=Z,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function po(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Ni(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Li(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,a=Sn(t,n),o=Sn(t,i);if(r&&r.ensure){var l=r.ensure.from.line,u=r.ensure.to.line;l<a?(a=l,o=Sn(t,Pt(tt(t,l))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=Sn(t,Pt(tt(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function Vs(e,t){if(Ne(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&&!G){var a=b("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Li(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Wn(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?Pe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Pe(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,l=In(e,t),u=!r||r==t?l:In(e,r);i={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-n,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+n};var d=ma(e,i),C=e.doc.scrollTop,A=e.doc.scrollLeft;if(d.scrollTop!=null&&(oi(e,d.scrollTop),Math.abs(e.doc.scrollTop-C)>1&&(o=!0)),d.scrollLeft!=null&&(wr(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-A)>1&&(o=!0)),!o)break}return i}function qs(e,t){var r=ma(e,t);r.scrollTop!=null&&oi(e,r.scrollTop),r.scrollLeft!=null&&wr(e,r.scrollLeft)}function ma(e,t){var r=e.display,n=Pr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=ra(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+na(r),u=t.top<n,d=t.bottom>l-n;if(t.top<i)o.scrollTop=u?0:t.top;else if(t.bottom>i+a){var C=Math.min(t.top,(d?l:t.bottom)-a);C!=i&&(o.scrollTop=C)}var A=e.options.fixedGutter?0:r.gutters.offsetWidth,Z=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-A,$=vr(e)-r.gutters.offsetWidth,xe=t.right-t.left>$;return xe&&(t.right=t.left+$),t.left<10?o.scrollLeft=0:t.left<Z?o.scrollLeft=Math.max(0,t.left+A-(xe?0:10)):t.right>$+Z-3&&(o.scrollLeft=t.right+(xe?0:10)-$),o}function ga(e,t){if(t==null)return;ji(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ir(e){ji(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ai(e,t,r){(t!=null||r!=null)&&ji(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Js(e,t){ji(e),e.curOp.scrollToPos=t}function ji(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=io(e,t.from),n=io(e,t.to);mo(e,r,n,t.margin)}}function mo(e,t,r,n){var i=ma(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});ai(e,i.scrollLeft,i.scrollTop)}function oi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;se||ba(e,{top:t}),go(e,t,!0),se&&ba(e),ui(e,100)}function go(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function wr(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,wo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function si(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+na(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Wn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Er=function(e,t,r){this.cm=r;var n=this.vert=b("div",[b("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=b("div",[b("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),ve(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,D&&L<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Er.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Er.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Er.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Er.prototype.zeroWidthHack=function(){var e=ae&&!le?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new w,this.disableVert=new w},Er.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),a=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Er.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var li=function(){};li.prototype.update=function(){return{bottom:0,right:0}},li.prototype.setScrollLeft=function(){},li.prototype.setScrollTop=function(){},li.prototype.clear=function(){};function Ur(e,t){t||(t=si(e));var r=e.display.barWidth,n=e.display.barHeight;vo(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Pi(e),vo(e,si(e)),r=e.display.barWidth,n=e.display.barHeight}function vo(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var bo={native:Er,null:li};function yo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&he(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),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"?wr(e,t):oi(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function Cr(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},Os(e.curOp)}function kr(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&&$t(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&va(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Pi(t),e.barMeasure=si(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=qa(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+Wn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-vr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&wr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==ee();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&xa(t,e.barMeasure),e.selectionChanged&&ha(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&fo(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&xo(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&go(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&wr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,ut(n,e.scrollToPos.from),ut(n,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var l=0;l<a.length;++l)a[l].lines.length||Se(a[l],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&Se(o[u],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Se(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function wn(e,t){if(e.curOp)return t();Cr(e);try{return t()}finally{kr(e)}}function Yt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Cr(e);try{return t.apply(e,arguments)}finally{kr(e)}}}function dn(e){return function(){if(this.curOp)return e.apply(this,arguments);Cr(this);try{return e.apply(this,arguments)}finally{kr(this)}}}function qt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Cr(t);try{return e.apply(this,arguments)}finally{kr(t)}}}function ui(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=fe(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,l=a.text.length>e.options.maxHighlightLength?On(t.mode,n.state):null,u=Dn(e,a,n,!0);l&&(n.state=l),a.styles=u.styles;var d=a.styleClasses,C=u.classes;C?a.styleClasses=C:d&&(a.styleClasses=null);for(var A=!o||o.length!=a.styles.length||d!=C&&(!d||!C||d.bgClass!=C.bgClass||d.textClass!=C.textClass),Z=0;!A&&Z<o.length;++Z)A=o[Z]!=a.styles[Z];A&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&et(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ui(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&wn(e,function(){for(var a=0;a<i.length;a++)or(e,i[a],"text")})}var Ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ni(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=vr(e),this.force=r,this.dims=ca(e),this.events=[]};Ii.prototype.signal=function(e,t){M(e,t)&&this.events.push(arguments)},Ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Se.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=Wn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Wn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=ee();if(!t||!x(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&x(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ll(e){if(!e||!e.activeElt||e.activeElt==ee())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&x(document.body,e.anchorNode)&&x(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function va(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return sr(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&lo(e)==0)return!1;Eo(e)&&(sr(e),t.dims=ca(e));var i=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<a&&a-r.viewFrom<20&&(a=Math.max(n.first,r.viewFrom)),r.viewTo>o&&r.viewTo-o<20&&(o=Math.min(i,r.viewTo)),pn&&(a=mt(e.doc,a),o=gt(e.doc,o));var l=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ks(e,a,o),r.viewOffset=Pt(tt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=lo(e);if(!l&&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,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ui(e,400)),r.updateLineNumbers=null,!0}function xo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==vr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+na(e.display)-ra(e),r.top)}),t.visible=Ni(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ni(e.display,e.doc,r));if(!va(e,t))break;Pi(e);var i=si(e);ii(e),Ur(e,i),xa(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ba(e,t){var r=new Ii(e,t);if(va(e,r)){Pi(e),xo(e,r);var n=si(e);ii(e),Ur(e,n),xa(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function l(xe){var De=xe.nextSibling;return T&&ae&&e.display.currentWheelTarget==xe?xe.style.display="none":xe.parentNode.removeChild(xe),De}for(var u=n.view,d=n.viewFrom,C=0;C<u.length;C++){var A=u[C];if(!A.hidden)if(!A.node||A.node.parentNode!=a){var Z=js(e,A,d,r);a.insertBefore(Z,o)}else{for(;o!=A.node;)o=l(o);var $=i&&t!=null&&t<=d&&A.lineNumber;A.changes&&(R(A.changes,"gutter")>-1&&($=!1),Ba(e,A,d,r)),$&&(Oe(A.lineNumber),A.lineNumber.appendChild(document.createTextNode(Ln(e.options,d)))),o=A.node.nextSibling}d+=A.size}for(;o;)o=l(o)}function ya(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function xa(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Wn(e)+"px"}function wo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=da(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=a),r[o].gutterBackground&&(r[o].gutterBackground.style.left=a));var l=r[o].alignable;if(l)for(var u=0;u<l.length;u++)l[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function Eo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Ln(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(b("div",[b("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ya(e.display),!0}return!1}function wa(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:a,style:o})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Co(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,l=t.appendChild(b("div",null,"CodeMirror-gutter "+a));o&&(l.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ya(e)}function ci(e){Co(e.display),mn(e),wo(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=b("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=b("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=J("div",null,"CodeMirror-code"),i.selectionDiv=b("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=b("div",null,"CodeMirror-cursors"),i.measure=b("div",null,"CodeMirror-measure"),i.lineMeasure=b("div",null,"CodeMirror-measure"),i.lineSpace=J("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=J("div",[i.lineSpace],"CodeMirror-lines");i.mover=b("div",[a],null,"position: relative"),i.sizer=b("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=b("div",null,null,"position: absolute; height: "+ue+"px; width: 1px;"),i.gutters=b("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=b("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=b("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),D&&L<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!T&&!(se&&oe)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=wa(n.gutters,n.lineNumbers),Co(i),r.init(i)}var Ui=0,_n=null;D?_n=-.53:se?_n=15:K?_n=-.7:Ce&&(_n=-1/3);function ko(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=ko(e);return t.x*=_n,t.y*=_n,t}function So(e,t){var r=ko(t),n=r.x,i=r.y,a=e.display,o=a.scroller,l=o.scrollWidth>o.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&l||i&&u))return;if(i&&ae&&T){e:for(var d=t.target,C=a.view;d!=o;d=d.parentNode)for(var A=0;A<C.length;A++)if(C[A].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!se&&!q&&_n!=null){i&&u&&oi(e,Math.max(0,o.scrollTop+i*_n)),wr(e,Math.max(0,o.scrollLeft+n*_n)),(!i||i&&u)&&f(t),a.wheelStartX=null;return}if(i&&_n!=null){var Z=i*_n,$=e.doc.scrollTop,xe=$+a.wrapper.clientHeight;Z<0?$=Math.max(0,$+Z-50):xe=Math.min(e.doc.height,xe+Z+50),ba(e,{top:$,bottom:xe})}Ui<20&&(a.wheelStartX==null?(a.wheelStartX=o.scrollLeft,a.wheelStartY=o.scrollTop,a.wheelDX=n,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX==null)return;var De=o.scrollLeft-a.wheelStartX,Ue=o.scrollTop-a.wheelStartY,We=Ue&&a.wheelDY&&Ue/a.wheelDY||De&&a.wheelDX&&De/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!We)return;_n=(_n*Ui+We)/(Ui+1),++Ui},200)):(a.wheelDX+=n,a.wheelDY+=i))}var An=function(e,t){this.ranges=e,this.primIndex=t};An.prototype.primary=function(){return this.ranges[this.primIndex]},An.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(!Tn(r.anchor,n.anchor)||!Tn(r.head,n.head))return!1}return!0},An.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new _t(Mn(this.ranges[t].anchor),Mn(this.ranges[t].head));return new An(e,this.primIndex)},An.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},An.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(dt(t,n.from())>=0&&dt(e,n.to())<=0)return r}return-1};var _t=function(e,t){this.anchor=e,this.head=t};_t.prototype.from=function(){return Kn(this.anchor,this.head)},_t.prototype.to=function(){return Fe(this.anchor,this.head)},_t.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Un(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(Z,$){return dt(Z.from(),$.from())}),r=R(t,i);for(var a=1;a<t.length;a++){var o=t[a],l=t[a-1],u=dt(l.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var d=Kn(l.from(),o.from()),C=Fe(l.to(),o.to()),A=l.empty()?o.from()==o.head:l.from()==l.head;a<=r&&--r,t.splice(--a,2,new _t(A?C:d,A?d:C))}}return new An(t,r)}function lr(e,t){return new An([new _t(e,t||e)],0)}function ur(e){return e.text?Pe(e.from.line+e.text.length-1,p(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function To(e,t){if(dt(e,t.from)<0)return e;if(dt(e,t.to)<=0)return ur(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ur(t).ch-t.to.ch),Pe(r,n)}function Ea(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new _t(To(i.anchor,t),To(i.head,t)))}return Un(e.cm,r,e.sel.primIndex)}function _o(e,t,r){return e.line==t.line?Pe(r.line,e.ch-t.ch+r.ch):Pe(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Pe(e.first,0),a=i,o=0;o<t.length;o++){var l=t[o],u=_o(l.from,i,a),d=_o(ur(l),i,a);if(i=l.to,a=d,r=="around"){var C=e.sel.ranges[o],A=dt(C.head,C.anchor)<0;n[o]=new _t(A?d:u,A?u:d)}else n[o]=new _t(u,u)}return new An(n,e.sel.primIndex)}function Ca(e){e.doc.mode=kn(e.options,e.doc.modeOption),di(e)}function di(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ui(e,100),e.state.modeGen++,e.curOp&&mn(e)}function Ao(e,t){return t.from.ch==0&&t.to.ch==0&&p(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ka(e,t,r,n){function i(qe){return r?r[qe]:null}function a(qe,Be,nt){qn(qe,Be,nt,n),en(qe,"change",qe,t)}function o(qe,Be){for(var nt=[],ft=qe;ft<Be;++ft)nt.push(new Vt(d[ft],i(ft),n));return nt}var l=t.from,u=t.to,d=t.text,C=tt(e,l.line),A=tt(e,u.line),Z=p(d),$=i(d.length-1),xe=u.line-l.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(Ao(e,t)){var De=o(0,d.length-1);a(A,A.text,$),xe&&e.remove(l.line,xe),De.length&&e.insert(l.line,De)}else if(C==A)if(d.length==1)a(C,C.text.slice(0,l.ch)+Z+C.text.slice(u.ch),$);else{var Ue=o(1,d.length-1);Ue.push(new Vt(Z+C.text.slice(u.ch),$,n)),a(C,C.text.slice(0,l.ch)+d[0],i(0)),e.insert(l.line+1,Ue)}else if(d.length==1)a(C,C.text.slice(0,l.ch)+d[0]+A.text.slice(u.ch),i(0)),e.remove(l.line+1,xe);else{a(C,C.text.slice(0,l.ch)+d[0],i(0)),a(A,Z+A.text.slice(u.ch),$);var We=o(1,d.length-1);xe>1&&e.remove(l.line+1,xe-1),e.insert(l.line+1,We)}en(e,"change",e,t)}function cr(e,t,r){function n(i,a,o){if(i.linked)for(var l=0;l<i.linked.length;++l){var u=i.linked[l];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,fa(e),Ca(e),Lo(e),e.options.lineWrapping||$t(e),e.options.mode=t.modeOption,mn(e)}function Lo(e){(e.doc.direction=="rtl"?P:he)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){wn(e,function(){Lo(e),mn(e)})}function Fi(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Sa(e,t){var r={from:Mn(t.from),to:ur(t),text:Qt(e,t.from,t.to)};return Ro(e,r,t.from.line,t.to.line+1),cr(e,function(n){return Ro(n,r,t.from.line,t.to.line+1)},!0),r}function Mo(e){for(;e.length;){var t=p(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Mo(e.done),p(e.done);if(e.done.length&&!p(e.done).ranges)return p(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),p(e.done)}function Do(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))l=p(o.changes),dt(t.from,t.to)==0&&dt(t.from,l.to)==0?l.to=ur(t):o.changes.push(Sa(e,t));else{var u=p(i.done);for((!u||!u.ranges)&&Hi(e.sel,i.done),o={changes:[Sa(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Se(e,"historyAdded")}function ml(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ml(e,a,p(i.done),t))?i.done[i.done.length-1]=t:Hi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Mo(i.undone)}function Hi(e,t){var r=p(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ro(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function Po(e,t){var r=bl(e,t),n=Vn(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var a=r[i],o=n[i];if(a&&o){e:for(var l=0;l<o.length;++l){for(var u=o[l],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 Fr(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?An.prototype.deepCopy.call(a):a);continue}var o=a.changes,l=[];n.push({changes:l});for(var u=0;u<o.length;++u){var d=o[u],C=void 0;if(l.push({from:d.from,to:d.to,text:d.text}),t)for(var A in d)(C=A.match(/^spans_(\d+)$/))&&(R(t,Number(C[1]))>-1&&(p(l)[A]=d[A],delete d[A]))}}return n}function Ta(e,t,r,n){if(n){var i=e.anchor;if(r){var a=dt(t,i)<0;a!=dt(r,i)<0?(i=t,t=r):a!=dt(t,r)<0&&(t=r)}return new _t(i,t)}else return new _t(r||t,t)}function zi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),an(e,new An([Ta(e.sel.primary(),t,r,i)],0),n)}function No(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=Ta(e.sel.ranges[a],t[a],null,i);var o=Un(e.cm,n,e.sel.primIndex);an(e,o,r)}function _a(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,an(e,Un(e.cm,i,e.sel.primIndex),n)}function jo(e,t,r,n){an(e,lr(t,r),n)}function yl(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var a=0;a<i.length;a++)this.ranges[a]=new _t(ut(e,i[a].anchor),ut(e,i[a].head))},origin:r&&r.origin};return Se(e,"beforeSelectionChange",e,n),e.cm&&Se(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Un(e.cm,n.ranges,n.ranges.length-1):t}function Io(e,t,r){var n=e.history.done,i=p(n);i&&i.ranges?(n[n.length-1]=t,Wi(e,t,r)):an(e,t,r)}function an(e,t,r){Wi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Wi(e,t,r){(M(e,"beforeSelectionChange")||e.cm&&M(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(dt(t.primary().head,e.sel.primary().head)<0?-1:1);Uo(e,Ho(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Ir(e.cm)}function Uo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,U(e.cm)),en(e,"cursorActivity",e)}function Fo(e){Uo(e,Ho(e,e.sel,null,!1))}function Ho(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=Bi(e,o.anchor,l&&l.anchor,r,n),d=Bi(e,o.head,l&&l.head,r,n);(i||u!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new _t(u,d))}return i?Un(e.cm,i,t.primIndex):t}function Hr(e,t,r,n,i){var a=tt(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var l=a.markedSpans[o],u=l.marker,d="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,C="selectRight"in u?!u.selectRight:u.inclusiveRight;if((l.from==null||(d?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(C?l.to>=t.ch:l.to>t.ch))){if(i&&(Se(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),Z=void 0;if((n<0?C:d)&&(A=zo(e,A,-n,A&&A.line==t.line?a:null)),A&&A.line==t.line&&(Z=dt(A,r))&&(n<0?Z<0:Z>0))return Hr(e,A,t,n,i)}var $=u.find(n<0?-1:1);return(n<0?d:C)&&($=zo(e,$,n,$.line==t.line?a:null)),$?Hr(e,$,t,n,i):null}}return t}function Bi(e,t,r,n,i){var a=n||1,o=Hr(e,t,r,a,i)||!i&&Hr(e,t,r,a,!0)||Hr(e,t,r,-a,i)||!i&&Hr(e,t,r,-a,!0);return o||(e.cantEdit=!0,Pe(e.first,0))}function zo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ut(e,Pe(t.line-1)):null:r>0&&t.ch==(n||tt(e,t.line)).text.length?t.line<e.first+e.size-1?Pe(t.line+1,0):null:new Pe(t.line,t.ch+r)}function Wo(e){e.setSelection(Pe(e.firstLine(),0),Pe(e.lastLine()),ne)}function Bo(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,a,o,l){i&&(n.from=ut(e,i)),a&&(n.to=ut(e,a)),o&&(n.text=o),l!==void 0&&(n.origin=l)}),Se(e,"beforeChange",e,n),e.cm&&Se(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 zr(e,t,r){if(e.cm){if(!e.cm.curOp)return Yt(e.cm,zr)(e,t,r);if(e.cm.state.suppressEdits)return}if((M(e,"beforeChange")||e.cm&&M(e.cm,"beforeChange"))&&(t=Bo(e,t,!0),!t))return;var n=Nn&&!r&&Lr(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Go(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Go(e,t)}function Go(e,t){if(t.text.length==1&&t.text[0]==""&&dt(t.from,t.to)==0)return;var r=Ea(e,t);Do(e,t,r,e.cm?e.cm.curOp.id:NaN),fi(e,t,r,Vn(e,t));var n=[];cr(e,function(i,a){!a&&R(n,i.history)==-1&&(Vo(i.history,t),n.push(i.history)),fi(i,t,null,Vn(i,t))})}function Gi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,l=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,d=0;d<l.length&&!(a=l[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==l.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=l.pop(),a.ranges){if(Hi(a,u),r&&!a.equals(e.sel)){an(e,a,{clearRedo:!1});return}o=a}else if(n){l.push(a);return}else break;var C=[];Hi(o,u),u.push({changes:C,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var A=M(e,"beforeChange")||e.cm&&M(e.cm,"beforeChange"),Z=function(De){var Ue=a.changes[De];if(Ue.origin=t,A&&!Bo(e,Ue,!1))return l.length=0,{};C.push(Sa(e,Ue));var We=De?Ea(e,Ue):p(l);fi(e,Ue,We,Po(e,Ue)),!De&&e.cm&&e.cm.scrollIntoView({from:Ue.from,to:ur(Ue)});var qe=[];cr(e,function(Be,nt){!nt&&R(qe,Be.history)==-1&&(Vo(Be.history,Ue),qe.push(Be.history)),fi(Be,Ue,null,Po(Be,Ue))})},$=a.changes.length-1;$>=0;--$){var xe=Z($);if(xe)return xe.v}}function Xo(e,t){if(t==0)return;if(e.first+=t,e.sel=new An(_(e.sel.ranges,function(i){return new _t(Pe(i.anchor.line+t,i.anchor.ch),Pe(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){mn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)or(e.cm,n,"gutter")}}function fi(e,t,r,n){if(e.cm&&!e.cm.curOp)return Yt(e.cm,fi)(e,t,r,n);if(t.to.line<e.first){Xo(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Xo(e,i),t={from:Pe(e.first,0),to:Pe(t.to.line+i,t.to.ch),text:[p(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Pe(a,tt(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qt(e,t.from,t.to),r||(r=Ea(e,t)),e.cm?xl(e.cm,t,n):ka(e,t,n),Wi(e,r,ne),e.cantEdit&&Bi(e,Pe(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=wt(jn(tt(n,a.line))),n.iter(u,o.line+1,function($){if($==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&U(e),ka(n,t,r,so(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function($){var xe=Ut($);xe>i.maxLineLength&&(i.maxLine=$,i.maxLineLength=xe,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),xn(n,a.line),ui(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?mn(e):a.line==o.line&&t.text.length==1&&!Ao(e.doc,t)?or(e,a.line,"text"):mn(e,a.line,o.line+1,d);var C=M(e,"changes"),A=M(e,"change");if(A||C){var Z={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};A&&en(e,"change",e,Z),C&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Z)}e.display.selForContextMenu=null}function Wr(e,t,r,n,i){var a;n||(n=r),dt(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),zr(e,{from:r,to:n,text:t,origin:i})}function Ko(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function $o(e,t,r,n){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var l=0;l<a.ranges.length;l++)Ko(a.ranges[l].anchor,t,r,n),Ko(a.ranges[l].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=Pe(d.from.line+n,d.from.ch),d.to=Pe(d.to.line+n,d.to.ch);else if(t<=d.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function Vo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;$o(e.done,r,n,i),$o(e.undone,r,n,i)}function hi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=tt(e,_r(e,t)):i=wt(t),i==null?null:(n(a,i)&&e.cm&&or(e.cm,i,r),a)}function pi(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}pi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,zt(i),en(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function mi(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}mi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var a=Math.min(t,i-e),o=n.height;if(n.removeInner(e,a),this.height-=o-n.height,i==a&&(this.children.splice(r--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof pi))){var l=[];this.collapse(l),this.children=[new pi(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,l=o;l<i.lines.length;){var u=new pi(i.lines.slice(l,l+=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 mi(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=R(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new mi(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,r))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var gi=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};gi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=wt(r);if(n==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var a=ni(this);hn(r,Math.max(0,r.height-a)),e&&(wn(e,function(){Yo(e,r,-a),or(e,n,"widget")}),en(e,"lineWidgetCleared",e,this,n))},gi.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=ni(this)-t;if(!i)return;kt(this.doc,n)||hn(n,n.height+i),r&&wn(r,function(){r.curOp.forceUpdate=!0,Yo(r,n,i),en(r,"lineWidgetChanged",r,e,wt(n))})},E(gi);function Yo(e,t,r){Pt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ga(e,r)}function wl(e,t,r,n){var i=new gi(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),hi(e,t,"widget",function(o){var l=o.widgets||(o.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!kt(e,o)){var u=Pt(o)<e.scrollTop;hn(o,o.height+ni(i)),u&&ga(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&en(a,"lineWidgetAdded",a,i,typeof t=="number"?t:wt(t)),i}var qo=0,dr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++qo};dr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Cr(e),M(this,"clear")){var r=this.find();r&&en(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],l=rr(o.markedSpans,this);e&&!this.collapsed?or(e,wt(o),"text"):e&&(l.to!=null&&(i=wt(o)),l.from!=null&&(n=wt(o))),o.markedSpans=Zi(o.markedSpans,l),l.from==null&&this.collapsed&&!kt(this.doc,o)&&e&&hn(o,Pr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var d=jn(this.lines[u]),C=Ut(d);C>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=C,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&mn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Fo(e.doc)),e&&en(e,"markerCleared",e,this,n,i),t&&kr(e),this.parent&&this.parent.clear()},dr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var a=this.lines[i],o=rr(a.markedSpans,this);if(o.from!=null&&(r=Pe(t?a:wt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Pe(t?a:wt(a),o.to),e==1))return n}return r&&{from:r,to:n}},dr.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;wn(n,function(){var i=t.line,a=wt(t.line),o=ia(n,a);if(o&&(Qa(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!kt(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var u=ni(r)-l;u&&hn(i,i.height+u)}en(n,"markerChanged",n,e)})},dr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||R(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},dr.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},E(dr);function Br(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Yt(e.cm,Br)(e,t,r,n,i);var a=new dr(e,i),o=dt(t,r);if(n&&s(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=J("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ea(e,t.line,t,r,a)||t.line!=r.line&&ea(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ti()}a.addToHistory&&Do(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,u=e.cm,d;if(e.iter(l,r.line+1,function(A){u&&a.collapsed&&!u.options.lineWrapping&&jn(A)==u.display.maxLine&&(d=!0),a.collapsed&&l!=t.line&&hn(A,0),_i(A,new pr(a,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),a.collapsed&&e.iter(t.line,r.line+1,function(A){kt(e,A)&&hn(A,0)}),a.clearOnEnter&&ve(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Si(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++qo,a.atomic=!0),u){if(d&&(u.curOp.updateMaxLine=!0),a.collapsed)mn(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var C=t.line;C<=r.line;C++)or(u,C,"text");a.atomic&&Fo(u.doc),en(u,"markerAdded",u,a)}return a}var vi=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};vi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();en(this,"clear")},vi.prototype.find=function(e,t){return this.primary.find(e,t)},E(vi);function El(e,t,r,n,i){n=s(n),n.shared=!1;var a=[Br(e,t,r,n,i)],o=a[0],l=n.widgetNode;return cr(e,function(u){l&&(n.widgetNode=l.cloneNode(!0)),a.push(Br(u,ut(u,t),ut(u,r),n,i));for(var d=0;d<u.linked.length;++d)if(u.linked[d].isParent)return;o=p(a)}),new vi(a,o)}function Jo(e){return e.findMarks(Pe(e.first,0),e.clipPos(Pe(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(dt(a,o)){var l=Br(e,a,o,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function kl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];cr(i.primary.doc,function(u){return a.push(u)});for(var o=0;o<i.markers.length;o++){var l=i.markers[o];R(a,l.doc)==-1&&(l.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,gn=function(e,t,r,n,i){if(!(this instanceof gn))return new gn(e,t,r,n,i);r==null&&(r=0),mi.call(this,[new pi([new Vt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Pe(r,0);this.sel=lr(a),this.history=new Fi(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ka(this,{from:a,to:a,text:e}),an(this,lr(a),ne)};gn.prototype=te(mi.prototype,{constructor:gn,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Xn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:qt(function(e){var t=Pe(this.first,0),r=this.first+this.size-1;zr(this,{from:t,to:Pe(r,tt(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ai(this.cm,0,0),an(this,lr(t),ne)}),replaceRange:function(e,t,r,n){t=ut(this,t),r=r?ut(this,r):t,Wr(this,e,t,r,n)},getRange:function(e,t,r){var n=Qt(this,ut(this,e),ut(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Pn(this,e))return tt(this,e)},getLineNumber:function(e){return wt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=tt(this,e)),jn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ut(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:qt(function(e,t,r){jo(this,ut(this,typeof e=="number"?Pe(e,t||0):e),null,r)}),setSelection:qt(function(e,t,r){jo(this,ut(this,e),ut(this,t||e),r)}),extendSelection:qt(function(e,t,r){zi(this,ut(this,e),t&&ut(this,t),r)}),extendSelections:qt(function(e,t){No(this,zn(this,e),t)}),extendSelectionsBy:qt(function(e,t){var r=_(this.sel.ranges,e);No(this,zn(this,r),t)}),setSelections:qt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new _t(ut(this,e[i].anchor),ut(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),an(this,Un(this.cm,n,t),r)}),addSelection:qt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new _t(ut(this,e),ut(this,t||e))),an(this,Un(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=Qt(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Qt(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:qt(function(e,t,r){for(var n=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];n[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:r}}for(var l=t&&t!="end"&&fl(this,n,t),u=n.length-1;u>=0;u--)zr(this,n[u]);l?Io(this,l):this.cm&&Ir(this.cm)}),undo:qt(function(){Gi(this,"undo")}),redo:qt(function(){Gi(this,"redo")}),undoSelection:qt(function(){Gi(this,"undo",!0)}),redoSelection:qt(function(){Gi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Fi(this.history.maxGeneration),cr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Fr(this.history.done),undone:Fr(this.history.undone)}},setHistory:function(e){var t=this.history=new Fi(this.history.maxGeneration);t.done=Fr(e.done.slice(0),null,!0),t.undone=Fr(e.undone.slice(0),null,!0)},setGutterMarker:qt(function(e,t,r){return hi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Ie(i)&&(n.gutterMarkers=null),!0})}),clearGutter:qt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&hi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Ie(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Pn(this,e))return null;if(t=e,e=tt(this,e),!e)return null}else if(t=wt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:qt(function(e,t,r){return hi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(me(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:qt(function(e,t,r){return hi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[i];if(a)if(r==null)n[i]=null;else{var o=a.match(me(r));if(!o)return!1;var l=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||l==a.length?"":" ")+a.slice(l)||null}else return!1;return!0})}),addLineWidget:qt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Br(this,ut(this,e),ut(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=ut(this,e),Br(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ut(this,e);var t=[],r=tt(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=ut(this,e),t=ut(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var l=0;l<o.length;l++){var u=o[l];!(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}),ut(this,Pe(r,t))},indexFromPos:function(e){e=ut(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new gn(Xn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new gn(Xn(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 Nt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),kl(Jo(this));break}if(e.history==this.history){var n=[e.id];cr(e,function(i){return n.push(i.id)},!0),e.history=new Fi(null),e.history.done=Fr(this.history.done,n),e.history.undone=Fr(this.history.undone,n)}},iterLinkedDocs:function(e){cr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):bt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:qt(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&hl(this.cm)})}),gn.prototype.eachLine=gn.prototype.iter;var Zo=0;function Tl(e){var t=this;if(Qo(t),Ne(t,e)||Qn(t.display,e))return;f(e),D&&(Zo=+new Date);var r=yr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,a=Array(i),o=0,l=function(){++o==i&&Yt(t,function(){r=ut(t.doc,r);var $={from:r,to:r,text:t.doc.splitLines(a.filter(function(xe){return xe!=null}).join(t.doc.lineSeparator())),origin:"paste"};zr(t.doc,$),Io(t.doc,lr(ut(t.doc,r),ut(t.doc,ur($))))})()},u=function($,xe){if(t.options.allowDropFileTypes&&R(t.options.allowDropFileTypes,$.type)==-1){l();return}var De=new FileReader;De.onerror=function(){return l()},De.onload=function(){var Ue=De.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ue)){l();return}a[xe]=Ue,l()},De.readAsText($)},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 C=e.dataTransfer.getData("Text");if(C){var A;if(t.state.draggingText&&!t.state.draggingText.copy&&(A=t.listSelections()),Wi(t.doc,lr(r,r)),A)for(var Z=0;Z<A.length;++Z)Wr(t.doc,"",A[Z].anchor,A[Z].head,"drag");t.replaceSelection(C,"around","paste"),t.display.input.focus()}}catch($){}}}function _l(e,t){if(D&&(!e.state.draggingText||+new Date-Zo<100)){y(t);return}if(Ne(e,t)||Qn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ce){var r=b("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",q&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),q&&r.parentNode.removeChild(r)}}function Al(e,t){var r=yr(e,t);if(!r)return;var n=document.createDocumentFragment();co(e,r,n),e.display.dragCursor||(e.display.dragCursor=b("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),V(e.display.dragCursor,n)}function Qo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function es(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var a=0;a<r.length;a++)e(r[a])})}var ts=!1;function Ol(){if(ts)return;Ll(),ts=!0}function Ll(){var e;ve(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,es(Ml)},100))}),ve(window,"blur",function(){return es(jr)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var fr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},bi=0;bi<10;bi++)fr[bi+48]=fr[bi+96]=String(bi);for(var Xi=65;Xi<=90;Xi++)fr[Xi]=String.fromCharCode(Xi);for(var yi=1;yi<=12;yi++)fr[yi+111]=fr[yi+63235]="F"+yi;var er={};er.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},er.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},er.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},er.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},er.default=ae?er.macDefault:er.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var l=t[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Rl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=_(r.split(" "),Dl),a=0;a<i.length;a++){var o=void 0,l=void 0;a==i.length-1?(l=i.join(" "),o=n):(l=i.slice(0,a+1).join(" "),o="...");var u=t[l];if(!u)t[l]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var d in t)e[d]=t[d];return e}function Gr(e,t,r,n){t=Ki(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 Gr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Gr(e,t.fallthrough[a],r,n);if(o)return o}}}function ns(e){var t=typeof e=="string"?e:fr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function rs(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(ke?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(ke?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function is(e,t){if(q&&e.keyCode==34&&e.char)return!1;var r=fr[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),rs(r,e,t))}function Ki(e){return typeof e=="string"?er[e]:e}function Xr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&dt(a.from,p(n).to)<=0;){var o=n.pop();if(dt(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}wn(e,function(){for(var l=n.length-1;l>=0;l--)Wr(e.doc,"",n[l].from,n[l].to,"+delete");Ir(e)})}function Aa(e,t,r){var n=Re(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Oa(e,t,r){var n=Aa(e,t.ch,r);return n==null?null:new Pe(t.line,n,r<0?"after":"before")}function La(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=rt(r,t.doc.direction);if(a){var o=i<0?p(a):a[0],l=i<0==(o.level==1),u=l?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var C=Rr(t,r);d=i<0?r.text.length-1:0;var A=Bn(t,C,d).top;d=Ve(function(Z){return Bn(t,C,Z).top==A},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=Aa(r,d,1))}else d=i<0?o.to:o.from;return new Pe(n,d,u)}}return new Pe(n,i<0?r.text.length:0,i<0?"before":"after")}function Pl(e,t,r,n){var i=rt(t,e.doc.direction);if(!i)return Oa(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=Ze(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 Oa(t,r,n);var l=function(We,qe){return Aa(t,We instanceof Pe?We.ch:We,qe)},u,d=function(We){return e.options.lineWrapping?(u=u||Rr(e,t),oo(e,t,u,We)):{begin:0,end:t.text.length}},C=d(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var A=o.level==1==n<0,Z=l(r,A?1:-1);if(Z!=null&&(A?Z<=o.to&&Z<=C.end:Z>=o.from&&Z>=C.begin)){var $=A?"before":"after";return new Pe(r.line,Z,$)}}var xe=function(We,qe,Be){for(var nt=function(Mt,Jt){return Jt?new Pe(r.line,l(Mt,1),"before"):new Pe(r.line,Mt,"after")};We>=0&&We<i.length;We+=qe){var ft=i[We],ot=qe>0==(ft.level!=1),xt=ot?Be.begin:l(Be.end,-1);if(ft.from<=xt&&xt<ft.to)return nt(xt,ot);if(xt=ot?ft.from:l(ft.to,-1),Be.begin<=xt&&xt<Be.end)return nt(xt,ot)}},De=xe(a+n,n,C);if(De)return De;var Ue=n>0?C.end:l(C.begin,-1);return Ue!=null&&!(n>0&&Ue==t.text.length)&&(De=xe(n>0?0:i.length-1,n,d(Ue)),De)?De:null}var xi={selectAll:Wo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ne)},killLine:function(e){return Xr(e,function(t){if(t.empty()){var r=tt(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Pe(t.head.line+1,0)}:{from:t.head,to:Pe(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xr(e,function(t){return{from:Pe(t.from().line,0),to:ut(e.doc,Pe(t.to().line+1,0))}})},delLineLeft:function(e){return Xr(e,function(t){return{from:Pe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Xr(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 Xr(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(Pe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Pe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return os(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},ce)},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")},ce)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?os(e,t.head):n},ce)},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(re(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,a=tt(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Pe(i.line,i.ch-1)),i.ch>0)i=new Pe(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Pe(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=tt(e.doc,i.line-1).text;o&&(i=new Pe(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Pe(i.line-1,o.length-1),i,"+transpose"))}}r.push(new _t(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return wn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Ir(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function as(e,t){var r=tt(e.doc,t),n=jn(r);return n!=r&&(t=wt(n)),La(!0,e,n,t,1)}function Nl(e,t){var r=tt(e.doc,t),n=Ha(r);return n!=r&&(t=wt(n)),La(!0,e,r,t,-1)}function os(e,t){var r=as(e,t.line),n=tt(e.doc,r.line),i=rt(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 Pe(r.line,o?0:a,r.sticky)}return r}function $i(e,t,r){if(typeof t=="string"&&(t=xi[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=ye}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function jl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Gr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Gr(t,e.options.extraKeys,r,e)||Gr(t,e.options.keyMap,r,e)}var Il=new w;function wi(e,t,r,n){var i=e.state.keySeq;if(i){if(ns(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ss(e,i+" "+t,r,n))return!0}return ss(e,t,r,n)}function ss(e,t,r,n){var i=jl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&en(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(f(r),ha(e)),!!i}function ls(e,t){var r=is(t,!0);return r?t.shiftKey&&!e.state.keySeq?wi(e,"Shift-"+r,t,function(n){return $i(e,n,!0)})||wi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $i(e,n)}):wi(e,r,t,function(n){return $i(e,n)}):!1}function Ul(e,t,r){return wi(e,"'"+r+"'",t,function(n){return $i(e,n,!0)})}var Ma=null;function us(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=ee(),Ne(t,e))return;D&&L<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ls(t,e);q&&(Ma=n?r:null,!n&&r==88&&!Dt&&(ae?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),se&&!ae&&!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;P(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(he(t,"CodeMirror-crosshair"),Qe(document,"keyup",r),Qe(document,"mouseover",r))}ve(document,"keyup",r),ve(document,"mouseover",r)}function cs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ne(this,e)}function ds(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Qn(t.display,e)||Ne(t,e)||e.ctrlKey&&!e.altKey||ae&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(q&&r==Ma){Ma=null,f(e);return}if(q&&(!e.which||e.which<10)&&ls(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Ul(t,e,i))return;t.display.input.onKeyPress(e)}var Hl=400,Da=function(e,t,r){this.time=e,this.pos=t,this.button=r};Da.prototype.compare=function(e,t,r){return this.time+Hl>e&&dt(t,this.pos)==0&&r==this.button};var Ei,Ci;function zl(e,t){var r=+new Date;return Ci&&Ci.compare(r,e,t)?(Ei=Ci=null,"triple"):Ei&&Ei.compare(r,e,t)?(Ci=new Da(r,e,t),Ei=null,"double"):(Ei=new Da(r,e,t),Ci=null,"single")}function fs(e){var t=this,r=t.display;if(Ne(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Qn(r,e)){T||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ra(t,e))return;var n=yr(t,e),i=de(e),a=n?zl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&Wl(t,i,n,a,e))return;i==1?n?Gl(t,n,a,e):Y(e)==r.scroller&&f(e):i==2?(n&&zi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(je?t.display.input.onContextMenu(e):ho(t))}function Wl(e,t,r,n,i){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,wi(e,rs(a,i),i,function(o){if(typeof o=="string"&&(o=xi[o]),!o)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=o(e,r)!=ye}finally{e.state.suppressEdits=!1}return l})}function Bl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=_e?r.shiftKey&&r.metaKey:r.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=ae?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ae?r.altKey:r.ctrlKey)),i}function Gl(e,t,r,n){D?setTimeout(c(fo,e),0):e.curOp.focus=ee();var i=Bl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Me&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(dt((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(dt(o.to(),t)>0||t.xRel<0)?Xl(e,n,t,i):Kl(e,n,t,i)}function Xl(e,t,r,n){var i=e.display,a=!1,o=Yt(e,function(d){T&&(i.scroller.draggable=!1),e.state.draggingText=!1,Qe(i.wrapper.ownerDocument,"mouseup",o),Qe(i.wrapper.ownerDocument,"mousemove",l),Qe(i.scroller,"dragstart",u),Qe(i.scroller,"drop",o),a||(f(d),n.addNew||zi(e.doc,r,null,null,n.extend),T&&!Ce||D&&L==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},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",l),ve(i.scroller,"dragstart",u),ve(i.scroller,"drop",o),ho(e),setTimeout(function(){return i.input.focus()},20)}function hs(e,t,r){if(r=="char")return new _t(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new _t(Pe(t.line,0),ut(e.doc,Pe(t.line+1,0)));var n=r(e,t);return new _t(n.from,n.to)}function Kl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,l,u=a.sel,d=u.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(r),l>-1?o=d[l]:o=new _t(r,r)):(o=a.sel.primary(),l=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new _t(r,r)),r=yr(e,t,!0,!0),l=-1;else{var C=hs(e,r,n.unit);n.extend?o=Ta(o,C.anchor,C.head,n.extend):o=C}n.addNew?l==-1?(l=d.length,an(a,Un(e,d.concat([o]),l),{scroll:!1,origin:"*mouse"})):d.length>1&&d[l].empty()&&n.unit=="char"&&!n.extend?(an(a,Un(e,d.slice(0,l).concat(d.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):_a(a,l,o,be):(l=0,an(a,new An([o],0),be),u=a.sel);var A=r;function Z(Be){if(dt(A,Be)==0)return;if(A=Be,n.unit=="rectangle"){for(var nt=[],ft=e.options.tabSize,ot=m(tt(a,r.line).text,r.ch,ft),xt=m(tt(a,Be.line).text,Be.ch,ft),Mt=Math.min(ot,xt),Jt=Math.max(ot,xt),It=Math.min(r.line,Be.line),En=Math.min(e.lastLine(),Math.max(r.line,Be.line));It<=En;It++){var vn=tt(a,It).text,Wt=Q(vn,Mt,ft);Mt==Jt?nt.push(new _t(Pe(It,Wt),Pe(It,Wt))):vn.length>Wt&&nt.push(new _t(Pe(It,Wt),Pe(It,Q(vn,Jt,ft))))}nt.length||nt.push(new _t(r,r)),an(a,Un(e,u.ranges.slice(0,l).concat(nt),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Be)}else{var bn=o,tn=hs(e,Be,n.unit),Xt=bn.anchor,Bt;dt(tn.anchor,Xt)>0?(Bt=tn.head,Xt=Kn(bn.from(),tn.anchor)):(Bt=tn.anchor,Xt=Fe(bn.to(),tn.head));var Ft=u.ranges.slice(0);Ft[l]=$l(e,new _t(ut(a,Xt),Bt)),an(a,Un(e,Ft,l),be)}}var $=i.wrapper.getBoundingClientRect(),xe=0;function De(Be){var nt=++xe,ft=yr(e,Be,!0,n.unit=="rectangle");if(!ft)return;if(dt(ft,A)!=0){e.curOp.focus=ee(),Z(ft);var ot=Ni(i,a);(ft.line>=ot.to||ft.line<ot.from)&&setTimeout(Yt(e,function(){xe==nt&&De(Be)}),150)}else{var xt=Be.clientY<$.top?-20:Be.clientY>$.bottom?20:0;xt&&setTimeout(Yt(e,function(){if(xe!=nt)return;i.scroller.scrollTop+=xt,De(Be)}),50)}}function Ue(Be){e.state.selectingText=!1,xe=Infinity,Be&&(f(Be),i.input.focus()),Qe(i.wrapper.ownerDocument,"mousemove",We),Qe(i.wrapper.ownerDocument,"mouseup",qe),a.history.lastSelOrigin=null}var We=Yt(e,function(Be){Be.buttons===0||!de(Be)?Ue(Be):De(Be)}),qe=Yt(e,Ue);e.state.selectingText=qe,ve(i.wrapper.ownerDocument,"mousemove",We),ve(i.wrapper.ownerDocument,"mouseup",qe)}function $l(e,t){var r=t.anchor,n=t.head,i=tt(e.doc,r.line);if(dt(r,n)==0&&r.sticky==n.sticky)return t;var a=rt(i);if(!a)return t;var o=Ze(a,r.ch,r.sticky),l=a[o];if(l.from!=r.ch&&l.to!=r.ch)return t;var u=o+(l.from==r.ch==(l.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 C=Ze(a,n.ch,n.sticky),A=C-o||(n.ch-r.ch)*(l.level==1?-1:1);C==u-1||C==u?d=A<0:d=A>0}var Z=a[u+(d?-1:0)],$=d==(Z.level==1),xe=$?Z.from:Z.to,De=$?"after":"before";return r.ch==xe&&r.sticky==De?t:new _t(new Pe(r.line,xe,De),n)}function ps(e,t,r,n){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(Z){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(a>l.bottom||!M(e,r))return v(t);a-=l.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 C=Sn(e.doc,a),A=e.display.gutterSpecs[u];return Se(e,r,e,C,A.className,t),v(t)}}}function Ra(e,t){return ps(e,t,"gutterClick",!0)}function ms(e,t){if(Qn(e.display,t)||Vl(e,t))return;if(Ne(e,t,"contextmenu"))return;je||e.display.input.onContextMenu(t)}function Vl(e,t){return M(e,"gutterContextMenu")?ps(e,t,"gutterContextMenu",!1):!1}function gs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ri(e)}var Kr={toString:function(){return"CodeMirror.Init"}},vs={},Vi={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(l,u,d){d!=Kr&&a(l,u,d)}:a)}e.defineOption=r,e.Init=Kr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Ca(n)},!0),r("indentUnit",2,Ca,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){di(n),ri(n),mn(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!i)return;var a=[],o=n.doc.first;n.doc.iter(function(u){for(var d=0;;){var C=u.text.indexOf(i,d);if(C==-1)break;d=C+i.length,a.push(Pe(o,C))}o++});for(var l=a.length-1;l>=0;l--)Wr(n.doc,i,a[l],Pe(a[l].line,a[l].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Kr&&n.refresh()}),r("specialCharPlaceholder",Qr,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",oe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!He),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){gs(n),ci(n)},!0),r("keyMap","default",function(n,i,a){var o=Ki(i),l=a!=Kr&&Ki(a);l&&l.detach&&l.detach(n,o),o.attach&&o.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Jl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=wa(i,n.options.lineNumbers),ci(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?da(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Ur(n)},!0),r("scrollbarStyle","native",function(n){yo(n),Ur(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=wa(n.options.gutters,i),ci(n)},!0),r("firstLineNumber",1,ci,!0),r("lineNumberFormatter",function(n){return n},ci,!0),r("showCursorWhenSelecting",!1,ii,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(jr(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,ql),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,ii,!0),r("singleCursorHeightPerLine",!0,ii,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,di,!0),r("addModeClass",!1,di,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,di,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function ql(e,t,r){var n=r&&r!=Kr;if(!t!=!n){var i=e.display.dragFunctions,a=t?ve:Qe;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 Jl(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(he(e.display.wrapper,"CodeMirror-wrap"),$t(e)),fa(e),mn(e),ri(e),setTimeout(function(){return Ur(e)},100)}function Nt(e,t){var r=this;if(!(this instanceof Nt))return new Nt(e,t);this.options=t=t?s(t):{},s(vs,t,!1);var n=t.value;typeof n=="string"?n=new gn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Nt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,gs(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),yo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new w,keySeq:null,specialChars:null},t.autofocus&&!oe&&a.input.focus(),D&&L<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Ol(),Cr(this),this.curOp.forceUpdate=!0,Oo(this,n),t.autofocus&&!oe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&pa(r)},20):jr(this);for(var o in Vi)Vi.hasOwnProperty(o)&&Vi[o](this,t[o],Kr);Eo(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Pa.length;++l)Pa[l](this);kr(this),T&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Nt.defaults=vs,Nt.optionHandlers=Vi;function Zl(e){var t=e.display;ve(t.scroller,"mousedown",Yt(e,fs)),D&&L<11?ve(t.scroller,"dblclick",Yt(e,function(u){if(Ne(e,u))return;var d=yr(e,u);if(!d||Ra(e,u)||Qn(e.display,u))return;f(u);var C=e.findWordAt(d);zi(e.doc,C.anchor,C.head)})):ve(t.scroller,"dblclick",function(u){return Ne(e,u)||f(u)}),ve(t.scroller,"contextmenu",function(u){return ms(e,u)}),ve(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||ms(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 C=d.left-u.left,A=d.top-u.top;return C*C+A*A>20*20}ve(t.scroller,"touchstart",function(u){if(!Ne(e,u)&&!a(u)&&!Ra(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&&!Qn(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var C=e.coordsChar(t.activeTouch,"page"),A;!d.prev||o(d,d.prev)?A=new _t(C,C):!d.prev.prev||o(d,d.prev.prev)?A=e.findWordAt(C):A=new _t(Pe(C.line,0),ut(e.doc,Pe(C.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&&(oi(e,t.scroller.scrollTop),wr(e,t.scroller.scrollLeft,!0),Se(e,"scroll",e))}),ve(t.scroller,"mousewheel",function(u){return So(e,u)}),ve(t.scroller,"DOMMouseScroll",function(u){return So(e,u)}),ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Ne(e,u)||y(u)},over:function(u){Ne(e,u)||(Al(e,u),y(u))},start:function(u){return _l(e,u)},drop:Yt(e,Tl),leave:function(u){Ne(e,u)||Qo(e)}};var l=t.input.getField();ve(l,"keyup",function(u){return cs.call(e,u)}),ve(l,"keydown",Yt(e,us)),ve(l,"keypress",Yt(e,ds)),ve(l,"focus",function(u){return pa(e,u)}),ve(l,"blur",function(u){return jr(e,u)})}var Pa=[];Nt.defineInitHook=function(e){return Pa.push(e)};function ki(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=fe(e,t).state:r="prev");var o=e.options.tabSize,l=tt(i,t),u=m(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var d=l.text.match(/^\s*/)[0],C;if(!n&&!/\S/.test(l.text))C=0,r="not";else if(r=="smart"&&(C=i.mode.indent(a,l.text.slice(d.length),l.text),C==ye||C>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?C=m(tt(i,t-1).text,null,o):C=0:r=="add"?C=u+e.options.indentUnit:r=="subtract"?C=u-e.options.indentUnit:typeof r=="number"&&(C=u+r),C=Math.max(0,C);var A="",Z=0;if(e.options.indentWithTabs)for(var $=Math.floor(C/o);$;--$)Z+=o,A+=" ";if(Z<C&&(A+=re(C-Z)),A!=d)return Wr(i,A,Pe(t,0),Pe(t,d.length),"+input"),l.stateAfter=null,!0;for(var xe=0;xe<i.sel.ranges.length;xe++){var De=i.sel.ranges[xe];if(De.head.line==t&&De.head.ch<d.length){var Ue=Pe(t,d.length);_a(i,xe,new _t(Ue,Ue));break}}}var Fn=null;function Yi(e){Fn=e}function Na(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,l=i=="paste"||e.state.pasteIncoming>o,u=bt(t),d=null;if(l&&n.ranges.length>1)if(Fn&&Fn.text.join(`
|
|
`)==t){if(n.ranges.length%Fn.text.length==0){d=[];for(var C=0;C<Fn.text.length;C++)d.push(a.splitLines(Fn.text[C]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=_(u,function(We){return[We]}));for(var A=e.curOp.updateInput,Z=n.ranges.length-1;Z>=0;Z--){var $=n.ranges[Z],xe=$.from(),De=$.to();$.empty()&&(r&&r>0?xe=Pe(xe.line,xe.ch-r):e.state.overwrite&&!l?De=Pe(De.line,Math.min(tt(a,De.line).text.length,De.ch+p(u).length)):l&&Fn&&Fn.lineWise&&Fn.text.join(`
|
|
`)==u.join(`
|
|
`)&&(xe=De=Pe(xe.line,0)));var Ue={from:xe,to:De,text:d?d[Z%d.length]:u,origin:i||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};zr(e.doc,Ue),en(e,"inputRead",e,Ue)}t&&!l&&ys(e,t),Ir(e),e.curOp.updateInput<2&&(e.curOp.updateInput=A),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function bs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&wn(t,function(){return Na(t,r,0,null,"paste")}),!0}function ys(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var l=0;l<a.electricChars.length;l++)if(t.indexOf(a.electricChars.charAt(l))>-1){o=ki(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(tt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=ki(e,i.head.line,"smart")));o&&en(e,"electricInput",e,i.head.line)}}function xs(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,a={anchor:Pe(i,0),head:Pe(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function ws(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Es(){var e=b("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=b("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return T?e.style.width="1000px":e.setAttribute("wrap","off"),j&&(e.style.border="1px solid black"),ws(e),t}function Ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var a=this.options,o=a[n];if(a[n]==i&&n!="mode")return;a[n]=i,t.hasOwnProperty(n)&&Yt(this,t[n])(this,i,o),Se(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"](Ki(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==n||i[a].name==n)return i.splice(a,1),!0},addOverlay:dn(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");g(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,mn(this)}),removeOverlay:dn(function(n){for(var i=this.state.overlays,a=0;a<i.length;++a){var o=i[a].modeSpec;if(o==n||typeof n=="string"&&o.name==n){i.splice(a,1),this.state.modeGen++,mn(this);return}}}),indentLine:dn(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Pn(this.doc,n)&&ki(this,n,i,a)}),indentSelection:dn(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var l=i[o];if(l.empty())l.head.line>a&&(ki(this,l.head.line,n,!0),a=l.head.line,o==this.doc.sel.primIndex&&Ir(this));else{var u=l.from(),d=l.to(),C=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var A=C;A<a;++A)ki(this,A,n);var Z=this.doc.sel.ranges;u.ch==0&&i.length==Z.length&&Z[o].from().ch>0&&_a(this.doc,o,new _t(u,Z[o].to()),ne)}}}),getTokenAt:function(n,i){return Kt(this,n,i)},getLineTokens:function(n,i){return Kt(this,Pe(n),i,!0)},getTokenTypeAt:function(n){n=ut(this.doc,n);var i=st(this,tt(this.doc,n.line)),a=0,o=(i.length-1)/2,l=n.ch,u;if(l==0)u=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=l)o=d;else if(i[d*2+1]<l)a=d+1;else{u=i[d*2+2];break}}var C=u?u.indexOf("overlay "):-1;return C<0?u:C==0?null:u.slice(0,C-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var a=[];if(!r.hasOwnProperty(i))return a;var o=r[i],l=this.getModeAt(n);if(typeof l[i]=="string")o[l[i]]&&a.push(o[l[i]]);else if(l[i])for(var u=0;u<l[i].length;u++){var d=o[l[i][u]];d&&a.push(d)}else l.helperType&&o[l.helperType]?a.push(o[l.helperType]):o[l.name]&&a.push(o[l.name]);for(var C=0;C<o._global.length;C++){var A=o._global[C];A.pred(l,this)&&R(a,A.val)==-1&&a.push(A.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=_r(a,n==null?a.first+a.size-1:n),fe(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=ut(this.doc,n):a=n?o.from():o.to(),In(this,a,i||"page")},charCoords:function(n,i){return oa(this,ut(this.doc,n),i||"page")},coordsChar:function(n,i){return n=ro(this,n,i||"page"),la(this,n.left,n.top)},lineAtHeight:function(n,i){return n=ro(this,{top:n,left:0},i||"page").top,Sn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,l;if(typeof n=="number"){var u=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>u&&(n=u,o=!0),l=tt(this.doc,n)}else l=n;return Mi(this,l,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Pt(l):0)},defaultTextHeight:function(){return Pr(this.display)},defaultCharWidth:function(){return Nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,l){var u=this.display;n=In(this,ut(this.doc,n));var d=n.bottom,C=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),Z=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),C+i.offsetWidth>Z&&(C=Z-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",l=="right"?(C=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?C=0:l=="middle"&&(C=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=C+"px"),a&&qs(this,{left:C,top:d,right:C+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:dn(us),triggerOnKeyPress:dn(ds),triggerOnKeyUp:cs,triggerOnMouseDown:dn(fs),execCommand:function(n){if(xi.hasOwnProperty(n))return xi[n].call(null,this)},triggerElectric:dn(function(n){ys(this,n)}),findPosH:function(n,i,a,o){var l=1;i<0&&(l=-1,i=-i);for(var u=ut(this.doc,n),d=0;d<i&&!(u=ja(this.doc,u,l,a,o),u.hitSide);++d);return u},moveH:dn(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?ja(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},ce)}),deleteH:dn(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Xr(this,function(l){var u=ja(o,l.head,n,i,!1);return n<0?{from:u,to:l.head}:{from:l.head,to:u}})}),findPosV:function(n,i,a,o){var l=1,u=o;i<0&&(l=-1,i=-i);for(var d=ut(this.doc,n),C=0;C<i;++C){var A=In(this,d,"div");if(u==null?u=A.left:A.left=u,d=Cs(this,A,l,a),d.hitSide)break}return d},moveV:dn(function(n,i){var a=this,o=this.doc,l=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(C){if(u)return n<0?C.from():C.to();var A=In(a,C.head,"div");C.goalColumn!=null&&(A.left=C.goalColumn),l.push(A.left);var Z=Cs(a,A,n,i);return i=="page"&&C==o.sel.primary()&&ga(a,oa(a,Z,"div").top-A.top),Z},ce),l.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=l[d]}),findWordAt:function(n){var i=this.doc,a=tt(i,n.line).text,o=n.ch,l=n.ch;if(a){var u=this.getHelper(n,"wordChars");(n.sticky=="before"||l==a.length)&&o?--o:++l;for(var d=a.charAt(o),C=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&&C(a.charAt(o-1));)--o;for(;l<a.length&&C(a.charAt(l));)++l}return new _t(Pe(n.line,o),Pe(n.line,l))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?P(this.display.cursorDiv,"CodeMirror-overwrite"):he(this.display.cursorDiv,"CodeMirror-overwrite"),Se(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==ee()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dn(function(n,i){ai(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Wn(this)-this.display.barHeight,width:n.scrollWidth-Wn(this)-this.display.barWidth,clientHeight:ra(this),clientWidth:vr(this)}},scrollIntoView:dn(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Pe(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?Js(this,n):mo(this,n.from,n.to,n.margin)}),setSize:dn(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&&eo(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(u){if(u.widgets){for(var d=0;d<u.widgets.length;d++)if(u.widgets[d].noHScroll){or(a,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Se(this,"refresh",this)}),operation:function(n){return wn(this,n)},startOperation:function(){return Cr(this)},endOperation:function(){return kr(this)},refresh:dn(function(){var n=this.display.cachedTextHeight;mn(this),this.curOp.forceUpdate=!0,ri(this),ai(this,this.doc.scrollLeft,this.doc.scrollTop),ya(this.display),(n==null||Math.abs(n-Pr(this.display))>.5||this.options.lineWrapping)&&fa(this),Se(this,"refresh",this)}),swapDoc:dn(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Oo(this,n),ri(this),this.display.input.reset(),ai(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,en(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},E(e),e.registerHelper=function(n,i,a){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=a},e.registerGlobalHelper=function(n,i,a,o){e.registerHelper(n,i,o),r[n]._global.push({pred:a,val:o})}}function ja(e,t,r,n,i){var a=t,o=r,l=tt(e,t.line),u=i&&e.direction=="rtl"?-r:r;function d(){var qe=t.line+u;return qe<e.first||qe>=e.first+e.size?!1:(t=new Pe(qe,t.ch,t.sticky),l=tt(e,qe))}function C(qe){var Be;if(n=="codepoint"){var nt=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(nt)?Be=null:Be=new Pe(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(nt>=55296&&nt<56320?2:1))),-r)}else i?Be=Pl(e.cm,l,t,r):Be=Oa(l,t,r);if(Be==null)if(!qe&&d())t=La(i,e.cm,l,t.line,u);else return!1;else t=Be;return!0}if(n=="char"||n=="codepoint")C();else if(n=="column")C(!0);else if(n=="word"||n=="group")for(var A=null,Z=n=="group",$=e.cm&&e.cm.getHelper(t,"wordChars"),xe=!0;!(r<0&&!C(!xe));xe=!1){var De=l.text.charAt(t.ch)||`
|
|
`,Ue=Te(De,$)?"w":Z&&De==`
|
|
`?"n":!Z||/\s/.test(De)?null:"p";if(Z&&!xe&&!Ue&&(Ue="s"),A&&A!=Ue){r<0&&(r=1,C(),t.sticky="after");break}if(Ue&&(A=Ue),r>0&&!C(!xe))break}var We=Bi(e,t,a,o,!0);return Tn(a,We)&&(We.hitSide=!0),We}function Cs(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*Pr(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=la(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var Ot=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new w,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ot.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;ws(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(l){for(var u=l.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(l){if(!a(l)||Ne(n,l)||bs(l,n))return;L<=11&&setTimeout(Yt(n,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),ve(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),ve(i,"compositionend",function(l){t.composing&&(l.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(l){if(!a(l)||Ne(n,l))return;if(n.somethingSelected())Yi({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=xs(n);Yi({lineWise:!0,text:u.text}),l.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,ne),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var d=Fn.text.join(`
|
|
`);if(l.clipboardData.setData("Text",d),l.clipboardData.getData("Text")==d){l.preventDefault();return}}var C=Es(),A=C.firstChild;n.display.lineSpace.insertBefore(C,n.display.lineSpace.firstChild),A.value=Fn.text.join(`
|
|
`);var Z=document.activeElement;S(A),setTimeout(function(){n.display.lineSpace.removeChild(C),Z.focus(),Z==i&&r.showPrimarySelection()},50)}ve(i,"copy",o),ve(i,"cut",o)},Ot.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ot.prototype.prepareSelection=function(){var e=uo(this.cm,!1);return e.focus=document.activeElement==this.div,e},Ot.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Ot.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ot.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=qi(t,e.anchorNode,e.anchorOffset),o=qi(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&dt(Kn(a,o),n)==0&&dt(Fe(a,o),i)==0)return;var l=t.display.view,u=n.line>=t.display.viewFrom&&ks(t,n)||{node:l[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&ks(t,i);if(!d){var C=l[l.length-1].measure,A=C.maps?C.maps[C.maps.length-1]:C.map;d={node:A[A.length-1],offset:A[A.length-2]-A[A.length-3]}}if(!u||!d){e.removeAllRanges();return}var Z=e.rangeCount&&e.getRangeAt(0),$;try{$=z(u.node,u.offset,d.offset,d.node)}catch(xe){}$&&(!se&&t.state.focused?(e.collapse(u.node,u.offset),$.collapsed||(e.removeAllRanges(),e.addRange($))):(e.removeAllRanges(),e.addRange($)),Z&&e.anchorNode==null?e.addRange(Z):se&&this.startGracePeriod()),this.rememberSelection()},Ot.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)},Ot.prototype.showMultipleSelections=function(e){V(this.cm.display.cursorDiv,e.cursors),V(this.cm.display.selectionDiv,e.selection)},Ot.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ot.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return x(this.div,t)},Ot.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ot.prototype.blur=function(){this.div.blur()},Ot.prototype.getField=function(){return this.div},Ot.prototype.supportsTouch=function(){return!0},Ot.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():wn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Ot.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ot.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(I&&K&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var r=qi(t,e.anchorNode,e.anchorOffset),n=qi(t,e.focusNode,e.focusOffset);r&&n&&wn(t,function(){an(t.doc,lr(r,n),ne),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},Ot.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=Pe(n.line-1,tt(e.doc,n.line-1).length)),i.ch==tt(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Pe(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,l;n.line==t.viewFrom||(a=xr(e,n.line))==0?(o=wt(t.view[0].line),l=t.view[0].node):(o=wt(t.view[a].line),l=t.view[a-1].node.nextSibling);var u=xr(e,i.line),d,C;if(u==t.view.length-1?(d=t.viewTo-1,C=t.lineDiv.lastChild):(d=wt(t.view[u+1].line)-1,C=t.view[u+1].node.previousSibling),!l)return!1;for(var A=e.doc.splitLines(tu(e,l,C,o,d)),Z=Qt(e.doc,Pe(o,0),Pe(d,tt(e.doc,d).text.length));A.length>1&&Z.length>1;)if(p(A)==p(Z))A.pop(),Z.pop(),d--;else if(A[0]==Z[0])A.shift(),Z.shift(),o++;else break;for(var $=0,xe=0,De=A[0],Ue=Z[0],We=Math.min(De.length,Ue.length);$<We&&De.charCodeAt($)==Ue.charCodeAt($);)++$;for(var qe=p(A),Be=p(Z),nt=Math.min(qe.length-(A.length==1?$:0),Be.length-(Z.length==1?$:0));xe<nt&&qe.charCodeAt(qe.length-xe-1)==Be.charCodeAt(Be.length-xe-1);)++xe;if(A.length==1&&Z.length==1&&o==n.line)for(;$&&$>n.ch&&qe.charCodeAt(qe.length-xe-1)==Be.charCodeAt(Be.length-xe-1);)$--,xe++;A[A.length-1]=qe.slice(0,qe.length-xe).replace(/^\u200b+/,""),A[0]=A[0].slice($).replace(/\u200b+$/,"");var ft=Pe(o,$),ot=Pe(d,Z.length?p(Z).length-xe:0);if(A.length>1||A[0]||dt(ft,ot))return Wr(e.doc,A,ft,ot,"+input"),!0},Ot.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ot.prototype.reset=function(){this.forceCompositionEnd()},Ot.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Ot.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)},Ot.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&wn(this.cm,function(){return mn(e.cm)})},Ot.prototype.setUneditable=function(e){e.contentEditable="false"},Ot.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Yt(this.cm,Na)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Ot.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ot.prototype.onContextMenu=function(){},Ot.prototype.resetPosition=function(){},Ot.prototype.needsContentAttribute=!0;function ks(e,t){var r=ia(e,t.line);if(!r||r.hidden)return null;var n=tt(e.doc,t.line),i=Ya(r,n,t.line),a=rt(n,e.doc.direction),o="left";if(a){var l=Ze(a,t.ch);o=l%2?"right":"left"}var u=Za(i.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function $r(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,l=e.doc.lineSeparator(),u=!1;function d($){return function(xe){return xe.id==$}}function C(){o&&(a+=l,u&&(a+=l),o=u=!1)}function A($){$&&(C(),a+=$)}function Z($){if($.nodeType==1){var xe=$.getAttribute("cm-text");if(xe){A(xe);return}var De=$.getAttribute("cm-marker"),Ue;if(De){var We=e.findMarks(Pe(n,0),Pe(i+1,0),d(+De));We.length&&(Ue=We[0].find(0))&&A(Qt(e.doc,Ue.from,Ue.to).join(l));return}if($.getAttribute("contenteditable")=="false")return;var qe=/^(pre|div|p|li|table|br)$/i.test($.nodeName);if(!/^br$/i.test($.nodeName)&&$.textContent.length==0)return;qe&&C();for(var Be=0;Be<$.childNodes.length;Be++)Z($.childNodes[Be]);/^(pre|p)$/i.test($.nodeName)&&(u=!0),qe&&(o=!0)}else $.nodeType==3&&A($.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Z(t),t==r);)t=t.nextSibling,u=!1;return a}function qi(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return $r(e.clipPos(Pe(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return nu(a,t,r)}}function nu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!x(n,t))return $r(Pe(wt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?p(e.rest):e.line;return $r(Pe(wt(a),a.text.length),i)}var o=t.nodeType==3?t:null,l=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var u=e.measure,d=u.maps;function C(Ue,We,qe){for(var Be=-1;Be<(d?d.length:0);Be++)for(var nt=Be<0?u.map:d[Be],ft=0;ft<nt.length;ft+=3){var ot=nt[ft+2];if(ot==Ue||ot==We){var xt=wt(Be<0?e.line:e.rest[Be]),Mt=nt[ft]+qe;return(qe<0||ot!=Ue)&&(Mt=nt[ft+(qe?1:0)]),Pe(xt,Mt)}}}var A=C(o,l,r);if(A)return $r(A,i);for(var Z=l.nextSibling,$=o?o.nodeValue.length-r:0;Z;Z=Z.nextSibling){if(A=C(Z,Z.firstChild,0),A)return $r(Pe(A.line,A.ch-$),i);$+=Z.textContent.length}for(var xe=l.previousSibling,De=r;xe;xe=xe.previousSibling){if(A=C(xe,xe.firstChild,-1),A)return $r(Pe(A.line,A.ch+De),i);De+=xe.textContent.length}}var Ht=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new w,this.hasSelection=!1,this.composing=null};Ht.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),j&&(i.style.width="0px"),ve(i,"input",function(){D&&L>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),ve(i,"paste",function(o){if(Ne(n,o)||bs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Ne(n,o))return;if(n.somethingSelected())Yi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=xs(n);Yi({lineWise:!0,text:l.text}),o.type=="cut"?n.setSelections(l.ranges,null,ne):(r.prevInput="",i.value=l.text.join(`
|
|
`),S(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(Qn(e,o)||Ne(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=o.clipboardData,i.dispatchEvent(l)}),ve(e.lineSpace,"selectstart",function(o){Qn(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)})},Ht.prototype.createField=function(e){this.wrapper=Es(),this.textarea=this.wrapper.firstChild},Ht.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ht.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=uo(e);if(e.options.moveInputWithCursor){var i=In(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},Ht.prototype.showSelection=function(e){var t=this.cm,r=t.display;V(r.cursorDiv,e.cursors),V(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ht.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&S(this.textarea),D&&L>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",D&&L>=9&&(this.hasSelection=null))},Ht.prototype.getField=function(){return this.textarea},Ht.prototype.supportsTouch=function(){return!1},Ht.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!oe||ee()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ht.prototype.blur=function(){this.textarea.blur()},Ht.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ht.prototype.receivedFocus=function(){this.slowPoll()},Ht.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()})},Ht.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)},Ht.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||lt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(D&&L>=9&&this.hasSelection===i||ae&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(n.length,i.length);o<l&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return wn(t,function(){Na(t,i.slice(o),n.length-o,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ht.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ht.prototype.onKeyPress=function(){D&&L>=9&&(this.hasSelection=null),this.fastPoll()},Ht.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=yr(r,e),o=n.scroller.scrollTop;if(!a||q)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(a)==-1&&Yt(r,an)(r.doc,lr(a),ne);var u=i.style.cssText,d=t.wrapper.style.cssText,C=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-C.top-5)+"px; left: "+(e.clientX-C.left-5)+`px;
|
|
z-index: 1000; background: `+(D?"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=$,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Z(){if(i.selectionStart!=null){var De=r.somethingSelected(),Ue="\u200B"+(De?i.value:"");i.value="\u21DA",i.value=Ue,t.prevInput=De?"":"\u200B",i.selectionStart=1,i.selectionEnd=Ue.length,n.selForContextMenu=r.doc.sel}}function $(){if(t.contextMenuPending!=$)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,D&&L<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!D||D&&L<9)&&Z();var De=0,Ue=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Yt(r,Wo)(r):De++<10?n.detectingSelectAll=setTimeout(Ue,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ue,200)}}if(D&&L>=9&&Z(),je){y(e);var xe=function(){Qe(window,"mouseup",xe),setTimeout($,20)};ve(window,"mouseup",xe)}else setTimeout($,50)},Ht.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ht.prototype.setUneditable=function(){},Ht.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?s(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=ee();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.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&&(Qe(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Nt(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return l}function iu(e){e.off=Qe,e.on=ve,e.wheelEventPixels=dl,e.Doc=gn,e.splitLines=bt,e.countColumn=m,e.findColumn=Q,e.isWordChar=ie,e.Pass=ye,e.signal=Se,e.Line=Vt,e.changeEnd=ur,e.scrollbarModel=bo,e.Pos=Pe,e.cmpPos=dt,e.modes=Tt,e.mimeModes=yt,e.resolveMode=sn,e.getMode=kn,e.modeExtensions=nn,e.extendMode=nr,e.copyState=On,e.startState=Hn,e.innerMode=Rn,e.commands=xi,e.keyMap=er,e.keyName=is,e.isModifierKey=ns,e.lookupKey=Gr,e.normalizeKeyMap=Rl,e.StringStream=Lt,e.SharedTextMarker=vi,e.TextMarker=dr,e.LineWidget=gi,e.e_preventDefault=f,e.e_stopPropagation=h,e.e_stop=y,e.addClass=P,e.contains=x,e.rmClass=he,e.keyNames=fr}Yl(Nt),Ql(Nt);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ji in gn.prototype)gn.prototype.hasOwnProperty(Ji)&&R(au,Ji)<0&&(Nt.prototype[Ji]=function(e){return function(){return e.apply(this.doc,arguments)}}(gn.prototype[Ji]));return E(gn),Nt.inputStyles={textarea:Ht,contenteditable:Ot},Nt.defineMode=function(e){!Nt.defaults.mode&&e!="null"&&(Nt.defaults.mode=e),Gt.apply(this,arguments)},Nt.defineMIME=Cn,Nt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Nt.defineMIME("text/plain","null"),Nt.defineExtension=function(e,t){Nt.prototype[e]=t},Nt.defineDocExtension=function(e,t){gn.prototype[e]=t},Nt.fromTextArea=ru,iu(Nt),Nt.version="5.58.2",Nt})},Y1PL:function(ht,Je,k){"use strict";k.r(Je),k.d(Je,"ResizableTextArea",function(){return R});var F=k("wx14"),ge=k("1OyB"),se=k("vuIU"),Ae=k("Ji7U"),Ee=k("LK+K"),X=k("q1tI"),D=k("VTBJ"),L=k("rePB"),T=k("Zm9Q"),H=k("Kwbf"),K=k("c+Xe"),q=k("m+aA"),Ce=k("bdgK"),le=new Map;function G(ne){ne.forEach(function(be){var ce,Q=be.target;(ce=le.get(Q))===null||ce===void 0||ce.forEach(function(W){return W(Q)})})}var j=new Ce.default(G),I=null,oe=null;function ae(ne,be){le.has(ne)||(le.set(ne,new Set),j.observe(ne)),le.get(ne).add(be)}function _e(ne,be){le.has(ne)&&(le.get(ne).delete(be),le.get(ne).size||(j.unobserve(ne),le.delete(ne)))}var He=function(ne){Object(Ae.a)(ce,ne);var be=Object(Ee.a)(ce);function ce(){return Object(ge.a)(this,ce),be.apply(this,arguments)}return Object(se.a)(ce,[{key:"render",value:function(){return this.props.children}}]),ce}(X.Component),pe=X.createContext(null);function ke(ne){var be=ne.children,ce=ne.onBatchResize,Q=X.useRef(0),W=X.useRef([]),re=X.useContext(pe),p=X.useCallback(function(_,g,N){Q.current+=1;var te=Q.current;W.current.push({size:_,element:g,data:N}),Promise.resolve().then(function(){te===Q.current&&(ce==null||ce(W.current),W.current=[])}),re==null||re(_,g,N)},[ce,re]);return X.createElement(pe.Provider,{value:p},be)}function je(ne){var be=ne.children,ce=ne.disabled,Q=X.useRef(null),W=X.useRef(null),re=X.useContext(pe),p=X.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),_=X.isValidElement(be)&&Object(K.c)(be),g=_?be.ref:null,N=X.useMemo(function(){return Object(K.a)(g,Q)},[g,Q]),te=X.useRef(ne);te.current=ne;var B=X.useCallback(function(ie){var Te=te.current,Ie=Te.onResize,Le=Te.data,we=ie.getBoundingClientRect(),Re=we.width,Ve=we.height,Xe=ie.offsetWidth,Ke=ie.offsetHeight,Ze=Math.floor(Re),ct=Math.floor(Ve);if(p.current.width!==Ze||p.current.height!==ct||p.current.offsetWidth!==Xe||p.current.offsetHeight!==Ke){var rt={width:Ze,height:ct,offsetWidth:Xe,offsetHeight:Ke};p.current=rt;var Ye=Xe===Math.round(Re)?Re:Xe,ve=Ke===Math.round(Ve)?Ve:Ke,it=Object(D.a)(Object(D.a)({},rt),{},{offsetWidth:Ye,offsetHeight:ve});re==null||re(it,ie,Le),Ie&&Promise.resolve().then(function(){Ie(it,ie)})}},[]);return X.useEffect(function(){var ie=Object(q.a)(Q.current)||Object(q.a)(W.current);return ie&&!ce&&ae(ie,B),function(){return _e(ie,B)}},[Q.current,ce]),X.createElement(He,{ref:W},_?X.cloneElement(be,{ref:N}):be)}var me="rc-observer-key";function he(ne){var be=ne.children,ce=Object(T.a)(be);return ce.map(function(Q,W){var re=(Q==null?void 0:Q.key)||"".concat(me,"-").concat(W);return X.createElement(je,Object(F.a)({},ne,{key:re}),Q)})}he.Collection=ke;var Oe=he,V=k("bT9E"),b=k("TSYQ"),J=k.n(b),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
|
|
`,x=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],ee={},P;function O(ne){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ce=ne.getAttribute("id")||ne.getAttribute("data-reactid")||ne.getAttribute("name");if(be&&ee[ce])return ee[ce];var Q=window.getComputedStyle(ne),W=Q.getPropertyValue("box-sizing")||Q.getPropertyValue("-moz-box-sizing")||Q.getPropertyValue("-webkit-box-sizing"),re=parseFloat(Q.getPropertyValue("padding-bottom"))+parseFloat(Q.getPropertyValue("padding-top")),p=parseFloat(Q.getPropertyValue("border-bottom-width"))+parseFloat(Q.getPropertyValue("border-top-width")),_=x.map(function(N){return"".concat(N,":").concat(Q.getPropertyValue(N))}).join(";"),g={sizingStyle:_,paddingSize:re,borderSize:p,boxSizing:W};return be&&ce&&(ee[ce]=g),g}function S(ne){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),document.body.appendChild(P)),ne.getAttribute("wrap")?P.setAttribute("wrap",ne.getAttribute("wrap")):P.removeAttribute("wrap");var W=O(ne,be),re=W.paddingSize,p=W.borderSize,_=W.boxSizing,g=W.sizingStyle;P.setAttribute("style","".concat(g,";").concat(z)),P.value=ne.value||ne.placeholder||"";var N=Number.MIN_SAFE_INTEGER,te=Number.MAX_SAFE_INTEGER,B=P.scrollHeight,ie;if(_==="border-box"?B+=p:_==="content-box"&&(B-=re),ce!==null||Q!==null){P.value=" ";var Te=P.scrollHeight-re;ce!==null&&(N=Te*ce,_==="border-box"&&(N=N+re+p),B=Math.max(N,B)),Q!==null&&(te=Te*Q,_==="border-box"&&(te=te+re+p),ie=B>te?"":"hidden",B=Math.min(te,B))}return{height:B,minHeight:N,maxHeight:te,overflowY:ie,resize:"none"}}var c=k("Gytx"),s=k.n(c),m;(function(ne){ne[ne.NONE=0]="NONE",ne[ne.RESIZING=1]="RESIZING",ne[ne.RESIZED=2]="RESIZED"})(m||(m={}));var w=function(ne){Object(Ae.a)(ce,ne);var be=Object(Ee.a)(ce);function ce(Q){var W;return Object(ge.a)(this,ce),W=be.call(this,Q),W.nextFrameActionId=void 0,W.resizeFrameId=void 0,W.textArea=void 0,W.saveTextArea=function(re){W.textArea=re},W.handleResize=function(re){var p=W.state.resizeStatus,_=W.props,g=_.autoSize,N=_.onResize;if(p!==m.NONE)return;typeof N=="function"&&N(re),g&&W.resizeOnNextFrame()},W.resizeOnNextFrame=function(){cancelAnimationFrame(W.nextFrameActionId),W.nextFrameActionId=requestAnimationFrame(W.resizeTextarea)},W.resizeTextarea=function(){var re=W.props.autoSize;if(!re||!W.textArea)return;var p=re.minRows,_=re.maxRows,g=S(W.textArea,!1,p,_);W.setState({textareaStyles:g,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 re=W.props,p=re.prefixCls,_=p===void 0?"rc-textarea":p,g=re.autoSize,N=re.onResize,te=re.className,B=re.disabled,ie=W.state,Te=ie.textareaStyles,Ie=ie.resizeStatus,Le=Object(V.a)(W.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),we=J()(_,te,Object(L.a)({},"".concat(_,"-disabled"),B));"value"in Le&&(Le.value=Le.value||"");var Re=Object(D.a)(Object(D.a)(Object(D.a)({},W.props.style),Te),Ie===m.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return X.createElement(Oe,{onResize:W.handleResize,disabled:!(g||N)},X.createElement("textarea",Object(F.a)({},Le,{className:we,style:Re,ref:W.saveTextArea})))},W.state={textareaStyles:{},resizeStatus:m.NONE},W}return Object(se.a)(ce,[{key:"componentDidUpdate",value:function(W){(W.value!==this.props.value||!s()(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,re=this.textArea.selectionEnd;this.textArea.setSelectionRange(W,re)}}catch(p){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ce}(X.Component),R=w,ue=function(ne){Object(Ae.a)(ce,ne);var be=Object(Ee.a)(ce);function ce(Q){var W;Object(ge.a)(this,ce),W=be.call(this,Q),W.resizableTextArea=void 0,W.focus=function(){W.resizableTextArea.textArea.focus()},W.saveTextArea=function(p){W.resizableTextArea=p},W.handleChange=function(p){var _=W.props.onChange;W.setValue(p.target.value,function(){W.resizableTextArea.resizeTextarea()}),_&&_(p)},W.handleKeyDown=function(p){var _=W.props,g=_.onPressEnter,N=_.onKeyDown;p.keyCode===13&&g&&g(p),N&&N(p)};var re=typeof Q.value=="undefined"||Q.value===null?Q.defaultValue:Q.value;return W.state={value:re},W}return Object(se.a)(ce,[{key:"setValue",value:function(W,re){"value"in this.props||this.setState({value:W},re)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return X.createElement(R,Object(F.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}}]),ce}(X.Component),ye=Je.default=ue},ZW9T:function(ht,Je,k){"use strict";k.d(Je,"a",function(){return He});var F=k("k1fw"),ge=k("miYZ"),se=k("tsqr"),Ae=k("rAM+"),Ee=k("tJVT"),X=k("PpiC"),D=k("q1tI"),L=k.n(D),T=k("bdgK");function H(pe,ke,je,me,he){var Oe=ke.getWordUntilPosition(je),V={startLineNumber:je.lineNumber,endLineNumber:je.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},b=me.map(function(J){return{label:J,kind:pe.languages.CompletionItemKind.Keyword,insertText:J,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:V}});return he.map(function(J){b.push(Object(F.a)(Object(F.a)({},J),{},{range:V}))}),b}var K=function(pe){var ke={label:"ifelse",kind:pe.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet},je=["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"];pe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(V,b){var J=H(pe,V,b,je,[ke]);return{suggestions:J}}});var me=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];pe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(V,b){var J=[{label:"print",kind:pe.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet}],z=H(pe,V,b,me,J);return{suggestions:z}}});var he=["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"];pe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(V,b){var J=[ke,{label:"main",kind:pe.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:pe.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet}],z=H(pe,V,b,he,J);return{suggestions:z}}})},q="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",Ce=k("LvDl");function le(pe){return/^\d+$/.test(pe)?"".concat(pe,"px"):pe}function G(){}var j=!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 oe(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ke=pe;if(Array.isArray(pe)){for(var je=0;je<pe.length;je++){var me=I[pe[je]];if(me)return me}return ke[0]}return I[ke]||ke}var ae=null,_e=Je.b=function(pe){var ke=pe.width,je=ke===void 0?"100%":ke,me=pe.height,he=me===void 0?"100%":me,Oe=pe.value,V=pe.language,b=V===void 0?"javascript":V,J=pe.style,z=J===void 0?{}:J,x=pe.options,ee=x===void 0?{}:x,P=pe.overrideServices,O=P===void 0?{}:P,S=pe.theme,c=S===void 0?"vs-dark":S,s=pe.onEditBlur,m=pe.onSave,w=pe.autoHeight,R=w===void 0?!1:w,ue=pe.forbidCopy,ye=ue===void 0?!1:ue,ne=pe.onChange,be=ne===void 0?G:ne,ce=pe.editorDidMount,Q=ce===void 0?G:ce,W=pe.onFocus,re=W===void 0?G:W,p=pe.filename,_=p===void 0?"educoder.txt":p,g=Object(X.a)(pe,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),N=Object(D.useRef)(),te=Object(D.useRef)({}),B=Object(D.useRef)(),ie=Object(D.useRef)(!1),Te=Object(D.useRef)(),Ie=Object(D.useState)(!1),Le=Object(Ee.a)(Ie,2),we=Le[0],Re=Le[1];function Ve(){var v;return N.current&&(v=new T.default(function(y){var Y=Object(Ae.a)(y),de;try{for(Y.s();!(de=Y.n()).done;){var Me=de.value;(Me.target.offsetHeight>0||Me.target.offsetWidth>0)&&te.current.instance.layout()}}catch(Ge){Y.e(Ge)}finally{Y.f()}}),v.observe(N.current)),v}function Xe(){se.b.warn(decodeURIComponent(q))}var Ke=function(){var y=te.current.instance;if(Oe!=null&&y&&we){var Y=y.getModel();Y&&Oe!==Y.getValue()&&(j=!0,Y.setValue(Oe),y.layout(),j=!1)}};Object(D.useEffect)(function(){B.current&&clearTimeout(B.current),B.current=setTimeout(function(){Ke()},500)},[Oe,we,te.current]);function Ze(){var v=te.current.instance;if(v){var y=v.getSelection(),Y=te.current.pastePos||{},de=new ae.Range(Y.startLineNumber||y.endLineNumber,Y.startColumn||y.endColumn,Y.endLineNumber||y.endLineNumber,Y.endColumn||y.endColumn);setTimeout(function(){v.executeEdits("",[{range:de,text:""}])},300)}}function ct(v){(window.navigator.platform.match("Mac")?v.metaKey:v.ctrlKey)&&v.keyCode==83&&(v.preventDefault(),m())}var rt=function(){if(R&&te.current.instance){var y=te.current.instance.getContentHeight();f(y<he?he:y)}else f(he)};function Ye(v){var y=document.createEvent("MouseEvents");y.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),v.dispatchEvent(y)}function ve(v,y){var Y=window.URL||window.webkitURL||window,de=new Blob([y]),Me=document.createElementNS("http://www.w3.org/1999/xhtml","a");Me.href=Y.createObjectURL(de),Me.download=v,Ye(Me)}Object(D.useEffect)(function(){rt()},[rt]),Object(D.useEffect)(function(){N.current&&!we&&k.e(26).then(k.t.bind(null,"M/lh",7)).then(function(v){try{ae=v,te.current.instance=ae.editor.create(N.current,{value:Oe,language:oe(b),theme:c,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},O);var y=te.current.instance;if(Q(y,ae),setTimeout(function(){rt(),te.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ve(_||"educoder.txt",y.getValue())}})},500),te.current.subscription=y.onDidChangeModelContent(function(de){ie.current?clearTimeout(Te.current):(rt(),be(y.getValue(),de)),Te.current=setTimeout(function(){ie.current=!1},500)}),window.Monaco||K(ae),ye&&(y.addCommand(ae.KeyMod.CtrlCmd|ae.KeyMod.Shift|ae.KeyCode.KEY_V,function(){return Xe(),null}),y.addCommand(ae.KeyMod.CtrlCmd|ae.KeyCode.KEY_C,function(){return Xe(),null})),window.Monaco=ae,s&&y.onDidBlurEditorWidget(function(){s(y.getValue())}),re&&y.onDidFocusEditorText(function(){re(y.getValue())}),ye){y.addCommand(ae.KeyMod.CtrlCmd|ae.KeyCode.KEY_V,function(){return Xe(),null}),y.onDidPaste(function(de){te.current.pastePos=de});try{window.addEventListener("paste",Ze)}catch(de){}}var Y=Ve();return Re(!0),function(){var de=te.current.instance;de.dispose();var Me=de.getModel();Me&&Me.dispose(),te.current.subscription&&te.current.subscription.dispose(),ye&&window.removeEventListener("paste",Ze),Y.unobserve(N.current)}}catch(de){}})},[]),Object(D.useEffect)(function(){var v=te.current.instance;if(v&&we)return document.addEventListener("keydown",ct,!1),function(){document.removeEventListener("keydown",ct)}},[m,we]),Object(D.useEffect)(function(){var v=te.current.instance;if(v&&we){var y=oe(b);ae.editor.setModelLanguage(v.getModel(),y),console.log("language:",b,v.getModel(),y)}},[b,we]),Object(D.useEffect)(function(){var v=te.current.instance;v&&we&&ae.editor.setTheme(c)},[c,we]),Object(D.useEffect)(function(){var v=te.current.instance;v&&we&&(v.updateOptions(Object(F.a)({},ee)),setTimeout(function(){v.getModel().updateOptions(Object(F.a)({},ee))},200))},[JSON.stringify(ee),we]),Object(D.useEffect)(function(){var v=te.current.instance;v&&we&&v.layout()},[je,he,we]);var it=Object(D.useState)(le(je)),Qe=Object(Ee.a)(it,2),Se=Qe[0],Ne=Qe[1],U=Object(D.useState)(le(he)),M=Object(Ee.a)(U,2),E=M[0],f=M[1],h=Object(F.a)(Object(F.a)({},z),{},{width:Se,height:E});return L.a.createElement("div",{className:"my-monaco-editor",ref:N,style:h})};function He(pe){var ke=pe.width,je=ke===void 0?"100%":ke,me=pe.height,he=me===void 0?"100%":me,Oe=pe.original,V=pe.modified,b=pe.language,J=pe.options,z=J===void 0?{}:J,x=Object(D.useRef)(),ee=Object(D.useState)(null),P=Object(Ee.a)(ee,2),O=P[0],S=P[1];function c(R){var ue;return x.current&&(ue=new T.default(function(ye){var ne=Object(Ae.a)(ye),be;try{for(ne.s();!(be=ne.n()).done;){var ce=be.value;(ce.target.offsetHeight>0||ce.target.offsetWidth>0)&&R.layout()}}catch(Q){ne.e(Q)}finally{ne.f()}}),ue.observe(x.current)),ue}Object(D.useEffect)(function(){x.current&&k.e(26).then(k.t.bind(null,"M/lh",7)).then(function(R){ae=R;var ue=ae.editor.createDiffEditor(x.current,Object(F.a)(Object(F.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}));S(ue);var ye=c(ue);return function(){ue.dispose();var ne=ue.getModel();ne&&ne.dispose(),ye.unobserve(x.current)}})},[]),Object(D.useEffect)(function(){O&&O.setModel({original:ae.editor.createModel(Oe,b),modified:ae.editor.createModel(V,b)})},[Oe,V,b,O]);var s=le(je),m=le(he),w={width:s,height:m};return L.a.createElement("div",{className:"my-diff-editor",ref:x,style:w})}},ZpRC:function(ht,Je,k){"use strict";function F(K){return typeof K=="object"&&K!=null&&K.nodeType===1}function ge(K,q){return(!q||K!=="hidden")&&K!=="visible"&&K!=="clip"}function se(K,q){if(K.clientHeight<K.scrollHeight||K.clientWidth<K.scrollWidth){var Ce=getComputedStyle(K,null);return ge(Ce.overflowY,q)||ge(Ce.overflowX,q)||function(le){var G=function(j){if(!j.ownerDocument||!j.ownerDocument.defaultView)return null;try{return j.ownerDocument.defaultView.frameElement}catch(I){return null}}(le);return!!G&&(G.clientHeight<le.scrollHeight||G.clientWidth<le.scrollWidth)}(K)}return!1}function Ae(K,q,Ce,le,G,j,I,oe){return j<K&&I>q||j>K&&I<q?0:j<=K&&oe<=Ce||I>=q&&oe>=Ce?j-K-le:I>q&&oe<Ce||j<K&&oe>Ce?I-q+G:0}var Ee=function(K,q){var Ce=window,le=q.scrollMode,G=q.block,j=q.inline,I=q.boundary,oe=q.skipOverflowHiddenElements,ae=typeof I=="function"?I:function(Te){return Te!==I};if(!F(K))throw new TypeError("Invalid target");for(var _e=document.scrollingElement||document.documentElement,He=[],pe=K;F(pe)&&ae(pe);){if((pe=pe.parentElement)===_e){He.push(pe);break}pe!=null&&pe===document.body&&se(pe)&&!se(document.documentElement)||pe!=null&&se(pe,oe)&&He.push(pe)}for(var ke=Ce.visualViewport?Ce.visualViewport.width:innerWidth,je=Ce.visualViewport?Ce.visualViewport.height:innerHeight,me=window.scrollX||pageXOffset,he=window.scrollY||pageYOffset,Oe=K.getBoundingClientRect(),V=Oe.height,b=Oe.width,J=Oe.top,z=Oe.right,x=Oe.bottom,ee=Oe.left,P=G==="start"||G==="nearest"?J:G==="end"?x:J+V/2,O=j==="center"?ee+b/2:j==="end"?z:ee,S=[],c=0;c<He.length;c++){var s=He[c],m=s.getBoundingClientRect(),w=m.height,R=m.width,ue=m.top,ye=m.right,ne=m.bottom,be=m.left;if(le==="if-needed"&&J>=0&&ee>=0&&x<=je&&z<=ke&&J>=ue&&x<=ne&&ee>=be&&z<=ye)return S;var ce=getComputedStyle(s),Q=parseInt(ce.borderLeftWidth,10),W=parseInt(ce.borderTopWidth,10),re=parseInt(ce.borderRightWidth,10),p=parseInt(ce.borderBottomWidth,10),_=0,g=0,N="offsetWidth"in s?s.offsetWidth-s.clientWidth-Q-re:0,te="offsetHeight"in s?s.offsetHeight-s.clientHeight-W-p:0;if(_e===s)_=G==="start"?P:G==="end"?P-je:G==="nearest"?Ae(he,he+je,je,W,p,he+P,he+P+V,V):P-je/2,g=j==="start"?O:j==="center"?O-ke/2:j==="end"?O-ke:Ae(me,me+ke,ke,Q,re,me+O,me+O+b,b),_=Math.max(0,_+he),g=Math.max(0,g+me);else{_=G==="start"?P-ue-W:G==="end"?P-ne+p+te:G==="nearest"?Ae(ue,ne,w,W,p+te,P,P+V,V):P-(ue+w/2)+te/2,g=j==="start"?O-be-Q:j==="center"?O-(be+R/2)+N/2:j==="end"?O-ye+re+N:Ae(be,ye,R,Q,re+N,O,O+b,b);var B=s.scrollLeft,ie=s.scrollTop;P+=ie-(_=Math.max(0,Math.min(ie+_,s.scrollHeight-w+te))),O+=B-(g=Math.max(0,Math.min(B+g,s.scrollWidth-R+N)))}S.push({el:s,top:_,left:g})}return S};function X(K){return K===Object(K)&&Object.keys(K).length!==0}function D(K,q){q===void 0&&(q="auto");var Ce="scrollBehavior"in document.body.style;K.forEach(function(le){var G=le.el,j=le.top,I=le.left;G.scroll&&Ce?G.scroll({top:j,left:I,behavior:q}):(G.scrollTop=j,G.scrollLeft=I)})}function L(K){return K===!1?{block:"end",inline:"nearest"}:X(K)?K:{block:"start",inline:"nearest"}}function T(K,q){var Ce=!K.ownerDocument.documentElement.contains(K);if(X(q)&&typeof q.behavior=="function")return q.behavior(Ce?[]:Ee(K,q));if(Ce)return;var le=L(q);return D(Ee(K,le),le.behavior)}var H=Je.a=T},Zss7:function(ht,Je,k){var F;(function(ge){var se=/^\s+/,Ae=/\s+$/,Ee=0,X=ge.round,D=ge.min,L=ge.max,T=ge.random;function H(p,_){if(p=p||"",_=_||{},p instanceof H)return p;if(!(this instanceof H))return new H(p,_);var g=K(p);this._originalInput=p,this._r=g.r,this._g=g.g,this._b=g.b,this._a=g.a,this._roundA=X(100*this._a)/100,this._format=_.format||g.format,this._gradientType=_.gradientType,this._r<1&&(this._r=X(this._r)),this._g<1&&(this._g=X(this._g)),this._b<1&&(this._b=X(this._b)),this._ok=g.ok,this._tc_id=Ee++}H.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var p=this.toRgb();return(p.r*299+p.g*587+p.b*114)/1e3},getLuminance:function(){var p=this.toRgb(),_,g,N,te,B,ie;return _=p.r/255,g=p.g/255,N=p.b/255,_<=.03928?te=_/12.92:te=ge.pow((_+.055)/1.055,2.4),g<=.03928?B=g/12.92:B=ge.pow((g+.055)/1.055,2.4),N<=.03928?ie=N/12.92:ie=ge.pow((N+.055)/1.055,2.4),.2126*te+.7152*B+.0722*ie},setAlpha:function(p){return this._a=S(p),this._roundA=X(100*this._a)/100,this},toHsv:function(){var p=G(this._r,this._g,this._b);return{h:p.h*360,s:p.s,v:p.v,a:this._a}},toHsvString:function(){var p=G(this._r,this._g,this._b),_=X(p.h*360),g=X(p.s*100),N=X(p.v*100);return this._a==1?"hsv("+_+", "+g+"%, "+N+"%)":"hsva("+_+", "+g+"%, "+N+"%, "+this._roundA+")"},toHsl:function(){var p=Ce(this._r,this._g,this._b);return{h:p.h*360,s:p.s,l:p.l,a:this._a}},toHslString:function(){var p=Ce(this._r,this._g,this._b),_=X(p.h*360),g=X(p.s*100),N=X(p.l*100);return this._a==1?"hsl("+_+", "+g+"%, "+N+"%)":"hsla("+_+", "+g+"%, "+N+"%, "+this._roundA+")"},toHex:function(p){return I(this._r,this._g,this._b,p)},toHexString:function(p){return"#"+this.toHex(p)},toHex8:function(p){return oe(this._r,this._g,this._b,this._a,p)},toHex8String:function(p){return"#"+this.toHex8(p)},toRgb:function(){return{r:X(this._r),g:X(this._g),b:X(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+X(this._r)+", "+X(this._g)+", "+X(this._b)+")":"rgba("+X(this._r)+", "+X(this._g)+", "+X(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:X(c(this._r,255)*100)+"%",g:X(c(this._g,255)*100)+"%",b:X(c(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+X(c(this._r,255)*100)+"%, "+X(c(this._g,255)*100)+"%, "+X(c(this._b,255)*100)+"%)":"rgba("+X(c(this._r,255)*100)+"%, "+X(c(this._g,255)*100)+"%, "+X(c(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:P[I(this._r,this._g,this._b,!0)]||!1},toFilter:function(p){var _="#"+ae(this._r,this._g,this._b,this._a),g=_,N=this._gradientType?"GradientType = 1, ":"";if(p){var te=H(p);g="#"+ae(te._r,te._g,te._b,te._a)}return"progid:DXImageTransform.Microsoft.gradient("+N+"startColorstr="+_+",endColorstr="+g+")"},toString:function(p){var _=!!p;p=p||this._format;var g=!1,N=this._a<1&&this._a>=0,te=!_&&N&&(p==="hex"||p==="hex6"||p==="hex3"||p==="hex4"||p==="hex8"||p==="name");return te?p==="name"&&this._a===0?this.toName():this.toRgbString():(p==="rgb"&&(g=this.toRgbString()),p==="prgb"&&(g=this.toPercentageRgbString()),(p==="hex"||p==="hex6")&&(g=this.toHexString()),p==="hex3"&&(g=this.toHexString(!0)),p==="hex4"&&(g=this.toHex8String(!0)),p==="hex8"&&(g=this.toHex8String()),p==="name"&&(g=this.toName()),p==="hsl"&&(g=this.toHslString()),p==="hsv"&&(g=this.toHsvString()),g||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(p,_){var g=p.apply(null,[this].concat([].slice.call(_)));return this._r=g._r,this._g=g._g,this._b=g._b,this.setAlpha(g._a),this},lighten:function(){return this._applyModification(ke,arguments)},brighten:function(){return this._applyModification(je,arguments)},darken:function(){return this._applyModification(me,arguments)},desaturate:function(){return this._applyModification(_e,arguments)},saturate:function(){return this._applyModification(He,arguments)},greyscale:function(){return this._applyModification(pe,arguments)},spin:function(){return this._applyModification(he,arguments)},_applyCombination:function(p,_){return p.apply(null,[this].concat([].slice.call(_)))},analogous:function(){return this._applyCombination(z,arguments)},complement:function(){return this._applyCombination(Oe,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(J,arguments)},triad:function(){return this._applyCombination(V,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},H.fromRatio=function(p,_){if(typeof p=="object"){var g={};for(var N in p)p.hasOwnProperty(N)&&(N==="a"?g[N]=p[N]:g[N]=ye(p[N]));p=g}return H(p,_)};function K(p){var _={r:0,g:0,b:0},g=1,N=null,te=null,B=null,ie=!1,Te=!1;return typeof p=="string"&&(p=W(p)),typeof p=="object"&&(Q(p.r)&&Q(p.g)&&Q(p.b)?(_=q(p.r,p.g,p.b),ie=!0,Te=String(p.r).substr(-1)==="%"?"prgb":"rgb"):Q(p.h)&&Q(p.s)&&Q(p.v)?(N=ye(p.s),te=ye(p.v),_=j(p.h,N,te),ie=!0,Te="hsv"):Q(p.h)&&Q(p.s)&&Q(p.l)&&(N=ye(p.s),B=ye(p.l),_=le(p.h,N,B),ie=!0,Te="hsl"),p.hasOwnProperty("a")&&(g=p.a)),g=S(g),{ok:ie,format:p.format||Te,r:D(255,L(_.r,0)),g:D(255,L(_.g,0)),b:D(255,L(_.b,0)),a:g}}function q(p,_,g){return{r:c(p,255)*255,g:c(_,255)*255,b:c(g,255)*255}}function Ce(p,_,g){p=c(p,255),_=c(_,255),g=c(g,255);var N=L(p,_,g),te=D(p,_,g),B,ie,Te=(N+te)/2;if(N==te)B=ie=0;else{var Ie=N-te;ie=Te>.5?Ie/(2-N-te):Ie/(N+te);switch(N){case p:B=(_-g)/Ie+(_<g?6:0);break;case _:B=(g-p)/Ie+2;break;case g:B=(p-_)/Ie+4;break}B/=6}return{h:B,s:ie,l:Te}}function le(p,_,g){var N,te,B;p=c(p,360),_=c(_,100),g=c(g,100);function ie(Le,we,Re){return Re<0&&(Re+=1),Re>1&&(Re-=1),Re<1/6?Le+(we-Le)*6*Re:Re<1/2?we:Re<2/3?Le+(we-Le)*(2/3-Re)*6:Le}if(_===0)N=te=B=g;else{var Te=g<.5?g*(1+_):g+_-g*_,Ie=2*g-Te;N=ie(Ie,Te,p+1/3),te=ie(Ie,Te,p),B=ie(Ie,Te,p-1/3)}return{r:N*255,g:te*255,b:B*255}}function G(p,_,g){p=c(p,255),_=c(_,255),g=c(g,255);var N=L(p,_,g),te=D(p,_,g),B,ie,Te=N,Ie=N-te;if(ie=N===0?0:Ie/N,N==te)B=0;else{switch(N){case p:B=(_-g)/Ie+(_<g?6:0);break;case _:B=(g-p)/Ie+2;break;case g:B=(p-_)/Ie+4;break}B/=6}return{h:B,s:ie,v:Te}}function j(p,_,g){p=c(p,360)*6,_=c(_,100),g=c(g,100);var N=ge.floor(p),te=p-N,B=g*(1-_),ie=g*(1-te*_),Te=g*(1-(1-te)*_),Ie=N%6,Le=[g,ie,B,B,Te,g][Ie],we=[Te,g,g,ie,B,B][Ie],Re=[B,B,Te,g,g,ie][Ie];return{r:Le*255,g:we*255,b:Re*255}}function I(p,_,g,N){var te=[ue(X(p).toString(16)),ue(X(_).toString(16)),ue(X(g).toString(16))];return N&&te[0].charAt(0)==te[0].charAt(1)&&te[1].charAt(0)==te[1].charAt(1)&&te[2].charAt(0)==te[2].charAt(1)?te[0].charAt(0)+te[1].charAt(0)+te[2].charAt(0):te.join("")}function oe(p,_,g,N,te){var B=[ue(X(p).toString(16)),ue(X(_).toString(16)),ue(X(g).toString(16)),ue(ne(N))];return te&&B[0].charAt(0)==B[0].charAt(1)&&B[1].charAt(0)==B[1].charAt(1)&&B[2].charAt(0)==B[2].charAt(1)&&B[3].charAt(0)==B[3].charAt(1)?B[0].charAt(0)+B[1].charAt(0)+B[2].charAt(0)+B[3].charAt(0):B.join("")}function ae(p,_,g,N){var te=[ue(ne(N)),ue(X(p).toString(16)),ue(X(_).toString(16)),ue(X(g).toString(16))];return te.join("")}H.equals=function(p,_){return!p||!_?!1:H(p).toRgbString()==H(_).toRgbString()},H.random=function(){return H.fromRatio({r:T(),g:T(),b:T()})};function _e(p,_){_=_===0?0:_||10;var g=H(p).toHsl();return g.s-=_/100,g.s=s(g.s),H(g)}function He(p,_){_=_===0?0:_||10;var g=H(p).toHsl();return g.s+=_/100,g.s=s(g.s),H(g)}function pe(p){return H(p).desaturate(100)}function ke(p,_){_=_===0?0:_||10;var g=H(p).toHsl();return g.l+=_/100,g.l=s(g.l),H(g)}function je(p,_){_=_===0?0:_||10;var g=H(p).toRgb();return g.r=L(0,D(255,g.r-X(255*-(_/100)))),g.g=L(0,D(255,g.g-X(255*-(_/100)))),g.b=L(0,D(255,g.b-X(255*-(_/100)))),H(g)}function me(p,_){_=_===0?0:_||10;var g=H(p).toHsl();return g.l-=_/100,g.l=s(g.l),H(g)}function he(p,_){var g=H(p).toHsl(),N=(g.h+_)%360;return g.h=N<0?360+N:N,H(g)}function Oe(p){var _=H(p).toHsl();return _.h=(_.h+180)%360,H(_)}function V(p){var _=H(p).toHsl(),g=_.h;return[H(p),H({h:(g+120)%360,s:_.s,l:_.l}),H({h:(g+240)%360,s:_.s,l:_.l})]}function b(p){var _=H(p).toHsl(),g=_.h;return[H(p),H({h:(g+90)%360,s:_.s,l:_.l}),H({h:(g+180)%360,s:_.s,l:_.l}),H({h:(g+270)%360,s:_.s,l:_.l})]}function J(p){var _=H(p).toHsl(),g=_.h;return[H(p),H({h:(g+72)%360,s:_.s,l:_.l}),H({h:(g+216)%360,s:_.s,l:_.l})]}function z(p,_,g){_=_||6,g=g||30;var N=H(p).toHsl(),te=360/g,B=[H(p)];for(N.h=(N.h-(te*_>>1)+720)%360;--_;)N.h=(N.h+te)%360,B.push(H(N));return B}function x(p,_){_=_||6;for(var g=H(p).toHsv(),N=g.h,te=g.s,B=g.v,ie=[],Te=1/_;_--;)ie.push(H({h:N,s:te,v:B})),B=(B+Te)%1;return ie}H.mix=function(p,_,g){g=g===0?0:g||50;var N=H(p).toRgb(),te=H(_).toRgb(),B=g/100,ie={r:(te.r-N.r)*B+N.r,g:(te.g-N.g)*B+N.g,b:(te.b-N.b)*B+N.b,a:(te.a-N.a)*B+N.a};return H(ie)},H.readability=function(p,_){var g=H(p),N=H(_);return(ge.max(g.getLuminance(),N.getLuminance())+.05)/(ge.min(g.getLuminance(),N.getLuminance())+.05)},H.isReadable=function(p,_,g){var N=H.readability(p,_),te,B;B=!1,te=re(g);switch(te.level+te.size){case"AAsmall":case"AAAlarge":B=N>=4.5;break;case"AAlarge":B=N>=3;break;case"AAAsmall":B=N>=7;break}return B},H.mostReadable=function(p,_,g){var N=null,te=0,B,ie,Te,Ie;g=g||{},ie=g.includeFallbackColors,Te=g.level,Ie=g.size;for(var Le=0;Le<_.length;Le++)B=H.readability(p,_[Le]),B>te&&(te=B,N=H(_[Le]));return H.isReadable(p,N,{level:Te,size:Ie})||!ie?N:(g.includeFallbackColors=!1,H.mostReadable(p,["#fff","#000"],g))};var ee=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"},P=H.hexNames=O(ee);function O(p){var _={};for(var g in p)p.hasOwnProperty(g)&&(_[p[g]]=g);return _}function S(p){return p=parseFloat(p),(isNaN(p)||p<0||p>1)&&(p=1),p}function c(p,_){w(p)&&(p="100%");var g=R(p);return p=D(_,L(0,parseFloat(p))),g&&(p=parseInt(p*_,10)/100),ge.abs(p-_)<1e-6?1:p%_/parseFloat(_)}function s(p){return D(1,L(0,p))}function m(p){return parseInt(p,16)}function w(p){return typeof p=="string"&&p.indexOf(".")!=-1&&parseFloat(p)===1}function R(p){return typeof p=="string"&&p.indexOf("%")!=-1}function ue(p){return p.length==1?"0"+p:""+p}function ye(p){return p<=1&&(p=p*100+"%"),p}function ne(p){return ge.round(parseFloat(p)*255).toString(16)}function be(p){return m(p)/255}var ce=function(){var p="[-\\+]?\\d+%?",_="[-\\+]?\\d*\\.\\d+%?",g="(?:"+_+")|(?:"+p+")",N="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?",te="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?";return{CSS_UNIT:new RegExp(g),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+te),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+te),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+te),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Q(p){return!!ce.CSS_UNIT.exec(p)}function W(p){p=p.replace(se,"").replace(Ae,"").toLowerCase();var _=!1;if(ee[p])p=ee[p],_=!0;else if(p=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var g;return(g=ce.rgb.exec(p))?{r:g[1],g:g[2],b:g[3]}:(g=ce.rgba.exec(p))?{r:g[1],g:g[2],b:g[3],a:g[4]}:(g=ce.hsl.exec(p))?{h:g[1],s:g[2],l:g[3]}:(g=ce.hsla.exec(p))?{h:g[1],s:g[2],l:g[3],a:g[4]}:(g=ce.hsv.exec(p))?{h:g[1],s:g[2],v:g[3]}:(g=ce.hsva.exec(p))?{h:g[1],s:g[2],v:g[3],a:g[4]}:(g=ce.hex8.exec(p))?{r:m(g[1]),g:m(g[2]),b:m(g[3]),a:be(g[4]),format:_?"name":"hex8"}:(g=ce.hex6.exec(p))?{r:m(g[1]),g:m(g[2]),b:m(g[3]),format:_?"name":"hex"}:(g=ce.hex4.exec(p))?{r:m(g[1]+""+g[1]),g:m(g[2]+""+g[2]),b:m(g[3]+""+g[3]),a:be(g[4]+""+g[4]),format:_?"name":"hex8"}:(g=ce.hex3.exec(p))?{r:m(g[1]+""+g[1]),g:m(g[2]+""+g[2]),b:m(g[3]+""+g[3]),format:_?"name":"hex"}:!1}function re(p){var _,g;return p=p||{level:"AA",size:"small"},_=(p.level||"AA").toUpperCase(),g=(p.size||"small").toLowerCase(),_!=="AA"&&_!=="AAA"&&(_="AA"),g!=="small"&&g!=="large"&&(g="small"),{level:_,size:g}}ht.exports?ht.exports=H:!(F=function(){return H}.call(Je,k,Je,ht),F!==void 0&&(ht.exports=F))})(Math)},bT9E:function(ht,Je,k){"use strict";k.d(Je,"a",function(){return ge});var F=k("VTBJ");function ge(se,Ae){var Ee=Object(F.a)({},se);return Array.isArray(Ae)&&Ae.forEach(function(X){delete Ee[X]}),Ee}},c5Ni:function(ht,Je,k){},dejd:function(ht,Je,k){},dmUQ:function(ht,Je,k){"use strict";var F=k("Ff2n"),ge=k("rePB"),se=k("1OyB"),Ae=k("vuIU"),Ee=k("Ji7U"),X=k("md7G"),D=k("foSv"),L=k("q1tI"),T=k.n(L),H=k("TSYQ"),K=k.n(H),q=k("4IlW");function Ce(V,b){var J=Object.keys(V);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(V);b&&(z=z.filter(function(x){return Object.getOwnPropertyDescriptor(V,x).enumerable})),J.push.apply(J,z)}return J}function le(V){for(var b=1;b<arguments.length;b++){var J=arguments[b]!=null?arguments[b]:{};b%2?Ce(Object(J),!0).forEach(function(z){Object(ge.a)(V,z,J[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(V,Object.getOwnPropertyDescriptors(J)):Ce(Object(J)).forEach(function(z){Object.defineProperty(V,z,Object.getOwnPropertyDescriptor(J,z))})}return V}function G(V){var b=j();return function(){var z=Object(D.a)(V),x;if(b){var ee=Object(D.a)(this).constructor;x=Reflect.construct(z,arguments,ee)}else x=z.apply(this,arguments);return Object(X.a)(this,x)}}function j(){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(V){return!1}}function I(){}function oe(V){V.preventDefault()}var ae=function(b){return b.replace(/[^\w.-]+/g,"")},_e=200,He=600,pe=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,ke=function(b){return b!=null},je=function(b,J){return J===b||typeof J=="number"&&typeof b=="number"&&isNaN(J)&&isNaN(b)},me=function(V){Object(Ee.a)(J,V);var b=G(J);function J(z){var x;Object(se.a)(this,J),x=b.call(this,z),x.onKeyDown=function(O){var S=x.props,c=S.onKeyDown,s=S.onPressEnter;if(O.keyCode===q.a.UP){var m=x.getRatio(O);x.up(O,m,null),x.stop()}else if(O.keyCode===q.a.DOWN){var w=x.getRatio(O);x.down(O,w,null),x.stop()}else O.keyCode===q.a.ENTER&&s&&s(O);if(x.recordCursorPosition(),x.lastKeyCode=O.keyCode,c){for(var R=arguments.length,ue=new Array(R>1?R-1:0),ye=1;ye<R;ye++)ue[ye-1]=arguments[ye];c.apply(void 0,[O].concat(ue))}},x.onKeyUp=function(O){var S=x.props.onKeyUp;if(x.stop(),x.recordCursorPosition(),S){for(var c=arguments.length,s=new Array(c>1?c-1:0),m=1;m<c;m++)s[m-1]=arguments[m];S.apply(void 0,[O].concat(s))}},x.onChange=function(O){var S=x.props.onChange;x.state.focused&&(x.inputting=!0),x.rawInput=x.props.parser(x.getValueFromEvent(O)),x.setState({inputValue:x.rawInput}),S(x.toNumber(x.rawInput))},x.onMouseUp=function(){var O=x.props.onMouseUp;x.recordCursorPosition(),O&&O.apply(void 0,arguments)},x.onFocus=function(){var O;x.setState({focused:!0}),(O=x.props).onFocus.apply(O,arguments)},x.onBlur=function(){var O=x.props.onBlur;x.inputting=!1,x.setState({focused:!1});var S=x.getCurrentValidValue(x.state.inputValue),c=x.setValue(S,I);if(O){var s=x.input.value,m=x.getInputDisplayValue({focus:!1,value:c});x.input.value=m&&Number(m),O.apply(void 0,arguments),x.input.value=s}},x.getRatio=function(O){var S=1;return O.metaKey||O.ctrlKey?S=.1:O.shiftKey&&(S=10),S},x.getFullNum=function(O){return isNaN(O)?O:/e/i.test(String(O))?Number(O).toFixed(18).replace(/\.?0+$/,""):O},x.getPrecision=function(O){if(ke(x.props.precision))return x.props.precision;var S=String(O);if(S.indexOf("e-")>=0)return parseInt(S.slice(S.indexOf("e-")+2),10);var c=0;return S.indexOf(".")>=0&&(c=S.length-S.indexOf(".")-1),c},x.getInputDisplayValue=function(O){var S=O||x.state,c=S.focused,s=S.inputValue,m=S.value,w;c?w=s:w=x.toPrecisionAsStep(m),w==null&&(w="");var R=x.formatWrapper(w);return ke(x.props.decimalSeparator)&&(R=R.toString().replace(".",x.props.decimalSeparator)),R},x.recordCursorPosition=function(){try{x.cursorStart=x.input.selectionStart,x.cursorEnd=x.input.selectionEnd,x.currentValue=x.input.value,x.cursorBefore=x.input.value.substring(0,x.cursorStart),x.cursorAfter=x.input.value.substring(x.cursorEnd)}catch(O){}},x.restoreByAfter=function(O){if(O===void 0)return!1;var S=x.input.value,c=S.lastIndexOf(O);if(c===-1)return!1;var s=x.cursorBefore.length;return x.lastKeyCode===q.a.DELETE&&x.cursorBefore.charAt(s-1)===O[0]?(x.fixCaret(s,s),!0):c+O.length===S.length?(x.fixCaret(c,c),!0):!1},x.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(S,c){var s=O.substring(c);return x.restoreByAfter(s)})},x.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},x.stop=function(){x.autoStepTimer&&clearTimeout(x.autoStepTimer)},x.down=function(O,S,c){x.pressingUpOrDown=!0,x.step("down",O,S,c)},x.up=function(O,S,c){x.pressingUpOrDown=!0,x.step("up",O,S,c)},x.saveInput=function(O){x.input=O};var ee=z.value;ee===void 0&&(ee=z.defaultValue),x.state={focused:z.autoFocus};var P=x.getValidValue(x.toNumber(ee));return x.state=le(le({},x.state),{},{inputValue:x.toPrecisionAsStep(P),value:P}),x}return Object(Ae.a)(J,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(x){var ee=this.props,P=ee.value,O=ee.onChange,S=ee.max,c=ee.min,s=this.state.focused;if(x){if(!je(x.value,P)||!je(x.max,S)||!je(x.min,c)){var m=s?P:this.getValidValue(P),w;this.pressingUpOrDown?w=m:this.inputting?w=this.rawInput:w=this.toPrecisionAsStep(m),this.setState({value:m,inputValue:w})}var R="value"in this.props?P:this.state.value;"max"in this.props&&x.max!==S&&typeof R=="number"&&R>S&&O&&O(S),"min"in this.props&&x.min!==c&&typeof R=="number"&&R<c&&O&&O(c)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ue=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===q.a.BACKSPACE?ue=this.cursorStart-1:this.lastKeyCode===q.a.DELETE&&(ue=this.cursorStart):ue=this.input.value.length,this.fixCaret(ue,ue)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case q.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case q.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ye){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(x){var ee=x;return ee===""?ee="":this.isNotCompleteNumber(parseFloat(ee))?ee=this.state.value:ee=this.getValidValue(ee),this.toNumber(ee)}},{key:"getValueFromEvent",value:function(x){var ee=x.target.value.trim().replace(/。/g,".");return ke(this.props.decimalSeparator)&&(ee=ee.replace(this.props.decimalSeparator,".")),ee}},{key:"getValidValue",value:function(x){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(x);return isNaN(O)?x:(O<ee&&(O=ee),O>P&&(O=P),O)}},{key:"setValue",value:function(x,ee){var P=this.props.precision,O=this.isNotCompleteNumber(parseFloat(x))?null:parseFloat(x),S=this.state.value,c=S===void 0?null:S,s=this.state.inputValue,m=s===void 0?null:s,w=typeof O=="number"?O.toFixed(P):"".concat(O),R=O!==c||w!=="".concat(m);return"value"in this.props?(m=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:m},ee)):this.setState({value:O,inputValue:this.toPrecisionAsStep(x)},ee),R&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(x){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.props,O=P.precision,S=P.step;if(ke(O))return O;var c=this.getPrecision(ee),s=this.getPrecision(S),m=this.getPrecision(x);return x?Math.max(m,c+s):c+s}},{key:"getPrecisionFactor",value:function(x){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.getMaxPrecision(x,ee);return Math.pow(10,P)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(x){return this.props.formatter?this.props.formatter(x):x}},{key:"toPrecisionAsStep",value:function(x){if(this.isNotCompleteNumber(x)||x==="")return x;var ee=Math.abs(this.getMaxPrecision(x));return isNaN(ee)?x.toString():Number(x).toFixed(ee)}},{key:"toNumber",value:function(x){var ee=this.props.precision,P=this.state.focused,O=x&&x.length>16&&P;return this.isNotCompleteNumber(x)||O?x:ke(ee)?Math.round(x*Math.pow(10,ee))/Math.pow(10,ee):Number(x)}},{key:"upStep",value:function(x,ee){var P=this.props.step,O=this.getPrecisionFactor(x,ee),S=Math.abs(this.getMaxPrecision(x,ee)),c=((O*x+O*P*ee)/O).toFixed(S);return this.toNumber(c)}},{key:"downStep",value:function(x,ee){var P=this.props.step,O=this.getPrecisionFactor(x,ee),S=Math.abs(this.getMaxPrecision(x,ee)),c=((O*x-O*P*ee)/O).toFixed(S);return this.toNumber(c)}},{key:"step",value:function(x,ee){var P=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=arguments.length>3?arguments[3]:void 0;this.stop(),ee&&(ee.persist(),ee.preventDefault());var c=this.props;if(c.disabled)return;var s=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(s))return;var m=this["".concat(x,"Step")](s,O),w=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(){P.pressingUpOrDown=!1}),w)return;this.autoStepTimer=setTimeout(function(){P[x](ee,O,!0)},S?_e:He)}},{key:"fixCaret",value:function(x,ee){if(x===void 0||ee===void 0||!this.input||!this.input.value)return;try{var P=this.input.selectionStart,O=this.input.selectionEnd;(x!==P||ee!==O)&&this.input.setSelectionRange(x,ee)}catch(S){}}},{key:"render",value:function(){var x,ee=this.props,P=ee.prefixCls,O=ee.disabled,S=ee.readOnly,c=ee.useTouch,s=ee.autoComplete,m=ee.upHandler,w=ee.downHandler,R=ee.className,ue=ee.max,ye=ee.min,ne=ee.style,be=ee.title,ce=ee.onMouseEnter,Q=ee.onMouseLeave,W=ee.onMouseOver,re=ee.onMouseOut,p=ee.required,_=ee.onClick,g=ee.tabIndex,N=ee.type,te=ee.placeholder,B=ee.id,ie=ee.inputMode,Te=ee.pattern,Ie=ee.step,Le=ee.maxLength,we=ee.autoFocus,Re=ee.name,Ve=ee.onPaste,Xe=ee.onInput,Ke=Object(F.a)(ee,["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"]),Ze=this.state,ct=Ze.value,rt=Ze.focused,Ye=K()(P,(x={},Object(ge.a)(x,R,!!R),Object(ge.a)(x,"".concat(P,"-disabled"),O),Object(ge.a)(x,"".concat(P,"-focused"),rt),x)),ve={};Object.keys(Ke).forEach(function(y){(y.substr(0,5)==="data-"||y.substr(0,5)==="aria-"||y==="role")&&(ve[y]=Ke[y])});var it=!S&&!O,Qe=this.getInputDisplayValue(null),Se=(ct||ct===0)&&(isNaN(ct)||Number(ct)>=ue),Ne=(ct||ct===0)&&(isNaN(ct)||Number(ct)<=ye),U=Se||O||S,M=Ne||O||S,E=K()("".concat(P,"-handler"),"".concat(P,"-handler-up"),Object(ge.a)({},"".concat(P,"-handler-up-disabled"),U)),f=K()("".concat(P,"-handler"),"".concat(P,"-handler-down"),Object(ge.a)({},"".concat(P,"-handler-down-disabled"),M)),h=c?{onTouchStart:U?I:this.up,onTouchEnd:this.stop}:{onMouseDown:U?I:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},v=c?{onTouchStart:M?I:this.down,onTouchEnd:this.stop}:{onMouseDown:M?I:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return T.a.createElement("div",{className:Ye,style:ne,title:be,onMouseEnter:ce,onMouseLeave:Q,onMouseOver:W,onMouseOut:re,onFocus:function(){return null},onBlur:function(){return null}},T.a.createElement("div",{className:"".concat(P,"-handler-wrap")},T.a.createElement("span",Object.assign({unselectable:"on"},h,{role:"button","aria-label":"Increase Value","aria-disabled":U,className:E}),m||T.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner"),onClick:oe})),T.a.createElement("span",Object.assign({unselectable:"on"},v,{role:"button","aria-label":"Decrease Value","aria-disabled":M,className:f}),w||T.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner"),onClick:oe}))),T.a.createElement("div",{className:"".concat(P,"-input-wrap")},T.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ye,"aria-valuemax":ue,"aria-valuenow":ct,required:p,type:N,placeholder:te,onPaste:Ve,onClick:_,onMouseUp:this.onMouseUp,className:"".concat(P,"-input"),tabIndex:g,autoComplete:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:it?this.onKeyDown:I,onKeyUp:it?this.onKeyUp:I,autoFocus:we,maxLength:Le,readOnly:S,disabled:O,max:ue,min:ye,step:Ie,name:Re,title:be,id:B,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Qe),pattern:Te,inputMode:ie,onInput:Xe},ve))))}}]),J}(T.a.Component);me.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:pe,min:-pe,step:1,style:{},onChange:I,onKeyDown:I,onPressEnter:I,onFocus:I,onBlur:I,parser:ae,required:!1,autoComplete:"off"};var he=me,Oe=Je.a=he},gkVt:function(ht,Je,k){"use strict";k.r(Je);var F=k("DZo9"),ge=k("8z0m"),se=k("+L6B"),Ae=k("2/Rp"),Ee=k("miYZ"),X=k("tsqr"),D=k("9og8"),L=k("tJVT"),T=k("WmNS"),H=k.n(T),K=k("q1tI"),q=k.n(K),Ce=k("5NDa"),le=k("5rEg"),G=k("Ot1p"),j=k("ErOA");function I(V){var b=V.setIscreate,J=V.init,z=V.UpdateItem,x=Object(K.useState)(""),ee=Object(L.a)(x,2),P=ee[0],O=ee[1],S=Object(K.useState)(""),c=Object(L.a)(S,2),s=c[0],m=c[1];Object(K.useEffect)(function(){if(!z)return;O(z&&z.name),m(z&&z.description)},[z]);function w(){return R.apply(this,arguments)}function R(){return R=Object(D.a)(H.a.mark(function ne(){var be;return H.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(P){Q.next=3;break}return X.b.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A"),Q.abrupt("return");case 3:if(s){Q.next=6;break}return X.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Q.abrupt("return");case 6:if(!z){Q.next=9;break}return ue(),Q.abrupt("return");case 9:return Q.next=11,Object(j.a)("/api/hpc_courses.json",{method:"post",body:{name:P,description:s,container_type:window.location.pathname.split("/")[1]}});case 11:be=Q.sent,be&&(X.b.info("\u521B\u5EFA\u6210\u529F"),b(!1),J("add"));case 13:case"end":return Q.stop()}},ne)})),R.apply(this,arguments)}function ue(){return ye.apply(this,arguments)}function ye(){return ye=Object(D.a)(H.a.mark(function ne(){var be;return H.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return Q.next=2,Object(j.a)("/api/hpc_courses/".concat(z.id,".json"),{method:"put",body:{name:P,description:s,container_type:window.location.pathname.split("/")[1]}});case 2:be=Q.sent,be&&(X.b.info("\u7F16\u8F91\u6210\u529F"),b(!1),J(""));case 4:case"end":return Q.stop()}},ne)})),ye.apply(this,arguments)}return q.a.createElement("div",null,q.a.createElement(le.a,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:P,maxLength:60,addonAfter:String(P.length)+"/60",onChange:function(be){return O(be.target.value)}}),q.a.createElement(G.a,{id:"courseContentMD",defaultValue:s,onChange:function(be){return m(be)}}),q.a.createElement("div",{className:"clearfix mt30 mb30"},q.a.createElement(Ae.a,{type:"primary",onClick:function(){return w()},className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),q.a.createElement("a",{className:"defalutCancelbtn fl",onClick:function(){return b(!1)}},"\u53D6\u6D88")))}var oe=I,ae=k("9Bee");function _e(V){var b=V.CourseItem,J=V.userId,z=V.init,x=V.ItemUpdate,ee=V.setSee,P=V.UserInfo;function O(){return S.apply(this,arguments)}function S(){return S=Object(D.a)(H.a.mark(function s(){var m;return H.a.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,Object(j.a)("/api/hpc_courses/".concat(b.id,".json"),{method:"delete"});case 2:m=R.sent,m&&(X.b.info("\u5220\u9664\u6210\u529F"),z("delete"),ee(!1));case 4:case"end":return R.stop()}},s)})),S.apply(this,arguments)}function c(){x(b)}return q.a.createElement("div",null,J===299635||J===301458||P!=null&&P.admin||P!=null&&P.business?q.a.createElement("div",{style:{textAlign:"right"}},q.a.createElement(Ae.a,{onClick:function(){return c()}},"\u7F16\u8F91"),q.a.createElement(Ae.a,{onClick:function(){return O()},style:{marginLeft:"30px"}},"\u5220\u9664")):null,q.a.createElement("h1",null,b==null?void 0:b.name),q.a.createElement(ae.a,{value:b==null?void 0:b.description}))}var He=_e,pe=k("9ivq"),ke=k("m3rI"),je=k("Ty5D"),me=k("9kvl");function he(V){var b,J,z,x,ee,P,O,S,c,s=V.user,m=V.dispatch,w=Object(K.useState)(1),R=Object(L.a)(w,2),ue=R[0],ye=R[1],ne=Object(K.useState)(100),be=Object(L.a)(ne,2),ce=be[0],Q=be[1],W=Object(K.useState)([]),re=Object(L.a)(W,2),p=re[0],_=re[1],g=Object(K.useState)(!1),N=Object(L.a)(g,2),te=N[0],B=N[1],ie=Object(K.useState)(!1),Te=Object(L.a)(ie,2),Ie=Te[0],Le=Te[1],we=Object(K.useState)(""),Re=Object(L.a)(we,2),Ve=Re[0],Xe=Re[1],Ke=Object(K.useState)(""),Ze=Object(L.a)(Ke,2),ct=Ze[0],rt=Ze[1],Ye=Object(K.useState)(""),ve=Object(L.a)(Ye,2),it=ve[0],Qe=ve[1],Se=Object(je.i)(),Ne=Se.itemname,U=Object(K.useState)(""),M=Object(L.a)(U,2),E=M[0],f=M[1];Object(K.useEffect)(function(){m({type:"globalSetting/headerToggle",payload:!1}),ue&&h("")},[ue]);function h(Ge){return v.apply(this,arguments)}function v(){return v=Object(D.a)(H.a.mark(function Ge($e){var ze,vt,bt,lt,Dt;return H.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,Object(j.a)("/api/hpc_courses.json",{method:"get",params:{page:ue,per_page:ce,container_type:window.location.pathname.split("/")[1]}});case 2:if(ze=Et.sent,!ze){Et.next=24;break}if(vt=ze.data.hpc_courses.length,_(ze.data.hpc_courses),Qe(ze.data.file_url),rt(""),vt){Et.next=10;break}return Et.abrupt("return");case 10:if(E){Et.next=14;break}Ne?(Dt=0,ze==null||((bt=ze.data)===null||bt===void 0||((lt=bt.hpc_courses)===null||lt===void 0))||lt.map(function(Tt,yt){var Gt;(Ne==null?void 0:Ne.toLocaleLowerCase())===(Tt==null||((Gt=Tt.name)===null||Gt===void 0)?void 0:Gt.toLocaleLowerCase())&&(Dt=yt)}),Xe(ze.data.hpc_courses[Dt]),Le(!0),f(ze.data.hpc_courses[Dt].id),(Ne==null?void 0:Ne.toLocaleLowerCase())==="resources"&&(Xe(ze.data.hpc_courses.filter(function(Tt){return Tt.id===15})[0]),Le(!0),f(15))):(Xe(ze.data.hpc_courses[0]),Le(!0),f(ze.data.hpc_courses[0].id)),Et.next=24;break;case 14:if(!($e==="delete")){Et.next=23;break}if(!(vt===0)){Et.next=18;break}return Le(!1),Et.abrupt("return");case 18:Xe(ze.data.hpc_courses[0]),Le(!0),f(ze.data.hpc_courses[0].id),Et.next=24;break;case 23:$e==="add"?(Xe(ze.data.hpc_courses[vt-1]),Le(!0),f(ze.data.hpc_courses[vt-1].id)):(Xe(ze.data.hpc_courses.filter(function(Tt){return Tt.id===E})[0]),Le(!0),f(E));case 24:case"end":return Et.stop()}},Ge)})),v.apply(this,arguments)}function y(Ge){B(!1),Le(!0),Xe(Ge),f(Ge.id)}function Y(Ge){rt(Ge),B(!0),Le(!1)}function de(){rt(""),B(!0),Le(!1)}var Me={name:"file",multiple:!0,action:"/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange:function($e){var ze=$e.file.status;ze!=="uploading",ze==="done"?(X.b.success("".concat($e.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F")),h("")):ze==="error"&&X.b.error("".concat($e.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function($e){var ze=$e.size/1024/1024<150;return ze||X.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),ze}};return q.a.createElement("div",{style:{marginBottom:"40px"}},q.a.createElement("div",{className:"bannterdiv",style:{background:"url(".concat(ke.a.IMG_SERVER+"/".concat(it),")")}}),q.a.createElement("img",{style:{width:"100%"},src:ke.a.IMG_SERVER+"/".concat(it)}),q.a.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},q.a.createElement("div",{style:{flex:"1",marginTop:"17px"}},p&&p.map(function(Ge,$e){return q.a.createElement("p",{key:$e,onClick:function(){return y(Ge)},className:E===Ge.id?"menuitemselect":"menuitem task-hide"},Ge.name)}),(s==null||((b=s.userInfo)===null||b===void 0)?void 0:b.user_id)===299635||(s==null||((J=s.userInfo)===null||J===void 0)?void 0:J.user_id)===301458||s!=null&&(z=s.userInfo)!==null&&z!==void 0&&z.admin||s!=null&&(x=s.userInfo)!==null&&x!==void 0&&x.business?q.a.createElement("p",{onClick:function(){return de()},className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},q.a.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),q.a.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},te?q.a.createElement(oe,{UpdateItem:ct,setIscreate:B,init:h}):null,Ie?q.a.createElement(He,{UserInfo:s==null?void 0:s.userInfo,setSee:Le,userId:s==null||((ee=s.userInfo)===null||ee===void 0)?void 0:ee.user_id,ItemUpdate:Y,CourseItem:Ve,init:h}):null)),(s==null||((P=s.userInfo)===null||P===void 0)?void 0:P.user_id)===299635||(s==null||((O=s.userInfo)===null||O===void 0)?void 0:O.user_id)===301458||s!=null&&(S=s.userInfo)!==null&&S!==void 0&&S.admin||s!=null&&(c=s.userInfo)!==null&&c!==void 0&&c.business?q.a.createElement(ge.a,Me,q.a.createElement(Ae.a,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var Oe=Je.default=Object(me.a)(function(V){var b=V.user;return{user:b}})(he)},h78n:function(ht,Je,k){"use strict";k.d(Je,"a",function(){return x});var F=k("q1tI"),ge=k.n(F),se=k("TSYQ"),Ae=k.n(se),Ee={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},X=function(O){var S=O.map(function(){return Object(F.useRef)()}),c=Object(F.useRef)();return Object(F.useEffect)(function(){var s=Date.now(),m=!1;Object.keys(S).forEach(function(w){var R=S[w].current;if(!R)return;m=!0;var ue=R.style;ue.transitionDuration=".3s, .3s, .3s, .06s",c.current&&s-c.current<100&&(ue.transitionDuration="0s, 0s")}),m&&(c.current=Date.now())}),[S]};function D(){return D=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var S=arguments[O];for(var c in S)Object.prototype.hasOwnProperty.call(S,c)&&(P[c]=S[c])}return P},D.apply(this,arguments)}function L(P,O){return Ce(P)||q(P,O)||H(P,O)||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(P,O){if(!P)return;if(typeof P=="string")return K(P,O);var S=Object.prototype.toString.call(P).slice(8,-1);if(S==="Object"&&P.constructor&&(S=P.constructor.name),S==="Map"||S==="Set")return Array.from(P);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return K(P,O)}function K(P,O){(O==null||O>P.length)&&(O=P.length);for(var S=0,c=new Array(O);S<O;S++)c[S]=P[S];return c}function q(P,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(P)))return;var S=[],c=!0,s=!1,m=void 0;try{for(var w=P[Symbol.iterator](),R;!(c=(R=w.next()).done)&&!(S.push(R.value),O&&S.length===O);c=!0);}catch(ue){s=!0,m=ue}finally{try{!c&&w.return!=null&&w.return()}finally{if(s)throw m}}return S}function Ce(P){if(Array.isArray(P))return P}function le(P,O){if(P==null)return{};var S=G(P,O),c,s;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(P);for(s=0;s<m.length;s++){if(c=m[s],O.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(P,c))continue;S[c]=P[c]}}return S}function G(P,O){if(P==null)return{};var S={},c=Object.keys(P),s,m;for(m=0;m<c.length;m++){if(s=c[m],O.indexOf(s)>=0)continue;S[s]=P[s]}return S}var j=function(O){var S=O.className,c=O.percent,s=O.prefixCls,m=O.strokeColor,w=O.strokeLinecap,R=O.strokeWidth,ue=O.style,ye=O.trailColor,ne=O.trailWidth,be=O.transition,ce=le(O,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ce.gapPosition;var Q=Array.isArray(c)?c:[c],W=Array.isArray(m)?m:[m],re=X(Q),p=L(re,1),_=p[0],g=R/2,N=100-R/2,te="M ".concat(w==="round"?g:0,",").concat(g,`
|
|
L `).concat(w==="round"?N:100,",").concat(g),B="0 0 100 ".concat(R),ie=0;return ge.a.createElement("svg",D({className:Ae()("".concat(s,"-line"),S),viewBox:B,preserveAspectRatio:"none",style:ue},ce),ge.a.createElement("path",{className:"".concat(s,"-line-trail"),d:te,strokeLinecap:w,stroke:ye,strokeWidth:ne||R,fillOpacity:"0"}),Q.map(function(Te,Ie){var Le={strokeDasharray:"".concat(Te,"px, 100px"),strokeDashoffset:"-".concat(ie,"px"),transition:be||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},we=W[Ie]||W[W.length-1];return ie+=Te,ge.a.createElement("path",{key:Ie,className:"".concat(s,"-line-path"),d:te,strokeLinecap:w,stroke:we,strokeWidth:R,fillOpacity:"0",ref:_[Ie],style:Le})}))};j.defaultProps=Ee;var I=j;function oe(){return oe=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var S=arguments[O];for(var c in S)Object.prototype.hasOwnProperty.call(S,c)&&(P[c]=S[c])}return P},oe.apply(this,arguments)}function ae(P,O){return je(P)||ke(P,O)||He(P,O)||_e()}function _e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(P,O){if(!P)return;if(typeof P=="string")return pe(P,O);var S=Object.prototype.toString.call(P).slice(8,-1);if(S==="Object"&&P.constructor&&(S=P.constructor.name),S==="Map"||S==="Set")return Array.from(P);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return pe(P,O)}function pe(P,O){(O==null||O>P.length)&&(O=P.length);for(var S=0,c=new Array(O);S<O;S++)c[S]=P[S];return c}function ke(P,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(P)))return;var S=[],c=!0,s=!1,m=void 0;try{for(var w=P[Symbol.iterator](),R;!(c=(R=w.next()).done)&&!(S.push(R.value),O&&S.length===O);c=!0);}catch(ue){s=!0,m=ue}finally{try{!c&&w.return!=null&&w.return()}finally{if(s)throw m}}return S}function je(P){if(Array.isArray(P))return P}function me(P,O){if(P==null)return{};var S=he(P,O),c,s;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(P);for(s=0;s<m.length;s++){if(c=m[s],O.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(P,c))continue;S[c]=P[c]}}return S}function he(P,O){if(P==null)return{};var S={},c=Object.keys(P),s,m;for(m=0;m<c.length;m++){if(s=c[m],O.indexOf(s)>=0)continue;S[s]=P[s]}return S}var Oe=0;function V(P){return+P.replace("%","")}function b(P){return Array.isArray(P)?P:[P]}function J(P,O,S,c){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,m=arguments.length>5?arguments[5]:void 0,w=50-c/2,R=0,ue=-w,ye=0,ne=-2*w;switch(m){case"left":R=-w,ue=0,ye=2*w,ne=0;break;case"right":R=w,ue=0,ye=-2*w,ne=0;break;case"bottom":ue=w,ne=2*w;break;default:}var be="M 50,50 m ".concat(R,",").concat(ue,`
|
|
a `).concat(w,",").concat(w," 0 1 1 ").concat(ye,",").concat(-ne,`
|
|
a `).concat(w,",").concat(w," 0 1 1 ").concat(-ye,",").concat(ne),ce=Math.PI*2*w,Q={stroke:S,strokeDasharray:"".concat(O/100*(ce-s),"px ").concat(ce,"px"),strokeDashoffset:"-".concat(s/2+P/100*(ce-s),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:be,pathStyle:Q}}var z=function(O){var S=O.prefixCls,c=O.strokeWidth,s=O.trailWidth,m=O.gapDegree,w=O.gapPosition,R=O.trailColor,ue=O.strokeLinecap,ye=O.style,ne=O.className,be=O.strokeColor,ce=O.percent,Q=me(O,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),W=Object(F.useMemo)(function(){return Oe+=1,Oe},[]),re=J(0,100,R,c,m,w),p=re.pathString,_=re.pathStyle,g=b(ce),N=b(be),te=N.find(function(Le){return Object.prototype.toString.call(Le)==="[object Object]"}),B=X(g),ie=ae(B,1),Te=ie[0],Ie=function(){var we=0;return g.map(function(Re,Ve){var Xe=N[Ve]||N[N.length-1],Ke=Object.prototype.toString.call(Xe)==="[object Object]"?"url(#".concat(S,"-gradient-").concat(W,")"):"",Ze=J(we,Re,Xe,c,m,w);return we+=Re,ge.a.createElement("path",{key:Ve,className:"".concat(S,"-circle-path"),d:Ze.pathString,stroke:Ke,strokeLinecap:ue,strokeWidth:c,opacity:Re===0?0:1,fillOpacity:"0",style:Ze.pathStyle,ref:Te[Ve]})})};return ge.a.createElement("svg",oe({className:Ae()("".concat(S,"-circle"),ne),viewBox:"0 0 100 100",style:ye},Q),te&&ge.a.createElement("defs",null,ge.a.createElement("linearGradient",{id:"".concat(S,"-gradient-").concat(W),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(te).sort(function(Le,we){return V(Le)-V(we)}).map(function(Le,we){return ge.a.createElement("stop",{key:we,offset:Le,stopColor:te[Le]})}))),ge.a.createElement("path",{className:"".concat(S,"-circle-trail"),d:p,stroke:R,strokeLinecap:ue,strokeWidth:s||c,fillOpacity:"0",style:_}),Ie().reverse())};z.defaultProps=Ee;var x=z,ee={Line:I,Circle:x}},kSUc:function(ht,Je,k){},lZu9:function(ht,Je,k){(function(F){F(k("VrN/"),k("1eCo"),k("8EBN"))})(function(F){"use strict";F.defineMode("markdown",function(ge,se){var Ae=F.getMode(ge,"text/html"),Ee=Ae.name=="null";function X(c){if(F.findModeByName){var s=F.findModeByName(c);s&&(c=s.mime||s.mimes[0])}var m=F.getMode(ge,c);return m.name=="null"?null:m}se.highlightFormatting===void 0&&(se.highlightFormatting=!1),se.maxBlockquoteDepth===void 0&&(se.maxBlockquoteDepth=0),se.taskLists===void 0&&(se.taskLists=!1),se.strikethrough===void 0&&(se.strikethrough=!1),se.emoji===void 0&&(se.emoji=!1),se.fencedCodeBlockHighlighting===void 0&&(se.fencedCodeBlockHighlighting=!0),se.fencedCodeBlockDefaultMode===void 0&&(se.fencedCodeBlockDefaultMode="text/plain"),se.xml===void 0&&(se.xml=!0),se.tokenTypeOverrides===void 0&&(se.tokenTypeOverrides={});var D={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 L in D)D.hasOwnProperty(L)&&se.tokenTypeOverrides[L]&&(D[L]=se.tokenTypeOverrides[L]);var T=/^([*\-_])(?:\s*\1){2,}\s*$/,H=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,K=/^\[(x| )\](?=\s)/i,q=se.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ce=/^ {0,3}(?:\={1,}|-{2,})\s*$/,le=/^[^#!\[\]*_\\<>` "'(~:]+/,G=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,j=/^\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]/,oe=" ";function ae(c,s,m){return s.f=s.inline=m,m(c,s)}function _e(c,s,m){return s.f=s.block=m,m(c,s)}function He(c){return!c||!/\S/.test(c.string)}function pe(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==je){var s=Ee;if(!s){var m=F.innerMode(Ae,c.htmlState);s=m.mode.name=="xml"&&m.state.tagStart===null&&!m.state.context&&m.state.tokenize.isInText}s&&(c.f=V,c.block=ke,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function ke(c,s){var m=c.column()===s.indentation,w=He(s.prevLine.stream),R=s.indentedCode,ue=s.prevLine.hr,ye=s.list!==!1,ne=(s.listStack[s.listStack.length-1]||0)+3;s.indentedCode=!1;var be=s.indentation;if(s.indentationDiff===null&&(s.indentationDiff=s.indentation,ye)){for(s.list=null;be<s.listStack[s.listStack.length-1];)s.listStack.pop(),s.listStack.length?s.indentation=s.listStack[s.listStack.length-1]:s.list=!1;s.list!==!1&&(s.indentationDiff=be-s.listStack[s.listStack.length-1])}var ce=!w&&!ue&&!s.prevLine.header&&(!ye||!R)&&!s.prevLine.fencedCodeEnd,Q=(s.list===!1||ue||w)&&s.indentation<=ne&&c.match(T),W=null;if(s.indentationDiff>=4&&(R||s.prevLine.fencedCodeEnd||s.prevLine.header||w))return c.skipToEnd(),s.indentedCode=!0,D.code;if(c.eatSpace())return null;if(m&&s.indentation<=ne&&(W=c.match(q))&&W[1].length<=6)return s.quote=0,s.header=W[1].length,s.thisLine.header=!0,se.highlightFormatting&&(s.formatting="header"),s.f=s.inline,he(s);if(s.indentation<=ne&&c.eat(">"))return s.quote=m?1:s.quote+1,se.highlightFormatting&&(s.formatting="quote"),c.eatSpace(),he(s);if(!Q&&!s.setext&&m&&s.indentation<=ne&&(W=c.match(H))){var re=W[1]?"ol":"ul";return s.indentation=be+c.current().length,s.list=!0,s.quote=0,s.listStack.push(s.indentation),s.em=!1,s.strong=!1,s.code=!1,s.strikethrough=!1,se.taskLists&&c.match(K,!1)&&(s.taskList=!0),s.f=s.inline,se.highlightFormatting&&(s.formatting=["list","list-"+re]),he(s)}else{if(m&&s.indentation<=ne&&(W=c.match(G,!0)))return s.quote=0,s.fencedEndRE=new RegExp(W[1]+"+ *$"),s.localMode=se.fencedCodeBlockHighlighting&&X(W[2]||se.fencedCodeBlockDefaultMode),s.localMode&&(s.localState=F.startState(s.localMode)),s.f=s.block=me,se.highlightFormatting&&(s.formatting="code-block"),s.code=-1,he(s);if(s.setext||(!ce||!ye)&&!s.quote&&s.list===!1&&!s.code&&!Q&&!j.test(c.string)&&(W=c.lookAhead(1))&&(W=W.match(Ce)))return s.setext?(s.header=s.setext,s.setext=0,c.skipToEnd(),se.highlightFormatting&&(s.formatting="header")):(s.header=W[0].charAt(0)=="="?1:2,s.setext=s.header),s.thisLine.header=!0,s.f=s.inline,he(s);if(Q)return c.skipToEnd(),s.hr=!0,s.thisLine.hr=!0,D.hr;if(c.peek()==="[")return ae(c,s,ee)}return ae(c,s,s.inline)}function je(c,s){var m=Ae.token(c,s.htmlState);if(!Ee){var w=F.innerMode(Ae,s.htmlState);(w.mode.name=="xml"&&w.state.tagStart===null&&!w.state.context&&w.state.tokenize.isInText||s.md_inside&&c.current().indexOf(">")>-1)&&(s.f=V,s.block=ke,s.htmlState=null)}return m}function me(c,s){var m=s.listStack[s.listStack.length-1]||0,w=s.indentation<m,R=m+3;if(s.fencedEndRE&&s.indentation<=R&&(w||c.match(s.fencedEndRE))){se.highlightFormatting&&(s.formatting="code-block");var ue;return w||(ue=he(s)),s.localMode=s.localState=null,s.block=ke,s.f=V,s.fencedEndRE=null,s.code=0,s.thisLine.fencedCodeEnd=!0,w?_e(c,s,s.block):ue}else return s.localMode?s.localMode.token(c,s.localState):(c.skipToEnd(),D.code)}function he(c){var s=[];if(c.formatting){s.push(D.formatting),typeof c.formatting=="string"&&(c.formatting=[c.formatting]);for(var m=0;m<c.formatting.length;m++)s.push(D.formatting+"-"+c.formatting[m]),c.formatting[m]==="header"&&s.push(D.formatting+"-"+c.formatting[m]+"-"+c.header),c.formatting[m]==="quote"&&(!se.maxBlockquoteDepth||se.maxBlockquoteDepth>=c.quote?s.push(D.formatting+"-"+c.formatting[m]+"-"+c.quote):s.push("error"))}if(c.taskOpen)return s.push("meta"),s.length?s.join(" "):null;if(c.taskClosed)return s.push("property"),s.length?s.join(" "):null;if(c.linkHref?s.push(D.linkHref,"url"):(c.strong&&s.push(D.strong),c.em&&s.push(D.em),c.strikethrough&&s.push(D.strikethrough),c.emoji&&s.push(D.emoji),c.linkText&&s.push(D.linkText),c.code&&s.push(D.code),c.image&&s.push(D.image),c.imageAltText&&s.push(D.imageAltText,"link"),c.imageMarker&&s.push(D.imageMarker)),c.header&&s.push(D.header,D.header+"-"+c.header),c.quote&&(s.push(D.quote),!se.maxBlockquoteDepth||se.maxBlockquoteDepth>=c.quote?s.push(D.quote+"-"+c.quote):s.push(D.quote+"-"+se.maxBlockquoteDepth)),c.list!==!1){var w=(c.listStack.length-1)%3;w?w===1?s.push(D.list2):s.push(D.list3):s.push(D.list1)}return c.trailingSpaceNewLine?s.push("trailing-space-new-line"):c.trailingSpace&&s.push("trailing-space-"+(c.trailingSpace%2?"a":"b")),s.length?s.join(" "):null}function Oe(c,s){return c.match(le,!0)?he(s):void 0}function V(c,s){var m=s.text(c,s);if(typeof m!="undefined")return m;if(s.list)return s.list=null,he(s);if(s.taskList){var w=c.match(K,!0)[1]===" ";return w?s.taskOpen=!0:s.taskClosed=!0,se.highlightFormatting&&(s.formatting="task"),s.taskList=!1,he(s)}if(s.taskOpen=!1,s.taskClosed=!1,s.header&&c.match(/^#+$/,!0))return se.highlightFormatting&&(s.formatting="header"),he(s);var R=c.next();if(s.linkTitle){s.linkTitle=!1;var ue=R;R==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ye="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(c.match(new RegExp(ye),!0))return D.linkHref}if(R==="`"){var ne=s.formatting;se.highlightFormatting&&(s.formatting="code"),c.eatWhile("`");var be=c.current().length;if(s.code==0&&(!s.quote||be==1))return s.code=be,he(s);if(be==s.code){var ce=he(s);return s.code=0,ce}else return s.formatting=ne,he(s)}else if(s.code)return he(s);if(R==="\\"&&(c.next(),se.highlightFormatting)){var Q=he(s),W=D.formatting+"-escape";return Q?Q+" "+W:W}if(R==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return s.imageMarker=!0,s.image=!0,se.highlightFormatting&&(s.formatting="image"),he(s);if(R==="["&&s.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return s.imageMarker=!1,s.imageAltText=!0,se.highlightFormatting&&(s.formatting="image"),he(s);if(R==="]"&&s.imageAltText){se.highlightFormatting&&(s.formatting="image");var Q=he(s);return s.imageAltText=!1,s.image=!1,s.inline=s.f=J,Q}if(R==="["&&!s.image)return s.linkText&&c.match(/^.*?\]/)||(s.linkText=!0,se.highlightFormatting&&(s.formatting="link")),he(s);if(R==="]"&&s.linkText){se.highlightFormatting&&(s.formatting="link");var Q=he(s);return s.linkText=!1,s.inline=s.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?J:V,Q}if(R==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=b,se.highlightFormatting&&(s.formatting="link");var Q=he(s);return Q?Q+=" ":Q="",Q+D.linkInline}if(R==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=b,se.highlightFormatting&&(s.formatting="link");var Q=he(s);return Q?Q+=" ":Q="",Q+D.linkEmail}if(se.xml&&R==="<"&&c.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var re=c.string.indexOf(">",c.pos);if(re!=-1){var p=c.string.substring(c.start,re);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(p)&&(s.md_inside=!0)}return c.backUp(1),s.htmlState=F.startState(Ae),_e(c,s,je)}if(se.xml&&R==="<"&&c.match(/^\/\w*?>/))return s.md_inside=!1,"tag";if(R==="*"||R==="_"){for(var _=1,g=c.pos==1?" ":c.string.charAt(c.pos-2);_<3&&c.eat(R);)_++;var N=c.peek()||" ",te=!/\s/.test(N)&&(!I.test(N)||/\s/.test(g)||I.test(g)),B=!/\s/.test(g)&&(!I.test(g)||/\s/.test(N)||I.test(N)),ie=null,Te=null;if(_%2&&(!s.em&&te&&(R==="*"||!B||I.test(g))?ie=!0:s.em==R&&B&&(R==="*"||!te||I.test(N))&&(ie=!1)),_>1&&(!s.strong&&te&&(R==="*"||!B||I.test(g))?Te=!0:s.strong==R&&B&&(R==="*"||!te||I.test(N))&&(Te=!1)),Te!=null||ie!=null){se.highlightFormatting&&(s.formatting=ie==null?"strong":Te==null?"em":"strong em"),ie===!0&&(s.em=R),Te===!0&&(s.strong=R);var ce=he(s);return ie===!1&&(s.em=!1),Te===!1&&(s.strong=!1),ce}}else if(R===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return he(s);c.backUp(1)}if(se.strikethrough){if(R==="~"&&c.eatWhile(R)){if(s.strikethrough){se.highlightFormatting&&(s.formatting="strikethrough");var ce=he(s);return s.strikethrough=!1,ce}else if(c.match(/^[^\s]/,!1))return s.strikethrough=!0,se.highlightFormatting&&(s.formatting="strikethrough"),he(s)}else if(R===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return he(s);c.backUp(2)}}if(se.emoji&&R===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){s.emoji=!0,se.highlightFormatting&&(s.formatting="emoji");var Ie=he(s);return s.emoji=!1,Ie}return R===" "&&(c.match(/^ +$/,!1)?s.trailingSpace++:s.trailingSpace&&(s.trailingSpaceNewLine=!0)),he(s)}function b(c,s){var m=c.next();if(m===">"){s.f=s.inline=V,se.highlightFormatting&&(s.formatting="link");var w=he(s);return w?w+=" ":w="",w+D.linkInline}return c.match(/^[^>]+/,!0),D.linkInline}function J(c,s){if(c.eatSpace())return null;var m=c.next();return m==="("||m==="["?(s.f=s.inline=x(m==="("?")":"]"),se.highlightFormatting&&(s.formatting="link-string"),s.linkHref=!0,he(s)):"error"}var z={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function x(c){return function(s,m){var w=s.next();if(w===c){m.f=m.inline=V,se.highlightFormatting&&(m.formatting="link-string");var R=he(m);return m.linkHref=!1,R}return s.match(z[c]),m.linkHref=!0,he(m)}}function ee(c,s){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(s.f=P,c.next(),se.highlightFormatting&&(s.formatting="link"),s.linkText=!0,he(s)):ae(c,s,V)}function P(c,s){if(c.match(/^\]:/,!0)){s.f=s.inline=O,se.highlightFormatting&&(s.formatting="link");var m=he(s);return s.linkText=!1,m}return c.match(/^([^\]\\]|\\.)+/,!0),D.linkText}function O(c,s){return c.eatSpace()?null:(c.match(/^[^\s]+/,!0),c.peek()===void 0?s.linkTitle=!0:c.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),s.f=s.inline=V,D.linkHref+" url")}var S={startState:function(){return{f:ke,prevLine:{stream:null},thisLine:{stream:null},block:ke,htmlState:null,indentation:0,inline:V,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&&F.copyState(Ae,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?F.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,s){if(s.formatting=!1,c!=s.thisLine.stream){if(s.header=0,s.hr=!1,c.match(/^\s*$/,!0))return pe(s),null;if(s.prevLine=s.thisLine,s.thisLine={stream:c},s.taskList=!1,s.trailingSpace=0,s.trailingSpaceNewLine=!1,!s.localState&&(s.f=s.block,s.f!=je)){var m=c.match(/^\s*/,!0)[0].replace(/\t/g,oe).length;if(s.indentation=m,s.indentationDiff=null,m>0)return null}}return s.f(c,s)},innerMode:function(c){return c.block==je?{state:c.htmlState,mode:Ae}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:S}},indent:function(c,s,m){return c.block==je&&Ae.indent?Ae.indent(c.htmlState,s,m):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,s,m):F.Pass},blankLine:pe,getType:he,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return S},"xml"),F.defineMIME("text/markdown","markdown"),F.defineMIME("text/x-markdown","markdown")})},osHv:function(ht,Je,k){(function(F){F(k("VrN/"))})(function(F){"use strict";var ge=F.Pos;function se(I,oe){return I.line-oe.line||I.ch-oe.ch}var Ae="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",Ee=Ae+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",X=new RegExp("<(/?)(["+Ae+"]["+Ee+"]*)","g");function D(I,oe,ae,_e){this.line=oe,this.ch=ae,this.cm=I,this.text=I.getLine(oe),this.min=_e?Math.max(_e.from,I.firstLine()):I.firstLine(),this.max=_e?Math.min(_e.to-1,I.lastLine()):I.lastLine()}function L(I,oe){var ae=I.cm.getTokenTypeAt(ge(I.line,oe));return ae&&/\btag\b/.test(ae)}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 K(I){for(;;){var oe=I.text.indexOf(">",I.ch);if(oe==-1){if(T(I))continue;return}if(!L(I,oe+1)){I.ch=oe+1;continue}var ae=I.text.lastIndexOf("/",oe),_e=ae>-1&&!/\S/.test(I.text.slice(ae+1,oe));return I.ch=oe+1,_e?"selfClose":"regular"}}function q(I){for(;;){var oe=I.ch?I.text.lastIndexOf("<",I.ch-1):-1;if(oe==-1){if(H(I))continue;return}if(!L(I,oe+1)){I.ch=oe;continue}X.lastIndex=oe,I.ch=oe;var ae=X.exec(I.text);if(ae&&ae.index==oe)return ae}}function Ce(I){for(;;){X.lastIndex=I.ch;var oe=X.exec(I.text);if(!oe){if(T(I))continue;return}if(!L(I,oe.index+1)){I.ch=oe.index+1;continue}return I.ch=oe.index+oe[0].length,oe}}function le(I){for(;;){var oe=I.ch?I.text.lastIndexOf(">",I.ch-1):-1;if(oe==-1){if(H(I))continue;return}if(!L(I,oe+1)){I.ch=oe;continue}var ae=I.text.lastIndexOf("/",oe),_e=ae>-1&&!/\S/.test(I.text.slice(ae+1,oe));return I.ch=oe+1,_e?"selfClose":"regular"}}function G(I,oe){for(var ae=[];;){var _e=Ce(I),He,pe=I.line,ke=I.ch-(_e?_e[0].length:0);if(!_e||!(He=K(I)))return;if(He=="selfClose")continue;if(_e[1]){for(var je=ae.length-1;je>=0;--je)if(ae[je]==_e[2]){ae.length=je;break}if(je<0&&(!oe||oe==_e[2]))return{tag:_e[2],from:ge(pe,ke),to:ge(I.line,I.ch)}}else ae.push(_e[2])}}function j(I,oe){for(var ae=[];;){var _e=le(I);if(!_e)return;if(_e=="selfClose"){q(I);continue}var He=I.line,pe=I.ch,ke=q(I);if(!ke)return;if(ke[1])ae.push(ke[2]);else{for(var je=ae.length-1;je>=0;--je)if(ae[je]==ke[2]){ae.length=je;break}if(je<0&&(!oe||oe==ke[2]))return{tag:ke[2],from:ge(I.line,I.ch),to:ge(He,pe)}}}}F.registerHelper("fold","xml",function(I,oe){for(var ae=new D(I,oe.line,0);;){var _e=Ce(ae);if(!_e||ae.line!=oe.line)return;var He=K(ae);if(!He)return;if(!_e[1]&&He!="selfClose"){var pe=ge(ae.line,ae.ch),ke=G(ae,_e[2]);return ke&&se(ke.from,pe)>0?{from:pe,to:ke.from}:null}}}),F.findMatchingTag=function(I,oe,ae){var _e=new D(I,oe.line,oe.ch,ae);if(_e.text.indexOf(">")==-1&&_e.text.indexOf("<")==-1)return;var He=K(_e),pe=He&&ge(_e.line,_e.ch),ke=He&&q(_e);if(!He||!ke||se(_e,oe)>0)return;var je={from:ge(_e.line,_e.ch),to:pe,tag:ke[2]};return He=="selfClose"?{open:je,close:null,at:"open"}:ke[1]?{open:j(_e,ke[2]),close:je,at:"close"}:(_e=new D(I,pe.line,pe.ch,ae),{open:je,close:G(_e,ke[2]),at:"open"})},F.findEnclosingTag=function(I,oe,ae,_e){for(var He=new D(I,oe.line,oe.ch,ae);;){var pe=j(He,_e);if(!pe)break;var ke=new D(I,oe.line,oe.ch,ae),je=G(ke,pe.tag);if(je)return{open:pe,close:je}}},F.scanForClosingTag=function(I,oe,ae,_e){var He=new D(I,oe.line,oe.ch,_e?{from:0,to:_e}:null);return G(He,ae)}})},p5ED:function(ht,Je,k){"use strict";var F=k("+L6B"),ge=k("2/Rp"),se=k("5Dmo"),Ae=k("3S7+"),Ee=k("k1fw"),X=k("tJVT"),D=k("q1tI"),L=k.n(D),T=k("vHTk"),H=k.n(T),K=k("yEEn"),q=k("ZW9T"),Ce=k("1vsH");Je.a=function(le){var G=le.name,j=le.data,I=le.theme,oe=le.type,ae=le.filename,_e=le.monacoEditor,He=le.className,pe=le.style,ke=le.close,je=le.onClose,me=le.hasMask,he=Object(D.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Oe=Object(X.a)(he,2),V=Oe[0],b=Oe[1],J=Object(D.useState)(""),z=Object(X.a)(J,2),x=z[0],ee=z[1],P=Object(D.useRef)();ae&&(_e.filename=ae),Object(D.useEffect)(function(){var c,s,m=(c=document.cookie)===null||c===void 0||((s=c.replace(/\s/g,""))===null||s===void 0)?void 0:s.split(";");m==null||m.map(function(w){var R=w.split("=");R[0]==="_educoder_session"&&ee(R[1])})},[]);var O=function(){if(j.startsWith("http")||j.startsWith("/")){S();return}Object(Ce.y)(ae||"educoder",j,ae)},S=function(){Object(Ce.w)(ae||G,j)};return console.log("data:",j,"fileanme:",ae," name:",G),L.a.createElement("div",{style:Object(Ee.a)({},pe||{}),className:"".concat(me&&H.a.bgBlack," ").concat(oe?H.a.wrp:"hide")},ke&&L.a.createElement("div",{className:H.a.close,ref:P},L.a.createElement(Ae.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return P.current}},L.a.createElement("span",{onClick:S},L.a.createElement("i",{className:"icon-quxiaozhiding"}))),L.a.createElement(Ae.a,{title:"\u5173\u95ED",getPopupContainer:function(){return P.current}},L.a.createElement("span",{className:"",onClick:je},L.a.createElement("i",{className:"icon-guanbi1"})))),L.a.createElement("div",{className:"".concat(H.a[He]," ").concat(He," ").concat(H.a.monaco," ").concat(oe==="txt"?"show":"hide")},oe==="txt"&&L.a.createElement(q.b,_e)),oe==="audio"&&L.a.createElement("audio",{src:"".concat(j!=null&&j.startsWith("/")||(j==null?void 0:j.indexOf("https://"))>-1?j:"data:audio/mp3;base64,").concat(j),autoPlay:!0}),oe==="video"&&L.a.createElement(L.a.Fragment,null,j!=null&&j.startsWith("/")?L.a.createElement("video",{controls:!0,src:"".concat(j),autoPlay:!0}):L.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(j),autoPlay:!0})),oe==="pdf"&&L.a.createElement("embed",{className:H.a.embed,src:j}),oe==="image"&&L.a.createElement(L.a.Fragment,null,L.a.createElement("img",{src:"".concat(j!=null&&j.startsWith("/")||(j==null?void 0:j.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(j)})),oe==="other"&&L.a.createElement("div",null,L.a.createElement(ge.a,{type:"primary",size:"large",onClick:O},L.a.createElement(K.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(oe==="download"||oe==="office")&&L.a.createElement(ge.a,{type:"primary",size:"large",onClick:O},L.a.createElement(K.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ht,Je,k){},"rAM+":function(ht,Je,k){"use strict";k.d(Je,"a",function(){return ge});var F=k("Qw5x");function ge(se,Ae){var Ee;if(typeof Symbol=="undefined"||se[Symbol.iterator]==null){if(Array.isArray(se)||(Ee=Object(F.a)(se))||Ae&&se&&typeof se.length=="number"){Ee&&(se=Ee);var X=0,D=function(){};return{s:D,n:function(){return X>=se.length?{done:!0}:{done:!1,value:se[X++]}},e:function(q){throw q},f:D}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var L=!0,T=!1,H;return{s:function(){Ee=se[Symbol.iterator]()},n:function(){var q=Ee.next();return L=q.done,q},e:function(q){T=!0,H=q},f:function(){try{!L&&Ee.return!=null&&Ee.return()}finally{if(T)throw H}}}}},rUJ1:function(ht,Je){const k=/[&<>"']/,F=/[&<>"']/g,ge=/[<>"']|&(?!#?\w+;)/,se=/[<>"']|&(?!#?\w+;)/g,Ae={"&":"&","<":"<",">":">",'"':""","'":"'"},Ee=me=>Ae[me];function X(me,he){if(he){if(k.test(me))return me.replace(F,Ee)}else if(ge.test(me))return me.replace(se,Ee);return me}const D=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function L(me){return me.replace(D,(he,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(me,he){me=me.source||me,he=he||"";const Oe={replace:(V,b)=>(b=b.source||b,b=b.replace(T,"$1"),me=me.replace(V,b),Oe),getRegex:()=>new RegExp(me,he)};return Oe}const K=/[^\w:]/g,q=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ce(me,he,Oe){if(me){let V;try{V=decodeURIComponent(L(Oe)).replace(K,"").toLowerCase()}catch(b){return null}if(V.indexOf("javascript:")===0||V.indexOf("vbscript:")===0||V.indexOf("data:")===0)return null}he&&!q.test(Oe)&&(Oe=oe(he,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(V){return null}return Oe}const le={},G=/^[^:]+:\/*[^/]*$/,j=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function oe(me,he){le[" "+me]||(G.test(me)?le[" "+me]=me+"/":le[" "+me]=pe(me,"/",!0)),me=le[" "+me];const Oe=me.indexOf(":")===-1;return he.substring(0,2)==="//"?Oe?he:me.replace(j,"$1")+he:he.charAt(0)==="/"?Oe?he:me.replace(I,"$1")+he:me+he}const ae={exec:function(){}};function _e(me){let he=1,Oe,V;for(;he<arguments.length;he++){Oe=arguments[he];for(V in Oe)Object.prototype.hasOwnProperty.call(Oe,V)&&(me[V]=Oe[V])}return me}function He(me,he){const Oe=me.replace(/\|/g,(J,z,x)=>{let ee=!1,P=z;for(;--P>=0&&x[P]==="\\";)ee=!ee;return ee?"|":" |"}),V=Oe.split(/ \|/);let b=0;if(V.length>he)V.splice(he);else for(;V.length<he;)V.push("");for(;b<V.length;b++)V[b]=V[b].trim().replace(/\\\|/g,"|");return V}function pe(me,he,Oe){const V=me.length;if(V===0)return"";let b=0;for(;b<V;){const J=me.charAt(V-b-1);if(J===he&&!Oe)b++;else if(J!==he&&Oe)b++;else break}return me.substr(0,V-b)}function ke(me,he){if(me.indexOf(he[1])===-1)return-1;const Oe=me.length;let V=0,b=0;for(;b<Oe;b++)if(me[b]==="\\")b++;else if(me[b]===he[0])V++;else if(me[b]===he[1]&&(V--,V<0))return b;return-1}function je(me){me&&me.sanitize&&!me.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}ht.exports={escape:X,unescape:L,edit:H,cleanUrl:Ce,resolveUrl:oe,noopTest:ae,merge:_e,splitCells:He,rtrim:pe,findClosingBracket:ke,checkSanitizeDeprecation:je}},vHTk:function(ht,Je,k){ht.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wMS7:function(ht,Je,k){/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */(function(F,ge){ht.exports=ge()})(this,function(){"use strict";function F(g){if(Array.isArray(g)){for(var N=0,te=Array(g.length);N<g.length;N++)te[N]=g[N];return te}else return Array.from(g)}var ge=Object.hasOwnProperty,se=Object.setPrototypeOf,Ae=Object.isFrozen,Ee=Object.keys,X=Object.freeze,D=Object.seal,L=Object.create,T=typeof Reflect!="undefined"&&Reflect,H=T.apply,K=T.construct;H||(H=function(N,te,B){return N.apply(te,B)}),X||(X=function(N){return N}),D||(D=function(N){return N}),K||(K=function(N,te){return new(Function.prototype.bind.apply(N,[null].concat(F(te))))});var q=he(Array.prototype.forEach),Ce=he(Array.prototype.indexOf),le=he(Array.prototype.join),G=he(Array.prototype.pop),j=he(Array.prototype.push),I=he(Array.prototype.slice),oe=he(String.prototype.toLowerCase),ae=he(String.prototype.match),_e=he(String.prototype.replace),He=he(String.prototype.indexOf),pe=he(String.prototype.trim),ke=he(RegExp.prototype.test),je=Oe(RegExp),me=Oe(TypeError);function he(g){return function(N){for(var te=arguments.length,B=Array(te>1?te-1:0),ie=1;ie<te;ie++)B[ie-1]=arguments[ie];return H(g,N,B)}}function Oe(g){return function(){for(var N=arguments.length,te=Array(N),B=0;B<N;B++)te[B]=arguments[B];return K(g,te)}}function V(g,N){se&&se(g,null);for(var te=N.length;te--;){var B=N[te];if(typeof B=="string"){var ie=oe(B);ie!==B&&(Ae(N)||(N[te]=ie),B=ie)}g[B]=!0}return g}function b(g){var N=L(null),te=void 0;for(te in g)H(ge,g,[te])&&(N[te]=g[te]);return N}var J=X(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),z=X(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),x=X(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ee=X(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),P=X(["#text"]),O=X(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),S=X(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),c=X(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),s=X(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),m=D(/\{\{[\s\S]*|[\s\S]*\}\}/gm),w=D(/<%[\s\S]*|[\s\S]*%>/gm),R=D(/^data-[\-\w.\u00B7-\uFFFF]/),ue=D(/^aria-[\-\w]+$/),ye=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ne=D(/^(?:\w+script|data):/i),be=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};function Q(g){if(Array.isArray(g)){for(var N=0,te=Array(g.length);N<g.length;N++)te[N]=g[N];return te}else return Array.from(g)}var W=function(){return typeof window=="undefined"?null:window},re=function(N,te){if((typeof N=="undefined"?"undefined":ce(N))!=="object"||typeof N.createPolicy!="function")return null;var B=null,ie="data-tt-policy-suffix";te.currentScript&&te.currentScript.hasAttribute(ie)&&(B=te.currentScript.getAttribute(ie));var Te="dompurify"+(B?"#"+B:"");try{return N.createPolicy(Te,{createHTML:function(Le){return Le}})}catch(Ie){return console.warn("TrustedTypes policy "+Te+" could not be created."),null}};function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:W(),N=function(fe){return p(fe)};if(N.version="2.0.15",N.removed=[],!g||!g.document||g.document.nodeType!==9)return N.isSupported=!1,N;var te=g.document,B=!1,ie=g.document,Te=g.DocumentFragment,Ie=g.HTMLTemplateElement,Le=g.Node,we=g.NodeFilter,Re=g.NamedNodeMap,Ve=Re===void 0?g.NamedNodeMap||g.MozNamedAttrMap:Re,Xe=g.Text,Ke=g.Comment,Ze=g.DOMParser,ct=g.trustedTypes;if(typeof Ie=="function"){var rt=ie.createElement("template");rt.content&&rt.content.ownerDocument&&(ie=rt.content.ownerDocument)}var Ye=re(ct,te),ve=Ye&&Rn?Ye.createHTML(""):"",it=ie,Qe=it.implementation,Se=it.createNodeIterator,Ne=it.getElementsByTagName,U=it.createDocumentFragment,M=te.importNode,E=b(ie).documentMode?ie.documentMode:{},f={};N.isSupported=Qe&&typeof Qe.createHTMLDocument!="undefined"&&E!==9;var h=m,v=w,y=R,Y=ue,de=ne,Me=be,Ge=ye,$e=null,ze=V({},[].concat(Q(J),Q(z),Q(x),Q(ee),Q(P))),vt=null,bt=V({},[].concat(Q(O),Q(S),Q(c),Q(s))),lt=null,Dt=null,Ct=!0,Et=!0,Tt=!1,yt=!1,Gt=!1,Cn=!1,sn=!1,kn=!1,nn=!1,nr=!1,On=!1,Rn=!1,Hn=!0,Lt=!0,tt=!1,Qt={},Xn=V({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),hn=null,wt=V({},["audio","video","img","source","image","track"]),Sn=null,Pn=V({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ln=null,Pe=ie.createElement("form"),dt=function(fe){if(Ln&&Ln===fe)return;(!fe||(typeof fe=="undefined"?"undefined":ce(fe))!=="object")&&(fe={}),fe=b(fe),$e="ALLOWED_TAGS"in fe?V({},fe.ALLOWED_TAGS):ze,vt="ALLOWED_ATTR"in fe?V({},fe.ALLOWED_ATTR):bt,Sn="ADD_URI_SAFE_ATTR"in fe?V(b(Pn),fe.ADD_URI_SAFE_ATTR):Pn,hn="ADD_DATA_URI_TAGS"in fe?V(b(wt),fe.ADD_DATA_URI_TAGS):wt,lt="FORBID_TAGS"in fe?V({},fe.FORBID_TAGS):{},Dt="FORBID_ATTR"in fe?V({},fe.FORBID_ATTR):{},Qt="USE_PROFILES"in fe?fe.USE_PROFILES:!1,Ct=fe.ALLOW_ARIA_ATTR!==!1,Et=fe.ALLOW_DATA_ATTR!==!1,Tt=fe.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=fe.SAFE_FOR_JQUERY||!1,Gt=fe.SAFE_FOR_TEMPLATES||!1,Cn=fe.WHOLE_DOCUMENT||!1,nn=fe.RETURN_DOM||!1,nr=fe.RETURN_DOM_FRAGMENT||!1,On=fe.RETURN_DOM_IMPORT||!1,Rn=fe.RETURN_TRUSTED_TYPE||!1,kn=fe.FORCE_BODY||!1,Hn=fe.SANITIZE_DOM!==!1,Lt=fe.KEEP_CONTENT!==!1,tt=fe.IN_PLACE||!1,Ge=fe.ALLOWED_URI_REGEXP||Ge,Gt&&(Et=!1),nr&&(nn=!0),Qt&&($e=V({},[].concat(Q(P))),vt=[],Qt.html===!0&&(V($e,J),V(vt,O)),Qt.svg===!0&&(V($e,z),V(vt,S),V(vt,s)),Qt.svgFilters===!0&&(V($e,x),V(vt,S),V(vt,s)),Qt.mathMl===!0&&(V($e,ee),V(vt,c),V(vt,s))),fe.ADD_TAGS&&($e===ze&&($e=b($e)),V($e,fe.ADD_TAGS)),fe.ADD_ATTR&&(vt===bt&&(vt=b(vt)),V(vt,fe.ADD_ATTR)),fe.ADD_URI_SAFE_ATTR&&V(Sn,fe.ADD_URI_SAFE_ATTR),Lt&&($e["#text"]=!0),Cn&&V($e,["html","head","body"]),$e.table&&(V($e,["tbody"]),delete lt.tbody),X&&X(fe),Ln=fe},Tn=function(fe){j(N.removed,{element:fe});try{fe.parentNode.removeChild(fe)}catch(et){fe.outerHTML=ve}},Mn=function(fe,et){try{j(N.removed,{attribute:et.getAttributeNode(fe),from:et})}catch(at){j(N.removed,{attribute:null,from:et})}et.removeAttribute(fe)},Fe=function(fe){var et=void 0,at=void 0;if(kn)fe="<remove></remove>"+fe;else{var St=ae(fe,/^[\r\n\t ]+/);at=St&&St[0]}var cn=Ye?Ye.createHTML(fe):fe;try{et=new Ze().parseFromString(cn,"text/html")}catch(Rt){}if(B&&V(lt,["title"]),!et||!et.documentElement){et=Qe.createHTMLDocument("");var Kt=et,jt=Kt.body;jt.parentNode.removeChild(jt.parentNode.firstElementChild),jt.outerHTML=cn}return fe&&at&&et.body.insertBefore(ie.createTextNode(at),et.body.childNodes[0]||null),Ne.call(et,Cn?"html":"body")[0]};N.isSupported&&function(){try{var st=Fe("<x/><title></title><img>");ke(/<\/title/,st.querySelector("title").innerHTML)&&(B=!0)}catch(fe){}}();var Kn=function(fe){return Se.call(fe.ownerDocument||fe,fe,we.SHOW_ELEMENT|we.SHOW_COMMENT|we.SHOW_TEXT,function(){return we.FILTER_ACCEPT},!1)},_r=function(fe){return fe instanceof Xe||fe instanceof Ke?!1:typeof fe.nodeName!="string"||typeof fe.textContent!="string"||typeof fe.removeChild!="function"||!(fe.attributes instanceof Ve)||typeof fe.removeAttribute!="function"||typeof fe.setAttribute!="function"||typeof fe.namespaceURI!="string"},ut=function(fe){return(typeof Le=="undefined"?"undefined":ce(Le))==="object"?fe instanceof Le:fe&&(typeof fe=="undefined"?"undefined":ce(fe))==="object"&&typeof fe.nodeType=="number"&&typeof fe.nodeName=="string"},ln=function(fe,et,at){if(!f[fe])return;q(f[fe],function(St){St.call(N,et,at,Ln)})},zn=function(fe){var et=void 0;if(ln("beforeSanitizeElements",fe,null),_r(fe))return Tn(fe),!0;if(ae(fe.nodeName,/[\u0080-\uFFFF]/))return Tn(fe),!0;var at=oe(fe.nodeName);if(ln("uponSanitizeElement",fe,{tagName:at,allowedTags:$e}),(at==="svg"||at==="math")&&fe.querySelectorAll("p, br").length!==0)return Tn(fe),!0;if(!$e[at]||lt[at]){if(Lt&&!Xn[at]&&typeof fe.insertAdjacentHTML=="function")try{var St=fe.innerHTML;fe.insertAdjacentHTML("AfterEnd",Ye?Ye.createHTML(St):St)}catch(cn){}return Tn(fe),!0}return at==="noscript"&&ke(/<\/noscript/i,fe.innerHTML)||at==="noembed"&&ke(/<\/noembed/i,fe.innerHTML)?(Tn(fe),!0):(yt&&!ut(fe.firstElementChild)&&(!ut(fe.content)||!ut(fe.content.firstElementChild))&&ke(/</g,fe.textContent)&&(j(N.removed,{element:fe.cloneNode()}),fe.innerHTML?fe.innerHTML=_e(fe.innerHTML,/</g,"<"):fe.innerHTML=_e(fe.textContent,/</g,"<")),Gt&&fe.nodeType===3&&(et=fe.textContent,et=_e(et,h," "),et=_e(et,v," "),fe.textContent!==et&&(j(N.removed,{element:fe.cloneNode()}),fe.textContent=et)),ln("afterSanitizeElements",fe,null),!1)},$n=function(fe,et,at){if(Hn&&(et==="id"||et==="name")&&(at in ie||at in Pe))return!1;if(!(Et&&ke(y,et))){if(!(Ct&&ke(Y,et))){if(!vt[et]||Dt[et])return!1;if(!Sn[et]){if(!ke(Ge,_e(at,Me,""))){if(!((et==="src"||et==="xlink:href"||et==="href")&&fe!=="script"&&He(at,"data:")===0&&hn[fe])){if(!(Tt&&!ke(de,_e(at,Me,"")))){if(at)return!1}}}}}}return!0},un=function(fe){var et=void 0,at=void 0,St=void 0,cn=void 0,Kt=void 0;ln("beforeSanitizeAttributes",fe,null);var jt=fe.attributes;if(!jt)return;var Rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt};for(Kt=jt.length;Kt--;){et=jt[Kt];var Ar=et,xn=Ar.name,Nn=Ar.namespaceURI;if(at=pe(et.value),St=oe(xn),Rt.attrName=St,Rt.attrValue=at,Rt.keepAttr=!0,Rt.forceKeepAttr=void 0,ln("uponSanitizeAttribute",fe,Rt),at=Rt.attrValue,Rt.forceKeepAttr)continue;if(St==="name"&&fe.nodeName==="IMG"&&jt.id)cn=jt.id,jt=I(jt,[]),Mn("id",fe),Mn(xn,fe),Ce(jt,cn)>Kt&&fe.setAttribute("id",cn.value);else{if(fe.nodeName==="INPUT"&&St==="type"&&at==="file"&&Rt.keepAttr&&(vt[St]||!Dt[St]))continue;xn==="id"&&fe.setAttribute(xn,""),Mn(xn,fe)}if(!Rt.keepAttr)continue;if(yt&&ke(/\/>/i,at)){Mn(xn,fe);continue}if(ke(/svg|math/i,fe.namespaceURI)&&ke(je("</("+le(Ee(Xn),"|")+")","i"),at)){Mn(xn,fe);continue}Gt&&(at=_e(at,h," "),at=_e(at,v," "));var pn=fe.nodeName.toLowerCase();if(!$n(pn,St,at))continue;try{Nn?fe.setAttributeNS(Nn,xn,at):fe.setAttribute(xn,at),G(N.removed)}catch(Si){}}ln("afterSanitizeAttributes",fe,null)},Dn=function st(fe){var et=void 0,at=Kn(fe);for(ln("beforeSanitizeShadowDOM",fe,null);et=at.nextNode();){if(ln("uponSanitizeShadowNode",et,null),zn(et))continue;et.content instanceof Te&&st(et.content),un(et)}ln("afterSanitizeShadowDOM",fe,null)};return N.sanitize=function(st,fe){var et=void 0,at=void 0,St=void 0,cn=void 0,Kt=void 0;if(st||(st="<!-->"),typeof st!="string"&&!ut(st)){if(typeof st.toString!="function")throw me("toString is not a function");if(st=st.toString(),typeof st!="string")throw me("dirty is not a string, aborting")}if(!N.isSupported){if(ce(g.toStaticHTML)==="object"||typeof g.toStaticHTML=="function"){if(typeof st=="string")return g.toStaticHTML(st);if(ut(st))return g.toStaticHTML(st.outerHTML)}return st}if(sn||dt(fe),N.removed=[],typeof st=="string"&&(tt=!1),!tt)if(st instanceof Le)et=Fe("<!-->"),at=et.ownerDocument.importNode(st,!0),at.nodeType===1&&at.nodeName==="BODY"||at.nodeName==="HTML"?et=at:et.appendChild(at);else{if(!nn&&!Gt&&!Cn&&st.indexOf("<")===-1)return Ye&&Rn?Ye.createHTML(st):st;if(et=Fe(st),!et)return nn?null:ve}et&&kn&&Tn(et.firstChild);for(var jt=Kn(tt?st:et);St=jt.nextNode();){if(St.nodeType===3&&St===cn)continue;if(zn(St))continue;St.content instanceof Te&&Dn(St.content),un(St),cn=St}if(cn=null,tt)return st;if(nn){if(nr)for(Kt=U.call(et.ownerDocument);et.firstChild;)Kt.appendChild(et.firstChild);else Kt=et;return On&&(Kt=M.call(te,Kt,!0)),Kt}var Rt=Cn?et.outerHTML:et.innerHTML;return Gt&&(Rt=_e(Rt,h," "),Rt=_e(Rt,v," ")),Ye&&Rn?Ye.createHTML(Rt):Rt},N.setConfig=function(st){dt(st),sn=!0},N.clearConfig=function(){Ln=null,sn=!1},N.isValidAttribute=function(st,fe,et){Ln||dt({});var at=oe(st),St=oe(fe);return $n(at,St,et)},N.addHook=function(st,fe){if(typeof fe!="function")return;f[st]=f[st]||[],j(f[st],fe)},N.removeHook=function(st){f[st]&&G(f[st])},N.removeHooks=function(st){f[st]&&(f[st]=[])},N.removeAllHooks=function(){f={}},N}var _=p();return _})}}]);
|