(window.webpackJsonp=window.webpackJsonp||[]).push([[41,7,13],{"+NIl":function(ft,Ye,x){(function(K){K(x("VrN/"))})(function(K){"use strict";K.defineMode("stex",function(Ce,oe){"use strict";function Se(te,F){te.cmdState.push(F)}function ge(te){return te.cmdState.length>0?te.cmdState[te.cmdState.length-1]:null}function ee(te){var F=te.cmdState.pop();F&&F.closeBracket()}function L(te){for(var F=te.cmdState,z=F.length-1;z>=0;z--){var j=F[z];if(j.name=="DEFAULT")continue;return j}return{styleIdentifier:function(){return null}}}function W(te,F,z){return function(){this.name=te,this.bracketNo=0,this.style=F,this.styles=z,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var P={};P.importmodule=W("importmodule","tag",["string","builtin"]),P.documentclass=W("documentclass","tag",["","atom"]),P.usepackage=W("usepackage","tag",["atom"]),P.begin=W("begin","tag",["atom"]),P.end=W("end","tag",["atom"]),P.label=W("label","tag",["atom"]),P.ref=W("ref","tag",["atom"]),P.eqref=W("eqref","tag",["atom"]),P.cite=W("cite","tag",["atom"]),P.bibitem=W("bibitem","tag",["atom"]),P.Bibitem=W("Bibitem","tag",["atom"]),P.RBibitem=W("RBibitem","tag",["atom"]),P.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function V(te,F){te.f=F}function N(te,F){var z;if(te.match(/^\\[a-zA-Z@]+/)){var j=te.current().slice(1);return z=P.hasOwnProperty(j)?P[j]:P.DEFAULT,z=new z,Se(F,z),V(F,ve),z.style}if(te.match(/^\\[$&%#{}_]/))return"tag";if(te.match(/^\\[,;!\/\\]/))return"tag";if(te.match("\\["))return V(F,function(ce,Oe){return R(ce,Oe,"\\]")}),"keyword";if(te.match("\\("))return V(F,function(ce,Oe){return R(ce,Oe,"\\)")}),"keyword";if(te.match("$$"))return V(F,function(ce,Oe){return R(ce,Oe,"$$")}),"keyword";if(te.match("$"))return V(F,function(ce,Oe){return R(ce,Oe,"$")}),"keyword";var le=te.next();if(le=="%")return te.skipToEnd(),"comment";if(le=="}"||le=="]"){if(z=ge(F),z)z.closeBracket(le),V(F,ve);else return"error";return"bracket"}else return le=="{"||le=="["?(z=P.DEFAULT,z=new z,Se(F,z),"bracket"):/\d/.test(le)?(te.eatWhile(/[\w.%]/),"atom"):(te.eatWhile(/[\w\-_]/),z=L(F),z.name=="begin"&&(z.argument=te.current()),z.styleIdentifier())}function R(te,F,z){if(te.eatSpace())return null;if(z&&te.match(z))return V(F,N),"keyword";if(te.match(/^\\[a-zA-Z@]+/))return"tag";if(te.match(/^[a-zA-Z]+/))return"variable-2";if(te.match(/^\\[$&%#{}_]/))return"tag";if(te.match(/^\\[,;!\/]/))return"tag";if(te.match(/^[\^_&]/))return"tag";if(te.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(te.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var j=te.next();return j=="{"||j=="}"||j=="["||j=="]"||j=="("||j==")"?"bracket":j=="%"?(te.skipToEnd(),"comment"):"error"}function ve(te,F){var z=te.peek(),j;return z=="{"||z=="["?(j=ge(F),j.openBracket(z),te.eat(z),V(F,N),"bracket"):/[ \t\r]/.test(z)?(te.eat(z),null):(V(F,N),ee(F),N(te,F))}return{startState:function(){var te=oe.inMathMode?function(F,z){return R(F,z)}:N;return{cmdState:[],f:te}},copyState:function(te){return{cmdState:te.cmdState.slice(),f:te.f}},token:function(te,F){return F.f(te,F)},blankLine:function(te){te.f=N,te.cmdState.length=0},lineComment:"%"}}),K.defineMIME("text/x-stex","stex"),K.defineMIME("text/x-latex","stex")})},"19Vz":function(ft,Ye,x){(function(K){K(x("VrN/"))})(function(K){K.defineOption("placeholder","",function(W,P,V){var N=V&&V!=K.Init;if(P&&!N)W.on("blur",ge),W.on("change",ee),W.on("swapDoc",ee),K.on(W.getInputField(),"compositionupdate",W.state.placeholderCompose=function(){Se(W)}),ee(W);else if(!P&&N){W.off("blur",ge),W.off("change",ee),W.off("swapDoc",ee),K.off(W.getInputField(),"compositionupdate",W.state.placeholderCompose),Ce(W);var R=W.getWrapperElement();R.className=R.className.replace(" CodeMirror-empty","")}P&&!W.hasFocus()&&ge(W)});function Ce(W){W.state.placeholder&&(W.state.placeholder.parentNode.removeChild(W.state.placeholder),W.state.placeholder=null)}function oe(W){Ce(W);var P=W.state.placeholder=document.createElement("pre");P.style.cssText="height: 0; overflow: visible",P.style.direction=W.getOption("direction"),P.className="CodeMirror-placeholder CodeMirror-line-like";var V=W.getOption("placeholder");typeof V=="string"&&(V=document.createTextNode(V)),P.appendChild(V),W.display.lineSpace.insertBefore(P,W.display.lineSpace.firstChild)}function Se(W){setTimeout(function(){var P=!1,V=W.getInputField();V.nodeName=="TEXTAREA"?P=!V.value:W.lineCount()==1&&(P=!/[^\u200b]/.test(V.querySelector(".CodeMirror-line").textContent)),P?oe(W):Ce(W)},20)}function ge(W){L(W)&&oe(W)}function ee(W){var P=W.getWrapperElement(),V=L(W);P.className=P.className.replace(" CodeMirror-empty","")+(V?" CodeMirror-empty":""),V?oe(W):Ce(W)}function L(W){return W.lineCount()===1&&W.getLine(0)===""}})},"1eCo":function(ft,Ye,x){(function(K){K(x("VrN/"))})(function(K){"use strict";var Ce={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};K.defineMode("xml",function(Se,ge){var ee=Se.indentUnit,L={},W=ge.htmlMode?Ce:oe;for(var P in W)L[P]=W[P];for(var P in ge)L[P]=ge[P];var V,N;function R(v,Q){function H(U){return Q.tokenize=U,U(v,Q)}var w=v.next();if(w=="<")return v.eat("!")?v.eat("[")?v.match("CDATA[")?H(F("atom","]]>")):null:v.match("--")?H(F("comment","-->")):v.match("DOCTYPE",!0,!0)?(v.eatWhile(/[\w\._\-]/),H(z(1))):null:v.eat("?")?(v.eatWhile(/[\w\._\-]/),Q.tokenize=F("meta","?>"),"meta"):(V=v.eat("/")?"closeTag":"openTag",Q.tokenize=ve,"tag bracket");if(w=="&"){var q;return v.eat("#")?v.eat("x")?q=v.eatWhile(/[a-fA-F\d]/)&&v.eat(";"):q=v.eatWhile(/[\d]/)&&v.eat(";"):q=v.eatWhile(/[\w\.\-:]/)&&v.eat(";"),q?"atom":"error"}else return v.eatWhile(/[^&<]/),null}R.isInText=!0;function ve(v,Q){var H=v.next();if(H==">"||H=="/"&&v.eat(">"))return Q.tokenize=R,V=H==">"?"endTag":"selfcloseTag","tag bracket";if(H=="=")return V="equals",null;if(H=="<"){Q.tokenize=R,Q.state=Oe,Q.tagName=Q.tagStart=null;var w=Q.tokenize(v,Q);return w?w+" tag error":"tag error"}else return/[\'\"]/.test(H)?(Q.tokenize=te(H),Q.stringStartCol=v.column(),Q.tokenize(v,Q)):(v.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function te(v){var Q=function(H,w){for(;!H.eol();)if(H.next()==v){w.tokenize=ve;break}return"string"};return Q.isInAttribute=!0,Q}function F(v,Q){return function(H,w){for(;!H.eol();){if(H.match(Q)){w.tokenize=R;break}H.next()}return v}}function z(v){return function(Q,H){for(var w;(w=Q.next())!=null;){if(w=="<")return H.tokenize=z(v+1),H.tokenize(Q,H);if(w==">")if(v==1){H.tokenize=R;break}else return H.tokenize=z(v-1),H.tokenize(Q,H)}return"meta"}}function j(v,Q,H){this.prev=v.context,this.tagName=Q,this.indent=v.indented,this.startOfLine=H,(L.doNotIndent.hasOwnProperty(Q)||v.context&&v.context.noIndent)&&(this.noIndent=!0)}function le(v){v.context&&(v.context=v.context.prev)}function ce(v,Q){for(var H;;){if(!v.context)return;if(H=v.context.tagName,!L.contextGrabbers.hasOwnProperty(H)||!L.contextGrabbers[H].hasOwnProperty(Q))return;le(v)}}function Oe(v,Q,H){return v=="openTag"?(H.tagStart=Q.column(),Xe):v=="closeTag"?Ie:Oe}function Xe(v,Q,H){return v=="word"?(H.tagName=Q.current(),N="tag",xe):L.allowMissingTagName&&v=="endTag"?(N="tag bracket",xe(v,Q,H)):(N="error",Xe)}function Ie(v,Q,H){if(v=="word"){var w=Q.current();return H.context&&H.context.tagName!=w&&L.implicitlyClosed.hasOwnProperty(H.context.tagName)&&le(H),H.context&&H.context.tagName==w||L.matchClosing===!1?(N="tag",De):(N="tag error",Fe)}else return L.allowMissingTagName&&v=="endTag"?(N="tag bracket",De(v,Q,H)):(N="error",Fe)}function De(v,Q,H){return v!="endTag"?(N="error",De):(le(H),Oe)}function Fe(v,Q,H){return N="error",De(v,Q,H)}function xe(v,Q,H){if(v=="word")return N="attribute",we;if(v=="endTag"||v=="selfcloseTag"){var w=H.tagName,q=H.tagStart;return H.tagName=H.tagStart=null,v=="selfcloseTag"||L.autoSelfClosers.hasOwnProperty(w)?ce(H,w):(ce(H,w),H.context=new j(H,w,q==H.indented)),Oe}return N="error",xe}function we(v,Q,H){return v=="equals"?fe:(L.allowMissing||(N="error"),xe(v,Q,H))}function fe(v,Q,H){return v=="string"?ne:v=="word"&&L.allowUnquoted?(N="string",xe):(N="error",xe(v,Q,H))}function ne(v,Q,H){return v=="string"?ne:xe(v,Q,H)}return{startState:function(v){var Q={tokenize:R,state:Oe,indented:v||0,tagName:null,tagStart:null,context:null};return v!=null&&(Q.baseIndent=v),Q},token:function(v,Q){if(!Q.tagName&&v.sol()&&(Q.indented=v.indentation()),v.eatSpace())return null;V=null;var H=Q.tokenize(v,Q);return(H||V)&&H!="comment"&&(N=null,Q.state=Q.state(V||H,v,Q),N&&(H=N=="error"?H+" error":N)),H},indent:function(v,Q,H){var w=v.context;if(v.tokenize.isInAttribute)return v.tagStart==v.indented?v.stringStartCol+1:v.indented+ee;if(w&&w.noIndent)return K.Pass;if(v.tokenize!=ve&&v.tokenize!=R)return H?H.match(/^(\s*)/)[0].length:0;if(v.tagName)return L.multilineTagIndentPastTag!==!1?v.tagStart+v.tagName.length+2:v.tagStart+ee*(L.multilineTagIndentFactor||1);if(L.alignCDATA&&/$/,blockCommentStart:"",configuration:L.htmlMode?"html":"xml",helperType:L.htmlMode?"html":"xml",skipAttribute:function(v){v.state==fe&&(v.state=xe)},xmlCurrentTag:function(v){return v.tagName?{name:v.tagName,close:v.type=="closeTag"}:null},xmlCurrentContext:function(v){for(var Q=[],H=v.context;H;H=H.prev)H.tagName&&Q.push(H.tagName);return Q.reverse()}}}),K.defineMIME("text/xml","xml"),K.defineMIME("application/xml","xml"),K.mimeModes.hasOwnProperty("text/html")||K.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"55Ip":function(ft,Ye,x){"use strict";x.d(Ye,"a",function(){return ce});var K=x("Ty5D"),Ce=x("dI71"),oe=x("cDcd"),Se=x.n(oe),ge=x("YS25"),ee=x("17x9"),L=x.n(ee),W=x("wx14"),P=x("zLVn"),V=x("9R94"),N=function(fe){Object(Ce.a)(ne,fe);function ne(){for(var Q,H=arguments.length,w=new Array(H),q=0;q1&&arguments[1]!==void 0?arguments[1]:0,F=(L[ve[te+0]]+L[ve[te+1]]+L[ve[te+2]]+L[ve[te+3]]+"-"+L[ve[te+4]]+L[ve[te+5]]+"-"+L[ve[te+6]]+L[ve[te+7]]+"-"+L[ve[te+8]]+L[ve[te+9]]+"-"+L[ve[te+10]]+L[ve[te+11]]+L[ve[te+12]]+L[ve[te+13]]+L[ve[te+14]]+L[ve[te+15]]).toLowerCase();if(!ee(F))throw TypeError("Stringified UUID is invalid");return F}var V=P;function N(ve,te,F){ve=ve||{};var z=ve.random||(ve.rng||oe)();if(z[6]=z[6]&15|64,z[8]=z[8]&63|128,te){F=F||0;for(var j=0;j<16;++j)te[F+j]=z[j];return te}return V(z)}var R=Ye.a=N},"7ahc":function(ft,Ye,x){"use strict";x.d(Ye,"a",function(){return Xe});var K=x("k1fw"),Ce=x("0Owb"),oe=x("+L6B"),Se=x("2/Rp"),ge=x("y8nQ"),ee=x("Vl3Y"),L=x("tJVT"),W=x("OaEy"),P=x("2fM7"),V=x("cDcd"),N=x.n(V),R=x("VrN/"),ve=x.n(R),te=x("p77/"),F=x.n(te),z=x("c5Ni"),j=x.n(z),le=P.a.Option,ce={labelCol:{span:4},wrapperCol:{span:20}},Oe={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"]};Ye.b=function(Ie){var De=Ie.callback,Fe=Ie.onCancel,xe=Object(V.useState)("python"),we=Object(L.a)(xe,2),fe=we[0],ne=we[1];function v(H){ne(Oe[H][1])}function Q(H){De(H)}return N.a.createElement(ee.a,Object(Ce.a)({},ce,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Q}),N.a.createElement(ee.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},N.a.createElement(P.a,{onChange:v},Object.keys(Oe).map(function(H){return N.a.createElement(le,{key:H,value:H},Oe[H][0])}))),N.a.createElement(ee.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},N.a.createElement(Xe,{mode:fe})),N.a.createElement("div",{className:"flex-container flex-end"},N.a.createElement(Se.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),N.a.createElement(Se.a,{type:"ghost",onClick:Fe},"\u53D6\u6D88")))};function Xe(Ie){var De=Ie.value,Fe=Ie.onChange,xe=Ie.mode,we=Ie.options,fe=we===void 0?{}:we,ne=Object(V.useRef)(),v=Object(V.useState)(),Q=Object(L.a)(v,2),H=Q[0],w=Q[1];return Object(V.useEffect)(function(){if(H){function q(U){var T=U.getValue();Fe&&Fe(T)}return H.on("change",q),function(){H.off("change",q)}}},[H,Fe]),Object(V.useEffect)(function(){H&&H.setOption("mode",xe)},[H,xe]),Object(V.useEffect)(function(){H&&((De!==H.getValue()||De==="")&&setTimeout(function(){H.setValue(De||" ")},300))},[H,De]),Object(V.useEffect)(function(){if(ne.current&&!H){var q=ve.a.fromTextArea(ne.current,Object(K.a)({mode:xe,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},fe));w(q)}},[ne.current,H]),N.a.createElement("div",{className:"my-codemirror-container"},N.a.createElement("textarea",{ref:ne}))}},"8EBN":function(ft,Ye,x){(function(K){K(x("VrN/"))})(function(K){"use strict";K.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Ce=0;Ce-1&&Se.substring(L+1,Se.length);if(W)return K.findModeByExtension(W)},K.findModeByName=function(Se){Se=Se.toLowerCase();for(var ge=0;ge=M.length?J.slice(M.length):J}).join(` `)}var te=[],F=["
    "],z=new N.a.Renderer,j=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function le(){te.length=0,F=["
      "]}var ce={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Oe(ie,G,Z,M){if(G>=ie.length||ie[G].level<=Z)return G;var J=ie[G];M.push("
    • "+J.text+""),G++;var h=[];return G=Oe(ie,G,J.level,h),h.length>0&&(M.push("
        "),h.forEach(function(C){M.push(C)}),M.push("
      ")),M.push("
    • "),G=Oe(ie,G,Z,M),G}function Xe(){return Oe(te,0,0,F),F.push("
    "),F.join("")}var Ie={heading:function(G){var Z=j.exec(G);if(Z)return{type:"heading",raw:Z[0],depth:Z[1].length,text:Z[2]}},fences:function(G){var Z=this.rules.block.fences.exec(G);if(Z){var M=Z[0],J=ve(M,Z[3]||""),h=Z[2]?Z[2].trim():Z[2];if(["latex","katex","math"].indexOf(h)>=0){var C=xe(),g=J;J=C,we[C]={type:"block",expression:g}}return{type:"code",raw:M,lang:h,text:J}}}},De=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Fe=0,xe=function(){return"__special_katext_id_".concat(Fe++,"__")},we={};function fe(){return we}function ne(){Fe=0,we={}}function v(ie){return ie=ie.replace(De,function(G,Z){var M=xe();return we[M]={type:"inline",expression:Z},M}),ie}var Q=z.listitem;z.listitem=function(ie){return Q(v(ie))};var H=z.paragraph;z.paragraph=function(ie){return H(v(ie))};var w=z.tablecell;z.tablecell=function(ie,G){return w(v(ie),G)},z.code=function(ie,G,Z){var M=(G||"").match(/\S*/)[0];return M?["latex","katex","math"].indexOf(M)>=0?"

    ".concat(ie,"

    "):'
    ').concat(Z?ie:Object(R.escape)(ie,!0),`
    `):'
    '+(Z?ie:Object(R.escape)(ie,!0))+"
    "},z.heading=function(ie,G,Z){var M=this.options.headerPrefix+Z.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return te.push({anchor:M,level:G,text:ie}),"'+ie+""},N.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),N.a.use({tokenizer:Ie,renderer:z});var q=N.a,U=x("SJMd"),T=x("ulZh"),E=x.n(T),c=x("m3rI"),l=x("Oy/b"),m=x("p5ED"),_=x("8hTe"),B=x.n(_),ue=/]*>/g;function Ae(ie){var G=document.createElement("div");return G.innerHTML=ie,G.childNodes.length===0?"":G.childNodes[0].nodeValue}var de=Ye.a=function(ie){var G=ie.value,Z=G===void 0?"":G,M=ie.edit,J=M===void 0?!1:M,h=ie.className,C=ie.showTextOnly,g=ie.showLines,re=ie.replaces,pe=ie.zoomImg,Y=ie.hasMask,se=ie.style,ke=se===void 0?{}:se,Re=ie.stylesPrev,Le=Re===void 0?{}:Re,be=String(Z),Ee=Object(L.useRef)(),Ue=Object(L.useRef)(),Je=Object(L.useState)(""),ze=Object(ee.a)(Je,2),Ve=ze[0],ot=ze[1],rt=Object(L.useState)("office"),Ke=Object(ee.a)(rt,2),he=Ke[0],it=Ke[1],qe=Object(L.useMemo)(function(){try{var O=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,f=/\"\/api\/attachments\/|\"\/attachments\/download\//g,p=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;be=be.replace(O,"("+c.a.API_SERVER+"/api/attachments/").replace(f,'"'+c.a.API_SERVER+"/api/attachments/").replace(p,'"'+c.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(ae){}var b=q(be),k=fe();if(be.match(/\[TOC\]/)&&(b=b.replace("

    [TOC]

    ",Xe()),le()),b=b.replace(/(__special_katext_id_\d+__)/g,function(ae,Te){var He=k[Te],tt=He.type,et=He.expression;return Object(l.renderToString)(Ae(et)||"",{displayMode:tt==="block",throwOnError:!1,output:"html"})}),b=b.replace(/▁/g,"\u2581\u2581\u2581"),ne(),C){var D=document.createElement("div");return D.innerHTML=b,D.innerText}return setTimeout(function(){return I()},500),b},[be]),ye=Object(L.useRef)();ce.WebkitLineClamp=g,g&&(ke=Object(ge.a)(Object(ge.a)({},ke),ce));function Pe(O){var f=O.target;if(f.tagName.toUpperCase()==="IMG"){if(pe){var p=f.getAttribute("src");ot(p),it("image")}}else if(f.tagName.toUpperCase()==="A"){var b=f.getAttribute("href");if(b.indexOf("office")>-1)O.preventDefault(),ot(b),it("office");else if(b.indexOf("application/pdf")>-1)O.preventDefault(),ot(b),it("pdf");else if(b.indexOf("text/html")>-1)O.preventDefault(),ot(b),it("html");else if(b.startsWith("#")){O.preventDefault();var k=document.getElementById(b.replace("#",""));k&&k.scrollIntoView(!0)}}}var I=function(){var f,p=(f=ye.current)===null||f===void 0?void 0:f.querySelectorAll("video");p==null||p.forEach(function(b){if(b.oncontextmenu=function(){return!1},b.src.indexOf(".m3u8")>-1&&!b.canPlayType("application/vnd.apple.mpegurl")){if(E.a.isSupported()){var k=new E.a;k.loadSource(b.src),k.attachMedia(b)}}})};Object(L.useEffect)(function(){if(ye.current&&qe&&(qe.match(ue)&&window.PR.prettyPrint()),ye.current)return ye.current.addEventListener("click",Pe),function(){ye.current.removeEventListener("click",Pe),ne(),le()}},[qe,ye.current,Pe]);var A=function(f){if(!J)return;f.target.nodeName==="IMG"?(Ee.current.style.display="flex",Ee.current.style.width=f.target.clientWidth+"px",Ee.current.style.height=f.target.clientHeight+"px",Ee.current.style.top=f.target.offsetTop+"px",Ee.current.style.left=f.target.offsetLeft+"px",Ue.current.src=f.target.getAttribute("src")):Ee.current.style.display="none"};return W.a.createElement("div",{style:{position:"relative"}},W.a.createElement("div",{ref:ye,style:Object(ge.a)({},ke),className:"".concat(h||""," markdown-body ").concat(B.a.mdBody),onMouseOver:A,dangerouslySetInnerHTML:{__html:qe}}),W.a.createElement("div",{ref:Ee,className:B.a.button},W.a.createElement(Ce.a,null,W.a.createElement(Se.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),W.a.createElement(Se.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),W.a.createElement("img",{ref:Ue,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),W.a.createElement(m.a,{close:!0,data:Ve,type:Ve!=null&&Ve.length?he:"",style:Object(ge.a)({},Le),onClose:function(){return ot("")}}))}},"9VGf":function(ft,Ye,x){"use strict";x.d(Ye,"a",function(){return oe});var K=x("cDcd"),Ce=x.n(K);function oe(Se,ge){var ee=Object(K.useRef)();Object(K.useEffect)(function(){ee.current=Se}),Object(K.useEffect)(function(){function L(){ee.current()}if(ge!==null){var W=setInterval(L,ge);return function(){return clearInterval(W)}}},[ge])}},Bd2K:function(ft,Ye,x){(function(K){K(x("VrN/"),x("osHv"))})(function(K){K.defineOption("autoCloseTags",!1,function(P,V,N){if(N!=K.Init&&N&&P.removeKeyMap("autoCloseTags"),!V)return;var R={name:"autoCloseTags"};(typeof V!="object"||V.whenClosing!==!1)&&(R["'/'"]=function(ve){return ee(ve)}),(typeof V!="object"||V.whenOpening!==!1)&&(R["'>'"]=function(ve){return Se(ve)}),P.addKeyMap(R)});var Ce=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Se(P){if(P.getOption("disableInput"))return K.Pass;for(var V=P.listSelections(),N=[],R=P.getOption("autoCloseTags"),ve=0;vete.ch&&(ce=ce.slice(0,ce.length-F.end+te.ch));var De=ce.toLowerCase();if(!ce||F.type=="string"&&(F.end!=te.ch||!/[\"\']/.test(F.string.charAt(F.string.length-1))||F.string.length==1)||F.type=="tag"&&le.close||F.string.indexOf("/")==te.ch-F.start-1||Xe&&L(Xe,De)>-1||W(P,z.mode.xmlCurrentContext&&z.mode.xmlCurrentContext(j)||[],ce,te,!0))return K.Pass;var Fe=typeof R=="object"&&R.emptyTags;if(Fe&&L(Fe,ce)>-1){N[ve]={text:"/>",newPos:K.Pos(te.line,te.ch+2)};continue}var xe=Ie&&L(Ie,De)>-1;N[ve]={indent:xe,text:">"+(xe?` `:"")+"",newPos:xe?K.Pos(te.line+1,0):K.Pos(te.line,te.ch+1)}}for(var we=typeof R=="object"&&R.dontIndentOnAutoClose,ve=V.length-1;ve>=0;ve--){var fe=N[ve];P.replaceRange(fe.text,V[ve].head,V[ve].anchor,"+insert");var ne=P.listSelections().slice(0);ne[ve]={head:fe.newPos,anchor:fe.newPos},P.setSelections(ne),!we&&fe.indent&&(P.indentLine(fe.newPos.line,null,!0),P.indentLine(fe.newPos.line+1,null,!0))}}function ge(P,V){for(var N=P.listSelections(),R=[],ve=V?"/":""&&(Xe+=">"),R[z]=Xe}if(P.replaceSelections(R),N=P.listSelections(),!F)for(var z=0;z=0&&V[j]==N;j--)++z;R=F.to;for(var j=1;j0){for(var V=0;V1&&arguments[1]!==void 0?arguments[1]:"",V=[],N=0;NI.length)&&(A=I.length);for(var O=0,f=new Array(A);O=I.length?{done:!0}:{done:!1,value:I[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 O=I[Symbol.iterator](),O.next.bind(O)}function ee(I,A){return A={exports:{}},I(A,A.exports),A.exports}var L=ee(function(I){function A(){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 O(f){I.exports.defaults=f}I.exports={defaults:A(),getDefaults:A,changeDefaults:O}}),W=L.defaults,P=L.getDefaults,V=L.changeDefaults,N=/[&<>"']/,R=/[&<>"']/g,ve=/[<>"']|&(?!#?\w+;)/,te=/[<>"']|&(?!#?\w+;)/g,F={"&":"&","<":"<",">":">",'"':""","'":"'"},z=function(A){return F[A]};function j(I,A){if(A){if(N.test(I))return I.replace(R,z)}else if(ve.test(I))return I.replace(te,z);return I}var le=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ce(I){return I.replace(le,function(A,O){return O=O.toLowerCase(),O==="colon"?":":O.charAt(0)==="#"?O.charAt(1)==="x"?String.fromCharCode(parseInt(O.substring(2),16)):String.fromCharCode(+O.substring(1)):""})}var Oe=/(^|[^\[])\^/g;function Xe(I,A){I=I.source||I,A=A||"";var O={replace:function(p,b){return b=b.source||b,b=b.replace(Oe,"$1"),I=I.replace(p,b),O},getRegex:function(){return new RegExp(I,A)}};return O}var Ie=/[^\w:]/g,De=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Fe(I,A,O){if(I){var f;try{f=decodeURIComponent(ce(O)).replace(Ie,"").toLowerCase()}catch(p){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}A&&!De.test(O)&&(O=v(A,O));try{O=encodeURI(O).replace(/%25/g,"%")}catch(p){return null}return O}var xe={},we=/^[^:]+:\/*[^/]*$/,fe=/^([^:]+:)[\s\S]*$/,ne=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(I,A){xe[" "+I]||(we.test(I)?xe[" "+I]=I+"/":xe[" "+I]=q(I,"/",!0)),I=xe[" "+I];var O=I.indexOf(":")===-1;return A.substring(0,2)==="//"?O?A:I.replace(fe,"$1")+A:A.charAt(0)==="/"?O?A:I.replace(ne,"$1")+A:I+A}var Q={exec:function(){}};function H(I){for(var A=1,O,f;A=0&&D[Te]==="\\";)ae=!ae;return ae?"|":" |"}),f=O.split(/ \|/),p=0;if(f.length>A)f.splice(A);else for(;f.length=f.length?p.slice(f.length):p}).join(` `)}var de=function(){function I(O){this.options=O||c}var A=I.prototype;return A.space=function(f){var p=this.rules.block.newline.exec(f);if(p)return p[0].length>1?{type:"space",raw:p[0]}:{raw:` `}},A.code=function(f,p){var b=this.rules.block.code.exec(f);if(b){var k=p[p.length-1];if(k&&k.type==="paragraph")return{raw:b[0],text:b[0].trimRight()};var D=b[0].replace(/^ {4}/gm,"");return{type:"code",raw:b[0],codeBlockStyle:"indented",text:this.options.pedantic?D:l(D,` `)}}},A.fences=function(f){var p=this.rules.block.fences.exec(f);if(p){var b=p[0],k=Ae(b,p[3]||"");return{type:"code",raw:b,lang:p[2]?p[2].trim():p[2],text:k}}},A.heading=function(f){var p=this.rules.block.heading.exec(f);if(p)return{type:"heading",raw:p[0],depth:p[1].length,text:p[2]}},A.nptable=function(f){var p=this.rules.block.nptable.exec(f);if(p){var b={type:"table",header:m(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(` `):[],raw:p[0]};if(b.header.length===b.align.length){var k=b.align.length,D;for(D=0;D ?/gm,"");return{type:"blockquote",raw:p[0],text:b}}},A.list=function(f){var p=this.rules.block.list.exec(f);if(p){for(var b=p[0],k=p[2],D=k.length>1,ae=k[k.length-1]===")",Te={type:"list",raw:b,ordered:D,start:D?+k.slice(0,-1):"",loose:!1,items:[]},He=p[0].match(this.rules.block.item),tt=!1,et,kt,ht,st,Tt,bt,Ut,jt=He.length,yt=0;yt1||this.options.smartLists&&ht!==k)&&(st=He.slice(yt+1).join(` `),Te.raw=Te.raw.substring(0,Te.raw.length-st.length),yt=jt-1)),Tt=tt||/\n\n(?!\s*$)/.test(et),yt!==jt-1&&(tt=et.charAt(et.length-1)===` `,Tt||(Tt=tt)),Tt&&(Te.loose=!0),bt=/^\[[ xX]\] /.test(et),Ut=void 0,bt&&(Ut=et[1]!==" ",et=et.replace(/^\[[ xX]\] +/,"")),Te.items.push({type:"list_item",raw:b,task:bt,checked:Ut,loose:Tt,text:et});return Te}},A.html=function(f){var p=this.rules.block.html.exec(f);if(p)return{type:this.options.sanitize?"paragraph":"html",raw:p[0],pre:!this.options.sanitizer&&(p[1]==="pre"||p[1]==="script"||p[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(p[0]):_(p[0]):p[0]}},A.def=function(f){var p=this.rules.block.def.exec(f);if(p){p[3]&&(p[3]=p[3].substring(1,p[3].length-1));var b=p[1].toLowerCase().replace(/\s+/g," ");return{tag:b,raw:p[0],href:p[2],title:p[3]}}},A.table=function(f){var p=this.rules.block.table.exec(f);if(p){var b={type:"table",header:m(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(` `):[]};if(b.header.length===b.align.length){b.raw=p[0];var k=b.align.length,D;for(D=0;D/i.test(k[0])&&(p=!1),!b&&/^<(pre|code|kbd|script)(\s|>)/i.test(k[0])?b=!0:b&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(k[0])&&(b=!1),{type:this.options.sanitize?"text":"html",raw:k[0],inLink:p,inRawBlock:b,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(k[0]):_(k[0]):k[0]}},A.link=function(f){var p=this.rules.inline.link.exec(f);if(p){var b=B(p[2],"()");if(b>-1){var k=p[0].indexOf("!")===0?5:4,D=k+p[1].length+b;p[2]=p[2].substring(0,b),p[0]=p[0].substring(0,D).trim(),p[3]=""}var ae=p[2],Te="";if(this.options.pedantic){var He=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ae);He?(ae=He[1],Te=He[3]):Te=""}else Te=p[3]?p[3].slice(1,-1):"";ae=ae.trim().replace(/^<([\s\S]*)>$/,"$1");var tt=ue(p,{href:ae&&ae.replace(this.rules.inline._escapes,"$1"),title:Te&&Te.replace(this.rules.inline._escapes,"$1")},p[0]);return tt}},A.reflink=function(f,p){var b;if((b=this.rules.inline.reflink.exec(f))||(b=this.rules.inline.nolink.exec(f))){var k=(b[2]||b[1]).replace(/\s+/g," ");if(k=p[k.toLowerCase()],!k||!k.href){var D=b[0].charAt(0);return{type:"text",raw:D,text:D}}var ae=ue(b,k,b[0]);return ae}},A.strong=function(f,p,b){b===void 0&&(b="");var k=this.rules.inline.strong.start.exec(f);if(k&&(!k[1]||k[1]&&(b===""||this.rules.inline.punctuation.exec(b)))){p=p.slice(-1*f.length);var D=k[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;D.lastIndex=0;for(var ae;(k=D.exec(p))!=null;)if(ae=this.rules.inline.strong.middle.exec(p.slice(0,k.index+3)),ae)return{type:"strong",raw:f.slice(0,ae[0].length),text:f.slice(2,ae[0].length-2)}}},A.em=function(f,p,b){b===void 0&&(b="");var k=this.rules.inline.em.start.exec(f);if(k&&(!k[1]||k[1]&&(b===""||this.rules.inline.punctuation.exec(b)))){p=p.slice(-1*f.length);var D=k[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;D.lastIndex=0;for(var ae;(k=D.exec(p))!=null;)if(ae=this.rules.inline.em.middle.exec(p.slice(0,k.index+2)),ae)return{type:"em",raw:f.slice(0,ae[0].length),text:f.slice(1,ae[0].length-1)}}},A.codespan=function(f){var p=this.rules.inline.code.exec(f);if(p){var b=p[2].replace(/\n/g," "),k=/[^ ]/.test(b),D=b.startsWith(" ")&&b.endsWith(" ");return k&&D&&(b=b.substring(1,b.length-1)),b=_(b,!0),{type:"codespan",raw:p[0],text:b}}},A.br=function(f){var p=this.rules.inline.br.exec(f);if(p)return{type:"br",raw:p[0]}},A.del=function(f){var p=this.rules.inline.del.exec(f);if(p)return{type:"del",raw:p[0],text:p[1]}},A.autolink=function(f,p){var b=this.rules.inline.autolink.exec(f);if(b){var k,D;return b[2]==="@"?(k=_(this.options.mangle?p(b[1]):b[1]),D="mailto:"+k):(k=_(b[1]),D=k),{type:"link",raw:b[0],text:k,href:D,tokens:[{type:"text",raw:k,text:k}]}}},A.url=function(f,p){var b;if(b=this.rules.inline.url.exec(f)){var k,D;if(b[2]==="@")k=_(this.options.mangle?p(b[0]):b[0]),D="mailto:"+k;else{var ae;do ae=b[0],b[0]=this.rules.inline._backpedal.exec(b[0])[0];while(ae!==b[0]);k=_(b[0]),b[1]==="www."?D="http://"+k:D=k}return{type:"link",raw:b[0],text:k,href:D,tokens:[{type:"text",raw:k,text:k}]}}},A.inlineText=function(f,p,b){var k=this.rules.inline.text.exec(f);if(k){var D;return p?D=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(k[0]):_(k[0]):k[0]:D=_(this.options.smartypants?b(k[0]):k[0]),{type:"text",raw:k[0],text:D}}},I}(),ie=E.noopTest,G=E.edit,Z=E.merge,M={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ie,table:ie,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};M._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,M._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,M.def=G(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,M.item=G(M.item,"gm").replace(/bull/g,M.bullet).getRegex(),M.list=G(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._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",M._comment=//,M.html=G(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=G(M._paragraph).replace("hr",M.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",")|<(?:script|pre|style|!--)").replace("tag",M._tag).getRegex(),M.blockquote=G(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=Z({},M),M.gfm=Z({},M.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*|$)"}),M.gfm.nptable=G(M.gfm.nptable).replace("hr",M.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",")|<(?:script|pre|style|!--)").replace("tag",M._tag).getRegex(),M.gfm.table=G(M.gfm.table).replace("hr",M.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",")|<(?:script|pre|style|!--)").replace("tag",M._tag).getRegex(),M.pedantic=Z({},M.normal,{html:G(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",M._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ie,paragraph:G(M.normal._paragraph).replace("hr",M.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var J={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ie,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:ie,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",J.punctuation=G(J.punctuation).replace(/punctuation/g,J._punctuation).getRegex(),J._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",J._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",J.em.start=G(J.em.start).replace(/punctuation/g,J._punctuation).getRegex(),J.em.middle=G(J.em.middle).replace(/punctuation/g,J._punctuation).replace(/overlapSkip/g,J._overlapSkip).getRegex(),J.em.endAst=G(J.em.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.em.endUnd=G(J.em.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.start=G(J.strong.start).replace(/punctuation/g,J._punctuation).getRegex(),J.strong.middle=G(J.strong.middle).replace(/punctuation/g,J._punctuation).replace(/blockSkip/g,J._blockSkip).getRegex(),J.strong.endAst=G(J.strong.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.endUnd=G(J.strong.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.blockSkip=G(J._blockSkip,"g").getRegex(),J.overlapSkip=G(J._overlapSkip,"g").getRegex(),J._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,J._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,J._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])?)+(?![-_])/,J.autolink=G(J.autolink).replace("scheme",J._scheme).replace("email",J._email).getRegex(),J._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,J.tag=G(J.tag).replace("comment",M._comment).replace("attribute",J._attribute).getRegex(),J._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,J._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,J.link=G(J.link).replace("label",J._label).replace("href",J._href).replace("title",J._title).getRegex(),J.reflink=G(J.reflink).replace("label",J._label).getRegex(),J.reflinkSearch=G(J.reflinkSearch,"g").replace("reflink",J.reflink).replace("nolink",J.nolink).getRegex(),J.normal=Z({},J),J.pedantic=Z({},J.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:G(/^!?\[(label)\]\((.*?)\)/).replace("label",J._label).getRegex(),reflink:G(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J._label).getRegex()}),J.gfm=Z({},J.normal,{escape:G(J.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]*?(?:(?=[\\.5&&(f="x"+f.toString(16)),A+="&#"+f+";";return A}var se=function(){function I(O){this.tokens=[],this.tokens.links=Object.create(null),this.options=O||C,this.options.tokenizer=this.options.tokenizer||new de,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:g.normal,inline:re.normal};this.options.pedantic?(f.block=g.pedantic,f.inline=re.pedantic):this.options.gfm&&(f.block=g.gfm,this.options.breaks?f.inline=re.breaks:f.inline=re.gfm),this.tokenizer.rules=f}I.lex=function(f,p){var b=new I(p);return b.lex(f)};var A=I.prototype;return A.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},A.blockTokens=function(f,p,b){p===void 0&&(p=[]),b===void 0&&(b=!0),f=f.replace(/^ +$/gm,"");for(var k,D,ae,Te;f;){if(k=this.tokenizer.space(f)){f=f.substring(k.raw.length),k.type&&p.push(k);continue}if(k=this.tokenizer.code(f,p)){f=f.substring(k.raw.length),k.type?p.push(k):(Te=p[p.length-1],Te.raw+=` `+k.raw,Te.text+=` `+k.text);continue}if(k=this.tokenizer.fences(f)){f=f.substring(k.raw.length),p.push(k);continue}if(k=this.tokenizer.heading(f)){f=f.substring(k.raw.length),p.push(k);continue}if(k=this.tokenizer.nptable(f)){f=f.substring(k.raw.length),p.push(k);continue}if(k=this.tokenizer.hr(f)){f=f.substring(k.raw.length),p.push(k);continue}if(k=this.tokenizer.blockquote(f)){f=f.substring(k.raw.length),k.tokens=this.blockTokens(k.text,[],b),p.push(k);continue}if(k=this.tokenizer.list(f)){for(f=f.substring(k.raw.length),ae=k.items.length,D=0;D0)for(;(He=this.tokenizer.rules.inline.reflinkSearch.exec(Te))!=null;)tt.includes(He[0].slice(He[0].lastIndexOf("[")+1,-1))&&(Te=Te.slice(0,He.index)+"["+"a".repeat(He[0].length-2)+"]"+Te.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(He=this.tokenizer.rules.inline.blockSkip.exec(Te))!=null;)Te=Te.slice(0,He.index)+"["+"a".repeat(He[0].length-2)+"]"+Te.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(ae=this.tokenizer.escape(f)){f=f.substring(ae.raw.length),p.push(ae);continue}if(ae=this.tokenizer.tag(f,b,k)){f=f.substring(ae.raw.length),b=ae.inLink,k=ae.inRawBlock,p.push(ae);continue}if(ae=this.tokenizer.link(f)){f=f.substring(ae.raw.length),ae.type==="link"&&(ae.tokens=this.inlineTokens(ae.text,[],!0,k)),p.push(ae);continue}if(ae=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(ae.raw.length),ae.type==="link"&&(ae.tokens=this.inlineTokens(ae.text,[],!0,k)),p.push(ae);continue}if(ae=this.tokenizer.strong(f,Te,D)){f=f.substring(ae.raw.length),ae.tokens=this.inlineTokens(ae.text,[],b,k),p.push(ae);continue}if(ae=this.tokenizer.em(f,Te,D)){f=f.substring(ae.raw.length),ae.tokens=this.inlineTokens(ae.text,[],b,k),p.push(ae);continue}if(ae=this.tokenizer.codespan(f)){f=f.substring(ae.raw.length),p.push(ae);continue}if(ae=this.tokenizer.br(f)){f=f.substring(ae.raw.length),p.push(ae);continue}if(ae=this.tokenizer.del(f)){f=f.substring(ae.raw.length),ae.tokens=this.inlineTokens(ae.text,[],b,k),p.push(ae);continue}if(ae=this.tokenizer.autolink(f,Y)){f=f.substring(ae.raw.length),p.push(ae);continue}if(!b&&(ae=this.tokenizer.url(f,Y))){f=f.substring(ae.raw.length),p.push(ae);continue}if(ae=this.tokenizer.inlineText(f,k,pe)){f=f.substring(ae.raw.length),D=ae.raw.slice(-1),p.push(ae);continue}if(f){var et="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(et);break}else throw new Error(et)}}return p},Ce(I,null,[{key:"rules",get:function(){return{block:g,inline:re}}}]),I}(),ke=L.defaults,Re=E.cleanUrl,Le=E.escape,be=function(){function I(O){this.options=O||ke}var A=I.prototype;return A.code=function(f,p,b){var k=(p||"").match(/\S*/)[0];if(this.options.highlight){var D=this.options.highlight(f,k);D!=null&&D!==f&&(b=!0,f=D)}return k?'
    '+(b?f:Le(f,!0))+`
    `:"
    "+(b?f:Le(f,!0))+`
    `},A.blockquote=function(f){return`
    `+f+`
    `},A.html=function(f){return f},A.heading=function(f,p,b,k){return this.options.headerIds?"'+f+" `:""+f+" `},A.hr=function(){return this.options.xhtml?`
    `:`
    `},A.list=function(f,p,b){var k=p?"ol":"ul",D=p&&b!==1?' start="'+b+'"':"";return"<"+k+D+`> `+f+" `},A.listitem=function(f){return"
  • "+f+`
  • `},A.checkbox=function(f){return" "},A.paragraph=function(f){return"

    "+f+`

    `},A.table=function(f,p){return p&&(p=""+p+""),` `+f+` `+p+`
    `},A.tablerow=function(f){return` `+f+` `},A.tablecell=function(f,p){var b=p.header?"th":"td",k=p.align?"<"+b+' align="'+p.align+'">':"<"+b+">";return k+f+" `},A.strong=function(f){return""+f+""},A.em=function(f){return""+f+""},A.codespan=function(f){return""+f+""},A.br=function(){return this.options.xhtml?"
    ":"
    "},A.del=function(f){return""+f+""},A.link=function(f,p,b){if(f=Re(this.options.sanitize,this.options.baseUrl,f),f===null)return b;var k='",k},A.image=function(f,p,b){if(f=Re(this.options.sanitize,this.options.baseUrl,f),f===null)return b;var k=''+b+'":">",k},A.text=function(f){return f},I}(),Ee=function(){function I(){}var A=I.prototype;return A.strong=function(f){return f},A.em=function(f){return f},A.codespan=function(f){return f},A.del=function(f){return f},A.html=function(f){return f},A.text=function(f){return f},A.link=function(f,p,b){return""+b},A.image=function(f,p,b){return""+b},A.br=function(){return""},I}(),Ue=function(){function I(){this.seen={}}var A=I.prototype;return A.slug=function(f){var p=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(p)){var b=p;do this.seen[b]++,p=b+"-"+this.seen[b];while(this.seen.hasOwnProperty(p))}return this.seen[p]=0,p},I}(),Je=L.defaults,ze=E.unescape,Ve=function(){function I(O){this.options=O||Je,this.options.renderer=this.options.renderer||new be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new Ue}I.parse=function(f,p){var b=new I(p);return b.parse(f)};var A=I.prototype;return A.parse=function(f,p){p===void 0&&(p=!0);var b="",k,D,ae,Te,He,tt,et,kt,ht,st,Tt,bt,Ut,jt,yt,Tn,Mn,un,gn=f.length;for(k=0;k0&&yt.tokens[0].type==="text"?(yt.tokens[0].text=un+" "+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=un+" "+yt.tokens[0].tokens[0].text)):yt.tokens.unshift({type:"text",text:un}):jt+=un),jt+=this.parse(yt.tokens,Ut),ht+=this.renderer.listitem(jt,Mn,Tn);b+=this.renderer.list(ht,Tt,bt);continue}case"html":{b+=this.renderer.html(st.text);continue}case"paragraph":{b+=this.renderer.paragraph(this.parseInline(st.tokens));continue}case"text":{for(ht=st.tokens?this.parseInline(st.tokens):st.text;k+1An error occurred:

    "+Ke(ae.message+"",!0)+"
    ";throw ae}}ye.options=ye.setOptions=function(I){return ot(ye.defaults,I),it(ye.defaults),ye},ye.getDefaults=he,ye.defaults=qe,ye.use=function(I){var A=ot({},I);if(I.renderer&&function(){var f=ye.defaults.renderer||new be,p=function(D){var ae=f[D];f[D]=function(){for(var Te=arguments.length,He=new Array(Te),tt=0;tt`,triples:"",explode:"[]{}"},oe=K.Pos;K.defineOption("autoCloseBrackets",!1,function(F,z,j){j&&j!=K.Init&&(F.removeKeyMap(ge),F.state.closeBrackets=null),z&&(ee(Se(z,"pairs")),F.state.closeBrackets=z,F.addKeyMap(ge))});function Se(F,z){return z=="pairs"&&typeof F=="string"?F:typeof F=="object"&&F[z]!=null?F[z]:Ce[z]}var ge={Backspace:P,Enter:V};function ee(F){for(var z=0;z=0;ce--){var Xe=le[ce].head;F.replaceRange("",oe(Xe.line,Xe.ch-1),oe(Xe.line,Xe.ch+1),"+delete")}}function V(F){var z=W(F),j=z&&Se(z,"explode");if(!j||F.getOption("disableInput"))return K.Pass;for(var le=F.listSelections(),ce=0;ce0;return{anchor:new oe(F.anchor.line,F.anchor.ch+(z?-1:1)),head:new oe(F.head.line,F.head.ch+(z?1:-1))}}function R(F,z){var j=W(F);if(!j||F.getOption("disableInput"))return K.Pass;var le=Se(j,"pairs"),ce=le.indexOf(z);if(ce==-1)return K.Pass;for(var Oe=Se(j,"closeBefore"),Xe=Se(j,"triples"),Ie=le.charAt(ce+1)==z,De=F.listSelections(),Fe=ce%2==0,xe,we=0;we=0&&F.getRange(ne,oe(ne.line,ne.ch+3))==z+z+z?v="skipThree":v="skip";else if(Ie&&ne.ch>1&&Xe.indexOf(z)>=0&&F.getRange(oe(ne.line,ne.ch-2),ne)==z+z){if(ne.ch>2&&/\bstring/.test(F.getTokenTypeAt(oe(ne.line,ne.ch-2))))return K.Pass;v="addFour"}else if(Ie){var H=ne.ch==0?" ":F.getRange(oe(ne.line,ne.ch-1),ne);if(!K.isWordChar(Q)&&H!=z&&!K.isWordChar(H))v="both";else return K.Pass}else if(Fe&&(Q.length===0||/\s/.test(Q)||Oe.indexOf(Q)>-1))v="both";else return K.Pass;if(!xe)xe=v;else if(xe!=v)return K.Pass}var w=ce%2?le.charAt(ce-1):z,q=ce%2?z:le.charAt(ce+1);F.operation(function(){if(xe=="skip")F.execCommand("goCharRight");else if(xe=="skipThree")for(var U=0;U<3;U++)F.execCommand("goCharRight");else if(xe=="surround"){for(var T=F.getSelections(),U=0;U0&&(B.percent=B.loaded/B.total*100),E.onProgress(B)});var l=new FormData;E.data&&Object.keys(E.data).forEach(function(_){var B=E.data[_];if(Array.isArray(B)){B.forEach(function(ue){l.append(_+"[]",ue)});return}l.append(_,E.data[_])}),E.file instanceof Blob?l.append(E.filename,E.file,E.file.name):l.append(E.filename,E.file),c.onerror=function(B){E.onError(B)},c.onload=function(){return c.status<200||c.status>=300?E.onError(ge(E,c),ee(c)):E.onSuccess(ee(c),c)},c.open(E.method,E.action,!0),E.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var m=E.headers||{};return m["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(m).forEach(function(_){m[_]!==null&&c.setRequestHeader(_,m[_])}),c.send(l),{abort:function(){c.abort()}}}var W=+new Date,P=0;function V(){return"rc-upload-"+W+"-"+ ++P}function N(E,c){return E.indexOf(c,E.length-c.length)!==-1}var R=function(E,c){if(E&&c){var l=Array.isArray(c)?c:c.split(","),m=E.name||"",_=E.type||"",B=_.replace(/\/.*$/,"");return l.some(function(ue){var Ae=ue.trim();return Ae.charAt(0)==="."?N(m.toLowerCase(),Ae.toLowerCase()):/\/\*$/.test(Ae)?B===Ae.replace(/\/.*$/,""):_===Ae})}return!0};function ve(E,c){var l=E.createReader(),m=[];function _(){l.readEntries(function(B){var ue=Array.prototype.slice.apply(B);m=m.concat(ue);var Ae=!ue.length;Ae?c(m):_()})}_()}var te=function(c,l,m){var _=function B(ue,Ae){Ae=Ae||"",ue.isFile?ue.file(function(de){m(de)&&(ue.fullPath&&!de.webkitRelativePath&&(Object.defineProperties(de,{webkitRelativePath:{writable:!0}}),de.webkitRelativePath=ue.fullPath.replace(/^\//,""),Object.defineProperties(de,{webkitRelativePath:{writable:!1}})),l([de]))}):ue.isDirectory&&ve(ue,function(de){de.forEach(function(ie){B(ie,""+Ae+ue.name+"/")})})};c.forEach(function(B){_(B.webkitGetAsEntry())})},F=te,z=Object.assign||function(E){for(var c=1;c=0)continue;if(!Object.prototype.hasOwnProperty.call(E,m))continue;l[m]=E[m]}return l}function Xe(E,c){if(!(E instanceof c))throw new TypeError("Cannot call a class as a function")}function Ie(E,c){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:E}function De(E,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);E.prototype=Object.create(c&&c.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(E,c):E.__proto__=c)}var Fe=function(c){return Object.keys(c).reduce(function(l,m){return(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(l[m]=c[m]),l},{})},xe=function(E){De(c,E);function c(){var l,m,_,B;Xe(this,c);for(var ue=arguments.length,Ae=Array(ue),de=0;de1&&arguments[1]!==void 0?arguments[1]:1,O=Ee.length,f=0;f1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Fe.a)(l).map(function(_,B){if(!ge.isValidElement(_)||!_.type)return null;var ue=_.type.isSelectOptGroup,Ae=_.key,de=_.props,ie=de.children,G=Object(L.a)(de,["children"]);return m||!ue?xe(_):Object(De.a)(Object(De.a)({key:"__RC_SELECT_GRP__".concat(Ae===null?B:Ae,"__"),label:Ae},G),{},{options:we(ie)})}).filter(function(_){return _})}var fe=x("2Qr1"),ne=x("qNPg"),v=x("U8pU"),Q=x("Kwbf"),H=x("WKfj");function w(l){var m=l.mode,_=l.options,B=l.children,ue=l.backfill,Ae=l.allowClear,de=l.placeholder,ie=l.getInputElement,G=l.showSearch,Z=l.onSearch,M=l.defaultOpen,J=l.autoFocus,h=l.labelInValue,C=l.value,g=l.inputValue,re=l.optionLabelProp,pe=m==="multiple"||m==="tags",Y=G!==void 0?G:pe||m==="combobox",se=_||we(B);if(Object(Q.a)(m!=="tags"||se.every(function(be){return!be.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),m==="tags"||m==="combobox"){var ke=se.some(function(be){return be.options?be.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in be?be.value:be.key)=="number"});Object(Q.a)(!ke,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(Q.a)(m!=="combobox"||!re,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(Q.a)(m==="combobox"||!ue,"`backfill` only works with `combobox` mode."),Object(Q.a)(m==="combobox"||!ie,"`getInputElement` only work with `combobox` mode."),Object(Q.b)(m!=="combobox"||!ie||!Ae||!de,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Z&&!Y&&m!=="combobox"&&m!=="tags"&&Object(Q.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(Q.b)(!M||J,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),C!=null){var Re=Object(H.d)(C);Object(Q.a)(!h||Re.every(function(be){return Object(v.a)(be)==="object"&&("key"in be||"value"in be)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(Q.a)(!pe||Array.isArray(C),"`value` should be array when `mode` is `multiple` or `tags`")}if(B){var Le=null;Object(Fe.a)(B).some(function(be){if(!ge.isValidElement(be)||!be.type)return!1;var Ee=be.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var Ue=Object(Fe.a)(be.props.children).every(function(Je){return!ge.isValidElement(Je)||!be.type||Je.type.isSelectOption?!0:(Le=Je.type,!1)});return!Ue}return Le=Ee,!0}),Le&&Object(Q.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Le.displayName||Le.name||Le,"`.")),Object(Q.a)(g===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var q=w,U=Object(ne.a)({prefixCls:"rc-select",components:{optionList:le},convertChildrenToData:we,flattenOptions:fe.d,getLabeledValue:fe.e,filterOptions:fe.b,isValueDisabled:fe.g,findValueOption:fe.c,warningProps:q,fillOptionsWithMissingValue:fe.a}),T=function(l){Object(oe.a)(_,l);var m=Object(Se.a)(_);function _(){var B;return Object(K.a)(this,_),B=m.apply(this,arguments),B.selectRef=ge.createRef(),B.focus=function(){B.selectRef.current.focus()},B.blur=function(){B.selectRef.current.blur()},B}return Object(Ce.a)(_,[{key:"render",value:function(){return ge.createElement(U,Object.assign({ref:this.selectRef},this.props))}}]),_}(ge.Component);T.Option=Oe,T.OptGroup=Ie;var E=T,c=Ye.c=E},M8RZ:function(ft,Ye,x){"use strict";x.d(Ye,"a",function(){return P});var K=x("fWQN"),Ce=x("mtLc"),oe=x("yKVA"),Se=x("879j"),ge=x("cDcd"),ee=x.n(ge),L=x("faye"),W=x.n(L),P=function(V){Object(oe.a)(R,V);var N=Object(Se.a)(R);function R(ve){var te;Object(K.a)(this,R),te=N.call(this,ve);var F=window.document;return te.node=F.createElement("div"),F.body.appendChild(te.node),te}return Object(Ce.a)(R,[{key:"render",value:function(){var te=this.props.children;return Object(L.createPortal)(te,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),R}(ee.a.Component)},Ot1p:function(ft,Ye,x){"use strict";var K=x("2qtc"),Ce=x("kLXV"),oe=x("rAM+"),Se=x("miYZ"),ge=x("tsqr"),ee=x("9og8"),L=x("tJVT"),W=x("jrin"),P=x("WmNS"),V=x.n(P),N=x("cDcd"),R=x.n(N),ve=x("VrN/"),te=x.n(ve),F=x("bdgK"),z=x("p77/"),j=x("Bd2K"),le=x("ELLl"),ce=x("19Vz"),Oe=x("lZu9"),Xe=x("+NIl"),Ie=x("kSUc"),De=x("9Bee"),Fe=function(D){var ae=D.value,Te=ae===void 0?"":ae,He=D.className,tt=D.showTextOnly,et=D.showLines,kt=D.style,ht=kt===void 0?{}:kt,st=Object(N.useMemo)(function(){return""},[Te]);return R.a.createElement(R.a.Fragment,null,R.a.createElement("div",{dangerouslySetInnerHTML:{__html:st}}))},xe=x("0Owb"),we=x("dejd"),fe=x("C+DQ"),ne=x("1vsH"),v=x("m3rI"),Q=[{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 H(D){var ae=D.onActionCallback,Te=D.title,He=D.icon,tt=D.actionName,et=D.className,kt=et===void 0?"":et,ht=D.children;function st(){ae(tt)}return R.a.createElement("a",{title:Te,className:kt,onClick:st},R.a.createElement("i",{className:"md-iconfont ".concat(He)}),ht)}var w=function(D){var ae=D.watch,Te=D.showNullButton,He=D.onActionCallback,tt=D.fullScreen,et=D.insertTemp,kt=D.hidetoolBar,ht=D.uuid,st=D.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(ne.n)("_educoder_session_login"),"&_educoder_session=").concat(Object(ne.n)("_educoder_session"),"&key=").concat(ht,"&api=").concat(encodeURIComponent(v.a.PROXY_SERVER)));var Tt=[].concat(Q,[{title:"".concat(ae?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ae?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return R.a.createElement("ul",{className:"markdown-toolbar-container"},!kt&&Tt.map(function(bt,Ut){return R.a.createElement("li",{key:Ut},bt.actionName?R.a.createElement(H,Object(xe.a)({},bt,{onActionCallback:He})):R.a.createElement("span",{className:"v-line"}))}),Te?R.a.createElement("li",null,R.a.createElement(H,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:He},R.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,et&&R.a.createElement("li",null,R.a.createElement(H,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(et),onActionCallback:He},R.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),R.a.createElement("li",{className:"btn-full-screen"},R.a.createElement(H,{icon:"".concat(tt?"icon-shrink":"icon-enlarge"),title:tt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:He})))},q=x("M8RZ"),U=x("+L6B"),T=x("2/Rp"),E=x("y8nQ"),c=x("Vl3Y"),l=x("5NDa"),m=x("5rEg"),_={labelCol:{span:4},wrapperCol:{span:20}},B=function(D){var ae=D.callback,Te=D.onCancel;function He(tt){ae(tt)}return R.a.createElement(c.a,Object(xe.a)({},_,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:He}),R.a.createElement(c.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},R.a.createElement(m.a,null)),R.a.createElement(c.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},R.a.createElement(m.a,null)),R.a.createElement("div",{className:"flex-container flex-end"},R.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),R.a.createElement(T.a,{type:"ghost",onClick:Te},"\u53D6\u6D88")))},ue=x("7ahc"),Ae=x("HmJG"),de=x("BjJ7"),ie=c.a.useForm,G={width:280,marginRight:10},Z={labelCol:{span:5},wrapperCol:{span:19}},M=function(D){var ae=D.callback,Te=D.onCancel,He=ie(),tt=Object(L.a)(He,1),et=tt[0];function kt(Tt){ae(Tt)}function ht(Tt,bt){if(Tt.status===-1){ge.b.error(Tt.message);return}et.setFieldsValue({src:"/api/attachments/".concat(Tt.id),type:bt.type})}function st(Tt){var bt=Tt.target.files[0];h(bt,ht)}return R.a.createElement(c.a,Object(xe.a)({form:et},Z,{className:"upload-image-panel",onFinish:kt}),R.a.createElement(c.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},R.a.createElement("div",{className:"flex-container"},R.a.createElement(c.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},R.a.createElement(m.a,{style:G})),R.a.createElement(J,{onFileChange:st}))),R.a.createElement(c.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},R.a.createElement(m.a,{style:{width:264}})),R.a.createElement(c.a.Item,{style:{textAlign:"right"}},R.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),R.a.createElement(T.a,{type:"ghost",onClick:Te},"\u53D6\u6D88")))};function J(D){var ae=D.onFileChange;return R.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",R.a.createElement("input",{type:"file",onChange:ae}))}function h(D,ae){if(!D)throw new String("\u6CA1\u6709\u6587\u4EF6");var Te=new FormData;Te.append("editormd-image-file",D),Te.append("file_param_name","editormd-image-file"),Te.append("byxhr","true");var He=new window.XMLHttpRequest;He.withCredentials=!0,He.addEventListener("load",function(tt){ae(JSON.parse(tt.target.responseText),D)},!1),He.addEventListener("error",function(tt){console.error(tt)},!1),He.open("POST","".concat(de.a,"/api/attachments.json")),He.send(Te)}var C=x("giR+"),g=x("fyUT"),re=x("7Kak"),pe=x("9yH6"),Y=pe.a.Group,se={margin:"0 8px"},ke=function(D){var ae=D.callback,Te=D.onCancel;function He(tt){ae(tt)}return R.a.createElement(c.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:He},R.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},R.a.createElement("span",{style:se},"\u5355\u5143\u683C\u6570\uFF1A"),R.a.createElement("span",{style:se},"\u884C\u6570"),R.a.createElement(c.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},R.a.createElement(g.a,null)),R.a.createElement("span",{style:se},"\u5217\u6570"),R.a.createElement(c.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},R.a.createElement(g.a,null))),R.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},R.a.createElement("span",{style:se},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),R.a.createElement(c.a.Item,{name:"align"},R.a.createElement(Y,null,R.a.createElement(pe.a,{value:"default"},R.a.createElement("i",{className:"fa fa-align-justify"})),R.a.createElement(pe.a,{value:"left"},R.a.createElement("i",{className:"fa fa-align-left"})),R.a.createElement(pe.a,{value:"center"},R.a.createElement("i",{className:"fa fa-align-center"})),R.a.createElement(pe.a,{value:"right"},R.a.createElement("i",{className:"fa fa-align-right"}))))),R.a.createElement("div",{className:"flex-container flex-end"},R.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),R.a.createElement(T.a,{type:"ghost",onClick:Te},"\u53D6\u6D88")))},Re=x("ErOA"),Le=x("7Cbv"),be="link",Ee="upload-image",Ue="code-block",Je="add-table",ze="------------",Ve={default:ze,left:":".concat(ze),center:":".concat(ze,":"),right:"".concat(ze,":")},ot=x("9VGf"),rt,Ke;function he(){}var it=0,qe=1e4,ye="\u2581",Pe=` **\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 I(D){return/^\d+$/.test(D)?"".concat(D,"px"):D}var A=navigator.platform.toUpperCase().indexOf("MAC")>=0,O=A?"Cmd":"Ctrl",f=["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"],p=(rt={},Object(W.a)(rt,O+"-B","bold"),Object(W.a)(rt,O+"-I","italic"),rt),b=(Ke={},Object(W.a)(Ke,be,"\u6DFB\u52A0\u94FE\u63A5"),Object(W.a)(Ke,Ue,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(W.a)(Ke,Ee,"\u6DFB\u52A0\u6587\u4EF6"),Object(W.a)(Ke,Je,"\u6DFB\u52A0\u8868\u683C"),Ke),k=Ye.a=function(D){var ae=D.defaultValue,Te=ae===void 0?"":ae,He=D.onChange,tt=D.width,et=tt===void 0?"100%":tt,kt=D.height,ht=kt===void 0?400:kt,st=D.miniToolbar,Tt=st===void 0?!1:st,bt=D.isFocus,Ut=bt===void 0?!1:bt,jt=D.watch,yt=D.insertTemp,Tn=D.mode,Mn=Tn===void 0?"markdown":Tn,un=D.id,gn=un===void 0?"markdown-editor-id":un,hn=D.showResizeBar,ia=hn===void 0?!1:hn,_n=D.noStorage,zr=_n===void 0?!1:_n,Hr=D.showNullButton,Rt=Hr===void 0?!1:Hr,Ze=D.hidetoolBar,Dn=Ze===void 0?!1:Ze,pr=D.fullScreen,Zt=pr===void 0?!1:pr,wt=D.onBlur,vn=D.onCMBeforeChange,Pn=D.onFullScreen,mr=D.className,Me=mr===void 0?"":mr,ut=D.disablePaste,Xr=ut===void 0?!1:ut,gr=D.placeholder,vr=gr===void 0?"":gr,Zn=D.values,br=Zn===void 0?"":Zn,dt=Object(N.useState)(null),Ti=Object(L.a)(dt,2),Ne=Ti[0],yr=Ti[1],pn=Object(N.useState)(Te),Gr=Object(L.a)(pn,2),Qn=Gr[0],bn=Gr[1],Kr=Object(N.useState)(jt),Vr=Object(L.a)(Kr,2),yn=Vr[0],$r=Vr[1],_i=Object(N.useState)(Zt),Yr=Object(L.a)(_i,2),xn=Yr[0],Ai=Yr[1],aa=Object(N.useState)(""),Jr=Object(L.a)(aa,2),Yt=Jr[0],zn=Jr[1],oa=Object(N.useState)(0),er=Object(L.a)(oa,2),wn=er[0],qr=er[1],sa=Object(N.useState)(ht),Oi=Object(L.a)(sa,2),Li=Oi[0],xr=Oi[1],Ri=Object(N.useState)(!1),Mi=Object(L.a)(Ri,2),la=Mi[0],wr=Mi[1],tr=Object(N.useRef)(Object(Le.a)()),nr=Object(N.useRef)(!1),Er=Object(N.useRef)(),Nn=Object(N.useRef)(),jn=Object(N.useRef)(),In=Object(N.useRef)(),Cr=Object(N.useRef)(),Di=function(){var Qe=Object(ee.a)(V.a.mark(function ct(){var at,mt;return V.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(Re.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tr.current}});case 2:mt=_t.sent,mt!=null&&(at=mt.attachments)!==null&&at!==void 0&&at.length&&(console.log("cm:",Ne,Nn),mt.attachments.map(function(vt){vt.content_type.indexOf("image")>-1?Ne.replaceSelection("![,](/api/attachments/".concat(vt.id,"?type=").concat(vt.content_type,")")):vt.content_type.indexOf("video")>-1?Ne.replaceSelection('')):vt.content_type.indexOf("pdf")>-1?Ne.replaceSelection('
    ').concat(vt.name,"")):Ne.replaceSelection("[".concat(vt.name,"](").concat(v.a.API_SERVER,"/api/attachments/").concat(vt.id,"?type=").concat(vt.content_type,")"))}));case 4:case"end":return _t.stop()}},ct)}));return function(){return Qe.apply(this,arguments)}}();Object(N.useEffect)(function(){bn(br),Ne==null||Ne.setValue(br)},[br]),Object(N.useEffect)(function(){Pn==null||Pn(xn)},[xn]),Object(N.useEffect)(function(){if(Nn.current){var Qe=te.a.fromTextArea(Nn.current,{mode:Mn,lineNumbers:!Tt,lineWrapping:!0,value:Te,autoCloseTags:!0,autoCloseBrackets:!0});Ut&&Qe.focus();function ct(at,mt){if(Xr){mt.preventDefault();return}var xt=mt.clipboardData;if(xt){var _t=xt.types.toString(),vt=xt.items;if(_t==="Files"||xt.types.indexOf("Files")>-1){if(mt.preventDefault(),Mn=="stex")return;try{var It,Qt=vt[1];((It=vt[0])===null||It===void 0?void 0:It.kind)==="file"&&(Qt=vt[0]);var gt=Qt.getAsFile(),Fn=gt.name.split(".").pop();h(gt,function(Et){if(Et.id){var en,Kt,mn;(gt==null||((en=gt.type)===null||en===void 0)?void 0:en.indexOf("image"))>-1?Qe.replaceSelection("![,](/api/attachments/".concat(Et.id,"?type=").concat(Et.content_type,")")):(gt==null||((Kt=gt.type)===null||Kt===void 0)?void 0:Kt.indexOf("video"))>-1?Qe.replaceSelection('')):(gt==null||((mn=gt.type)===null||mn===void 0)?void 0:mn.indexOf("pdf"))>-1?Qe.replaceSelection('').concat(gt.name,"")):f.includes(Fn)?Qe.replaceSelection('').concat(gt.name,"")):Qe.replaceSelection("[".concat(gt.name,"](").concat(v.a.API_SERVER,"/api/attachments/").concat(Et.id,"?type=").concat(Et.content_type,")"))}else(Et==null?void 0:Et.status)===401&&(document.location.href="/user/login")})}catch(Et){ge.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Qe.on("paste",ct),Qe.on("dragleave",function(at,mt){jn.current.classList.remove("mouse-hover-md")}),Qe.on("dragover",function(at,mt){jn.current.classList.add("mouse-hover-md")}),Qe.on("drop",function(at,mt){jn.current.classList.add("mouse-hover-md");var xt;if(xt=mt.dataTransfer.files,xt.length>0){mt.preventDefault(),mt.stopPropagation();for(var _t=function(Qt){var gt=xt[Qt],Fn=gt.name.split(".").pop();h(gt,function(Et){if(Et.id){var en,Kt,mn;(gt==null||((en=gt.type)===null||en===void 0)?void 0:en.indexOf("image"))>-1?Qe.replaceSelection("![,](/api/attachments/".concat(Et.id,"?type=").concat(Et.content_type,")")):(gt==null||((Kt=gt.type)===null||Kt===void 0)?void 0:Kt.indexOf("video"))>-1?Qe.replaceSelection('')):(gt==null||((mn=gt.type)===null||mn===void 0)?void 0:mn.indexOf("pdf"))>-1?Qe.replaceSelection('').concat(gt.name,"")):f.includes(Fn)?Qe.replaceSelection('').concat(gt.name,"")):Qe.replaceSelection("[".concat(gt.name,"](").concat(v.a.API_SERVER,"/api/attachments/").concat(Et.id,"?type=").concat(Et.content_type,")"))}else(Et==null?void 0:Et.status)===401&&(document.location.href="/user/login")})},vt=0;vt0||vt.target.offsetWidth>0)&&(cn(),Ne.setSize("100%","100%"),Ne.refresh())}}catch(It){xt.e(It)}finally{xt.f()}});return at.observe(Nn.current.parentElement),at}if(Ne){var ct=Qe();return function(){ct.unobserve(Nn.current.parentElement)}}},[Ne,cn]),Object(N.useEffect)(function(){if(Ne){for(var Qe=[],ct=function(){var vt=mt[at];xt=Object(L.a)(vt,2);var It=xt[0],Qt=xt[1],gt=Object(W.a)({},It,function(){Pi(Qt)});Qe.push(gt),Ne.addKeyMap(gt)},at=0,mt=Object.entries(p);at0){var Qe=new Date().getTime(),ct=window.sessionStorage.getItem(gn);Qe>=wn+qe&&(!ct||ct!==Qn)&&(window.sessionStorage.setItem(gn,Qn),wr(!0))}},qe),Object(N.useEffect)(function(){$r(jt)},[Ne,jt]),Object(N.useEffect)(function(){Ne&&(Ut&&Ne.focus())},[Ne,Ut]),Object(N.useEffect)(function(){if(yn&&Ne){var Qe=Ne.getScrollerElement();function ct(at){var mt=at.target;if(Cr.current){var xt=mt.scrollTop/mt.scrollHeight;Cr.current.scrollTop=Cr.current.scrollHeight*xt}}return Qe.addEventListener("scroll",ct),function(){Qe.removeEventListener("scroll",ct)}}},[Ne,yn]),Object(N.useEffect)(function(){if(Ne&&vn){function Qe(ct,at){vn(ct,at)}return Ne.on("beforeChange",Qe),function(){Ne.off("beforeChange",Qe)}}},[Ne,vn]),Object(N.useEffect)(function(){if(Ne&&wt){function Qe(){wt(Ne.getValue())}return Ne.on("blur",Qe),function(){Ne.off("blur",Qe)}}},[Ne,wt]),Object(N.useEffect)(function(){if(Ne){function Qe(ct){var at=ct.getValue();bn(at),qr(new Date().getTime()),ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),He&&He(at)}return Ne.on("change",Qe),function(){Ne.off("change",Qe)}}},[Ne,He]),Object(N.useEffect)(function(){Ne&&(Te==null?(Ne.setValue(""),bn("")):Te!==Ne.getValue()&&(Ne.setValue(Te),bn(Te),Ne.setCursor(Ne.lineCount(),0)))},[Ne,Te]);var Pi=Object(N.useCallback)(function(Qe){var ct=Ne.getCursor(),at=Ne.getSelection(),mt=at.split(` `);switch(Qe){case"bold":return Ne.replaceSelection("**"+at+"**"),at===""&&Ne.setCursor(ct.line,ct.ch+2),Ne.focus();case"italic":return Ne.replaceSelection("*"+at+"*"),at===""&&Ne.setCursor(ct.line,ct.ch+1),Ne.focus();case"code":return Ne.replaceSelection("`"+at+"`"),at===""&&Ne.setCursor(ct.line,ct.ch+1),Ne.focus();case"inline-latex":return Ne.replaceSelection("`$$"+at+"$$`"),at===""&&Ne.setCursor(ct.line,ct.ch+3),Ne.focus();case"latex":return Ne.replaceSelection("```latex\n"+at+"\n```"),Ne.setCursor(ct.line+1,at.length+1),Ne.focus();case"line-break":return Ne.replaceSelection(`
    `),Ne.focus();case"list-ul":return at===""?Ne.replaceSelection("- "+at):Ne.replaceSelection(mt.map(function(xt){return xt===""?"":"- ".concat(xt)}).join(` `)),Ne.focus();case"list-ol":return at===""?Ne.replaceSelection("1. "+at):Ne.replaceSelection(mt.map(function(xt,_t){return xt===""?"":"".concat(_t+1,". ").concat(xt)}).join(` `)),Ne.focus();case"add-null-ch":return at===""&&Ne.setCursor(ct.line,ct.ch+1),Ne.replaceSelection(ye),Ne.focus();case"inster-template-1":return at===""&&Ne.setCursor(ct.line,ct.ch),Ne.replaceSelection(Pe),Ne.focus();case"eraser":return Ne.setValue(""),Ne.focus();case"trigger-watch":return $r(!yn),Ne.focus();case"trigger-full-screen":return Ai(!xn),Ne.focus();case be:zn(be);return;case Ue:zn(Ue);return;case Ee:zn(Ee);return;case Je:zn(Je);return;default:throw new Error}},[Ne,yn,xn]),kr=Object(N.useCallback)(function(Qe){zn("");switch(Yt){case be:var ct=Qe.title,at=Qe.link;return Ne.replaceSelection("[".concat(ct,"](").concat(at,")")),Ne.focus();case Ue:var mt=Qe.language,xt=Qe.content;return Ne.replaceSelection(["```"+mt,xt,"```"].join(` `)),Ne.focus();case Ee:var _t=Qe.src,vt=Qe.alt;return vt?Ne.replaceSelection("![ ".concat(vt," ]( ").concat(_t,' "').concat(vt,'" )')):Ne.replaceSelection("![,](".concat(_t,")")),Ne.focus();case Je:for(var It=Qe.row,Qt=Qe.col,gt=Qe.align,Fn=` `,Et=0;Et300&&(It=300);var Qt=ht+It+"px";xr(Qt)}}return Qe.addEventListener("mousedown",mt),document.addEventListener("mousemove",_t),document.addEventListener("mouseup",xt),function(){Qe.removeEventListener("mousedown",mt),document.removeEventListener("mousemove",_t),document.removeEventListener("mouseup",xt)}}},[Ne,In]),Object(N.useEffect)(function(){xr(ht)},[ht]);var An=I(et),Qr=I(Li),En={width:An,height:Qr},ei=Object(N.useMemo)(function(){if(wn){var Qe=new Date(wn),ct=Qe.getHours(),at=Qe.getMinutes(),mt=Qe.getSeconds();return ct=ct<10?"0"+ct:ct,at=at<10?"0"+at:at,mt=mt<10?"0"+mt:mt,"".concat(ct,":").concat(at,":").concat(mt)}return 0},[wn]);function Ni(){window.sessionStorage.removeItem(gn),wr(!1),qr(0)}function rr(){wr(!1),qr(0),Ne.setValue(window.sessionStorage.getItem(gn))}function ua(Qe,ct){var at=Ne.getValue();at=at.replace(Qe,ct),bn(at),Ne==null||Ne.setValue(at)}return R.a.createElement(N.Fragment,null,R.a.createElement("div",{className:"markdown-editor-wrapper",ref:jn},R.a.createElement("div",{className:"markdown-editor-container ".concat(Me," ").concat(yn?"on-preview":""," ").concat(Tt?"mini":""," ").concat(xn?"full-screen":""),style:En},R.a.createElement(w,{insertTemp:yt,watch:yn,fullScreen:xn,showNullButton:Rt,onActionCallback:Pi,hidetoolBar:Dn,uuid:tr.current,setOpenPhones:function(){nr.current=!0}}),R.a.createElement("div",{className:"markdown-editor-body"},R.a.createElement("div",{className:"codemirror-container"},R.a.createElement("textarea",{ref:Nn,placeholder:vr})),yn?R.a.createElement("div",{ref:Cr,className:"preview-container"},Mn==="stex"&&R.a.createElement(Fe,{value:Qn}),Mn!=="stex"&&R.a.createElement(De.a,{edit:!0,value:Qn,replaces:ua})):null))),ia?R.a.createElement("a",{ref:In,className:"editor-resize"}):null,R.a.createElement(q.a,null,b[Yt]?R.a.createElement(Ce.a,{centered:!0,title:b[Yt],visible:!0,onCancel:Hn,footer:null,className:"markdown-popup-form"},Zr):null))}},SJMd:function(ft,Ye){/** * @license * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var x,K,Ce,oe=!1,Se,ge;window.PR_SHOULD_USE_CONTINUATION=!0;var ee,L;(function(){var W=window,P=["break,continue,do,else,for,if,return,while"],V=[P,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],N=[V,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],R=[N,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],ve=[N,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],te=[N,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],F="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",z=[N,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],j="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",le=[P,"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"],ce=[P,"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"],Oe=[P,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Xe=[R,te,ve,z,j,le,ce,Oe],Ie=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,De="str",Fe="kwd",xe="com",we="typ",fe="lit",ne="pun",v="pln",Q="tag",H="dec",w="src",q="atn",U="atv",T="nocode",E="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(Y){for(var se=0,ke=!1,Re=!1,Le=0,be=Y.length;Le122||(f<65||O>90||it.push([Math.max(65,O)|32,Math.min(f,90)|32]),f<97||O>122||it.push([Math.max(97,O)&~32,Math.min(f,122)&~32]))}}it.sort(function(D,ae){return D[0]-ae[0]||ae[1]-D[1]});for(var p=[],b=[],Pe=0;Pek[0]&&(k[1]+1>k[0]&&ye.push("-"),ye.push(ze(k[1])))}return ye.push("]"),ye.join("")}function ot(Ke){for(var he=Ke.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=he.length,qe=[],ye=0,Pe=0;ye=2&&O==="["?he[ye]=Ve(I):O!=="\\"&&(he[ye]=I.replace(/[a-zA-Z]/g,function(b){var k=b.charCodeAt(0);return"["+String.fromCharCode(k&~32,k|32)+"]"}))}return he.join("")}for(var rt=[],Le=0,be=Y.length;Le=0;)ke[rt.charAt(Ke)]=ot;var he=ot[1],it=""+he;Je.hasOwnProperty(it)||(Ue.push(he),Je[it]=null)}Ue.push(/[\0-\uffff]/),Re=c(Ue)})();var Le=se.length,be=function(Ee){for(var Ue=Ee.sourceCode,Je=Ee.basePos,ze=Ee.sourceNode,Ve=[Je,v],ot=0,rt=Ue.match(Re)||[],Ke={},he=0,it=rt.length;he=5&&ye.substring(0,5)==="lang-",I&&!(Pe&&typeof Pe[1]=="string")&&(I=!1,ye=w),I||(Ke[qe]=ye)}var f=ot;if(ot+=qe.length,!I)Ve.push(Je+f,ye);else{var p=Pe[1],b=qe.indexOf(p),k=b+p.length;Pe[2]&&(k=qe.length-Pe[2].length,b=k-p.length);var D=ye.substring(5);m(ze,Je+f,qe.substring(0,b),be,Ve),m(ze,Je+f+b,p,J(D,p),Ve),m(ze,Je+f+k,qe.substring(k),be,Ve)}}Ee.decorations=Ve};return be}function Ae(Y){var se=[],ke=[];Y.tripleQuotedStrings?se.push([De,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Y.multiLineStrings?se.push([De,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):se.push([De,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Y.verbatimStrings&&ke.push([De,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Re=Y.hashComments;Re&&(Y.cStyleComments?(Re>1?se.push([xe,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):se.push([xe,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ke.push([De,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):se.push([xe,/^#[^\r\n]*/,null,"#"])),Y.cStyleComments&&(ke.push([xe,/^\/\/[^\r\n]*/,null]),ke.push([xe,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Le=Y.regexLiterals;if(Le){var be=Le>1?"":` \r`,Ee=be?".":"[\\S\\s]",Ue="/(?=[^/*"+be+"])(?:[^/\\x5B\\x5C"+be+"]|\\x5C"+Ee+"|\\x5B(?:[^\\x5C\\x5D"+be+"]|\\x5C"+Ee+")*(?:\\x5D|$))+/";ke.push(["lang-regex",RegExp("^"+E+"("+Ue+")")])}var Je=Y.types;Je&&ke.push([we,Je]);var ze=(""+Y.keywords).replace(/^ | $/g,"");ze.length&&ke.push([Fe,new RegExp("^(?:"+ze.replace(/[\s,]+/g,"|")+")\\b"),null]),se.push([v,/^\s+/,null,` \r \xA0`]);var Ve="^.[^\\s\\w.$@'\"`/\\\\]*";return Y.regexLiterals&&(Ve+="(?!s*/)"),ke.push([fe,/^@[a-z_$][a-z_$@0-9]*/i,null],[we,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[v,/^[a-z_$][a-z_$@0-9]*/i,null],[fe,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[v,/^\\[\s\S]?/,null],[ne,new RegExp(Ve),null]),ue(se,ke)}var de=Ae({keywords:Xe,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ie(Y,se,ke){for(var Re=/(?:^|\s)nocode(?:\s|$)/,Le=/\r\n?|\n/,be=Y.ownerDocument,Ee=be.createElement("li");Y.firstChild;)Ee.appendChild(Y.firstChild);var Ue=[Ee];function Je(he){var it=he.nodeType;if(it==1&&!Re.test(he.className))if(he.nodeName==="br")ze(he),he.parentNode&&he.parentNode.removeChild(he);else for(var qe=he.firstChild;qe;qe=qe.nextSibling)Je(qe);else if((it==3||it==4)&&ke){var ye=he.nodeValue,Pe=ye.match(Le);if(Pe){var I=ye.substring(0,Pe.index);he.nodeValue=I;var A=ye.substring(Pe.index+Pe[0].length);if(A){var O=he.parentNode;O.insertBefore(be.createTextNode(A),he.nextSibling)}ze(he),I||he.parentNode.removeChild(he)}}}function ze(he){for(;!he.nextSibling;)if(he=he.parentNode,!he)return;function it(Pe,I){var A=I?Pe.cloneNode(!1):Pe,O=Pe.parentNode;if(O){var f=it(O,1),p=Pe.nextSibling;f.appendChild(A);for(var b=p;b;b=p)p=b.nextSibling,f.appendChild(b)}return A}for(var qe=it(he.nextSibling,0),ye;(ye=qe.parentNode)&&ye.nodeType===1;)qe=ye;Ue.push(qe)}for(var Ve=0;Ve=O&&(Je+=2),be>=f&&(ot+=2)}}finally{ye&&(ye.style.display=Pe)}}var Z={};function M(Y,se){for(var ke=se.length;--ke>=0;){var Re=se[ke];Z.hasOwnProperty(Re)?W.console&&console.warn("cannot override language handler %s",Re):Z[Re]=Y}}function J(Y,se){return Y&&Z.hasOwnProperty(Y)||(Y=/^\s*]*(?:>|$)/],[xe,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ne,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),M(ue([[v,/^[\s]+/,null,` \r `],[U,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Q,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[q,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ne,/^[=<>\/]+/],["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"]),M(ue([],[[U,/^[\s\S]+/]]),["uq.val"]),M(Ae({keywords:R,hashComments:!0,cStyleComments:!0,types:Ie}),["c","cc","cpp","cxx","cyc","m"]),M(Ae({keywords:"null,true,false"}),["json"]),M(Ae({keywords:te,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Ie}),["cs"]),M(Ae({keywords:ve,cStyleComments:!0}),["java"]),M(Ae({keywords:Oe,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),M(Ae({keywords:le,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),M(Ae({keywords:j,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),M(Ae({keywords:ce,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),M(Ae({keywords:z,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),M(Ae({keywords:F,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),M(ue([],[[De,/^[\s\S]+/]]),["regex"]);function h(Y){var se=Y.langExtension;try{var ke=l(Y.sourceNode,Y.pre),Re=ke.sourceCode;Y.sourceCode=Re,Y.spans=ke.spans,Y.basePos=0,J(se,Re)(Y),G(Y)}catch(Le){W.console&&console.log(Le&&Le.stack||Le)}}function C(Y,se,ke){var Re=ke||!1,Le=se||null,be=document.createElement("div");be.innerHTML="
    "+Y+"
    ",be=be.firstChild,Re&&ie(be,Re,!0);var Ee={langExtension:Le,numberLines:Re,sourceNode:be,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return h(Ee),be.innerHTML}function g(Y,se){var ke=se||document.body,Re=ke.ownerDocument||document;function Le(A){return ke.getElementsByTagName(A)}for(var be=[Le("pre"),Le("code"),Le("xmp")],Ee=[],Ue=0;Ue=15&&(R=!1,P=!0);var De=ce&&(V||R&&(Ie==null||Ie<12.11)),Fe=oe||L&&W>=9;function xe(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var we=function(e,t){var r=e.className,n=xe(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 fe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ne(e,t){return fe(e).appendChild(t)}function v(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)return o+(t-a);o+=s-a,o+=r-o%r,a=s+1}}var _=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};_.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},_.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r=t)return n+Math.min(o,t-i);if(i+=a-n,i+=r-i%r,n=a+1,i>=t)return n}}var M=[""];function J(e){for(;M.length<=e;)M.push(h(M)+" ");return M[e]}function h(e){return e[e.length-1]}function C(e,t){for(var r=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Y.test(e))}function ke(e,t){return t?t.source.indexOf("\\w")>-1&&se(e)?!0:t.test(e):se(e)}function Re(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 be(e){return e.charCodeAt(0)>=768&&Le.test(e)}function Ee(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function Je(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;at||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var ze=null;function Ve(e,t,r){var n;ze=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&r=="before"?n=i:ze=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:ze=i)}return n!=null?n:ze}var ot=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function u(d,y,S){this.level=d,this.from=y,this.to=S}return function(d,y){var S=y=="ltr"?"L":"R";if(d.length==0||y=="ltr"&&!n.test(d))return!1;for(var $=d.length,X=[],me=0;me<$;++me)X.push(r(d.charCodeAt(me)));for(var _e=0,je=S;_e<$;++_e){var Be=X[_e];Be=="m"?X[_e]=je:je=Be}for(var Ge=0,We=S;Ge<$;++Ge){var $e=X[Ge];$e=="1"&&We=="r"?X[Ge]="n":a.test($e)&&(We=$e,$e=="r"&&(X[Ge]="R"))}for(var lt=1,nt=X[0];lt<$-1;++lt){var pt=X[lt];pt=="+"&&nt=="1"&&X[lt+1]=="1"?X[lt]="1":pt==","&&nt==X[lt+1]&&(nt=="1"||nt=="n")&&(X[lt]=nt),nt=pt}for(var At=0;At<$;++At){var zt=X[At];if(zt==",")X[At]="N";else if(zt=="%"){var Lt=void 0;for(Lt=At+1;Lt<$&&X[Lt]=="%";++Lt);for(var ln=At&&X[At-1]=="!"||Lt<$&&X[Lt]=="1"?"1":"N",rn=At;rn-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function ye(e,t){var r=it(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function O(e){e.prototype.on=function(t,r){he(this,t,r)},e.prototype.off=function(t,r){qe(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function p(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function b(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function k(e){f(e),p(e)}function D(e){return e.target||e.srcElement}function ae(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ce&&e.ctrlKey&&t==1&&(t=3),t}var Te=function(){if(L&&W<9)return!1;var e=v("div");return"draggable"in e||"dragDrop"in e}(),He;function tt(e){if(He==null){var t=v("span","\u200B");ne(e,v("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(He=t.offsetWidth<=1&&t.offsetHeight>2&&!(L&&W<8))}var r=He?v("span","\u200B"):v("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var et;function kt(e){if(et!=null)return et;var t=ne(e,document.createTextNode("A\u062EA")),r=H(t,0,1).getBoundingClientRect(),n=H(t,1,2).getBoundingClientRect();return fe(e),!r||r.left==r.right?!1:et=n.right-r.right<3}var ht=` 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/)},st=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},Tt=function(){var e=v("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),bt=null;function Ut(e){if(bt!=null)return bt;var t=ne(e,v("span","x")),r=t.getBoundingClientRect(),n=H(t,0,1).getBoundingClientRect();return bt=Math.abs(r.left-n.left)>1}var jt={},yt={};function Tn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),jt[e]=t}function Mn(e,t){yt[e]=t}function un(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=pe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return un("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return un("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gn(e,t){t=un(t);var r=jt[t.name];if(!r)return gn(e,"text/plain");var n=r(e,t);if(hn.hasOwnProperty(t.name)){var i=hn[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 hn={};function ia(e,t){var r=hn.hasOwnProperty(e)?hn[e]:hn[e]={};l(t,r)}function _n(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 zr(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 Hr(e,t,r){return e.startState?e.startState(t,r):!0}var Rt=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};Rt.prototype.eol=function(){return this.pos>=this.string.length},Rt.prototype.sol=function(){return this.pos==this.lineStart},Rt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Rt.prototype.next=function(){if(this.post},Rt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Rt.prototype.skipToEnd=function(){this.pos=this.string.length},Rt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Rt.prototype.backUp=function(e){this.pos-=e},Rt.prototype.column=function(){return this.lastColumnPos0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},Rt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Rt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Rt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Rt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ze(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t=e.first&&tr?Me(r,Ze(e,r).text.length):Ti(t,Ze(e,t.line).text.length)}function Ti(e,t){var r=e.ch;return r==null||r>t?Me(e.line,t):r<0?Me(e.line,0):e}function Ne(e,t){for(var r=[],n=0;nthis.maxLookAhead&&(this.maxLookAhead=e),t},pn.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}},pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pn.fromSaved=function(e,t,r){return t instanceof yr?new pn(e,_n(e.mode,t.state),r,t.lookAhead):new pn(e,_n(e.mode,t),r)},pn.prototype.save=function(e){var t=e!==!1?_n(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yr(t,this.maxLookAhead):t};function Gr(e,t,r,n){var i=[e.state.modeGen],a={};xn(e,t.text,e.doc.mode,r,function(d,y){return i.push(d,y)},a,n);for(var o=r.state,s=function(d){r.baseTokens=i;var y=e.state.overlays[d],S=1,$=0;r.state=!0,xn(e,t.text,y.mode,r,function(X,me){for(var _e=S;$X&&i.splice(S,1,X,i[S+1],je),S+=2,$=Math.min(X,je)}if(!me)return;if(y.opaque)i.splice(_e,S-_e,X,"overlay "+me),S=_e+2;else for(;_ee.options.maxHighlightLength&&_n(e.doc.mode,n.state),a=Gr(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 bn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new pn(n,!0,t);var a=Ai(e,t,r),o=a>n.first&&Ze(n,a-1).stateAfter,s=o?pn.fromSaved(n,o,a):new pn(n,Hr(n.mode),a);return n.iter(a,t,function(u){Kr(e,u.text,s);var d=s.line;u.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&dt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var $r=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function _i(e,t,r,n){var i=e.doc,a=i.mode,o;t=dt(i,t);var s=Ze(i,t.line),u=bn(e,t.line,r),d=new Rt(s.text,e.options.tabSize,u),y;for(n&&(y=[]);(n||d.pose.options.maxHighlightLength?(s=!1,o&&Kr(e,t,n,y.pos),y.pos=t.length,S=null):S=Yr(yn(r,y,n.state,$),a),$){var X=$[0].name;X&&(S="m-"+(S?X+" "+S:X))}if(!s||d!=S){for(;uo;--s){if(s<=a.first)return a.first;var u=Ze(a,s-1),d=u.stateAfter;if(d&&(!r||s+(d instanceof yr?d.lookAhead:0)<=a.modeFrontier))return s;var y=m(u.text,null,e.options.tabSize);(i==null||n>y)&&(i=s-1,n=y)}return i}function aa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontierr;n--){var i=Ze(e,n).stateAfter;if(i&&(!(i instanceof yr)||n+i.lookAhead=t:a.to>t);(n||(n=[])).push(new er(o,a.from,u?null:a.to))}}return n}function Li(e,t,r){var n;if(e)for(var i=0;i=t:a.to>t);if(s||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from0&&s)for(var $e=0;$e0)continue;var y=[u,1],S=ut(d.from,s.from),$=ut(d.to,s.to);(S<0||!o.inclusiveLeft&&!S)&&y.push({from:d.from,to:s.from}),($>0||!o.inclusiveRight&&!$)&&y.push({from:s.to,to:d.to}),i.splice.apply(i,y),u+=y.length-3}return i}function la(e){var t=e.markedSpans;if(!t)return;for(var r=0;rt)&&(!n||Er(n,a.marker)<0)&&(n=a.marker)}return n}function Di(e,t,r,n,i){var a=Ze(e,t),o=Yt&&a.markedSpans;if(o)for(var s=0;s=0&&S<=0||y<=0&&S>=0)continue;if(y<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.to,r)>=0:ut(d.to,r)>0)||y>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.from,n)<=0:ut(d.from,n)<0))return!0}}function cn(e){for(var t;t=jn(e);)e=t.find(-1,!0).line;return e}function Pi(e){for(var t;t=In(e);)e=t.find(1,!0).line;return e}function kr(e){for(var t,r;t=In(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Zr(e,t){var r=Ze(e,t),n=cn(r);return r==n?t:wt(n)}function Hn(e,t){if(t>e.lastLine())return t;var r=Ze(e,t),n;if(!An(e,r))return t;for(;n=In(r);)r=n.find(1,!0).line;return wt(r)+1}function An(e,t){var r=Yt&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var rr=function(e,t,r){this.text=e,wr(this,t),this.height=r?r(this):1};rr.prototype.lineNo=function(){return wt(this)},O(rr);function ua(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),la(e),wr(e,r);var i=n?n(e):1;i!=e.height&&Zt(e,i)}function Qe(e){e.parent=null,la(e)}var ct={},at={};function mt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?at:ct;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function xt(e,t){var r=Q("span",null,null,P?"padding-right: .1px":null),n={pre:Q("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=vt,kt(e.display.measure)&&(o=rt(a,e.doc.direction))&&(n.addToken=Qt(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&wt(a);Fn(a,n,Qn(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=T(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=T(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(tt(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(P){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 ye(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=T(n.pre.className,n.textClass||"")),n}function _t(e){var t=v("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vt(e,t,r,n,i,a,o){if(!t)return;var s=e.splitSpaces?It(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,y;if(!u.test(t))e.col+=t.length,y=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,y),L&&W<9&&(d=!0),e.pos+=t.length;else{y=document.createDocumentFragment();for(var S=0;;){u.lastIndex=S;var $=u.exec(t),X=$?$.index-S:t.length-S;if(X){var me=document.createTextNode(s.slice(S,S+X));L&&W<9?y.appendChild(v("span",[me])):y.appendChild(me),e.map.push(e.pos,e.pos+X,me),e.col+=X,e.pos+=X}if(!$)break;S+=X+1;var _e=void 0;if($[0]==" "){var je=e.cm.options.tabSize,Be=je-e.col%je;_e=y.appendChild(v("span",J(Be),"cm-tab")),_e.setAttribute("role","presentation"),_e.setAttribute("cm-text"," "),e.col+=Be}else $[0]=="\r"||$[0]==` `?(_e=y.appendChild(v("span",$[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),_e.setAttribute("cm-text",$[0]),e.col+=1):(_e=e.cm.options.specialCharPlaceholder($[0]),_e.setAttribute("cm-text",$[0]),L&&W<9?y.appendChild(v("span",[_e])):y.appendChild(_e),e.col+=1);e.map.push(e.pos,e.pos+1,_e),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var Ge=r||"";n&&(Ge+=n),i&&(Ge+=i);var We=v("span",[y],Ge,a);if(o)for(var $e in o)o.hasOwnProperty($e)&&$e!="style"&&$e!="class"&&We.setAttribute($e,o[$e]);return e.content.appendChild(We)}e.content.appendChild(y)}function It(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;id&&S.from<=d);$++);if(S.to>=y)return e(r,n,i,a,o,s,u);e(r,n.slice(0,S.to-d),i,a,null,s,u),a=null,n=n.slice(S.to-d),d=S.to}}}function gt(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 Fn(e,t,r){var n=e.markedSpans,i=e.text,a=0;if(!n){for(var o=1;ou||pt.collapsed&&nt.to==u&&nt.from==u)){if(nt.to!=null&&nt.to!=u&&X>nt.to&&(X=nt.to,_e=""),pt.className&&(me+=" "+pt.className),pt.css&&($=($?$+";":"")+pt.css),pt.startStyle&&nt.from==u&&(je+=" "+pt.startStyle),pt.endStyle&&nt.to==X&&($e||($e=[])).push(pt.endStyle,nt.to),pt.title&&((Ge||(Ge={})).title=pt.title),pt.attributes)for(var At in pt.attributes)(Ge||(Ge={}))[At]=pt.attributes[At];pt.collapsed&&(!Be||Er(Be.marker,pt)<0)&&(Be=nt)}else nt.from>u&&X>nt.from&&(X=nt.from)}if($e)for(var zt=0;zt<$e.length;zt+=2)$e[zt+1]==X&&(_e+=" "+$e[zt]);if(!Be||Be.from==u)for(var Lt=0;Lt=s)break;for(var ln=Math.min(s,X);;){if(y){var rn=u+y.length;if(!Be){var Pt=rn>ln?y.slice(0,ln-u):y;t.addToken(t,Pt,S?S+me:me,je,u+Pt.length==X?_e:"",$,Ge)}if(rn>=ln){y=y.slice(ln-u),u=ln;break}u=rn,je=""}y=i.slice(a,a=r[d++]),S=mt(r[d++],t.cm.options)}}}function Et(e,t,r){this.line=t,this.rest=kr(t),this.size=this.rest?wt(h(this.rest))-r+1:1,this.node=this.text=null,this.hidden=An(e,t)}function en(e,t,r){for(var n=[],i,a=t;a2&&a.push((u.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function eo(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Us(e,t){t=cn(t);var r=wt(t),n=e.display.externalMeasured=new Et(e.doc,t,r);n.lineN=r;var i=n.built=xt(e,n);return n.text=i.pre,ne(e.display.lineMeasure,i.pre),n}function to(e,t,r,n){return Ln(e,Sr(e,t),r,n)}function ha(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(a=u-s,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[d+2],s==u&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[(d-=3)+2],o="left";if(r=="right"&&i==u-s)for(;d=0&&!((r=e[i]).left!=r.right);i--);return r}function Ws(e,t,r,n){var i=ro(t.map,r,n),a=i.node,o=i.start,s=i.end,u=i.collapse,d;if(a.nodeType==3){for(var y=0;y<4;y++){for(;o&&be(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s0&&(u=n="right");var S;e.options.lineWrapping&&(S=a.getClientRects()).length>1?d=S[n=="right"?S.length-1:0]:d=a.getBoundingClientRect()}if(L&&W<9&&!o&&(!d||!d.left&&!d.right)){var $=a.parentNode.getClientRects()[0];$?d={left:$.left,right:$.left+_r(e.display),top:$.top,bottom:$.bottom}:d=no}for(var X=d.top-t.rect.top,me=d.bottom-t.rect.top,_e=(X+me)/2,je=t.view.measure.heights,Be=0;Be=n.text.length?(u=n.text.length,d="before"):u<=0&&(u=0,d="after"),!s)return o(d=="before"?u-1:u,d=="before");function y(me,_e,je){var Be=s[_e],Ge=Be.level==1;return o(je?me-1:me,Ge!=je)}var S=Ve(s,u,d),$=ze,X=y(u,S,d=="before");return $!=null&&(X.other=y(u,$,d!="before")),X}function uo(e,t){var r=0;t=dt(e.doc,t),e.options.lineWrapping||(r=_r(e.display)*t.ch);var n=Ze(e.doc,t.line),i=En(n)+ji(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function ga(e,t,r,n,i){var a=Me(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function va(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return ga(n.first,0,null,-1,-1);var i=vn(n,r),a=n.first+n.size-1;if(i>a)return ga(n.first+n.size-1,Ze(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ze(n,i);;){var s=Hs(e,o,i,t,r),u=Cr(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var d=u.find(1);if(d.line==i)return d;o=Ze(n,i=d.line)}}function co(e,t,r,n){n-=pa(t);var i=t.text.length,a=Ue(function(o){return Ln(e,r,o-1).bottom<=n},i,0);return i=Ue(function(o){return Ln(e,r,o).top>n},a,i),{begin:a,end:i}}function fo(e,t,r,n){r||(r=Sr(e,t));var i=Ii(e,t,Ln(e,r,n),"line").top;return co(e,t,r,i)}function ba(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Hs(e,t,r,n,i){i-=En(t);var a=Sr(e,t),o=pa(t),s=0,u=t.text.length,d=!0,y=rt(t,e.doc.direction);if(y){var S=(e.options.lineWrapping?Gs:Xs)(e,t,r,a,y,n,i);d=S.level!=1,s=d?S.from:S.to-1,u=d?S.to:S.from-1}var $=null,X=null,me=Ue(function(lt){var nt=Ln(e,a,lt);return nt.top+=o,nt.bottom+=o,ba(nt,n,i,!1)?(nt.top<=i&&nt.left<=n&&($=lt,X=nt),!0):!1},s,u),_e,je,Be=!1;if(X){var Ge=n-X.left=$e.bottom?1:0}return me=Ee(t.text,me,1),ga(r,me,je,Be,n-_e)}function Xs(e,t,r,n,i,a,o){var s=Ue(function(S){var $=i[S],X=$.level!=1;return ba(Cn(e,Me(r,X?$.to:$.from,X?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[s];if(s>0){var d=u.level!=1,y=Cn(e,Me(r,d?u.from:u.to,d?"after":"before"),"line",t,n);ba(y,a,o,!0)&&y.top>o&&(u=i[s-1])}return u}function Gs(e,t,r,n,i,a,o){var s=co(e,t,n,o),u=s.begin,d=s.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var y=null,S=null,$=0;$=d||X.to<=u)continue;var me=X.level!=1,_e=Ln(e,n,me?Math.min(d,X.to)-1:Math.max(u,X.from)).right,je=_eje)&&(y=X,S=je)}return y||(y=i[i.length-1]),y.fromd&&(y={from:y.from,to:d,level:y.level}),y}var ar;function Tr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ar==null){ar=v("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ar.appendChild(document.createTextNode("x")),ar.appendChild(v("br"));ar.appendChild(document.createTextNode("x"))}ne(e.measure,ar);var r=ar.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),fe(e.measure),r||1}function _r(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=v("span","xxxxxxxxxx"),r=v("pre",[t],"CodeMirror-line-like");ne(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ya(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;r[s]=a.offsetLeft+a.clientLeft+i,n[s]=a.clientWidth}return{fixedPos:xa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ho(e){var t=Tr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/_r(e.display)-3);return function(i){if(An(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(d=Ze(e.doc,u.line).text).length==u.ch){var y=m(d,d.length,e.options.tabSize)-d.length;u=Me(u.line,Math.max(0,Math.round((a-Qa(e.display).left)/_r(e.display))-y))}return u}function sr(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;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Yt&&Zr(e.doc,t)i.viewFrom?Gn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Gn(e);else if(t<=i.viewFrom){var a=Fi(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Gn(e)}else if(r>=i.viewTo){var o=Fi(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Gn(e)}else{var s=Fi(e,t,t,-1),u=Fi(e,r,r+n,1);s&&u?(i.view=i.view.slice(0,s.index).concat(en(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):Gn(e)}var d=i.externalMeasured;d&&(r=i.lineN&&t=n.viewTo)return;var a=n.view[sr(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);B(o,r)==-1&&o.push(r)}function Gn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fi(e,t,r,n){var i=sr(e,t),a,o=e.display.view;if(!Yt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=e.display.viewFrom,u=0;u0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,r+=a}for(;Zr(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=en(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=en(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,sr(e,r)))),n.viewTo=r}function po(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Ar(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function vo(e){e.state.focused||(e.display.input.focus(),Ca(e))}function bo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ar(e))},100)}function Ca(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,U(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),P&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ea(e)}function Ar(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,we(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Bi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||y<-.005)&&(Zt(i.line,o),yo(i.line),i.rest))for(var S=0;Se.display.sizerWidth){var $=Math.ceil(s/_r(e.display));$>e.display.maxLineLength&&(e.display.maxLineLength=$,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function yo(e){if(e.widgets)for(var t=0;t=o&&(a=vn(t,En(Ze(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function $s(e,t){if(Pe(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!F){var a=v("div","\u200B",null,`position: absolute; top: `+(t.top-r.viewOffset-ji(e.display))+`px; height: `+(t.bottom-t.top+On(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?Me(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Me(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=Cn(e,t),u=!r||r==t?s:Cn(e,r);i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-n,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+n};var d=ka(e,i),y=e.doc.scrollTop,S=e.doc.scrollLeft;if(d.scrollTop!=null&&(si(e,d.scrollTop),Math.abs(e.doc.scrollTop-y)>1&&(o=!0)),d.scrollLeft!=null&&(lr(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-S)>1&&(o=!0)),!o)break}return i}function Js(e,t){var r=ka(e,t);r.scrollTop!=null&&si(e,r.scrollTop),r.scrollLeft!=null&&lr(e,r.scrollLeft)}function ka(e,t){var r=e.display,n=Tr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=fa(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+da(r),u=t.tops-n;if(t.topi+a){var y=Math.min(t.top,(d?s:t.bottom)-a);y!=i&&(o.scrollTop=y)}var S=e.options.fixedGutter?0:r.gutters.offsetWidth,$=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-S,X=ir(e)-r.gutters.offsetWidth,me=t.right-t.left>X;return me&&(t.right=t.left+X),t.left<10?o.scrollLeft=0:t.left<$?o.scrollLeft=Math.max(0,t.left+S-(me?0:10)):t.right>X+$-3&&(o.scrollLeft=t.right+(me?0:10)-X),o}function Sa(e,t){if(t==null)return;zi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Or(e){zi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function oi(e,t,r){(t!=null||r!=null)&&zi(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function qs(e,t){zi(e),e.curOp.scrollToPos=t}function zi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=uo(e,t.from),n=uo(e,t.to);xo(e,r,n,t.margin)}}function xo(e,t,r,n){var i=ka(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});oi(e,i.scrollLeft,i.scrollTop)}function si(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;oe||_a(e,{top:t}),wo(e,t,!0),oe&&_a(e),ci(e,100)}function wo(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 lr(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,To(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function li(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+da(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+On(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var ur=function(e,t,r){this.cm=r;var n=this.vert=v("div",[v("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=v("div",[v("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),he(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),he(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,L&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ur.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}},ur.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ur.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ur.prototype.zeroWidthHack=function(){var e=ce&&!te?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new _,this.disableVert=new _},ur.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)},ur.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ui=function(){};ui.prototype.update=function(){return{bottom:0,right:0}},ui.prototype.setScrollLeft=function(){},ui.prototype.setScrollTop=function(){},ui.prototype.clear=function(){};function Lr(e,t){t||(t=li(e));var r=e.display.barWidth,n=e.display.barHeight;Eo(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Bi(e),Eo(e,li(e)),r=e.display.barWidth,n=e.display.barHeight}function Eo(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 Co={native:ur,null:ui};function ko(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&we(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Co[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(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"?lr(e,t):si(e,t)},e),e.display.scrollbars.addClass&&U(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},mn(e.curOp)}function dr(e){var t=e.curOp;t&&Rs(t,function(r){for(var n=0;n=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Hi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ta(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Bi(t),e.barMeasure=li(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=to(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+On(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-ir(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=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=bn(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?_n(t.mode,n.state):null,u=Gr(e,a,n,!0);s&&(n.state=s),a.styles=u.styles;var d=a.styleClasses,y=u.classes;y?a.styleClasses=y:d&&(a.styleClasses=null);for(var S=!o||o.length!=a.styles.length||d!=y&&(!d||!y||d.bgClass!=y.bgClass||d.textClass!=y.textClass),$=0;!S&&$r)return ci(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&sn(e,function(){for(var a=0;a=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&po(e)==0)return!1;_o(e)&&(Gn(e),t.dims=ya(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.viewFromo&&r.viewTo-o<20&&(o=Math.min(i,r.viewTo)),Yt&&(a=Zr(e.doc,a),o=Hn(e.doc,o));var s=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ks(e,a,o),r.viewOffset=En(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=po(e);if(!s&&u==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var d=sl(e);return u>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(d),fe(r.cursorDiv),fe(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ci(e,400)),r.updateLineNumbers=null,!0}function So(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==ir(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+da(e.display)-fa(e),r.top)}),t.visible=Wi(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Wi(e.display,e.doc,r));if(!Ta(e,t))break;Bi(e);var i=li(e);ai(e),Lr(e,i),Oa(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 _a(e,t){var r=new Hi(e,t);if(Ta(e,r)){Bi(e),So(e,r);var n=li(e);ai(e),Lr(e,n),Oa(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(me){var _e=me.nextSibling;return P&&ce&&e.display.currentWheelTarget==me?me.style.display="none":me.parentNode.removeChild(me),_e}for(var u=n.view,d=n.viewFrom,y=0;y-1&&(X=!1),$a(e,S,d,r)),X&&(fe(S.lineNumber),S.lineNumber.appendChild(document.createTextNode(mr(e.options,d)))),o=S.node.nextSibling}d+=S.size}for(;o;)o=s(o)}function Aa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Oa(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+On(e)+"px"}function To(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=xa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;oo.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&s||i&&u))return;if(i&&ce&&P){e:for(var d=t.target,y=a.view;d!=o;d=d.parentNode)for(var S=0;S=0&&ut(e,n.to())<=0)return r}return-1};var Ct=function(e,t){this.anchor=e,this.head=t};Ct.prototype.from=function(){return Zn(this.anchor,this.head)},Ct.prototype.to=function(){return vr(this.anchor,this.head)},Ct.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function kn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function($,X){return ut($.from(),X.from())}),r=B(t,i);for(var a=1;a0:u>=0){var d=Zn(s.from(),o.from()),y=vr(s.to(),o.to()),S=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new Ct(S?y:d,S?d:y))}}return new fn(t,r)}function Kn(e,t){return new fn([new Ct(e,t||e)],0)}function Vn(e){return e.text?Me(e.from.line+e.text.length-1,h(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ro(e,t){if(ut(e,t.from)<0)return e;if(ut(e,t.to)<=0)return Vn(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+=Vn(t).ch-t.to.ch),Me(r,n)}function Ra(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,me-1),e.insert(s.line+1,Be)}Xt(e,"change",e,t)}function $n(e,t,r){function n(i,a,o){if(i.linked)for(var s=0;s1&&!e.done[e.done.length-2].ranges)return e.done.pop(),h(e.done)}function Io(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,s;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))s=h(o.changes),ut(t.from,t.to)==0&&ut(t.from,s.to)==0?s.to=Vn(t):o.changes.push(Pa(e,t));else{var u=h(i.done);for((!u||!u.ranges)&&Ki(e.sel,i.done),o={changes:[Pa(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,s||ye(e,"historyAdded")}function ml(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ml(e,a,h(i.done),t))?i.done[i.done.length-1]=t:Ki(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&jo(i.undone)}function Ki(e,t){var r=h(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Fo(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-1&&(h(s)[S]=d[S],delete d[S]))}}return n}function Na(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ut(t,i)<0;a!=ut(r,i)<0?(i=t,t=r):a!=ut(t,r)<0&&(t=r)}return new Ct(i,t)}else return new Ct(r||t,t)}function Vi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Vt(e,new fn([Na(e.sel.primary(),t,r,i)],0),n)}function Bo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:s.to>t.ch))){if(i&&(ye(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(r){var S=u.find(n<0?1:-1),$=void 0;if((n<0?y:d)&&(S=Ko(e,S,-n,S&&S.line==t.line?a:null)),S&&S.line==t.line&&($=ut(S,r))&&(n<0?$<0:$>0))return Mr(e,S,t,n,i)}var X=u.find(n<0?-1:1);return(n<0?d:y)&&(X=Ko(e,X,n,X.line==t.line?a:null)),X?Mr(e,X,t,n,i):null}}return t}function Yi(e,t,r,n,i){var a=n||1,o=Mr(e,t,r,a,i)||!i&&Mr(e,t,r,a,!0)||Mr(e,t,r,-a,i)||!i&&Mr(e,t,r,-a,!0);return o||(e.cantEdit=!0,Me(e.first,0))}function Ko(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?dt(e,Me(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line=0;--i)Yo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Yo(e,t)}function Yo(e,t){if(t.text.length==1&&t.text[0]==""&&ut(t.from,t.to)==0)return;var r=Ra(e,t);Io(e,t,r,e.cm?e.cm.curOp.id:NaN),hi(e,t,r,xr(e,t));var n=[];$n(e,function(i,a){!a&&B(n,i.history)==-1&&(Qo(i.history,t),n.push(i.history)),hi(i,t,null,xr(i,t))})}function Ji(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,s=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,d=0;d=0;--X){var me=$(X);if(me)return me.v}}function Jo(e,t){if(t==0)return;if(e.first+=t,e.sel=new fn(C(e.sel.ranges,function(i){return new Ct(Me(i.anchor.line+t,i.anchor.ch),Me(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){tn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())return;if(t.from.linea&&(t={from:t.from,to:Me(a,Ze(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Dn(e,t.from,t.to),r||(r=Ra(e,t)),e.cm?xl(e.cm,t,n):Da(e,t,n),$i(e,r,de),e.cantEdit&&Yi(e,Me(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,s=!1,u=a.line;e.options.lineWrapping||(u=wt(cn(Ze(n,a.line))),n.iter(u,o.line+1,function(X){if(X==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&I(e),Da(n,t,r,ho(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(X){var me=ei(X);me>i.maxLineLength&&(i.maxLine=X,i.maxLineLength=me,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),aa(n,a.line),ci(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?tn(e):a.line==o.line&&t.text.length==1&&!Do(e.doc,t)?Xn(e,a.line,"text"):tn(e,a.line,o.line+1,d);var y=A(e,"changes"),S=A(e,"change");if(S||y){var $={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};S&&Xt(e,"change",e,$),y&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push($)}e.display.selForContextMenu=null}function Pr(e,t,r,n,i){var a;n||(n=r),ut(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Dr(e,{from:r,to:n,text:t,origin:i})}function qo(e,t,r,n){r1||!(this.children[0]instanceof mi))){var s=[];this.collapse(s),this.children=[new mi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,s=o;s10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;ne.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=y,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&tn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xo(e.doc)),e&&Xt(e,"markerCleared",e,this,n,i),t&&dr(e),this.parent&&this.parent.clear()},Yn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=Q("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Di(e,t.line,t,r,a)||t.line!=r.line&&Di(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");oa()}a.addToHistory&&Io(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,u=e.cm,d;if(e.iter(s,r.line+1,function(S){u&&a.collapsed&&!u.options.lineWrapping&&cn(S)==u.display.maxLine&&(d=!0),a.collapsed&&s!=t.line&&Zt(S,0),sa(S,new er(a,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),a.collapsed&&e.iter(t.line,r.line+1,function(S){An(e,S)&&Zt(S,0)}),a.clearOnEnter&&he(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(zn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ts,a.atomic=!0),u){if(d&&(u.curOp.updateMaxLine=!0),a.collapsed)tn(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var y=t.line;y<=r.line;y++)Xn(u,y,"text");a.atomic&&Xo(u.doc),Xt(u,"markerAdded",u,a)}return a}var bi=function(e,t){this.markers=e,this.primary=t;for(var r=0;r=0;u--)Dr(this,n[u]);s?zo(this,s):this.cm&&Or(this.cm)}),undo:Wt(function(){Ji(this,"undo")}),redo:Wt(function(){Ji(this,"redo")}),undoSelection:Wt(function(){Ji(this,"undo",!0)}),redoSelection:Wt(function(){Ji(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.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=dt(this,e),t=dt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s=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;ne)return t=e,!0;e-=a,++r}),dt(this,Me(r,t))},indexFromPos:function(e){e=dt(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var y=e.dataTransfer.getData("Text");if(y){var S;if(t.state.draggingText&&!t.state.draggingText.copy&&(S=t.listSelections()),$i(t.doc,Kn(r,r)),S)for(var $=0;$=0;s--)Pr(e.doc,"",n[s].from,n[s].to,"+delete");Or(e)})}function Ia(e,t,r){var n=Ee(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Fa(e,t,r){var n=Ia(e,t.ch,r);return n==null?null:new Me(t.line,n,r<0?"after":"before")}function Ua(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?h(a):a[0],s=i<0==(o.level==1),u=s?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var y=Sr(t,r);d=i<0?r.text.length-1:0;var S=Ln(t,y,d).top;d=Ue(function($){return Ln(t,y,$).top==S},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=Ia(r,d,1))}else d=i<0?o.to:o.from;return new Me(n,d,u)}}return new Me(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 Fa(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=Ve(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=o.from&&$>=y.begin)){var X=S?"before":"after";return new Me(r.line,$,X)}}var me=function(Be,Ge,We){for(var $e=function(At,zt){return zt?new Me(r.line,s(At,1),"before"):new Me(r.line,At,"after")};Be>=0&&Be0==(lt.level!=1),pt=nt?We.begin:s(We.end,-1);if(lt.from<=pt&&pt0?y.end:s(y.begin,-1);return je!=null&&!(n>0&&je==t.text.length)&&(_e=me(n>0?0:i.length-1,n,d(je)),_e)?_e:null}var wi={selectAll:Vo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),de)},killLine:function(e){return Ir(e,function(t){if(t.empty()){var r=Ze(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new Me(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Me(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ze(e.doc,i.line-1).text;o&&(i=new Me(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Me(i.line-1,o.length-1),i,"+transpose"))}}r.push(new Ct(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return sn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;ne&&ut(t,this.pos)==0&&r==this.button};var Ci,ki;function Wl(e,t){var r=+new Date;return ki&&ki.compare(r,e,t)?(Ci=ki=null,"triple"):Ci&&Ci.compare(r,e,t)?(ki=new Wa(r,e,t),Ci=null,"double"):(Ci=new Wa(r,e,t),ki=null,"single")}function vs(e){var t=this,r=t.display;if(Pe(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Un(r,e)){P||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(za(t,e))return;var n=or(t,e),i=ae(e),a=n?Wl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,i,n,a,e))return;i==1?n?Xl(t,n,a,e):D(e)==r.scroller&&f(e):i==2?(n&&Vi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(Fe?t.display.input.onContextMenu(e):bo(t))}function zl(e,t,r,n,i){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Ei(e,ls(a,i),i,function(o){if(typeof o=="string"&&(o=wi[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=Ae}finally{e.state.suppressEdits=!1}return s})}function Hl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=Oe?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=ce?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ce?r.altKey:r.ctrlKey)),i}function Xl(e,t,r,n){L?setTimeout(c(vo,e),0):e.curOp.focus=q();var i=Hl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Te&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ut((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ut(o.to(),t)>0||t.xRel<0)?Gl(e,n,t,i):Kl(e,n,t,i)}function Gl(e,t,r,n){var i=e.display,a=!1,o=Bt(e,function(d){P&&(i.scroller.draggable=!1),e.state.draggingText=!1,qe(i.wrapper.ownerDocument,"mouseup",o),qe(i.wrapper.ownerDocument,"mousemove",s),qe(i.scroller,"dragstart",u),qe(i.scroller,"drop",o),a||(f(d),n.addNew||Vi(e.doc,r,null,null,n.extend),P&&!ve||L&&W==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},u=function(){return a=!0};P&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),he(i.wrapper.ownerDocument,"mouseup",o),he(i.wrapper.ownerDocument,"mousemove",s),he(i.scroller,"dragstart",u),he(i.scroller,"drop",o),bo(e),setTimeout(function(){return i.input.focus()},20)}function bs(e,t,r){if(r=="char")return new Ct(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Ct(Me(t.line,0),dt(e.doc,Me(t.line+1,0)));var n=r(e,t);return new Ct(n.from,n.to)}function Kl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,s,u=a.sel,d=u.ranges;if(n.addNew&&!n.extend?(s=a.sel.contains(r),s>-1?o=d[s]:o=new Ct(r,r)):(o=a.sel.primary(),s=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new Ct(r,r)),r=or(e,t,!0,!0),s=-1;else{var y=bs(e,r,n.unit);n.extend?o=Na(o,y.anchor,y.head,n.extend):o=y}n.addNew?s==-1?(s=d.length,Vt(a,kn(e,d.concat([o]),s),{scroll:!1,origin:"*mouse"})):d.length>1&&d[s].empty()&&n.unit=="char"&&!n.extend?(Vt(a,kn(e,d.slice(0,s).concat(d.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):ja(a,s,o,ie):(s=0,Vt(a,new fn([o],0),ie),u=a.sel);var S=r;function $(We){if(ut(S,We)==0)return;if(S=We,n.unit=="rectangle"){for(var $e=[],lt=e.options.tabSize,nt=m(Ze(a,r.line).text,r.ch,lt),pt=m(Ze(a,We.line).text,We.ch,lt),At=Math.min(nt,pt),zt=Math.max(nt,pt),Lt=Math.min(r.line,We.line),ln=Math.min(e.lastLine(),Math.max(r.line,We.line));Lt<=ln;Lt++){var rn=Ze(a,Lt).text,Pt=Z(rn,At,lt);At==zt?$e.push(new Ct(Me(Lt,Pt),Me(Lt,Pt))):rn.length>Pt&&$e.push(new Ct(Me(Lt,Pt),Me(Lt,Z(rn,zt,lt))))}$e.length||$e.push(new Ct(r,r)),Vt(a,kn(e,u.ranges.slice(0,s).concat($e),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(We)}else{var an=o,Gt=bs(e,We,n.unit),Ft=an.anchor,Nt;ut(Gt.anchor,Ft)>0?(Nt=Gt.head,Ft=Zn(an.from(),Gt.anchor)):(Nt=Gt.anchor,Ft=vr(an.to(),Gt.head));var Mt=u.ranges.slice(0);Mt[s]=Vl(e,new Ct(dt(a,Ft),Nt)),Vt(a,kn(e,Mt,s),ie)}}var X=i.wrapper.getBoundingClientRect(),me=0;function _e(We){var $e=++me,lt=or(e,We,!0,n.unit=="rectangle");if(!lt)return;if(ut(lt,S)!=0){e.curOp.focus=q(),$(lt);var nt=Wi(i,a);(lt.line>=nt.to||lt.lineX.bottom?20:0;pt&&setTimeout(Bt(e,function(){if(me!=$e)return;i.scroller.scrollTop+=pt,_e(We)}),50)}}function je(We){e.state.selectingText=!1,me=Infinity,We&&(f(We),i.input.focus()),qe(i.wrapper.ownerDocument,"mousemove",Be),qe(i.wrapper.ownerDocument,"mouseup",Ge),a.history.lastSelOrigin=null}var Be=Bt(e,function(We){We.buttons===0||!ae(We)?je(We):_e(We)}),Ge=Bt(e,je);e.state.selectingText=Ge,he(i.wrapper.ownerDocument,"mousemove",Be),he(i.wrapper.ownerDocument,"mouseup",Ge)}function Vl(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(ut(r,n)==0&&r.sticky==n.sticky)return t;var a=rt(i);if(!a)return t;var o=Ve(a,r.ch,r.sticky),s=a[o];if(s.from!=r.ch&&s.to!=r.ch)return t;var u=o+(s.from==r.ch==(s.level!=1)?0:1);if(u==0||u==a.length)return t;var d;if(n.line!=r.line)d=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var y=Ve(a,n.ch,n.sticky),S=y-o||(n.ch-r.ch)*(s.level==1?-1:1);y==u-1||y==u?d=S<0:d=S>0}var $=a[u+(d?-1:0)],X=d==($.level==1),me=X?$.from:$.to,_e=X?"after":"before";return r.ch==me&&r.sticky==_e?t:new Ct(new Me(r.line,me,_e),n)}function ys(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($){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!A(e,r))return b(t);a-=s.top-o.viewOffset;for(var u=0;u=i){var y=vn(e.doc,a),S=e.display.gutterSpecs[u];return ye(e,r,e,y,S.className,t),b(t)}}}function za(e,t){return ys(e,t,"gutterClick",!0)}function xs(e,t){if(Un(e.display,t)||$l(e,t))return;if(Pe(e,t,"contextmenu"))return;Fe||e.display.input.onContextMenu(t)}function $l(e,t){return A(e,"gutterContextMenu")?ys(e,t,"gutterContextMenu",!1):!1}function ws(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ii(e)}var Fr={toString:function(){return"CodeMirror.Init"}},Es={},ea={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(s,u,d){d!=Fr&&a(s,u,d)}:a)}e.defineOption=r,e.Init=Fr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Ma(n)},!0),r("indentUnit",2,Ma,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){fi(n),ii(n),tn(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 y=u.text.indexOf(i,d);if(y==-1)break;d=y+i.length,a.push(Me(o,y))}o++});for(var s=a.length-1;s>=0;s--)Pr(n.doc,i,a[s],Me(a[s].line,a[s].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Fr&&n.refresh()}),r("specialCharPlaceholder",_t,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",le?"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",!Xe),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ws(n),di(n)},!0),r("keyMap","default",function(n,i,a){var o=Zi(i),s=a!=Fr&&Zi(a);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,ql,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=La(i,n.options.lineNumbers),di(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?xa(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Lr(n)},!0),r("scrollbarStyle","native",function(n){ko(n),Lr(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=La(n.options.gutters,i),di(n)},!0),r("firstLineNumber",1,di,!0),r("lineNumberFormatter",function(n){return n},di,!0),r("showCursorWhenSelecting",!1,ai,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Ar(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,ai,!0),r("singleCursorHeightPerLine",!0,ai,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,fi,!0),r("addModeClass",!1,fi,!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,fi,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=Fr;if(!t!=!n){var i=e.display.dragFunctions,a=t?he: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 ql(e){e.options.lineWrapping?(U(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(we(e.display.wrapper,"CodeMirror-wrap"),Ni(e)),wa(e),tn(e),ii(e),setTimeout(function(){return Lr(e)},100)}function Ot(e,t){var r=this;if(!(this instanceof Ot))return new Ot(e,t);this.options=t=t?l(t):{},l(Es,t,!1);var n=t.value;typeof n=="string"?n=new nn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ot.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,ws(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ko(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 _,keySeq:null,specialChars:null},t.autofocus&&!le&&a.input.focus(),L&&W<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Ol(),cr(this),this.curOp.forceUpdate=!0,Po(this,n),t.autofocus&&!le||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Ca(r)},20):Ar(this);for(var o in ea)ea.hasOwnProperty(o)&&ea[o](this,t[o],Fr);_o(this),t.finishInit&&t.finishInit(this);for(var s=0;s20*20}he(t.scroller,"touchstart",function(u){if(!Pe(e,u)&&!a(u)&&!za(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)}}),he(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),he(t.scroller,"touchend",function(u){var d=t.activeTouch;if(d&&!Un(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var y=e.coordsChar(t.activeTouch,"page"),S;!d.prev||o(d,d.prev)?S=new Ct(y,y):!d.prev.prev||o(d,d.prev.prev)?S=e.findWordAt(y):S=new Ct(Me(y.line,0),dt(e.doc,Me(y.line+1,0))),e.setSelection(S.anchor,S.head),e.focus(),f(u)}i()}),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",function(){t.scroller.clientHeight&&(si(e,t.scroller.scrollTop),lr(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))}),he(t.scroller,"mousewheel",function(u){return Lo(e,u)}),he(t.scroller,"DOMMouseScroll",function(u){return Lo(e,u)}),he(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Pe(e,u)||k(u)},over:function(u){Pe(e,u)||(Al(e,u),k(u))},start:function(u){return _l(e,u)},drop:Bt(e,Tl),leave:function(u){Pe(e,u)||is(e)}};var s=t.input.getField();he(s,"keyup",function(u){return ms.call(e,u)}),he(s,"keydown",Bt(e,ps)),he(s,"keypress",Bt(e,gs)),he(s,"focus",function(u){return Ca(e,u)}),he(s,"blur",function(u){return Ar(e,u)})}var Ha=[];Ot.defineInitHook=function(e){return Ha.push(e)};function Si(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=bn(e,t).state:r="prev");var o=e.options.tabSize,s=Ze(i,t),u=m(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var d=s.text.match(/^\s*/)[0],y;if(!n&&!/\S/.test(s.text))y=0,r="not";else if(r=="smart"&&(y=i.mode.indent(a,s.text.slice(d.length),s.text),y==Ae||y>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?y=m(Ze(i,t-1).text,null,o):y=0:r=="add"?y=u+e.options.indentUnit:r=="subtract"?y=u-e.options.indentUnit:typeof r=="number"&&(y=u+r),y=Math.max(0,y);var S="",$=0;if(e.options.indentWithTabs)for(var X=Math.floor(y/o);X;--X)$+=o,S+=" ";if($o,u=ht(t),d=null;if(s&&n.ranges.length>1)if(Sn&&Sn.text.join(` `)==t){if(n.ranges.length%Sn.text.length==0){d=[];for(var y=0;y=0;$--){var X=n.ranges[$],me=X.from(),_e=X.to();X.empty()&&(r&&r>0?me=Me(me.line,me.ch-r):e.state.overwrite&&!s?_e=Me(_e.line,Math.min(Ze(a,_e.line).text.length,_e.ch+h(u).length)):s&&Sn&&Sn.lineWise&&Sn.text.join(` `)==u.join(` `)&&(me=_e=Me(me.line,0)));var je={from:me,to:_e,text:d?d[$%d.length]:u,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Dr(e.doc,je),Xt(e,"inputRead",e,je)}t&&!s&&ks(e,t),Or(e),e.curOp.updateInput<2&&(e.curOp.updateInput=S),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Cs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&sn(t,function(){return Xa(t,r,0,null,"paste")}),!0}function ks(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Si(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(Ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Si(e,i.head.line,"smart")));o&&Xt(e,"electricInput",e,i.head.line)}}function Ss(e){for(var t=[],r=[],n=0;na&&(Si(this,s.head.line,n,!0),a=s.head.line,o==this.doc.sel.primIndex&&Or(this));else{var u=s.from(),d=s.to(),y=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var S=y;S0&&ja(this.doc,o,new Ct(u,$[o].to()),de)}}}),getTokenAt:function(n,i){return _i(this,n,i)},getLineTokens:function(n,i){return _i(this,Me(n),i,!0)},getTokenTypeAt:function(n){n=dt(this.doc,n);var i=Qn(this,Ze(this.doc,n.line)),a=0,o=(i.length-1)/2,s=n.ch,u;if(s==0)u=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=s)o=d;else if(i[d*2+1]u&&(n=u,o=!0),s=Ze(this.doc,n)}else s=n;return Ii(this,s,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-En(s):0)},defaultTextHeight:function(){return Tr(this.display)},defaultCharWidth:function(){return _r(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,s){var u=this.display;n=Cn(this,dt(this.doc,n));var d=n.bottom,y=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 S=Math.max(u.wrapper.clientHeight,this.doc.height),$=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>S)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=S&&(d=n.bottom),y+i.offsetWidth>$&&(y=$-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",s=="right"?(y=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?y=0:s=="middle"&&(y=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=y+"px"),a&&Js(this,{left:y,top:d,right:y+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:Jt(ps),triggerOnKeyPress:Jt(gs),triggerOnKeyUp:ms,triggerOnMouseDown:Jt(vs),execCommand:function(n){if(wi.hasOwnProperty(n))return wi[n].call(null,this)},triggerElectric:Jt(function(n){ks(this,n)}),findPosH:function(n,i,a,o){var s=1;i<0&&(s=-1,i=-i);for(var u=dt(this.doc,n),d=0;d0&&y(a.charAt(o-1));)--o;for(;s.5||this.options.lineWrapping)&&wa(this),ye(this,"refresh",this)}),swapDoc:Jt(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Po(this,n),ii(this),this.display.input.reset(),oi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Xt(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}},O(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 Ga(e,t,r,n,i){var a=t,o=r,s=Ze(e,t.line),u=i&&e.direction=="rtl"?-r:r;function d(){var Ge=t.line+u;return Ge=e.first+e.size?!1:(t=new Me(Ge,t.ch,t.sticky),s=Ze(e,Ge))}function y(Ge){var We;if(n=="codepoint"){var $e=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN($e)?We=null:We=new Me(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*($e>=55296&&$e<56320?2:1))),-r)}else i?We=Pl(e.cm,s,t,r):We=Fa(s,t,r);if(We==null)if(!Ge&&d())t=Ua(i,e.cm,s,t.line,u);else return!1;else t=We;return!0}if(n=="char"||n=="codepoint")y();else if(n=="column")y(!0);else if(n=="word"||n=="group")for(var S=null,$=n=="group",X=e.cm&&e.cm.getHelper(t,"wordChars"),me=!0;!(r<0&&!y(!me));me=!1){var _e=s.text.charAt(t.ch)||` `,je=ke(_e,X)?"w":$&&_e==` `?"n":!$||/\s/.test(_e)?null:"p";if($&&!me&&!je&&(je="s"),S&&S!=je){r<0&&(r=1,y(),t.sticky="after");break}if(je&&(S=je),r>0&&!y(!me))break}var Be=Yi(e,t,a,o,!0);return Xr(a,Be)&&(Be.hitSide=!0),Be}function As(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*Tr(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=va(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var St=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new _,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};St.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;Ts(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(s){for(var u=s.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}he(i,"paste",function(s){if(!a(s)||Pe(n,s)||Cs(s,n))return;W<=11&&setTimeout(Bt(n,function(){return t.updateFromDOM()}),20)}),he(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),he(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),he(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),he(i,"touchstart",function(){return r.forceCompositionEnd()}),he(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!a(s)||Pe(n,s))return;if(n.somethingSelected())ta({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=Ss(n);ta({lineWise:!0,text:u.text}),s.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,de),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var d=Sn.text.join(` `);if(s.clipboardData.setData("Text",d),s.clipboardData.getData("Text")==d){s.preventDefault();return}}var y=_s(),S=y.firstChild;n.display.lineSpace.insertBefore(y,n.display.lineSpace.firstChild),S.value=Sn.text.join(` `);var $=document.activeElement;E(S),setTimeout(function(){n.display.lineSpace.removeChild(y),$.focus(),$==i&&r.showPrimarySelection()},50)}he(i,"copy",o),he(i,"cut",o)},St.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},St.prototype.prepareSelection=function(){var e=mo(this.cm,!1);return e.focus=document.activeElement==this.div,e},St.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},St.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},St.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&&Os(t,n)||{node:s[0].measure.map[2],offset:0},d=i.linee.firstLine()&&(n=Me(n.line-1,Ze(e.doc,n.line-1).length)),i.ch==Ze(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var a,o,s;n.line==t.viewFrom||(a=sr(e,n.line))==0?(o=wt(t.view[0].line),s=t.view[0].node):(o=wt(t.view[a].line),s=t.view[a-1].node.nextSibling);var u=sr(e,i.line),d,y;if(u==t.view.length-1?(d=t.viewTo-1,y=t.lineDiv.lastChild):(d=wt(t.view[u+1].line)-1,y=t.view[u+1].node.previousSibling),!s)return!1;for(var S=e.doc.splitLines(tu(e,s,y,o,d)),$=Dn(e.doc,Me(o,0),Me(d,Ze(e.doc,d).text.length));S.length>1&&$.length>1;)if(h(S)==h($))S.pop(),$.pop(),d--;else if(S[0]==$[0])S.shift(),$.shift(),o++;else break;for(var X=0,me=0,_e=S[0],je=$[0],Be=Math.min(_e.length,je.length);Xn.ch&&Ge.charCodeAt(Ge.length-me-1)==We.charCodeAt(We.length-me-1);)X--,me++;S[S.length-1]=Ge.slice(0,Ge.length-me).replace(/^\u200b+/,""),S[0]=S[0].slice(X).replace(/\u200b+$/,"");var lt=Me(o,X),nt=Me(d,$.length?h($).length-me:0);if(S.length>1||S[0]||ut(lt,nt))return Pr(e.doc,S,lt,nt,"+input"),!0},St.prototype.ensurePolled=function(){this.forceCompositionEnd()},St.prototype.reset=function(){this.forceCompositionEnd()},St.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},St.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)},St.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&sn(this.cm,function(){return tn(e.cm)})},St.prototype.setUneditable=function(e){e.contentEditable="false"},St.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Bt(this.cm,Xa)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},St.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},St.prototype.onContextMenu=function(){},St.prototype.resetPosition=function(){},St.prototype.needsContentAttribute=!0;function Os(e,t){var r=ha(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=eo(r,n,t.line),a=rt(n,e.doc.direction),o="left";if(a){var s=Ve(a,t.ch);o=s%2?"right":"left"}var u=ro(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 Ur(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,s=e.doc.lineSeparator(),u=!1;function d(X){return function(me){return me.id==X}}function y(){o&&(a+=s,u&&(a+=s),o=u=!1)}function S(X){X&&(y(),a+=X)}function $(X){if(X.nodeType==1){var me=X.getAttribute("cm-text");if(me){S(me);return}var _e=X.getAttribute("cm-marker"),je;if(_e){var Be=e.findMarks(Me(n,0),Me(i+1,0),d(+_e));Be.length&&(je=Be[0].find(0))&&S(Dn(e.doc,je.from,je.to).join(s));return}if(X.getAttribute("contenteditable")=="false")return;var Ge=/^(pre|div|p|li|table|br)$/i.test(X.nodeName);if(!/^br$/i.test(X.nodeName)&&X.textContent.length==0)return;Ge&&y();for(var We=0;We=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),he(i,"paste",function(o){if(Pe(n,o)||Cs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Pe(n,o))return;if(n.somethingSelected())ta({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=Ss(n);ta({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,de):(r.prevInput="",i.value=s.text.join(` `),E(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}he(i,"cut",a),he(i,"copy",a),he(e.scroller,"paste",function(o){if(Un(e,o)||Pe(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,i.dispatchEvent(s)}),he(e.lineSpace,"selectstart",function(o){Un(e,o)||f(o)}),he(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"})}}),he(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Dt.prototype.createField=function(e){this.wrapper=_s(),this.textarea=this.wrapper.firstChild},Dt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Dt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=mo(e);if(e.options.moveInputWithCursor){var i=Cn(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},Dt.prototype.showSelection=function(e){var t=this.cm,r=t.display;ne(r.cursorDiv,e.cursors),ne(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Dt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&E(this.textarea),L&&W>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",L&&W>=9&&(this.hasSelection=null))},Dt.prototype.getField=function(){return this.textarea},Dt.prototype.supportsTouch=function(){return!1},Dt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!le||q()!=this.textarea))try{this.textarea.focus()}catch(e){}},Dt.prototype.blur=function(){this.textarea.blur()},Dt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Dt.prototype.receivedFocus=function(){this.slowPoll()},Dt.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Dt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Dt.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||st(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(L&&W>=9&&this.hasSelection===i||ce&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,i.length);o1e3||i.indexOf(` `)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Dt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Dt.prototype.onKeyPress=function(){L&&W>=9&&(this.hasSelection=null),this.fastPoll()},Dt.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=or(r,e),o=n.scroller.scrollTop;if(!a||R)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&Bt(r,Vt)(r.doc,Kn(a),de);var u=i.style.cssText,d=t.wrapper.style.cssText,y=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-y.top-5)+"px; left: "+(e.clientX-y.left-5)+`px; z-index: 1000; background: `+(L?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var S;P&&(S=window.scrollY),n.input.focus(),P&&window.scrollTo(null,S),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=X,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function $(){if(i.selectionStart!=null){var _e=r.somethingSelected(),je="\u200B"+(_e?i.value:"");i.value="\u21DA",i.value=je,t.prevInput=_e?"":"\u200B",i.selectionStart=1,i.selectionEnd=je.length,n.selForContextMenu=r.doc.sel}}function X(){if(t.contextMenuPending!=X)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,L&&W<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!L||L&&W<9)&&$();var _e=0,je=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Bt(r,Vo)(r):_e++<10?n.detectingSelectAll=setTimeout(je,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(je,200)}}if(L&&W>=9&&$(),Fe){k(e);var me=function(){qe(window,"mouseup",me),setTimeout(X,20)};he(window,"mouseup",me)}else setTimeout(X,50)},Dt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Dt.prototype.setUneditable=function(){},Dt.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?l(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=q();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(he(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 s=Ot(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return s}function iu(e){e.off=qe,e.on=he,e.wheelEventPixels=dl,e.Doc=nn,e.splitLines=ht,e.countColumn=m,e.findColumn=Z,e.isWordChar=se,e.Pass=Ae,e.signal=ye,e.Line=rr,e.changeEnd=Vn,e.scrollbarModel=Co,e.Pos=Me,e.cmpPos=ut,e.modes=jt,e.mimeModes=yt,e.resolveMode=un,e.getMode=gn,e.modeExtensions=hn,e.extendMode=ia,e.copyState=_n,e.startState=Hr,e.innerMode=zr,e.commands=wi,e.keyMap=Bn,e.keyName=us,e.isModifierKey=ss,e.lookupKey=jr,e.normalizeKeyMap=Dl,e.StringStream=Rt,e.SharedTextMarker=bi,e.TextMarker=Yn,e.LineWidget=vi,e.e_preventDefault=f,e.e_stopPropagation=p,e.e_stop=k,e.addClass=U,e.contains=w,e.rmClass=we,e.keyNames=Jn}Yl(Ot),Ql(Ot);var au="iter insert remove copy getEditor constructor".split(" ");for(var ra in nn.prototype)nn.prototype.hasOwnProperty(ra)&&B(au,ra)<0&&(Ot.prototype[ra]=function(e){return function(){return e.apply(this.doc,arguments)}}(nn.prototype[ra]));return O(nn),Ot.inputStyles={textarea:Dt,contenteditable:St},Ot.defineMode=function(e){!Ot.defaults.mode&&e!="null"&&(Ot.defaults.mode=e),Tn.apply(this,arguments)},Ot.defineMIME=Mn,Ot.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ot.defineMIME("text/plain","null"),Ot.defineExtension=function(e,t){Ot.prototype[e]=t},Ot.defineDocExtension=function(e,t){nn.prototype[e]=t},Ot.fromTextArea=ru,iu(Ot),Ot.version="5.58.2",Ot})},X0ci:function(ft,Ye,x){},Y1PL:function(ft,Ye,x){"use strict";var K=x("wx14"),Ce=x("1OyB"),oe=x("vuIU"),Se=x("Ji7U"),ge=x("LK+K"),ee=x("cDcd"),L=x("VTBJ"),W=x("rePB"),P=x("Zm9Q"),V=x("Kwbf"),N=x("c+Xe"),R=x("m+aA"),ve=x("bdgK"),te=new Map;function F(de){de.forEach(function(ie){var G,Z=ie.target;(G=te.get(Z))===null||G===void 0||G.forEach(function(M){return M(Z)})})}var z=new ve.default(F),j=null,le=null;function ce(de,ie){te.has(de)||(te.set(de,new Set),z.observe(de)),te.get(de).add(ie)}function Oe(de,ie){te.has(de)&&(te.get(de).delete(ie),te.get(de).size||(z.unobserve(de),te.delete(de)))}var Xe=function(de){Object(Se.a)(G,de);var ie=Object(ge.a)(G);function G(){return Object(Ce.a)(this,G),ie.apply(this,arguments)}return Object(oe.a)(G,[{key:"render",value:function(){return this.props.children}}]),G}(ee.Component),Ie=ee.createContext(null);function De(de){var ie=de.children,G=de.onBatchResize,Z=ee.useRef(0),M=ee.useRef([]),J=ee.useContext(Ie),h=ee.useCallback(function(C,g,re){Z.current+=1;var pe=Z.current;M.current.push({size:C,element:g,data:re}),Promise.resolve().then(function(){pe===Z.current&&(G==null||G(M.current),M.current=[])}),J==null||J(C,g,re)},[G,J]);return ee.createElement(Ie.Provider,{value:h},ie)}function Fe(de){var ie=de.children,G=de.disabled,Z=ee.useRef(null),M=ee.useRef(null),J=ee.useContext(Ie),h=ee.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),C=ee.isValidElement(ie)&&Object(N.c)(ie),g=C?ie.ref:null,re=ee.useMemo(function(){return Object(N.a)(g,Z)},[g,Z]),pe=ee.useRef(de);pe.current=de;var Y=ee.useCallback(function(se){var ke=pe.current,Re=ke.onResize,Le=ke.data,be=se.getBoundingClientRect(),Ee=be.width,Ue=be.height,Je=se.offsetWidth,ze=se.offsetHeight,Ve=Math.floor(Ee),ot=Math.floor(Ue);if(h.current.width!==Ve||h.current.height!==ot||h.current.offsetWidth!==Je||h.current.offsetHeight!==ze){var rt={width:Ve,height:ot,offsetWidth:Je,offsetHeight:ze};h.current=rt;var Ke=Je===Math.round(Ee)?Ee:Je,he=ze===Math.round(Ue)?Ue:ze,it=Object(L.a)(Object(L.a)({},rt),{},{offsetWidth:Ke,offsetHeight:he});J==null||J(it,se,Le),Re&&Promise.resolve().then(function(){Re(it,se)})}},[]);return ee.useEffect(function(){var se=Object(R.a)(Z.current)||Object(R.a)(M.current);return se&&!G&&ce(se,Y),function(){return Oe(se,Y)}},[Z.current,G]),ee.createElement(Xe,{ref:M},C?ee.cloneElement(ie,{ref:re}):ie)}var xe="rc-observer-key";function we(de){var ie=de.children,G=Object(P.a)(ie);return G.map(function(Z,M){var J=(Z==null?void 0:Z.key)||"".concat(xe,"-").concat(M);return ee.createElement(Fe,Object(K.a)({},de,{key:J}),Z)})}we.Collection=De;var fe=we,ne=x("bT9E"),v=x("TSYQ"),Q=x.n(v),H=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important `,w=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],q={},U;function T(de){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,G=de.getAttribute("id")||de.getAttribute("data-reactid")||de.getAttribute("name");if(ie&&q[G])return q[G];var Z=window.getComputedStyle(de),M=Z.getPropertyValue("box-sizing")||Z.getPropertyValue("-moz-box-sizing")||Z.getPropertyValue("-webkit-box-sizing"),J=parseFloat(Z.getPropertyValue("padding-bottom"))+parseFloat(Z.getPropertyValue("padding-top")),h=parseFloat(Z.getPropertyValue("border-bottom-width"))+parseFloat(Z.getPropertyValue("border-top-width")),C=w.map(function(re){return"".concat(re,":").concat(Z.getPropertyValue(re))}).join(";"),g={sizingStyle:C,paddingSize:J,borderSize:h,boxSizing:M};return ie&&G&&(q[G]=g),g}function E(de){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;U||(U=document.createElement("textarea"),U.setAttribute("tab-index","-1"),U.setAttribute("aria-hidden","true"),document.body.appendChild(U)),de.getAttribute("wrap")?U.setAttribute("wrap",de.getAttribute("wrap")):U.removeAttribute("wrap");var M=T(de,ie),J=M.paddingSize,h=M.borderSize,C=M.boxSizing,g=M.sizingStyle;U.setAttribute("style","".concat(g,";").concat(H)),U.value=de.value||de.placeholder||"";var re=Number.MIN_SAFE_INTEGER,pe=Number.MAX_SAFE_INTEGER,Y=U.scrollHeight,se;if(C==="border-box"?Y+=h:C==="content-box"&&(Y-=J),G!==null||Z!==null){U.value=" ";var ke=U.scrollHeight-J;G!==null&&(re=ke*G,C==="border-box"&&(re=re+J+h),Y=Math.max(re,Y)),Z!==null&&(pe=ke*Z,C==="border-box"&&(pe=pe+J+h),se=Y>pe?"":"hidden",Y=Math.min(pe,Y))}return{height:Y,minHeight:re,maxHeight:pe,overflowY:se,resize:"none"}}var c=x("Gytx"),l=x.n(c),m;(function(de){de[de.NONE=0]="NONE",de[de.RESIZING=1]="RESIZING",de[de.RESIZED=2]="RESIZED"})(m||(m={}));var _=function(de){Object(Se.a)(G,de);var ie=Object(ge.a)(G);function G(Z){var M;return Object(Ce.a)(this,G),M=ie.call(this,Z),M.nextFrameActionId=void 0,M.resizeFrameId=void 0,M.textArea=void 0,M.saveTextArea=function(J){M.textArea=J},M.handleResize=function(J){var h=M.state.resizeStatus,C=M.props,g=C.autoSize,re=C.onResize;if(h!==m.NONE)return;typeof re=="function"&&re(J),g&&M.resizeOnNextFrame()},M.resizeOnNextFrame=function(){cancelAnimationFrame(M.nextFrameActionId),M.nextFrameActionId=requestAnimationFrame(M.resizeTextarea)},M.resizeTextarea=function(){var J=M.props.autoSize;if(!J||!M.textArea)return;var h=J.minRows,C=J.maxRows,g=E(M.textArea,!1,h,C);M.setState({textareaStyles:g,resizeStatus:m.RESIZING},function(){cancelAnimationFrame(M.resizeFrameId),M.resizeFrameId=requestAnimationFrame(function(){M.setState({resizeStatus:m.RESIZED},function(){M.resizeFrameId=requestAnimationFrame(function(){M.setState({resizeStatus:m.NONE}),M.fixFirefoxAutoScroll()})})})})},M.renderTextArea=function(){var J=M.props,h=J.prefixCls,C=h===void 0?"rc-textarea":h,g=J.autoSize,re=J.onResize,pe=J.className,Y=J.disabled,se=M.state,ke=se.textareaStyles,Re=se.resizeStatus,Le=Object(ne.a)(M.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),be=Q()(C,pe,Object(W.a)({},"".concat(C,"-disabled"),Y));"value"in Le&&(Le.value=Le.value||"");var Ee=Object(L.a)(Object(L.a)(Object(L.a)({},M.props.style),ke),Re===m.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ee.createElement(fe,{onResize:M.handleResize,disabled:!(g||re)},ee.createElement("textarea",Object(K.a)({},Le,{className:be,style:Ee,ref:M.saveTextArea})))},M.state={textareaStyles:{},resizeStatus:m.NONE},M}return Object(oe.a)(G,[{key:"componentDidUpdate",value:function(M){(M.value!==this.props.value||!l()(M.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 M=this.textArea.selectionStart,J=this.textArea.selectionEnd;this.textArea.setSelectionRange(M,J)}}catch(h){}}},{key:"render",value:function(){return this.renderTextArea()}}]),G}(ee.Component),B=_,ue=function(de){Object(Se.a)(G,de);var ie=Object(ge.a)(G);function G(Z){var M;Object(Ce.a)(this,G),M=ie.call(this,Z),M.resizableTextArea=void 0,M.focus=function(){M.resizableTextArea.textArea.focus()},M.saveTextArea=function(h){M.resizableTextArea=h},M.handleChange=function(h){var C=M.props.onChange;M.setValue(h.target.value,function(){M.resizableTextArea.resizeTextarea()}),C&&C(h)},M.handleKeyDown=function(h){var C=M.props,g=C.onPressEnter,re=C.onKeyDown;h.keyCode===13&&g&&g(h),re&&re(h)};var J=typeof Z.value=="undefined"||Z.value===null?Z.defaultValue:Z.value;return M.state={value:J},M}return Object(oe.a)(G,[{key:"setValue",value:function(M,J){"value"in this.props||this.setState({value:M},J)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ee.createElement(B,Object(K.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(M){return"value"in M?{value:M.value}:null}}]),G}(ee.Component),Ae=Ye.a=ue},ZpRC:function(ft,Ye,x){"use strict";function K(N){return typeof N=="object"&&N!=null&&N.nodeType===1}function Ce(N,R){return(!R||N!=="hidden")&&N!=="visible"&&N!=="clip"}function oe(N,R){if(N.clientHeightR||z>N&&j=R&&le>=ve?z-N-te:j>R&&leve?j-R+F:0}var ge=function(N,R){var ve=window,te=R.scrollMode,F=R.block,z=R.inline,j=R.boundary,le=R.skipOverflowHiddenElements,ce=typeof j=="function"?j:function(ke){return ke!==j};if(!K(N))throw new TypeError("Invalid target");for(var Oe=document.scrollingElement||document.documentElement,Xe=[],Ie=N;K(Ie)&&ce(Ie);){if((Ie=Ie.parentElement)===Oe){Xe.push(Ie);break}Ie!=null&&Ie===document.body&&oe(Ie)&&!oe(document.documentElement)||Ie!=null&&oe(Ie,le)&&Xe.push(Ie)}for(var De=ve.visualViewport?ve.visualViewport.width:innerWidth,Fe=ve.visualViewport?ve.visualViewport.height:innerHeight,xe=window.scrollX||pageXOffset,we=window.scrollY||pageYOffset,fe=N.getBoundingClientRect(),ne=fe.height,v=fe.width,Q=fe.top,H=fe.right,w=fe.bottom,q=fe.left,U=F==="start"||F==="nearest"?Q:F==="end"?w:Q+ne/2,T=z==="center"?q+v/2:z==="end"?H:q,E=[],c=0;c=0&&q>=0&&w<=Fe&&H<=De&&Q>=ue&&w<=de&&q>=ie&&H<=Ae)return E;var G=getComputedStyle(l),Z=parseInt(G.borderLeftWidth,10),M=parseInt(G.borderTopWidth,10),J=parseInt(G.borderRightWidth,10),h=parseInt(G.borderBottomWidth,10),C=0,g=0,re="offsetWidth"in l?l.offsetWidth-l.clientWidth-Z-J:0,pe="offsetHeight"in l?l.offsetHeight-l.clientHeight-M-h:0;if(Oe===l)C=F==="start"?U:F==="end"?U-Fe:F==="nearest"?Se(we,we+Fe,Fe,M,h,we+U,we+U+ne,ne):U-Fe/2,g=z==="start"?T:z==="center"?T-De/2:z==="end"?T-De:Se(xe,xe+De,De,Z,J,xe+T,xe+T+v,v),C=Math.max(0,C+we),g=Math.max(0,g+xe);else{C=F==="start"?U-ue-M:F==="end"?U-de+h+pe:F==="nearest"?Se(ue,de,_,M,h+pe,U,U+ne,ne):U-(ue+_/2)+pe/2,g=z==="start"?T-ie-Z:z==="center"?T-(ie+B/2)+re/2:z==="end"?T-Ae+J+re:Se(ie,Ae,B,Z,J+re,T,T+v,v);var Y=l.scrollLeft,se=l.scrollTop;U+=se-(C=Math.max(0,Math.min(se+C,l.scrollHeight-_+pe))),T+=Y-(g=Math.max(0,Math.min(Y+g,l.scrollWidth-B+re)))}E.push({el:l,top:C,left:g})}return E};function ee(N){return N===Object(N)&&Object.keys(N).length!==0}function L(N,R){R===void 0&&(R="auto");var ve="scrollBehavior"in document.body.style;N.forEach(function(te){var F=te.el,z=te.top,j=te.left;F.scroll&&ve?F.scroll({top:z,left:j,behavior:R}):(F.scrollTop=z,F.scrollLeft=j)})}function W(N){return N===!1?{block:"end",inline:"nearest"}:ee(N)?N:{block:"start",inline:"nearest"}}function P(N,R){var ve=!N.ownerDocument.documentElement.contains(N);if(ee(R)&&typeof R.behavior=="function")return R.behavior(ve?[]:ge(N,R));if(ve)return;var te=W(R);return L(ge(N,te),te.behavior)}var V=Ye.a=P},Zss7:function(ft,Ye,x){var K;(function(Ce){var oe=/^\s+/,Se=/\s+$/,ge=0,ee=Ce.round,L=Ce.min,W=Ce.max,P=Ce.random;function V(h,C){if(h=h||"",C=C||{},h instanceof V)return h;if(!(this instanceof V))return new V(h,C);var g=N(h);this._originalInput=h,this._r=g.r,this._g=g.g,this._b=g.b,this._a=g.a,this._roundA=ee(100*this._a)/100,this._format=C.format||g.format,this._gradientType=C.gradientType,this._r<1&&(this._r=ee(this._r)),this._g<1&&(this._g=ee(this._g)),this._b<1&&(this._b=ee(this._b)),this._ok=g.ok,this._tc_id=ge++}V.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),C,g,re,pe,Y,se;return C=h.r/255,g=h.g/255,re=h.b/255,C<=.03928?pe=C/12.92:pe=Ce.pow((C+.055)/1.055,2.4),g<=.03928?Y=g/12.92:Y=Ce.pow((g+.055)/1.055,2.4),re<=.03928?se=re/12.92:se=Ce.pow((re+.055)/1.055,2.4),.2126*pe+.7152*Y+.0722*se},setAlpha:function(h){return this._a=E(h),this._roundA=ee(100*this._a)/100,this},toHsv:function(){var h=F(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=F(this._r,this._g,this._b),C=ee(h.h*360),g=ee(h.s*100),re=ee(h.v*100);return this._a==1?"hsv("+C+", "+g+"%, "+re+"%)":"hsva("+C+", "+g+"%, "+re+"%, "+this._roundA+")"},toHsl:function(){var h=ve(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=ve(this._r,this._g,this._b),C=ee(h.h*360),g=ee(h.s*100),re=ee(h.l*100);return this._a==1?"hsl("+C+", "+g+"%, "+re+"%)":"hsla("+C+", "+g+"%, "+re+"%, "+this._roundA+")"},toHex:function(h){return j(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return le(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:ee(this._r),g:ee(this._g),b:ee(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+ee(this._r)+", "+ee(this._g)+", "+ee(this._b)+")":"rgba("+ee(this._r)+", "+ee(this._g)+", "+ee(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:ee(c(this._r,255)*100)+"%",g:ee(c(this._g,255)*100)+"%",b:ee(c(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+ee(c(this._r,255)*100)+"%, "+ee(c(this._g,255)*100)+"%, "+ee(c(this._b,255)*100)+"%)":"rgba("+ee(c(this._r,255)*100)+"%, "+ee(c(this._g,255)*100)+"%, "+ee(c(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:U[j(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var C="#"+ce(this._r,this._g,this._b,this._a),g=C,re=this._gradientType?"GradientType = 1, ":"";if(h){var pe=V(h);g="#"+ce(pe._r,pe._g,pe._b,pe._a)}return"progid:DXImageTransform.Microsoft.gradient("+re+"startColorstr="+C+",endColorstr="+g+")"},toString:function(h){var C=!!h;h=h||this._format;var g=!1,re=this._a<1&&this._a>=0,pe=!C&&re&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return pe?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(g=this.toRgbString()),h==="prgb"&&(g=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(g=this.toHexString()),h==="hex3"&&(g=this.toHexString(!0)),h==="hex4"&&(g=this.toHex8String(!0)),h==="hex8"&&(g=this.toHex8String()),h==="name"&&(g=this.toName()),h==="hsl"&&(g=this.toHslString()),h==="hsv"&&(g=this.toHsvString()),g||this.toHexString())},clone:function(){return V(this.toString())},_applyModification:function(h,C){var g=h.apply(null,[this].concat([].slice.call(C)));return this._r=g._r,this._g=g._g,this._b=g._b,this.setAlpha(g._a),this},lighten:function(){return this._applyModification(De,arguments)},brighten:function(){return this._applyModification(Fe,arguments)},darken:function(){return this._applyModification(xe,arguments)},desaturate:function(){return this._applyModification(Oe,arguments)},saturate:function(){return this._applyModification(Xe,arguments)},greyscale:function(){return this._applyModification(Ie,arguments)},spin:function(){return this._applyModification(we,arguments)},_applyCombination:function(h,C){return h.apply(null,[this].concat([].slice.call(C)))},analogous:function(){return this._applyCombination(H,arguments)},complement:function(){return this._applyCombination(fe,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(Q,arguments)},triad:function(){return this._applyCombination(ne,arguments)},tetrad:function(){return this._applyCombination(v,arguments)}},V.fromRatio=function(h,C){if(typeof h=="object"){var g={};for(var re in h)h.hasOwnProperty(re)&&(re==="a"?g[re]=h[re]:g[re]=Ae(h[re]));h=g}return V(h,C)};function N(h){var C={r:0,g:0,b:0},g=1,re=null,pe=null,Y=null,se=!1,ke=!1;return typeof h=="string"&&(h=M(h)),typeof h=="object"&&(Z(h.r)&&Z(h.g)&&Z(h.b)?(C=R(h.r,h.g,h.b),se=!0,ke=String(h.r).substr(-1)==="%"?"prgb":"rgb"):Z(h.h)&&Z(h.s)&&Z(h.v)?(re=Ae(h.s),pe=Ae(h.v),C=z(h.h,re,pe),se=!0,ke="hsv"):Z(h.h)&&Z(h.s)&&Z(h.l)&&(re=Ae(h.s),Y=Ae(h.l),C=te(h.h,re,Y),se=!0,ke="hsl"),h.hasOwnProperty("a")&&(g=h.a)),g=E(g),{ok:se,format:h.format||ke,r:L(255,W(C.r,0)),g:L(255,W(C.g,0)),b:L(255,W(C.b,0)),a:g}}function R(h,C,g){return{r:c(h,255)*255,g:c(C,255)*255,b:c(g,255)*255}}function ve(h,C,g){h=c(h,255),C=c(C,255),g=c(g,255);var re=W(h,C,g),pe=L(h,C,g),Y,se,ke=(re+pe)/2;if(re==pe)Y=se=0;else{var Re=re-pe;se=ke>.5?Re/(2-re-pe):Re/(re+pe);switch(re){case h:Y=(C-g)/Re+(C1&&(Ee-=1),Ee<1/6?Le+(be-Le)*6*Ee:Ee<1/2?be:Ee<2/3?Le+(be-Le)*(2/3-Ee)*6:Le}if(C===0)re=pe=Y=g;else{var ke=g<.5?g*(1+C):g+C-g*C,Re=2*g-ke;re=se(Re,ke,h+1/3),pe=se(Re,ke,h),Y=se(Re,ke,h-1/3)}return{r:re*255,g:pe*255,b:Y*255}}function F(h,C,g){h=c(h,255),C=c(C,255),g=c(g,255);var re=W(h,C,g),pe=L(h,C,g),Y,se,ke=re,Re=re-pe;if(se=re===0?0:Re/re,re==pe)Y=0;else{switch(re){case h:Y=(C-g)/Re+(C>1)+720)%360;--C;)re.h=(re.h+pe)%360,Y.push(V(re));return Y}function w(h,C){C=C||6;for(var g=V(h).toHsv(),re=g.h,pe=g.s,Y=g.v,se=[],ke=1/C;C--;)se.push(V({h:re,s:pe,v:Y})),Y=(Y+ke)%1;return se}V.mix=function(h,C,g){g=g===0?0:g||50;var re=V(h).toRgb(),pe=V(C).toRgb(),Y=g/100,se={r:(pe.r-re.r)*Y+re.r,g:(pe.g-re.g)*Y+re.g,b:(pe.b-re.b)*Y+re.b,a:(pe.a-re.a)*Y+re.a};return V(se)},V.readability=function(h,C){var g=V(h),re=V(C);return(Ce.max(g.getLuminance(),re.getLuminance())+.05)/(Ce.min(g.getLuminance(),re.getLuminance())+.05)},V.isReadable=function(h,C,g){var re=V.readability(h,C),pe,Y;Y=!1,pe=J(g);switch(pe.level+pe.size){case"AAsmall":case"AAAlarge":Y=re>=4.5;break;case"AAlarge":Y=re>=3;break;case"AAAsmall":Y=re>=7;break}return Y},V.mostReadable=function(h,C,g){var re=null,pe=0,Y,se,ke,Re;g=g||{},se=g.includeFallbackColors,ke=g.level,Re=g.size;for(var Le=0;Lepe&&(pe=Y,re=V(C[Le]));return V.isReadable(h,re,{level:ke,size:Re})||!se?re:(g.includeFallbackColors=!1,V.mostReadable(h,["#fff","#000"],g))};var q=V.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"},U=V.hexNames=T(q);function T(h){var C={};for(var g in h)h.hasOwnProperty(g)&&(C[h[g]]=g);return C}function E(h){return h=parseFloat(h),(isNaN(h)||h<0||h>1)&&(h=1),h}function c(h,C){_(h)&&(h="100%");var g=B(h);return h=L(C,W(0,parseFloat(h))),g&&(h=parseInt(h*C,10)/100),Ce.abs(h-C)<1e-6?1:h%C/parseFloat(C)}function l(h){return L(1,W(0,h))}function m(h){return parseInt(h,16)}function _(h){return typeof h=="string"&&h.indexOf(".")!=-1&&parseFloat(h)===1}function B(h){return typeof h=="string"&&h.indexOf("%")!=-1}function ue(h){return h.length==1?"0"+h:""+h}function Ae(h){return h<=1&&(h=h*100+"%"),h}function de(h){return Ce.round(parseFloat(h)*255).toString(16)}function ie(h){return m(h)/255}var G=function(){var h="[-\\+]?\\d+%?",C="[-\\+]?\\d*\\.\\d+%?",g="(?:"+C+")|(?:"+h+")",re="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?",pe="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?";return{CSS_UNIT:new RegExp(g),rgb:new RegExp("rgb"+re),rgba:new RegExp("rgba"+pe),hsl:new RegExp("hsl"+re),hsla:new RegExp("hsla"+pe),hsv:new RegExp("hsv"+re),hsva:new RegExp("hsva"+pe),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 Z(h){return!!G.CSS_UNIT.exec(h)}function M(h){h=h.replace(oe,"").replace(Se,"").toLowerCase();var C=!1;if(q[h])h=q[h],C=!0;else if(h=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var g;return(g=G.rgb.exec(h))?{r:g[1],g:g[2],b:g[3]}:(g=G.rgba.exec(h))?{r:g[1],g:g[2],b:g[3],a:g[4]}:(g=G.hsl.exec(h))?{h:g[1],s:g[2],l:g[3]}:(g=G.hsla.exec(h))?{h:g[1],s:g[2],l:g[3],a:g[4]}:(g=G.hsv.exec(h))?{h:g[1],s:g[2],v:g[3]}:(g=G.hsva.exec(h))?{h:g[1],s:g[2],v:g[3],a:g[4]}:(g=G.hex8.exec(h))?{r:m(g[1]),g:m(g[2]),b:m(g[3]),a:ie(g[4]),format:C?"name":"hex8"}:(g=G.hex6.exec(h))?{r:m(g[1]),g:m(g[2]),b:m(g[3]),format:C?"name":"hex"}:(g=G.hex4.exec(h))?{r:m(g[1]+""+g[1]),g:m(g[2]+""+g[2]),b:m(g[3]+""+g[3]),a:ie(g[4]+""+g[4]),format:C?"name":"hex8"}:(g=G.hex3.exec(h))?{r:m(g[1]+""+g[1]),g:m(g[2]+""+g[2]),b:m(g[3]+""+g[3]),format:C?"name":"hex"}:!1}function J(h){var C,g;return h=h||{level:"AA",size:"small"},C=(h.level||"AA").toUpperCase(),g=(h.size||"small").toLowerCase(),C!=="AA"&&C!=="AAA"&&(C="AA"),g!=="small"&&g!=="large"&&(g="small"),{level:C,size:g}}ft.exports?ft.exports=V:!(K=function(){return V}.call(Ye,x,Ye,ft),K!==void 0&&(ft.exports=K))})(Math)},bT9E:function(ft,Ye,x){"use strict";x.d(Ye,"a",function(){return Ce});var K=x("VTBJ");function Ce(oe,Se){var ge=Object(K.a)({},oe);return Array.isArray(Se)&&Se.forEach(function(ee){delete ge[ee]}),ge}},c5Ni:function(ft,Ye,x){},dejd:function(ft,Ye,x){},dmUQ:function(ft,Ye,x){"use strict";var K=x("Ff2n"),Ce=x("rePB"),oe=x("1OyB"),Se=x("vuIU"),ge=x("Ji7U"),ee=x("md7G"),L=x("foSv"),W=x("cDcd"),P=x.n(W),V=x("TSYQ"),N=x.n(V),R=x("4IlW");function ve(ne,v){var Q=Object.keys(ne);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(ne);v&&(H=H.filter(function(w){return Object.getOwnPropertyDescriptor(ne,w).enumerable})),Q.push.apply(Q,H)}return Q}function te(ne){for(var v=1;v1?B-1:0),Ae=1;Ae1?c-1:0),m=1;m=0)return parseInt(E.slice(E.indexOf("e-")+2),10);var c=0;return E.indexOf(".")>=0&&(c=E.length-E.indexOf(".")-1),c},w.getInputDisplayValue=function(T){var E=T||w.state,c=E.focused,l=E.inputValue,m=E.value,_;c?_=l:_=w.toPrecisionAsStep(m),_==null&&(_="");var B=w.formatWrapper(_);return De(w.props.decimalSeparator)&&(B=B.toString().replace(".",w.props.decimalSeparator)),B},w.recordCursorPosition=function(){try{w.cursorStart=w.input.selectionStart,w.cursorEnd=w.input.selectionEnd,w.currentValue=w.input.value,w.cursorBefore=w.input.value.substring(0,w.cursorStart),w.cursorAfter=w.input.value.substring(w.cursorEnd)}catch(T){}},w.restoreByAfter=function(T){if(T===void 0)return!1;var E=w.input.value,c=E.lastIndexOf(T);if(c===-1)return!1;var l=w.cursorBefore.length;return w.lastKeyCode===R.a.DELETE&&w.cursorBefore.charAt(l-1)===T[0]?(w.fixCaret(l,l),!0):c+T.length===E.length?(w.fixCaret(c,c),!0):!1},w.partRestoreByAfter=function(T){return T===void 0?!1:Array.prototype.some.call(T,function(E,c){var l=T.substring(c);return w.restoreByAfter(l)})},w.isNotCompleteNumber=function(T){return isNaN(T)||T===""||T===null||T&&T.toString().indexOf(".")===T.toString().length-1},w.stop=function(){w.autoStepTimer&&clearTimeout(w.autoStepTimer)},w.down=function(T,E,c){w.pressingUpOrDown=!0,w.step("down",T,E,c)},w.up=function(T,E,c){w.pressingUpOrDown=!0,w.step("up",T,E,c)},w.saveInput=function(T){w.input=T};var q=H.value;q===void 0&&(q=H.defaultValue),w.state={focused:H.autoFocus};var U=w.getValidValue(w.toNumber(q));return w.state=te(te({},w.state),{},{inputValue:w.toPrecisionAsStep(U),value:U}),w}return Object(Se.a)(Q,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(w){var q=this.props,U=q.value,T=q.onChange,E=q.max,c=q.min,l=this.state.focused;if(w){if(!Fe(w.value,U)||!Fe(w.max,E)||!Fe(w.min,c)){var m=l?U:this.getValidValue(U),_;this.pressingUpOrDown?_=m:this.inputting?_=this.rawInput:_=this.toPrecisionAsStep(m),this.setState({value:m,inputValue:_})}var B="value"in this.props?U:this.state.value;"max"in this.props&&w.max!==E&&typeof B=="number"&&B>E&&T&&T(E),"min"in this.props&&w.min!==c&&typeof B=="number"&&B1&&arguments[1]!==void 0?arguments[1]:this.props.min,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,T=parseFloat(w);return isNaN(T)?w:(TU&&(T=U),T)}},{key:"setValue",value:function(w,q){var U=this.props.precision,T=this.isNotCompleteNumber(parseFloat(w))?null:parseFloat(w),E=this.state.value,c=E===void 0?null:E,l=this.state.inputValue,m=l===void 0?null:l,_=typeof T=="number"?T.toFixed(U):"".concat(T),B=T!==c||_!=="".concat(m);return"value"in this.props?(m=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:m},q)):this.setState({value:T,inputValue:this.toPrecisionAsStep(w)},q),B&&this.props.onChange(T),T}},{key:"getMaxPrecision",value:function(w){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.props,T=U.precision,E=U.step;if(De(T))return T;var c=this.getPrecision(q),l=this.getPrecision(E),m=this.getPrecision(w);return w?Math.max(m,c+l):c+l}},{key:"getPrecisionFactor",value:function(w){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.getMaxPrecision(w,q);return Math.pow(10,U)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(w){return this.props.formatter?this.props.formatter(w):w}},{key:"toPrecisionAsStep",value:function(w){if(this.isNotCompleteNumber(w)||w==="")return w;var q=Math.abs(this.getMaxPrecision(w));return isNaN(q)?w.toString():Number(w).toFixed(q)}},{key:"toNumber",value:function(w){var q=this.props.precision,U=this.state.focused,T=w&&w.length>16&&U;return this.isNotCompleteNumber(w)||T?w:De(q)?Math.round(w*Math.pow(10,q))/Math.pow(10,q):Number(w)}},{key:"upStep",value:function(w,q){var U=this.props.step,T=this.getPrecisionFactor(w,q),E=Math.abs(this.getMaxPrecision(w,q)),c=((T*w+T*U*q)/T).toFixed(E);return this.toNumber(c)}},{key:"downStep",value:function(w,q){var U=this.props.step,T=this.getPrecisionFactor(w,q),E=Math.abs(this.getMaxPrecision(w,q)),c=((T*w-T*U*q)/T).toFixed(E);return this.toNumber(c)}},{key:"step",value:function(w,q){var U=this,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=arguments.length>3?arguments[3]:void 0;this.stop(),q&&(q.persist(),q.preventDefault());var c=this.props;if(c.disabled)return;var l=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(l))return;var m=this["".concat(w,"Step")](l,T),_=m>c.max||mc.max?m=c.max:m=ue),Pe=(ot||ot===0)&&(isNaN(ot)||Number(ot)<=Ae),I=ye||T||E,A=Pe||T||E,O=N()("".concat(U,"-handler"),"".concat(U,"-handler-up"),Object(Ce.a)({},"".concat(U,"-handler-up-disabled"),I)),f=N()("".concat(U,"-handler"),"".concat(U,"-handler-down"),Object(Ce.a)({},"".concat(U,"-handler-down-disabled"),A)),p=c?{onTouchStart:I?j:this.up,onTouchEnd:this.stop}:{onMouseDown:I?j:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},b=c?{onTouchStart:A?j:this.down,onTouchEnd:this.stop}:{onMouseDown:A?j:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return P.a.createElement("div",{className:Ke,style:de,title:ie,onMouseEnter:G,onMouseLeave:Z,onMouseOver:M,onMouseOut:J,onFocus:function(){return null},onBlur:function(){return null}},P.a.createElement("div",{className:"".concat(U,"-handler-wrap")},P.a.createElement("span",Object.assign({unselectable:"on"},p,{role:"button","aria-label":"Increase Value","aria-disabled":I,className:O}),m||P.a.createElement("span",{unselectable:"on",className:"".concat(U,"-handler-up-inner"),onClick:le})),P.a.createElement("span",Object.assign({unselectable:"on"},b,{role:"button","aria-label":"Decrease Value","aria-disabled":A,className:f}),_||P.a.createElement("span",{unselectable:"on",className:"".concat(U,"-handler-down-inner"),onClick:le}))),P.a.createElement("div",{className:"".concat(U,"-input-wrap")},P.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ae,"aria-valuemax":ue,"aria-valuenow":ot,required:h,type:re,placeholder:pe,onPaste:Ue,onClick:C,onMouseUp:this.onMouseUp,className:"".concat(U,"-input"),tabIndex:g,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:it?this.onKeyDown:j,onKeyUp:it?this.onKeyUp:j,autoFocus:be,maxLength:Le,readOnly:E,disabled:T,max:ue,min:Ae,step:Re,name:Ee,title:ie,id:Y,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(qe),pattern:ke,inputMode:se,onInput:Je},he))))}}]),Q}(P.a.Component);xe.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Ie,min:-Ie,step:1,style:{},onChange:j,onKeyDown:j,onPressEnter:j,onFocus:j,onBlur:j,parser:ce,required:!1,autoComplete:"off"};var we=xe,fe=Ye.a=we},h78n:function(ft,Ye,x){"use strict";x.d(Ye,"a",function(){return w});var K=x("cDcd"),Ce=x.n(K),oe=x("TSYQ"),Se=x.n(oe),ge={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},ee=function(T){var E=T.map(function(){return Object(K.useRef)()}),c=Object(K.useRef)();return Object(K.useEffect)(function(){var l=Date.now(),m=!1;Object.keys(E).forEach(function(_){var B=E[_].current;if(!B)return;m=!0;var ue=B.style;ue.transitionDuration=".3s, .3s, .3s, .06s",c.current&&l-c.current<100&&(ue.transitionDuration="0s, 0s")}),m&&(c.current=Date.now())}),[E]};function L(){return L=Object.assign||function(U){for(var T=1;TU.length)&&(T=U.length);for(var E=0,c=new Array(T);E=0)continue;if(!Object.prototype.propertyIsEnumerable.call(U,c))continue;E[c]=U[c]}}return E}function F(U,T){if(U==null)return{};var E={},c=Object.keys(U),l,m;for(m=0;m=0)continue;E[l]=U[l]}return E}var z=function(T){var E=T.className,c=T.percent,l=T.prefixCls,m=T.strokeColor,_=T.strokeLinecap,B=T.strokeWidth,ue=T.style,Ae=T.trailColor,de=T.trailWidth,ie=T.transition,G=te(T,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete G.gapPosition;var Z=Array.isArray(c)?c:[c],M=Array.isArray(m)?m:[m],J=ee(Z),h=W(J,1),C=h[0],g=B/2,re=100-B/2,pe="M ".concat(_==="round"?g:0,",").concat(g,` L `).concat(_==="round"?re:100,",").concat(g),Y="0 0 100 ".concat(B),se=0;return Ce.a.createElement("svg",L({className:Se()("".concat(l,"-line"),E),viewBox:Y,preserveAspectRatio:"none",style:ue},G),Ce.a.createElement("path",{className:"".concat(l,"-line-trail"),d:pe,strokeLinecap:_,stroke:Ae,strokeWidth:de||B,fillOpacity:"0"}),Z.map(function(ke,Re){var Le={strokeDasharray:"".concat(ke,"px, 100px"),strokeDashoffset:"-".concat(se,"px"),transition:ie||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},be=M[Re]||M[M.length-1];return se+=ke,Ce.a.createElement("path",{key:Re,className:"".concat(l,"-line-path"),d:pe,strokeLinecap:_,stroke:be,strokeWidth:B,fillOpacity:"0",ref:C[Re],style:Le})}))};z.defaultProps=ge;var j=z;function le(){return le=Object.assign||function(U){for(var T=1;TU.length)&&(T=U.length);for(var E=0,c=new Array(T);E=0)continue;if(!Object.prototype.propertyIsEnumerable.call(U,c))continue;E[c]=U[c]}}return E}function we(U,T){if(U==null)return{};var E={},c=Object.keys(U),l,m;for(m=0;m=0)continue;E[l]=U[l]}return E}var fe=0;function ne(U){return+U.replace("%","")}function v(U){return Array.isArray(U)?U:[U]}function Q(U,T,E,c){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,m=arguments.length>5?arguments[5]:void 0,_=50-c/2,B=0,ue=-_,Ae=0,de=-2*_;switch(m){case"left":B=-_,ue=0,Ae=2*_,de=0;break;case"right":B=_,ue=0,Ae=-2*_,de=0;break;case"bottom":ue=_,de=2*_;break;default:}var ie="M 50,50 m ".concat(B,",").concat(ue,` a `).concat(_,",").concat(_," 0 1 1 ").concat(Ae,",").concat(-de,` a `).concat(_,",").concat(_," 0 1 1 ").concat(-Ae,",").concat(de),G=Math.PI*2*_,Z={stroke:E,strokeDasharray:"".concat(T/100*(G-l),"px ").concat(G,"px"),strokeDashoffset:"-".concat(l/2+U/100*(G-l),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ie,pathStyle:Z}}var H=function(T){var E=T.prefixCls,c=T.strokeWidth,l=T.trailWidth,m=T.gapDegree,_=T.gapPosition,B=T.trailColor,ue=T.strokeLinecap,Ae=T.style,de=T.className,ie=T.strokeColor,G=T.percent,Z=xe(T,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),M=Object(K.useMemo)(function(){return fe+=1,fe},[]),J=Q(0,100,B,c,m,_),h=J.pathString,C=J.pathStyle,g=v(G),re=v(ie),pe=re.find(function(Le){return Object.prototype.toString.call(Le)==="[object Object]"}),Y=ee(g),se=ce(Y,1),ke=se[0],Re=function(){var be=0;return g.map(function(Ee,Ue){var Je=re[Ue]||re[re.length-1],ze=Object.prototype.toString.call(Je)==="[object Object]"?"url(#".concat(E,"-gradient-").concat(M,")"):"",Ve=Q(be,Ee,Je,c,m,_);return be+=Ee,Ce.a.createElement("path",{key:Ue,className:"".concat(E,"-circle-path"),d:Ve.pathString,stroke:ze,strokeLinecap:ue,strokeWidth:c,opacity:Ee===0?0:1,fillOpacity:"0",style:Ve.pathStyle,ref:ke[Ue]})})};return Ce.a.createElement("svg",le({className:Se()("".concat(E,"-circle"),de),viewBox:"0 0 100 100",style:Ae},Z),pe&&Ce.a.createElement("defs",null,Ce.a.createElement("linearGradient",{id:"".concat(E,"-gradient-").concat(M),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(pe).sort(function(Le,be){return ne(Le)-ne(be)}).map(function(Le,be){return Ce.a.createElement("stop",{key:be,offset:Le,stopColor:pe[Le]})}))),Ce.a.createElement("path",{className:"".concat(E,"-circle-trail"),d:h,stroke:B,strokeLinecap:ue,strokeWidth:l||c,fillOpacity:"0",style:C}),Re().reverse())};H.defaultProps=ge;var w=H,q={Line:j,Circle:w}},iIVh:function(ft,Ye,x){},kSUc:function(ft,Ye,x){},lZu9:function(ft,Ye,x){(function(K){K(x("VrN/"),x("1eCo"),x("8EBN"))})(function(K){"use strict";K.defineMode("markdown",function(Ce,oe){var Se=K.getMode(Ce,"text/html"),ge=Se.name=="null";function ee(c){if(K.findModeByName){var l=K.findModeByName(c);l&&(c=l.mime||l.mimes[0])}var m=K.getMode(Ce,c);return m.name=="null"?null:m}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var L={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 W in L)L.hasOwnProperty(W)&&oe.tokenTypeOverrides[W]&&(L[W]=oe.tokenTypeOverrides[W]);var P=/^([*\-_])(?:\s*\1){2,}\s*$/,V=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,N=/^\[(x| )\](?=\s)/i,R=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ve=/^ {0,3}(?:\={1,}|-{2,})\s*$/,te=/^[^#!\[\]*_\\<>` "'(~:]+/,F=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,z=/^\s*\[[^\]]+?\]:.*$/,j=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,le=" ";function ce(c,l,m){return l.f=l.inline=m,m(c,l)}function Oe(c,l,m){return l.f=l.block=m,m(c,l)}function Xe(c){return!c||!/\S/.test(c.string)}function Ie(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==Fe){var l=ge;if(!l){var m=K.innerMode(Se,c.htmlState);l=m.mode.name=="xml"&&m.state.tagStart===null&&!m.state.context&&m.state.tokenize.isInText}l&&(c.f=ne,c.block=De,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function De(c,l){var m=c.column()===l.indentation,_=Xe(l.prevLine.stream),B=l.indentedCode,ue=l.prevLine.hr,Ae=l.list!==!1,de=(l.listStack[l.listStack.length-1]||0)+3;l.indentedCode=!1;var ie=l.indentation;if(l.indentationDiff===null&&(l.indentationDiff=l.indentation,Ae)){for(l.list=null;ie=4&&(B||l.prevLine.fencedCodeEnd||l.prevLine.header||_))return c.skipToEnd(),l.indentedCode=!0,L.code;if(c.eatSpace())return null;if(m&&l.indentation<=de&&(M=c.match(R))&&M[1].length<=6)return l.quote=0,l.header=M[1].length,l.thisLine.header=!0,oe.highlightFormatting&&(l.formatting="header"),l.f=l.inline,we(l);if(l.indentation<=de&&c.eat(">"))return l.quote=m?1:l.quote+1,oe.highlightFormatting&&(l.formatting="quote"),c.eatSpace(),we(l);if(!Z&&!l.setext&&m&&l.indentation<=de&&(M=c.match(V))){var J=M[1]?"ol":"ul";return l.indentation=ie+c.current().length,l.list=!0,l.quote=0,l.listStack.push(l.indentation),l.em=!1,l.strong=!1,l.code=!1,l.strikethrough=!1,oe.taskLists&&c.match(N,!1)&&(l.taskList=!0),l.f=l.inline,oe.highlightFormatting&&(l.formatting=["list","list-"+J]),we(l)}else{if(m&&l.indentation<=de&&(M=c.match(F,!0)))return l.quote=0,l.fencedEndRE=new RegExp(M[1]+"+ *$"),l.localMode=oe.fencedCodeBlockHighlighting&&ee(M[2]||oe.fencedCodeBlockDefaultMode),l.localMode&&(l.localState=K.startState(l.localMode)),l.f=l.block=xe,oe.highlightFormatting&&(l.formatting="code-block"),l.code=-1,we(l);if(l.setext||(!G||!Ae)&&!l.quote&&l.list===!1&&!l.code&&!Z&&!z.test(c.string)&&(M=c.lookAhead(1))&&(M=M.match(ve)))return l.setext?(l.header=l.setext,l.setext=0,c.skipToEnd(),oe.highlightFormatting&&(l.formatting="header")):(l.header=M[0].charAt(0)=="="?1:2,l.setext=l.header),l.thisLine.header=!0,l.f=l.inline,we(l);if(Z)return c.skipToEnd(),l.hr=!0,l.thisLine.hr=!0,L.hr;if(c.peek()==="[")return ce(c,l,q)}return ce(c,l,l.inline)}function Fe(c,l){var m=Se.token(c,l.htmlState);if(!ge){var _=K.innerMode(Se,l.htmlState);(_.mode.name=="xml"&&_.state.tagStart===null&&!_.state.context&&_.state.tokenize.isInText||l.md_inside&&c.current().indexOf(">")>-1)&&(l.f=ne,l.block=De,l.htmlState=null)}return m}function xe(c,l){var m=l.listStack[l.listStack.length-1]||0,_=l.indentation=c.quote?l.push(L.formatting+"-"+c.formatting[m]+"-"+c.quote):l.push("error"))}if(c.taskOpen)return l.push("meta"),l.length?l.join(" "):null;if(c.taskClosed)return l.push("property"),l.length?l.join(" "):null;if(c.linkHref?l.push(L.linkHref,"url"):(c.strong&&l.push(L.strong),c.em&&l.push(L.em),c.strikethrough&&l.push(L.strikethrough),c.emoji&&l.push(L.emoji),c.linkText&&l.push(L.linkText),c.code&&l.push(L.code),c.image&&l.push(L.image),c.imageAltText&&l.push(L.imageAltText,"link"),c.imageMarker&&l.push(L.imageMarker)),c.header&&l.push(L.header,L.header+"-"+c.header),c.quote&&(l.push(L.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=c.quote?l.push(L.quote+"-"+c.quote):l.push(L.quote+"-"+oe.maxBlockquoteDepth)),c.list!==!1){var _=(c.listStack.length-1)%3;_?_===1?l.push(L.list2):l.push(L.list3):l.push(L.list1)}return c.trailingSpaceNewLine?l.push("trailing-space-new-line"):c.trailingSpace&&l.push("trailing-space-"+(c.trailingSpace%2?"a":"b")),l.length?l.join(" "):null}function fe(c,l){return c.match(te,!0)?we(l):void 0}function ne(c,l){var m=l.text(c,l);if(typeof m!="undefined")return m;if(l.list)return l.list=null,we(l);if(l.taskList){var _=c.match(N,!0)[1]===" ";return _?l.taskOpen=!0:l.taskClosed=!0,oe.highlightFormatting&&(l.formatting="task"),l.taskList=!1,we(l)}if(l.taskOpen=!1,l.taskClosed=!1,l.header&&c.match(/^#+$/,!0))return oe.highlightFormatting&&(l.formatting="header"),we(l);var B=c.next();if(l.linkTitle){l.linkTitle=!1;var ue=B;B==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ae="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(c.match(new RegExp(Ae),!0))return L.linkHref}if(B==="`"){var de=l.formatting;oe.highlightFormatting&&(l.formatting="code"),c.eatWhile("`");var ie=c.current().length;if(l.code==0&&(!l.quote||ie==1))return l.code=ie,we(l);if(ie==l.code){var G=we(l);return l.code=0,G}else return l.formatting=de,we(l)}else if(l.code)return we(l);if(B==="\\"&&(c.next(),oe.highlightFormatting)){var Z=we(l),M=L.formatting+"-escape";return Z?Z+" "+M:M}if(B==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return l.imageMarker=!0,l.image=!0,oe.highlightFormatting&&(l.formatting="image"),we(l);if(B==="["&&l.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return l.imageMarker=!1,l.imageAltText=!0,oe.highlightFormatting&&(l.formatting="image"),we(l);if(B==="]"&&l.imageAltText){oe.highlightFormatting&&(l.formatting="image");var Z=we(l);return l.imageAltText=!1,l.image=!1,l.inline=l.f=Q,Z}if(B==="["&&!l.image)return l.linkText&&c.match(/^.*?\]/)||(l.linkText=!0,oe.highlightFormatting&&(l.formatting="link")),we(l);if(B==="]"&&l.linkText){oe.highlightFormatting&&(l.formatting="link");var Z=we(l);return l.linkText=!1,l.inline=l.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?Q:ne,Z}if(B==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=v,oe.highlightFormatting&&(l.formatting="link");var Z=we(l);return Z?Z+=" ":Z="",Z+L.linkInline}if(B==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=v,oe.highlightFormatting&&(l.formatting="link");var Z=we(l);return Z?Z+=" ":Z="",Z+L.linkEmail}if(oe.xml&&B==="<"&&c.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var J=c.string.indexOf(">",c.pos);if(J!=-1){var h=c.string.substring(c.start,J);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(h)&&(l.md_inside=!0)}return c.backUp(1),l.htmlState=K.startState(Se),Oe(c,l,Fe)}if(oe.xml&&B==="<"&&c.match(/^\/\w*?>/))return l.md_inside=!1,"tag";if(B==="*"||B==="_"){for(var C=1,g=c.pos==1?" ":c.string.charAt(c.pos-2);C<3&&c.eat(B);)C++;var re=c.peek()||" ",pe=!/\s/.test(re)&&(!j.test(re)||/\s/.test(g)||j.test(g)),Y=!/\s/.test(g)&&(!j.test(g)||/\s/.test(re)||j.test(re)),se=null,ke=null;if(C%2&&(!l.em&&pe&&(B==="*"||!Y||j.test(g))?se=!0:l.em==B&&Y&&(B==="*"||!pe||j.test(re))&&(se=!1)),C>1&&(!l.strong&&pe&&(B==="*"||!Y||j.test(g))?ke=!0:l.strong==B&&Y&&(B==="*"||!pe||j.test(re))&&(ke=!1)),ke!=null||se!=null){oe.highlightFormatting&&(l.formatting=se==null?"strong":ke==null?"em":"strong em"),se===!0&&(l.em=B),ke===!0&&(l.strong=B);var G=we(l);return se===!1&&(l.em=!1),ke===!1&&(l.strong=!1),G}}else if(B===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return we(l);c.backUp(1)}if(oe.strikethrough){if(B==="~"&&c.eatWhile(B)){if(l.strikethrough){oe.highlightFormatting&&(l.formatting="strikethrough");var G=we(l);return l.strikethrough=!1,G}else if(c.match(/^[^\s]/,!1))return l.strikethrough=!0,oe.highlightFormatting&&(l.formatting="strikethrough"),we(l)}else if(B===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return we(l);c.backUp(2)}}if(oe.emoji&&B===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){l.emoji=!0,oe.highlightFormatting&&(l.formatting="emoji");var Re=we(l);return l.emoji=!1,Re}return B===" "&&(c.match(/^ +$/,!1)?l.trailingSpace++:l.trailingSpace&&(l.trailingSpaceNewLine=!0)),we(l)}function v(c,l){var m=c.next();if(m===">"){l.f=l.inline=ne,oe.highlightFormatting&&(l.formatting="link");var _=we(l);return _?_+=" ":_="",_+L.linkInline}return c.match(/^[^>]+/,!0),L.linkInline}function Q(c,l){if(c.eatSpace())return null;var m=c.next();return m==="("||m==="["?(l.f=l.inline=w(m==="("?")":"]"),oe.highlightFormatting&&(l.formatting="link-string"),l.linkHref=!0,we(l)):"error"}var H={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(c){return function(l,m){var _=l.next();if(_===c){m.f=m.inline=ne,oe.highlightFormatting&&(m.formatting="link-string");var B=we(m);return m.linkHref=!1,B}return l.match(H[c]),m.linkHref=!0,we(m)}}function q(c,l){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(l.f=U,c.next(),oe.highlightFormatting&&(l.formatting="link"),l.linkText=!0,we(l)):ce(c,l,ne)}function U(c,l){if(c.match(/^\]:/,!0)){l.f=l.inline=T,oe.highlightFormatting&&(l.formatting="link");var m=we(l);return l.linkText=!1,m}return c.match(/^([^\]\\]|\\.)+/,!0),L.linkText}function T(c,l){return c.eatSpace()?null:(c.match(/^[^\s]+/,!0),c.peek()===void 0?l.linkTitle=!0:c.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),l.f=l.inline=ne,L.linkHref+" url")}var E={startState:function(){return{f:De,prevLine:{stream:null},thisLine:{stream:null},block:De,htmlState:null,indentation:0,inline:ne,text:fe,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&&K.copyState(Se,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?K.copyState(c.localMode,c.localState):null,inline:c.inline,text:c.text,formatting:!1,linkText:c.linkText,linkTitle:c.linkTitle,linkHref:c.linkHref,code:c.code,em:c.em,strong:c.strong,strikethrough:c.strikethrough,emoji:c.emoji,header:c.header,setext:c.setext,hr:c.hr,taskList:c.taskList,list:c.list,listStack:c.listStack.slice(0),quote:c.quote,indentedCode:c.indentedCode,trailingSpace:c.trailingSpace,trailingSpaceNewLine:c.trailingSpaceNewLine,md_inside:c.md_inside,fencedEndRE:c.fencedEndRE}},token:function(c,l){if(l.formatting=!1,c!=l.thisLine.stream){if(l.header=0,l.hr=!1,c.match(/^\s*$/,!0))return Ie(l),null;if(l.prevLine=l.thisLine,l.thisLine={stream:c},l.taskList=!1,l.trailingSpace=0,l.trailingSpaceNewLine=!1,!l.localState&&(l.f=l.block,l.f!=Fe)){var m=c.match(/^\s*/,!0)[0].replace(/\t/g,le).length;if(l.indentation=m,l.indentationDiff=null,m>0)return null}}return l.f(c,l)},innerMode:function(c){return c.block==Fe?{state:c.htmlState,mode:Se}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:E}},indent:function(c,l,m){return c.block==Fe&&Se.indent?Se.indent(c.htmlState,l,m):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,l,m):K.Pass},blankLine:Ie,getType:we,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return E},"xml"),K.defineMIME("text/markdown","markdown"),K.defineMIME("text/x-markdown","markdown")})},nojB:function(ft,Ye,x){"use strict";x.r(Ye);var K=x("T2oS"),Ce=x("W9HT"),oe=x("9og8"),Se=x("tJVT"),ge=x("k1fw"),ee=x("WmNS"),L=x.n(ee),W=x("cDcd"),P=x.n(W),V=x("X0ci"),N=x("iIVh"),R=x("Ty5D"),ve=x("55Ip"),te=x("+L6B"),F=x("2/Rp"),z=x("5NDa"),j=x("5rEg"),le=x("2qtc"),ce=x("kLXV"),Oe=x("miYZ"),Xe=x("tsqr"),Ie=x("PpiC"),De=x("y8nQ"),Fe=x("Vl3Y"),xe=x("DZo9"),we=x("8z0m"),fe=x("sRBo"),ne=x("kaz8"),v=x("LtfV"),Q=x("m3rI"),H=x("Ot1p"),w=ne.a.Group,q=we.a.Dragger;function U(B,ue){var Ae=new FileReader;Ae.addEventListener("load",function(){return ue(Ae.result)}),Ae.readAsDataURL(B)}var T=function(B){var ue=B.callback,Ae=B.tags,de=Ae===void 0?[]:Ae,ie=B.initialValues,G=ie===void 0?{}:ie,Z=B.removeAttachment,M=Object(W.useState)(""),J=Object(Se.a)(M,2),h=J[0],C=J[1],g=Fe.a.useForm(),re=Object(Se.a)(g,1),pe=re[0];function Y(be){var Ee=be.cover_id,Ue=be.attachment_ids,Je=Object(Ie.a)(be,["cover_id","attachment_ids"]);ue(Object(ge.a)(Object(ge.a)({},Je),{},{cover_id:Ee==null?void 0:Ee.map(function(ze){return ze.response?ze.response.id:ze.uid})[(Ee==null?void 0:Ee.length)-1],attachment_ids:Ue?Ue==null?void 0:Ue.map(function(ze){return ze.response?ze.response.id:ze.uid}):[]}))}function se(be){return Array.isArray(be)?be:be&&be.fileList}var ke={multiple:!0,beforeUpload:function(Ee){var Ue=Ee.size/1024/1024<100;if(!Ue)return Xe.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(100MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"),Ue},action:"".concat(Q.a.API_SERVER,"/api/attachments.json"),onRemove:function(Ee){ce.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){return Z(Ee.response?Ee.response.id:Ee.uid)},onCancel:function(){return!1}})}};function Re(be){be.file.status==="done"&&U(be.file.originFileObj,function(Ee){return C(Ee)})}var Le={showUploadList:!1,withCredentials:!0,action:"".concat(Q.a.API_SERVER,"/api/attachments.json"),onChange:Re};return Object(W.useEffect)(function(){G.title&&(pe.setFieldsValue(G),G.cover_id.length>0&&C(Q.a.IMG_SERVER+G.cover_id[0].url))},[G]),P.a.createElement(Fe.a,{form:pe,initialValues:G,className:"moop-panel",onFinish:Y},P.a.createElement(Fe.a.Item,{label:"\u6807\u9898",name:"title",extra:P.a.createElement("p",{className:"tip"},"\u7B80\u660E\u627C\u8981\u4ECB\u7ECD\u6587\u6863/\u89C6\u9891\u6240\u5305\u542B\u7684\u4E3B\u8981\u7684\u5185\u5BB9"),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},P.a.createElement(j.a,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),P.a.createElement("div",{className:"flex-container"},P.a.createElement(Fe.a.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},P.a.createElement(j.a,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),P.a.createElement(Fe.a.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},P.a.createElement(j.a,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),P.a.createElement(Fe.a.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},P.a.createElement(w,null,de.map(function(be){return P.a.createElement(ne.a,{key:be.id,value:be.id}," ",be.name," ")}))),P.a.createElement(Fe.a.Item,{name:"publish",valuePropName:"checked"},P.a.createElement(ne.a,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),P.a.createElement(Fe.a.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},P.a.createElement(H.a,{id:"moop_cases_content",height:400})),P.a.createElement(Fe.a.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:se},P.a.createElement(q,ke,P.a.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),P.a.createElement("p",{className:"c-grey-c"},"\u4ECE\u6211\u7684\u7535\u8111\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u6863\uFF1A\u6309\u4F4FCTRL\u53EF\u4EE5\u4E0A\u4F20\u591A\u4EFD\u6587\u6863\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\uFF1A100MB"))),P.a.createElement(Fe.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:se,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},P.a.createElement(we.a,Le,h?P.a.createElement("img",{src:h,width:120}):P.a.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",P.a.createElement(v.a,null)," "))),P.a.createElement("div",{className:"desc"},P.a.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),P.a.createElement("p",null," \u5E73\u53F0\u7BA1\u7406\u5458\u5C06\u5BF9\u6BCF\u5929\u65B0\u4E0A\u4F20\u7684\u6587\u6863\u8FDB\u884C\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u7684\u6587\u6863\u5C06\u516C\u5F00\u663E\u793A\uFF0C\u5426\u5219\u5C06\u79C1\u6709\u5316\u6216\u79FB\u9664 ")),P.a.createElement("div",{className:"desc"},P.a.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),P.a.createElement("ul",{style:{padding:0}},P.a.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),P.a.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",P.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",P.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34798",target:"_blank"},"\u6848\u4F8B\u4F7F\u7528\u8BF4\u660E\u4E66"),"\u4EE5\u53CA\u5176\u4ED6\u8D44\u6599\u7B49\uFF0C\u4E0A\u4F20\u652F\u6301\u7684\u6587\u4EF6\u6700\u5927\u5BB9\u91CF\uFF1A100MB\uFF1B"),P.a.createElement("li",null,"3.\u8BF7\u786E\u4FDD\u4E0A\u4F20\u5185\u5BB9\u65E0\u4FB5\u6743\u6216\u8FDD\u53CD\u56FD\u5BB6\u5173\u4E8E\u4E92\u8054\u7F51\u653F\u7B56\u7684\u4E0D\u826F\u884C\u4E3A\uFF1B"),P.a.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),P.a.createElement(Fe.a.Item,{style:{marginTop:10}},P.a.createElement(F.a,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},E=x("wzkS"),c={loading:!1,data:{},tags:[]},l;(function(B){B[B.GET_DATA=0]="GET_DATA",B[B.SET_LOADING=1]="SET_LOADING",B[B.GET_TAGS=2]="GET_TAGS"})(l||(l={}));function m(B,ue){switch(ue.type){case l.GET_DATA:return Object(ge.a)(Object(ge.a)({},B),ue.payload);case l.GET_TAGS:return Object(ge.a)(Object(ge.a)({},B),{},{tags:ue.payload});case l.SET_LOADING:return Object(ge.a)(Object(ge.a)({},B),{},{loading:ue.payload});default:throw new Error}}var _=Ye.default=function(){var B=Object(R.i)(),ue=B.caseId,Ae=Object(R.g)(),de=Object(W.useReducer)(m,c),ie=Object(Se.a)(de,2),G=ie[0],Z=ie[1],M=G.loading,J=G.tags,h=G.data;Object(W.useEffect)(function(){function pe(){return Y.apply(this,arguments)}function Y(){return Y=Object(oe.a)(L.a.mark(function se(){var ke;return L.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,Object(E.b)();case 2:ke=Le.sent,Z({type:l.GET_TAGS,payload:ke.library_tags});case 4:case"end":return Le.stop()}},se)})),Y.apply(this,arguments)}pe()},[]),Object(W.useEffect)(function(){var pe=!1;function Y(){return se.apply(this,arguments)}function se(){return se=Object(oe.a)(L.a.mark(function ke(){var Re,Le,be,Ee,Ue,Je,ze,Ve,ot;return L.a.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Z({type:l.SET_LOADING,payload:!1}),Ke.next=3,Object(E.c)(ue);case 3:Re=Ke.sent,Le=Re.author_name,be=Re.author_school_name,Ee=Re.content,Ue=Re.cover,Je=Re.attachments,ze=Re.status,Ve=Re.title,ot=Re.tags,pe||(Re.status===404?Ae.push("/moop_cases"):Z({type:l.GET_DATA,payload:{data:{title:Ve,author_name:Le,author_school_name:be,content:Ee,tag_ids:ot.map(function(he){return he.id}),publish:ze==="published",attachment_ids:Je.map(function(he){return{uid:he.id,id:he.id,name:he.title,url:he.url,filesize:he.filesize,status:"done"}}),cover_id:Ue!=null&&Ue.id?[{uid:Ue==null?void 0:Ue.id,id:Ue==null?void 0:Ue.id,name:Ue==null?void 0:Ue.title,url:Ue==null?void 0:Ue.url,filesize:Ue==null?void 0:Ue.filesize,status:"done"}]:[]},loading:!1}}));case 6:case"end":return Ke.stop()}},ke)})),se.apply(this,arguments)}return!pe&&ue&&Y(),function(){pe=!0}},[ue]);function C(pe){return g.apply(this,arguments)}function g(){return g=Object(oe.a)(L.a.mark(function pe(Y){var se,ke;return L.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(!ue){Le.next=6;break}return Le.next=3,Object(E.e)(ue,Y);case 3:Ae.push("/moop_cases/".concat(ue,"/publish-success")),Le.next=11;break;case 6:return Le.next=8,Object(E.a)(Y);case 8:se=Le.sent,ke=se.id,ke&&Ae.push("/moop_cases/".concat(ke,"/publish-success"));case 11:case"end":return Le.stop()}},pe)})),g.apply(this,arguments)}var re={initialValues:h,tags:J,removeAttachment:E.d,callback:C};return P.a.createElement(Ce.a,{spinning:M,delay:500},P.a.createElement("div",{className:"moop-info"},P.a.createElement("div",{className:"crumb"},P.a.createElement(ve.a,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),P.a.createElement("span",null,"\u65B0\u5EFA")),P.a.createElement("div",{className:"title"},P.a.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),P.a.createElement(ve.a,{to:"/moop_cases"},"\u8FD4\u56DE")),P.a.createElement(T,re)))}},osHv:function(ft,Ye,x){(function(K){K(x("VrN/"))})(function(K){"use strict";var Ce=K.Pos;function oe(j,le){return j.line-le.line||j.ch-le.ch}var Se="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ge=Se+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ee=new RegExp("<(/?)(["+Se+"]["+ge+"]*)","g");function L(j,le,ce,Oe){this.line=le,this.ch=ce,this.cm=j,this.text=j.getLine(le),this.min=Oe?Math.max(Oe.from,j.firstLine()):j.firstLine(),this.max=Oe?Math.min(Oe.to-1,j.lastLine()):j.lastLine()}function W(j,le){var ce=j.cm.getTokenTypeAt(Ce(j.line,le));return ce&&/\btag\b/.test(ce)}function P(j){return j.line>=j.max?void 0:(j.ch=0,j.text=j.cm.getLine(++j.line),!0)}function V(j){return j.line<=j.min?void 0:(j.text=j.cm.getLine(--j.line),j.ch=j.text.length,!0)}function N(j){for(;;){var le=j.text.indexOf(">",j.ch);if(le==-1){if(P(j))continue;return}if(!W(j,le+1)){j.ch=le+1;continue}var ce=j.text.lastIndexOf("/",le),Oe=ce>-1&&!/\S/.test(j.text.slice(ce+1,le));return j.ch=le+1,Oe?"selfClose":"regular"}}function R(j){for(;;){var le=j.ch?j.text.lastIndexOf("<",j.ch-1):-1;if(le==-1){if(V(j))continue;return}if(!W(j,le+1)){j.ch=le;continue}ee.lastIndex=le,j.ch=le;var ce=ee.exec(j.text);if(ce&&ce.index==le)return ce}}function ve(j){for(;;){ee.lastIndex=j.ch;var le=ee.exec(j.text);if(!le){if(P(j))continue;return}if(!W(j,le.index+1)){j.ch=le.index+1;continue}return j.ch=le.index+le[0].length,le}}function te(j){for(;;){var le=j.ch?j.text.lastIndexOf(">",j.ch-1):-1;if(le==-1){if(V(j))continue;return}if(!W(j,le+1)){j.ch=le;continue}var ce=j.text.lastIndexOf("/",le),Oe=ce>-1&&!/\S/.test(j.text.slice(ce+1,le));return j.ch=le+1,Oe?"selfClose":"regular"}}function F(j,le){for(var ce=[];;){var Oe=ve(j),Xe,Ie=j.line,De=j.ch-(Oe?Oe[0].length:0);if(!Oe||!(Xe=N(j)))return;if(Xe=="selfClose")continue;if(Oe[1]){for(var Fe=ce.length-1;Fe>=0;--Fe)if(ce[Fe]==Oe[2]){ce.length=Fe;break}if(Fe<0&&(!le||le==Oe[2]))return{tag:Oe[2],from:Ce(Ie,De),to:Ce(j.line,j.ch)}}else ce.push(Oe[2])}}function z(j,le){for(var ce=[];;){var Oe=te(j);if(!Oe)return;if(Oe=="selfClose"){R(j);continue}var Xe=j.line,Ie=j.ch,De=R(j);if(!De)return;if(De[1])ce.push(De[2]);else{for(var Fe=ce.length-1;Fe>=0;--Fe)if(ce[Fe]==De[2]){ce.length=Fe;break}if(Fe<0&&(!le||le==De[2]))return{tag:De[2],from:Ce(j.line,j.ch),to:Ce(Xe,Ie)}}}}K.registerHelper("fold","xml",function(j,le){for(var ce=new L(j,le.line,0);;){var Oe=ve(ce);if(!Oe||ce.line!=le.line)return;var Xe=N(ce);if(!Xe)return;if(!Oe[1]&&Xe!="selfClose"){var Ie=Ce(ce.line,ce.ch),De=F(ce,Oe[2]);return De&&oe(De.from,Ie)>0?{from:Ie,to:De.from}:null}}}),K.findMatchingTag=function(j,le,ce){var Oe=new L(j,le.line,le.ch,ce);if(Oe.text.indexOf(">")==-1&&Oe.text.indexOf("<")==-1)return;var Xe=N(Oe),Ie=Xe&&Ce(Oe.line,Oe.ch),De=Xe&&R(Oe);if(!Xe||!De||oe(Oe,le)>0)return;var Fe={from:Ce(Oe.line,Oe.ch),to:Ie,tag:De[2]};return Xe=="selfClose"?{open:Fe,close:null,at:"open"}:De[1]?{open:z(Oe,De[2]),close:Fe,at:"close"}:(Oe=new L(j,Ie.line,Ie.ch,ce),{open:Fe,close:F(Oe,De[2]),at:"open"})},K.findEnclosingTag=function(j,le,ce,Oe){for(var Xe=new L(j,le.line,le.ch,ce);;){var Ie=z(Xe,Oe);if(!Ie)break;var De=new L(j,le.line,le.ch,ce),Fe=F(De,Ie.tag);if(Fe)return{open:Ie,close:Fe}}},K.scanForClosingTag=function(j,le,ce,Oe){var Xe=new L(j,le.line,le.ch,Oe?{from:0,to:Oe}:null);return F(Xe,ce)}})},"p77/":function(ft,Ye,x){},rUJ1:function(ft,Ye){const x=/[&<>"']/,K=/[&<>"']/g,Ce=/[<>"']|&(?!#?\w+;)/,oe=/[<>"']|&(?!#?\w+;)/g,Se={"&":"&","<":"<",">":">",'"':""","'":"'"},ge=xe=>Se[xe];function ee(xe,we){if(we){if(x.test(xe))return xe.replace(K,ge)}else if(Ce.test(xe))return xe.replace(oe,ge);return xe}const L=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function W(xe){return xe.replace(L,(we,fe)=>(fe=fe.toLowerCase(),fe==="colon"?":":fe.charAt(0)==="#"?fe.charAt(1)==="x"?String.fromCharCode(parseInt(fe.substring(2),16)):String.fromCharCode(+fe.substring(1)):""))}const P=/(^|[^\[])\^/g;function V(xe,we){xe=xe.source||xe,we=we||"";const fe={replace:(ne,v)=>(v=v.source||v,v=v.replace(P,"$1"),xe=xe.replace(ne,v),fe),getRegex:()=>new RegExp(xe,we)};return fe}const N=/[^\w:]/g,R=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ve(xe,we,fe){if(xe){let ne;try{ne=decodeURIComponent(W(fe)).replace(N,"").toLowerCase()}catch(v){return null}if(ne.indexOf("javascript:")===0||ne.indexOf("vbscript:")===0||ne.indexOf("data:")===0)return null}we&&!R.test(fe)&&(fe=le(we,fe));try{fe=encodeURI(fe).replace(/%25/g,"%")}catch(ne){return null}return fe}const te={},F=/^[^:]+:\/*[^/]*$/,z=/^([^:]+:)[\s\S]*$/,j=/^([^:]+:\/*[^/]*)[\s\S]*$/;function le(xe,we){te[" "+xe]||(F.test(xe)?te[" "+xe]=xe+"/":te[" "+xe]=Ie(xe,"/",!0)),xe=te[" "+xe];const fe=xe.indexOf(":")===-1;return we.substring(0,2)==="//"?fe?we:xe.replace(z,"$1")+we:we.charAt(0)==="/"?fe?we:xe.replace(j,"$1")+we:xe+we}const ce={exec:function(){}};function Oe(xe){let we=1,fe,ne;for(;we{let q=!1,U=H;for(;--U>=0&&w[U]==="\\";)q=!q;return q?"|":" |"}),ne=fe.split(/ \|/);let v=0;if(ne.length>we)ne.splice(we);else for(;ne.length