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
666 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[202,7,9],{"+NIl":function(Ee,ue,m){(function(F){F(m("VrN/"))})(function(F){"use strict";F.defineMode("stex",function(Oe,re){"use strict";function ge(X,j){X.cmdState.push(j)}function me(X){return X.cmdState.length>0?X.cmdState[X.cmdState.length-1]:null}function fe(X){var j=X.cmdState.pop();j&&j.closeBracket()}function O(X){for(var j=X.cmdState,z=j.length-1;z>=0;z--){var P=j[z];if(P.name=="DEFAULT")continue;return P}return{styleIdentifier:function(){return null}}}function K(X,j,z){return function(){this.name=X,this.bracketNo=0,this.style=j,this.styles=z,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var H={};H.importmodule=K("importmodule","tag",["string","builtin"]),H.documentclass=K("documentclass","tag",["","atom"]),H.usepackage=K("usepackage","tag",["atom"]),H.begin=K("begin","tag",["atom"]),H.end=K("end","tag",["atom"]),H.label=K("label","tag",["atom"]),H.ref=K("ref","tag",["atom"]),H.eqref=K("eqref","tag",["atom"]),H.cite=K("cite","tag",["atom"]),H.bibitem=K("bibitem","tag",["atom"]),H.Bibitem=K("Bibitem","tag",["atom"]),H.RBibitem=K("RBibitem","tag",["atom"]),H.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function he(X,j){X.f=j}function R(X,j){var z;if(X.match(/^\\[a-zA-Z@]+/)){var P=X.current().slice(1);return z=H.hasOwnProperty(P)?H[P]:H.DEFAULT,z=new z,ge(j,z),he(j,oe),z.style}if(X.match(/^\\[$&%#{}_]/))return"tag";if(X.match(/^\\[,;!\/\\]/))return"tag";if(X.match("\\["))return he(j,function(Q,Se){return L(Q,Se,"\\]")}),"keyword";if(X.match("\\("))return he(j,function(Q,Se){return L(Q,Se,"\\)")}),"keyword";if(X.match("$$"))return he(j,function(Q,Se){return L(Q,Se,"$$")}),"keyword";if(X.match("$"))return he(j,function(Q,Se){return L(Q,Se,"$")}),"keyword";var te=X.next();if(te=="%")return X.skipToEnd(),"comment";if(te=="}"||te=="]"){if(z=me(j),z)z.closeBracket(te),he(j,oe);else return"error";return"bracket"}else return te=="{"||te=="["?(z=H.DEFAULT,z=new z,ge(j,z),"bracket"):/\d/.test(te)?(X.eatWhile(/[\w.%]/),"atom"):(X.eatWhile(/[\w\-_]/),z=O(j),z.name=="begin"&&(z.argument=X.current()),z.styleIdentifier())}function L(X,j,z){if(X.eatSpace())return null;if(z&&X.match(z))return he(j,R),"keyword";if(X.match(/^\\[a-zA-Z@]+/))return"tag";if(X.match(/^[a-zA-Z]+/))return"variable-2";if(X.match(/^\\[$&%#{}_]/))return"tag";if(X.match(/^\\[,;!\/]/))return"tag";if(X.match(/^[\^_&]/))return"tag";if(X.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(X.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var P=X.next();return P=="{"||P=="}"||P=="["||P=="]"||P=="("||P==")"?"bracket":P=="%"?(X.skipToEnd(),"comment"):"error"}function oe(X,j){var z=X.peek(),P;return z=="{"||z=="["?(P=me(j),P.openBracket(z),X.eat(z),he(j,R),"bracket"):/[ \t\r]/.test(z)?(X.eat(z),null):(he(j,R),fe(j),R(X,j))}return{startState:function(){var X=re.inMathMode?function(j,z){return L(j,z)}:R;return{cmdState:[],f:X}},copyState:function(X){return{cmdState:X.cmdState.slice(),f:X.f}},token:function(X,j){return j.f(X,j)},blankLine:function(X){X.f=R,X.cmdState.length=0},lineComment:"%"}}),F.defineMIME("text/x-stex","stex"),F.defineMIME("text/x-latex","stex")})},"/GNS":function(Ee,ue,m){Ee.exports=m.p+"static/search1.c4136dd4.png"},"19Vz":function(Ee,ue,m){(function(F){F(m("VrN/"))})(function(F){F.defineOption("placeholder","",function(K,H,he){var R=he&&he!=F.Init;if(H&&!R)K.on("blur",me),K.on("change",fe),K.on("swapDoc",fe),F.on(K.getInputField(),"compositionupdate",K.state.placeholderCompose=function(){ge(K)}),fe(K);else if(!H&&R){K.off("blur",me),K.off("change",fe),K.off("swapDoc",fe),F.off(K.getInputField(),"compositionupdate",K.state.placeholderCompose),Oe(K);var L=K.getWrapperElement();L.className=L.className.replace(" CodeMirror-empty","")}H&&!K.hasFocus()&&me(K)});function Oe(K){K.state.placeholder&&(K.state.placeholder.parentNode.removeChild(K.state.placeholder),K.state.placeholder=null)}function re(K){Oe(K);var H=K.state.placeholder=document.createElement("pre");H.style.cssText="height: 0; overflow: visible",H.style.direction=K.getOption("direction"),H.className="CodeMirror-placeholder CodeMirror-line-like";var he=K.getOption("placeholder");typeof he=="string"&&(he=document.createTextNode(he)),H.appendChild(he),K.display.lineSpace.insertBefore(H,K.display.lineSpace.firstChild)}function ge(K){setTimeout(function(){var H=!1,he=K.getInputField();he.nodeName=="TEXTAREA"?H=!he.value:K.lineCount()==1&&(H=!/[^\u200b]/.test(he.querySelector(".CodeMirror-line").textContent)),H?re(K):Oe(K)},20)}function me(K){O(K)&&re(K)}function fe(K){var H=K.getWrapperElement(),he=O(K);H.className=H.className.replace(" CodeMirror-empty","")+(he?" CodeMirror-empty":""),he?re(K):Oe(K)}function O(K){return K.lineCount()===1&&K.getLine(0)===""}})},"1eCo":function(Ee,ue,m){(function(F){F(m("VrN/"))})(function(F){"use strict";var Oe={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},re={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};F.defineMode("xml",function(ge,me){var fe=ge.indentUnit,O={},K=me.htmlMode?Oe:re;for(var H in K)O[H]=K[H];for(var H in me)O[H]=me[H];var he,R;function L(C,J){function U(le){return J.tokenize=le,le(C,J)}var S=C.next();if(S=="<")return C.eat("!")?C.eat("[")?C.match("CDATA[")?U(j("atom","]]>")):null:C.match("--")?U(j("comment","-->")):C.match("DOCTYPE",!0,!0)?(C.eatWhile(/[\w\._\-]/),U(z(1))):null:C.eat("?")?(C.eatWhile(/[\w\._\-]/),J.tokenize=j("meta","?>"),"meta"):(he=C.eat("/")?"closeTag":"openTag",J.tokenize=oe,"tag bracket");if(S=="&"){var ee;return C.eat("#")?C.eat("x")?ee=C.eatWhile(/[a-fA-F\d]/)&&C.eat(";"):ee=C.eatWhile(/[\d]/)&&C.eat(";"):ee=C.eatWhile(/[\w\.\-:]/)&&C.eat(";"),ee?"atom":"error"}else return C.eatWhile(/[^&<]/),null}L.isInText=!0;function oe(C,J){var U=C.next();if(U==">"||U=="/"&&C.eat(">"))return J.tokenize=L,he=U==">"?"endTag":"selfcloseTag","tag bracket";if(U=="=")return he="equals",null;if(U=="<"){J.tokenize=L,J.state=Se,J.tagName=J.tagStart=null;var S=J.tokenize(C,J);return S?S+" tag error":"tag error"}else return/[\'\"]/.test(U)?(J.tokenize=X(U),J.stringStartCol=C.column(),J.tokenize(C,J)):(C.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function X(C){var J=function(U,S){for(;!U.eol();)if(U.next()==C){S.tokenize=oe;break}return"string"};return J.isInAttribute=!0,J}function j(C,J){return function(U,S){for(;!U.eol();){if(U.match(J)){S.tokenize=L;break}U.next()}return C}}function z(C){return function(J,U){for(var S;(S=J.next())!=null;){if(S=="<")return U.tokenize=z(C+1),U.tokenize(J,U);if(S==">")if(C==1){U.tokenize=L;break}else return U.tokenize=z(C-1),U.tokenize(J,U)}return"meta"}}function P(C,J,U){this.prev=C.context,this.tagName=J,this.indent=C.indented,this.startOfLine=U,(O.doNotIndent.hasOwnProperty(J)||C.context&&C.context.noIndent)&&(this.noIndent=!0)}function te(C){C.context&&(C.context=C.context.prev)}function Q(C,J){for(var U;;){if(!C.context)return;if(U=C.context.tagName,!O.contextGrabbers.hasOwnProperty(U)||!O.contextGrabbers[U].hasOwnProperty(J))return;te(C)}}function Se(C,J,U){return C=="openTag"?(U.tagStart=J.column(),ze):C=="closeTag"?ae:Se}function ze(C,J,U){return C=="word"?(U.tagName=J.current(),R="tag",ie):O.allowMissingTagName&&C=="endTag"?(R="tag bracket",ie(C,J,U)):(R="error",ze)}function ae(C,J,U){if(C=="word"){var S=J.current();return U.context&&U.context.tagName!=S&&O.implicitlyClosed.hasOwnProperty(U.context.tagName)&&te(U),U.context&&U.context.tagName==S||O.matchClosing===!1?(R="tag",ne):(R="tag error",_e)}else return O.allowMissingTagName&&C=="endTag"?(R="tag bracket",ne(C,J,U)):(R="error",_e)}function ne(C,J,U){return C!="endTag"?(R="error",ne):(te(U),Se)}function _e(C,J,U){return R="error",ne(C,J,U)}function ie(C,J,U){if(C=="word")return R="attribute",se;if(C=="endTag"||C=="selfcloseTag"){var S=U.tagName,ee=U.tagStart;return U.tagName=U.tagStart=null,C=="selfcloseTag"||O.autoSelfClosers.hasOwnProperty(S)?Q(U,S):(Q(U,S),U.context=new P(U,S,ee==U.indented)),Se}return R="error",ie}function se(C,J,U){return C=="equals"?$:(O.allowMissing||(R="error"),ie(C,J,U))}function $(C,J,U){return C=="string"?k:C=="word"&&O.allowUnquoted?(R="string",ie):(R="error",ie(C,J,U))}function k(C,J,U){return C=="string"?k:ie(C,J,U)}return{startState:function(C){var J={tokenize:L,state:Se,indented:C||0,tagName:null,tagStart:null,context:null};return C!=null&&(J.baseIndent=C),J},token:function(C,J){if(!J.tagName&&C.sol()&&(J.indented=C.indentation()),C.eatSpace())return null;he=null;var U=J.tokenize(C,J);return(U||he)&&U!="comment"&&(R=null,J.state=J.state(he||U,C,J),R&&(U=R=="error"?U+" error":R)),U},indent:function(C,J,U){var S=C.context;if(C.tokenize.isInAttribute)return C.tagStart==C.indented?C.stringStartCol+1:C.indented+fe;if(S&&S.noIndent)return F.Pass;if(C.tokenize!=oe&&C.tokenize!=L)return U?U.match(/^(\s*)/)[0].length:0;if(C.tagName)return O.multilineTagIndentPastTag!==!1?C.tagStart+C.tagName.length+2:C.tagStart+fe*(O.multilineTagIndentFactor||1);if(O.alignCDATA&&/<!\[CDATA\[/.test(J))return 0;var ee=J&&/^<(\/)?([\w_:\.-]*)/.exec(J);if(ee&&ee[1])for(;S;)if(S.tagName==ee[2]){S=S.prev;break}else if(O.implicitlyClosed.hasOwnProperty(S.tagName))S=S.prev;else break;else if(ee)for(;S;){var le=O.contextGrabbers[S.tagName];if(le&&le.hasOwnProperty(ee[2]))S=S.prev;else break}for(;S&&S.prev&&!S.startOfLine;)S=S.prev;return S?S.indent+fe:C.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:O.htmlMode?"html":"xml",helperType:O.htmlMode?"html":"xml",skipAttribute:function(C){C.state==$&&(C.state=ie)},xmlCurrentTag:function(C){return C.tagName?{name:C.tagName,close:C.type=="closeTag"}:null},xmlCurrentContext:function(C){for(var J=[],U=C.context;U;U=U.prev)U.tagName&&J.push(U.tagName);return J.reverse()}}}),F.defineMIME("text/xml","xml"),F.defineMIME("application/xml","xml"),F.mimeModes.hasOwnProperty("text/html")||F.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"2RCv":function(Ee,ue,m){"use strict";var F=m("Awhp"),Oe=m("KrTs"),re=m("+L6B"),ge=m("2/Rp"),me=m("5NDa"),fe=m("5rEg"),O=m("0Owb"),K=m("oBTY"),H=m("tJVT"),he=m("PpiC"),R=m("q1tI"),L=m.n(R),oe=function(j){var z=j.InputRight,P=j.value,te=P===void 0?[]:P,Q=j.onChange,Se=Q===void 0?function(){}:Q,ze=Object(he.a)(j,["InputRight","value","onChange"]),ae=Object(R.useState)(),ne=Object(H.a)(ae,2),_e=ne[0],ie=ne[1],se=function(C){var J=te.filter(function(U,S){return S!==C});Se(J)},$=function(C){if(C.preventDefault(),!_e)return;Se([].concat(Object(K.a)(te),[_e])),ie(null)};return L.a.createElement("div",null,L.a.createElement(fe.a,Object(O.a)({},ze,{value:_e,onChange:function(C){return ie(C.target.value)},onPressEnter:$,onBlur:$})),z,L.a.createElement("div",{className:"mt20"},te==null?void 0:te.map(function(k,C){return L.a.createElement(Oe.a,{className:"ml10 mr10",count:"x",onClick:function(){return se(C)}},L.a.createElement(ge.a,{type:"primary",ghost:!0},k))})))};ue.a=oe},"4qgm":function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJ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ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"55Ip":function(Ee,ue,m){"use strict";m.d(ue,"a",function(){return Q}),m.d(ue,"b",function(){return ie});var F=m("Ty5D"),Oe=m("dI71"),re=m("q1tI"),ge=m.n(re),me=m("YS25"),fe=m("17x9"),O=m.n(fe),K=m("wx14"),H=m("zLVn"),he=m("9R94"),R=function($){Object(Oe.a)(k,$);function k(){for(var J,U=arguments.length,S=new Array(U),ee=0;ee<U;ee++)S[ee]=arguments[ee];return J=$.call.apply($,[this].concat(S))||this,J.history=Object(me.a)(J.props),J}var C=k.prototype;return C.render=function(){return ge.a.createElement(F.c,{history:this.history,children:this.props.children})},k}(ge.a.Component),L=function($){Object(Oe.a)(k,$);function k(){for(var J,U=arguments.length,S=new Array(U),ee=0;ee<U;ee++)S[ee]=arguments[ee];return J=$.call.apply($,[this].concat(S))||this,J.history=Object(me.b)(J.props),J}var C=k.prototype;return C.render=function(){return ge.a.createElement(F.c,{history:this.history,children:this.props.children})},k}(ge.a.Component),oe=function(k,C){return typeof k=="function"?k(C):k},X=function(k,C){return typeof k=="string"?Object(me.c)(k,null,null,C):k},j=function(k){return k},z=ge.a.forwardRef;typeof z=="undefined"&&(z=j);function P($){return!!($.metaKey||$.altKey||$.ctrlKey||$.shiftKey)}var te=z(function($,k){var C=$.innerRef,J=$.navigate,U=$.onClick,S=Object(H.a)($,["innerRef","navigate","onClick"]),ee=S.target,le=Object(K.a)({},S,{onClick:function(Me){try{U&&U(Me)}catch(E){throw Me.preventDefault(),E}!Me.defaultPrevented&&Me.button===0&&(!ee||ee==="_self")&&!P(Me)&&(Me.preventDefault(),J())}});return j!==z?le.ref=k||C:le.ref=C,ge.a.createElement("a",le)}),Q=z(function($,k){var C=$.component,J=C===void 0?te:C,U=$.replace,S=$.to,ee=$.innerRef,le=Object(H.a)($,["component","replace","to","innerRef"]);return ge.a.createElement(F.e.Consumer,null,function(q){q||Object(he.a)(!1);var Me=q.history,E=X(oe(S,q.location),q.location),v=E?Me.createHref(E):"",W=Object(K.a)({},le,{href:v,navigate:function(){var we=oe(S,q.location),Ze=U?Me.replace:Me.push;Ze(we)}});return j!==z?W.ref=k||ee:W.innerRef=ee,ge.a.createElement(J,W)})});if(!1)var Se,ze;var ae=function(k){return k},ne=ge.a.forwardRef;typeof ne=="undefined"&&(ne=ae);function _e(){for(var $=arguments.length,k=new Array($),C=0;C<$;C++)k[C]=arguments[C];return k.filter(function(J){return J}).join(" ")}var ie=ne(function($,k){var C=$["aria-current"],J=C===void 0?"page":C,U=$.activeClassName,S=U===void 0?"active":U,ee=$.activeStyle,le=$.className,q=$.exact,Me=$.isActive,E=$.location,v=$.sensitive,W=$.strict,Ce=$.style,we=$.to,Ze=$.innerRef,rt=Object(H.a)($,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return ge.a.createElement(F.e.Consumer,null,function(Ie){Ie||Object(he.a)(!1);var ye=E||Ie.location,Ae=X(oe(we,ye),ye),De=Ae.pathname,V=De&&De.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),I=V?Object(F.f)(ye.pathname,{path:V,exact:q,sensitive:v,strict:W}):null,Ue=!!(Me?Me(I,ye):I),Xe=Ue?_e(le,S):le,et=Ue?Object(K.a)({},Ce,{},ee):Ce,qe=Object(K.a)({"aria-current":Ue&&J||null,className:Xe,style:et,to:Ae},rt);return ae!==ne?qe.ref=k||Ze:qe.innerRef=Ze,ge.a.createElement(Q,qe)})});if(!1)var se},"5D2P":function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFTklEQVRoQ91aS4xURRQ993UzUUZcqFEc4meh0cQFSlwgrvAHSgQWhOhCk4GZqmdw+ERUWDkrBMUBnIzzqqYjcTaaGBLFxA8MjIk/3PhZCCa6UAyKC11ARnDo6Wvu+HrS0/R7r96nWVBJpxfv3nPPrbp169aHUEAzxsxl5gcB3AdgAREtkH8AXSH87wBOMfMp+QfwFREd0Vr/k9c8ZQUwxixi5mWe5y1l5qUAyimxqkQ0XqvVxonoE631Nyn1p8VTO7B///75Fy5c2MzMWwB0ZDHaQmeSiPbMmTNnb3d39+k0mKkcMMZsBiC/W9IYSSH7K4C9Wuu9rjpODoyMjNxQq9VGADzuCpxT7gPP83p7e3v/TMJJdCAIgoVEdBDAzUlgBX8/ycwrfd//Pg431gFr7RPM/HbBxFLBEdGTSql3opQiHQiCoI+IXk9lrU3CzLzR9/3BVvAtHbDWPsrMH7aJTyZYInpMKfVRs/JFDlQqlduq1eoxIro2k6U2KTHzX+VyeXFPT8/PjSYucsBae4iZH24Tj1ywRHRYKfVIpANhnt+Ty0r7lbc0rhMzI2CMuRHAlwBubT+HXBZ+AbBEa/3HrFLCWruTmV/MBZ1N+TiAdyNUX2qZeYh2KaW2zThQqVTumZqaOlZgbePqynEiWquU+qFZwRjzBoBnIoAmS6WSTOhvp0PIGPMcgN2uVguSiyQfBIFPRMMJdrZqrV+bdsBa+x4zryqImAtMJHlr7RJmPgxgbhwQ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ue,m){"use strict";var F=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Oe=new Uint8Array(16);function re(){if(!F)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return F(Oe)}var ge=/^(?:[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 me(oe){return typeof oe=="string"&&ge.test(oe)}for(var fe=me,O=[],K=0;K<256;++K)O.push((K+256).toString(16).substr(1));function H(oe){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=(O[oe[X+0]]+O[oe[X+1]]+O[oe[X+2]]+O[oe[X+3]]+"-"+O[oe[X+4]]+O[oe[X+5]]+"-"+O[oe[X+6]]+O[oe[X+7]]+"-"+O[oe[X+8]]+O[oe[X+9]]+"-"+O[oe[X+10]]+O[oe[X+11]]+O[oe[X+12]]+O[oe[X+13]]+O[oe[X+14]]+O[oe[X+15]]).toLowerCase();if(!fe(j))throw TypeError("Stringified UUID is invalid");return j}var he=H;function R(oe,X,j){oe=oe||{};var z=oe.random||(oe.rng||re)();if(z[6]=z[6]&15|64,z[8]=z[8]&63|128,X){j=j||0;for(var P=0;P<16;++P)X[j+P]=z[P];return X}return he(z)}var L=ue.a=R},"7ZXX":function(Ee,ue,m){Ee.exports=m.p+"static/err.6e7c5817.png"},"7ahc":function(Ee,ue,m){"use strict";m.d(ue,"a",function(){return ze});var F=m("k1fw"),Oe=m("0Owb"),re=m("+L6B"),ge=m("2/Rp"),me=m("y8nQ"),fe=m("Vl3Y"),O=m("tJVT"),K=m("OaEy"),H=m("2fM7"),he=m("q1tI"),R=m.n(he),L=m("VrN/"),oe=m.n(L),X=m("p77/"),j=m.n(X),z=m("c5Ni"),P=m.n(z),te=H.a.Option,Q={labelCol:{span:4},wrapperCol:{span:20}},Se={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"]};ue.b=function(ae){var ne=ae.callback,_e=ae.onCancel,ie=Object(he.useState)("python"),se=Object(O.a)(ie,2),$=se[0],k=se[1];function C(U){k(Se[U][1])}function J(U){ne(U)}return R.a.createElement(fe.a,Object(Oe.a)({},Q,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:J}),R.a.createElement(fe.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},R.a.createElement(H.a,{onChange:C},Object.keys(Se).map(function(U){return R.a.createElement(te,{key:U,value:U},Se[U][0])}))),R.a.createElement(fe.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},R.a.createElement(ze,{mode:$})),R.a.createElement("div",{className:"flex-container flex-end"},R.a.createElement(ge.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),R.a.createElement(ge.a,{type:"ghost",onClick:_e},"\u53D6\u6D88")))};function ze(ae){var ne=ae.value,_e=ae.onChange,ie=ae.mode,se=ae.options,$=se===void 0?{}:se,k=Object(he.useRef)(),C=Object(he.useState)(),J=Object(O.a)(C,2),U=J[0],S=J[1];return Object(he.useEffect)(function(){if(U){function ee(le){var q=le.getValue();_e&&_e(q)}return U.on("change",ee),function(){U.off("change",ee)}}},[U,_e]),Object(he.useEffect)(function(){U&&U.setOption("mode",ie)},[U,ie]),Object(he.useEffect)(function(){U&&((ne!==U.getValue()||ne==="")&&setTimeout(function(){U.setValue(ne||" ")},300))},[U,ne]),Object(he.useEffect)(function(){if(k.current&&!U){var ee=oe.a.fromTextArea(k.current,Object(F.a)({mode:ie,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},$));S(ee)}},[k.current,U]),R.a.createElement("div",{className:"my-codemirror-container"},R.a.createElement("textarea",{ref:k}))}},"7ixt":function(Ee,ue,m){"use strict";m.d(ue,"a",function(){return re});var F={adjustX:1,adjustY:1},Oe=[0,0],re={left:{points:["cr","cl"],overflow:F,offset:[-4,0],targetOffset:Oe},right:{points:["cl","cr"],overflow:F,offset:[4,0],targetOffset:Oe},top:{points:["bc","tc"],overflow:F,offset:[0,-4],targetOffset:Oe},bottom:{points:["tc","bc"],overflow:F,offset:[0,4],targetOffset:Oe},topLeft:{points:["bl","tl"],overflow:F,offset:[0,-4],targetOffset:Oe},leftTop:{points:["tr","tl"],overflow:F,offset:[-4,0],targetOffset:Oe},topRight:{points:["br","tr"],overflow:F,offset:[0,-4],targetOffset:Oe},rightTop:{points:["tl","tr"],overflow:F,offset:[4,0],targetOffset:Oe},bottomRight:{points:["tr","br"],overflow:F,offset:[0,4],targetOffset:Oe},rightBottom:{points:["bl","br"],overflow:F,offset:[4,0],targetOffset:Oe},bottomLeft:{points:["tl","bl"],overflow:F,offset:[0,4],targetOffset:Oe},leftBottom:{points:["br","bl"],overflow:F,offset:[-4,0],targetOffset:Oe}},ge=re},"7v3h":function(Ee,ue,m){Ee.exports=m.p+"static/empty2.dd73f390.png"},"8/bI":function(Ee,ue,m){Ee.exports=m.p+"static/empty.8918e228.png"},"8EBN":function(Ee,ue,m){(function(F){F(m("VrN/"))})(function(F){"use strict";F.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Oe=0;Oe<F.modeInfo.length;Oe++){var re=F.modeInfo[Oe];re.mimes&&(re.mime=re.mimes[0])}F.findModeByMIME=function(ge){ge=ge.toLowerCase();for(var me=0;me<F.modeInfo.length;me++){var fe=F.modeInfo[me];if(fe.mime==ge)return fe;if(fe.mimes){for(var O=0;O<fe.mimes.length;O++)if(fe.mimes[O]==ge)return fe}}if(/\+xml$/.test(ge))return F.findModeByMIME("application/xml");if(/\+json$/.test(ge))return F.findModeByMIME("application/json")},F.findModeByExtension=function(ge){ge=ge.toLowerCase();for(var me=0;me<F.modeInfo.length;me++){var fe=F.modeInfo[me];if(fe.ext){for(var O=0;O<fe.ext.length;O++)if(fe.ext[O]==ge)return fe}}},F.findModeByFileName=function(ge){for(var me=0;me<F.modeInfo.length;me++){var fe=F.modeInfo[me];if(fe.file&&fe.file.test(ge))return fe}var O=ge.lastIndexOf("."),K=O>-1&&ge.substring(O+1,ge.length);if(K)return F.findModeByExtension(K)},F.findModeByName=function(ge){ge=ge.toLowerCase();for(var me=0;me<F.modeInfo.length;me++){var fe=F.modeInfo[me];if(fe.name.toLowerCase()==ge)return fe;if(fe.alias){for(var O=0;O<fe.alias.length;O++)if(fe.alias[O].toLowerCase()==ge)return fe}}}})},"8hTe":function(Ee,ue,m){Ee.exports={button:"button___1wy9m"}},"9Bee":function(Ee,ue,m){"use strict";var F=m("DYRE"),Oe=m("zeV3"),re=m("+L6B"),ge=m("2/Rp"),me=m("k1fw"),fe=m("9og8"),O=m("tJVT"),K=m("WmNS"),H=m.n(K),he=m("q1tI"),R=m.n(he),L=m("vg9a"),oe=m("DlQD"),X=m.n(oe),j=m("rUJ1");function z(c,o){var a=c.match(/^(\s+)(?:```)/);if(a===null)return o;var u=a[1];return o.split(`
`).map(function(d){var h=d.match(/^\s+/);if(h===null)return d;var T=Object(O.a)(h,1),ke=T[0];return ke.length>=u.length?d.slice(u.length):d}).join(`
`)}var P=[],te=["<ul>"],Q=new X.a.Renderer,Se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ze(){P.length=0,te=["<ul>"]}var ae={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ne(c,o,a,u){if(o>=c.length||c[o].level<=a)return o;var d=c[o];u.push("<li><a href='#"+d.anchor+"'>"+d.text+"</a>"),o++;var h=[];return o=ne(c,o,d.level,h),h.length>0&&(u.push("<ul>"),h.forEach(function(T){u.push(T)}),u.push("</ul>")),u.push("</li>"),o=ne(c,o,a,u),o}function _e(){return ne(P,0,0,te),te.push("</ul>"),te.join("")}var ie={heading:function(o){var a=Se.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],d=z(u,a[3]||""),h=a[2]?a[2].trim():a[2];if(["latex","katex","math"].indexOf(h)>=0){var T=k(),ke=d;d=T,C[T]={type:"block",expression:ke}}return{type:"code",raw:u,lang:h,text:d}}}},se=/(?:\${2})([^\n`]+?)(?:\${2})/gi,$=0,k=function(){return"__special_katext_id_".concat($++,"__")},C={};function J(){return C}function U(){$=0,C={}}function S(c){return c=c.replace(se,function(o,a){var u=k();return C[u]={type:"inline",expression:a},u}),c}var ee=Q.listitem;Q.listitem=function(c){return ee(S(c))};var le=Q.paragraph;Q.paragraph=function(c){return le(S(c))};var q=Q.tablecell;Q.tablecell=function(c,o){return q(S(c),o)},Q.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(j.escape)(c,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(a?c:Object(j.escape)(c,!0))+"</code></pre>"},Q.heading=function(c,o,a){var u=this.options.headerPrefix+a.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return P.push({anchor:u,level:o,text:c}),"<h"+o+' id="'+u+'">'+c+"</h"+o+">"},X.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),X.a.use({tokenizer:ie,renderer:Q});var Me=X.a,E=m("SJMd"),v=m("ulZh"),W=m.n(v),Ce=m("m3rI"),we=m("Oy/b"),Ze=m("p5ED"),rt=m("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 Ie=function(c,o){return(Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(a[d]=u[d])})(c,o)};function ye(c,o){function a(){this.constructor=c}Ie(c,o),c.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function Ae(c,o,a,u){return new(a||(a=Promise))(function(d,h){function T(dt){try{He(u.next(dt))}catch(Te){h(Te)}}function ke(dt){try{He(u.throw(dt))}catch(Te){h(Te)}}function He(dt){var Te;dt.done?d(dt.value):(Te=dt.value,Te instanceof a?Te:new a(function(St){St(Te)})).then(T,ke)}He((u=u.apply(c,o||[])).next())})}function De(c,o){var a,u,d,h,T={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function ke(He){return function(dt){return function(Te){if(a)throw new TypeError("Generator is already executing.");for(;T;)try{if(a=1,u&&(d=2&Te[0]?u.return:Te[0]?u.throw||((d=u.return)&&d.call(u),0):u.next)&&!(d=d.call(u,Te[1])).done)return d;switch(u=0,d&&(Te=[2&Te[0],d.value]),Te[0]){case 0:case 1:d=Te;break;case 4:return T.label++,{value:Te[1],done:!1};case 5:T.label++,u=Te[1],Te=[0];continue;case 7:Te=T.ops.pop(),T.trys.pop();continue;default:if(!(d=T.trys,(d=d.length>0&&d[d.length-1])||Te[0]!==6&&Te[0]!==2)){T=0;continue}if(Te[0]===3&&(!d||Te[1]>d[0]&&Te[1]<d[3])){T.label=Te[1];break}if(Te[0]===6&&T.label<d[1]){T.label=d[1],d=Te;break}if(d&&T.label<d[2]){T.label=d[2],T.ops.push(Te);break}d[2]&&T.ops.pop(),T.trys.pop();continue}Te=o.call(c,T)}catch(St){Te=[6,St],u=0}finally{a=d=0}if(5&Te[0])throw Te[1];return{value:Te[0]?Te[1]:void 0,done:!0}}([He,dt])}}}function V(){for(var c=0,o=0,a=arguments.length;o<a;o++)c+=arguments[o].length;var u=Array(c),d=0;for(o=0;o<a;o++)for(var h=arguments[o],T=0,ke=h.length;T<ke;T++,d++)u[d]=h[T];return u}var I=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,d=a;u<d.length;u++){var h=d[u],T=h[0],ke=h[1];o.setAttribute(T,ke)}},c.createRect=function(o,a,u){var d=document.createElementNS("http://www.w3.org/2000/svg","rect");return d.setAttribute("width",o.toString()),d.setAttribute("height",a.toString()),u&&c.setAttributes(d,u),d},c.createLine=function(o,a,u,d,h){var T=document.createElementNS("http://www.w3.org/2000/svg","line");return T.setAttribute("x1",o.toString()),T.setAttribute("y1",a.toString()),T.setAttribute("x2",u.toString()),T.setAttribute("y2",d.toString()),h&&c.setAttributes(T,h),T},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 d=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return d.setAttribute("cx",(o/2).toString()),d.setAttribute("cy",(a/2).toString()),d.setAttribute("rx",(o/2).toString()),d.setAttribute("ry",(a/2).toString()),u&&c.setAttributes(d,u),d},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,d,h,T,ke){var He=document.createElementNS("http://www.w3.org/2000/svg","marker");return c.setAttributes(He,[["id",o],["orient",a],["markerWidth",u.toString()],["markerHeight",d.toString()],["refX",h.toString()],["refY",T.toString()]]),He.appendChild(ke),He},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}(),Ue=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}(),Xe=function(){function c(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return c.prototype.rasterize=function(o,a,u){var d=this;return new Promise(function(h){var T=u!==void 0?u:document.createElement("canvas");o===null&&(d.markersOnly=!0,d.naturalSize=!1);var ke=document.createElementNS("http://www.w3.org/2000/svg","svg");ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),ke.setAttribute("width",a.width.baseVal.valueAsString),ke.setAttribute("height",a.height.baseVal.valueAsString),ke.setAttribute("viewBox","0 0 "+a.viewBox.baseVal.width.toString()+" "+a.viewBox.baseVal.height.toString()),ke.innerHTML=a.innerHTML,d.naturalSize===!0?(ke.width.baseVal.value=o.naturalWidth,ke.height.baseVal.value=o.naturalHeight):d.width!==void 0&&d.height!==void 0&&(ke.width.baseVal.value=d.width,ke.height.baseVal.value=d.height),T.width=ke.width.baseVal.value,T.height=ke.height.baseVal.value;var He=ke.outerHTML,dt=T.getContext("2d");d.markersOnly!==!0&&dt.drawImage(o,0,0,T.width,T.height);var Te=window.URL,St=new Image(T.width,T.height);St.setAttribute("crossOrigin","anonymous");var _t=new Blob([He],{type:"image/svg+xml"}),qt=Te.createObjectURL(_t);St.onload=function(){dt.drawImage(St,0,0),Te.revokeObjectURL(qt);var Hn=T.toDataURL(d.imageType,d.imageQuality);h(Hn)},St.src=qt})},c}(),et=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 $e("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new $e("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new $e("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new pe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new pe("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}(),$e=function(c,o){this.selector=c,this.style=o},pe=function(c,o){this.localName=c,this.style=o},Be=function(){function c(o,a,u,d,h){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=o,this.displayMode=a,this.markerItems=u,this.uiStyleSettings=d,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 T=document.createElement("div");T.className=""+a.toolbarButtonStyleClass.name,T.setAttribute("data-type-name",h.typeName),T.innerHTML=h.icon,T.addEventListener("click",function(){a.markerToolbarButtonClicked(T,h)}),a.buttons.push(T),a.markerButtons.push(T)}),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 d=document.createElement("div");d.className=this.toolbarBlockStyleClass.name,d.style.whiteSpace="nowrap",d.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(d),this.addActionButton(d,'<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(d,'<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 d=this,h=document.createElement("div");switch(h.className=""+this.toolbarButtonStyleClass.name,h.innerHTML=a,h.setAttribute("data-action",u),h.addEventListener("click",function(){d.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 pe("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 pe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new pe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new pe("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 pe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var o=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pe("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 pe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new $e("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new $e("."+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}(),Re=function(){function c(o,a,u,d){this.panels=[],this.panelButtons=[],this.markerjsContainer=o,this.displayMode=a,this.uiStyleSettings=u,this.styles=d,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return c.prototype.addStyles=function(){var o;this.toolboxStyleClass=this.styles.addClass(new pe("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 pe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var a=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new pe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new pe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new pe("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 pe("toolbox-panel-row_colors",`
background-color: `+((o=this.uiStyleSettings.toolboxBackgroundColor)!==null&&o!==void 0?o:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new pe("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 pe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new $e("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new $e("."+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,d=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 T;h.uiStyleSettings=d.uiStyleSettings;var ke=document.createElement("div");ke.className=d.toolboxButtonStyleClass.name+" "+((T=d.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&T!==void 0?T:d.toolboxButtonStyleColorsClass.name),ke.innerHTML=h.icon,ke.title=h.title,ke.addEventListener("click",function(){d.panelButtonClick(h)}),d.panelButtons.push(ke),d.buttonRow.appendChild(ke)}),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 d=o.getUi();d.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(d),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,T){var ke,He;h.className=a.toolboxButtonStyleClass.name+" "+(T===u?""+((ke=a.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ke!==void 0?ke:a.toolboxActiveButtonStyleColorsClass.name):""+((He=a.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&He!==void 0?He:a.toolboxButtonStyleColorsClass.name))})},c}(),tt=function(c,o){this.title=c,this.icon=o},Ge=function(c){function o(a,u,d,h){var T=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 T.colors=[],T.addTransparent=!1,T.colorBoxes=[],T.colors=u,T.currentColor=d,T.setCurrentColor=T.setCurrentColor.bind(T),T.getColorBox=T.getColorBox.bind(T),T}return ye(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(d){var h=a.getColorBox(d);u.appendChild(h),a.colorBoxes.push(h)}),u},o.prototype.getColorBox=function(a){var u=this,d=this.uiStyleSettings.toolbarHeight/4,h=this.uiStyleSettings.toolbarHeight-d,T=document.createElement("div");T.style.display="inline-block",T.style.boxSizing="content-box",T.style.width=h-2+"px",T.style.height=h-2+"px",T.style.padding="1px",T.style.marginRight="2px",T.style.marginBottom="2px",T.style.borderWidth="2px",T.style.borderStyle="solid",T.style.borderRadius=(h+2)/2+"px",T.style.borderColor=a===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",T.addEventListener("click",function(){u.setCurrentColor(a,T)});var ke=document.createElement("div");return ke.style.display="inline-block",ke.style.width=h-2+"px",ke.style.height=h-2+"px",ke.style.backgroundColor=a,ke.style.borderRadius=h/2+"px",a==="transparent"&&(ke.style.fill=this.uiStyleSettings.toolboxAccentColor,ke.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>`),T.appendChild(ke),T},o.prototype.setCurrentColor=function(a,u){var d=this;this.currentColor=a,this.colorBoxes.forEach(function(h){h.style.borderColor=h===u?d.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(a)},o}(tt),xe=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}(),Fe=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}(),ut=function(){function c(){this.GRIP_SIZE=10,this.visual=I.createGroup(),this.visual.appendChild(I.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(I.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}(),at=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}(),Ve=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||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(I.createTransform()),h.setupControlBox(),h}return ye(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=I.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 d=this.unrotatePoint(a);if(this.manipulationStartX=d.x,this.manipulationStartY=d.y,this.offsetX=d.x-this.left,this.offsetY=d.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 T=this.container.transform.baseVal.getItem(0);T.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(T,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,d=this.manipulationStartWidth,h=this.manipulationStartTop,T=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:u=this.manipulationStartLeft+a.x-this.manipulationStartX,d=this.manipulationStartWidth+this.manipulationStartLeft-u;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:d=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,T=this.manipulationStartHeight+this.manipulationStartTop-h;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:T=this.manipulationStartHeight+a.y-this.manipulationStartY}d>=0?(this.left=u,this.width=d):(this.left=u+d,this.width=-d),T>=0?(this.top=h,this.height=T):(this.top=h+T,this.height=-T),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(),d=I.createPoint(a.x,a.y);return{x:(d=d.matrixTransform(u)).x,y:d.y}},o.prototype.unrotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM();u=u.inverse();var d=I.createPoint(a.x,a.y);return{x:(d=d.matrixTransform(u)).x,y:d.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=I.createGroup();var a=I.createTransform();a.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(a),this.container.appendChild(this.controlBox),this.controlRect=I.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=I.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 Fe,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 ut;return a.visual.transform.baseVal.appendItem(I.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.controlGrips.topLeft.GRIP_SIZE,u=-a/2,d=u,h=(this.width+this.CB_DISTANCE)/2-a/2,T=(this.height+this.CB_DISTANCE)/2-a/2,ke=this.height+this.CB_DISTANCE-a/2,He=this.width+this.CB_DISTANCE-a/2;this.positionGrip(this.controlGrips.topLeft.visual,u,d),this.positionGrip(this.controlGrips.topCenter.visual,h,d),this.positionGrip(this.controlGrips.topRight.visual,He,d),this.positionGrip(this.controlGrips.centerLeft.visual,u,T),this.positionGrip(this.controlGrips.centerRight.visual,He,T),this.positionGrip(this.controlGrips.bottomLeft.visual,u,ke),this.positionGrip(this.controlGrips.bottomCenter.visual,h,ke),this.positionGrip(this.controlGrips.bottomRight.visual,He,ke),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,h,d-3*this.CB_DISTANCE)},o.prototype.positionGrip=function(a,u,d){var h=a.transform.baseVal.getItem(0);h.setTranslate(u,d),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:at.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:at.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(at.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,u.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(at.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,u.containerTransformMatrix))},o.prototype.scale=function(a,u){c.prototype.scale.call(this,a,u);var d=this.rotatePoint({x:this.left,y:this.top}),h=this.unrotatePoint({x:d.x*a,y:d.y*u});this.left=h.x,this.top=h.y,this.width=this.width*a,this.height=this.height*u,this.adjustControlBox()},o}(xe),Qe=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||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 ye(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=I.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),I.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&&I.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&I.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&I.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&I.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}(Ve),yt=function(c){function o(a,u,d,h){var T=c.call(this,a,h||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return T.widths=[],T.widthBoxes=[],T.widths=u,T.currentWidth=d,T.setCurrentWidth=T.setCurrentWidth.bind(T),T}return ye(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(d){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=d===a.currentWidth?a.uiStyleSettings.toolboxAccentColor:"transparent",h.addEventListener("click",function(){a.setCurrentWidth(d,h)}),u.appendChild(h);var T=document.createElement("div");T.innerText=d.toString(),T.style.marginRight="5px",h.appendChild(T);var ke=document.createElement("div");ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.display="flex",ke.style.alignItems="center";var He=document.createElement("hr");He.style.minWidth="20px",He.style.border="0px",He.style.borderTop=d+"px solid "+a.uiStyleSettings.toolboxColor,He.style.flexGrow="2",ke.appendChild(He),h.appendChild(ke),a.widthBoxes.push(h)}),u},o.prototype.setCurrentWidth=function(a,u){var d=this;this.currentWidth=a,this.widthBoxes.forEach(function(h){h.style.borderColor=h===u?d.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},o}(tt),ft=function(c){function o(a,u,d,h){var T=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 T.styles=[],T.styleBoxes=[],T.styles=u,T.currentStyle=d,T.setCurrentStyle=T.setCurrentStyle.bind(T),T}return ye(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(d){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=d===a.currentStyle?a.uiStyleSettings.toolboxAccentColor:"transparent",h.addEventListener("click",function(){a.setCurrentStyle(d,h)}),u.appendChild(h);var T=document.createElement("div");T.style.minHeight="20px",T.style.flexGrow="2",T.style.overflow="hidden";var ke=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+a.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(d!==""?'stroke-dasharray="'+d+'"':"")+` />
</svg>`;T.innerHTML=ke,h.appendChild(T),a.styleBoxes.push(h)}),u},o.prototype.setCurrentStyle=function(a,u){var d=this;this.currentStyle=a,this.styleBoxes.forEach(function(h){h.style.borderColor=h===u?d.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},o}(tt),st=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||this;return h.strokeColor=d.defaultColor,h.strokeWidth=d.defaultStrokeWidth,h.strokeDasharray=d.defaultStrokeDasharray,h.strokePanel=new Ge("Line color",d.defaultColorSet,d.defaultColor),h.strokePanel.onColorChanged=h.setStrokeColor,h.strokeWidthPanel=new yt("Line width",d.defaultStrokeWidths,d.defaultStrokeWidth),h.strokeWidthPanel.onWidthChanged=h.setStrokeWidth,h.strokeStylePanel=new ft("Line style",d.defaultStrokeDasharrays,d.defaultStrokeDasharray),h.strokeStylePanel.onStyleChanged=h.setStrokeDasharray,h}return ye(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}(Qe),ce=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,d){var h=c.call(this,a,u,d)||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 ye(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=I.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 ut;return a.visual.transform.baseVal.appendItem(I.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,d){var h=a.transform.baseVal.getItem(0);h.setTranslate(u,d),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}(xe),ot=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||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=d.defaultColor,h.strokeWidth=d.defaultStrokeWidth,h.strokeDasharray=d.defaultStrokeDasharray,h.strokePanel=new Ge("Line color",d.defaultColorSet,d.defaultColor),h.strokePanel.onColorChanged=h.setStrokeColor,h.strokeWidthPanel=new yt("Line width",d.defaultStrokeWidths,d.defaultStrokeWidth),h.strokeWidthPanel.onWidthChanged=h.setStrokeWidth,h.strokeStylePanel=new ft("Line style",d.defaultStrokeDasharrays,d.defaultStrokeDasharray),h.strokeStylePanel.onStyleChanged=h.setStrokeDasharray,h}return ye(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=I.createGroup(),this.selectorLine=I.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=I.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()),I.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),I.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),I.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),de=function(c){function o(a,u,d,h){var T=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 T.fonts=[],T.fontBoxes=[],T.fonts=u,T.currentFont=d,T.setCurrentFont=T.setCurrentFont.bind(T),T}return ye(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(d){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=d===a.currentFont?a.uiStyleSettings.toolboxAccentColor:"transparent",h.addEventListener("click",function(){a.setCurrentFont(d,h)}),u.appendChild(h);var T=document.createElement("div");T.style.display="flex",T.style.minHeight="20px",T.style.flexGrow="2",T.style.fontFamily=d,T.style.overflow="hidden";var ke=document.createElement("div");ke.style.whiteSpace="nowrap",ke.style.overflow="hidden",ke.style.textOverflow="ellipsis",ke.innerHTML="The quick brown fox jumps over the lazy dog",T.appendChild(ke),h.appendChild(T),a.fontBoxes.push(h)}),u},o.prototype.setCurrentFont=function(a,u){var d=this;this.currentFont=a,this.fontBoxes.forEach(function(h){h.style.borderColor=h===u?d.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},o}(tt),Ne=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||this;return h.color="transparent",h.padding=5,h.DEFAULT_TEXT="your text here",h.text=h.DEFAULT_TEXT,h.isMoved=!1,h.color=d.defaultColor,h.fontFamily=d.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 Ge("Color",d.defaultColorSet,d.defaultColor),h.colorPanel.onColorChanged=h.setColor,h.fontFamilyPanel=new de("Font",d.defaultFontFamilies,d.defaultFontFamily),h.fontFamilyPanel.onFontChanged=h.setFont,h}return ye(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(d){d===a&&(u=!0)}),u},o.prototype.createVisual=function(){this.visual=I.createGroup(),this.bgRectangle=I.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=I.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(I.createTransform()),this.textElement.transform.baseVal.appendItem(I.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(I.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 d=(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(d,h)}return u},o.prototype.getTextPosition=function(a){var u=this.textElement.getBBox(),d=0,h=0;return u.width>0&&u.height>0&&(d=(this.width-u.width*a)/2,h=this.height/2-u.height*a/2),{x:d,y:h}},o.prototype.sizeText=function(){var a=this.textElement.getBBox(),u=this.getTextScale(),d=this.getTextPosition(u);d.y-=a.y*u,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+d.x+"px, "+d.y+"px) scale("+u+", "+u+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(d.x,d.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&&(I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),I.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 d=u.clipboardData.getData("text"),h=window.getSelection();if(!h.rangeCount)return!1;h.deleteFromDocument(),h.getRangeAt(0).insertNode(document.createTextNode(d)),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}),d=this.textElement.getBBox(),h={x:d.width*a,y:d.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&&I.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&&I.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}(Ve),B=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||this;return h.color="transparent",h.lineWidth=3,h.drawing=!1,h.pixelRatio=1,h.color=d.defaultColor,h.lineWidth=d.defaultStrokeWidth,h.pixelRatio=d.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 Ge("Color",d.defaultColorSet,d.defaultColor),h.colorPanel.onColorChanged=h.setColor,h.lineWidthPanel=new yt("Line width",d.defaultStrokeWidths,d.defaultStrokeWidth),h.lineWidthPanel.onWidthChanged=h.setLineWidth,h}return ye(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=I.createGroup(),this.drawingImage=I.createImage(),this.visual.appendChild(this.drawingImage);var a=I.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),I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),I.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],d=u[0],h=u[1],T=u[2],ke=u[3],He=!1,dt=0;dt<this.canvasElement.height;dt++)for(var Te=0;Te<this.canvasElement.width;Te++)a.data[dt*this.canvasElement.width*4+4*Te+3]>0&&(He=!0,dt<h&&(h=dt),Te<d&&(d=Te),dt>ke&&(ke=dt),Te>T&&(T=Te));if(He){this.left=d/this.pixelRatio,this.top=h/this.pixelRatio,this.width=(T-d)/this.pixelRatio,this.height=(ke-h)/this.pixelRatio;var St=document.createElement("canvas");St.width=T-d,St.height=ke-h,St.getContext("2d").putImageData(this.canvasContext.getImageData(d,h,T-d,ke-h),0,0),this.drawingImgUrl=St.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},o.prototype.setDrawingImage=function(){I.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),I.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}(Ve),D=function(c){function o(a,u,d){var h=c.call(this,a,d||'<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 ye(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 d=function(ke){var He="both";switch(ke){case 0:He="both";break;case 1:He="start";break;case 2:He="end";break;case 3:He="none"}var dt=document.createElement("div");if(dt.style.display="flex",dt.style.flexGrow="2",dt.style.alignItems="center",dt.style.justifyContent="space-between",dt.style.padding="5px",dt.style.borderWidth="2px",dt.style.borderStyle="solid",dt.style.borderColor=He===h.currentType?h.uiStyleSettings.toolboxAccentColor:"transparent",dt.addEventListener("click",function(){a.setCurrentType(He,dt)}),u.appendChild(dt),He==="both"||He==="start"){var Te=document.createElement("div");Te.style.display="flex",Te.style.alignItems="center",Te.style.minHeight="20px",Te.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>`,Te.style.marginLeft="5px",dt.appendChild(Te)}var St=document.createElement("div");St.style.display="flex",St.style.alignItems="center",St.style.minHeight="20px",St.style.flexGrow="2";var _t=document.createElement("hr");if(_t.style.minWidth="20px",_t.style.border="0px",_t.style.borderTop="3px solid "+(h.uiStyleSettings!==void 0?h.uiStyleSettings.toolboxColor:"#eeeeee"),_t.style.flexGrow="2",St.appendChild(_t),dt.appendChild(St),He==="both"||He==="end"){var qt=document.createElement("div");qt.style.display="flex",qt.style.alignItems="center",qt.style.minHeight="20px",qt.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>`,qt.style.marginRight="5px",dt.appendChild(qt)}h.typeBoxes.push(dt)},h=this,T=0;T<4;T++)d(T);return u},o.prototype.setCurrentType=function(a,u){var d=this;this.currentType=a,this.typeBoxes.forEach(function(h){h.style.borderColor=h===u?d.uiStyleSettings!==void 0?d.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},o}(tt),N=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||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 D("Arrow type","end"),h.arrowTypePanel.onArrowTypeChanged=h.setArrowType,h}return ye(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 d=this.arrowBaseWidth+2*this.strokeWidth,h=this.arrowBaseHeight+2*this.strokeWidth;return a-d/2+","+(u+h/2)+" "+a+","+(u-h/2)+" "+(a+d/2)+","+(u+h/2)},o.prototype.createTips=function(){this.arrow1=I.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=I.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(I.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",I.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),I.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 d=this.arrow2.transform.baseVal.getItem(0);d.setRotate(a+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(d,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}(ot),y=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||this;return h.fillColor=d.defaultFillColor,h.strokeWidth=0,h.fillPanel=new Ge("Color",d.defaultColorSet,d.defaultFillColor),h.fillPanel.onColorChanged=h.setFillColor,h}return ye(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}(Qe),b=function(c){function o(a,u,d,h){var T=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 T.opacities=[],T.opacityBoxes=[],T.opacities=u,T.currentOpacity=d,T.setCurrentOpacity=T.setCurrentOpacity.bind(T),T}return ye(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(d){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=d===a.currentOpacity?a.uiStyleSettings.toolboxAccentColor:"transparent",h.addEventListener("click",function(){a.setCurrentOpacity(d,h)}),u.appendChild(h);var T=document.createElement("div");T.innerText=100*d+"%",h.appendChild(T),a.opacityBoxes.push(h)}),u},o.prototype.setCurrentOpacity=function(a,u){var d=this;this.currentOpacity=a,this.opacityBoxes.forEach(function(h){h.style.borderColor=h===u?d.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},o}(tt),x=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||this;return h.setOpacity=h.setOpacity.bind(h),h.fillColor=d.defaultHighlightColor,h.strokeWidth=0,h.opacity=d.defaultHighlightOpacity,h.fillPanel=new Ge("Color",d.defaultColorSet,h.fillColor),h.fillPanel.onColorChanged=h.setFillColor,h.opacityPanel=new b("Opacity",d.defaultOpacitySteps,h.opacity),h.opacityPanel.onOpacityChanged=h.setOpacity,h}return ye(o,c),o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&I.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),w='<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>',Y=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||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=d.defaultStrokeColor,h.bgColor=d.defaultFillColor,h.fontFamily=d.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 Ge("Text color",d.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 Ge("Fill color",d.defaultColorSet,h.bgColor,w),h.bgColorPanel.onColorChanged=h.setBgColor,h.fontFamilyPanel=new de("Font",d.defaultFontFamilies,d.defaultFontFamily),h.fontFamilyPanel.onFontChanged=h.setFont,h.tipGrip=new ut,h.tipGrip.visual.transform.baseVal.appendItem(I.createTransform()),h.controlBox.appendChild(h.tipGrip.visual),h}return ye(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(){I.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=I.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&&(I.setAttributes(this.bgRectangle,[["fill",a]]),I.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),d=this.height/5;a&&(this.tipPosition={x:u+d/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))?(d=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:0},this.tipBase2Position={x:u+d,y:0}):(this.tipBase1Position={x:0,y:u},this.tipBase2Position={x:0,y:u+d}):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))?(d=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-d,y:0},this.tipBase2Position={x:this.width-u,y:0}):(this.tipBase1Position={x:this.width,y:u},this.tipBase2Position={x:this.width,y:u+d}):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))?(d=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-d,y:this.height},this.tipBase2Position={x:this.width-u,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-u-d},this.tipBase2Position={x:this.width,y:this.height-u}):h<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(d=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:this.height},this.tipBase2Position={x:u+d,y:this.height}):(this.tipBase1Position={x:0,y:this.height-u},this.tipBase2Position={x:0,y:this.height-u-d})},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.positionTip()},o.prototype.positionTip=function(){I.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}(Ne),_=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||this;return h.fillColor="transparent",h.strokeColor="transparent",h.strokeWidth=0,h.strokeDasharray="",h.opacity=1,h.strokeColor=d.defaultColor,h.strokeWidth=d.defaultStrokeWidth,h.strokeDasharray=d.defaultStrokeDasharray,h.fillColor=d.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 Ge("Line color",V(d.defaultColorSet,["transparent"]),d.defaultColor),h.strokePanel.onColorChanged=h.setStrokeColor,h.fillPanel=new Ge("Fill color",V(d.defaultColorSet,["transparent"]),h.fillColor,w),h.fillPanel.onColorChanged=h.setFillColor,h.strokeWidthPanel=new yt("Line width",d.defaultStrokeWidths,d.defaultStrokeWidth),h.strokeWidthPanel.onWidthChanged=h.setStrokeWidth,h.strokeStylePanel=new ft("Line style",d.defaultStrokeDasharrays,d.defaultStrokeDasharray),h.strokeStylePanel.onStyleChanged=h.setStrokeDasharray,h.opacityPanel=new b("Opacity",d.defaultOpacitySteps,h.opacity),h.opacityPanel.onOpacityChanged=h.setOpacity,h}return ye(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=I.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),I.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&&I.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&I.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(a),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&I.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&I.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&I.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}(Ve),be=function(c){function o(a,u,d){return c.call(this,a,u,d)||this}return ye(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=I.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(I.createTransform()),this.visual.appendChild(this.tip1),this.tip2=I.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(I.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&&(I.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()]]),I.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 d=this.tip2.transform.baseVal.getItem(0);d.setRotate(a+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(d,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}(ot),Ye=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||this;return h.strokePanel.colors=d.defaultColorSet,h.fillColor="transparent",h}return ye(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}(_),ht=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}(),it=function(c){function o(a,u,d){var h=c.call(this,a,u,d)||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=d.defaultColor,h.strokeWidth=d.defaultStrokeWidth,h.strokeDasharray=d.defaultStrokeDasharray,h.strokePanel=new Ge("Line color",d.defaultColorSet,d.defaultColor),h.strokePanel.onColorChanged=h.setStrokeColor,h.strokeWidthPanel=new yt("Line width",d.defaultStrokeWidths,d.defaultStrokeWidth),h.strokeWidthPanel.onWidthChanged=h.setStrokeWidth,h.strokeStylePanel=new ft("Line style",d.defaultStrokeDasharrays,d.defaultStrokeDasharray),h.strokeStylePanel.onStyleChanged=h.setStrokeDasharray,h}return ye(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=I.createGroup(),this.selectorCurve=I.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=I.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()),I.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),I.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),I.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setupControlBox=function(){c.prototype.setupControlBox.call(this),this.curveControlLine1=I.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=I.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),Dt=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}(),At=function(c){function o(a,u,d){var h=c.call(this,a,!1)||this;return h.dataUrl=u,h.state=d,h}return ye(o,c),o}(Dt),ct=function(c){function o(a,u,d){d===void 0&&(d=!1);var h=c.call(this,a,d)||this;return h.marker=u,h}return ye(o,c),o}(Dt),Kt=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}(),Ot=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 ce,this._isOpen=!1,this.undoRedoManager=new ht,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 Kt,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[st,B,N,Ne,Ye,_,x,Y,be,y,ot,it]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[st,B,N,Ne,_,x,Y]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"BASIC_MARKER_TYPES",{get:function(){return[st,B,N,Ne,x]},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 d=a.ALL_MARKER_TYPES.find(function(h){return h.typeName===u});d!==void 0&&a._availableMarkerTypes.push(d)}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(),Ue.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},c.prototype.show=function(){var o=this;this.styles.styleSheetRoot===void 0&&et.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=et.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(a){return a(new Dt(o))})},c.prototype.render=function(){return Ae(this,void 0,void 0,function(){var o;return De(this,function(a){switch(a.label){case 0:return this.setCurrentMarker(),(o=new Xe).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(d){var h=new Dt(a,!0);d(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(d){return d(new Dt(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,d=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,d),this._isResizing=!1},c.prototype.scaleMarkers=function(o,a){var u,d=this;this._currentMarker&&this._currentMarker instanceof Ne?this._currentMarker.scale(o,a):(u=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(h){h!==d._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=I.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 Be(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 Re(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(d){var h=new ct(o,o._currentMarker,!0);d(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(d){return d(new ct(o,u))})}}},c.prototype.clear=function(){var o=this,a=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(T){var ke=new ct(o,void 0,!0);T(ke),ke.defaultPrevented&&(a=!0)}),!a)){this.setCurrentMarker();for(var u=function(T){var ke=d.markers[T];d.setCurrentMarker(d.markers[T]),d._currentMarker.dispose(),d.markerImage.removeChild(d._currentMarker.container),d.markers.splice(d.markers.indexOf(d._currentMarker),1),d.eventListeners.markerdelete.forEach(function(He){return He(new ct(o,ke))})},d=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 d=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(a),d<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(h){return h(new Dt(o))})}else this.undoRedoManager.replaceLastUndoStep(a),this.eventListeners.statechange.forEach(function(h){return h(new Dt(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 Dt(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 Dt(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 Ae(this,void 0,void 0,function(){var o,a,u=this;return De(this,function(d){switch(d.label){case 0:return[4,this.render()];case 1:return o=d.sent(),a=this.getState(),this.eventListeners.render.forEach(function(h){return h(new At(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 d=a._availableMarkerTypes.find(function(T){return T.typeName===u.typeName});if(d!==void 0){var h=a.addNewMarker(d);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 Dt(a))})},c.prototype.addNewMarker=function(o){var a=I.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(d){return d.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(d){return d(new ct(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 B&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(B):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(u){return u(new ct(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 ct(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 ct(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 ct(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){Ue.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 Dt(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 Dt(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 Pt=function(c,o){return(Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(a[d]=u[d])})(c,o)};function Rt(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}Pt(c,o),c.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function Ct(c,o,a,u){return new(a||(a=Promise))(function(d,h){function T(dt){try{He(u.next(dt))}catch(Te){h(Te)}}function ke(dt){try{He(u.throw(dt))}catch(Te){h(Te)}}function He(dt){var Te;dt.done?d(dt.value):(Te=dt.value,Te instanceof a?Te:new a(function(St){St(Te)})).then(T,ke)}He((u=u.apply(c,o||[])).next())})}function It(c,o){var a,u,d,h,T={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function ke(He){return function(dt){return function(Te){if(a)throw new TypeError("Generator is already executing.");for(;T;)try{if(a=1,u&&(d=2&Te[0]?u.return:Te[0]?u.throw||((d=u.return)&&d.call(u),0):u.next)&&!(d=d.call(u,Te[1])).done)return d;switch(u=0,d&&(Te=[2&Te[0],d.value]),Te[0]){case 0:case 1:d=Te;break;case 4:return T.label++,{value:Te[1],done:!1};case 5:T.label++,u=Te[1],Te=[0];continue;case 7:Te=T.ops.pop(),T.trys.pop();continue;default:if(!(d=T.trys,(d=d.length>0&&d[d.length-1])||Te[0]!==6&&Te[0]!==2)){T=0;continue}if(Te[0]===3&&(!d||Te[1]>d[0]&&Te[1]<d[3])){T.label=Te[1];break}if(Te[0]===6&&T.label<d[1]){T.label=d[1],d=Te;break}if(d&&T.label<d[2]){T.label=d[2],T.ops.push(Te);break}d[2]&&T.ops.pop(),T.trys.pop();continue}Te=o.call(c,T)}catch(St){Te=[6,St],u=0}finally{a=d=0}if(5&Te[0])throw Te[1];return{value:Te[0]?Te[1]:void 0,done:!0}}([He,dt])}}}var Wt=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}(),nt=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,d=a;u<d.length;u++){var h=d[u],T=h[0],ke=h[1];o.setAttribute(T,ke)}},c.createRect=function(o,a,u){var d=document.createElementNS("http://www.w3.org/2000/svg","rect");return d.setAttribute("width",o.toString()),d.setAttribute("height",a.toString()),u&&c.setAttributes(d,u),d},c.createLine=function(o,a,u,d,h){var T=document.createElementNS("http://www.w3.org/2000/svg","line");return T.setAttribute("x1",o.toString()),T.setAttribute("y1",a.toString()),T.setAttribute("x2",u.toString()),T.setAttribute("y2",d.toString()),h&&c.setAttributes(T,h),T},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 d=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return d.setAttribute("cx",(o/2).toString()),d.setAttribute("cy",(a/2).toString()),d.setAttribute("rx",(o/2).toString()),d.setAttribute("ry",(a/2).toString()),u&&c.setAttributes(d,u),d},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,d,h,T,ke){var He=document.createElementNS("http://www.w3.org/2000/svg","marker");return c.setAttributes(He,[["id",o],["orient",a],["markerWidth",u.toString()],["markerHeight",d.toString()],["refX",h.toString()],["refY",T.toString()]]),He.appendChild(ke),He},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,d,h,T,ke,He){return"M"+o+","+a+"V"+(a+d)+"H"+(o+u)+"V"+a+"H"+h+"V"+T+"H"+(h+ke)+"V"+(T+He)+"H"+h+"V"+a+"Z"},c}(),en=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 tn("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new tn("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new tn("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new nn("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new nn("_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}(),tn=function(c,o){this.selector=c,this.style=o},nn=function(c,o){this.localName=c,this.style=o},Un=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}(),qn=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}(),Yt=function(c){function o(){var a=c!==null&&c.apply(this,arguments)||this;return a.buttons=[],a}return Rt(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}(qn),vt=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}(),je=function(c){function o(){var a=c!==null&&c.apply(this,arguments)||this;return a.elements=[],a}return Rt(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}(qn),Gt=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}(),kt=function(){function c(){}return c.getIcon=function(o,a){if(o>0&&a>0){var u=new Gt(o,a),d=u.ratio>=1?20:u.getHorizontalLength(20),h=u.ratio<1?20:u.getVerticalLength(20),T=document.createElementNS("http://www.w3.org/2000/svg","svg");T.setAttribute("xmlns","http://www.w3.org/2000/svg"),T.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(T);var ke=nt.createDefs();T.appendChild(ke);var He=nt.createElement("clipPath",[["id","text-bg-clip"]]);ke.appendChild(He);var dt=nt.createPath(nt.getHollowRectanglePath((24-d)/2,(24-h)/2,d,h,(24-d)/2+2,(24-h)/2+2,d-4,h-4));T.appendChild(dt);var Te=nt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Te.appendChild(nt.createTSpan(o+":"+a)),T.appendChild(Te);var St=Te.getBBox();nt.setAttributes(Te,[["x",((24-St.width)/2).toString()],["y",((24-St.height)/2-St.y).toString()]]);var _t=nt.createPath(nt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(St.width))/2,(24-Math.ceil(St.height))/2,Math.ceil(St.width),Math.ceil(St.height)));return He.appendChild(_t),nt.setAttributes(dt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(T),T.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}(),on=function(c){function o(a,u,d){var h=c.call(this,a,u)||this;return h.isDropdownOpen=!1,h.onClick=h.dropdownButtonClicked,h.dropdownButtons=d,h}return Rt(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}(vt),Lt=function(){function c(o,a){this.GRIP_SIZE=10,this.color=o,this.fillColor=a,this.visual=nt.createGroup(),this.visual.appendChild(nt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(nt.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 nt.setAttributes(u,[["cx",o.toString()],["cy",a.toString()]])})},c}(),cn=function(){function c(o,a,u,d){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=d,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&&nt.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=nt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=nt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var a=0;a<this.numberOfGridLines;a++)this.horizontalGridLines.push(nt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(nt.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=nt.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),nt.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,T){var ke=a.y+u*(T+1);nt.setAttributes(h,[["x1",""+a.x],["y1",""+ke],["x2",""+(a.x+a.width)],["y2",""+ke]])});var d=a.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(h,T){var ke=a.x+d*(T+1);nt.setAttributes(h,[["x1",""+ke],["y1",""+a.y],["x2",""+ke],["y2",""+(a.y+a.height)]])}),nt.setAttributes(this.cropShadeElement,[["d",nt.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,d=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+=d,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+=d}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),d=this.aspectRatio.getVerticalLength(this.cropRect.width);u/this.canvasWidth<d/this.canvasHeight?this.cropRect.width=u:this.cropRect.height=d,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,d,h,T){var ke=u/o,He=d/a;return{x:(h.x-T)*ke+T,y:(h.y-T)*He+T,width:h.width*ke,height:h.height*He}},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}(),bt=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();nt.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 d=u%5==0?this.height/3:this.height/6;a+="h4v"+-d+"h1v"+d}a+="v1H0Z",this.scaleShape=nt.createPath(a);var h=nt.createTransform();this.scaleShape.transform.baseVal.appendItem(h),o.appendChild(this.scaleShape),this.angleLabelElement=nt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=nt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var T=nt.createTSpan("");return T.innerHTML="&deg;",this.angleLabelElement.appendChild(T),o.appendChild(this.angleLabelElement),document.body.removeChild(o),o},c}(),$n=function(){function c(){this.naturalSize=!1,this.imageType="image/png"}return c.prototype.rasterize=function(o,a,u,d,h,T,ke){var He=this;return new Promise(function(dt){var Te=document.createElement("canvas");Te.width=o.width.baseVal.value-2*d,Te.height=o.height.baseVal.value-2*d;var St=1,_t=1;He.naturalSize===!0?(St=a.naturalWidth/(o.width.baseVal.value-2*d)/T,_t=a.naturalHeight/(o.height.baseVal.value-2*d)/ke,Te.width=a.naturalWidth/T,Te.height=a.naturalHeight/ke):He.width!==void 0&&He.height!==void 0&&(St=He.width/u.width,_t=He.height/u.height,Te.width*=St,Te.height*=_t);var qt=Te.getContext("2d");qt.translate(Te.width/2,Te.height/2),qt.rotate(h*Math.PI/180),qt.scale(T,ke),qt.translate(-Te.width/2,-Te.height/2),qt.drawImage(a,0,0,Te.width,Te.height);var Hn=document.createElement("canvas");Hn.width=u.width*St,Hn.height=u.height*_t,Hn.getContext("2d").putImageData(qt.getImageData((u.x-d)*St,(u.y-d)*_t,u.width*St,u.height*_t),0,0),dt(Hn.toDataURL(He.imageType,He.imageQuality))})},c}(),Pe=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 en(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",nt.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();nt.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=nt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=nt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=nt.createGroup(),this.editingTargetRotationScaleContainer=nt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var o=nt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(o);var a=nt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(a),this.editingTargetContainer=nt.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=nt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new cn(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 Un,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 Yt;a.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(a);var u=[];this.aspectRatios.forEach(function(_t){var qt=new vt(kt.getIcon(_t.horizontal,_t.vertical),_t.horizontal===0&&_t.vertical===0?"FREE":_t.horizontal+":"+_t.vertical);qt.onClick=function(){return o.ratioButtonClicked(_t)},u.push(qt)}),this.aspectRatioButton=new on(kt.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 d=new vt('<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");d.isActive=this.isGridVisible,d.onClick=function(){o.isGridVisible=!o.isGridVisible,d.isActive=o.isGridVisible},a.addButton(d);var h=new vt('<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),!Wt.isLicensed){var T=new je;this.topToolbar.addElementBlock(T);var ke=document.createElement("div");ke.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var He=document.createElement("a");He.style.color="currentColor",He.href="https://markerjs.com/products/cropro",He.target="_blank",He.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>',ke.appendChild(He),T.addElement(ke)}var dt=new Yt;dt.minWidth=3*this.toolbarHeight+"px",dt.contentAlign="end",this.topToolbar.addButtonBlock(dt);var Te=new vt('<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");Te.onClick=this.startRenderAndClose,dt.addButton(Te),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Te.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var St=new vt('<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");St.onClick=this.close,dt.addButton(St),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(St.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},c.prototype.addBottomToolbar=function(){var o=this;this.bottomToolbar=new Un,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 Yt;a.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(a);var u=new vt('<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 d=new vt('<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");d.onClick=this.rotateRightButtonClicked,a.addButton(d);var h=new je;h.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(h),this.straightener=new bt("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(dt){o.rotateBy(dt),o.straightener.angle=o.rotationAngle},h.addElement(this.straightener.getUI());var T=new Yt;T.minWidth=2*this.toolbarHeight+"px",T.contentAlign="end",this.bottomToolbar.addButtonBlock(T);var ke=new vt('<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");ke.onClick=this.flipHorizontallyButtonClicked,T.addButton(ke);var He=new vt('<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");He.onClick=this.flipVerticallyButtonClicked,T.addButton(He)},c.prototype.ratioButtonClicked=function(o){this.aspectRatio=o,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},c.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=kt.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 Gt(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 Ct(this,void 0,void 0,function(){var o,a;return It(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(d){return d(o,a)}),this.close(!0),[2]}})})},c.prototype.render=function(){return Ct(this,void 0,void 0,function(){var o;return It(this,function(a){switch(a.label){case 0:return(o=new $n).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.width=this.renderWidth,o.height=this.renderHeight,this.unzoomFromCrop(),nt.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 nn("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 nn("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new nn("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var o=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new nn("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 nn("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new nn("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new tn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new tn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new nn("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 nn("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new nn("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 nn("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 nn("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},c.instanceCounter=0,c}(),Mt=m("8hTe"),ci=m.n(Mt),Ri=/<pre[^>]*>/g;function di(c){var o=document.createElement("div");return o.innerHTML=c,o.childNodes.length===0?"":o.childNodes[0].nodeValue}var Ti=ue.a=function(c){var o=c.value,a=o===void 0?"":o,u=c.edit,d=u===void 0?!1:u,h=c.className,T=c.showTextOnly,ke=c.showLines,He=c.replaces,dt=c.zoomImg,Te=c.hasMask,St=c.style,_t=St===void 0?{}:St,qt=c.stylesPrev,Hn=qt===void 0?{}:qt,Gn=String(a),gn=Object(he.useRef)(),Xn=Object(he.useRef)(),Hi=Object(he.useState)(""),Dn=Object(O.a)(Hi,2),Vn=Dn[0],jn=Dn[1],vi=Object(he.useState)("office"),ei=Object(O.a)(vi,2),pi=ei[0],ai=ei[1],cr=function(){var zt=new Pe(Xn.current);zt.displayMode="popup",zt.addRenderEventListener(function(){var wn=Object(fe.a)(H.a.mark(function Ft(dn){var Qt;return H.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return gn.current.style.display="none",un.next=3,Object(rt.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:dn}});case 3:Qt=un.sent,Qt!=null&&Qt.id&&He(Xn.current.getAttribute("src").replace(Ce.a.API_SERVER,""),"/api/attachments/".concat(Qt==null?void 0:Qt.id,"?type=").concat(Qt.content_type));case 5:case"end":return un.stop()}},Ft)}));return function(Ft){return wn.apply(this,arguments)}}()),zt.show()},Gi=function(){var zt=new Ot(Xn.current);zt.settings.displayMode="popup",zt.addEventListener("render",function(){var wn=Object(fe.a)(H.a.mark(function Ft(dn){var Qt;return H.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:if(gn.current.style.display="none",!Xn.current){un.next=6;break}return un.next=4,Object(rt.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:dn.dataUrl}});case 4:Qt=un.sent,Qt!=null&&Qt.id&&He(Xn.current.getAttribute("src").replace(Ce.a.API_SERVER,""),"/api/attachments/".concat(Qt==null?void 0:Qt.id,"?type=").concat(Qt.content_type));case 6:case"end":return un.stop()}},Ft)}));return function(Ft){return wn.apply(this,arguments)}}()),zt.show(),window.markerArea=zt},ti=Object(he.useMemo)(function(){try{var sn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,zt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,wn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Gn=Gn.replace(sn,"("+Ce.a.API_SERVER+"/api/attachments/").replace(zt,'"'+Ce.a.API_SERVER+"/api/attachments/").replace(wn,'"'+Ce.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,`
`),Gn=Gn.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(si){}var Ft=Me(Gn),dn=J();if(Gn.match(/\[TOC\]/)&&(Ft=Ft.replace("<p>[TOC]</p>",_e()),ze()),Ft=Ft.replace(/(__special_katext_id_\d+__)/g,function(si,un){var Ln=dn[un],Vi=Ln.type,Qi=Ln.expression;return Object(we.renderToString)(di(Qi)||"",{displayMode:Vi==="block",throwOnError:!1,output:"html"})}),Ft=Ft.replace(/▁/g,"\u2581\u2581\u2581"),U(),T){var Qt=document.createElement("div");return Qt.innerHTML=Ft,Qt.innerText}return setTimeout(function(){return Li()},500),Ft},[Gn]),Qn=Object(he.useRef)();ae.WebkitLineClamp=ke,ke&&(_t=Object(me.a)(Object(me.a)({},_t),ae));function Di(sn){var zt=sn.target;if(zt.tagName.toUpperCase()==="IMG"){if(dt){var wn=zt.getAttribute("src");jn(wn),ai("image")}}else if(zt.tagName.toUpperCase()==="A"){var Ft=zt.getAttribute("href");if(Ft.indexOf("office")>-1)sn.preventDefault(),jn(Ft),ai("office");else if(Ft.indexOf("application/pdf")>-1)sn.preventDefault(),jn(Ft),ai("pdf");else if(Ft.indexOf("type=text")>-1)sn.preventDefault(),jn(Ft),ai("html");else if(Ft.startsWith("#")){sn.preventDefault();var dn=document.getElementById(Ft.replace("#",""));dn&&dn.scrollIntoView(!0)}}}var Li=function(){var zt,wn=(zt=Qn.current)===null||zt===void 0?void 0:zt.querySelectorAll("video");wn==null||wn.forEach(function(Ft){if(Ft.oncontextmenu=function(){return!1},Ft.src.indexOf(".m3u8")>-1&&!Ft.canPlayType("application/vnd.apple.mpegurl")){if(W.a.isSupported()){var dn=new W.a;dn.loadSource(Ft.src),dn.attachMedia(Ft)}}})};Object(he.useEffect)(function(){if(Qn.current&&ti&&(ti.match(Ri)&&window.PR.prettyPrint()),Qn.current)return Qn.current.addEventListener("click",Di),function(){Qn.current.removeEventListener("click",Di),U(),ze()}},[ti,Qn.current,Di]);var dr=function(zt){if(!d)return;zt.target.nodeName==="IMG"?(gn.current.style.display="flex",gn.current.style.width=zt.target.clientWidth+"px",gn.current.style.height=zt.target.clientHeight+"px",gn.current.style.top=zt.target.offsetTop+"px",gn.current.style.left=zt.target.offsetLeft+"px",Xn.current.src=zt.target.getAttribute("src")):gn.current.style.display="none"};return R.a.createElement("div",{style:{position:"relative"}},R.a.createElement("div",{ref:Qn,style:Object(me.a)({},_t),className:"".concat(h||""," markdown-body ").concat(ci.a.mdBody),onMouseOver:dr,dangerouslySetInnerHTML:{__html:ti}}),R.a.createElement("div",{ref:gn,className:ci.a.button},R.a.createElement(Oe.a,null,R.a.createElement(ge.a,{onClick:function(){return cr()}},"\u88C1\u526A"),R.a.createElement(ge.a,{onClick:function(){return Gi()}},"\u7F16\u8F91"))),R.a.createElement("img",{ref:Xn,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),R.a.createElement(Ze.a,{close:!0,data:Vn,hasMask:Te,type:Vn!=null&&Vn.length?pi:"",style:Object(me.a)({},Hn),onClose:function(){return jn("")}}))}},"9VGf":function(Ee,ue,m){"use strict";m.d(ue,"a",function(){return re});var F=m("q1tI"),Oe=m.n(F);function re(ge,me){var fe=Object(F.useRef)();Object(F.useEffect)(function(){fe.current=ge}),Object(F.useEffect)(function(){function O(){fe.current()}if(me!==null){var K=setInterval(O,me);return function(){return clearInterval(K)}}},[me])}},"A/g1":function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB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W6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},Bd2K:function(Ee,ue,m){(function(F){F(m("VrN/"),m("osHv"))})(function(F){F.defineOption("autoCloseTags",!1,function(H,he,R){if(R!=F.Init&&R&&H.removeKeyMap("autoCloseTags"),!he)return;var L={name:"autoCloseTags"};(typeof he!="object"||he.whenClosing!==!1)&&(L["'/'"]=function(oe){return fe(oe)}),(typeof he!="object"||he.whenOpening!==!1)&&(L["'>'"]=function(oe){return ge(oe)}),H.addKeyMap(L)});var Oe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],re=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function ge(H){if(H.getOption("disableInput"))return F.Pass;for(var he=H.listSelections(),R=[],L=H.getOption("autoCloseTags"),oe=0;oe<he.length;oe++){if(!he[oe].empty())return F.Pass;var X=he[oe].head,j=H.getTokenAt(X),z=F.innerMode(H.getMode(),j.state),P=z.state,te=z.mode.xmlCurrentTag&&z.mode.xmlCurrentTag(P),Q=te&&te.name;if(!Q)return F.Pass;var Se=z.mode.configuration=="html",ze=typeof L=="object"&&L.dontCloseTags||Se&&Oe,ae=typeof L=="object"&&L.indentTags||Se&&re;j.end>X.ch&&(Q=Q.slice(0,Q.length-j.end+X.ch));var ne=Q.toLowerCase();if(!Q||j.type=="string"&&(j.end!=X.ch||!/[\"\']/.test(j.string.charAt(j.string.length-1))||j.string.length==1)||j.type=="tag"&&te.close||j.string.indexOf("/")==X.ch-j.start-1||ze&&O(ze,ne)>-1||K(H,z.mode.xmlCurrentContext&&z.mode.xmlCurrentContext(P)||[],Q,X,!0))return F.Pass;var _e=typeof L=="object"&&L.emptyTags;if(_e&&O(_e,Q)>-1){R[oe]={text:"/>",newPos:F.Pos(X.line,X.ch+2)};continue}var ie=ae&&O(ae,ne)>-1;R[oe]={indent:ie,text:">"+(ie?`
`:"")+"</"+Q+">",newPos:ie?F.Pos(X.line+1,0):F.Pos(X.line,X.ch+1)}}for(var se=typeof L=="object"&&L.dontIndentOnAutoClose,oe=he.length-1;oe>=0;oe--){var $=R[oe];H.replaceRange($.text,he[oe].head,he[oe].anchor,"+insert");var k=H.listSelections().slice(0);k[oe]={head:$.newPos,anchor:$.newPos},H.setSelections(k),!se&&$.indent&&(H.indentLine($.newPos.line,null,!0),H.indentLine($.newPos.line+1,null,!0))}}function me(H,he){for(var R=H.listSelections(),L=[],oe=he?"/":"</",X=H.getOption("autoCloseTags"),j=typeof X=="object"&&X.dontIndentOnSlash,z=0;z<R.length;z++){if(!R[z].empty())return F.Pass;var P=R[z].head,te=H.getTokenAt(P),Q=F.innerMode(H.getMode(),te.state),Se=Q.state;if(he&&(te.type=="string"||te.string.charAt(0)!="<"||te.start!=P.ch-1))return F.Pass;var ze,ae=Q.mode.name!="xml"&&H.getMode().name=="htmlmixed";if(ae&&Q.mode.name=="javascript")ze=oe+"script";else if(ae&&Q.mode.name=="css")ze=oe+"style";else{var ne=Q.mode.xmlCurrentContext&&Q.mode.xmlCurrentContext(Se);if(!ne||ne.length&&K(H,ne,ne[ne.length-1],P))return F.Pass;ze=oe+ne[ne.length-1]}H.getLine(P.line).charAt(te.end)!=">"&&(ze+=">"),L[z]=ze}if(H.replaceSelections(L),R=H.listSelections(),!j)for(var z=0;z<R.length;z++)(z==R.length-1||R[z].head.line<R[z+1].head.line)&&H.indentLine(R[z].head.line)}function fe(H){return H.getOption("disableInput")?F.Pass:me(H,!0)}F.commands.closeTag=function(H){return me(H)};function O(H,he){if(H.indexOf)return H.indexOf(he);for(var R=0,L=H.length;R<L;++R)if(H[R]==he)return R;return-1}function K(H,he,R,L,oe){if(!F.scanForClosingTag)return!1;var X=Math.min(H.lastLine()+1,L.line+500),j=F.scanForClosingTag(H,L,null,X);if(!j||j.tag!=R)return!1;for(var z=oe?1:0,P=he.length-1;P>=0&&he[P]==R;P--)++z;L=j.to;for(var P=1;P<z;P++){var te=F.scanForClosingTag(H,L,null,X);if(!te||te.tag!=R)return!1;L=te.to}return!0}})},BjJ7:function(Ee,ue,m){"use strict";m.d(ue,"d",function(){return Oe}),m.d(ue,"c",function(){return re}),m.d(ue,"e",function(){return ge}),m.d(ue,"b",function(){return me}),m.d(ue,"a",function(){return O});var F=m("m3rI");function Oe(K){var H=!0;if(K.length>0){for(var he=0;he<K.length;he++)if(K[he].compile_success==0||!K[he].compile_success){H=!1;break}}else H=!1;return H}function re(K){for(var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",he=[],R=0;R<K.length;R++){var L=K[R],oe=H?"".concat(H,"/").concat(L.name):"".concat(L.name);he.push({title:L.name,isLeaf:!(L.type==="tree"),key:oe})}return he}function ge(K,H,he){for(var R=0;R<K.length;R++){var L=K[R];if(L.key===H){L.children=he;break}L.children&&ge(L.children,H,he)}return K}function me(K,H,he){var R;return function(){var L=this,oe=arguments,X=function(){R=null,he||K.apply(L,oe)},j=he&&!R;clearTimeout(R),R=setTimeout(X,H),j&&K.apply(L,oe)}}var fe=!0,O=F.a.API_SERVER},"C+DQ":function(Ee,ue,m){},CJF0:function(Ee,ue,m){"use strict";var F=m("14J3"),Oe=m("BMrR"),re=m("+L6B"),ge=m("2/Rp"),me=m("jCWc"),fe=m("kPKH"),O=m("PpiC"),K=m("q1tI"),H=m.n(K),he=m("Ty5D"),R=m("9kvl"),L=m("55Ip"),oe=m("lzim"),X=m("nZ20"),j=m.n(X),z=function(te){var Q,Se,ze,ae,ne=te.shixunsDetail,_e=te.dispatch,ie=te.loading,se=te.match,$=te.data,k=$===void 0?{}:$,C=te.title,J=Object(O.a)(te,["shixunsDetail","dispatch","loading","match","data","title"]),U=Object(he.i)(),S=!(((Q=ne.detail)===null||Q===void 0?void 0:Q.identity)>4||((Se=ne.detail)===null||Se===void 0?void 0:Se.identity)===void 0||((ze=ne.detail)===null||ze===void 0?void 0:ze.shixun_status)===2||((ae=ne.detail)===null||ae===void 0?void 0:ae.shixun_status)===1);return H.a.createElement("aside",{className:"bg-white mb10 pl20 pr20 ".concat(j.a.wrap)},H.a.createElement(Oe.a,{gutter:[20,20],align:"middle"},H.a.createElement(fe.a,{flex:1},H.a.createElement("span",{className:j.a.icons},H.a.createElement("img",{src:oe.f,width:"14"})),H.a.createElement("span",{className:"font16"},"\u7B2C ",k==null?void 0:k.position," \u5173\uFF1A",C)),H.a.createElement(fe.a,null,(k==null?void 0:k.prev_challenge)&&H.a.createElement(ge.a,{type:"primary",ghost:!0,className:"mt10 mr5",onClick:function(){var le,q=k.prev_challenge.st===0?"/editcheckpoint":"/editquestion",Me="/shixuns/".concat(U.id,"/challenges/").concat(k==null||((le=k.prev_challenge)===null||le===void 0)?void 0:le.id).concat(q);R.d.replace(Me)}},"\u4E0A\u4E00\u5173"),k.next_challenge&&H.a.createElement(ge.a,{type:"primary",ghost:!0,className:"mt10 mr5",onClick:function(){var le,q=k.next_challenge.st===0?"/editcheckpoint":"/editquestion",Me="/shixuns/".concat(U.id,"/challenges/").concat(k==null||((le=k.next_challenge)===null||le===void 0)?void 0:le.id).concat(q);R.d.replace(Me)}},"\u4E0B\u4E00\u5173"),S&&H.a.createElement(ge.a,{type:"primary"},H.a.createElement(L.a,{to:"/shixuns/".concat(U.id,"/challenges/newquestion")},"\u65B0\u589E\u9009\u62E9\u9898\u4EFB\u52A1")),S&&H.a.createElement(ge.a,{type:"primary",className:"ml5"},H.a.createElement(L.a,{to:"/shixuns/".concat(U.id,"/challenges/new")},"\u65B0\u589E\u5B9E\u8DF5\u4EFB\u52A1")),H.a.createElement(ge.a,{type:"primary",className:"ml5"},H.a.createElement(L.a,{to:"/shixuns/".concat(U.id,"/challenges")},"\u8FD4\u56DE")))))};ue.a=Object(R.a)(function(P){var te=P.shixunsDetail,Q=P.newCourse,Se=P.loading,ze=P.globalSetting;return{shixunsDetail:te,newCourse:Q,globalSetting:ze,loading:Se.effects}})(z)},DlQD:function(Ee,ue,m){(function(F,Oe){Ee.exports=Oe()})(this,function(){"use strict";function F(B,D){for(var N=0;N<D.length;N++){var y=D[N];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(B,y.key,y)}}function Oe(B,D,N){return D&&F(B.prototype,D),N&&F(B,N),B}function re(B,D){if(!B)return;if(typeof B=="string")return ge(B,D);var N=Object.prototype.toString.call(B).slice(8,-1);if(N==="Object"&&B.constructor&&(N=B.constructor.name),N==="Map"||N==="Set")return Array.from(B);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return ge(B,D)}function ge(B,D){(D==null||D>B.length)&&(D=B.length);for(var N=0,y=new Array(D);N<D;N++)y[N]=B[N];return y}function me(B,D){var N;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(N=re(B))||D&&B&&typeof B.length=="number"){N&&(B=N);var y=0;return function(){return y>=B.length?{done:!0}:{done:!1,value:B[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 N=B[Symbol.iterator](),N.next.bind(N)}function fe(B,D){return D={exports:{}},B(D,D.exports),D.exports}var O=fe(function(B){function D(){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 N(y){B.exports.defaults=y}B.exports={defaults:D(),getDefaults:D,changeDefaults:N}}),K=O.defaults,H=O.getDefaults,he=O.changeDefaults,R=/[&<>"']/,L=/[&<>"']/g,oe=/[<>"']|&(?!#?\w+;)/,X=/[<>"']|&(?!#?\w+;)/g,j={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},z=function(D){return j[D]};function P(B,D){if(D){if(R.test(B))return B.replace(L,z)}else if(oe.test(B))return B.replace(X,z);return B}var te=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Q(B){return B.replace(te,function(D,N){return N=N.toLowerCase(),N==="colon"?":":N.charAt(0)==="#"?N.charAt(1)==="x"?String.fromCharCode(parseInt(N.substring(2),16)):String.fromCharCode(+N.substring(1)):""})}var Se=/(^|[^\[])\^/g;function ze(B,D){B=B.source||B,D=D||"";var N={replace:function(b,x){return x=x.source||x,x=x.replace(Se,"$1"),B=B.replace(b,x),N},getRegex:function(){return new RegExp(B,D)}};return N}var ae=/[^\w:]/g,ne=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _e(B,D,N){if(B){var y;try{y=decodeURIComponent(Q(N)).replace(ae,"").toLowerCase()}catch(b){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}D&&!ne.test(N)&&(N=C(D,N));try{N=encodeURI(N).replace(/%25/g,"%")}catch(b){return null}return N}var ie={},se=/^[^:]+:\/*[^/]*$/,$=/^([^:]+:)[\s\S]*$/,k=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(B,D){ie[" "+B]||(se.test(B)?ie[" "+B]=B+"/":ie[" "+B]=ee(B,"/",!0)),B=ie[" "+B];var N=B.indexOf(":")===-1;return D.substring(0,2)==="//"?N?D:B.replace($,"$1")+D:D.charAt(0)==="/"?N?D:B.replace(k,"$1")+D:B+D}var J={exec:function(){}};function U(B){for(var D=1,N,y;D<arguments.length;D++){N=arguments[D];for(y in N)Object.prototype.hasOwnProperty.call(N,y)&&(B[y]=N[y])}return B}function S(B,D){var N=B.replace(/\|/g,function(x,w,Y){for(var _=!1,be=w;--be>=0&&Y[be]==="\\";)_=!_;return _?"|":" |"}),y=N.split(/ \|/),b=0;if(y.length>D)y.splice(D);else for(;y.length<D;)y.push("");for(;b<y.length;b++)y[b]=y[b].trim().replace(/\\\|/g,"|");return y}function ee(B,D,N){var y=B.length;if(y===0)return"";for(var b=0;b<y;){var x=B.charAt(y-b-1);if(x===D&&!N)b++;else if(x!==D&&N)b++;else break}return B.substr(0,y-b)}function le(B,D){if(B.indexOf(D[1])===-1)return-1;for(var N=B.length,y=0,b=0;b<N;b++)if(B[b]==="\\")b++;else if(B[b]===D[0])y++;else if(B[b]===D[1]&&(y--,y<0))return b;return-1}function q(B){B&&B.sanitize&&!B.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 Me={escape:P,unescape:Q,edit:ze,cleanUrl:_e,resolveUrl:C,noopTest:J,merge:U,splitCells:S,rtrim:ee,findClosingBracket:le,checkSanitizeDeprecation:q},E=O.defaults,v=Me.rtrim,W=Me.splitCells,Ce=Me.escape,we=Me.findClosingBracket;function Ze(B,D,N){var y=D.href,b=D.title?Ce(D.title):null,x=B[1].replace(/\\([\[\]])/g,"$1");return B[0].charAt(0)!=="!"?{type:"link",raw:N,href:y,title:b,text:x}:{type:"image",raw:N,href:y,title:b,text:Ce(x)}}function rt(B,D){var N=B.match(/^(\s+)(?:```)/);if(N===null)return D;var y=N[1];return D.split(`
`).map(function(b){var x=b.match(/^\s+/);if(x===null)return b;var w=x[0];return w.length>=y.length?b.slice(y.length):b}).join(`
`)}var Ie=function(){function B(N){this.options=N||E}var D=B.prototype;return D.space=function(y){var b=this.rules.block.newline.exec(y);if(b)return b[0].length>1?{type:"space",raw:b[0]}:{raw:`
`}},D.code=function(y,b){var x=this.rules.block.code.exec(y);if(x){var w=b[b.length-1];if(w&&w.type==="paragraph")return{raw:x[0],text:x[0].trimRight()};var Y=x[0].replace(/^ {4}/gm,"");return{type:"code",raw:x[0],codeBlockStyle:"indented",text:this.options.pedantic?Y:v(Y,`
`)}}},D.fences=function(y){var b=this.rules.block.fences.exec(y);if(b){var x=b[0],w=rt(x,b[3]||"");return{type:"code",raw:x,lang:b[2]?b[2].trim():b[2],text:w}}},D.heading=function(y){var b=this.rules.block.heading.exec(y);if(b)return{type:"heading",raw:b[0],depth:b[1].length,text:b[2]}},D.nptable=function(y){var b=this.rules.block.nptable.exec(y);if(b){var x={type:"table",header:W(b[1].replace(/^ *| *\| *$/g,"")),align:b[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:b[3]?b[3].replace(/\n$/,"").split(`
`):[],raw:b[0]};if(x.header.length===x.align.length){var w=x.align.length,Y;for(Y=0;Y<w;Y++)/^ *-+: *$/.test(x.align[Y])?x.align[Y]="right":/^ *:-+: *$/.test(x.align[Y])?x.align[Y]="center":/^ *:-+ *$/.test(x.align[Y])?x.align[Y]="left":x.align[Y]=null;for(w=x.cells.length,Y=0;Y<w;Y++)x.cells[Y]=W(x.cells[Y],x.header.length);return x}}},D.hr=function(y){var b=this.rules.block.hr.exec(y);if(b)return{type:"hr",raw:b[0]}},D.blockquote=function(y){var b=this.rules.block.blockquote.exec(y);if(b){var x=b[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:b[0],text:x}}},D.list=function(y){var b=this.rules.block.list.exec(y);if(b){for(var x=b[0],w=b[2],Y=w.length>1,_=w[w.length-1]===")",be={type:"list",raw:x,ordered:Y,start:Y?+w.slice(0,-1):"",loose:!1,items:[]},Ye=b[0].match(this.rules.block.item),ht=!1,it,Dt,At,ct,Kt,Ot,Pt,Rt=Ye.length,Ct=0;Ct<Rt;Ct++)it=Ye[Ct],x=it,Dt=it.length,it=it.replace(/^ *([*+-]|\d+[.)]) */,""),~it.indexOf(`
`)&&(Dt-=it.length,it=this.options.pedantic?it.replace(/^ {1,4}/gm,""):it.replace(new RegExp("^ {1,"+Dt+"}","gm"),"")),Ct!==Rt-1&&(At=this.rules.block.bullet.exec(Ye[Ct+1])[0],(Y?At.length===1||!_&&At[At.length-1]===")":At.length>1||this.options.smartLists&&At!==w)&&(ct=Ye.slice(Ct+1).join(`
`),be.raw=be.raw.substring(0,be.raw.length-ct.length),Ct=Rt-1)),Kt=ht||/\n\n(?!\s*$)/.test(it),Ct!==Rt-1&&(ht=it.charAt(it.length-1)===`
`,Kt||(Kt=ht)),Kt&&(be.loose=!0),Ot=/^\[[ xX]\] /.test(it),Pt=void 0,Ot&&(Pt=it[1]!==" ",it=it.replace(/^\[[ xX]\] +/,"")),be.items.push({type:"list_item",raw:x,task:Ot,checked:Pt,loose:Kt,text:it});return be}},D.html=function(y){var b=this.rules.block.html.exec(y);if(b)return{type:this.options.sanitize?"paragraph":"html",raw:b[0],pre:!this.options.sanitizer&&(b[1]==="pre"||b[1]==="script"||b[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):Ce(b[0]):b[0]}},D.def=function(y){var b=this.rules.block.def.exec(y);if(b){b[3]&&(b[3]=b[3].substring(1,b[3].length-1));var x=b[1].toLowerCase().replace(/\s+/g," ");return{tag:x,raw:b[0],href:b[2],title:b[3]}}},D.table=function(y){var b=this.rules.block.table.exec(y);if(b){var x={type:"table",header:W(b[1].replace(/^ *| *\| *$/g,"")),align:b[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:b[3]?b[3].replace(/\n$/,"").split(`
`):[]};if(x.header.length===x.align.length){x.raw=b[0];var w=x.align.length,Y;for(Y=0;Y<w;Y++)/^ *-+: *$/.test(x.align[Y])?x.align[Y]="right":/^ *:-+: *$/.test(x.align[Y])?x.align[Y]="center":/^ *:-+ *$/.test(x.align[Y])?x.align[Y]="left":x.align[Y]=null;for(w=x.cells.length,Y=0;Y<w;Y++)x.cells[Y]=W(x.cells[Y].replace(/^ *\| *| *\| *$/g,""),x.header.length);return x}}},D.lheading=function(y){var b=this.rules.block.lheading.exec(y);if(b)return{type:"heading",raw:b[0],depth:b[2].charAt(0)==="="?1:2,text:b[1]}},D.paragraph=function(y){var b=this.rules.block.paragraph.exec(y);if(b)return{type:"paragraph",raw:b[0],text:b[1].charAt(b[1].length-1)===`
`?b[1].slice(0,-1):b[1]}},D.text=function(y,b){var x=this.rules.block.text.exec(y);if(x){var w=b[b.length-1];return w&&w.type==="text"?{raw:x[0],text:x[0]}:{type:"text",raw:x[0],text:x[0]}}},D.escape=function(y){var b=this.rules.inline.escape.exec(y);if(b)return{type:"escape",raw:b[0],text:Ce(b[1])}},D.tag=function(y,b,x){var w=this.rules.inline.tag.exec(y);if(w)return!b&&/^<a /i.test(w[0])?b=!0:b&&/^<\/a>/i.test(w[0])&&(b=!1),!x&&/^<(pre|code|kbd|script)(\s|>)/i.test(w[0])?x=!0:x&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(w[0])&&(x=!1),{type:this.options.sanitize?"text":"html",raw:w[0],inLink:b,inRawBlock:x,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(w[0]):Ce(w[0]):w[0]}},D.link=function(y){var b=this.rules.inline.link.exec(y);if(b){var x=we(b[2],"()");if(x>-1){var w=b[0].indexOf("!")===0?5:4,Y=w+b[1].length+x;b[2]=b[2].substring(0,x),b[0]=b[0].substring(0,Y).trim(),b[3]=""}var _=b[2],be="";if(this.options.pedantic){var Ye=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(_);Ye?(_=Ye[1],be=Ye[3]):be=""}else be=b[3]?b[3].slice(1,-1):"";_=_.trim().replace(/^<([\s\S]*)>$/,"$1");var ht=Ze(b,{href:_&&_.replace(this.rules.inline._escapes,"$1"),title:be&&be.replace(this.rules.inline._escapes,"$1")},b[0]);return ht}},D.reflink=function(y,b){var x;if((x=this.rules.inline.reflink.exec(y))||(x=this.rules.inline.nolink.exec(y))){var w=(x[2]||x[1]).replace(/\s+/g," ");if(w=b[w.toLowerCase()],!w||!w.href){var Y=x[0].charAt(0);return{type:"text",raw:Y,text:Y}}var _=Ze(x,w,x[0]);return _}},D.strong=function(y,b,x){x===void 0&&(x="");var w=this.rules.inline.strong.start.exec(y);if(w&&(!w[1]||w[1]&&(x===""||this.rules.inline.punctuation.exec(x)))){b=b.slice(-1*y.length);var Y=w[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Y.lastIndex=0;for(var _;(w=Y.exec(b))!=null;)if(_=this.rules.inline.strong.middle.exec(b.slice(0,w.index+3)),_)return{type:"strong",raw:y.slice(0,_[0].length),text:y.slice(2,_[0].length-2)}}},D.em=function(y,b,x){x===void 0&&(x="");var w=this.rules.inline.em.start.exec(y);if(w&&(!w[1]||w[1]&&(x===""||this.rules.inline.punctuation.exec(x)))){b=b.slice(-1*y.length);var Y=w[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Y.lastIndex=0;for(var _;(w=Y.exec(b))!=null;)if(_=this.rules.inline.em.middle.exec(b.slice(0,w.index+2)),_)return{type:"em",raw:y.slice(0,_[0].length),text:y.slice(1,_[0].length-1)}}},D.codespan=function(y){var b=this.rules.inline.code.exec(y);if(b){var x=b[2].replace(/\n/g," "),w=/[^ ]/.test(x),Y=x.startsWith(" ")&&x.endsWith(" ");return w&&Y&&(x=x.substring(1,x.length-1)),x=Ce(x,!0),{type:"codespan",raw:b[0],text:x}}},D.br=function(y){var b=this.rules.inline.br.exec(y);if(b)return{type:"br",raw:b[0]}},D.del=function(y){var b=this.rules.inline.del.exec(y);if(b)return{type:"del",raw:b[0],text:b[1]}},D.autolink=function(y,b){var x=this.rules.inline.autolink.exec(y);if(x){var w,Y;return x[2]==="@"?(w=Ce(this.options.mangle?b(x[1]):x[1]),Y="mailto:"+w):(w=Ce(x[1]),Y=w),{type:"link",raw:x[0],text:w,href:Y,tokens:[{type:"text",raw:w,text:w}]}}},D.url=function(y,b){var x;if(x=this.rules.inline.url.exec(y)){var w,Y;if(x[2]==="@")w=Ce(this.options.mangle?b(x[0]):x[0]),Y="mailto:"+w;else{var _;do _=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])[0];while(_!==x[0]);w=Ce(x[0]),x[1]==="www."?Y="http://"+w:Y=w}return{type:"link",raw:x[0],text:w,href:Y,tokens:[{type:"text",raw:w,text:w}]}}},D.inlineText=function(y,b,x){var w=this.rules.inline.text.exec(y);if(w){var Y;return b?Y=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(w[0]):Ce(w[0]):w[0]:Y=Ce(this.options.smartypants?x(w[0]):w[0]),{type:"text",raw:w[0],text:Y}}},B}(),ye=Me.noopTest,Ae=Me.edit,De=Me.merge,V={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:ye,table:ye,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};V._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,V._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,V.def=Ae(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,V.item=Ae(V.item,"gm").replace(/bull/g,V.bullet).getRegex(),V.list=Ae(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._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",V._comment=/<!--(?!-?>)[\s\S]*?-->/,V.html=Ae(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=Ae(V._paragraph).replace("hr",V.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",V._tag).getRegex(),V.blockquote=Ae(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=De({},V),V.gfm=De({},V.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*|$)"}),V.gfm.nptable=Ae(V.gfm.nptable).replace("hr",V.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",V._tag).getRegex(),V.gfm.table=Ae(V.gfm.table).replace("hr",V.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",V._tag).getRegex(),V.pedantic=De({},V.normal,{html:Ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",V._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:ye,paragraph:Ae(V.normal._paragraph).replace("hr",V.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var I={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ye,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:ye,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};I._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",I.punctuation=Ae(I.punctuation).replace(/punctuation/g,I._punctuation).getRegex(),I._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",I._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",I.em.start=Ae(I.em.start).replace(/punctuation/g,I._punctuation).getRegex(),I.em.middle=Ae(I.em.middle).replace(/punctuation/g,I._punctuation).replace(/overlapSkip/g,I._overlapSkip).getRegex(),I.em.endAst=Ae(I.em.endAst,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.em.endUnd=Ae(I.em.endUnd,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.strong.start=Ae(I.strong.start).replace(/punctuation/g,I._punctuation).getRegex(),I.strong.middle=Ae(I.strong.middle).replace(/punctuation/g,I._punctuation).replace(/blockSkip/g,I._blockSkip).getRegex(),I.strong.endAst=Ae(I.strong.endAst,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.strong.endUnd=Ae(I.strong.endUnd,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.blockSkip=Ae(I._blockSkip,"g").getRegex(),I.overlapSkip=Ae(I._overlapSkip,"g").getRegex(),I._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,I._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,I._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])?)+(?![-_])/,I.autolink=Ae(I.autolink).replace("scheme",I._scheme).replace("email",I._email).getRegex(),I._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,I.tag=Ae(I.tag).replace("comment",V._comment).replace("attribute",I._attribute).getRegex(),I._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,I._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,I._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,I.link=Ae(I.link).replace("label",I._label).replace("href",I._href).replace("title",I._title).getRegex(),I.reflink=Ae(I.reflink).replace("label",I._label).getRegex(),I.reflinkSearch=Ae(I.reflinkSearch,"g").replace("reflink",I.reflink).replace("nolink",I.nolink).getRegex(),I.normal=De({},I),I.pedantic=De({},I.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:Ae(/^!?\[(label)\]\((.*?)\)/).replace("label",I._label).getRegex(),reflink:Ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",I._label).getRegex()}),I.gfm=De({},I.normal,{escape:Ae(I.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),I.gfm.url=Ae(I.gfm.url,"i").replace("email",I.gfm._extended_email).getRegex(),I.breaks=De({},I.gfm,{br:Ae(I.br).replace("{2,}","*").getRegex(),text:Ae(I.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ue={block:V,inline:I},Xe=O.defaults,et=Ue.block,qe=Ue.inline;function $e(B){return B.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 pe(B){var D="",N,y,b=B.length;for(N=0;N<b;N++)y=B.charCodeAt(N),Math.random()>.5&&(y="x"+y.toString(16)),D+="&#"+y+";";return D}var Be=function(){function B(N){this.tokens=[],this.tokens.links=Object.create(null),this.options=N||Xe,this.options.tokenizer=this.options.tokenizer||new Ie,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var y={block:et.normal,inline:qe.normal};this.options.pedantic?(y.block=et.pedantic,y.inline=qe.pedantic):this.options.gfm&&(y.block=et.gfm,this.options.breaks?y.inline=qe.breaks:y.inline=qe.gfm),this.tokenizer.rules=y}B.lex=function(y,b){var x=new B(b);return x.lex(y)};var D=B.prototype;return D.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},D.blockTokens=function(y,b,x){b===void 0&&(b=[]),x===void 0&&(x=!0),y=y.replace(/^ +$/gm,"");for(var w,Y,_,be;y;){if(w=this.tokenizer.space(y)){y=y.substring(w.raw.length),w.type&&b.push(w);continue}if(w=this.tokenizer.code(y,b)){y=y.substring(w.raw.length),w.type?b.push(w):(be=b[b.length-1],be.raw+=`
`+w.raw,be.text+=`
`+w.text);continue}if(w=this.tokenizer.fences(y)){y=y.substring(w.raw.length),b.push(w);continue}if(w=this.tokenizer.heading(y)){y=y.substring(w.raw.length),b.push(w);continue}if(w=this.tokenizer.nptable(y)){y=y.substring(w.raw.length),b.push(w);continue}if(w=this.tokenizer.hr(y)){y=y.substring(w.raw.length),b.push(w);continue}if(w=this.tokenizer.blockquote(y)){y=y.substring(w.raw.length),w.tokens=this.blockTokens(w.text,[],x),b.push(w);continue}if(w=this.tokenizer.list(y)){for(y=y.substring(w.raw.length),_=w.items.length,Y=0;Y<_;Y++)w.items[Y].tokens=this.blockTokens(w.items[Y].text,[],!1);b.push(w);continue}if(w=this.tokenizer.html(y)){y=y.substring(w.raw.length),b.push(w);continue}if(x&&(w=this.tokenizer.def(y))){y=y.substring(w.raw.length),this.tokens.links[w.tag]||(this.tokens.links[w.tag]={href:w.href,title:w.title});continue}if(w=this.tokenizer.table(y)){y=y.substring(w.raw.length),b.push(w);continue}if(w=this.tokenizer.lheading(y)){y=y.substring(w.raw.length),b.push(w);continue}if(x&&(w=this.tokenizer.paragraph(y))){y=y.substring(w.raw.length),b.push(w);continue}if(w=this.tokenizer.text(y,b)){y=y.substring(w.raw.length),w.type?b.push(w):(be=b[b.length-1],be.raw+=`
`+w.raw,be.text+=`
`+w.text);continue}if(y){var Ye="Infinite loop on byte: "+y.charCodeAt(0);if(this.options.silent){console.error(Ye);break}else throw new Error(Ye)}}return b},D.inline=function(y){var b,x,w,Y,_,be,Ye=y.length;for(b=0;b<Ye;b++){be=y[b];switch(be.type){case"paragraph":case"text":case"heading":{be.tokens=[],this.inlineTokens(be.text,be.tokens);break}case"table":{for(be.tokens={header:[],cells:[]},Y=be.header.length,x=0;x<Y;x++)be.tokens.header[x]=[],this.inlineTokens(be.header[x],be.tokens.header[x]);for(Y=be.cells.length,x=0;x<Y;x++)for(_=be.cells[x],be.tokens.cells[x]=[],w=0;w<_.length;w++)be.tokens.cells[x][w]=[],this.inlineTokens(_[w],be.tokens.cells[x][w]);break}case"blockquote":{this.inline(be.tokens);break}case"list":{for(Y=be.items.length,x=0;x<Y;x++)this.inline(be.items[x].tokens);break}}}return y},D.inlineTokens=function(y,b,x,w,Y){b===void 0&&(b=[]),x===void 0&&(x=!1),w===void 0&&(w=!1),Y===void 0&&(Y="");var _,be=y,Ye;if(this.tokens.links){var ht=Object.keys(this.tokens.links);if(ht.length>0)for(;(Ye=this.tokenizer.rules.inline.reflinkSearch.exec(be))!=null;)ht.includes(Ye[0].slice(Ye[0].lastIndexOf("[")+1,-1))&&(be=be.slice(0,Ye.index)+"["+"a".repeat(Ye[0].length-2)+"]"+be.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ye=this.tokenizer.rules.inline.blockSkip.exec(be))!=null;)be=be.slice(0,Ye.index)+"["+"a".repeat(Ye[0].length-2)+"]"+be.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;y;){if(_=this.tokenizer.escape(y)){y=y.substring(_.raw.length),b.push(_);continue}if(_=this.tokenizer.tag(y,x,w)){y=y.substring(_.raw.length),x=_.inLink,w=_.inRawBlock,b.push(_);continue}if(_=this.tokenizer.link(y)){y=y.substring(_.raw.length),_.type==="link"&&(_.tokens=this.inlineTokens(_.text,[],!0,w)),b.push(_);continue}if(_=this.tokenizer.reflink(y,this.tokens.links)){y=y.substring(_.raw.length),_.type==="link"&&(_.tokens=this.inlineTokens(_.text,[],!0,w)),b.push(_);continue}if(_=this.tokenizer.strong(y,be,Y)){y=y.substring(_.raw.length),_.tokens=this.inlineTokens(_.text,[],x,w),b.push(_);continue}if(_=this.tokenizer.em(y,be,Y)){y=y.substring(_.raw.length),_.tokens=this.inlineTokens(_.text,[],x,w),b.push(_);continue}if(_=this.tokenizer.codespan(y)){y=y.substring(_.raw.length),b.push(_);continue}if(_=this.tokenizer.br(y)){y=y.substring(_.raw.length),b.push(_);continue}if(_=this.tokenizer.del(y)){y=y.substring(_.raw.length),_.tokens=this.inlineTokens(_.text,[],x,w),b.push(_);continue}if(_=this.tokenizer.autolink(y,pe)){y=y.substring(_.raw.length),b.push(_);continue}if(!x&&(_=this.tokenizer.url(y,pe))){y=y.substring(_.raw.length),b.push(_);continue}if(_=this.tokenizer.inlineText(y,w,$e)){y=y.substring(_.raw.length),Y=_.raw.slice(-1),b.push(_);continue}if(y){var it="Infinite loop on byte: "+y.charCodeAt(0);if(this.options.silent){console.error(it);break}else throw new Error(it)}}return b},Oe(B,null,[{key:"rules",get:function(){return{block:et,inline:qe}}}]),B}(),Re=O.defaults,tt=Me.cleanUrl,Ge=Me.escape,xe=function(){function B(N){this.options=N||Re}var D=B.prototype;return D.code=function(y,b,x){var w=(b||"").match(/\S*/)[0];if(this.options.highlight){var Y=this.options.highlight(y,w);Y!=null&&Y!==y&&(x=!0,y=Y)}return w?'<pre><code class="'+this.options.langPrefix+Ge(w,!0)+'">'+(x?y:Ge(y,!0))+`</code></pre>
`:"<pre><code>"+(x?y:Ge(y,!0))+`</code></pre>
`},D.blockquote=function(y){return`<blockquote>
`+y+`</blockquote>
`},D.html=function(y){return y},D.heading=function(y,b,x,w){return this.options.headerIds?"<h"+b+' id="'+this.options.headerPrefix+w.slug(x)+'">'+y+"</h"+b+`>
`:"<h"+b+">"+y+"</h"+b+`>
`},D.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},D.list=function(y,b,x){var w=b?"ol":"ul",Y=b&&x!==1?' start="'+x+'"':"";return"<"+w+Y+`>
`+y+"</"+w+`>
`},D.listitem=function(y){return"<li>"+y+`</li>
`},D.checkbox=function(y){return"<input "+(y?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},D.paragraph=function(y){return"<p>"+y+`</p>
`},D.table=function(y,b){return b&&(b="<tbody>"+b+"</tbody>"),`<table>
<thead>
`+y+`</thead>
`+b+`</table>
`},D.tablerow=function(y){return`<tr>
`+y+`</tr>
`},D.tablecell=function(y,b){var x=b.header?"th":"td",w=b.align?"<"+x+' align="'+b.align+'">':"<"+x+">";return w+y+"</"+x+`>
`},D.strong=function(y){return"<strong>"+y+"</strong>"},D.em=function(y){return"<em>"+y+"</em>"},D.codespan=function(y){return"<code>"+y+"</code>"},D.br=function(){return this.options.xhtml?"<br/>":"<br>"},D.del=function(y){return"<del>"+y+"</del>"},D.link=function(y,b,x){if(y=tt(this.options.sanitize,this.options.baseUrl,y),y===null)return x;var w='<a href="'+Ge(y)+'"';return b&&(w+=' title="'+b+'"'),w+=">"+x+"</a>",w},D.image=function(y,b,x){if(y=tt(this.options.sanitize,this.options.baseUrl,y),y===null)return x;var w='<img src="'+y+'" alt="'+x+'"';return b&&(w+=' title="'+b+'"'),w+=this.options.xhtml?"/>":">",w},D.text=function(y){return y},B}(),Fe=function(){function B(){}var D=B.prototype;return D.strong=function(y){return y},D.em=function(y){return y},D.codespan=function(y){return y},D.del=function(y){return y},D.html=function(y){return y},D.text=function(y){return y},D.link=function(y,b,x){return""+x},D.image=function(y,b,x){return""+x},D.br=function(){return""},B}(),ut=function(){function B(){this.seen={}}var D=B.prototype;return D.slug=function(y){var b=y.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(b)){var x=b;do this.seen[x]++,b=x+"-"+this.seen[x];while(this.seen.hasOwnProperty(b))}return this.seen[b]=0,b},B}(),at=O.defaults,Ve=Me.unescape,Qe=function(){function B(N){this.options=N||at,this.options.renderer=this.options.renderer||new xe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Fe,this.slugger=new ut}B.parse=function(y,b){var x=new B(b);return x.parse(y)};var D=B.prototype;return D.parse=function(y,b){b===void 0&&(b=!0);var x="",w,Y,_,be,Ye,ht,it,Dt,At,ct,Kt,Ot,Pt,Rt,Ct,It,Wt,nt,en=y.length;for(w=0;w<en;w++){ct=y[w];switch(ct.type){case"space":continue;case"hr":{x+=this.renderer.hr();continue}case"heading":{x+=this.renderer.heading(this.parseInline(ct.tokens),ct.depth,Ve(this.parseInline(ct.tokens,this.textRenderer)),this.slugger);continue}case"code":{x+=this.renderer.code(ct.text,ct.lang,ct.escaped);continue}case"table":{for(Dt="",it="",be=ct.header.length,Y=0;Y<be;Y++)it+=this.renderer.tablecell(this.parseInline(ct.tokens.header[Y]),{header:!0,align:ct.align[Y]});for(Dt+=this.renderer.tablerow(it),At="",be=ct.cells.length,Y=0;Y<be;Y++){for(ht=ct.tokens.cells[Y],it="",Ye=ht.length,_=0;_<Ye;_++)it+=this.renderer.tablecell(this.parseInline(ht[_]),{header:!1,align:ct.align[_]});At+=this.renderer.tablerow(it)}x+=this.renderer.table(Dt,At);continue}case"blockquote":{At=this.parse(ct.tokens),x+=this.renderer.blockquote(At);continue}case"list":{for(Kt=ct.ordered,Ot=ct.start,Pt=ct.loose,be=ct.items.length,At="",Y=0;Y<be;Y++)Ct=ct.items[Y],It=Ct.checked,Wt=Ct.task,Rt="",Ct.task&&(nt=this.renderer.checkbox(It),Pt?Ct.tokens.length>0&&Ct.tokens[0].type==="text"?(Ct.tokens[0].text=nt+" "+Ct.tokens[0].text,Ct.tokens[0].tokens&&Ct.tokens[0].tokens.length>0&&Ct.tokens[0].tokens[0].type==="text"&&(Ct.tokens[0].tokens[0].text=nt+" "+Ct.tokens[0].tokens[0].text)):Ct.tokens.unshift({type:"text",text:nt}):Rt+=nt),Rt+=this.parse(Ct.tokens,Pt),At+=this.renderer.listitem(Rt,Wt,It);x+=this.renderer.list(At,Kt,Ot);continue}case"html":{x+=this.renderer.html(ct.text);continue}case"paragraph":{x+=this.renderer.paragraph(this.parseInline(ct.tokens));continue}case"text":{for(At=ct.tokens?this.parseInline(ct.tokens):ct.text;w+1<en&&y[w+1].type==="text";)ct=y[++w],At+=`
`+(ct.tokens?this.parseInline(ct.tokens):ct.text);x+=b?this.renderer.paragraph(At):At;continue}default:{var tn='Token with "'+ct.type+'" type was not found.';if(this.options.silent){console.error(tn);return}else throw new Error(tn)}}}return x},D.parseInline=function(y,b){b=b||this.renderer;var x="",w,Y,_=y.length;for(w=0;w<_;w++){Y=y[w];switch(Y.type){case"escape":{x+=b.text(Y.text);break}case"html":{x+=b.html(Y.text);break}case"link":{x+=b.link(Y.href,Y.title,this.parseInline(Y.tokens,b));break}case"image":{x+=b.image(Y.href,Y.title,Y.text);break}case"strong":{x+=b.strong(this.parseInline(Y.tokens,b));break}case"em":{x+=b.em(this.parseInline(Y.tokens,b));break}case"codespan":{x+=b.codespan(Y.text);break}case"br":{x+=b.br();break}case"del":{x+=b.del(this.parseInline(Y.tokens,b));break}case"text":{x+=b.text(Y.text);break}default:{var be='Token with "'+Y.type+'" type was not found.';if(this.options.silent){console.error(be);return}else throw new Error(be)}}}return x},B}(),yt=Me.merge,ft=Me.checkSanitizeDeprecation,st=Me.escape,ce=O.getDefaults,gt=O.changeDefaults,ot=O.defaults;function de(B,D,N){if(typeof B=="undefined"||B===null)throw new Error("marked(): input parameter is undefined or null");if(typeof B!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(B)+", string expected");if(typeof D=="function"&&(N=D,D=null),D=yt({},de.defaults,D||{}),ft(D),N){var y=D.highlight,b;try{b=Be.lex(B,D)}catch(_){return N(_)}var x=function(be){var Ye;if(!be)try{Ye=Qe.parse(b,D)}catch(ht){be=ht}return D.highlight=y,be?N(be):N(null,Ye)};if(!y||y.length<3)return x();if(delete D.highlight,!b.length)return x();var w=0;de.walkTokens(b,function(_){_.type==="code"&&(w++,setTimeout(function(){y(_.text,_.lang,function(be,Ye){if(be)return x(be);Ye!=null&&Ye!==_.text&&(_.text=Ye,_.escaped=!0),w--,w===0&&x()})},0))}),w===0&&x();return}try{var Y=Be.lex(B,D);return D.walkTokens&&de.walkTokens(Y,D.walkTokens),Qe.parse(Y,D)}catch(_){if(_.message+=`
Please report this to https://github.com/markedjs/marked.`,D.silent)return"<p>An error occurred:</p><pre>"+st(_.message+"",!0)+"</pre>";throw _}}de.options=de.setOptions=function(B){return yt(de.defaults,B),gt(de.defaults),de},de.getDefaults=ce,de.defaults=ot,de.use=function(B){var D=yt({},B);if(B.renderer&&function(){var y=de.defaults.renderer||new xe,b=function(Y){var _=y[Y];y[Y]=function(){for(var be=arguments.length,Ye=new Array(be),ht=0;ht<be;ht++)Ye[ht]=arguments[ht];var it=B.renderer[Y].apply(y,Ye);return it===!1&&(it=_.apply(y,Ye)),it}};for(var x in B.renderer)b(x);D.renderer=y}(),B.tokenizer&&function(){var y=de.defaults.tokenizer||new Ie,b=function(Y){var _=y[Y];y[Y]=function(){for(var be=arguments.length,Ye=new Array(be),ht=0;ht<be;ht++)Ye[ht]=arguments[ht];var it=B.tokenizer[Y].apply(y,Ye);return it===!1&&(it=_.apply(y,Ye)),it}};for(var x in B.tokenizer)b(x);D.tokenizer=y}(),B.walkTokens){var N=de.defaults.walkTokens;D.walkTokens=function(y){B.walkTokens(y),N&&N(y)}}de.setOptions(D)},de.walkTokens=function(B,D){for(var N=me(B),y;!(y=N()).done;){var b=y.value;D(b);switch(b.type){case"table":{for(var x=me(b.tokens.header),w;!(w=x()).done;){var Y=w.value;de.walkTokens(Y,D)}for(var _=me(b.tokens.cells),be;!(be=_()).done;)for(var Ye=be.value,ht=me(Ye),it;!(it=ht()).done;){var Dt=it.value;de.walkTokens(Dt,D)}break}case"list":{de.walkTokens(b.items,D);break}default:b.tokens&&de.walkTokens(b.tokens,D)}}},de.Parser=Qe,de.parser=Qe.parse,de.Renderer=xe,de.TextRenderer=Fe,de.Lexer=Be,de.lexer=Be.lex,de.Tokenizer=Ie,de.Slugger=ut,de.parse=de;var Ne=de;return Ne})},E7E6:function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG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PAAAAI6SURBVO6DZb5LdedsvCmBdwCF3+9fV1dXF98slMfgCUCSumCNQsgvSymXSklLeF4lj9rhTtadQtAGIcR6KbWNS0fdydZYLp4DRF9snLQSjUZvjsViS4Wg26SUVi++NiYNjuWKBIQQR6Wkl30+3/q6urq3hBBXb+J3pSTZM/E0IMnFj0Qi10kp/4QotphILJJSjs1eRY6RbwkIIU4SyRYi32YhxBv19fUD9yLku3BZ8i8oQJLrcurUiWt6e8Wi3l7CyBiO8JvicXkXS/EOEokWv582+/2ypaZm3IFCrXhBA5Is9La2trqenp6biGi2lJhv0eZcxhVq4xRIuU8Qid1CCKyB31VSUrK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},ELLl:function(Ee,ue,m){(function(F){F(m("VrN/"))})(function(F){var Oe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},re=F.Pos;F.defineOption("autoCloseBrackets",!1,function(j,z,P){P&&P!=F.Init&&(j.removeKeyMap(me),j.state.closeBrackets=null),z&&(fe(ge(z,"pairs")),j.state.closeBrackets=z,j.addKeyMap(me))});function ge(j,z){return z=="pairs"&&typeof j=="string"?j:typeof j=="object"&&j[z]!=null?j[z]:Oe[z]}var me={Backspace:H,Enter:he};function fe(j){for(var z=0;z<j.length;z++){var P=j.charAt(z),te="'"+P+"'";me[te]||(me[te]=O(P))}}fe(Oe.pairs+"`");function O(j){return function(z){return L(z,j)}}function K(j){var z=j.state.closeBrackets;if(!z||z.override)return z;var P=j.getModeAt(j.getCursor());return P.closeBrackets||z}function H(j){var z=K(j);if(!z||j.getOption("disableInput"))return F.Pass;for(var P=ge(z,"pairs"),te=j.listSelections(),Q=0;Q<te.length;Q++){if(!te[Q].empty())return F.Pass;var Se=oe(j,te[Q].head);if(!Se||P.indexOf(Se)%2!=0)return F.Pass}for(var Q=te.length-1;Q>=0;Q--){var ze=te[Q].head;j.replaceRange("",re(ze.line,ze.ch-1),re(ze.line,ze.ch+1),"+delete")}}function he(j){var z=K(j),P=z&&ge(z,"explode");if(!P||j.getOption("disableInput"))return F.Pass;for(var te=j.listSelections(),Q=0;Q<te.length;Q++){if(!te[Q].empty())return F.Pass;var Se=oe(j,te[Q].head);if(!Se||P.indexOf(Se)%2!=0)return F.Pass}j.operation(function(){var ze=j.lineSeparator()||`
`;j.replaceSelection(ze+ze,null),j.execCommand("goCharLeft"),te=j.listSelections();for(var ae=0;ae<te.length;ae++){var ne=te[ae].head.line;j.indentLine(ne,null,!0),j.indentLine(ne+1,null,!0)}})}function R(j){var z=F.cmpPos(j.anchor,j.head)>0;return{anchor:new re(j.anchor.line,j.anchor.ch+(z?-1:1)),head:new re(j.head.line,j.head.ch+(z?1:-1))}}function L(j,z){var P=K(j);if(!P||j.getOption("disableInput"))return F.Pass;var te=ge(P,"pairs"),Q=te.indexOf(z);if(Q==-1)return F.Pass;for(var Se=ge(P,"closeBefore"),ze=ge(P,"triples"),ae=te.charAt(Q+1)==z,ne=j.listSelections(),_e=Q%2==0,ie,se=0;se<ne.length;se++){var $=ne[se],k=$.head,C,J=j.getRange(k,re(k.line,k.ch+1));if(_e&&!$.empty())C="surround";else if((ae||!_e)&&J==z)ae&&X(j,k)?C="both":ze.indexOf(z)>=0&&j.getRange(k,re(k.line,k.ch+3))==z+z+z?C="skipThree":C="skip";else if(ae&&k.ch>1&&ze.indexOf(z)>=0&&j.getRange(re(k.line,k.ch-2),k)==z+z){if(k.ch>2&&/\bstring/.test(j.getTokenTypeAt(re(k.line,k.ch-2))))return F.Pass;C="addFour"}else if(ae){var U=k.ch==0?" ":j.getRange(re(k.line,k.ch-1),k);if(!F.isWordChar(J)&&U!=z&&!F.isWordChar(U))C="both";else return F.Pass}else if(_e&&(J.length===0||/\s/.test(J)||Se.indexOf(J)>-1))C="both";else return F.Pass;if(!ie)ie=C;else if(ie!=C)return F.Pass}var S=Q%2?te.charAt(Q-1):z,ee=Q%2?z:te.charAt(Q+1);j.operation(function(){if(ie=="skip")j.execCommand("goCharRight");else if(ie=="skipThree")for(var le=0;le<3;le++)j.execCommand("goCharRight");else if(ie=="surround"){for(var q=j.getSelections(),le=0;le<q.length;le++)q[le]=S+q[le]+ee;j.replaceSelections(q,"around"),q=j.listSelections().slice();for(var le=0;le<q.length;le++)q[le]=R(q[le]);j.setSelections(q)}else ie=="both"?(j.replaceSelection(S+ee,null),j.triggerElectric(S+ee),j.execCommand("goCharLeft")):ie=="addFour"&&(j.replaceSelection(S+S+S+S,"before"),j.execCommand("goCharRight"))})}function oe(j,z){var P=j.getRange(re(z.line,z.ch-1),re(z.line,z.ch+1));return P.length==2?P:null}function X(j,z){var P=j.getTokenAt(re(z.line,z.ch+1));return/\bstring/.test(P.type)&&P.start==z.ch&&(z.ch==0||!/\bstring/.test(j.getTokenTypeAt(z)))}})},FOrL:function(Ee,ue,m){Ee.exports=m.p+"static/nodata.a6b3f948.png"},FPkq:function(Ee,ue,m){Ee.exports=m.p+"static/qrCode.dd0fe9b2.png"},GABl:function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHU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mWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},Gytx:function(Ee,ue){Ee.exports=function(F,Oe,re,ge){var me=re?re.call(ge,F,Oe):void 0;if(me!==void 0)return!!me;if(F===Oe)return!0;if(typeof F!="object"||!F||typeof Oe!="object"||!Oe)return!1;var fe=Object.keys(F),O=Object.keys(Oe);if(fe.length!==O.length)return!1;for(var K=Object.prototype.hasOwnProperty.bind(Oe),H=0;H<fe.length;H++){var he=fe[H];if(!K(he))return!1;var R=F[he],L=Oe[he];if(me=re?re.call(ge,R,L,he):void 0,me===!1||me===void 0&&R!==L)return!1}return!0}},HmJG:function(Ee,ue,m){},HpTS:function(Ee,ue,m){Ee.exports=m.p+"static/small_program.f74069ec.png"},JWDV:function(Ee,ue,m){Ee.exports=m.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlX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LnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(Ee,ue,m){Ee.exports=m.p+"static/qrcode.54870d9b.png"},LdHM:function(Ee,ue,m){"use strict";m.d(ue,"b",function(){return Se}),m.d(ue,"a",function(){return ae});var F=m("1OyB"),Oe=m("vuIU"),re=m("Ji7U"),ge=m("LK+K"),me=m("q1tI"),fe=m("rePB"),O=m("Ff2n"),K=m("ODXe"),H=m("4IlW"),he=m("bX4T"),R=m("YrtM"),L=m("TSYQ"),oe=m.n(L),X=m("+nKL"),j=m("8OUc"),z=function(W,Ce){var we=W.prefixCls,Ze=W.id,rt=W.flattenOptions,Ie=W.childrenAsData,ye=W.values,Ae=W.searchValue,De=W.multiple,V=W.defaultActiveFirstOption,I=W.height,Ue=W.itemHeight,Xe=W.notFoundContent,et=W.open,qe=W.menuItemSelectedIcon,$e=W.virtual,pe=W.onSelect,Be=W.onToggleOpen,Re=W.onActiveValue,tt=W.onScroll,Ge=W.onMouseEnter,xe="".concat(we,"-item"),Fe=Object(R.a)(function(){return rt},[et,rt],function(Ne,B){return B[0]&&Ne[1]!==B[1]}),ut=me.useRef(null),at=function(B){B.preventDefault()},Ve=function(B){ut.current&&ut.current.scrollTo({index:B})},Qe=function(B){for(var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=Fe.length,y=0;y<N;y+=1){var b=(B+y*D+N)%N,x=Fe[b],w=x.group,Y=x.data;if(!w&&!Y.disabled)return b}return-1},yt=me.useState(function(){return Qe(0)}),ft=Object(K.a)(yt,2),st=ft[0],ce=ft[1],gt=function(B){ce(B);var D=Fe[B];if(!D){Re(null,-1);return}Re(D.data.value,B)};me.useEffect(function(){gt(V!==!1?Qe(0):-1)},[Fe.length,Ae]),me.useEffect(function(){var Ne=setTimeout(function(){if(!De&&et&&ye.size===1){var B=Array.from(ye)[0],D=Fe.findIndex(function(N){var y=N.data;return y.value===B});gt(D),Ve(D)}});return function(){return clearTimeout(Ne)}},[et]);var ot=function(B){B!==void 0&&pe(B,{selected:!ye.has(B)}),De||Be(!1)};if(me.useImperativeHandle(Ce,function(){return{onKeyDown:function(B){var D=B.which;switch(D){case H.a.UP:case H.a.DOWN:{var N=0;if(D===H.a.UP?N=-1:D===H.a.DOWN&&(N=1),N!==0){var y=Qe(st+N,N);Ve(y),gt(y)}break}case H.a.ENTER:{var b=Fe[st];b&&!b.data.disabled?ot(b.data.value):ot(void 0),et&&B.preventDefault();break}case H.a.ESC:Be(!1)}},onKeyUp:function(){},scrollTo:function(B){Ve(B)}}}),Fe.length===0)return me.createElement("div",{role:"listbox",id:"".concat(Ze,"_list"),className:"".concat(xe,"-empty"),onMouseDown:at},Xe);function de(Ne){var B=Fe[Ne];if(!B)return null;var D=B.data||{},N=D.value,y=D.label,b=D.children,x=Object(he.a)(D,!0),w=Ie?b:y;return B?me.createElement("div",Object.assign({"aria-label":typeof w=="string"?w:null},x,{key:Ne,role:"option",id:"".concat(Ze,"_list_").concat(Ne),"aria-selected":ye.has(N)}),N):null}return me.createElement(me.Fragment,null,me.createElement("div",{role:"listbox",id:"".concat(Ze,"_list"),style:{height:0,width:0,overflow:"hidden"}},de(st-1),de(st),de(st+1)),me.createElement(X.a,{itemKey:"key",ref:ut,data:Fe,height:I,itemHeight:Ue,fullHeight:!1,onMouseDown:at,onScroll:tt,virtual:$e,onMouseEnter:Ge},function(Ne,B){var D,N=Ne.group,y=Ne.groupOption,b=Ne.data,x=b.label,w=b.key;if(N)return me.createElement("div",{className:oe()(xe,"".concat(xe,"-group"))},x!==void 0?x:w);var Y=b.disabled,_=b.value,be=b.title,Ye=b.children,ht=b.style,it=b.className,Dt=Object(O.a)(b,["disabled","value","title","children","style","className"]),At=ye.has(_),ct="".concat(xe,"-option"),Kt=oe()(xe,ct,it,(D={},Object(fe.a)(D,"".concat(ct,"-grouped"),y),Object(fe.a)(D,"".concat(ct,"-active"),st===B&&!Y),Object(fe.a)(D,"".concat(ct,"-disabled"),Y),Object(fe.a)(D,"".concat(ct,"-selected"),At),D)),Ot=Ie?Ye:x,Pt=!qe||typeof qe=="function"||At;return me.createElement("div",Object.assign({},Dt,{"aria-selected":At,className:Kt,title:be,onMouseMove:function(){if(st===B||Y)return;gt(B)},onClick:function(){Y||ot(_)},style:ht}),me.createElement("div",{className:"".concat(ct,"-content")},Ot||_),me.isValidElement(qe)||At,Pt&&me.createElement(j.a,{className:"".concat(xe,"-option-state"),customizeIcon:qe,customizeIconProps:{isSelected:At}},At?"\u2713":null))}))},P=me.forwardRef(z);P.displayName="OptionList";var te=P,Q=function(){return null};Q.isSelectOption=!0;var Se=Q,ze=function(){return null};ze.isSelectOptGroup=!0;var ae=ze,ne=m("VTBJ"),_e=m("Zm9Q");function ie(v){var W=v.key,Ce=v.props,we=Ce.children,Ze=Ce.value,rt=Object(O.a)(Ce,["children","value"]);return Object(ne.a)({key:W,value:Ze!==void 0?Ze:W,children:we},rt)}function se(v){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(_e.a)(v).map(function(Ce,we){if(!me.isValidElement(Ce)||!Ce.type)return null;var Ze=Ce.type.isSelectOptGroup,rt=Ce.key,Ie=Ce.props,ye=Ie.children,Ae=Object(O.a)(Ie,["children"]);return W||!Ze?ie(Ce):Object(ne.a)(Object(ne.a)({key:"__RC_SELECT_GRP__".concat(rt===null?we:rt,"__"),label:rt},Ae),{},{options:se(ye)})}).filter(function(Ce){return Ce})}var $=m("2Qr1"),k=m("qNPg"),C=m("U8pU"),J=m("Kwbf"),U=m("WKfj");function S(v){var W=v.mode,Ce=v.options,we=v.children,Ze=v.backfill,rt=v.allowClear,Ie=v.placeholder,ye=v.getInputElement,Ae=v.showSearch,De=v.onSearch,V=v.defaultOpen,I=v.autoFocus,Ue=v.labelInValue,Xe=v.value,et=v.inputValue,qe=v.optionLabelProp,$e=W==="multiple"||W==="tags",pe=Ae!==void 0?Ae:$e||W==="combobox",Be=Ce||se(we);if(Object(J.a)(W!=="tags"||Be.every(function(xe){return!xe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var Re=Be.some(function(xe){return xe.options?xe.options.some(function(Fe){return typeof("value"in Fe?Fe.value:Fe.key)=="number"}):typeof("value"in xe?xe.value:xe.key)=="number"});Object(J.a)(!Re,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(J.a)(W!=="combobox"||!qe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(J.a)(W==="combobox"||!Ze,"`backfill` only works with `combobox` mode."),Object(J.a)(W==="combobox"||!ye,"`getInputElement` only work with `combobox` mode."),Object(J.b)(W!=="combobox"||!ye||!rt||!Ie,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),De&&!pe&&W!=="combobox"&&W!=="tags"&&Object(J.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(J.b)(!V||I,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Xe!=null){var tt=Object(U.d)(Xe);Object(J.a)(!Ue||tt.every(function(xe){return Object(C.a)(xe)==="object"&&("key"in xe||"value"in xe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(J.a)(!$e||Array.isArray(Xe),"`value` should be array when `mode` is `multiple` or `tags`")}if(we){var Ge=null;Object(_e.a)(we).some(function(xe){if(!me.isValidElement(xe)||!xe.type)return!1;var Fe=xe.type;if(Fe.isSelectOption)return!1;if(Fe.isSelectOptGroup){var ut=Object(_e.a)(xe.props.children).every(function(at){return!me.isValidElement(at)||!xe.type||at.type.isSelectOption?!0:(Ge=at.type,!1)});return!ut}return Ge=Fe,!0}),Ge&&Object(J.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ge.displayName||Ge.name||Ge,"`.")),Object(J.a)(et===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var ee=S,le=Object(k.a)({prefixCls:"rc-select",components:{optionList:te},convertChildrenToData:se,flattenOptions:$.d,getLabeledValue:$.e,filterOptions:$.b,isValueDisabled:$.g,findValueOption:$.c,warningProps:ee,fillOptionsWithMissingValue:$.a}),q=function(v){Object(re.a)(Ce,v);var W=Object(ge.a)(Ce);function Ce(){var we;return Object(F.a)(this,Ce),we=W.apply(this,arguments),we.selectRef=me.createRef(),we.focus=function(){we.selectRef.current.focus()},we.blur=function(){we.selectRef.current.blur()},we}return Object(Oe.a)(Ce,[{key:"render",value:function(){return me.createElement(le,Object.assign({ref:this.selectRef},this.props))}}]),Ce}(me.Component);q.Option=Se,q.OptGroup=ae;var Me=q,E=ue.c=Me},M8RZ:function(Ee,ue,m){"use strict";m.d(ue,"a",function(){return H});var F=m("fWQN"),Oe=m("mtLc"),re=m("yKVA"),ge=m("879j"),me=m("q1tI"),fe=m.n(me),O=m("i8i4"),K=m.n(O),H=function(he){Object(re.a)(L,he);var R=Object(ge.a)(L);function L(oe){var X;Object(F.a)(this,L),X=R.call(this,oe);var j=window.document;return X.node=j.createElement("div"),j.body.appendChild(X.node),X}return Object(Oe.a)(L,[{key:"render",value:function(){var X=this.props.children;return Object(O.createPortal)(X,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),L}(fe.a.Component)},Nmxd:function(Ee,ue){Ee.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+IaktSMR0zIrFWajzcXTM2X95w0c/bk5ofVVT8k6e77vT7qY+A5TbIx6uvizoKJNUVxDhlA1COkKLis5Wgq2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JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},OLES:function(Ee,ue,m){"use strict";var F=m("U8pU"),Oe=m("VTBJ"),re=m("Ff2n"),ge=m("q1tI"),me=m("uciX"),fe=m("7ixt"),O=function(oe){var X=oe.overlay,j=oe.prefixCls,z=oe.id,P=oe.overlayInnerStyle;return ge.createElement("div",{className:"".concat(j,"-inner"),id:z,role:"tooltip",style:P},typeof X=="function"?X():X)},K=O,H=function(oe,X){var j=oe.overlayClassName,z=oe.trigger,P=z===void 0?["hover"]:z,te=oe.mouseEnterDelay,Q=te===void 0?0:te,Se=oe.mouseLeaveDelay,ze=Se===void 0?.1:Se,ae=oe.overlayStyle,ne=oe.prefixCls,_e=ne===void 0?"rc-tooltip":ne,ie=oe.children,se=oe.onVisibleChange,$=oe.afterVisibleChange,k=oe.transitionName,C=oe.animation,J=oe.placement,U=J===void 0?"right":J,S=oe.align,ee=S===void 0?{}:S,le=oe.destroyTooltipOnHide,q=le===void 0?!1:le,Me=oe.defaultVisible,E=oe.getTooltipContainer,v=oe.overlayInnerStyle,W=Object(re.a)(oe,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Ce=Object(ge.useRef)(null);Object(ge.useImperativeHandle)(X,function(){return Ce.current});var we=Object(Oe.a)({},W);"visible"in oe&&(we.popupVisible=oe.visible);var Ze=function(){var De=oe.arrowContent,V=De===void 0?null:De,I=oe.overlay,Ue=oe.id;return[ge.createElement("div",{className:"".concat(_e,"-arrow"),key:"arrow"},V),ge.createElement(K,{key:"content",prefixCls:_e,id:Ue,overlay:I,overlayInnerStyle:v})]},rt=!1,Ie=!1;if(typeof q=="boolean")rt=q;else if(q&&Object(F.a)(q)==="object"){var ye=q.keepParent;rt=ye===!0,Ie=ye===!1}return ge.createElement(me.a,Object.assign({popupClassName:j,prefixCls:_e,popup:Ze,action:P,builtinPlacements:fe.a,popupPlacement:U,ref:Ce,popupAlign:ee,getPopupContainer:E,onPopupVisibleChange:se,afterPopupVisibleChange:$,popupTransitionName:k,popupAnimation:C,defaultPopupVisible:Me,destroyPopupOnHide:rt,autoDestroy:Ie,mouseLeaveDelay:ze,popupStyle:ae,mouseEnterDelay:Q},we),ie)},he=Object(ge.forwardRef)(H),R=ue.a=he},Ohmc:function(Ee,ue,m){Ee.exports=m.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(Ee,ue,m){"use strict";var F=m("2qtc"),Oe=m("kLXV"),re=m("rAM+"),ge=m("miYZ"),me=m("tsqr"),fe=m("9og8"),O=m("tJVT"),K=m("jrin"),H=m("WmNS"),he=m.n(H),R=m("q1tI"),L=m.n(R),oe=m("VrN/"),X=m.n(oe),j=m("bdgK"),z=m("p77/"),P=m("Bd2K"),te=m("ELLl"),Q=m("19Vz"),Se=m("lZu9"),ze=m("+NIl"),ae=m("kSUc"),ne=m("9Bee"),_e=function(_){var be=_.value,Ye=be===void 0?"":be,ht=_.className,it=_.showTextOnly,Dt=_.showLines,At=_.style,ct=At===void 0?{}:At,Kt=Object(R.useMemo)(function(){return""},[Ye]);return L.a.createElement(L.a.Fragment,null,L.a.createElement("div",{dangerouslySetInnerHTML:{__html:Kt}}))},ie=m("0Owb"),se=m("dejd"),$=m("C+DQ"),k=m("1vsH"),C=m("m3rI"),J=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function U(_){var be=_.onActionCallback,Ye=_.title,ht=_.icon,it=_.actionName,Dt=_.className,At=Dt===void 0?"":Dt,ct=_.children;function Kt(){be(it)}return L.a.createElement("a",{title:Ye,className:At,onClick:Kt},L.a.createElement("i",{className:"md-iconfont ".concat(ht)}),ct)}var S=function(_){var be=_.watch,Ye=_.showNullButton,ht=_.onActionCallback,it=_.fullScreen,Dt=_.insertTemp,At=_.hidetoolBar,ct=_.uuid,Kt=_.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(k.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(k.E)("_educoder_session"),"&key=").concat(ct,"&api=").concat(encodeURIComponent(C.a.PROXY_SERVER)));var Ot=[].concat(J,[{title:"".concat(be?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(be?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return L.a.createElement("ul",{className:"markdown-toolbar-container"},!At&&Ot.map(function(Pt,Rt){return L.a.createElement("li",{key:Rt},Pt.actionName?L.a.createElement(U,Object(ie.a)({},Pt,{onActionCallback:ht})):L.a.createElement("span",{className:"v-line"}))}),Ye?L.a.createElement("li",null,L.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ht},L.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Dt&&L.a.createElement("li",null,L.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Dt),onActionCallback:ht},L.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),L.a.createElement("li",{className:"btn-full-screen"},L.a.createElement(U,{icon:"".concat(it?"icon-shrink":"icon-enlarge"),title:it?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ht})))},ee=m("M8RZ"),le=m("+L6B"),q=m("2/Rp"),Me=m("y8nQ"),E=m("Vl3Y"),v=m("5NDa"),W=m("5rEg"),Ce={labelCol:{span:4},wrapperCol:{span:20}},we=function(_){var be=_.callback,Ye=_.onCancel;function ht(it){be(it)}return L.a.createElement(E.a,Object(ie.a)({},Ce,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ht}),L.a.createElement(E.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},L.a.createElement(W.a,null)),L.a.createElement(E.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},L.a.createElement(W.a,null)),L.a.createElement("div",{className:"flex-container flex-end"},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:Ye},"\u53D6\u6D88")))},Ze=m("7ahc"),rt=m("k1fw"),Ie=m("HmJG"),ye=m("BjJ7"),Ae=E.a.useForm,De={width:280,marginRight:10},V={labelCol:{span:5},wrapperCol:{span:19}},I=function(_){var be=_.callback,Ye=_.onCancel,ht=Ae(),it=Object(O.a)(ht,1),Dt=it[0],At=Object(R.useRef)();function ct(Pt){be(Object(rt.a)(Object(rt.a)({},Pt),{},{name:At.current}))}function Kt(Pt,Rt){Dt.setFieldsValue({src:"/api/attachments/".concat(Pt.id,"?type=").concat(Pt.content_type),type:Rt.type})}function Ot(Pt){var Rt=Pt.target.files[0];At.current=Rt.name,Xe(Rt,Kt)}return L.a.createElement(E.a,Object(ie.a)({form:Dt},V,{className:"upload-image-panel",onFinish:ct}),L.a.createElement(E.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},L.a.createElement("div",{className:"flex-container"},L.a.createElement(E.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},L.a.createElement(W.a,{style:De})),L.a.createElement(Ue,{onFileChange:Ot}))),L.a.createElement(E.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},L.a.createElement(W.a,{style:{width:264}})),L.a.createElement(E.a.Item,{style:{textAlign:"right"}},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:Ye},"\u53D6\u6D88")))};function Ue(_){var be=_.onFileChange;return L.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",L.a.createElement("input",{type:"file",onChange:be}))}function Xe(_,be){if(!_)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ye=new FormData;Ye.append("editormd-image-file",_),Ye.append("file_param_name","editormd-image-file"),Ye.append("byxhr","true");var ht=new window.XMLHttpRequest;ht.withCredentials=!0,ht.addEventListener("load",function(it){be(JSON.parse(it.target.responseText),_)},!1),ht.addEventListener("error",function(it){console.error(it)},!1),ht.open("POST","".concat(ye.a,"/api/attachments.json")),ht.send(Ye)}var et=m("giR+"),qe=m("fyUT"),$e=m("7Kak"),pe=m("9yH6"),Be=pe.a.Group,Re={margin:"0 8px"},tt=function(_){var be=_.callback,Ye=_.onCancel;function ht(it){be(it)}return L.a.createElement(E.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ht},L.a.createElement("div",{className:"flex-container"},L.a.createElement("span",{style:Re},"\u5355\u5143\u683C\u6570\uFF1A"),L.a.createElement("span",{style:Re},"\u884C\u6570"),L.a.createElement(E.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},L.a.createElement(qe.a,null)),L.a.createElement("span",{style:Re},"\u5217\u6570"),L.a.createElement(E.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},L.a.createElement(qe.a,null))),L.a.createElement("div",{className:"flex-container",style:{marginTop:12}},L.a.createElement("span",{style:Re},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),L.a.createElement(E.a.Item,{name:"align"},L.a.createElement(Be,null,L.a.createElement(pe.a,{value:"default"},L.a.createElement("i",{className:"fa fa-align-justify"})),L.a.createElement(pe.a,{value:"left"},L.a.createElement("i",{className:"fa fa-align-left"})),L.a.createElement(pe.a,{value:"center"},L.a.createElement("i",{className:"fa fa-align-center"})),L.a.createElement(pe.a,{value:"right"},L.a.createElement("i",{className:"fa fa-align-right"}))))),L.a.createElement("div",{className:"flex-container flex-end"},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:Ye},"\u53D6\u6D88")))},Ge=m("ErOA"),xe=m("7Cbv"),Fe="link",ut="upload-image",at="code-block",Ve="add-table",Qe="------------",yt={default:Qe,left:":".concat(Qe),center:":".concat(Qe,":"),right:"".concat(Qe,":")},ft=m("9VGf"),st,ce;function gt(){}var ot=0,de=1e4,Ne="\u2581",B=`
**\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 D(_){return/^\d+$/.test(_)?"".concat(_,"px"):_}var N=navigator.platform.toUpperCase().indexOf("MAC")>=0,y=N?"Cmd":"Ctrl",b=["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"],x=(st={},Object(K.a)(st,y+"-B","bold"),Object(K.a)(st,y+"-I","italic"),st),w=(ce={},Object(K.a)(ce,Fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(K.a)(ce,at,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(K.a)(ce,ut,"\u6DFB\u52A0\u6587\u4EF6"),Object(K.a)(ce,Ve,"\u6DFB\u52A0\u8868\u683C"),ce),Y=ue.a=function(_){var be=_.defaultValue,Ye=be===void 0?"":be,ht=_.onChange,it=_.width,Dt=it===void 0?"100%":it,At=_.height,ct=At===void 0?400:At,Kt=_.miniToolbar,Ot=Kt===void 0?!1:Kt,Pt=_.isFocus,Rt=Pt===void 0?!1:Pt,Ct=_.watch,It=_.insertTemp,Wt=_.mode,nt=Wt===void 0?"markdown":Wt,en=_.id,tn=en===void 0?"markdown-editor-id":en,nn=_.showResizeBar,Un=nn===void 0?!1:nn,qn=_.noStorage,Yt=qn===void 0?!1:qn,vt=_.showNullButton,je=vt===void 0?!1:vt,Gt=_.hidetoolBar,kt=Gt===void 0?!1:Gt,on=_.fullScreen,Lt=on===void 0?!1:on,cn=_.onBlur,bt=_.onCMBeforeChange,$n=_.onFullScreen,Pe=_.className,Mt=Pe===void 0?"":Pe,ci=_.disablePaste,Ri=ci===void 0?!1:ci,di=_.placeholder,Ti=di===void 0?"":di,c=_.values,o=c===void 0?"":c,a=Object(R.useState)(null),u=Object(O.a)(a,2),d=u[0],h=u[1],T=Object(R.useState)(Ye),ke=Object(O.a)(T,2),He=ke[0],dt=ke[1],Te=Object(R.useState)(Ct),St=Object(O.a)(Te,2),_t=St[0],qt=St[1],Hn=Object(R.useState)(Lt),Gn=Object(O.a)(Hn,2),gn=Gn[0],Xn=Gn[1],Hi=Object(R.useState)(""),Dn=Object(O.a)(Hi,2),Vn=Dn[0],jn=Dn[1],vi=Object(R.useState)(0),ei=Object(O.a)(vi,2),pi=ei[0],ai=ei[1],cr=Object(R.useState)(ct),Gi=Object(O.a)(cr,2),ti=Gi[0],Qn=Gi[1],Di=Object(R.useState)(!1),Li=Object(O.a)(Di,2),dr=Li[0],sn=Li[1],zt=Object(R.useRef)(Object(xe.a)()),wn=Object(R.useRef)(!1),Ft=Object(R.useRef)(),dn=Object(R.useRef)(),Qt=Object(R.useRef)(),si=Object(R.useRef)(),un=Object(R.useRef)(),Ln=function(){var mt=Object(fe.a)(he.a.mark(function Tt(){var Et,Bt;return he.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return Xt.next=2,Object(Ge.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:zt.current}});case 2:Bt=Xt.sent,Bt!=null&&(Et=Bt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",d,dn),Bt.attachments.map(function(jt){jt.content_type.indexOf("image")>-1?d.replaceSelection("![,](/api/attachments/".concat(jt.id,"?type=").concat(jt.content_type,")")):jt.content_type.indexOf("video")>-1?d.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):jt.content_type.indexOf("pdf")>-1?d.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(jt.id,"?type=").concat(jt.content_type,'&disposition=inline" target="_blank">').concat(jt.name,"</a>")):d.replaceSelection("[".concat(jt.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(jt.id,"?type=").concat(jt.content_type,")"))}));case 4:case"end":return Xt.stop()}},Tt)}));return function(){return mt.apply(this,arguments)}}();Object(R.useEffect)(function(){dt(o),d==null||d.setValue(o)},[o]),Object(R.useEffect)(function(){$n==null||$n(gn)},[gn]),Object(R.useEffect)(function(){if(dn.current){var mt=X.a.fromTextArea(dn.current,{mode:nt,lineNumbers:!Ot,lineWrapping:!0,value:Ye,autoCloseTags:!0,autoCloseBrackets:!0});Rt&&mt.focus();function Tt(Et,Bt){if(Ri){Bt.preventDefault();return}var Ht=Bt.clipboardData;if(Ht){var Xt=Ht.types.toString(),jt=Ht.items;if(Xt==="Files"||Ht.types.indexOf("Files")>-1){if(Bt.preventDefault(),nt=="stex")return;try{var pn,On=jt[1];((pn=jt[0])===null||pn===void 0?void 0:pn.kind)==="file"&&(On=jt[0]);var Ut=On.getAsFile(),bi=Ut.name.split(".").pop();Xe(Ut,function(Vt){if(Vt.id){var yn,Yn,Zn;(Ut==null||((yn=Ut.type)===null||yn===void 0)?void 0:yn.indexOf("image"))>-1?mt.replaceSelection("![,](/api/attachments/".concat(Vt.id,"?type=").concat(Vt.content_type,")")):(Ut==null||((Yn=Ut.type)===null||Yn===void 0)?void 0:Yn.indexOf("video"))>-1?mt.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Vt.id,'"></video>')):(Ut==null||((Zn=Ut.type)===null||Zn===void 0)?void 0:Zn.indexOf("pdf"))>-1?mt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Vt.id,"?type=").concat(Ut.type,'&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):b.includes(bi)?mt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Vt.id,'?type=office&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):mt.replaceSelection("[".concat(Ut.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(Vt.id,"?type=").concat(Vt.content_type,")"))}else(Vt==null?void 0:Vt.status)===401&&(document.location.href="/user/login")})}catch(Vt){me.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return mt.on("paste",Tt),mt.on("dragleave",function(Et,Bt){Qt.current.classList.remove("mouse-hover-md")}),mt.on("dragover",function(Et,Bt){Qt.current.classList.add("mouse-hover-md")}),mt.on("drop",function(Et,Bt){Qt.current.classList.add("mouse-hover-md");var Ht;if(Ht=Bt.dataTransfer.files,Ht.length>0){Bt.preventDefault(),Bt.stopPropagation();for(var Xt=function(On){var Ut=Ht[On],bi=Ut.name.split(".").pop();Xe(Ut,function(Vt){if(Vt.id){var yn,Yn,Zn;(Ut==null||((yn=Ut.type)===null||yn===void 0)?void 0:yn.indexOf("image"))>-1?mt.replaceSelection("![,](/api/attachments/".concat(Vt.id,"?type=").concat(Vt.content_type,")")):(Ut==null||((Yn=Ut.type)===null||Yn===void 0)?void 0:Yn.indexOf("video"))>-1?mt.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Vt.id,'"></video>')):(Ut==null||((Zn=Ut.type)===null||Zn===void 0)?void 0:Zn.indexOf("pdf"))>-1?mt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Vt.id,"?type=").concat(Ut.type,'&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):b.includes(bi)?mt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Vt.id,'?type=office&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):mt.replaceSelection("[".concat(Ut.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(Vt.id,"?type=").concat(Vt.content_type,")"))}else(Vt==null?void 0:Vt.status)===401&&(document.location.href="/user/login")})},jt=0;jt<Ht.length;jt++)Xt(jt)}}),h(mt),function(){mt.off("paste",Tt)}}},[]);var Vi=Object(R.useCallback)(function(){if(Qt.current)try{}catch(mt){console.log(mt,"---- to set md editor body height")}},[ti,Qt,gn]);Object(R.useEffect)(function(){function mt(){var Et=new j.default(function(Bt){var Ht=Object(re.a)(Bt),Xt;try{for(Ht.s();!(Xt=Ht.n()).done;){var jt=Xt.value;(jt.target.offsetHeight>0||jt.target.offsetWidth>0)&&(Vi(),d.setSize("100%","100%"),d.refresh())}}catch(pn){Ht.e(pn)}finally{Ht.f()}});return Et.observe(dn.current.parentElement),Et}if(d){var Tt=mt();return function(){Tt.unobserve(dn.current.parentElement)}}},[d,Vi]),Object(R.useEffect)(function(){if(d){for(var mt=[],Tt=function(){var jt=Bt[Et];Ht=Object(O.a)(jt,2);var pn=Ht[0],On=Ht[1],Ut=Object(K.a)({},pn,function(){Qi(On)});mt.push(Ut),d.addKeyMap(Ut)},Et=0,Bt=Object.entries(x);Et<Bt.length;Et++){var Ht;Tt()}return Ft.current=setInterval(function(){wn.current&&Ln()},4e3),function(){clearInterval(Ft.current);var Xt=Object(re.a)(mt),jt;try{for(Xt.s();!(jt=Xt.n()).done;){var pn=jt.value;d.removeKeyMap(pn)}}catch(On){Xt.e(On)}finally{Xt.f()}}}},[d]),Object(R.useEffect)(function(){Lt!==gn&&Xn(Lt)},[Lt]),Object(ft.a)(function(){if(!Yt&&pi>0){var mt=new Date().getTime(),Tt=window.sessionStorage.getItem(tn);mt>=pi+de&&(!Tt||Tt!==He)&&(window.sessionStorage.setItem(tn,He),sn(!0))}},de),Object(R.useEffect)(function(){qt(Ct)},[d,Ct]),Object(R.useEffect)(function(){d&&(Rt&&d.focus())},[d,Rt]),Object(R.useEffect)(function(){if(_t&&d){var mt=d.getScrollerElement();function Tt(Et){var Bt=Et.target;if(un.current){var Ht=Bt.scrollTop/Bt.scrollHeight;un.current.scrollTop=un.current.scrollHeight*Ht}}return mt.addEventListener("scroll",Tt),function(){mt.removeEventListener("scroll",Tt)}}},[d,_t]),Object(R.useEffect)(function(){if(d&&bt){function mt(Tt,Et){bt(Tt,Et)}return d.on("beforeChange",mt),function(){d.off("beforeChange",mt)}}},[d,bt]),Object(R.useEffect)(function(){if(d&&cn){function mt(){cn(d.getValue())}return d.on("blur",mt),function(){d.off("blur",mt)}}},[d,cn]),Object(R.useEffect)(function(){if(d){function mt(Tt){var Et=Tt.getValue();dt(Et),ai(new Date().getTime()),Tt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ht&&ht(Et)}return d.on("change",mt),function(){d.off("change",mt)}}},[d,ht]),Object(R.useEffect)(function(){d&&(Ye==null?(d.setValue(""),dt("")):Ye!==d.getValue()&&(d.setValue(Ye),dt(Ye),d.setCursor(d.lineCount(),0)))},[d,Ye]);var Qi=Object(R.useCallback)(function(mt){var Tt=d.getCursor(),Et=d.getSelection(),Bt=Et.split(`
`);switch(mt){case"bold":return d.replaceSelection("**"+Et+"**"),Et===""&&d.setCursor(Tt.line,Tt.ch+2),d.focus();case"italic":return d.replaceSelection("*"+Et+"*"),Et===""&&d.setCursor(Tt.line,Tt.ch+1),d.focus();case"code":return d.replaceSelection("`"+Et+"`"),Et===""&&d.setCursor(Tt.line,Tt.ch+1),d.focus();case"inline-latex":return d.replaceSelection("`$$"+Et+"$$`"),Et===""&&d.setCursor(Tt.line,Tt.ch+3),d.focus();case"latex":return d.replaceSelection("```latex\n"+Et+"\n```"),d.setCursor(Tt.line+1,Et.length+1),d.focus();case"line-break":return d.replaceSelection(`<br/>
`),d.focus();case"list-ul":return Et===""?d.replaceSelection("- "+Et):d.replaceSelection(Bt.map(function(Ht){return Ht===""?"":"- ".concat(Ht)}).join(`
`)),d.focus();case"list-ol":return Et===""?d.replaceSelection("1. "+Et):d.replaceSelection(Bt.map(function(Ht,Xt){return Ht===""?"":"".concat(Xt+1,". ").concat(Ht)}).join(`
`)),d.focus();case"add-null-ch":return Et===""&&d.setCursor(Tt.line,Tt.ch+1),d.replaceSelection(Ne),d.focus();case"inster-template-1":return Et===""&&d.setCursor(Tt.line,Tt.ch),d.replaceSelection(B),d.focus();case"eraser":return d.setValue(""),d.focus();case"trigger-watch":return qt(!_t),d.focus();case"trigger-full-screen":return Xn(!gn),d.focus();case Fe:jn(Fe);return;case at:jn(at);return;case ut:jn(ut);return;case Ve:jn(Ve);return;default:throw new Error}},[d,_t,gn]),yi=Object(R.useCallback)(function(mt){jn("");switch(Vn){case Fe:var Tt=mt.title,Et=mt.link;return d.replaceSelection("[".concat(Tt,"](").concat(Et,")")),d.focus();case at:var Bt=mt.language,Ht=mt.content;return d.replaceSelection(["```"+Bt,Ht,"```"].join(`
`)),d.focus();case ut:var Xt=mt.src,jt=mt.alt,pn=mt.name;return Xt.indexOf("type=image")>-1?d.replaceSelection("![ ".concat(jt||""," ]( ").concat(Xt,' "').concat(jt||"",'" )')):Xt.indexOf("type=application/pdf")>-1?d.replaceSelection('<a href="'.concat(Xt,'&disposition=inline" target="_blank">').concat(pn,"</a>")):d.replaceSelection('<a href="'.concat(Xt,'" target="_blank">').concat(pn,"</a>")),d.focus();case Ve:for(var On=mt.row,Ut=mt.col,bi=mt.align,Vt=`
`,yn=0;yn<On;yn++){for(var Yn=[],Zn=[],Wr=0;Wr<Ut;Wr++)yn===1&&Zn.push(yt[bi]),Yn.push(" ");yn===1&&(Vt+="| ".concat(Zn.join(" | "),` |
`)),Vt+="| ".concat(Yn.join(Ut===1?"":" | "),` |
`)}return d.replaceSelection(Vt+`
`),d.focus();default:throw new Error}},[d,Vn]),jr=Object(R.useMemo)(function(){switch(Vn){case Fe:return L.a.createElement(we,{callback:yi,onCancel:Fn});case at:return L.a.createElement(Ze.b,{callback:yi,onCancel:Fn});case ut:return L.a.createElement(I,{callback:yi,onCancel:Fn});case Ve:return L.a.createElement(tt,{callback:yi,onCancel:Fn});default:return null}},[Vn]);function Fn(){jn("")}Object(R.useEffect)(function(){if(si.current){var mt=si.current,Tt=!1,Et=0;function Bt(jt){Tt=!0,Et=jt.pageY}function Ht(){Tt=!1}function Xt(jt){if(Tt){var pn=jt.pageY-Et;pn<0&&(pn=0),pn>300&&(pn=300);var On=ct+pn+"px";Qn(On)}}return mt.addEventListener("mousedown",Bt),document.addEventListener("mousemove",Xt),document.addEventListener("mouseup",Ht),function(){mt.removeEventListener("mousedown",Bt),document.removeEventListener("mousemove",Xt),document.removeEventListener("mouseup",Ht)}}},[d,si]),Object(R.useEffect)(function(){Qn(ct)},[ct]);var pr=D(Dt),ni=D(ti),Ji={width:pr,height:ni},Fr=Object(R.useMemo)(function(){if(pi){var mt=new Date(pi),Tt=mt.getHours(),Et=mt.getMinutes(),Bt=mt.getSeconds();return Tt=Tt<10?"0"+Tt:Tt,Et=Et<10?"0"+Et:Et,Bt=Bt<10?"0"+Bt:Bt,"".concat(Tt,":").concat(Et,":").concat(Bt)}return 0},[pi]);function Oi(){window.sessionStorage.removeItem(tn),sn(!1),ai(0)}function Yo(){sn(!1),ai(0),d.setValue(window.sessionStorage.getItem(tn))}function ho(mt,Tt){var Et=d.getValue();Et=Et.replace(mt,Tt),dt(Et),d==null||d.setValue(Et)}return L.a.createElement(R.Fragment,null,L.a.createElement("div",{className:"markdown-editor-wrapper",ref:Qt},L.a.createElement("div",{className:"markdown-editor-container ".concat(Mt," ").concat(_t?"on-preview":""," ").concat(Ot?"mini":""," ").concat(gn?"full-screen":""),style:Ji},L.a.createElement(S,{insertTemp:It,watch:_t,fullScreen:gn,showNullButton:je,onActionCallback:Qi,hidetoolBar:kt,uuid:zt.current,setOpenPhones:function(){wn.current=!0}}),L.a.createElement("div",{className:"markdown-editor-body"},L.a.createElement("div",{className:"codemirror-container"},L.a.createElement("textarea",{ref:dn,placeholder:Ti})),_t?L.a.createElement("div",{ref:un,className:"preview-container"},nt==="stex"&&L.a.createElement(_e,{value:He}),nt!=="stex"&&L.a.createElement(ne.a,{edit:!0,value:He,replaces:ho})):null))),Un?L.a.createElement("a",{ref:si,className:"editor-resize"}):null,L.a.createElement(ee.a,null,w[Vn]?L.a.createElement(Oe.a,{centered:!0,title:w[Vn],visible:!0,onCancel:Fn,footer:null},jr):null))}},RMFE:function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA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PQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},SJMd:function(Ee,ue){/**
* @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 m,F,Oe,re=!1,ge,me;window.PR_SHOULD_USE_CONTINUATION=!0;var fe,O;(function(){var K=window,H=["break,continue,do,else,for,if,return,while"],he=[H,"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"],R=[he,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],L=[R,"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"],oe=[R,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],X=[R,"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"],j="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",z=[R,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],P="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",te=[H,"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"],Q=[H,"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"],Se=[H,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],ze=[L,X,oe,z,P,te,Q,Se],ae=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,ne="str",_e="kwd",ie="com",se="typ",$="lit",k="pun",C="pln",J="tag",U="dec",S="src",ee="atn",le="atv",q="nocode",Me="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function E(pe){for(var Be=0,Re=!1,tt=!1,Ge=0,xe=pe.length;Ge<xe;++Ge){var Fe=pe[Ge];if(Fe.ignoreCase)tt=!0;else if(/[a-z]/i.test(Fe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Re=!0,tt=!1;break}}var ut={b:8,t:9,n:10,v:11,f:12,r:13};function at(st){var ce=st.charCodeAt(0);if(ce!==92)return ce;var gt=st.charAt(1);return ce=ut[gt],ce||("0"<=gt&&gt<="7"?parseInt(st.substring(1),8):gt==="u"||gt==="x"?parseInt(st.substring(2),16):st.charCodeAt(1))}function Ve(st){if(st<32)return(st<16?"\\x0":"\\x")+st.toString(16);var ce=String.fromCharCode(st);return ce==="\\"||ce==="-"||ce==="]"||ce==="^"?"\\"+ce:ce}function Qe(st){var ce=st.substring(1,st.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=[],ot=ce[0]==="^",de=["["];ot&&de.push("^");for(var Ne=ot?1:0,B=ce.length;Ne<B;++Ne){var D=ce[Ne];if(/\\[bdsw]/i.test(D))de.push(D);else{var N=at(D),y;Ne+2<B&&ce[Ne+1]==="-"?(y=at(ce[Ne+2]),Ne+=2):y=N,gt.push([N,y]),y<65||N>122||(y<65||N>90||gt.push([Math.max(65,N)|32,Math.min(y,90)|32]),y<97||N>122||gt.push([Math.max(97,N)&~32,Math.min(y,122)&~32]))}}gt.sort(function(Y,_){return Y[0]-_[0]||_[1]-Y[1]});for(var b=[],x=[],Ne=0;Ne<gt.length;++Ne){var w=gt[Ne];w[0]<=x[1]+1?x[1]=Math.max(x[1],w[1]):b.push(x=w)}for(var Ne=0;Ne<b.length;++Ne){var w=b[Ne];de.push(Ve(w[0])),w[1]>w[0]&&(w[1]+1>w[0]&&de.push("-"),de.push(Ve(w[1])))}return de.push("]"),de.join("")}function yt(st){for(var ce=st.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=ce.length,ot=[],de=0,Ne=0;de<gt;++de){var B=ce[de];if(B==="(")++Ne;else if(B.charAt(0)==="\\"){var D=+B.substring(1);D&&(D<=Ne?ot[D]=-1:ce[de]=Ve(D))}}for(var de=1;de<ot.length;++de)ot[de]===-1&&(ot[de]=++Be);for(var de=0,Ne=0;de<gt;++de){var B=ce[de];if(B==="(")++Ne,ot[Ne]||(ce[de]="(?:");else if(B.charAt(0)==="\\"){var D=+B.substring(1);D&&D<=Ne&&(ce[de]="\\"+ot[D])}}for(var de=0;de<gt;++de)ce[de]==="^"&&ce[de+1]!=="^"&&(ce[de]="");if(st.ignoreCase&&Re)for(var de=0;de<gt;++de){var B=ce[de],N=B.charAt(0);B.length>=2&&N==="["?ce[de]=Qe(B):N!=="\\"&&(ce[de]=B.replace(/[a-zA-Z]/g,function(x){var w=x.charCodeAt(0);return"["+String.fromCharCode(w&~32,w|32)+"]"}))}return ce.join("")}for(var ft=[],Ge=0,xe=pe.length;Ge<xe;++Ge){var Fe=pe[Ge];if(Fe.global||Fe.multiline)throw new Error(""+Fe);ft.push("(?:"+yt(Fe)+")")}return new RegExp(ft.join("|"),tt?"gi":"g")}function v(pe,Be){var Re=/(?:^|\s)nocode(?:\s|$)/,tt=[],Ge=0,xe=[],Fe=0;function ut(at){var Ve=at.nodeType;if(Ve==1){if(Re.test(at.className))return;for(var Qe=at.firstChild;Qe;Qe=Qe.nextSibling)ut(Qe);var yt=at.nodeName.toLowerCase();(yt==="br"||yt==="li")&&(tt[Fe]=`
`,xe[Fe<<1]=Ge++,xe[Fe++<<1|1]=at)}else if(Ve==3||Ve==4){var ft=at.nodeValue;ft.length&&(Be?ft=ft.replace(/\r\n?/g,`
`):ft=ft.replace(/[ \t\r\n]+/g," "),tt[Fe]=ft,xe[Fe<<1]=Ge,Ge+=ft.length,xe[Fe++<<1|1]=at)}}return ut(pe),{sourceCode:tt.join("").replace(/\n$/,""),spans:xe}}function W(pe,Be,Re,tt,Ge){if(!Re)return;var xe={sourceNode:pe,pre:1,langExtension:null,numberLines:null,sourceCode:Re,spans:null,basePos:Be,decorations:null};tt(xe),Ge.push.apply(Ge,xe.decorations)}var Ce=/\S/;function we(pe){for(var Be=void 0,Re=pe.firstChild;Re;Re=Re.nextSibling){var tt=Re.nodeType;Be=tt===1?Be?pe:Re:tt===3&&Ce.test(Re.nodeValue)?pe:Be}return Be===pe?void 0:Be}function Ze(pe,Be){var Re={},tt;(function(){for(var Fe=pe.concat(Be),ut=[],at={},Ve=0,Qe=Fe.length;Ve<Qe;++Ve){var yt=Fe[Ve],ft=yt[3];if(ft)for(var st=ft.length;--st>=0;)Re[ft.charAt(st)]=yt;var ce=yt[1],gt=""+ce;at.hasOwnProperty(gt)||(ut.push(ce),at[gt]=null)}ut.push(/[\0-\uffff]/),tt=E(ut)})();var Ge=Be.length,xe=function(Fe){for(var ut=Fe.sourceCode,at=Fe.basePos,Ve=Fe.sourceNode,Qe=[at,C],yt=0,ft=ut.match(tt)||[],st={},ce=0,gt=ft.length;ce<gt;++ce){var ot=ft[ce],de=st[ot],Ne=void 0,B;if(typeof de=="string")B=!1;else{var D=Re[ot.charAt(0)];if(D)Ne=ot.match(D[1]),de=D[0];else{for(var N=0;N<Ge;++N)if(D=Be[N],Ne=ot.match(D[1]),Ne){de=D[0];break}Ne||(de=C)}B=de.length>=5&&de.substring(0,5)==="lang-",B&&!(Ne&&typeof Ne[1]=="string")&&(B=!1,de=S),B||(st[ot]=de)}var y=yt;if(yt+=ot.length,!B)Qe.push(at+y,de);else{var b=Ne[1],x=ot.indexOf(b),w=x+b.length;Ne[2]&&(w=ot.length-Ne[2].length,x=w-b.length);var Y=de.substring(5);W(Ve,at+y,ot.substring(0,x),xe,Qe),W(Ve,at+y+x,b,I(Y,b),Qe),W(Ve,at+y+w,ot.substring(w),xe,Qe)}}Fe.decorations=Qe};return xe}function rt(pe){var Be=[],Re=[];pe.tripleQuotedStrings?Be.push([ne,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):pe.multiLineStrings?Be.push([ne,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Be.push([ne,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),pe.verbatimStrings&&Re.push([ne,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var tt=pe.hashComments;tt&&(pe.cStyleComments?(tt>1?Be.push([ie,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Be.push([ie,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Re.push([ne,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Be.push([ie,/^#[^\r\n]*/,null,"#"])),pe.cStyleComments&&(Re.push([ie,/^\/\/[^\r\n]*/,null]),Re.push([ie,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ge=pe.regexLiterals;if(Ge){var xe=Ge>1?"":`
\r`,Fe=xe?".":"[\\S\\s]",ut="/(?=[^/*"+xe+"])(?:[^/\\x5B\\x5C"+xe+"]|\\x5C"+Fe+"|\\x5B(?:[^\\x5C\\x5D"+xe+"]|\\x5C"+Fe+")*(?:\\x5D|$))+/";Re.push(["lang-regex",RegExp("^"+Me+"("+ut+")")])}var at=pe.types;at&&Re.push([se,at]);var Ve=(""+pe.keywords).replace(/^ | $/g,"");Ve.length&&Re.push([_e,new RegExp("^(?:"+Ve.replace(/[\s,]+/g,"|")+")\\b"),null]),Be.push([C,/^\s+/,null,` \r
\xA0`]);var Qe="^.[^\\s\\w.$@'\"`/\\\\]*";return pe.regexLiterals&&(Qe+="(?!s*/)"),Re.push([$,/^@[a-z_$][a-z_$@0-9]*/i,null],[se,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[C,/^[a-z_$][a-z_$@0-9]*/i,null],[$,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[C,/^\\[\s\S]?/,null],[k,new RegExp(Qe),null]),Ze(Be,Re)}var Ie=rt({keywords:ze,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ye(pe,Be,Re){for(var tt=/(?:^|\s)nocode(?:\s|$)/,Ge=/\r\n?|\n/,xe=pe.ownerDocument,Fe=xe.createElement("li");pe.firstChild;)Fe.appendChild(pe.firstChild);var ut=[Fe];function at(ce){var gt=ce.nodeType;if(gt==1&&!tt.test(ce.className))if(ce.nodeName==="br")Ve(ce),ce.parentNode&&ce.parentNode.removeChild(ce);else for(var ot=ce.firstChild;ot;ot=ot.nextSibling)at(ot);else if((gt==3||gt==4)&&Re){var de=ce.nodeValue,Ne=de.match(Ge);if(Ne){var B=de.substring(0,Ne.index);ce.nodeValue=B;var D=de.substring(Ne.index+Ne[0].length);if(D){var N=ce.parentNode;N.insertBefore(xe.createTextNode(D),ce.nextSibling)}Ve(ce),B||ce.parentNode.removeChild(ce)}}}function Ve(ce){for(;!ce.nextSibling;)if(ce=ce.parentNode,!ce)return;function gt(Ne,B){var D=B?Ne.cloneNode(!1):Ne,N=Ne.parentNode;if(N){var y=gt(N,1),b=Ne.nextSibling;y.appendChild(D);for(var x=b;x;x=b)b=x.nextSibling,y.appendChild(x)}return D}for(var ot=gt(ce.nextSibling,0),de;(de=ot.parentNode)&&de.nodeType===1;)ot=de;ut.push(ot)}for(var Qe=0;Qe<ut.length;++Qe)at(ut[Qe]);Be===(Be|0)&&ut[0].setAttribute("value",Be);var yt=xe.createElement("ol");yt.className="linenums";for(var ft=Math.max(0,Be-1|0)||0,Qe=0,st=ut.length;Qe<st;++Qe)Fe=ut[Qe],Fe.className="L"+(Qe+ft)%10,Fe.firstChild||Fe.appendChild(xe.createTextNode("\xA0")),yt.appendChild(Fe);pe.appendChild(yt)}function Ae(pe){var Be=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Be=Be&&+Be[1]<=8;var Re=/\n/g,tt=pe.sourceCode,Ge=tt.length,xe=0,Fe=pe.spans,ut=Fe.length,at=0,Ve=pe.decorations,Qe=Ve.length,yt=0;Ve[Qe]=Ge;var ft,st;for(st=ft=0;st<Qe;)Ve[st]!==Ve[st+2]?(Ve[ft++]=Ve[st++],Ve[ft++]=Ve[st++]):st+=2;for(Qe=ft,st=ft=0;st<Qe;){for(var ce=Ve[st],gt=Ve[st+1],ot=st+2;ot+2<=Qe&&Ve[ot+1]===gt;)ot+=2;Ve[ft++]=ce,Ve[ft++]=gt,st=ot}Qe=Ve.length=ft;var de=pe.sourceNode,Ne="";de&&(Ne=de.style.display,de.style.display="none");try{for(var B=null;at<ut;){var D=Fe[at],N=Fe[at+2]||Ge,y=Ve[yt+2]||Ge,ot=Math.min(N,y),b=Fe[at+1],x;if(b.nodeType!==1&&(x=tt.substring(xe,ot))){Be&&(x=x.replace(Re,"\r")),b.nodeValue=x;var w=b.ownerDocument,Y=w.createElement("span");Y.className=Ve[yt+1];var _=b.parentNode;_.replaceChild(Y,b),Y.appendChild(b),xe<N&&(Fe[at+1]=b=w.createTextNode(tt.substring(ot,N)),_.insertBefore(b,Y.nextSibling))}xe=ot,xe>=N&&(at+=2),xe>=y&&(yt+=2)}}finally{de&&(de.style.display=Ne)}}var De={};function V(pe,Be){for(var Re=Be.length;--Re>=0;){var tt=Be[Re];De.hasOwnProperty(tt)?K.console&&console.warn("cannot override language handler %s",tt):De[tt]=pe}}function I(pe,Be){return pe&&De.hasOwnProperty(pe)||(pe=/^\s*</.test(Be)?"default-markup":"default-code"),De[pe]}V(Ie,["default-code"]),V(Ze([],[[C,/^[^<?]+/],[U,/^<!\w[^>]*(?:>|$)/],[ie,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[k,/^(?:<[%?]|[%?]>)/],["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"]),V(Ze([[C,/^[\s]+/,null,` \r
`],[le,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[J,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[ee,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[k,/^[=<>\/]+/],["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"]),V(Ze([],[[le,/^[\s\S]+/]]),["uq.val"]),V(rt({keywords:L,hashComments:!0,cStyleComments:!0,types:ae}),["c","cc","cpp","cxx","cyc","m"]),V(rt({keywords:"null,true,false"}),["json"]),V(rt({keywords:X,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:ae}),["cs"]),V(rt({keywords:oe,cStyleComments:!0}),["java"]),V(rt({keywords:Se,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),V(rt({keywords:te,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),V(rt({keywords:P,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),V(rt({keywords:Q,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),V(rt({keywords:z,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),V(rt({keywords:j,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),V(Ze([],[[ne,/^[\s\S]+/]]),["regex"]);function Ue(pe){var Be=pe.langExtension;try{var Re=v(pe.sourceNode,pe.pre),tt=Re.sourceCode;pe.sourceCode=tt,pe.spans=Re.spans,pe.basePos=0,I(Be,tt)(pe),Ae(pe)}catch(Ge){K.console&&console.log(Ge&&Ge.stack||Ge)}}function Xe(pe,Be,Re){var tt=Re||!1,Ge=Be||null,xe=document.createElement("div");xe.innerHTML="<pre>"+pe+"</pre>",xe=xe.firstChild,tt&&ye(xe,tt,!0);var Fe={langExtension:Ge,numberLines:tt,sourceNode:xe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ue(Fe),xe.innerHTML}function et(pe,Be){var Re=Be||document.body,tt=Re.ownerDocument||document;function Ge(D){return Re.getElementsByTagName(D)}for(var xe=[Ge("pre"),Ge("code"),Ge("xmp")],Fe=[],ut=0;ut<xe.length;++ut)for(var at=0,Ve=xe[ut].length;at<Ve;++at)Fe.push(xe[ut][at]);xe=null;var Qe=Date;Qe.now||(Qe={now:function(){return+new Date}});var yt=0,ft=/\blang(?:uage)?-([\w.]+)(?!\S)/,st=/\bprettyprint\b/,ce=/\bprettyprinted\b/,gt=/pre|xmp/i,ot=/^code$/i,de=/^(?:pre|code|xmp)$/i,Ne={};function B(){for(var D=K.PR_SHOULD_USE_CONTINUATION?Qe.now()+250:Infinity;yt<Fe.length&&Qe.now()<D;yt++){for(var N=Fe[yt],y=Ne,b=N;b=b.previousSibling;){var x=b.nodeType,w=(x===7||x===8)&&b.nodeValue;if(w?!/^\??prettify\b/.test(w):x!==3||/\S/.test(b.nodeValue))break;if(w){y={},w.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Rt,Ct,It){y[Ct]=It});break}}var Y=N.className;if((y!==Ne||st.test(Y))&&!ce.test(Y)){for(var _=!1,be=N.parentNode;be;be=be.parentNode){var Ye=be.tagName;if(de.test(Ye)&&be.className&&st.test(be.className)){_=!0;break}}if(!_){N.className+=" prettyprinted";var ht=y.lang;if(!ht){ht=Y.match(ft);var it;!ht&&(it=we(N))&&ot.test(it.tagName)&&(ht=it.className.match(ft)),ht&&(ht=ht[1])}var Dt;if(gt.test(N.tagName))Dt=1;else{var At=N.currentStyle,ct=tt.defaultView,Kt=At?At.whiteSpace:ct&&ct.getComputedStyle?ct.getComputedStyle(N,null).getPropertyValue("white-space"):0;Dt=Kt&&Kt.substring(0,3)==="pre"}var Ot=y.linenums;(Ot=Ot==="true"||+Ot)||(Ot=Y.match(/\blinenums\b(?::(\d+))?/),Ot=Ot?Ot[1]&&Ot[1].length?+Ot[1]:!0:!1),Ot&&ye(N,Ot,Dt);var Pt={langExtension:ht,sourceNode:N,numberLines:Ot,pre:Dt,sourceCode:null,basePos:null,spans:null,decorations:null};Ue(Pt)}}}yt<Fe.length?K.setTimeout(B,250):typeof pe=="function"&&pe()}B()}var qe=K.PR={createSimpleLexer:Ze,registerLangHandler:V,sourceDecorator:rt,PR_ATTRIB_NAME:ee,PR_ATTRIB_VALUE:le,PR_COMMENT:ie,PR_DECLARATION:U,PR_KEYWORD:_e,PR_LITERAL:$,PR_NOCODE:q,PR_PLAIN:C,PR_PUNCTUATION:k,PR_SOURCE:S,PR_STRING:ne,PR_TAG:J,PR_TYPE:se,prettyPrintOne:re?K.prettyPrintOne=Xe:fe=Xe,prettyPrint:O=re?K.prettyPrint=et:O=et},$e=K.define;typeof $e=="function"&&$e.amd&&$e("google-code-prettify",[],function(){return qe})})()},SMhR:function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiB/s7a5AWTTNhsgN9pmA2TTNp8MyI22uQHkv7TNDSCbttkAudE2bwJyo22eBGTTNhsgf7O2ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTD9c2nwzIk9pmA2TTNjeAPAnIpm1uANm0zQbIDSBPAXIDyKZtPhmQG22zAfLN2uaTAflUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT74ckCe1zZOAbNpm0zYbIDfaZgPkRts8qW1utM0GyKZtntI2GyBPArJpmw2QTds8CcimbW4A+WRAntQ23+pEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0viJXtU2T2qbDZA3Adm0zZOAbNpm0zYbIJu2+VZtswGyaZsbbbMBsmmbDZBN29xoG32mE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJ3oVkCe1zZPaZgNk0zYbIJu2eRKQJwF5S9vcAPIkIJu2uQFk0zY32kbf6USSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnS+MmXa5t/WdtsgGza5psB+WRt8xQgN4Dc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m){Ee.exports=m.p+"static/lockclose.365036e8.svg"},"VrN/":function(Ee,ue,m){(function(F,Oe){Ee.exports=Oe()})(this,function(){"use strict";var F=navigator.userAgent,Oe=navigator.platform,re=/gecko\/\d/i.test(F),ge=/MSIE \d/.test(F),me=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(F),fe=/Edge\/(\d+)/.exec(F),O=ge||me||fe,K=O&&(ge?document.documentMode||6:+(fe||me)[1]),H=!fe&&/WebKit\//.test(F),he=H&&/Qt\/\d+\.\d+/.test(F),R=!fe&&/Chrome\//.test(F),L=/Opera\//.test(F),oe=/Apple Computer/.test(navigator.vendor),X=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(F),j=/PhantomJS/.test(F),z=!fe&&/AppleWebKit/.test(F)&&/Mobile\/\w+/.test(F),P=/Android/.test(F),te=z||P||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(F),Q=z||/Mac/.test(Oe),Se=/\bCrOS\b/.test(F),ze=/win/i.test(Oe),ae=L&&F.match(/Version\/(\d*\.\d*)/);ae&&(ae=Number(ae[1])),ae&&ae>=15&&(L=!1,H=!0);var ne=Q&&(he||L&&(ae==null||ae<12.11)),_e=re||O&&K>=9;function ie(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var se=function(e,t){var i=e.className,n=ie(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 $(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function k(e,t){return $(e).appendChild(t)}function C(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 J(e,t,i,n){var r=C(e,t,i,n);return r.setAttribute("role","presentation"),r}var U;document.createRange?U=function(e,t,i,n){var r=document.createRange();return r.setEnd(n||e,i),r.setStart(e,t),r}:U=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 S(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ee(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function le(e,t){var i=e.className;ie(t).test(i)||(e.className+=(i?" ":"")+t)}function q(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!ie(i[n]).test(t)&&(t+=" "+i[n]);return t}var Me=function(e){e.select()};z?Me=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:O&&(Me=function(e){try{e.select()}catch(t){}});function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function v(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 W(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 p=e.indexOf(" ",s);if(p<0||p>=t)return l+(t-s);l+=p-s,l+=i-l%i,s=p+1}}var Ce=function(){this.id=null,this.f=null,this.time=0,this.handler=E(this.onTimeout,this)};Ce.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ce.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 we(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var Ze=50,rt={toString:function(){return"CodeMirror.Pass"}},Ie={scroll:!1},ye={origin:"*mouse"},Ae={origin:"+move"};function De(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 V=[""];function I(e){for(;V.length<=e;)V.push(Ue(V)+" ");return V[e]}function Ue(e){return e[e.length-1]}function Xe(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function et(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 $e(e,t){var i;return Object.create?i=Object.create(e):(qe.prototype=e,i=new qe),t&&v(t,i),i}var pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Be(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||pe.test(e))}function Re(e,t){return t?t.source.indexOf("\\w")>-1&&Be(e)?!0:t.test(e):Be(e)}function tt(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ge=/[\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 xe(e){return e.charCodeAt(0)>=768&&Ge.test(e)}function Fe(e,t,i){for(;(i<0?t>0:t<e.length)&&xe(e.charAt(t));)t+=i;return t}function ut(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 at(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 Ve=null;function Qe(e,t,i){var n;Ve=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:Ve=r),s.from==t&&(s.from!=s.to&&i!="before"?n=r:Ve=r)}return n!=null?n:Ve}var yt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,s=/[LRr]/,l=/[Lb1n]/,p=/[1n]/;function f(g,A,M){this.level=g,this.from=A,this.to=M}return function(g,A){var M=A=="ltr"?"L":"R";if(g.length==0||A=="ltr"&&!n.test(g))return!1;for(var Z=g.length,G=[],ve=0;ve<Z;++ve)G.push(i(g.charCodeAt(ve)));for(var Le=0,We=M;Le<Z;++Le){var Je=G[Le];Je=="m"?G[Le]=We:We=Je}for(var lt=0,Ke=M;lt<Z;++lt){var pt=G[lt];pt=="1"&&Ke=="r"?G[lt]="n":s.test(pt)&&(Ke=pt,pt=="r"&&(G[lt]="R"))}for(var wt=1,xt=G[0];wt<Z-1;++wt){var Nt=G[wt];Nt=="+"&&xt=="1"&&G[wt+1]=="1"?G[wt]="1":Nt==","&&xt==G[wt+1]&&(xt=="1"||xt=="n")&&(G[wt]=xt),xt=Nt}for(var $t=0;$t<Z;++$t){var xn=G[$t];if(xn==",")G[$t]="N";else if(xn=="%"){var an=void 0;for(an=$t+1;an<Z&&G[an]=="%";++an);for(var zn=$t&&G[$t-1]=="!"||an<Z&&G[an]=="1"?"1":"N",Pn=$t;Pn<an;++Pn)G[Pn]=zn;$t=an-1}}for(var fn=0,Bn=M;fn<Z;++fn){var Sn=G[fn];Bn=="L"&&Sn=="1"?G[fn]="L":s.test(Sn)&&(Bn=Sn)}for(var vn=0;vn<Z;++vn)if(r.test(G[vn])){var mn=void 0;for(mn=vn+1;mn<Z&&r.test(G[mn]);++mn);for(var ln=(vn?G[vn-1]:M)=="L",_n=(mn<Z?G[mn]:M)=="L",ur=ln==_n?ln?"L":"R":M,Mi=vn;Mi<mn;++Mi)G[Mi]=ur;vn=mn-1}for(var Mn=[],hi,En=0;En<Z;)if(l.test(G[En])){var Ko=En;for(++En;En<Z&&l.test(G[En]);++En);Mn.push(new f(0,Ko,En))}else{var gi=En,Wi=Mn.length,zi=A=="rtl"?1:0;for(++En;En<Z&&G[En]!="L";++En);for(var Tn=gi;Tn<En;)if(p.test(G[Tn])){gi<Tn&&(Mn.splice(Wi,0,new f(1,gi,Tn)),Wi+=zi);var hr=Tn;for(++Tn;Tn<En&&p.test(G[Tn]);++Tn);Mn.splice(Wi,0,new f(2,hr,Tn)),Wi+=zi,gi=Tn}else++Tn;gi<En&&Mn.splice(Wi,0,new f(1,gi,En))}return A=="ltr"&&(Mn[0].level==1&&(hi=g.match(/^\s+/))&&(Mn[0].from=hi[0].length,Mn.unshift(new f(0,0,hi[0].length))),Ue(Mn).level==1&&(hi=g.match(/\s+$/))&&(Ue(Mn).to-=hi[0].length,Mn.push(new f(0,Z-hi[0].length,Z)))),A=="rtl"?Mn.reverse():Mn}}();function ft(e,t){var i=e.order;return i==null&&(i=e.order=yt(e.text,t)),i}var st=[],ce=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]||st).concat(i)}};function gt(e,t){return e._handlers&&e._handlers[t]||st}function ot(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=we(r,i);s>-1&&(n[t]=r.slice(0,s).concat(r.slice(s+1)))}}}function de(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 Ne(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),de(e,i||t.type,e,t),x(t)||t.codemirrorIgnore}function B(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)we(i,t[n])==-1&&i.push(t[n])}function D(e,t){return gt(e,t).length>0}function N(e){e.prototype.on=function(t,i){ce(this,t,i)},e.prototype.off=function(t,i){ot(this,t,i)}}function y(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function b(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function x(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function w(e){y(e),b(e)}function Y(e){return e.target||e.srcElement}function _(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Q&&e.ctrlKey&&t==1&&(t=3),t}var be=function(){if(O&&K<9)return!1;var e=C("div");return"draggable"in e||"dragDrop"in e}(),Ye;function ht(e){if(Ye==null){var t=C("span","\u200B");k(e,C("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ye=t.offsetWidth<=1&&t.offsetHeight>2&&!(O&&K<8))}var i=Ye?C("span","\u200B"):C("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var it;function Dt(e){if(it!=null)return it;var t=k(e,document.createTextNode("A\u062EA")),i=U(t,0,1).getBoundingClientRect(),n=U(t,1,2).getBoundingClientRect();return $(e),!i||i.left==i.right?!1:it=n.right-i.right<3}var At=`
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/)},ct=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},Kt=function(){var e=C("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ot=null;function Pt(e){if(Ot!=null)return Ot;var t=k(e,C("span","x")),i=t.getBoundingClientRect(),n=U(t,0,1).getBoundingClientRect();return Ot=Math.abs(i.left-n.left)>1}var Rt={},Ct={};function It(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Rt[e]=t}function Wt(e,t){Ct[e]=t}function nt(e){if(typeof e=="string"&&Ct.hasOwnProperty(e))e=Ct[e];else if(e&&typeof e.name=="string"&&Ct.hasOwnProperty(e.name)){var t=Ct[e.name];typeof t=="string"&&(t={name:t}),e=$e(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return nt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return nt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function en(e,t){t=nt(t);var i=Rt[t.name];if(!i)return en(e,"text/plain");var n=i(e,t);if(tn.hasOwnProperty(t.name)){var r=tn[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 tn={};function nn(e,t){var i=tn.hasOwnProperty(e)?tn[e]:tn[e]={};v(t,i)}function Un(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 qn(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 Yt(e,t,i){return e.startState?e.startState(t,i):!0}var vt=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};vt.prototype.eol=function(){return this.pos>=this.string.length},vt.prototype.sol=function(){return this.pos==this.lineStart},vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},vt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},vt.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},vt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},vt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},vt.prototype.skipToEnd=function(){this.pos=this.string.length},vt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},vt.prototype.backUp=function(e){this.pos-=e},vt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},vt.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},vt.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)}},vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},vt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},vt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},vt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function je(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 Gt(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 kt(e,t,i){var n=[];return e.iter(t,i,function(r){n.push(r.text)}),n}function on(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=we(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 cn(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 p=e.lines[l],f=p.height;if(t<f)break;t-=f}return i+l}function bt(e,t){return t>=e.first&&t<e.first+e.size}function $n(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Pe(e,t,i){if(i===void 0&&(i=null),!(this instanceof Pe))return new Pe(e,t,i);this.line=e,this.ch=t,this.sticky=i}function Mt(e,t){return e.line-t.line||e.ch-t.ch}function ci(e,t){return e.sticky==t.sticky&&Mt(e,t)==0}function Ri(e){return Pe(e.line,e.ch)}function di(e,t){return Mt(e,t)<0?t:e}function Ti(e,t){return Mt(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 Pe(e.first,0);var i=e.first+e.size-1;return t.line>i?Pe(i,je(e,i).text.length):a(t,je(e,t.line).text.length)}function a(e,t){var i=e.ch;return i==null||i>t?Pe(e.line,t):i<0?Pe(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 d=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 d?new h(e,Un(e.mode,t.state),i,t.lookAhead):new h(e,Un(e.mode,t),i)},h.prototype.save=function(e){var t=e!==!1?Un(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new d(t,this.maxLookAhead):t};function T(e,t,i,n){var r=[e.state.modeGen],s={};Gn(e,t.text,e.doc.mode,i,function(g,A){return r.push(g,A)},s,n);for(var l=i.state,p=function(g){i.baseTokens=r;var A=e.state.overlays[g],M=1,Z=0;i.state=!0,Gn(e,t.text,A.mode,i,function(G,ve){for(var Le=M;Z<G;){var We=r[M];We>G&&r.splice(M,1,G,r[M+1],We),M+=2,Z=Math.min(G,We)}if(!ve)return;if(A.opaque)r.splice(Le,M-Le,G,"overlay "+ve),M=Le+2;else for(;Le<M;Le+=2){var Je=r[Le+1];r[Le+1]=(Je?Je+" ":"")+"overlay "+ve}},s),i.state=l,i.baseTokens=null,i.baseTokenPos=1},f=0;f<e.state.overlays.length;++f)p(f);return{styles:r,classes:s.bgClass||s.textClass?s:null}}function ke(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=He(e,Lt(t)),r=t.text.length>e.options.maxHighlightLength&&Un(e.doc.mode,n.state),s=T(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 He(e,t,i){var n=e.doc,r=e.display;if(!n.mode.startState)return new h(n,!0,t);var s=gn(e,t,i),l=s>n.first&&je(n,s-1).stateAfter,p=l?h.fromSaved(n,l,s):new h(n,Yt(n.mode),s);return n.iter(s,t,function(f){dt(e,f.text,p);var g=p.line;f.stateAfter=g==t-1||g%5==0||g>=r.viewFrom&&g<r.viewTo?p.save():null,p.nextLine()}),i&&(n.modeFrontier=p.line),p}function dt(e,t,i,n){var r=e.doc.mode,s=new vt(t,e.options.tabSize,i);for(s.start=s.pos=n||0,t==""&&Te(r,i.state);!s.eol();)St(r,s,i.state),s.start=s.pos}function Te(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var i=qn(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}function St(e,t,i,n){for(var r=0;r<10;r++){n&&(n[0]=qn(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 _t=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function qt(e,t,i,n){var r=e.doc,s=r.mode,l;t=o(r,t);var p=je(r,t.line),f=He(e,t.line,i),g=new vt(p.text,e.options.tabSize,f),A;for(n&&(A=[]);(n||g.pos<t.ch)&&!g.eol();)g.start=g.pos,l=St(s,g,f.state),n&&A.push(new _t(g,l,Un(r.mode,f.state)));return n?A:new _t(g,l,f.state)}function Hn(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 Gn(e,t,i,n,r,s,l){var p=i.flattenSpans;p==null&&(p=e.options.flattenSpans);var f=0,g=null,A=new vt(t,e.options.tabSize,n),M,Z=e.options.addModeClass&&[null];for(t==""&&Hn(Te(i,n.state),s);!A.eol();){if(A.pos>e.options.maxHighlightLength?(p=!1,l&&dt(e,t,n,A.pos),A.pos=t.length,M=null):M=Hn(St(i,A,n.state,Z),s),Z){var G=Z[0].name;G&&(M="m-"+(M?G+" "+M:G))}if(!p||g!=M){for(;f<A.start;)f=Math.min(A.start,f+5e3),r(f,g);g=M}A.start=A.pos}for(;f<A.pos;){var ve=Math.min(A.pos,f+5e3);r(ve,g),f=ve}}function gn(e,t,i){for(var n,r,s=e.doc,l=i?-1:t-(e.doc.mode.innerMode?1e3:100),p=t;p>l;--p){if(p<=s.first)return s.first;var f=je(s,p-1),g=f.stateAfter;if(g&&(!i||p+(g instanceof d?g.lookAhead:0)<=s.modeFrontier))return p;var A=W(f.text,null,e.options.tabSize);(r==null||n>A)&&(r=p-1,n=A)}return r}function Xn(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=je(e,n).stateAfter;if(r&&(!(r instanceof d)||n+r.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}var Hi=!1,Dn=!1;function Vn(){Hi=!0}function jn(){Dn=!0}function vi(e,t,i){this.marker=e,this.from=t,this.to=i}function ei(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function pi(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function ai(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function cr(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],l=s.marker,p=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);if(p||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 vi(l,s.from,f?null:s.to))}}return n}function Gi(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],l=s.marker,p=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);if(p||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 vi(l,f?null:s.from-t,s.to==null?null:s.to-t))}}return n}function ti(e,t){if(t.full)return null;var i=bt(e,t.from.line)&&je(e,t.from.line).markedSpans,n=bt(e,t.to.line)&&je(e,t.to.line).markedSpans;if(!i&&!n)return null;var r=t.from.ch,s=t.to.ch,l=Mt(t.from,t.to)==0,p=cr(i,r,l),f=Gi(n,s,l),g=t.text.length==1,A=Ue(t.text).length+(g?r:0);if(p)for(var M=0;M<p.length;++M){var Z=p[M];if(Z.to==null){var G=ei(f,Z.marker);G?g&&(Z.to=G.to==null?null:G.to+A):Z.to=r}}if(f)for(var ve=0;ve<f.length;++ve){var Le=f[ve];if(Le.to!=null&&(Le.to+=A),Le.from==null){var We=ei(p,Le.marker);We||(Le.from=A,g&&(p||(p=[])).push(Le))}else Le.from+=A,g&&(p||(p=[])).push(Le)}p&&(p=Qn(p)),f&&f!=p&&(f=Qn(f));var Je=[p];if(!g){var lt=t.text.length-2,Ke;if(lt>0&&p)for(var pt=0;pt<p.length;++pt)p[pt].to==null&&(Ke||(Ke=[])).push(new vi(p[pt].marker,null,null));for(var wt=0;wt<lt;++wt)Je.push(Ke);Je.push(f)}return Je}function Qn(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 Di(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(G){if(G.markedSpans)for(var ve=0;ve<G.markedSpans.length;++ve){var Le=G.markedSpans[ve].marker;Le.readOnly&&(!n||we(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],p=l.find(0),f=0;f<r.length;++f){var g=r[f];if(Mt(g.to,p.from)<0||Mt(g.from,p.to)>0)continue;var A=[f,1],M=Mt(g.from,p.from),Z=Mt(g.to,p.to);(M<0||!l.inclusiveLeft&&!M)&&A.push({from:g.from,to:p.from}),(Z>0||!l.inclusiveRight&&!Z)&&A.push({from:p.to,to:g.to}),r.splice.apply(r,A),f+=A.length-3}return r}function Li(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 dr(e,t){if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}function sn(e){return e.inclusiveLeft?-1:0}function zt(e){return e.inclusiveRight?1:0}function wn(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),r=t.find(),s=Mt(n.from,r.from)||sn(e)-sn(t);if(s)return-s;var l=Mt(n.to,r.to)||zt(e)-zt(t);return l||t.id-e.id}function Ft(e,t){var i=Dn&&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||wn(n,r.marker)<0)&&(n=r.marker);return n}function dn(e){return Ft(e,!0)}function Qt(e){return Ft(e,!1)}function si(e,t){var i=Dn&&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||wn(n,s.marker)<0)&&(n=s.marker)}return n}function un(e,t,i,n,r){var s=je(e,t),l=Dn&&s.markedSpans;if(l)for(var p=0;p<l.length;++p){var f=l[p];if(!f.marker.collapsed)continue;var g=f.marker.find(0),A=Mt(g.from,i)||sn(f.marker)-sn(r),M=Mt(g.to,n)||zt(f.marker)-zt(r);if(A>=0&&M<=0||A<=0&&M>=0)continue;if(A<=0&&(f.marker.inclusiveRight&&r.inclusiveLeft?Mt(g.to,i)>=0:Mt(g.to,i)>0)||A>=0&&(f.marker.inclusiveRight&&r.inclusiveLeft?Mt(g.from,n)<=0:Mt(g.from,n)<0))return!0}}function Ln(e){for(var t;t=dn(e);)e=t.find(-1,!0).line;return e}function Vi(e){for(var t;t=Qt(e);)e=t.find(1,!0).line;return e}function Qi(e){for(var t,i;t=Qt(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function yi(e,t){var i=je(e,t),n=Ln(i);return i==n?t:Lt(n)}function jr(e,t){if(t>e.lastLine())return t;var i=je(e,t),n;if(!Fn(e,i))return t;for(;n=Qt(i);)i=n.find(1,!0).line;return Lt(i)+1}function Fn(e,t){var i=Dn&&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&&pr(e,t,n))return!0}}function pr(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return pr(e,n.line,ei(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)&&pr(e,t,r))return!0}function ni(e){e=Ln(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 p=s.children[l];if(p==i)break;t+=p.height}return t}function Ji(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=dn(n);){var r=i.find(0,!0);n=r.from.line,t+=r.from.ch-r.to.ch}for(n=e;i=Qt(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 Fr(e){var t=e.display,i=e.doc;t.maxLine=je(i,i.first),t.maxLineLength=Ji(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var r=Ji(n);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=n)})}var Oi=function(e,t,i){this.text=e,dr(this,t),this.height=i?i(this):1};Oi.prototype.lineNo=function(){return Lt(this)},N(Oi);function Yo(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Li(e),dr(e,i);var r=n?n(e):1;r!=e.height&&on(e,r)}function ho(e){e.parent=null,Li(e)}var mt={},Tt={};function Et(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Tt:mt;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Bt(e,t){var i=J("span",null,null,H?"padding-right: .1px":null),n={pre:J("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=Xt,Dt(e.display.measure)&&(l=ft(s,e.doc.direction))&&(n.addToken=pn(n.addToken,l)),n.map=[];var p=t!=e.display.externalMeasured&&Lt(s);Ut(s,n,ke(e,s,p)),s.styleClasses&&(s.styleClasses.bgClass&&(n.bgClass=q(s.styleClasses.bgClass,n.bgClass||"")),s.styleClasses.textClass&&(n.textClass=q(s.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ht(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(H){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 de(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=q(n.pre.className,n.textClass||"")),n}function Ht(e){var t=C("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Xt(e,t,i,n,r,s,l){if(!t)return;var p=e.splitSpaces?jt(t,e.trailingSpace):t,f=e.cm.state.specialChars,g=!1,A;if(!f.test(t))e.col+=t.length,A=document.createTextNode(p),e.map.push(e.pos,e.pos+t.length,A),O&&K<9&&(g=!0),e.pos+=t.length;else{A=document.createDocumentFragment();for(var M=0;;){f.lastIndex=M;var Z=f.exec(t),G=Z?Z.index-M:t.length-M;if(G){var ve=document.createTextNode(p.slice(M,M+G));O&&K<9?A.appendChild(C("span",[ve])):A.appendChild(ve),e.map.push(e.pos,e.pos+G,ve),e.col+=G,e.pos+=G}if(!Z)break;M+=G+1;var Le=void 0;if(Z[0]==" "){var We=e.cm.options.tabSize,Je=We-e.col%We;Le=A.appendChild(C("span",I(Je),"cm-tab")),Le.setAttribute("role","presentation"),Le.setAttribute("cm-text"," "),e.col+=Je}else Z[0]=="\r"||Z[0]==`
`?(Le=A.appendChild(C("span",Z[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Le.setAttribute("cm-text",Z[0]),e.col+=1):(Le=e.cm.options.specialCharPlaceholder(Z[0]),Le.setAttribute("cm-text",Z[0]),O&&K<9?A.appendChild(C("span",[Le])):A.appendChild(Le),e.col+=1);e.map.push(e.pos,e.pos+1,Le),e.pos++}}if(e.trailingSpace=p.charCodeAt(t.length-1)==32,i||n||r||g||s||l){var lt=i||"";n&&(lt+=n),r&&(lt+=r);var Ke=C("span",[A],lt,s);if(l)for(var pt in l)l.hasOwnProperty(pt)&&pt!="style"&&pt!="class"&&Ke.setAttribute(pt,l[pt]);return e.content.appendChild(Ke)}e.content.appendChild(A)}function jt(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 pn(e,t){return function(i,n,r,s,l,p,f){r=r?r+" cm-force-border":"cm-force-border";for(var g=i.pos,A=g+n.length;;){for(var M=void 0,Z=0;Z<t.length&&!(M=t[Z],M.to>g&&M.from<=g);Z++);if(M.to>=A)return e(i,n,r,s,l,p,f);e(i,n.slice(0,M.to-g),r,s,null,p,f),s=null,n=n.slice(M.to-g),g=M.to}}}function On(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 Ut(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]),Et(i[l+1],t.cm.options));return}for(var p=r.length,f=0,g=1,A="",M,Z,G=0,ve,Le,We,Je,lt;;){if(G==f){ve=Le=We=Z="",lt=null,Je=null,G=Infinity;for(var Ke=[],pt=void 0,wt=0;wt<n.length;++wt){var xt=n[wt],Nt=xt.marker;if(Nt.type=="bookmark"&&xt.from==f&&Nt.widgetNode)Ke.push(Nt);else if(xt.from<=f&&(xt.to==null||xt.to>f||Nt.collapsed&&xt.to==f&&xt.from==f)){if(xt.to!=null&&xt.to!=f&&G>xt.to&&(G=xt.to,Le=""),Nt.className&&(ve+=" "+Nt.className),Nt.css&&(Z=(Z?Z+";":"")+Nt.css),Nt.startStyle&&xt.from==f&&(We+=" "+Nt.startStyle),Nt.endStyle&&xt.to==G&&(pt||(pt=[])).push(Nt.endStyle,xt.to),Nt.title&&((lt||(lt={})).title=Nt.title),Nt.attributes)for(var $t in Nt.attributes)(lt||(lt={}))[$t]=Nt.attributes[$t];Nt.collapsed&&(!Je||wn(Je.marker,Nt)<0)&&(Je=xt)}else xt.from>f&&G>xt.from&&(G=xt.from)}if(pt)for(var xn=0;xn<pt.length;xn+=2)pt[xn+1]==G&&(Le+=" "+pt[xn]);if(!Je||Je.from==f)for(var an=0;an<Ke.length;++an)On(t,0,Ke[an]);if(Je&&(Je.from||0)==f){if(On(t,(Je.to==null?p+1:Je.to)-f,Je.marker,Je.from==null),Je.to==null)return;Je.to==f&&(Je=!1)}}if(f>=p)break;for(var zn=Math.min(p,G);;){if(A){var Pn=f+A.length;if(!Je){var fn=Pn>zn?A.slice(0,zn-f):A;t.addToken(t,fn,M?M+ve:ve,We,f+fn.length==G?Le:"",Z,lt)}if(Pn>=zn){A=A.slice(zn-f),f=zn;break}f=Pn,We=""}A=r.slice(s,s=i[g++]),M=Et(i[g++],t.cm.options)}}}function bi(e,t,i){this.line=t,this.rest=Qi(t),this.size=this.rest?Lt(Ue(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Fn(e,t)}function Vt(e,t,i){for(var n=[],r,s=t;s<i;s=r){var l=new bi(e.doc,je(e.doc,s),s);r=s+l.size,n.push(l)}return n}var yn=null;function Yn(e){yn?yn.ops.push(e):e.ownsGroup=yn={ops:[e],delayedCallbacks:[]}}function Zn(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 Wr(e,t){var i=e.ownsGroup;if(!i)return;try{Zn(i)}finally{yn=null,t(i)}}var fr=null;function An(e,t){var i=gt(e,t);if(!i.length)return;var n=Array.prototype.slice.call(arguments,2),r;yn?r=yn.delayedCallbacks:fr?r=fr:(r=fr=[],setTimeout(Os,0));for(var s=function(p){r.push(function(){return i[p].apply(null,n)})},l=0;l<i.length;++l)s(l)}function Os(){var e=fr;fr=null;for(var t=0;t<e.length;++t)e[t]()}function Zo(e,t,i,n){for(var r=0;r<t.changes.length;r++){var s=t.changes[r];s=="text"?Ns(e,t):s=="gutter"?$o(e,t,i,n):s=="class"?co(e,t):s=="widget"&&Ps(e,t,n)}t.changes=null}function mr(e){return e.node==e.text&&(e.node=C("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),O&&K<8&&(e.node.style.zIndex=2)),e.node}function Is(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=mr(t);t.background=n.insertBefore(C("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function qo(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Bt(e,t)}function Ns(e,t){var i=t.text.className,n=qo(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,co(e,t)):i&&(t.text.className=i)}function co(e,t){Is(e,t),t.line.wrapClass?mr(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 $o(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=mr(t);t.gutterBackground=C("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=mr(t),p=t.gutter=C("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(p),l.insertBefore(p,t.text),t.line.gutterClass&&(p.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!s||!s["CodeMirror-linenumbers"])&&(t.lineNumber=p.appendChild(C("div",$n(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 g=e.display.gutterSpecs[f].className,A=s.hasOwnProperty(g)&&s[g];A&&p.appendChild(C("div",[A],"CodeMirror-gutter-elt","left: "+n.gutterLeft[g]+"px; width: "+n.gutterWidth[g]+"px"))}}}function Ps(e,t,i){t.alignable&&(t.alignable=null);for(var n=ie("CodeMirror-linewidget"),r=t.node.firstChild,s=void 0;r;r=s)s=r.nextSibling,n.test(r.className)&&t.node.removeChild(r);ea(e,t,i)}function Bs(e,t,i,n){var r=qo(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),co(e,t),$o(e,t,i,n),ea(e,t,n),t.node}function ea(e,t,i){if(ta(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)ta(e,t.rest[n],t,i,!1)}function ta(e,t,i,n,r){if(!t.widgets)return;for(var s=mr(i),l=0,p=t.widgets;l<p.length;++l){var f=p[l],g=C("div",[f.node],"CodeMirror-linewidget"+(f.className?" "+f.className:""));f.handleMouseEvents||g.setAttribute("cm-ignore-events","true"),_s(f,g,i,n),e.display.input.setUneditable(g),r&&f.above?s.insertBefore(g,i.gutter||i.text):s.appendChild(g),An(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 gr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!S(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;"),k(t.display.measure,C("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function fi(e,t){for(var i=Y(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 na(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=k(e.measure,C("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 li(e){return Ze-e.display.nativeBarWidth}function Ii(e){return e.display.scroller.clientWidth-li(e)-e.display.barWidth}function fo(e){return e.display.scroller.clientHeight-li(e)-e.display.barHeight}function Us(e,t,i){var n=e.options.lineWrapping,r=n&&Ii(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(),p=0;p<l.length-1;p++){var f=l[p],g=l[p+1];Math.abs(f.bottom-g.bottom)>2&&s.push((f.bottom+g.top)/2-i.top)}}s.push(i.bottom-i.top)}}function ia(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=Ln(t);var i=Lt(t),n=e.display.externalMeasured=new bi(e.doc,t,i);n.lineN=i;var r=n.built=Bt(e,n);return n.text=r.pre,k(e.display.lineMeasure,r.pre),n}function ra(e,t,i,n){return ui(e,Ki(e,t),i,n)}function mo(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Bi(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function Ki(e,t){var i=Lt(t),n=mo(e,i);n&&!n.text?n=null:n&&n.changes&&(Zo(e,n,i,xo(e)),e.curOp.forceUpdate=!0),n||(n=js(e,t));var r=ia(n,t,i);return{line:t,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function ui(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=Ws(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 oa={left:0,right:0,top:0,bottom:0};function aa(e,t,i){for(var n,r,s,l,p,f,g=0;g<e.length;g+=3)if(p=e[g],f=e[g+1],t<p?(r=0,s=1,l="left"):t<f?(r=t-p,s=r+1):(g==e.length-3||t==f&&e[g+3]>t)&&(s=f-p,r=s-1,t>=f&&(l="right")),r!=null){if(n=e[g+2],p==f&&i==(n.insertLeft?"left":"right")&&(l=i),i=="left"&&r==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)n=e[(g-=3)+2],l="left";if(i=="right"&&r==f-p)for(;g<e.length-3&&e[g+3]==e[g+4]&&!e[g+5].insertLeft;)n=e[(g+=3)+2],l="right";break}return{node:n,start:r,end:s,collapse:l,coverStart:p,coverEnd:f}}function Fs(e,t){var i=oa;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 Ws(e,t,i,n){var r=aa(t.map,i,n),s=r.node,l=r.start,p=r.end,f=r.collapse,g;if(s.nodeType==3){for(var A=0;A<4;A++){for(;l&&xe(t.line.text.charAt(r.coverStart+l));)--l;for(;r.coverStart+p<r.coverEnd&&xe(t.line.text.charAt(r.coverStart+p));)++p;if(O&&K<9&&l==0&&p==r.coverEnd-r.coverStart?g=s.parentNode.getBoundingClientRect():g=Fs(U(s,l,p).getClientRects(),n),g.left||g.right||l==0)break;p=l,l=l-1,f="right"}O&&K<11&&(g=zs(e.display.measure,g))}else{l>0&&(f=n="right");var M;e.options.lineWrapping&&(M=s.getClientRects()).length>1?g=M[n=="right"?M.length-1:0]:g=s.getBoundingClientRect()}if(O&&K<9&&!l&&(!g||!g.left&&!g.right)){var Z=s.parentNode.getClientRects()[0];Z?g={left:Z.left,right:Z.left+Yi(e.display),top:Z.top,bottom:Z.bottom}:g=oa}for(var G=g.top-t.rect.top,ve=g.bottom-t.rect.top,Le=(G+ve)/2,We=t.view.measure.heights,Je=0;Je<We.length-1&&!(Le<We[Je]);Je++);var lt=Je?We[Je-1]:0,Ke=We[Je],pt={left:(f=="right"?g.right:g.left)-t.rect.left,right:(f=="left"?g.left:g.right)-t.rect.left,top:lt,bottom:Ke};return!g.left&&!g.right&&(pt.bogus=!0),e.options.singleCursorHeightPerLine||(pt.rtop=G,pt.rbottom=ve),pt}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Pt(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 sa(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 la(e){e.display.externalMeasure=null,$(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)sa(e.display.view[t])}function vr(e){la(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ua(){return R&&P?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ha(){return R&&P?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function go(e){var t=0;if(e.widgets)for(var i=0;i<e.widgets.length;++i)e.widgets[i].above&&(t+=gr(e.widgets[i]));return t}function Hr(e,t,i,n,r){if(!r){var s=go(t);i.top+=s,i.bottom+=s}if(n=="line")return i;n||(n="local");var l=ni(t);if(n=="local"?l+=zr(e.display):l-=e.display.viewOffset,n=="page"||n=="window"){var p=e.display.lineSpace.getBoundingClientRect();l+=p.top+(n=="window"?0:ha());var f=p.left+(n=="window"?0:ua());i.left+=f,i.right+=f}return i.top+=l,i.bottom+=l,i}function ca(e,t,i){if(i=="div")return t;var n=t.left,r=t.top;if(i=="page")n-=ua(),r-=ha();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 vo(e,t,i,n,r){return n||(n=je(e.doc,t.line)),Hr(e,n,ra(e,n,t.ch,r),i)}function ii(e,t,i,n,r,s){n=n||je(e.doc,t.line),r||(r=Ki(e,n));function l(ve,Le){var We=ui(e,r,ve,Le?"right":"left",s);return Le?We.left=We.right:We.right=We.left,Hr(e,n,We,i)}var p=ft(n,e.doc.direction),f=t.ch,g=t.sticky;if(f>=n.text.length?(f=n.text.length,g="before"):f<=0&&(f=0,g="after"),!p)return l(g=="before"?f-1:f,g=="before");function A(ve,Le,We){var Je=p[Le],lt=Je.level==1;return l(We?ve-1:ve,lt!=We)}var M=Qe(p,f,g),Z=Ve,G=A(f,M,g=="before");return Z!=null&&(G.other=A(f,Z,g!="before")),G}function da(e,t){var i=0;t=o(e.doc,t),e.options.lineWrapping||(i=Yi(e.display)*t.ch);var n=je(e.doc,t.line),r=ni(n)+zr(e.display);return{left:i,right:i,top:r,bottom:r+n.height}}function yo(e,t,i,n,r){var s=Pe(e,t,i);return s.xRel=r,n&&(s.outside=n),s}function bo(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return yo(n.first,0,null,-1,-1);var r=cn(n,i),s=n.first+n.size-1;if(r>s)return yo(n.first+n.size-1,je(n,s).text.length,null,1,1);t<0&&(t=0);for(var l=je(n,r);;){var p=Hs(e,l,r,t,i),f=si(l,p.ch+(p.xRel>0||p.outside>0?1:0));if(!f)return p;var g=f.find(1);if(g.line==r)return g;l=je(n,r=g.line)}}function pa(e,t,i,n){n-=go(t);var r=t.text.length,s=ut(function(l){return ui(e,i,l-1).bottom<=n},r,0);return r=ut(function(l){return ui(e,i,l).top>n},s,r),{begin:s,end:r}}function fa(e,t,i,n){i||(i=Ki(e,t));var r=Hr(e,t,ui(e,i,n),"line").top;return pa(e,t,i,r)}function Co(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-=ni(t);var s=Ki(e,t),l=go(t),p=0,f=t.text.length,g=!0,A=ft(t,e.doc.direction);if(A){var M=(e.options.lineWrapping?Vs:Gs)(e,t,i,s,A,n,r);g=M.level!=1,p=g?M.from:M.to-1,f=g?M.to:M.from-1}var Z=null,G=null,ve=ut(function(wt){var xt=ui(e,s,wt);return xt.top+=l,xt.bottom+=l,Co(xt,n,r,!1)?(xt.top<=r&&xt.left<=n&&(Z=wt,G=xt),!0):!1},p,f),Le,We,Je=!1;if(G){var lt=n-G.left<G.right-n,Ke=lt==g;ve=Z+(Ke?0:1),We=Ke?"after":"before",Le=lt?G.left:G.right}else{!g&&(ve==f||ve==p)&&ve++,We=ve==0?"after":ve==t.text.length?"before":ui(e,s,ve-(g?1:0)).bottom+l<=r==g?"after":"before";var pt=ii(e,Pe(i,ve,We),"line",t,s);Le=pt.left,Je=r<pt.top?-1:r>=pt.bottom?1:0}return ve=Fe(t.text,ve,1),yo(i,ve,We,Je,n-Le)}function Gs(e,t,i,n,r,s,l){var p=ut(function(M){var Z=r[M],G=Z.level!=1;return Co(ii(e,Pe(i,G?Z.to:Z.from,G?"before":"after"),"line",t,n),s,l,!0)},0,r.length-1),f=r[p];if(p>0){var g=f.level!=1,A=ii(e,Pe(i,g?f.from:f.to,g?"after":"before"),"line",t,n);Co(A,s,l,!0)&&A.top>l&&(f=r[p-1])}return f}function Vs(e,t,i,n,r,s,l){var p=pa(e,t,n,l),f=p.begin,g=p.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var A=null,M=null,Z=0;Z<r.length;Z++){var G=r[Z];if(G.from>=g||G.to<=f)continue;var ve=G.level!=1,Le=ui(e,n,ve?Math.min(g,G.to)-1:Math.max(f,G.from)).right,We=Le<s?s-Le+1e9:Le-s;(!A||M>We)&&(A=G,M=We)}return A||(A=r[r.length-1]),A.from<f&&(A={from:f,to:A.to,level:A.level}),A.to>g&&(A={from:A.from,to:g,level:A.level}),A}var Ni;function Xi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Ni==null){Ni=C("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Ni.appendChild(document.createTextNode("x")),Ni.appendChild(C("br"));Ni.appendChild(document.createTextNode("x"))}k(e.measure,Ni);var i=Ni.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),$(e.measure),i||1}function Yi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=C("span","xxxxxxxxxx"),i=C("pre",[t],"CodeMirror-line-like");k(e.measure,i);var n=t.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function xo(e){for(var t=e.display,i={},n={},r=t.gutters.clientLeft,s=t.gutters.firstChild,l=0;s;s=s.nextSibling,++l){var p=e.display.gutterSpecs[l].className;i[p]=s.offsetLeft+s.clientLeft+r,n[p]=s.clientWidth}return{fixedPos:Eo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Eo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ma(e){var t=Xi(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Yi(e.display)-3);return function(r){if(Fn(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 wo(e){var t=e.doc,i=ma(e);t.iter(function(n){var r=i(n);r!=n.height&&on(n,r)})}function Pi(e,t,i,n){var r=e.display;if(!i&&Y(t).getAttribute("cm-not-content")=="true")return null;var s,l,p=r.lineSpace.getBoundingClientRect();try{s=t.clientX-p.left,l=t.clientY-p.top}catch(M){return null}var f=bo(e,s,l),g;if(n&&f.xRel>0&&(g=je(e.doc,f.line).text).length==f.ch){var A=W(g,g.length,e.options.tabSize)-g.length;f=Pe(f.line,Math.max(0,Math.round((s-na(e.display).left)/Yi(e.display))-A))}return f}function Bi(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 In(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)Dn&&yi(e.doc,t)<r.viewTo&&xi(e);else if(i<=r.viewFrom)Dn&&jr(e.doc,i+n)>r.viewFrom?xi(e):(r.viewFrom+=n,r.viewTo+=n);else if(t<=r.viewFrom&&i>=r.viewTo)xi(e);else if(t<=r.viewFrom){var s=Gr(e,i,i+n,1);s?(r.view=r.view.slice(s.index),r.viewFrom=s.lineN,r.viewTo+=n):xi(e)}else if(i>=r.viewTo){var l=Gr(e,t,t,-1);l?(r.view=r.view.slice(0,l.index),r.viewTo=l.lineN):xi(e)}else{var p=Gr(e,t,t,-1),f=Gr(e,i,i+n,1);p&&f?(r.view=r.view.slice(0,p.index).concat(Vt(e,p.lineN,f.lineN)).concat(r.view.slice(f.index)),r.viewTo+=n):xi(e)}var g=r.externalMeasured;g&&(i<g.lineN?g.lineN+=n:t<g.lineN+g.size&&(r.externalMeasured=null))}function Ci(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[Bi(e,t)];if(s.node==null)return;var l=s.changes||(s.changes=[]);we(l,i)==-1&&l.push(i)}function xi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Gr(e,t,i,n){var r=Bi(e,t),s,l=e.display.view;if(!Dn||i==e.doc.first+e.doc.size)return{index:r,lineN:i};for(var p=e.display.viewFrom,f=0;f<r;f++)p+=l[f].size;if(p!=t){if(n>0){if(r==l.length-1)return null;s=p+l[r].size-t,r++}else s=p-t;t+=s,i+=s}for(;yi(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=Vt(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=Vt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Bi(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(Vt(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,Bi(e,i)))),n.viewTo=i}function ga(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 va(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 p=i.sel.ranges[l];if(p.from().line>=e.display.viewTo||p.to().line<e.display.viewFrom)continue;var f=p.empty();(f||e.options.showCursorWhenSelecting)&&ya(e,p.head,r),f||Js(e,p,s)}return n}function ya(e,t,i){var n=ii(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=i.appendChild(C("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(C("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 Vr(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=na(e.display),p=l.left,f=Math.max(n.sizerWidth,Ii(e)-n.sizer.offsetLeft)-l.right,g=r.direction=="ltr";function A(Ke,pt,wt,xt){pt<0&&(pt=0),pt=Math.round(pt),xt=Math.round(xt),s.appendChild(C("div",null,"CodeMirror-selected","position: absolute; left: "+Ke+`px;
top: `+pt+"px; width: "+(wt==null?f-Ke:wt)+`px;
height: `+(xt-pt)+"px"))}function M(Ke,pt,wt){var xt=je(r,Ke),Nt=xt.text.length,$t,xn;function an(fn,Bn){return vo(e,Pe(Ke,fn),"div",xt,Bn)}function zn(fn,Bn,Sn){var vn=fa(e,xt,null,fn),mn=Bn=="ltr"==(Sn=="after")?"left":"right",ln=Sn=="after"?vn.begin:vn.end-(/\s/.test(xt.text.charAt(vn.end-1))?2:1);return an(ln,mn)[mn]}var Pn=ft(xt,r.direction);return at(Pn,pt||0,wt==null?Nt:wt,function(fn,Bn,Sn,vn){var mn=Sn=="ltr",ln=an(fn,mn?"left":"right"),_n=an(Bn-1,mn?"right":"left"),ur=pt==null&&fn==0,Mi=wt==null&&Bn==Nt,Mn=vn==0,hi=!Pn||vn==Pn.length-1;if(_n.top-ln.top<=3){var En=(g?ur:Mi)&&Mn,Ko=(g?Mi:ur)&&hi,gi=En?p:(mn?ln:_n).left,Wi=Ko?f:(mn?_n:ln).right;A(gi,ln.top,Wi-gi,ln.bottom)}else{var zi,Tn,hr,Xo;mn?(zi=g&&ur&&Mn?p:ln.left,Tn=g?f:zn(fn,Sn,"before"),hr=g?p:zn(Bn,Sn,"after"),Xo=g&&Mi&&hi?f:_n.right):(zi=g?zn(fn,Sn,"before"):p,Tn=!g&&ur&&Mn?f:ln.right,hr=!g&&Mi&&hi?p:_n.left,Xo=g?zn(Bn,Sn,"after"):f),A(zi,ln.top,Tn-zi,ln.bottom),ln.bottom<_n.top&&A(p,ln.bottom,null,_n.top),A(hr,_n.top,Xo-hr,_n.bottom)}(!$t||Vr(ln,$t)<0)&&($t=ln),Vr(_n,$t)<0&&($t=_n),(!xn||Vr(ln,xn)<0)&&(xn=ln),Vr(_n,xn)<0&&(xn=_n)}),{start:$t,end:xn}}var Z=t.from(),G=t.to();if(Z.line==G.line)M(Z.line,Z.ch,G.ch);else{var ve=je(r,Z.line),Le=je(r,G.line),We=Ln(ve)==Ln(Le),Je=M(Z.line,Z.ch,We?ve.text.length+1:null).end,lt=M(G.line,We?0:null,G.ch).start;We&&(Je.top<lt.top-2?(A(Je.right,Je.top,null,Je.bottom),A(p,lt.top,lt.left,lt.bottom)):A(Je.right,Je.top,lt.left-Je.right,Je.bottom)),Je.bottom<lt.top&&A(p,Je.bottom,null,lt.top)}i.appendChild(s)}function Ao(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()||Zi(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function ba(e){e.state.focused||(e.display.input.focus(),So(e))}function Ca(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Zi(e))},100)}function So(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(de(e,"focus",e,t),e.state.focused=!0,le(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),H&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ao(e)}function Zi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(de(e,"blur",e,t),e.state.focused=!1,se(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Qr(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,p=0;if(r.hidden)continue;if(O&&K<8){var f=r.node.offsetTop+r.node.offsetHeight;l=f-i,i=f}else{var g=r.node.getBoundingClientRect();l=g.bottom-g.top,!s&&r.text.firstChild&&(p=r.text.firstChild.getBoundingClientRect().right-g.left-1)}var A=r.line.height-l;if((A>.005||A<-.005)&&(on(r.line,l),xa(r.line),r.rest))for(var M=0;M<r.rest.length;M++)xa(r.rest[M]);if(p>e.display.sizerWidth){var Z=Math.ceil(p/Yi(e.display));Z>e.display.maxLineLength&&(e.display.maxLineLength=Z,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}function xa(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 Jr(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=cn(t,n),l=cn(t,r);if(i&&i.ensure){var p=i.ensure.from.line,f=i.ensure.to.line;p<s?(s=p,l=cn(t,ni(je(t,p))+e.wrapper.clientHeight)):Math.min(f,t.lastLine())>=l&&(s=cn(t,ni(je(t,f))-e.wrapper.clientHeight),l=f)}return{from:s,to:Math.max(l,s+1)}}function Ks(e,t){if(Ne(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&&!j){var s=C("div","\u200B",null,`position: absolute;
top: `+(t.top-i.viewOffset-zr(e.display))+`px;
height: `+(t.bottom-t.top+li(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 Xs(e,t,i,n){n==null&&(n=0);var r;!e.options.lineWrapping&&t==i&&(t=t.ch?Pe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,i=t.sticky=="before"?Pe(t.line,t.ch+1,"before"):t);for(var s=0;s<5;s++){var l=!1,p=ii(e,t),f=!i||i==t?p:ii(e,i);r={left:Math.min(p.left,f.left),top:Math.min(p.top,f.top)-n,right:Math.max(p.left,f.left),bottom:Math.max(p.bottom,f.bottom)+n};var g=ko(e,r),A=e.doc.scrollTop,M=e.doc.scrollLeft;if(g.scrollTop!=null&&(Cr(e,g.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(l=!0)),g.scrollLeft!=null&&(_i(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-M)>1&&(l=!0)),!l)break}return r}function Ys(e,t){var i=ko(e,t);i.scrollTop!=null&&Cr(e,i.scrollTop),i.scrollLeft!=null&&_i(e,i.scrollLeft)}function ko(e,t){var i=e.display,n=Xi(e.display);t.top<0&&(t.top=0);var r=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,s=fo(e),l={};t.bottom-t.top>s&&(t.bottom=t.top+s);var p=e.doc.height+po(i),f=t.top<n,g=t.bottom>p-n;if(t.top<r)l.scrollTop=f?0:t.top;else if(t.bottom>r+s){var A=Math.min(t.top,(g?p:t.bottom)-s);A!=r&&(l.scrollTop=A)}var M=e.options.fixedGutter?0:i.gutters.offsetWidth,Z=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-M,G=Ii(e)-i.gutters.offsetWidth,ve=t.right-t.left>G;return ve&&(t.right=t.left+G),t.left<10?l.scrollLeft=0:t.left<Z?l.scrollLeft=Math.max(0,t.left+M-(ve?0:10)):t.right>G+Z-3&&(l.scrollLeft=t.right+(ve?0:10)-G),l}function Mo(e,t){if(t==null)return;Kr(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function qi(e){Kr(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)&&Kr(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Zs(e,t){Kr(e),e.curOp.scrollToPos=t}function Kr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=da(e,t.from),n=da(e,t.to);Ea(e,i,n,t.margin)}}function Ea(e,t,i,n){var r=ko(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;re||To(e,{top:t}),wa(e,t,!0),re&&To(e),wr(e,100)}function wa(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 _i(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+li(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Ui=function(e,t,i){this.cm=i;var n=this.vert=C("div",[C("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=C("div",[C("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,e(n),e(r),ce(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ce(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,O&&K<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ui.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}},Ui.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ui.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ui.prototype.zeroWidthHack=function(){var e=Q&&!X?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ce,this.disableVert=new Ce},Ui.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)},Ui.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 $i(e,t){t||(t=xr(e));var i=e.display.barWidth,n=e.display.barHeight;Aa(e,t);for(var r=0;r<4&&i!=e.display.barWidth||n!=e.display.barHeight;r++)i!=e.display.barWidth&&e.options.lineWrapping&&Qr(e),Aa(e,xr(e)),i=e.display.barWidth,n=e.display.barHeight}function Aa(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 Sa={native:Ui,null:Er};function ka(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&se(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Sa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ce(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"?_i(e,t):Cr(e,t)},e),e.display.scrollbars.addClass&&le(e.display.wrapper,e.display.scrollbars.addClass)}var qs=0;function ji(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},Yn(e.curOp)}function Fi(e){var t=e.curOp;t&&Wr(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&&Fr(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 Xr(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&&Qr(t),e.barMeasure=xr(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ra(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+li(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Ii(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&&_i(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==ee();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&$i(t,e.barMeasure),e.updatedDisplay&&Lo(t,e.barMeasure),e.selectionChanged&&Ao(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&ba(e.cm)}function rl(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&Ma(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&wa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&_i(t,e.scrollLeft,!0,!0),e.scrollToPos){var r=Xs(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 p=0;p<s.length;++p)s[p].lines.length||de(s[p],"hide");if(l)for(var f=0;f<l.length;++f)l[f].lines.length&&de(l[f],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&de(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Wn(e,t){if(e.curOp)return t();ji(e);try{return t()}finally{Fi(e)}}function bn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ji(e);try{return t.apply(e,arguments)}finally{Fi(e)}}}function Rn(e){return function(){if(this.curOp)return e.apply(this,arguments);ji(this);try{return e.apply(this,arguments)}finally{Fi(this)}}}function Cn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ji(t);try{return e.apply(this,arguments)}finally{Fi(t)}}}function wr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,E(ol,e))}function ol(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var i=+new Date+e.options.workTime,n=He(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,p=s.text.length>e.options.maxHighlightLength?Un(t.mode,n.state):null,f=T(e,s,n,!0);p&&(n.state=p),s.styles=f.styles;var g=s.styleClasses,A=f.classes;A?s.styleClasses=A:g&&(s.styleClasses=null);for(var M=!l||l.length!=s.styles.length||g!=A&&(!g||!A||g.bgClass!=A.bgClass||g.textClass!=A.textClass),Z=0;!M&&Z<l.length;++Z)M=l[Z]!=s.styles[Z];M&&r.push(n.line),s.stateAfter=n.save(),n.nextLine()}else s.text.length<=e.options.maxHighlightLength&&dt(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&&Wn(e,function(){for(var s=0;s<r.length;s++)Ci(e,r[s],"text")})}var Xr=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Jr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ii(e),this.force=i,this.dims=xo(e),this.events=[]};Xr.prototype.signal=function(e,t){D(e,t)&&this.events.push(arguments)},Xr.prototype.finish=function(){for(var e=0;e<this.events.length;e++)de.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=li(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=li(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=ee();if(!t||!S(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&S(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==ee())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&S(document.body,e.anchorNode)&&S(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 xi(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&&ga(e)==0)return!1;Ta(e)&&(xi(e),t.dims=xo(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)),Dn&&(s=yi(e.doc,s),l=jr(e.doc,l));var p=s!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Qs(e,s,l),i.viewOffset=ni(je(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var f=ga(e);if(!p&&f==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var g=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(g),$(i.cursorDiv),$(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,p&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,wr(e,400)),i.updateLineNumbers=null,!0}function Ma(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Ii(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+po(e.display)-fo(e),i.top)}),t.visible=Jr(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Jr(e.display,e.doc,i));if(!Ro(e,t))break;Qr(e);var r=xr(e);yr(e),$i(e,r),Lo(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 To(e,t){var i=new Xr(e,t);if(Ro(e,i)){Qr(e),Ma(e,i);var n=xr(e);yr(e),$i(e,n),Lo(e,n),i.finish()}}function ul(e,t,i){var n=e.display,r=e.options.lineNumbers,s=n.lineDiv,l=s.firstChild;function p(ve){var Le=ve.nextSibling;return H&&Q&&e.display.currentWheelTarget==ve?ve.style.display="none":ve.parentNode.removeChild(ve),Le}for(var f=n.view,g=n.viewFrom,A=0;A<f.length;A++){var M=f[A];if(!M.hidden)if(!M.node||M.node.parentNode!=s){var Z=Bs(e,M,g,i);s.insertBefore(Z,l)}else{for(;l!=M.node;)l=p(l);var G=r&&t!=null&&t<=g&&M.lineNumber;M.changes&&(we(M.changes,"gutter")>-1&&(G=!1),Zo(e,M,g,i)),G&&($(M.lineNumber),M.lineNumber.appendChild(document.createTextNode($n(e.options,g)))),l=M.node.nextSibling}g+=M.size}for(;l;)l=p(l)}function Do(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Lo(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+li(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=Eo(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 p=i[l].alignable;if(p)for(var f=0;f<p.length;f++)p[f].style.left=s}e.options.fixedGutter&&(t.gutters.style.left=n+r+"px")}function Ta(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=$n(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var r=n.measure.appendChild(C("div",[C("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",Do(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 Da(e){var t=e.gutters,i=e.gutterSpecs;$(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var r=i[n],s=r.className,l=r.style,p=t.appendChild(C("div",null,"CodeMirror-gutter "+s));l&&(p.style.cssText=l),s=="CodeMirror-linenumbers"&&(e.lineGutter=p,p.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Do(e)}function Ar(e){Da(e.display),In(e),Ra(e)}function hl(e,t,i,n){var r=this;this.input=i,r.scrollbarFiller=C("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=C("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=J("div",null,"CodeMirror-code"),r.selectionDiv=C("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=C("div",null,"CodeMirror-cursors"),r.measure=C("div",null,"CodeMirror-measure"),r.lineMeasure=C("div",null,"CodeMirror-measure"),r.lineSpace=J("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var s=J("div",[r.lineSpace],"CodeMirror-lines");r.mover=C("div",[s],null,"position: relative"),r.sizer=C("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=C("div",null,null,"position: absolute; height: "+Ze+"px; width: 1px;"),r.gutters=C("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=C("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=C("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),O&&K<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),!H&&!(re&&te)&&(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),Da(r),i.init(r)}var Yr=0,Jn=null;O?Jn=-.53:re?Jn=15:R?Jn=-.7:oe&&(Jn=-1/3);function La(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=La(e);return t.x*=Jn,t.y*=Jn,t}function Oa(e,t){var i=La(t),n=i.x,r=i.y,s=e.display,l=s.scroller,p=l.scrollWidth>l.clientWidth,f=l.scrollHeight>l.clientHeight;if(!(n&&p||r&&f))return;if(r&&Q&&H){e:for(var g=t.target,A=s.view;g!=l;g=g.parentNode)for(var M=0;M<A.length;M++)if(A[M].node==g){e.display.currentWheelTarget=g;break e}}if(n&&!re&&!L&&Jn!=null){r&&f&&Cr(e,Math.max(0,l.scrollTop+r*Jn)),_i(e,Math.max(0,l.scrollLeft+n*Jn)),(!r||r&&f)&&y(t),s.wheelStartX=null;return}if(r&&Jn!=null){var Z=r*Jn,G=e.doc.scrollTop,ve=G+s.wrapper.clientHeight;Z<0?G=Math.max(0,G+Z-50):ve=Math.min(e.doc.height,ve+Z+50),To(e,{top:G,bottom:ve})}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,We=l.scrollTop-s.wheelStartY,Je=We&&s.wheelDY&&We/s.wheelDY||Le&&s.wheelDX&&Le/s.wheelDX;if(s.wheelStartX=s.wheelStartY=null,!Je)return;Jn=(Jn*Yr+Je)/(Yr+1),++Yr},200)):(s.wheelDX+=n,s.wheelDY+=r))}var Kn=function(e,t){this.ranges=e,this.primIndex=t};Kn.prototype.primary=function(){return this.ranges[this.primIndex]},Kn.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(!ci(i.anchor,n.anchor)||!ci(i.head,n.head))return!1}return!0},Kn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Jt(Ri(this.ranges[t].anchor),Ri(this.ranges[t].head));return new Kn(e,this.primIndex)},Kn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Kn.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(Mt(t,n.from())>=0&&Mt(e,n.to())<=0)return i}return-1};var Jt=function(e,t){this.anchor=e,this.head=t};Jt.prototype.from=function(){return Ti(this.anchor,this.head)},Jt.prototype.to=function(){return di(this.anchor,this.head)},Jt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ri(e,t,i){var n=e&&e.options.selectionsMayTouch,r=t[i];t.sort(function(Z,G){return Mt(Z.from(),G.from())}),i=we(t,r);for(var s=1;s<t.length;s++){var l=t[s],p=t[s-1],f=Mt(p.to(),l.from());if(n&&!l.empty()?f>0:f>=0){var g=Ti(p.from(),l.from()),A=di(p.to(),l.to()),M=p.empty()?l.from()==l.head:p.from()==p.head;s<=i&&--i,t.splice(--s,2,new Jt(M?A:g,M?g:A))}}return new Kn(t,i)}function Ei(e,t){return new Kn([new Jt(e,t||e)],0)}function wi(e){return e.text?Pe(e.from.line+e.text.length-1,Ue(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ia(e,t){if(Mt(e,t.from)<0)return e;if(Mt(e,t.to)<=0)return wi(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+=wi(t).ch-t.to.ch),Pe(i,n)}function Io(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var r=e.sel.ranges[n];i.push(new Jt(Ia(r.anchor,t),Ia(r.head,t)))}return ri(e.cm,i,e.sel.primIndex)}function Na(e,t,i){return e.line==t.line?Pe(i.line,e.ch-t.ch+i.ch):Pe(i.line+(e.line-t.line),e.ch)}function dl(e,t,i){for(var n=[],r=Pe(e.first,0),s=r,l=0;l<t.length;l++){var p=t[l],f=Na(p.from,r,s),g=Na(wi(p),r,s);if(r=p.to,s=g,i=="around"){var A=e.sel.ranges[l],M=Mt(A.head,A.anchor)<0;n[l]=new Jt(M?g:f,M?f:g)}else n[l]=new Jt(f,f)}return new Kn(n,e.sel.primIndex)}function No(e){e.doc.mode=en(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&&In(e)}function Pa(e,t){return t.from.ch==0&&t.to.ch==0&&Ue(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Po(e,t,i,n){function r(lt){return i?i[lt]:null}function s(lt,Ke,pt){Yo(lt,Ke,pt,n),An(lt,"change",lt,t)}function l(lt,Ke){for(var pt=[],wt=lt;wt<Ke;++wt)pt.push(new Oi(g[wt],r(wt),n));return pt}var p=t.from,f=t.to,g=t.text,A=je(e,p.line),M=je(e,f.line),Z=Ue(g),G=r(g.length-1),ve=f.line-p.line;if(t.full)e.insert(0,l(0,g.length)),e.remove(g.length,e.size-g.length);else if(Pa(e,t)){var Le=l(0,g.length-1);s(M,M.text,G),ve&&e.remove(p.line,ve),Le.length&&e.insert(p.line,Le)}else if(A==M)if(g.length==1)s(A,A.text.slice(0,p.ch)+Z+A.text.slice(f.ch),G);else{var We=l(1,g.length-1);We.push(new Oi(Z+A.text.slice(f.ch),G,n)),s(A,A.text.slice(0,p.ch)+g[0],r(0)),e.insert(p.line+1,We)}else if(g.length==1)s(A,A.text.slice(0,p.ch)+g[0]+M.text.slice(f.ch),r(0)),e.remove(p.line+1,ve);else{s(A,A.text.slice(0,p.ch)+g[0],r(0)),s(M,Z+M.text.slice(f.ch),G);var Je=l(1,g.length-1);ve>1&&e.remove(p.line+1,ve-1),e.insert(p.line+1,Je)}An(e,"change",e,t)}function Ai(e,t,i){function n(r,s,l){if(r.linked)for(var p=0;p<r.linked.length;++p){var f=r.linked[p];if(f.doc==s)continue;var g=l&&f.sharedHist;if(i&&!g)continue;t(f.doc,g),n(f.doc,r,g)}}n(e,null,!0)}function Ba(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,wo(e),No(e),_a(e),e.options.lineWrapping||Fr(e),e.options.mode=t.modeOption,In(e)}function _a(e){(e.doc.direction=="rtl"?le:se)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Wn(e,function(){_a(e),In(e)})}function Zr(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 Bo(e,t){var i={from:Ri(t.from),to:wi(t),text:Gt(e,t.from,t.to)};return Fa(e,i,t.from.line,t.to.line+1),Ai(e,function(n){return Fa(n,i,t.from.line,t.to.line+1)},!0),i}function Ua(e){for(;e.length;){var t=Ue(e);if(t.ranges)e.pop();else break}}function fl(e,t){if(t)return Ua(e.done),Ue(e.done);if(e.done.length&&!Ue(e.done).ranges)return Ue(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ue(e.done)}function ja(e,t,i,n){var r=e.history;r.undone.length=0;var s=+new Date,l,p;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=fl(r,r.lastOp==n)))p=Ue(l.changes),Mt(t.from,t.to)==0&&Mt(t.from,p.to)==0?p.to=wi(t):l.changes.push(Bo(e,t));else{var f=Ue(r.done);for((!f||!f.ranges)&&qr(e.sel,r.done),l={changes:[Bo(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,p||de(e,"historyAdded")}function ml(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 gl(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||ml(e,s,Ue(r.done),t))?r.done[r.done.length-1]=t:qr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=s,r.lastSelOp=i,n&&n.clearRedo!==!1&&Ua(r.undone)}function qr(e,t){var i=Ue(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Fa(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 Wa(e,t){var i=yl(e,t),n=ti(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 p=0;p<l.length;++p){for(var f=l[p],g=0;g<s.length;++g)if(s[g].marker==f.marker)continue e;s.push(f)}}else l&&(i[r]=l)}return i}function er(e,t,i){for(var n=[],r=0;r<e.length;++r){var s=e[r];if(s.ranges){n.push(i?Kn.prototype.deepCopy.call(s):s);continue}var l=s.changes,p=[];n.push({changes:p});for(var f=0;f<l.length;++f){var g=l[f],A=void 0;if(p.push({from:g.from,to:g.to,text:g.text}),t)for(var M in g)(A=M.match(/^spans_(\d+)$/))&&(we(t,Number(A[1]))>-1&&(Ue(p)[M]=g[M],delete g[M]))}}return n}function _o(e,t,i,n){if(n){var r=e.anchor;if(i){var s=Mt(t,r)<0;s!=Mt(i,r)<0?(r=t,t=i):s!=Mt(t,i)<0&&(t=i)}return new Jt(r,t)}else return new Jt(i||t,t)}function $r(e,t,i,n,r){r==null&&(r=e.cm&&(e.cm.display.shift||e.extend)),kn(e,new Kn([_o(e.sel.primary(),t,i,r)],0),n)}function za(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]=_o(e.sel.ranges[s],t[s],null,r);var l=ri(e.cm,n,e.sel.primIndex);kn(e,l,i)}function Uo(e,t,i,n){var r=e.sel.ranges.slice(0);r[t]=i,kn(e,ri(e.cm,r,e.sel.primIndex),n)}function Ha(e,t,i,n){kn(e,Ei(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 Jt(o(e,r[s].anchor),o(e,r[s].head))},origin:i&&i.origin};return de(e,"beforeSelectionChange",e,n),e.cm&&de(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?ri(e.cm,n.ranges,n.ranges.length-1):t}function Ga(e,t,i){var n=e.history.done,r=Ue(n);r&&r.ranges?(n[n.length-1]=t,eo(e,t,i)):kn(e,t,i)}function kn(e,t,i){eo(e,t,i),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function eo(e,t,i){(D(e,"beforeSelectionChange")||e.cm&&D(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,i));var n=i&&i.bias||(Mt(t.primary().head,e.sel.primary().head)<0?-1:1);Va(e,Ja(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&qi(e.cm)}function Va(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,B(e.cm)),An(e,"cursorActivity",e)}function Qa(e){Va(e,Ja(e,e.sel,null,!1))}function Ja(e,t,i,n){for(var r,s=0;s<t.ranges.length;s++){var l=t.ranges[s],p=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[s],f=to(e,l.anchor,p&&p.anchor,i,n),g=to(e,l.head,p&&p.head,i,n);(r||f!=l.anchor||g!=l.head)&&(r||(r=t.ranges.slice(0,s)),r[s]=new Jt(f,g))}return r?ri(e.cm,r,t.primIndex):t}function tr(e,t,i,n,r){var s=je(e,t.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var p=s.markedSpans[l],f=p.marker,g="selectLeft"in f?!f.selectLeft:f.inclusiveLeft,A="selectRight"in f?!f.selectRight:f.inclusiveRight;if((p.from==null||(g?p.from<=t.ch:p.from<t.ch))&&(p.to==null||(A?p.to>=t.ch:p.to>t.ch))){if(r&&(de(f,"beforeCursorEnter"),f.explicitlyCleared))if(s.markedSpans){--l;continue}else break;if(!f.atomic)continue;if(i){var M=f.find(n<0?1:-1),Z=void 0;if((n<0?A:g)&&(M=Ka(e,M,-n,M&&M.line==t.line?s:null)),M&&M.line==t.line&&(Z=Mt(M,i))&&(n<0?Z<0:Z>0))return tr(e,M,t,n,r)}var G=f.find(n<0?-1:1);return(n<0?g:A)&&(G=Ka(e,G,n,G.line==t.line?s:null)),G?tr(e,G,t,n,r):null}}return t}function to(e,t,i,n,r){var s=n||1,l=tr(e,t,i,s,r)||!r&&tr(e,t,i,s,!0)||tr(e,t,i,-s,r)||!r&&tr(e,t,i,-s,!0);return l||(e.cantEdit=!0,Pe(e.first,0))}function Ka(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?o(e,Pe(t.line-1)):null:i>0&&t.ch==(n||je(e,t.line)).text.length?t.line<e.first+e.size-1?Pe(t.line+1,0):null:new Pe(t.line,t.ch+i)}function Xa(e){e.setSelection(Pe(e.firstLine(),0),Pe(e.lastLine()),Ie)}function Ya(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,p){r&&(n.from=o(e,r)),s&&(n.to=o(e,s)),l&&(n.text=l),p!==void 0&&(n.origin=p)}),de(e,"beforeChange",e,n),e.cm&&de(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 nr(e,t,i){if(e.cm){if(!e.cm.curOp)return bn(e.cm,nr)(e,t,i);if(e.cm.state.suppressEdits)return}if((D(e,"beforeChange")||e.cm&&D(e.cm,"beforeChange"))&&(t=Ya(e,t,!0),!t))return;var n=Hi&&!i&&Di(e,t.from,t.to);if(n)for(var r=n.length-1;r>=0;--r)Za(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin});else Za(e,t)}function Za(e,t){if(t.text.length==1&&t.text[0]==""&&Mt(t.from,t.to)==0)return;var i=Io(e,t);ja(e,t,i,e.cm?e.cm.curOp.id:NaN),kr(e,t,i,ti(e,t));var n=[];Ai(e,function(r,s){!s&&we(n,r.history)==-1&&(ts(r.history,t),n.push(r.history)),kr(r,t,null,ti(r,t))})}function no(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i)return;for(var r=e.history,s,l=e.sel,p=t=="undo"?r.done:r.undone,f=t=="undo"?r.undone:r.done,g=0;g<p.length&&!(s=p[g],i?s.ranges&&!s.equals(e.sel):!s.ranges);g++);if(g==p.length)return;for(r.lastOrigin=r.lastSelOrigin=null;;)if(s=p.pop(),s.ranges){if(qr(s,f),i&&!s.equals(e.sel)){kn(e,s,{clearRedo:!1});return}l=s}else if(n){p.push(s);return}else break;var A=[];qr(l,f),f.push({changes:A,generation:r.generation}),r.generation=s.generation||++r.maxGeneration;for(var M=D(e,"beforeChange")||e.cm&&D(e.cm,"beforeChange"),Z=function(Le){var We=s.changes[Le];if(We.origin=t,M&&!Ya(e,We,!1))return p.length=0,{};A.push(Bo(e,We));var Je=Le?Io(e,We):Ue(p);kr(e,We,Je,Wa(e,We)),!Le&&e.cm&&e.cm.scrollIntoView({from:We.from,to:wi(We)});var lt=[];Ai(e,function(Ke,pt){!pt&&we(lt,Ke.history)==-1&&(ts(Ke.history,We),lt.push(Ke.history)),kr(Ke,We,null,Wa(Ke,We))})},G=s.changes.length-1;G>=0;--G){var ve=Z(G);if(ve)return ve.v}}function qa(e,t){if(t==0)return;if(e.first+=t,e.sel=new Kn(Xe(e.sel.ranges,function(r){return new Jt(Pe(r.anchor.line+t,r.anchor.ch),Pe(r.head.line+t,r.head.ch))}),e.sel.primIndex),e.cm){In(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)Ci(e.cm,n,"gutter")}}function kr(e,t,i,n){if(e.cm&&!e.cm.curOp)return bn(e.cm,kr)(e,t,i,n);if(t.to.line<e.first){qa(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);qa(e,r),t={from:Pe(e.first,0),to:Pe(t.to.line+r,t.to.ch),text:[Ue(t.text)],origin:t.origin}}var s=e.lastLine();t.to.line>s&&(t={from:t.from,to:Pe(s,je(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Gt(e,t.from,t.to),i||(i=Io(e,t)),e.cm?Cl(e.cm,t,n):Po(e,t,n),eo(e,i,Ie),e.cantEdit&&to(e,Pe(e.firstLine(),0))&&(e.cantEdit=!1)}function Cl(e,t,i){var n=e.doc,r=e.display,s=t.from,l=t.to,p=!1,f=s.line;e.options.lineWrapping||(f=Lt(Ln(je(n,s.line))),n.iter(f,l.line+1,function(G){if(G==r.maxLine)return p=!0,!0})),n.sel.contains(t.from,t.to)>-1&&B(e),Po(n,t,i,ma(e)),e.options.lineWrapping||(n.iter(f,s.line+t.text.length,function(G){var ve=Ji(G);ve>r.maxLineLength&&(r.maxLine=G,r.maxLineLength=ve,r.maxLineChanged=!0,p=!1)}),p&&(e.curOp.updateMaxLine=!0)),Xn(n,s.line),wr(e,400);var g=t.text.length-(l.line-s.line)-1;t.full?In(e):s.line==l.line&&t.text.length==1&&!Pa(e.doc,t)?Ci(e,s.line,"text"):In(e,s.line,l.line+1,g);var A=D(e,"changes"),M=D(e,"change");if(M||A){var Z={from:s,to:l,text:t.text,removed:t.removed,origin:t.origin};M&&An(e,"change",e,Z),A&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Z)}e.display.selForContextMenu=null}function ir(e,t,i,n,r){var s;n||(n=i),Mt(n,i)<0&&(s=[n,i],i=s[0],n=s[1]),typeof t=="string"&&(t=e.splitLines(t)),nr(e,{from:i,to:n,text:t,origin:r})}function $a(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function es(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 p=0;p<s.ranges.length;p++)$a(s.ranges[p].anchor,t,i,n),$a(s.ranges[p].head,t,i,n);continue}for(var f=0;f<s.changes.length;++f){var g=s.changes[f];if(i<g.from.line)g.from=Pe(g.from.line+n,g.from.ch),g.to=Pe(g.to.line+n,g.to.ch);else if(t<=g.to.line){l=!1;break}}l||(e.splice(0,r+1),r=0)}}function ts(e,t){var i=t.from.line,n=t.to.line,r=t.text.length-(n-i)-1;es(e.done,i,n,r),es(e.undone,i,n,r)}function Mr(e,t,i,n){var r=t,s=t;return typeof t=="number"?s=je(e,c(e,t)):r=Lt(t),r==null?null:(n(s,r)&&e.cm&&Ci(e.cm,r,i),s)}function Rr(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}Rr.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),An(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 Tr(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}Tr.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 Rr))){var p=[];this.collapse(p),this.children=[new Rr(p)],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,p=l;p<r.lines.length;){var f=new Rr(r.lines.slice(p,p+=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 Tr(t);if(e.parent){e.size-=i.size,e.height-=i.height;var r=we(e.parent.children,e);e.parent.children.splice(r+1,0,i)}else{var n=new Tr(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=gr(this);on(i,Math.max(0,i.height-s)),e&&(Wn(e,function(){ns(e,i,-s),Ci(e,n,"widget")}),An(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=gr(this)-t;if(!r)return;Fn(this.doc,n)||on(n,n.height+r),i&&Wn(i,function(){i.curOp.forceUpdate=!0,ns(i,n,r),An(i,"lineWidgetChanged",i,e,Lt(n))})},N(Dr);function ns(e,t,i){ni(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Mo(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 p=l.widgets||(l.widgets=[]);if(r.insertAt==null?p.push(r):p.splice(Math.min(p.length-1,Math.max(0,r.insertAt)),0,r),r.line=l,s&&!Fn(e,l)){var f=ni(l)<e.scrollTop;on(l,l.height+gr(r)),f&&Mo(s,r.height),s.curOp.forceUpdate=!0}return!0}),s&&An(s,"lineWidgetAdded",s,r,typeof t=="number"?t:Lt(t)),r}var is=0,Si=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++is};Si.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ji(e),D(this,"clear")){var i=this.find();i&&An(this,"clear",i.from,i.to)}for(var n=null,r=null,s=0;s<this.lines.length;++s){var l=this.lines[s],p=ei(l.markedSpans,this);e&&!this.collapsed?Ci(e,Lt(l),"text"):e&&(p.to!=null&&(r=Lt(l)),p.from!=null&&(n=Lt(l))),l.markedSpans=pi(l.markedSpans,p),p.from==null&&this.collapsed&&!Fn(this.doc,l)&&e&&on(l,Xi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var f=0;f<this.lines.length;++f){var g=Ln(this.lines[f]),A=Ji(g);A>e.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=A,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&In(e,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qa(e.doc)),e&&An(e,"markerCleared",e,this,n,r),t&&Fi(e),this.parent&&this.parent.clear()},Si.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=ei(s.markedSpans,this);if(l.from!=null&&(i=Pe(t?s:Lt(s),l.from),e==-1))return i;if(l.to!=null&&(n=Pe(t?s:Lt(s),l.to),e==1))return n}return i&&{from:i,to:n}},Si.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;if(!t||!n)return;Wn(n,function(){var r=t.line,s=Lt(t.line),l=mo(n,s);if(l&&(sa(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Fn(i.doc,r)&&i.height!=null){var p=i.height;i.height=null;var f=gr(i)-p;f&&on(r,r.height+f)}An(n,"markerChanged",n,e)})},Si.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||we(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Si.prototype.detachLine=function(e){if(this.lines.splice(we(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},N(Si);function rr(e,t,i,n,r){if(n&&n.shared)return El(e,t,i,n,r);if(e.cm&&!e.cm.curOp)return bn(e.cm,rr)(e,t,i,n,r);var s=new Si(e,r),l=Mt(t,i);if(n&&v(n,s,!1),l>0||l==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=J("span",[s.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(un(e,t.line,t,i,s)||t.line!=i.line&&un(e,i.line,t,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");jn()}s.addToHistory&&ja(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var p=t.line,f=e.cm,g;if(e.iter(p,i.line+1,function(M){f&&s.collapsed&&!f.options.lineWrapping&&Ln(M)==f.display.maxLine&&(g=!0),s.collapsed&&p!=t.line&&on(M,0),ai(M,new vi(s,p==t.line?t.ch:null,p==i.line?i.ch:null)),++p}),s.collapsed&&e.iter(t.line,i.line+1,function(M){Fn(e,M)&&on(M,0)}),s.clearOnEnter&&ce(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(Vn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++is,s.atomic=!0),f){if(g&&(f.curOp.updateMaxLine=!0),s.collapsed)In(f,t.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var A=t.line;A<=i.line;A++)Ci(f,A,"text");s.atomic&&Qa(f.doc),An(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();An(this,"clear")},Lr.prototype.find=function(e,t){return this.primary.find(e,t)},N(Lr);function El(e,t,i,n,r){n=v(n),n.shared=!1;var s=[rr(e,t,i,n,r)],l=s[0],p=n.widgetNode;return Ai(e,function(f){p&&(n.widgetNode=p.cloneNode(!0)),s.push(rr(f,o(f,t),o(f,i),n,r));for(var g=0;g<f.linked.length;++g)if(f.linked[g].isParent)return;l=Ue(s)}),new Lr(s,l)}function rs(e){return e.findMarks(Pe(e.first,0),e.clipPos(Pe(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(Mt(s,l)){var p=rr(e,s,l,n.primary,n.primary.type);n.markers.push(p),p.parent=n}}}function Al(e){for(var t=function(n){var r=e[n],s=[r.primary.doc];Ai(r.primary.doc,function(f){return s.push(f)});for(var l=0;l<r.markers.length;l++){var p=r.markers[l];we(s,p.doc)==-1&&(p.parent=null,r.markers.splice(l--,1))}},i=0;i<e.length;i++)t(i)}var Sl=0,Nn=function(e,t,i,n,r){if(!(this instanceof Nn))return new Nn(e,t,i,n,r);i==null&&(i=0),Tr.call(this,[new Rr([new Oi("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var s=Pe(i,0);this.sel=Ei(s),this.history=new Zr(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)),Po(this,{from:s,to:s,text:e}),kn(this,Ei(s),Ie)};Nn.prototype=$e(Tr.prototype,{constructor:Nn,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=kt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Cn(function(e){var t=Pe(this.first,0),i=this.first+this.size-1;nr(this,{from:t,to:Pe(i,je(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&br(this.cm,0,0),kn(this,Ei(t),Ie)}),replaceRange:function(e,t,i,n){t=o(this,t),i=i?o(this,i):t,ir(this,e,t,i,n)},getRange:function(e,t,i){var n=Gt(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(bt(this,e))return je(this,e)},getLineNumber:function(e){return Lt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=je(this,e)),Ln(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){Ha(this,o(this,typeof e=="number"?Pe(e,t||0):e),null,i)}),setSelection:Cn(function(e,t,i){Ha(this,o(this,e),o(this,t||e),i)}),extendSelection:Cn(function(e,t,i){$r(this,o(this,e),t&&o(this,t),i)}),extendSelections:Cn(function(e,t){za(this,u(this,e),t)}),extendSelectionsBy:Cn(function(e,t){var i=Xe(this.sel.ranges,e);za(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 Jt(o(this,e[r].anchor),o(this,e[r].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),kn(this,ri(this.cm,n,t),i)}),addSelection:Cn(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Jt(o(this,e),o(this,t||e))),kn(this,ri(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=Gt(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=Gt(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 p=t&&t!="end"&&dl(this,n,t),f=n.length-1;f>=0;f--)nr(this,n[f]);p?Ga(this,p):this.cm&&qi(this.cm)}),undo:Cn(function(){no(this,"undo")}),redo:Cn(function(){no(this,"redo")}),undoSelection:Cn(function(){no(this,"undo",!0)}),redoSelection:Cn(function(){no(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 Zr(this.history.maxGeneration),Ai(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:er(this.history.done),undone:er(this.history.undone)}},setHistory:function(e){var t=this.history=new Zr(this.history.maxGeneration);t.done=er(e.done.slice(0),null,!0),t.undone=er(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&&tt(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,tt(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!bt(this,e))return null;if(t=e,e=je(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(ie(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(ie(i));if(!l)return!1;var p=l.index+l[0].length;n[r]=s.slice(0,l.index)+(!l.index||p==s.length?"":" ")+s.slice(p)||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 rr(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),rr(this,e,e,i,"bookmark")},findMarksAt:function(e){e=o(this,e);var t=[],i=je(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 p=0;p<l.length;p++){var f=l[p];!(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,Pe(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 Nn(kt(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 Nn(kt(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,rs(this)),n},unlinkDoc:function(e){if(e instanceof rn&&(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(rs(this));break}if(e.history==this.history){var n=[e.id];Ai(e,function(r){return n.push(r.id)},!0),e.history=new Zr(null),e.history.done=er(this.history.done,n),e.history.undone=er(this.history.undone,n)}},iterLinkedDocs:function(e){Ai(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):At(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&&pl(this.cm)})}),Nn.prototype.eachLine=Nn.prototype.iter;var os=0;function kl(e){var t=this;if(as(t),Ne(t,e)||fi(t.display,e))return;y(e),O&&(os=+new Date);var i=Pi(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,p=function(){++l==r&&bn(t,function(){i=o(t.doc,i);var G={from:i,to:i,text:t.doc.splitLines(s.filter(function(ve){return ve!=null}).join(t.doc.lineSeparator())),origin:"paste"};nr(t.doc,G),Ga(t.doc,Ei(o(t.doc,i),o(t.doc,wi(G))))})()},f=function(G,ve){if(t.options.allowDropFileTypes&&we(t.options.allowDropFileTypes,G.type)==-1){p();return}var Le=new FileReader;Le.onerror=function(){return p()},Le.onload=function(){var We=Le.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(We)){p();return}s[ve]=We,p()},Le.readAsText(G)},g=0;g<n.length;g++)f(n[g],g);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 A=e.dataTransfer.getData("Text");if(A){var M;if(t.state.draggingText&&!t.state.draggingText.copy&&(M=t.listSelections()),eo(t.doc,Ei(i,i)),M)for(var Z=0;Z<M.length;++Z)ir(t.doc,"",M[Z].anchor,M[Z].head,"drag");t.replaceSelection(A,"around","paste"),t.display.input.focus()}}catch(G){}}}function Ml(e,t){if(O&&(!e.state.draggingText||+new Date-os<100)){w(t);return}if(Ne(e,t)||fi(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!oe){var i=C("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",L&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),L&&i.parentNode.removeChild(i)}}function Rl(e,t){var i=Pi(e,t);if(!i)return;var n=document.createDocumentFragment();ya(e,i,n),e.display.dragCursor||(e.display.dragCursor=C("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),k(e.display.dragCursor,n)}function as(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ss(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 ls=!1;function Tl(){if(ls)return;Dl(),ls=!0}function Dl(){var e;ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ss(Ll)},100))}),ce(window,"blur",function(){return ss(Zi)})}function Ll(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ki={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"},Or=0;Or<10;Or++)ki[Or+48]=ki[Or+96]=String(Or);for(var io=65;io<=90;io++)ki[io]=String.fromCharCode(io);for(var Ir=1;Ir<=12;Ir++)ki[Ir+111]=ki[Ir+63235]="F"+Ir;var mi={};mi.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"},mi.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"},mi.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"},mi.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"]},mi.default=Q?mi.macDefault:mi.pcDefault;function Ol(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,r,s,l=0;l<t.length-1;l++){var p=t[l];if(/^(cmd|meta|m)$/i.test(p))s=!0;else if(/^a(lt)?$/i.test(p))i=!0;else if(/^(c|ctrl|control)$/i.test(p))n=!0;else if(/^s(hift)?$/i.test(p))r=!0;else throw new Error("Unrecognized modifier name: "+p)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),s&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Il(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=Xe(i.split(" "),Ol),s=0;s<r.length;s++){var l=void 0,p=void 0;s==r.length-1?(p=r.join(" "),l=n):(p=r.slice(0,s+1).join(" "),l="...");var f=t[p];if(!f)t[p]=l;else if(f!=l)throw new Error("Inconsistent bindings for "+p)}delete e[i]}for(var g in t)e[g]=t[g];return e}function or(e,t,i,n){t=ro(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 or(e,t.fallthrough,i,n);for(var s=0;s<t.fallthrough.length;s++){var l=or(e,t.fallthrough[s],i,n);if(l)return l}}}function us(e){var t=typeof e=="string"?e:ki[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function hs(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(ne?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(ne?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function cs(e,t){if(L&&e.keyCode==34&&e.char)return!1;var i=ki[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),hs(i,e,t))}function ro(e){return typeof e=="string"?mi[e]:e}function ar(e,t){for(var i=e.doc.sel.ranges,n=[],r=0;r<i.length;r++){for(var s=t(i[r]);n.length&&Mt(s.from,Ue(n).to)<=0;){var l=n.pop();if(Mt(l.from,s.from)<0){s.from=l.from;break}}n.push(s)}Wn(e,function(){for(var p=n.length-1;p>=0;p--)ir(e.doc,"",n[p].from,n[p].to,"+delete");qi(e)})}function jo(e,t,i){var n=Fe(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Fo(e,t,i){var n=jo(e,t.ch,i);return n==null?null:new Pe(t.line,n,i<0?"after":"before")}function Wo(e,t,i,n,r){if(e){t.doc.direction=="rtl"&&(r=-r);var s=ft(i,t.doc.direction);if(s){var l=r<0?Ue(s):s[0],p=r<0==(l.level==1),f=p?"after":"before",g;if(l.level>0||t.doc.direction=="rtl"){var A=Ki(t,i);g=r<0?i.text.length-1:0;var M=ui(t,A,g).top;g=ut(function(Z){return ui(t,A,Z).top==M},r<0==(l.level==1)?l.from:l.to-1,g),f=="before"&&(g=jo(i,g,1))}else g=r<0?l.to:l.from;return new Pe(n,g,f)}}return new Pe(n,r<0?i.text.length:0,r<0?"before":"after")}function Nl(e,t,i,n){var r=ft(t,e.doc.direction);if(!r)return Fo(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=Qe(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 Fo(t,i,n);var p=function(Je,lt){return jo(t,Je instanceof Pe?Je.ch:Je,lt)},f,g=function(Je){return e.options.lineWrapping?(f=f||Ki(e,t),fa(e,t,f,Je)):{begin:0,end:t.text.length}},A=g(i.sticky=="before"?p(i,-1):i.ch);if(e.doc.direction=="rtl"||l.level==1){var M=l.level==1==n<0,Z=p(i,M?1:-1);if(Z!=null&&(M?Z<=l.to&&Z<=A.end:Z>=l.from&&Z>=A.begin)){var G=M?"before":"after";return new Pe(i.line,Z,G)}}var ve=function(Je,lt,Ke){for(var pt=function($t,xn){return xn?new Pe(i.line,p($t,1),"before"):new Pe(i.line,$t,"after")};Je>=0&&Je<r.length;Je+=lt){var wt=r[Je],xt=lt>0==(wt.level!=1),Nt=xt?Ke.begin:p(Ke.end,-1);if(wt.from<=Nt&&Nt<wt.to)return pt(Nt,xt);if(Nt=xt?wt.from:p(wt.to,-1),Ke.begin<=Nt&&Nt<Ke.end)return pt(Nt,xt)}},Le=ve(s+n,n,A);if(Le)return Le;var We=n>0?A.end:p(A.begin,-1);return We!=null&&!(n>0&&We==t.text.length)&&(Le=ve(n>0?0:r.length-1,n,g(We)),Le)?Le:null}var Nr={selectAll:Xa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ie)},killLine:function(e){return ar(e,function(t){if(t.empty()){var i=je(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:Pe(t.head.line+1,0)}:{from:t.head,to:Pe(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ar(e,function(t){return{from:Pe(t.from().line,0),to:o(e.doc,Pe(t.to().line+1,0))}})},delLineLeft:function(e){return ar(e,function(t){return{from:Pe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ar(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 ar(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(Pe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Pe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return ds(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 Pl(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")},Ae)},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")},Ae)},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},Ae)},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=W(e.getLine(s.line),s.ch,n);t.push(I(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Wn(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var r=t[n].head,s=je(e.doc,r.line).text;if(s){if(r.ch==s.length&&(r=new Pe(r.line,r.ch-1)),r.ch>0)r=new Pe(r.line,r.ch+1),e.replaceRange(s.charAt(r.ch-1)+s.charAt(r.ch-2),Pe(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var l=je(e.doc,r.line-1).text;l&&(r=new Pe(r.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),Pe(r.line-1,l.length-1),r,"+transpose"))}}i.push(new Jt(r,r))}e.setSelections(i)})},newlineAndIndent:function(e){return Wn(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);qi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ds(e,t){var i=je(e.doc,t),n=Ln(i);return n!=i&&(t=Lt(n)),Wo(!0,e,n,t,1)}function Pl(e,t){var i=je(e.doc,t),n=Vi(i);return n!=i&&(t=Lt(n)),Wo(!0,e,i,t,-1)}function ps(e,t){var i=ds(e,t.line),n=je(e.doc,i.line),r=ft(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 Pe(i.line,l?0:s,i.sticky)}return i}function oo(e,t,i){if(typeof t=="string"&&(t=Nr[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)!=rt}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=or(t,e.state.keyMaps[n],i,e);if(r)return r}return e.options.extraKeys&&or(t,e.options.extraKeys,i,e)||or(t,e.options.keyMap,i,e)}var _l=new Ce;function Pr(e,t,i,n){var r=e.state.keySeq;if(r){if(us(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())}),fs(e,r+" "+t,i,n))return!0}return fs(e,t,i,n)}function fs(e,t,i,n){var r=Bl(e,t,n);return r=="multi"&&(e.state.keySeq=t),r=="handled"&&An(e,"keyHandled",e,t,i),(r=="handled"||r=="multi")&&(y(i),Ao(e)),!!r}function ms(e,t){var i=cs(t,!0);return i?t.shiftKey&&!e.state.keySeq?Pr(e,"Shift-"+i,t,function(n){return oo(e,n,!0)})||Pr(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return oo(e,n)}):Pr(e,i,t,function(n){return oo(e,n)}):!1}function Ul(e,t,i){return Pr(e,"'"+i+"'",t,function(n){return oo(e,n,!0)})}var zo=null;function gs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=ee(),Ne(t,e))return;O&&K<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=ms(t,e);L&&(zo=n?i:null,!n&&i==88&&!Kt&&(Q?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),re&&!Q&&!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;le(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(se(t,"CodeMirror-crosshair"),ot(document,"keyup",i),ot(document,"mouseover",i))}ce(document,"keyup",i),ce(document,"mouseover",i)}function vs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ne(this,e)}function ys(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(fi(t.display,e)||Ne(t,e)||e.ctrlKey&&!e.altKey||Q&&e.metaKey)return;var i=e.keyCode,n=e.charCode;if(L&&i==zo){zo=null,y(e);return}if(L&&(!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 Fl=400,Ho=function(e,t,i){this.time=e,this.pos=t,this.button=i};Ho.prototype.compare=function(e,t,i){return this.time+Fl>e&&Mt(t,this.pos)==0&&i==this.button};var Br,_r;function Wl(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 Ho(i,e,t),Br=null,"double"):(Br=new Ho(i,e,t),_r=null,"single")}function bs(e){var t=this,i=t.display;if(Ne(t,e)||i.activeTouch&&i.input.supportsTouch())return;if(i.input.ensurePolled(),i.shift=e.shiftKey,fi(i,e)){H||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(Go(t,e))return;var n=Pi(t,e),r=_(e),s=n?Wl(n,r):"single";if(window.focus(),r==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,r,n,s,e))return;r==1?n?Gl(t,n,s,e):Y(e)==i.scroller&&y(e):r==2?(n&&$r(t.doc,n),setTimeout(function(){return i.input.focus()},20)):r==3&&(_e?t.display.input.onContextMenu(e):Ca(t))}function zl(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,Pr(e,hs(s,r),r,function(l){if(typeof l=="string"&&(l=Nr[l]),!l)return!1;var p=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),p=l(e,i)!=rt}finally{e.state.suppressEdits=!1}return p})}function Hl(e,t,i){var n=e.getOption("configureMouse"),r=n?n(e,t,i):{};if(r.unit==null){var s=Se?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=Q?i.metaKey:i.ctrlKey),r.moveOnDrag==null&&(r.moveOnDrag=!(Q?i.altKey:i.ctrlKey)),r}function Gl(e,t,i,n){O?setTimeout(E(ba,e),0):e.curOp.focus=ee();var r=Hl(e,i,n),s=e.doc.sel,l;e.options.dragDrop&&be&&!e.isReadOnly()&&i=="single"&&(l=s.contains(t))>-1&&(Mt((l=s.ranges[l]).from(),t)<0||t.xRel>0)&&(Mt(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=bn(e,function(g){H&&(r.scroller.draggable=!1),e.state.draggingText=!1,ot(r.wrapper.ownerDocument,"mouseup",l),ot(r.wrapper.ownerDocument,"mousemove",p),ot(r.scroller,"dragstart",f),ot(r.scroller,"drop",l),s||(y(g),n.addNew||$r(e.doc,i,null,null,n.extend),H&&!oe||O&&K==9?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),p=function(g){s=s||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},f=function(){return s=!0};H&&(r.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),ce(r.wrapper.ownerDocument,"mouseup",l),ce(r.wrapper.ownerDocument,"mousemove",p),ce(r.scroller,"dragstart",f),ce(r.scroller,"drop",l),Ca(e),setTimeout(function(){return r.input.focus()},20)}function Cs(e,t,i){if(i=="char")return new Jt(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Jt(Pe(t.line,0),o(e.doc,Pe(t.line+1,0)));var n=i(e,t);return new Jt(n.from,n.to)}function Ql(e,t,i,n){var r=e.display,s=e.doc;y(t);var l,p,f=s.sel,g=f.ranges;if(n.addNew&&!n.extend?(p=s.sel.contains(i),p>-1?l=g[p]:l=new Jt(i,i)):(l=s.sel.primary(),p=s.sel.primIndex),n.unit=="rectangle")n.addNew||(l=new Jt(i,i)),i=Pi(e,t,!0,!0),p=-1;else{var A=Cs(e,i,n.unit);n.extend?l=_o(l,A.anchor,A.head,n.extend):l=A}n.addNew?p==-1?(p=g.length,kn(s,ri(e,g.concat([l]),p),{scroll:!1,origin:"*mouse"})):g.length>1&&g[p].empty()&&n.unit=="char"&&!n.extend?(kn(s,ri(e,g.slice(0,p).concat(g.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),f=s.sel):Uo(s,p,l,ye):(p=0,kn(s,new Kn([l],0),ye),f=s.sel);var M=i;function Z(Ke){if(Mt(M,Ke)==0)return;if(M=Ke,n.unit=="rectangle"){for(var pt=[],wt=e.options.tabSize,xt=W(je(s,i.line).text,i.ch,wt),Nt=W(je(s,Ke.line).text,Ke.ch,wt),$t=Math.min(xt,Nt),xn=Math.max(xt,Nt),an=Math.min(i.line,Ke.line),zn=Math.min(e.lastLine(),Math.max(i.line,Ke.line));an<=zn;an++){var Pn=je(s,an).text,fn=De(Pn,$t,wt);$t==xn?pt.push(new Jt(Pe(an,fn),Pe(an,fn))):Pn.length>fn&&pt.push(new Jt(Pe(an,fn),Pe(an,De(Pn,xn,wt))))}pt.length||pt.push(new Jt(i,i)),kn(s,ri(e,f.ranges.slice(0,p).concat(pt),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ke)}else{var Bn=l,Sn=Cs(e,Ke,n.unit),vn=Bn.anchor,mn;Mt(Sn.anchor,vn)>0?(mn=Sn.head,vn=Ti(Bn.from(),Sn.anchor)):(mn=Sn.anchor,vn=di(Bn.to(),Sn.head));var ln=f.ranges.slice(0);ln[p]=Jl(e,new Jt(o(s,vn),mn)),kn(s,ri(e,ln,p),ye)}}var G=r.wrapper.getBoundingClientRect(),ve=0;function Le(Ke){var pt=++ve,wt=Pi(e,Ke,!0,n.unit=="rectangle");if(!wt)return;if(Mt(wt,M)!=0){e.curOp.focus=ee(),Z(wt);var xt=Jr(r,s);(wt.line>=xt.to||wt.line<xt.from)&&setTimeout(bn(e,function(){ve==pt&&Le(Ke)}),150)}else{var Nt=Ke.clientY<G.top?-20:Ke.clientY>G.bottom?20:0;Nt&&setTimeout(bn(e,function(){if(ve!=pt)return;r.scroller.scrollTop+=Nt,Le(Ke)}),50)}}function We(Ke){e.state.selectingText=!1,ve=Infinity,Ke&&(y(Ke),r.input.focus()),ot(r.wrapper.ownerDocument,"mousemove",Je),ot(r.wrapper.ownerDocument,"mouseup",lt),s.history.lastSelOrigin=null}var Je=bn(e,function(Ke){Ke.buttons===0||!_(Ke)?We(Ke):Le(Ke)}),lt=bn(e,We);e.state.selectingText=lt,ce(r.wrapper.ownerDocument,"mousemove",Je),ce(r.wrapper.ownerDocument,"mouseup",lt)}function Jl(e,t){var i=t.anchor,n=t.head,r=je(e.doc,i.line);if(Mt(i,n)==0&&i.sticky==n.sticky)return t;var s=ft(r);if(!s)return t;var l=Qe(s,i.ch,i.sticky),p=s[l];if(p.from!=i.ch&&p.to!=i.ch)return t;var f=l+(p.from==i.ch==(p.level!=1)?0:1);if(f==0||f==s.length)return t;var g;if(n.line!=i.line)g=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var A=Qe(s,n.ch,n.sticky),M=A-l||(n.ch-i.ch)*(p.level==1?-1:1);A==f-1||A==f?g=M<0:g=M>0}var Z=s[f+(g?-1:0)],G=g==(Z.level==1),ve=G?Z.from:Z.to,Le=G?"after":"before";return i.ch==ve&&i.sticky==Le?t:new Jt(new Pe(i.line,ve,Le),n)}function xs(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(Z){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&y(t);var l=e.display,p=l.lineDiv.getBoundingClientRect();if(s>p.bottom||!D(e,i))return x(t);s-=p.top-l.viewOffset;for(var f=0;f<e.display.gutterSpecs.length;++f){var g=l.gutters.childNodes[f];if(g&&g.getBoundingClientRect().right>=r){var A=cn(e.doc,s),M=e.display.gutterSpecs[f];return de(e,i,e,A,M.className,t),x(t)}}}function Go(e,t){return xs(e,t,"gutterClick",!0)}function Es(e,t){if(fi(e.display,t)||Kl(e,t))return;if(Ne(e,t,"contextmenu"))return;_e||e.display.input.onContextMenu(t)}function Kl(e,t){return D(e,"gutterContextMenu")?xs(e,t,"gutterContextMenu",!1):!1}function ws(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vr(e)}var sr={toString:function(){return"CodeMirror.Init"}},As={},ao={};function Xl(e){var t=e.optionHandlers;function i(n,r,s,l){e.defaults[n]=r,s&&(t[n]=l?function(p,f,g){g!=sr&&s(p,f,g)}:s)}e.defineOption=i,e.Init=sr,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),In(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 g=0;;){var A=f.text.indexOf(r,g);if(A==-1)break;g=A+r.length,s.push(Pe(l,A))}l++});for(var p=s.length-1;p>=0;p--)ir(n.doc,r,s[p],Pe(s[p].line,s[p].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!=sr&&n.refresh()}),i("specialCharPlaceholder",Ht,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",te?"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",!ze),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){ws(n),Ar(n)},!0),i("keyMap","default",function(n,r,s){var l=ro(r),p=s!=sr&&ro(s);p&&p.detach&&p.detach(n,l),l.attach&&l.attach(n,p||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?Eo(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return $i(n)},!0),i("scrollbarStyle","native",function(n){ka(n),$i(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"&&(Zi(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,Yl),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 Yl(e,t,i){var n=i&&i!=sr;if(!t!=!n){var r=e.display.dragFunctions,s=t?ce:ot;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?(le(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(se(e.display.wrapper,"CodeMirror-wrap"),Fr(e)),wo(e),In(e),vr(e),setTimeout(function(){return $i(e)},100)}function rn(e,t){var i=this;if(!(this instanceof rn))return new rn(e,t);this.options=t=t?v(t):{},v(As,t,!1);var n=t.value;typeof n=="string"?n=new Nn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var r=new rn.inputStyles[t.inputStyle](this),s=this.display=new hl(e,n,r,t);s.wrapper.CodeMirror=this,ws(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ka(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 Ce,keySeq:null,specialChars:null},t.autofocus&&!te&&s.input.focus(),O&&K<11&&setTimeout(function(){return i.display.input.reset(!0)},20),ql(this),Tl(),ji(this),this.curOp.forceUpdate=!0,Ba(this,n),t.autofocus&&!te||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&So(i)},20):Zi(this);for(var l in ao)ao.hasOwnProperty(l)&&ao[l](this,t[l],sr);Ta(this),t.finishInit&&t.finishInit(this);for(var p=0;p<Vo.length;++p)Vo[p](this);Fi(this),H&&t.lineWrapping&&getComputedStyle(s.lineDiv).textRendering=="optimizelegibility"&&(s.lineDiv.style.textRendering="auto")}rn.defaults=As,rn.optionHandlers=ao;function ql(e){var t=e.display;ce(t.scroller,"mousedown",bn(e,bs)),O&&K<11?ce(t.scroller,"dblclick",bn(e,function(f){if(Ne(e,f))return;var g=Pi(e,f);if(!g||Go(e,f)||fi(e.display,f))return;y(f);var A=e.findWordAt(g);$r(e.doc,A.anchor,A.head)})):ce(t.scroller,"dblclick",function(f){return Ne(e,f)||y(f)}),ce(t.scroller,"contextmenu",function(f){return Es(e,f)}),ce(t.input.getField(),"contextmenu",function(f){t.scroller.contains(f.target)||Es(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 g=f.touches[0];return g.radiusX<=1&&g.radiusY<=1}function l(f,g){if(g.left==null)return!0;var A=g.left-f.left,M=g.top-f.top;return A*A+M*M>20*20}ce(t.scroller,"touchstart",function(f){if(!Ne(e,f)&&!s(f)&&!Go(e,f)){t.input.ensurePolled(),clearTimeout(i);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-n.end<=300?n:null},f.touches.length==1&&(t.activeTouch.left=f.touches[0].pageX,t.activeTouch.top=f.touches[0].pageY)}}),ce(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ce(t.scroller,"touchend",function(f){var g=t.activeTouch;if(g&&!fi(t,f)&&g.left!=null&&!g.moved&&new Date-g.start<300){var A=e.coordsChar(t.activeTouch,"page"),M;!g.prev||l(g,g.prev)?M=new Jt(A,A):!g.prev.prev||l(g,g.prev.prev)?M=e.findWordAt(A):M=new Jt(Pe(A.line,0),o(e.doc,Pe(A.line+1,0))),e.setSelection(M.anchor,M.head),e.focus(),y(f)}r()}),ce(t.scroller,"touchcancel",r),ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Cr(e,t.scroller.scrollTop),_i(e,t.scroller.scrollLeft,!0),de(e,"scroll",e))}),ce(t.scroller,"mousewheel",function(f){return Oa(e,f)}),ce(t.scroller,"DOMMouseScroll",function(f){return Oa(e,f)}),ce(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(f){Ne(e,f)||w(f)},over:function(f){Ne(e,f)||(Rl(e,f),w(f))},start:function(f){return Ml(e,f)},drop:bn(e,kl),leave:function(f){Ne(e,f)||as(e)}};var p=t.input.getField();ce(p,"keyup",function(f){return vs.call(e,f)}),ce(p,"keydown",bn(e,gs)),ce(p,"keypress",bn(e,ys)),ce(p,"focus",function(f){return So(e,f)}),ce(p,"blur",function(f){return Zi(e,f)})}var Vo=[];rn.defineInitHook=function(e){return Vo.push(e)};function Ur(e,t,i,n){var r=e.doc,s;i==null&&(i="add"),i=="smart"&&(r.mode.indent?s=He(e,t).state:i="prev");var l=e.options.tabSize,p=je(r,t),f=W(p.text,null,l);p.stateAfter&&(p.stateAfter=null);var g=p.text.match(/^\s*/)[0],A;if(!n&&!/\S/.test(p.text))A=0,i="not";else if(i=="smart"&&(A=r.mode.indent(s,p.text.slice(g.length),p.text),A==rt||A>150)){if(!n)return;i="prev"}i=="prev"?t>r.first?A=W(je(r,t-1).text,null,l):A=0:i=="add"?A=f+e.options.indentUnit:i=="subtract"?A=f-e.options.indentUnit:typeof i=="number"&&(A=f+i),A=Math.max(0,A);var M="",Z=0;if(e.options.indentWithTabs)for(var G=Math.floor(A/l);G;--G)Z+=l,M+=" ";if(Z<A&&(M+=I(A-Z)),M!=g)return ir(r,M,Pe(t,0),Pe(t,g.length),"+input"),p.stateAfter=null,!0;for(var ve=0;ve<r.sel.ranges.length;ve++){var Le=r.sel.ranges[ve];if(Le.head.line==t&&Le.head.ch<g.length){var We=Pe(t,g.length);Uo(r,ve,new Jt(We,We));break}}}var oi=null;function so(e){oi=e}function Qo(e,t,i,n,r){var s=e.doc;e.display.shift=!1,n||(n=s.sel);var l=+new Date-200,p=r=="paste"||e.state.pasteIncoming>l,f=At(t),g=null;if(p&&n.ranges.length>1)if(oi&&oi.text.join(`
`)==t){if(n.ranges.length%oi.text.length==0){g=[];for(var A=0;A<oi.text.length;A++)g.push(s.splitLines(oi.text[A]))}}else f.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(g=Xe(f,function(Je){return[Je]}));for(var M=e.curOp.updateInput,Z=n.ranges.length-1;Z>=0;Z--){var G=n.ranges[Z],ve=G.from(),Le=G.to();G.empty()&&(i&&i>0?ve=Pe(ve.line,ve.ch-i):e.state.overwrite&&!p?Le=Pe(Le.line,Math.min(je(s,Le.line).text.length,Le.ch+Ue(f).length)):p&&oi&&oi.lineWise&&oi.text.join(`
`)==f.join(`
`)&&(ve=Le=Pe(ve.line,0)));var We={from:ve,to:Le,text:g?g[Z%g.length]:f,origin:r||(p?"paste":e.state.cutIncoming>l?"cut":"+input")};nr(e.doc,We),An(e,"inputRead",e,We)}t&&!p&&ks(e,t),qi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=M),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ss(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Wn(t,function(){return Qo(t,i,0,null,"paste")}),!0}function ks(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 p=0;p<s.electricChars.length;p++)if(t.indexOf(s.electricChars.charAt(p))>-1){l=Ur(e,r.head.line,"smart");break}}else s.electricInput&&(s.electricInput.test(je(e.doc,r.head.line).text.slice(0,r.head.ch))&&(l=Ur(e,r.head.line,"smart")));l&&An(e,"electricInput",e,r.head.line)}}function Ms(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:Pe(r,0),head:Pe(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 Ts(){var e=C("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=C("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return H?e.style.width="1000px":e.setAttribute("wrap","off"),z&&(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)&&bn(this,t[n])(this,r,l),de(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"](ro(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:Rn(function(n,r){var s=n.token?n:e.getMode(this.options,n);if(s.startState)throw new Error("Overlays may not be stateful.");et(this.state.overlays,{mode:s,modeSpec:n,opaque:r&&r.opaque,priority:r&&r.priority||0},function(l){return l.priority}),this.state.modeGen++,In(this)}),removeOverlay:Rn(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++,In(this);return}}}),indentLine:Rn(function(n,r,s){typeof r!="string"&&typeof r!="number"&&(r==null?r=this.options.smartIndent?"smart":"prev":r=r?"add":"subtract"),bt(this.doc,n)&&Ur(this,n,r,s)}),indentSelection:Rn(function(n){for(var r=this.doc.sel.ranges,s=-1,l=0;l<r.length;l++){var p=r[l];if(p.empty())p.head.line>s&&(Ur(this,p.head.line,n,!0),s=p.head.line,l==this.doc.sel.primIndex&&qi(this));else{var f=p.from(),g=p.to(),A=Math.max(s,f.line);s=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var M=A;M<s;++M)Ur(this,M,n);var Z=this.doc.sel.ranges;f.ch==0&&r.length==Z.length&&Z[l].from().ch>0&&Uo(this.doc,l,new Jt(f,Z[l].to()),Ie)}}}),getTokenAt:function(n,r){return qt(this,n,r)},getLineTokens:function(n,r){return qt(this,Pe(n),r,!0)},getTokenTypeAt:function(n){n=o(this.doc,n);var r=ke(this,je(this.doc,n.line)),s=0,l=(r.length-1)/2,p=n.ch,f;if(p==0)f=r[2];else for(;;){var g=s+l>>1;if((g?r[g*2-1]:0)>=p)l=g;else if(r[g*2+1]<p)s=g+1;else{f=r[g*2+2];break}}var A=f?f.indexOf("overlay "):-1;return A<0?f:A==0?null:f.slice(0,A-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],p=this.getModeAt(n);if(typeof p[r]=="string")l[p[r]]&&s.push(l[p[r]]);else if(p[r])for(var f=0;f<p[r].length;f++){var g=l[p[r][f]];g&&s.push(g)}else p.helperType&&l[p.helperType]?s.push(l[p.helperType]):l[p.name]&&s.push(l[p.name]);for(var A=0;A<l._global.length;A++){var M=l._global[A];M.pred(p,this)&&we(s,M.val)==-1&&s.push(M.val)}return s},getStateAfter:function(n,r){var s=this.doc;return n=c(s,n==null?s.first+s.size-1:n),He(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(),ii(this,s,r||"page")},charCoords:function(n,r){return vo(this,o(this.doc,n),r||"page")},coordsChar:function(n,r){return n=ca(this,n,r||"page"),bo(this,n.left,n.top)},lineAtHeight:function(n,r){return n=ca(this,{top:n,left:0},r||"page").top,cn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,r,s){var l=!1,p;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),p=je(this.doc,n)}else p=n;return Hr(this,p,{top:0,left:0},r||"page",s||l).top+(l?this.doc.height-ni(p):0)},defaultTextHeight:function(){return Xi(this.display)},defaultCharWidth:function(){return Yi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,r,s,l,p){var f=this.display;n=ii(this,o(this.doc,n));var g=n.bottom,A=n.left;if(r.style.position="absolute",r.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(r),f.sizer.appendChild(r),l=="over")g=n.top;else if(l=="above"||l=="near"){var M=Math.max(f.wrapper.clientHeight,this.doc.height),Z=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);(l=="above"||n.bottom+r.offsetHeight>M)&&n.top>r.offsetHeight?g=n.top-r.offsetHeight:n.bottom+r.offsetHeight<=M&&(g=n.bottom),A+r.offsetWidth>Z&&(A=Z-r.offsetWidth)}r.style.top=g+"px",r.style.left=r.style.right="",p=="right"?(A=f.sizer.clientWidth-r.offsetWidth,r.style.right="0px"):(p=="left"?A=0:p=="middle"&&(A=(f.sizer.clientWidth-r.offsetWidth)/2),r.style.left=A+"px"),s&&Ys(this,{left:A,top:g,right:A+r.offsetWidth,bottom:g+r.offsetHeight})},triggerOnKeyDown:Rn(gs),triggerOnKeyPress:Rn(ys),triggerOnKeyUp:vs,triggerOnMouseDown:Rn(bs),execCommand:function(n){if(Nr.hasOwnProperty(n))return Nr[n].call(null,this)},triggerElectric:Rn(function(n){ks(this,n)}),findPosH:function(n,r,s,l){var p=1;r<0&&(p=-1,r=-r);for(var f=o(this.doc,n),g=0;g<r&&!(f=Jo(this.doc,f,p,s,l),f.hitSide);++g);return f},moveH:Rn(function(n,r){var s=this;this.extendSelectionsBy(function(l){return s.display.shift||s.doc.extend||l.empty()?Jo(s.doc,l.head,n,r,s.options.rtlMoveVisually):n<0?l.from():l.to()},Ae)}),deleteH:Rn(function(n,r){var s=this.doc.sel,l=this.doc;s.somethingSelected()?l.replaceSelection("",null,"+delete"):ar(this,function(p){var f=Jo(l,p.head,n,r,!1);return n<0?{from:f,to:p.head}:{from:p.head,to:f}})}),findPosV:function(n,r,s,l){var p=1,f=l;r<0&&(p=-1,r=-r);for(var g=o(this.doc,n),A=0;A<r;++A){var M=ii(this,g,"div");if(f==null?f=M.left:M.left=f,g=Ds(this,M,p,s),g.hitSide)break}return g},moveV:Rn(function(n,r){var s=this,l=this.doc,p=[],f=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(A){if(f)return n<0?A.from():A.to();var M=ii(s,A.head,"div");A.goalColumn!=null&&(M.left=A.goalColumn),p.push(M.left);var Z=Ds(s,M,n,r);return r=="page"&&A==l.sel.primary()&&Mo(s,vo(s,Z,"div").top-M.top),Z},Ae),p.length)for(var g=0;g<l.sel.ranges.length;g++)l.sel.ranges[g].goalColumn=p[g]}),findWordAt:function(n){var r=this.doc,s=je(r,n.line).text,l=n.ch,p=n.ch;if(s){var f=this.getHelper(n,"wordChars");(n.sticky=="before"||p==s.length)&&l?--l:++p;for(var g=s.charAt(l),A=Re(g,f)?function(M){return Re(M,f)}:/\s/.test(g)?function(M){return/\s/.test(M)}:function(M){return!/\s/.test(M)&&!Re(M)};l>0&&A(s.charAt(l-1));)--l;for(;p<s.length&&A(s.charAt(p));)++p}return new Jt(Pe(n.line,l),Pe(n.line,p))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?le(this.display.cursorDiv,"CodeMirror-overwrite"):se(this.display.cursorDiv,"CodeMirror-overwrite"),de(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==ee()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Rn(function(n,r){br(this,n,r)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-li(this)-this.display.barHeight,width:n.scrollWidth-li(this)-this.display.barWidth,clientHeight:fo(this),clientWidth:Ii(this)}},scrollIntoView:Rn(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:Pe(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):Ea(this,n.from,n.to,n.margin)}),setSize:Rn(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&&la(this);var p=this.display.viewFrom;this.doc.iter(p,this.display.viewTo,function(f){if(f.widgets){for(var g=0;g<f.widgets.length;g++)if(f.widgets[g].noHScroll){Ci(s,p,"widget");break}}++p}),this.curOp.forceUpdate=!0,de(this,"refresh",this)}),operation:function(n){return Wn(this,n)},startOperation:function(){return ji(this)},endOperation:function(){return Fi(this)},refresh:Rn(function(){var n=this.display.cachedTextHeight;In(this),this.curOp.forceUpdate=!0,vr(this),br(this,this.doc.scrollLeft,this.doc.scrollTop),Do(this.display),(n==null||Math.abs(n-Xi(this.display))>.5||this.options.lineWrapping)&&wo(this),de(this,"refresh",this)}),swapDoc:Rn(function(n){var r=this.doc;return r.cm=null,this.state.selectingText&&this.state.selectingText(),Ba(this,n),vr(this),this.display.input.reset(),br(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,An(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}},N(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 Jo(e,t,i,n,r){var s=t,l=i,p=je(e,t.line),f=r&&e.direction=="rtl"?-i:i;function g(){var lt=t.line+f;return lt<e.first||lt>=e.first+e.size?!1:(t=new Pe(lt,t.ch,t.sticky),p=je(e,lt))}function A(lt){var Ke;if(n=="codepoint"){var pt=p.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(pt)?Ke=null:Ke=new Pe(t.line,Math.max(0,Math.min(p.text.length,t.ch+i*(pt>=55296&&pt<56320?2:1))),-i)}else r?Ke=Nl(e.cm,p,t,i):Ke=Fo(p,t,i);if(Ke==null)if(!lt&&g())t=Wo(r,e.cm,p,t.line,f);else return!1;else t=Ke;return!0}if(n=="char"||n=="codepoint")A();else if(n=="column")A(!0);else if(n=="word"||n=="group")for(var M=null,Z=n=="group",G=e.cm&&e.cm.getHelper(t,"wordChars"),ve=!0;!(i<0&&!A(!ve));ve=!1){var Le=p.text.charAt(t.ch)||`
`,We=Re(Le,G)?"w":Z&&Le==`
`?"n":!Z||/\s/.test(Le)?null:"p";if(Z&&!ve&&!We&&(We="s"),M&&M!=We){i<0&&(i=1,A(),t.sticky="after");break}if(We&&(M=We),i>0&&!A(!ve))break}var Je=to(e,t,s,l,!0);return ci(s,Je)&&(Je.hitSide=!0),Je}function Ds(e,t,i,n){var r=e.doc,s=t.left,l;if(n=="page"){var p=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),f=Math.max(p-.5*Xi(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 g;!(g=bo(e,s,l),!g.outside);){if(i<0?l<=0:l>=r.height){g.hitSide=!0;break}l+=i*5}return g}var Zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Zt.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(p){for(var f=p.target;f;f=f.parentNode){if(f==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(f.className))break}return!1}ce(r,"paste",function(p){if(!s(p)||Ne(n,p)||Ss(p,n))return;K<=11&&setTimeout(bn(n,function(){return t.updateFromDOM()}),20)}),ce(r,"compositionstart",function(p){t.composing={data:p.data,done:!1}}),ce(r,"compositionupdate",function(p){t.composing||(t.composing={data:p.data,done:!1})}),ce(r,"compositionend",function(p){t.composing&&(p.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ce(r,"touchstart",function(){return i.forceCompositionEnd()}),ce(r,"input",function(){t.composing||t.readFromDOMSoon()});function l(p){if(!s(p)||Ne(n,p))return;if(n.somethingSelected())so({lineWise:!1,text:n.getSelections()}),p.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var f=Ms(n);so({lineWise:!0,text:f.text}),p.type=="cut"&&n.operation(function(){n.setSelections(f.ranges,0,Ie),n.replaceSelection("",null,"cut")})}else return;if(p.clipboardData){p.clipboardData.clearData();var g=oi.text.join(`
`);if(p.clipboardData.setData("Text",g),p.clipboardData.getData("Text")==g){p.preventDefault();return}}var A=Ts(),M=A.firstChild;n.display.lineSpace.insertBefore(A,n.display.lineSpace.firstChild),M.value=oi.text.join(`
`);var Z=document.activeElement;Me(M),setTimeout(function(){n.display.lineSpace.removeChild(A),Z.focus(),Z==r&&i.showPrimarySelection()},50)}ce(r,"copy",l),ce(r,"cut",l)},Zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Zt.prototype.prepareSelection=function(){var e=va(this.cm,!1);return e.focus=document.activeElement==this.div,e},Zt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Zt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Zt.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=lo(t,e.anchorNode,e.anchorOffset),l=lo(t,e.focusNode,e.focusOffset);if(s&&!s.bad&&l&&!l.bad&&Mt(Ti(s,l),n)==0&&Mt(di(s,l),r)==0)return;var p=t.display.view,f=n.line>=t.display.viewFrom&&Ls(t,n)||{node:p[0].measure.map[2],offset:0},g=r.line<t.display.viewTo&&Ls(t,r);if(!g){var A=p[p.length-1].measure,M=A.maps?A.maps[A.maps.length-1]:A.map;g={node:M[M.length-1],offset:M[M.length-2]-M[M.length-3]}}if(!f||!g){e.removeAllRanges();return}var Z=e.rangeCount&&e.getRangeAt(0),G;try{G=U(f.node,f.offset,g.offset,g.node)}catch(ve){}G&&(!re&&t.state.focused?(e.collapse(f.node,f.offset),G.collapsed||(e.removeAllRanges(),e.addRange(G))):(e.removeAllRanges(),e.addRange(G)),Z&&e.anchorNode==null?e.addRange(Z):re&&this.startGracePeriod()),this.rememberSelection()},Zt.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)},Zt.prototype.showMultipleSelections=function(e){k(this.cm.display.cursorDiv,e.cursors),k(this.cm.display.selectionDiv,e.selection)},Zt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Zt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return S(this.div,t)},Zt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Zt.prototype.blur=function(){this.div.blur()},Zt.prototype.getField=function(){return this.div},Zt.prototype.supportsTouch=function(){return!0},Zt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Wn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Zt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Zt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(P&&R&&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=lo(t,e.anchorNode,e.anchorOffset),n=lo(t,e.focusNode,e.focusOffset);i&&n&&Wn(t,function(){kn(t.doc,Ei(i,n),Ie),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},Zt.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=Pe(n.line-1,je(e.doc,n.line-1).length)),r.ch==je(e.doc,r.line).text.length&&r.line<e.lastLine()&&(r=Pe(r.line+1,0)),n.line<t.viewFrom||r.line>t.viewTo-1)return!1;var s,l,p;n.line==t.viewFrom||(s=Bi(e,n.line))==0?(l=Lt(t.view[0].line),p=t.view[0].node):(l=Lt(t.view[s].line),p=t.view[s-1].node.nextSibling);var f=Bi(e,r.line),g,A;if(f==t.view.length-1?(g=t.viewTo-1,A=t.lineDiv.lastChild):(g=Lt(t.view[f+1].line)-1,A=t.view[f+1].node.previousSibling),!p)return!1;for(var M=e.doc.splitLines(tu(e,p,A,l,g)),Z=Gt(e.doc,Pe(l,0),Pe(g,je(e.doc,g).text.length));M.length>1&&Z.length>1;)if(Ue(M)==Ue(Z))M.pop(),Z.pop(),g--;else if(M[0]==Z[0])M.shift(),Z.shift(),l++;else break;for(var G=0,ve=0,Le=M[0],We=Z[0],Je=Math.min(Le.length,We.length);G<Je&&Le.charCodeAt(G)==We.charCodeAt(G);)++G;for(var lt=Ue(M),Ke=Ue(Z),pt=Math.min(lt.length-(M.length==1?G:0),Ke.length-(Z.length==1?G:0));ve<pt&&lt.charCodeAt(lt.length-ve-1)==Ke.charCodeAt(Ke.length-ve-1);)++ve;if(M.length==1&&Z.length==1&&l==n.line)for(;G&&G>n.ch&&lt.charCodeAt(lt.length-ve-1)==Ke.charCodeAt(Ke.length-ve-1);)G--,ve++;M[M.length-1]=lt.slice(0,lt.length-ve).replace(/^\u200b+/,""),M[0]=M[0].slice(G).replace(/\u200b+$/,"");var wt=Pe(l,G),xt=Pe(g,Z.length?Ue(Z).length-ve:0);if(M.length>1||M[0]||Mt(wt,xt))return ir(e.doc,M,wt,xt,"+input"),!0},Zt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zt.prototype.reset=function(){this.forceCompositionEnd()},Zt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Zt.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)},Zt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wn(this.cm,function(){return In(e.cm)})},Zt.prototype.setUneditable=function(e){e.contentEditable="false"},Zt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||bn(this.cm,Qo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Zt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Zt.prototype.onContextMenu=function(){},Zt.prototype.resetPosition=function(){},Zt.prototype.needsContentAttribute=!0;function Ls(e,t){var i=mo(e,t.line);if(!i||i.hidden)return null;var n=je(e.doc,t.line),r=ia(i,n,t.line),s=ft(n,e.doc.direction),l="left";if(s){var p=Qe(s,t.ch);l=p%2?"right":"left"}var f=aa(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 lr(e,t){return t&&(e.bad=!0),e}function tu(e,t,i,n,r){var s="",l=!1,p=e.doc.lineSeparator(),f=!1;function g(G){return function(ve){return ve.id==G}}function A(){l&&(s+=p,f&&(s+=p),l=f=!1)}function M(G){G&&(A(),s+=G)}function Z(G){if(G.nodeType==1){var ve=G.getAttribute("cm-text");if(ve){M(ve);return}var Le=G.getAttribute("cm-marker"),We;if(Le){var Je=e.findMarks(Pe(n,0),Pe(r+1,0),g(+Le));Je.length&&(We=Je[0].find(0))&&M(Gt(e.doc,We.from,We.to).join(p));return}if(G.getAttribute("contenteditable")=="false")return;var lt=/^(pre|div|p|li|table|br)$/i.test(G.nodeName);if(!/^br$/i.test(G.nodeName)&&G.textContent.length==0)return;lt&&A();for(var Ke=0;Ke<G.childNodes.length;Ke++)Z(G.childNodes[Ke]);/^(pre|p)$/i.test(G.nodeName)&&(f=!0),lt&&(l=!0)}else G.nodeType==3&&M(G.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Z(t),t==i);)t=t.nextSibling,f=!1;return s}function lo(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return lr(e.clipPos(Pe(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||!S(n,t))return lr(Pe(Lt(e.line),0),!0);if(t==n&&(r=!0,t=n.childNodes[i],i=0,!t)){var s=e.rest?Ue(e.rest):e.line;return lr(Pe(Lt(s),s.text.length),r)}var l=t.nodeType==3?t:null,p=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,i&&(i=l.nodeValue.length));p.parentNode!=n;)p=p.parentNode;var f=e.measure,g=f.maps;function A(We,Je,lt){for(var Ke=-1;Ke<(g?g.length:0);Ke++)for(var pt=Ke<0?f.map:g[Ke],wt=0;wt<pt.length;wt+=3){var xt=pt[wt+2];if(xt==We||xt==Je){var Nt=Lt(Ke<0?e.line:e.rest[Ke]),$t=pt[wt]+lt;return(lt<0||xt!=We)&&($t=pt[wt+(lt?1:0)]),Pe(Nt,$t)}}}var M=A(l,p,i);if(M)return lr(M,r);for(var Z=p.nextSibling,G=l?l.nodeValue.length-i:0;Z;Z=Z.nextSibling){if(M=A(Z,Z.firstChild,0),M)return lr(Pe(M.line,M.ch-G),r);G+=Z.textContent.length}for(var ve=p.previousSibling,Le=i;ve;ve=ve.previousSibling){if(M=A(ve,ve.firstChild,-1),M)return lr(Pe(M.line,M.ch+Le),r);Le+=ve.textContent.length}}var hn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ce,this.hasSelection=!1,this.composing=null};hn.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),z&&(r.style.width="0px"),ce(r,"input",function(){O&&K>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),ce(r,"paste",function(l){if(Ne(n,l)||Ss(l,n))return;n.state.pasteIncoming=+new Date,i.fastPoll()});function s(l){if(Ne(n,l))return;if(n.somethingSelected())so({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var p=Ms(n);so({lineWise:!0,text:p.text}),l.type=="cut"?n.setSelections(p.ranges,null,Ie):(i.prevInput="",r.value=p.text.join(`
`),Me(r))}else return;l.type=="cut"&&(n.state.cutIncoming=+new Date)}ce(r,"cut",s),ce(r,"copy",s),ce(e.scroller,"paste",function(l){if(fi(e,l)||Ne(n,l))return;if(!r.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var p=new Event("paste");p.clipboardData=l.clipboardData,r.dispatchEvent(p)}),ce(e.lineSpace,"selectstart",function(l){fi(e,l)||y(l)}),ce(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"})}}),ce(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},hn.prototype.createField=function(e){this.wrapper=Ts(),this.textarea=this.wrapper.firstChild},hn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=va(e);if(e.options.moveInputWithCursor){var r=ii(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},hn.prototype.showSelection=function(e){var t=this.cm,i=t.display;k(i.cursorDiv,e.cursors),k(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},hn.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&&Me(this.textarea),O&&K>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",O&&K>=9&&(this.hasSelection=null))},hn.prototype.getField=function(){return this.textarea},hn.prototype.supportsTouch=function(){return!1},hn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!te||ee()!=this.textarea))try{this.textarea.focus()}catch(e){}},hn.prototype.blur=function(){this.textarea.blur()},hn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},hn.prototype.receivedFocus=function(){this.slowPoll()},hn.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()})},hn.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)},hn.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ct(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(O&&K>=9&&this.hasSelection===r||Q&&/[\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,p=Math.min(n.length,r.length);l<p&&n.charCodeAt(l)==r.charCodeAt(l);)++l;return Wn(t,function(){Qo(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},hn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},hn.prototype.onKeyPress=function(){O&&K>=9&&(this.hasSelection=null),this.fastPoll()},hn.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var s=Pi(i,e),l=n.scroller.scrollTop;if(!s||L)return;var p=i.options.resetSelectionOnContextMenu;p&&i.doc.sel.contains(s)==-1&&bn(i,kn)(i.doc,Ei(s),Ie);var f=r.style.cssText,g=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",r.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+`px;
z-index: 1000; background: `+(O?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var M;H&&(M=window.scrollY),n.input.focus(),H&&window.scrollTo(null,M),n.input.reset(),i.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=G,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function Z(){if(r.selectionStart!=null){var Le=i.somethingSelected(),We="\u200B"+(Le?r.value:"");r.value="\u21DA",r.value=We,t.prevInput=Le?"":"\u200B",r.selectionStart=1,r.selectionEnd=We.length,n.selForContextMenu=i.doc.sel}}function G(){if(t.contextMenuPending!=G)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=g,r.style.cssText=f,O&&K<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),r.selectionStart!=null){(!O||O&&K<9)&&Z();var Le=0,We=function(){n.selForContextMenu==i.doc.sel&&r.selectionStart==0&&r.selectionEnd>0&&t.prevInput=="\u200B"?bn(i,Xa)(i):Le++<10?n.detectingSelectAll=setTimeout(We,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(We,200)}}if(O&&K>=9&&Z(),_e){w(e);var ve=function(){ot(window,"mouseup",ve),setTimeout(G,20)};ce(window,"mouseup",ve)}else setTimeout(G,50)},hn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},hn.prototype.setUneditable=function(){},hn.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?v(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=ee();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=p.getValue()}var r;if(e.form&&(ce(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&&(ot(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=r))}},e.style.display="none";var p=rn(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return p}function ru(e){e.off=ot,e.on=ce,e.wheelEventPixels=cl,e.Doc=Nn,e.splitLines=At,e.countColumn=W,e.findColumn=De,e.isWordChar=Be,e.Pass=rt,e.signal=de,e.Line=Oi,e.changeEnd=wi,e.scrollbarModel=Sa,e.Pos=Pe,e.cmpPos=Mt,e.modes=Rt,e.mimeModes=Ct,e.resolveMode=nt,e.getMode=en,e.modeExtensions=tn,e.extendMode=nn,e.copyState=Un,e.startState=Yt,e.innerMode=qn,e.commands=Nr,e.keyMap=mi,e.keyName=cs,e.isModifierKey=us,e.lookupKey=or,e.normalizeKeyMap=Il,e.StringStream=vt,e.SharedTextMarker=Lr,e.TextMarker=Si,e.LineWidget=Dr,e.e_preventDefault=y,e.e_stopPropagation=b,e.e_stop=w,e.addClass=le,e.contains=S,e.rmClass=se,e.keyNames=ki}Xl(rn),$l(rn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var uo in Nn.prototype)Nn.prototype.hasOwnProperty(uo)&&we(ou,uo)<0&&(rn.prototype[uo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Nn.prototype[uo]));return N(Nn),rn.inputStyles={textarea:hn,contenteditable:Zt},rn.defineMode=function(e){!rn.defaults.mode&&e!="null"&&(rn.defaults.mode=e),It.apply(this,arguments)},rn.defineMIME=Wt,rn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),rn.defineMIME("text/plain","null"),rn.defineExtension=function(e,t){rn.prototype[e]=t},rn.defineDocExtension=function(e,t){Nn.prototype[e]=t},rn.fromTextArea=iu,ru(rn),rn.version="5.58.2",rn})},W6BS:function(Ee,ue){Ee.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/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2m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+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},Xsq0:function(Ee,ue,m){Ee.exports=m.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(Ee,ue,m){"use strict";m.r(ue),m.d(ue,"ResizableTextArea",function(){return we});var F=m("wx14"),Oe=m("1OyB"),re=m("vuIU"),ge=m("Ji7U"),me=m("LK+K"),fe=m("q1tI"),O=m("VTBJ"),K=m("rePB"),H=m("Zm9Q"),he=m("Kwbf"),R=m("c+Xe"),L=m("m+aA"),oe=m("bdgK"),X=new Map;function j(Ie){Ie.forEach(function(ye){var Ae,De=ye.target;(Ae=X.get(De))===null||Ae===void 0||Ae.forEach(function(V){return V(De)})})}var z=new oe.default(j),P=null,te=null;function Q(Ie,ye){X.has(Ie)||(X.set(Ie,new Set),z.observe(Ie)),X.get(Ie).add(ye)}function Se(Ie,ye){X.has(Ie)&&(X.get(Ie).delete(ye),X.get(Ie).size||(z.unobserve(Ie),X.delete(Ie)))}var ze=function(Ie){Object(ge.a)(Ae,Ie);var ye=Object(me.a)(Ae);function Ae(){return Object(Oe.a)(this,Ae),ye.apply(this,arguments)}return Object(re.a)(Ae,[{key:"render",value:function(){return this.props.children}}]),Ae}(fe.Component),ae=fe.createContext(null);function ne(Ie){var ye=Ie.children,Ae=Ie.onBatchResize,De=fe.useRef(0),V=fe.useRef([]),I=fe.useContext(ae),Ue=fe.useCallback(function(Xe,et,qe){De.current+=1;var $e=De.current;V.current.push({size:Xe,element:et,data:qe}),Promise.resolve().then(function(){$e===De.current&&(Ae==null||Ae(V.current),V.current=[])}),I==null||I(Xe,et,qe)},[Ae,I]);return fe.createElement(ae.Provider,{value:Ue},ye)}function _e(Ie){var ye=Ie.children,Ae=Ie.disabled,De=fe.useRef(null),V=fe.useRef(null),I=fe.useContext(ae),Ue=fe.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Xe=fe.isValidElement(ye)&&Object(R.c)(ye),et=Xe?ye.ref:null,qe=fe.useMemo(function(){return Object(R.a)(et,De)},[et,De]),$e=fe.useRef(Ie);$e.current=Ie;var pe=fe.useCallback(function(Be){var Re=$e.current,tt=Re.onResize,Ge=Re.data,xe=Be.getBoundingClientRect(),Fe=xe.width,ut=xe.height,at=Be.offsetWidth,Ve=Be.offsetHeight,Qe=Math.floor(Fe),yt=Math.floor(ut);if(Ue.current.width!==Qe||Ue.current.height!==yt||Ue.current.offsetWidth!==at||Ue.current.offsetHeight!==Ve){var ft={width:Qe,height:yt,offsetWidth:at,offsetHeight:Ve};Ue.current=ft;var st=at===Math.round(Fe)?Fe:at,ce=Ve===Math.round(ut)?ut:Ve,gt=Object(O.a)(Object(O.a)({},ft),{},{offsetWidth:st,offsetHeight:ce});I==null||I(gt,Be,Ge),tt&&Promise.resolve().then(function(){tt(gt,Be)})}},[]);return fe.useEffect(function(){var Be=Object(L.a)(De.current)||Object(L.a)(V.current);return Be&&!Ae&&Q(Be,pe),function(){return Se(Be,pe)}},[De.current,Ae]),fe.createElement(ze,{ref:V},Xe?fe.cloneElement(ye,{ref:qe}):ye)}var ie="rc-observer-key";function se(Ie){var ye=Ie.children,Ae=Object(H.a)(ye);return Ae.map(function(De,V){var I=(De==null?void 0:De.key)||"".concat(ie,"-").concat(V);return fe.createElement(_e,Object(F.a)({},Ie,{key:I}),De)})}se.Collection=ne;var $=se,k=m("bT9E"),C=m("TSYQ"),J=m.n(C),U=`
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
`,S=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],ee={},le;function q(Ie){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ae=Ie.getAttribute("id")||Ie.getAttribute("data-reactid")||Ie.getAttribute("name");if(ye&&ee[Ae])return ee[Ae];var De=window.getComputedStyle(Ie),V=De.getPropertyValue("box-sizing")||De.getPropertyValue("-moz-box-sizing")||De.getPropertyValue("-webkit-box-sizing"),I=parseFloat(De.getPropertyValue("padding-bottom"))+parseFloat(De.getPropertyValue("padding-top")),Ue=parseFloat(De.getPropertyValue("border-bottom-width"))+parseFloat(De.getPropertyValue("border-top-width")),Xe=S.map(function(qe){return"".concat(qe,":").concat(De.getPropertyValue(qe))}).join(";"),et={sizingStyle:Xe,paddingSize:I,borderSize:Ue,boxSizing:V};return ye&&Ae&&(ee[Ae]=et),et}function Me(Ie){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,De=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;le||(le=document.createElement("textarea"),le.setAttribute("tab-index","-1"),le.setAttribute("aria-hidden","true"),document.body.appendChild(le)),Ie.getAttribute("wrap")?le.setAttribute("wrap",Ie.getAttribute("wrap")):le.removeAttribute("wrap");var V=q(Ie,ye),I=V.paddingSize,Ue=V.borderSize,Xe=V.boxSizing,et=V.sizingStyle;le.setAttribute("style","".concat(et,";").concat(U)),le.value=Ie.value||Ie.placeholder||"";var qe=Number.MIN_SAFE_INTEGER,$e=Number.MAX_SAFE_INTEGER,pe=le.scrollHeight,Be;if(Xe==="border-box"?pe+=Ue:Xe==="content-box"&&(pe-=I),Ae!==null||De!==null){le.value=" ";var Re=le.scrollHeight-I;Ae!==null&&(qe=Re*Ae,Xe==="border-box"&&(qe=qe+I+Ue),pe=Math.max(qe,pe)),De!==null&&($e=Re*De,Xe==="border-box"&&($e=$e+I+Ue),Be=pe>$e?"":"hidden",pe=Math.min($e,pe))}return{height:pe,minHeight:qe,maxHeight:$e,overflowY:Be,resize:"none"}}var E=m("Gytx"),v=m.n(E),W;(function(Ie){Ie[Ie.NONE=0]="NONE",Ie[Ie.RESIZING=1]="RESIZING",Ie[Ie.RESIZED=2]="RESIZED"})(W||(W={}));var Ce=function(Ie){Object(ge.a)(Ae,Ie);var ye=Object(me.a)(Ae);function Ae(De){var V;return Object(Oe.a)(this,Ae),V=ye.call(this,De),V.nextFrameActionId=void 0,V.resizeFrameId=void 0,V.textArea=void 0,V.saveTextArea=function(I){V.textArea=I},V.handleResize=function(I){var Ue=V.state.resizeStatus,Xe=V.props,et=Xe.autoSize,qe=Xe.onResize;if(Ue!==W.NONE)return;typeof qe=="function"&&qe(I),et&&V.resizeOnNextFrame()},V.resizeOnNextFrame=function(){cancelAnimationFrame(V.nextFrameActionId),V.nextFrameActionId=requestAnimationFrame(V.resizeTextarea)},V.resizeTextarea=function(){var I=V.props.autoSize;if(!I||!V.textArea)return;var Ue=I.minRows,Xe=I.maxRows,et=Me(V.textArea,!1,Ue,Xe);V.setState({textareaStyles:et,resizeStatus:W.RESIZING},function(){cancelAnimationFrame(V.resizeFrameId),V.resizeFrameId=requestAnimationFrame(function(){V.setState({resizeStatus:W.RESIZED},function(){V.resizeFrameId=requestAnimationFrame(function(){V.setState({resizeStatus:W.NONE}),V.fixFirefoxAutoScroll()})})})})},V.renderTextArea=function(){var I=V.props,Ue=I.prefixCls,Xe=Ue===void 0?"rc-textarea":Ue,et=I.autoSize,qe=I.onResize,$e=I.className,pe=I.disabled,Be=V.state,Re=Be.textareaStyles,tt=Be.resizeStatus,Ge=Object(k.a)(V.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),xe=J()(Xe,$e,Object(K.a)({},"".concat(Xe,"-disabled"),pe));"value"in Ge&&(Ge.value=Ge.value||"");var Fe=Object(O.a)(Object(O.a)(Object(O.a)({},V.props.style),Re),tt===W.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return fe.createElement($,{onResize:V.handleResize,disabled:!(et||qe)},fe.createElement("textarea",Object(F.a)({},Ge,{className:xe,style:Fe,ref:V.saveTextArea})))},V.state={textareaStyles:{},resizeStatus:W.NONE},V}return Object(re.a)(Ae,[{key:"componentDidUpdate",value:function(V){(V.value!==this.props.value||!v()(V.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 V=this.textArea.selectionStart,I=this.textArea.selectionEnd;this.textArea.setSelectionRange(V,I)}}catch(Ue){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ae}(fe.Component),we=Ce,Ze=function(Ie){Object(ge.a)(Ae,Ie);var ye=Object(me.a)(Ae);function Ae(De){var V;Object(Oe.a)(this,Ae),V=ye.call(this,De),V.resizableTextArea=void 0,V.focus=function(){V.resizableTextArea.textArea.focus()},V.saveTextArea=function(Ue){V.resizableTextArea=Ue},V.handleChange=function(Ue){var Xe=V.props.onChange;V.setValue(Ue.target.value,function(){V.resizableTextArea.resizeTextarea()}),Xe&&Xe(Ue)},V.handleKeyDown=function(Ue){var Xe=V.props,et=Xe.onPressEnter,qe=Xe.onKeyDown;Ue.keyCode===13&&et&&et(Ue),qe&&qe(Ue)};var I=typeof De.value=="undefined"||De.value===null?De.defaultValue:De.value;return V.state={value:I},V}return Object(re.a)(Ae,[{key:"setValue",value:function(V,I){"value"in this.props||this.setState({value:V},I)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return fe.createElement(we,Object(F.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(V){return"value"in V?{value:V.value}:null}}]),Ae}(fe.Component),rt=ue.default=Ze},ZW9T:function(Ee,ue,m){"use strict";m.d(ue,"a",function(){return ze});var F=m("k1fw"),Oe=m("miYZ"),re=m("tsqr"),ge=m("rAM+"),me=m("tJVT"),fe=m("PpiC"),O=m("q1tI"),K=m.n(O),H=m("bdgK");function he(ae,ne,_e,ie,se){var $=ne.getWordUntilPosition(_e),k={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:$.startColumn,endColumn:$.endColumn},C=ie.map(function(J){return{label:J,kind:ae.languages.CompletionItemKind.Keyword,insertText:J,insertTextRules:ae.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:k}});return se.map(function(J){C.push(Object(F.a)(Object(F.a)({},J),{},{range:k}))}),C}var R=function(ae){var ne={label:"ifelse",kind:ae.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:ae.languages.CompletionItemInsertTextRule.InsertAsSnippet},_e=["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"];ae.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(k,C){var J=he(ae,k,C,_e,[ne]);return{suggestions:J}}});var ie=["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"];ae.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(k,C){var J=[{label:"print",kind:ae.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:ae.languages.CompletionItemInsertTextRule.InsertAsSnippet}],U=he(ae,k,C,ie,J);return{suggestions:U}}});var se=["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"];ae.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(k,C){var J=[ne,{label:"main",kind:ae.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:ae.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:ae.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:ae.languages.CompletionItemInsertTextRule.InsertAsSnippet}],U=he(ae,k,C,se,J);return{suggestions:U}}})},L="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",oe=m("LvDl");function X(ae){return/^\d+$/.test(ae)?"".concat(ae,"px"):ae}function j(){}var z=!1,P={"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 te(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ne=ae;if(Array.isArray(ae)){for(var _e=0;_e<ae.length;_e++){var ie=P[ae[_e]];if(ie)return ie}return ne[0]}return P[ne]||ne}var Q=null,Se=ue.b=function(ae){var ne=ae.width,_e=ne===void 0?"100%":ne,ie=ae.height,se=ie===void 0?"100%":ie,$=ae.value,k=ae.language,C=k===void 0?"javascript":k,J=ae.style,U=J===void 0?{}:J,S=ae.options,ee=S===void 0?{}:S,le=ae.overrideServices,q=le===void 0?{}:le,Me=ae.theme,E=Me===void 0?"vs-dark":Me,v=ae.onEditBlur,W=ae.onSave,Ce=ae.autoHeight,we=Ce===void 0?!1:Ce,Ze=ae.forbidCopy,rt=Ze===void 0?!1:Ze,Ie=ae.onChange,ye=Ie===void 0?j:Ie,Ae=ae.editorDidMount,De=Ae===void 0?j:Ae,V=ae.onFocus,I=V===void 0?j:V,Ue=ae.filename,Xe=Ue===void 0?"educoder.txt":Ue,et=Object(fe.a)(ae,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),qe=Object(O.useRef)(),$e=Object(O.useRef)({}),pe=Object(O.useRef)(),Be=Object(O.useRef)(!1),Re=Object(O.useRef)(),tt=Object(O.useState)(!1),Ge=Object(me.a)(tt,2),xe=Ge[0],Fe=Ge[1];function ut(){var x;return qe.current&&(x=new H.default(function(w){var Y=Object(ge.a)(w),_;try{for(Y.s();!(_=Y.n()).done;){var be=_.value;(be.target.offsetHeight>0||be.target.offsetWidth>0)&&$e.current.instance.layout()}}catch(Ye){Y.e(Ye)}finally{Y.f()}}),x.observe(qe.current)),x}function at(){re.b.warn(decodeURIComponent(L))}var Ve=function(){var w=$e.current.instance;if($!=null&&w&&xe){var Y=w.getModel();Y&&$!==Y.getValue()&&(z=!0,Y.setValue($),w.layout(),z=!1)}};Object(O.useEffect)(function(){pe.current&&clearTimeout(pe.current),pe.current=setTimeout(function(){Ve()},500)},[$,xe,$e.current]);function Qe(){var x=$e.current.instance;if(x){var w=x.getSelection(),Y=$e.current.pastePos||{},_=new Q.Range(Y.startLineNumber||w.endLineNumber,Y.startColumn||w.endColumn,Y.endLineNumber||w.endLineNumber,Y.endColumn||w.endColumn);setTimeout(function(){x.executeEdits("",[{range:_,text:""}])},300)}}function yt(x){(window.navigator.platform.match("Mac")?x.metaKey:x.ctrlKey)&&x.keyCode==83&&(x.preventDefault(),W())}var ft=function(){if(we&&$e.current.instance){var w=$e.current.instance.getContentHeight();y(w<se?se:w)}else y(se)};function st(x){var w=document.createEvent("MouseEvents");w.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),x.dispatchEvent(w)}function ce(x,w){var Y=window.URL||window.webkitURL||window,_=new Blob([w]),be=document.createElementNS("http://www.w3.org/1999/xhtml","a");be.href=Y.createObjectURL(_),be.download=x,st(be)}Object(O.useEffect)(function(){ft()},[ft]),Object(O.useEffect)(function(){qe.current&&!xe&&m.e(27).then(m.t.bind(null,"M/lh",7)).then(function(x){try{Q=x,$e.current.instance=Q.editor.create(qe.current,{value:$,language:te(C),theme:E,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},q);var w=$e.current.instance;if(De(w,Q),setTimeout(function(){ft(),$e.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ce(Xe||"educoder.txt",w.getValue())}})},500),$e.current.subscription=w.onDidChangeModelContent(function(_){Be.current?clearTimeout(Re.current):(ft(),ye(w.getValue(),_)),Re.current=setTimeout(function(){Be.current=!1},500)}),window.Monaco||R(Q),rt&&(w.addCommand(Q.KeyMod.CtrlCmd|Q.KeyMod.Shift|Q.KeyCode.KEY_V,function(){return at(),null}),w.addCommand(Q.KeyMod.CtrlCmd|Q.KeyCode.KEY_C,function(){return at(),null})),window.Monaco=Q,v&&w.onDidBlurEditorWidget(function(){v(w.getValue())}),I&&w.onDidFocusEditorText(function(){I(w.getValue())}),rt){w.addCommand(Q.KeyMod.CtrlCmd|Q.KeyCode.KEY_V,function(){return at(),null}),w.onDidPaste(function(_){$e.current.pastePos=_});try{window.addEventListener("paste",Qe)}catch(_){}}var Y=ut();return Fe(!0),function(){var _=$e.current.instance;_.dispose();var be=_.getModel();be&&be.dispose(),$e.current.subscription&&$e.current.subscription.dispose(),rt&&window.removeEventListener("paste",Qe),Y.unobserve(qe.current)}}catch(_){}})},[]),Object(O.useEffect)(function(){var x=$e.current.instance;if(x&&xe)return document.addEventListener("keydown",yt,!1),function(){document.removeEventListener("keydown",yt)}},[W,xe]),Object(O.useEffect)(function(){var x=$e.current.instance;if(x&&xe){var w=te(C);Q.editor.setModelLanguage(x.getModel(),w),console.log("language:",C,x.getModel(),w)}},[C,xe]),Object(O.useEffect)(function(){var x=$e.current.instance;x&&xe&&Q.editor.setTheme(E)},[E,xe]),Object(O.useEffect)(function(){var x=$e.current.instance;x&&xe&&(x.updateOptions(Object(F.a)({},ee)),setTimeout(function(){x.getModel().updateOptions(Object(F.a)({},ee))},200))},[JSON.stringify(ee),xe]),Object(O.useEffect)(function(){var x=$e.current.instance;x&&xe&&x.layout()},[_e,se,xe]);var gt=Object(O.useState)(X(_e)),ot=Object(me.a)(gt,2),de=ot[0],Ne=ot[1],B=Object(O.useState)(X(se)),D=Object(me.a)(B,2),N=D[0],y=D[1],b=Object(F.a)(Object(F.a)({},U),{},{width:de,height:N});return K.a.createElement("div",{className:"my-monaco-editor",ref:qe,style:b})};function ze(ae){var ne=ae.width,_e=ne===void 0?"100%":ne,ie=ae.height,se=ie===void 0?"100%":ie,$=ae.original,k=ae.modified,C=ae.language,J=ae.options,U=J===void 0?{}:J,S=Object(O.useRef)(),ee=Object(O.useState)(null),le=Object(me.a)(ee,2),q=le[0],Me=le[1];function E(we){var Ze;return S.current&&(Ze=new H.default(function(rt){var Ie=Object(ge.a)(rt),ye;try{for(Ie.s();!(ye=Ie.n()).done;){var Ae=ye.value;(Ae.target.offsetHeight>0||Ae.target.offsetWidth>0)&&we.layout()}}catch(De){Ie.e(De)}finally{Ie.f()}}),Ze.observe(S.current)),Ze}Object(O.useEffect)(function(){S.current&&m.e(27).then(m.t.bind(null,"M/lh",7)).then(function(we){Q=we;var Ze=Q.editor.createDiffEditor(S.current,Object(F.a)(Object(F.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},U),{},{wordWrap:!0}));Me(Ze);var rt=E(Ze);return function(){Ze.dispose();var Ie=Ze.getModel();Ie&&Ie.dispose(),rt.unobserve(S.current)}})},[]),Object(O.useEffect)(function(){q&&q.setModel({original:Q.editor.createModel($,C),modified:Q.editor.createModel(k,C)})},[$,k,C,q]);var v=X(_e),W=X(se),Ce={width:v,height:W};return K.a.createElement("div",{className:"my-diff-editor",ref:S,style:Ce})}},ZpRC:function(Ee,ue,m){"use strict";function F(R){return typeof R=="object"&&R!=null&&R.nodeType===1}function Oe(R,L){return(!L||R!=="hidden")&&R!=="visible"&&R!=="clip"}function re(R,L){if(R.clientHeight<R.scrollHeight||R.clientWidth<R.scrollWidth){var oe=getComputedStyle(R,null);return Oe(oe.overflowY,L)||Oe(oe.overflowX,L)||function(X){var j=function(z){if(!z.ownerDocument||!z.ownerDocument.defaultView)return null;try{return z.ownerDocument.defaultView.frameElement}catch(P){return null}}(X);return!!j&&(j.clientHeight<X.scrollHeight||j.clientWidth<X.scrollWidth)}(R)}return!1}function ge(R,L,oe,X,j,z,P,te){return z<R&&P>L||z>R&&P<L?0:z<=R&&te<=oe||P>=L&&te>=oe?z-R-X:P>L&&te<oe||z<R&&te>oe?P-L+j:0}var me=function(R,L){var oe=window,X=L.scrollMode,j=L.block,z=L.inline,P=L.boundary,te=L.skipOverflowHiddenElements,Q=typeof P=="function"?P:function(Re){return Re!==P};if(!F(R))throw new TypeError("Invalid target");for(var Se=document.scrollingElement||document.documentElement,ze=[],ae=R;F(ae)&&Q(ae);){if((ae=ae.parentElement)===Se){ze.push(ae);break}ae!=null&&ae===document.body&&re(ae)&&!re(document.documentElement)||ae!=null&&re(ae,te)&&ze.push(ae)}for(var ne=oe.visualViewport?oe.visualViewport.width:innerWidth,_e=oe.visualViewport?oe.visualViewport.height:innerHeight,ie=window.scrollX||pageXOffset,se=window.scrollY||pageYOffset,$=R.getBoundingClientRect(),k=$.height,C=$.width,J=$.top,U=$.right,S=$.bottom,ee=$.left,le=j==="start"||j==="nearest"?J:j==="end"?S:J+k/2,q=z==="center"?ee+C/2:z==="end"?U:ee,Me=[],E=0;E<ze.length;E++){var v=ze[E],W=v.getBoundingClientRect(),Ce=W.height,we=W.width,Ze=W.top,rt=W.right,Ie=W.bottom,ye=W.left;if(X==="if-needed"&&J>=0&&ee>=0&&S<=_e&&U<=ne&&J>=Ze&&S<=Ie&&ee>=ye&&U<=rt)return Me;var Ae=getComputedStyle(v),De=parseInt(Ae.borderLeftWidth,10),V=parseInt(Ae.borderTopWidth,10),I=parseInt(Ae.borderRightWidth,10),Ue=parseInt(Ae.borderBottomWidth,10),Xe=0,et=0,qe="offsetWidth"in v?v.offsetWidth-v.clientWidth-De-I:0,$e="offsetHeight"in v?v.offsetHeight-v.clientHeight-V-Ue:0;if(Se===v)Xe=j==="start"?le:j==="end"?le-_e:j==="nearest"?ge(se,se+_e,_e,V,Ue,se+le,se+le+k,k):le-_e/2,et=z==="start"?q:z==="center"?q-ne/2:z==="end"?q-ne:ge(ie,ie+ne,ne,De,I,ie+q,ie+q+C,C),Xe=Math.max(0,Xe+se),et=Math.max(0,et+ie);else{Xe=j==="start"?le-Ze-V:j==="end"?le-Ie+Ue+$e:j==="nearest"?ge(Ze,Ie,Ce,V,Ue+$e,le,le+k,k):le-(Ze+Ce/2)+$e/2,et=z==="start"?q-ye-De:z==="center"?q-(ye+we/2)+qe/2:z==="end"?q-rt+I+qe:ge(ye,rt,we,De,I+qe,q,q+C,C);var pe=v.scrollLeft,Be=v.scrollTop;le+=Be-(Xe=Math.max(0,Math.min(Be+Xe,v.scrollHeight-Ce+$e))),q+=pe-(et=Math.max(0,Math.min(pe+et,v.scrollWidth-we+qe)))}Me.push({el:v,top:Xe,left:et})}return Me};function fe(R){return R===Object(R)&&Object.keys(R).length!==0}function O(R,L){L===void 0&&(L="auto");var oe="scrollBehavior"in document.body.style;R.forEach(function(X){var j=X.el,z=X.top,P=X.left;j.scroll&&oe?j.scroll({top:z,left:P,behavior:L}):(j.scrollTop=z,j.scrollLeft=P)})}function K(R){return R===!1?{block:"end",inline:"nearest"}:fe(R)?R:{block:"start",inline:"nearest"}}function H(R,L){var oe=!R.ownerDocument.documentElement.contains(R);if(fe(L)&&typeof L.behavior=="function")return L.behavior(oe?[]:me(R,L));if(oe)return;var X=K(L);return O(me(R,X),X.behavior)}var he=ue.a=H},bT9E:function(Ee,ue,m){"use strict";m.d(ue,"a",function(){return Oe});var F=m("VTBJ");function Oe(re,ge){var me=Object(F.a)({},re);return Array.isArray(ge)&&ge.forEach(function(fe){delete me[fe]}),me}},c5Ni:function(Ee,ue,m){},cRFk:function(Ee,ue,m){Ee.exports=m.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(Ee,ue,m){Ee.exports=m.p+"static/choose.4ad1045f.svg"},dejd:function(Ee,ue,m){},djh8:function(Ee,ue,m){Ee.exports=m.p+"static/qrCode.42927872.png"},dmUQ:function(Ee,ue,m){"use strict";var F=m("Ff2n"),Oe=m("rePB"),re=m("1OyB"),ge=m("vuIU"),me=m("Ji7U"),fe=m("md7G"),O=m("foSv"),K=m("q1tI"),H=m.n(K),he=m("TSYQ"),R=m.n(he),L=m("4IlW");function oe(k,C){var J=Object.keys(k);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(k);C&&(U=U.filter(function(S){return Object.getOwnPropertyDescriptor(k,S).enumerable})),J.push.apply(J,U)}return J}function X(k){for(var C=1;C<arguments.length;C++){var J=arguments[C]!=null?arguments[C]:{};C%2?oe(Object(J),!0).forEach(function(U){Object(Oe.a)(k,U,J[U])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(J)):oe(Object(J)).forEach(function(U){Object.defineProperty(k,U,Object.getOwnPropertyDescriptor(J,U))})}return k}function j(k){var C=z();return function(){var U=Object(O.a)(k),S;if(C){var ee=Object(O.a)(this).constructor;S=Reflect.construct(U,arguments,ee)}else S=U.apply(this,arguments);return Object(fe.a)(this,S)}}function z(){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(k){return!1}}function P(){}function te(k){k.preventDefault()}var Q=function(C){return C.replace(/[^\w.-]+/g,"")},Se=200,ze=600,ae=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,ne=function(C){return C!=null},_e=function(C,J){return J===C||typeof J=="number"&&typeof C=="number"&&isNaN(J)&&isNaN(C)},ie=function(k){Object(me.a)(J,k);var C=j(J);function J(U){var S;Object(re.a)(this,J),S=C.call(this,U),S.onKeyDown=function(q){var Me=S.props,E=Me.onKeyDown,v=Me.onPressEnter;if(q.keyCode===L.a.UP){var W=S.getRatio(q);S.up(q,W,null),S.stop()}else if(q.keyCode===L.a.DOWN){var Ce=S.getRatio(q);S.down(q,Ce,null),S.stop()}else q.keyCode===L.a.ENTER&&v&&v(q);if(S.recordCursorPosition(),S.lastKeyCode=q.keyCode,E){for(var we=arguments.length,Ze=new Array(we>1?we-1:0),rt=1;rt<we;rt++)Ze[rt-1]=arguments[rt];E.apply(void 0,[q].concat(Ze))}},S.onKeyUp=function(q){var Me=S.props.onKeyUp;if(S.stop(),S.recordCursorPosition(),Me){for(var E=arguments.length,v=new Array(E>1?E-1:0),W=1;W<E;W++)v[W-1]=arguments[W];Me.apply(void 0,[q].concat(v))}},S.onChange=function(q){var Me=S.props.onChange;S.state.focused&&(S.inputting=!0),S.rawInput=S.props.parser(S.getValueFromEvent(q)),S.setState({inputValue:S.rawInput}),Me(S.toNumber(S.rawInput))},S.onMouseUp=function(){var q=S.props.onMouseUp;S.recordCursorPosition(),q&&q.apply(void 0,arguments)},S.onFocus=function(){var q;S.setState({focused:!0}),(q=S.props).onFocus.apply(q,arguments)},S.onBlur=function(){var q=S.props.onBlur;S.inputting=!1,S.setState({focused:!1});var Me=S.getCurrentValidValue(S.state.inputValue),E=S.setValue(Me,P);if(q){var v=S.input.value,W=S.getInputDisplayValue({focus:!1,value:E});S.input.value=W&&Number(W),q.apply(void 0,arguments),S.input.value=v}},S.getRatio=function(q){var Me=1;return q.metaKey||q.ctrlKey?Me=.1:q.shiftKey&&(Me=10),Me},S.getFullNum=function(q){return isNaN(q)?q:/e/i.test(String(q))?Number(q).toFixed(18).replace(/\.?0+$/,""):q},S.getPrecision=function(q){if(ne(S.props.precision))return S.props.precision;var Me=String(q);if(Me.indexOf("e-")>=0)return parseInt(Me.slice(Me.indexOf("e-")+2),10);var E=0;return Me.indexOf(".")>=0&&(E=Me.length-Me.indexOf(".")-1),E},S.getInputDisplayValue=function(q){var Me=q||S.state,E=Me.focused,v=Me.inputValue,W=Me.value,Ce;E?Ce=v:Ce=S.toPrecisionAsStep(W),Ce==null&&(Ce="");var we=S.formatWrapper(Ce);return ne(S.props.decimalSeparator)&&(we=we.toString().replace(".",S.props.decimalSeparator)),we},S.recordCursorPosition=function(){try{S.cursorStart=S.input.selectionStart,S.cursorEnd=S.input.selectionEnd,S.currentValue=S.input.value,S.cursorBefore=S.input.value.substring(0,S.cursorStart),S.cursorAfter=S.input.value.substring(S.cursorEnd)}catch(q){}},S.restoreByAfter=function(q){if(q===void 0)return!1;var Me=S.input.value,E=Me.lastIndexOf(q);if(E===-1)return!1;var v=S.cursorBefore.length;return S.lastKeyCode===L.a.DELETE&&S.cursorBefore.charAt(v-1)===q[0]?(S.fixCaret(v,v),!0):E+q.length===Me.length?(S.fixCaret(E,E),!0):!1},S.partRestoreByAfter=function(q){return q===void 0?!1:Array.prototype.some.call(q,function(Me,E){var v=q.substring(E);return S.restoreByAfter(v)})},S.isNotCompleteNumber=function(q){return isNaN(q)||q===""||q===null||q&&q.toString().indexOf(".")===q.toString().length-1},S.stop=function(){S.autoStepTimer&&clearTimeout(S.autoStepTimer)},S.down=function(q,Me,E){S.pressingUpOrDown=!0,S.step("down",q,Me,E)},S.up=function(q,Me,E){S.pressingUpOrDown=!0,S.step("up",q,Me,E)},S.saveInput=function(q){S.input=q};var ee=U.value;ee===void 0&&(ee=U.defaultValue),S.state={focused:U.autoFocus};var le=S.getValidValue(S.toNumber(ee));return S.state=X(X({},S.state),{},{inputValue:S.toPrecisionAsStep(le),value:le}),S}return Object(ge.a)(J,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(S){var ee=this.props,le=ee.value,q=ee.onChange,Me=ee.max,E=ee.min,v=this.state.focused;if(S){if(!_e(S.value,le)||!_e(S.max,Me)||!_e(S.min,E)){var W=v?le:this.getValidValue(le),Ce;this.pressingUpOrDown?Ce=W:this.inputting?Ce=this.rawInput:Ce=this.toPrecisionAsStep(W),this.setState({value:W,inputValue:Ce})}var we="value"in this.props?le:this.state.value;"max"in this.props&&S.max!==Me&&typeof we=="number"&&we>Me&&q&&q(Me),"min"in this.props&&S.min!==E&&typeof we=="number"&&we<E&&q&&q(E)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Ze=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===L.a.BACKSPACE?Ze=this.cursorStart-1:this.lastKeyCode===L.a.DELETE&&(Ze=this.cursorStart):Ze=this.input.value.length,this.fixCaret(Ze,Ze)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case L.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case L.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(rt){}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(S){var ee=S;return ee===""?ee="":this.isNotCompleteNumber(parseFloat(ee))?ee=this.state.value:ee=this.getValidValue(ee),this.toNumber(ee)}},{key:"getValueFromEvent",value:function(S){var ee=S.target.value.trim().replace(/。/g,".");return ne(this.props.decimalSeparator)&&(ee=ee.replace(this.props.decimalSeparator,".")),ee}},{key:"getValidValue",value:function(S){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,q=parseFloat(S);return isNaN(q)?S:(q<ee&&(q=ee),q>le&&(q=le),q)}},{key:"setValue",value:function(S,ee){var le=this.props.precision,q=this.isNotCompleteNumber(parseFloat(S))?null:parseFloat(S),Me=this.state.value,E=Me===void 0?null:Me,v=this.state.inputValue,W=v===void 0?null:v,Ce=typeof q=="number"?q.toFixed(le):"".concat(q),we=q!==E||Ce!=="".concat(W);return"value"in this.props?(W=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:W},ee)):this.setState({value:q,inputValue:this.toPrecisionAsStep(S)},ee),we&&this.props.onChange(q),q}},{key:"getMaxPrecision",value:function(S){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,le=this.props,q=le.precision,Me=le.step;if(ne(q))return q;var E=this.getPrecision(ee),v=this.getPrecision(Me),W=this.getPrecision(S);return S?Math.max(W,E+v):E+v}},{key:"getPrecisionFactor",value:function(S){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,le=this.getMaxPrecision(S,ee);return Math.pow(10,le)}},{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(S){return this.props.formatter?this.props.formatter(S):S}},{key:"toPrecisionAsStep",value:function(S){if(this.isNotCompleteNumber(S)||S==="")return S;var ee=Math.abs(this.getMaxPrecision(S));return isNaN(ee)?S.toString():Number(S).toFixed(ee)}},{key:"toNumber",value:function(S){var ee=this.props.precision,le=this.state.focused,q=S&&S.length>16&&le;return this.isNotCompleteNumber(S)||q?S:ne(ee)?Math.round(S*Math.pow(10,ee))/Math.pow(10,ee):Number(S)}},{key:"upStep",value:function(S,ee){var le=this.props.step,q=this.getPrecisionFactor(S,ee),Me=Math.abs(this.getMaxPrecision(S,ee)),E=((q*S+q*le*ee)/q).toFixed(Me);return this.toNumber(E)}},{key:"downStep",value:function(S,ee){var le=this.props.step,q=this.getPrecisionFactor(S,ee),Me=Math.abs(this.getMaxPrecision(S,ee)),E=((q*S-q*le*ee)/q).toFixed(Me);return this.toNumber(E)}},{key:"step",value:function(S,ee){var le=this,q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Me=arguments.length>3?arguments[3]:void 0;this.stop(),ee&&(ee.persist(),ee.preventDefault());var E=this.props;if(E.disabled)return;var v=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(v))return;var W=this["".concat(S,"Step")](v,q),Ce=W>E.max||W<E.min;if(W>E.max?W=E.max:W<E.min&&(W=E.min),this.setValue(W,null),this.setState({focused:!0},function(){le.pressingUpOrDown=!1}),Ce)return;this.autoStepTimer=setTimeout(function(){le[S](ee,q,!0)},Me?Se:ze)}},{key:"fixCaret",value:function(S,ee){if(S===void 0||ee===void 0||!this.input||!this.input.value)return;try{var le=this.input.selectionStart,q=this.input.selectionEnd;(S!==le||ee!==q)&&this.input.setSelectionRange(S,ee)}catch(Me){}}},{key:"render",value:function(){var S,ee=this.props,le=ee.prefixCls,q=ee.disabled,Me=ee.readOnly,E=ee.useTouch,v=ee.autoComplete,W=ee.upHandler,Ce=ee.downHandler,we=ee.className,Ze=ee.max,rt=ee.min,Ie=ee.style,ye=ee.title,Ae=ee.onMouseEnter,De=ee.onMouseLeave,V=ee.onMouseOver,I=ee.onMouseOut,Ue=ee.required,Xe=ee.onClick,et=ee.tabIndex,qe=ee.type,$e=ee.placeholder,pe=ee.id,Be=ee.inputMode,Re=ee.pattern,tt=ee.step,Ge=ee.maxLength,xe=ee.autoFocus,Fe=ee.name,ut=ee.onPaste,at=ee.onInput,Ve=Object(F.a)(ee,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Qe=this.state,yt=Qe.value,ft=Qe.focused,st=R()(le,(S={},Object(Oe.a)(S,we,!!we),Object(Oe.a)(S,"".concat(le,"-disabled"),q),Object(Oe.a)(S,"".concat(le,"-focused"),ft),S)),ce={};Object.keys(Ve).forEach(function(w){(w.substr(0,5)==="data-"||w.substr(0,5)==="aria-"||w==="role")&&(ce[w]=Ve[w])});var gt=!Me&&!q,ot=this.getInputDisplayValue(null),de=(yt||yt===0)&&(isNaN(yt)||Number(yt)>=Ze),Ne=(yt||yt===0)&&(isNaN(yt)||Number(yt)<=rt),B=de||q||Me,D=Ne||q||Me,N=R()("".concat(le,"-handler"),"".concat(le,"-handler-up"),Object(Oe.a)({},"".concat(le,"-handler-up-disabled"),B)),y=R()("".concat(le,"-handler"),"".concat(le,"-handler-down"),Object(Oe.a)({},"".concat(le,"-handler-down-disabled"),D)),b=E?{onTouchStart:B?P:this.up,onTouchEnd:this.stop}:{onMouseDown:B?P:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},x=E?{onTouchStart:D?P:this.down,onTouchEnd:this.stop}:{onMouseDown:D?P:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return H.a.createElement("div",{className:st,style:Ie,title:ye,onMouseEnter:Ae,onMouseLeave:De,onMouseOver:V,onMouseOut:I,onFocus:function(){return null},onBlur:function(){return null}},H.a.createElement("div",{className:"".concat(le,"-handler-wrap")},H.a.createElement("span",Object.assign({unselectable:"on"},b,{role:"button","aria-label":"Increase Value","aria-disabled":B,className:N}),W||H.a.createElement("span",{unselectable:"on",className:"".concat(le,"-handler-up-inner"),onClick:te})),H.a.createElement("span",Object.assign({unselectable:"on"},x,{role:"button","aria-label":"Decrease Value","aria-disabled":D,className:y}),Ce||H.a.createElement("span",{unselectable:"on",className:"".concat(le,"-handler-down-inner"),onClick:te}))),H.a.createElement("div",{className:"".concat(le,"-input-wrap")},H.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":rt,"aria-valuemax":Ze,"aria-valuenow":yt,required:Ue,type:qe,placeholder:$e,onPaste:ut,onClick:Xe,onMouseUp:this.onMouseUp,className:"".concat(le,"-input"),tabIndex:et,autoComplete:v,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:gt?this.onKeyDown:P,onKeyUp:gt?this.onKeyUp:P,autoFocus:xe,maxLength:Ge,readOnly:Me,disabled:q,max:Ze,min:rt,step:tt,name:Fe,title:ye,id:pe,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ot),pattern:Re,inputMode:Be,onInput:at},ce))))}}]),J}(H.a.Component);ie.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:ae,min:-ae,step:1,style:{},onChange:P,onKeyDown:P,onPressEnter:P,onFocus:P,onBlur:P,parser:Q,required:!1,autoComplete:"off"};var se=ie,$=ue.a=se},is8o:function(Ee,ue,m){Ee.exports={flex_box_center:"flex_box_center___45jij",flex_space_between:"flex_space_between___2rBtS",flex_box_vertical_center:"flex_box_vertical_center___B3dEI",flex_box_center_end:"flex_box_center_end___1hlbx",flex_box_column:"flex_box_column___n3oa5",wrap:"wrap___2Ebga",modal:"modal___37ZgF",titleWrap:"titleWrap___dEwT4",required:"required___4a1a5",title:"title___1MHB3",colorGray:"colorGray___1tQ38",choiceWrap:"choiceWrap___2Ik_w",answer:"answer___3N5FQ",activeAnswer:"activeAnswer___3zdHK",deleteIcon:"deleteIcon___U7nIS",addIcon:"addIcon___2tuSF",editorWrap:"editorWrap___ZOK2K",htmlWrap:"htmlWrap___3X_dl",radio:"radio___wS7N0",color333:"color333___S1zDX",color999:"color999___VJwGv",questionType:"questionType___BHDve",questionChoices:"questionChoices___3YAfc"}},ji0R:function(Ee,ue,m){Ee.exports=m.p+"static/douyu.3e6df9ee.jpg"},kPWJ:function(Ee,ue,m){Ee.exports=m.p+"static/question.cb52b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3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc:function(Ee,ue,m){},kvPc:function(Ee,ue,m){"use strict";m.r(ue);var F=m("5Dmo"),Oe=m("3S7+"),re=m("P2fV"),ge=m("NJEC"),me=m("14J3"),fe=m("BMrR"),O=m("jCWc"),K=m("kPKH"),H=m("OaEy"),he=m("2fM7"),R=m("7Kak"),L=m("9yH6"),oe=m("+L6B"),X=m("2/Rp"),j=m("5NDa"),z=m("5rEg"),P=m("miYZ"),te=m("tsqr"),Q=m("k1fw"),Se=m("9og8"),ze=m("y8nQ"),ae=m("Vl3Y"),ne=m("tJVT"),_e=m("PpiC"),ie=m("WmNS"),se=m.n(ie),$=m("q1tI"),k=m.n($),C=m("9kvl"),J=m("Ot1p"),U=m("HBuW"),S=m("oBTY"),ee=m("2qtc"),le=m("kLXV"),q=m("Ty5D"),Me=m("V0Rq"),E=m("9Bee"),v=m("is8o"),W=m.n(v),Ce=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],we=function(et,qe){var $e=et.problemset,pe=et.globalSetting,Be=et.loading,Re=et.dispatch,tt=et.onRef,Ge=tt===void 0?function(){}:tt,xe=et.editData,Fe=Object(_e.a)(et,["problemset","globalSetting","loading","dispatch","onRef","editData"]),ut=Object($.useState)([]),at=Object(ne.a)(ut,2),Ve=at[0],Qe=at[1],yt=Object($.useState)(),ft=Object(ne.a)(yt,2),st=ft[0],ce=ft[1],gt=Object($.useState)([]),ot=Object(ne.a)(gt,2),de=ot[0],Ne=ot[1],B=Object($.useState)(""),D=Object(ne.a)(B,2),N=D[0],y=D[1],b=Object($.useState)(5),x=Object(ne.a)(b,2),w=x[0],Y=x[1],_=Object($.useState)(!1),be=Object(ne.a)(_,2),Ye=be[0],ht=be[1],it=Object(q.i)();Object($.useEffect)(function(){Qe(["","","",""])},[]),Object($.useEffect)(function(){var Pt,Rt;if(!(xe!=null&&xe.challenge_id)){ht(!0);return}y(xe==null?void 0:xe.subject),Y(parseInt(xe==null?void 0:xe.question_score)),Qe(xe==null||((Pt=xe.choose_contents)===null||Pt===void 0)?void 0:Pt.map(function(It){return It.option_name}));var Ct=[];xe==null||((Rt=xe.standard_answer)===null||Rt===void 0)||Rt.split("").map(function(It,Wt){Ct.push(Ce.indexOf(It))}),Ne(Ct)},[xe]),Object($.useImperativeHandle)(qe,function(){return{onSave:At,onReset:Dt,isEdit:Ye}});var Dt=function(){Qe(["","","",""]),y(""),Ne([])},At=function(){var Pt=Object(Se.a)(se.a.mark(function Rt(){var Ct,It;return se.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(N){nt.next=3;break}return te.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),nt.abrupt("return",!1);case 3:if(Ct=Ve.findIndex(function(en){return!en}),!(Ct>-1)){nt.next=7;break}return te.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(Ce[Ct]," \u9009\u9879\u7684\u5185\u5BB9")),nt.abrupt("return",!1);case 7:if(de.length){nt.next=10;break}return te.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),nt.abrupt("return",!1);case 10:if(!(de.length<1)){nt.next=13;break}return te.b.info("\u8BF7\u9009\u62E9\u7B54\u6848"),nt.abrupt("return",!1);case 13:return It=Ve.map(function(en,tn){return{choice_text:en,is_answer:!!de.includes(tn)}}),nt.abrupt("return",{subject:N,question:{cnt:It.map(function(en){return en.choice_text})},choice:{answer:It.map(function(en){return en.is_answer})}});case 15:case"end":return nt.stop()}},Rt)}));return function(){return Pt.apply(this,arguments)}}(),ct=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Kt=function(){var Pt=Object(Se.a)(se.a.mark(function Rt(Ct){return se.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:Wt.t0=Ct.id,Wt.next=Wt.t0==="del"?3:Wt.t0==="up"||Wt.t0==="down"?5:Wt.t0==="edit"?9:11;break;case 3:return le.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(Se.a)(se.a.mark(function en(){return se.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return nn.next=2,Object(Me.m)({id:xe.question_id});case 2:Re({type:"exercise/editExercise",payload:Object(Q.a)({},it)});case 3:case"end":return nn.stop()}},en)}))()}}),Wt.abrupt("break",11);case 5:return Wt.next=7,Re({type:"exercise/exeriseMoveUpDown",payload:{id:xe.question_id,opr:Ct.id}});case 7:return Re({type:"exercise/editExercise",payload:Object(Q.a)({},it)}),Wt.abrupt("break",11);case 9:return ht(!0),Wt.abrupt("break",11);case 11:case"end":return Wt.stop()}},Rt)}));return function(Ct){return Pt.apply(this,arguments)}}(),Ot=function(){var Rt;return k.a.createElement("aside",null,k.a.createElement("p",{className:W.a.titleWrap},k.a.createElement("span",{className:W.a.required},"*"),k.a.createElement("span",{className:W.a.title},"\u9898\u5E72\uFF1A")),k.a.createElement(J.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:N,onChange:function(It){return y(It)}}),k.a.createElement("p",{className:W.a.titleWrap},k.a.createElement("span",{className:W.a.required},"*"),k.a.createElement("span",{className:W.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",k.a.createElement("span",{className:W.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Ve.map(function(Ct,It){return k.a.createElement("div",{className:W.a.choiceWrap,key:It},k.a.createElement(Oe.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},k.a.createElement("div",{className:"".concat(W.a.answer," ").concat(de.includes(It)?W.a.activeAnswer:""),onClick:function(){de.includes(It)?Ne(de.filter(function(nt){return nt!==It})):Ne([].concat(Object(S.a)(de),[It]))}},Ce[It])),k.a.createElement("div",{className:W.a.editorWrap},st===It?k.a.createElement(J.a,{id:"single-question-option-".concat(It),watch:!0,isFocus:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ct,onChange:function(nt){Ve[It]=nt,Qe(Ve)}}):k.a.createElement("div",{className:W.a.htmlWrap,onClick:function(){return ce(It)}},k.a.createElement(E.a,{value:Ct}))),It>1&&k.a.createElement(Oe.a,{title:"\u5220\u9664"},k.a.createElement("i",{className:"".concat(W.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return Qe(Ve.filter(function(nt,en){return en!==It}))}})),It<7&&It===Ve.length-1&&k.a.createElement(Oe.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},k.a.createElement("i",{className:"".concat(W.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Qe([].concat(Object(S.a)(Ve),[""]))}})))}),k.a.createElement(fe.a,{className:"mt10"},k.a.createElement(K.a,{flex:"1"},k.a.createElement("p",{className:"c-grey-999"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898")),k.a.createElement(K.a,null,"\u6807\u51C6\u7B54\u6848\uFF1A",k.a.createElement("span",{className:"c-orange"},de==null||((Rt=de.sort(function(Ct,It){return Ct-It}))===null||Rt===void 0)?void 0:Rt.map(function(Ct){return Ce[Ct]})))))};return k.a.createElement("section",{className:W.a.wrap},Ot())},Ze=Object(C.a)(function(Xe){var et=Xe.problemset,qe=Xe.loading,$e=Xe.globalSetting;return{problemset:et,globalSetting:$e,loading:qe.effects}},null,null,{forwardRef:!0})(Object($.forwardRef)(we)),rt=m("1vsH"),Ie=m("zEei"),ye=m.n(Ie),Ae=m("CJF0"),De=m("2RCv"),V={1:[10,20],2:[30,40,50,60],3:[70,80,90,100]},I=function(et){var qe,$e=et.shixunsDetail,pe=et.dispatch,Be=et.loading,Re=et.match,tt=et.location,Ge=Object(_e.a)(et,["shixunsDetail","dispatch","loading","match","location"]),xe=ae.a.useForm(),Fe=Object(ne.a)(xe,1),ut=Fe[0],at=Object($.useState)({}),Ve=Object(ne.a)(at,2),Qe=Ve[0],yt=Ve[1],ft=Object($.useState)(!1),st=Object(ne.a)(ft,2),ce=st[0],gt=st[1],ot=Object($.useState)(!0),de=Object(ne.a)(ot,2),Ne=de[0],B=de[1],D=Object($.useState)(),N=Object(ne.a)(D,2),y=N[0],b=N[1],x=Object($.useState)([10,20]),w=Object(ne.a)(x,2),Y=w[0],_=w[1],be=Object($.useState)(!1),Ye=Object(ne.a)(be,2),ht=Ye[0],it=Ye[1],Dt=Object($.useState)({}),At=Object(ne.a)(Dt,2),ct=At[0],Kt=At[1],Ot=$e.challengesEdit,Pt=$e.editChallengesQuestion,Rt=Object($.useRef)(),Ct=function(){var Yt=Object(Se.a)(se.a.mark(function vt(){var je;return se.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,pe({type:"shixunsDetail/getChallengesEdit",payload:Object(Q.a)({},Re.params)});case 2:je=kt.sent,ut.setFieldsValue(Object(Q.a)({},je));case 4:case"end":return kt.stop()}},vt)}));return function(){return Yt.apply(this,arguments)}}(),It=function(){var Yt=Object(Se.a)(se.a.mark(function vt(){var je;return se.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(!Re.params.questionId){kt.next=7;break}return kt.next=3,pe({type:"shixunsDetail/getEditChallengesQuestion",payload:Object(Q.a)({},Re.params)});case 3:je=kt.sent,ut.setFieldsValue({challenge_tag:je.tags,difficult:je.difficult,score:je.score,answer:je.answer}),_(V[je.difficult]),Kt(je);case 7:case"end":return kt.stop()}},vt)}));return function(){return Yt.apply(this,arguments)}}();Object($.useEffect)(function(){Ct(),Re.params.questionId&&(b(!0),It(),gt(!0))},[tt.pathname]);var Wt=function(){var Yt=Object(Se.a)(se.a.mark(function vt(){var je,Gt,kt,on;return se.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return Gt="",kt=Object(Q.a)({},Qe),cn.next=4,Rt.current.onSave();case 4:return on=cn.sent,(je=on.choice)===null||je===void 0||je.answer.map(function(bt,$n){bt&&(Gt+=rt.m[$n])}),cn.abrupt("return",{challenge_choose:{subject:on.subject,answer:Qe.task_pass,standard_answer:Gt,score:Qe.score,difficult:Qe.difficult},challenge_tag:Qe.challenge_tag,question:on.question,choice:on.choice});case 7:case"end":return cn.stop()}},vt)}));return function(){return Yt.apply(this,arguments)}}(),nt=function(vt){var je=V[vt],Gt=je==null?void 0:je[0];_(je),ut.setFieldsValue({score:Gt}),yt(Object(Q.a)(Object(Q.a)({},ut.getFieldsValue()),{score:Gt}))},en=function(vt,je){yt(Object(Q.a)({},ut.getFieldsValue())),"difficult"in vt&&nt(vt.difficult)},tn=function(){var Yt=Object(Se.a)(se.a.mark(function vt(){var je;return se.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.t0=U.v,kt.t1=Q.a,kt.t2=Q.a,kt.t3={},kt.next=6,Wt();case 6:return kt.t4=kt.sent,kt.t5=(0,kt.t2)(kt.t3,kt.t4),kt.t6=Re.params,kt.t7=(0,kt.t1)(kt.t5,kt.t6),kt.next=12,(0,kt.t0)(kt.t7);case 12:je=kt.sent,(je==null?void 0:je.status)===1&&te.b.success("\u5220\u9664\u6210\u529F"),Ge.history.replace("/shixuns/".concat(Re.params.id,"/challenges/").concat(Re.params.challengesId,"/editquestion"));case 15:case"end":return kt.stop()}},vt)}));return function(){return Yt.apply(this,arguments)}}(),nn=function(){var Yt=Object(Se.a)(se.a.mark(function vt(je){var Gt,kt,on,Lt;return se.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(Gt=Object(Q.a)({},Qe),it(!0),Ne){bt.next=20;break}return bt.t0=U.c,bt.t1=Q.a,bt.t2=Q.a,bt.t3={},bt.next=9,Wt();case 9:return bt.t4=bt.sent,bt.t5=(0,bt.t2)(bt.t3,bt.t4),bt.t6=Re.params,bt.t7=(0,bt.t1)(bt.t5,bt.t6),bt.next=15,(0,bt.t0)(bt.t7);case 15:kt=bt.sent,it(!1),kt.challenge_choose_id&&(te.b.success("\u64CD\u4F5C\u6210\u529F"),Ge.history.replace("/shixuns/".concat(Re.params.id,"/challenges/").concat(Re.params.challengesId,"/editquestion/").concat(kt.challenge_choose_id))),bt.next=45;break;case 20:if(!Re.params.questionId){bt.next=38;break}return bt.t8=U.Mb,bt.t9=Q.a,bt.t10=Q.a,bt.t11={},bt.next=27,Wt();case 27:return bt.t12=bt.sent,bt.t13=(0,bt.t10)(bt.t11,bt.t12),bt.t14=Re.params,bt.t15=(0,bt.t9)(bt.t13,bt.t14),bt.next=33,(0,bt.t8)(bt.t15);case 33:on=bt.sent,it(!1),on.challenge_choose_id&&te.b.success("\u64CD\u4F5C\u6210\u529F"),bt.next=45;break;case 38:return Gt.identifier=Re.params.id,Gt.st=1,bt.next=42,Object(U.Lb)(Object(Q.a)(Object(Q.a)({},Gt),Re.params));case 42:Lt=bt.sent,it(!1),Lt.challenge_id&&te.b.success("\u64CD\u4F5C\u6210\u529F");case 45:case"end":return bt.stop()}},vt)}));return function(je){return Yt.apply(this,arguments)}}(),Un=function(){var vt;return k.a.createElement("div",null,k.a.createElement("div",{className:ye.a.fieldWrap},k.a.createElement(ae.a.Item,{name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},k.a.createElement(z.a,{maxLength:60,suffix:"".concat(((vt=Qe.subject)===null||vt===void 0?void 0:vt.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),k.a.createElement("div",{className:ye.a.mdWrap},k.a.createElement(ae.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:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},k.a.createElement(J.a,{watch:!0,defaultValue:Ot.task_pass}))),k.a.createElement("div",{className:ye.a.backgroundFa},k.a.createElement("div",{className:"pt40 mb30"},k.a.createElement(ae.a.Item,null,k.a.createElement(X.a,{size:"large",type:"primary",className:"".concat(ye.a.button," mr20"),htmlType:"submit",loading:ht},"\u63D0\u4EA4"),k.a.createElement(X.a,{size:"large",type:"primary",ghost:!0,className:ye.a.button,onClick:function(){return C.d.push("/shixuns/".concat(Re.params.id,"/challenges"))}},"\u53D6\u6D88")))))},qn=function(){var vt,je;return k.a.createElement("div",null,k.a.createElement("div",{className:"bg-white"},k.a.createElement(Ze,{ref:Rt,editData:ct})),k.a.createElement("div",{className:ye.a.mdWrap},k.a.createElement(ae.a.Item,{name:"task_pass",label:"\u53C2\u8003\u7B54\u6848:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},k.a.createElement(J.a,{watch:!0,defaultValue:Ne?Pt.answer:""})),k.a.createElement(ae.a.Item,{name:"difficult",label:"\u96BE\u5EA6\u7CFB\u6570:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6\u7CFB\u6570"}]},k.a.createElement(L.a.Group,{disabled:((vt=$e.detail)===null||vt===void 0?void 0:vt.shixun_status)===2},k.a.createElement(L.a,{value:1},"\u7B80\u5355"),k.a.createElement(L.a,{value:2},"\u4E2D\u7B49"),k.a.createElement(L.a,{value:3},"\u56F0\u96BE"))),k.a.createElement(fe.a,null,k.a.createElement(K.a,null,k.a.createElement(ae.a.Item,{name:"score",label:"\u5956\u52B1\u7ECF\u9A8C\u503C:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5956\u52B1\u7ECF\u9A8C\u503C"}]},k.a.createElement(he.a,{disabled:((je=$e.detail)===null||je===void 0?void 0:je.shixun_status)===2},Y.map(function(Gt){return k.a.createElement(he.a.Option,{key:Gt,value:Gt},Gt)})))),k.a.createElement(K.a,{flex:1},k.a.createElement("div",{className:"font12 c-light-black ml10 mt20"},"\u5982\u679C\u5B66\u5458\u7B54\u9898\u9519\u8BEF\uFF0C\u5219\u4E0D\u80FD\u5F97\u5230\u76F8\u5E94\u7684\u7ECF\u9A8C\u503C",k.a.createElement("br",null),"\u5982\u679C\u5B66\u5458\u6210\u529F\u5F97\u5230\u7ECF\u9A8C\u503C\uFF0C\u90A3\u4E48\u5C06\u540C\u65F6\u83B7\u5F97\u7B49\u503C\u7684\u91D1\u5E01\u5956\u52B1\uFF0C\u5982\uFF1A+10\u7ECF\u9A8C\u503C\u3001+10\u91D1\u5E01"))),k.a.createElement(ae.a.Item,{name:"challenge_tag",label:k.a.createElement("div",null,"\u6280\u80FD\u6807\u7B7E ",k.a.createElement("span",{className:"pl20 font12 c-light-black"},"\u5B66\u5458\u7B54\u9898\u6B63\u786E\u5C06\u83B7\u5F97\u6280\u80FD\uFF0C\u5426\u5219\u4E0D\u80FD\u83B7\u5F97\u6280\u80FD\uFF08\u56DE\u8F66\u6DFB\u52A0\u6807\u7B7E\uFF09")),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6280\u80FD\u6807\u7B7E"}]},k.a.createElement(De.a,{placeholder:"\u6DFB\u52A0\u6807\u7B7E"}))),k.a.createElement("div",{className:ye.a.backgroundFa},k.a.createElement(fe.a,{className:"pt40 mb30"},k.a.createElement(K.a,{flex:1},k.a.createElement(ae.a.Item,null,k.a.createElement(X.a,{size:"large",type:"primary",className:"".concat(ye.a.button," mr20"),htmlType:"submit",loading:ht},"\u63D0\u4EA4"),k.a.createElement(X.a,{size:"large",type:"primary",ghost:!0,className:ye.a.button,onClick:function(){return C.d.push("/shixuns/".concat(Re.params.id,"/challenges"))}},"\u53D6\u6D88"))),k.a.createElement(K.a,null,y&&k.a.createElement(X.a,{size:"large",ghost:!0,className:"".concat(ye.a.button," ").concat(ye.a.deleteButton),onClick:tn},"\u5220\u9664")))))};return k.a.createElement("section",{className:ye.a.bg},k.a.createElement(Ae.a,{data:Ot,title:"\u9009\u62E9\u9898"}),k.a.createElement(ae.a,{form:ut,className:ye.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:en,onFinish:nn,initialValues:{difficult:1,score:10}},k.a.createElement("aside",{className:["bg-white",ye.a.navBar].join(" ")},k.a.createElement(ge.a,{title:"\u5207\u6362\u524D\u8BF7\u786E\u8BA4\u5F53\u524D\u9009\u62E9\u9898\u5DF2\u63D0\u4EA4\uFF0C\u5426\u5219\u4E0D\u4F1A\u4FDD\u5B58\u4F60\u5F53\u524D\u6240\u6709\u8F93\u5165\uFF01",onConfirm:function(){C.d.replace("/shixuns/".concat(Re.params.id,"/challenges/").concat(Re.params.challengesId,"/editquestion"))}},k.a.createElement("strong",{className:"current"},"\u672C\u5173\u4EFB\u52A1")),Ot==null||((qe=Ot.chooses)===null||qe===void 0)?void 0:qe.map(function(Yt,vt){return k.a.createElement(ge.a,{title:"\u5207\u6362\u524D\u8BF7\u786E\u8BA4\u5F53\u524D\u9009\u62E9\u9898\u5DF2\u63D0\u4EA4\uFF0C\u5426\u5219\u4E0D\u4F1A\u4FDD\u5B58\u4F60\u5F53\u524D\u6240\u6709\u8F93\u5165\uFF01",onConfirm:function(){C.d.replace("/shixuns/".concat(Re.params.id,"/challenges/").concat(Re.params.challengesId,"/editquestion/").concat(Yt.choose_id))}},k.a.createElement("strong",{className:"current ".concat(Re.params.questionId==Yt.choose_id&&Ne?ye.a.actived:"")},Yt.type===1?"\u5355\u9009\u9898":"\u591A\u9009\u9898"))}),Ne&&k.a.createElement(ge.a,{title:"\u5207\u6362\u524D\u8BF7\u786E\u8BA4\u5F53\u524D\u9009\u62E9\u9898\u5DF2\u63D0\u4EA4\uFF0C\u5426\u5219\u4E0D\u4F1A\u4FDD\u5B58\u4F60\u5F53\u524D\u6240\u6709\u8F93\u5165\uFF01",onConfirm:function(){gt(!0),B(!1),Kt({}),Rt.current&&Rt.current.onReset(),ut.resetFields()}},k.a.createElement(Oe.a,{title:"\u65B0\u589E\u9009\u62E9\u9898"},k.a.createElement("span",{className:ye.a.addButton,onClick:function(){}},"+"))),!Ne&&k.a.createElement("strong",{className:ye.a.actived},"\u9009\u62E9\u9898")),!ce&&Un(),ce&&qn()))},Ue=ue.default=Object(C.a)(function(Xe){var et=Xe.shixunsDetail,qe=Xe.newCourse,$e=Xe.loading,pe=Xe.globalSetting;return{shixunsDetail:et,newCourse:qe,globalSetting:pe,loading:$e.effects}})(I)},l2Kq:function(Ee,ue,m){Ee.exports=m.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(Ee,ue,m){(function(F){F(m("VrN/"),m("1eCo"),m("8EBN"))})(function(F){"use strict";F.defineMode("markdown",function(Oe,re){var ge=F.getMode(Oe,"text/html"),me=ge.name=="null";function fe(E){if(F.findModeByName){var v=F.findModeByName(E);v&&(E=v.mime||v.mimes[0])}var W=F.getMode(Oe,E);return W.name=="null"?null:W}re.highlightFormatting===void 0&&(re.highlightFormatting=!1),re.maxBlockquoteDepth===void 0&&(re.maxBlockquoteDepth=0),re.taskLists===void 0&&(re.taskLists=!1),re.strikethrough===void 0&&(re.strikethrough=!1),re.emoji===void 0&&(re.emoji=!1),re.fencedCodeBlockHighlighting===void 0&&(re.fencedCodeBlockHighlighting=!0),re.fencedCodeBlockDefaultMode===void 0&&(re.fencedCodeBlockDefaultMode="text/plain"),re.xml===void 0&&(re.xml=!0),re.tokenTypeOverrides===void 0&&(re.tokenTypeOverrides={});var O={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 K in O)O.hasOwnProperty(K)&&re.tokenTypeOverrides[K]&&(O[K]=re.tokenTypeOverrides[K]);var H=/^([*\-_])(?:\s*\1){2,}\s*$/,he=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,R=/^\[(x| )\](?=\s)/i,L=re.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,oe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,X=/^[^#!\[\]*_\\<>` "'(~:]+/,j=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,z=/^\s*\[[^\]]+?\]:.*$/,P=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,te=" ";function Q(E,v,W){return v.f=v.inline=W,W(E,v)}function Se(E,v,W){return v.f=v.block=W,W(E,v)}function ze(E){return!E||!/\S/.test(E.string)}function ae(E){if(E.linkTitle=!1,E.linkHref=!1,E.linkText=!1,E.em=!1,E.strong=!1,E.strikethrough=!1,E.quote=0,E.indentedCode=!1,E.f==_e){var v=me;if(!v){var W=F.innerMode(ge,E.htmlState);v=W.mode.name=="xml"&&W.state.tagStart===null&&!W.state.context&&W.state.tokenize.isInText}v&&(E.f=k,E.block=ne,E.htmlState=null)}return E.trailingSpace=0,E.trailingSpaceNewLine=!1,E.prevLine=E.thisLine,E.thisLine={stream:null},null}function ne(E,v){var W=E.column()===v.indentation,Ce=ze(v.prevLine.stream),we=v.indentedCode,Ze=v.prevLine.hr,rt=v.list!==!1,Ie=(v.listStack[v.listStack.length-1]||0)+3;v.indentedCode=!1;var ye=v.indentation;if(v.indentationDiff===null&&(v.indentationDiff=v.indentation,rt)){for(v.list=null;ye<v.listStack[v.listStack.length-1];)v.listStack.pop(),v.listStack.length?v.indentation=v.listStack[v.listStack.length-1]:v.list=!1;v.list!==!1&&(v.indentationDiff=ye-v.listStack[v.listStack.length-1])}var Ae=!Ce&&!Ze&&!v.prevLine.header&&(!rt||!we)&&!v.prevLine.fencedCodeEnd,De=(v.list===!1||Ze||Ce)&&v.indentation<=Ie&&E.match(H),V=null;if(v.indentationDiff>=4&&(we||v.prevLine.fencedCodeEnd||v.prevLine.header||Ce))return E.skipToEnd(),v.indentedCode=!0,O.code;if(E.eatSpace())return null;if(W&&v.indentation<=Ie&&(V=E.match(L))&&V[1].length<=6)return v.quote=0,v.header=V[1].length,v.thisLine.header=!0,re.highlightFormatting&&(v.formatting="header"),v.f=v.inline,se(v);if(v.indentation<=Ie&&E.eat(">"))return v.quote=W?1:v.quote+1,re.highlightFormatting&&(v.formatting="quote"),E.eatSpace(),se(v);if(!De&&!v.setext&&W&&v.indentation<=Ie&&(V=E.match(he))){var I=V[1]?"ol":"ul";return v.indentation=ye+E.current().length,v.list=!0,v.quote=0,v.listStack.push(v.indentation),v.em=!1,v.strong=!1,v.code=!1,v.strikethrough=!1,re.taskLists&&E.match(R,!1)&&(v.taskList=!0),v.f=v.inline,re.highlightFormatting&&(v.formatting=["list","list-"+I]),se(v)}else{if(W&&v.indentation<=Ie&&(V=E.match(j,!0)))return v.quote=0,v.fencedEndRE=new RegExp(V[1]+"+ *$"),v.localMode=re.fencedCodeBlockHighlighting&&fe(V[2]||re.fencedCodeBlockDefaultMode),v.localMode&&(v.localState=F.startState(v.localMode)),v.f=v.block=ie,re.highlightFormatting&&(v.formatting="code-block"),v.code=-1,se(v);if(v.setext||(!Ae||!rt)&&!v.quote&&v.list===!1&&!v.code&&!De&&!z.test(E.string)&&(V=E.lookAhead(1))&&(V=V.match(oe)))return v.setext?(v.header=v.setext,v.setext=0,E.skipToEnd(),re.highlightFormatting&&(v.formatting="header")):(v.header=V[0].charAt(0)=="="?1:2,v.setext=v.header),v.thisLine.header=!0,v.f=v.inline,se(v);if(De)return E.skipToEnd(),v.hr=!0,v.thisLine.hr=!0,O.hr;if(E.peek()==="[")return Q(E,v,ee)}return Q(E,v,v.inline)}function _e(E,v){var W=ge.token(E,v.htmlState);if(!me){var Ce=F.innerMode(ge,v.htmlState);(Ce.mode.name=="xml"&&Ce.state.tagStart===null&&!Ce.state.context&&Ce.state.tokenize.isInText||v.md_inside&&E.current().indexOf(">")>-1)&&(v.f=k,v.block=ne,v.htmlState=null)}return W}function ie(E,v){var W=v.listStack[v.listStack.length-1]||0,Ce=v.indentation<W,we=W+3;if(v.fencedEndRE&&v.indentation<=we&&(Ce||E.match(v.fencedEndRE))){re.highlightFormatting&&(v.formatting="code-block");var Ze;return Ce||(Ze=se(v)),v.localMode=v.localState=null,v.block=ne,v.f=k,v.fencedEndRE=null,v.code=0,v.thisLine.fencedCodeEnd=!0,Ce?Se(E,v,v.block):Ze}else return v.localMode?v.localMode.token(E,v.localState):(E.skipToEnd(),O.code)}function se(E){var v=[];if(E.formatting){v.push(O.formatting),typeof E.formatting=="string"&&(E.formatting=[E.formatting]);for(var W=0;W<E.formatting.length;W++)v.push(O.formatting+"-"+E.formatting[W]),E.formatting[W]==="header"&&v.push(O.formatting+"-"+E.formatting[W]+"-"+E.header),E.formatting[W]==="quote"&&(!re.maxBlockquoteDepth||re.maxBlockquoteDepth>=E.quote?v.push(O.formatting+"-"+E.formatting[W]+"-"+E.quote):v.push("error"))}if(E.taskOpen)return v.push("meta"),v.length?v.join(" "):null;if(E.taskClosed)return v.push("property"),v.length?v.join(" "):null;if(E.linkHref?v.push(O.linkHref,"url"):(E.strong&&v.push(O.strong),E.em&&v.push(O.em),E.strikethrough&&v.push(O.strikethrough),E.emoji&&v.push(O.emoji),E.linkText&&v.push(O.linkText),E.code&&v.push(O.code),E.image&&v.push(O.image),E.imageAltText&&v.push(O.imageAltText,"link"),E.imageMarker&&v.push(O.imageMarker)),E.header&&v.push(O.header,O.header+"-"+E.header),E.quote&&(v.push(O.quote),!re.maxBlockquoteDepth||re.maxBlockquoteDepth>=E.quote?v.push(O.quote+"-"+E.quote):v.push(O.quote+"-"+re.maxBlockquoteDepth)),E.list!==!1){var Ce=(E.listStack.length-1)%3;Ce?Ce===1?v.push(O.list2):v.push(O.list3):v.push(O.list1)}return E.trailingSpaceNewLine?v.push("trailing-space-new-line"):E.trailingSpace&&v.push("trailing-space-"+(E.trailingSpace%2?"a":"b")),v.length?v.join(" "):null}function $(E,v){return E.match(X,!0)?se(v):void 0}function k(E,v){var W=v.text(E,v);if(typeof W!="undefined")return W;if(v.list)return v.list=null,se(v);if(v.taskList){var Ce=E.match(R,!0)[1]===" ";return Ce?v.taskOpen=!0:v.taskClosed=!0,re.highlightFormatting&&(v.formatting="task"),v.taskList=!1,se(v)}if(v.taskOpen=!1,v.taskClosed=!1,v.header&&E.match(/^#+$/,!0))return re.highlightFormatting&&(v.formatting="header"),se(v);var we=E.next();if(v.linkTitle){v.linkTitle=!1;var Ze=we;we==="("&&(Ze=")"),Ze=(Ze+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var rt="^\\s*(?:[^"+Ze+"\\\\]+|\\\\\\\\|\\\\.)"+Ze;if(E.match(new RegExp(rt),!0))return O.linkHref}if(we==="`"){var Ie=v.formatting;re.highlightFormatting&&(v.formatting="code"),E.eatWhile("`");var ye=E.current().length;if(v.code==0&&(!v.quote||ye==1))return v.code=ye,se(v);if(ye==v.code){var Ae=se(v);return v.code=0,Ae}else return v.formatting=Ie,se(v)}else if(v.code)return se(v);if(we==="\\"&&(E.next(),re.highlightFormatting)){var De=se(v),V=O.formatting+"-escape";return De?De+" "+V:V}if(we==="!"&&E.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return v.imageMarker=!0,v.image=!0,re.highlightFormatting&&(v.formatting="image"),se(v);if(we==="["&&v.imageMarker&&E.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return v.imageMarker=!1,v.imageAltText=!0,re.highlightFormatting&&(v.formatting="image"),se(v);if(we==="]"&&v.imageAltText){re.highlightFormatting&&(v.formatting="image");var De=se(v);return v.imageAltText=!1,v.image=!1,v.inline=v.f=J,De}if(we==="["&&!v.image)return v.linkText&&E.match(/^.*?\]/)||(v.linkText=!0,re.highlightFormatting&&(v.formatting="link")),se(v);if(we==="]"&&v.linkText){re.highlightFormatting&&(v.formatting="link");var De=se(v);return v.linkText=!1,v.inline=v.f=E.match(/\(.*?\)| ?\[.*?\]/,!1)?J:k,De}if(we==="<"&&E.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){v.f=v.inline=C,re.highlightFormatting&&(v.formatting="link");var De=se(v);return De?De+=" ":De="",De+O.linkInline}if(we==="<"&&E.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){v.f=v.inline=C,re.highlightFormatting&&(v.formatting="link");var De=se(v);return De?De+=" ":De="",De+O.linkEmail}if(re.xml&&we==="<"&&E.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var I=E.string.indexOf(">",E.pos);if(I!=-1){var Ue=E.string.substring(E.start,I);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ue)&&(v.md_inside=!0)}return E.backUp(1),v.htmlState=F.startState(ge),Se(E,v,_e)}if(re.xml&&we==="<"&&E.match(/^\/\w*?>/))return v.md_inside=!1,"tag";if(we==="*"||we==="_"){for(var Xe=1,et=E.pos==1?" ":E.string.charAt(E.pos-2);Xe<3&&E.eat(we);)Xe++;var qe=E.peek()||" ",$e=!/\s/.test(qe)&&(!P.test(qe)||/\s/.test(et)||P.test(et)),pe=!/\s/.test(et)&&(!P.test(et)||/\s/.test(qe)||P.test(qe)),Be=null,Re=null;if(Xe%2&&(!v.em&&$e&&(we==="*"||!pe||P.test(et))?Be=!0:v.em==we&&pe&&(we==="*"||!$e||P.test(qe))&&(Be=!1)),Xe>1&&(!v.strong&&$e&&(we==="*"||!pe||P.test(et))?Re=!0:v.strong==we&&pe&&(we==="*"||!$e||P.test(qe))&&(Re=!1)),Re!=null||Be!=null){re.highlightFormatting&&(v.formatting=Be==null?"strong":Re==null?"em":"strong em"),Be===!0&&(v.em=we),Re===!0&&(v.strong=we);var Ae=se(v);return Be===!1&&(v.em=!1),Re===!1&&(v.strong=!1),Ae}}else if(we===" "&&(E.eat("*")||E.eat("_"))){if(E.peek()===" ")return se(v);E.backUp(1)}if(re.strikethrough){if(we==="~"&&E.eatWhile(we)){if(v.strikethrough){re.highlightFormatting&&(v.formatting="strikethrough");var Ae=se(v);return v.strikethrough=!1,Ae}else if(E.match(/^[^\s]/,!1))return v.strikethrough=!0,re.highlightFormatting&&(v.formatting="strikethrough"),se(v)}else if(we===" "&&E.match(/^~~/,!0)){if(E.peek()===" ")return se(v);E.backUp(2)}}if(re.emoji&&we===":"&&E.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){v.emoji=!0,re.highlightFormatting&&(v.formatting="emoji");var tt=se(v);return v.emoji=!1,tt}return we===" "&&(E.match(/^ +$/,!1)?v.trailingSpace++:v.trailingSpace&&(v.trailingSpaceNewLine=!0)),se(v)}function C(E,v){var W=E.next();if(W===">"){v.f=v.inline=k,re.highlightFormatting&&(v.formatting="link");var Ce=se(v);return Ce?Ce+=" ":Ce="",Ce+O.linkInline}return E.match(/^[^>]+/,!0),O.linkInline}function J(E,v){if(E.eatSpace())return null;var W=E.next();return W==="("||W==="["?(v.f=v.inline=S(W==="("?")":"]"),re.highlightFormatting&&(v.formatting="link-string"),v.linkHref=!0,se(v)):"error"}var U={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function S(E){return function(v,W){var Ce=v.next();if(Ce===E){W.f=W.inline=k,re.highlightFormatting&&(W.formatting="link-string");var we=se(W);return W.linkHref=!1,we}return v.match(U[E]),W.linkHref=!0,se(W)}}function ee(E,v){return E.match(/^([^\]\\]|\\.)*\]:/,!1)?(v.f=le,E.next(),re.highlightFormatting&&(v.formatting="link"),v.linkText=!0,se(v)):Q(E,v,k)}function le(E,v){if(E.match(/^\]:/,!0)){v.f=v.inline=q,re.highlightFormatting&&(v.formatting="link");var W=se(v);return v.linkText=!1,W}return E.match(/^([^\]\\]|\\.)+/,!0),O.linkText}function q(E,v){return E.eatSpace()?null:(E.match(/^[^\s]+/,!0),E.peek()===void 0?v.linkTitle=!0:E.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),v.f=v.inline=k,O.linkHref+" url")}var Me={startState:function(){return{f:ne,prevLine:{stream:null},thisLine:{stream:null},block:ne,htmlState:null,indentation:0,inline:k,text:$,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(E){return{f:E.f,prevLine:E.prevLine,thisLine:E.thisLine,block:E.block,htmlState:E.htmlState&&F.copyState(ge,E.htmlState),indentation:E.indentation,localMode:E.localMode,localState:E.localMode?F.copyState(E.localMode,E.localState):null,inline:E.inline,text:E.text,formatting:!1,linkText:E.linkText,linkTitle:E.linkTitle,linkHref:E.linkHref,code:E.code,em:E.em,strong:E.strong,strikethrough:E.strikethrough,emoji:E.emoji,header:E.header,setext:E.setext,hr:E.hr,taskList:E.taskList,list:E.list,listStack:E.listStack.slice(0),quote:E.quote,indentedCode:E.indentedCode,trailingSpace:E.trailingSpace,trailingSpaceNewLine:E.trailingSpaceNewLine,md_inside:E.md_inside,fencedEndRE:E.fencedEndRE}},token:function(E,v){if(v.formatting=!1,E!=v.thisLine.stream){if(v.header=0,v.hr=!1,E.match(/^\s*$/,!0))return ae(v),null;if(v.prevLine=v.thisLine,v.thisLine={stream:E},v.taskList=!1,v.trailingSpace=0,v.trailingSpaceNewLine=!1,!v.localState&&(v.f=v.block,v.f!=_e)){var W=E.match(/^\s*/,!0)[0].replace(/\t/g,te).length;if(v.indentation=W,v.indentationDiff=null,W>0)return null}}return v.f(E,v)},innerMode:function(E){return E.block==_e?{state:E.htmlState,mode:ge}:E.localState?{state:E.localState,mode:E.localMode}:{state:E,mode:Me}},indent:function(E,v,W){return E.block==_e&&ge.indent?ge.indent(E.htmlState,v,W):E.localState&&E.localMode.indent?E.localMode.indent(E.localState,v,W):F.Pass},blankLine:ae,getType:se,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Me},"xml"),F.defineMIME("text/markdown","markdown"),F.defineMIME("text/x-markdown","markdown")})},lzim:function(Ee,ue,m){"use strict";var F=m("E7E6"),Oe=m.n(F);m.d(ue,"A",function(){return Oe.a});var re=m("/GNS"),ge=m.n(re);m.d(ue,"z",function(){return ge.a});var me=m("FOrL"),fe=m.n(me);m.d(ue,"t",function(){return fe.a});var O=m("HpTS"),K=m.n(O);m.d(ue,"B",function(){return K.a});var H=m("tWlo"),he=m.n(H);m.d(ue,"b",function(){return he.a});var R=m("7ZXX"),L=m.n(R);m.d(ue,"n",function(){return L.a});var oe=m("GABl"),X=m.n(oe);m.d(ue,"g",function(){return X.a});var j=m("onxn"),z=m.n(j);m.d(ue,"p",function(){return z.a});var P=m("nKGa"),te=m.n(P);m.d(ue,"o",function(){return te.a});var Q=m("4qgm"),Se=m.n(Q);m.d(ue,"D",function(){return Se.a});var ze=m("JeFH"),ae=m.n(ze);m.d(ue,"c",function(){return ae.a});var ne=m("ji0R"),_e=m.n(ne);m.d(ue,"k",function(){return _e.a});var ie=m("W6BS"),se=m.n(ie);m.d(ue,"E",function(){return se.a});var $=m("kPYp"),k=m.n($);m.d(ue,"F",function(){return k.a});var C=m("nukY"),J=m.n(C),U=m("4u4S"),S=m.n(U),ee=m("yslc"),le=m.n(ee),q=m("l2Kq"),Me=m.n(q),E=m("RMFE"),v=m.n(E);m.d(ue,"q",function(){return v.a});var W=m("TGq3"),Ce=m.n(W);m.d(ue,"r",function(){return Ce.a});var we=m("SMhR"),Ze=m.n(we);m.d(ue,"C",function(){return Ze.a});var rt=m("8/bI"),Ie=m.n(rt);m.d(ue,"l",function(){return Ie.a});var ye=m("JWDV"),Ae=m.n(ye);m.d(ue,"e",function(){return Ae.a});var De=m("Xsq0"),V=m.n(De);m.d(ue,"s",function(){return V.a});var I=m("Ohmc"),Ue=m.n(I);m.d(ue,"d",function(){return Ue.a});var Xe=m("csWT"),et=m.n(Xe);m.d(ue,"f",function(){return et.a});var qe=m("7v3h"),$e=m.n(qe);m.d(ue,"m",function(){return $e.a});var pe=m("cRFk"),Be=m.n(pe);m.d(ue,"y",function(){return Be.a});var Re=m("kPWJ"),tt=m.n(Re);m.d(ue,"x",function(){return tt.a});var Ge=m("qgvg"),xe=m.n(Ge);m.d(ue,"u",function(){return xe.a});var Fe=m("FPkq"),ut=m.n(Fe);m.d(ue,"w",function(){return ut.a});var at=m("A/g1"),Ve=m.n(at);m.d(ue,"h",function(){return Ve.a});var Qe=m("Nmxd"),yt=m.n(Qe);m.d(ue,"i",function(){return yt.a});var ft=m("5D2P"),st=m.n(ft);m.d(ue,"j",function(){return st.a});var ce=m("djh8"),gt=m.n(ce);m.d(ue,"v",function(){return gt.a});var ot=m("Jq4h"),de=m.n(ot);m.d(ue,"a",function(){return de.a})},nKGa:function(Ee,ue,m){Ee.exports=m.p+"static/export_exercise-template.f7655c19.png"},nZ20:function(Ee,ue,m){Ee.exports={icons:"icons___3O80F"}},nukY:function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV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bop+2IXUwrKpjDHR93OdTeicVLgi6VwUJ7t89ijK4sQ2HP6dGrDm2PhLotetiNpgPVZXi741I8aN0t80R9Pv/VU4P9kJi0VLnm8iU5cvsOAu1Y//8jLZMlF3SBN0ZrRNFnBG8RRxza2utYf3syDjWVoIjV30Z8kzc7aR6579BgYRl30tvXLH7rPLn+7h8bjlZ5mFP9MDt8EMxD13lt4lpb2ZQc0qegnTeyyKOv2QE5FO3OSgzvFjjporyX6qKNwdMU/6UxpWTfmsuOFCrtZT8WKMKqyJkdbfSPpn5nql4XamMamN5GB0TvUK4KE6HbTqS5ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(Ee,ue,m){(function(F){F(m("VrN/"))})(function(F){"use strict";var Oe=F.Pos;function re(P,te){return P.line-te.line||P.ch-te.ch}var ge="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",me=ge+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",fe=new RegExp("<(/?)(["+ge+"]["+me+"]*)","g");function O(P,te,Q,Se){this.line=te,this.ch=Q,this.cm=P,this.text=P.getLine(te),this.min=Se?Math.max(Se.from,P.firstLine()):P.firstLine(),this.max=Se?Math.min(Se.to-1,P.lastLine()):P.lastLine()}function K(P,te){var Q=P.cm.getTokenTypeAt(Oe(P.line,te));return Q&&/\btag\b/.test(Q)}function H(P){return P.line>=P.max?void 0:(P.ch=0,P.text=P.cm.getLine(++P.line),!0)}function he(P){return P.line<=P.min?void 0:(P.text=P.cm.getLine(--P.line),P.ch=P.text.length,!0)}function R(P){for(;;){var te=P.text.indexOf(">",P.ch);if(te==-1){if(H(P))continue;return}if(!K(P,te+1)){P.ch=te+1;continue}var Q=P.text.lastIndexOf("/",te),Se=Q>-1&&!/\S/.test(P.text.slice(Q+1,te));return P.ch=te+1,Se?"selfClose":"regular"}}function L(P){for(;;){var te=P.ch?P.text.lastIndexOf("<",P.ch-1):-1;if(te==-1){if(he(P))continue;return}if(!K(P,te+1)){P.ch=te;continue}fe.lastIndex=te,P.ch=te;var Q=fe.exec(P.text);if(Q&&Q.index==te)return Q}}function oe(P){for(;;){fe.lastIndex=P.ch;var te=fe.exec(P.text);if(!te){if(H(P))continue;return}if(!K(P,te.index+1)){P.ch=te.index+1;continue}return P.ch=te.index+te[0].length,te}}function X(P){for(;;){var te=P.ch?P.text.lastIndexOf(">",P.ch-1):-1;if(te==-1){if(he(P))continue;return}if(!K(P,te+1)){P.ch=te;continue}var Q=P.text.lastIndexOf("/",te),Se=Q>-1&&!/\S/.test(P.text.slice(Q+1,te));return P.ch=te+1,Se?"selfClose":"regular"}}function j(P,te){for(var Q=[];;){var Se=oe(P),ze,ae=P.line,ne=P.ch-(Se?Se[0].length:0);if(!Se||!(ze=R(P)))return;if(ze=="selfClose")continue;if(Se[1]){for(var _e=Q.length-1;_e>=0;--_e)if(Q[_e]==Se[2]){Q.length=_e;break}if(_e<0&&(!te||te==Se[2]))return{tag:Se[2],from:Oe(ae,ne),to:Oe(P.line,P.ch)}}else Q.push(Se[2])}}function z(P,te){for(var Q=[];;){var Se=X(P);if(!Se)return;if(Se=="selfClose"){L(P);continue}var ze=P.line,ae=P.ch,ne=L(P);if(!ne)return;if(ne[1])Q.push(ne[2]);else{for(var _e=Q.length-1;_e>=0;--_e)if(Q[_e]==ne[2]){Q.length=_e;break}if(_e<0&&(!te||te==ne[2]))return{tag:ne[2],from:Oe(P.line,P.ch),to:Oe(ze,ae)}}}}F.registerHelper("fold","xml",function(P,te){for(var Q=new O(P,te.line,0);;){var Se=oe(Q);if(!Se||Q.line!=te.line)return;var ze=R(Q);if(!ze)return;if(!Se[1]&&ze!="selfClose"){var ae=Oe(Q.line,Q.ch),ne=j(Q,Se[2]);return ne&&re(ne.from,ae)>0?{from:ae,to:ne.from}:null}}}),F.findMatchingTag=function(P,te,Q){var Se=new O(P,te.line,te.ch,Q);if(Se.text.indexOf(">")==-1&&Se.text.indexOf("<")==-1)return;var ze=R(Se),ae=ze&&Oe(Se.line,Se.ch),ne=ze&&L(Se);if(!ze||!ne||re(Se,te)>0)return;var _e={from:Oe(Se.line,Se.ch),to:ae,tag:ne[2]};return ze=="selfClose"?{open:_e,close:null,at:"open"}:ne[1]?{open:z(Se,ne[2]),close:_e,at:"close"}:(Se=new O(P,ae.line,ae.ch,Q),{open:_e,close:j(Se,ne[2]),at:"open"})},F.findEnclosingTag=function(P,te,Q,Se){for(var ze=new O(P,te.line,te.ch,Q);;){var ae=z(ze,Se);if(!ae)break;var ne=new O(P,te.line,te.ch,Q),_e=j(ne,ae.tag);if(_e)return{open:ae,close:_e}}},F.scanForClosingTag=function(P,te,Q,Se){var ze=new O(P,te.line,te.ch,Se?{from:0,to:Se}:null);return j(ze,Q)}})},p5ED:function(Ee,ue,m){"use strict";var F=m("+L6B"),Oe=m("2/Rp"),re=m("5Dmo"),ge=m("3S7+"),me=m("k1fw"),fe=m("9og8"),O=m("tJVT"),K=m("WmNS"),H=m.n(K),he=m("q1tI"),R=m.n(he),L=m("vHTk"),oe=m.n(L),X=m("yEEn"),j=m("ZW9T"),z=m("1vsH"),P=m("V0Rq"),te=m("m3rI"),Q=function(ze){var ae=ze.name,ne=ze.data,_e=ze.theme,ie=ze.type,se=ze.filename,$=ze.monacoEditor,k=ze.className,C=ze.style,J=ze.close,U=ze.onClose,S=ze.hasMask,ee=ze.otherData,le=ee===void 0?{}:ee,q=Object(he.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Me=Object(O.a)(q,2),E=Me[0],v=Me[1],W=Object(he.useState)(""),Ce=Object(O.a)(W,2),we=Ce[0],Ze=Ce[1],rt=Object(he.useState)(),Ie=Object(O.a)(rt,2),ye=Ie[0],Ae=Ie[1],De=window.ENV==="build"?"/react/build/office.html":"/office.html",V,I=1024*1024,Ue=10*I,Xe=Object(he.useRef)();ie==="office"&&(V=Object(z.R)(ne).filesize,V>Ue&&(ie="other")),se&&($.filename=se),Object(he.useEffect)(function(){var pe,Be,Re=(pe=document.cookie)===null||pe===void 0||((Be=pe.replace(/\s/g,""))===null||Be===void 0)?void 0:Be.split(";");Re==null||Re.map(function(tt){var Ge=tt.split("=");Ge[0]==="_educoder_session"&&Ze(Ge[1])})},[]),Object(he.useEffect)(function(){ie==="office"&&et()},[ie]);var et=function(){var pe=Object(fe.a)(H.a.mark(function Be(){var Re,tt,Ge;return H.a.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return console.log("data:",ne),Re=ne,ne.startsWith("http")||(Re=location.origin+Re),tt=new URL(Re).pathname.split("/").pop(),Fe.next=6,Object(P.U)({attachment_id:tt});case 6:Ge=Fe.sent,Ae(Ge);case 8:case"end":return Fe.stop()}},Be)}));return function(){return pe.apply(this,arguments)}}(),qe=function(){if(ne.startsWith("http")||ne.startsWith("/api")||ne.startsWith("blob:")){$e();return}Object(z.x)(se||"educoder",ne,se||"educoder")},$e=function(){Object(z.v)(se||"educoder",decodeURIComponent(ne))};return R.a.createElement("div",{style:Object(me.a)({},C||{}),className:"".concat(S&&oe.a.bgBlack," ").concat(ie?oe.a.wrp:"hide")},J&&R.a.createElement("div",{className:oe.a.close,ref:Xe},R.a.createElement(ge.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Xe.current}},R.a.createElement("span",{onClick:$e},R.a.createElement("i",{className:"icon-quxiaozhiding"}))),R.a.createElement(ge.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Xe.current}},R.a.createElement("span",{className:"",onClick:function(){U(),Ae(null)}},R.a.createElement("i",{className:"icon-guanbi1"})))),R.a.createElement("div",{className:"".concat(oe.a[k]," ").concat(k," ").concat(oe.a.monaco," ").concat(ie==="txt"?"show":"hide")},ie==="txt"&&R.a.createElement(j.b,$)),ie==="audio"&&R.a.createElement("audio",{src:"".concat((ne==null?void 0:ne.indexOf("http://"))>-1||(ne==null?void 0:ne.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(ne),autoPlay:!0}),ie==="video"&&R.a.createElement(R.a.Fragment,null,(ne==null?void 0:ne.indexOf("/api"))>-1?R.a.createElement("video",{controls:!0,src:"".concat(ne),autoPlay:!0}):R.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(ne),autoPlay:!0})),ie==="office"&&ye&&R.a.createElement("iframe",{src:"".concat(De,"?key=").concat(ye.key,"&url=").concat(te.a.API_SERVER+ye.url,"&callbackUrl=").concat(te.a.API_SERVER+ye.callbackUrl,"&fileType=").concat(ye.fileType,"&title=").concat(ye.title,"&model=view")}),(ie==="xlsx"||ie==="doc"||ie==="pptx"||ie==="docx")&&R.a.createElement("iframe",{src:"".concat(De,"?key=").concat(le.key,"&url=").concat(te.a.API_SERVER+le.url,"&callbackUrl=").concat(te.a.API_SERVER+le.callbackUrl,"&fileType=").concat(le.fileType,"&title=").concat(le.title,"&model=").concat(le.model)}),ie==="html"&&R.a.createElement("iframe",{src:ne+"&disposition=inline"}),ie==="pdf"&&R.a.createElement("embed",{className:oe.a.embed,src:ne,type:"application/pdf"}),ie==="image"&&R.a.createElement("img",{src:"".concat((ne==null?void 0:ne.indexOf("http://"))>-1||(ne==null?void 0:ne.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(ne)}),ie==="other"&&R.a.createElement("div",null,R.a.createElement(Oe.a,{type:"primary",size:"large",onClick:qe},R.a.createElement(X.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),ie==="download"&&R.a.createElement(Oe.a,{type:"primary",size:"large",onClick:qe},R.a.createElement(X.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};ue.a=Q},"p77/":function(Ee,ue,m){},qgvg:function(Ee,ue){Ee.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"rAM+":function(Ee,ue,m){"use strict";m.d(ue,"a",function(){return Oe});var F=m("Qw5x");function Oe(re,ge){var me;if(typeof Symbol=="undefined"||re[Symbol.iterator]==null){if(Array.isArray(re)||(me=Object(F.a)(re))||ge&&re&&typeof re.length=="number"){me&&(re=me);var fe=0,O=function(){};return{s:O,n:function(){return fe>=re.length?{done:!0}:{done:!1,value:re[fe++]}},e:function(L){throw L},f:O}}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 K=!0,H=!1,he;return{s:function(){me=re[Symbol.iterator]()},n:function(){var L=me.next();return K=L.done,L},e:function(L){H=!0,he=L},f:function(){try{!K&&me.return!=null&&me.return()}finally{if(H)throw he}}}}},rUJ1:function(Ee,ue){const m=/[&<>"']/,F=/[&<>"']/g,Oe=/[<>"']|&(?!#?\w+;)/,re=/[<>"']|&(?!#?\w+;)/g,ge={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},me=ie=>ge[ie];function fe(ie,se){if(se){if(m.test(ie))return ie.replace(F,me)}else if(Oe.test(ie))return ie.replace(re,me);return ie}const O=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function K(ie){return ie.replace(O,(se,$)=>($=$.toLowerCase(),$==="colon"?":":$.charAt(0)==="#"?$.charAt(1)==="x"?String.fromCharCode(parseInt($.substring(2),16)):String.fromCharCode(+$.substring(1)):""))}const H=/(^|[^\[])\^/g;function he(ie,se){ie=ie.source||ie,se=se||"";const $={replace:(k,C)=>(C=C.source||C,C=C.replace(H,"$1"),ie=ie.replace(k,C),$),getRegex:()=>new RegExp(ie,se)};return $}const R=/[^\w:]/g,L=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function oe(ie,se,$){if(ie){let k;try{k=decodeURIComponent(K($)).replace(R,"").toLowerCase()}catch(C){return null}if(k.indexOf("javascript:")===0||k.indexOf("vbscript:")===0||k.indexOf("data:")===0)return null}se&&!L.test($)&&($=te(se,$));try{$=encodeURI($).replace(/%25/g,"%")}catch(k){return null}return $}const X={},j=/^[^:]+:\/*[^/]*$/,z=/^([^:]+:)[\s\S]*$/,P=/^([^:]+:\/*[^/]*)[\s\S]*$/;function te(ie,se){X[" "+ie]||(j.test(ie)?X[" "+ie]=ie+"/":X[" "+ie]=ae(ie,"/",!0)),ie=X[" "+ie];const $=ie.indexOf(":")===-1;return se.substring(0,2)==="//"?$?se:ie.replace(z,"$1")+se:se.charAt(0)==="/"?$?se:ie.replace(P,"$1")+se:ie+se}const Q={exec:function(){}};function Se(ie){let se=1,$,k;for(;se<arguments.length;se++){$=arguments[se];for(k in $)Object.prototype.hasOwnProperty.call($,k)&&(ie[k]=$[k])}return ie}function ze(ie,se){const $=ie.replace(/\|/g,(J,U,S)=>{let ee=!1,le=U;for(;--le>=0&&S[le]==="\\";)ee=!ee;return ee?"|":" |"}),k=$.split(/ \|/);let C=0;if(k.length>se)k.splice(se);else for(;k.length<se;)k.push("");for(;C<k.length;C++)k[C]=k[C].trim().replace(/\\\|/g,"|");return k}function ae(ie,se,$){const k=ie.length;if(k===0)return"";let C=0;for(;C<k;){const J=ie.charAt(k-C-1);if(J===se&&!$)C++;else if(J!==se&&$)C++;else break}return ie.substr(0,k-C)}function ne(ie,se){if(ie.indexOf(se[1])===-1)return-1;const $=ie.length;let k=0,C=0;for(;C<$;C++)if(ie[C]==="\\")C++;else if(ie[C]===se[0])k++;else if(ie[C]===se[1]&&(k--,k<0))return C;return-1}function _e(ie){ie&&ie.sanitize&&!ie.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")}Ee.exports={escape:fe,unescape:K,edit:he,cleanUrl:oe,resolveUrl:te,noopTest:Q,merge:Se,splitCells:ze,rtrim:ae,findClosingBracket:ne,checkSanitizeDeprecation:_e}},tWlo:function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2Vo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iYCewNEPov3EK+G59k39BOp3Nt+YiUViLQKNjBH8sV7EXNivhslgb4xb2J28SMtMSRmbrwBBYpZPOI+xw4J2aka23tzB4VETrdct6zoCECC7wjjWIy1tbewZT//9R4RYzxZOtZTwK0C2vEjHjT2Ov3sx2d3TA7ZxPzuhrB5nVdiQ8pNPPvKP+XkEjjbYKtXm0VOpHe5x01KDDI72dFtmI+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(Ee,ue,m){Ee.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},yslc:function(Ee,ue){Ee.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADj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xkBLMOBa6AW60TCTlS3RMFYnY0BKBpwLnUa9NZl3B/LLtqQkgtmSNwOOhX7whXjU1NKz5e4DdcubH4ZOJgw0Fbrl7c9fg5B7ZYKRwWAMOLgio89+CwTTGTeMATkxYDui63OyQPglcgLIsDAGKAPXhF6YfQvM3HeBENKZdQ1jQGoGLEIvmJ0EvnZ/c79ES2owzB5jwBkDHGhIZ/2R7QC5g9HEGJArAxzyde8D5Gm5AmS4GAO2c3TGB2OgFTLALR1KA6e5SByvUpEp7s+6tELwrMnKYcCl0DmYVOCyzOM3L2dCV44mZInUhdBrVFCPMmdt3MCmLrLsemWBcih0DlfVBMNNWVu2WdlgI7qydCE7tE2FzpVpVOqhdZkbaJSKhsSELruuVxYgG6FzOK+Bekjd+I16exaY0JWlC9mhbRA6h5PBCBpUM369w1jdTOiy63plAaoX+rEQNTewetzmEmfomdCVpQvZoeWWDi3UctrBlePXnHHpTZcdcgZIUQxErnk43vjI2ovuQP8faDGikjbF4FsAAAAASUVORK5CYII="},zEei:function(Ee,ue,m){Ee.exports={flex_box_center:"flex_box_center___3trsE",flex_space_between:"flex_space_between___vYNfG",flex_box_vertical_center:"flex_box_vertical_center___267W4",flex_box_center_end:"flex_box_center_end___35F4i",flex_box_column:"flex_box_column___1cLWS",bg:"bg___13rUr",flexRow:"flexRow___geim6",flexJustifyCenter:"flexJustifyCenter___2SLQ2",flexAlignEnd:"flexAlignEnd___2-3OH",flexAlignCenter:"flexAlignCenter___2PK_9",flexColumn:"flexColumn___pc_D1",formWrap:"formWrap___3ozw6",titleWrap:"titleWrap___3JSLu",fieldWrap:"fieldWrap___1M8-z",mdWrap:"mdWrap___3iPl2",backgroundFa:"backgroundFa___2Wd1f",button:"button___3ie7q",icons:"icons___-WSHu",addButton:"addButton___1qx7n",navBar:"navBar___xDlWA",actived:"actived___dZNDy",deleteButton:"deleteButton___3Ethm"}}}]);