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

345 lines
671 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[204,7,9,17],{"+NIl":function(ye,ge,p){(function(O){O(p("VrN/"))})(function(O){"use strict";O.defineMode("stex",function(de,X){"use strict";function se(W,P){W.cmdState.push(P)}function oe(W){return W.cmdState.length>0?W.cmdState[W.cmdState.length-1]:null}function J(W){var P=W.cmdState.pop();P&&P.closeBracket()}function k(W){for(var P=W.cmdState,F=P.length-1;F>=0;F--){var z=P[F];if(z.name=="DEFAULT")continue;return z}return{styleIdentifier:function(){return null}}}function L(W,P,F){return function(){this.name=W,this.bracketNo=0,this.style=P,this.styles=F,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var M={};M.importmodule=L("importmodule","tag",["string","builtin"]),M.documentclass=L("documentclass","tag",["","atom"]),M.usepackage=L("usepackage","tag",["atom"]),M.begin=L("begin","tag",["atom"]),M.end=L("end","tag",["atom"]),M.label=L("label","tag",["atom"]),M.ref=L("ref","tag",["atom"]),M.eqref=L("eqref","tag",["atom"]),M.cite=L("cite","tag",["atom"]),M.bibitem=L("bibitem","tag",["atom"]),M.Bibitem=L("Bibitem","tag",["atom"]),M.RBibitem=L("RBibitem","tag",["atom"]),M.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function U(W,P){W.f=P}function E(W,P){var F;if(W.match(/^\\[a-zA-Z@]+/)){var z=W.current().slice(1);return F=M.hasOwnProperty(z)?M[z]:M.DEFAULT,F=new F,se(P,F),U(P,V),F.style}if(W.match(/^\\[$&%#{}_]/))return"tag";if(W.match(/^\\[,;!\/\\]/))return"tag";if(W.match("\\["))return U(P,function(ne,Re){return w(ne,Re,"\\]")}),"keyword";if(W.match("\\("))return U(P,function(ne,Re){return w(ne,Re,"\\)")}),"keyword";if(W.match("$$"))return U(P,function(ne,Re){return w(ne,Re,"$$")}),"keyword";if(W.match("$"))return U(P,function(ne,Re){return w(ne,Re,"$")}),"keyword";var ee=W.next();if(ee=="%")return W.skipToEnd(),"comment";if(ee=="}"||ee=="]"){if(F=oe(P),F)F.closeBracket(ee),U(P,V);else return"error";return"bracket"}else return ee=="{"||ee=="["?(F=M.DEFAULT,F=new F,se(P,F),"bracket"):/\d/.test(ee)?(W.eatWhile(/[\w.%]/),"atom"):(W.eatWhile(/[\w\-_]/),F=k(P),F.name=="begin"&&(F.argument=W.current()),F.styleIdentifier())}function w(W,P,F){if(W.eatSpace())return null;if(F&&W.match(F))return U(P,E),"keyword";if(W.match(/^\\[a-zA-Z@]+/))return"tag";if(W.match(/^[a-zA-Z]+/))return"variable-2";if(W.match(/^\\[$&%#{}_]/))return"tag";if(W.match(/^\\[,;!\/]/))return"tag";if(W.match(/^[\^_&]/))return"tag";if(W.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(W.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var z=W.next();return z=="{"||z=="}"||z=="["||z=="]"||z=="("||z==")"?"bracket":z=="%"?(W.skipToEnd(),"comment"):"error"}function V(W,P){var F=W.peek(),z;return F=="{"||F=="["?(z=oe(P),z.openBracket(F),W.eat(F),U(P,E),"bracket"):/[ \t\r]/.test(F)?(W.eat(F),null):(U(P,E),J(P),E(W,P))}return{startState:function(){var W=X.inMathMode?function(P,F){return w(P,F)}:E;return{cmdState:[],f:W}},copyState:function(W){return{cmdState:W.cmdState.slice(),f:W.f}},token:function(W,P){return P.f(W,P)},blankLine:function(W){W.f=E,W.cmdState.length=0},lineComment:"%"}}),O.defineMIME("text/x-stex","stex"),O.defineMIME("text/x-latex","stex")})},"/GNS":function(ye,ge,p){ye.exports=p.p+"static/search1.c4136dd4.png"},"19Vz":function(ye,ge,p){(function(O){O(p("VrN/"))})(function(O){O.defineOption("placeholder","",function(L,M,U){var E=U&&U!=O.Init;if(M&&!E)L.on("blur",oe),L.on("change",J),L.on("swapDoc",J),O.on(L.getInputField(),"compositionupdate",L.state.placeholderCompose=function(){se(L)}),J(L);else if(!M&&E){L.off("blur",oe),L.off("change",J),L.off("swapDoc",J),O.off(L.getInputField(),"compositionupdate",L.state.placeholderCompose),de(L);var w=L.getWrapperElement();w.className=w.className.replace(" CodeMirror-empty","")}M&&!L.hasFocus()&&oe(L)});function de(L){L.state.placeholder&&(L.state.placeholder.parentNode.removeChild(L.state.placeholder),L.state.placeholder=null)}function X(L){de(L);var M=L.state.placeholder=document.createElement("pre");M.style.cssText="height: 0; overflow: visible",M.style.direction=L.getOption("direction"),M.className="CodeMirror-placeholder CodeMirror-line-like";var U=L.getOption("placeholder");typeof U=="string"&&(U=document.createTextNode(U)),M.appendChild(U),L.display.lineSpace.insertBefore(M,L.display.lineSpace.firstChild)}function se(L){setTimeout(function(){var M=!1,U=L.getInputField();U.nodeName=="TEXTAREA"?M=!U.value:L.lineCount()==1&&(M=!/[^\u200b]/.test(U.querySelector(".CodeMirror-line").textContent)),M?X(L):de(L)},20)}function oe(L){k(L)&&X(L)}function J(L){var M=L.getWrapperElement(),U=k(L);M.className=M.className.replace(" CodeMirror-empty","")+(U?" CodeMirror-empty":""),U?X(L):de(L)}function k(L){return L.lineCount()===1&&L.getLine(0)===""}})},"1eCo":function(ye,ge,p){(function(O){O(p("VrN/"))})(function(O){"use strict";var de={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},X={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};O.defineMode("xml",function(se,oe){var J=se.indentUnit,k={},L=oe.htmlMode?de:X;for(var M in L)k[M]=L[M];for(var M in oe)k[M]=oe[M];var U,E;function w(S,te){function K(G){return te.tokenize=G,G(S,te)}var b=S.next();if(b=="<")return S.eat("!")?S.eat("[")?S.match("CDATA[")?K(P("atom","]]>")):null:S.match("--")?K(P("comment","-->")):S.match("DOCTYPE",!0,!0)?(S.eatWhile(/[\w\._\-]/),K(F(1))):null:S.eat("?")?(S.eatWhile(/[\w\._\-]/),te.tokenize=P("meta","?>"),"meta"):(U=S.eat("/")?"closeTag":"openTag",te.tokenize=V,"tag bracket");if(b=="&"){var R;return S.eat("#")?S.eat("x")?R=S.eatWhile(/[a-fA-F\d]/)&&S.eat(";"):R=S.eatWhile(/[\d]/)&&S.eat(";"):R=S.eatWhile(/[\w\.\-:]/)&&S.eat(";"),R?"atom":"error"}else return S.eatWhile(/[^&<]/),null}w.isInText=!0;function V(S,te){var K=S.next();if(K==">"||K=="/"&&S.eat(">"))return te.tokenize=w,U=K==">"?"endTag":"selfcloseTag","tag bracket";if(K=="=")return U="equals",null;if(K=="<"){te.tokenize=w,te.state=Re,te.tagName=te.tagStart=null;var b=te.tokenize(S,te);return b?b+" tag error":"tag error"}else return/[\'\"]/.test(K)?(te.tokenize=W(K),te.stringStartCol=S.column(),te.tokenize(S,te)):(S.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function W(S){var te=function(K,b){for(;!K.eol();)if(K.next()==S){b.tokenize=V;break}return"string"};return te.isInAttribute=!0,te}function P(S,te){return function(K,b){for(;!K.eol();){if(K.match(te)){b.tokenize=w;break}K.next()}return S}}function F(S){return function(te,K){for(var b;(b=te.next())!=null;){if(b=="<")return K.tokenize=F(S+1),K.tokenize(te,K);if(b==">")if(S==1){K.tokenize=w;break}else return K.tokenize=F(S-1),K.tokenize(te,K)}return"meta"}}function z(S,te,K){this.prev=S.context,this.tagName=te,this.indent=S.indented,this.startOfLine=K,(k.doNotIndent.hasOwnProperty(te)||S.context&&S.context.noIndent)&&(this.noIndent=!0)}function ee(S){S.context&&(S.context=S.context.prev)}function ne(S,te){for(var K;;){if(!S.context)return;if(K=S.context.tagName,!k.contextGrabbers.hasOwnProperty(K)||!k.contextGrabbers[K].hasOwnProperty(te))return;ee(S)}}function Re(S,te,K){return S=="openTag"?(K.tagStart=te.column(),We):S=="closeTag"?fe:Re}function We(S,te,K){return S=="word"?(K.tagName=te.current(),E="tag",ue):k.allowMissingTagName&&S=="endTag"?(E="tag bracket",ue(S,te,K)):(E="error",We)}function fe(S,te,K){if(S=="word"){var b=te.current();return K.context&&K.context.tagName!=b&&k.implicitlyClosed.hasOwnProperty(K.context.tagName)&&ee(K),K.context&&K.context.tagName==b||k.matchClosing===!1?(E="tag",le):(E="tag error",Be)}else return k.allowMissingTagName&&S=="endTag"?(E="tag bracket",le(S,te,K)):(E="error",Be)}function le(S,te,K){return S!="endTag"?(E="error",le):(ee(K),Re)}function Be(S,te,K){return E="error",le(S,te,K)}function ue(S,te,K){if(S=="word")return E="attribute",me;if(S=="endTag"||S=="selfcloseTag"){var b=K.tagName,R=K.tagStart;return K.tagName=K.tagStart=null,S=="selfcloseTag"||k.autoSelfClosers.hasOwnProperty(b)?ne(K,b):(ne(K,b),K.context=new z(K,b,R==K.indented)),Re}return E="error",ue}function me(S,te,K){return S=="equals"?he:(k.allowMissing||(E="error"),ue(S,te,K))}function he(S,te,K){return S=="string"?q:S=="word"&&k.allowUnquoted?(E="string",ue):(E="error",ue(S,te,K))}function q(S,te,K){return S=="string"?q:ue(S,te,K)}return{startState:function(S){var te={tokenize:w,state:Re,indented:S||0,tagName:null,tagStart:null,context:null};return S!=null&&(te.baseIndent=S),te},token:function(S,te){if(!te.tagName&&S.sol()&&(te.indented=S.indentation()),S.eatSpace())return null;U=null;var K=te.tokenize(S,te);return(K||U)&&K!="comment"&&(E=null,te.state=te.state(U||K,S,te),E&&(K=E=="error"?K+" error":E)),K},indent:function(S,te,K){var b=S.context;if(S.tokenize.isInAttribute)return S.tagStart==S.indented?S.stringStartCol+1:S.indented+J;if(b&&b.noIndent)return O.Pass;if(S.tokenize!=V&&S.tokenize!=w)return K?K.match(/^(\s*)/)[0].length:0;if(S.tagName)return k.multilineTagIndentPastTag!==!1?S.tagStart+S.tagName.length+2:S.tagStart+J*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/<!\[CDATA\[/.test(te))return 0;var R=te&&/^<(\/)?([\w_:\.-]*)/.exec(te);if(R&&R[1])for(;b;)if(b.tagName==R[2]){b=b.prev;break}else if(k.implicitlyClosed.hasOwnProperty(b.tagName))b=b.prev;else break;else if(R)for(;b;){var G=k.contextGrabbers[b.tagName];if(G&&G.hasOwnProperty(R[2]))b=b.prev;else break}for(;b&&b.prev&&!b.startOfLine;)b=b.prev;return b?b.indent+J:S.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(S){S.state==he&&(S.state=ue)},xmlCurrentTag:function(S){return S.tagName?{name:S.tagName,close:S.type=="closeTag"}:null},xmlCurrentContext:function(S){for(var te=[],K=S.context;K;K=K.prev)K.tagName&&te.push(K.tagName);return te.reverse()}}}),O.defineMIME("text/xml","xml"),O.defineMIME("application/xml","xml"),O.mimeModes.hasOwnProperty("text/html")||O.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1mRG":function(ye,ge,p){ye.exports={flex_box_center:"flex_box_center___3n1bh",flex_space_between:"flex_space_between___2-n65",flex_box_vertical_center:"flex_box_vertical_center___1GNdj",flex_box_center_end:"flex_box_center_end___1A6DR",flex_box_column:"flex_box_column___2ZUFV",bg:"bg___2CTpz",flexRow:"flexRow___yGmwj",flexJustifyCenter:"flexJustifyCenter___2AjL6",flexAlignEnd:"flexAlignEnd___2ryQB",flexAlignCenter:"flexAlignCenter___2aRaC",flexColumn:"flexColumn___2ZS6b",formWrap:"formWrap___A51-e",titleWrap:"titleWrap___1MBaC",fieldWrap:"fieldWrap___23lH0",mdWrap:"mdWrap___yhmX6",backgroundFa:"backgroundFa___FLGhP",button:"button___1NmEr",icons:"icons___2U8PU"}},"4qgm":function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH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JbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"55Ip":function(ye,ge,p){"use strict";p.d(ge,"a",function(){return ne}),p.d(ge,"b",function(){return ue});var O=p("Ty5D"),de=p("dI71"),X=p("q1tI"),se=p.n(X),oe=p("YS25"),J=p("17x9"),k=p.n(J),L=p("wx14"),M=p("zLVn"),U=p("9R94"),E=function(he){Object(de.a)(q,he);function q(){for(var te,K=arguments.length,b=new Array(K),R=0;R<K;R++)b[R]=arguments[R];return te=he.call.apply(he,[this].concat(b))||this,te.history=Object(oe.a)(te.props),te}var S=q.prototype;return S.render=function(){return se.a.createElement(O.c,{history:this.history,children:this.props.children})},q}(se.a.Component),w=function(he){Object(de.a)(q,he);function q(){for(var te,K=arguments.length,b=new Array(K),R=0;R<K;R++)b[R]=arguments[R];return te=he.call.apply(he,[this].concat(b))||this,te.history=Object(oe.b)(te.props),te}var S=q.prototype;return S.render=function(){return se.a.createElement(O.c,{history:this.history,children:this.props.children})},q}(se.a.Component),V=function(q,S){return typeof q=="function"?q(S):q},W=function(q,S){return typeof q=="string"?Object(oe.c)(q,null,null,S):q},P=function(q){return q},F=se.a.forwardRef;typeof F=="undefined"&&(F=P);function z(he){return!!(he.metaKey||he.altKey||he.ctrlKey||he.shiftKey)}var ee=F(function(he,q){var S=he.innerRef,te=he.navigate,K=he.onClick,b=Object(M.a)(he,["innerRef","navigate","onClick"]),R=b.target,G=Object(L.a)({},b,{onClick:function(ce){try{K&&K(ce)}catch(x){throw ce.preventDefault(),x}!ce.defaultPrevented&&ce.button===0&&(!R||R==="_self")&&!z(ce)&&(ce.preventDefault(),te())}});return P!==F?G.ref=q||S:G.ref=S,se.a.createElement("a",G)}),ne=F(function(he,q){var S=he.component,te=S===void 0?ee:S,K=he.replace,b=he.to,R=he.innerRef,G=Object(M.a)(he,["component","replace","to","innerRef"]);return se.a.createElement(O.e.Consumer,null,function(I){I||Object(U.a)(!1);var ce=I.history,x=W(V(b,I.location),I.location),m=x?ce.createHref(x):"",Y=Object(L.a)({},G,{href:m,navigate:function(){var ve=V(b,I.location),Fe=K?ce.replace:ce.push;Fe(ve)}});return P!==F?Y.ref=q||R:Y.innerRef=R,se.a.createElement(te,Y)})});if(!1)var Re,We;var fe=function(q){return q},le=se.a.forwardRef;typeof le=="undefined"&&(le=fe);function Be(){for(var he=arguments.length,q=new Array(he),S=0;S<he;S++)q[S]=arguments[S];return q.filter(function(te){return te}).join(" ")}var ue=le(function(he,q){var S=he["aria-current"],te=S===void 0?"page":S,K=he.activeClassName,b=K===void 0?"active":K,R=he.activeStyle,G=he.className,I=he.exact,ce=he.isActive,x=he.location,m=he.sensitive,Y=he.strict,Ae=he.style,ve=he.to,Fe=he.innerRef,He=Object(M.a)(he,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return se.a.createElement(O.e.Consumer,null,function(ke){ke||Object(U.a)(!1);var be=x||ke.location,Ce=W(V(ve,be),be),we=Ce.pathname,Z=we&&we.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),_=Z?Object(O.f)(be.pathname,{path:Z,exact:I,sensitive:m,strict:Y}):null,Pe=!!(ce?ce(_,be):_),et=Pe?Be(G,b):G,st=Pe?Object(L.a)({},Ae,{},R):Ae,qe=Object(L.a)({"aria-current":Pe&&te||null,className:et,style:st,to:Ce},He);return fe!==le?qe.ref=q||Fe:qe.innerRef=Fe,se.a.createElement(ne,qe)})});if(!1)var me},"5D2P":function(ye,ge){ye.exports="data:image/png;base64,iV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XVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"7Cbv":function(ye,ge,p){"use strict";var O=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),de=new Uint8Array(16);function X(){if(!O)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return O(de)}var se=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function oe(V){return typeof V=="string"&&se.test(V)}for(var J=oe,k=[],L=0;L<256;++L)k.push((L+256).toString(16).substr(1));function M(V){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P=(k[V[W+0]]+k[V[W+1]]+k[V[W+2]]+k[V[W+3]]+"-"+k[V[W+4]]+k[V[W+5]]+"-"+k[V[W+6]]+k[V[W+7]]+"-"+k[V[W+8]]+k[V[W+9]]+"-"+k[V[W+10]]+k[V[W+11]]+k[V[W+12]]+k[V[W+13]]+k[V[W+14]]+k[V[W+15]]).toLowerCase();if(!J(P))throw TypeError("Stringified UUID is invalid");return P}var U=M;function E(V,W,P){V=V||{};var F=V.random||(V.rng||X)();if(F[6]=F[6]&15|64,F[8]=F[8]&63|128,W){P=P||0;for(var z=0;z<16;++z)W[P+z]=F[z];return W}return U(F)}var w=ge.a=E},"7ZXX":function(ye,ge,p){ye.exports=p.p+"static/err.6e7c5817.png"},"7ahc":function(ye,ge,p){"use strict";p.d(ge,"a",function(){return We});var O=p("k1fw"),de=p("0Owb"),X=p("+L6B"),se=p("2/Rp"),oe=p("y8nQ"),J=p("Vl3Y"),k=p("tJVT"),L=p("OaEy"),M=p("2fM7"),U=p("q1tI"),E=p.n(U),w=p("VrN/"),V=p.n(w),W=p("p77/"),P=p.n(W),F=p("c5Ni"),z=p.n(F),ee=M.a.Option,ne={labelCol:{span:4},wrapperCol:{span:20}},Re={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};ge.b=function(fe){var le=fe.callback,Be=fe.onCancel,ue=Object(U.useState)("python"),me=Object(k.a)(ue,2),he=me[0],q=me[1];function S(K){q(Re[K][1])}function te(K){le(K)}return E.a.createElement(J.a,Object(de.a)({},ne,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:te}),E.a.createElement(J.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},E.a.createElement(M.a,{onChange:S},Object.keys(Re).map(function(K){return E.a.createElement(ee,{key:K,value:K},Re[K][0])}))),E.a.createElement(J.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},E.a.createElement(We,{mode:he})),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(se.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(se.a,{type:"ghost",onClick:Be},"\u53D6\u6D88")))};function We(fe){var le=fe.value,Be=fe.onChange,ue=fe.mode,me=fe.options,he=me===void 0?{}:me,q=Object(U.useRef)(),S=Object(U.useState)(),te=Object(k.a)(S,2),K=te[0],b=te[1];return Object(U.useEffect)(function(){if(K){function R(G){var I=G.getValue();Be&&Be(I)}return K.on("change",R),function(){K.off("change",R)}}},[K,Be]),Object(U.useEffect)(function(){K&&K.setOption("mode",ue)},[K,ue]),Object(U.useEffect)(function(){K&&((le!==K.getValue()||le==="")&&setTimeout(function(){K.setValue(le||" ")},300))},[K,le]),Object(U.useEffect)(function(){if(q.current&&!K){var R=V.a.fromTextArea(q.current,Object(O.a)({mode:ue,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},he));b(R)}},[q.current,K]),E.a.createElement("div",{className:"my-codemirror-container"},E.a.createElement("textarea",{ref:q}))}},"7ixt":function(ye,ge,p){"use strict";p.d(ge,"a",function(){return X});var O={adjustX:1,adjustY:1},de=[0,0],X={left:{points:["cr","cl"],overflow:O,offset:[-4,0],targetOffset:de},right:{points:["cl","cr"],overflow:O,offset:[4,0],targetOffset:de},top:{points:["bc","tc"],overflow:O,offset:[0,-4],targetOffset:de},bottom:{points:["tc","bc"],overflow:O,offset:[0,4],targetOffset:de},topLeft:{points:["bl","tl"],overflow:O,offset:[0,-4],targetOffset:de},leftTop:{points:["tr","tl"],overflow:O,offset:[-4,0],targetOffset:de},topRight:{points:["br","tr"],overflow:O,offset:[0,-4],targetOffset:de},rightTop:{points:["tl","tr"],overflow:O,offset:[4,0],targetOffset:de},bottomRight:{points:["tr","br"],overflow:O,offset:[0,4],targetOffset:de},rightBottom:{points:["bl","br"],overflow:O,offset:[4,0],targetOffset:de},bottomLeft:{points:["tl","bl"],overflow:O,offset:[0,4],targetOffset:de},leftBottom:{points:["br","bl"],overflow:O,offset:[-4,0],targetOffset:de}},se=X},"7v3h":function(ye,ge,p){ye.exports=p.p+"static/empty2.dd73f390.png"},"8/bI":function(ye,ge,p){ye.exports=p.p+"static/empty.8918e228.png"},"8EBN":function(ye,ge,p){(function(O){O(p("VrN/"))})(function(O){"use strict";O.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 de=0;de<O.modeInfo.length;de++){var X=O.modeInfo[de];X.mimes&&(X.mime=X.mimes[0])}O.findModeByMIME=function(se){se=se.toLowerCase();for(var oe=0;oe<O.modeInfo.length;oe++){var J=O.modeInfo[oe];if(J.mime==se)return J;if(J.mimes){for(var k=0;k<J.mimes.length;k++)if(J.mimes[k]==se)return J}}if(/\+xml$/.test(se))return O.findModeByMIME("application/xml");if(/\+json$/.test(se))return O.findModeByMIME("application/json")},O.findModeByExtension=function(se){se=se.toLowerCase();for(var oe=0;oe<O.modeInfo.length;oe++){var J=O.modeInfo[oe];if(J.ext){for(var k=0;k<J.ext.length;k++)if(J.ext[k]==se)return J}}},O.findModeByFileName=function(se){for(var oe=0;oe<O.modeInfo.length;oe++){var J=O.modeInfo[oe];if(J.file&&J.file.test(se))return J}var k=se.lastIndexOf("."),L=k>-1&&se.substring(k+1,se.length);if(L)return O.findModeByExtension(L)},O.findModeByName=function(se){se=se.toLowerCase();for(var oe=0;oe<O.modeInfo.length;oe++){var J=O.modeInfo[oe];if(J.name.toLowerCase()==se)return J;if(J.alias){for(var k=0;k<J.alias.length;k++)if(J.alias[k].toLowerCase()==se)return J}}}})},"8hTe":function(ye,ge,p){ye.exports={button:"button___1wy9m"}},"9Bee":function(ye,ge,p){"use strict";var O=p("DYRE"),de=p("zeV3"),X=p("+L6B"),se=p("2/Rp"),oe=p("k1fw"),J=p("9og8"),k=p("tJVT"),L=p("WmNS"),M=p.n(L),U=p("q1tI"),E=p.n(U),w=p("vg9a"),V=p("DlQD"),W=p.n(V),P=p("rUJ1");function F(c,o){var a=c.match(/^(\s+)(?:```)/);if(a===null)return o;var u=a[1];return o.split(`
`).map(function(g){var h=g.match(/^\s+/);if(h===null)return g;var B=Object(k.a)(h,1),Te=B[0];return Te.length>=u.length?g.slice(u.length):g}).join(`
`)}var z=[],ee=["<ul>"],ne=new W.a.Renderer,Re=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function We(){z.length=0,ee=["<ul>"]}var fe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function le(c,o,a,u){if(o>=c.length||c[o].level<=a)return o;var g=c[o];u.push("<li><a href='#"+g.anchor+"'>"+g.text+"</a>"),o++;var h=[];return o=le(c,o,g.level,h),h.length>0&&(u.push("<ul>"),h.forEach(function(B){u.push(B)}),u.push("</ul>")),u.push("</li>"),o=le(c,o,a,u),o}function Be(){return le(z,0,0,ee),ee.push("</ul>"),ee.join("")}var ue={heading:function(o){var a=Re.exec(o);if(a)return{type:"heading",raw:a[0],depth:a[1].length,text:a[2]}},fences:function(o){var a=this.rules.block.fences.exec(o);if(a){var u=a[0],g=F(u,a[3]||""),h=a[2]?a[2].trim():a[2];if(["latex","katex","math"].indexOf(h)>=0){var B=q(),Te=g;g=B,S[B]={type:"block",expression:Te}}return{type:"code",raw:u,lang:h,text:g}}}},me=/(?:\${2})([^\n`]+?)(?:\${2})/gi,he=0,q=function(){return"__special_katext_id_".concat(he++,"__")},S={};function te(){return S}function K(){he=0,S={}}function b(c){return c=c.replace(me,function(o,a){var u=q();return S[u]={type:"inline",expression:a},u}),c}var R=ne.listitem;ne.listitem=function(c){return R(b(c))};var G=ne.paragraph;ne.paragraph=function(c){return G(b(c))};var I=ne.tablecell;ne.tablecell=function(c,o){return I(b(c),o)},ne.code=function(c,o,a){var u=(o||"").match(/\S*/)[0];return u?["latex","katex","math"].indexOf(u)>=0?"<p class='editormd-tex'>".concat(c,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(o,'">').concat(a?c:Object(P.escape)(c,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(a?c:Object(P.escape)(c,!0))+"</code></pre>"},ne.heading=function(c,o,a){var u=this.options.headerPrefix+a.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return z.push({anchor:u,level:o,text:c}),"<h"+o+' id="'+u+'">'+c+"</h"+o+">"},W.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),W.a.use({tokenizer:ue,renderer:ne});var ce=W.a,x=p("SJMd"),m=p("ulZh"),Y=p.n(m),Ae=p("m3rI"),ve=p("Oy/b"),Fe=p("p5ED"),He=p("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ke=function(c,o){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var g in u)Object.prototype.hasOwnProperty.call(u,g)&&(a[g]=u[g])})(c,o)};function be(c,o){function a(){this.constructor=c}ke(c,o),c.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function Ce(c,o,a,u){return new(a||(a=Promise))(function(g,h){function B(ut){try{ae(u.next(ut))}catch(De){h(De)}}function Te(ut){try{ae(u.throw(ut))}catch(De){h(De)}}function ae(ut){var De;ut.done?g(ut.value):(De=ut.value,De instanceof a?De:new a(function(Et){Et(De)})).then(B,Te)}ae((u=u.apply(c,o||[])).next())})}function we(c,o){var a,u,g,h,B={label:0,sent:function(){if(1&g[0])throw g[1];return g[1]},trys:[],ops:[]};return h={next:Te(0),throw:Te(1),return:Te(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function Te(ae){return function(ut){return function(De){if(a)throw new TypeError("Generator is already executing.");for(;B;)try{if(a=1,u&&(g=2&De[0]?u.return:De[0]?u.throw||((g=u.return)&&g.call(u),0):u.next)&&!(g=g.call(u,De[1])).done)return g;switch(u=0,g&&(De=[2&De[0],g.value]),De[0]){case 0:case 1:g=De;break;case 4:return B.label++,{value:De[1],done:!1};case 5:B.label++,u=De[1],De=[0];continue;case 7:De=B.ops.pop(),B.trys.pop();continue;default:if(!(g=B.trys,(g=g.length>0&&g[g.length-1])||De[0]!==6&&De[0]!==2)){B=0;continue}if(De[0]===3&&(!g||De[1]>g[0]&&De[1]<g[3])){B.label=De[1];break}if(De[0]===6&&B.label<g[1]){B.label=g[1],g=De;break}if(g&&B.label<g[2]){B.label=g[2],B.ops.push(De);break}g[2]&&B.ops.pop(),B.trys.pop();continue}De=o.call(c,B)}catch(Et){De=[6,Et],u=0}finally{a=g=0}if(5&De[0])throw De[1];return{value:De[0]?De[1]:void 0,done:!0}}([ae,ut])}}}function Z(){for(var c=0,o=0,a=arguments.length;o<a;o++)c+=arguments[o].length;var u=Array(c),g=0;for(o=0;o<a;o++)for(var h=arguments[o],B=0,Te=h.length;B<Te;B++,g++)u[g]=h[B];return u}var _=function(){function c(){}return c.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},c.setAttributes=function(o,a){for(var u=0,g=a;u<g.length;u++){var h=g[u],B=h[0],Te=h[1];o.setAttribute(B,Te)}},c.createRect=function(o,a,u){var g=document.createElementNS("http://www.w3.org/2000/svg","rect");return g.setAttribute("width",o.toString()),g.setAttribute("height",a.toString()),u&&c.setAttributes(g,u),g},c.createLine=function(o,a,u,g,h){var B=document.createElementNS("http://www.w3.org/2000/svg","line");return B.setAttribute("x1",o.toString()),B.setAttribute("y1",a.toString()),B.setAttribute("x2",u.toString()),B.setAttribute("y2",g.toString()),h&&c.setAttributes(B,h),B},c.createPolygon=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","polygon");return u.setAttribute("points",o),a&&c.setAttributes(u,a),u},c.createCircle=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","circle");return u.setAttribute("cx",(o/2).toString()),u.setAttribute("cy",(o/2).toString()),u.setAttribute("r",o.toString()),a&&c.setAttributes(u,a),u},c.createEllipse=function(o,a,u){var g=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return g.setAttribute("cx",(o/2).toString()),g.setAttribute("cy",(a/2).toString()),g.setAttribute("rx",(o/2).toString()),g.setAttribute("ry",(a/2).toString()),u&&c.setAttributes(g,u),g},c.createGroup=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return o&&c.setAttributes(a,o),a},c.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},c.createMarker=function(o,a,u,g,h,B,Te){var ae=document.createElementNS("http://www.w3.org/2000/svg","marker");return c.setAttributes(ae,[["id",o],["orient",a],["markerWidth",u.toString()],["markerHeight",g.toString()],["refX",h.toString()],["refY",B.toString()]]),ae.appendChild(Te),ae},c.createText=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),o&&c.setAttributes(a,o),a},c.createTSpan=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");return u.textContent=o,a&&c.setAttributes(u,a),u},c.createImage=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return o&&c.setAttributes(a,o),a},c.createPoint=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return u.x=o,u.y=a,u},c.createPath=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","path");return u.setAttribute("d",o),a&&c.setAttributes(u,a),u},c}(),Pe=function(){function c(){}return c.addKey=function(o){c.key=o},Object.defineProperty(c,"isLicensed",{get:function(){return!!c.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(c.key)},enumerable:!1,configurable:!0}),c}(),et=function(){function c(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return c.prototype.rasterize=function(o,a,u){var g=this;return new Promise(function(h){var B=u!==void 0?u:document.createElement("canvas");o===null&&(g.markersOnly=!0,g.naturalSize=!1);var Te=document.createElementNS("http://www.w3.org/2000/svg","svg");Te.setAttribute("xmlns","http://www.w3.org/2000/svg"),Te.setAttribute("width",a.width.baseVal.valueAsString),Te.setAttribute("height",a.height.baseVal.valueAsString),Te.setAttribute("viewBox","0 0 "+a.viewBox.baseVal.width.toString()+" "+a.viewBox.baseVal.height.toString()),Te.innerHTML=a.innerHTML,g.naturalSize===!0?(Te.width.baseVal.value=o.naturalWidth,Te.height.baseVal.value=o.naturalHeight):g.width!==void 0&&g.height!==void 0&&(Te.width.baseVal.value=g.width,Te.height.baseVal.value=g.height),B.width=Te.width.baseVal.value,B.height=Te.height.baseVal.value;var ae=Te.outerHTML,ut=B.getContext("2d");g.markersOnly!==!0&&ut.drawImage(o,0,0,B.width,B.height);var De=window.URL,Et=new Image(B.width,B.height);Et.setAttribute("crossOrigin","anonymous");var Pt=new Blob([ae],{type:"image/svg+xml"}),zt=De.createObjectURL(Pt);Et.onload=function(){ut.drawImage(Et,0,0),De.revokeObjectURL(zt);var Wn=B.toDataURL(g.imageType,g.imageQuality);h(Wn)},Et.src=zt})},c}(),st=function(){},qe=function(){function c(o){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+o+"_"}return Object.defineProperty(c.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),c.prototype.addClass=function(o){return this.styleSheet===void 0&&this.addStyleSheet(),o.name=""+this.classNamePrefix+o.localName,this.classes.push(o),this.styleSheet.sheet.insertRule("."+o.name+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length),o},c.prototype.addRule=function(o){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(o),this.styleSheet.sheet.insertRule(o.selector+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length)},c.prototype.addStyleSheet=function(){var o;this.styleSheet=document.createElement("style"),((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).appendChild(this.styleSheet),this.addRule(new Ke("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ke("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ke("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Me("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Me("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},c.prototype.removeStyleSheet=function(){var o;this.styleSheet&&(((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},c}(),Ke=function(c,o){this.selector=c,this.style=o},Me=function(c,o){this.localName=c,this.style=o},_e=function(){function c(o,a,u,g,h){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=o,this.displayMode=a,this.markerItems=u,this.uiStyleSettings=g,this.styles=h,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return c.prototype.show=function(o){var a=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var u=document.createElement("div");u.className=this.toolbarBlockStyleClass.name,u.style.whiteSpace="nowrap",this.uiContainer.appendChild(u),this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(h){var B=document.createElement("div");B.className=""+a.toolbarButtonStyleClass.name,B.setAttribute("data-type-name",h.typeName),B.innerHTML=h.icon,B.addEventListener("click",function(){a.markerToolbarButtonClicked(B,h)}),a.buttons.push(B),a.markerButtons.push(B)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var g=document.createElement("div");g.className=this.toolbarBlockStyleClass.name,g.style.whiteSpace="nowrap",g.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(g),this.addActionButton(g,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(g,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},c.prototype.addButtonClickListener=function(o){this.buttonClickListeners.push(o)},c.prototype.removeButtonClickListener=function(o){this.buttonClickListeners.indexOf(o)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(o),1)},c.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},c.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var o=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var a=0;a<this.markerButtons.length;a++)a<o||a===o&&this.markerButtons.length-1===o?this.markerButtonBlock.appendChild(this.markerButtons[a]):(a===o&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[a]))}},c.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},c.prototype.resetButtonStyles=function(){var o=this;this.buttons.forEach(function(a){a.className=a.className.replace(o.uiStyleSettings.toolbarButtonStyleColorsClassName?o.uiStyleSettings.toolbarButtonStyleColorsClassName:o.toolbarButtonStyleColorsClass.name,"").trim(),a.className=a.className.replace(o.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?o.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:o.toolbarActiveButtonStyleColorsClass.name,"").trim(),a.className+=" "+(o.uiStyleSettings.toolbarButtonStyleColorsClassName?o.uiStyleSettings.toolbarButtonStyleColorsClassName:o.toolbarButtonStyleColorsClass.name)})},c.prototype.addActionButton=function(o,a,u){var g=this,h=document.createElement("div");switch(h.className=""+this.toolbarButtonStyleClass.name,h.innerHTML=a,h.setAttribute("data-action",u),h.addEventListener("click",function(){g.actionToolbarButtonClicked(h,u)}),u){case"select":h.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":h.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":h.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":h.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":h.style.fill=this.uiStyleSettings.closeButtonColor}o.appendChild(h),this.buttons.push(h)},c.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Me("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Me("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Me("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Me("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Me("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var o=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Me("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*o)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*o)+`px;
padding: `+o+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Me("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Me("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ke("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ke("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},c.prototype.markerToolbarButtonClicked=function(o,a){this.setActiveButton(o),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(u){return u("marker",a)}),this.markerButtonOverflowBlock.style.display="none"},c.prototype.actionToolbarButtonClicked=function(o,a){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(u){return u("action",a)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},c.prototype.setActiveButton=function(o){this.resetButtonStyles(),o.className=o.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),o.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},c.prototype.setActiveMarkerButton=function(o){var a=this.markerButtons.find(function(u){return u.getAttribute("data-type-name")===o});a&&this.setActiveButton(a)},c.prototype.setCurrentMarker=function(o){var a=this;this.currentMarker=o,this.buttons.filter(function(u){return/delete|notes/.test(u.getAttribute("data-action"))}).forEach(function(u){a.currentMarker===void 0?(u.style.fillOpacity="0.4",u.style.pointerEvents="none"):(u.style.fillOpacity="1",u.style.pointerEvents="all")})},c}(),Ve=function(){function c(o,a,u,g){this.panels=[],this.panelButtons=[],this.markerjsContainer=o,this.displayMode=a,this.uiStyleSettings=u,this.styles=g,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return c.prototype.addStyles=function(){var o;this.toolboxStyleClass=this.styles.addClass(new Me("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Me("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var a=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Me("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Me("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Me("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Me("toolbox-panel-row_colors",`
background-color: `+((o=this.uiStyleSettings.toolboxBackgroundColor)!==null&&o!==void 0?o:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Me("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
padding: `+a+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Me("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Me("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ke("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ke("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},c.prototype.show=function(o){var a;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolboxStyleClass.name+" "+((a=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},c.prototype.setPanelButtons=function(o){var a,u,g=this;this.panels=o,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((a=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((u=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&u!==void 0?u:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(h){var B;h.uiStyleSettings=g.uiStyleSettings;var Te=document.createElement("div");Te.className=g.toolboxButtonStyleClass.name+" "+((B=g.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&B!==void 0?B:g.toolboxButtonStyleColorsClass.name),Te.innerHTML=h.icon,Te.title=h.title,Te.addEventListener("click",function(){g.panelButtonClick(h)}),g.panelButtons.push(Te),g.buttonRow.appendChild(Te)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},c.prototype.panelButtonClick=function(o){var a=this,u=-1;if(o!==this.activePanel){u=this.panels.indexOf(o),this.panelRow.innerHTML="";var g=o.getUi();g.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(g),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=o}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){a.displayMode==="inline"?a.panelRow.style.display="none":a.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(h,B){var Te,ae;h.className=a.toolboxButtonStyleClass.name+" "+(B===u?""+((Te=a.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Te!==void 0?Te:a.toolboxActiveButtonStyleColorsClass.name):""+((ae=a.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ae!==void 0?ae:a.toolboxButtonStyleColorsClass.name))})},c}(),$e=function(c,o){this.title=c,this.icon=o},Ye=function(c){function o(a,u,g,h){var B=c.call(this,a,h||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return B.colors=[],B.addTransparent=!1,B.colorBoxes=[],B.colors=u,B.currentColor=g,B.setCurrentColor=B.setCurrentColor.bind(B),B.getColorBox=B.getColorBox.bind(B),B}return be(o,c),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.overflow="hidden",u.style.whiteSpace="nowrap",this.colors.forEach(function(g){var h=a.getColorBox(g);u.appendChild(h),a.colorBoxes.push(h)}),u},o.prototype.getColorBox=function(a){var u=this,g=this.uiStyleSettings.toolbarHeight/4,h=this.uiStyleSettings.toolbarHeight-g,B=document.createElement("div");B.style.display="inline-block",B.style.boxSizing="content-box",B.style.width=h-2+"px",B.style.height=h-2+"px",B.style.padding="1px",B.style.marginRight="2px",B.style.marginBottom="2px",B.style.borderWidth="2px",B.style.borderStyle="solid",B.style.borderRadius=(h+2)/2+"px",B.style.borderColor=a===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",B.addEventListener("click",function(){u.setCurrentColor(a,B)});var Te=document.createElement("div");return Te.style.display="inline-block",Te.style.width=h-2+"px",Te.style.height=h-2+"px",Te.style.backgroundColor=a,Te.style.borderRadius=h/2+"px",a==="transparent"&&(Te.style.fill=this.uiStyleSettings.toolboxAccentColor,Te.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),B.appendChild(Te),B},o.prototype.setCurrentColor=function(a,u){var g=this;this.currentColor=a,this.colorBoxes.forEach(function(h){h.style.borderColor=h===u?g.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(a)},o}($e),Oe=function(){function c(o,a,u){this._state="new",this._isSelected=!1,this._container=o,this._overlayContainer=a,this.globalSettings=u,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(c.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),c.prototype.ownsTarget=function(o){return!1},Object.defineProperty(c.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),c.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},c.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},c.prototype.pointerDown=function(o,a){},c.prototype.dblClick=function(o,a){},c.prototype.manipulate=function(o){},c.prototype.pointerUp=function(o){this.stateChanged()},c.prototype.dispose=function(){},c.prototype.addMarkerVisualToContainer=function(o){this.container.childNodes.length>0?this.container.insertBefore(o,this.container.childNodes[0]):this.container.appendChild(o)},c.prototype.getState=function(){return{typeName:c.typeName,state:this.state,notes:this.notes}},c.prototype.restoreState=function(o){this._state=o.state,this.notes=o.notes},c.prototype.scale=function(o,a){},c.prototype.colorChanged=function(o){this.onColorChanged&&this.onColorChanged(o),this.stateChanged()},c.prototype.fillColorChanged=function(o){this.onFillColorChanged&&this.onFillColorChanged(o),this.stateChanged()},c.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var o=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),o.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(o)&&this.onStateChanged(this)}},c.typeName="MarkerBase",c}(),Ge=function(){function c(){this.findGripByVisual=this.findGripByVisual.bind(this)}return c.prototype.findGripByVisual=function(o){return this.topLeft.ownsTarget(o)?this.topLeft:this.topCenter.ownsTarget(o)?this.topCenter:this.topRight.ownsTarget(o)?this.topRight:this.centerLeft.ownsTarget(o)?this.centerLeft:this.centerRight.ownsTarget(o)?this.centerRight:this.bottomLeft.ownsTarget(o)?this.bottomLeft:this.bottomCenter.ownsTarget(o)?this.bottomCenter:this.bottomRight.ownsTarget(o)?this.bottomRight:void 0},c}(),vt=function(){function c(){this.GRIP_SIZE=10,this.visual=_.createGroup(),this.visual.appendChild(_.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return c.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},c}(),lt=function(){function c(){}return c.toITransformMatrix=function(o){return{a:o.a,b:o.b,c:o.c,d:o.d,e:o.e,f:o.f}},c.toSVGMatrix=function(o,a){return o.a=a.a,o.b=a.b,o.c=a.c,o.d=a.d,o.e=a.e,o.f=a.f,o},c}(),rt=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.left=0,h.top=0,h.width=0,h.height=0,h.defaultSize={x:50,y:20},h.offsetX=0,h.offsetY=0,h.rotationAngle=0,h.CB_DISTANCE=10,h._suppressMarkerCreateEvent=!1,h.container.transform.baseVal.appendItem(_.createTransform()),h.setupControlBox(),h}return be(o,c),Object.defineProperty(o.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"visual",{get:function(){return this._visual},set:function(a){this._visual=a;var u=_.createTransform();this._visual.transform.baseVal.appendItem(u)},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!!c.prototype.ownsTarget.call(this,a)||!!(this.controlGrips.findGripByVisual(a)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(a))},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.left=a.x,this.top=a.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var g=this.unrotatePoint(a);if(this.manipulationStartX=g.x,this.manipulationStartY=g.y,this.offsetX=g.x-this.left,this.offsetY=g.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(u),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(u)){this.activeGrip=this.rotatorGrip;var h=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=h.x-this.width/2,this.top=h.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var B=this.container.transform.baseVal.getItem(0);B.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(B,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},o.prototype.pointerUp=function(a){var u=this.state;c.prototype.pointerUp.call(this,a),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(a),this._state="select",u==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},o.prototype.moveVisual=function(a){this.visual.style.transform="translate("+a.x+"px, "+a.y+"px)"},o.prototype.manipulate=function(a){var u=this.unrotatePoint(a);this.state==="creating"?this.resize(a):this.state==="move"?(this.left=this.manipulationStartLeft+(u.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(u.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(u):this.state==="rotate"&&this.rotate(a)},o.prototype.resize=function(a){var u=this.manipulationStartLeft,g=this.manipulationStartWidth,h=this.manipulationStartTop,B=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:u=this.manipulationStartLeft+a.x-this.manipulationStartX,g=this.manipulationStartWidth+this.manipulationStartLeft-u;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:g=this.manipulationStartWidth+a.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:h=this.manipulationStartTop+a.y-this.manipulationStartY,B=this.manipulationStartHeight+this.manipulationStartTop-h;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:B=this.manipulationStartHeight+a.y-this.manipulationStartY}g>=0?(this.left=u,this.width=g):(this.left=u+g,this.width=-g),B>=0?(this.top=h,this.height=B):(this.top=h+B,this.height=-B),this.setSize()},o.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},o.prototype.rotate=function(a){if(Math.abs(a.x-this.centerX)>.1){var u=Math.sign(a.x-this.centerX);this.rotationAngle=180*Math.atan((a.y-this.centerY)/(a.x-this.centerX))/Math.PI+90*u,this.applyRotation()}},o.prototype.applyRotation=function(){var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0)},o.prototype.rotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM(),g=_.createPoint(a.x,a.y);return{x:(g=g.matrixTransform(u)).x,y:g.y}},o.prototype.unrotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM();u=u.inverse();var g=_.createPoint(a.x,a.y);return{x:(g=g.matrixTransform(u)).x,y:g.y}},o.prototype.select=function(){c.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){c.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=_.createGroup();var a=_.createTransform();a.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(a),this.container.appendChild(this.controlBox),this.controlRect=_.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=_.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ge,this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){var a=this.controlBox.transform.baseVal.getItem(0);a.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(a,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},o.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},o.prototype.createGrip=function(){var a=new vt;return a.visual.transform.baseVal.appendItem(_.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.controlGrips.topLeft.GRIP_SIZE,u=-a/2,g=u,h=(this.width+this.CB_DISTANCE)/2-a/2,B=(this.height+this.CB_DISTANCE)/2-a/2,Te=this.height+this.CB_DISTANCE-a/2,ae=this.width+this.CB_DISTANCE-a/2;this.positionGrip(this.controlGrips.topLeft.visual,u,g),this.positionGrip(this.controlGrips.topCenter.visual,h,g),this.positionGrip(this.controlGrips.topRight.visual,ae,g),this.positionGrip(this.controlGrips.centerLeft.visual,u,B),this.positionGrip(this.controlGrips.centerRight.visual,ae,B),this.positionGrip(this.controlGrips.bottomLeft.visual,u,Te),this.positionGrip(this.controlGrips.bottomCenter.visual,h,Te),this.positionGrip(this.controlGrips.bottomRight.visual,ae,Te),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,h,g-3*this.CB_DISTANCE)},o.prototype.positionGrip=function(a,u,g){var h=a.transform.baseVal.getItem(0);h.setTranslate(u,g),a.transform.baseVal.replaceItem(h,0)},o.prototype.hideControlBox=function(){this.controlBox.style.display="none"},o.prototype.showControlBox=function(){this.controlBox.style.display=""},o.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:lt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:lt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var u=a;this.left=u.left,this.top=u.top,this.width=u.width,this.height=u.height,this.rotationAngle=u.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(lt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,u.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(lt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,u.containerTransformMatrix))},o.prototype.scale=function(a,u){c.prototype.scale.call(this,a,u);var g=this.rotatePoint({x:this.left,y:this.top}),h=this.unrotatePoint({x:g.x*a,y:g.y*u});this.left=h.x,this.top=h.y,this.width=this.width*a,this.height=this.height*u,this.adjustControlBox()},o}(Oe),tt=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.fillColor="transparent",h.strokeColor="transparent",h.strokeWidth=0,h.strokeDasharray="",h.opacity=1,h.setStrokeColor=h.setStrokeColor.bind(h),h.setFillColor=h.setFillColor.bind(h),h.setStrokeWidth=h.setStrokeWidth.bind(h),h.setStrokeDasharray=h.setStrokeDasharray.bind(h),h.createVisual=h.createVisual.bind(h),h}return be(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=_.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){c.prototype.setSize.call(this),_.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){c.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&_.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&_.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&_.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&_.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){var u=a;this.fillColor=u.fillColor,this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.opacity=u.opacity,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){c.prototype.scale.call(this,a,u),this.setSize()},o.title="Rectangle marker",o}(rt),ft=function(c){function o(a,u,g,h){var B=c.call(this,a,h||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return B.widths=[],B.widthBoxes=[],B.widths=u,B.currentWidth=g,B.setCurrentWidth=B.setCurrentWidth.bind(B),B}return be(o,c),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",this.widths.forEach(function(g){var h=document.createElement("div");h.style.display="flex",h.style.flexGrow="2",h.style.alignItems="center",h.style.justifyContent="space-between",h.style.padding="5px",h.style.borderWidth="2px",h.style.borderStyle="solid",h.style.borderColor=g===a.currentWidth?a.uiStyleSettings.toolboxAccentColor:"transparent",h.addEventListener("click",function(){a.setCurrentWidth(g,h)}),u.appendChild(h);var B=document.createElement("div");B.innerText=g.toString(),B.style.marginRight="5px",h.appendChild(B);var Te=document.createElement("div");Te.style.minHeight="20px",Te.style.flexGrow="2",Te.style.display="flex",Te.style.alignItems="center";var ae=document.createElement("hr");ae.style.minWidth="20px",ae.style.border="0px",ae.style.borderTop=g+"px solid "+a.uiStyleSettings.toolboxColor,ae.style.flexGrow="2",Te.appendChild(ae),h.appendChild(Te),a.widthBoxes.push(h)}),u},o.prototype.setCurrentWidth=function(a,u){var g=this;this.currentWidth=a,this.widthBoxes.forEach(function(h){h.style.borderColor=h===u?g.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},o}($e),at=function(c){function o(a,u,g,h){var B=c.call(this,a,h||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return B.styles=[],B.styleBoxes=[],B.styles=u,B.currentStyle=g,B.setCurrentStyle=B.setCurrentStyle.bind(B),B}return be(o,c),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",this.styles.forEach(function(g){var h=document.createElement("div");h.style.display="flex",h.style.alignItems="center",h.style.justifyContent="space-between",h.style.padding="5px",h.style.borderWidth="2px",h.style.borderStyle="solid",h.style.overflow="hidden",h.style.maxWidth=100/a.styles.length-5+"%",h.style.borderColor=g===a.currentStyle?a.uiStyleSettings.toolboxAccentColor:"transparent",h.addEventListener("click",function(){a.setCurrentStyle(g,h)}),u.appendChild(h);var B=document.createElement("div");B.style.minHeight="20px",B.style.flexGrow="2",B.style.overflow="hidden";var Te=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+a.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(g!==""?'stroke-dasharray="'+g+'"':"")+` />
</svg>`;B.innerHTML=Te,h.appendChild(B),a.styleBoxes.push(h)}),u},o.prototype.setCurrentStyle=function(a,u){var g=this;this.currentStyle=a,this.styleBoxes.forEach(function(h){h.style.borderColor=h===u?g.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},o}($e),it=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.strokeColor=g.defaultColor,h.strokeWidth=g.defaultStrokeWidth,h.strokeDasharray=g.defaultStrokeDasharray,h.strokePanel=new Ye("Line color",g.defaultColorSet,g.defaultColor),h.strokePanel.onColorChanged=h.setStrokeColor,h.strokeWidthPanel=new ft("Line width",g.defaultStrokeWidths,g.defaultStrokeWidth),h.strokeWidthPanel.onWidthChanged=h.setStrokeWidth,h.strokeStylePanel=new at("Line style",g.defaultStrokeDasharrays,g.defaultStrokeDasharray),h.strokeStylePanel.onStyleChanged=h.setStrokeDasharray,h}return be(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="FrameMarker",o.title="Frame marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',o}(tt),xe=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},gt=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.x1=0,h.y1=0,h.x2=0,h.y2=0,h.defaultLength=50,h.manipulationStartX=0,h.manipulationStartY=0,h.manipulationStartX1=0,h.manipulationStartY1=0,h.manipulationStartX2=0,h.manipulationStartY2=0,h.setupControlBox(),h}return be(o,c),o.prototype.ownsTarget=function(a){return!!c.prototype.ownsTarget.call(this,a)||!(!this.grip1.ownsTarget(a)&&!this.grip2.ownsTarget(a))},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.manipulationStartX=a.x,this.manipulationStartY=a.y,this.state==="new"&&(this.x1=a.x,this.y1=a.y,this.x2=a.x,this.y2=a.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(u)?this.activeGrip=this.grip1:this.grip2.ownsTarget(u)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},o.prototype.pointerUp=function(a){var u=this.state;c.prototype.pointerUp.call(this,a),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(a),this._state="select",u==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},o.prototype.adjustVisual=function(){},o.prototype.manipulate=function(a){this.state==="creating"?this.resize(a):this.state==="move"?(this.x1=this.manipulationStartX1+a.x-this.manipulationStartX,this.y1=this.manipulationStartY1+a.y-this.manipulationStartY,this.x2=this.manipulationStartX2+a.x-this.manipulationStartX,this.y2=this.manipulationStartY2+a.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(a)},o.prototype.resize=function(a){switch(this.activeGrip){case this.grip1:this.x1=a.x,this.y1=a.y;break;case this.grip2:case void 0:this.x2=a.x,this.y2=a.y}this.adjustVisual(),this.adjustControlBox()},o.prototype.select=function(){c.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){c.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=_.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){this.positionGrips()},o.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},o.prototype.createGrip=function(){var a=new vt;return a.visual.transform.baseVal.appendItem(_.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-a/2,this.y1-a/2),this.positionGrip(this.grip2.visual,this.x2-a/2,this.y2-a/2)},o.prototype.positionGrip=function(a,u,g){var h=a.transform.baseVal.getItem(0);h.setTranslate(u,g),a.transform.baseVal.replaceItem(h,0)},o.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var u=a;this.x1=u.x1,this.y1=u.y1,this.x2=u.x2,this.y2=u.y2},o.prototype.scale=function(a,u){c.prototype.scale.call(this,a,u),this.x1=this.x1*a,this.y1=this.y1*u,this.x2=this.x2*a,this.y2=this.y2*u,this.adjustVisual(),this.adjustControlBox()},o}(Oe),nt=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.strokeColor="transparent",h.strokeWidth=0,h.strokeDasharray="",h.setStrokeColor=h.setStrokeColor.bind(h),h.setStrokeWidth=h.setStrokeWidth.bind(h),h.setStrokeDasharray=h.setStrokeDasharray.bind(h),h.strokeColor=g.defaultColor,h.strokeWidth=g.defaultStrokeWidth,h.strokeDasharray=g.defaultStrokeDasharray,h.strokePanel=new Ye("Line color",g.defaultColorSet,g.defaultColor),h.strokePanel.onColorChanged=h.setStrokeColor,h.strokeWidthPanel=new ft("Line width",g.defaultStrokeWidths,g.defaultStrokeWidth),h.strokeWidthPanel.onWidthChanged=h.setStrokeWidth,h.strokeStylePanel=new at("Line style",g.defaultStrokeDasharrays,g.defaultStrokeDasharray),h.strokeStylePanel.onStyleChanged=h.setStrokeDasharray,h}return be(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorLine&&a!==this.visibleLine)},o.prototype.createVisual=function(){this.visual=_.createGroup(),this.selectorLine=_.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=_.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},o.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),_.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),_.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),_.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var u=a;this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.createVisual(),this.adjustVisual()},o.typeName="LineMarker",o.title="Line marker",o.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',o}(gt),Se=function(c){function o(a,u,g,h){var B=c.call(this,a,h||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return B.fonts=[],B.fontBoxes=[],B.fonts=u,B.currentFont=g,B.setCurrentFont=B.setCurrentFont.bind(B),B}return be(o,c),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.overflow="hidden",u.style.flexGrow="2",this.fonts.forEach(function(g){var h=document.createElement("div");h.style.display="inline-block",h.style.alignItems="center",h.style.justifyContent="space-between",h.style.padding="5px",h.style.borderWidth="2px",h.style.borderStyle="solid",h.style.overflow="hidden",h.style.maxWidth=100/a.fonts.length-5+"%",h.style.borderColor=g===a.currentFont?a.uiStyleSettings.toolboxAccentColor:"transparent",h.addEventListener("click",function(){a.setCurrentFont(g,h)}),u.appendChild(h);var B=document.createElement("div");B.style.display="flex",B.style.minHeight="20px",B.style.flexGrow="2",B.style.fontFamily=g,B.style.overflow="hidden";var Te=document.createElement("div");Te.style.whiteSpace="nowrap",Te.style.overflow="hidden",Te.style.textOverflow="ellipsis",Te.innerHTML="The quick brown fox jumps over the lazy dog",B.appendChild(Te),h.appendChild(B),a.fontBoxes.push(h)}),u},o.prototype.setCurrentFont=function(a,u){var g=this;this.currentFont=a,this.fontBoxes.forEach(function(h){h.style.borderColor=h===u?g.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},o}($e),Ue=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.color="transparent",h.padding=5,h.DEFAULT_TEXT="your text here",h.text=h.DEFAULT_TEXT,h.isMoved=!1,h.color=g.defaultColor,h.fontFamily=g.defaultFontFamily,h.defaultSize={x:100,y:30},h.setColor=h.setColor.bind(h),h.setFont=h.setFont.bind(h),h.renderText=h.renderText.bind(h),h.sizeText=h.sizeText.bind(h),h.textEditDivClicked=h.textEditDivClicked.bind(h),h.showTextEditor=h.showTextEditor.bind(h),h.setSize=h.setSize.bind(h),h.positionTextEditor=h.positionTextEditor.bind(h),h.colorPanel=new Ye("Color",g.defaultColorSet,g.defaultColor),h.colorPanel.onColorChanged=h.setColor,h.fontFamilyPanel=new Se("Font",g.defaultFontFamilies,g.defaultFontFamily),h.fontFamilyPanel.onFontChanged=h.setFont,h}return be(o,c),o.prototype.ownsTarget=function(a){if(c.prototype.ownsTarget.call(this,a)||a===this.visual||a===this.textElement||a===this.bgRectangle)return!0;var u=!1;return this.textElement.childNodes.forEach(function(g){g===a&&(u=!0)}),u},o.prototype.createVisual=function(){this.visual=_.createGroup(),this.bgRectangle=_.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=_.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(_.createTransform()),this.textElement.transform.baseVal.appendItem(_.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.isMoved=!1,this.pointerDownPoint=a,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.renderText=function(){var a=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(u){a.textElement.appendChild(_.createTSpan(u.trim()===""?" ":u.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},o.prototype.getTextScale=function(){var a=this.textElement.getBBox(),u=1;if(a.width>0&&a.height>0){var g=(1*this.width-this.width*this.padding*2/100)/a.width,h=(1*this.height-this.height*this.padding*2/100)/a.height;u=Math.min(g,h)}return u},o.prototype.getTextPosition=function(a){var u=this.textElement.getBBox(),g=0,h=0;return u.width>0&&u.height>0&&(g=(this.width-u.width*a)/2,h=this.height/2-u.height*a/2),{x:g,y:h}},o.prototype.sizeText=function(){var a=this.textElement.getBBox(),u=this.getTextScale(),g=this.getTextPosition(u);g.y-=a.y*u,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+g.x+"px, "+g.y+"px) scale("+u+", "+u+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(g.x,g.y),this.textElement.transform.baseVal.getItem(1).setScale(u,u))},o.prototype.manipulate=function(a){c.prototype.manipulate.call(this,a),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(a.x-this.pointerDownPoint.x)>5||Math.abs(a.y-this.pointerDownPoint.y)>5)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.isMoved=!0,this.setSize(),this.sizeText()},o.prototype.setSize=function(){c.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(_.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},o.prototype.pointerUp=function(a){var u=this.state;u==="creating"&&(this._suppressMarkerCreateEvent=!0),c.prototype.pointerUp.call(this,a),this.setSize(),(u==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},o.prototype.showTextEditor=function(){var a=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(u){u.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var u=Number.parseFloat(a.textEditor.style.fontSize);a.textEditor.clientWidth>=Number.parseInt(a.textEditor.style.maxWidth)&&u>.9;)u-=.1,a.textEditor.style.fontSize=Math.max(u,.9)+"em"}),this.textEditor.addEventListener("keyup",function(u){u.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(u){if(u.clipboardData){var g=u.clipboardData.getData("text"),h=window.getSelection();if(!h.rangeCount)return!1;h.deleteFromDocument(),h.getRangeAt(0).insertNode(document.createTextNode(g)),u.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){a.textEditDivClicked(a.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},o.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var a=this.getTextScale(),u=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),g=this.textElement.getBBox(),h={x:g.width*a,y:g.height*a};u.x-=h.x/2,u.y-=h.y/2,this.textEditor.style.top=u.y+"px",this.textEditor.style.left=u.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-u.x+"px",this.textEditor.style.fontSize=Math.max(16*a,12)+"px",this.textElement.style.display="none"}},o.prototype.textEditDivClicked=function(a){this.text=a.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},o.prototype.select=function(){c.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},o.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),c.prototype.deselect.call(this)},o.prototype.dblClick=function(a,u){c.prototype.dblClick.call(this,a,u),this.showTextEditor()},o.prototype.setColor=function(a){this.textElement&&_.setAttributes(this.textElement,[["fill",a]]),this.color=a,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(a)},o.prototype.setFont=function(a){this.textElement&&_.setAttributes(this.textElement,[["font-family",a]]),this.fontFamily=a,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},o.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},o.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.color=u.color,this.fontFamily=u.fontFamily,this.padding=u.padding,this.text=u.text,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){c.prototype.scale.call(this,a,u),this.setSize(),this.sizeText(),this.positionTextEditor()},o.typeName="TextMarker",o.title="Text marker",o.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',o}(rt),Q=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.color="transparent",h.lineWidth=3,h.drawing=!1,h.pixelRatio=1,h.color=g.defaultColor,h.lineWidth=g.defaultStrokeWidth,h.pixelRatio=g.freehandPixelRatio,h.setColor=h.setColor.bind(h),h.addCanvas=h.addCanvas.bind(h),h.finishCreation=h.finishCreation.bind(h),h.setLineWidth=h.setLineWidth.bind(h),h.colorPanel=new Ye("Color",g.defaultColorSet,g.defaultColor),h.colorPanel.onColorChanged=h.setColor,h.lineWidthPanel=new ft("Line width",g.defaultStrokeWidths,g.defaultStrokeWidth),h.lineWidthPanel.onWidthChanged=h.setLineWidth,h}return be(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.drawingImage)},o.prototype.createVisual=function(){this.visual=_.createGroup(),this.drawingImage=_.createImage(),this.visual.appendChild(this.drawingImage);var a=_.createTransform();this.visual.transform.baseVal.appendItem(a),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(a.x,a.y),this.drawing=!0):c.prototype.pointerDown.call(this,a,u)},o.prototype.manipulate=function(a){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(a.x,a.y),this.canvasContext.stroke()):c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),_.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):c.prototype.pointerUp.call(this,a)},o.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},o.prototype.select=function(){this.state==="creating"&&this.finishCreation(),c.prototype.select.call(this)},o.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),c.prototype.deselect.call(this)},o.prototype.finishCreation=function(){for(var a=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),u=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],g=u[0],h=u[1],B=u[2],Te=u[3],ae=!1,ut=0;ut<this.canvasElement.height;ut++)for(var De=0;De<this.canvasElement.width;De++)a.data[ut*this.canvasElement.width*4+4*De+3]>0&&(ae=!0,ut<h&&(h=ut),De<g&&(g=De),ut>Te&&(Te=ut),De>B&&(B=De));if(ae){this.left=g/this.pixelRatio,this.top=h/this.pixelRatio,this.width=(B-g)/this.pixelRatio,this.height=(Te-h)/this.pixelRatio;var Et=document.createElement("canvas");Et.width=B-g,Et.height=Te-h,Et.getContext("2d").putImageData(this.canvasContext.getImageData(g,h,B-g,Te-h),0,0),this.drawingImgUrl=Et.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},o.prototype.setDrawingImage=function(){_.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),_.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},o.prototype.setColor=function(a){this.color=a,this.colorChanged(a)},o.prototype.setLineWidth=function(a){this.lineWidth=a},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({drawingImgUrl:this.drawingImgUrl},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){this.createVisual(),c.prototype.restoreState.call(this,a),this.drawingImgUrl=a.drawingImgUrl,this.setDrawingImage()},o.prototype.scale=function(a,u){c.prototype.scale.call(this,a,u),this.setDrawingImage()},o.typeName="FreehandMarker",o.title="Freehand marker",o.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',o}(rt),j=function(c){function o(a,u,g){var h=c.call(this,a,g||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return h.typeBoxes=[],h.currentType=u,h.setCurrentType=h.setCurrentType.bind(h),h}return be(o,c),o.prototype.getUi=function(){var a=this,u=document.createElement("div");u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2";for(var g=function(Te){var ae="both";switch(Te){case 0:ae="both";break;case 1:ae="start";break;case 2:ae="end";break;case 3:ae="none"}var ut=document.createElement("div");if(ut.style.display="flex",ut.style.flexGrow="2",ut.style.alignItems="center",ut.style.justifyContent="space-between",ut.style.padding="5px",ut.style.borderWidth="2px",ut.style.borderStyle="solid",ut.style.borderColor=ae===h.currentType?h.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){a.setCurrentType(ae,ut)}),u.appendChild(ut),ae==="both"||ae==="start"){var De=document.createElement("div");De.style.display="flex",De.style.alignItems="center",De.style.minHeight="20px",De.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(h.uiStyleSettings!==void 0?h.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,De.style.marginLeft="5px",ut.appendChild(De)}var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.minHeight="20px",Et.style.flexGrow="2";var Pt=document.createElement("hr");if(Pt.style.minWidth="20px",Pt.style.border="0px",Pt.style.borderTop="3px solid "+(h.uiStyleSettings!==void 0?h.uiStyleSettings.toolboxColor:"#eeeeee"),Pt.style.flexGrow="2",Et.appendChild(Pt),ut.appendChild(Et),ae==="both"||ae==="end"){var zt=document.createElement("div");zt.style.display="flex",zt.style.alignItems="center",zt.style.minHeight="20px",zt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(h.uiStyleSettings!==void 0?h.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,zt.style.marginRight="5px",ut.appendChild(zt)}h.typeBoxes.push(ut)},h=this,B=0;B<4;B++)g(B);return u},o.prototype.setCurrentType=function(a,u){var g=this;this.currentType=a,this.typeBoxes.forEach(function(h){h.style.borderColor=h===u?g.uiStyleSettings!==void 0?g.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},o}($e),H=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.arrowType="end",h.arrowBaseHeight=10,h.arrowBaseWidth=10,h.getArrowPoints=h.getArrowPoints.bind(h),h.setArrowType=h.setArrowType.bind(h),h.arrowTypePanel=new j("Arrow type","end"),h.arrowTypePanel.onArrowTypeChanged=h.setArrowType,h}return be(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.arrow1&&a!==this.arrow2)},o.prototype.getArrowPoints=function(a,u){var g=this.arrowBaseWidth+2*this.strokeWidth,h=this.arrowBaseHeight+2*this.strokeWidth;return a-g/2+","+(u+h/2)+" "+a+","+(u-h/2)+" "+(a+g/2)+","+(u+h/2)},o.prototype.createTips=function(){this.arrow1=_.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(_.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=_.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(_.createTransform()),this.visual.appendChild(this.arrow2)},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(c.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",_.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),_.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),u=this.arrow1.transform.baseVal.getItem(0);u.setRotate(a,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(u,0);var g=this.arrow2.transform.baseVal.getItem(0);g.setRotate(a+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(g,0)}},o.prototype.setArrowType=function(a){this.arrowType=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({arrowType:this.arrowType},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var u=a;this.arrowType=u.arrowType,this.createTips(),this.adjustVisual()},o.typeName="ArrowMarker",o.title="Arrow marker",o.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',o}(nt),y=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.fillColor=g.defaultFillColor,h.strokeWidth=0,h.fillPanel=new Ye("Color",g.defaultColorSet,g.defaultFillColor),h.fillPanel.onColorChanged=h.setFillColor,h}return be(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="CoverMarker",o.title="Cover marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',o}(tt),C=function(c){function o(a,u,g,h){var B=c.call(this,a,h||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return B.opacities=[],B.opacityBoxes=[],B.opacities=u,B.currentOpacity=g,B.setCurrentOpacity=B.setCurrentOpacity.bind(B),B}return be(o,c),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",u.style.justifyContent="space-between",this.opacities.forEach(function(g){var h=document.createElement("div");h.style.display="flex",h.style.alignItems="center",h.style.justifyContent="center",h.style.padding="5px",h.style.borderWidth="2px",h.style.borderStyle="solid",h.style.borderColor=g===a.currentOpacity?a.uiStyleSettings.toolboxAccentColor:"transparent",h.addEventListener("click",function(){a.setCurrentOpacity(g,h)}),u.appendChild(h);var B=document.createElement("div");B.innerText=100*g+"%",h.appendChild(B),a.opacityBoxes.push(h)}),u},o.prototype.setCurrentOpacity=function(a,u){var g=this;this.currentOpacity=a,this.opacityBoxes.forEach(function(h){h.style.borderColor=h===u?g.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},o}($e),A=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.setOpacity=h.setOpacity.bind(h),h.fillColor=g.defaultHighlightColor,h.strokeWidth=0,h.opacity=g.defaultHighlightOpacity,h.fillPanel=new Ye("Color",g.defaultColorSet,h.fillColor),h.fillPanel.onColorChanged=h.setFillColor,h.opacityPanel=new C("Opacity",g.defaultOpacitySteps,h.opacity),h.opacityPanel.onOpacityChanged=h.setOpacity,h}return be(o,c),o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&_.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="HighlightMarker",o.title="Highlight marker",o.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',o}(y),T='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',re=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.bgColor="transparent",h.tipPosition={x:0,y:0},h.tipBase1Position={x:0,y:0},h.tipBase2Position={x:0,y:0},h.tipMoving=!1,h.color=g.defaultStrokeColor,h.bgColor=g.defaultFillColor,h.fontFamily=g.defaultFontFamily,h.defaultSize={x:100,y:30},h.setBgColor=h.setBgColor.bind(h),h.getTipPoints=h.getTipPoints.bind(h),h.positionTip=h.positionTip.bind(h),h.setTipPoints=h.setTipPoints.bind(h),h.colorPanel=new Ye("Text color",g.defaultColorSet,h.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),h.colorPanel.onColorChanged=h.setColor,h.bgColorPanel=new Ye("Fill color",g.defaultColorSet,h.bgColor,T),h.bgColorPanel.onColorChanged=h.setBgColor,h.fontFamilyPanel=new Se("Font",g.defaultFontFamilies,g.defaultFontFamily),h.fontFamilyPanel.onFontChanged=h.setFont,h.tipGrip=new vt,h.tipGrip.visual.transform.baseVal.appendItem(_.createTransform()),h.controlBox.appendChild(h.tipGrip.visual),h}return be(o,c),o.prototype.ownsTarget=function(a){return c.prototype.ownsTarget.call(this,a)||this.tipGrip.ownsTarget(a)||this.tip===a},o.prototype.createTip=function(){_.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=_.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},o.prototype.pointerDown=function(a,u){this.state==="new"&&c.prototype.pointerDown.call(this,a,u),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(u)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):c.prototype.pointerDown.call(this,a,u)},o.prototype.pointerUp=function(a){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,c.prototype.pointerUp.call(this,a);else{var u=this.state==="creating";c.prototype.pointerUp.call(this,a),this.setTipPoints(u),this.positionTip()}},o.prototype.manipulate=function(a){if(this.tipMoving){var u=this.unrotatePoint(a);this.tipPosition={x:u.x-this.manipulationStartLeft,y:u.y-this.manipulationStartTop},this.positionTip()}else c.prototype.manipulate.call(this,a)},o.prototype.setBgColor=function(a){this.bgRectangle&&this.tip&&(_.setAttributes(this.bgRectangle,[["fill",a]]),_.setAttributes(this.tip,[["fill",a]])),this.bgColor=a,this.fillColorChanged(a)},o.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},o.prototype.setTipPoints=function(a){a===void 0&&(a=!1);var u=Math.min(this.height/2,15),g=this.height/5;a&&(this.tipPosition={x:u+g/2,y:this.height+20});var h=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?h<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(g=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:0},this.tipBase2Position={x:u+g,y:0}):(this.tipBase1Position={x:0,y:u},this.tipBase2Position={x:0,y:u+g}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?h<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(g=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-g,y:0},this.tipBase2Position={x:this.width-u,y:0}):(this.tipBase1Position={x:this.width,y:u},this.tipBase2Position={x:this.width,y:u+g}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?h<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(g=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-g,y:this.height},this.tipBase2Position={x:this.width-u,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-u-g},this.tipBase2Position={x:this.width,y:this.height-u}):h<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(g=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:this.height},this.tipBase2Position={x:u+g,y:this.height}):(this.tipBase1Position={x:0,y:this.height-u},this.tipBase2Position={x:0,y:this.height-u-g})},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.positionTip()},o.prototype.positionTip=function(){_.setAttributes(this.tip,[["points",this.getTipPoints()]]);var a=this.tipGrip.visual.transform.baseVal.getItem(0);a.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(a,0)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.select=function(){this.positionTip(),c.prototype.select.call(this)},o.prototype.getState=function(){var a=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.bgColor=u.bgColor,this.tipPosition=u.tipPosition,c.prototype.restoreState.call(this,a),this.createTip(),this.setTipPoints()},o.prototype.scale=function(a,u){c.prototype.scale.call(this,a,u),this.tipPosition={x:this.tipPosition.x*a,y:this.tipPosition.y*u},this.positionTip()},o.typeName="CalloutMarker",o.title="Callout marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',o}(Ue),pe=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.fillColor="transparent",h.strokeColor="transparent",h.strokeWidth=0,h.strokeDasharray="",h.opacity=1,h.strokeColor=g.defaultColor,h.strokeWidth=g.defaultStrokeWidth,h.strokeDasharray=g.defaultStrokeDasharray,h.fillColor=g.defaultFillColor,h.setStrokeColor=h.setStrokeColor.bind(h),h.setFillColor=h.setFillColor.bind(h),h.setStrokeWidth=h.setStrokeWidth.bind(h),h.setStrokeDasharray=h.setStrokeDasharray.bind(h),h.setOpacity=h.setOpacity.bind(h),h.createVisual=h.createVisual.bind(h),h.strokePanel=new Ye("Line color",Z(g.defaultColorSet,["transparent"]),g.defaultColor),h.strokePanel.onColorChanged=h.setStrokeColor,h.fillPanel=new Ye("Fill color",Z(g.defaultColorSet,["transparent"]),h.fillColor,T),h.fillPanel.onColorChanged=h.setFillColor,h.strokeWidthPanel=new ft("Line width",g.defaultStrokeWidths,g.defaultStrokeWidth),h.strokeWidthPanel.onWidthChanged=h.setStrokeWidth,h.strokeStylePanel=new at("Line style",g.defaultStrokeDasharrays,g.defaultStrokeDasharray),h.strokeStylePanel.onStyleChanged=h.setStrokeDasharray,h.opacityPanel=new C("Opacity",g.defaultOpacitySteps,h.opacity),h.opacityPanel.onOpacityChanged=h.setOpacity,h}return be(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=_.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){c.prototype.setSize.call(this),_.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},o.prototype.pointerUp=function(a){c.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&_.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&_.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(a),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&_.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&_.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&_.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.fillColor=u.fillColor,this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.opacity=u.opacity,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){c.prototype.scale.call(this,a,u),this.setSize()},o.typeName="EllipseMarker",o.title="Ellipse marker",o.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',o}(rt),je=function(c){function o(a,u,g){return c.call(this,a,u,g)||this}return be(o,c),Object.defineProperty(o.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.tip1&&a!==this.tip2)},o.prototype.createTips=function(){this.tip1=_.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(_.createTransform()),this.visual.appendChild(this.tip1),this.tip2=_.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(_.createTransform()),this.visual.appendChild(this.tip2)},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(c.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(_.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),_.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),u=this.tip1.transform.baseVal.getItem(0);u.setRotate(a,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(u,0);var g=this.tip2.transform.baseVal.getItem(0);g.setRotate(a+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(g,0)}},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a),this.createTips(),this.adjustVisual()},o.typeName="MeasurementMarker",o.title="Measurement marker",o.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',o}(nt),yt=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.strokePanel.colors=g.defaultColorSet,h.fillColor="transparent",h}return be(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="EllipseFrameMarker",o.title="Ellipse frame marker",o.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',o}(pe),kt=function(){function c(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(c.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),c.prototype.addUndoStep=function(o){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(o)||(this.undoStack.push(o),JSON.stringify(this.lastRedoStep)!==JSON.stringify(o)&&this.redoStack.splice(0,this.redoStack.length))},c.prototype.replaceLastUndoStep=function(o){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=o)},c.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},c.prototype.undo=function(){if(this.undoStack.length>1){var o=this.undoStack.pop();return o!==void 0&&this.redoStack.push(o),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},c.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},c}(),Ie=function(c){function o(a,u,g){var h=c.call(this,a,u,g)||this;return h.strokeColor="transparent",h.strokeWidth=0,h.strokeDasharray="",h.curveX=0,h.curveY=0,h.manipulationStartCurveX=0,h.manipulationStartCurveY=0,h.setStrokeColor=h.setStrokeColor.bind(h),h.setStrokeWidth=h.setStrokeWidth.bind(h),h.setStrokeDasharray=h.setStrokeDasharray.bind(h),h.positionGrips=h.positionGrips.bind(h),h.addControlGrips=h.addControlGrips.bind(h),h.adjustVisual=h.adjustVisual.bind(h),h.setupControlBox=h.setupControlBox.bind(h),h.resize=h.resize.bind(h),h.strokeColor=g.defaultColor,h.strokeWidth=g.defaultStrokeWidth,h.strokeDasharray=g.defaultStrokeDasharray,h.strokePanel=new Ye("Line color",g.defaultColorSet,g.defaultColor),h.strokePanel.onColorChanged=h.setStrokeColor,h.strokeWidthPanel=new ft("Line width",g.defaultStrokeWidths,g.defaultStrokeWidth),h.strokeWidthPanel.onWidthChanged=h.setStrokeWidth,h.strokeStylePanel=new at("Line style",g.defaultStrokeDasharrays,g.defaultStrokeDasharray),h.strokeStylePanel.onStyleChanged=h.setStrokeDasharray,h}return be(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorCurve&&a!==this.visibleCurve&&!this.curveGrip.ownsTarget(a))},o.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},o.prototype.createVisual=function(){this.visual=_.createGroup(),this.selectorCurve=_.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=_.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){c.prototype.pointerDown.call(this,a,u),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=a.x,this.curveY=a.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(u)&&(this.activeGrip=this.curveGrip,this._state="resize")},o.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),_.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),_.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),_.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setupControlBox=function(){c.prototype.setupControlBox.call(this),this.curveControlLine1=_.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=_.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},o.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,c.prototype.addControlGrips.call(this)},o.prototype.positionGrips=function(){c.prototype.positionGrips.call(this);var a=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-a/2,this.curveY-a/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},o.prototype.manipulate=function(a){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+a.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+a.y-this.manipulationStartY),c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){this.activeGrip===this.curveGrip&&(this.curveX=a.x,this.curveY=a.y),c.prototype.resize.call(this,a),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual()},o.prototype.scale=function(a,u){this.curveX=this.curveX*a,this.curveY=this.curveY*u,c.prototype.scale.call(this,a,u)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var u=a;this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.curveX=u.curveX,this.curveY=u.curveY,this.createVisual(),this.adjustVisual()},o.typeName="CurveMarker",o.title="Curve marker",o.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',o}(gt),wt=function(){function c(o,a){a===void 0&&(a=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=o,this.cancelable=a}return Object.defineProperty(c.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),c.prototype.preventDefault=function(){this._defaultPrevented=!0},c}(),pt=function(c){function o(a,u,g){var h=c.call(this,a,!1)||this;return h.dataUrl=u,h.state=g,h}return be(o,c),o}(wt),Xe=function(c){function o(a,u,g){g===void 0&&(g=!1);var h=c.call(this,a,g)||this;return h.marker=u,h}return be(o,c),o}(wt),Ot=function(){function c(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return c.prototype.addEventListener=function(o,a){this[o].push(a)},c.prototype.removeEventListener=function(o,a){var u=this[o].indexOf(a);u>-1&&this[o].splice(u,1)},c}(),Tt=function(){function c(o){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new xe,this._isOpen=!1,this.undoRedoManager=new kt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=c.instanceCounter++,this.styles=new qe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=o,this.targetRoot=document.body,this.width=o.clientWidth,this.height=o.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(c.prototype,"ALL_MARKER_TYPES",{get:function(){return[it,Q,H,Ue,yt,pe,A,re,je,y,nt,Ie]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[it,Q,H,Ue,pe,A,re]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"BASIC_MARKER_TYPES",{get:function(){return[it,Q,H,Ue,A]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(o){var a=this;this._availableMarkerTypes.splice(0),o.forEach(function(u){if(typeof u=="string"){var g=a.ALL_MARKER_TYPES.find(function(h){return h.typeName===u});g!==void 0&&a._availableMarkerTypes.push(g)}else a._availableMarkerTypes.push(u)})},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(o){this._zoomLevel=o,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),c.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Pe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},c.prototype.show=function(){var o=this;this.styles.styleSheetRoot===void 0&&st.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=st.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(a){return a(new wt(o))})},c.prototype.render=function(){return Ce(this,void 0,void 0,function(){var o;return we(this,function(a){switch(a.label){case 0:return this.setCurrentMarker(),(o=new et).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.markersOnly=this.renderMarkersOnly,o.width=this.renderWidth,o.height=this.renderHeight,[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return a.sent(),[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,a.sent()]}})})},c.prototype.close=function(o){var a=this;if(o===void 0&&(o=!1),this.isOpen){var u=!1;o||this.eventListeners.beforeclose.forEach(function(g){var h=new wt(a,!0);g(h),h.defaultPrevented&&(u=!0)}),u||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(g){return g(new wt(a))}),this.detachEvents(),this._isOpen=!1)}},c.prototype.addMarkersToToolbar=function(){for(var o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];(o=this._availableMarkerTypes).push.apply(o,a)},c.prototype.addRenderEventListener=function(o){this.addEventListener("render",function(a){o(a.dataUrl,a.state)})},c.prototype.removeRenderEventListener=function(o){},c.prototype.addCloseEventListener=function(o){this.addEventListener("close",function(){o()})},c.prototype.removeCloseEventListener=function(o){},c.prototype.setupResizeObserver=function(){var o=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return o.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},c.prototype.onPopupTargetResize=function(){var o=1*this.target.clientWidth/this.target.clientHeight,a=this.editorCanvas.clientWidth/o>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*o:this.editorCanvas.clientWidth,u=a<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/o;this.resize(a,u)},c.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},c.prototype.resize=function(o,a){this._isResizing=!0;var u=o/this.imageWidth,g=a/this.imageHeight;this.imageWidth=Math.round(o),this.imageHeight=Math.round(a),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(u,g),this._isResizing=!1},c.prototype.scaleMarkers=function(o,a){var u,g=this;this._currentMarker&&this._currentMarker instanceof Ue?this._currentMarker.scale(o,a):(u=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(h){h!==g._currentMarker&&h.scale(o,a)}),u!==void 0&&this.setCurrentMarker(u)},c.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},c.prototype.setTopLeft=function(){var o=this.editingTarget.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=o.left-a.left,this.top=o.top-a.top},c.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},c.prototype.addDefs=function(){for(var o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];this.defs=_.createDefs(),this.addDefsToImage(),(o=this.defs).append.apply(o,a)},c.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},c.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},c.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},c.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},c.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},c.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},c.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},c.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var o=document.createElement("a");o.href="https://markerjs.com/",o.target="_blank",o.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',o.title="Powered by marker.js",o.style.display="grid",o.style.alignItems="center",o.style.justifyItems="center",o.style.padding="3px",o.style.width="20px",o.style.height="20px",this.logoUI.appendChild(o),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},c.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},c.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},c.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},c.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new _e(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Ve(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},c.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},c.prototype.removeMarker=function(o){this.markerImage.removeChild(o.container),this.markers.indexOf(o)>-1&&this.markers.splice(this.markers.indexOf(o),1),o.dispose()},c.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},c.prototype.toolbarButtonClicked=function(o,a){if(o==="marker"&&a!==void 0)this.createNewMarker(a);else if(o==="action")switch(a){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},c.prototype.deleteSelectedMarker=function(){var o=this;if(this._currentMarker!==void 0){var a=!1;if(this.eventListeners.markerbeforedelete.forEach(function(g){var h=new Xe(o,o._currentMarker,!0);g(h),h.defaultPrevented&&(a=!0)}),!a){var u=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(g){return g(new Xe(o,u))})}}},c.prototype.clear=function(){var o=this,a=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(B){var Te=new Xe(o,void 0,!0);B(Te),Te.defaultPrevented&&(a=!0)}),!a)){this.setCurrentMarker();for(var u=function(B){var Te=g.markers[B];g.setCurrentMarker(g.markers[B]),g._currentMarker.dispose(),g.markerImage.removeChild(g._currentMarker.container),g.markers.splice(g.markers.indexOf(g._currentMarker),1),g.eventListeners.markerdelete.forEach(function(ae){return ae(new Xe(o,Te))})},g=this,h=this.markers.length-1;h>=0;h--)u(h);this.addUndoStep()}},Object.defineProperty(c.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),c.prototype.showNotesEditor=function(){var o;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(o=this._currentMarker.notes)!==null&&o!==void 0?o:"",this.overlayContainer.appendChild(this.notesArea))},c.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},c.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},c.prototype.addUndoStep=function(){var o=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var a=this.getState(),u=this.undoRedoManager.getLastUndoStep();if(!u||u.width===a.width&&u.height===a.height){var g=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(a),g<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(h){return h(new wt(o))})}else this.undoRedoManager.replaceLastUndoStep(a),this.eventListeners.statechange.forEach(function(h){return h(new wt(o))})}},c.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},c.prototype.undoStep=function(){var o=this,a=this.undoRedoManager.undo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(u){return u(new wt(o))}))},c.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},c.prototype.redoStep=function(){var o=this,a=this.undoRedoManager.redo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(u){return u(new wt(o))}))},c.prototype.stepZoom=function(){var o=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=o<this.zoomSteps.length-1?this.zoomSteps[o+1]:this.zoomSteps[0]},c.prototype.panTo=function(o){this.contentDiv.scrollBy({left:this.prevPanPoint.x-o.x,top:this.prevPanPoint.y-o.y}),this.prevPanPoint=o},c.prototype.startRenderAndClose=function(){return Ce(this,void 0,void 0,function(){var o,a,u=this;return we(this,function(g){switch(g.label){case 0:return[4,this.render()];case 1:return o=g.sent(),a=this.getState(),this.eventListeners.render.forEach(function(h){return h(new pt(u,o,a))}),this.close(!0),[2]}})})},c.prototype.getState=function(o){o===!0&&this.setCurrentMarker();var a={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(u){return a.markers.push(u.getState())}),a},c.prototype.restoreState=function(o){var a=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);o.markers.forEach(function(u){var g=a._availableMarkerTypes.find(function(B){return B.typeName===u.typeName});if(g!==void 0){var h=a.addNewMarker(g);h.restoreState(u),a.markers.push(h)}}),o.width&&o.height&&(o.width!==this.imageWidth||o.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/o.width,this.imageHeight/o.height),this.eventListeners.restorestate.forEach(function(u){return u(new wt(a))})},c.prototype.addNewMarker=function(o){var a=_.createGroup();return this.markerImage.appendChild(a),new o(a,this.overlayContainer,this.settings)},c.prototype.createNewMarker=function(o){var a,u=this;(a=typeof o=="string"?this._availableMarkerTypes.find(function(g){return g.typeName===o}):o)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(a),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(a.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(g){return g(new Xe(u,u._currentMarker))}))},c.prototype.markerCreated=function(o){var a=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(o),this.setCurrentMarker(o),o instanceof Q&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Q):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(u){return u(new Xe(a,a._currentMarker))})},c.prototype.colorChanged=function(o){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=o,this.settings.defaultStrokeColor=o)},c.prototype.fillColorChanged=function(o){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=o)},c.prototype.markerStateChanged=function(o){var a=this;this.eventListeners.markerchange.forEach(function(u){return u(new Xe(a,o))})},c.prototype.setCurrentMarker=function(o){var a=this;this._currentMarker!==o&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(u){return u(new Xe(a,a._currentMarker))})),this._currentMarker=o,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(u){return u(new Xe(a,a._currentMarker))}))},c.prototype.onPointerDown=function(o){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||o.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var a=this.markers.find(function(u){return u.ownsTarget(o.target)});a!==void 0?(this.setCurrentMarker(a),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(o.clientX,o.clientY),o.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:o.clientX,y:o.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(o.clientX,o.clientY))},c.prototype.onDblClick=function(o){if(this._isFocused||this.focus(),this.mode==="select"){var a=this.markers.find(function(u){return u.ownsTarget(o.target)});a!==void 0&&a!==this._currentMarker&&this.setCurrentMarker(a),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(o.clientX,o.clientY),o.target):this.setCurrentMarker()}},c.prototype.onPointerMove=function(o){this.touchPoints!==1&&o.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||o.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(o.clientX,o.clientY)):this.zoomLevel>1&&this.panTo({x:o.clientX,y:o.clientY}))},c.prototype.onPointerUp=function(o){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(o.clientX,o.clientY)),this.isDragging=!1,this.addUndoStep()},c.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},c.prototype.onKeyUp=function(o){this._currentMarker===void 0||this.notesArea!==void 0||o.key!=="Delete"&&o.key!=="Backspace"||this.deleteSelectedMarker()},c.prototype.clientToLocalCoordinates=function(o,a){var u=this.markerImage.getBoundingClientRect();return{x:(o-u.left)/this.zoomLevel,y:(a-u.top)/this.zoomLevel}},c.prototype.onWindowResize=function(){this.positionUI()},c.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},c.prototype.addLicenseKey=function(o){Pe.addKey(o)},c.prototype.addEventListener=function(o,a){this.eventListeners.addEventListener(o,a)},c.prototype.removeEventListener=function(o,a){this.eventListeners.removeEventListener(o,a)},c.prototype.renderState=function(o){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(o),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(c.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),c.prototype.focus=function(){var o=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(a){return a(new wt(o))}))},c.prototype.blur=function(){var o=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(a){return a(new wt(o))}))},c.instanceCounter=0,c}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Vt=function(c,o){return(Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var g in u)Object.prototype.hasOwnProperty.call(u,g)&&(a[g]=u[g])})(c,o)};function _t(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function a(){this.constructor=c}Vt(c,o),c.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function St(c,o,a,u){return new(a||(a=Promise))(function(g,h){function B(ut){try{ae(u.next(ut))}catch(De){h(De)}}function Te(ut){try{ae(u.throw(ut))}catch(De){h(De)}}function ae(ut){var De;ut.done?g(ut.value):(De=ut.value,De instanceof a?De:new a(function(Et){Et(De)})).then(B,Te)}ae((u=u.apply(c,o||[])).next())})}function bn(c,o){var a,u,g,h,B={label:0,sent:function(){if(1&g[0])throw g[1];return g[1]},trys:[],ops:[]};return h={next:Te(0),throw:Te(1),return:Te(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function Te(ae){return function(ut){return function(De){if(a)throw new TypeError("Generator is already executing.");for(;B;)try{if(a=1,u&&(g=2&De[0]?u.return:De[0]?u.throw||((g=u.return)&&g.call(u),0):u.next)&&!(g=g.call(u,De[1])).done)return g;switch(u=0,g&&(De=[2&De[0],g.value]),De[0]){case 0:case 1:g=De;break;case 4:return B.label++,{value:De[1],done:!1};case 5:B.label++,u=De[1],De=[0];continue;case 7:De=B.ops.pop(),B.trys.pop();continue;default:if(!(g=B.trys,(g=g.length>0&&g[g.length-1])||De[0]!==6&&De[0]!==2)){B=0;continue}if(De[0]===3&&(!g||De[1]>g[0]&&De[1]<g[3])){B.label=De[1];break}if(De[0]===6&&B.label<g[1]){B.label=g[1],g=De;break}if(g&&B.label<g[2]){B.label=g[2],B.ops.push(De);break}g[2]&&B.ops.pop(),B.trys.pop();continue}De=o.call(c,B)}catch(Et){De=[6,Et],u=0}finally{a=g=0}if(5&De[0])throw De[1];return{value:De[0]?De[1]:void 0,done:!0}}([ae,ut])}}}var rn=function(){function c(){}return c.addKey=function(o){c.key=o},Object.defineProperty(c,"isLicensed",{get:function(){return!!c.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(c.key)},enumerable:!1,configurable:!0}),c}(),dt=function(){function c(){}return c.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},c.setAttributes=function(o,a){for(var u=0,g=a;u<g.length;u++){var h=g[u],B=h[0],Te=h[1];o.setAttribute(B,Te)}},c.createRect=function(o,a,u){var g=document.createElementNS("http://www.w3.org/2000/svg","rect");return g.setAttribute("width",o.toString()),g.setAttribute("height",a.toString()),u&&c.setAttributes(g,u),g},c.createLine=function(o,a,u,g,h){var B=document.createElementNS("http://www.w3.org/2000/svg","line");return B.setAttribute("x1",o.toString()),B.setAttribute("y1",a.toString()),B.setAttribute("x2",u.toString()),B.setAttribute("y2",g.toString()),h&&c.setAttributes(B,h),B},c.createPolygon=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","polygon");return u.setAttribute("points",o),a&&c.setAttributes(u,a),u},c.createCircle=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","circle");return u.setAttribute("cx",(o/2).toString()),u.setAttribute("cy",(o/2).toString()),u.setAttribute("r",o.toString()),a&&c.setAttributes(u,a),u},c.createEllipse=function(o,a,u){var g=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return g.setAttribute("cx",(o/2).toString()),g.setAttribute("cy",(a/2).toString()),g.setAttribute("rx",(o/2).toString()),g.setAttribute("ry",(a/2).toString()),u&&c.setAttributes(g,u),g},c.createGroup=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return o&&c.setAttributes(a,o),a},c.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},c.createMarker=function(o,a,u,g,h,B,Te){var ae=document.createElementNS("http://www.w3.org/2000/svg","marker");return c.setAttributes(ae,[["id",o],["orient",a],["markerWidth",u.toString()],["markerHeight",g.toString()],["refX",h.toString()],["refY",B.toString()]]),ae.appendChild(Te),ae},c.createText=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),o&&c.setAttributes(a,o),a},c.createTSpan=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");return u.textContent=o,a&&c.setAttributes(u,a),u},c.createImage=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return o&&c.setAttributes(a,o),a},c.createPoint=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return u.x=o,u.y=a,u},c.createPath=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","path");return u.setAttribute("d",o),a&&c.setAttributes(u,a),u},c.createElement=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg",o);return a&&c.setAttributes(u,a),u},c.getHollowRectanglePath=function(o,a,u,g,h,B,Te,ae){return"M"+o+","+a+"V"+(a+g)+"H"+(o+u)+"V"+a+"H"+h+"V"+B+"H"+(h+Te)+"V"+(B+ae)+"H"+h+"V"+a+"Z"},c}(),Vn=function(){function c(o){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+o+"_"}return Object.defineProperty(c.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),c.prototype.addClass=function(o){return this.styleSheet===void 0&&this.addStyleSheet(),o.name=""+this.classNamePrefix+o.localName,this.classes.push(o),this.styleSheet.sheet.insertRule("."+o.name+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length),o},c.prototype.addRule=function(o){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(o),this.styleSheet.sheet.insertRule(o.selector+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length)},c.prototype.addStyleSheet=function(){var o;this.styleSheet=document.createElement("style"),((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).appendChild(this.styleSheet),this.addRule(new Cn("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Cn("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Cn("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new pn("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new pn("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},c.prototype.removeStyleSheet=function(){var o;this.styleSheet&&(((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},c}(),Cn=function(c,o){this.selector=c,this.style=o},pn=function(c,o){this.localName=c,this.style=o},Sn=function(){function c(){this.blocks=[],this.display=""}return c.prototype.addButtonBlock=function(o){o.className=this.blockClassName,o.buttonClassName=this.buttonClassName,o.buttonColorsClassName=this.buttonColorsClassName,o.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(o)},c.prototype.addElementBlock=function(o){o.className===void 0&&(o.className=this.blockClassName),this.blocks.push(o)},c.prototype.getUI=function(){var o=document.createElement("div");return o.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,o.style.display=this.display,this.blocks.forEach(function(a){return o.appendChild(a.getUI())}),o},c}(),li=function(){function c(){}return c.prototype.getUI=function(){var o=document.createElement("div");if(o.className=this.className,this.minWidth!==void 0&&(o.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":o.style.justifyContent="flex-start";break;case"center":o.style.justifyContent="center";break;case"end":o.style.justifyContent="flex-end"}return o.style.whiteSpace="nowrap",o},c}(),Qn=function(c){function o(){var a=c!==null&&c.apply(this,arguments)||this;return a.buttons=[],a}return _t(o,c),o.prototype.addButton=function(a){a.className=this.buttonClassName,a.colorsClassName=this.buttonColorsClassName,a.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(a)},o.prototype.getUI=function(){var a=c.prototype.getUI.call(this);return this.buttons.forEach(function(u){return a.appendChild(u.getUI())}),a},o}(li),Nt=function(){function c(o,a){this._isActive=!1,this._isHidden=!1,this._icon=o,this.title=a,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(c.prototype,"icon",{get:function(){return this._icon},set:function(o){this._icon=o,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isActive",{get:function(){return this._isActive},set:function(o){this._isActive=o,this.adjustClassName()},enumerable:!1,configurable:!0}),c.prototype.getUI=function(){var o=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return o.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},c.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},c.prototype.hide=function(){this._isHidden=!0},c}(),ht=function(c){function o(){var a=c!==null&&c.apply(this,arguments)||this;return a.elements=[],a}return _t(o,c),o.prototype.addElement=function(a){this.elements.push(a)},o.prototype.getUI=function(){var a=c.prototype.getUI.call(this);return this.elements.forEach(function(u){return a.appendChild(u)}),a},o}(li),jn=function(){function c(o,a){this.horizontal=o,this.vertical=a}return Object.defineProperty(c.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),c.prototype.getVerticalLength=function(o){return o/this.ratio},c.prototype.getHorizontalLength=function(o){return o*this.ratio},c}(),ui=function(){function c(){}return c.getIcon=function(o,a){if(o>0&&a>0){var u=new jn(o,a),g=u.ratio>=1?20:u.getHorizontalLength(20),h=u.ratio<1?20:u.getVerticalLength(20),B=document.createElementNS("http://www.w3.org/2000/svg","svg");B.setAttribute("xmlns","http://www.w3.org/2000/svg"),B.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(B);var Te=dt.createDefs();B.appendChild(Te);var ae=dt.createElement("clipPath",[["id","text-bg-clip"]]);Te.appendChild(ae);var ut=dt.createPath(dt.getHollowRectanglePath((24-g)/2,(24-h)/2,g,h,(24-g)/2+2,(24-h)/2+2,g-4,h-4));B.appendChild(ut);var De=dt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);De.appendChild(dt.createTSpan(o+":"+a)),B.appendChild(De);var Et=De.getBBox();dt.setAttributes(De,[["x",((24-Et.width)/2).toString()],["y",((24-Et.height)/2-Et.y).toString()]]);var Pt=dt.createPath(dt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Et.width))/2,(24-Math.ceil(Et.height))/2,Math.ceil(Et.width),Math.ceil(Et.height)));return ae.appendChild(Pt),dt.setAttributes(ut,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(B),B.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},c}(),kn=function(c){function o(a,u,g){var h=c.call(this,a,u)||this;return h.isDropdownOpen=!1,h.onClick=h.dropdownButtonClicked,h.dropdownButtons=g,h}return _t(o,c),o.prototype.setupDropdown=function(){var a=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(u){u.className=a.className,u.colorsClassName=a.colorsClassName,a.dropdownBlock.appendChild(u.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},o.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},o.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},o.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},o.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},o.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},o}(Nt),Lt=function(){function c(o,a){this.GRIP_SIZE=10,this.color=o,this.fillColor=a,this.visual=dt.createGroup(),this.visual.appendChild(dt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(dt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return c.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},c.prototype.setCenter=function(o,a){this.visual.childNodes.forEach(function(u){return dt.setAttributes(u,[["cx",o.toString()],["cy",a.toString()]])})},c}(),Jn=function(){function c(o,a,u,g){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=o,this.canvasHeight=a,this.margin=u,this.container=g,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(c.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(o){this._aspectRatio=o,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.gridContainer&&dt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(o){this._zoomFactor=o,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),c.prototype.open=function(){var o=this;this.cropShadeElement=dt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=dt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var a=0;a<this.numberOfGridLines;a++)this.horizontalGridLines.push(dt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(dt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(u){return o.gridContainer.appendChild(u)}),this.verticalGridLines.forEach(function(u){return o.gridContainer.appendChild(u)}),this.cropRectElement=dt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Lt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Lt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Lt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Lt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},c.prototype.setCropRectangle=function(o){this.cropRect=o;var a=Object.assign({},this.cropRect);this.zoomFactor!==1&&(a.width=this.cropRect.width*this.zoomFactor,a.height=this.cropRect.height*this.zoomFactor,a.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-a.width/2,a.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-a.height/2),dt.setAttributes(this.cropRectElement,[["x",a.x.toString()],["y",a.y.toString()],["width",a.width.toString()],["height",a.height.toString()]]);var u=a.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(h,B){var Te=a.y+u*(B+1);dt.setAttributes(h,[["x1",""+a.x],["y1",""+Te],["x2",""+(a.x+a.width)],["y2",""+Te]])});var g=a.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(h,B){var Te=a.x+g*(B+1);dt.setAttributes(h,[["x1",""+Te],["y1",""+a.y],["x2",""+Te],["y2",""+(a.y+a.height)]])}),dt.setAttributes(this.cropShadeElement,[["d",dt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,a.x,a.y,a.width,a.height)]]),this.topLeftGrip.setCenter(a.x,a.y),this.topRightGrip.setCenter(a.x+a.width,a.y),this.bottomLeftGrip.setCenter(a.x,a.y+a.height),this.bottomRightGrip.setCenter(a.x+a.width,a.y+a.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},c.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},c.prototype.clientToLocalCoordinates=function(o,a){var u=this.container.getBoundingClientRect();return{x:o-u.left+this.margin,y:a-u.top+this.margin}},c.prototype.onPointerDown=function(o){this.container.setPointerCapture(o.pointerId),this.previousPoint=this.clientToLocalCoordinates(o.clientX,o.clientY),this.cropRectElement===o.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(o.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(o.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(o.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(o.target)&&(this.activeGrip=this.bottomRightGrip)},c.prototype.onPointerMove=function(o){if(this.isMoving)this.move(this.clientToLocalCoordinates(o.clientX,o.clientY));else if(this.activeGrip){var a=this.clientToLocalCoordinates(o.clientX,o.clientY);this.resize(a)}o.preventDefault()},c.prototype.onPointerUp=function(o){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(o.pointerId)},c.prototype.move=function(o){var a=o.x-this.previousPoint.x,u=o.y-this.previousPoint.y;this.zoomFactor!==1&&(a=-a/this.zoomFactor,u=-u/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+a),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+u),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=o},c.prototype.resize=function(o){var a=Object.assign({},this.cropRect),u=o.x-this.previousPoint.x,g=o.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:a.x+u<this.margin&&(u=this.margin-a.x),a.x+=u,a.width=this.cropRect.x+this.cropRect.width-a.x;break;case this.bottomRightGrip:case this.topRightGrip:a.width+u>this.canvasWidth*this.zoomFactor&&(u=this.canvasWidth*this.zoomFactor-a.width),a.width+=u}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(a.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(u),a.height=this.aspectRatio.getVerticalLength(a.width)):(a.y+=g,a.height=this.cropRect.y+this.cropRect.height-a.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?a.height=this.aspectRatio.getVerticalLength(a.width):a.height+=g}a.width<10&&(a.x=this.cropRect.x,a.width=10),a.height<10&&(a.y=this.cropRect.y,a.height=10),this.previousPoint=o,a.x>=this.margin&&a.y>=this.margin&&a.x-this.margin+a.width<=this.canvasWidth&&a.y-this.margin+a.height<=this.canvasHeight&&(this.cropRect=a,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},c.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var o=this.cropRect.x+this.cropRect.width/2,a=this.cropRect.y+this.cropRect.height/2,u=this.aspectRatio.getHorizontalLength(this.cropRect.height),g=this.aspectRatio.getVerticalLength(this.cropRect.width);u/this.canvasWidth<g/this.canvasHeight?this.cropRect.width=u:this.cropRect.height=g,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=o-this.cropRect.width/2,this.cropRect.y=a-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},c.prototype.getRescaledRect=function(o,a,u,g,h,B){var Te=u/o,ae=g/a;return{x:(h.x-B)*Te+B,y:(h.y-B)*ae+B,width:h.width*Te,height:h.height*ae}},c.prototype.scaleCanvas=function(o,a){var u=this.getRescaledRect(this.canvasWidth,this.canvasHeight,o,a,this.cropRect,this.margin);this.canvasWidth=o,this.canvasHeight=a,this.onCropChange&&this.onCropChange(u),this.setCropRectangle(u)},c}(),hi=function(){function c(o){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=o,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(c.prototype,"angle",{get:function(){return this._angle},set:function(o){this._angle=o,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),c.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},c.prototype.onPointerDown=function(o){this.controlContainer.setPointerCapture(o.pointerId),this.isDragging=!0,this.previousPoint={x:o.clientX,y:o.clientY}},c.prototype.onPointerMove=function(o){this.isDragging&&(this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.previousPoint.x=o.clientX)},c.prototype.onPointerUp=function(o){this.isDragging&&this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(o.pointerId)},c.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var o=this.angleLabelText.getBBox();dt.setAttributes(this.angleLabelElement,[["x",((this.width-o.width)/2).toString()],["y",(this.height/2).toString()]])}},c.prototype.positionScaleShape=function(){if(this.scaleShape){var o=this.scaleShape.transform.baseVal.getItem(0);o.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(o,0)}},c.prototype.getVisual=function(){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("width",this.width+"px"),o.setAttribute("height",this.height+"px"),o.setAttribute("viewBox","0 0 "+this.width+" "+this.height),o.style.flexShrink="0",document.body.appendChild(o);for(var a="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,u=1;u<=this.width/5+10;u++){var g=u%5==0?this.height/3:this.height/6;a+="h4v"+-g+"h1v"+g}a+="v1H0Z",this.scaleShape=dt.createPath(a);var h=dt.createTransform();this.scaleShape.transform.baseVal.appendItem(h),o.appendChild(this.scaleShape),this.angleLabelElement=dt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=dt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var B=dt.createTSpan("");return B.innerHTML="&deg;",this.angleLabelElement.appendChild(B),o.appendChild(this.angleLabelElement),document.body.removeChild(o),o},c}(),vi=function(){function c(){this.naturalSize=!1,this.imageType="image/png"}return c.prototype.rasterize=function(o,a,u,g,h,B,Te){var ae=this;return new Promise(function(ut){var De=document.createElement("canvas");De.width=o.width.baseVal.value-2*g,De.height=o.height.baseVal.value-2*g;var Et=1,Pt=1;ae.naturalSize===!0?(Et=a.naturalWidth/(o.width.baseVal.value-2*g)/B,Pt=a.naturalHeight/(o.height.baseVal.value-2*g)/Te,De.width=a.naturalWidth/B,De.height=a.naturalHeight/Te):ae.width!==void 0&&ae.height!==void 0&&(Et=ae.width/u.width,Pt=ae.height/u.height,De.width*=Et,De.height*=Pt);var zt=De.getContext("2d");zt.translate(De.width/2,De.height/2),zt.rotate(h*Math.PI/180),zt.scale(B,Te),zt.translate(-De.width/2,-De.height/2),zt.drawImage(a,0,0,De.width,De.height);var Wn=document.createElement("canvas");Wn.width=u.width*Et,Wn.height=u.height*Pt,Wn.getContext("2d").putImageData(zt.getImageData((u.x-g)*Et,(u.y-g)*Pt,u.width*Et,u.height*Pt),0,0),ut(Wn.toDataURL(ae.imageType,ae.imageQuality))})},c}(),Ne=function(){function c(o){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=c.instanceCounter++,this.styles=new Vn(this.instanceNo),this.target=o,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(c.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(o){this._zoomToCropEnabled=o,o?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"gridLines",{get:function(){return this._gridLines},set:function(o){this._gridLines=o,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(o){this._rotationAngle=o,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"aspectRatio",{get:function(){var o;return(o=this._aspectRatio)!==null&&o!==void 0?o:this.aspectRatios[0]},set:function(o){this._aspectRatio=o},enumerable:!1,configurable:!0}),c.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},c.prototype.show=function(){this.showUI(),this.open()},c.prototype.close=function(o){o===void 0&&(o=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),o||this.closeEventListeners.forEach(function(a){return a()}),this._isOpen=!1)},c.prototype.addRenderEventListener=function(o){this.renderEventListeners.push(o)},c.prototype.removeRenderEventListener=function(o){this.renderEventListeners.indexOf(o)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(o),1)},c.prototype.addCloseEventListener=function(o){this.closeEventListeners.push(o)},c.prototype.removeCloseEventListener=function(o){this.closeEventListeners.indexOf(o)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(o),1)},c.prototype.setupResizeObserver=function(){var o=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},c.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var o=1*this.target.clientWidth/this.target.clientHeight,a=this.contentDiv.clientWidth/o>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*o:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,u=a+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/o;this.resize(a,u)}},c.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},c.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",dt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},c.prototype.resize=function(o,a){this.imageWidth=Math.round(o),this.imageHeight=Math.round(a),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},c.prototype.setEditingTarget=function(){var o=document.createElement("canvas");o.width=this.target.naturalWidth,o.height=this.target.naturalHeight,o.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var a=o.toDataURL();dt.setAttributes(this.editingTarget,[["href",a]]),this.setEditingTargetSize()},c.prototype.setTopLeft=function(){var o=this.target.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=o.left-a.left-this.CANVAS_MARGIN,this.top=o.top-a.top-this.CANVAS_MARGIN},c.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=dt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=dt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=dt.createGroup(),this.editingTargetRotationScaleContainer=dt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var o=dt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(o);var a=dt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(a),this.editingTargetContainer=dt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},c.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},c.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=dt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Jn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},c.prototype.zoomToCrop=function(){if(this.cropRect){var o=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,a=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=o+"px "+a+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-o+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-a+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},c.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},c.prototype.cropRectChanged=function(o){this.cropRect=o,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},c.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},c.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},c.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},c.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var o=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,a=this.target.offsetTop>o+this.CANVAS_MARGIN?this.target.offsetTop-(o+this.CANVAS_MARGIN):0;this.coverDiv.style.top=a+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},c.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},c.prototype.addTopToolbar=function(){var o=this;this.topToolbar=new Sn,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var a=new Qn;a.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(a);var u=[];this.aspectRatios.forEach(function(Pt){var zt=new Nt(ui.getIcon(Pt.horizontal,Pt.vertical),Pt.horizontal===0&&Pt.vertical===0?"FREE":Pt.horizontal+":"+Pt.vertical);zt.onClick=function(){return o.ratioButtonClicked(Pt)},u.push(zt)}),this.aspectRatioButton=new kn(ui.getIcon(0,0),"Aspect ratio",u),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,a.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var g=new Nt('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");g.isActive=this.isGridVisible,g.onClick=function(){o.isGridVisible=!o.isGridVisible,g.isActive=o.isGridVisible},a.addButton(g);var h=new Nt('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(h.isActive=this.zoomToCropEnabled,h.onClick=function(){o.zoomToCropEnabled=!o.zoomToCropEnabled,h.isActive=o.zoomToCropEnabled},a.addButton(h),!rn.isLicensed){var B=new ht;this.topToolbar.addElementBlock(B);var Te=document.createElement("div");Te.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ae=document.createElement("a");ae.style.color="currentColor",ae.href="https://markerjs.com/products/cropro",ae.target="_blank",ae.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Te.appendChild(ae),B.addElement(Te)}var ut=new Qn;ut.minWidth=3*this.toolbarHeight+"px",ut.contentAlign="end",this.topToolbar.addButtonBlock(ut);var De=new Nt('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");De.onClick=this.startRenderAndClose,ut.addButton(De),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(De.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Et=new Nt('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Et.onClick=this.close,ut.addButton(Et),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Et.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},c.prototype.addBottomToolbar=function(){var o=this;this.bottomToolbar=new Sn,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var a=new Qn;a.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(a);var u=new Nt('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");u.onClick=this.rotateLeftButtonClicked,a.addButton(u);var g=new Nt('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");g.onClick=this.rotateRightButtonClicked,a.addButton(g);var h=new ht;h.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(h),this.straightener=new hi("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ut){o.rotateBy(ut),o.straightener.angle=o.rotationAngle},h.addElement(this.straightener.getUI());var B=new Qn;B.minWidth=2*this.toolbarHeight+"px",B.contentAlign="end",this.bottomToolbar.addButtonBlock(B);var Te=new Nt('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Te.onClick=this.flipHorizontallyButtonClicked,B.addButton(Te);var ae=new Nt('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");ae.onClick=this.flipVerticallyButtonClicked,B.addButton(ae)},c.prototype.ratioButtonClicked=function(o){this.aspectRatio=o,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},c.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ui.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},c.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new jn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},c.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},c.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},c.prototype.restoreState=function(o){if(o){var a=this.cropLayer.getRescaledRect(o.width,o.height,this.imageWidth,this.imageHeight,o.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(a),this.cropRectChanged(a),this.flippedHorizontally=o.flippedHorizontally,this.flippedVertically=o.flippedVertically,this.applyFlip(),this.rotationAngle=o.rotationAngle,this.applyRotation()}},c.prototype.clientToLocalCoordinates=function(o,a){var u=this.cropImage.getBoundingClientRect();return{x:o-u.left,y:a-u.top}},c.prototype.onWindowResize=function(){this.positionUI()},c.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var o=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},c.prototype.rotateLeftButtonClicked=function(){var o=this.rotationAngle-90;this.rotationAngle%90!=0&&(o+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(o)},c.prototype.rotateRightButtonClicked=function(){var o=this.rotationAngle+90;this.rotationAngle%90!=0&&(o-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(o)},c.prototype.rotateTo=function(o){o=(o=o>180?o-360:o)<=-180?o+360:o,this.rotationAngle=o,this.applyRotation()},c.prototype.rotateBy=function(o){this.rotateTo((this.rotationAngle+o)%360)},c.prototype.applyRotation=function(){var o=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var a=this.editingTargetRotationContainer.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(a,0);var u=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/u.width,this.imageHeight/u.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=o},c.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},c.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},c.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},c.prototype.startRenderAndClose=function(){return St(this,void 0,void 0,function(){var o,a;return bn(this,function(u){switch(u.label){case 0:return[4,this.render()];case 1:return o=u.sent(),a=this.getState(),this.renderEventListeners.forEach(function(g){return g(o,a)}),this.close(!0),[2]}})})},c.prototype.render=function(){return St(this,void 0,void 0,function(){var o;return bn(this,function(a){switch(a.label){case 0:return(o=new vi).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.width=this.renderWidth,o.height=this.renderHeight,this.unzoomFromCrop(),dt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,o.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return a.sent(),[4,o.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,a.sent()]}})})},c.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new pn("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new pn("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new pn("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var o=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pn("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*o)+`px;
height: `+(this.toolbarHeight-2*o)+`px;
padding: `+o+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new pn("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new pn("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Cn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Cn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new pn("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new pn("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new pn("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new pn("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*o)+`px;
padding: `+o+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new pn("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},c.instanceCounter=0,c}(),xt=p("8hTe"),ti=p.n(xt),ci=/<pre[^>]*>/g;function di(c){var o=document.createElement("div");return o.innerHTML=c,o.childNodes.length===0?"":o.childNodes[0].nodeValue}var Li=ge.a=function(c){var o=c.value,a=o===void 0?"":o,u=c.edit,g=u===void 0?!1:u,h=c.className,B=c.showTextOnly,Te=c.showLines,ae=c.replaces,ut=c.zoomImg,De=c.hasMask,Et=c.style,Pt=Et===void 0?{}:Et,zt=c.stylesPrev,Wn=zt===void 0?{}:zt,zn=String(a),ln=Object(U.useRef)(),Kn=Object(U.useRef)(),Qi=Object(U.useState)(""),Mn=Object(k.a)(Qi,2),Tn=Mn[0],ni=Mn[1],yi=Object(U.useState)("office"),Xn=Object(k.a)(yi,2),ii=Xn[0],Fn=Xn[1],fr=function(){var Ut=new Ne(Kn.current);Ut.displayMode="popup",Ut.addRenderEventListener(function(){var gn=Object(J.a)(M.a.mark(function jt(mn){var Jt;return M.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return ln.current.style.display="none",on.next=3,Object(He.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:mn}});case 3:Jt=on.sent,Jt!=null&&Jt.id&&ae(Kn.current.getAttribute("src").replace(Ae.a.API_SERVER,""),"/api/attachments/".concat(Jt==null?void 0:Jt.id,"?type=").concat(Jt.content_type));case 5:case"end":return on.stop()}},jt)}));return function(jt){return gn.apply(this,arguments)}}()),Ut.show()},Ji=function(){var Ut=new Tt(Kn.current);Ut.settings.displayMode="popup",Ut.addEventListener("render",function(){var gn=Object(J.a)(M.a.mark(function jt(mn){var Jt;return M.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:if(ln.current.style.display="none",!Kn.current){on.next=6;break}return on.next=4,Object(He.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:mn.dataUrl}});case 4:Jt=on.sent,Jt!=null&&Jt.id&&ae(Kn.current.getAttribute("src").replace(Ae.a.API_SERVER,""),"/api/attachments/".concat(Jt==null?void 0:Jt.id,"?type=").concat(Jt.content_type));case 6:case"end":return on.stop()}},jt)}));return function(jt){return gn.apply(this,arguments)}}()),Ut.show(),window.markerArea=Ut},Pn=Object(U.useMemo)(function(){try{var $t=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ut=/\"\/api\/attachments\/|\"\/attachments\/download\//g,gn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;zn=zn.replace($t,"("+Ae.a.API_SERVER+"/api/attachments/").replace(Ut,'"'+Ae.a.API_SERVER+"/api/attachments/").replace(gn,'"'+Ae.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,`
`),zn=zn.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(bi){}var jt=ce(zn),mn=te();if(zn.match(/\[TOC\]/)&&(jt=jt.replace("<p>[TOC]</p>",Be()),We()),jt=jt.replace(/(__special_katext_id_\d+__)/g,function(bi,on){var an=mn[on],ri=an.type,Ci=an.expression;return Object(ve.renderToString)(di(Ci)||"",{displayMode:ri==="block",throwOnError:!1,output:"html"})}),jt=jt.replace(/▁/g,"\u2581\u2581\u2581"),K(),B){var Jt=document.createElement("div");return Jt.innerHTML=jt,Jt.innerText}return setTimeout(function(){return Oi()},500),jt},[zn]),Nn=Object(U.useRef)();fe.WebkitLineClamp=Te,Te&&(Pt=Object(oe.a)(Object(oe.a)({},Pt),fe));function Ii($t){var Ut=$t.target;if(Ut.tagName.toUpperCase()==="IMG"){if(ut){var gn=Ut.getAttribute("src");ni(gn),Fn("image")}}else if(Ut.tagName.toUpperCase()==="A"){var jt=Ut.getAttribute("href");if(jt.indexOf("office")>-1)$t.preventDefault(),ni(jt),Fn("office");else if(jt.indexOf("application/pdf")>-1)$t.preventDefault(),ni(jt),Fn("pdf");else if(jt.indexOf("type=text")>-1)$t.preventDefault(),ni(jt),Fn("html");else if(jt.startsWith("#")){$t.preventDefault();var mn=document.getElementById(jt.replace("#",""));mn&&mn.scrollIntoView(!0)}}}var Oi=function(){var Ut,gn=(Ut=Nn.current)===null||Ut===void 0?void 0:Ut.querySelectorAll("video");gn==null||gn.forEach(function(jt){if(jt.oncontextmenu=function(){return!1},jt.src.indexOf(".m3u8")>-1&&!jt.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var mn=new Y.a;mn.loadSource(jt.src),mn.attachMedia(jt)}}})};Object(U.useEffect)(function(){if(Nn.current&&Pn&&(Pn.match(ci)&&window.PR.prettyPrint()),Nn.current)return Nn.current.addEventListener("click",Ii),function(){Nn.current.removeEventListener("click",Ii),K(),We()}},[Pn,Nn.current,Ii]);var Pi=function(Ut){if(!g)return;Ut.target.nodeName==="IMG"?(ln.current.style.display="flex",ln.current.style.width=Ut.target.clientWidth+"px",ln.current.style.height=Ut.target.clientHeight+"px",ln.current.style.top=Ut.target.offsetTop+"px",ln.current.style.left=Ut.target.offsetLeft+"px",Kn.current.src=Ut.target.getAttribute("src")):ln.current.style.display="none"};return E.a.createElement("div",{style:{position:"relative"}},E.a.createElement("div",{ref:Nn,style:Object(oe.a)({},Pt),className:"".concat(h||""," markdown-body ").concat(ti.a.mdBody),onMouseOver:Pi,dangerouslySetInnerHTML:{__html:Pn}}),E.a.createElement("div",{ref:ln,className:ti.a.button},E.a.createElement(de.a,null,E.a.createElement(se.a,{onClick:function(){return fr()}},"\u88C1\u526A"),E.a.createElement(se.a,{onClick:function(){return Ji()}},"\u7F16\u8F91"))),E.a.createElement("img",{ref:Kn,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),E.a.createElement(Fe.a,{close:!0,data:Tn,hasMask:De,type:Tn!=null&&Tn.length?ii:"",style:Object(oe.a)({},Wn),onClose:function(){return ni("")}}))}},"9VGf":function(ye,ge,p){"use strict";p.d(ge,"a",function(){return X});var O=p("q1tI"),de=p.n(O);function X(se,oe){var J=Object(O.useRef)();Object(O.useEffect)(function(){J.current=se}),Object(O.useEffect)(function(){function k(){J.current()}if(oe!==null){var L=setInterval(k,oe);return function(){return clearInterval(L)}}},[oe])}},"A/g1":function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh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sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},Bd2K:function(ye,ge,p){(function(O){O(p("VrN/"),p("osHv"))})(function(O){O.defineOption("autoCloseTags",!1,function(M,U,E){if(E!=O.Init&&E&&M.removeKeyMap("autoCloseTags"),!U)return;var w={name:"autoCloseTags"};(typeof U!="object"||U.whenClosing!==!1)&&(w["'/'"]=function(V){return J(V)}),(typeof U!="object"||U.whenOpening!==!1)&&(w["'>'"]=function(V){return se(V)}),M.addKeyMap(w)});var de=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],X=["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(M){if(M.getOption("disableInput"))return O.Pass;for(var U=M.listSelections(),E=[],w=M.getOption("autoCloseTags"),V=0;V<U.length;V++){if(!U[V].empty())return O.Pass;var W=U[V].head,P=M.getTokenAt(W),F=O.innerMode(M.getMode(),P.state),z=F.state,ee=F.mode.xmlCurrentTag&&F.mode.xmlCurrentTag(z),ne=ee&&ee.name;if(!ne)return O.Pass;var Re=F.mode.configuration=="html",We=typeof w=="object"&&w.dontCloseTags||Re&&de,fe=typeof w=="object"&&w.indentTags||Re&&X;P.end>W.ch&&(ne=ne.slice(0,ne.length-P.end+W.ch));var le=ne.toLowerCase();if(!ne||P.type=="string"&&(P.end!=W.ch||!/[\"\']/.test(P.string.charAt(P.string.length-1))||P.string.length==1)||P.type=="tag"&&ee.close||P.string.indexOf("/")==W.ch-P.start-1||We&&k(We,le)>-1||L(M,F.mode.xmlCurrentContext&&F.mode.xmlCurrentContext(z)||[],ne,W,!0))return O.Pass;var Be=typeof w=="object"&&w.emptyTags;if(Be&&k(Be,ne)>-1){E[V]={text:"/>",newPos:O.Pos(W.line,W.ch+2)};continue}var ue=fe&&k(fe,le)>-1;E[V]={indent:ue,text:">"+(ue?`
`:"")+"</"+ne+">",newPos:ue?O.Pos(W.line+1,0):O.Pos(W.line,W.ch+1)}}for(var me=typeof w=="object"&&w.dontIndentOnAutoClose,V=U.length-1;V>=0;V--){var he=E[V];M.replaceRange(he.text,U[V].head,U[V].anchor,"+insert");var q=M.listSelections().slice(0);q[V]={head:he.newPos,anchor:he.newPos},M.setSelections(q),!me&&he.indent&&(M.indentLine(he.newPos.line,null,!0),M.indentLine(he.newPos.line+1,null,!0))}}function oe(M,U){for(var E=M.listSelections(),w=[],V=U?"/":"</",W=M.getOption("autoCloseTags"),P=typeof W=="object"&&W.dontIndentOnSlash,F=0;F<E.length;F++){if(!E[F].empty())return O.Pass;var z=E[F].head,ee=M.getTokenAt(z),ne=O.innerMode(M.getMode(),ee.state),Re=ne.state;if(U&&(ee.type=="string"||ee.string.charAt(0)!="<"||ee.start!=z.ch-1))return O.Pass;var We,fe=ne.mode.name!="xml"&&M.getMode().name=="htmlmixed";if(fe&&ne.mode.name=="javascript")We=V+"script";else if(fe&&ne.mode.name=="css")We=V+"style";else{var le=ne.mode.xmlCurrentContext&&ne.mode.xmlCurrentContext(Re);if(!le||le.length&&L(M,le,le[le.length-1],z))return O.Pass;We=V+le[le.length-1]}M.getLine(z.line).charAt(ee.end)!=">"&&(We+=">"),w[F]=We}if(M.replaceSelections(w),E=M.listSelections(),!P)for(var F=0;F<E.length;F++)(F==E.length-1||E[F].head.line<E[F+1].head.line)&&M.indentLine(E[F].head.line)}function J(M){return M.getOption("disableInput")?O.Pass:oe(M,!0)}O.commands.closeTag=function(M){return oe(M)};function k(M,U){if(M.indexOf)return M.indexOf(U);for(var E=0,w=M.length;E<w;++E)if(M[E]==U)return E;return-1}function L(M,U,E,w,V){if(!O.scanForClosingTag)return!1;var W=Math.min(M.lastLine()+1,w.line+500),P=O.scanForClosingTag(M,w,null,W);if(!P||P.tag!=E)return!1;for(var F=V?1:0,z=U.length-1;z>=0&&U[z]==E;z--)++F;w=P.to;for(var z=1;z<F;z++){var ee=O.scanForClosingTag(M,w,null,W);if(!ee||ee.tag!=E)return!1;w=ee.to}return!0}})},BjJ7:function(ye,ge,p){"use strict";p.d(ge,"d",function(){return de}),p.d(ge,"c",function(){return X}),p.d(ge,"e",function(){return se}),p.d(ge,"b",function(){return oe}),p.d(ge,"a",function(){return k});var O=p("m3rI");function de(L){var M=!0;if(L.length>0){for(var U=0;U<L.length;U++)if(L[U].compile_success==0||!L[U].compile_success){M=!1;break}}else M=!1;return M}function X(L){for(var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",U=[],E=0;E<L.length;E++){var w=L[E],V=M?"".concat(M,"/").concat(w.name):"".concat(w.name);U.push({title:w.name,isLeaf:!(w.type==="tree"),key:V})}return U}function se(L,M,U){for(var E=0;E<L.length;E++){var w=L[E];if(w.key===M){w.children=U;break}w.children&&se(w.children,M,U)}return L}function oe(L,M,U){var E;return function(){var w=this,V=arguments,W=function(){E=null,U||L.apply(w,V)},P=U&&!E;clearTimeout(E),E=setTimeout(W,M),P&&L.apply(w,V)}}var J=!0,k=O.a.API_SERVER},"C+DQ":function(ye,ge,p){},CJF0:function(ye,ge,p){"use strict";var O=p("14J3"),de=p("BMrR"),X=p("+L6B"),se=p("2/Rp"),oe=p("jCWc"),J=p("kPKH"),k=p("PpiC"),L=p("q1tI"),M=p.n(L),U=p("Ty5D"),E=p("9kvl"),w=p("55Ip"),V=p("lzim"),W=p("nZ20"),P=p.n(W),F=function(ee){var ne,Re,We,fe,le=ee.shixunsDetail,Be=ee.dispatch,ue=ee.loading,me=ee.match,he=ee.data,q=he===void 0?{}:he,S=ee.title,te=Object(k.a)(ee,["shixunsDetail","dispatch","loading","match","data","title"]),K=Object(U.i)(),b=!(((ne=le.detail)===null||ne===void 0?void 0:ne.identity)>4||((Re=le.detail)===null||Re===void 0?void 0:Re.identity)===void 0||((We=le.detail)===null||We===void 0?void 0:We.shixun_status)===2||((fe=le.detail)===null||fe===void 0?void 0:fe.shixun_status)===1);return M.a.createElement("aside",{className:"bg-white mb10 pl20 pr20 ".concat(P.a.wrap)},M.a.createElement(de.a,{gutter:[20,20],align:"middle"},M.a.createElement(J.a,{flex:1},M.a.createElement("span",{className:P.a.icons},M.a.createElement("img",{src:V.f,width:"14"})),M.a.createElement("span",{className:"font16"},"\u7B2C ",q==null?void 0:q.position," \u5173\uFF1A",S)),M.a.createElement(J.a,null,(q==null?void 0:q.prev_challenge)&&M.a.createElement(se.a,{type:"primary",ghost:!0,className:"mt10 mr5",onClick:function(){var G,I=q.prev_challenge.st===0?"/editcheckpoint":"/editquestion",ce="/shixuns/".concat(K.id,"/challenges/").concat(q==null||((G=q.prev_challenge)===null||G===void 0)?void 0:G.id).concat(I);E.d.replace(ce)}},"\u4E0A\u4E00\u5173"),q.next_challenge&&M.a.createElement(se.a,{type:"primary",ghost:!0,className:"mt10 mr5",onClick:function(){var G,I=q.next_challenge.st===0?"/editcheckpoint":"/editquestion",ce="/shixuns/".concat(K.id,"/challenges/").concat(q==null||((G=q.next_challenge)===null||G===void 0)?void 0:G.id).concat(I);E.d.replace(ce)}},"\u4E0B\u4E00\u5173"),b&&M.a.createElement(se.a,{type:"primary"},M.a.createElement(w.a,{to:"/shixuns/".concat(K.id,"/challenges/newquestion")},"\u65B0\u589E\u9009\u62E9\u9898\u4EFB\u52A1")),b&&M.a.createElement(se.a,{type:"primary",className:"ml5"},M.a.createElement(w.a,{to:"/shixuns/".concat(K.id,"/challenges/new")},"\u65B0\u589E\u5B9E\u8DF5\u4EFB\u52A1")),M.a.createElement(se.a,{type:"primary",className:"ml5"},M.a.createElement(w.a,{to:"/shixuns/".concat(K.id,"/challenges")},"\u8FD4\u56DE")))))};ge.a=Object(E.a)(function(z){var ee=z.shixunsDetail,ne=z.newCourse,Re=z.loading,We=z.globalSetting;return{shixunsDetail:ee,newCourse:ne,globalSetting:We,loading:Re.effects}})(F)},D1Df:function(ye,ge,p){"use strict";function O(b){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(G){return typeof G}:O=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},O(b)}function de(){return de=Object.assign||function(b){for(var R=1;R<arguments.length;R++){var G=arguments[R];for(var I in G)Object.prototype.hasOwnProperty.call(G,I)&&(b[I]=G[I])}return b},de.apply(this,arguments)}function X(b,R){var G=Object.keys(b);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(b);R&&(I=I.filter(function(ce){return Object.getOwnPropertyDescriptor(b,ce).enumerable})),G.push.apply(G,I)}return G}function se(b){for(var R=1;R<arguments.length;R++){var G=arguments[R]!=null?arguments[R]:{};R%2?X(G,!0).forEach(function(I){P(b,I,G[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(G)):X(G).forEach(function(I){Object.defineProperty(b,I,Object.getOwnPropertyDescriptor(G,I))})}return b}function oe(b,R){if(b==null)return{};var G=J(b,R),I,ce;if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(b);for(ce=0;ce<x.length;ce++){if(I=x[ce],R.indexOf(I)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(b,I))continue;G[I]=b[I]}}return G}function J(b,R){if(b==null)return{};var G={},I=Object.keys(b),ce,x;for(x=0;x<I.length;x++){if(ce=I[x],R.indexOf(ce)>=0)continue;G[ce]=b[ce]}return G}function k(b,R){if(!(b instanceof R))throw new TypeError("Cannot call a class as a function")}function L(b,R){for(var G=0;G<R.length;G++){var I=R[G];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(b,I.key,I)}}function M(b,R,G){return R&&L(b.prototype,R),G&&L(b,G),b}function U(b,R){return R&&(O(R)==="object"||typeof R=="function")?R:w(b)}function E(b){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},E(b)}function w(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function V(b,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(R&&R.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),R&&W(b,R)}function W(b,R){return W=Object.setPrototypeOf||function(I,ce){return I.__proto__=ce,I},W(b,R)}function P(b,R,G){return R in b?Object.defineProperty(b,R,{value:G,enumerable:!0,configurable:!0,writable:!0}):b[R]=G,b}var F=p("q1tI"),z=p("17x9"),ee=p("H38U"),ne=p("aRTE");function Re(b){for(var R="",G=0;G<b.length;G++){var I=b.charCodeAt(G);I<128?R+=String.fromCharCode(I):I<2048?(R+=String.fromCharCode(192|I>>6),R+=String.fromCharCode(128|I&63)):I<55296||I>=57344?(R+=String.fromCharCode(224|I>>12),R+=String.fromCharCode(128|I>>6&63),R+=String.fromCharCode(128|I&63)):(G++,I=65536+((I&1023)<<10|b.charCodeAt(G)&1023),R+=String.fromCharCode(240|I>>18),R+=String.fromCharCode(128|I>>12&63),R+=String.fromCharCode(128|I>>6&63),R+=String.fromCharCode(128|I&63))}return R}var We={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},fe={},le=4,Be=.1;function ue(b){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=[];return b.forEach(function(I,ce){var x=null;I.forEach(function(m,Y){if(!m&&x!==null){G.push("M".concat(x+R," ").concat(ce+R,"h").concat(Y-x,"v1H").concat(x+R,"z")),x=null;return}if(Y===I.length-1){if(!m)return;x===null?G.push("M".concat(Y+R,",").concat(ce+R," h1v1H").concat(Y+R,"z")):G.push("M".concat(x+R,",").concat(ce+R," h").concat(Y+1-x,"v1H").concat(x+R,"z"));return}m&&x===null&&(x=Y)})}),G.join("")}function me(b,R){return b.slice().map(function(G,I){return I<R.y||I>=R.y+R.h?G:G.map(function(ce,x){return x<R.x||x>=R.x+R.w?ce:!1})})}function he(b,R){var G=b.imageSettings,I=b.size,ce=b.includeMargin;if(G==null)return null;var x=ce?le:0,m=R.length+x*2,Y=Math.floor(I*Be),Ae=m/I,ve=(G.width||Y)*Ae,Fe=(G.height||Y)*Ae,He=G.x==null?R.length/2-ve/2:G.x*Ae,ke=G.y==null?R.length/2-Fe/2:G.y*Ae,be=null;if(G.excavate){var Ce=Math.floor(He),we=Math.floor(ke),Z=Math.ceil(ve+He-Ce),_=Math.ceil(Fe+ke-we);be={x:Ce,y:we,w:Z,h:_}}return{x:He,y:ke,h:Fe,w:ve,excavation:be}}var q=function(){try{new Path2D().addPath(new Path2D)}catch(b){return!1}return!0}(),S=function(b){V(R,b);function R(){var G,I;k(this,R);for(var ce=arguments.length,x=new Array(ce),m=0;m<ce;m++)x[m]=arguments[m];return I=U(this,(G=E(R)).call.apply(G,[this].concat(x))),P(w(I),"_canvas",void 0),P(w(I),"_image",void 0),P(w(I),"state",{imgLoaded:!1}),P(w(I),"handleImageLoad",function(){I.setState({imgLoaded:!0})}),I}return M(R,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var I=this.props,ce=I.value,x=I.size,m=I.level,Y=I.bgColor,Ae=I.fgColor,ve=I.includeMargin,Fe=I.imageSettings,He=new ee(-1,ne[m]);if(He.addData(Re(ce)),He.make(),this._canvas!=null){var ke=this._canvas,be=ke.getContext("2d");if(!be)return;var Ce=He.modules;if(Ce===null)return;var we=ve?le:0,Z=Ce.length+we*2,_=he(this.props,Ce);Fe!=null&&_!=null&&(_.excavation!=null&&(Ce=me(Ce,_.excavation)));var Pe=window.devicePixelRatio||1;ke.height=ke.width=x*Pe;var et=x/Z*Pe;be.scale(et,et),be.fillStyle=Y,be.fillRect(0,0,Z,Z),be.fillStyle=Ae,q?be.fill(new Path2D(ue(Ce,we))):Ce.forEach(function(st,qe){st.forEach(function(Ke,Me){Ke&&be.fillRect(Me+we,qe+we,1,1)})}),this.state.imgLoaded&&this._image&&_!=null&&be.drawImage(this._image,_.x+we,_.y+we,_.w,_.h)}}},{key:"render",value:function(){var I=this,ce=this.props,x=ce.value,m=ce.size,Y=ce.level,Ae=ce.bgColor,ve=ce.fgColor,Fe=ce.style,He=ce.includeMargin,ke=ce.imageSettings,be=oe(ce,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Ce=se({height:m,width:m},Fe),we=null,Z=ke&&ke.src;return ke!=null&&Z!=null&&(we=F.createElement("img",{src:Z,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(Pe){return I._image=Pe}})),F.createElement(F.Fragment,null,F.createElement("canvas",de({style:Ce,height:m,width:m,ref:function(Pe){return I._canvas=Pe}},be)),we)}}]),R}(F.PureComponent);P(S,"defaultProps",We);var te=function(b){V(R,b);function R(){return k(this,R),U(this,E(R).apply(this,arguments))}return M(R,[{key:"render",value:function(){var I=this.props,ce=I.value,x=I.size,m=I.level,Y=I.bgColor,Ae=I.fgColor,ve=I.includeMargin,Fe=I.imageSettings,He=oe(I,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),ke=new ee(-1,ne[m]);ke.addData(Re(ce)),ke.make();var be=ke.modules;if(be===null)return null;var Ce=ve?le:0,we=be.length+Ce*2,Z=he(this.props,be),_=null;Fe!=null&&Z!=null&&(Z.excavation!=null&&(be=me(be,Z.excavation)),_=F.createElement("image",{xlinkHref:Fe.src,height:Z.h,width:Z.w,x:Z.x+Ce,y:Z.y+Ce,preserveAspectRatio:"none"}));var Pe=ue(be,Ce);return F.createElement("svg",de({shapeRendering:"crispEdges",height:x,width:x,viewBox:"0 0 ".concat(we," ").concat(we)},He),F.createElement("path",{fill:Y,d:"M0,0 h".concat(we,"v").concat(we,"H0z")}),F.createElement("path",{fill:Ae,d:Pe}),_)}}]),R}(F.PureComponent);P(te,"defaultProps",We);var K=function(R){var G=R.renderAs,I=oe(R,["renderAs"]),ce=G==="svg"?te:S;return F.createElement(ce,I)};K.defaultProps=se({renderAs:"canvas"},We),ye.exports=K},DlQD:function(ye,ge,p){(function(O,de){ye.exports=de()})(this,function(){"use strict";function O(Q,j){for(var H=0;H<j.length;H++){var y=j[H];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(Q,y.key,y)}}function de(Q,j,H){return j&&O(Q.prototype,j),H&&O(Q,H),Q}function X(Q,j){if(!Q)return;if(typeof Q=="string")return se(Q,j);var H=Object.prototype.toString.call(Q).slice(8,-1);if(H==="Object"&&Q.constructor&&(H=Q.constructor.name),H==="Map"||H==="Set")return Array.from(Q);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return se(Q,j)}function se(Q,j){(j==null||j>Q.length)&&(j=Q.length);for(var H=0,y=new Array(j);H<j;H++)y[H]=Q[H];return y}function oe(Q,j){var H;if(typeof Symbol=="undefined"||Q[Symbol.iterator]==null){if(Array.isArray(Q)||(H=X(Q))||j&&Q&&typeof Q.length=="number"){H&&(Q=H);var y=0;return function(){return y>=Q.length?{done:!0}:{done:!1,value:Q[y++]}}}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 H=Q[Symbol.iterator](),H.next.bind(H)}function J(Q,j){return j={exports:{}},Q(j,j.exports),j.exports}var k=J(function(Q){function j(){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 H(y){Q.exports.defaults=y}Q.exports={defaults:j(),getDefaults:j,changeDefaults:H}}),L=k.defaults,M=k.getDefaults,U=k.changeDefaults,E=/[&<>"']/,w=/[&<>"']/g,V=/[<>"']|&(?!#?\w+;)/,W=/[<>"']|&(?!#?\w+;)/g,P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},F=function(j){return P[j]};function z(Q,j){if(j){if(E.test(Q))return Q.replace(w,F)}else if(V.test(Q))return Q.replace(W,F);return Q}var ee=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ne(Q){return Q.replace(ee,function(j,H){return H=H.toLowerCase(),H==="colon"?":":H.charAt(0)==="#"?H.charAt(1)==="x"?String.fromCharCode(parseInt(H.substring(2),16)):String.fromCharCode(+H.substring(1)):""})}var Re=/(^|[^\[])\^/g;function We(Q,j){Q=Q.source||Q,j=j||"";var H={replace:function(C,A){return A=A.source||A,A=A.replace(Re,"$1"),Q=Q.replace(C,A),H},getRegex:function(){return new RegExp(Q,j)}};return H}var fe=/[^\w:]/g,le=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Be(Q,j,H){if(Q){var y;try{y=decodeURIComponent(ne(H)).replace(fe,"").toLowerCase()}catch(C){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}j&&!le.test(H)&&(H=S(j,H));try{H=encodeURI(H).replace(/%25/g,"%")}catch(C){return null}return H}var ue={},me=/^[^:]+:\/*[^/]*$/,he=/^([^:]+:)[\s\S]*$/,q=/^([^:]+:\/*[^/]*)[\s\S]*$/;function S(Q,j){ue[" "+Q]||(me.test(Q)?ue[" "+Q]=Q+"/":ue[" "+Q]=R(Q,"/",!0)),Q=ue[" "+Q];var H=Q.indexOf(":")===-1;return j.substring(0,2)==="//"?H?j:Q.replace(he,"$1")+j:j.charAt(0)==="/"?H?j:Q.replace(q,"$1")+j:Q+j}var te={exec:function(){}};function K(Q){for(var j=1,H,y;j<arguments.length;j++){H=arguments[j];for(y in H)Object.prototype.hasOwnProperty.call(H,y)&&(Q[y]=H[y])}return Q}function b(Q,j){var H=Q.replace(/\|/g,function(A,T,re){for(var pe=!1,je=T;--je>=0&&re[je]==="\\";)pe=!pe;return pe?"|":" |"}),y=H.split(/ \|/),C=0;if(y.length>j)y.splice(j);else for(;y.length<j;)y.push("");for(;C<y.length;C++)y[C]=y[C].trim().replace(/\\\|/g,"|");return y}function R(Q,j,H){var y=Q.length;if(y===0)return"";for(var C=0;C<y;){var A=Q.charAt(y-C-1);if(A===j&&!H)C++;else if(A!==j&&H)C++;else break}return Q.substr(0,y-C)}function G(Q,j){if(Q.indexOf(j[1])===-1)return-1;for(var H=Q.length,y=0,C=0;C<H;C++)if(Q[C]==="\\")C++;else if(Q[C]===j[0])y++;else if(Q[C]===j[1]&&(y--,y<0))return C;return-1}function I(Q){Q&&Q.sanitize&&!Q.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var ce={escape:z,unescape:ne,edit:We,cleanUrl:Be,resolveUrl:S,noopTest:te,merge:K,splitCells:b,rtrim:R,findClosingBracket:G,checkSanitizeDeprecation:I},x=k.defaults,m=ce.rtrim,Y=ce.splitCells,Ae=ce.escape,ve=ce.findClosingBracket;function Fe(Q,j,H){var y=j.href,C=j.title?Ae(j.title):null,A=Q[1].replace(/\\([\[\]])/g,"$1");return Q[0].charAt(0)!=="!"?{type:"link",raw:H,href:y,title:C,text:A}:{type:"image",raw:H,href:y,title:C,text:Ae(A)}}function He(Q,j){var H=Q.match(/^(\s+)(?:```)/);if(H===null)return j;var y=H[1];return j.split(`
`).map(function(C){var A=C.match(/^\s+/);if(A===null)return C;var T=A[0];return T.length>=y.length?C.slice(y.length):C}).join(`
`)}var ke=function(){function Q(H){this.options=H||x}var j=Q.prototype;return j.space=function(y){var C=this.rules.block.newline.exec(y);if(C)return C[0].length>1?{type:"space",raw:C[0]}:{raw:`
`}},j.code=function(y,C){var A=this.rules.block.code.exec(y);if(A){var T=C[C.length-1];if(T&&T.type==="paragraph")return{raw:A[0],text:A[0].trimRight()};var re=A[0].replace(/^ {4}/gm,"");return{type:"code",raw:A[0],codeBlockStyle:"indented",text:this.options.pedantic?re:m(re,`
`)}}},j.fences=function(y){var C=this.rules.block.fences.exec(y);if(C){var A=C[0],T=He(A,C[3]||"");return{type:"code",raw:A,lang:C[2]?C[2].trim():C[2],text:T}}},j.heading=function(y){var C=this.rules.block.heading.exec(y);if(C)return{type:"heading",raw:C[0],depth:C[1].length,text:C[2]}},j.nptable=function(y){var C=this.rules.block.nptable.exec(y);if(C){var A={type:"table",header:Y(C[1].replace(/^ *| *\| *$/g,"")),align:C[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:C[3]?C[3].replace(/\n$/,"").split(`
`):[],raw:C[0]};if(A.header.length===A.align.length){var T=A.align.length,re;for(re=0;re<T;re++)/^ *-+: *$/.test(A.align[re])?A.align[re]="right":/^ *:-+: *$/.test(A.align[re])?A.align[re]="center":/^ *:-+ *$/.test(A.align[re])?A.align[re]="left":A.align[re]=null;for(T=A.cells.length,re=0;re<T;re++)A.cells[re]=Y(A.cells[re],A.header.length);return A}}},j.hr=function(y){var C=this.rules.block.hr.exec(y);if(C)return{type:"hr",raw:C[0]}},j.blockquote=function(y){var C=this.rules.block.blockquote.exec(y);if(C){var A=C[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:C[0],text:A}}},j.list=function(y){var C=this.rules.block.list.exec(y);if(C){for(var A=C[0],T=C[2],re=T.length>1,pe=T[T.length-1]===")",je={type:"list",raw:A,ordered:re,start:re?+T.slice(0,-1):"",loose:!1,items:[]},yt=C[0].match(this.rules.block.item),kt=!1,Ie,wt,pt,Xe,Ot,Tt,Vt,_t=yt.length,St=0;St<_t;St++)Ie=yt[St],A=Ie,wt=Ie.length,Ie=Ie.replace(/^ *([*+-]|\d+[.)]) */,""),~Ie.indexOf(`
`)&&(wt-=Ie.length,Ie=this.options.pedantic?Ie.replace(/^ {1,4}/gm,""):Ie.replace(new RegExp("^ {1,"+wt+"}","gm"),"")),St!==_t-1&&(pt=this.rules.block.bullet.exec(yt[St+1])[0],(re?pt.length===1||!pe&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==T)&&(Xe=yt.slice(St+1).join(`
`),je.raw=je.raw.substring(0,je.raw.length-Xe.length),St=_t-1)),Ot=kt||/\n\n(?!\s*$)/.test(Ie),St!==_t-1&&(kt=Ie.charAt(Ie.length-1)===`
`,Ot||(Ot=kt)),Ot&&(je.loose=!0),Tt=/^\[[ xX]\] /.test(Ie),Vt=void 0,Tt&&(Vt=Ie[1]!==" ",Ie=Ie.replace(/^\[[ xX]\] +/,"")),je.items.push({type:"list_item",raw:A,task:Tt,checked:Vt,loose:Ot,text:Ie});return je}},j.html=function(y){var C=this.rules.block.html.exec(y);if(C)return{type:this.options.sanitize?"paragraph":"html",raw:C[0],pre:!this.options.sanitizer&&(C[1]==="pre"||C[1]==="script"||C[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(C[0]):Ae(C[0]):C[0]}},j.def=function(y){var C=this.rules.block.def.exec(y);if(C){C[3]&&(C[3]=C[3].substring(1,C[3].length-1));var A=C[1].toLowerCase().replace(/\s+/g," ");return{tag:A,raw:C[0],href:C[2],title:C[3]}}},j.table=function(y){var C=this.rules.block.table.exec(y);if(C){var A={type:"table",header:Y(C[1].replace(/^ *| *\| *$/g,"")),align:C[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:C[3]?C[3].replace(/\n$/,"").split(`
`):[]};if(A.header.length===A.align.length){A.raw=C[0];var T=A.align.length,re;for(re=0;re<T;re++)/^ *-+: *$/.test(A.align[re])?A.align[re]="right":/^ *:-+: *$/.test(A.align[re])?A.align[re]="center":/^ *:-+ *$/.test(A.align[re])?A.align[re]="left":A.align[re]=null;for(T=A.cells.length,re=0;re<T;re++)A.cells[re]=Y(A.cells[re].replace(/^ *\| *| *\| *$/g,""),A.header.length);return A}}},j.lheading=function(y){var C=this.rules.block.lheading.exec(y);if(C)return{type:"heading",raw:C[0],depth:C[2].charAt(0)==="="?1:2,text:C[1]}},j.paragraph=function(y){var C=this.rules.block.paragraph.exec(y);if(C)return{type:"paragraph",raw:C[0],text:C[1].charAt(C[1].length-1)===`
`?C[1].slice(0,-1):C[1]}},j.text=function(y,C){var A=this.rules.block.text.exec(y);if(A){var T=C[C.length-1];return T&&T.type==="text"?{raw:A[0],text:A[0]}:{type:"text",raw:A[0],text:A[0]}}},j.escape=function(y){var C=this.rules.inline.escape.exec(y);if(C)return{type:"escape",raw:C[0],text:Ae(C[1])}},j.tag=function(y,C,A){var T=this.rules.inline.tag.exec(y);if(T)return!C&&/^<a /i.test(T[0])?C=!0:C&&/^<\/a>/i.test(T[0])&&(C=!1),!A&&/^<(pre|code|kbd|script)(\s|>)/i.test(T[0])?A=!0:A&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(T[0])&&(A=!1),{type:this.options.sanitize?"text":"html",raw:T[0],inLink:C,inRawBlock:A,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(T[0]):Ae(T[0]):T[0]}},j.link=function(y){var C=this.rules.inline.link.exec(y);if(C){var A=ve(C[2],"()");if(A>-1){var T=C[0].indexOf("!")===0?5:4,re=T+C[1].length+A;C[2]=C[2].substring(0,A),C[0]=C[0].substring(0,re).trim(),C[3]=""}var pe=C[2],je="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(pe);yt?(pe=yt[1],je=yt[3]):je=""}else je=C[3]?C[3].slice(1,-1):"";pe=pe.trim().replace(/^<([\s\S]*)>$/,"$1");var kt=Fe(C,{href:pe&&pe.replace(this.rules.inline._escapes,"$1"),title:je&&je.replace(this.rules.inline._escapes,"$1")},C[0]);return kt}},j.reflink=function(y,C){var A;if((A=this.rules.inline.reflink.exec(y))||(A=this.rules.inline.nolink.exec(y))){var T=(A[2]||A[1]).replace(/\s+/g," ");if(T=C[T.toLowerCase()],!T||!T.href){var re=A[0].charAt(0);return{type:"text",raw:re,text:re}}var pe=Fe(A,T,A[0]);return pe}},j.strong=function(y,C,A){A===void 0&&(A="");var T=this.rules.inline.strong.start.exec(y);if(T&&(!T[1]||T[1]&&(A===""||this.rules.inline.punctuation.exec(A)))){C=C.slice(-1*y.length);var re=T[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;re.lastIndex=0;for(var pe;(T=re.exec(C))!=null;)if(pe=this.rules.inline.strong.middle.exec(C.slice(0,T.index+3)),pe)return{type:"strong",raw:y.slice(0,pe[0].length),text:y.slice(2,pe[0].length-2)}}},j.em=function(y,C,A){A===void 0&&(A="");var T=this.rules.inline.em.start.exec(y);if(T&&(!T[1]||T[1]&&(A===""||this.rules.inline.punctuation.exec(A)))){C=C.slice(-1*y.length);var re=T[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;re.lastIndex=0;for(var pe;(T=re.exec(C))!=null;)if(pe=this.rules.inline.em.middle.exec(C.slice(0,T.index+2)),pe)return{type:"em",raw:y.slice(0,pe[0].length),text:y.slice(1,pe[0].length-1)}}},j.codespan=function(y){var C=this.rules.inline.code.exec(y);if(C){var A=C[2].replace(/\n/g," "),T=/[^ ]/.test(A),re=A.startsWith(" ")&&A.endsWith(" ");return T&&re&&(A=A.substring(1,A.length-1)),A=Ae(A,!0),{type:"codespan",raw:C[0],text:A}}},j.br=function(y){var C=this.rules.inline.br.exec(y);if(C)return{type:"br",raw:C[0]}},j.del=function(y){var C=this.rules.inline.del.exec(y);if(C)return{type:"del",raw:C[0],text:C[1]}},j.autolink=function(y,C){var A=this.rules.inline.autolink.exec(y);if(A){var T,re;return A[2]==="@"?(T=Ae(this.options.mangle?C(A[1]):A[1]),re="mailto:"+T):(T=Ae(A[1]),re=T),{type:"link",raw:A[0],text:T,href:re,tokens:[{type:"text",raw:T,text:T}]}}},j.url=function(y,C){var A;if(A=this.rules.inline.url.exec(y)){var T,re;if(A[2]==="@")T=Ae(this.options.mangle?C(A[0]):A[0]),re="mailto:"+T;else{var pe;do pe=A[0],A[0]=this.rules.inline._backpedal.exec(A[0])[0];while(pe!==A[0]);T=Ae(A[0]),A[1]==="www."?re="http://"+T:re=T}return{type:"link",raw:A[0],text:T,href:re,tokens:[{type:"text",raw:T,text:T}]}}},j.inlineText=function(y,C,A){var T=this.rules.inline.text.exec(y);if(T){var re;return C?re=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(T[0]):Ae(T[0]):T[0]:re=Ae(this.options.smartypants?A(T[0]):T[0]),{type:"text",raw:T[0],text:re}}},Q}(),be=ce.noopTest,Ce=ce.edit,we=ce.merge,Z={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:be,table:be,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Z._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Z._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Z.def=Ce(Z.def).replace("label",Z._label).replace("title",Z._title).getRegex(),Z.bullet=/(?:[*+-]|\d{1,9}[.)])/,Z.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Z.item=Ce(Z.item,"gm").replace(/bull/g,Z.bullet).getRegex(),Z.list=Ce(Z.list).replace(/bull/g,Z.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Z.def.source+")").getRegex(),Z._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",Z._comment=/<!--(?!-?>)[\s\S]*?-->/,Z.html=Ce(Z.html,"i").replace("comment",Z._comment).replace("tag",Z._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Z.paragraph=Ce(Z._paragraph).replace("hr",Z.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Z._tag).getRegex(),Z.blockquote=Ce(Z.blockquote).replace("paragraph",Z.paragraph).getRegex(),Z.normal=we({},Z),Z.gfm=we({},Z.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*|$)"}),Z.gfm.nptable=Ce(Z.gfm.nptable).replace("hr",Z.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Z._tag).getRegex(),Z.gfm.table=Ce(Z.gfm.table).replace("hr",Z.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Z._tag).getRegex(),Z.pedantic=we({},Z.normal,{html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Z._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:be,paragraph:Ce(Z.normal._paragraph).replace("hr",Z.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Z.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var _={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:be,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:be,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};_._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",_.punctuation=Ce(_.punctuation).replace(/punctuation/g,_._punctuation).getRegex(),_._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",_._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",_.em.start=Ce(_.em.start).replace(/punctuation/g,_._punctuation).getRegex(),_.em.middle=Ce(_.em.middle).replace(/punctuation/g,_._punctuation).replace(/overlapSkip/g,_._overlapSkip).getRegex(),_.em.endAst=Ce(_.em.endAst,"g").replace(/punctuation/g,_._punctuation).getRegex(),_.em.endUnd=Ce(_.em.endUnd,"g").replace(/punctuation/g,_._punctuation).getRegex(),_.strong.start=Ce(_.strong.start).replace(/punctuation/g,_._punctuation).getRegex(),_.strong.middle=Ce(_.strong.middle).replace(/punctuation/g,_._punctuation).replace(/blockSkip/g,_._blockSkip).getRegex(),_.strong.endAst=Ce(_.strong.endAst,"g").replace(/punctuation/g,_._punctuation).getRegex(),_.strong.endUnd=Ce(_.strong.endUnd,"g").replace(/punctuation/g,_._punctuation).getRegex(),_.blockSkip=Ce(_._blockSkip,"g").getRegex(),_.overlapSkip=Ce(_._overlapSkip,"g").getRegex(),_._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,_._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,_._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])?)+(?![-_])/,_.autolink=Ce(_.autolink).replace("scheme",_._scheme).replace("email",_._email).getRegex(),_._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,_.tag=Ce(_.tag).replace("comment",Z._comment).replace("attribute",_._attribute).getRegex(),_._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,_._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,_.link=Ce(_.link).replace("label",_._label).replace("href",_._href).replace("title",_._title).getRegex(),_.reflink=Ce(_.reflink).replace("label",_._label).getRegex(),_.reflinkSearch=Ce(_.reflinkSearch,"g").replace("reflink",_.reflink).replace("nolink",_.nolink).getRegex(),_.normal=we({},_),_.pedantic=we({},_.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",_._label).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_._label).getRegex()}),_.gfm=we({},_.normal,{escape:Ce(_.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),_.gfm.url=Ce(_.gfm.url,"i").replace("email",_.gfm._extended_email).getRegex(),_.breaks=we({},_.gfm,{br:Ce(_.br).replace("{2,}","*").getRegex(),text:Ce(_.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Pe={block:Z,inline:_},et=k.defaults,st=Pe.block,qe=Pe.inline;function Ke(Q){return Q.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Me(Q){var j="",H,y,C=Q.length;for(H=0;H<C;H++)y=Q.charCodeAt(H),Math.random()>.5&&(y="x"+y.toString(16)),j+="&#"+y+";";return j}var _e=function(){function Q(H){this.tokens=[],this.tokens.links=Object.create(null),this.options=H||et,this.options.tokenizer=this.options.tokenizer||new ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var y={block:st.normal,inline:qe.normal};this.options.pedantic?(y.block=st.pedantic,y.inline=qe.pedantic):this.options.gfm&&(y.block=st.gfm,this.options.breaks?y.inline=qe.breaks:y.inline=qe.gfm),this.tokenizer.rules=y}Q.lex=function(y,C){var A=new Q(C);return A.lex(y)};var j=Q.prototype;return j.lex=function(y){return y=y.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(y,this.tokens,!0),this.inline(this.tokens),this.tokens},j.blockTokens=function(y,C,A){C===void 0&&(C=[]),A===void 0&&(A=!0),y=y.replace(/^ +$/gm,"");for(var T,re,pe,je;y;){if(T=this.tokenizer.space(y)){y=y.substring(T.raw.length),T.type&&C.push(T);continue}if(T=this.tokenizer.code(y,C)){y=y.substring(T.raw.length),T.type?C.push(T):(je=C[C.length-1],je.raw+=`
`+T.raw,je.text+=`
`+T.text);continue}if(T=this.tokenizer.fences(y)){y=y.substring(T.raw.length),C.push(T);continue}if(T=this.tokenizer.heading(y)){y=y.substring(T.raw.length),C.push(T);continue}if(T=this.tokenizer.nptable(y)){y=y.substring(T.raw.length),C.push(T);continue}if(T=this.tokenizer.hr(y)){y=y.substring(T.raw.length),C.push(T);continue}if(T=this.tokenizer.blockquote(y)){y=y.substring(T.raw.length),T.tokens=this.blockTokens(T.text,[],A),C.push(T);continue}if(T=this.tokenizer.list(y)){for(y=y.substring(T.raw.length),pe=T.items.length,re=0;re<pe;re++)T.items[re].tokens=this.blockTokens(T.items[re].text,[],!1);C.push(T);continue}if(T=this.tokenizer.html(y)){y=y.substring(T.raw.length),C.push(T);continue}if(A&&(T=this.tokenizer.def(y))){y=y.substring(T.raw.length),this.tokens.links[T.tag]||(this.tokens.links[T.tag]={href:T.href,title:T.title});continue}if(T=this.tokenizer.table(y)){y=y.substring(T.raw.length),C.push(T);continue}if(T=this.tokenizer.lheading(y)){y=y.substring(T.raw.length),C.push(T);continue}if(A&&(T=this.tokenizer.paragraph(y))){y=y.substring(T.raw.length),C.push(T);continue}if(T=this.tokenizer.text(y,C)){y=y.substring(T.raw.length),T.type?C.push(T):(je=C[C.length-1],je.raw+=`
`+T.raw,je.text+=`
`+T.text);continue}if(y){var yt="Infinite loop on byte: "+y.charCodeAt(0);if(this.options.silent){console.error(yt);break}else throw new Error(yt)}}return C},j.inline=function(y){var C,A,T,re,pe,je,yt=y.length;for(C=0;C<yt;C++){je=y[C];switch(je.type){case"paragraph":case"text":case"heading":{je.tokens=[],this.inlineTokens(je.text,je.tokens);break}case"table":{for(je.tokens={header:[],cells:[]},re=je.header.length,A=0;A<re;A++)je.tokens.header[A]=[],this.inlineTokens(je.header[A],je.tokens.header[A]);for(re=je.cells.length,A=0;A<re;A++)for(pe=je.cells[A],je.tokens.cells[A]=[],T=0;T<pe.length;T++)je.tokens.cells[A][T]=[],this.inlineTokens(pe[T],je.tokens.cells[A][T]);break}case"blockquote":{this.inline(je.tokens);break}case"list":{for(re=je.items.length,A=0;A<re;A++)this.inline(je.items[A].tokens);break}}}return y},j.inlineTokens=function(y,C,A,T,re){C===void 0&&(C=[]),A===void 0&&(A=!1),T===void 0&&(T=!1),re===void 0&&(re="");var pe,je=y,yt;if(this.tokens.links){var kt=Object.keys(this.tokens.links);if(kt.length>0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(je))!=null;)kt.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(je=je.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+je.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(je))!=null;)je=je.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+je.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;y;){if(pe=this.tokenizer.escape(y)){y=y.substring(pe.raw.length),C.push(pe);continue}if(pe=this.tokenizer.tag(y,A,T)){y=y.substring(pe.raw.length),A=pe.inLink,T=pe.inRawBlock,C.push(pe);continue}if(pe=this.tokenizer.link(y)){y=y.substring(pe.raw.length),pe.type==="link"&&(pe.tokens=this.inlineTokens(pe.text,[],!0,T)),C.push(pe);continue}if(pe=this.tokenizer.reflink(y,this.tokens.links)){y=y.substring(pe.raw.length),pe.type==="link"&&(pe.tokens=this.inlineTokens(pe.text,[],!0,T)),C.push(pe);continue}if(pe=this.tokenizer.strong(y,je,re)){y=y.substring(pe.raw.length),pe.tokens=this.inlineTokens(pe.text,[],A,T),C.push(pe);continue}if(pe=this.tokenizer.em(y,je,re)){y=y.substring(pe.raw.length),pe.tokens=this.inlineTokens(pe.text,[],A,T),C.push(pe);continue}if(pe=this.tokenizer.codespan(y)){y=y.substring(pe.raw.length),C.push(pe);continue}if(pe=this.tokenizer.br(y)){y=y.substring(pe.raw.length),C.push(pe);continue}if(pe=this.tokenizer.del(y)){y=y.substring(pe.raw.length),pe.tokens=this.inlineTokens(pe.text,[],A,T),C.push(pe);continue}if(pe=this.tokenizer.autolink(y,Me)){y=y.substring(pe.raw.length),C.push(pe);continue}if(!A&&(pe=this.tokenizer.url(y,Me))){y=y.substring(pe.raw.length),C.push(pe);continue}if(pe=this.tokenizer.inlineText(y,T,Ke)){y=y.substring(pe.raw.length),re=pe.raw.slice(-1),C.push(pe);continue}if(y){var Ie="Infinite loop on byte: "+y.charCodeAt(0);if(this.options.silent){console.error(Ie);break}else throw new Error(Ie)}}return C},de(Q,null,[{key:"rules",get:function(){return{block:st,inline:qe}}}]),Q}(),Ve=k.defaults,$e=ce.cleanUrl,Ye=ce.escape,Oe=function(){function Q(H){this.options=H||Ve}var j=Q.prototype;return j.code=function(y,C,A){var T=(C||"").match(/\S*/)[0];if(this.options.highlight){var re=this.options.highlight(y,T);re!=null&&re!==y&&(A=!0,y=re)}return T?'<pre><code class="'+this.options.langPrefix+Ye(T,!0)+'">'+(A?y:Ye(y,!0))+`</code></pre>
`:"<pre><code>"+(A?y:Ye(y,!0))+`</code></pre>
`},j.blockquote=function(y){return`<blockquote>
`+y+`</blockquote>
`},j.html=function(y){return y},j.heading=function(y,C,A,T){return this.options.headerIds?"<h"+C+' id="'+this.options.headerPrefix+T.slug(A)+'">'+y+"</h"+C+`>
`:"<h"+C+">"+y+"</h"+C+`>
`},j.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},j.list=function(y,C,A){var T=C?"ol":"ul",re=C&&A!==1?' start="'+A+'"':"";return"<"+T+re+`>
`+y+"</"+T+`>
`},j.listitem=function(y){return"<li>"+y+`</li>
`},j.checkbox=function(y){return"<input "+(y?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},j.paragraph=function(y){return"<p>"+y+`</p>
`},j.table=function(y,C){return C&&(C="<tbody>"+C+"</tbody>"),`<table>
<thead>
`+y+`</thead>
`+C+`</table>
`},j.tablerow=function(y){return`<tr>
`+y+`</tr>
`},j.tablecell=function(y,C){var A=C.header?"th":"td",T=C.align?"<"+A+' align="'+C.align+'">':"<"+A+">";return T+y+"</"+A+`>
`},j.strong=function(y){return"<strong>"+y+"</strong>"},j.em=function(y){return"<em>"+y+"</em>"},j.codespan=function(y){return"<code>"+y+"</code>"},j.br=function(){return this.options.xhtml?"<br/>":"<br>"},j.del=function(y){return"<del>"+y+"</del>"},j.link=function(y,C,A){if(y=$e(this.options.sanitize,this.options.baseUrl,y),y===null)return A;var T='<a href="'+Ye(y)+'"';return C&&(T+=' title="'+C+'"'),T+=">"+A+"</a>",T},j.image=function(y,C,A){if(y=$e(this.options.sanitize,this.options.baseUrl,y),y===null)return A;var T='<img src="'+y+'" alt="'+A+'"';return C&&(T+=' title="'+C+'"'),T+=this.options.xhtml?"/>":">",T},j.text=function(y){return y},Q}(),Ge=function(){function Q(){}var j=Q.prototype;return j.strong=function(y){return y},j.em=function(y){return y},j.codespan=function(y){return y},j.del=function(y){return y},j.html=function(y){return y},j.text=function(y){return y},j.link=function(y,C,A){return""+A},j.image=function(y,C,A){return""+A},j.br=function(){return""},Q}(),vt=function(){function Q(){this.seen={}}var j=Q.prototype;return j.slug=function(y){var C=y.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(C)){var A=C;do this.seen[A]++,C=A+"-"+this.seen[A];while(this.seen.hasOwnProperty(C))}return this.seen[C]=0,C},Q}(),lt=k.defaults,rt=ce.unescape,tt=function(){function Q(H){this.options=H||lt,this.options.renderer=this.options.renderer||new Oe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ge,this.slugger=new vt}Q.parse=function(y,C){var A=new Q(C);return A.parse(y)};var j=Q.prototype;return j.parse=function(y,C){C===void 0&&(C=!0);var A="",T,re,pe,je,yt,kt,Ie,wt,pt,Xe,Ot,Tt,Vt,_t,St,bn,rn,dt,Vn=y.length;for(T=0;T<Vn;T++){Xe=y[T];switch(Xe.type){case"space":continue;case"hr":{A+=this.renderer.hr();continue}case"heading":{A+=this.renderer.heading(this.parseInline(Xe.tokens),Xe.depth,rt(this.parseInline(Xe.tokens,this.textRenderer)),this.slugger);continue}case"code":{A+=this.renderer.code(Xe.text,Xe.lang,Xe.escaped);continue}case"table":{for(wt="",Ie="",je=Xe.header.length,re=0;re<je;re++)Ie+=this.renderer.tablecell(this.parseInline(Xe.tokens.header[re]),{header:!0,align:Xe.align[re]});for(wt+=this.renderer.tablerow(Ie),pt="",je=Xe.cells.length,re=0;re<je;re++){for(kt=Xe.tokens.cells[re],Ie="",yt=kt.length,pe=0;pe<yt;pe++)Ie+=this.renderer.tablecell(this.parseInline(kt[pe]),{header:!1,align:Xe.align[pe]});pt+=this.renderer.tablerow(Ie)}A+=this.renderer.table(wt,pt);continue}case"blockquote":{pt=this.parse(Xe.tokens),A+=this.renderer.blockquote(pt);continue}case"list":{for(Ot=Xe.ordered,Tt=Xe.start,Vt=Xe.loose,je=Xe.items.length,pt="",re=0;re<je;re++)St=Xe.items[re],bn=St.checked,rn=St.task,_t="",St.task&&(dt=this.renderer.checkbox(bn),Vt?St.tokens.length>0&&St.tokens[0].type==="text"?(St.tokens[0].text=dt+" "+St.tokens[0].text,St.tokens[0].tokens&&St.tokens[0].tokens.length>0&&St.tokens[0].tokens[0].type==="text"&&(St.tokens[0].tokens[0].text=dt+" "+St.tokens[0].tokens[0].text)):St.tokens.unshift({type:"text",text:dt}):_t+=dt),_t+=this.parse(St.tokens,Vt),pt+=this.renderer.listitem(_t,rn,bn);A+=this.renderer.list(pt,Ot,Tt);continue}case"html":{A+=this.renderer.html(Xe.text);continue}case"paragraph":{A+=this.renderer.paragraph(this.parseInline(Xe.tokens));continue}case"text":{for(pt=Xe.tokens?this.parseInline(Xe.tokens):Xe.text;T+1<Vn&&y[T+1].type==="text";)Xe=y[++T],pt+=`
`+(Xe.tokens?this.parseInline(Xe.tokens):Xe.text);A+=C?this.renderer.paragraph(pt):pt;continue}default:{var Cn='Token with "'+Xe.type+'" type was not found.';if(this.options.silent){console.error(Cn);return}else throw new Error(Cn)}}}return A},j.parseInline=function(y,C){C=C||this.renderer;var A="",T,re,pe=y.length;for(T=0;T<pe;T++){re=y[T];switch(re.type){case"escape":{A+=C.text(re.text);break}case"html":{A+=C.html(re.text);break}case"link":{A+=C.link(re.href,re.title,this.parseInline(re.tokens,C));break}case"image":{A+=C.image(re.href,re.title,re.text);break}case"strong":{A+=C.strong(this.parseInline(re.tokens,C));break}case"em":{A+=C.em(this.parseInline(re.tokens,C));break}case"codespan":{A+=C.codespan(re.text);break}case"br":{A+=C.br();break}case"del":{A+=C.del(this.parseInline(re.tokens,C));break}case"text":{A+=C.text(re.text);break}default:{var je='Token with "'+re.type+'" type was not found.';if(this.options.silent){console.error(je);return}else throw new Error(je)}}}return A},Q}(),ft=ce.merge,at=ce.checkSanitizeDeprecation,it=ce.escape,xe=k.getDefaults,gt=k.changeDefaults,nt=k.defaults;function Se(Q,j,H){if(typeof Q=="undefined"||Q===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Q!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Q)+", string expected");if(typeof j=="function"&&(H=j,j=null),j=ft({},Se.defaults,j||{}),at(j),H){var y=j.highlight,C;try{C=_e.lex(Q,j)}catch(pe){return H(pe)}var A=function(je){var yt;if(!je)try{yt=tt.parse(C,j)}catch(kt){je=kt}return j.highlight=y,je?H(je):H(null,yt)};if(!y||y.length<3)return A();if(delete j.highlight,!C.length)return A();var T=0;Se.walkTokens(C,function(pe){pe.type==="code"&&(T++,setTimeout(function(){y(pe.text,pe.lang,function(je,yt){if(je)return A(je);yt!=null&&yt!==pe.text&&(pe.text=yt,pe.escaped=!0),T--,T===0&&A()})},0))}),T===0&&A();return}try{var re=_e.lex(Q,j);return j.walkTokens&&Se.walkTokens(re,j.walkTokens),tt.parse(re,j)}catch(pe){if(pe.message+=`
Please report this to https://github.com/markedjs/marked.`,j.silent)return"<p>An error occurred:</p><pre>"+it(pe.message+"",!0)+"</pre>";throw pe}}Se.options=Se.setOptions=function(Q){return ft(Se.defaults,Q),gt(Se.defaults),Se},Se.getDefaults=xe,Se.defaults=nt,Se.use=function(Q){var j=ft({},Q);if(Q.renderer&&function(){var y=Se.defaults.renderer||new Oe,C=function(re){var pe=y[re];y[re]=function(){for(var je=arguments.length,yt=new Array(je),kt=0;kt<je;kt++)yt[kt]=arguments[kt];var Ie=Q.renderer[re].apply(y,yt);return Ie===!1&&(Ie=pe.apply(y,yt)),Ie}};for(var A in Q.renderer)C(A);j.renderer=y}(),Q.tokenizer&&function(){var y=Se.defaults.tokenizer||new ke,C=function(re){var pe=y[re];y[re]=function(){for(var je=arguments.length,yt=new Array(je),kt=0;kt<je;kt++)yt[kt]=arguments[kt];var Ie=Q.tokenizer[re].apply(y,yt);return Ie===!1&&(Ie=pe.apply(y,yt)),Ie}};for(var A in Q.tokenizer)C(A);j.tokenizer=y}(),Q.walkTokens){var H=Se.defaults.walkTokens;j.walkTokens=function(y){Q.walkTokens(y),H&&H(y)}}Se.setOptions(j)},Se.walkTokens=function(Q,j){for(var H=oe(Q),y;!(y=H()).done;){var C=y.value;j(C);switch(C.type){case"table":{for(var A=oe(C.tokens.header),T;!(T=A()).done;){var re=T.value;Se.walkTokens(re,j)}for(var pe=oe(C.tokens.cells),je;!(je=pe()).done;)for(var yt=je.value,kt=oe(yt),Ie;!(Ie=kt()).done;){var wt=Ie.value;Se.walkTokens(wt,j)}break}case"list":{Se.walkTokens(C.items,j);break}default:C.tokens&&Se.walkTokens(C.tokens,j)}}},Se.Parser=tt,Se.parser=tt.parse,Se.Renderer=Oe,Se.TextRenderer=Ge,Se.Lexer=_e,Se.lexer=_e.lex,Se.Tokenizer=ke,Se.Slugger=vt,Se.parse=Se;var Ue=Se;return Ue})},E7E6:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539WR7i77uPfuvXfvar8zs7Mr7bnn8Z3vt9/5zlMQB5aAQQmsW7fO397eHujp6Rkfi8XGExFeDX2vABHVSSlrhBDDiKhdSnlOCBGWUu4mol1lZWWv3nfffccNZueJaMITpeBCeEICjz/++LCOjo5GIpogpWwUQjT2vU/A/wCClNJvtbBCCCml3CaEeGzChAmPLF269LLVtNx6jgFxS9I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Wt6e8Wi3l7CyBiO8JvicXkXS/EOEokWv582+/2ypaZm3IFCrXhBA5Is9La2trqenp6biGi2lJhv0eZcxhVq4xRIuU8Qid1CCKyB31VSUrK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},ELLl:function(ye,ge,p){(function(O){O(p("VrN/"))})(function(O){var de={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},X=O.Pos;O.defineOption("autoCloseBrackets",!1,function(P,F,z){z&&z!=O.Init&&(P.removeKeyMap(oe),P.state.closeBrackets=null),F&&(J(se(F,"pairs")),P.state.closeBrackets=F,P.addKeyMap(oe))});function se(P,F){return F=="pairs"&&typeof P=="string"?P:typeof P=="object"&&P[F]!=null?P[F]:de[F]}var oe={Backspace:M,Enter:U};function J(P){for(var F=0;F<P.length;F++){var z=P.charAt(F),ee="'"+z+"'";oe[ee]||(oe[ee]=k(z))}}J(de.pairs+"`");function k(P){return function(F){return w(F,P)}}function L(P){var F=P.state.closeBrackets;if(!F||F.override)return F;var z=P.getModeAt(P.getCursor());return z.closeBrackets||F}function M(P){var F=L(P);if(!F||P.getOption("disableInput"))return O.Pass;for(var z=se(F,"pairs"),ee=P.listSelections(),ne=0;ne<ee.length;ne++){if(!ee[ne].empty())return O.Pass;var Re=V(P,ee[ne].head);if(!Re||z.indexOf(Re)%2!=0)return O.Pass}for(var ne=ee.length-1;ne>=0;ne--){var We=ee[ne].head;P.replaceRange("",X(We.line,We.ch-1),X(We.line,We.ch+1),"+delete")}}function U(P){var F=L(P),z=F&&se(F,"explode");if(!z||P.getOption("disableInput"))return O.Pass;for(var ee=P.listSelections(),ne=0;ne<ee.length;ne++){if(!ee[ne].empty())return O.Pass;var Re=V(P,ee[ne].head);if(!Re||z.indexOf(Re)%2!=0)return O.Pass}P.operation(function(){var We=P.lineSeparator()||`
`;P.replaceSelection(We+We,null),P.execCommand("goCharLeft"),ee=P.listSelections();for(var fe=0;fe<ee.length;fe++){var le=ee[fe].head.line;P.indentLine(le,null,!0),P.indentLine(le+1,null,!0)}})}function E(P){var F=O.cmpPos(P.anchor,P.head)>0;return{anchor:new X(P.anchor.line,P.anchor.ch+(F?-1:1)),head:new X(P.head.line,P.head.ch+(F?1:-1))}}function w(P,F){var z=L(P);if(!z||P.getOption("disableInput"))return O.Pass;var ee=se(z,"pairs"),ne=ee.indexOf(F);if(ne==-1)return O.Pass;for(var Re=se(z,"closeBefore"),We=se(z,"triples"),fe=ee.charAt(ne+1)==F,le=P.listSelections(),Be=ne%2==0,ue,me=0;me<le.length;me++){var he=le[me],q=he.head,S,te=P.getRange(q,X(q.line,q.ch+1));if(Be&&!he.empty())S="surround";else if((fe||!Be)&&te==F)fe&&W(P,q)?S="both":We.indexOf(F)>=0&&P.getRange(q,X(q.line,q.ch+3))==F+F+F?S="skipThree":S="skip";else if(fe&&q.ch>1&&We.indexOf(F)>=0&&P.getRange(X(q.line,q.ch-2),q)==F+F){if(q.ch>2&&/\bstring/.test(P.getTokenTypeAt(X(q.line,q.ch-2))))return O.Pass;S="addFour"}else if(fe){var K=q.ch==0?" ":P.getRange(X(q.line,q.ch-1),q);if(!O.isWordChar(te)&&K!=F&&!O.isWordChar(K))S="both";else return O.Pass}else if(Be&&(te.length===0||/\s/.test(te)||Re.indexOf(te)>-1))S="both";else return O.Pass;if(!ue)ue=S;else if(ue!=S)return O.Pass}var b=ne%2?ee.charAt(ne-1):F,R=ne%2?F:ee.charAt(ne+1);P.operation(function(){if(ue=="skip")P.execCommand("goCharRight");else if(ue=="skipThree")for(var G=0;G<3;G++)P.execCommand("goCharRight");else if(ue=="surround"){for(var I=P.getSelections(),G=0;G<I.length;G++)I[G]=b+I[G]+R;P.replaceSelections(I,"around"),I=P.listSelections().slice();for(var G=0;G<I.length;G++)I[G]=E(I[G]);P.setSelections(I)}else ue=="both"?(P.replaceSelection(b+R,null),P.triggerElectric(b+R),P.execCommand("goCharLeft")):ue=="addFour"&&(P.replaceSelection(b+b+b+b,"before"),P.execCommand("goCharRight"))})}function V(P,F){var z=P.getRange(X(F.line,F.ch-1),X(F.line,F.ch+1));return z.length==2?z:null}function W(P,F){var z=P.getTokenAt(X(F.line,F.ch+1));return/\bstring/.test(z.type)&&z.start==F.ch&&(F.ch==0||!/\bstring/.test(P.getTokenTypeAt(F)))}})},FOrL:function(ye,ge,p){ye.exports=p.p+"static/nodata.a6b3f948.png"},FPkq:function(ye,ge,p){ye.exports=p.p+"static/qrCode.dd0fe9b2.png"},GABl:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0m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HrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},Gytx:function(ye,ge){ye.exports=function(O,de,X,se){var oe=X?X.call(se,O,de):void 0;if(oe!==void 0)return!!oe;if(O===de)return!0;if(typeof O!="object"||!O||typeof de!="object"||!de)return!1;var J=Object.keys(O),k=Object.keys(de);if(J.length!==k.length)return!1;for(var L=Object.prototype.hasOwnProperty.bind(de),M=0;M<J.length;M++){var U=J[M];if(!L(U))return!1;var E=O[U],w=de[U];if(oe=X?X.call(se,E,w,U):void 0,oe===!1||oe===void 0&&E!==w)return!1}return!0}},H38U:function(ye,ge,p){var O=p("f4xo"),de=p("rcnY"),X=p("wU8J"),se=p("Iq15"),oe=p("dWSS");function J(L,M){this.typeNumber=L,this.errorCorrectLevel=M,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var k=J.prototype;k.addData=function(L){var M=new O(L);this.dataList.push(M),this.dataCache=null},k.isDark=function(L,M){if(L<0||this.moduleCount<=L||M<0||this.moduleCount<=M)throw new Error(L+","+M);return this.modules[L][M]},k.getModuleCount=function(){return this.moduleCount},k.make=function(){if(this.typeNumber<1){var L=1;for(L=1;L<40;L++){for(var M=de.getRSBlocks(L,this.errorCorrectLevel),U=new X,E=0,w=0;w<M.length;w++)E+=M[w].dataCount;for(var w=0;w<this.dataList.length;w++){var V=this.dataList[w];U.put(V.mode,4),U.put(V.getLength(),se.getLengthInBits(V.mode,L)),V.write(U)}if(U.getLengthInBits()<=E*8)break}this.typeNumber=L}this.makeImpl(!1,this.getBestMaskPattern())},k.makeImpl=function(L,M){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var U=0;U<this.moduleCount;U++){this.modules[U]=new Array(this.moduleCount);for(var E=0;E<this.moduleCount;E++)this.modules[U][E]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(L,M),this.typeNumber>=7&&this.setupTypeNumber(L),this.dataCache==null&&(this.dataCache=J.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,M)},k.setupPositionProbePattern=function(L,M){for(var U=-1;U<=7;U++){if(L+U<=-1||this.moduleCount<=L+U)continue;for(var E=-1;E<=7;E++){if(M+E<=-1||this.moduleCount<=M+E)continue;0<=U&&U<=6&&(E==0||E==6)||0<=E&&E<=6&&(U==0||U==6)||2<=U&&U<=4&&2<=E&&E<=4?this.modules[L+U][M+E]=!0:this.modules[L+U][M+E]=!1}}},k.getBestMaskPattern=function(){for(var L=0,M=0,U=0;U<8;U++){this.makeImpl(!0,U);var E=se.getLostPoint(this);(U==0||L>E)&&(L=E,M=U)}return M},k.createMovieClip=function(L,M,U){var E=L.createEmptyMovieClip(M,U),w=1;this.make();for(var V=0;V<this.modules.length;V++)for(var W=V*w,P=0;P<this.modules[V].length;P++){var F=P*w,z=this.modules[V][P];z&&(E.beginFill(0,100),E.moveTo(F,W),E.lineTo(F+w,W),E.lineTo(F+w,W+w),E.lineTo(F,W+w),E.endFill())}return E},k.setupTimingPattern=function(){for(var L=8;L<this.moduleCount-8;L++){if(this.modules[L][6]!=null)continue;this.modules[L][6]=L%2==0}for(var M=8;M<this.moduleCount-8;M++){if(this.modules[6][M]!=null)continue;this.modules[6][M]=M%2==0}},k.setupPositionAdjustPattern=function(){for(var L=se.getPatternPosition(this.typeNumber),M=0;M<L.length;M++)for(var U=0;U<L.length;U++){var E=L[M],w=L[U];if(this.modules[E][w]!=null)continue;for(var V=-2;V<=2;V++)for(var W=-2;W<=2;W++)V==-2||V==2||W==-2||W==2||V==0&&W==0?this.modules[E+V][w+W]=!0:this.modules[E+V][w+W]=!1}},k.setupTypeNumber=function(L){for(var M=se.getBCHTypeNumber(this.typeNumber),U=0;U<18;U++){var E=!L&&(M>>U&1)==1;this.modules[Math.floor(U/3)][U%3+this.moduleCount-8-3]=E}for(var U=0;U<18;U++){var E=!L&&(M>>U&1)==1;this.modules[U%3+this.moduleCount-8-3][Math.floor(U/3)]=E}},k.setupTypeInfo=function(L,M){for(var U=this.errorCorrectLevel<<3|M,E=se.getBCHTypeInfo(U),w=0;w<15;w++){var V=!L&&(E>>w&1)==1;w<6?this.modules[w][8]=V:w<8?this.modules[w+1][8]=V:this.modules[this.moduleCount-15+w][8]=V}for(var w=0;w<15;w++){var V=!L&&(E>>w&1)==1;w<8?this.modules[8][this.moduleCount-w-1]=V:w<9?this.modules[8][15-w-1+1]=V:this.modules[8][15-w-1]=V}this.modules[this.moduleCount-8][8]=!L},k.mapData=function(L,M){for(var U=-1,E=this.moduleCount-1,w=7,V=0,W=this.moduleCount-1;W>0;W-=2)for(W==6&&W--;;){for(var P=0;P<2;P++)if(this.modules[E][W-P]==null){var F=!1;V<L.length&&(F=(L[V]>>>w&1)==1);var z=se.getMask(M,E,W-P);z&&(F=!F),this.modules[E][W-P]=F,w--,w==-1&&(V++,w=7)}if(E+=U,E<0||this.moduleCount<=E){E-=U,U=-U;break}}},J.PAD0=236,J.PAD1=17,J.createData=function(L,M,U){for(var E=de.getRSBlocks(L,M),w=new X,V=0;V<U.length;V++){var W=U[V];w.put(W.mode,4),w.put(W.getLength(),se.getLengthInBits(W.mode,L)),W.write(w)}for(var P=0,V=0;V<E.length;V++)P+=E[V].dataCount;if(w.getLengthInBits()>P*8)throw new Error("code length overflow. ("+w.getLengthInBits()+">"+P*8+")");for(w.getLengthInBits()+4<=P*8&&w.put(0,4);w.getLengthInBits()%8!=0;)w.putBit(!1);for(;!(w.getLengthInBits()>=P*8);){if(w.put(J.PAD0,8),w.getLengthInBits()>=P*8)break;w.put(J.PAD1,8)}return J.createBytes(w,E)},J.createBytes=function(L,M){for(var U=0,E=0,w=0,V=new Array(M.length),W=new Array(M.length),P=0;P<M.length;P++){var F=M[P].dataCount,z=M[P].totalCount-F;E=Math.max(E,F),w=Math.max(w,z),V[P]=new Array(F);for(var ee=0;ee<V[P].length;ee++)V[P][ee]=255&L.buffer[ee+U];U+=F;var ne=se.getErrorCorrectPolynomial(z),Re=new oe(V[P],ne.getLength()-1),We=Re.mod(ne);W[P]=new Array(ne.getLength()-1);for(var ee=0;ee<W[P].length;ee++){var fe=ee+We.getLength()-W[P].length;W[P][ee]=fe>=0?We.get(fe):0}}for(var le=0,ee=0;ee<M.length;ee++)le+=M[ee].totalCount;for(var Be=new Array(le),ue=0,ee=0;ee<E;ee++)for(var P=0;P<M.length;P++)ee<V[P].length&&(Be[ue++]=V[P][ee]);for(var ee=0;ee<w;ee++)for(var P=0;P<M.length;P++)ee<W[P].length&&(Be[ue++]=W[P][ee]);return Be},ye.exports=J},HmJG:function(ye,ge,p){},HpTS:function(ye,ge,p){ye.exports=p.p+"static/small_program.f74069ec.png"},Iq15:function(ye,ge,p){var O=p("nVVt"),de=p("dWSS"),X=p("dQei"),se={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},oe={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(J){for(var k=J<<10;oe.getBCHDigit(k)-oe.getBCHDigit(oe.G15)>=0;)k^=oe.G15<<oe.getBCHDigit(k)-oe.getBCHDigit(oe.G15);return(J<<10|k)^oe.G15_MASK},getBCHTypeNumber:function(J){for(var k=J<<12;oe.getBCHDigit(k)-oe.getBCHDigit(oe.G18)>=0;)k^=oe.G18<<oe.getBCHDigit(k)-oe.getBCHDigit(oe.G18);return J<<12|k},getBCHDigit:function(J){for(var k=0;J!=0;)k++,J>>>=1;return k},getPatternPosition:function(J){return oe.PATTERN_POSITION_TABLE[J-1]},getMask:function(J,k,L){switch(J){case se.PATTERN000:return(k+L)%2==0;case se.PATTERN001:return k%2==0;case se.PATTERN010:return L%3==0;case se.PATTERN011:return(k+L)%3==0;case se.PATTERN100:return(Math.floor(k/2)+Math.floor(L/3))%2==0;case se.PATTERN101:return k*L%2+k*L%3==0;case se.PATTERN110:return(k*L%2+k*L%3)%2==0;case se.PATTERN111:return(k*L%3+(k+L)%2)%2==0;default:throw new Error("bad maskPattern:"+J)}},getErrorCorrectPolynomial:function(J){for(var k=new de([1],0),L=0;L<J;L++)k=k.multiply(new de([1,X.gexp(L)],0));return k},getLengthInBits:function(J,k){if(1<=k&&k<10)switch(J){case O.MODE_NUMBER:return 10;case O.MODE_ALPHA_NUM:return 9;case O.MODE_8BIT_BYTE:return 8;case O.MODE_KANJI:return 8;default:throw new Error("mode:"+J)}else if(k<27)switch(J){case O.MODE_NUMBER:return 12;case O.MODE_ALPHA_NUM:return 11;case O.MODE_8BIT_BYTE:return 16;case O.MODE_KANJI:return 10;default:throw new Error("mode:"+J)}else if(k<41)switch(J){case O.MODE_NUMBER:return 14;case O.MODE_ALPHA_NUM:return 13;case O.MODE_8BIT_BYTE:return 16;case O.MODE_KANJI:return 12;default:throw new Error("mode:"+J)}else throw new Error("type:"+k)},getLostPoint:function(J){for(var k=J.getModuleCount(),L=0,M=0;M<k;M++)for(var U=0;U<k;U++){for(var E=0,w=J.isDark(M,U),V=-1;V<=1;V++){if(M+V<0||k<=M+V)continue;for(var W=-1;W<=1;W++){if(U+W<0||k<=U+W)continue;if(V==0&&W==0)continue;w==J.isDark(M+V,U+W)&&E++}}E>5&&(L+=3+E-5)}for(var M=0;M<k-1;M++)for(var U=0;U<k-1;U++){var P=0;J.isDark(M,U)&&P++,J.isDark(M+1,U)&&P++,J.isDark(M,U+1)&&P++,J.isDark(M+1,U+1)&&P++,(P==0||P==4)&&(L+=3)}for(var M=0;M<k;M++)for(var U=0;U<k-6;U++)J.isDark(M,U)&&!J.isDark(M,U+1)&&J.isDark(M,U+2)&&J.isDark(M,U+3)&&J.isDark(M,U+4)&&!J.isDark(M,U+5)&&J.isDark(M,U+6)&&(L+=40);for(var U=0;U<k;U++)for(var M=0;M<k-6;M++)J.isDark(M,U)&&!J.isDark(M+1,U)&&J.isDark(M+2,U)&&J.isDark(M+3,U)&&J.isDark(M+4,U)&&!J.isDark(M+5,U)&&J.isDark(M+6,U)&&(L+=40);for(var F=0,U=0;U<k;U++)for(var M=0;M<k;M++)J.isDark(M,U)&&F++;var z=Math.abs(100*F/k/k-50)/5;return L+=z*10,L}};ye.exports=oe},JWDV:function(ye,ge,p){ye.exports=p.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07U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mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(ye,ge,p){ye.exports=p.p+"static/qrcode.54870d9b.png"},LdHM:function(ye,ge,p){"use strict";p.d(ge,"b",function(){return Re}),p.d(ge,"a",function(){return fe});var O=p("1OyB"),de=p("vuIU"),X=p("Ji7U"),se=p("LK+K"),oe=p("q1tI"),J=p("rePB"),k=p("Ff2n"),L=p("ODXe"),M=p("4IlW"),U=p("bX4T"),E=p("YrtM"),w=p("TSYQ"),V=p.n(w),W=p("+nKL"),P=p("8OUc"),F=function(Y,Ae){var ve=Y.prefixCls,Fe=Y.id,He=Y.flattenOptions,ke=Y.childrenAsData,be=Y.values,Ce=Y.searchValue,we=Y.multiple,Z=Y.defaultActiveFirstOption,_=Y.height,Pe=Y.itemHeight,et=Y.notFoundContent,st=Y.open,qe=Y.menuItemSelectedIcon,Ke=Y.virtual,Me=Y.onSelect,_e=Y.onToggleOpen,Ve=Y.onActiveValue,$e=Y.onScroll,Ye=Y.onMouseEnter,Oe="".concat(ve,"-item"),Ge=Object(E.a)(function(){return He},[st,He],function(Ue,Q){return Q[0]&&Ue[1]!==Q[1]}),vt=oe.useRef(null),lt=function(Q){Q.preventDefault()},rt=function(Q){vt.current&&vt.current.scrollTo({index:Q})},tt=function(Q){for(var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=Ge.length,y=0;y<H;y+=1){var C=(Q+y*j+H)%H,A=Ge[C],T=A.group,re=A.data;if(!T&&!re.disabled)return C}return-1},ft=oe.useState(function(){return tt(0)}),at=Object(L.a)(ft,2),it=at[0],xe=at[1],gt=function(Q){xe(Q);var j=Ge[Q];if(!j){Ve(null,-1);return}Ve(j.data.value,Q)};oe.useEffect(function(){gt(Z!==!1?tt(0):-1)},[Ge.length,Ce]),oe.useEffect(function(){var Ue=setTimeout(function(){if(!we&&st&&be.size===1){var Q=Array.from(be)[0],j=Ge.findIndex(function(H){var y=H.data;return y.value===Q});gt(j),rt(j)}});return function(){return clearTimeout(Ue)}},[st]);var nt=function(Q){Q!==void 0&&Me(Q,{selected:!be.has(Q)}),we||_e(!1)};if(oe.useImperativeHandle(Ae,function(){return{onKeyDown:function(Q){var j=Q.which;switch(j){case M.a.UP:case M.a.DOWN:{var H=0;if(j===M.a.UP?H=-1:j===M.a.DOWN&&(H=1),H!==0){var y=tt(it+H,H);rt(y),gt(y)}break}case M.a.ENTER:{var C=Ge[it];C&&!C.data.disabled?nt(C.data.value):nt(void 0),st&&Q.preventDefault();break}case M.a.ESC:_e(!1)}},onKeyUp:function(){},scrollTo:function(Q){rt(Q)}}}),Ge.length===0)return oe.createElement("div",{role:"listbox",id:"".concat(Fe,"_list"),className:"".concat(Oe,"-empty"),onMouseDown:lt},et);function Se(Ue){var Q=Ge[Ue];if(!Q)return null;var j=Q.data||{},H=j.value,y=j.label,C=j.children,A=Object(U.a)(j,!0),T=ke?C:y;return Q?oe.createElement("div",Object.assign({"aria-label":typeof T=="string"?T:null},A,{key:Ue,role:"option",id:"".concat(Fe,"_list_").concat(Ue),"aria-selected":be.has(H)}),H):null}return oe.createElement(oe.Fragment,null,oe.createElement("div",{role:"listbox",id:"".concat(Fe,"_list"),style:{height:0,width:0,overflow:"hidden"}},Se(it-1),Se(it),Se(it+1)),oe.createElement(W.a,{itemKey:"key",ref:vt,data:Ge,height:_,itemHeight:Pe,fullHeight:!1,onMouseDown:lt,onScroll:$e,virtual:Ke,onMouseEnter:Ye},function(Ue,Q){var j,H=Ue.group,y=Ue.groupOption,C=Ue.data,A=C.label,T=C.key;if(H)return oe.createElement("div",{className:V()(Oe,"".concat(Oe,"-group"))},A!==void 0?A:T);var re=C.disabled,pe=C.value,je=C.title,yt=C.children,kt=C.style,Ie=C.className,wt=Object(k.a)(C,["disabled","value","title","children","style","className"]),pt=be.has(pe),Xe="".concat(Oe,"-option"),Ot=V()(Oe,Xe,Ie,(j={},Object(J.a)(j,"".concat(Xe,"-grouped"),y),Object(J.a)(j,"".concat(Xe,"-active"),it===Q&&!re),Object(J.a)(j,"".concat(Xe,"-disabled"),re),Object(J.a)(j,"".concat(Xe,"-selected"),pt),j)),Tt=ke?yt:A,Vt=!qe||typeof qe=="function"||pt;return oe.createElement("div",Object.assign({},wt,{"aria-selected":pt,className:Ot,title:je,onMouseMove:function(){if(it===Q||re)return;gt(Q)},onClick:function(){re||nt(pe)},style:kt}),oe.createElement("div",{className:"".concat(Xe,"-content")},Tt||pe),oe.isValidElement(qe)||pt,Vt&&oe.createElement(P.a,{className:"".concat(Oe,"-option-state"),customizeIcon:qe,customizeIconProps:{isSelected:pt}},pt?"\u2713":null))}))},z=oe.forwardRef(F);z.displayName="OptionList";var ee=z,ne=function(){return null};ne.isSelectOption=!0;var Re=ne,We=function(){return null};We.isSelectOptGroup=!0;var fe=We,le=p("VTBJ"),Be=p("Zm9Q");function ue(m){var Y=m.key,Ae=m.props,ve=Ae.children,Fe=Ae.value,He=Object(k.a)(Ae,["children","value"]);return Object(le.a)({key:Y,value:Fe!==void 0?Fe:Y,children:ve},He)}function me(m){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Be.a)(m).map(function(Ae,ve){if(!oe.isValidElement(Ae)||!Ae.type)return null;var Fe=Ae.type.isSelectOptGroup,He=Ae.key,ke=Ae.props,be=ke.children,Ce=Object(k.a)(ke,["children"]);return Y||!Fe?ue(Ae):Object(le.a)(Object(le.a)({key:"__RC_SELECT_GRP__".concat(He===null?ve:He,"__"),label:He},Ce),{},{options:me(be)})}).filter(function(Ae){return Ae})}var he=p("2Qr1"),q=p("qNPg"),S=p("U8pU"),te=p("Kwbf"),K=p("WKfj");function b(m){var Y=m.mode,Ae=m.options,ve=m.children,Fe=m.backfill,He=m.allowClear,ke=m.placeholder,be=m.getInputElement,Ce=m.showSearch,we=m.onSearch,Z=m.defaultOpen,_=m.autoFocus,Pe=m.labelInValue,et=m.value,st=m.inputValue,qe=m.optionLabelProp,Ke=Y==="multiple"||Y==="tags",Me=Ce!==void 0?Ce:Ke||Y==="combobox",_e=Ae||me(ve);if(Object(te.a)(Y!=="tags"||_e.every(function(Oe){return!Oe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var Ve=_e.some(function(Oe){return Oe.options?Oe.options.some(function(Ge){return typeof("value"in Ge?Ge.value:Ge.key)=="number"}):typeof("value"in Oe?Oe.value:Oe.key)=="number"});Object(te.a)(!Ve,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(te.a)(Y!=="combobox"||!qe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(te.a)(Y==="combobox"||!Fe,"`backfill` only works with `combobox` mode."),Object(te.a)(Y==="combobox"||!be,"`getInputElement` only work with `combobox` mode."),Object(te.b)(Y!=="combobox"||!be||!He||!ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),we&&!Me&&Y!=="combobox"&&Y!=="tags"&&Object(te.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(te.b)(!Z||_,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),et!=null){var $e=Object(K.d)(et);Object(te.a)(!Pe||$e.every(function(Oe){return Object(S.a)(Oe)==="object"&&("key"in Oe||"value"in Oe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(te.a)(!Ke||Array.isArray(et),"`value` should be array when `mode` is `multiple` or `tags`")}if(ve){var Ye=null;Object(Be.a)(ve).some(function(Oe){if(!oe.isValidElement(Oe)||!Oe.type)return!1;var Ge=Oe.type;if(Ge.isSelectOption)return!1;if(Ge.isSelectOptGroup){var vt=Object(Be.a)(Oe.props.children).every(function(lt){return!oe.isValidElement(lt)||!Oe.type||lt.type.isSelectOption?!0:(Ye=lt.type,!1)});return!vt}return Ye=Ge,!0}),Ye&&Object(te.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ye.displayName||Ye.name||Ye,"`.")),Object(te.a)(st===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var R=b,G=Object(q.a)({prefixCls:"rc-select",components:{optionList:ee},convertChildrenToData:me,flattenOptions:he.d,getLabeledValue:he.e,filterOptions:he.b,isValueDisabled:he.g,findValueOption:he.c,warningProps:R,fillOptionsWithMissingValue:he.a}),I=function(m){Object(X.a)(Ae,m);var Y=Object(se.a)(Ae);function Ae(){var ve;return Object(O.a)(this,Ae),ve=Y.apply(this,arguments),ve.selectRef=oe.createRef(),ve.focus=function(){ve.selectRef.current.focus()},ve.blur=function(){ve.selectRef.current.blur()},ve}return Object(de.a)(Ae,[{key:"render",value:function(){return oe.createElement(G,Object.assign({ref:this.selectRef},this.props))}}]),Ae}(oe.Component);I.Option=Re,I.OptGroup=fe;var ce=I,x=ge.c=ce},M8RZ:function(ye,ge,p){"use strict";p.d(ge,"a",function(){return M});var O=p("fWQN"),de=p("mtLc"),X=p("yKVA"),se=p("879j"),oe=p("q1tI"),J=p.n(oe),k=p("i8i4"),L=p.n(k),M=function(U){Object(X.a)(w,U);var E=Object(se.a)(w);function w(V){var W;Object(O.a)(this,w),W=E.call(this,V);var P=window.document;return W.node=P.createElement("div"),P.body.appendChild(W.node),W}return Object(de.a)(w,[{key:"render",value:function(){var W=this.props.children;return Object(k.createPortal)(W,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),w}(J.a.Component)},Nmxd:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3vt0RRLWjIRi35biLWkgmOhaz0SflleYMzZi3jAcaf+sGKqoAUVX3wbwnrN0FYveYoTj7xdiL2ggqKsvMnCyYnJcEBPw0nA4/kUuNM9AINX9MMnMIEDzXeSpIISvs/A1pJu2/TgzSZ4BRVf7ALxQQSVeqPuNcLy5qIHJcb7HS4ZKYxncNnOemH4DyqmehaiW58D8UKVFeOIn+gljYrmxsu2XWa2Eomt7AN7uidwd+CKBPy8EZdA7hSlprxGO7Zg2EPxSW8q35WDZehv7Ri4KEuuGQtu+y4UoSe0DML9ZkIp5jKpEw/BzsZFsCSkpNQYJ1X7eskQWF6+rbwD4sGQWgbjRFNcmDCS0oyBuKYsseyRFxS/TteWSZT+IaktS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znTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},OLES:function(ye,ge,p){"use strict";var O=p("U8pU"),de=p("VTBJ"),X=p("Ff2n"),se=p("q1tI"),oe=p("uciX"),J=p("7ixt"),k=function(V){var W=V.overlay,P=V.prefixCls,F=V.id,z=V.overlayInnerStyle;return se.createElement("div",{className:"".concat(P,"-inner"),id:F,role:"tooltip",style:z},typeof W=="function"?W():W)},L=k,M=function(V,W){var P=V.overlayClassName,F=V.trigger,z=F===void 0?["hover"]:F,ee=V.mouseEnterDelay,ne=ee===void 0?0:ee,Re=V.mouseLeaveDelay,We=Re===void 0?.1:Re,fe=V.overlayStyle,le=V.prefixCls,Be=le===void 0?"rc-tooltip":le,ue=V.children,me=V.onVisibleChange,he=V.afterVisibleChange,q=V.transitionName,S=V.animation,te=V.placement,K=te===void 0?"right":te,b=V.align,R=b===void 0?{}:b,G=V.destroyTooltipOnHide,I=G===void 0?!1:G,ce=V.defaultVisible,x=V.getTooltipContainer,m=V.overlayInnerStyle,Y=Object(X.a)(V,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Ae=Object(se.useRef)(null);Object(se.useImperativeHandle)(W,function(){return Ae.current});var ve=Object(de.a)({},Y);"visible"in V&&(ve.popupVisible=V.visible);var Fe=function(){var we=V.arrowContent,Z=we===void 0?null:we,_=V.overlay,Pe=V.id;return[se.createElement("div",{className:"".concat(Be,"-arrow"),key:"arrow"},Z),se.createElement(L,{key:"content",prefixCls:Be,id:Pe,overlay:_,overlayInnerStyle:m})]},He=!1,ke=!1;if(typeof I=="boolean")He=I;else if(I&&Object(O.a)(I)==="object"){var be=I.keepParent;He=be===!0,ke=be===!1}return se.createElement(oe.a,Object.assign({popupClassName:P,prefixCls:Be,popup:Fe,action:z,builtinPlacements:J.a,popupPlacement:K,ref:Ae,popupAlign:R,getPopupContainer:x,onPopupVisibleChange:me,afterPopupVisibleChange:he,popupTransitionName:q,popupAnimation:S,defaultPopupVisible:ce,destroyPopupOnHide:He,autoDestroy:ke,mouseLeaveDelay:We,popupStyle:fe,mouseEnterDelay:ne},ve),ue)},U=Object(se.forwardRef)(M),E=ge.a=U},Ohmc:function(ye,ge,p){ye.exports=p.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(ye,ge,p){"use strict";var O=p("2qtc"),de=p("kLXV"),X=p("rAM+"),se=p("miYZ"),oe=p("tsqr"),J=p("9og8"),k=p("tJVT"),L=p("jrin"),M=p("WmNS"),U=p.n(M),E=p("q1tI"),w=p.n(E),V=p("VrN/"),W=p.n(V),P=p("bdgK"),F=p("p77/"),z=p("Bd2K"),ee=p("ELLl"),ne=p("19Vz"),Re=p("lZu9"),We=p("+NIl"),fe=p("kSUc"),le=p("9Bee"),Be=function(Ie){var wt=Ie.value,pt=wt===void 0?"":wt,Xe=Ie.className,Ot=Ie.showTextOnly,Tt=Ie.showLines,Vt=Ie.style,_t=Vt===void 0?{}:Vt,St=Object(E.useMemo)(function(){return""},[pt]);return w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{dangerouslySetInnerHTML:{__html:St}}))},ue=p("Q9mQ"),me=p("diRs"),he=p("0Owb"),q=p("dejd"),S=p("C+DQ"),te=p("D1Df"),K=p.n(te),b=p("1vsH"),R=p("m3rI"),G=[{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 I(Ie){var wt=Ie.onActionCallback,pt=Ie.title,Xe=Ie.icon,Ot=Ie.actionName,Tt=Ie.className,Vt=Tt===void 0?"":Tt,_t=Ie.children;function St(){wt(Ot)}return w.a.createElement("a",{title:pt,className:Vt,onClick:St},w.a.createElement("i",{className:"md-iconfont ".concat(Xe)}),_t)}var ce=function(Ie){var wt=Ie.watch,pt=Ie.showNullButton,Xe=Ie.onActionCallback,Ot=Ie.fullScreen,Tt=Ie.insertTemp,Vt=Ie.hidetoolBar,_t=Ie.uuid,St=Ie.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.E)("_educoder_session"),"&key=").concat(_t,"&api=").concat(encodeURIComponent(R.a.PROXY_SERVER)));var bn=[].concat(G,[{title:"".concat(wt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(wt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return w.a.createElement("ul",{className:"markdown-toolbar-container"},!Vt&&bn.map(function(rn,dt){return w.a.createElement("li",{key:dt},rn.actionName?w.a.createElement(I,Object(he.a)({},rn,{onActionCallback:Xe})):w.a.createElement("span",{className:"v-line"}))}),pt?w.a.createElement("li",null,w.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Xe},w.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Tt&&w.a.createElement("li",null,w.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Tt),onActionCallback:Xe},w.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),w.a.createElement("li",null,w.a.createElement(me.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:w.a.createElement("div",null,w.a.createElement(K.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(b.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.E)("_educoder_session"),"&key=").concat(_t,"&api=").concat(encodeURIComponent(R.a.PROXY_SERVER))}))},w.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return St(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),w.a.createElement("li",{className:"btn-full-screen"},w.a.createElement(I,{icon:"".concat(Ot?"icon-shrink":"icon-enlarge"),title:Ot?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Xe})))},x=p("M8RZ"),m=p("+L6B"),Y=p("2/Rp"),Ae=p("y8nQ"),ve=p("Vl3Y"),Fe=p("5NDa"),He=p("5rEg"),ke={labelCol:{span:4},wrapperCol:{span:20}},be=function(Ie){var wt=Ie.callback,pt=Ie.onCancel;function Xe(Ot){wt(Ot)}return w.a.createElement(ve.a,Object(he.a)({},ke,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Xe}),w.a.createElement(ve.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},w.a.createElement(He.a,null)),w.a.createElement(ve.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},w.a.createElement(He.a,null)),w.a.createElement("div",{className:"flex-container flex-end"},w.a.createElement(Y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(Y.a,{type:"ghost",onClick:pt},"\u53D6\u6D88")))},Ce=p("7ahc"),we=p("k1fw"),Z=p("HmJG"),_=p("BjJ7"),Pe=ve.a.useForm,et={width:280,marginRight:10},st={labelCol:{span:5},wrapperCol:{span:19}},qe=function(Ie){var wt=Ie.callback,pt=Ie.onCancel,Xe=Pe(),Ot=Object(k.a)(Xe,1),Tt=Ot[0],Vt=Object(E.useRef)();function _t(rn){wt(Object(we.a)(Object(we.a)({},rn),{},{name:Vt.current}))}function St(rn,dt){Tt.setFieldsValue({src:"/api/attachments/".concat(rn.id,"?type=").concat(rn.content_type),type:dt.type})}function bn(rn){var dt=rn.target.files[0];Vt.current=dt.name,Me(dt,St)}return w.a.createElement(ve.a,Object(he.a)({form:Tt},st,{className:"upload-image-panel",onFinish:_t}),w.a.createElement(ve.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},w.a.createElement("div",{className:"flex-container"},w.a.createElement(ve.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},w.a.createElement(He.a,{style:et})),w.a.createElement(Ke,{onFileChange:bn}))),w.a.createElement(ve.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},w.a.createElement(He.a,{style:{width:264}})),w.a.createElement(ve.a.Item,{style:{textAlign:"right"}},w.a.createElement(Y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(Y.a,{type:"ghost",onClick:pt},"\u53D6\u6D88")))};function Ke(Ie){var wt=Ie.onFileChange;return w.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",w.a.createElement("input",{type:"file",onChange:wt}))}function Me(Ie,wt){if(!Ie)throw new String("\u6CA1\u6709\u6587\u4EF6");var pt=new FormData;pt.append("editormd-image-file",Ie),pt.append("file_param_name","editormd-image-file"),pt.append("byxhr","true");var Xe=new window.XMLHttpRequest;Xe.withCredentials=!0,Xe.addEventListener("load",function(Ot){wt(JSON.parse(Ot.target.responseText),Ie)},!1),Xe.addEventListener("error",function(Ot){console.error(Ot)},!1),Xe.open("POST","".concat(_.a,"/api/attachments.json")),Xe.send(pt)}var _e=p("giR+"),Ve=p("fyUT"),$e=p("7Kak"),Ye=p("9yH6"),Oe=Ye.a.Group,Ge={margin:"0 8px"},vt=function(Ie){var wt=Ie.callback,pt=Ie.onCancel;function Xe(Ot){wt(Ot)}return w.a.createElement(ve.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Xe},w.a.createElement("div",{className:"flex-container"},w.a.createElement("span",{style:Ge},"\u5355\u5143\u683C\u6570\uFF1A"),w.a.createElement("span",{style:Ge},"\u884C\u6570"),w.a.createElement(ve.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},w.a.createElement(Ve.a,null)),w.a.createElement("span",{style:Ge},"\u5217\u6570"),w.a.createElement(ve.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},w.a.createElement(Ve.a,null))),w.a.createElement("div",{className:"flex-container",style:{marginTop:12}},w.a.createElement("span",{style:Ge},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),w.a.createElement(ve.a.Item,{name:"align"},w.a.createElement(Oe,null,w.a.createElement(Ye.a,{value:"default"},w.a.createElement("i",{className:"fa fa-align-justify"})),w.a.createElement(Ye.a,{value:"left"},w.a.createElement("i",{className:"fa fa-align-left"})),w.a.createElement(Ye.a,{value:"center"},w.a.createElement("i",{className:"fa fa-align-center"})),w.a.createElement(Ye.a,{value:"right"},w.a.createElement("i",{className:"fa fa-align-right"}))))),w.a.createElement("div",{className:"flex-container flex-end"},w.a.createElement(Y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(Y.a,{type:"ghost",onClick:pt},"\u53D6\u6D88")))},lt=p("ErOA"),rt=p("7Cbv"),tt="link",ft="upload-image",at="code-block",it="add-table",xe="------------",gt={default:xe,left:":".concat(xe),center:":".concat(xe,":"),right:"".concat(xe,":")},nt=p("9VGf"),Se,Ue;function Q(){}var j=0,H=1e4,y="\u2581",C=`
**\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 A(Ie){return/^\d+$/.test(Ie)?"".concat(Ie,"px"):Ie}var T=navigator.platform.toUpperCase().indexOf("MAC")>=0,re=T?"Cmd":"Ctrl",pe=["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"],je=(Se={},Object(L.a)(Se,re+"-B","bold"),Object(L.a)(Se,re+"-I","italic"),Se),yt=(Ue={},Object(L.a)(Ue,tt,"\u6DFB\u52A0\u94FE\u63A5"),Object(L.a)(Ue,at,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(L.a)(Ue,ft,"\u6DFB\u52A0\u6587\u4EF6"),Object(L.a)(Ue,it,"\u6DFB\u52A0\u8868\u683C"),Ue),kt=ge.a=function(Ie){var wt=Ie.defaultValue,pt=wt===void 0?"":wt,Xe=Ie.onChange,Ot=Ie.width,Tt=Ot===void 0?"100%":Ot,Vt=Ie.height,_t=Vt===void 0?400:Vt,St=Ie.miniToolbar,bn=St===void 0?!1:St,rn=Ie.isFocus,dt=rn===void 0?!1:rn,Vn=Ie.watch,Cn=Ie.insertTemp,pn=Ie.mode,Sn=pn===void 0?"markdown":pn,li=Ie.id,Qn=li===void 0?"markdown-editor-id":li,Nt=Ie.showResizeBar,ht=Nt===void 0?!1:Nt,jn=Ie.noStorage,ui=jn===void 0?!1:jn,kn=Ie.showNullButton,Lt=kn===void 0?!1:kn,Jn=Ie.hidetoolBar,hi=Jn===void 0?!1:Jn,vi=Ie.fullScreen,Ne=vi===void 0?!1:vi,xt=Ie.onBlur,ti=Ie.onCMBeforeChange,ci=Ie.onFullScreen,di=Ie.className,Li=di===void 0?"":di,c=Ie.disablePaste,o=c===void 0?!1:c,a=Ie.placeholder,u=a===void 0?"":a,g=Ie.values,h=g===void 0?"":g,B=Object(E.useState)(null),Te=Object(k.a)(B,2),ae=Te[0],ut=Te[1],De=Object(E.useState)(pt),Et=Object(k.a)(De,2),Pt=Et[0],zt=Et[1],Wn=Object(E.useState)(Vn),zn=Object(k.a)(Wn,2),ln=zn[0],Kn=zn[1],Qi=Object(E.useState)(Ne),Mn=Object(k.a)(Qi,2),Tn=Mn[0],ni=Mn[1],yi=Object(E.useState)(""),Xn=Object(k.a)(yi,2),ii=Xn[0],Fn=Xn[1],fr=Object(E.useState)(0),Ji=Object(k.a)(fr,2),Pn=Ji[0],Nn=Ji[1],Ii=Object(E.useState)(_t),Oi=Object(k.a)(Ii,2),Pi=Oi[0],$t=Oi[1],Ut=Object(E.useState)(!1),gn=Object(k.a)(Ut,2),jt=gn[0],mn=gn[1],Jt=Object(E.useRef)(Object(rt.a)()),bi=Object(E.useRef)(!1),on=Object(E.useRef)(),an=Object(E.useRef)(),ri=Object(E.useRef)(),Ci=Object(E.useRef)(),xi=Object(E.useRef)(),jr=function(){var ct=Object(J.a)(U.a.mark(function At(){var bt,Rt;return U.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,Object(lt.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Jt.current}});case 2:Rt=Ft.sent,Rt!=null&&(bt=Rt.attachments)!==null&&bt!==void 0&&bt.length&&(console.log("cm:",ae,an),Rt.attachments.map(function(It){It.content_type.indexOf("image")>-1?ae.replaceSelection("![,](/api/attachments/".concat(It.id,"?type=").concat(It.content_type,")")):It.content_type.indexOf("video")>-1?ae.replaceSelection('<video width="100%" controls src="'.concat(R.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):It.content_type.indexOf("pdf")>-1?ae.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(It.id,"?type=").concat(It.content_type,'&disposition=inline" target="_blank">').concat(It.name,"</a>")):ae.replaceSelection("[".concat(It.name,"](").concat(R.a.API_SERVER,"/api/attachments/").concat(It.id,"?type=").concat(It.content_type,")"))}));case 4:case"end":return Ft.stop()}},At)}));return function(){return ct.apply(this,arguments)}}();Object(E.useEffect)(function(){zt(h),ae==null||ae.setValue(h)},[h]),Object(E.useEffect)(function(){ci==null||ci(Tn)},[Tn]),Object(E.useEffect)(function(){if(an.current){var ct=W.a.fromTextArea(an.current,{mode:Sn,lineNumbers:!bn,lineWrapping:!0,value:pt,autoCloseTags:!0,autoCloseBrackets:!0});dt&&ct.focus();function At(bt,Rt){if(o){Rt.preventDefault();return}var Bt=Rt.clipboardData;if(Bt){var Ft=Bt.types.toString(),It=Bt.items;if(Ft==="Files"||Bt.types.indexOf("Files")>-1){if(Rt.preventDefault(),Sn=="stex")return;try{var Xt,un=It[1];((Xt=It[0])===null||Xt===void 0?void 0:Xt.kind)==="file"&&(un=It[0]);var Dt=un.getAsFile(),Ni=Dt.name.split(".").pop();Me(Dt,function(Ht){if(Ht.id){var vn,Qt,Yn;(Dt==null||((vn=Dt.type)===null||vn===void 0)?void 0:vn.indexOf("image"))>-1?ct.replaceSelection("![,](/api/attachments/".concat(Ht.id,"?type=").concat(Ht.content_type,")")):(Dt==null||((Qt=Dt.type)===null||Qt===void 0)?void 0:Qt.indexOf("video"))>-1?ct.replaceSelection('<video width="100%" controls src="'.concat(R.a.API_SERVER,"/api/attachments/").concat(Ht.id,'"></video>')):(Dt==null||((Yn=Dt.type)===null||Yn===void 0)?void 0:Yn.indexOf("pdf"))>-1?ct.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(Ht.id,"?type=").concat(Dt.type,'&disposition=inline" target="_blank">').concat(Dt.name,"</a>")):pe.includes(Ni)?ct.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(Ht.id,'?type=office&disposition=inline" target="_blank">').concat(Dt.name,"</a>")):ct.replaceSelection("[".concat(Dt.name,"](").concat(R.a.API_SERVER,"/api/attachments/").concat(Ht.id,"?type=").concat(Ht.content_type,")"))}else(Ht==null?void 0:Ht.status)===401&&(document.location.href="/user/login")})}catch(Ht){oe.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return ct.on("paste",At),ct.on("dragleave",function(bt,Rt){ri.current.classList.remove("mouse-hover-md")}),ct.on("dragover",function(bt,Rt){ri.current.classList.add("mouse-hover-md")}),ct.on("drop",function(bt,Rt){ri.current.classList.add("mouse-hover-md");var Bt;if(Bt=Rt.dataTransfer.files,Bt.length>0){Rt.preventDefault(),Rt.stopPropagation();for(var Ft=function(un){var Dt=Bt[un],Ni=Dt.name.split(".").pop();Me(Dt,function(Ht){if(Ht.id){var vn,Qt,Yn;(Dt==null||((vn=Dt.type)===null||vn===void 0)?void 0:vn.indexOf("image"))>-1?ct.replaceSelection("![,](/api/attachments/".concat(Ht.id,"?type=").concat(Ht.content_type,")")):(Dt==null||((Qt=Dt.type)===null||Qt===void 0)?void 0:Qt.indexOf("video"))>-1?ct.replaceSelection('<video width="100%" controls src="'.concat(R.a.API_SERVER,"/api/attachments/").concat(Ht.id,'"></video>')):(Dt==null||((Yn=Dt.type)===null||Yn===void 0)?void 0:Yn.indexOf("pdf"))>-1?ct.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(Ht.id,"?type=").concat(Dt.type,'&disposition=inline" target="_blank">').concat(Dt.name,"</a>")):pe.includes(Ni)?ct.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(Ht.id,'?type=office&disposition=inline" target="_blank">').concat(Dt.name,"</a>")):ct.replaceSelection("[".concat(Dt.name,"](").concat(R.a.API_SERVER,"/api/attachments/").concat(Ht.id,"?type=").concat(Ht.content_type,")"))}else(Ht==null?void 0:Ht.status)===401&&(document.location.href="/user/login")})},It=0;It<Bt.length;It++)Ft(It)}}),ut(ct),function(){ct.off("paste",At)}}},[]);var Zn=Object(E.useCallback)(function(){if(ri.current)try{}catch(ct){console.log(ct,"---- to set md editor body height")}},[Pi,ri,Tn]);Object(E.useEffect)(function(){function ct(){var bt=new P.default(function(Rt){var Bt=Object(X.a)(Rt),Ft;try{for(Bt.s();!(Ft=Bt.n()).done;){var It=Ft.value;(It.target.offsetHeight>0||It.target.offsetWidth>0)&&(Zn(),ae.setSize("100%","100%"),ae.refresh())}}catch(Xt){Bt.e(Xt)}finally{Bt.f()}});return bt.observe(an.current.parentElement),bt}if(ae){var At=ct();return function(){At.unobserve(an.current.parentElement)}}},[ae,Zn]),Object(E.useEffect)(function(){if(ae){for(var ct=[],At=function(){var It=Rt[bt];Bt=Object(k.a)(It,2);var Xt=Bt[0],un=Bt[1],Dt=Object(L.a)({},Xt,function(){Ki(un)});ct.push(Dt),ae.addKeyMap(Dt)},bt=0,Rt=Object.entries(je);bt<Rt.length;bt++){var Bt;At()}return on.current=setInterval(function(){bi.current&&jr()},4e3),function(){clearInterval(on.current);var Ft=Object(X.a)(ct),It;try{for(Ft.s();!(It=Ft.n()).done;){var Xt=It.value;ae.removeKeyMap(Xt)}}catch(un){Ft.e(un)}finally{Ft.f()}}}},[ae]),Object(E.useEffect)(function(){Ne!==Tn&&ni(Ne)},[Ne]),Object(nt.a)(function(){if(!ui&&Pn>0){var ct=new Date().getTime(),At=window.sessionStorage.getItem(Qn);ct>=Pn+H&&(!At||At!==Pt)&&(window.sessionStorage.setItem(Qn,Pt),mn(!0))}},H),Object(E.useEffect)(function(){Kn(Vn)},[ae,Vn]),Object(E.useEffect)(function(){ae&&(dt&&ae.focus())},[ae,dt]),Object(E.useEffect)(function(){if(ln&&ae){var ct=ae.getScrollerElement();function At(bt){var Rt=bt.target;if(xi.current){var Bt=Rt.scrollTop/Rt.scrollHeight;xi.current.scrollTop=xi.current.scrollHeight*Bt}}return ct.addEventListener("scroll",At),function(){ct.removeEventListener("scroll",At)}}},[ae,ln]),Object(E.useEffect)(function(){if(ae&&ti){function ct(At,bt){ti(At,bt)}return ae.on("beforeChange",ct),function(){ae.off("beforeChange",ct)}}},[ae,ti]),Object(E.useEffect)(function(){if(ae&&xt){function ct(){xt(ae.getValue())}return ae.on("blur",ct),function(){ae.off("blur",ct)}}},[ae,xt]),Object(E.useEffect)(function(){if(ae){function ct(At){var bt=At.getValue();zt(bt),Nn(new Date().getTime()),At.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Xe&&Xe(bt)}return ae.on("change",ct),function(){ae.off("change",ct)}}},[ae,Xe]),Object(E.useEffect)(function(){ae&&(pt==null?(ae.setValue(""),zt("")):pt!==ae.getValue()&&(ae.setValue(pt),zt(pt),ae.setCursor(ae.lineCount(),0)))},[ae,pt]);var Ki=Object(E.useCallback)(function(ct){var At=ae.getCursor(),bt=ae.getSelection(),Rt=bt.split(`
`);switch(ct){case"bold":return ae.replaceSelection("**"+bt+"**"),bt===""&&ae.setCursor(At.line,At.ch+2),ae.focus();case"italic":return ae.replaceSelection("*"+bt+"*"),bt===""&&ae.setCursor(At.line,At.ch+1),ae.focus();case"code":return ae.replaceSelection("`"+bt+"`"),bt===""&&ae.setCursor(At.line,At.ch+1),ae.focus();case"inline-latex":return ae.replaceSelection("`$$"+bt+"$$`"),bt===""&&ae.setCursor(At.line,At.ch+3),ae.focus();case"latex":return ae.replaceSelection("```latex\n"+bt+"\n```"),ae.setCursor(At.line+1,bt.length+1),ae.focus();case"line-break":return ae.replaceSelection(`<br/>
`),ae.focus();case"list-ul":return bt===""?ae.replaceSelection("- "+bt):ae.replaceSelection(Rt.map(function(Bt){return Bt===""?"":"- ".concat(Bt)}).join(`
`)),ae.focus();case"list-ol":return bt===""?ae.replaceSelection("1. "+bt):ae.replaceSelection(Rt.map(function(Bt,Ft){return Bt===""?"":"".concat(Ft+1,". ").concat(Bt)}).join(`
`)),ae.focus();case"add-null-ch":return bt===""&&ae.setCursor(At.line,At.ch+1),ae.replaceSelection(y),ae.focus();case"inster-template-1":return bt===""&&ae.setCursor(At.line,At.ch),ae.replaceSelection(C),ae.focus();case"eraser":return ae.setValue(""),ae.focus();case"trigger-watch":return Kn(!ln),ae.focus();case"trigger-full-screen":return ni(!Tn),ae.focus();case tt:Fn(tt);return;case at:Fn(at);return;case ft:Fn(ft);return;case it:Fn(it);return;default:throw new Error}},[ae,ln,Tn]),Bn=Object(E.useCallback)(function(ct){Fn("");switch(ii){case tt:var At=ct.title,bt=ct.link;return ae.replaceSelection("[".concat(At,"](").concat(bt,")")),ae.focus();case at:var Rt=ct.language,Bt=ct.content;return ae.replaceSelection(["```"+Rt,Bt,"```"].join(`
`)),ae.focus();case ft:var Ft=ct.src,It=ct.alt,Xt=ct.name;return Ft.indexOf("type=image")>-1?ae.replaceSelection("![ ".concat(It||""," ]( ").concat(Ft,' "').concat(It||"",'" )')):Ft.indexOf("type=application/pdf")>-1?ae.replaceSelection('<a href="'.concat(Ft,'&disposition=inline" target="_blank">').concat(Xt,"</a>")):ae.replaceSelection('<a href="'.concat(Ft,'" target="_blank">').concat(Xt,"</a>")),ae.focus();case it:for(var un=ct.row,Dt=ct.col,Ni=ct.align,Ht=`
`,vn=0;vn<un;vn++){for(var Qt=[],Yn=[],pr=0;pr<Dt;pr++)vn===1&&Yn.push(gt[Ni]),Qt.push(" ");vn===1&&(Ht+="| ".concat(Yn.join(" | "),` |
`)),Ht+="| ".concat(Qt.join(Dt===1?"":" | "),` |
`)}return ae.replaceSelection(Ht+`
`),ae.focus();default:throw new Error}},[ae,ii]),Yi=Object(E.useMemo)(function(){switch(ii){case tt:return w.a.createElement(be,{callback:Bn,onCancel:fi});case at:return w.a.createElement(Ce.b,{callback:Bn,onCancel:fi});case ft:return w.a.createElement(qe,{callback:Bn,onCancel:fi});case it:return w.a.createElement(vt,{callback:Bn,onCancel:fi});default:return null}},[ii]);function fi(){Fn("")}Object(E.useEffect)(function(){if(Ci.current){var ct=Ci.current,At=!1,bt=0;function Rt(It){At=!0,bt=It.pageY}function Bt(){At=!1}function Ft(It){if(At){var Xt=It.pageY-bt;Xt<0&&(Xt=0),Xt>300&&(Xt=300);var un=_t+Xt+"px";$t(un)}}return ct.addEventListener("mousedown",Rt),document.addEventListener("mousemove",Ft),document.addEventListener("mouseup",Bt),function(){ct.removeEventListener("mousedown",Rt),document.removeEventListener("mousemove",Ft),document.removeEventListener("mouseup",Bt)}}},[ae,Ci]),Object(E.useEffect)(function(){$t(_t)},[_t]);var Ei=A(Tt),uo=A(Pi),ho={width:Ei,height:uo},Zo=Object(E.useMemo)(function(){if(Pn){var ct=new Date(Pn),At=ct.getHours(),bt=ct.getMinutes(),Rt=ct.getSeconds();return At=At<10?"0"+At:At,bt=bt<10?"0"+bt:bt,Rt=Rt<10?"0"+Rt:Rt,"".concat(At,":").concat(bt,":").concat(Rt)}return 0},[Pn]);function qo(){window.sessionStorage.removeItem(Qn),mn(!1),Nn(0)}function co(){mn(!1),Nn(0),ae.setValue(window.sessionStorage.getItem(Qn))}function Wr(ct,At){var bt=ae.getValue();bt=bt.replace(ct,At),zt(bt),ae==null||ae.setValue(bt)}return w.a.createElement(E.Fragment,null,w.a.createElement("div",{className:"markdown-editor-wrapper",ref:ri},w.a.createElement("div",{className:"markdown-editor-container ".concat(Li," ").concat(ln?"on-preview":""," ").concat(bn?"mini":""," ").concat(Tn?"full-screen":""),style:ho},w.a.createElement(ce,{insertTemp:Cn,watch:ln,fullScreen:Tn,showNullButton:Lt,onActionCallback:Ki,hidetoolBar:hi,uuid:Jt.current,setOpenPhones:function(){bi.current=!0}}),w.a.createElement("div",{className:"markdown-editor-body"},w.a.createElement("div",{className:"codemirror-container"},w.a.createElement("textarea",{ref:an,placeholder:u})),ln?w.a.createElement("div",{ref:xi,className:"preview-container"},Sn==="stex"&&w.a.createElement(Be,{value:Pt}),Sn!=="stex"&&w.a.createElement(le.a,{edit:!0,value:Pt,replaces:Wr})):null))),ht?w.a.createElement("a",{ref:Ci,className:"editor-resize"}):null,w.a.createElement(x.a,null,yt[ii]?w.a.createElement(de.a,{centered:!0,title:yt[ii],visible:!0,onCancel:fi,footer:null},Yi):null))}},RMFE:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7E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QsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},SJMd:function(ye,ge){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var p,O,de,X=!1,se,oe;window.PR_SHOULD_USE_CONTINUATION=!0;var J,k;(function(){var L=window,M=["break,continue,do,else,for,if,return,while"],U=[M,"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"],E=[U,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],w=[E,"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"],V=[E,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],W=[E,"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"],P="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",F=[E,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],z="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",ee=[M,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],ne=[M,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],Re=[M,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],We=[w,W,V,F,z,ee,ne,Re],fe=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,le="str",Be="kwd",ue="com",me="typ",he="lit",q="pun",S="pln",te="tag",K="dec",b="src",R="atn",G="atv",I="nocode",ce="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function x(Me){for(var _e=0,Ve=!1,$e=!1,Ye=0,Oe=Me.length;Ye<Oe;++Ye){var Ge=Me[Ye];if(Ge.ignoreCase)$e=!0;else if(/[a-z]/i.test(Ge.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ve=!0,$e=!1;break}}var vt={b:8,t:9,n:10,v:11,f:12,r:13};function lt(it){var xe=it.charCodeAt(0);if(xe!==92)return xe;var gt=it.charAt(1);return xe=vt[gt],xe||("0"<=gt&&gt<="7"?parseInt(it.substring(1),8):gt==="u"||gt==="x"?parseInt(it.substring(2),16):it.charCodeAt(1))}function rt(it){if(it<32)return(it<16?"\\x0":"\\x")+it.toString(16);var xe=String.fromCharCode(it);return xe==="\\"||xe==="-"||xe==="]"||xe==="^"?"\\"+xe:xe}function tt(it){var xe=it.substring(1,it.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),gt=[],nt=xe[0]==="^",Se=["["];nt&&Se.push("^");for(var Ue=nt?1:0,Q=xe.length;Ue<Q;++Ue){var j=xe[Ue];if(/\\[bdsw]/i.test(j))Se.push(j);else{var H=lt(j),y;Ue+2<Q&&xe[Ue+1]==="-"?(y=lt(xe[Ue+2]),Ue+=2):y=H,gt.push([H,y]),y<65||H>122||(y<65||H>90||gt.push([Math.max(65,H)|32,Math.min(y,90)|32]),y<97||H>122||gt.push([Math.max(97,H)&~32,Math.min(y,122)&~32]))}}gt.sort(function(re,pe){return re[0]-pe[0]||pe[1]-re[1]});for(var C=[],A=[],Ue=0;Ue<gt.length;++Ue){var T=gt[Ue];T[0]<=A[1]+1?A[1]=Math.max(A[1],T[1]):C.push(A=T)}for(var Ue=0;Ue<C.length;++Ue){var T=C[Ue];Se.push(rt(T[0])),T[1]>T[0]&&(T[1]+1>T[0]&&Se.push("-"),Se.push(rt(T[1])))}return Se.push("]"),Se.join("")}function ft(it){for(var xe=it.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")),gt=xe.length,nt=[],Se=0,Ue=0;Se<gt;++Se){var Q=xe[Se];if(Q==="(")++Ue;else if(Q.charAt(0)==="\\"){var j=+Q.substring(1);j&&(j<=Ue?nt[j]=-1:xe[Se]=rt(j))}}for(var Se=1;Se<nt.length;++Se)nt[Se]===-1&&(nt[Se]=++_e);for(var Se=0,Ue=0;Se<gt;++Se){var Q=xe[Se];if(Q==="(")++Ue,nt[Ue]||(xe[Se]="(?:");else if(Q.charAt(0)==="\\"){var j=+Q.substring(1);j&&j<=Ue&&(xe[Se]="\\"+nt[j])}}for(var Se=0;Se<gt;++Se)xe[Se]==="^"&&xe[Se+1]!=="^"&&(xe[Se]="");if(it.ignoreCase&&Ve)for(var Se=0;Se<gt;++Se){var Q=xe[Se],H=Q.charAt(0);Q.length>=2&&H==="["?xe[Se]=tt(Q):H!=="\\"&&(xe[Se]=Q.replace(/[a-zA-Z]/g,function(A){var T=A.charCodeAt(0);return"["+String.fromCharCode(T&~32,T|32)+"]"}))}return xe.join("")}for(var at=[],Ye=0,Oe=Me.length;Ye<Oe;++Ye){var Ge=Me[Ye];if(Ge.global||Ge.multiline)throw new Error(""+Ge);at.push("(?:"+ft(Ge)+")")}return new RegExp(at.join("|"),$e?"gi":"g")}function m(Me,_e){var Ve=/(?:^|\s)nocode(?:\s|$)/,$e=[],Ye=0,Oe=[],Ge=0;function vt(lt){var rt=lt.nodeType;if(rt==1){if(Ve.test(lt.className))return;for(var tt=lt.firstChild;tt;tt=tt.nextSibling)vt(tt);var ft=lt.nodeName.toLowerCase();(ft==="br"||ft==="li")&&($e[Ge]=`
`,Oe[Ge<<1]=Ye++,Oe[Ge++<<1|1]=lt)}else if(rt==3||rt==4){var at=lt.nodeValue;at.length&&(_e?at=at.replace(/\r\n?/g,`
`):at=at.replace(/[ \t\r\n]+/g," "),$e[Ge]=at,Oe[Ge<<1]=Ye,Ye+=at.length,Oe[Ge++<<1|1]=lt)}}return vt(Me),{sourceCode:$e.join("").replace(/\n$/,""),spans:Oe}}function Y(Me,_e,Ve,$e,Ye){if(!Ve)return;var Oe={sourceNode:Me,pre:1,langExtension:null,numberLines:null,sourceCode:Ve,spans:null,basePos:_e,decorations:null};$e(Oe),Ye.push.apply(Ye,Oe.decorations)}var Ae=/\S/;function ve(Me){for(var _e=void 0,Ve=Me.firstChild;Ve;Ve=Ve.nextSibling){var $e=Ve.nodeType;_e=$e===1?_e?Me:Ve:$e===3&&Ae.test(Ve.nodeValue)?Me:_e}return _e===Me?void 0:_e}function Fe(Me,_e){var Ve={},$e;(function(){for(var Ge=Me.concat(_e),vt=[],lt={},rt=0,tt=Ge.length;rt<tt;++rt){var ft=Ge[rt],at=ft[3];if(at)for(var it=at.length;--it>=0;)Ve[at.charAt(it)]=ft;var xe=ft[1],gt=""+xe;lt.hasOwnProperty(gt)||(vt.push(xe),lt[gt]=null)}vt.push(/[\0-\uffff]/),$e=x(vt)})();var Ye=_e.length,Oe=function(Ge){for(var vt=Ge.sourceCode,lt=Ge.basePos,rt=Ge.sourceNode,tt=[lt,S],ft=0,at=vt.match($e)||[],it={},xe=0,gt=at.length;xe<gt;++xe){var nt=at[xe],Se=it[nt],Ue=void 0,Q;if(typeof Se=="string")Q=!1;else{var j=Ve[nt.charAt(0)];if(j)Ue=nt.match(j[1]),Se=j[0];else{for(var H=0;H<Ye;++H)if(j=_e[H],Ue=nt.match(j[1]),Ue){Se=j[0];break}Ue||(Se=S)}Q=Se.length>=5&&Se.substring(0,5)==="lang-",Q&&!(Ue&&typeof Ue[1]=="string")&&(Q=!1,Se=b),Q||(it[nt]=Se)}var y=ft;if(ft+=nt.length,!Q)tt.push(lt+y,Se);else{var C=Ue[1],A=nt.indexOf(C),T=A+C.length;Ue[2]&&(T=nt.length-Ue[2].length,A=T-C.length);var re=Se.substring(5);Y(rt,lt+y,nt.substring(0,A),Oe,tt),Y(rt,lt+y+A,C,_(re,C),tt),Y(rt,lt+y+T,nt.substring(T),Oe,tt)}}Ge.decorations=tt};return Oe}function He(Me){var _e=[],Ve=[];Me.tripleQuotedStrings?_e.push([le,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Me.multiLineStrings?_e.push([le,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):_e.push([le,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Me.verbatimStrings&&Ve.push([le,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $e=Me.hashComments;$e&&(Me.cStyleComments?($e>1?_e.push([ue,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):_e.push([ue,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ve.push([le,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):_e.push([ue,/^#[^\r\n]*/,null,"#"])),Me.cStyleComments&&(Ve.push([ue,/^\/\/[^\r\n]*/,null]),Ve.push([ue,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ye=Me.regexLiterals;if(Ye){var Oe=Ye>1?"":`
\r`,Ge=Oe?".":"[\\S\\s]",vt="/(?=[^/*"+Oe+"])(?:[^/\\x5B\\x5C"+Oe+"]|\\x5C"+Ge+"|\\x5B(?:[^\\x5C\\x5D"+Oe+"]|\\x5C"+Ge+")*(?:\\x5D|$))+/";Ve.push(["lang-regex",RegExp("^"+ce+"("+vt+")")])}var lt=Me.types;lt&&Ve.push([me,lt]);var rt=(""+Me.keywords).replace(/^ | $/g,"");rt.length&&Ve.push([Be,new RegExp("^(?:"+rt.replace(/[\s,]+/g,"|")+")\\b"),null]),_e.push([S,/^\s+/,null,` \r
\xA0`]);var tt="^.[^\\s\\w.$@'\"`/\\\\]*";return Me.regexLiterals&&(tt+="(?!s*/)"),Ve.push([he,/^@[a-z_$][a-z_$@0-9]*/i,null],[me,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[S,/^[a-z_$][a-z_$@0-9]*/i,null],[he,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[S,/^\\[\s\S]?/,null],[q,new RegExp(tt),null]),Fe(_e,Ve)}var ke=He({keywords:We,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function be(Me,_e,Ve){for(var $e=/(?:^|\s)nocode(?:\s|$)/,Ye=/\r\n?|\n/,Oe=Me.ownerDocument,Ge=Oe.createElement("li");Me.firstChild;)Ge.appendChild(Me.firstChild);var vt=[Ge];function lt(xe){var gt=xe.nodeType;if(gt==1&&!$e.test(xe.className))if(xe.nodeName==="br")rt(xe),xe.parentNode&&xe.parentNode.removeChild(xe);else for(var nt=xe.firstChild;nt;nt=nt.nextSibling)lt(nt);else if((gt==3||gt==4)&&Ve){var Se=xe.nodeValue,Ue=Se.match(Ye);if(Ue){var Q=Se.substring(0,Ue.index);xe.nodeValue=Q;var j=Se.substring(Ue.index+Ue[0].length);if(j){var H=xe.parentNode;H.insertBefore(Oe.createTextNode(j),xe.nextSibling)}rt(xe),Q||xe.parentNode.removeChild(xe)}}}function rt(xe){for(;!xe.nextSibling;)if(xe=xe.parentNode,!xe)return;function gt(Ue,Q){var j=Q?Ue.cloneNode(!1):Ue,H=Ue.parentNode;if(H){var y=gt(H,1),C=Ue.nextSibling;y.appendChild(j);for(var A=C;A;A=C)C=A.nextSibling,y.appendChild(A)}return j}for(var nt=gt(xe.nextSibling,0),Se;(Se=nt.parentNode)&&Se.nodeType===1;)nt=Se;vt.push(nt)}for(var tt=0;tt<vt.length;++tt)lt(vt[tt]);_e===(_e|0)&&vt[0].setAttribute("value",_e);var ft=Oe.createElement("ol");ft.className="linenums";for(var at=Math.max(0,_e-1|0)||0,tt=0,it=vt.length;tt<it;++tt)Ge=vt[tt],Ge.className="L"+(tt+at)%10,Ge.firstChild||Ge.appendChild(Oe.createTextNode("\xA0")),ft.appendChild(Ge);Me.appendChild(ft)}function Ce(Me){var _e=/\bMSIE\s(\d+)/.exec(navigator.userAgent);_e=_e&&+_e[1]<=8;var Ve=/\n/g,$e=Me.sourceCode,Ye=$e.length,Oe=0,Ge=Me.spans,vt=Ge.length,lt=0,rt=Me.decorations,tt=rt.length,ft=0;rt[tt]=Ye;var at,it;for(it=at=0;it<tt;)rt[it]!==rt[it+2]?(rt[at++]=rt[it++],rt[at++]=rt[it++]):it+=2;for(tt=at,it=at=0;it<tt;){for(var xe=rt[it],gt=rt[it+1],nt=it+2;nt+2<=tt&&rt[nt+1]===gt;)nt+=2;rt[at++]=xe,rt[at++]=gt,it=nt}tt=rt.length=at;var Se=Me.sourceNode,Ue="";Se&&(Ue=Se.style.display,Se.style.display="none");try{for(var Q=null;lt<vt;){var j=Ge[lt],H=Ge[lt+2]||Ye,y=rt[ft+2]||Ye,nt=Math.min(H,y),C=Ge[lt+1],A;if(C.nodeType!==1&&(A=$e.substring(Oe,nt))){_e&&(A=A.replace(Ve,"\r")),C.nodeValue=A;var T=C.ownerDocument,re=T.createElement("span");re.className=rt[ft+1];var pe=C.parentNode;pe.replaceChild(re,C),re.appendChild(C),Oe<H&&(Ge[lt+1]=C=T.createTextNode($e.substring(nt,H)),pe.insertBefore(C,re.nextSibling))}Oe=nt,Oe>=H&&(lt+=2),Oe>=y&&(ft+=2)}}finally{Se&&(Se.style.display=Ue)}}var we={};function Z(Me,_e){for(var Ve=_e.length;--Ve>=0;){var $e=_e[Ve];we.hasOwnProperty($e)?L.console&&console.warn("cannot override language handler %s",$e):we[$e]=Me}}function _(Me,_e){return Me&&we.hasOwnProperty(Me)||(Me=/^\s*</.test(_e)?"default-markup":"default-code"),we[Me]}Z(ke,["default-code"]),Z(Fe([],[[S,/^[^<?]+/],[K,/^<!\w[^>]*(?:>|$)/],[ue,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[q,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),Z(Fe([[S,/^[\s]+/,null,` \r
`],[G,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[te,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[R,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[q,/^[=<>\/]+/],["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"]),Z(Fe([],[[G,/^[\s\S]+/]]),["uq.val"]),Z(He({keywords:w,hashComments:!0,cStyleComments:!0,types:fe}),["c","cc","cpp","cxx","cyc","m"]),Z(He({keywords:"null,true,false"}),["json"]),Z(He({keywords:W,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:fe}),["cs"]),Z(He({keywords:V,cStyleComments:!0}),["java"]),Z(He({keywords:Re,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Z(He({keywords:ee,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Z(He({keywords:z,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Z(He({keywords:ne,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Z(He({keywords:F,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Z(He({keywords:P,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Z(Fe([],[[le,/^[\s\S]+/]]),["regex"]);function Pe(Me){var _e=Me.langExtension;try{var Ve=m(Me.sourceNode,Me.pre),$e=Ve.sourceCode;Me.sourceCode=$e,Me.spans=Ve.spans,Me.basePos=0,_(_e,$e)(Me),Ce(Me)}catch(Ye){L.console&&console.log(Ye&&Ye.stack||Ye)}}function et(Me,_e,Ve){var $e=Ve||!1,Ye=_e||null,Oe=document.createElement("div");Oe.innerHTML="<pre>"+Me+"</pre>",Oe=Oe.firstChild,$e&&be(Oe,$e,!0);var Ge={langExtension:Ye,numberLines:$e,sourceNode:Oe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Pe(Ge),Oe.innerHTML}function st(Me,_e){var Ve=_e||document.body,$e=Ve.ownerDocument||document;function Ye(j){return Ve.getElementsByTagName(j)}for(var Oe=[Ye("pre"),Ye("code"),Ye("xmp")],Ge=[],vt=0;vt<Oe.length;++vt)for(var lt=0,rt=Oe[vt].length;lt<rt;++lt)Ge.push(Oe[vt][lt]);Oe=null;var tt=Date;tt.now||(tt={now:function(){return+new Date}});var ft=0,at=/\blang(?:uage)?-([\w.]+)(?!\S)/,it=/\bprettyprint\b/,xe=/\bprettyprinted\b/,gt=/pre|xmp/i,nt=/^code$/i,Se=/^(?:pre|code|xmp)$/i,Ue={};function Q(){for(var j=L.PR_SHOULD_USE_CONTINUATION?tt.now()+250:Infinity;ft<Ge.length&&tt.now()<j;ft++){for(var H=Ge[ft],y=Ue,C=H;C=C.previousSibling;){var A=C.nodeType,T=(A===7||A===8)&&C.nodeValue;if(T?!/^\??prettify\b/.test(T):A!==3||/\S/.test(C.nodeValue))break;if(T){y={},T.replace(/\b(\w+)=([\w:.%+-]+)/g,function(_t,St,bn){y[St]=bn});break}}var re=H.className;if((y!==Ue||it.test(re))&&!xe.test(re)){for(var pe=!1,je=H.parentNode;je;je=je.parentNode){var yt=je.tagName;if(Se.test(yt)&&je.className&&it.test(je.className)){pe=!0;break}}if(!pe){H.className+=" prettyprinted";var kt=y.lang;if(!kt){kt=re.match(at);var Ie;!kt&&(Ie=ve(H))&&nt.test(Ie.tagName)&&(kt=Ie.className.match(at)),kt&&(kt=kt[1])}var wt;if(gt.test(H.tagName))wt=1;else{var pt=H.currentStyle,Xe=$e.defaultView,Ot=pt?pt.whiteSpace:Xe&&Xe.getComputedStyle?Xe.getComputedStyle(H,null).getPropertyValue("white-space"):0;wt=Ot&&Ot.substring(0,3)==="pre"}var Tt=y.linenums;(Tt=Tt==="true"||+Tt)||(Tt=re.match(/\blinenums\b(?::(\d+))?/),Tt=Tt?Tt[1]&&Tt[1].length?+Tt[1]:!0:!1),Tt&&be(H,Tt,wt);var Vt={langExtension:kt,sourceNode:H,numberLines:Tt,pre:wt,sourceCode:null,basePos:null,spans:null,decorations:null};Pe(Vt)}}}ft<Ge.length?L.setTimeout(Q,250):typeof Me=="function"&&Me()}Q()}var qe=L.PR={createSimpleLexer:Fe,registerLangHandler:Z,sourceDecorator:He,PR_ATTRIB_NAME:R,PR_ATTRIB_VALUE:G,PR_COMMENT:ue,PR_DECLARATION:K,PR_KEYWORD:Be,PR_LITERAL:he,PR_NOCODE:I,PR_PLAIN:S,PR_PUNCTUATION:q,PR_SOURCE:b,PR_STRING:le,PR_TAG:te,PR_TYPE:me,prettyPrintOne:X?L.prettyPrintOne=et:J=et,prettyPrint:k=X?L.prettyPrint=st:k=st},Ke=L.define;typeof Ke=="function"&&Ke.amd&&Ke("google-code-prettify",[],function(){return qe})})()},SMhR:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0m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CsiNttkAudE2TwKyaZtN22yAbNrmBpAbbbMBsgGyaZu3nEiSpHEiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},TGq3:function(ye,ge,p){ye.exports=p.p+"static/lockclose.365036e8.svg"},"VrN/":function(ye,ge,p){(function(O,de){ye.exports=de()})(this,function(){"use strict";var O=navigator.userAgent,de=navigator.platform,X=/gecko\/\d/i.test(O),se=/MSIE \d/.test(O),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(O),J=/Edge\/(\d+)/.exec(O),k=se||oe||J,L=k&&(se?document.documentMode||6:+(J||oe)[1]),M=!J&&/WebKit\//.test(O),U=M&&/Qt\/\d+\.\d+/.test(O),E=!J&&/Chrome\//.test(O),w=/Opera\//.test(O),V=/Apple Computer/.test(navigator.vendor),W=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(O),P=/PhantomJS/.test(O),F=!J&&/AppleWebKit/.test(O)&&/Mobile\/\w+/.test(O),z=/Android/.test(O),ee=F||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(O),ne=F||/Mac/.test(de),Re=/\bCrOS\b/.test(O),We=/win/i.test(de),fe=w&&O.match(/Version\/(\d*\.\d*)/);fe&&(fe=Number(fe[1])),fe&&fe>=15&&(w=!1,M=!0);var le=ne&&(U||w&&(fe==null||fe<12.11)),Be=X||k&&L>=9;function ue(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var me=function(e,t){var i=e.className,n=ue(t).exec(i);if(n){var r=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function he(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function q(e,t){return he(e).appendChild(t)}function S(e,t,i,n){var r=document.createElement(e);if(i&&(r.className=i),n&&(r.style.cssText=n),typeof t=="string")r.appendChild(document.createTextNode(t));else if(t)for(var s=0;s<t.length;++s)r.appendChild(t[s]);return r}function te(e,t,i,n){var r=S(e,t,i,n);return r.setAttribute("role","presentation"),r}var K;document.createRange?K=function(e,t,i,n){var r=document.createRange();return r.setEnd(n||e,i),r.setStart(e,t),r}:K=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(r){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function b(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function R(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function G(e,t){var i=e.className;ue(t).test(i)||(e.className+=(i?" ":"")+t)}function I(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!ue(i[n]).test(t)&&(t+=" "+i[n]);return t}var ce=function(e){e.select()};F?ce=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:k&&(ce=function(e){try{e.select()}catch(t){}});function x(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function m(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function Y(e,t,i,n,r){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=n||0,l=r||0;;){var d=e.indexOf(" ",s);if(d<0||d>=t)return l+(t-s);l+=d-s,l+=i-l%i,s=d+1}}var Ae=function(){this.id=null,this.f=null,this.time=0,this.handler=x(this.onTimeout,this)};Ae.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ae.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function ve(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var Fe=50,He={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},be={origin:"*mouse"},Ce={origin:"+move"};function we(e,t,i){for(var n=0,r=0;;){var s=e.indexOf(" ",n);s==-1&&(s=e.length);var l=s-n;if(s==e.length||r+l>=t)return n+Math.min(l,t-r);if(r+=s-n,r+=i-r%i,n=s+1,r>=t)return n}}var Z=[""];function _(e){for(;Z.length<=e;)Z.push(Pe(Z)+" ");return Z[e]}function Pe(e){return e[e.length-1]}function et(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function st(e,t,i){for(var n=0,r=i(t);n<e.length&&i(e[n])<=r;)n++;e.splice(n,0,t)}function qe(){}function Ke(e,t){var i;return Object.create?i=Object.create(e):(qe.prototype=e,i=new qe),t&&m(t,i),i}var Me=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function _e(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Me.test(e))}function Ve(e,t){return t?t.source.indexOf("\\w")>-1&&_e(e)?!0:t.test(e):_e(e)}function $e(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ye=/[\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 Oe(e){return e.charCodeAt(0)>=768&&Ye.test(e)}function Ge(e,t,i){for(;(i<0?t>0:t<e.length)&&Oe(e.charAt(t));)t+=i;return t}function vt(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var r=(t+i)/2,s=n<0?Math.ceil(r):Math.floor(r);if(s==t)return e(s)?t:i;e(s)?i=s:t=s+n}}function lt(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var r=!1,s=0;s<e.length;++s){var l=e[s];(l.from<i&&l.to>t||t==i&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",s),r=!0)}r||n(t,i,"ltr")}var rt=null;function tt(e,t,i){var n;rt=null;for(var r=0;r<e.length;++r){var s=e[r];if(s.from<t&&s.to>t)return r;s.to==t&&(s.from!=s.to&&i=="before"?n=r:rt=r),s.from==t&&(s.from!=s.to&&i!="before"?n=r:rt=r)}return n!=null?n:rt}var ft=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(v){return v<=247?e.charAt(v):1424<=v&&v<=1524?"R":1536<=v&&v<=1785?t.charAt(v-1536):1774<=v&&v<=2220?"r":8192<=v&&v<=8203?"w":v==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,s=/[LRr]/,l=/[Lb1n]/,d=/[1n]/;function f(v,D,N){this.level=v,this.from=D,this.to=N}return function(v,D){var N=D=="ltr"?"L":"R";if(v.length==0||D=="ltr"&&!n.test(v))return!1;for(var ie=v.length,$=[],Ee=0;Ee<ie;++Ee)$.push(i(v.charCodeAt(Ee)));for(var Le=0,ze=N;Le<ie;++Le){var Qe=$[Le];Qe=="m"?$[Le]=ze:ze=Qe}for(var Ze=0,Je=N;Ze<ie;++Ze){var ot=$[Ze];ot=="1"&&Je=="r"?$[Ze]="n":s.test(ot)&&(Je=ot,ot=="r"&&($[Ze]="R"))}for(var Ct=1,mt=$[0];Ct<ie-1;++Ct){var Mt=$[Ct];Mt=="+"&&mt=="1"&&$[Ct+1]=="1"?$[Ct]="1":Mt==","&&mt==$[Ct+1]&&(mt=="1"||mt=="n")&&($[Ct]=mt),mt=Mt}for(var Kt=0;Kt<ie;++Kt){var dn=$[Kt];if(dn==",")$[Kt]="N";else if(dn=="%"){var Zt=void 0;for(Zt=Kt+1;Zt<ie&&$[Zt]=="%";++Zt);for(var Un=Kt&&$[Kt-1]=="!"||Zt<ie&&$[Zt]=="1"?"1":"N",Ln=Kt;Ln<Zt;++Ln)$[Ln]=Un;Kt=Zt-1}}for(var tn=0,In=N;tn<ie;++tn){var yn=$[tn];In=="L"&&yn=="1"?$[tn]="L":s.test(yn)&&(In=yn)}for(var sn=0;sn<ie;++sn)if(r.test($[sn])){var nn=void 0;for(nn=sn+1;nn<ie&&r.test($[nn]);++nn);for(var qt=(sn?$[sn-1]:N)=="L",On=(nn<ie?$[nn]:N)=="L",cr=qt==On?qt?"L":"R":N,Di=sn;Di<nn;++Di)$[Di]=cr;sn=nn-1}for(var En=[],si,fn=0;fn<ie;)if(l.test($[fn])){var Yo=fn;for(++fn;fn<ie&&l.test($[fn]);++fn);En.push(new f(0,Yo,fn))}else{var mi=fn,Gi=En.length,Vi=D=="rtl"?1:0;for(++fn;fn<ie&&$[fn]!="L";++fn);for(var An=mi;An<fn;)if(d.test($[An])){mi<An&&(En.splice(Gi,0,new f(1,mi,An)),Gi+=Vi);var dr=An;for(++An;An<fn&&d.test($[An]);++An);En.splice(Gi,0,new f(2,dr,An)),Gi+=Vi,mi=An}else++An;mi<fn&&En.splice(Gi,0,new f(1,mi,fn))}return D=="ltr"&&(En[0].level==1&&(si=v.match(/^\s+/))&&(En[0].from=si[0].length,En.unshift(new f(0,0,si[0].length))),Pe(En).level==1&&(si=v.match(/\s+$/))&&(Pe(En).to-=si[0].length,En.push(new f(0,ie-si[0].length,ie)))),D=="rtl"?En.reverse():En}}();function at(e,t){var i=e.order;return i==null&&(i=e.order=ft(e.text,t)),i}var it=[],xe=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||it).concat(i)}};function gt(e,t){return e._handlers&&e._handlers[t]||it}function nt(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,r=n&&n[t];if(r){var s=ve(r,i);s>-1&&(n[t]=r.slice(0,s).concat(r.slice(s+1)))}}}function Se(e,t){var i=gt(e,t);if(!i.length)return;for(var n=Array.prototype.slice.call(arguments,2),r=0;r<i.length;++r)i[r].apply(null,n)}function Ue(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Se(e,i||t.type,e,t),A(t)||t.codemirrorIgnore}function Q(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)ve(i,t[n])==-1&&i.push(t[n])}function j(e,t){return gt(e,t).length>0}function H(e){e.prototype.on=function(t,i){xe(this,t,i)},e.prototype.off=function(t,i){nt(this,t,i)}}function y(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function C(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function A(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function T(e){y(e),C(e)}function re(e){return e.target||e.srcElement}function pe(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ne&&e.ctrlKey&&t==1&&(t=3),t}var je=function(){if(k&&L<9)return!1;var e=S("div");return"draggable"in e||"dragDrop"in e}(),yt;function kt(e){if(yt==null){var t=S("span","\u200B");q(e,S("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(yt=t.offsetWidth<=1&&t.offsetHeight>2&&!(k&&L<8))}var i=yt?S("span","\u200B"):S("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var Ie;function wt(e){if(Ie!=null)return Ie;var t=q(e,document.createTextNode("A\u062EA")),i=K(t,0,1).getBoundingClientRect(),n=K(t,1,2).getBoundingClientRect();return he(e),!i||i.left==i.right?!1:Ie=n.right-i.right<3}var pt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var r=e.indexOf(`
`,t);r==-1&&(r=e.length);var s=e.slice(t,e.charAt(r-1)=="\r"?r-1:r),l=s.indexOf("\r");l!=-1?(i.push(s.slice(0,l)),t+=l+1):(i.push(s),t=r+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Xe=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(i){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ot=function(){var e=S("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Tt=null;function Vt(e){if(Tt!=null)return Tt;var t=q(e,S("span","x")),i=t.getBoundingClientRect(),n=K(t,0,1).getBoundingClientRect();return Tt=Math.abs(i.left-n.left)>1}var _t={},St={};function bn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),_t[e]=t}function rn(e,t){St[e]=t}function dt(e){if(typeof e=="string"&&St.hasOwnProperty(e))e=St[e];else if(e&&typeof e.name=="string"&&St.hasOwnProperty(e.name)){var t=St[e.name];typeof t=="string"&&(t={name:t}),e=Ke(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return dt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return dt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Vn(e,t){t=dt(t);var i=_t[t.name];if(!i)return Vn(e,"text/plain");var n=i(e,t);if(Cn.hasOwnProperty(t.name)){var r=Cn[t.name];for(var s in r){if(!r.hasOwnProperty(s))continue;n.hasOwnProperty(s)&&(n["_"+s]=n[s]),n[s]=r[s]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Cn={};function pn(e,t){var i=Cn.hasOwnProperty(e)?Cn[e]:Cn[e]={};m(t,i)}function Sn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var r=t[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function li(e,t){for(var i;e.innerMode&&!(i=e.innerMode(t),!i||i.mode==e);)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Qn(e,t,i){return e.startState?e.startState(t,i):!0}var Nt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};Nt.prototype.eol=function(){return this.pos>=this.string.length},Nt.prototype.sol=function(){return this.pos==this.lineStart},Nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Nt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Nt.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},Nt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Nt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Nt.prototype.skipToEnd=function(){this.pos=this.string.length},Nt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Nt.prototype.backUp=function(e){this.pos-=e},Nt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Y(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Y(this.string,this.lineStart,this.tabSize):0)},Nt.prototype.indentation=function(){return Y(this.string,null,this.tabSize)-(this.lineStart?Y(this.string,this.lineStart,this.tabSize):0)},Nt.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(l){return i?l.toLowerCase():l},r=this.string.substr(this.pos,e.length);if(n(r)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},Nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Nt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Nt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Nt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ht(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 i=e;!i.lines;)for(var n=0;;++n){var r=i.children[n],s=r.chunkSize();if(t<s){i=r;break}t-=s}return i.lines[t]}function jn(e,t,i){var n=[],r=t.line;return e.iter(t.line,i.line+1,function(s){var l=s.text;r==i.line&&(l=l.slice(0,i.ch)),r==t.line&&(l=l.slice(t.ch)),n.push(l),++r}),n}function ui(e,t,i){var n=[];return e.iter(t,i,function(r){n.push(r.text)}),n}function kn(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function Lt(e){if(e.parent==null)return null;for(var t=e.parent,i=ve(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var r=0;!(n.children[r]==t);++r)i+=n.children[r].chunkSize();return i+t.first}function Jn(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var r=e.children[n],s=r.height;if(t<s){e=r;continue e}t-=s,i+=r.chunkSize()}return i}while(!e.lines);for(var l=0;l<e.lines.length;++l){var d=e.lines[l],f=d.height;if(t<f)break;t-=f}return i+l}function hi(e,t){return t>=e.first&&t<e.first+e.size}function vi(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ne(e,t,i){if(i===void 0&&(i=null),!(this instanceof Ne))return new Ne(e,t,i);this.line=e,this.ch=t,this.sticky=i}function xt(e,t){return e.line-t.line||e.ch-t.ch}function ti(e,t){return e.sticky==t.sticky&&xt(e,t)==0}function ci(e){return Ne(e.line,e.ch)}function di(e,t){return xt(e,t)<0?t:e}function Li(e,t){return xt(e,t)<0?e:t}function c(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function o(e,t){if(t.line<e.first)return Ne(e.first,0);var i=e.first+e.size-1;return t.line>i?Ne(i,ht(e,i).text.length):a(t,ht(e,t.line).text.length)}function a(e,t){var i=e.ch;return i==null||i>t?Ne(e.line,t):i<0?Ne(e.line,0):e}function u(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=o(e,t[n]);return i}var g=function(e,t){this.state=e,this.lookAhead=t},h=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};h.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},h.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}},h.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},h.fromSaved=function(e,t,i){return t instanceof g?new h(e,Sn(e.mode,t.state),i,t.lookAhead):new h(e,Sn(e.mode,t),i)},h.prototype.save=function(e){var t=e!==!1?Sn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new g(t,this.maxLookAhead):t};function B(e,t,i,n){var r=[e.state.modeGen],s={};zn(e,t.text,e.doc.mode,i,function(v,D){return r.push(v,D)},s,n);for(var l=i.state,d=function(v){i.baseTokens=r;var D=e.state.overlays[v],N=1,ie=0;i.state=!0,zn(e,t.text,D.mode,i,function($,Ee){for(var Le=N;ie<$;){var ze=r[N];ze>$&&r.splice(N,1,$,r[N+1],ze),N+=2,ie=Math.min($,ze)}if(!Ee)return;if(D.opaque)r.splice(Le,N-Le,$,"overlay "+Ee),N=Le+2;else for(;Le<N;Le+=2){var Qe=r[Le+1];r[Le+1]=(Qe?Qe+" ":"")+"overlay "+Ee}},s),i.state=l,i.baseTokens=null,i.baseTokenPos=1},f=0;f<e.state.overlays.length;++f)d(f);return{styles:r,classes:s.bgClass||s.textClass?s:null}}function Te(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=ae(e,Lt(t)),r=t.text.length>e.options.maxHighlightLength&&Sn(e.doc.mode,n.state),s=B(e,t,n);r&&(n.state=r),t.stateAfter=n.save(!r),t.styles=s.styles,s.classes?t.styleClasses=s.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ae(e,t,i){var n=e.doc,r=e.display;if(!n.mode.startState)return new h(n,!0,t);var s=ln(e,t,i),l=s>n.first&&ht(n,s-1).stateAfter,d=l?h.fromSaved(n,l,s):new h(n,Qn(n.mode),s);return n.iter(s,t,function(f){ut(e,f.text,d);var v=d.line;f.stateAfter=v==t-1||v%5==0||v>=r.viewFrom&&v<r.viewTo?d.save():null,d.nextLine()}),i&&(n.modeFrontier=d.line),d}function ut(e,t,i,n){var r=e.doc.mode,s=new Nt(t,e.options.tabSize,i);for(s.start=s.pos=n||0,t==""&&De(r,i.state);!s.eol();)Et(r,s,i.state),s.start=s.pos}function De(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var i=li(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}function Et(e,t,i,n){for(var r=0;r<10;r++){n&&(n[0]=li(e,i).mode);var s=e.token(t,i);if(t.pos>t.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}var Pt=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function zt(e,t,i,n){var r=e.doc,s=r.mode,l;t=o(r,t);var d=ht(r,t.line),f=ae(e,t.line,i),v=new Nt(d.text,e.options.tabSize,f),D;for(n&&(D=[]);(n||v.pos<t.ch)&&!v.eol();)v.start=v.pos,l=Et(s,v,f.state),n&&D.push(new Pt(v,l,Sn(r.mode,f.state)));return n?D:new Pt(v,l,f.state)}function Wn(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function zn(e,t,i,n,r,s,l){var d=i.flattenSpans;d==null&&(d=e.options.flattenSpans);var f=0,v=null,D=new Nt(t,e.options.tabSize,n),N,ie=e.options.addModeClass&&[null];for(t==""&&Wn(De(i,n.state),s);!D.eol();){if(D.pos>e.options.maxHighlightLength?(d=!1,l&&ut(e,t,n,D.pos),D.pos=t.length,N=null):N=Wn(Et(i,D,n.state,ie),s),ie){var $=ie[0].name;$&&(N="m-"+(N?$+" "+N:$))}if(!d||v!=N){for(;f<D.start;)f=Math.min(D.start,f+5e3),r(f,v);v=N}D.start=D.pos}for(;f<D.pos;){var Ee=Math.min(D.pos,f+5e3);r(Ee,v),f=Ee}}function ln(e,t,i){for(var n,r,s=e.doc,l=i?-1:t-(e.doc.mode.innerMode?1e3:100),d=t;d>l;--d){if(d<=s.first)return s.first;var f=ht(s,d-1),v=f.stateAfter;if(v&&(!i||d+(v instanceof g?v.lookAhead:0)<=s.modeFrontier))return d;var D=Y(f.text,null,e.options.tabSize);(r==null||n>D)&&(r=d-1,n=D)}return r}function Kn(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var i=e.first,n=t-1;n>i;n--){var r=ht(e,n).stateAfter;if(r&&(!(r instanceof g)||n+r.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}var Qi=!1,Mn=!1;function Tn(){Qi=!0}function ni(){Mn=!0}function yi(e,t,i){this.marker=e,this.from=t,this.to=i}function Xn(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function ii(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function Fn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function fr(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],l=s.marker,d=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);if(d||s.from==t&&l.type=="bookmark"&&(!i||!s.marker.insertLeft)){var f=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);(n||(n=[])).push(new yi(l,s.from,f?null:s.to))}}return n}function Ji(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],l=s.marker,d=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);if(d||s.from==t&&l.type=="bookmark"&&(!i||s.marker.insertLeft)){var f=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);(n||(n=[])).push(new yi(l,f?null:s.from-t,s.to==null?null:s.to-t))}}return n}function Pn(e,t){if(t.full)return null;var i=hi(e,t.from.line)&&ht(e,t.from.line).markedSpans,n=hi(e,t.to.line)&&ht(e,t.to.line).markedSpans;if(!i&&!n)return null;var r=t.from.ch,s=t.to.ch,l=xt(t.from,t.to)==0,d=fr(i,r,l),f=Ji(n,s,l),v=t.text.length==1,D=Pe(t.text).length+(v?r:0);if(d)for(var N=0;N<d.length;++N){var ie=d[N];if(ie.to==null){var $=Xn(f,ie.marker);$?v&&(ie.to=$.to==null?null:$.to+D):ie.to=r}}if(f)for(var Ee=0;Ee<f.length;++Ee){var Le=f[Ee];if(Le.to!=null&&(Le.to+=D),Le.from==null){var ze=Xn(d,Le.marker);ze||(Le.from=D,v&&(d||(d=[])).push(Le))}else Le.from+=D,v&&(d||(d=[])).push(Le)}d&&(d=Nn(d)),f&&f!=d&&(f=Nn(f));var Qe=[d];if(!v){var Ze=t.text.length-2,Je;if(Ze>0&&d)for(var ot=0;ot<d.length;++ot)d[ot].to==null&&(Je||(Je=[])).push(new yi(d[ot].marker,null,null));for(var Ct=0;Ct<Ze;++Ct)Qe.push(Je);Qe.push(f)}return Qe}function Nn(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ii(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function($){if($.markedSpans)for(var Ee=0;Ee<$.markedSpans.length;++Ee){var Le=$.markedSpans[Ee].marker;Le.readOnly&&(!n||ve(n,Le)==-1)&&(n||(n=[])).push(Le)}}),!n)return null;for(var r=[{from:t,to:i}],s=0;s<n.length;++s)for(var l=n[s],d=l.find(0),f=0;f<r.length;++f){var v=r[f];if(xt(v.to,d.from)<0||xt(v.from,d.to)>0)continue;var D=[f,1],N=xt(v.from,d.from),ie=xt(v.to,d.to);(N<0||!l.inclusiveLeft&&!N)&&D.push({from:v.from,to:d.from}),(ie>0||!l.inclusiveRight&&!ie)&&D.push({from:d.to,to:v.to}),r.splice.apply(r,D),f+=D.length-3}return r}function Oi(e){var t=e.markedSpans;if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}function Pi(e,t){if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}function $t(e){return e.inclusiveLeft?-1:0}function Ut(e){return e.inclusiveRight?1:0}function gn(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),r=t.find(),s=xt(n.from,r.from)||$t(e)-$t(t);if(s)return-s;var l=xt(n.to,r.to)||Ut(e)-Ut(t);return l||t.id-e.id}function jt(e,t){var i=Mn&&e.markedSpans,n;if(i)for(var r=void 0,s=0;s<i.length;++s)r=i[s],r.marker.collapsed&&(t?r.from:r.to)==null&&(!n||gn(n,r.marker)<0)&&(n=r.marker);return n}function mn(e){return jt(e,!0)}function Jt(e){return jt(e,!1)}function bi(e,t){var i=Mn&&e.markedSpans,n;if(i)for(var r=0;r<i.length;++r){var s=i[r];s.marker.collapsed&&(s.from==null||s.from<t)&&(s.to==null||s.to>t)&&(!n||gn(n,s.marker)<0)&&(n=s.marker)}return n}function on(e,t,i,n,r){var s=ht(e,t),l=Mn&&s.markedSpans;if(l)for(var d=0;d<l.length;++d){var f=l[d];if(!f.marker.collapsed)continue;var v=f.marker.find(0),D=xt(v.from,i)||$t(f.marker)-$t(r),N=xt(v.to,n)||Ut(f.marker)-Ut(r);if(D>=0&&N<=0||D<=0&&N>=0)continue;if(D<=0&&(f.marker.inclusiveRight&&r.inclusiveLeft?xt(v.to,i)>=0:xt(v.to,i)>0)||D>=0&&(f.marker.inclusiveRight&&r.inclusiveLeft?xt(v.from,n)<=0:xt(v.from,n)<0))return!0}}function an(e){for(var t;t=mn(e);)e=t.find(-1,!0).line;return e}function ri(e){for(var t;t=Jt(e);)e=t.find(1,!0).line;return e}function Ci(e){for(var t,i;t=Jt(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function xi(e,t){var i=ht(e,t),n=an(i);return i==n?t:Lt(n)}function jr(e,t){if(t>e.lastLine())return t;var i=ht(e,t),n;if(!Zn(e,i))return t;for(;n=Jt(i);)i=n.find(1,!0).line;return Lt(i)+1}function Zn(e,t){var i=Mn&&t.markedSpans;if(i)for(var n=void 0,r=0;r<i.length;++r){if(n=i[r],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&Ki(e,t,n))return!0}}function Ki(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return Ki(e,n.line,Xn(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var r=void 0,s=0;s<t.markedSpans.length;++s)if(r=t.markedSpans[s],r.marker.collapsed&&!r.marker.widgetNode&&r.from==i.to&&(r.to==null||r.to!=i.from)&&(r.marker.inclusiveLeft||i.marker.inclusiveRight)&&Ki(e,t,r))return!0}function Bn(e){e=an(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var r=i.lines[n];if(r==e)break;t+=r.height}for(var s=i.parent;s;i=s,s=i.parent)for(var l=0;l<s.children.length;++l){var d=s.children[l];if(d==i)break;t+=d.height}return t}function Yi(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=mn(n);){var r=i.find(0,!0);n=r.from.line,t+=r.from.ch-r.to.ch}for(n=e;i=Jt(n);){var s=i.find(0,!0);t-=n.text.length-s.from.ch,n=s.to.line,t+=n.text.length-s.to.ch}return t}function fi(e){var t=e.display,i=e.doc;t.maxLine=ht(i,i.first),t.maxLineLength=Yi(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var r=Yi(n);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=n)})}var Ei=function(e,t,i){this.text=e,Pi(this,t),this.height=i?i(this):1};Ei.prototype.lineNo=function(){return Lt(this)},H(Ei);function uo(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Oi(e),Pi(e,i);var r=n?n(e):1;r!=e.height&&kn(e,r)}function ho(e){e.parent=null,Oi(e)}var Zo={},qo={};function co(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?qo:Zo;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Wr(e,t){var i=te("span",null,null,M?"padding-right: .1px":null),n={pre:te("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var s=r?t.rest[r-1]:t.line,l=void 0;n.pos=0,n.addToken=At,wt(e.display.measure)&&(l=at(s,e.doc.direction))&&(n.addToken=Rt(n.addToken,l)),n.map=[];var d=t!=e.display.externalMeasured&&Lt(s);Ft(s,n,Te(e,s,d)),s.styleClasses&&(s.styleClasses.bgClass&&(n.bgClass=I(s.styleClasses.bgClass,n.bgClass||"")),s.styleClasses.textClass&&(n.textClass=I(s.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(kt(e.display.measure))),r==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(M){var f=n.content.lastChild;(/\bcm-tab\b/.test(f.className)||f.querySelector&&f.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Se(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=I(n.pre.className,n.textClass||"")),n}function ct(e){var t=S("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function At(e,t,i,n,r,s,l){if(!t)return;var d=e.splitSpaces?bt(t,e.trailingSpace):t,f=e.cm.state.specialChars,v=!1,D;if(!f.test(t))e.col+=t.length,D=document.createTextNode(d),e.map.push(e.pos,e.pos+t.length,D),k&&L<9&&(v=!0),e.pos+=t.length;else{D=document.createDocumentFragment();for(var N=0;;){f.lastIndex=N;var ie=f.exec(t),$=ie?ie.index-N:t.length-N;if($){var Ee=document.createTextNode(d.slice(N,N+$));k&&L<9?D.appendChild(S("span",[Ee])):D.appendChild(Ee),e.map.push(e.pos,e.pos+$,Ee),e.col+=$,e.pos+=$}if(!ie)break;N+=$+1;var Le=void 0;if(ie[0]==" "){var ze=e.cm.options.tabSize,Qe=ze-e.col%ze;Le=D.appendChild(S("span",_(Qe),"cm-tab")),Le.setAttribute("role","presentation"),Le.setAttribute("cm-text"," "),e.col+=Qe}else ie[0]=="\r"||ie[0]==`
`?(Le=D.appendChild(S("span",ie[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Le.setAttribute("cm-text",ie[0]),e.col+=1):(Le=e.cm.options.specialCharPlaceholder(ie[0]),Le.setAttribute("cm-text",ie[0]),k&&L<9?D.appendChild(S("span",[Le])):D.appendChild(Le),e.col+=1);e.map.push(e.pos,e.pos+1,Le),e.pos++}}if(e.trailingSpace=d.charCodeAt(t.length-1)==32,i||n||r||v||s||l){var Ze=i||"";n&&(Ze+=n),r&&(Ze+=r);var Je=S("span",[D],Ze,s);if(l)for(var ot in l)l.hasOwnProperty(ot)&&ot!="style"&&ot!="class"&&Je.setAttribute(ot,l[ot]);return e.content.appendChild(Je)}e.content.appendChild(D)}function bt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",r=0;r<e.length;r++){var s=e.charAt(r);s==" "&&i&&(r==e.length-1||e.charCodeAt(r+1)==32)&&(s="\xA0"),n+=s,i=s==" "}return n}function Rt(e,t){return function(i,n,r,s,l,d,f){r=r?r+" cm-force-border":"cm-force-border";for(var v=i.pos,D=v+n.length;;){for(var N=void 0,ie=0;ie<t.length&&!(N=t[ie],N.to>v&&N.from<=v);ie++);if(N.to>=D)return e(i,n,r,s,l,d,f);e(i,n.slice(0,N.to-v),r,s,null,d,f),s=null,n=n.slice(N.to-v),v=N.to}}}function Bt(e,t,i,n){var r=!n&&i.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!n&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function Ft(e,t,i){var n=e.markedSpans,r=e.text,s=0;if(!n){for(var l=1;l<i.length;l+=2)t.addToken(t,r.slice(s,s=i[l]),co(i[l+1],t.cm.options));return}for(var d=r.length,f=0,v=1,D="",N,ie,$=0,Ee,Le,ze,Qe,Ze;;){if($==f){Ee=Le=ze=ie="",Ze=null,Qe=null,$=Infinity;for(var Je=[],ot=void 0,Ct=0;Ct<n.length;++Ct){var mt=n[Ct],Mt=mt.marker;if(Mt.type=="bookmark"&&mt.from==f&&Mt.widgetNode)Je.push(Mt);else if(mt.from<=f&&(mt.to==null||mt.to>f||Mt.collapsed&&mt.to==f&&mt.from==f)){if(mt.to!=null&&mt.to!=f&&$>mt.to&&($=mt.to,Le=""),Mt.className&&(Ee+=" "+Mt.className),Mt.css&&(ie=(ie?ie+";":"")+Mt.css),Mt.startStyle&&mt.from==f&&(ze+=" "+Mt.startStyle),Mt.endStyle&&mt.to==$&&(ot||(ot=[])).push(Mt.endStyle,mt.to),Mt.title&&((Ze||(Ze={})).title=Mt.title),Mt.attributes)for(var Kt in Mt.attributes)(Ze||(Ze={}))[Kt]=Mt.attributes[Kt];Mt.collapsed&&(!Qe||gn(Qe.marker,Mt)<0)&&(Qe=mt)}else mt.from>f&&$>mt.from&&($=mt.from)}if(ot)for(var dn=0;dn<ot.length;dn+=2)ot[dn+1]==$&&(Le+=" "+ot[dn]);if(!Qe||Qe.from==f)for(var Zt=0;Zt<Je.length;++Zt)Bt(t,0,Je[Zt]);if(Qe&&(Qe.from||0)==f){if(Bt(t,(Qe.to==null?d+1:Qe.to)-f,Qe.marker,Qe.from==null),Qe.to==null)return;Qe.to==f&&(Qe=!1)}}if(f>=d)break;for(var Un=Math.min(d,$);;){if(D){var Ln=f+D.length;if(!Qe){var tn=Ln>Un?D.slice(0,Un-f):D;t.addToken(t,tn,N?N+Ee:Ee,ze,f+tn.length==$?Le:"",ie,Ze)}if(Ln>=Un){D=D.slice(Un-f),f=Un;break}f=Ln,ze=""}D=r.slice(s,s=i[v++]),N=co(i[v++],t.cm.options)}}}function It(e,t,i){this.line=t,this.rest=Ci(t),this.size=this.rest?Lt(Pe(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Zn(e,t)}function Xt(e,t,i){for(var n=[],r,s=t;s<i;s=r){var l=new It(e.doc,ht(e.doc,s),s);r=s+l.size,n.push(l)}return n}var un=null;function Dt(e){un?un.ops.push(e):e.ownsGroup=un={ops:[e],delayedCallbacks:[]}}function Ni(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var r=e.ops[n];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(i<t.length)}function Ht(e,t){var i=e.ownsGroup;if(!i)return;try{Ni(i)}finally{un=null,t(i)}}var vn=null;function Qt(e,t){var i=gt(e,t);if(!i.length)return;var n=Array.prototype.slice.call(arguments,2),r;un?r=un.delayedCallbacks:vn?r=vn:(r=vn=[],setTimeout(Yn,0));for(var s=function(d){r.push(function(){return i[d].apply(null,n)})},l=0;l<i.length;++l)s(l)}function Yn(){var e=vn;vn=null;for(var t=0;t<e.length;++t)e[t]()}function pr(e,t,i,n){for(var r=0;r<t.changes.length;r++){var s=t.changes[r];s=="text"?Ps(e,t):s=="gutter"?ea(e,t,i,n):s=="class"?fo(e,t):s=="widget"&&Ns(e,t,n)}t.changes=null}function gr(e){return e.node==e.text&&(e.node=S("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),k&&L<8&&(e.node.style.zIndex=2)),e.node}function Os(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=gr(t);t.background=n.insertBefore(S("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function $o(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Wr(e,t)}function Ps(e,t){var i=t.text.className,n=$o(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,fo(e,t)):i&&(t.text.className=i)}function fo(e,t){Os(e,t),t.line.wrapClass?gr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function ea(e,t,i,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=gr(t);t.gutterBackground=S("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),r.insertBefore(t.gutterBackground,t.text)}var s=t.line.gutterMarkers;if(e.options.lineNumbers||s){var l=gr(t),d=t.gutter=S("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(d),l.insertBefore(d,t.text),t.line.gutterClass&&(d.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!s||!s["CodeMirror-linenumbers"])&&(t.lineNumber=d.appendChild(S("div",vi(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),s)for(var f=0;f<e.display.gutterSpecs.length;++f){var v=e.display.gutterSpecs[f].className,D=s.hasOwnProperty(v)&&s[v];D&&d.appendChild(S("div",[D],"CodeMirror-gutter-elt","left: "+n.gutterLeft[v]+"px; width: "+n.gutterWidth[v]+"px"))}}}function Ns(e,t,i){t.alignable&&(t.alignable=null);for(var n=ue("CodeMirror-linewidget"),r=t.node.firstChild,s=void 0;r;r=s)s=r.nextSibling,n.test(r.className)&&t.node.removeChild(r);ta(e,t,i)}function Bs(e,t,i,n){var r=$o(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),fo(e,t),ea(e,t,i,n),ta(e,t,n),t.node}function ta(e,t,i){if(na(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)na(e,t.rest[n],t,i,!1)}function na(e,t,i,n,r){if(!t.widgets)return;for(var s=gr(i),l=0,d=t.widgets;l<d.length;++l){var f=d[l],v=S("div",[f.node],"CodeMirror-linewidget"+(f.className?" "+f.className:""));f.handleMouseEvents||v.setAttribute("cm-ignore-events","true"),_s(f,v,i,n),e.display.input.setUneditable(v),r&&f.above?s.insertBefore(v,i.gutter||i.text):s.appendChild(v),Qt(f,"redraw")}}function _s(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var r=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(r-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function mr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!b(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),q(t.display.measure,S("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function pi(e,t){for(var i=re(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function zr(e){return e.lineSpace.offsetTop}function po(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ia(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=q(e.measure,S("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function oi(e){return Fe-e.display.nativeBarWidth}function Bi(e){return e.display.scroller.clientWidth-oi(e)-e.display.barWidth}function go(e){return e.display.scroller.clientHeight-oi(e)-e.display.barHeight}function Us(e,t,i){var n=e.options.lineWrapping,r=n&&Bi(e);if(!t.measure.heights||n&&t.measure.width!=r){var s=t.measure.heights=[];if(n){t.measure.width=r;for(var l=t.text.firstChild.getClientRects(),d=0;d<l.length-1;d++){var f=l[d],v=l[d+1];Math.abs(f.bottom-v.bottom)>2&&s.push((f.bottom+v.top)/2-i.top)}}s.push(i.bottom-i.top)}}function ra(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var r=0;r<e.rest.length;r++)if(Lt(e.rest[r])>i)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function js(e,t){t=an(t);var i=Lt(t),n=e.display.externalMeasured=new It(e.doc,t,i);n.lineN=i;var r=n.built=Wr(e,n);return n.text=r.pre,q(e.display.lineMeasure,r.pre),n}function oa(e,t,i,n){return ai(e,Xi(e,t),i,n)}function mo(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ji(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function Xi(e,t){var i=Lt(t),n=mo(e,i);n&&!n.text?n=null:n&&n.changes&&(pr(e,n,i,Eo(e)),e.curOp.forceUpdate=!0),n||(n=js(e,t));var r=ra(n,t,i);return{line:t,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function ai(e,t,i,n,r){t.before&&(i=-1);var s=i+(n||""),l;return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Us(e,t.view,t.rect),t.hasHeights=!0),l=zs(e,t,i,n),l.bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:r?l.rtop:l.top,bottom:r?l.rbottom:l.bottom}}var aa={left:0,right:0,top:0,bottom:0};function sa(e,t,i){for(var n,r,s,l,d,f,v=0;v<e.length;v+=3)if(d=e[v],f=e[v+1],t<d?(r=0,s=1,l="left"):t<f?(r=t-d,s=r+1):(v==e.length-3||t==f&&e[v+3]>t)&&(s=f-d,r=s-1,t>=f&&(l="right")),r!=null){if(n=e[v+2],d==f&&i==(n.insertLeft?"left":"right")&&(l=i),i=="left"&&r==0)for(;v&&e[v-2]==e[v-3]&&e[v-1].insertLeft;)n=e[(v-=3)+2],l="left";if(i=="right"&&r==f-d)for(;v<e.length-3&&e[v+3]==e[v+4]&&!e[v+5].insertLeft;)n=e[(v+=3)+2],l="right";break}return{node:n,start:r,end:s,collapse:l,coverStart:d,coverEnd:f}}function Ws(e,t){var i=aa;if(t=="left")for(var n=0;n<e.length&&!((i=e[n]).left!=i.right);n++);else for(var r=e.length-1;r>=0&&!((i=e[r]).left!=i.right);r--);return i}function zs(e,t,i,n){var r=sa(t.map,i,n),s=r.node,l=r.start,d=r.end,f=r.collapse,v;if(s.nodeType==3){for(var D=0;D<4;D++){for(;l&&Oe(t.line.text.charAt(r.coverStart+l));)--l;for(;r.coverStart+d<r.coverEnd&&Oe(t.line.text.charAt(r.coverStart+d));)++d;if(k&&L<9&&l==0&&d==r.coverEnd-r.coverStart?v=s.parentNode.getBoundingClientRect():v=Ws(K(s,l,d).getClientRects(),n),v.left||v.right||l==0)break;d=l,l=l-1,f="right"}k&&L<11&&(v=Fs(e.display.measure,v))}else{l>0&&(f=n="right");var N;e.options.lineWrapping&&(N=s.getClientRects()).length>1?v=N[n=="right"?N.length-1:0]:v=s.getBoundingClientRect()}if(k&&L<9&&!l&&(!v||!v.left&&!v.right)){var ie=s.parentNode.getClientRects()[0];ie?v={left:ie.left,right:ie.left+qi(e.display),top:ie.top,bottom:ie.bottom}:v=aa}for(var $=v.top-t.rect.top,Ee=v.bottom-t.rect.top,Le=($+Ee)/2,ze=t.view.measure.heights,Qe=0;Qe<ze.length-1&&!(Le<ze[Qe]);Qe++);var Ze=Qe?ze[Qe-1]:0,Je=ze[Qe],ot={left:(f=="right"?v.right:v.left)-t.rect.left,right:(f=="left"?v.left:v.right)-t.rect.left,top:Ze,bottom:Je};return!v.left&&!v.right&&(ot.bogus=!0),e.options.singleCursorHeightPerLine||(ot.rtop=$,ot.rbottom=Ee),ot}function Fs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Vt(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function la(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ua(e){e.display.externalMeasure=null,he(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)la(e.display.view[t])}function vr(e){ua(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ha(){return E&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ca(){return E&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function vo(e){var t=0;if(e.widgets)for(var i=0;i<e.widgets.length;++i)e.widgets[i].above&&(t+=mr(e.widgets[i]));return t}function Fr(e,t,i,n,r){if(!r){var s=vo(t);i.top+=s,i.bottom+=s}if(n=="line")return i;n||(n="local");var l=Bn(t);if(n=="local"?l+=zr(e.display):l-=e.display.viewOffset,n=="page"||n=="window"){var d=e.display.lineSpace.getBoundingClientRect();l+=d.top+(n=="window"?0:ca());var f=d.left+(n=="window"?0:ha());i.left+=f,i.right+=f}return i.top+=l,i.bottom+=l,i}function da(e,t,i){if(i=="div")return t;var n=t.left,r=t.top;if(i=="page")n-=ha(),r-=ca();else if(i=="local"||!i){var s=e.display.sizer.getBoundingClientRect();n+=s.left,r+=s.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:r-l.top}}function yo(e,t,i,n,r){return n||(n=ht(e.doc,t.line)),Fr(e,n,oa(e,n,t.ch,r),i)}function qn(e,t,i,n,r,s){n=n||ht(e.doc,t.line),r||(r=Xi(e,n));function l(Ee,Le){var ze=ai(e,r,Ee,Le?"right":"left",s);return Le?ze.left=ze.right:ze.right=ze.left,Fr(e,n,ze,i)}var d=at(n,e.doc.direction),f=t.ch,v=t.sticky;if(f>=n.text.length?(f=n.text.length,v="before"):f<=0&&(f=0,v="after"),!d)return l(v=="before"?f-1:f,v=="before");function D(Ee,Le,ze){var Qe=d[Le],Ze=Qe.level==1;return l(ze?Ee-1:Ee,Ze!=ze)}var N=tt(d,f,v),ie=rt,$=D(f,N,v=="before");return ie!=null&&($.other=D(f,ie,v!="before")),$}function fa(e,t){var i=0;t=o(e.doc,t),e.options.lineWrapping||(i=qi(e.display)*t.ch);var n=ht(e.doc,t.line),r=Bn(n)+zr(e.display);return{left:i,right:i,top:r,bottom:r+n.height}}function bo(e,t,i,n,r){var s=Ne(e,t,i);return s.xRel=r,n&&(s.outside=n),s}function Co(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return bo(n.first,0,null,-1,-1);var r=Jn(n,i),s=n.first+n.size-1;if(r>s)return bo(n.first+n.size-1,ht(n,s).text.length,null,1,1);t<0&&(t=0);for(var l=ht(n,r);;){var d=Hs(e,l,r,t,i),f=bi(l,d.ch+(d.xRel>0||d.outside>0?1:0));if(!f)return d;var v=f.find(1);if(v.line==r)return v;l=ht(n,r=v.line)}}function pa(e,t,i,n){n-=vo(t);var r=t.text.length,s=vt(function(l){return ai(e,i,l-1).bottom<=n},r,0);return r=vt(function(l){return ai(e,i,l).top>n},s,r),{begin:s,end:r}}function ga(e,t,i,n){i||(i=Xi(e,t));var r=Fr(e,t,ai(e,i,n),"line").top;return pa(e,t,i,r)}function xo(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function Hs(e,t,i,n,r){r-=Bn(t);var s=Xi(e,t),l=vo(t),d=0,f=t.text.length,v=!0,D=at(t,e.doc.direction);if(D){var N=(e.options.lineWrapping?Vs:Gs)(e,t,i,s,D,n,r);v=N.level!=1,d=v?N.from:N.to-1,f=v?N.to:N.from-1}var ie=null,$=null,Ee=vt(function(Ct){var mt=ai(e,s,Ct);return mt.top+=l,mt.bottom+=l,xo(mt,n,r,!1)?(mt.top<=r&&mt.left<=n&&(ie=Ct,$=mt),!0):!1},d,f),Le,ze,Qe=!1;if($){var Ze=n-$.left<$.right-n,Je=Ze==v;Ee=ie+(Je?0:1),ze=Je?"after":"before",Le=Ze?$.left:$.right}else{!v&&(Ee==f||Ee==d)&&Ee++,ze=Ee==0?"after":Ee==t.text.length?"before":ai(e,s,Ee-(v?1:0)).bottom+l<=r==v?"after":"before";var ot=qn(e,Ne(i,Ee,ze),"line",t,s);Le=ot.left,Qe=r<ot.top?-1:r>=ot.bottom?1:0}return Ee=Ge(t.text,Ee,1),bo(i,Ee,ze,Qe,n-Le)}function Gs(e,t,i,n,r,s,l){var d=vt(function(N){var ie=r[N],$=ie.level!=1;return xo(qn(e,Ne(i,$?ie.to:ie.from,$?"before":"after"),"line",t,n),s,l,!0)},0,r.length-1),f=r[d];if(d>0){var v=f.level!=1,D=qn(e,Ne(i,v?f.from:f.to,v?"after":"before"),"line",t,n);xo(D,s,l,!0)&&D.top>l&&(f=r[d-1])}return f}function Vs(e,t,i,n,r,s,l){var d=pa(e,t,n,l),f=d.begin,v=d.end;/\s/.test(t.text.charAt(v-1))&&v--;for(var D=null,N=null,ie=0;ie<r.length;ie++){var $=r[ie];if($.from>=v||$.to<=f)continue;var Ee=$.level!=1,Le=ai(e,n,Ee?Math.min(v,$.to)-1:Math.max(f,$.from)).right,ze=Le<s?s-Le+1e9:Le-s;(!D||N>ze)&&(D=$,N=ze)}return D||(D=r[r.length-1]),D.from<f&&(D={from:f,to:D.to,level:D.level}),D.to>v&&(D={from:D.from,to:v,level:D.level}),D}var _i;function Zi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(_i==null){_i=S("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)_i.appendChild(document.createTextNode("x")),_i.appendChild(S("br"));_i.appendChild(document.createTextNode("x"))}q(e.measure,_i);var i=_i.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),he(e.measure),i||1}function qi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=S("span","xxxxxxxxxx"),i=S("pre",[t],"CodeMirror-line-like");q(e.measure,i);var n=t.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function Eo(e){for(var t=e.display,i={},n={},r=t.gutters.clientLeft,s=t.gutters.firstChild,l=0;s;s=s.nextSibling,++l){var d=e.display.gutterSpecs[l].className;i[d]=s.offsetLeft+s.clientLeft+r,n[d]=s.clientWidth}return{fixedPos:wo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function wo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ma(e){var t=Zi(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/qi(e.display)-3);return function(r){if(Zn(e.doc,r))return 0;var s=0;if(r.widgets)for(var l=0;l<r.widgets.length;l++)r.widgets[l].height&&(s+=r.widgets[l].height);return i?s+(Math.ceil(r.text.length/n)||1)*t:s+t}}function Ao(e){var t=e.doc,i=ma(e);t.iter(function(n){var r=i(n);r!=n.height&&kn(n,r)})}function Ui(e,t,i,n){var r=e.display;if(!i&&re(t).getAttribute("cm-not-content")=="true")return null;var s,l,d=r.lineSpace.getBoundingClientRect();try{s=t.clientX-d.left,l=t.clientY-d.top}catch(N){return null}var f=Co(e,s,l),v;if(n&&f.xRel>0&&(v=ht(e.doc,f.line).text).length==f.ch){var D=Y(v,v.length,e.options.tabSize)-v.length;f=Ne(f.line,Math.max(0,Math.round((s-ia(e.display).left)/qi(e.display))-D))}return f}function ji(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function Rn(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var r=e.display;if(n&&i<r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)Mn&&xi(e.doc,t)<r.viewTo&&Ai(e);else if(i<=r.viewFrom)Mn&&jr(e.doc,i+n)>r.viewFrom?Ai(e):(r.viewFrom+=n,r.viewTo+=n);else if(t<=r.viewFrom&&i>=r.viewTo)Ai(e);else if(t<=r.viewFrom){var s=Hr(e,i,i+n,1);s?(r.view=r.view.slice(s.index),r.viewFrom=s.lineN,r.viewTo+=n):Ai(e)}else if(i>=r.viewTo){var l=Hr(e,t,t,-1);l?(r.view=r.view.slice(0,l.index),r.viewTo=l.lineN):Ai(e)}else{var d=Hr(e,t,t,-1),f=Hr(e,i,i+n,1);d&&f?(r.view=r.view.slice(0,d.index).concat(Xt(e,d.lineN,f.lineN)).concat(r.view.slice(f.index)),r.viewTo+=n):Ai(e)}var v=r.externalMeasured;v&&(i<v.lineN?v.lineN+=n:t<v.lineN+v.size&&(r.externalMeasured=null))}function wi(e,t,i){e.curOp.viewChanged=!0;var n=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var s=n.view[ji(e,t)];if(s.node==null)return;var l=s.changes||(s.changes=[]);ve(l,i)==-1&&l.push(i)}function Ai(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Hr(e,t,i,n){var r=ji(e,t),s,l=e.display.view;if(!Mn||i==e.doc.first+e.doc.size)return{index:r,lineN:i};for(var d=e.display.viewFrom,f=0;f<r;f++)d+=l[f].size;if(d!=t){if(n>0){if(r==l.length-1)return null;s=d+l[r].size-t,r++}else s=d-t;t+=s,i+=s}for(;xi(e.doc,i)!=i;){if(r==(n<0?0:l.length-1))return null;i+=n*l[r-(n<0?1:0)].size,r+=n}return{index:r,lineN:i}}function Qs(e,t,i){var n=e.display,r=n.view;r.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=Xt(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=Xt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ji(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(Xt(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,ji(e,i)))),n.viewTo=i}function va(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var r=t[n];!r.hidden&&(!r.node||r.changes)&&++i}return i}function yr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function ya(e,t){t===void 0&&(t=!0);for(var i=e.doc,n={},r=n.cursors=document.createDocumentFragment(),s=n.selection=document.createDocumentFragment(),l=0;l<i.sel.ranges.length;l++){if(!t&&l==i.sel.primIndex)continue;var d=i.sel.ranges[l];if(d.from().line>=e.display.viewTo||d.to().line<e.display.viewFrom)continue;var f=d.empty();(f||e.options.showCursorWhenSelecting)&&ba(e,d.head,r),f||Js(e,d,s)}return n}function ba(e,t,i){var n=qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=i.appendChild(S("div","\xA0","CodeMirror-cursor"));if(r.style.left=n.left+"px",r.style.top=n.top+"px",r.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var s=i.appendChild(S("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Gr(e,t){return e.top-t.top||e.left-t.left}function Js(e,t,i){var n=e.display,r=e.doc,s=document.createDocumentFragment(),l=ia(e.display),d=l.left,f=Math.max(n.sizerWidth,Bi(e)-n.sizer.offsetLeft)-l.right,v=r.direction=="ltr";function D(Je,ot,Ct,mt){ot<0&&(ot=0),ot=Math.round(ot),mt=Math.round(mt),s.appendChild(S("div",null,"CodeMirror-selected","position: absolute; left: "+Je+`px;
top: `+ot+"px; width: "+(Ct==null?f-Je:Ct)+`px;
height: `+(mt-ot)+"px"))}function N(Je,ot,Ct){var mt=ht(r,Je),Mt=mt.text.length,Kt,dn;function Zt(tn,In){return yo(e,Ne(Je,tn),"div",mt,In)}function Un(tn,In,yn){var sn=ga(e,mt,null,tn),nn=In=="ltr"==(yn=="after")?"left":"right",qt=yn=="after"?sn.begin:sn.end-(/\s/.test(mt.text.charAt(sn.end-1))?2:1);return Zt(qt,nn)[nn]}var Ln=at(mt,r.direction);return lt(Ln,ot||0,Ct==null?Mt:Ct,function(tn,In,yn,sn){var nn=yn=="ltr",qt=Zt(tn,nn?"left":"right"),On=Zt(In-1,nn?"right":"left"),cr=ot==null&&tn==0,Di=Ct==null&&In==Mt,En=sn==0,si=!Ln||sn==Ln.length-1;if(On.top-qt.top<=3){var fn=(v?cr:Di)&&En,Yo=(v?Di:cr)&&si,mi=fn?d:(nn?qt:On).left,Gi=Yo?f:(nn?On:qt).right;D(mi,qt.top,Gi-mi,qt.bottom)}else{var Vi,An,dr,Xo;nn?(Vi=v&&cr&&En?d:qt.left,An=v?f:Un(tn,yn,"before"),dr=v?d:Un(In,yn,"after"),Xo=v&&Di&&si?f:On.right):(Vi=v?Un(tn,yn,"before"):d,An=!v&&cr&&En?f:qt.right,dr=!v&&Di&&si?d:On.left,Xo=v?Un(In,yn,"after"):f),D(Vi,qt.top,An-Vi,qt.bottom),qt.bottom<On.top&&D(d,qt.bottom,null,On.top),D(dr,On.top,Xo-dr,On.bottom)}(!Kt||Gr(qt,Kt)<0)&&(Kt=qt),Gr(On,Kt)<0&&(Kt=On),(!dn||Gr(qt,dn)<0)&&(dn=qt),Gr(On,dn)<0&&(dn=On)}),{start:Kt,end:dn}}var ie=t.from(),$=t.to();if(ie.line==$.line)N(ie.line,ie.ch,$.ch);else{var Ee=ht(r,ie.line),Le=ht(r,$.line),ze=an(Ee)==an(Le),Qe=N(ie.line,ie.ch,ze?Ee.text.length+1:null).end,Ze=N($.line,ze?0:null,$.ch).start;ze&&(Qe.top<Ze.top-2?(D(Qe.right,Qe.top,null,Qe.bottom),D(d,Ze.top,Ze.left,Ze.bottom)):D(Qe.right,Qe.top,Ze.left-Qe.right,Qe.bottom)),Qe.bottom<Ze.top&&D(d,Qe.bottom,null,Ze.top)}i.appendChild(s)}function So(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||$i(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Ca(e){e.state.focused||(e.display.input.focus(),ko(e))}function xa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,$i(e))},100)}function ko(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Se(e,"focus",e,t),e.state.focused=!0,G(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),M&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),So(e)}function $i(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Se(e,"blur",e,t),e.state.focused=!1,me(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Vr(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var r=t.view[n],s=e.options.lineWrapping,l=void 0,d=0;if(r.hidden)continue;if(k&&L<8){var f=r.node.offsetTop+r.node.offsetHeight;l=f-i,i=f}else{var v=r.node.getBoundingClientRect();l=v.bottom-v.top,!s&&r.text.firstChild&&(d=r.text.firstChild.getBoundingClientRect().right-v.left-1)}var D=r.line.height-l;if((D>.005||D<-.005)&&(kn(r.line,l),Ea(r.line),r.rest))for(var N=0;N<r.rest.length;N++)Ea(r.rest[N]);if(d>e.display.sizerWidth){var ie=Math.ceil(d/qi(e.display));ie>e.display.maxLineLength&&(e.display.maxLineLength=ie,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}function Ea(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Qr(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-zr(e));var r=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,s=Jn(t,n),l=Jn(t,r);if(i&&i.ensure){var d=i.ensure.from.line,f=i.ensure.to.line;d<s?(s=d,l=Jn(t,Bn(ht(t,d))+e.wrapper.clientHeight)):Math.min(f,t.lastLine())>=l&&(s=Jn(t,Bn(ht(t,f))-e.wrapper.clientHeight),l=f)}return{from:s,to:Math.max(l,s+1)}}function Ks(e,t){if(Ue(e,"scrollCursorIntoView"))return;var i=e.display,n=i.sizer.getBoundingClientRect(),r=null;if(t.top+n.top<0?r=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),r!=null&&!P){var s=S("div","\u200B",null,`position: absolute;
top: `+(t.top-i.viewOffset-zr(e.display))+`px;
height: `+(t.bottom-t.top+oi(e)+i.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(r),e.display.lineSpace.removeChild(s)}}function Ys(e,t,i,n){n==null&&(n=0);var r;!e.options.lineWrapping&&t==i&&(t=t.ch?Ne(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,i=t.sticky=="before"?Ne(t.line,t.ch+1,"before"):t);for(var s=0;s<5;s++){var l=!1,d=qn(e,t),f=!i||i==t?d:qn(e,i);r={left:Math.min(d.left,f.left),top:Math.min(d.top,f.top)-n,right:Math.max(d.left,f.left),bottom:Math.max(d.bottom,f.bottom)+n};var v=Mo(e,r),D=e.doc.scrollTop,N=e.doc.scrollLeft;if(v.scrollTop!=null&&(Cr(e,v.scrollTop),Math.abs(e.doc.scrollTop-D)>1&&(l=!0)),v.scrollLeft!=null&&(Wi(e,v.scrollLeft),Math.abs(e.doc.scrollLeft-N)>1&&(l=!0)),!l)break}return r}function Xs(e,t){var i=Mo(e,t);i.scrollTop!=null&&Cr(e,i.scrollTop),i.scrollLeft!=null&&Wi(e,i.scrollLeft)}function Mo(e,t){var i=e.display,n=Zi(e.display);t.top<0&&(t.top=0);var r=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,s=go(e),l={};t.bottom-t.top>s&&(t.bottom=t.top+s);var d=e.doc.height+po(i),f=t.top<n,v=t.bottom>d-n;if(t.top<r)l.scrollTop=f?0:t.top;else if(t.bottom>r+s){var D=Math.min(t.top,(v?d:t.bottom)-s);D!=r&&(l.scrollTop=D)}var N=e.options.fixedGutter?0:i.gutters.offsetWidth,ie=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-N,$=Bi(e)-i.gutters.offsetWidth,Ee=t.right-t.left>$;return Ee&&(t.right=t.left+$),t.left<10?l.scrollLeft=0:t.left<ie?l.scrollLeft=Math.max(0,t.left+N-(Ee?0:10)):t.right>$+ie-3&&(l.scrollLeft=t.right+(Ee?0:10)-$),l}function To(e,t){if(t==null)return;Jr(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function er(e){Jr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function br(e,t,i){(t!=null||i!=null)&&Jr(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Zs(e,t){Jr(e),e.curOp.scrollToPos=t}function Jr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=fa(e,t.from),n=fa(e,t.to);wa(e,i,n,t.margin)}}function wa(e,t,i,n){var r=Mo(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});br(e,r.scrollLeft,r.scrollTop)}function Cr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;X||Do(e,{top:t}),Aa(e,t,!0),X&&Do(e),wr(e,100)}function Aa(e,t,i){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!i)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Wi(e,t,i,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Ra(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function xr(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+po(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?i:0,docHeight:n,scrollHeight:n+oi(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var zi=function(e,t,i){this.cm=i;var n=this.vert=S("div",[S("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=S("div",[S("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,e(n),e(r),xe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),xe(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,k&&L<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};zi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var r=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+s)+"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:i?n:0,bottom:t?n:0}},zi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},zi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},zi.prototype.zeroWidthHack=function(){var e=ne&&!W?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ae,this.disableVert=new Ae},zi.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var r=e.getBoundingClientRect(),s=i=="vert"?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);s!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},zi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Er=function(){};Er.prototype.update=function(){return{bottom:0,right:0}},Er.prototype.setScrollLeft=function(){},Er.prototype.setScrollTop=function(){},Er.prototype.clear=function(){};function tr(e,t){t||(t=xr(e));var i=e.display.barWidth,n=e.display.barHeight;Sa(e,t);for(var r=0;r<4&&i!=e.display.barWidth||n!=e.display.barHeight;r++)i!=e.display.barWidth&&e.options.lineWrapping&&Vr(e),Sa(e,xr(e)),i=e.display.barWidth,n=e.display.barHeight}function Sa(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var ka={native:zi,null:Er};function Ma(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&me(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ka[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),xe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Wi(e,t):Cr(e,t)},e),e.display.scrollbars.addClass&&G(e.display.wrapper,e.display.scrollbars.addClass)}var qs=0;function Fi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qs},Dt(e.curOp)}function Hi(e){var t=e.curOp;t&&Ht(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;$s(i)})}function $s(e){for(var t=e.ops,i=0;i<t.length;i++)el(t[i]);for(var n=0;n<t.length;n++)tl(t[n]);for(var r=0;r<t.length;r++)nl(t[r]);for(var s=0;s<t.length;s++)il(t[s]);for(var l=0;l<t.length;l++)rl(t[l])}function el(e){var t=e.cm,i=t.display;al(t),e.updateMaxLine&&fi(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Kr(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ro(e.cm,e.update)}function nl(e){var t=e.cm,i=t.display;e.updatedDisplay&&Vr(t),e.barMeasure=xr(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=oa(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+oi(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Bi(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function il(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Wi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==R();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&tr(t,e.barMeasure),e.updatedDisplay&&Io(t,e.barMeasure),e.selectionChanged&&So(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Ca(e.cm)}function rl(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&Ta(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Aa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Wi(t,e.scrollLeft,!0,!0),e.scrollToPos){var r=Ys(t,o(n,e.scrollToPos.from),o(n,e.scrollToPos.to),e.scrollToPos.margin);Ks(t,r)}var s=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(s)for(var d=0;d<s.length;++d)s[d].lines.length||Se(s[d],"hide");if(l)for(var f=0;f<l.length;++f)l[f].lines.length&&Se(l[f],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Se(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function _n(e,t){if(e.curOp)return t();Fi(e);try{return t()}finally{Hi(e)}}function hn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Fi(e);try{return t.apply(e,arguments)}finally{Hi(e)}}}function wn(e){return function(){if(this.curOp)return e.apply(this,arguments);Fi(this);try{return e.apply(this,arguments)}finally{Hi(this)}}}function cn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Fi(t);try{return e.apply(this,arguments)}finally{Hi(t)}}}function wr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,x(ol,e))}function ol(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var i=+new Date+e.options.workTime,n=ae(e,t.highlightFrontier),r=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(n.line>=e.display.viewFrom){var l=s.styles,d=s.text.length>e.options.maxHighlightLength?Sn(t.mode,n.state):null,f=B(e,s,n,!0);d&&(n.state=d),s.styles=f.styles;var v=s.styleClasses,D=f.classes;D?s.styleClasses=D:v&&(s.styleClasses=null);for(var N=!l||l.length!=s.styles.length||v!=D&&(!v||!D||v.bgClass!=D.bgClass||v.textClass!=D.textClass),ie=0;!N&&ie<l.length;++ie)N=l[ie]!=s.styles[ie];N&&r.push(n.line),s.stateAfter=n.save(),n.nextLine()}else s.text.length<=e.options.maxHighlightLength&&ut(e,s.text,n),s.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return wr(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),r.length&&_n(e,function(){for(var s=0;s<r.length;s++)wi(e,r[s],"text")})}var Kr=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Qr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Bi(e),this.force=i,this.dims=Eo(e),this.events=[]};Kr.prototype.signal=function(e,t){j(e,t)&&this.events.push(arguments)},Kr.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Se.apply(null,this.events[e])};function al(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=oi(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=oi(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=R();if(!t||!b(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&b(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function ll(e){if(!e||!e.activeElt||e.activeElt==R())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&b(document.body,e.anchorNode)&&b(document.body,e.focusNode)){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function Ro(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return Ai(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&va(e)==0)return!1;Da(e)&&(Ai(e),t.dims=Eo(e));var r=n.first+n.size,s=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(r,t.visible.to+e.options.viewportMargin);i.viewFrom<s&&s-i.viewFrom<20&&(s=Math.max(n.first,i.viewFrom)),i.viewTo>l&&i.viewTo-l<20&&(l=Math.min(r,i.viewTo)),Mn&&(s=xi(e.doc,s),l=jr(e.doc,l));var d=s!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Qs(e,s,l),i.viewOffset=Bn(ht(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var f=va(e);if(!d&&f==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var v=sl(e);return f>4&&(i.lineDiv.style.display="none"),ul(e,i.updateLineNumbers,t.dims),f>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,ll(v),he(i.cursorDiv),he(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,d&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,wr(e,400)),i.updateLineNumbers=null,!0}function Ta(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Bi(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+po(e.display)-go(e),i.top)}),t.visible=Qr(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Qr(e.display,e.doc,i));if(!Ro(e,t))break;Vr(e);var r=xr(e);yr(e),tr(e,r),Io(e,r),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 Do(e,t){var i=new Kr(e,t);if(Ro(e,i)){Vr(e),Ta(e,i);var n=xr(e);yr(e),tr(e,n),Io(e,n),i.finish()}}function ul(e,t,i){var n=e.display,r=e.options.lineNumbers,s=n.lineDiv,l=s.firstChild;function d(Ee){var Le=Ee.nextSibling;return M&&ne&&e.display.currentWheelTarget==Ee?Ee.style.display="none":Ee.parentNode.removeChild(Ee),Le}for(var f=n.view,v=n.viewFrom,D=0;D<f.length;D++){var N=f[D];if(!N.hidden)if(!N.node||N.node.parentNode!=s){var ie=Bs(e,N,v,i);s.insertBefore(ie,l)}else{for(;l!=N.node;)l=d(l);var $=r&&t!=null&&t<=v&&N.lineNumber;N.changes&&(ve(N.changes,"gutter")>-1&&($=!1),pr(e,N,v,i)),$&&(he(N.lineNumber),N.lineNumber.appendChild(document.createTextNode(vi(e.options,v)))),l=N.node.nextSibling}v+=N.size}for(;l;)l=d(l)}function Lo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Io(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+oi(e)+"px"}function Ra(e){var t=e.display,i=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=wo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,s=n+"px",l=0;l<i.length;l++)if(!i[l].hidden){e.options.fixedGutter&&(i[l].gutter&&(i[l].gutter.style.left=s),i[l].gutterBackground&&(i[l].gutterBackground.style.left=s));var d=i[l].alignable;if(d)for(var f=0;f<d.length;f++)d[f].style.left=s}e.options.fixedGutter&&(t.gutters.style.left=n+r+"px")}function Da(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=vi(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var r=n.measure.appendChild(S("div",[S("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=r.firstChild.offsetWidth,l=r.offsetWidth-s;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(s,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Lo(e.display),!0}return!1}function Oo(e,t){for(var i=[],n=!1,r=0;r<e.length;r++){var s=e[r],l=null;if(typeof s!="string"&&(l=s.style,s=s.className),s=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:s,style:l})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function La(e){var t=e.gutters,i=e.gutterSpecs;he(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var r=i[n],s=r.className,l=r.style,d=t.appendChild(S("div",null,"CodeMirror-gutter "+s));l&&(d.style.cssText=l),s=="CodeMirror-linenumbers"&&(e.lineGutter=d,d.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Lo(e)}function Ar(e){La(e.display),Rn(e),Ra(e)}function hl(e,t,i,n){var r=this;this.input=i,r.scrollbarFiller=S("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=S("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=te("div",null,"CodeMirror-code"),r.selectionDiv=S("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=S("div",null,"CodeMirror-cursors"),r.measure=S("div",null,"CodeMirror-measure"),r.lineMeasure=S("div",null,"CodeMirror-measure"),r.lineSpace=te("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var s=te("div",[r.lineSpace],"CodeMirror-lines");r.mover=S("div",[s],null,"position: relative"),r.sizer=S("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=S("div",null,null,"position: absolute; height: "+Fe+"px; width: 1px;"),r.gutters=S("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=S("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=S("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),k&&L<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),!M&&!(X&&ee)&&(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=Oo(n.gutters,n.lineNumbers),La(r),i.init(r)}var Yr=0,Hn=null;k?Hn=-.53:X?Hn=15:E?Hn=-.7:V&&(Hn=-1/3);function Ia(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function cl(e){var t=Ia(e);return t.x*=Hn,t.y*=Hn,t}function Oa(e,t){var i=Ia(t),n=i.x,r=i.y,s=e.display,l=s.scroller,d=l.scrollWidth>l.clientWidth,f=l.scrollHeight>l.clientHeight;if(!(n&&d||r&&f))return;if(r&&ne&&M){e:for(var v=t.target,D=s.view;v!=l;v=v.parentNode)for(var N=0;N<D.length;N++)if(D[N].node==v){e.display.currentWheelTarget=v;break e}}if(n&&!X&&!w&&Hn!=null){r&&f&&Cr(e,Math.max(0,l.scrollTop+r*Hn)),Wi(e,Math.max(0,l.scrollLeft+n*Hn)),(!r||r&&f)&&y(t),s.wheelStartX=null;return}if(r&&Hn!=null){var ie=r*Hn,$=e.doc.scrollTop,Ee=$+s.wrapper.clientHeight;ie<0?$=Math.max(0,$+ie-50):Ee=Math.min(e.doc.height,Ee+ie+50),Do(e,{top:$,bottom:Ee})}Yr<20&&(s.wheelStartX==null?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=n,s.wheelDY=r,setTimeout(function(){if(s.wheelStartX==null)return;var Le=l.scrollLeft-s.wheelStartX,ze=l.scrollTop-s.wheelStartY,Qe=ze&&s.wheelDY&&ze/s.wheelDY||Le&&s.wheelDX&&Le/s.wheelDX;if(s.wheelStartX=s.wheelStartY=null,!Qe)return;Hn=(Hn*Yr+Qe)/(Yr+1),++Yr},200)):(s.wheelDX+=n,s.wheelDY+=r))}var Gn=function(e,t){this.ranges=e,this.primIndex=t};Gn.prototype.primary=function(){return this.ranges[this.primIndex]},Gn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],n=e.ranges[t];if(!ti(i.anchor,n.anchor)||!ti(i.head,n.head))return!1}return!0},Gn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Wt(ci(this.ranges[t].anchor),ci(this.ranges[t].head));return new Gn(e,this.primIndex)},Gn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Gn.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(xt(t,n.from())>=0&&xt(e,n.to())<=0)return i}return-1};var Wt=function(e,t){this.anchor=e,this.head=t};Wt.prototype.from=function(){return Li(this.anchor,this.head)},Wt.prototype.to=function(){return di(this.anchor,this.head)},Wt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function $n(e,t,i){var n=e&&e.options.selectionsMayTouch,r=t[i];t.sort(function(ie,$){return xt(ie.from(),$.from())}),i=ve(t,r);for(var s=1;s<t.length;s++){var l=t[s],d=t[s-1],f=xt(d.to(),l.from());if(n&&!l.empty()?f>0:f>=0){var v=Li(d.from(),l.from()),D=di(d.to(),l.to()),N=d.empty()?l.from()==l.head:d.from()==d.head;s<=i&&--i,t.splice(--s,2,new Wt(N?D:v,N?v:D))}}return new Gn(t,i)}function Si(e,t){return new Gn([new Wt(e,t||e)],0)}function ki(e){return e.text?Ne(e.from.line+e.text.length-1,Pe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Pa(e,t){if(xt(e,t.from)<0)return e;if(xt(e,t.to)<=0)return ki(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ki(t).ch-t.to.ch),Ne(i,n)}function Po(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var r=e.sel.ranges[n];i.push(new Wt(Pa(r.anchor,t),Pa(r.head,t)))}return $n(e.cm,i,e.sel.primIndex)}function Na(e,t,i){return e.line==t.line?Ne(i.line,e.ch-t.ch+i.ch):Ne(i.line+(e.line-t.line),e.ch)}function dl(e,t,i){for(var n=[],r=Ne(e.first,0),s=r,l=0;l<t.length;l++){var d=t[l],f=Na(d.from,r,s),v=Na(ki(d),r,s);if(r=d.to,s=v,i=="around"){var D=e.sel.ranges[l],N=xt(D.head,D.anchor)<0;n[l]=new Wt(N?v:f,N?f:v)}else n[l]=new Wt(f,f)}return new Gn(n,e.sel.primIndex)}function No(e){e.doc.mode=Vn(e.options,e.doc.modeOption),Sr(e)}function Sr(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,wr(e,100),e.state.modeGen++,e.curOp&&Rn(e)}function Ba(e,t){return t.from.ch==0&&t.to.ch==0&&Pe(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Bo(e,t,i,n){function r(Ze){return i?i[Ze]:null}function s(Ze,Je,ot){uo(Ze,Je,ot,n),Qt(Ze,"change",Ze,t)}function l(Ze,Je){for(var ot=[],Ct=Ze;Ct<Je;++Ct)ot.push(new Ei(v[Ct],r(Ct),n));return ot}var d=t.from,f=t.to,v=t.text,D=ht(e,d.line),N=ht(e,f.line),ie=Pe(v),$=r(v.length-1),Ee=f.line-d.line;if(t.full)e.insert(0,l(0,v.length)),e.remove(v.length,e.size-v.length);else if(Ba(e,t)){var Le=l(0,v.length-1);s(N,N.text,$),Ee&&e.remove(d.line,Ee),Le.length&&e.insert(d.line,Le)}else if(D==N)if(v.length==1)s(D,D.text.slice(0,d.ch)+ie+D.text.slice(f.ch),$);else{var ze=l(1,v.length-1);ze.push(new Ei(ie+D.text.slice(f.ch),$,n)),s(D,D.text.slice(0,d.ch)+v[0],r(0)),e.insert(d.line+1,ze)}else if(v.length==1)s(D,D.text.slice(0,d.ch)+v[0]+N.text.slice(f.ch),r(0)),e.remove(d.line+1,Ee);else{s(D,D.text.slice(0,d.ch)+v[0],r(0)),s(N,ie+N.text.slice(f.ch),$);var Qe=l(1,v.length-1);Ee>1&&e.remove(d.line+1,Ee-1),e.insert(d.line+1,Qe)}Qt(e,"change",e,t)}function Mi(e,t,i){function n(r,s,l){if(r.linked)for(var d=0;d<r.linked.length;++d){var f=r.linked[d];if(f.doc==s)continue;var v=l&&f.sharedHist;if(i&&!v)continue;t(f.doc,v),n(f.doc,r,v)}}n(e,null,!0)}function _a(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ao(e),No(e),Ua(e),e.options.lineWrapping||fi(e),e.options.mode=t.modeOption,Rn(e)}function Ua(e){(e.doc.direction=="rtl"?G:me)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){_n(e,function(){Ua(e),Rn(e)})}function Xr(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function _o(e,t){var i={from:ci(t.from),to:ki(t),text:jn(e,t.from,t.to)};return za(e,i,t.from.line,t.to.line+1),Mi(e,function(n){return za(n,i,t.from.line,t.to.line+1)},!0),i}function ja(e){for(;e.length;){var t=Pe(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return ja(e.done),Pe(e.done);if(e.done.length&&!Pe(e.done).ranges)return Pe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Pe(e.done)}function Wa(e,t,i,n){var r=e.history;r.undone.length=0;var s=+new Date,l,d;if((r.lastOp==n||r.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&r.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=pl(r,r.lastOp==n)))d=Pe(l.changes),xt(t.from,t.to)==0&&xt(t.from,d.to)==0?d.to=ki(t):l.changes.push(_o(e,t));else{var f=Pe(r.done);for((!f||!f.ranges)&&Zr(e.sel,r.done),l={changes:[_o(e,t)],generation:r.generation},r.done.push(l);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=t.origin,d||Se(e,"historyAdded")}function gl(e,t,i,n){var r=t.charAt(0);return r=="*"||r=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ml(e,t,i,n){var r=e.history,s=n&&n.origin;i==r.lastSelOp||s&&r.lastSelOrigin==s&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==s||gl(e,s,Pe(r.done),t))?r.done[r.done.length-1]=t:Zr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=s,r.lastSelOp=i,n&&n.clearRedo!==!1&&ja(r.undone)}function Zr(e,t){var i=Pe(t);i&&i.ranges&&i.equals(e)||t.push(e)}function za(e,t,i,n){var r=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(l){l.markedSpans&&((r||(r=t["spans_"+e.id]={}))[s]=l.markedSpans),++s})}function vl(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function yl(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],r=0;r<t.text.length;++r)n.push(vl(i[r]));return n}function Fa(e,t){var i=yl(e,t),n=Pn(e,t);if(!i)return n;if(!n)return i;for(var r=0;r<i.length;++r){var s=i[r],l=n[r];if(s&&l){e:for(var d=0;d<l.length;++d){for(var f=l[d],v=0;v<s.length;++v)if(s[v].marker==f.marker)continue e;s.push(f)}}else l&&(i[r]=l)}return i}function nr(e,t,i){for(var n=[],r=0;r<e.length;++r){var s=e[r];if(s.ranges){n.push(i?Gn.prototype.deepCopy.call(s):s);continue}var l=s.changes,d=[];n.push({changes:d});for(var f=0;f<l.length;++f){var v=l[f],D=void 0;if(d.push({from:v.from,to:v.to,text:v.text}),t)for(var N in v)(D=N.match(/^spans_(\d+)$/))&&(ve(t,Number(D[1]))>-1&&(Pe(d)[N]=v[N],delete v[N]))}}return n}function Uo(e,t,i,n){if(n){var r=e.anchor;if(i){var s=xt(t,r)<0;s!=xt(i,r)<0?(r=t,t=i):s!=xt(t,i)<0&&(t=i)}return new Wt(r,t)}else return new Wt(i||t,t)}function qr(e,t,i,n,r){r==null&&(r=e.cm&&(e.cm.display.shift||e.extend)),xn(e,new Gn([Uo(e.sel.primary(),t,i,r)],0),n)}function Ha(e,t,i){for(var n=[],r=e.cm&&(e.cm.display.shift||e.extend),s=0;s<e.sel.ranges.length;s++)n[s]=Uo(e.sel.ranges[s],t[s],null,r);var l=$n(e.cm,n,e.sel.primIndex);xn(e,l,i)}function jo(e,t,i,n){var r=e.sel.ranges.slice(0);r[t]=i,xn(e,$n(e.cm,r,e.sel.primIndex),n)}function Ga(e,t,i,n){xn(e,Si(t,i),n)}function bl(e,t,i){var n={ranges:t.ranges,update:function(r){this.ranges=[];for(var s=0;s<r.length;s++)this.ranges[s]=new Wt(o(e,r[s].anchor),o(e,r[s].head))},origin:i&&i.origin};return Se(e,"beforeSelectionChange",e,n),e.cm&&Se(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?$n(e.cm,n.ranges,n.ranges.length-1):t}function Va(e,t,i){var n=e.history.done,r=Pe(n);r&&r.ranges?(n[n.length-1]=t,$r(e,t,i)):xn(e,t,i)}function xn(e,t,i){$r(e,t,i),ml(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function $r(e,t,i){(j(e,"beforeSelectionChange")||e.cm&&j(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,i));var n=i&&i.bias||(xt(t.primary().head,e.sel.primary().head)<0?-1:1);Qa(e,Ka(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&er(e.cm)}function Qa(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Q(e.cm)),Qt(e,"cursorActivity",e)}function Ja(e){Qa(e,Ka(e,e.sel,null,!1))}function Ka(e,t,i,n){for(var r,s=0;s<t.ranges.length;s++){var l=t.ranges[s],d=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[s],f=eo(e,l.anchor,d&&d.anchor,i,n),v=eo(e,l.head,d&&d.head,i,n);(r||f!=l.anchor||v!=l.head)&&(r||(r=t.ranges.slice(0,s)),r[s]=new Wt(f,v))}return r?$n(e.cm,r,t.primIndex):t}function ir(e,t,i,n,r){var s=ht(e,t.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var d=s.markedSpans[l],f=d.marker,v="selectLeft"in f?!f.selectLeft:f.inclusiveLeft,D="selectRight"in f?!f.selectRight:f.inclusiveRight;if((d.from==null||(v?d.from<=t.ch:d.from<t.ch))&&(d.to==null||(D?d.to>=t.ch:d.to>t.ch))){if(r&&(Se(f,"beforeCursorEnter"),f.explicitlyCleared))if(s.markedSpans){--l;continue}else break;if(!f.atomic)continue;if(i){var N=f.find(n<0?1:-1),ie=void 0;if((n<0?D:v)&&(N=Ya(e,N,-n,N&&N.line==t.line?s:null)),N&&N.line==t.line&&(ie=xt(N,i))&&(n<0?ie<0:ie>0))return ir(e,N,t,n,r)}var $=f.find(n<0?-1:1);return(n<0?v:D)&&($=Ya(e,$,n,$.line==t.line?s:null)),$?ir(e,$,t,n,r):null}}return t}function eo(e,t,i,n,r){var s=n||1,l=ir(e,t,i,s,r)||!r&&ir(e,t,i,s,!0)||ir(e,t,i,-s,r)||!r&&ir(e,t,i,-s,!0);return l||(e.cantEdit=!0,Ne(e.first,0))}function Ya(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?o(e,Ne(t.line-1)):null:i>0&&t.ch==(n||ht(e,t.line)).text.length?t.line<e.first+e.size-1?Ne(t.line+1,0):null:new Ne(t.line,t.ch+i)}function Xa(e){e.setSelection(Ne(e.firstLine(),0),Ne(e.lastLine()),ke)}function Za(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(r,s,l,d){r&&(n.from=o(e,r)),s&&(n.to=o(e,s)),l&&(n.text=l),d!==void 0&&(n.origin=d)}),Se(e,"beforeChange",e,n),e.cm&&Se(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function rr(e,t,i){if(e.cm){if(!e.cm.curOp)return hn(e.cm,rr)(e,t,i);if(e.cm.state.suppressEdits)return}if((j(e,"beforeChange")||e.cm&&j(e.cm,"beforeChange"))&&(t=Za(e,t,!0),!t))return;var n=Qi&&!i&&Ii(e,t.from,t.to);if(n)for(var r=n.length-1;r>=0;--r)qa(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin});else qa(e,t)}function qa(e,t){if(t.text.length==1&&t.text[0]==""&&xt(t.from,t.to)==0)return;var i=Po(e,t);Wa(e,t,i,e.cm?e.cm.curOp.id:NaN),kr(e,t,i,Pn(e,t));var n=[];Mi(e,function(r,s){!s&&ve(n,r.history)==-1&&(ns(r.history,t),n.push(r.history)),kr(r,t,null,Pn(r,t))})}function to(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i)return;for(var r=e.history,s,l=e.sel,d=t=="undo"?r.done:r.undone,f=t=="undo"?r.undone:r.done,v=0;v<d.length&&!(s=d[v],i?s.ranges&&!s.equals(e.sel):!s.ranges);v++);if(v==d.length)return;for(r.lastOrigin=r.lastSelOrigin=null;;)if(s=d.pop(),s.ranges){if(Zr(s,f),i&&!s.equals(e.sel)){xn(e,s,{clearRedo:!1});return}l=s}else if(n){d.push(s);return}else break;var D=[];Zr(l,f),f.push({changes:D,generation:r.generation}),r.generation=s.generation||++r.maxGeneration;for(var N=j(e,"beforeChange")||e.cm&&j(e.cm,"beforeChange"),ie=function(Le){var ze=s.changes[Le];if(ze.origin=t,N&&!Za(e,ze,!1))return d.length=0,{};D.push(_o(e,ze));var Qe=Le?Po(e,ze):Pe(d);kr(e,ze,Qe,Fa(e,ze)),!Le&&e.cm&&e.cm.scrollIntoView({from:ze.from,to:ki(ze)});var Ze=[];Mi(e,function(Je,ot){!ot&&ve(Ze,Je.history)==-1&&(ns(Je.history,ze),Ze.push(Je.history)),kr(Je,ze,null,Fa(Je,ze))})},$=s.changes.length-1;$>=0;--$){var Ee=ie($);if(Ee)return Ee.v}}function $a(e,t){if(t==0)return;if(e.first+=t,e.sel=new Gn(et(e.sel.ranges,function(r){return new Wt(Ne(r.anchor.line+t,r.anchor.ch),Ne(r.head.line+t,r.head.ch))}),e.sel.primIndex),e.cm){Rn(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)wi(e.cm,n,"gutter")}}function kr(e,t,i,n){if(e.cm&&!e.cm.curOp)return hn(e.cm,kr)(e,t,i,n);if(t.to.line<e.first){$a(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);$a(e,r),t={from:Ne(e.first,0),to:Ne(t.to.line+r,t.to.ch),text:[Pe(t.text)],origin:t.origin}}var s=e.lastLine();t.to.line>s&&(t={from:t.from,to:Ne(s,ht(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=jn(e,t.from,t.to),i||(i=Po(e,t)),e.cm?Cl(e.cm,t,n):Bo(e,t,n),$r(e,i,ke),e.cantEdit&&eo(e,Ne(e.firstLine(),0))&&(e.cantEdit=!1)}function Cl(e,t,i){var n=e.doc,r=e.display,s=t.from,l=t.to,d=!1,f=s.line;e.options.lineWrapping||(f=Lt(an(ht(n,s.line))),n.iter(f,l.line+1,function($){if($==r.maxLine)return d=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Q(e),Bo(n,t,i,ma(e)),e.options.lineWrapping||(n.iter(f,s.line+t.text.length,function($){var Ee=Yi($);Ee>r.maxLineLength&&(r.maxLine=$,r.maxLineLength=Ee,r.maxLineChanged=!0,d=!1)}),d&&(e.curOp.updateMaxLine=!0)),Kn(n,s.line),wr(e,400);var v=t.text.length-(l.line-s.line)-1;t.full?Rn(e):s.line==l.line&&t.text.length==1&&!Ba(e.doc,t)?wi(e,s.line,"text"):Rn(e,s.line,l.line+1,v);var D=j(e,"changes"),N=j(e,"change");if(N||D){var ie={from:s,to:l,text:t.text,removed:t.removed,origin:t.origin};N&&Qt(e,"change",e,ie),D&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ie)}e.display.selForContextMenu=null}function or(e,t,i,n,r){var s;n||(n=i),xt(n,i)<0&&(s=[n,i],i=s[0],n=s[1]),typeof t=="string"&&(t=e.splitLines(t)),rr(e,{from:i,to:n,text:t,origin:r})}function es(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ts(e,t,i,n){for(var r=0;r<e.length;++r){var s=e[r],l=!0;if(s.ranges){s.copied||(s=e[r]=s.deepCopy(),s.copied=!0);for(var d=0;d<s.ranges.length;d++)es(s.ranges[d].anchor,t,i,n),es(s.ranges[d].head,t,i,n);continue}for(var f=0;f<s.changes.length;++f){var v=s.changes[f];if(i<v.from.line)v.from=Ne(v.from.line+n,v.from.ch),v.to=Ne(v.to.line+n,v.to.ch);else if(t<=v.to.line){l=!1;break}}l||(e.splice(0,r+1),r=0)}}function ns(e,t){var i=t.from.line,n=t.to.line,r=t.text.length-(n-i)-1;ts(e.done,i,n,r),ts(e.undone,i,n,r)}function Mr(e,t,i,n){var r=t,s=t;return typeof t=="number"?s=ht(e,c(e,t)):r=Lt(t),r==null?null:(n(s,r)&&e.cm&&wi(e.cm,r,i),s)}function Tr(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}Tr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var r=this.lines[i];this.height-=r.height,ho(r),Qt(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function Rr(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var r=e[n];t+=r.chunkSize(),i+=r.height,r.parent=this}this.size=t,this.height=i,this.parent=null}Rr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],r=n.chunkSize();if(e<r){var s=Math.min(t,r-e),l=n.height;if(n.removeInner(e,s),this.height-=l-n.height,r==s&&(this.children.splice(i--,1),n.parent=null),(t-=s)==0)break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Tr))){var d=[];this.collapse(d),this.children=[new Tr(d)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var r=this.children[n],s=r.chunkSize();if(e<=s){if(r.insertInner(e,t,i),r.lines&&r.lines.length>50){for(var l=r.lines.length%25+25,d=l;d<r.lines.length;){var f=new Tr(r.lines.slice(d,d+=25));r.height-=f.height,this.children.splice(++n,0,f),f.parent=this}r.lines=r.lines.slice(0,l),this.maybeSpill()}break}e-=s}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new Rr(t);if(e.parent){e.size-=i.size,e.height-=i.height;var r=ve(e.parent.children,e);e.parent.children.splice(r+1,0,i)}else{var n=new Rr(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var r=this.children[n],s=r.chunkSize();if(e<s){var l=Math.min(t,s-e);if(r.iterN(e,l,i))return!0;if((t-=l)==0)break;e=0}else e-=s}}};var Dr=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Dr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=Lt(i);if(n==null||!t)return;for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(i.widgets=null);var s=mr(this);kn(i,Math.max(0,i.height-s)),e&&(_n(e,function(){is(e,i,-s),wi(e,n,"widget")}),Qt(e,"lineWidgetCleared",e,this,n))},Dr.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var r=mr(this)-t;if(!r)return;Zn(this.doc,n)||kn(n,n.height+r),i&&_n(i,function(){i.curOp.forceUpdate=!0,is(i,n,r),Qt(i,"lineWidgetChanged",i,e,Lt(n))})},H(Dr);function is(e,t,i){Bn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&To(e,i)}function xl(e,t,i,n){var r=new Dr(e,i,n),s=e.cm;return s&&r.noHScroll&&(s.display.alignWidgets=!0),Mr(e,t,"widget",function(l){var d=l.widgets||(l.widgets=[]);if(r.insertAt==null?d.push(r):d.splice(Math.min(d.length-1,Math.max(0,r.insertAt)),0,r),r.line=l,s&&!Zn(e,l)){var f=Bn(l)<e.scrollTop;kn(l,l.height+mr(r)),f&&To(s,r.height),s.curOp.forceUpdate=!0}return!0}),s&&Qt(s,"lineWidgetAdded",s,r,typeof t=="number"?t:Lt(t)),r}var rs=0,Ti=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++rs};Ti.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Fi(e),j(this,"clear")){var i=this.find();i&&Qt(this,"clear",i.from,i.to)}for(var n=null,r=null,s=0;s<this.lines.length;++s){var l=this.lines[s],d=Xn(l.markedSpans,this);e&&!this.collapsed?wi(e,Lt(l),"text"):e&&(d.to!=null&&(r=Lt(l)),d.from!=null&&(n=Lt(l))),l.markedSpans=ii(l.markedSpans,d),d.from==null&&this.collapsed&&!Zn(this.doc,l)&&e&&kn(l,Zi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var f=0;f<this.lines.length;++f){var v=an(this.lines[f]),D=Yi(v);D>e.display.maxLineLength&&(e.display.maxLine=v,e.display.maxLineLength=D,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Rn(e,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ja(e.doc)),e&&Qt(e,"markerCleared",e,this,n,r),t&&Hi(e),this.parent&&this.parent.clear()},Ti.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,r=0;r<this.lines.length;++r){var s=this.lines[r],l=Xn(s.markedSpans,this);if(l.from!=null&&(i=Ne(t?s:Lt(s),l.from),e==-1))return i;if(l.to!=null&&(n=Ne(t?s:Lt(s),l.to),e==1))return n}return i&&{from:i,to:n}},Ti.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;if(!t||!n)return;_n(n,function(){var r=t.line,s=Lt(t.line),l=mo(n,s);if(l&&(la(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Zn(i.doc,r)&&i.height!=null){var d=i.height;i.height=null;var f=mr(i)-d;f&&kn(r,r.height+f)}Qt(n,"markerChanged",n,e)})},Ti.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ve(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ti.prototype.detachLine=function(e){if(this.lines.splice(ve(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},H(Ti);function ar(e,t,i,n,r){if(n&&n.shared)return El(e,t,i,n,r);if(e.cm&&!e.cm.curOp)return hn(e.cm,ar)(e,t,i,n,r);var s=new Ti(e,r),l=xt(t,i);if(n&&m(n,s,!1),l>0||l==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=te("span",[s.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(on(e,t.line,t,i,s)||t.line!=i.line&&on(e,i.line,t,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");ni()}s.addToHistory&&Wa(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var d=t.line,f=e.cm,v;if(e.iter(d,i.line+1,function(N){f&&s.collapsed&&!f.options.lineWrapping&&an(N)==f.display.maxLine&&(v=!0),s.collapsed&&d!=t.line&&kn(N,0),Fn(N,new yi(s,d==t.line?t.ch:null,d==i.line?i.ch:null)),++d}),s.collapsed&&e.iter(t.line,i.line+1,function(N){Zn(e,N)&&kn(N,0)}),s.clearOnEnter&&xe(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(Tn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++rs,s.atomic=!0),f){if(v&&(f.curOp.updateMaxLine=!0),s.collapsed)Rn(f,t.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var D=t.line;D<=i.line;D++)wi(f,D,"text");s.atomic&&Ja(f.doc),Qt(f,"markerAdded",f,s)}return s}var Lr=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Lr.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Qt(this,"clear")},Lr.prototype.find=function(e,t){return this.primary.find(e,t)},H(Lr);function El(e,t,i,n,r){n=m(n),n.shared=!1;var s=[ar(e,t,i,n,r)],l=s[0],d=n.widgetNode;return Mi(e,function(f){d&&(n.widgetNode=d.cloneNode(!0)),s.push(ar(f,o(f,t),o(f,i),n,r));for(var v=0;v<f.linked.length;++v)if(f.linked[v].isParent)return;l=Pe(s)}),new Lr(s,l)}function os(e){return e.findMarks(Ne(e.first,0),e.clipPos(Ne(e.lastLine())),function(t){return t.parent})}function wl(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n.find(),s=e.clipPos(r.from),l=e.clipPos(r.to);if(xt(s,l)){var d=ar(e,s,l,n.primary,n.primary.type);n.markers.push(d),d.parent=n}}}function Al(e){for(var t=function(n){var r=e[n],s=[r.primary.doc];Mi(r.primary.doc,function(f){return s.push(f)});for(var l=0;l<r.markers.length;l++){var d=r.markers[l];ve(s,d.doc)==-1&&(d.parent=null,r.markers.splice(l--,1))}},i=0;i<e.length;i++)t(i)}var Sl=0,Dn=function(e,t,i,n,r){if(!(this instanceof Dn))return new Dn(e,t,i,n,r);i==null&&(i=0),Rr.call(this,[new Tr([new Ei("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var s=Ne(i,0);this.sel=Si(s),this.history=new Xr(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=r=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Bo(this,{from:s,to:s,text:e}),xn(this,Si(s),ke)};Dn.prototype=Ke(Rr.prototype,{constructor:Dn,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ui(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:cn(function(e){var t=Ne(this.first,0),i=this.first+this.size-1;rr(this,{from:t,to:Ne(i,ht(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&br(this.cm,0,0),xn(this,Si(t),ke)}),replaceRange:function(e,t,i,n){t=o(this,t),i=i?o(this,i):t,or(this,e,t,i,n)},getRange:function(e,t,i){var n=jn(this,o(this,e),o(this,t));return i===!1?n:n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(hi(this,e))return ht(this,e)},getLineNumber:function(e){return Lt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ht(this,e)),an(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return o(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:cn(function(e,t,i){Ga(this,o(this,typeof e=="number"?Ne(e,t||0):e),null,i)}),setSelection:cn(function(e,t,i){Ga(this,o(this,e),o(this,t||e),i)}),extendSelection:cn(function(e,t,i){qr(this,o(this,e),t&&o(this,t),i)}),extendSelections:cn(function(e,t){Ha(this,u(this,e),t)}),extendSelectionsBy:cn(function(e,t){var i=et(this.sel.ranges,e);Ha(this,u(this,i),t)}),setSelections:cn(function(e,t,i){if(!e.length)return;for(var n=[],r=0;r<e.length;r++)n[r]=new Wt(o(this,e[r].anchor),o(this,e[r].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),xn(this,$n(this.cm,n,t),i)}),addSelection:cn(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Wt(o(this,e),o(this,t||e))),xn(this,$n(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var r=jn(this,t[n].from(),t[n].to());i=i?i.concat(r):r}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var r=jn(this,i[n].from(),i[n].to());e!==!1&&(r=r.join(e||this.lineSeparator())),t[n]=r}return t},replaceSelection:function(e,t,i){for(var n=[],r=0;r<this.sel.ranges.length;r++)n[r]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:cn(function(e,t,i){for(var n=[],r=this.sel,s=0;s<r.ranges.length;s++){var l=r.ranges[s];n[s]={from:l.from(),to:l.to(),text:this.splitLines(e[s]),origin:i}}for(var d=t&&t!="end"&&dl(this,n,t),f=n.length-1;f>=0;f--)rr(this,n[f]);d?Va(this,d):this.cm&&er(this.cm)}),undo:cn(function(){to(this,"undo")}),redo:cn(function(){to(this,"redo")}),undoSelection:cn(function(){to(this,"undo",!0)}),redoSelection:cn(function(){to(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Xr(this.history.maxGeneration),Mi(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:nr(this.history.done),undone:nr(this.history.undone)}},setHistory:function(e){var t=this.history=new Xr(this.history.maxGeneration);t.done=nr(e.done.slice(0),null,!0),t.undone=nr(e.undone.slice(0),null,!0)},setGutterMarker:cn(function(e,t,i){return Mr(this,e,"gutter",function(n){var r=n.gutterMarkers||(n.gutterMarkers={});return r[t]=i,!i&&$e(r)&&(n.gutterMarkers=null),!0})}),clearGutter:cn(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Mr(t,i,"gutter",function(){return i.gutterMarkers[e]=null,$e(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!hi(this,e))return null;if(t=e,e=ht(this,e),!e)return null}else if(t=Lt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:cn(function(e,t,i){return Mr(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[r])n[r]=i;else{if(ue(i).test(n[r]))return!1;n[r]+=" "+i}return!0})}),removeLineClass:cn(function(e,t,i){return Mr(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",s=n[r];if(s)if(i==null)n[r]=null;else{var l=s.match(ue(i));if(!l)return!1;var d=l.index+l[0].length;n[r]=s.slice(0,l.index)+(!l.index||d==s.length?"":" ")+s.slice(d)||null}else return!1;return!0})}),addLineWidget:cn(function(e,t,i){return xl(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return ar(this,o(this,e),o(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=o(this,e),ar(this,e,e,i,"bookmark")},findMarksAt:function(e){e=o(this,e);var t=[],i=ht(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var r=i[n];(r.from==null||r.from<=e.ch)&&(r.to==null||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,i){e=o(this,e),t=o(this,t);var n=[],r=e.line;return this.iter(e.line,t.line+1,function(s){var l=s.markedSpans;if(l)for(var d=0;d<l.length;d++){var f=l[d];!(f.to!=null&&r==e.line&&e.ch>=f.to||f.from==null&&r!=e.line||f.from!=null&&r==t.line&&f.from>=t.ch)&&(!i||i(f.marker))&&n.push(f.marker.parent||f.marker)}++r}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(r){var s=r.text.length+n;if(s>e)return t=e,!0;e-=s,++i}),o(this,Ne(i,t))},indexFromPos:function(e){e=o(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new Dn(ui(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new Dn(ui(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(n,os(this)),n},unlinkDoc:function(e){if(e instanceof Yt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Al(os(this));break}if(e.history==this.history){var n=[e.id];Mi(e,function(r){return n.push(r.id)},!0),e.history=new Xr(null),e.history.done=nr(this.history.done,n),e.history.undone=nr(this.history.undone,n)}},iterLinkedDocs:function(e){Mi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):pt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:cn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),Dn.prototype.eachLine=Dn.prototype.iter;var as=0;function kl(e){var t=this;if(ss(t),Ue(t,e)||pi(t.display,e))return;y(e),k&&(as=+new Date);var i=Ui(t,e,!0),n=e.dataTransfer.files;if(!i||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var r=n.length,s=Array(r),l=0,d=function(){++l==r&&hn(t,function(){i=o(t.doc,i);var $={from:i,to:i,text:t.doc.splitLines(s.filter(function(Ee){return Ee!=null}).join(t.doc.lineSeparator())),origin:"paste"};rr(t.doc,$),Va(t.doc,Si(o(t.doc,i),o(t.doc,ki($))))})()},f=function($,Ee){if(t.options.allowDropFileTypes&&ve(t.options.allowDropFileTypes,$.type)==-1){d();return}var Le=new FileReader;Le.onerror=function(){return d()},Le.onload=function(){var ze=Le.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ze)){d();return}s[Ee]=ze,d()},Le.readAsText($)},v=0;v<n.length;v++)f(n[v],v);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var D=e.dataTransfer.getData("Text");if(D){var N;if(t.state.draggingText&&!t.state.draggingText.copy&&(N=t.listSelections()),$r(t.doc,Si(i,i)),N)for(var ie=0;ie<N.length;++ie)or(t.doc,"",N[ie].anchor,N[ie].head,"drag");t.replaceSelection(D,"around","paste"),t.display.input.focus()}}catch($){}}}function Ml(e,t){if(k&&(!e.state.draggingText||+new Date-as<100)){T(t);return}if(Ue(e,t)||pi(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!V){var i=S("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",w&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),w&&i.parentNode.removeChild(i)}}function Tl(e,t){var i=Ui(e,t);if(!i)return;var n=document.createDocumentFragment();ba(e,i,n),e.display.dragCursor||(e.display.dragCursor=S("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),q(e.display.dragCursor,n)}function ss(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ls(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&i.push(r)}i.length&&i[0].operation(function(){for(var s=0;s<i.length;s++)e(i[s])})}var us=!1;function Rl(){if(us)return;Dl(),us=!0}function Dl(){var e;xe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ls(Ll)},100))}),xe(window,"blur",function(){return ls($i)})}function Ll(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ri={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ir=0;Ir<10;Ir++)Ri[Ir+48]=Ri[Ir+96]=String(Ir);for(var no=65;no<=90;no++)Ri[no]=String.fromCharCode(no);for(var Or=1;Or<=12;Or++)Ri[Or+111]=Ri[Or+63235]="F"+Or;var gi={};gi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},gi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},gi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},gi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},gi.default=ne?gi.macDefault:gi.pcDefault;function Il(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,r,s,l=0;l<t.length-1;l++){var d=t[l];if(/^(cmd|meta|m)$/i.test(d))s=!0;else if(/^a(lt)?$/i.test(d))i=!0;else if(/^(c|ctrl|control)$/i.test(d))n=!0;else if(/^s(hift)?$/i.test(d))r=!0;else throw new Error("Unrecognized modifier name: "+d)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),s&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ol(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(n=="..."){delete e[i];continue}for(var r=et(i.split(" "),Il),s=0;s<r.length;s++){var l=void 0,d=void 0;s==r.length-1?(d=r.join(" "),l=n):(d=r.slice(0,s+1).join(" "),l="...");var f=t[d];if(!f)t[d]=l;else if(f!=l)throw new Error("Inconsistent bindings for "+d)}delete e[i]}for(var v in t)e[v]=t[v];return e}function sr(e,t,i,n){t=io(t);var r=t.call?t.call(e,n):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&i(r))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return sr(e,t.fallthrough,i,n);for(var s=0;s<t.fallthrough.length;s++){var l=sr(e,t.fallthrough[s],i,n);if(l)return l}}}function hs(e){var t=typeof e=="string"?e:Ri[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function cs(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(le?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(le?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function ds(e,t){if(w&&e.keyCode==34&&e.char)return!1;var i=Ri[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),cs(i,e,t))}function io(e){return typeof e=="string"?gi[e]:e}function lr(e,t){for(var i=e.doc.sel.ranges,n=[],r=0;r<i.length;r++){for(var s=t(i[r]);n.length&&xt(s.from,Pe(n).to)<=0;){var l=n.pop();if(xt(l.from,s.from)<0){s.from=l.from;break}}n.push(s)}_n(e,function(){for(var d=n.length-1;d>=0;d--)or(e.doc,"",n[d].from,n[d].to,"+delete");er(e)})}function Wo(e,t,i){var n=Ge(e.text,t+i,i);return n<0||n>e.text.length?null:n}function zo(e,t,i){var n=Wo(e,t.ch,i);return n==null?null:new Ne(t.line,n,i<0?"after":"before")}function Fo(e,t,i,n,r){if(e){t.doc.direction=="rtl"&&(r=-r);var s=at(i,t.doc.direction);if(s){var l=r<0?Pe(s):s[0],d=r<0==(l.level==1),f=d?"after":"before",v;if(l.level>0||t.doc.direction=="rtl"){var D=Xi(t,i);v=r<0?i.text.length-1:0;var N=ai(t,D,v).top;v=vt(function(ie){return ai(t,D,ie).top==N},r<0==(l.level==1)?l.from:l.to-1,v),f=="before"&&(v=Wo(i,v,1))}else v=r<0?l.to:l.from;return new Ne(n,v,f)}}return new Ne(n,r<0?i.text.length:0,r<0?"before":"after")}function Pl(e,t,i,n){var r=at(t,e.doc.direction);if(!r)return zo(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var s=tt(r,i.ch,i.sticky),l=r[s];if(e.doc.direction=="ltr"&&l.level%2==0&&(n>0?l.to>i.ch:l.from<i.ch))return zo(t,i,n);var d=function(Qe,Ze){return Wo(t,Qe instanceof Ne?Qe.ch:Qe,Ze)},f,v=function(Qe){return e.options.lineWrapping?(f=f||Xi(e,t),ga(e,t,f,Qe)):{begin:0,end:t.text.length}},D=v(i.sticky=="before"?d(i,-1):i.ch);if(e.doc.direction=="rtl"||l.level==1){var N=l.level==1==n<0,ie=d(i,N?1:-1);if(ie!=null&&(N?ie<=l.to&&ie<=D.end:ie>=l.from&&ie>=D.begin)){var $=N?"before":"after";return new Ne(i.line,ie,$)}}var Ee=function(Qe,Ze,Je){for(var ot=function(Kt,dn){return dn?new Ne(i.line,d(Kt,1),"before"):new Ne(i.line,Kt,"after")};Qe>=0&&Qe<r.length;Qe+=Ze){var Ct=r[Qe],mt=Ze>0==(Ct.level!=1),Mt=mt?Je.begin:d(Je.end,-1);if(Ct.from<=Mt&&Mt<Ct.to)return ot(Mt,mt);if(Mt=mt?Ct.from:d(Ct.to,-1),Je.begin<=Mt&&Mt<Je.end)return ot(Mt,mt)}},Le=Ee(s+n,n,D);if(Le)return Le;var ze=n>0?D.end:d(D.begin,-1);return ze!=null&&!(n>0&&ze==t.text.length)&&(Le=Ee(n>0?0:r.length-1,n,v(ze)),Le)?Le:null}var Pr={selectAll:Xa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return lr(e,function(t){if(t.empty()){var i=ht(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:Ne(t.head.line+1,0)}:{from:t.head,to:Ne(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return lr(e,function(t){return{from:Ne(t.from().line,0),to:o(e.doc,Ne(t.to().line+1,0))}})},delLineLeft:function(e){return lr(e,function(t){return{from:Ne(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return lr(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return lr(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Ne(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ne(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return fs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ps(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},Ce)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},Ce)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?ps(e,t.head):n},Ce)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),n=e.options.tabSize,r=0;r<i.length;r++){var s=i[r].from(),l=Y(e.getLine(s.line),s.ch,n);t.push(_(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return _n(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var r=t[n].head,s=ht(e.doc,r.line).text;if(s){if(r.ch==s.length&&(r=new Ne(r.line,r.ch-1)),r.ch>0)r=new Ne(r.line,r.ch+1),e.replaceRange(s.charAt(r.ch-1)+s.charAt(r.ch-2),Ne(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var l=ht(e.doc,r.line-1).text;l&&(r=new Ne(r.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),Ne(r.line-1,l.length-1),r,"+transpose"))}}i.push(new Wt(r,r))}e.setSelections(i)})},newlineAndIndent:function(e){return _n(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);er(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function fs(e,t){var i=ht(e.doc,t),n=an(i);return n!=i&&(t=Lt(n)),Fo(!0,e,n,t,1)}function Nl(e,t){var i=ht(e.doc,t),n=ri(i);return n!=i&&(t=Lt(n)),Fo(!0,e,i,t,-1)}function ps(e,t){var i=fs(e,t.line),n=ht(e.doc,i.line),r=at(n,e.doc.direction);if(!r||r[0].level==0){var s=Math.max(i.ch,n.text.search(/\S/)),l=t.line==i.line&&t.ch<=s&&t.ch;return Ne(i.line,l?0:s,i.sticky)}return i}function ro(e,t,i){if(typeof t=="string"&&(t=Pr[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),r=t(e)!=He}finally{e.display.shift=n,e.state.suppressEdits=!1}return r}function Bl(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var r=sr(t,e.state.keyMaps[n],i,e);if(r)return r}return e.options.extraKeys&&sr(t,e.options.extraKeys,i,e)||sr(t,e.options.keyMap,i,e)}var _l=new Ae;function Nr(e,t,i,n){var r=e.state.keySeq;if(r){if(hs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:_l.set(50,function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())}),gs(e,r+" "+t,i,n))return!0}return gs(e,t,i,n)}function gs(e,t,i,n){var r=Bl(e,t,n);return r=="multi"&&(e.state.keySeq=t),r=="handled"&&Qt(e,"keyHandled",e,t,i),(r=="handled"||r=="multi")&&(y(i),So(e)),!!r}function ms(e,t){var i=ds(t,!0);return i?t.shiftKey&&!e.state.keySeq?Nr(e,"Shift-"+i,t,function(n){return ro(e,n,!0)})||Nr(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return ro(e,n)}):Nr(e,i,t,function(n){return ro(e,n)}):!1}function Ul(e,t,i){return Nr(e,"'"+i+"'",t,function(n){return ro(e,n,!0)})}var Ho=null;function vs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=R(),Ue(t,e))return;k&&L<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=ms(t,e);w&&(Ho=n?i:null,!n&&i==88&&!Ot&&(ne?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),X&&!ne&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&jl(t)}function jl(e){var t=e.display.lineDiv;G(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(me(t,"CodeMirror-crosshair"),nt(document,"keyup",i),nt(document,"mouseover",i))}xe(document,"keyup",i),xe(document,"mouseover",i)}function ys(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ue(this,e)}function bs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(pi(t.display,e)||Ue(t,e)||e.ctrlKey&&!e.altKey||ne&&e.metaKey)return;var i=e.keyCode,n=e.charCode;if(w&&i==Ho){Ho=null,y(e);return}if(w&&(!e.which||e.which<10)&&ms(t,e))return;var r=String.fromCharCode(n==null?i:n);if(r=="\b")return;if(Ul(t,e,r))return;t.display.input.onKeyPress(e)}var Wl=400,Go=function(e,t,i){this.time=e,this.pos=t,this.button=i};Go.prototype.compare=function(e,t,i){return this.time+Wl>e&&xt(t,this.pos)==0&&i==this.button};var Br,_r;function zl(e,t){var i=+new Date;return _r&&_r.compare(i,e,t)?(Br=_r=null,"triple"):Br&&Br.compare(i,e,t)?(_r=new Go(i,e,t),Br=null,"double"):(Br=new Go(i,e,t),_r=null,"single")}function Cs(e){var t=this,i=t.display;if(Ue(t,e)||i.activeTouch&&i.input.supportsTouch())return;if(i.input.ensurePolled(),i.shift=e.shiftKey,pi(i,e)){M||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(Vo(t,e))return;var n=Ui(t,e),r=pe(e),s=n?zl(n,r):"single";if(window.focus(),r==1&&t.state.selectingText&&t.state.selectingText(e),n&&Fl(t,r,n,s,e))return;r==1?n?Gl(t,n,s,e):re(e)==i.scroller&&y(e):r==2?(n&&qr(t.doc,n),setTimeout(function(){return i.input.focus()},20)):r==3&&(Be?t.display.input.onContextMenu(e):xa(t))}function Fl(e,t,i,n,r){var s="Click";return n=="double"?s="Double"+s:n=="triple"&&(s="Triple"+s),s=(t==1?"Left":t==2?"Middle":"Right")+s,Nr(e,cs(s,r),r,function(l){if(typeof l=="string"&&(l=Pr[l]),!l)return!1;var d=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),d=l(e,i)!=He}finally{e.state.suppressEdits=!1}return d})}function Hl(e,t,i){var n=e.getOption("configureMouse"),r=n?n(e,t,i):{};if(r.unit==null){var s=Re?i.shiftKey&&i.metaKey:i.altKey;r.unit=s?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(r.extend==null||e.doc.extend)&&(r.extend=e.doc.extend||i.shiftKey),r.addNew==null&&(r.addNew=ne?i.metaKey:i.ctrlKey),r.moveOnDrag==null&&(r.moveOnDrag=!(ne?i.altKey:i.ctrlKey)),r}function Gl(e,t,i,n){k?setTimeout(x(Ca,e),0):e.curOp.focus=R();var r=Hl(e,i,n),s=e.doc.sel,l;e.options.dragDrop&&je&&!e.isReadOnly()&&i=="single"&&(l=s.contains(t))>-1&&(xt((l=s.ranges[l]).from(),t)<0||t.xRel>0)&&(xt(l.to(),t)>0||t.xRel<0)?Vl(e,n,t,r):Ql(e,n,t,r)}function Vl(e,t,i,n){var r=e.display,s=!1,l=hn(e,function(v){M&&(r.scroller.draggable=!1),e.state.draggingText=!1,nt(r.wrapper.ownerDocument,"mouseup",l),nt(r.wrapper.ownerDocument,"mousemove",d),nt(r.scroller,"dragstart",f),nt(r.scroller,"drop",l),s||(y(v),n.addNew||qr(e.doc,i,null,null,n.extend),M&&!V||k&&L==9?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),d=function(v){s=s||Math.abs(t.clientX-v.clientX)+Math.abs(t.clientY-v.clientY)>=10},f=function(){return s=!0};M&&(r.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),xe(r.wrapper.ownerDocument,"mouseup",l),xe(r.wrapper.ownerDocument,"mousemove",d),xe(r.scroller,"dragstart",f),xe(r.scroller,"drop",l),xa(e),setTimeout(function(){return r.input.focus()},20)}function xs(e,t,i){if(i=="char")return new Wt(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Wt(Ne(t.line,0),o(e.doc,Ne(t.line+1,0)));var n=i(e,t);return new Wt(n.from,n.to)}function Ql(e,t,i,n){var r=e.display,s=e.doc;y(t);var l,d,f=s.sel,v=f.ranges;if(n.addNew&&!n.extend?(d=s.sel.contains(i),d>-1?l=v[d]:l=new Wt(i,i)):(l=s.sel.primary(),d=s.sel.primIndex),n.unit=="rectangle")n.addNew||(l=new Wt(i,i)),i=Ui(e,t,!0,!0),d=-1;else{var D=xs(e,i,n.unit);n.extend?l=Uo(l,D.anchor,D.head,n.extend):l=D}n.addNew?d==-1?(d=v.length,xn(s,$n(e,v.concat([l]),d),{scroll:!1,origin:"*mouse"})):v.length>1&&v[d].empty()&&n.unit=="char"&&!n.extend?(xn(s,$n(e,v.slice(0,d).concat(v.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),f=s.sel):jo(s,d,l,be):(d=0,xn(s,new Gn([l],0),be),f=s.sel);var N=i;function ie(Je){if(xt(N,Je)==0)return;if(N=Je,n.unit=="rectangle"){for(var ot=[],Ct=e.options.tabSize,mt=Y(ht(s,i.line).text,i.ch,Ct),Mt=Y(ht(s,Je.line).text,Je.ch,Ct),Kt=Math.min(mt,Mt),dn=Math.max(mt,Mt),Zt=Math.min(i.line,Je.line),Un=Math.min(e.lastLine(),Math.max(i.line,Je.line));Zt<=Un;Zt++){var Ln=ht(s,Zt).text,tn=we(Ln,Kt,Ct);Kt==dn?ot.push(new Wt(Ne(Zt,tn),Ne(Zt,tn))):Ln.length>tn&&ot.push(new Wt(Ne(Zt,tn),Ne(Zt,we(Ln,dn,Ct))))}ot.length||ot.push(new Wt(i,i)),xn(s,$n(e,f.ranges.slice(0,d).concat(ot),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Je)}else{var In=l,yn=xs(e,Je,n.unit),sn=In.anchor,nn;xt(yn.anchor,sn)>0?(nn=yn.head,sn=Li(In.from(),yn.anchor)):(nn=yn.anchor,sn=di(In.to(),yn.head));var qt=f.ranges.slice(0);qt[d]=Jl(e,new Wt(o(s,sn),nn)),xn(s,$n(e,qt,d),be)}}var $=r.wrapper.getBoundingClientRect(),Ee=0;function Le(Je){var ot=++Ee,Ct=Ui(e,Je,!0,n.unit=="rectangle");if(!Ct)return;if(xt(Ct,N)!=0){e.curOp.focus=R(),ie(Ct);var mt=Qr(r,s);(Ct.line>=mt.to||Ct.line<mt.from)&&setTimeout(hn(e,function(){Ee==ot&&Le(Je)}),150)}else{var Mt=Je.clientY<$.top?-20:Je.clientY>$.bottom?20:0;Mt&&setTimeout(hn(e,function(){if(Ee!=ot)return;r.scroller.scrollTop+=Mt,Le(Je)}),50)}}function ze(Je){e.state.selectingText=!1,Ee=Infinity,Je&&(y(Je),r.input.focus()),nt(r.wrapper.ownerDocument,"mousemove",Qe),nt(r.wrapper.ownerDocument,"mouseup",Ze),s.history.lastSelOrigin=null}var Qe=hn(e,function(Je){Je.buttons===0||!pe(Je)?ze(Je):Le(Je)}),Ze=hn(e,ze);e.state.selectingText=Ze,xe(r.wrapper.ownerDocument,"mousemove",Qe),xe(r.wrapper.ownerDocument,"mouseup",Ze)}function Jl(e,t){var i=t.anchor,n=t.head,r=ht(e.doc,i.line);if(xt(i,n)==0&&i.sticky==n.sticky)return t;var s=at(r);if(!s)return t;var l=tt(s,i.ch,i.sticky),d=s[l];if(d.from!=i.ch&&d.to!=i.ch)return t;var f=l+(d.from==i.ch==(d.level!=1)?0:1);if(f==0||f==s.length)return t;var v;if(n.line!=i.line)v=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var D=tt(s,n.ch,n.sticky),N=D-l||(n.ch-i.ch)*(d.level==1?-1:1);D==f-1||D==f?v=N<0:v=N>0}var ie=s[f+(v?-1:0)],$=v==(ie.level==1),Ee=$?ie.from:ie.to,Le=$?"after":"before";return i.ch==Ee&&i.sticky==Le?t:new Wt(new Ne(i.line,Ee,Le),n)}function Es(e,t,i,n){var r,s;if(t.touches)r=t.touches[0].clientX,s=t.touches[0].clientY;else try{r=t.clientX,s=t.clientY}catch(ie){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&y(t);var l=e.display,d=l.lineDiv.getBoundingClientRect();if(s>d.bottom||!j(e,i))return A(t);s-=d.top-l.viewOffset;for(var f=0;f<e.display.gutterSpecs.length;++f){var v=l.gutters.childNodes[f];if(v&&v.getBoundingClientRect().right>=r){var D=Jn(e.doc,s),N=e.display.gutterSpecs[f];return Se(e,i,e,D,N.className,t),A(t)}}}function Vo(e,t){return Es(e,t,"gutterClick",!0)}function ws(e,t){if(pi(e.display,t)||Kl(e,t))return;if(Ue(e,t,"contextmenu"))return;Be||e.display.input.onContextMenu(t)}function Kl(e,t){return j(e,"gutterContextMenu")?Es(e,t,"gutterContextMenu",!1):!1}function As(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vr(e)}var ur={toString:function(){return"CodeMirror.Init"}},Ss={},oo={};function Yl(e){var t=e.optionHandlers;function i(n,r,s,l){e.defaults[n]=r,s&&(t[n]=l?function(d,f,v){v!=ur&&s(d,f,v)}:s)}e.defineOption=i,e.Init=ur,i("value","",function(n,r){return n.setValue(r)},!0),i("mode",null,function(n,r){n.doc.modeOption=r,No(n)},!0),i("indentUnit",2,No,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Sr(n),vr(n),Rn(n)},!0),i("lineSeparator",null,function(n,r){if(n.doc.lineSep=r,!r)return;var s=[],l=n.doc.first;n.doc.iter(function(f){for(var v=0;;){var D=f.text.indexOf(r,v);if(D==-1)break;v=D+r.length,s.push(Ne(l,D))}l++});for(var d=s.length-1;d>=0;d--)or(n.doc,r,s[d],Ne(s[d].line,s[d].ch+r.length))}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,r,s){n.state.specialChars=new RegExp(r.source+(r.test(" ")?"":"| "),"g"),s!=ur&&n.refresh()}),i("specialCharPlaceholder",ct,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,r){return n.getInputField().spellcheck=r},!0),i("autocorrect",!1,function(n,r){return n.getInputField().autocorrect=r},!0),i("autocapitalize",!1,function(n,r){return n.getInputField().autocapitalize=r},!0),i("rtlMoveVisually",!We),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){As(n),Ar(n)},!0),i("keyMap","default",function(n,r,s){var l=io(r),d=s!=ur&&io(s);d&&d.detach&&d.detach(n,l),l.attach&&l.attach(n,d||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Zl,!0),i("gutters",[],function(n,r){n.display.gutterSpecs=Oo(r,n.options.lineNumbers),Ar(n)},!0),i("fixedGutter",!0,function(n,r){n.display.gutters.style.left=r?wo(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return tr(n)},!0),i("scrollbarStyle","native",function(n){Ma(n),tr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,r){n.display.gutterSpecs=Oo(n.options.gutters,r),Ar(n)},!0),i("firstLineNumber",1,Ar,!0),i("lineNumberFormatter",function(n){return n},Ar,!0),i("showCursorWhenSelecting",!1,yr,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,r){r=="nocursor"&&($i(n),n.display.input.blur()),n.display.input.readOnlyChanged(r)}),i("screenReaderLabel",null,function(n,r){r=r===""?null:r,n.display.input.screenReaderLabelChanged(r)}),i("disableInput",!1,function(n,r){r||n.display.input.reset()},!0),i("dragDrop",!0,Xl),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,yr,!0),i("singleCursorHeightPerLine",!0,yr,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Sr,!0),i("addModeClass",!1,Sr,!0),i("pollInterval",100),i("undoDepth",200,function(n,r){return n.doc.history.undoDepth=r}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Sr,!0),i("moveInputWithCursor",!0,function(n,r){r||n.display.input.resetPosition()}),i("tabindex",null,function(n,r){return n.display.input.getField().tabIndex=r||""}),i("autofocus",null),i("direction","ltr",function(n,r){return n.doc.setDirection(r)},!0),i("phrases",null)}function Xl(e,t,i){var n=i&&i!=ur;if(!t!=!n){var r=e.display.dragFunctions,s=t?xe:nt;s(e.display.scroller,"dragstart",r.start),s(e.display.scroller,"dragenter",r.enter),s(e.display.scroller,"dragover",r.over),s(e.display.scroller,"dragleave",r.leave),s(e.display.scroller,"drop",r.drop)}}function Zl(e){e.options.lineWrapping?(G(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(me(e.display.wrapper,"CodeMirror-wrap"),fi(e)),Ao(e),Rn(e),vr(e),setTimeout(function(){return tr(e)},100)}function Yt(e,t){var i=this;if(!(this instanceof Yt))return new Yt(e,t);this.options=t=t?m(t):{},m(Ss,t,!1);var n=t.value;typeof n=="string"?n=new Dn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var r=new Yt.inputStyles[t.inputStyle](this),s=this.display=new hl(e,n,r,t);s.wrapper.CodeMirror=this,As(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ma(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 Ae,keySeq:null,specialChars:null},t.autofocus&&!ee&&s.input.focus(),k&&L<11&&setTimeout(function(){return i.display.input.reset(!0)},20),ql(this),Rl(),Fi(this),this.curOp.forceUpdate=!0,_a(this,n),t.autofocus&&!ee||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&ko(i)},20):$i(this);for(var l in oo)oo.hasOwnProperty(l)&&oo[l](this,t[l],ur);Da(this),t.finishInit&&t.finishInit(this);for(var d=0;d<Qo.length;++d)Qo[d](this);Hi(this),M&&t.lineWrapping&&getComputedStyle(s.lineDiv).textRendering=="optimizelegibility"&&(s.lineDiv.style.textRendering="auto")}Yt.defaults=Ss,Yt.optionHandlers=oo;function ql(e){var t=e.display;xe(t.scroller,"mousedown",hn(e,Cs)),k&&L<11?xe(t.scroller,"dblclick",hn(e,function(f){if(Ue(e,f))return;var v=Ui(e,f);if(!v||Vo(e,f)||pi(e.display,f))return;y(f);var D=e.findWordAt(v);qr(e.doc,D.anchor,D.head)})):xe(t.scroller,"dblclick",function(f){return Ue(e,f)||y(f)}),xe(t.scroller,"contextmenu",function(f){return ws(e,f)}),xe(t.input.getField(),"contextmenu",function(f){t.scroller.contains(f.target)||ws(e,f)});var i,n={end:0};function r(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function s(f){if(f.touches.length!=1)return!1;var v=f.touches[0];return v.radiusX<=1&&v.radiusY<=1}function l(f,v){if(v.left==null)return!0;var D=v.left-f.left,N=v.top-f.top;return D*D+N*N>20*20}xe(t.scroller,"touchstart",function(f){if(!Ue(e,f)&&!s(f)&&!Vo(e,f)){t.input.ensurePolled(),clearTimeout(i);var v=+new Date;t.activeTouch={start:v,moved:!1,prev:v-n.end<=300?n:null},f.touches.length==1&&(t.activeTouch.left=f.touches[0].pageX,t.activeTouch.top=f.touches[0].pageY)}}),xe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),xe(t.scroller,"touchend",function(f){var v=t.activeTouch;if(v&&!pi(t,f)&&v.left!=null&&!v.moved&&new Date-v.start<300){var D=e.coordsChar(t.activeTouch,"page"),N;!v.prev||l(v,v.prev)?N=new Wt(D,D):!v.prev.prev||l(v,v.prev.prev)?N=e.findWordAt(D):N=new Wt(Ne(D.line,0),o(e.doc,Ne(D.line+1,0))),e.setSelection(N.anchor,N.head),e.focus(),y(f)}r()}),xe(t.scroller,"touchcancel",r),xe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Cr(e,t.scroller.scrollTop),Wi(e,t.scroller.scrollLeft,!0),Se(e,"scroll",e))}),xe(t.scroller,"mousewheel",function(f){return Oa(e,f)}),xe(t.scroller,"DOMMouseScroll",function(f){return Oa(e,f)}),xe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(f){Ue(e,f)||T(f)},over:function(f){Ue(e,f)||(Tl(e,f),T(f))},start:function(f){return Ml(e,f)},drop:hn(e,kl),leave:function(f){Ue(e,f)||ss(e)}};var d=t.input.getField();xe(d,"keyup",function(f){return ys.call(e,f)}),xe(d,"keydown",hn(e,vs)),xe(d,"keypress",hn(e,bs)),xe(d,"focus",function(f){return ko(e,f)}),xe(d,"blur",function(f){return $i(e,f)})}var Qo=[];Yt.defineInitHook=function(e){return Qo.push(e)};function Ur(e,t,i,n){var r=e.doc,s;i==null&&(i="add"),i=="smart"&&(r.mode.indent?s=ae(e,t).state:i="prev");var l=e.options.tabSize,d=ht(r,t),f=Y(d.text,null,l);d.stateAfter&&(d.stateAfter=null);var v=d.text.match(/^\s*/)[0],D;if(!n&&!/\S/.test(d.text))D=0,i="not";else if(i=="smart"&&(D=r.mode.indent(s,d.text.slice(v.length),d.text),D==He||D>150)){if(!n)return;i="prev"}i=="prev"?t>r.first?D=Y(ht(r,t-1).text,null,l):D=0:i=="add"?D=f+e.options.indentUnit:i=="subtract"?D=f-e.options.indentUnit:typeof i=="number"&&(D=f+i),D=Math.max(0,D);var N="",ie=0;if(e.options.indentWithTabs)for(var $=Math.floor(D/l);$;--$)ie+=l,N+=" ";if(ie<D&&(N+=_(D-ie)),N!=v)return or(r,N,Ne(t,0),Ne(t,v.length),"+input"),d.stateAfter=null,!0;for(var Ee=0;Ee<r.sel.ranges.length;Ee++){var Le=r.sel.ranges[Ee];if(Le.head.line==t&&Le.head.ch<v.length){var ze=Ne(t,v.length);jo(r,Ee,new Wt(ze,ze));break}}}var ei=null;function ao(e){ei=e}function Jo(e,t,i,n,r){var s=e.doc;e.display.shift=!1,n||(n=s.sel);var l=+new Date-200,d=r=="paste"||e.state.pasteIncoming>l,f=pt(t),v=null;if(d&&n.ranges.length>1)if(ei&&ei.text.join(`
`)==t){if(n.ranges.length%ei.text.length==0){v=[];for(var D=0;D<ei.text.length;D++)v.push(s.splitLines(ei.text[D]))}}else f.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(v=et(f,function(Qe){return[Qe]}));for(var N=e.curOp.updateInput,ie=n.ranges.length-1;ie>=0;ie--){var $=n.ranges[ie],Ee=$.from(),Le=$.to();$.empty()&&(i&&i>0?Ee=Ne(Ee.line,Ee.ch-i):e.state.overwrite&&!d?Le=Ne(Le.line,Math.min(ht(s,Le.line).text.length,Le.ch+Pe(f).length)):d&&ei&&ei.lineWise&&ei.text.join(`
`)==f.join(`
`)&&(Ee=Le=Ne(Ee.line,0)));var ze={from:Ee,to:Le,text:v?v[ie%v.length]:f,origin:r||(d?"paste":e.state.cutIncoming>l?"cut":"+input")};rr(e.doc,ze),Qt(e,"inputRead",e,ze)}t&&!d&&Ms(e,t),er(e),e.curOp.updateInput<2&&(e.curOp.updateInput=N),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ks(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&_n(t,function(){return Jo(t,i,0,null,"paste")}),!0}function Ms(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)continue;var s=e.getModeAt(r.head),l=!1;if(s.electricChars){for(var d=0;d<s.electricChars.length;d++)if(t.indexOf(s.electricChars.charAt(d))>-1){l=Ur(e,r.head.line,"smart");break}}else s.electricInput&&(s.electricInput.test(ht(e.doc,r.head.line).text.slice(0,r.head.ch))&&(l=Ur(e,r.head.line,"smart")));l&&Qt(e,"electricInput",e,r.head.line)}}function Ts(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var r=e.doc.sel.ranges[n].head.line,s={anchor:Ne(r,0),head:Ne(r+1,0)};i.push(s),t.push(e.getRange(s.anchor,s.head))}return{text:t,ranges:i}}function Rs(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Ds(){var e=S("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=S("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return M?e.style.width="1000px":e.setAttribute("wrap","off"),F&&(e.style.border="1px solid black"),Rs(e),t}function $l(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,r){var s=this.options,l=s[n];if(s[n]==r&&n!="mode")return;s[n]=r,t.hasOwnProperty(n)&&hn(this,t[n])(this,r,l),Se(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,r){this.state.keyMaps[r?"push":"unshift"](io(n))},removeKeyMap:function(n){for(var r=this.state.keyMaps,s=0;s<r.length;++s)if(r[s]==n||r[s].name==n)return r.splice(s,1),!0},addOverlay:wn(function(n,r){var s=n.token?n:e.getMode(this.options,n);if(s.startState)throw new Error("Overlays may not be stateful.");st(this.state.overlays,{mode:s,modeSpec:n,opaque:r&&r.opaque,priority:r&&r.priority||0},function(l){return l.priority}),this.state.modeGen++,Rn(this)}),removeOverlay:wn(function(n){for(var r=this.state.overlays,s=0;s<r.length;++s){var l=r[s].modeSpec;if(l==n||typeof n=="string"&&l.name==n){r.splice(s,1),this.state.modeGen++,Rn(this);return}}}),indentLine:wn(function(n,r,s){typeof r!="string"&&typeof r!="number"&&(r==null?r=this.options.smartIndent?"smart":"prev":r=r?"add":"subtract"),hi(this.doc,n)&&Ur(this,n,r,s)}),indentSelection:wn(function(n){for(var r=this.doc.sel.ranges,s=-1,l=0;l<r.length;l++){var d=r[l];if(d.empty())d.head.line>s&&(Ur(this,d.head.line,n,!0),s=d.head.line,l==this.doc.sel.primIndex&&er(this));else{var f=d.from(),v=d.to(),D=Math.max(s,f.line);s=Math.min(this.lastLine(),v.line-(v.ch?0:1))+1;for(var N=D;N<s;++N)Ur(this,N,n);var ie=this.doc.sel.ranges;f.ch==0&&r.length==ie.length&&ie[l].from().ch>0&&jo(this.doc,l,new Wt(f,ie[l].to()),ke)}}}),getTokenAt:function(n,r){return zt(this,n,r)},getLineTokens:function(n,r){return zt(this,Ne(n),r,!0)},getTokenTypeAt:function(n){n=o(this.doc,n);var r=Te(this,ht(this.doc,n.line)),s=0,l=(r.length-1)/2,d=n.ch,f;if(d==0)f=r[2];else for(;;){var v=s+l>>1;if((v?r[v*2-1]:0)>=d)l=v;else if(r[v*2+1]<d)s=v+1;else{f=r[v*2+2];break}}var D=f?f.indexOf("overlay "):-1;return D<0?f:D==0?null:f.slice(0,D-1)},getModeAt:function(n){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(n).state).mode:r},getHelper:function(n,r){return this.getHelpers(n,r)[0]},getHelpers:function(n,r){var s=[];if(!i.hasOwnProperty(r))return s;var l=i[r],d=this.getModeAt(n);if(typeof d[r]=="string")l[d[r]]&&s.push(l[d[r]]);else if(d[r])for(var f=0;f<d[r].length;f++){var v=l[d[r][f]];v&&s.push(v)}else d.helperType&&l[d.helperType]?s.push(l[d.helperType]):l[d.name]&&s.push(l[d.name]);for(var D=0;D<l._global.length;D++){var N=l._global[D];N.pred(d,this)&&ve(s,N.val)==-1&&s.push(N.val)}return s},getStateAfter:function(n,r){var s=this.doc;return n=c(s,n==null?s.first+s.size-1:n),ae(this,n+1,r).state},cursorCoords:function(n,r){var s,l=this.doc.sel.primary();return n==null?s=l.head:typeof n=="object"?s=o(this.doc,n):s=n?l.from():l.to(),qn(this,s,r||"page")},charCoords:function(n,r){return yo(this,o(this.doc,n),r||"page")},coordsChar:function(n,r){return n=da(this,n,r||"page"),Co(this,n.left,n.top)},lineAtHeight:function(n,r){return n=da(this,{top:n,left:0},r||"page").top,Jn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,r,s){var l=!1,d;if(typeof n=="number"){var f=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>f&&(n=f,l=!0),d=ht(this.doc,n)}else d=n;return Fr(this,d,{top:0,left:0},r||"page",s||l).top+(l?this.doc.height-Bn(d):0)},defaultTextHeight:function(){return Zi(this.display)},defaultCharWidth:function(){return qi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,r,s,l,d){var f=this.display;n=qn(this,o(this.doc,n));var v=n.bottom,D=n.left;if(r.style.position="absolute",r.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(r),f.sizer.appendChild(r),l=="over")v=n.top;else if(l=="above"||l=="near"){var N=Math.max(f.wrapper.clientHeight,this.doc.height),ie=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);(l=="above"||n.bottom+r.offsetHeight>N)&&n.top>r.offsetHeight?v=n.top-r.offsetHeight:n.bottom+r.offsetHeight<=N&&(v=n.bottom),D+r.offsetWidth>ie&&(D=ie-r.offsetWidth)}r.style.top=v+"px",r.style.left=r.style.right="",d=="right"?(D=f.sizer.clientWidth-r.offsetWidth,r.style.right="0px"):(d=="left"?D=0:d=="middle"&&(D=(f.sizer.clientWidth-r.offsetWidth)/2),r.style.left=D+"px"),s&&Xs(this,{left:D,top:v,right:D+r.offsetWidth,bottom:v+r.offsetHeight})},triggerOnKeyDown:wn(vs),triggerOnKeyPress:wn(bs),triggerOnKeyUp:ys,triggerOnMouseDown:wn(Cs),execCommand:function(n){if(Pr.hasOwnProperty(n))return Pr[n].call(null,this)},triggerElectric:wn(function(n){Ms(this,n)}),findPosH:function(n,r,s,l){var d=1;r<0&&(d=-1,r=-r);for(var f=o(this.doc,n),v=0;v<r&&!(f=Ko(this.doc,f,d,s,l),f.hitSide);++v);return f},moveH:wn(function(n,r){var s=this;this.extendSelectionsBy(function(l){return s.display.shift||s.doc.extend||l.empty()?Ko(s.doc,l.head,n,r,s.options.rtlMoveVisually):n<0?l.from():l.to()},Ce)}),deleteH:wn(function(n,r){var s=this.doc.sel,l=this.doc;s.somethingSelected()?l.replaceSelection("",null,"+delete"):lr(this,function(d){var f=Ko(l,d.head,n,r,!1);return n<0?{from:f,to:d.head}:{from:d.head,to:f}})}),findPosV:function(n,r,s,l){var d=1,f=l;r<0&&(d=-1,r=-r);for(var v=o(this.doc,n),D=0;D<r;++D){var N=qn(this,v,"div");if(f==null?f=N.left:N.left=f,v=Ls(this,N,d,s),v.hitSide)break}return v},moveV:wn(function(n,r){var s=this,l=this.doc,d=[],f=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(D){if(f)return n<0?D.from():D.to();var N=qn(s,D.head,"div");D.goalColumn!=null&&(N.left=D.goalColumn),d.push(N.left);var ie=Ls(s,N,n,r);return r=="page"&&D==l.sel.primary()&&To(s,yo(s,ie,"div").top-N.top),ie},Ce),d.length)for(var v=0;v<l.sel.ranges.length;v++)l.sel.ranges[v].goalColumn=d[v]}),findWordAt:function(n){var r=this.doc,s=ht(r,n.line).text,l=n.ch,d=n.ch;if(s){var f=this.getHelper(n,"wordChars");(n.sticky=="before"||d==s.length)&&l?--l:++d;for(var v=s.charAt(l),D=Ve(v,f)?function(N){return Ve(N,f)}:/\s/.test(v)?function(N){return/\s/.test(N)}:function(N){return!/\s/.test(N)&&!Ve(N)};l>0&&D(s.charAt(l-1));)--l;for(;d<s.length&&D(s.charAt(d));)++d}return new Wt(Ne(n.line,l),Ne(n.line,d))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?G(this.display.cursorDiv,"CodeMirror-overwrite"):me(this.display.cursorDiv,"CodeMirror-overwrite"),Se(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==R()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:wn(function(n,r){br(this,n,r)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-oi(this)-this.display.barHeight,width:n.scrollWidth-oi(this)-this.display.barWidth,clientHeight:go(this),clientWidth:Bi(this)}},scrollIntoView:wn(function(n,r){n==null?(n={from:this.doc.sel.primary().head,to:null},r==null&&(r=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Ne(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=r||0,n.from.line!=null?Zs(this,n):wa(this,n.from,n.to,n.margin)}),setSize:wn(function(n,r){var s=this,l=function(f){return typeof f=="number"||/^\d+$/.test(String(f))?f+"px":f};n!=null&&(this.display.wrapper.style.width=l(n)),r!=null&&(this.display.wrapper.style.height=l(r)),this.options.lineWrapping&&ua(this);var d=this.display.viewFrom;this.doc.iter(d,this.display.viewTo,function(f){if(f.widgets){for(var v=0;v<f.widgets.length;v++)if(f.widgets[v].noHScroll){wi(s,d,"widget");break}}++d}),this.curOp.forceUpdate=!0,Se(this,"refresh",this)}),operation:function(n){return _n(this,n)},startOperation:function(){return Fi(this)},endOperation:function(){return Hi(this)},refresh:wn(function(){var n=this.display.cachedTextHeight;Rn(this),this.curOp.forceUpdate=!0,vr(this),br(this,this.doc.scrollLeft,this.doc.scrollTop),Lo(this.display),(n==null||Math.abs(n-Zi(this.display))>.5||this.options.lineWrapping)&&Ao(this),Se(this,"refresh",this)}),swapDoc:wn(function(n){var r=this.doc;return r.cm=null,this.state.selectingText&&this.state.selectingText(),_a(this,n),vr(this),this.display.input.reset(),br(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Qt(this,"swapDoc",this,r),r}),phrase:function(n){var r=this.options.phrases;return r&&Object.prototype.hasOwnProperty.call(r,n)?r[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}},H(e),e.registerHelper=function(n,r,s){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][r]=s},e.registerGlobalHelper=function(n,r,s,l){e.registerHelper(n,r,l),i[n]._global.push({pred:s,val:l})}}function Ko(e,t,i,n,r){var s=t,l=i,d=ht(e,t.line),f=r&&e.direction=="rtl"?-i:i;function v(){var Ze=t.line+f;return Ze<e.first||Ze>=e.first+e.size?!1:(t=new Ne(Ze,t.ch,t.sticky),d=ht(e,Ze))}function D(Ze){var Je;if(n=="codepoint"){var ot=d.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(ot)?Je=null:Je=new Ne(t.line,Math.max(0,Math.min(d.text.length,t.ch+i*(ot>=55296&&ot<56320?2:1))),-i)}else r?Je=Pl(e.cm,d,t,i):Je=zo(d,t,i);if(Je==null)if(!Ze&&v())t=Fo(r,e.cm,d,t.line,f);else return!1;else t=Je;return!0}if(n=="char"||n=="codepoint")D();else if(n=="column")D(!0);else if(n=="word"||n=="group")for(var N=null,ie=n=="group",$=e.cm&&e.cm.getHelper(t,"wordChars"),Ee=!0;!(i<0&&!D(!Ee));Ee=!1){var Le=d.text.charAt(t.ch)||`
`,ze=Ve(Le,$)?"w":ie&&Le==`
`?"n":!ie||/\s/.test(Le)?null:"p";if(ie&&!Ee&&!ze&&(ze="s"),N&&N!=ze){i<0&&(i=1,D(),t.sticky="after");break}if(ze&&(N=ze),i>0&&!D(!Ee))break}var Qe=eo(e,t,s,l,!0);return ti(s,Qe)&&(Qe.hitSide=!0),Qe}function Ls(e,t,i,n){var r=e.doc,s=t.left,l;if(n=="page"){var d=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),f=Math.max(d-.5*Zi(e.display),3);l=(i>0?t.bottom:t.top)+i*f}else n=="line"&&(l=i>0?t.bottom+3:t.top-3);for(var v;!(v=Co(e,s,l),!v.outside);){if(i<0?l<=0:l>=r.height){v.hitSide=!0;break}l+=i*5}return v}var Gt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Gt.prototype.init=function(e){var t=this,i=this,n=i.cm,r=i.div=e.lineDiv;Rs(r,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function s(d){for(var f=d.target;f;f=f.parentNode){if(f==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(f.className))break}return!1}xe(r,"paste",function(d){if(!s(d)||Ue(n,d)||ks(d,n))return;L<=11&&setTimeout(hn(n,function(){return t.updateFromDOM()}),20)}),xe(r,"compositionstart",function(d){t.composing={data:d.data,done:!1}}),xe(r,"compositionupdate",function(d){t.composing||(t.composing={data:d.data,done:!1})}),xe(r,"compositionend",function(d){t.composing&&(d.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),xe(r,"touchstart",function(){return i.forceCompositionEnd()}),xe(r,"input",function(){t.composing||t.readFromDOMSoon()});function l(d){if(!s(d)||Ue(n,d))return;if(n.somethingSelected())ao({lineWise:!1,text:n.getSelections()}),d.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var f=Ts(n);ao({lineWise:!0,text:f.text}),d.type=="cut"&&n.operation(function(){n.setSelections(f.ranges,0,ke),n.replaceSelection("",null,"cut")})}else return;if(d.clipboardData){d.clipboardData.clearData();var v=ei.text.join(`
`);if(d.clipboardData.setData("Text",v),d.clipboardData.getData("Text")==v){d.preventDefault();return}}var D=Ds(),N=D.firstChild;n.display.lineSpace.insertBefore(D,n.display.lineSpace.firstChild),N.value=ei.text.join(`
`);var ie=document.activeElement;ce(N),setTimeout(function(){n.display.lineSpace.removeChild(D),ie.focus(),ie==r&&i.showPrimarySelection()},50)}xe(r,"copy",l),xe(r,"cut",l)},Gt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Gt.prototype.prepareSelection=function(){var e=ya(this.cm,!1);return e.focus=document.activeElement==this.div,e},Gt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Gt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Gt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),r=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||r.line<t.display.viewFrom){e.removeAllRanges();return}var s=so(t,e.anchorNode,e.anchorOffset),l=so(t,e.focusNode,e.focusOffset);if(s&&!s.bad&&l&&!l.bad&&xt(Li(s,l),n)==0&&xt(di(s,l),r)==0)return;var d=t.display.view,f=n.line>=t.display.viewFrom&&Is(t,n)||{node:d[0].measure.map[2],offset:0},v=r.line<t.display.viewTo&&Is(t,r);if(!v){var D=d[d.length-1].measure,N=D.maps?D.maps[D.maps.length-1]:D.map;v={node:N[N.length-1],offset:N[N.length-2]-N[N.length-3]}}if(!f||!v){e.removeAllRanges();return}var ie=e.rangeCount&&e.getRangeAt(0),$;try{$=K(f.node,f.offset,v.offset,v.node)}catch(Ee){}$&&(!X&&t.state.focused?(e.collapse(f.node,f.offset),$.collapsed||(e.removeAllRanges(),e.addRange($))):(e.removeAllRanges(),e.addRange($)),ie&&e.anchorNode==null?e.addRange(ie):X&&this.startGracePeriod()),this.rememberSelection()},Gt.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Gt.prototype.showMultipleSelections=function(e){q(this.cm.display.cursorDiv,e.cursors),q(this.cm.display.selectionDiv,e.selection)},Gt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Gt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return b(this.div,t)},Gt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Gt.prototype.blur=function(){this.div.blur()},Gt.prototype.getField=function(){return this.div},Gt.prototype.supportsTouch=function(){return!0},Gt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():_n(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Gt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Gt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(z&&E&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var i=so(t,e.anchorNode,e.anchorOffset),n=so(t,e.focusNode,e.focusOffset);i&&n&&_n(t,function(){xn(t.doc,Si(i,n),ke),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},Gt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),n=i.from(),r=i.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Ne(n.line-1,ht(e.doc,n.line-1).length)),r.ch==ht(e.doc,r.line).text.length&&r.line<e.lastLine()&&(r=Ne(r.line+1,0)),n.line<t.viewFrom||r.line>t.viewTo-1)return!1;var s,l,d;n.line==t.viewFrom||(s=ji(e,n.line))==0?(l=Lt(t.view[0].line),d=t.view[0].node):(l=Lt(t.view[s].line),d=t.view[s-1].node.nextSibling);var f=ji(e,r.line),v,D;if(f==t.view.length-1?(v=t.viewTo-1,D=t.lineDiv.lastChild):(v=Lt(t.view[f+1].line)-1,D=t.view[f+1].node.previousSibling),!d)return!1;for(var N=e.doc.splitLines(tu(e,d,D,l,v)),ie=jn(e.doc,Ne(l,0),Ne(v,ht(e.doc,v).text.length));N.length>1&&ie.length>1;)if(Pe(N)==Pe(ie))N.pop(),ie.pop(),v--;else if(N[0]==ie[0])N.shift(),ie.shift(),l++;else break;for(var $=0,Ee=0,Le=N[0],ze=ie[0],Qe=Math.min(Le.length,ze.length);$<Qe&&Le.charCodeAt($)==ze.charCodeAt($);)++$;for(var Ze=Pe(N),Je=Pe(ie),ot=Math.min(Ze.length-(N.length==1?$:0),Je.length-(ie.length==1?$:0));Ee<ot&&Ze.charCodeAt(Ze.length-Ee-1)==Je.charCodeAt(Je.length-Ee-1);)++Ee;if(N.length==1&&ie.length==1&&l==n.line)for(;$&&$>n.ch&&Ze.charCodeAt(Ze.length-Ee-1)==Je.charCodeAt(Je.length-Ee-1);)$--,Ee++;N[N.length-1]=Ze.slice(0,Ze.length-Ee).replace(/^\u200b+/,""),N[0]=N[0].slice($).replace(/\u200b+$/,"");var Ct=Ne(l,$),mt=Ne(v,ie.length?Pe(ie).length-Ee:0);if(N.length>1||N[0]||xt(Ct,mt))return or(e.doc,N,Ct,mt,"+input"),!0},Gt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Gt.prototype.reset=function(){this.forceCompositionEnd()},Gt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Gt.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)},Gt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&_n(this.cm,function(){return Rn(e.cm)})},Gt.prototype.setUneditable=function(e){e.contentEditable="false"},Gt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||hn(this.cm,Jo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Gt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Gt.prototype.onContextMenu=function(){},Gt.prototype.resetPosition=function(){},Gt.prototype.needsContentAttribute=!0;function Is(e,t){var i=mo(e,t.line);if(!i||i.hidden)return null;var n=ht(e.doc,t.line),r=ra(i,n,t.line),s=at(n,e.doc.direction),l="left";if(s){var d=tt(s,t.ch);l=d%2?"right":"left"}var f=sa(r.map,t.ch,l);return f.offset=f.collapse=="right"?f.end:f.start,f}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function hr(e,t){return t&&(e.bad=!0),e}function tu(e,t,i,n,r){var s="",l=!1,d=e.doc.lineSeparator(),f=!1;function v($){return function(Ee){return Ee.id==$}}function D(){l&&(s+=d,f&&(s+=d),l=f=!1)}function N($){$&&(D(),s+=$)}function ie($){if($.nodeType==1){var Ee=$.getAttribute("cm-text");if(Ee){N(Ee);return}var Le=$.getAttribute("cm-marker"),ze;if(Le){var Qe=e.findMarks(Ne(n,0),Ne(r+1,0),v(+Le));Qe.length&&(ze=Qe[0].find(0))&&N(jn(e.doc,ze.from,ze.to).join(d));return}if($.getAttribute("contenteditable")=="false")return;var Ze=/^(pre|div|p|li|table|br)$/i.test($.nodeName);if(!/^br$/i.test($.nodeName)&&$.textContent.length==0)return;Ze&&D();for(var Je=0;Je<$.childNodes.length;Je++)ie($.childNodes[Je]);/^(pre|p)$/i.test($.nodeName)&&(f=!0),Ze&&(l=!0)}else $.nodeType==3&&N($.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ie(t),t==i);)t=t.nextSibling,f=!1;return s}function so(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return hr(e.clipPos(Ne(e.display.viewTo-1)),!0);t=null,i=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var r=0;r<e.display.view.length;r++){var s=e.display.view[r];if(s.node==n)return nu(s,t,i)}}function nu(e,t,i){var n=e.text.firstChild,r=!1;if(!t||!b(n,t))return hr(Ne(Lt(e.line),0),!0);if(t==n&&(r=!0,t=n.childNodes[i],i=0,!t)){var s=e.rest?Pe(e.rest):e.line;return hr(Ne(Lt(s),s.text.length),r)}var l=t.nodeType==3?t:null,d=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,i&&(i=l.nodeValue.length));d.parentNode!=n;)d=d.parentNode;var f=e.measure,v=f.maps;function D(ze,Qe,Ze){for(var Je=-1;Je<(v?v.length:0);Je++)for(var ot=Je<0?f.map:v[Je],Ct=0;Ct<ot.length;Ct+=3){var mt=ot[Ct+2];if(mt==ze||mt==Qe){var Mt=Lt(Je<0?e.line:e.rest[Je]),Kt=ot[Ct]+Ze;return(Ze<0||mt!=ze)&&(Kt=ot[Ct+(Ze?1:0)]),Ne(Mt,Kt)}}}var N=D(l,d,i);if(N)return hr(N,r);for(var ie=d.nextSibling,$=l?l.nodeValue.length-i:0;ie;ie=ie.nextSibling){if(N=D(ie,ie.firstChild,0),N)return hr(Ne(N.line,N.ch-$),r);$+=ie.textContent.length}for(var Ee=d.previousSibling,Le=i;Ee;Ee=Ee.previousSibling){if(N=D(Ee,Ee.firstChild,-1),N)return hr(Ne(N.line,N.ch+Le),r);Le+=Ee.textContent.length}}var en=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ae,this.hasSelection=!1,this.composing=null};en.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var r=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),F&&(r.style.width="0px"),xe(r,"input",function(){k&&L>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),xe(r,"paste",function(l){if(Ue(n,l)||ks(l,n))return;n.state.pasteIncoming=+new Date,i.fastPoll()});function s(l){if(Ue(n,l))return;if(n.somethingSelected())ao({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var d=Ts(n);ao({lineWise:!0,text:d.text}),l.type=="cut"?n.setSelections(d.ranges,null,ke):(i.prevInput="",r.value=d.text.join(`
`),ce(r))}else return;l.type=="cut"&&(n.state.cutIncoming=+new Date)}xe(r,"cut",s),xe(r,"copy",s),xe(e.scroller,"paste",function(l){if(pi(e,l)||Ue(n,l))return;if(!r.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var d=new Event("paste");d.clipboardData=l.clipboardData,r.dispatchEvent(d)}),xe(e.lineSpace,"selectstart",function(l){pi(e,l)||y(l)}),xe(r,"compositionstart",function(){var l=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:l,range:n.markText(l,n.getCursor("to"),{className:"CodeMirror-composing"})}}),xe(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},en.prototype.createField=function(e){this.wrapper=Ds(),this.textarea=this.wrapper.firstChild},en.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},en.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=ya(e);if(e.options.moveInputWithCursor){var r=qn(e,i.sel.primary().head,"div"),s=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+l.top-s.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+l.left-s.left))}return n},en.prototype.showSelection=function(e){var t=this.cm,i=t.display;q(i.cursorDiv,e.cursors),q(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},en.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&ce(this.textarea),k&&L>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",k&&L>=9&&(this.hasSelection=null))},en.prototype.getField=function(){return this.textarea},en.prototype.supportsTouch=function(){return!1},en.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||R()!=this.textarea))try{this.textarea.focus()}catch(e){}},en.prototype.blur=function(){this.textarea.blur()},en.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},en.prototype.receivedFocus=function(){this.slowPoll()},en.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()})},en.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},en.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Xe(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=i.value;if(r==n&&!t.somethingSelected())return!1;if(k&&L>=9&&this.hasSelection===r||ne&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var s=r.charCodeAt(0);if(s==8203&&!n&&(n="\u200B"),s==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,d=Math.min(n.length,r.length);l<d&&n.charCodeAt(l)==r.charCodeAt(l);)++l;return _n(t,function(){Jo(t,r.slice(l),n.length-l,null,e.composing?"*compose":null),r.length>1e3||r.indexOf(`
`)>-1?i.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},en.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},en.prototype.onKeyPress=function(){k&&L>=9&&(this.hasSelection=null),this.fastPoll()},en.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var s=Ui(i,e),l=n.scroller.scrollTop;if(!s||w)return;var d=i.options.resetSelectionOnContextMenu;d&&i.doc.sel.contains(s)==-1&&hn(i,xn)(i.doc,Si(s),ke);var f=r.style.cssText,v=t.wrapper.style.cssText,D=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",r.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-D.top-5)+"px; left: "+(e.clientX-D.left-5)+`px;
z-index: 1000; background: `+(k?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var N;M&&(N=window.scrollY),n.input.focus(),M&&window.scrollTo(null,N),n.input.reset(),i.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=$,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function ie(){if(r.selectionStart!=null){var Le=i.somethingSelected(),ze="\u200B"+(Le?r.value:"");r.value="\u21DA",r.value=ze,t.prevInput=Le?"":"\u200B",r.selectionStart=1,r.selectionEnd=ze.length,n.selForContextMenu=i.doc.sel}}function $(){if(t.contextMenuPending!=$)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=v,r.style.cssText=f,k&&L<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),r.selectionStart!=null){(!k||k&&L<9)&&ie();var Le=0,ze=function(){n.selForContextMenu==i.doc.sel&&r.selectionStart==0&&r.selectionEnd>0&&t.prevInput=="\u200B"?hn(i,Xa)(i):Le++<10?n.detectingSelectAll=setTimeout(ze,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ze,200)}}if(k&&L>=9&&ie(),Be){T(e);var Ee=function(){nt(window,"mouseup",Ee),setTimeout($,20)};xe(window,"mouseup",Ee)}else setTimeout($,50)},en.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},en.prototype.setUneditable=function(){},en.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?m(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 i=R();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=d.getValue()}var r;if(e.form&&(xe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var s=e.form;r=s.submit;try{var l=s.submit=function(){n(),s.submit=r,s.submit(),s.submit=l}}catch(f){}}t.finishInit=function(f){f.save=n,f.getTextArea=function(){return e},f.toTextArea=function(){f.toTextArea=isNaN,n(),e.parentNode.removeChild(f.getWrapperElement()),e.style.display="",e.form&&(nt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=r))}},e.style.display="none";var d=Yt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return d}function ru(e){e.off=nt,e.on=xe,e.wheelEventPixels=cl,e.Doc=Dn,e.splitLines=pt,e.countColumn=Y,e.findColumn=we,e.isWordChar=_e,e.Pass=He,e.signal=Se,e.Line=Ei,e.changeEnd=ki,e.scrollbarModel=ka,e.Pos=Ne,e.cmpPos=xt,e.modes=_t,e.mimeModes=St,e.resolveMode=dt,e.getMode=Vn,e.modeExtensions=Cn,e.extendMode=pn,e.copyState=Sn,e.startState=Qn,e.innerMode=li,e.commands=Pr,e.keyMap=gi,e.keyName=ds,e.isModifierKey=hs,e.lookupKey=sr,e.normalizeKeyMap=Ol,e.StringStream=Nt,e.SharedTextMarker=Lr,e.TextMarker=Ti,e.LineWidget=Dr,e.e_preventDefault=y,e.e_stopPropagation=C,e.e_stop=T,e.addClass=G,e.contains=b,e.rmClass=me,e.keyNames=Ri}Yl(Yt),$l(Yt);var ou="iter insert remove copy getEditor constructor".split(" ");for(var lo in Dn.prototype)Dn.prototype.hasOwnProperty(lo)&&ve(ou,lo)<0&&(Yt.prototype[lo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Dn.prototype[lo]));return H(Dn),Yt.inputStyles={textarea:en,contenteditable:Gt},Yt.defineMode=function(e){!Yt.defaults.mode&&e!="null"&&(Yt.defaults.mode=e),bn.apply(this,arguments)},Yt.defineMIME=rn,Yt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Yt.defineMIME("text/plain","null"),Yt.defineExtension=function(e,t){Yt.prototype[e]=t},Yt.defineDocExtension=function(e,t){Dn.prototype[e]=t},Yt.fromTextArea=iu,ru(Yt),Yt.version="5.58.2",Yt})},W6BS:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJb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tlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},Xsq0:function(ye,ge,p){ye.exports=p.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(ye,ge,p){"use strict";p.r(ge),p.d(ge,"ResizableTextArea",function(){return ve});var O=p("wx14"),de=p("1OyB"),X=p("vuIU"),se=p("Ji7U"),oe=p("LK+K"),J=p("q1tI"),k=p("VTBJ"),L=p("rePB"),M=p("Zm9Q"),U=p("Kwbf"),E=p("c+Xe"),w=p("m+aA"),V=p("bdgK"),W=new Map;function P(ke){ke.forEach(function(be){var Ce,we=be.target;(Ce=W.get(we))===null||Ce===void 0||Ce.forEach(function(Z){return Z(we)})})}var F=new V.default(P),z=null,ee=null;function ne(ke,be){W.has(ke)||(W.set(ke,new Set),F.observe(ke)),W.get(ke).add(be)}function Re(ke,be){W.has(ke)&&(W.get(ke).delete(be),W.get(ke).size||(F.unobserve(ke),W.delete(ke)))}var We=function(ke){Object(se.a)(Ce,ke);var be=Object(oe.a)(Ce);function Ce(){return Object(de.a)(this,Ce),be.apply(this,arguments)}return Object(X.a)(Ce,[{key:"render",value:function(){return this.props.children}}]),Ce}(J.Component),fe=J.createContext(null);function le(ke){var be=ke.children,Ce=ke.onBatchResize,we=J.useRef(0),Z=J.useRef([]),_=J.useContext(fe),Pe=J.useCallback(function(et,st,qe){we.current+=1;var Ke=we.current;Z.current.push({size:et,element:st,data:qe}),Promise.resolve().then(function(){Ke===we.current&&(Ce==null||Ce(Z.current),Z.current=[])}),_==null||_(et,st,qe)},[Ce,_]);return J.createElement(fe.Provider,{value:Pe},be)}function Be(ke){var be=ke.children,Ce=ke.disabled,we=J.useRef(null),Z=J.useRef(null),_=J.useContext(fe),Pe=J.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),et=J.isValidElement(be)&&Object(E.c)(be),st=et?be.ref:null,qe=J.useMemo(function(){return Object(E.a)(st,we)},[st,we]),Ke=J.useRef(ke);Ke.current=ke;var Me=J.useCallback(function(_e){var Ve=Ke.current,$e=Ve.onResize,Ye=Ve.data,Oe=_e.getBoundingClientRect(),Ge=Oe.width,vt=Oe.height,lt=_e.offsetWidth,rt=_e.offsetHeight,tt=Math.floor(Ge),ft=Math.floor(vt);if(Pe.current.width!==tt||Pe.current.height!==ft||Pe.current.offsetWidth!==lt||Pe.current.offsetHeight!==rt){var at={width:tt,height:ft,offsetWidth:lt,offsetHeight:rt};Pe.current=at;var it=lt===Math.round(Ge)?Ge:lt,xe=rt===Math.round(vt)?vt:rt,gt=Object(k.a)(Object(k.a)({},at),{},{offsetWidth:it,offsetHeight:xe});_==null||_(gt,_e,Ye),$e&&Promise.resolve().then(function(){$e(gt,_e)})}},[]);return J.useEffect(function(){var _e=Object(w.a)(we.current)||Object(w.a)(Z.current);return _e&&!Ce&&ne(_e,Me),function(){return Re(_e,Me)}},[we.current,Ce]),J.createElement(We,{ref:Z},et?J.cloneElement(be,{ref:qe}):be)}var ue="rc-observer-key";function me(ke){var be=ke.children,Ce=Object(M.a)(be);return Ce.map(function(we,Z){var _=(we==null?void 0:we.key)||"".concat(ue,"-").concat(Z);return J.createElement(Be,Object(O.a)({},ke,{key:_}),we)})}me.Collection=le;var he=me,q=p("bT9E"),S=p("TSYQ"),te=p.n(S),K=`
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
`,b=["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"],R={},G;function I(ke){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=ke.getAttribute("id")||ke.getAttribute("data-reactid")||ke.getAttribute("name");if(be&&R[Ce])return R[Ce];var we=window.getComputedStyle(ke),Z=we.getPropertyValue("box-sizing")||we.getPropertyValue("-moz-box-sizing")||we.getPropertyValue("-webkit-box-sizing"),_=parseFloat(we.getPropertyValue("padding-bottom"))+parseFloat(we.getPropertyValue("padding-top")),Pe=parseFloat(we.getPropertyValue("border-bottom-width"))+parseFloat(we.getPropertyValue("border-top-width")),et=b.map(function(qe){return"".concat(qe,":").concat(we.getPropertyValue(qe))}).join(";"),st={sizingStyle:et,paddingSize:_,borderSize:Pe,boxSizing:Z};return be&&Ce&&(R[Ce]=st),st}function ce(ke){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;G||(G=document.createElement("textarea"),G.setAttribute("tab-index","-1"),G.setAttribute("aria-hidden","true"),document.body.appendChild(G)),ke.getAttribute("wrap")?G.setAttribute("wrap",ke.getAttribute("wrap")):G.removeAttribute("wrap");var Z=I(ke,be),_=Z.paddingSize,Pe=Z.borderSize,et=Z.boxSizing,st=Z.sizingStyle;G.setAttribute("style","".concat(st,";").concat(K)),G.value=ke.value||ke.placeholder||"";var qe=Number.MIN_SAFE_INTEGER,Ke=Number.MAX_SAFE_INTEGER,Me=G.scrollHeight,_e;if(et==="border-box"?Me+=Pe:et==="content-box"&&(Me-=_),Ce!==null||we!==null){G.value=" ";var Ve=G.scrollHeight-_;Ce!==null&&(qe=Ve*Ce,et==="border-box"&&(qe=qe+_+Pe),Me=Math.max(qe,Me)),we!==null&&(Ke=Ve*we,et==="border-box"&&(Ke=Ke+_+Pe),_e=Me>Ke?"":"hidden",Me=Math.min(Ke,Me))}return{height:Me,minHeight:qe,maxHeight:Ke,overflowY:_e,resize:"none"}}var x=p("Gytx"),m=p.n(x),Y;(function(ke){ke[ke.NONE=0]="NONE",ke[ke.RESIZING=1]="RESIZING",ke[ke.RESIZED=2]="RESIZED"})(Y||(Y={}));var Ae=function(ke){Object(se.a)(Ce,ke);var be=Object(oe.a)(Ce);function Ce(we){var Z;return Object(de.a)(this,Ce),Z=be.call(this,we),Z.nextFrameActionId=void 0,Z.resizeFrameId=void 0,Z.textArea=void 0,Z.saveTextArea=function(_){Z.textArea=_},Z.handleResize=function(_){var Pe=Z.state.resizeStatus,et=Z.props,st=et.autoSize,qe=et.onResize;if(Pe!==Y.NONE)return;typeof qe=="function"&&qe(_),st&&Z.resizeOnNextFrame()},Z.resizeOnNextFrame=function(){cancelAnimationFrame(Z.nextFrameActionId),Z.nextFrameActionId=requestAnimationFrame(Z.resizeTextarea)},Z.resizeTextarea=function(){var _=Z.props.autoSize;if(!_||!Z.textArea)return;var Pe=_.minRows,et=_.maxRows,st=ce(Z.textArea,!1,Pe,et);Z.setState({textareaStyles:st,resizeStatus:Y.RESIZING},function(){cancelAnimationFrame(Z.resizeFrameId),Z.resizeFrameId=requestAnimationFrame(function(){Z.setState({resizeStatus:Y.RESIZED},function(){Z.resizeFrameId=requestAnimationFrame(function(){Z.setState({resizeStatus:Y.NONE}),Z.fixFirefoxAutoScroll()})})})})},Z.renderTextArea=function(){var _=Z.props,Pe=_.prefixCls,et=Pe===void 0?"rc-textarea":Pe,st=_.autoSize,qe=_.onResize,Ke=_.className,Me=_.disabled,_e=Z.state,Ve=_e.textareaStyles,$e=_e.resizeStatus,Ye=Object(q.a)(Z.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Oe=te()(et,Ke,Object(L.a)({},"".concat(et,"-disabled"),Me));"value"in Ye&&(Ye.value=Ye.value||"");var Ge=Object(k.a)(Object(k.a)(Object(k.a)({},Z.props.style),Ve),$e===Y.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return J.createElement(he,{onResize:Z.handleResize,disabled:!(st||qe)},J.createElement("textarea",Object(O.a)({},Ye,{className:Oe,style:Ge,ref:Z.saveTextArea})))},Z.state={textareaStyles:{},resizeStatus:Y.NONE},Z}return Object(X.a)(Ce,[{key:"componentDidUpdate",value:function(Z){(Z.value!==this.props.value||!m()(Z.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 Z=this.textArea.selectionStart,_=this.textArea.selectionEnd;this.textArea.setSelectionRange(Z,_)}}catch(Pe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ce}(J.Component),ve=Ae,Fe=function(ke){Object(se.a)(Ce,ke);var be=Object(oe.a)(Ce);function Ce(we){var Z;Object(de.a)(this,Ce),Z=be.call(this,we),Z.resizableTextArea=void 0,Z.focus=function(){Z.resizableTextArea.textArea.focus()},Z.saveTextArea=function(Pe){Z.resizableTextArea=Pe},Z.handleChange=function(Pe){var et=Z.props.onChange;Z.setValue(Pe.target.value,function(){Z.resizableTextArea.resizeTextarea()}),et&&et(Pe)},Z.handleKeyDown=function(Pe){var et=Z.props,st=et.onPressEnter,qe=et.onKeyDown;Pe.keyCode===13&&st&&st(Pe),qe&&qe(Pe)};var _=typeof we.value=="undefined"||we.value===null?we.defaultValue:we.value;return Z.state={value:_},Z}return Object(X.a)(Ce,[{key:"setValue",value:function(Z,_){"value"in this.props||this.setState({value:Z},_)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return J.createElement(ve,Object(O.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Z){return"value"in Z?{value:Z.value}:null}}]),Ce}(J.Component),He=ge.default=Fe},ZW9T:function(ye,ge,p){"use strict";p.d(ge,"a",function(){return We});var O=p("k1fw"),de=p("miYZ"),X=p("tsqr"),se=p("rAM+"),oe=p("tJVT"),J=p("PpiC"),k=p("q1tI"),L=p.n(k),M=p("bdgK");function U(fe,le,Be,ue,me){var he=le.getWordUntilPosition(Be),q={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},S=ue.map(function(te){return{label:te,kind:fe.languages.CompletionItemKind.Keyword,insertText:te,insertTextRules:fe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:q}});return me.map(function(te){S.push(Object(O.a)(Object(O.a)({},te),{},{range:q}))}),S}var E=function(fe){var le={label:"ifelse",kind:fe.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:fe.languages.CompletionItemInsertTextRule.InsertAsSnippet},Be=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];fe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(q,S){var te=U(fe,q,S,Be,[le]);return{suggestions:te}}});var ue=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];fe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(q,S){var te=[{label:"print",kind:fe.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:fe.languages.CompletionItemInsertTextRule.InsertAsSnippet}],K=U(fe,q,S,ue,te);return{suggestions:K}}});var me=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];fe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(q,S){var te=[le,{label:"main",kind:fe.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:fe.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:fe.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:fe.languages.CompletionItemInsertTextRule.InsertAsSnippet}],K=U(fe,q,S,me,te);return{suggestions:K}}})},w="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",V=p("LvDl");function W(fe){return/^\d+$/.test(fe)?"".concat(fe,"px"):fe}function P(){}var F=!1,z={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function ee(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],le=fe;if(Array.isArray(fe)){for(var Be=0;Be<fe.length;Be++){var ue=z[fe[Be]];if(ue)return ue}return le[0]}return z[le]||le}var ne=null,Re=ge.b=function(fe){var le=fe.width,Be=le===void 0?"100%":le,ue=fe.height,me=ue===void 0?"100%":ue,he=fe.value,q=fe.language,S=q===void 0?"javascript":q,te=fe.style,K=te===void 0?{}:te,b=fe.options,R=b===void 0?{}:b,G=fe.overrideServices,I=G===void 0?{}:G,ce=fe.theme,x=ce===void 0?"vs-dark":ce,m=fe.onEditBlur,Y=fe.onSave,Ae=fe.autoHeight,ve=Ae===void 0?!1:Ae,Fe=fe.forbidCopy,He=Fe===void 0?!1:Fe,ke=fe.onChange,be=ke===void 0?P:ke,Ce=fe.editorDidMount,we=Ce===void 0?P:Ce,Z=fe.onFocus,_=Z===void 0?P:Z,Pe=fe.filename,et=Pe===void 0?"educoder.txt":Pe,st=Object(J.a)(fe,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),qe=Object(k.useRef)(),Ke=Object(k.useRef)({}),Me=Object(k.useRef)(),_e=Object(k.useRef)(!1),Ve=Object(k.useRef)(),$e=Object(k.useState)(!1),Ye=Object(oe.a)($e,2),Oe=Ye[0],Ge=Ye[1];function vt(){var A;return qe.current&&(A=new M.default(function(T){var re=Object(se.a)(T),pe;try{for(re.s();!(pe=re.n()).done;){var je=pe.value;(je.target.offsetHeight>0||je.target.offsetWidth>0)&&Ke.current.instance.layout()}}catch(yt){re.e(yt)}finally{re.f()}}),A.observe(qe.current)),A}function lt(){X.b.warn(decodeURIComponent(w))}var rt=function(){var T=Ke.current.instance;if(he!=null&&T&&Oe){var re=T.getModel();re&&he!==re.getValue()&&(F=!0,re.setValue(he),T.layout(),F=!1)}};Object(k.useEffect)(function(){Me.current&&clearTimeout(Me.current),Me.current=setTimeout(function(){rt()},500)},[he,Oe,Ke.current]);function tt(){var A=Ke.current.instance;if(A){var T=A.getSelection(),re=Ke.current.pastePos||{},pe=new ne.Range(re.startLineNumber||T.endLineNumber,re.startColumn||T.endColumn,re.endLineNumber||T.endLineNumber,re.endColumn||T.endColumn);setTimeout(function(){A.executeEdits("",[{range:pe,text:""}])},300)}}function ft(A){(window.navigator.platform.match("Mac")?A.metaKey:A.ctrlKey)&&A.keyCode==83&&(A.preventDefault(),Y())}var at=function(){if(ve&&Ke.current.instance){var T=Ke.current.instance.getContentHeight();y(T<me?me:T)}else y(me)};function it(A){var T=document.createEvent("MouseEvents");T.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),A.dispatchEvent(T)}function xe(A,T){var re=window.URL||window.webkitURL||window,pe=new Blob([T]),je=document.createElementNS("http://www.w3.org/1999/xhtml","a");je.href=re.createObjectURL(pe),je.download=A,it(je)}Object(k.useEffect)(function(){at()},[at]),Object(k.useEffect)(function(){qe.current&&!Oe&&p.e(27).then(p.t.bind(null,"M/lh",7)).then(function(A){try{ne=A,Ke.current.instance=ne.editor.create(qe.current,{value:he,language:ee(S),theme:x,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},I);var T=Ke.current.instance;if(we(T,ne),setTimeout(function(){at(),Ke.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){xe(et||"educoder.txt",T.getValue())}})},500),Ke.current.subscription=T.onDidChangeModelContent(function(pe){_e.current?clearTimeout(Ve.current):(at(),be(T.getValue(),pe)),Ve.current=setTimeout(function(){_e.current=!1},500)}),window.Monaco||E(ne),He&&(T.addCommand(ne.KeyMod.CtrlCmd|ne.KeyMod.Shift|ne.KeyCode.KEY_V,function(){return lt(),null}),T.addCommand(ne.KeyMod.CtrlCmd|ne.KeyCode.KEY_C,function(){return lt(),null})),window.Monaco=ne,m&&T.onDidBlurEditorWidget(function(){m(T.getValue())}),_&&T.onDidFocusEditorText(function(){_(T.getValue())}),He){T.addCommand(ne.KeyMod.CtrlCmd|ne.KeyCode.KEY_V,function(){return lt(),null}),T.onDidPaste(function(pe){Ke.current.pastePos=pe});try{window.addEventListener("paste",tt)}catch(pe){}}var re=vt();return Ge(!0),function(){var pe=Ke.current.instance;pe.dispose();var je=pe.getModel();je&&je.dispose(),Ke.current.subscription&&Ke.current.subscription.dispose(),He&&window.removeEventListener("paste",tt),re.unobserve(qe.current)}}catch(pe){}})},[]),Object(k.useEffect)(function(){var A=Ke.current.instance;if(A&&Oe)return document.addEventListener("keydown",ft,!1),function(){document.removeEventListener("keydown",ft)}},[Y,Oe]),Object(k.useEffect)(function(){var A=Ke.current.instance;if(A&&Oe){var T=ee(S);ne.editor.setModelLanguage(A.getModel(),T),console.log("language:",S,A.getModel(),T)}},[S,Oe]),Object(k.useEffect)(function(){var A=Ke.current.instance;A&&Oe&&ne.editor.setTheme(x)},[x,Oe]),Object(k.useEffect)(function(){var A=Ke.current.instance;A&&Oe&&(A.updateOptions(Object(O.a)({},R)),setTimeout(function(){A.getModel().updateOptions(Object(O.a)({},R))},200))},[JSON.stringify(R),Oe]),Object(k.useEffect)(function(){var A=Ke.current.instance;A&&Oe&&A.layout()},[Be,me,Oe]);var gt=Object(k.useState)(W(Be)),nt=Object(oe.a)(gt,2),Se=nt[0],Ue=nt[1],Q=Object(k.useState)(W(me)),j=Object(oe.a)(Q,2),H=j[0],y=j[1],C=Object(O.a)(Object(O.a)({},K),{},{width:Se,height:H});return L.a.createElement("div",{className:"my-monaco-editor",ref:qe,style:C})};function We(fe){var le=fe.width,Be=le===void 0?"100%":le,ue=fe.height,me=ue===void 0?"100%":ue,he=fe.original,q=fe.modified,S=fe.language,te=fe.options,K=te===void 0?{}:te,b=Object(k.useRef)(),R=Object(k.useState)(null),G=Object(oe.a)(R,2),I=G[0],ce=G[1];function x(ve){var Fe;return b.current&&(Fe=new M.default(function(He){var ke=Object(se.a)(He),be;try{for(ke.s();!(be=ke.n()).done;){var Ce=be.value;(Ce.target.offsetHeight>0||Ce.target.offsetWidth>0)&&ve.layout()}}catch(we){ke.e(we)}finally{ke.f()}}),Fe.observe(b.current)),Fe}Object(k.useEffect)(function(){b.current&&p.e(27).then(p.t.bind(null,"M/lh",7)).then(function(ve){ne=ve;var Fe=ne.editor.createDiffEditor(b.current,Object(O.a)(Object(O.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},K),{},{wordWrap:!0}));ce(Fe);var He=x(Fe);return function(){Fe.dispose();var ke=Fe.getModel();ke&&ke.dispose(),He.unobserve(b.current)}})},[]),Object(k.useEffect)(function(){I&&I.setModel({original:ne.editor.createModel(he,S),modified:ne.editor.createModel(q,S)})},[he,q,S,I]);var m=W(Be),Y=W(me),Ae={width:m,height:Y};return L.a.createElement("div",{className:"my-diff-editor",ref:b,style:Ae})}},ZpRC:function(ye,ge,p){"use strict";function O(E){return typeof E=="object"&&E!=null&&E.nodeType===1}function de(E,w){return(!w||E!=="hidden")&&E!=="visible"&&E!=="clip"}function X(E,w){if(E.clientHeight<E.scrollHeight||E.clientWidth<E.scrollWidth){var V=getComputedStyle(E,null);return de(V.overflowY,w)||de(V.overflowX,w)||function(W){var P=function(F){if(!F.ownerDocument||!F.ownerDocument.defaultView)return null;try{return F.ownerDocument.defaultView.frameElement}catch(z){return null}}(W);return!!P&&(P.clientHeight<W.scrollHeight||P.clientWidth<W.scrollWidth)}(E)}return!1}function se(E,w,V,W,P,F,z,ee){return F<E&&z>w||F>E&&z<w?0:F<=E&&ee<=V||z>=w&&ee>=V?F-E-W:z>w&&ee<V||F<E&&ee>V?z-w+P:0}var oe=function(E,w){var V=window,W=w.scrollMode,P=w.block,F=w.inline,z=w.boundary,ee=w.skipOverflowHiddenElements,ne=typeof z=="function"?z:function(Ve){return Ve!==z};if(!O(E))throw new TypeError("Invalid target");for(var Re=document.scrollingElement||document.documentElement,We=[],fe=E;O(fe)&&ne(fe);){if((fe=fe.parentElement)===Re){We.push(fe);break}fe!=null&&fe===document.body&&X(fe)&&!X(document.documentElement)||fe!=null&&X(fe,ee)&&We.push(fe)}for(var le=V.visualViewport?V.visualViewport.width:innerWidth,Be=V.visualViewport?V.visualViewport.height:innerHeight,ue=window.scrollX||pageXOffset,me=window.scrollY||pageYOffset,he=E.getBoundingClientRect(),q=he.height,S=he.width,te=he.top,K=he.right,b=he.bottom,R=he.left,G=P==="start"||P==="nearest"?te:P==="end"?b:te+q/2,I=F==="center"?R+S/2:F==="end"?K:R,ce=[],x=0;x<We.length;x++){var m=We[x],Y=m.getBoundingClientRect(),Ae=Y.height,ve=Y.width,Fe=Y.top,He=Y.right,ke=Y.bottom,be=Y.left;if(W==="if-needed"&&te>=0&&R>=0&&b<=Be&&K<=le&&te>=Fe&&b<=ke&&R>=be&&K<=He)return ce;var Ce=getComputedStyle(m),we=parseInt(Ce.borderLeftWidth,10),Z=parseInt(Ce.borderTopWidth,10),_=parseInt(Ce.borderRightWidth,10),Pe=parseInt(Ce.borderBottomWidth,10),et=0,st=0,qe="offsetWidth"in m?m.offsetWidth-m.clientWidth-we-_:0,Ke="offsetHeight"in m?m.offsetHeight-m.clientHeight-Z-Pe:0;if(Re===m)et=P==="start"?G:P==="end"?G-Be:P==="nearest"?se(me,me+Be,Be,Z,Pe,me+G,me+G+q,q):G-Be/2,st=F==="start"?I:F==="center"?I-le/2:F==="end"?I-le:se(ue,ue+le,le,we,_,ue+I,ue+I+S,S),et=Math.max(0,et+me),st=Math.max(0,st+ue);else{et=P==="start"?G-Fe-Z:P==="end"?G-ke+Pe+Ke:P==="nearest"?se(Fe,ke,Ae,Z,Pe+Ke,G,G+q,q):G-(Fe+Ae/2)+Ke/2,st=F==="start"?I-be-we:F==="center"?I-(be+ve/2)+qe/2:F==="end"?I-He+_+qe:se(be,He,ve,we,_+qe,I,I+S,S);var Me=m.scrollLeft,_e=m.scrollTop;G+=_e-(et=Math.max(0,Math.min(_e+et,m.scrollHeight-Ae+Ke))),I+=Me-(st=Math.max(0,Math.min(Me+st,m.scrollWidth-ve+qe)))}ce.push({el:m,top:et,left:st})}return ce};function J(E){return E===Object(E)&&Object.keys(E).length!==0}function k(E,w){w===void 0&&(w="auto");var V="scrollBehavior"in document.body.style;E.forEach(function(W){var P=W.el,F=W.top,z=W.left;P.scroll&&V?P.scroll({top:F,left:z,behavior:w}):(P.scrollTop=F,P.scrollLeft=z)})}function L(E){return E===!1?{block:"end",inline:"nearest"}:J(E)?E:{block:"start",inline:"nearest"}}function M(E,w){var V=!E.ownerDocument.documentElement.contains(E);if(J(w)&&typeof w.behavior=="function")return w.behavior(V?[]:oe(E,w));if(V)return;var W=L(w);return k(oe(E,W),W.behavior)}var U=ge.a=M},aRTE:function(ye,ge){ye.exports={L:1,M:0,Q:3,H:2}},bT9E:function(ye,ge,p){"use strict";p.d(ge,"a",function(){return de});var O=p("VTBJ");function de(X,se){var oe=Object(O.a)({},X);return Array.isArray(se)&&se.forEach(function(J){delete oe[J]}),oe}},c5Ni:function(ye,ge,p){},cRFk:function(ye,ge,p){ye.exports=p.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(ye,ge,p){ye.exports=p.p+"static/choose.4ad1045f.svg"},dQei:function(ye,ge){for(var p={glog:function(de){if(de<1)throw new Error("glog("+de+")");return p.LOG_TABLE[de]},gexp:function(de){for(;de<0;)de+=255;for(;de>=256;)de-=255;return p.EXP_TABLE[de]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},O=0;O<8;O++)p.EXP_TABLE[O]=1<<O;for(var O=8;O<256;O++)p.EXP_TABLE[O]=p.EXP_TABLE[O-4]^p.EXP_TABLE[O-5]^p.EXP_TABLE[O-6]^p.EXP_TABLE[O-8];for(var O=0;O<255;O++)p.LOG_TABLE[p.EXP_TABLE[O]]=O;ye.exports=p},dWSS:function(ye,ge,p){var O=p("dQei");function de(X,se){if(X.length==null)throw new Error(X.length+"/"+se);for(var oe=0;oe<X.length&&X[oe]==0;)oe++;this.num=new Array(X.length-oe+se);for(var J=0;J<X.length-oe;J++)this.num[J]=X[J+oe]}de.prototype={get:function(X){return this.num[X]},getLength:function(){return this.num.length},multiply:function(X){for(var se=new Array(this.getLength()+X.getLength()-1),oe=0;oe<this.getLength();oe++)for(var J=0;J<X.getLength();J++)se[oe+J]^=O.gexp(O.glog(this.get(oe))+O.glog(X.get(J)));return new de(se,0)},mod:function(X){if(this.getLength()-X.getLength()<0)return this;for(var se=O.glog(this.get(0))-O.glog(X.get(0)),oe=new Array(this.getLength()),J=0;J<this.getLength();J++)oe[J]=this.get(J);for(var J=0;J<X.getLength();J++)oe[J]^=O.gexp(O.glog(X.get(J))+se);return new de(oe,0).mod(X)}},ye.exports=de},dejd:function(ye,ge,p){},djh8:function(ye,ge,p){ye.exports=p.p+"static/qrCode.42927872.png"},dmUQ:function(ye,ge,p){"use strict";var O=p("Ff2n"),de=p("rePB"),X=p("1OyB"),se=p("vuIU"),oe=p("Ji7U"),J=p("md7G"),k=p("foSv"),L=p("q1tI"),M=p.n(L),U=p("TSYQ"),E=p.n(U),w=p("4IlW");function V(q,S){var te=Object.keys(q);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(q);S&&(K=K.filter(function(b){return Object.getOwnPropertyDescriptor(q,b).enumerable})),te.push.apply(te,K)}return te}function W(q){for(var S=1;S<arguments.length;S++){var te=arguments[S]!=null?arguments[S]:{};S%2?V(Object(te),!0).forEach(function(K){Object(de.a)(q,K,te[K])}):Object.getOwnPropertyDescriptors?Object.defineProperties(q,Object.getOwnPropertyDescriptors(te)):V(Object(te)).forEach(function(K){Object.defineProperty(q,K,Object.getOwnPropertyDescriptor(te,K))})}return q}function P(q){var S=F();return function(){var K=Object(k.a)(q),b;if(S){var R=Object(k.a)(this).constructor;b=Reflect.construct(K,arguments,R)}else b=K.apply(this,arguments);return Object(J.a)(this,b)}}function F(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(q){return!1}}function z(){}function ee(q){q.preventDefault()}var ne=function(S){return S.replace(/[^\w.-]+/g,"")},Re=200,We=600,fe=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,le=function(S){return S!=null},Be=function(S,te){return te===S||typeof te=="number"&&typeof S=="number"&&isNaN(te)&&isNaN(S)},ue=function(q){Object(oe.a)(te,q);var S=P(te);function te(K){var b;Object(X.a)(this,te),b=S.call(this,K),b.onKeyDown=function(I){var ce=b.props,x=ce.onKeyDown,m=ce.onPressEnter;if(I.keyCode===w.a.UP){var Y=b.getRatio(I);b.up(I,Y,null),b.stop()}else if(I.keyCode===w.a.DOWN){var Ae=b.getRatio(I);b.down(I,Ae,null),b.stop()}else I.keyCode===w.a.ENTER&&m&&m(I);if(b.recordCursorPosition(),b.lastKeyCode=I.keyCode,x){for(var ve=arguments.length,Fe=new Array(ve>1?ve-1:0),He=1;He<ve;He++)Fe[He-1]=arguments[He];x.apply(void 0,[I].concat(Fe))}},b.onKeyUp=function(I){var ce=b.props.onKeyUp;if(b.stop(),b.recordCursorPosition(),ce){for(var x=arguments.length,m=new Array(x>1?x-1:0),Y=1;Y<x;Y++)m[Y-1]=arguments[Y];ce.apply(void 0,[I].concat(m))}},b.onChange=function(I){var ce=b.props.onChange;b.state.focused&&(b.inputting=!0),b.rawInput=b.props.parser(b.getValueFromEvent(I)),b.setState({inputValue:b.rawInput}),ce(b.toNumber(b.rawInput))},b.onMouseUp=function(){var I=b.props.onMouseUp;b.recordCursorPosition(),I&&I.apply(void 0,arguments)},b.onFocus=function(){var I;b.setState({focused:!0}),(I=b.props).onFocus.apply(I,arguments)},b.onBlur=function(){var I=b.props.onBlur;b.inputting=!1,b.setState({focused:!1});var ce=b.getCurrentValidValue(b.state.inputValue),x=b.setValue(ce,z);if(I){var m=b.input.value,Y=b.getInputDisplayValue({focus:!1,value:x});b.input.value=Y&&Number(Y),I.apply(void 0,arguments),b.input.value=m}},b.getRatio=function(I){var ce=1;return I.metaKey||I.ctrlKey?ce=.1:I.shiftKey&&(ce=10),ce},b.getFullNum=function(I){return isNaN(I)?I:/e/i.test(String(I))?Number(I).toFixed(18).replace(/\.?0+$/,""):I},b.getPrecision=function(I){if(le(b.props.precision))return b.props.precision;var ce=String(I);if(ce.indexOf("e-")>=0)return parseInt(ce.slice(ce.indexOf("e-")+2),10);var x=0;return ce.indexOf(".")>=0&&(x=ce.length-ce.indexOf(".")-1),x},b.getInputDisplayValue=function(I){var ce=I||b.state,x=ce.focused,m=ce.inputValue,Y=ce.value,Ae;x?Ae=m:Ae=b.toPrecisionAsStep(Y),Ae==null&&(Ae="");var ve=b.formatWrapper(Ae);return le(b.props.decimalSeparator)&&(ve=ve.toString().replace(".",b.props.decimalSeparator)),ve},b.recordCursorPosition=function(){try{b.cursorStart=b.input.selectionStart,b.cursorEnd=b.input.selectionEnd,b.currentValue=b.input.value,b.cursorBefore=b.input.value.substring(0,b.cursorStart),b.cursorAfter=b.input.value.substring(b.cursorEnd)}catch(I){}},b.restoreByAfter=function(I){if(I===void 0)return!1;var ce=b.input.value,x=ce.lastIndexOf(I);if(x===-1)return!1;var m=b.cursorBefore.length;return b.lastKeyCode===w.a.DELETE&&b.cursorBefore.charAt(m-1)===I[0]?(b.fixCaret(m,m),!0):x+I.length===ce.length?(b.fixCaret(x,x),!0):!1},b.partRestoreByAfter=function(I){return I===void 0?!1:Array.prototype.some.call(I,function(ce,x){var m=I.substring(x);return b.restoreByAfter(m)})},b.isNotCompleteNumber=function(I){return isNaN(I)||I===""||I===null||I&&I.toString().indexOf(".")===I.toString().length-1},b.stop=function(){b.autoStepTimer&&clearTimeout(b.autoStepTimer)},b.down=function(I,ce,x){b.pressingUpOrDown=!0,b.step("down",I,ce,x)},b.up=function(I,ce,x){b.pressingUpOrDown=!0,b.step("up",I,ce,x)},b.saveInput=function(I){b.input=I};var R=K.value;R===void 0&&(R=K.defaultValue),b.state={focused:K.autoFocus};var G=b.getValidValue(b.toNumber(R));return b.state=W(W({},b.state),{},{inputValue:b.toPrecisionAsStep(G),value:G}),b}return Object(se.a)(te,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(b){var R=this.props,G=R.value,I=R.onChange,ce=R.max,x=R.min,m=this.state.focused;if(b){if(!Be(b.value,G)||!Be(b.max,ce)||!Be(b.min,x)){var Y=m?G:this.getValidValue(G),Ae;this.pressingUpOrDown?Ae=Y:this.inputting?Ae=this.rawInput:Ae=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:Ae})}var ve="value"in this.props?G:this.state.value;"max"in this.props&&b.max!==ce&&typeof ve=="number"&&ve>ce&&I&&I(ce),"min"in this.props&&b.min!==x&&typeof ve=="number"&&ve<x&&I&&I(x)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Fe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===w.a.BACKSPACE?Fe=this.cursorStart-1:this.lastKeyCode===w.a.DELETE&&(Fe=this.cursorStart):Fe=this.input.value.length,this.fixCaret(Fe,Fe)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case w.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case w.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(He){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(b){var R=b;return R===""?R="":this.isNotCompleteNumber(parseFloat(R))?R=this.state.value:R=this.getValidValue(R),this.toNumber(R)}},{key:"getValueFromEvent",value:function(b){var R=b.target.value.trim().replace(/。/g,".");return le(this.props.decimalSeparator)&&(R=R.replace(this.props.decimalSeparator,".")),R}},{key:"getValidValue",value:function(b){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,I=parseFloat(b);return isNaN(I)?b:(I<R&&(I=R),I>G&&(I=G),I)}},{key:"setValue",value:function(b,R){var G=this.props.precision,I=this.isNotCompleteNumber(parseFloat(b))?null:parseFloat(b),ce=this.state.value,x=ce===void 0?null:ce,m=this.state.inputValue,Y=m===void 0?null:m,Ae=typeof I=="number"?I.toFixed(G):"".concat(I),ve=I!==x||Ae!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},R)):this.setState({value:I,inputValue:this.toPrecisionAsStep(b)},R),ve&&this.props.onChange(I),I}},{key:"getMaxPrecision",value:function(b){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.props,I=G.precision,ce=G.step;if(le(I))return I;var x=this.getPrecision(R),m=this.getPrecision(ce),Y=this.getPrecision(b);return b?Math.max(Y,x+m):x+m}},{key:"getPrecisionFactor",value:function(b){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.getMaxPrecision(b,R);return Math.pow(10,G)}},{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(b){return this.props.formatter?this.props.formatter(b):b}},{key:"toPrecisionAsStep",value:function(b){if(this.isNotCompleteNumber(b)||b==="")return b;var R=Math.abs(this.getMaxPrecision(b));return isNaN(R)?b.toString():Number(b).toFixed(R)}},{key:"toNumber",value:function(b){var R=this.props.precision,G=this.state.focused,I=b&&b.length>16&&G;return this.isNotCompleteNumber(b)||I?b:le(R)?Math.round(b*Math.pow(10,R))/Math.pow(10,R):Number(b)}},{key:"upStep",value:function(b,R){var G=this.props.step,I=this.getPrecisionFactor(b,R),ce=Math.abs(this.getMaxPrecision(b,R)),x=((I*b+I*G*R)/I).toFixed(ce);return this.toNumber(x)}},{key:"downStep",value:function(b,R){var G=this.props.step,I=this.getPrecisionFactor(b,R),ce=Math.abs(this.getMaxPrecision(b,R)),x=((I*b-I*G*R)/I).toFixed(ce);return this.toNumber(x)}},{key:"step",value:function(b,R){var G=this,I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ce=arguments.length>3?arguments[3]:void 0;this.stop(),R&&(R.persist(),R.preventDefault());var x=this.props;if(x.disabled)return;var m=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(m))return;var Y=this["".concat(b,"Step")](m,I),Ae=Y>x.max||Y<x.min;if(Y>x.max?Y=x.max:Y<x.min&&(Y=x.min),this.setValue(Y,null),this.setState({focused:!0},function(){G.pressingUpOrDown=!1}),Ae)return;this.autoStepTimer=setTimeout(function(){G[b](R,I,!0)},ce?Re:We)}},{key:"fixCaret",value:function(b,R){if(b===void 0||R===void 0||!this.input||!this.input.value)return;try{var G=this.input.selectionStart,I=this.input.selectionEnd;(b!==G||R!==I)&&this.input.setSelectionRange(b,R)}catch(ce){}}},{key:"render",value:function(){var b,R=this.props,G=R.prefixCls,I=R.disabled,ce=R.readOnly,x=R.useTouch,m=R.autoComplete,Y=R.upHandler,Ae=R.downHandler,ve=R.className,Fe=R.max,He=R.min,ke=R.style,be=R.title,Ce=R.onMouseEnter,we=R.onMouseLeave,Z=R.onMouseOver,_=R.onMouseOut,Pe=R.required,et=R.onClick,st=R.tabIndex,qe=R.type,Ke=R.placeholder,Me=R.id,_e=R.inputMode,Ve=R.pattern,$e=R.step,Ye=R.maxLength,Oe=R.autoFocus,Ge=R.name,vt=R.onPaste,lt=R.onInput,rt=Object(O.a)(R,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),tt=this.state,ft=tt.value,at=tt.focused,it=E()(G,(b={},Object(de.a)(b,ve,!!ve),Object(de.a)(b,"".concat(G,"-disabled"),I),Object(de.a)(b,"".concat(G,"-focused"),at),b)),xe={};Object.keys(rt).forEach(function(T){(T.substr(0,5)==="data-"||T.substr(0,5)==="aria-"||T==="role")&&(xe[T]=rt[T])});var gt=!ce&&!I,nt=this.getInputDisplayValue(null),Se=(ft||ft===0)&&(isNaN(ft)||Number(ft)>=Fe),Ue=(ft||ft===0)&&(isNaN(ft)||Number(ft)<=He),Q=Se||I||ce,j=Ue||I||ce,H=E()("".concat(G,"-handler"),"".concat(G,"-handler-up"),Object(de.a)({},"".concat(G,"-handler-up-disabled"),Q)),y=E()("".concat(G,"-handler"),"".concat(G,"-handler-down"),Object(de.a)({},"".concat(G,"-handler-down-disabled"),j)),C=x?{onTouchStart:Q?z:this.up,onTouchEnd:this.stop}:{onMouseDown:Q?z:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},A=x?{onTouchStart:j?z:this.down,onTouchEnd:this.stop}:{onMouseDown:j?z:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return M.a.createElement("div",{className:it,style:ke,title:be,onMouseEnter:Ce,onMouseLeave:we,onMouseOver:Z,onMouseOut:_,onFocus:function(){return null},onBlur:function(){return null}},M.a.createElement("div",{className:"".concat(G,"-handler-wrap")},M.a.createElement("span",Object.assign({unselectable:"on"},C,{role:"button","aria-label":"Increase Value","aria-disabled":Q,className:H}),Y||M.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-up-inner"),onClick:ee})),M.a.createElement("span",Object.assign({unselectable:"on"},A,{role:"button","aria-label":"Decrease Value","aria-disabled":j,className:y}),Ae||M.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-down-inner"),onClick:ee}))),M.a.createElement("div",{className:"".concat(G,"-input-wrap")},M.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":He,"aria-valuemax":Fe,"aria-valuenow":ft,required:Pe,type:qe,placeholder:Ke,onPaste:vt,onClick:et,onMouseUp:this.onMouseUp,className:"".concat(G,"-input"),tabIndex:st,autoComplete:m,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:gt?this.onKeyDown:z,onKeyUp:gt?this.onKeyUp:z,autoFocus:Oe,maxLength:Ye,readOnly:ce,disabled:I,max:Fe,min:He,step:$e,name:Ge,title:be,id:Me,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(nt),pattern:Ve,inputMode:_e,onInput:lt},xe))))}}]),te}(M.a.Component);ue.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:fe,min:-fe,step:1,style:{},onChange:z,onKeyDown:z,onPressEnter:z,onFocus:z,onBlur:z,parser:ne,required:!1,autoComplete:"off"};var me=ue,he=ge.a=me},f4xo:function(ye,ge,p){var O=p("nVVt");function de(X){this.mode=O.MODE_8BIT_BYTE,this.data=X}de.prototype={getLength:function(X){return this.data.length},write:function(X){for(var se=0;se<this.data.length;se++)X.put(this.data.charCodeAt(se),8)}},ye.exports=de},ji0R:function(ye,ge,p){ye.exports=p.p+"static/douyu.3e6df9ee.jpg"},kPWJ:function(ye,ge,p){ye.exports=p.p+"static/question.cb52bef9.gif"},kPYp:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAUCAYAAADr0+FaAAANEklEQVRYR8WZe5RX1XXHP/vce3/zHoaXgFp5DQyOQLRgUTEtDW1qYyVmZUGNklRdiRpKE3lHfPyc4TngIBgfC0wx1ixt1NRWal2kotbE2lbRiCIISBCGhzDAvGd+87v37K5z5zfDzMCM46pr9fw1a+45+5zz3fvs/d3fn4yr1F8Do0UIUb74UFR8Gm3IO/Wf8MThat7mOYnaDZUmNUF/htpWLlePK4xwCcoQICHQbOGoKDuM4U1p5r0Px1DNrDPrezzQs+qNPUh/o4xXj6tRJhlhGEqeQNrCCYXdGvGfFt5JNHLoozJp7WyvdI0OtR4LEK7CstUIWyJLTSRcLfCnvlAiUKSgCEfV8o6NeMVE/G53itOUiXX3Sxcx2ov4qhG+qjBWoFChWYUqIt6VgFeblR0H5lEL0oGyjKvU1yHezPviyHdZ0Ro180basvD398n77svIFTokK5vrgW8LTELJRwgA6bTSHcaBckot/yWGX2YZtv5untT0dJ7SpOZrAX9mLTeIYarAIIQEYLrZTQNNFj7A8rx6/GrPfDncPmdihV6Y9nkA+Ot4nrIXaDSGElH6KfjdzpBSpVo8ttVU8Xitx/7hw/imWmYD4wXy6Iqjje9mOGYj/uX0bjYf/5nsaLcpY9fqDZ5hNTD8/wi+27bB+CzfOVcqSiq0BMPdRpiBUNANmHNvJUQo1ZFls0lTuXupnOw+0UVamMsCz+eHCuf3MWgUjZ3w76kU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su37saTsWJRVS5VnuHnnAnmtp8vPnKne+1NY4jlZwtDfWpob6ijzhQ098fyLVmn/bJ97PMPtQJ5r8Dxck5VUMyqXP0wEzEHjNFHQR438rPPZtuyiKpTtmsdjrji7SGmJmBJrGYZSlIsyfYD7oaJVlVqEAwbejSJeafR5t6dOsfOGTuXMTTHeBExHmCzCaDTurLPEFWOlXqFKlI+s8prfwG92lnXVXkoq9HwTcD/KdSp8mGrmyVSaf+pJJmjff/gKHZaTxR3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc:function(ye,ge,p){},l2Kq:function(ye,ge,p){ye.exports=p.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(ye,ge,p){(function(O){O(p("VrN/"),p("1eCo"),p("8EBN"))})(function(O){"use strict";O.defineMode("markdown",function(de,X){var se=O.getMode(de,"text/html"),oe=se.name=="null";function J(x){if(O.findModeByName){var m=O.findModeByName(x);m&&(x=m.mime||m.mimes[0])}var Y=O.getMode(de,x);return Y.name=="null"?null:Y}X.highlightFormatting===void 0&&(X.highlightFormatting=!1),X.maxBlockquoteDepth===void 0&&(X.maxBlockquoteDepth=0),X.taskLists===void 0&&(X.taskLists=!1),X.strikethrough===void 0&&(X.strikethrough=!1),X.emoji===void 0&&(X.emoji=!1),X.fencedCodeBlockHighlighting===void 0&&(X.fencedCodeBlockHighlighting=!0),X.fencedCodeBlockDefaultMode===void 0&&(X.fencedCodeBlockDefaultMode="text/plain"),X.xml===void 0&&(X.xml=!0),X.tokenTypeOverrides===void 0&&(X.tokenTypeOverrides={});var k={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var L in k)k.hasOwnProperty(L)&&X.tokenTypeOverrides[L]&&(k[L]=X.tokenTypeOverrides[L]);var M=/^([*\-_])(?:\s*\1){2,}\s*$/,U=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,E=/^\[(x| )\](?=\s)/i,w=X.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,V=/^ {0,3}(?:\={1,}|-{2,})\s*$/,W=/^[^#!\[\]*_\\<>` "'(~:]+/,P=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,F=/^\s*\[[^\]]+?\]:.*$/,z=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ee=" ";function ne(x,m,Y){return m.f=m.inline=Y,Y(x,m)}function Re(x,m,Y){return m.f=m.block=Y,Y(x,m)}function We(x){return!x||!/\S/.test(x.string)}function fe(x){if(x.linkTitle=!1,x.linkHref=!1,x.linkText=!1,x.em=!1,x.strong=!1,x.strikethrough=!1,x.quote=0,x.indentedCode=!1,x.f==Be){var m=oe;if(!m){var Y=O.innerMode(se,x.htmlState);m=Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText}m&&(x.f=q,x.block=le,x.htmlState=null)}return x.trailingSpace=0,x.trailingSpaceNewLine=!1,x.prevLine=x.thisLine,x.thisLine={stream:null},null}function le(x,m){var Y=x.column()===m.indentation,Ae=We(m.prevLine.stream),ve=m.indentedCode,Fe=m.prevLine.hr,He=m.list!==!1,ke=(m.listStack[m.listStack.length-1]||0)+3;m.indentedCode=!1;var be=m.indentation;if(m.indentationDiff===null&&(m.indentationDiff=m.indentation,He)){for(m.list=null;be<m.listStack[m.listStack.length-1];)m.listStack.pop(),m.listStack.length?m.indentation=m.listStack[m.listStack.length-1]:m.list=!1;m.list!==!1&&(m.indentationDiff=be-m.listStack[m.listStack.length-1])}var Ce=!Ae&&!Fe&&!m.prevLine.header&&(!He||!ve)&&!m.prevLine.fencedCodeEnd,we=(m.list===!1||Fe||Ae)&&m.indentation<=ke&&x.match(M),Z=null;if(m.indentationDiff>=4&&(ve||m.prevLine.fencedCodeEnd||m.prevLine.header||Ae))return x.skipToEnd(),m.indentedCode=!0,k.code;if(x.eatSpace())return null;if(Y&&m.indentation<=ke&&(Z=x.match(w))&&Z[1].length<=6)return m.quote=0,m.header=Z[1].length,m.thisLine.header=!0,X.highlightFormatting&&(m.formatting="header"),m.f=m.inline,me(m);if(m.indentation<=ke&&x.eat(">"))return m.quote=Y?1:m.quote+1,X.highlightFormatting&&(m.formatting="quote"),x.eatSpace(),me(m);if(!we&&!m.setext&&Y&&m.indentation<=ke&&(Z=x.match(U))){var _=Z[1]?"ol":"ul";return m.indentation=be+x.current().length,m.list=!0,m.quote=0,m.listStack.push(m.indentation),m.em=!1,m.strong=!1,m.code=!1,m.strikethrough=!1,X.taskLists&&x.match(E,!1)&&(m.taskList=!0),m.f=m.inline,X.highlightFormatting&&(m.formatting=["list","list-"+_]),me(m)}else{if(Y&&m.indentation<=ke&&(Z=x.match(P,!0)))return m.quote=0,m.fencedEndRE=new RegExp(Z[1]+"+ *$"),m.localMode=X.fencedCodeBlockHighlighting&&J(Z[2]||X.fencedCodeBlockDefaultMode),m.localMode&&(m.localState=O.startState(m.localMode)),m.f=m.block=ue,X.highlightFormatting&&(m.formatting="code-block"),m.code=-1,me(m);if(m.setext||(!Ce||!He)&&!m.quote&&m.list===!1&&!m.code&&!we&&!F.test(x.string)&&(Z=x.lookAhead(1))&&(Z=Z.match(V)))return m.setext?(m.header=m.setext,m.setext=0,x.skipToEnd(),X.highlightFormatting&&(m.formatting="header")):(m.header=Z[0].charAt(0)=="="?1:2,m.setext=m.header),m.thisLine.header=!0,m.f=m.inline,me(m);if(we)return x.skipToEnd(),m.hr=!0,m.thisLine.hr=!0,k.hr;if(x.peek()==="[")return ne(x,m,R)}return ne(x,m,m.inline)}function Be(x,m){var Y=se.token(x,m.htmlState);if(!oe){var Ae=O.innerMode(se,m.htmlState);(Ae.mode.name=="xml"&&Ae.state.tagStart===null&&!Ae.state.context&&Ae.state.tokenize.isInText||m.md_inside&&x.current().indexOf(">")>-1)&&(m.f=q,m.block=le,m.htmlState=null)}return Y}function ue(x,m){var Y=m.listStack[m.listStack.length-1]||0,Ae=m.indentation<Y,ve=Y+3;if(m.fencedEndRE&&m.indentation<=ve&&(Ae||x.match(m.fencedEndRE))){X.highlightFormatting&&(m.formatting="code-block");var Fe;return Ae||(Fe=me(m)),m.localMode=m.localState=null,m.block=le,m.f=q,m.fencedEndRE=null,m.code=0,m.thisLine.fencedCodeEnd=!0,Ae?Re(x,m,m.block):Fe}else return m.localMode?m.localMode.token(x,m.localState):(x.skipToEnd(),k.code)}function me(x){var m=[];if(x.formatting){m.push(k.formatting),typeof x.formatting=="string"&&(x.formatting=[x.formatting]);for(var Y=0;Y<x.formatting.length;Y++)m.push(k.formatting+"-"+x.formatting[Y]),x.formatting[Y]==="header"&&m.push(k.formatting+"-"+x.formatting[Y]+"-"+x.header),x.formatting[Y]==="quote"&&(!X.maxBlockquoteDepth||X.maxBlockquoteDepth>=x.quote?m.push(k.formatting+"-"+x.formatting[Y]+"-"+x.quote):m.push("error"))}if(x.taskOpen)return m.push("meta"),m.length?m.join(" "):null;if(x.taskClosed)return m.push("property"),m.length?m.join(" "):null;if(x.linkHref?m.push(k.linkHref,"url"):(x.strong&&m.push(k.strong),x.em&&m.push(k.em),x.strikethrough&&m.push(k.strikethrough),x.emoji&&m.push(k.emoji),x.linkText&&m.push(k.linkText),x.code&&m.push(k.code),x.image&&m.push(k.image),x.imageAltText&&m.push(k.imageAltText,"link"),x.imageMarker&&m.push(k.imageMarker)),x.header&&m.push(k.header,k.header+"-"+x.header),x.quote&&(m.push(k.quote),!X.maxBlockquoteDepth||X.maxBlockquoteDepth>=x.quote?m.push(k.quote+"-"+x.quote):m.push(k.quote+"-"+X.maxBlockquoteDepth)),x.list!==!1){var Ae=(x.listStack.length-1)%3;Ae?Ae===1?m.push(k.list2):m.push(k.list3):m.push(k.list1)}return x.trailingSpaceNewLine?m.push("trailing-space-new-line"):x.trailingSpace&&m.push("trailing-space-"+(x.trailingSpace%2?"a":"b")),m.length?m.join(" "):null}function he(x,m){return x.match(W,!0)?me(m):void 0}function q(x,m){var Y=m.text(x,m);if(typeof Y!="undefined")return Y;if(m.list)return m.list=null,me(m);if(m.taskList){var Ae=x.match(E,!0)[1]===" ";return Ae?m.taskOpen=!0:m.taskClosed=!0,X.highlightFormatting&&(m.formatting="task"),m.taskList=!1,me(m)}if(m.taskOpen=!1,m.taskClosed=!1,m.header&&x.match(/^#+$/,!0))return X.highlightFormatting&&(m.formatting="header"),me(m);var ve=x.next();if(m.linkTitle){m.linkTitle=!1;var Fe=ve;ve==="("&&(Fe=")"),Fe=(Fe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var He="^\\s*(?:[^"+Fe+"\\\\]+|\\\\\\\\|\\\\.)"+Fe;if(x.match(new RegExp(He),!0))return k.linkHref}if(ve==="`"){var ke=m.formatting;X.highlightFormatting&&(m.formatting="code"),x.eatWhile("`");var be=x.current().length;if(m.code==0&&(!m.quote||be==1))return m.code=be,me(m);if(be==m.code){var Ce=me(m);return m.code=0,Ce}else return m.formatting=ke,me(m)}else if(m.code)return me(m);if(ve==="\\"&&(x.next(),X.highlightFormatting)){var we=me(m),Z=k.formatting+"-escape";return we?we+" "+Z:Z}if(ve==="!"&&x.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return m.imageMarker=!0,m.image=!0,X.highlightFormatting&&(m.formatting="image"),me(m);if(ve==="["&&m.imageMarker&&x.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return m.imageMarker=!1,m.imageAltText=!0,X.highlightFormatting&&(m.formatting="image"),me(m);if(ve==="]"&&m.imageAltText){X.highlightFormatting&&(m.formatting="image");var we=me(m);return m.imageAltText=!1,m.image=!1,m.inline=m.f=te,we}if(ve==="["&&!m.image)return m.linkText&&x.match(/^.*?\]/)||(m.linkText=!0,X.highlightFormatting&&(m.formatting="link")),me(m);if(ve==="]"&&m.linkText){X.highlightFormatting&&(m.formatting="link");var we=me(m);return m.linkText=!1,m.inline=m.f=x.match(/\(.*?\)| ?\[.*?\]/,!1)?te:q,we}if(ve==="<"&&x.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){m.f=m.inline=S,X.highlightFormatting&&(m.formatting="link");var we=me(m);return we?we+=" ":we="",we+k.linkInline}if(ve==="<"&&x.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){m.f=m.inline=S,X.highlightFormatting&&(m.formatting="link");var we=me(m);return we?we+=" ":we="",we+k.linkEmail}if(X.xml&&ve==="<"&&x.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var _=x.string.indexOf(">",x.pos);if(_!=-1){var Pe=x.string.substring(x.start,_);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Pe)&&(m.md_inside=!0)}return x.backUp(1),m.htmlState=O.startState(se),Re(x,m,Be)}if(X.xml&&ve==="<"&&x.match(/^\/\w*?>/))return m.md_inside=!1,"tag";if(ve==="*"||ve==="_"){for(var et=1,st=x.pos==1?" ":x.string.charAt(x.pos-2);et<3&&x.eat(ve);)et++;var qe=x.peek()||" ",Ke=!/\s/.test(qe)&&(!z.test(qe)||/\s/.test(st)||z.test(st)),Me=!/\s/.test(st)&&(!z.test(st)||/\s/.test(qe)||z.test(qe)),_e=null,Ve=null;if(et%2&&(!m.em&&Ke&&(ve==="*"||!Me||z.test(st))?_e=!0:m.em==ve&&Me&&(ve==="*"||!Ke||z.test(qe))&&(_e=!1)),et>1&&(!m.strong&&Ke&&(ve==="*"||!Me||z.test(st))?Ve=!0:m.strong==ve&&Me&&(ve==="*"||!Ke||z.test(qe))&&(Ve=!1)),Ve!=null||_e!=null){X.highlightFormatting&&(m.formatting=_e==null?"strong":Ve==null?"em":"strong em"),_e===!0&&(m.em=ve),Ve===!0&&(m.strong=ve);var Ce=me(m);return _e===!1&&(m.em=!1),Ve===!1&&(m.strong=!1),Ce}}else if(ve===" "&&(x.eat("*")||x.eat("_"))){if(x.peek()===" ")return me(m);x.backUp(1)}if(X.strikethrough){if(ve==="~"&&x.eatWhile(ve)){if(m.strikethrough){X.highlightFormatting&&(m.formatting="strikethrough");var Ce=me(m);return m.strikethrough=!1,Ce}else if(x.match(/^[^\s]/,!1))return m.strikethrough=!0,X.highlightFormatting&&(m.formatting="strikethrough"),me(m)}else if(ve===" "&&x.match(/^~~/,!0)){if(x.peek()===" ")return me(m);x.backUp(2)}}if(X.emoji&&ve===":"&&x.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){m.emoji=!0,X.highlightFormatting&&(m.formatting="emoji");var $e=me(m);return m.emoji=!1,$e}return ve===" "&&(x.match(/^ +$/,!1)?m.trailingSpace++:m.trailingSpace&&(m.trailingSpaceNewLine=!0)),me(m)}function S(x,m){var Y=x.next();if(Y===">"){m.f=m.inline=q,X.highlightFormatting&&(m.formatting="link");var Ae=me(m);return Ae?Ae+=" ":Ae="",Ae+k.linkInline}return x.match(/^[^>]+/,!0),k.linkInline}function te(x,m){if(x.eatSpace())return null;var Y=x.next();return Y==="("||Y==="["?(m.f=m.inline=b(Y==="("?")":"]"),X.highlightFormatting&&(m.formatting="link-string"),m.linkHref=!0,me(m)):"error"}var K={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function b(x){return function(m,Y){var Ae=m.next();if(Ae===x){Y.f=Y.inline=q,X.highlightFormatting&&(Y.formatting="link-string");var ve=me(Y);return Y.linkHref=!1,ve}return m.match(K[x]),Y.linkHref=!0,me(Y)}}function R(x,m){return x.match(/^([^\]\\]|\\.)*\]:/,!1)?(m.f=G,x.next(),X.highlightFormatting&&(m.formatting="link"),m.linkText=!0,me(m)):ne(x,m,q)}function G(x,m){if(x.match(/^\]:/,!0)){m.f=m.inline=I,X.highlightFormatting&&(m.formatting="link");var Y=me(m);return m.linkText=!1,Y}return x.match(/^([^\]\\]|\\.)+/,!0),k.linkText}function I(x,m){return x.eatSpace()?null:(x.match(/^[^\s]+/,!0),x.peek()===void 0?m.linkTitle=!0:x.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),m.f=m.inline=q,k.linkHref+" url")}var ce={startState:function(){return{f:le,prevLine:{stream:null},thisLine:{stream:null},block:le,htmlState:null,indentation:0,inline:q,text:he,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(x){return{f:x.f,prevLine:x.prevLine,thisLine:x.thisLine,block:x.block,htmlState:x.htmlState&&O.copyState(se,x.htmlState),indentation:x.indentation,localMode:x.localMode,localState:x.localMode?O.copyState(x.localMode,x.localState):null,inline:x.inline,text:x.text,formatting:!1,linkText:x.linkText,linkTitle:x.linkTitle,linkHref:x.linkHref,code:x.code,em:x.em,strong:x.strong,strikethrough:x.strikethrough,emoji:x.emoji,header:x.header,setext:x.setext,hr:x.hr,taskList:x.taskList,list:x.list,listStack:x.listStack.slice(0),quote:x.quote,indentedCode:x.indentedCode,trailingSpace:x.trailingSpace,trailingSpaceNewLine:x.trailingSpaceNewLine,md_inside:x.md_inside,fencedEndRE:x.fencedEndRE}},token:function(x,m){if(m.formatting=!1,x!=m.thisLine.stream){if(m.header=0,m.hr=!1,x.match(/^\s*$/,!0))return fe(m),null;if(m.prevLine=m.thisLine,m.thisLine={stream:x},m.taskList=!1,m.trailingSpace=0,m.trailingSpaceNewLine=!1,!m.localState&&(m.f=m.block,m.f!=Be)){var Y=x.match(/^\s*/,!0)[0].replace(/\t/g,ee).length;if(m.indentation=Y,m.indentationDiff=null,Y>0)return null}}return m.f(x,m)},innerMode:function(x){return x.block==Be?{state:x.htmlState,mode:se}:x.localState?{state:x.localState,mode:x.localMode}:{state:x,mode:ce}},indent:function(x,m,Y){return x.block==Be&&se.indent?se.indent(x.htmlState,m,Y):x.localState&&x.localMode.indent?x.localMode.indent(x.localState,m,Y):O.Pass},blankLine:fe,getType:me,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ce},"xml"),O.defineMIME("text/markdown","markdown"),O.defineMIME("text/x-markdown","markdown")})},lzim:function(ye,ge,p){"use strict";var O=p("E7E6"),de=p.n(O);p.d(ge,"A",function(){return de.a});var X=p("/GNS"),se=p.n(X);p.d(ge,"z",function(){return se.a});var oe=p("FOrL"),J=p.n(oe);p.d(ge,"t",function(){return J.a});var k=p("HpTS"),L=p.n(k);p.d(ge,"B",function(){return L.a});var M=p("tWlo"),U=p.n(M);p.d(ge,"b",function(){return U.a});var E=p("7ZXX"),w=p.n(E);p.d(ge,"n",function(){return w.a});var V=p("GABl"),W=p.n(V);p.d(ge,"g",function(){return W.a});var P=p("onxn"),F=p.n(P);p.d(ge,"p",function(){return F.a});var z=p("nKGa"),ee=p.n(z);p.d(ge,"o",function(){return ee.a});var ne=p("4qgm"),Re=p.n(ne);p.d(ge,"D",function(){return Re.a});var We=p("JeFH"),fe=p.n(We);p.d(ge,"c",function(){return fe.a});var le=p("ji0R"),Be=p.n(le);p.d(ge,"k",function(){return Be.a});var ue=p("W6BS"),me=p.n(ue);p.d(ge,"E",function(){return me.a});var he=p("kPYp"),q=p.n(he);p.d(ge,"F",function(){return q.a});var S=p("nukY"),te=p.n(S),K=p("4u4S"),b=p.n(K),R=p("yslc"),G=p.n(R),I=p("l2Kq"),ce=p.n(I),x=p("RMFE"),m=p.n(x);p.d(ge,"q",function(){return m.a});var Y=p("TGq3"),Ae=p.n(Y);p.d(ge,"r",function(){return Ae.a});var ve=p("SMhR"),Fe=p.n(ve);p.d(ge,"C",function(){return Fe.a});var He=p("8/bI"),ke=p.n(He);p.d(ge,"l",function(){return ke.a});var be=p("JWDV"),Ce=p.n(be);p.d(ge,"e",function(){return Ce.a});var we=p("Xsq0"),Z=p.n(we);p.d(ge,"s",function(){return Z.a});var _=p("Ohmc"),Pe=p.n(_);p.d(ge,"d",function(){return Pe.a});var et=p("csWT"),st=p.n(et);p.d(ge,"f",function(){return st.a});var qe=p("7v3h"),Ke=p.n(qe);p.d(ge,"m",function(){return Ke.a});var Me=p("cRFk"),_e=p.n(Me);p.d(ge,"y",function(){return _e.a});var Ve=p("kPWJ"),$e=p.n(Ve);p.d(ge,"x",function(){return $e.a});var Ye=p("qgvg"),Oe=p.n(Ye);p.d(ge,"u",function(){return Oe.a});var Ge=p("FPkq"),vt=p.n(Ge);p.d(ge,"w",function(){return vt.a});var lt=p("A/g1"),rt=p.n(lt);p.d(ge,"h",function(){return rt.a});var tt=p("Nmxd"),ft=p.n(tt);p.d(ge,"i",function(){return ft.a});var at=p("5D2P"),it=p.n(at);p.d(ge,"j",function(){return it.a});var xe=p("djh8"),gt=p.n(xe);p.d(ge,"v",function(){return gt.a});var nt=p("Jq4h"),Se=p.n(nt);p.d(ge,"a",function(){return Se.a})},nKGa:function(ye,ge,p){ye.exports=p.p+"static/export_exercise-template.f7655c19.png"},nVVt:function(ye,ge){ye.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},nZ20:function(ye,ge,p){ye.exports={icons:"icons___3O80F"}},nukY:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV6E/QVm/hMRNaVQX61SRi3wDOiwg5Tya0qpn2TUJlrtFFqgIujFnv27zPztFOqsVcqgBaqCzsyGlPJXzPy5DNpFq5wyC1QFHXr29fVN6+/v/zszfyBlemt1MmYBW9Bhi3w+v7hQKJwkog0Zs41WN0UWcAS96K9vI6J3mHl+inTXqmTIAq5Ahz1yudxHDcN4k5mbM2QfrWpKLOAa9CLsB4ioLSW6azUyZAFPoBdh/w4RvZYhG2lVU2ABz6AXYf8FEb2cAv21ChmxgC/Qu7q6moeHh/9KRB/JiJ20mnVuAV+gQ+fu7u4FQ0ND/yGi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ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(ye,ge,p){(function(O){O(p("VrN/"))})(function(O){"use strict";var de=O.Pos;function X(z,ee){return z.line-ee.line||z.ch-ee.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",oe=se+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",J=new RegExp("<(/?)(["+se+"]["+oe+"]*)","g");function k(z,ee,ne,Re){this.line=ee,this.ch=ne,this.cm=z,this.text=z.getLine(ee),this.min=Re?Math.max(Re.from,z.firstLine()):z.firstLine(),this.max=Re?Math.min(Re.to-1,z.lastLine()):z.lastLine()}function L(z,ee){var ne=z.cm.getTokenTypeAt(de(z.line,ee));return ne&&/\btag\b/.test(ne)}function M(z){return z.line>=z.max?void 0:(z.ch=0,z.text=z.cm.getLine(++z.line),!0)}function U(z){return z.line<=z.min?void 0:(z.text=z.cm.getLine(--z.line),z.ch=z.text.length,!0)}function E(z){for(;;){var ee=z.text.indexOf(">",z.ch);if(ee==-1){if(M(z))continue;return}if(!L(z,ee+1)){z.ch=ee+1;continue}var ne=z.text.lastIndexOf("/",ee),Re=ne>-1&&!/\S/.test(z.text.slice(ne+1,ee));return z.ch=ee+1,Re?"selfClose":"regular"}}function w(z){for(;;){var ee=z.ch?z.text.lastIndexOf("<",z.ch-1):-1;if(ee==-1){if(U(z))continue;return}if(!L(z,ee+1)){z.ch=ee;continue}J.lastIndex=ee,z.ch=ee;var ne=J.exec(z.text);if(ne&&ne.index==ee)return ne}}function V(z){for(;;){J.lastIndex=z.ch;var ee=J.exec(z.text);if(!ee){if(M(z))continue;return}if(!L(z,ee.index+1)){z.ch=ee.index+1;continue}return z.ch=ee.index+ee[0].length,ee}}function W(z){for(;;){var ee=z.ch?z.text.lastIndexOf(">",z.ch-1):-1;if(ee==-1){if(U(z))continue;return}if(!L(z,ee+1)){z.ch=ee;continue}var ne=z.text.lastIndexOf("/",ee),Re=ne>-1&&!/\S/.test(z.text.slice(ne+1,ee));return z.ch=ee+1,Re?"selfClose":"regular"}}function P(z,ee){for(var ne=[];;){var Re=V(z),We,fe=z.line,le=z.ch-(Re?Re[0].length:0);if(!Re||!(We=E(z)))return;if(We=="selfClose")continue;if(Re[1]){for(var Be=ne.length-1;Be>=0;--Be)if(ne[Be]==Re[2]){ne.length=Be;break}if(Be<0&&(!ee||ee==Re[2]))return{tag:Re[2],from:de(fe,le),to:de(z.line,z.ch)}}else ne.push(Re[2])}}function F(z,ee){for(var ne=[];;){var Re=W(z);if(!Re)return;if(Re=="selfClose"){w(z);continue}var We=z.line,fe=z.ch,le=w(z);if(!le)return;if(le[1])ne.push(le[2]);else{for(var Be=ne.length-1;Be>=0;--Be)if(ne[Be]==le[2]){ne.length=Be;break}if(Be<0&&(!ee||ee==le[2]))return{tag:le[2],from:de(z.line,z.ch),to:de(We,fe)}}}}O.registerHelper("fold","xml",function(z,ee){for(var ne=new k(z,ee.line,0);;){var Re=V(ne);if(!Re||ne.line!=ee.line)return;var We=E(ne);if(!We)return;if(!Re[1]&&We!="selfClose"){var fe=de(ne.line,ne.ch),le=P(ne,Re[2]);return le&&X(le.from,fe)>0?{from:fe,to:le.from}:null}}}),O.findMatchingTag=function(z,ee,ne){var Re=new k(z,ee.line,ee.ch,ne);if(Re.text.indexOf(">")==-1&&Re.text.indexOf("<")==-1)return;var We=E(Re),fe=We&&de(Re.line,Re.ch),le=We&&w(Re);if(!We||!le||X(Re,ee)>0)return;var Be={from:de(Re.line,Re.ch),to:fe,tag:le[2]};return We=="selfClose"?{open:Be,close:null,at:"open"}:le[1]?{open:F(Re,le[2]),close:Be,at:"close"}:(Re=new k(z,fe.line,fe.ch,ne),{open:Be,close:P(Re,le[2]),at:"open"})},O.findEnclosingTag=function(z,ee,ne,Re){for(var We=new k(z,ee.line,ee.ch,ne);;){var fe=F(We,Re);if(!fe)break;var le=new k(z,ee.line,ee.ch,ne),Be=P(le,fe.tag);if(Be)return{open:fe,close:Be}}},O.scanForClosingTag=function(z,ee,ne,Re){var We=new k(z,ee.line,ee.ch,Re?{from:0,to:Re}:null);return P(We,ne)}})},p5ED:function(ye,ge,p){"use strict";var O=p("+L6B"),de=p("2/Rp"),X=p("5Dmo"),se=p("3S7+"),oe=p("k1fw"),J=p("9og8"),k=p("tJVT"),L=p("WmNS"),M=p.n(L),U=p("q1tI"),E=p.n(U),w=p("vHTk"),V=p.n(w),W=p("yEEn"),P=p("ZW9T"),F=p("1vsH"),z=p("V0Rq"),ee=p("m3rI"),ne=function(We){var fe=We.name,le=We.data,Be=We.theme,ue=We.type,me=We.filename,he=We.monacoEditor,q=We.className,S=We.style,te=We.close,K=We.onClose,b=We.hasMask,R=We.otherData,G=R===void 0?{}:R,I=Object(U.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ce=Object(k.a)(I,2),x=ce[0],m=ce[1],Y=Object(U.useState)(""),Ae=Object(k.a)(Y,2),ve=Ae[0],Fe=Ae[1],He=Object(U.useState)(),ke=Object(k.a)(He,2),be=ke[0],Ce=ke[1],we,Z=1024*1024,_=10*Z,Pe=Object(U.useRef)();ue==="office"&&(we=Object(F.R)(le).filesize,we>_&&(ue="other")),me&&(he.filename=me),Object(U.useEffect)(function(){var Ke,Me,_e=(Ke=document.cookie)===null||Ke===void 0||((Me=Ke.replace(/\s/g,""))===null||Me===void 0)?void 0:Me.split(";");_e==null||_e.map(function(Ve){var $e=Ve.split("=");$e[0]==="_educoder_session"&&Fe($e[1])})},[]),Object(U.useEffect)(function(){ue==="office"&&et()},[ue]);var et=function(){var Ke=Object(J.a)(M.a.mark(function Me(){var _e,Ve,$e;return M.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return console.log("data:",le),_e=le,le.startsWith("http")||(_e=location.origin+_e),Ve=new URL(_e).pathname.split("/").pop(),Oe.next=6,Object(z.U)({attachment_id:Ve});case 6:$e=Oe.sent,Ce($e);case 8:case"end":return Oe.stop()}},Me)}));return function(){return Ke.apply(this,arguments)}}(),st=function(){if(le.startsWith("http")||le.startsWith("blob:")){qe();return}Object(F.x)(me||"educoder",le,me)},qe=function(){Object(F.v)(me||"educoder",decodeURIComponent(le))};return E.a.createElement("div",{style:Object(oe.a)({},S||{}),className:"".concat(b&&V.a.bgBlack," ").concat(ue?V.a.wrp:"hide")},te&&E.a.createElement("div",{className:V.a.close,ref:Pe},E.a.createElement(se.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Pe.current}},E.a.createElement("span",{onClick:qe},E.a.createElement("i",{className:"icon-quxiaozhiding"}))),E.a.createElement(se.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Pe.current}},E.a.createElement("span",{className:"",onClick:function(){K(),Ce(null)}},E.a.createElement("i",{className:"icon-guanbi1"})))),E.a.createElement("div",{className:"".concat(V.a[q]," ").concat(q," ").concat(V.a.monaco," ").concat(ue==="txt"?"show":"hide")},ue==="txt"&&E.a.createElement(P.b,he)),ue==="audio"&&E.a.createElement("audio",{src:"".concat((le==null?void 0:le.indexOf("http://"))>-1||(le==null?void 0:le.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(le),autoPlay:!0}),ue==="video"&&E.a.createElement(E.a.Fragment,null,(le==null?void 0:le.indexOf("http"))>-1?E.a.createElement("video",{controls:!0,src:"".concat(le),autoPlay:!0}):E.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(le),autoPlay:!0})),ue==="office"&&be&&E.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(be.key,"&url=").concat(ee.a.API_SERVER+be.url,"&callbackUrl=").concat(ee.a.API_SERVER+be.callbackUrl,"&fileType=").concat(be.fileType,"&title=").concat(be.title,"&model=view")}),(ue==="xlsx"||ue==="doc"||ue==="pptx"||ue==="docx")&&E.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(G.key,"&url=").concat(ee.a.API_SERVER+G.url,"&callbackUrl=").concat(ee.a.API_SERVER+G.callbackUrl,"&fileType=").concat(G.fileType,"&title=").concat(G.title,"&model=").concat(G.model)}),ue==="html"&&E.a.createElement("iframe",{src:le+"&disposition=inline"}),ue==="pdf"&&E.a.createElement("embed",{className:V.a.embed,src:le,type:"application/pdf"}),ue==="image"&&E.a.createElement("img",{src:"".concat((le==null?void 0:le.indexOf("http://"))>-1||(le==null?void 0:le.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(le)}),ue==="other"&&E.a.createElement("div",null,E.a.createElement(de.a,{type:"primary",size:"large",onClick:st},E.a.createElement(W.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),ue==="download"&&E.a.createElement(de.a,{type:"primary",size:"large",onClick:st},E.a.createElement(W.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};ge.a=ne},"p77/":function(ye,ge,p){},qgvg:function(ye,ge){ye.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d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ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"rAM+":function(ye,ge,p){"use strict";p.d(ge,"a",function(){return de});var O=p("Qw5x");function de(X,se){var oe;if(typeof Symbol=="undefined"||X[Symbol.iterator]==null){if(Array.isArray(X)||(oe=Object(O.a)(X))||se&&X&&typeof X.length=="number"){oe&&(X=oe);var J=0,k=function(){};return{s:k,n:function(){return J>=X.length?{done:!0}:{done:!1,value:X[J++]}},e:function(w){throw w},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var L=!0,M=!1,U;return{s:function(){oe=X[Symbol.iterator]()},n:function(){var w=oe.next();return L=w.done,w},e:function(w){M=!0,U=w},f:function(){try{!L&&oe.return!=null&&oe.return()}finally{if(M)throw U}}}}},rUJ1:function(ye,ge){const p=/[&<>"']/,O=/[&<>"']/g,de=/[<>"']|&(?!#?\w+;)/,X=/[<>"']|&(?!#?\w+;)/g,se={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},oe=ue=>se[ue];function J(ue,me){if(me){if(p.test(ue))return ue.replace(O,oe)}else if(de.test(ue))return ue.replace(X,oe);return ue}const k=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function L(ue){return ue.replace(k,(me,he)=>(he=he.toLowerCase(),he==="colon"?":":he.charAt(0)==="#"?he.charAt(1)==="x"?String.fromCharCode(parseInt(he.substring(2),16)):String.fromCharCode(+he.substring(1)):""))}const M=/(^|[^\[])\^/g;function U(ue,me){ue=ue.source||ue,me=me||"";const he={replace:(q,S)=>(S=S.source||S,S=S.replace(M,"$1"),ue=ue.replace(q,S),he),getRegex:()=>new RegExp(ue,me)};return he}const E=/[^\w:]/g,w=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function V(ue,me,he){if(ue){let q;try{q=decodeURIComponent(L(he)).replace(E,"").toLowerCase()}catch(S){return null}if(q.indexOf("javascript:")===0||q.indexOf("vbscript:")===0||q.indexOf("data:")===0)return null}me&&!w.test(he)&&(he=ee(me,he));try{he=encodeURI(he).replace(/%25/g,"%")}catch(q){return null}return he}const W={},P=/^[^:]+:\/*[^/]*$/,F=/^([^:]+:)[\s\S]*$/,z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ee(ue,me){W[" "+ue]||(P.test(ue)?W[" "+ue]=ue+"/":W[" "+ue]=fe(ue,"/",!0)),ue=W[" "+ue];const he=ue.indexOf(":")===-1;return me.substring(0,2)==="//"?he?me:ue.replace(F,"$1")+me:me.charAt(0)==="/"?he?me:ue.replace(z,"$1")+me:ue+me}const ne={exec:function(){}};function Re(ue){let me=1,he,q;for(;me<arguments.length;me++){he=arguments[me];for(q in he)Object.prototype.hasOwnProperty.call(he,q)&&(ue[q]=he[q])}return ue}function We(ue,me){const he=ue.replace(/\|/g,(te,K,b)=>{let R=!1,G=K;for(;--G>=0&&b[G]==="\\";)R=!R;return R?"|":" |"}),q=he.split(/ \|/);let S=0;if(q.length>me)q.splice(me);else for(;q.length<me;)q.push("");for(;S<q.length;S++)q[S]=q[S].trim().replace(/\\\|/g,"|");return q}function fe(ue,me,he){const q=ue.length;if(q===0)return"";let S=0;for(;S<q;){const te=ue.charAt(q-S-1);if(te===me&&!he)S++;else if(te!==me&&he)S++;else break}return ue.substr(0,q-S)}function le(ue,me){if(ue.indexOf(me[1])===-1)return-1;const he=ue.length;let q=0,S=0;for(;S<he;S++)if(ue[S]==="\\")S++;else if(ue[S]===me[0])q++;else if(ue[S]===me[1]&&(q--,q<0))return S;return-1}function Be(ue){ue&&ue.sanitize&&!ue.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}ye.exports={escape:J,unescape:L,edit:U,cleanUrl:V,resolveUrl:ee,noopTest:ne,merge:Re,splitCells:We,rtrim:fe,findClosingBracket:le,checkSanitizeDeprecation:Be}},rcnY:function(ye,ge,p){var O=p("aRTE");function de(X,se){this.totalCount=X,this.dataCount=se}de.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],de.getRSBlocks=function(X,se){var oe=de.getRsBlockTable(X,se);if(oe==null)throw new Error("bad rs block @ typeNumber:"+X+"/errorCorrectLevel:"+se);for(var J=oe.length/3,k=new Array,L=0;L<J;L++)for(var M=oe[L*3+0],U=oe[L*3+1],E=oe[L*3+2],w=0;w<M;w++)k.push(new de(U,E));return k},de.getRsBlockTable=function(X,se){switch(se){case O.L:return de.RS_BLOCK_TABLE[(X-1)*4+0];case O.M:return de.RS_BLOCK_TABLE[(X-1)*4+1];case O.Q:return de.RS_BLOCK_TABLE[(X-1)*4+2];case O.H:return de.RS_BLOCK_TABLE[(X-1)*4+3];default:return}},ye.exports=de},tWlo:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRw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+EGz1IkDyOeIvnlETH/T/digqKoLXeLLts3UNgY0REXGQZpmpqtCmrjV1/ZWcrEzIzEhnTtwQhwQb/5vNDc1dkinak4gDsMUFSEhwMJQ9vhueqihnWhYBMhnokYRGowGLZRwcW9fWLsGxTV6HqA8F6sMfR5z0qiDUKsjQpoEuPQ1SsSILVPDd1FJTrDA/Fwry9NDX1w9dxh7MSs2+ytTjcI+7gc0IkHwpMD+JnpbnZGdCXk4WPJSUKFlHzj0bGTrtGqhZNjJqgQHzIHRjWMbzhd7/MqLaZxqzxfjVFU+UjhcZCs+gp7f9nowcszMhfg17SoptSKDyym9N9cbePt8O2GrQ5pbrDRMTkwbe6MQpN6hfFRUVWa+Qb+7je23ideLAtPdGZ/cUZpw1iTsTFtFLJcBwEc2RIryHqELvW2q/qQPT4JA4AmupL5aP/Saza8A0eDU2Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},vHTk:function(ye,ge,p){ye.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wU8J:function(ye,ge){function p(){this.buffer=new Array,this.length=0}p.prototype={get:function(O){var de=Math.floor(O/8);return(this.buffer[de]>>>7-O%8&1)==1},put:function(O,de){for(var X=0;X<de;X++)this.putBit((O>>>de-X-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(O){var de=Math.floor(this.length/8);this.buffer.length<=de&&this.buffer.push(0),O&&(this.buffer[de]|=128>>>this.length%8),this.length++}},ye.exports=p},wxaI:function(ye,ge,p){"use strict";p.r(ge);var O=p("+L6B"),de=p("2/Rp"),X=p("5NDa"),se=p("5rEg"),oe=p("9og8"),J=p("k1fw"),k=p("y8nQ"),L=p("Vl3Y"),M=p("tJVT"),U=p("PpiC"),E=p("WmNS"),w=p.n(E),V=p("q1tI"),W=p.n(V),P=p("9kvl"),F=p("Ot1p"),z=p("HBuW"),ee=p("1mRG"),ne=p.n(ee),Re=p("CJF0"),We=function(le){var Be,ue=le.shixunsDetail,me=le.dispatch,he=le.loading,q=le.match,S=Object(U.a)(le,["shixunsDetail","dispatch","loading","match"]),te=L.a.useForm(),K=Object(M.a)(te,1),b=K[0],R=Object(V.useState)({}),G=Object(M.a)(R,2),I=G[0],ce=G[1],x=ue.challengesNew;Object(V.useEffect)(function(){me({type:"shixunsDetail/getChallengesNew",payload:Object(J.a)({},q.params)})},[q.params]);var m=function(){var Y=Object(oe.a)(w.a.mark(function Ae(ve){var Fe,He;return w.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return Fe=Object(J.a)({},I),Fe.identifier=q.params.id,Fe.st=1,be.next=5,Object(z.b)(Object(J.a)({},Fe));case 5:He=be.sent,He.status===1&&S.history.replace("/shixuns/".concat(q.params.id,"/challenges/").concat(He.challenge_id,"/editquestion"));case 7:case"end":return be.stop()}},Ae)}));return function(ve){return Y.apply(this,arguments)}}();return W.a.createElement("section",{className:ne.a.bg},W.a.createElement(Re.a,{data:x,title:"\u9009\u62E9\u9898"}),W.a.createElement(L.a,{form:b,className:ne.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){ce(Object(J.a)({},b.getFieldsValue()))},onFinish:m},W.a.createElement("div",{className:ne.a.fieldWrap},W.a.createElement(L.a.Item,{name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},W.a.createElement(se.a,{maxLength:60,suffix:"".concat(((Be=I.subject)===null||Be===void 0?void 0:Be.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),W.a.createElement("div",{className:ne.a.mdWrap},W.a.createElement(L.a.Item,{name:"task_pass",label:"\u8FC7\u5173\u4EFB\u52A1:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u6700\u5927\u9650\u523635000\u4E2A\u5B57\u7B26"}]},W.a.createElement(F.a,{watch:!0,defaultValue:x.task_pass_default}))),W.a.createElement("div",{className:ne.a.backgroundFa},W.a.createElement("div",{className:"pt40 mb30"},W.a.createElement(L.a.Item,null,W.a.createElement(de.a,{size:"large",type:"primary",className:"".concat(ne.a.button," mr20"),htmlType:"submit"},"\u63D0\u4EA4"),W.a.createElement(de.a,{size:"large",type:"primary",ghost:!0,className:ne.a.button,onClick:function(){return P.d.push("/shixuns/".concat(q.params.id,"/challenges"))}},"\u53D6\u6D88"))))))};ge.default=Object(P.a)(function(fe){var le=fe.shixunsDetail,Be=fe.newCourse,ue=fe.loading,me=fe.globalSetting;return{shixunsDetail:le,newCourse:Be,globalSetting:me,loading:ue.effects}})(We)},yslc:function(ye,ge){ye.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66KOoi68ECKocCcutTLhUERM1MEpBLEuQmQMKEnDNd+6onEzKTuXqmJ5l0V/EeL+mp+qu+r77UVP1V9TcHffZbIJgOlhgDMmaAA8lTwVDxJQh5UMY4GTSFM8AJ+PW6cIDsBEEfhfPB4MuUAYvQaTowOwV1NXtB0E6mWBksBTNwTeiUBENud/CmHwBEKZgTBl2GDNgKnQIsyBkCM9kEEI0M8TJICmWgqdCFkT17MngsUignDLYMGXAsdAo0XzcPILkyxMwgKZAB50InhIMhZxUIGalAXhhkmTHgXOgU6PG8UFwxbgdB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