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.
117 lines
438 KiB
117 lines
438 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[172,7,8],{"+NIl":function(bt,et,m){(function(F){F(m("VrN/"))})(function(F){"use strict";F.defineMode("stex",function(ke,q){"use strict";function _e(j,I){j.cmdState.push(I)}function be(j){return j.cmdState.length>0?j.cmdState[j.cmdState.length-1]:null}function ie(j){var I=j.cmdState.pop();I&&I.closeBracket()}function L(j){for(var I=j.cmdState,N=I.length-1;N>=0;N--){var M=I[N];if(M.name=="DEFAULT")continue;return M}return{styleIdentifier:function(){return null}}}function R(j,I,N){return function(){this.name=j,this.bracketNo=0,this.style=I,this.styles=N,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var x={};x.importmodule=R("importmodule","tag",["string","builtin"]),x.documentclass=R("documentclass","tag",["","atom"]),x.usepackage=R("usepackage","tag",["atom"]),x.begin=R("begin","tag",["atom"]),x.end=R("end","tag",["atom"]),x.label=R("label","tag",["atom"]),x.ref=R("ref","tag",["atom"]),x.eqref=R("eqref","tag",["atom"]),x.cite=R("cite","tag",["atom"]),x.bibitem=R("bibitem","tag",["atom"]),x.Bibitem=R("Bibitem","tag",["atom"]),x.RBibitem=R("RBibitem","tag",["atom"]),x.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ne(j,I){j.f=I}function H(j,I){var N;if(j.match(/^\\[a-zA-Z@]+/)){var M=j.current().slice(1);return N=x.hasOwnProperty(M)?x[M]:x.DEFAULT,N=new N,_e(I,N),ne(I,he),N.style}if(j.match(/^\\[$&%#{}_]/))return"tag";if(j.match(/^\\[,;!\/\\]/))return"tag";if(j.match("\\["))return ne(I,function(V,te){return J(V,te,"\\]")}),"keyword";if(j.match("\\("))return ne(I,function(V,te){return J(V,te,"\\)")}),"keyword";if(j.match("$$"))return ne(I,function(V,te){return J(V,te,"$$")}),"keyword";if(j.match("$"))return ne(I,function(V,te){return J(V,te,"$")}),"keyword";var Z=j.next();if(Z=="%")return j.skipToEnd(),"comment";if(Z=="}"||Z=="]"){if(N=be(I),N)N.closeBracket(Z),ne(I,he);else return"error";return"bracket"}else return Z=="{"||Z=="["?(N=x.DEFAULT,N=new N,_e(I,N),"bracket"):/\d/.test(Z)?(j.eatWhile(/[\w.%]/),"atom"):(j.eatWhile(/[\w\-_]/),N=L(I),N.name=="begin"&&(N.argument=j.current()),N.styleIdentifier())}function J(j,I,N){if(j.eatSpace())return null;if(N&&j.match(N))return ne(I,H),"keyword";if(j.match(/^\\[a-zA-Z@]+/))return"tag";if(j.match(/^[a-zA-Z]+/))return"variable-2";if(j.match(/^\\[$&%#{}_]/))return"tag";if(j.match(/^\\[,;!\/]/))return"tag";if(j.match(/^[\^_&]/))return"tag";if(j.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(j.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var M=j.next();return M=="{"||M=="}"||M=="["||M=="]"||M=="("||M==")"?"bracket":M=="%"?(j.skipToEnd(),"comment"):"error"}function he(j,I){var N=j.peek(),M;return N=="{"||N=="["?(M=be(I),M.openBracket(N),j.eat(N),ne(I,H),"bracket"):/[ \t\r]/.test(N)?(j.eat(N),null):(ne(I,H),ie(I),H(j,I))}return{startState:function(){var j=q.inMathMode?function(I,N){return J(I,N)}:H;return{cmdState:[],f:j}},copyState:function(j){return{cmdState:j.cmdState.slice(),f:j.f}},token:function(j,I){return I.f(j,I)},blankLine:function(j){j.f=H,j.cmdState.length=0},lineComment:"%"}}),F.defineMIME("text/x-stex","stex"),F.defineMIME("text/x-latex","stex")})},"+yhJ":function(bt,et,m){bt.exports=m.p+"static/xixi.d492fb65.svg"},"0eGx":function(bt,et,m){bt.exports=m.p+"static/zhong.c1924b73.svg"},"19Vz":function(bt,et,m){(function(F){F(m("VrN/"))})(function(F){F.defineOption("placeholder","",function(R,x,ne){var H=ne&&ne!=F.Init;if(x&&!H)R.on("blur",be),R.on("change",ie),R.on("swapDoc",ie),F.on(R.getInputField(),"compositionupdate",R.state.placeholderCompose=function(){_e(R)}),ie(R);else if(!x&&H){R.off("blur",be),R.off("change",ie),R.off("swapDoc",ie),F.off(R.getInputField(),"compositionupdate",R.state.placeholderCompose),ke(R);var J=R.getWrapperElement();J.className=J.className.replace(" CodeMirror-empty","")}x&&!R.hasFocus()&&be(R)});function ke(R){R.state.placeholder&&(R.state.placeholder.parentNode.removeChild(R.state.placeholder),R.state.placeholder=null)}function q(R){ke(R);var x=R.state.placeholder=document.createElement("pre");x.style.cssText="height: 0; overflow: visible",x.style.direction=R.getOption("direction"),x.className="CodeMirror-placeholder CodeMirror-line-like";var ne=R.getOption("placeholder");typeof ne=="string"&&(ne=document.createTextNode(ne)),x.appendChild(ne),R.display.lineSpace.insertBefore(x,R.display.lineSpace.firstChild)}function _e(R){setTimeout(function(){var x=!1,ne=R.getInputField();ne.nodeName=="TEXTAREA"?x=!ne.value:R.lineCount()==1&&(x=!/[^\u200b]/.test(ne.querySelector(".CodeMirror-line").textContent)),x?q(R):ke(R)},20)}function be(R){L(R)&&q(R)}function ie(R){var x=R.getWrapperElement(),ne=L(R);x.className=x.className.replace(" CodeMirror-empty","")+(ne?" CodeMirror-empty":""),ne?q(R):ke(R)}function L(R){return R.lineCount()===1&&R.getLine(0)===""}})},"1eCo":function(bt,et,m){(function(F){F(m("VrN/"))})(function(F){"use strict";var ke={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},q={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};F.defineMode("xml",function(_e,be){var ie=_e.indentUnit,L={},R=be.htmlMode?ke:q;for(var x in R)L[x]=R[x];for(var x in be)L[x]=be[x];var ne,H;function J(p,O){function T(re){return O.tokenize=re,re(p,O)}var y=p.next();if(y=="<")return p.eat("!")?p.eat("[")?p.match("CDATA[")?T(I("atom","]]>")):null:p.match("--")?T(I("comment","-->")):p.match("DOCTYPE",!0,!0)?(p.eatWhile(/[\w\._\-]/),T(N(1))):null:p.eat("?")?(p.eatWhile(/[\w\._\-]/),O.tokenize=I("meta","?>"),"meta"):(ne=p.eat("/")?"closeTag":"openTag",O.tokenize=he,"tag bracket");if(y=="&"){var D;return p.eat("#")?p.eat("x")?D=p.eatWhile(/[a-fA-F\d]/)&&p.eat(";"):D=p.eatWhile(/[\d]/)&&p.eat(";"):D=p.eatWhile(/[\w\.\-:]/)&&p.eat(";"),D?"atom":"error"}else return p.eatWhile(/[^&<]/),null}J.isInText=!0;function he(p,O){var T=p.next();if(T==">"||T=="/"&&p.eat(">"))return O.tokenize=J,ne=T==">"?"endTag":"selfcloseTag","tag bracket";if(T=="=")return ne="equals",null;if(T=="<"){O.tokenize=J,O.state=te,O.tagName=O.tagStart=null;var y=O.tokenize(p,O);return y?y+" tag error":"tag error"}else return/[\'\"]/.test(T)?(O.tokenize=j(T),O.stringStartCol=p.column(),O.tokenize(p,O)):(p.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function j(p){var O=function(T,y){for(;!T.eol();)if(T.next()==p){y.tokenize=he;break}return"string"};return O.isInAttribute=!0,O}function I(p,O){return function(T,y){for(;!T.eol();){if(T.match(O)){y.tokenize=J;break}T.next()}return p}}function N(p){return function(O,T){for(var y;(y=O.next())!=null;){if(y=="<")return T.tokenize=N(p+1),T.tokenize(O,T);if(y==">")if(p==1){T.tokenize=J;break}else return T.tokenize=N(p-1),T.tokenize(O,T)}return"meta"}}function M(p,O,T){this.prev=p.context,this.tagName=O,this.indent=p.indented,this.startOfLine=T,(L.doNotIndent.hasOwnProperty(O)||p.context&&p.context.noIndent)&&(this.noIndent=!0)}function Z(p){p.context&&(p.context=p.context.prev)}function V(p,O){for(var T;;){if(!p.context)return;if(T=p.context.tagName,!L.contextGrabbers.hasOwnProperty(T)||!L.contextGrabbers[T].hasOwnProperty(O))return;Z(p)}}function te(p,O,T){return p=="openTag"?(T.tagStart=O.column(),De):p=="closeTag"?Y:te}function De(p,O,T){return p=="word"?(T.tagName=O.current(),H="tag",ee):L.allowMissingTagName&&p=="endTag"?(H="tag bracket",ee(p,O,T)):(H="error",De)}function Y(p,O,T){if(p=="word"){var y=O.current();return T.context&&T.context.tagName!=y&&L.implicitlyClosed.hasOwnProperty(T.context.tagName)&&Z(T),T.context&&T.context.tagName==y||L.matchClosing===!1?(H="tag",G):(H="tag error",f)}else return L.allowMissingTagName&&p=="endTag"?(H="tag bracket",G(p,O,T)):(H="error",f)}function G(p,O,T){return p!="endTag"?(H="error",G):(Z(T),te)}function f(p,O,T){return H="error",G(p,O,T)}function ee(p,O,T){if(p=="word")return H="attribute",U;if(p=="endTag"||p=="selfcloseTag"){var y=T.tagName,D=T.tagStart;return T.tagName=T.tagStart=null,p=="selfcloseTag"||L.autoSelfClosers.hasOwnProperty(y)?V(T,y):(V(T,y),T.context=new M(T,y,D==T.indented)),te}return H="error",ee}function U(p,O,T){return p=="equals"?ae:(L.allowMissing||(H="error"),ee(p,O,T))}function ae(p,O,T){return p=="string"?E:p=="word"&&L.allowUnquoted?(H="string",ee):(H="error",ee(p,O,T))}function E(p,O,T){return p=="string"?E:ee(p,O,T)}return{startState:function(p){var O={tokenize:J,state:te,indented:p||0,tagName:null,tagStart:null,context:null};return p!=null&&(O.baseIndent=p),O},token:function(p,O){if(!O.tagName&&p.sol()&&(O.indented=p.indentation()),p.eatSpace())return null;ne=null;var T=O.tokenize(p,O);return(T||ne)&&T!="comment"&&(H=null,O.state=O.state(ne||T,p,O),H&&(T=H=="error"?T+" error":H)),T},indent:function(p,O,T){var y=p.context;if(p.tokenize.isInAttribute)return p.tagStart==p.indented?p.stringStartCol+1:p.indented+ie;if(y&&y.noIndent)return F.Pass;if(p.tokenize!=he&&p.tokenize!=J)return T?T.match(/^(\s*)/)[0].length:0;if(p.tagName)return L.multilineTagIndentPastTag!==!1?p.tagStart+p.tagName.length+2:p.tagStart+ie*(L.multilineTagIndentFactor||1);if(L.alignCDATA&&/<!\[CDATA\[/.test(O))return 0;var D=O&&/^<(\/)?([\w_:\.-]*)/.exec(O);if(D&&D[1])for(;y;)if(y.tagName==D[2]){y=y.prev;break}else if(L.implicitlyClosed.hasOwnProperty(y.tagName))y=y.prev;else break;else if(D)for(;y;){var re=L.contextGrabbers[y.tagName];if(re&&re.hasOwnProperty(D[2]))y=y.prev;else break}for(;y&&y.prev&&!y.startOfLine;)y=y.prev;return y?y.indent+ie:p.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:L.htmlMode?"html":"xml",helperType:L.htmlMode?"html":"xml",skipAttribute:function(p){p.state==ae&&(p.state=ee)},xmlCurrentTag:function(p){return p.tagName?{name:p.tagName,close:p.type=="closeTag"}:null},xmlCurrentContext:function(p){for(var O=[],T=p.context;T;T=T.prev)T.tagName&&O.push(T.tagName);return O.reverse()}}}),F.defineMIME("text/xml","xml"),F.defineMIME("application/xml","xml"),F.mimeModes.hasOwnProperty("text/html")||F.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"6+eU":function(bt,et,m){"use strict";m.d(et,"a",function(){return G});var F=m("wx14"),ke=m("rePB"),q=m("VTBJ"),_e=m("1OyB"),be=m("vuIU"),ie=m("Ji7U"),L=m("LK+K"),R=m("q1tI"),x=m.n(R),ne=m("TSYQ"),H=m.n(ne),J=function(ee){var U,ae="".concat(ee.rootPrefixCls,"-item"),E=H()(ae,"".concat(ae,"-").concat(ee.page),(U={},Object(ke.a)(U,"".concat(ae,"-active"),ee.active),Object(ke.a)(U,ee.className,!!ee.className),Object(ke.a)(U,"".concat(ae,"-disabled"),!ee.page),U)),p=function(){ee.onClick(ee.page)},O=function(y){ee.onKeyPress(y,ee.onClick,ee.page)};return x.a.createElement("li",{title:ee.showTitle?ee.page:null,className:E,onClick:p,onKeyPress:O,tabIndex:"0"},ee.itemRender(ee.page,"page",x.a.createElement("a",{rel:"nofollow"},ee.page)))},he=J,j={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},I=function(f){Object(ie.a)(U,f);var ee=Object(L.a)(U);function U(){var ae;Object(_e.a)(this,U);for(var E=arguments.length,p=new Array(E),O=0;O<E;O++)p[O]=arguments[O];return ae=ee.call.apply(ee,[this].concat(p)),ae.state={goInputText:""},ae.buildOptionText=function(T){return"".concat(T," ").concat(ae.props.locale.items_per_page)},ae.changeSize=function(T){ae.props.changeSize(Number(T))},ae.handleChange=function(T){ae.setState({goInputText:T.target.value})},ae.handleBlur=function(T){var y=ae.props,D=y.goButton,re=y.quickGo,B=y.rootPrefixCls,me=ae.state.goInputText;if(D||me==="")return;if(T.relatedTarget&&(T.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||T.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;ae.setState({goInputText:""}),re(ae.getValidValue())},ae.go=function(T){var y=ae.state.goInputText;if(y==="")return;(T.keyCode===j.ENTER||T.type==="click")&&(ae.setState({goInputText:""}),ae.props.quickGo(ae.getValidValue()))},ae}return Object(be.a)(U,[{key:"getValidValue",value:function(){var E=this.state,p=E.goInputText,O=E.current;return!p||isNaN(p)?O:Number(p)}},{key:"getPageSizeOptions",value:function(){var E=this.props,p=E.pageSize,O=E.pageSizeOptions;return O.some(function(T){return T.toString()===p.toString()})?O:O.concat([p.toString()]).sort(function(T,y){var D=isNaN(Number(T))?0:Number(T),re=isNaN(Number(y))?0:Number(y);return D-re})}},{key:"render",value:function(){var E=this,p=this.props,O=p.pageSize,T=p.locale,y=p.rootPrefixCls,D=p.changeSize,re=p.quickGo,B=p.goButton,me=p.selectComponentClass,_=p.buildOptionText,c=p.selectPrefixCls,P=p.disabled,ue=this.state.goInputText,le="".concat(y,"-options"),Le=me,We=null,pe=null,Fe=null;if(!D&&!re)return null;var Ee=this.getPageSizeOptions();if(D&&Le){var xe=Ee.map(function(K,A){return x.a.createElement(Le.Option,{key:A,value:K.toString()},(_||E.buildOptionText)(K))});We=x.a.createElement(Le,{disabled:P,prefixCls:c,showSearch:!1,className:"".concat(le,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(O||Ee[0]).toString(),onChange:this.changeSize,getPopupContainer:function(A){return A.parentNode}},xe)}return re&&(B&&(Fe=typeof B=="boolean"?x.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:P,className:"".concat(le,"-quick-jumper-button")},T.jump_to_confirm):x.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),pe=x.a.createElement("div",{className:"".concat(le,"-quick-jumper")},T.jump_to,x.a.createElement("input",{disabled:P,type:"text",value:ue,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),T.page,Fe)),x.a.createElement("li",{className:"".concat(le)},We,pe)}}]),U}(x.a.Component);I.defaultProps={pageSizeOptions:["10","20","50","100"]};var N=I,M=m("N2Kk");function Z(){}function V(f){return typeof f=="number"&&isFinite(f)&&Math.floor(f)===f}function te(f,ee,U){return U}function De(f,ee,U){var ae=typeof f=="undefined"?ee.pageSize:f;return Math.floor((U.total-1)/ae)+1}var Y=function(f){Object(ie.a)(U,f);var ee=Object(L.a)(U);function U(ae){var E;Object(_e.a)(this,U),E=ee.call(this,ae),E.getJumpPrevPage=function(){return Math.max(1,E.state.current-(E.props.showLessItems?3:5))},E.getJumpNextPage=function(){return Math.min(De(void 0,E.state,E.props),E.state.current+(E.props.showLessItems?3:5))},E.getItemIcon=function(D,re){var B=E.props.prefixCls,me=D||x.a.createElement("button",{type:"button","aria-label":re,className:"".concat(B,"-item-link")});return typeof D=="function"&&(me=x.a.createElement(D,Object(q.a)({},E.props))),me},E.savePaginationNode=function(D){E.paginationNode=D},E.isValid=function(D){return V(D)&&D!==E.state.current},E.shouldDisplayQuickJumper=function(){var D=E.props,re=D.showQuickJumper,B=D.pageSize,me=D.total;return me<=B?!1:re},E.handleKeyDown=function(D){(D.keyCode===j.ARROW_UP||D.keyCode===j.ARROW_DOWN)&&D.preventDefault()},E.handleKeyUp=function(D){var re=E.getValidValue(D),B=E.state.currentInputValue;re!==B&&E.setState({currentInputValue:re}),D.keyCode===j.ENTER?E.handleChange(re):D.keyCode===j.ARROW_UP?E.handleChange(re-1):D.keyCode===j.ARROW_DOWN&&E.handleChange(re+1)},E.changePageSize=function(D){var re=E.state.current,B=De(D,E.state,E.props);re=re>B?B:re,B===0&&(re=E.state.current),typeof D=="number"&&("pageSize"in E.props||E.setState({pageSize:D}),"current"in E.props||E.setState({current:re,currentInputValue:re})),E.props.onShowSizeChange(re,D),"onChange"in E.props&&E.props.onChange&&E.props.onChange(re,D)},E.handleChange=function(D){var re=E.props.disabled,B=D;if(E.isValid(B)&&!re){var me=De(void 0,E.state,E.props);B>me?B=me:B<1&&(B=1),"current"in E.props||E.setState({current:B,currentInputValue:B});var _=E.state.pageSize;return E.props.onChange(B,_),B}return E.state.current},E.prev=function(){E.hasPrev()&&E.handleChange(E.state.current-1)},E.next=function(){E.hasNext()&&E.handleChange(E.state.current+1)},E.jumpPrev=function(){E.handleChange(E.getJumpPrevPage())},E.jumpNext=function(){E.handleChange(E.getJumpNextPage())},E.hasPrev=function(){return E.state.current>1},E.hasNext=function(){return E.state.current<De(void 0,E.state,E.props)},E.runIfEnter=function(D,re){if(D.key==="Enter"||D.charCode===13){for(var B=arguments.length,me=new Array(B>2?B-2:0),_=2;_<B;_++)me[_-2]=arguments[_];re.apply(void 0,me)}},E.runIfEnterPrev=function(D){E.runIfEnter(D,E.prev)},E.runIfEnterNext=function(D){E.runIfEnter(D,E.next)},E.runIfEnterJumpPrev=function(D){E.runIfEnter(D,E.jumpPrev)},E.runIfEnterJumpNext=function(D){E.runIfEnter(D,E.jumpNext)},E.handleGoTO=function(D){(D.keyCode===j.ENTER||D.type==="click")&&E.handleChange(E.state.currentInputValue)};var p=ae.onChange!==Z,O="current"in ae;O&&!p&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var T=ae.defaultCurrent;"current"in ae&&(T=ae.current);var y=ae.defaultPageSize;return"pageSize"in ae&&(y=ae.pageSize),T=Math.min(T,De(y,void 0,ae)),E.state={current:T,currentInputValue:T,pageSize:y},E}return Object(be.a)(U,[{key:"componentDidUpdate",value:function(E,p){var O=this.props.prefixCls;if(p.current!==this.state.current&&this.paginationNode){var T=this.paginationNode.querySelector(".".concat(O,"-item-").concat(p.current));T&&document.activeElement===T&&T.blur()}}},{key:"getValidValue",value:function(E){var p=E.target.value,O=De(void 0,this.state,this.props),T=this.state.currentInputValue,y;return p===""?y=p:isNaN(Number(p))?y=T:p>=O?y=O:y=Number(p),y}},{key:"getShowSizeChanger",value:function(){var E=this.props,p=E.showSizeChanger,O=E.total,T=E.totalBoundaryShowSizeChanger;return typeof p!="undefined"?p:O>T}},{key:"renderPrev",value:function(E){var p=this.props,O=p.prevIcon,T=p.itemRender,y=T(E,"prev",this.getItemIcon(O,"prev page")),D=!this.hasPrev();return Object(R.isValidElement)(y)?Object(R.cloneElement)(y,{disabled:D}):y}},{key:"renderNext",value:function(E){var p=this.props,O=p.nextIcon,T=p.itemRender,y=T(E,"next",this.getItemIcon(O,"next page")),D=!this.hasNext();return Object(R.isValidElement)(y)?Object(R.cloneElement)(y,{disabled:D}):y}},{key:"render",value:function(){var E=this,p=this.props,O=p.prefixCls,T=p.className,y=p.style,D=p.disabled,re=p.hideOnSinglePage,B=p.total,me=p.locale,_=p.showQuickJumper,c=p.showLessItems,P=p.showTitle,ue=p.showTotal,le=p.simple,Le=p.itemRender,We=p.showPrevNextJumpers,pe=p.jumpPrevIcon,Fe=p.jumpNextIcon,Ee=p.selectComponentClass,xe=p.selectPrefixCls,K=p.pageSizeOptions,A=this.state,Ae=A.current,rt=A.pageSize,Re=A.currentInputValue;if(re===!0&&B<=rt)return null;var ce=De(void 0,this.state,this.props),Pe=[],ge=null,de=null,Ne=null,He=null,Ue=null,Ce=_&&_.goButton,Te=c?1:2,at=Ae-1>0?Ae-1:0,Qe=Ae+1<ce?Ae+1:ce,$e=Object.keys(this.props).reduce(function(d,h){return(h.substr(0,5)==="data-"||h.substr(0,5)==="aria-"||h==="role")&&(d[h]=E.props[h]),d},{});if(le)return Ce&&(typeof Ce=="boolean"?Ue=x.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},me.jump_to_confirm):Ue=x.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ce),Ue=x.a.createElement("li",{title:P?"".concat(me.jump_to).concat(Ae,"/").concat(ce):null,className:"".concat(O,"-simple-pager")},Ue)),x.a.createElement("ul",Object(F.a)({className:H()(O,"".concat(O,"-simple"),Object(ke.a)({},"".concat(O,"-disabled"),D),T),style:y,ref:this.savePaginationNode},$e),x.a.createElement("li",{title:P?me.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:H()("".concat(O,"-prev"),Object(ke.a)({},"".concat(O,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(at)),x.a.createElement("li",{title:P?"".concat(Ae,"/").concat(ce):null,className:"".concat(O,"-simple-pager")},x.a.createElement("input",{type:"text",value:Re,disabled:D,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),x.a.createElement("span",{className:"".concat(O,"-slash")},"/"),ce),x.a.createElement("li",{title:P?me.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:H()("".concat(O,"-next"),Object(ke.a)({},"".concat(O,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Qe)),Ue);if(ce<=3+Te*2){var ot={locale:me,rootPrefixCls:O,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:P,itemRender:Le};ce||Pe.push(x.a.createElement(he,Object(F.a)({},ot,{key:"noPager",page:ce,className:"".concat(O,"-disabled")})));for(var yt=1;yt<=ce;yt+=1){var ft=Ae===yt;Pe.push(x.a.createElement(he,Object(F.a)({},ot,{key:yt,page:yt,active:ft})))}}else{var Ze=c?me.prev_3:me.prev_5,fe=c?me.next_3:me.next_5;We&&(ge=x.a.createElement("li",{title:P?Ze:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:H()("".concat(O,"-jump-prev"),Object(ke.a)({},"".concat(O,"-jump-prev-custom-icon"),!!pe))},Le(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(pe,"prev page"))),de=x.a.createElement("li",{title:P?fe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:H()("".concat(O,"-jump-next"),Object(ke.a)({},"".concat(O,"-jump-next-custom-icon"),!!Fe))},Le(this.getJumpNextPage(),"jump-next",this.getItemIcon(Fe,"next page")))),He=x.a.createElement(he,{locale:me,last:!0,rootPrefixCls:O,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ce,page:ce,active:!1,showTitle:P,itemRender:Le}),Ne=x.a.createElement(he,{locale:me,rootPrefixCls:O,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:P,itemRender:Le});var ht=Math.max(1,Ae-Te),tt=Math.min(Ae+Te,ce);Ae-1<=Te&&(tt=1+Te*2),ce-Ae<=Te&&(ht=ce-Te*2);for(var ve=ht;ve<=tt;ve+=1){var Se=Ae===ve;Pe.push(x.a.createElement(he,{locale:me,rootPrefixCls:O,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ve,page:ve,active:Se,showTitle:P,itemRender:Le}))}Ae-1>=Te*2&&Ae!==1+2&&(Pe[0]=Object(R.cloneElement)(Pe[0],{className:"".concat(O,"-item-after-jump-prev")}),Pe.unshift(ge)),ce-Ae>=Te*2&&Ae!==ce-2&&(Pe[Pe.length-1]=Object(R.cloneElement)(Pe[Pe.length-1],{className:"".concat(O,"-item-before-jump-next")}),Pe.push(de)),ht!==1&&Pe.unshift(Ne),tt!==ce&&Pe.push(He)}var w=null;ue&&(w=x.a.createElement("li",{className:"".concat(O,"-total-text")},ue(B,[B===0?0:(Ae-1)*rt+1,Ae*rt>B?B:Ae*rt])));var S=!this.hasPrev()||!ce,v=!this.hasNext()||!ce;return x.a.createElement("ul",Object(F.a)({className:H()(O,T,Object(ke.a)({},"".concat(O,"-disabled"),D)),style:y,unselectable:"unselectable",ref:this.savePaginationNode},$e),w,x.a.createElement("li",{title:P?me.prev_page:null,onClick:this.prev,tabIndex:S?null:0,onKeyPress:this.runIfEnterPrev,className:H()("".concat(O,"-prev"),Object(ke.a)({},"".concat(O,"-disabled"),S)),"aria-disabled":S},this.renderPrev(at)),Pe,x.a.createElement("li",{title:P?me.next_page:null,onClick:this.next,tabIndex:v?null:0,onKeyPress:this.runIfEnterNext,className:H()("".concat(O,"-next"),Object(ke.a)({},"".concat(O,"-disabled"),v)),"aria-disabled":v},this.renderNext(Qe)),x.a.createElement(N,{disabled:D,locale:me,rootPrefixCls:O,selectComponentClass:Ee,selectPrefixCls:xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ae,pageSize:rt,pageSizeOptions:K,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ce}))}}],[{key:"getDerivedStateFromProps",value:function(E,p){var O={};if("current"in E&&(O.current=E.current,E.current!==p.current&&(O.currentInputValue=O.current)),"pageSize"in E&&E.pageSize!==p.pageSize){var T=p.current,y=De(E.pageSize,p,E);T=T>y?y:T,"current"in E||(O.current=T,O.currentInputValue=T),O.pageSize=E.pageSize}return O}}]),U}(x.a.Component);Y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Z,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Z,locale:M.a,style:{},itemRender:te,totalBoundaryShowSizeChanger:50};var G=Y},"6K3P":function(bt,et,m){bt.exports=m.p+"static/jinshi.9b74f304.svg"},"7ahc":function(bt,et,m){"use strict";m.d(et,"a",function(){return De});var F=m("k1fw"),ke=m("0Owb"),q=m("+L6B"),_e=m("2/Rp"),be=m("y8nQ"),ie=m("Vl3Y"),L=m("tJVT"),R=m("OaEy"),x=m("2fM7"),ne=m("q1tI"),H=m.n(ne),J=m("VrN/"),he=m.n(J),j=m("p77/"),I=m.n(j),N=m("c5Ni"),M=m.n(N),Z=x.a.Option,V={labelCol:{span:4},wrapperCol:{span:20}},te={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"]};et.b=function(Y){var G=Y.callback,f=Y.onCancel,ee=Object(ne.useState)("python"),U=Object(L.a)(ee,2),ae=U[0],E=U[1];function p(T){E(te[T][1])}function O(T){G(T)}return H.a.createElement(ie.a,Object(ke.a)({},V,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:O}),H.a.createElement(ie.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},H.a.createElement(x.a,{onChange:p},Object.keys(te).map(function(T){return H.a.createElement(Z,{key:T,value:T},te[T][0])}))),H.a.createElement(ie.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},H.a.createElement(De,{mode:ae})),H.a.createElement("div",{className:"flex-container flex-end"},H.a.createElement(_e.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),H.a.createElement(_e.a,{type:"ghost",onClick:f},"\u53D6\u6D88")))};function De(Y){var G=Y.value,f=Y.onChange,ee=Y.mode,U=Y.options,ae=U===void 0?{}:U,E=Object(ne.useRef)(),p=Object(ne.useState)(),O=Object(L.a)(p,2),T=O[0],y=O[1];return Object(ne.useEffect)(function(){if(T){function D(re){var B=re.getValue();f&&f(B)}return T.on("change",D),function(){T.off("change",D)}}},[T,f]),Object(ne.useEffect)(function(){T&&T.setOption("mode",ee)},[T,ee]),Object(ne.useEffect)(function(){T&&((G!==T.getValue()||G==="")&&setTimeout(function(){T.setValue(G||" ")},300))},[T,G]),Object(ne.useEffect)(function(){if(E.current&&!T){var D=he.a.fromTextArea(E.current,Object(F.a)({mode:ee,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ae));y(D)}},[E.current,T]),H.a.createElement("div",{className:"my-codemirror-container"},H.a.createElement("textarea",{ref:E}))}},"7ixt":function(bt,et,m){"use strict";m.d(et,"a",function(){return q});var F={adjustX:1,adjustY:1},ke=[0,0],q={left:{points:["cr","cl"],overflow:F,offset:[-4,0],targetOffset:ke},right:{points:["cl","cr"],overflow:F,offset:[4,0],targetOffset:ke},top:{points:["bc","tc"],overflow:F,offset:[0,-4],targetOffset:ke},bottom:{points:["tc","bc"],overflow:F,offset:[0,4],targetOffset:ke},topLeft:{points:["bl","tl"],overflow:F,offset:[0,-4],targetOffset:ke},leftTop:{points:["tr","tl"],overflow:F,offset:[-4,0],targetOffset:ke},topRight:{points:["br","tr"],overflow:F,offset:[0,-4],targetOffset:ke},rightTop:{points:["tl","tr"],overflow:F,offset:[4,0],targetOffset:ke},bottomRight:{points:["tr","br"],overflow:F,offset:[0,4],targetOffset:ke},rightBottom:{points:["bl","br"],overflow:F,offset:[4,0],targetOffset:ke},bottomLeft:{points:["tl","bl"],overflow:F,offset:[0,4],targetOffset:ke},leftBottom:{points:["br","bl"],overflow:F,offset:[-4,0],targetOffset:ke}},_e=q},"7qnI":function(bt,et,m){"use strict";var F=m("5Dmo"),ke=m("3S7+"),q=m("fWQN"),_e=m("mtLc"),be=m("yKVA"),ie=m("879j"),L=m("5NDa"),R=m("5rEg"),x=m("q1tI"),ne=m.n(x),H=m("O2Wb"),J=m.n(H),he=R.a.TextArea,j=function(I){Object(be.a)(M,I);var N=Object(ie.a)(M);function M(){return Object(q.a)(this,M),N.apply(this,arguments)}return Object(_e.a)(M,[{key:"render",value:function(){var V=this,te=this.props,De=te.index,Y=te.onAnswerChange,G=te.addChildAnswer,f=te.exerciseIsPublish,ee=te.answers,U=te.activeOptionErrorIndex,ae=te.flex,E=ae===void 0?"0 0 1000px":ae;return ne.a.createElement("div",{className:J.a.flex},ne.a.createElement("div",{className:"".concat(J.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",De+1,"):"),ne.a.createElement("div",{className:"".concat(J.a.flex," ").concat(J.a.flex1),style:{flexDirection:"column"}},ee.map(function(p,O){var T="".concat(De,"-").concat(O);return ne.a.createElement("div",{className:"".concat(J.a.flex," ").concat(J.a.flex1),key:O},ne.a.createElement("div",{className:J.a.flex1,style:{flex:E}},ne.a.createElement("div",null,ne.a.createElement(he,{className:T===U?J.a.error:"",spellCheck:!1,rows:4,value:p||"",defaultValue:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848".concat(O==0?"":"(\u53EF\u9009)"),onChange:function(D){return Y(De,O,D.target.value)},style:{minHeight:95}}))),!f&&ne.a.createElement(ne.a.Fragment,null,O!=0&&ne.a.createElement(ke.a,{title:"\u5220\u9664"},ne.a.createElement("i",{className:"".concat(J.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return V.props.deleteChildAnswer(De,O)},style:{float:"right"}})),O===0&&ne.a.createElement(ke.a,{title:"\u5220\u9664"},ne.a.createElement("i",{className:"".concat(J.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return V.props.deleteChildAnswermain(De,O)},style:{float:"right"}})),ne.a.createElement(ke.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ne.a.createElement("i",{className:"".concat(J.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return G(De)},style:{float:"right",visibility:O==ee.length-1?"":"hidden"}}))))})))}}]),M}(x.Component);et.a=j},"8EBN":function(bt,et,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 ke=0;ke<F.modeInfo.length;ke++){var q=F.modeInfo[ke];q.mimes&&(q.mime=q.mimes[0])}F.findModeByMIME=function(_e){_e=_e.toLowerCase();for(var be=0;be<F.modeInfo.length;be++){var ie=F.modeInfo[be];if(ie.mime==_e)return ie;if(ie.mimes){for(var L=0;L<ie.mimes.length;L++)if(ie.mimes[L]==_e)return ie}}if(/\+xml$/.test(_e))return F.findModeByMIME("application/xml");if(/\+json$/.test(_e))return F.findModeByMIME("application/json")},F.findModeByExtension=function(_e){_e=_e.toLowerCase();for(var be=0;be<F.modeInfo.length;be++){var ie=F.modeInfo[be];if(ie.ext){for(var L=0;L<ie.ext.length;L++)if(ie.ext[L]==_e)return ie}}},F.findModeByFileName=function(_e){for(var be=0;be<F.modeInfo.length;be++){var ie=F.modeInfo[be];if(ie.file&&ie.file.test(_e))return ie}var L=_e.lastIndexOf("."),R=L>-1&&_e.substring(L+1,_e.length);if(R)return F.findModeByExtension(R)},F.findModeByName=function(_e){_e=_e.toLowerCase();for(var be=0;be<F.modeInfo.length;be++){var ie=F.modeInfo[be];if(ie.name.toLowerCase()==_e)return ie;if(ie.alias){for(var L=0;L<ie.alias.length;L++)if(ie.alias[L].toLowerCase()==_e)return ie}}}})},"9Bee":function(bt,et,m){"use strict";var F=m("k1fw"),ke=m("tJVT"),q=m("q1tI"),_e=m.n(q),be=m("vg9a"),ie=m("DlQD"),L=m.n(ie),R=m("rUJ1");function x(P,ue){var le=P.match(/^(\s+)(?:```)/);if(le===null)return ue;var Le=le[1];return ue.split(`
|
|
`).map(function(We){var pe=We.match(/^\s+/);if(pe===null)return We;var Fe=Object(ke.a)(pe,1),Ee=Fe[0];return Ee.length>=Le.length?We.slice(Le.length):We}).join(`
|
|
`)}var ne=[],H=["<ul>"],J=new L.a.Renderer,he=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function j(){ne.length=0,H=["<ul>"]}var I={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function N(P,ue,le,Le){if(ue>=P.length||P[ue].level<=le)return ue;var We=P[ue];Le.push("<li><a href='#"+We.anchor+"'>"+We.text+"</a>"),ue++;var pe=[];return ue=N(P,ue,We.level,pe),pe.length>0&&(Le.push("<ul>"),pe.forEach(function(Fe){Le.push(Fe)}),Le.push("</ul>")),Le.push("</li>"),ue=N(P,ue,le,Le),ue}function M(){return N(ne,0,0,H),H.push("</ul>"),H.join("")}var Z={heading:function(ue){var le=he.exec(ue);if(le)return{type:"heading",raw:le[0],depth:le[1].length,text:le[2]}},fences:function(ue){var le=this.rules.block.fences.exec(ue);if(le){var Le=le[0],We=x(Le,le[3]||""),pe=le[2]?le[2].trim():le[2];if(["latex","katex","math"].indexOf(pe)>=0){var Fe=De(),Ee=We;We=Fe,Y[Fe]={type:"block",expression:Ee}}return{type:"code",raw:Le,lang:pe,text:We}}}},V=/(?:\${2})([^\n`]+?)(?:\${2})/gi,te=0,De=function(){return"__special_katext_id_".concat(te++,"__")},Y={};function G(){return Y}function f(){te=0,Y={}}function ee(P){return P=P.replace(V,function(ue,le){var Le=De();return Y[Le]={type:"inline",expression:le},Le}),P}var U=J.listitem;J.listitem=function(P){return U(ee(P))};var ae=J.paragraph;J.paragraph=function(P){return ae(ee(P))};var E=J.tablecell;J.tablecell=function(P,ue){return E(ee(P),ue)},J.code=function(P,ue,le){var Le=(ue||"").match(/\S*/)[0];return Le?["latex","katex","math"].indexOf(Le)>=0?"<p class='editormd-tex'>".concat(P,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ue,'">').concat(le?P:Object(R.escape)(P,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(le?P:Object(R.escape)(P,!0))+"</code></pre>"},J.heading=function(P,ue,le){var Le=this.options.headerPrefix+le.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ne.push({anchor:Le,level:ue,text:P}),"<h"+ue+' id="'+Le+'">'+P+"</h"+ue+">"},L.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),L.a.use({tokenizer:Z,renderer:J});var p=L.a,O=m("SJMd"),T=m("ulZh"),y=m.n(T),D=m("m3rI"),re=m("Oy/b"),B=m("p5ED"),me=/<pre[^>]*>/g;function _(P){var ue=document.createElement("div");return ue.innerHTML=P,ue.childNodes.length===0?"":ue.childNodes[0].nodeValue}var c=et.a=function(P){var ue,le=P.value,Le=le===void 0?"":le,We=P.className,pe=P.showTextOnly,Fe=P.showLines,Ee=P.style,xe=Ee===void 0?{}:Ee,K=P.stylesPrev,A=K===void 0?{}:K,Ae=(ue=String(Le))===null||ue===void 0?void 0:ue.replace(/<script.*?>|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),rt=Object(q.useState)(""),Re=Object(ke.a)(rt,2),ce=Re[0],Pe=Re[1],ge=Object(q.useMemo)(function(){try{var Ue=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ce=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Te=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ae=Ae.replace(Ue,"("+D.a.API_SERVER+"/api/attachments/").replace(Ce,'"'+D.a.API_SERVER+"/api/attachments/").replace(Te,'"'+D.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
|
|
`),Ae=Ae.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(ot){}var at=p(Ae),Qe=G();if(Ae.match(/\[TOC\]/)&&(at=at.replace("<p>[TOC]</p>",M()),j()),at=at.replace(/(__special_katext_id_\d+__)/g,function(ot,yt){var ft=Qe[yt],Ze=ft.type,fe=ft.expression;return Object(re.renderToString)(_(fe)||"",{displayMode:Ze==="block",throwOnError:!1,output:"html"})}),at=at.replace(/▁/g,"\u2581\u2581\u2581"),f(),pe){var $e=document.createElement("div");return $e.innerHTML=at,$e.innerText}return setTimeout(function(){return He()},500),at},[Ae]),de=Object(q.useRef)();I.WebkitLineClamp=Fe,Fe&&(xe=Object(F.a)(Object(F.a)({},xe),I));function Ne(Ue){var Ce=Ue.target;if(Ce.tagName.toUpperCase()==="A"){var Te=Ce.getAttribute("href");if(Te.indexOf("office")>-1)Ue.preventDefault(),Pe(Te);else if(Te.startsWith("#")){Ue.preventDefault();var at=document.getElementById(Te.replace("#",""));at&&at.scrollIntoView(!0)}}}var He=function(){var Ce,Te=(Ce=de.current)===null||Ce===void 0?void 0:Ce.querySelectorAll("video");Te==null||Te.forEach(function(at){if(at.oncontextmenu=function(){return!1},at.src.indexOf(".m3u8")>-1&&!at.canPlayType("application/vnd.apple.mpegurl")){if(y.a.isSupported()){var Qe=new y.a;Qe.loadSource(at.src),Qe.attachMedia(at)}}})};return Object(q.useEffect)(function(){if(de.current&&ge&&(ge.match(me)&&window.PR.prettyPrint()),de.current)return de.current.addEventListener("click",Ne),function(){de.current.removeEventListener("click",Ne),f(),j()}},[ge,de.current,Ne]),_e.a.createElement(_e.a.Fragment,null,_e.a.createElement("div",{ref:de,style:Object(F.a)({},xe),className:"".concat(We||""," markdown-body "),dangerouslySetInnerHTML:{__html:ge}}),_e.a.createElement(B.a,{close:!0,data:ce,type:ce!=null&&ce.length?"office":"",style:Object(F.a)({},A),onClose:function(){return Pe("")}}))}},"9VGf":function(bt,et,m){"use strict";m.d(et,"a",function(){return q});var F=m("q1tI"),ke=m.n(F);function q(_e,be){var ie=Object(F.useRef)();Object(F.useEffect)(function(){ie.current=_e}),Object(F.useEffect)(function(){function L(){ie.current()}if(be!==null){var R=setInterval(L,be);return function(){return clearInterval(R)}}},[be])}},Bd2K:function(bt,et,m){(function(F){F(m("VrN/"),m("osHv"))})(function(F){F.defineOption("autoCloseTags",!1,function(x,ne,H){if(H!=F.Init&&H&&x.removeKeyMap("autoCloseTags"),!ne)return;var J={name:"autoCloseTags"};(typeof ne!="object"||ne.whenClosing!==!1)&&(J["'/'"]=function(he){return ie(he)}),(typeof ne!="object"||ne.whenOpening!==!1)&&(J["'>'"]=function(he){return _e(he)}),x.addKeyMap(J)});var ke=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],q=["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 _e(x){if(x.getOption("disableInput"))return F.Pass;for(var ne=x.listSelections(),H=[],J=x.getOption("autoCloseTags"),he=0;he<ne.length;he++){if(!ne[he].empty())return F.Pass;var j=ne[he].head,I=x.getTokenAt(j),N=F.innerMode(x.getMode(),I.state),M=N.state,Z=N.mode.xmlCurrentTag&&N.mode.xmlCurrentTag(M),V=Z&&Z.name;if(!V)return F.Pass;var te=N.mode.configuration=="html",De=typeof J=="object"&&J.dontCloseTags||te&&ke,Y=typeof J=="object"&&J.indentTags||te&&q;I.end>j.ch&&(V=V.slice(0,V.length-I.end+j.ch));var G=V.toLowerCase();if(!V||I.type=="string"&&(I.end!=j.ch||!/[\"\']/.test(I.string.charAt(I.string.length-1))||I.string.length==1)||I.type=="tag"&&Z.close||I.string.indexOf("/")==j.ch-I.start-1||De&&L(De,G)>-1||R(x,N.mode.xmlCurrentContext&&N.mode.xmlCurrentContext(M)||[],V,j,!0))return F.Pass;var f=typeof J=="object"&&J.emptyTags;if(f&&L(f,V)>-1){H[he]={text:"/>",newPos:F.Pos(j.line,j.ch+2)};continue}var ee=Y&&L(Y,G)>-1;H[he]={indent:ee,text:">"+(ee?`
|
|
|
|
`:"")+"</"+V+">",newPos:ee?F.Pos(j.line+1,0):F.Pos(j.line,j.ch+1)}}for(var U=typeof J=="object"&&J.dontIndentOnAutoClose,he=ne.length-1;he>=0;he--){var ae=H[he];x.replaceRange(ae.text,ne[he].head,ne[he].anchor,"+insert");var E=x.listSelections().slice(0);E[he]={head:ae.newPos,anchor:ae.newPos},x.setSelections(E),!U&&ae.indent&&(x.indentLine(ae.newPos.line,null,!0),x.indentLine(ae.newPos.line+1,null,!0))}}function be(x,ne){for(var H=x.listSelections(),J=[],he=ne?"/":"</",j=x.getOption("autoCloseTags"),I=typeof j=="object"&&j.dontIndentOnSlash,N=0;N<H.length;N++){if(!H[N].empty())return F.Pass;var M=H[N].head,Z=x.getTokenAt(M),V=F.innerMode(x.getMode(),Z.state),te=V.state;if(ne&&(Z.type=="string"||Z.string.charAt(0)!="<"||Z.start!=M.ch-1))return F.Pass;var De,Y=V.mode.name!="xml"&&x.getMode().name=="htmlmixed";if(Y&&V.mode.name=="javascript")De=he+"script";else if(Y&&V.mode.name=="css")De=he+"style";else{var G=V.mode.xmlCurrentContext&&V.mode.xmlCurrentContext(te);if(!G||G.length&&R(x,G,G[G.length-1],M))return F.Pass;De=he+G[G.length-1]}x.getLine(M.line).charAt(Z.end)!=">"&&(De+=">"),J[N]=De}if(x.replaceSelections(J),H=x.listSelections(),!I)for(var N=0;N<H.length;N++)(N==H.length-1||H[N].head.line<H[N+1].head.line)&&x.indentLine(H[N].head.line)}function ie(x){return x.getOption("disableInput")?F.Pass:be(x,!0)}F.commands.closeTag=function(x){return be(x)};function L(x,ne){if(x.indexOf)return x.indexOf(ne);for(var H=0,J=x.length;H<J;++H)if(x[H]==ne)return H;return-1}function R(x,ne,H,J,he){if(!F.scanForClosingTag)return!1;var j=Math.min(x.lastLine()+1,J.line+500),I=F.scanForClosingTag(x,J,null,j);if(!I||I.tag!=H)return!1;for(var N=he?1:0,M=ne.length-1;M>=0&&ne[M]==H;M--)++N;J=I.to;for(var M=1;M<N;M++){var Z=F.scanForClosingTag(x,J,null,j);if(!Z||Z.tag!=H)return!1;J=Z.to}return!0}})},BjJ7:function(bt,et,m){"use strict";m.d(et,"d",function(){return ke}),m.d(et,"c",function(){return q}),m.d(et,"e",function(){return _e}),m.d(et,"b",function(){return be}),m.d(et,"a",function(){return L});var F=m("m3rI");function ke(R){var x=!0;if(R.length>0){for(var ne=0;ne<R.length;ne++)if(R[ne].compile_success==0||!R[ne].compile_success){x=!1;break}}else x=!1;return x}function q(R){for(var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ne=[],H=0;H<R.length;H++){var J=R[H],he=x?"".concat(x,"/").concat(J.name):"".concat(J.name);ne.push({title:J.name,isLeaf:!(J.type==="tree"),key:he})}return ne}function _e(R,x,ne){for(var H=0;H<R.length;H++){var J=R[H];if(J.key===x){J.children=ne;break}J.children&&_e(J.children,x,ne)}return R}function be(R,x,ne){var H;return function(){var J=this,he=arguments,j=function(){H=null,ne||R.apply(J,he)},I=ne&&!H;clearTimeout(H),H=setTimeout(j,x),I&&R.apply(J,he)}}var ie=!0,L=F.a.API_SERVER},"C+DQ":function(bt,et,m){},DlQD:function(bt,et,m){(function(F,ke){bt.exports=ke()})(this,function(){"use strict";function F(w,S){for(var v=0;v<S.length;v++){var d=S[v];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(w,d.key,d)}}function ke(w,S,v){return S&&F(w.prototype,S),v&&F(w,v),w}function q(w,S){if(!w)return;if(typeof w=="string")return _e(w,S);var v=Object.prototype.toString.call(w).slice(8,-1);if(v==="Object"&&w.constructor&&(v=w.constructor.name),v==="Map"||v==="Set")return Array.from(w);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return _e(w,S)}function _e(w,S){(S==null||S>w.length)&&(S=w.length);for(var v=0,d=new Array(S);v<S;v++)d[v]=w[v];return d}function be(w,S){var v;if(typeof Symbol=="undefined"||w[Symbol.iterator]==null){if(Array.isArray(w)||(v=q(w))||S&&w&&typeof w.length=="number"){v&&(w=v);var d=0;return function(){return d>=w.length?{done:!0}:{done:!1,value:w[d++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return v=w[Symbol.iterator](),v.next.bind(v)}function ie(w,S){return S={exports:{}},w(S,S.exports),S.exports}var L=ie(function(w){function S(){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 v(d){w.exports.defaults=d}w.exports={defaults:S(),getDefaults:S,changeDefaults:v}}),R=L.defaults,x=L.getDefaults,ne=L.changeDefaults,H=/[&<>"']/,J=/[&<>"']/g,he=/[<>"']|&(?!#?\w+;)/,j=/[<>"']|&(?!#?\w+;)/g,I={"&":"&","<":"<",">":">",'"':""","'":"'"},N=function(S){return I[S]};function M(w,S){if(S){if(H.test(w))return w.replace(J,N)}else if(he.test(w))return w.replace(j,N);return w}var Z=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function V(w){return w.replace(Z,function(S,v){return v=v.toLowerCase(),v==="colon"?":":v.charAt(0)==="#"?v.charAt(1)==="x"?String.fromCharCode(parseInt(v.substring(2),16)):String.fromCharCode(+v.substring(1)):""})}var te=/(^|[^\[])\^/g;function De(w,S){w=w.source||w,S=S||"";var v={replace:function(h,g){return g=g.source||g,g=g.replace(te,"$1"),w=w.replace(h,g),v},getRegex:function(){return new RegExp(w,S)}};return v}var Y=/[^\w:]/g,G=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(w,S,v){if(w){var d;try{d=decodeURIComponent(V(v)).replace(Y,"").toLowerCase()}catch(h){return null}if(d.indexOf("javascript:")===0||d.indexOf("vbscript:")===0||d.indexOf("data:")===0)return null}S&&!G.test(v)&&(v=p(S,v));try{v=encodeURI(v).replace(/%25/g,"%")}catch(h){return null}return v}var ee={},U=/^[^:]+:\/*[^/]*$/,ae=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function p(w,S){ee[" "+w]||(U.test(w)?ee[" "+w]=w+"/":ee[" "+w]=D(w,"/",!0)),w=ee[" "+w];var v=w.indexOf(":")===-1;return S.substring(0,2)==="//"?v?S:w.replace(ae,"$1")+S:S.charAt(0)==="/"?v?S:w.replace(E,"$1")+S:w+S}var O={exec:function(){}};function T(w){for(var S=1,v,d;S<arguments.length;S++){v=arguments[S];for(d in v)Object.prototype.hasOwnProperty.call(v,d)&&(w[d]=v[d])}return w}function y(w,S){var v=w.replace(/\|/g,function(g,b,z){for(var Q=!1,oe=b;--oe>=0&&z[oe]==="\\";)Q=!Q;return Q?"|":" |"}),d=v.split(/ \|/),h=0;if(d.length>S)d.splice(S);else for(;d.length<S;)d.push("");for(;h<d.length;h++)d[h]=d[h].trim().replace(/\\\|/g,"|");return d}function D(w,S,v){var d=w.length;if(d===0)return"";for(var h=0;h<d;){var g=w.charAt(d-h-1);if(g===S&&!v)h++;else if(g!==S&&v)h++;else break}return w.substr(0,d-h)}function re(w,S){if(w.indexOf(S[1])===-1)return-1;for(var v=w.length,d=0,h=0;h<v;h++)if(w[h]==="\\")h++;else if(w[h]===S[0])d++;else if(w[h]===S[1]&&(d--,d<0))return h;return-1}function B(w){w&&w.sanitize&&!w.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:M,unescape:V,edit:De,cleanUrl:f,resolveUrl:p,noopTest:O,merge:T,splitCells:y,rtrim:D,findClosingBracket:re,checkSanitizeDeprecation:B},_=L.defaults,c=me.rtrim,P=me.splitCells,ue=me.escape,le=me.findClosingBracket;function Le(w,S,v){var d=S.href,h=S.title?ue(S.title):null,g=w[1].replace(/\\([\[\]])/g,"$1");return w[0].charAt(0)!=="!"?{type:"link",raw:v,href:d,title:h,text:g}:{type:"image",raw:v,href:d,title:h,text:ue(g)}}function We(w,S){var v=w.match(/^(\s+)(?:```)/);if(v===null)return S;var d=v[1];return S.split(`
|
|
`).map(function(h){var g=h.match(/^\s+/);if(g===null)return h;var b=g[0];return b.length>=d.length?h.slice(d.length):h}).join(`
|
|
`)}var pe=function(){function w(v){this.options=v||_}var S=w.prototype;return S.space=function(d){var h=this.rules.block.newline.exec(d);if(h)return h[0].length>1?{type:"space",raw:h[0]}:{raw:`
|
|
`}},S.code=function(d,h){var g=this.rules.block.code.exec(d);if(g){var b=h[h.length-1];if(b&&b.type==="paragraph")return{raw:g[0],text:g[0].trimRight()};var z=g[0].replace(/^ {4}/gm,"");return{type:"code",raw:g[0],codeBlockStyle:"indented",text:this.options.pedantic?z:c(z,`
|
|
`)}}},S.fences=function(d){var h=this.rules.block.fences.exec(d);if(h){var g=h[0],b=We(g,h[3]||"");return{type:"code",raw:g,lang:h[2]?h[2].trim():h[2],text:b}}},S.heading=function(d){var h=this.rules.block.heading.exec(d);if(h)return{type:"heading",raw:h[0],depth:h[1].length,text:h[2]}},S.nptable=function(d){var h=this.rules.block.nptable.exec(d);if(h){var g={type:"table",header:P(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(`
|
|
`):[],raw:h[0]};if(g.header.length===g.align.length){var b=g.align.length,z;for(z=0;z<b;z++)/^ *-+: *$/.test(g.align[z])?g.align[z]="right":/^ *:-+: *$/.test(g.align[z])?g.align[z]="center":/^ *:-+ *$/.test(g.align[z])?g.align[z]="left":g.align[z]=null;for(b=g.cells.length,z=0;z<b;z++)g.cells[z]=P(g.cells[z],g.header.length);return g}}},S.hr=function(d){var h=this.rules.block.hr.exec(d);if(h)return{type:"hr",raw:h[0]}},S.blockquote=function(d){var h=this.rules.block.blockquote.exec(d);if(h){var g=h[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:h[0],text:g}}},S.list=function(d){var h=this.rules.block.list.exec(d);if(h){for(var g=h[0],b=h[2],z=b.length>1,Q=b[b.length-1]===")",oe={type:"list",raw:g,ordered:z,start:z?+b.slice(0,-1):"",loose:!1,items:[]},Ye=h[0].match(this.rules.block.item),Ve=!1,Ke,pt,Tt,it,Dt,Et,It,Ot=Ye.length,dt=0;dt<Ot;dt++)Ke=Ye[dt],g=Ke,pt=Ke.length,Ke=Ke.replace(/^ *([*+-]|\d+[.)]) */,""),~Ke.indexOf(`
|
|
`)&&(pt-=Ke.length,Ke=this.options.pedantic?Ke.replace(/^ {1,4}/gm,""):Ke.replace(new RegExp("^ {1,"+pt+"}","gm"),"")),dt!==Ot-1&&(Tt=this.rules.block.bullet.exec(Ye[dt+1])[0],(z?Tt.length===1||!Q&&Tt[Tt.length-1]===")":Tt.length>1||this.options.smartLists&&Tt!==b)&&(it=Ye.slice(dt+1).join(`
|
|
`),oe.raw=oe.raw.substring(0,oe.raw.length-it.length),dt=Ot-1)),Dt=Ve||/\n\n(?!\s*$)/.test(Ke),dt!==Ot-1&&(Ve=Ke.charAt(Ke.length-1)===`
|
|
`,Dt||(Dt=Ve)),Dt&&(oe.loose=!0),Et=/^\[[ xX]\] /.test(Ke),It=void 0,Et&&(It=Ke[1]!==" ",Ke=Ke.replace(/^\[[ xX]\] +/,"")),oe.items.push({type:"list_item",raw:g,task:Et,checked:It,loose:Dt,text:Ke});return oe}},S.html=function(d){var h=this.rules.block.html.exec(d);if(h)return{type:this.options.sanitize?"paragraph":"html",raw:h[0],pre:!this.options.sanitizer&&(h[1]==="pre"||h[1]==="script"||h[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(h[0]):ue(h[0]):h[0]}},S.def=function(d){var h=this.rules.block.def.exec(d);if(h){h[3]&&(h[3]=h[3].substring(1,h[3].length-1));var g=h[1].toLowerCase().replace(/\s+/g," ");return{tag:g,raw:h[0],href:h[2],title:h[3]}}},S.table=function(d){var h=this.rules.block.table.exec(d);if(h){var g={type:"table",header:P(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(`
|
|
`):[]};if(g.header.length===g.align.length){g.raw=h[0];var b=g.align.length,z;for(z=0;z<b;z++)/^ *-+: *$/.test(g.align[z])?g.align[z]="right":/^ *:-+: *$/.test(g.align[z])?g.align[z]="center":/^ *:-+ *$/.test(g.align[z])?g.align[z]="left":g.align[z]=null;for(b=g.cells.length,z=0;z<b;z++)g.cells[z]=P(g.cells[z].replace(/^ *\| *| *\| *$/g,""),g.header.length);return g}}},S.lheading=function(d){var h=this.rules.block.lheading.exec(d);if(h)return{type:"heading",raw:h[0],depth:h[2].charAt(0)==="="?1:2,text:h[1]}},S.paragraph=function(d){var h=this.rules.block.paragraph.exec(d);if(h)return{type:"paragraph",raw:h[0],text:h[1].charAt(h[1].length-1)===`
|
|
`?h[1].slice(0,-1):h[1]}},S.text=function(d,h){var g=this.rules.block.text.exec(d);if(g){var b=h[h.length-1];return b&&b.type==="text"?{raw:g[0],text:g[0]}:{type:"text",raw:g[0],text:g[0]}}},S.escape=function(d){var h=this.rules.inline.escape.exec(d);if(h)return{type:"escape",raw:h[0],text:ue(h[1])}},S.tag=function(d,h,g){var b=this.rules.inline.tag.exec(d);if(b)return!h&&/^<a /i.test(b[0])?h=!0:h&&/^<\/a>/i.test(b[0])&&(h=!1),!g&&/^<(pre|code|kbd|script)(\s|>)/i.test(b[0])?g=!0:g&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(b[0])&&(g=!1),{type:this.options.sanitize?"text":"html",raw:b[0],inLink:h,inRawBlock:g,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):ue(b[0]):b[0]}},S.link=function(d){var h=this.rules.inline.link.exec(d);if(h){var g=le(h[2],"()");if(g>-1){var b=h[0].indexOf("!")===0?5:4,z=b+h[1].length+g;h[2]=h[2].substring(0,g),h[0]=h[0].substring(0,z).trim(),h[3]=""}var Q=h[2],oe="";if(this.options.pedantic){var Ye=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Q);Ye?(Q=Ye[1],oe=Ye[3]):oe=""}else oe=h[3]?h[3].slice(1,-1):"";Q=Q.trim().replace(/^<([\s\S]*)>$/,"$1");var Ve=Le(h,{href:Q&&Q.replace(this.rules.inline._escapes,"$1"),title:oe&&oe.replace(this.rules.inline._escapes,"$1")},h[0]);return Ve}},S.reflink=function(d,h){var g;if((g=this.rules.inline.reflink.exec(d))||(g=this.rules.inline.nolink.exec(d))){var b=(g[2]||g[1]).replace(/\s+/g," ");if(b=h[b.toLowerCase()],!b||!b.href){var z=g[0].charAt(0);return{type:"text",raw:z,text:z}}var Q=Le(g,b,g[0]);return Q}},S.strong=function(d,h,g){g===void 0&&(g="");var b=this.rules.inline.strong.start.exec(d);if(b&&(!b[1]||b[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){h=h.slice(-1*d.length);var z=b[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;z.lastIndex=0;for(var Q;(b=z.exec(h))!=null;)if(Q=this.rules.inline.strong.middle.exec(h.slice(0,b.index+3)),Q)return{type:"strong",raw:d.slice(0,Q[0].length),text:d.slice(2,Q[0].length-2)}}},S.em=function(d,h,g){g===void 0&&(g="");var b=this.rules.inline.em.start.exec(d);if(b&&(!b[1]||b[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){h=h.slice(-1*d.length);var z=b[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;z.lastIndex=0;for(var Q;(b=z.exec(h))!=null;)if(Q=this.rules.inline.em.middle.exec(h.slice(0,b.index+2)),Q)return{type:"em",raw:d.slice(0,Q[0].length),text:d.slice(1,Q[0].length-1)}}},S.codespan=function(d){var h=this.rules.inline.code.exec(d);if(h){var g=h[2].replace(/\n/g," "),b=/[^ ]/.test(g),z=g.startsWith(" ")&&g.endsWith(" ");return b&&z&&(g=g.substring(1,g.length-1)),g=ue(g,!0),{type:"codespan",raw:h[0],text:g}}},S.br=function(d){var h=this.rules.inline.br.exec(d);if(h)return{type:"br",raw:h[0]}},S.del=function(d){var h=this.rules.inline.del.exec(d);if(h)return{type:"del",raw:h[0],text:h[1]}},S.autolink=function(d,h){var g=this.rules.inline.autolink.exec(d);if(g){var b,z;return g[2]==="@"?(b=ue(this.options.mangle?h(g[1]):g[1]),z="mailto:"+b):(b=ue(g[1]),z=b),{type:"link",raw:g[0],text:b,href:z,tokens:[{type:"text",raw:b,text:b}]}}},S.url=function(d,h){var g;if(g=this.rules.inline.url.exec(d)){var b,z;if(g[2]==="@")b=ue(this.options.mangle?h(g[0]):g[0]),z="mailto:"+b;else{var Q;do Q=g[0],g[0]=this.rules.inline._backpedal.exec(g[0])[0];while(Q!==g[0]);b=ue(g[0]),g[1]==="www."?z="http://"+b:z=b}return{type:"link",raw:g[0],text:b,href:z,tokens:[{type:"text",raw:b,text:b}]}}},S.inlineText=function(d,h,g){var b=this.rules.inline.text.exec(d);if(b){var z;return h?z=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):ue(b[0]):b[0]:z=ue(this.options.smartypants?g(b[0]):b[0]),{type:"text",raw:b[0],text:z}}},w}(),Fe=me.noopTest,Ee=me.edit,xe=me.merge,K={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:Fe,table:Fe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};K._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,K._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,K.def=Ee(K.def).replace("label",K._label).replace("title",K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}[.)])/,K.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,K.item=Ee(K.item,"gm").replace(/bull/g,K.bullet).getRegex(),K.list=Ee(K.list).replace(/bull/g,K.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+K.def.source+")").getRegex(),K._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",K._comment=/<!--(?!-?>)[\s\S]*?-->/,K.html=Ee(K.html,"i").replace("comment",K._comment).replace("tag",K._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=Ee(K._paragraph).replace("hr",K.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",K._tag).getRegex(),K.blockquote=Ee(K.blockquote).replace("paragraph",K.paragraph).getRegex(),K.normal=xe({},K),K.gfm=xe({},K.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*|$)"}),K.gfm.nptable=Ee(K.gfm.nptable).replace("hr",K.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",K._tag).getRegex(),K.gfm.table=Ee(K.gfm.table).replace("hr",K.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",K._tag).getRegex(),K.pedantic=xe({},K.normal,{html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",K._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:Fe,paragraph:Ee(K.normal._paragraph).replace("hr",K.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var A={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Fe,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:Fe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};A._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",A.punctuation=Ee(A.punctuation).replace(/punctuation/g,A._punctuation).getRegex(),A._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",A._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",A.em.start=Ee(A.em.start).replace(/punctuation/g,A._punctuation).getRegex(),A.em.middle=Ee(A.em.middle).replace(/punctuation/g,A._punctuation).replace(/overlapSkip/g,A._overlapSkip).getRegex(),A.em.endAst=Ee(A.em.endAst,"g").replace(/punctuation/g,A._punctuation).getRegex(),A.em.endUnd=Ee(A.em.endUnd,"g").replace(/punctuation/g,A._punctuation).getRegex(),A.strong.start=Ee(A.strong.start).replace(/punctuation/g,A._punctuation).getRegex(),A.strong.middle=Ee(A.strong.middle).replace(/punctuation/g,A._punctuation).replace(/blockSkip/g,A._blockSkip).getRegex(),A.strong.endAst=Ee(A.strong.endAst,"g").replace(/punctuation/g,A._punctuation).getRegex(),A.strong.endUnd=Ee(A.strong.endUnd,"g").replace(/punctuation/g,A._punctuation).getRegex(),A.blockSkip=Ee(A._blockSkip,"g").getRegex(),A.overlapSkip=Ee(A._overlapSkip,"g").getRegex(),A._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,A._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,A._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])?)+(?![-_])/,A.autolink=Ee(A.autolink).replace("scheme",A._scheme).replace("email",A._email).getRegex(),A._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,A.tag=Ee(A.tag).replace("comment",K._comment).replace("attribute",A._attribute).getRegex(),A._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,A._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,A._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,A.link=Ee(A.link).replace("label",A._label).replace("href",A._href).replace("title",A._title).getRegex(),A.reflink=Ee(A.reflink).replace("label",A._label).getRegex(),A.reflinkSearch=Ee(A.reflinkSearch,"g").replace("reflink",A.reflink).replace("nolink",A.nolink).getRegex(),A.normal=xe({},A),A.pedantic=xe({},A.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:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",A._label).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",A._label).getRegex()}),A.gfm=xe({},A.normal,{escape:Ee(A.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),A.gfm.url=Ee(A.gfm.url,"i").replace("email",A.gfm._extended_email).getRegex(),A.breaks=xe({},A.gfm,{br:Ee(A.br).replace("{2,}","*").getRegex(),text:Ee(A.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ae={block:K,inline:A},rt=L.defaults,Re=Ae.block,ce=Ae.inline;function Pe(w){return w.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 ge(w){var S="",v,d,h=w.length;for(v=0;v<h;v++)d=w.charCodeAt(v),Math.random()>.5&&(d="x"+d.toString(16)),S+="&#"+d+";";return S}var de=function(){function w(v){this.tokens=[],this.tokens.links=Object.create(null),this.options=v||rt,this.options.tokenizer=this.options.tokenizer||new pe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var d={block:Re.normal,inline:ce.normal};this.options.pedantic?(d.block=Re.pedantic,d.inline=ce.pedantic):this.options.gfm&&(d.block=Re.gfm,this.options.breaks?d.inline=ce.breaks:d.inline=ce.gfm),this.tokenizer.rules=d}w.lex=function(d,h){var g=new w(h);return g.lex(d)};var S=w.prototype;return S.lex=function(d){return d=d.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(d,this.tokens,!0),this.inline(this.tokens),this.tokens},S.blockTokens=function(d,h,g){h===void 0&&(h=[]),g===void 0&&(g=!0),d=d.replace(/^ +$/gm,"");for(var b,z,Q,oe;d;){if(b=this.tokenizer.space(d)){d=d.substring(b.raw.length),b.type&&h.push(b);continue}if(b=this.tokenizer.code(d,h)){d=d.substring(b.raw.length),b.type?h.push(b):(oe=h[h.length-1],oe.raw+=`
|
|
`+b.raw,oe.text+=`
|
|
`+b.text);continue}if(b=this.tokenizer.fences(d)){d=d.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.heading(d)){d=d.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.nptable(d)){d=d.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.hr(d)){d=d.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.blockquote(d)){d=d.substring(b.raw.length),b.tokens=this.blockTokens(b.text,[],g),h.push(b);continue}if(b=this.tokenizer.list(d)){for(d=d.substring(b.raw.length),Q=b.items.length,z=0;z<Q;z++)b.items[z].tokens=this.blockTokens(b.items[z].text,[],!1);h.push(b);continue}if(b=this.tokenizer.html(d)){d=d.substring(b.raw.length),h.push(b);continue}if(g&&(b=this.tokenizer.def(d))){d=d.substring(b.raw.length),this.tokens.links[b.tag]||(this.tokens.links[b.tag]={href:b.href,title:b.title});continue}if(b=this.tokenizer.table(d)){d=d.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.lheading(d)){d=d.substring(b.raw.length),h.push(b);continue}if(g&&(b=this.tokenizer.paragraph(d))){d=d.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.text(d,h)){d=d.substring(b.raw.length),b.type?h.push(b):(oe=h[h.length-1],oe.raw+=`
|
|
`+b.raw,oe.text+=`
|
|
`+b.text);continue}if(d){var Ye="Infinite loop on byte: "+d.charCodeAt(0);if(this.options.silent){console.error(Ye);break}else throw new Error(Ye)}}return h},S.inline=function(d){var h,g,b,z,Q,oe,Ye=d.length;for(h=0;h<Ye;h++){oe=d[h];switch(oe.type){case"paragraph":case"text":case"heading":{oe.tokens=[],this.inlineTokens(oe.text,oe.tokens);break}case"table":{for(oe.tokens={header:[],cells:[]},z=oe.header.length,g=0;g<z;g++)oe.tokens.header[g]=[],this.inlineTokens(oe.header[g],oe.tokens.header[g]);for(z=oe.cells.length,g=0;g<z;g++)for(Q=oe.cells[g],oe.tokens.cells[g]=[],b=0;b<Q.length;b++)oe.tokens.cells[g][b]=[],this.inlineTokens(Q[b],oe.tokens.cells[g][b]);break}case"blockquote":{this.inline(oe.tokens);break}case"list":{for(z=oe.items.length,g=0;g<z;g++)this.inline(oe.items[g].tokens);break}}}return d},S.inlineTokens=function(d,h,g,b,z){h===void 0&&(h=[]),g===void 0&&(g=!1),b===void 0&&(b=!1),z===void 0&&(z="");var Q,oe=d,Ye;if(this.tokens.links){var Ve=Object.keys(this.tokens.links);if(Ve.length>0)for(;(Ye=this.tokenizer.rules.inline.reflinkSearch.exec(oe))!=null;)Ve.includes(Ye[0].slice(Ye[0].lastIndexOf("[")+1,-1))&&(oe=oe.slice(0,Ye.index)+"["+"a".repeat(Ye[0].length-2)+"]"+oe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ye=this.tokenizer.rules.inline.blockSkip.exec(oe))!=null;)oe=oe.slice(0,Ye.index)+"["+"a".repeat(Ye[0].length-2)+"]"+oe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;d;){if(Q=this.tokenizer.escape(d)){d=d.substring(Q.raw.length),h.push(Q);continue}if(Q=this.tokenizer.tag(d,g,b)){d=d.substring(Q.raw.length),g=Q.inLink,b=Q.inRawBlock,h.push(Q);continue}if(Q=this.tokenizer.link(d)){d=d.substring(Q.raw.length),Q.type==="link"&&(Q.tokens=this.inlineTokens(Q.text,[],!0,b)),h.push(Q);continue}if(Q=this.tokenizer.reflink(d,this.tokens.links)){d=d.substring(Q.raw.length),Q.type==="link"&&(Q.tokens=this.inlineTokens(Q.text,[],!0,b)),h.push(Q);continue}if(Q=this.tokenizer.strong(d,oe,z)){d=d.substring(Q.raw.length),Q.tokens=this.inlineTokens(Q.text,[],g,b),h.push(Q);continue}if(Q=this.tokenizer.em(d,oe,z)){d=d.substring(Q.raw.length),Q.tokens=this.inlineTokens(Q.text,[],g,b),h.push(Q);continue}if(Q=this.tokenizer.codespan(d)){d=d.substring(Q.raw.length),h.push(Q);continue}if(Q=this.tokenizer.br(d)){d=d.substring(Q.raw.length),h.push(Q);continue}if(Q=this.tokenizer.del(d)){d=d.substring(Q.raw.length),Q.tokens=this.inlineTokens(Q.text,[],g,b),h.push(Q);continue}if(Q=this.tokenizer.autolink(d,ge)){d=d.substring(Q.raw.length),h.push(Q);continue}if(!g&&(Q=this.tokenizer.url(d,ge))){d=d.substring(Q.raw.length),h.push(Q);continue}if(Q=this.tokenizer.inlineText(d,b,Pe)){d=d.substring(Q.raw.length),z=Q.raw.slice(-1),h.push(Q);continue}if(d){var Ke="Infinite loop on byte: "+d.charCodeAt(0);if(this.options.silent){console.error(Ke);break}else throw new Error(Ke)}}return h},ke(w,null,[{key:"rules",get:function(){return{block:Re,inline:ce}}}]),w}(),Ne=L.defaults,He=me.cleanUrl,Ue=me.escape,Ce=function(){function w(v){this.options=v||Ne}var S=w.prototype;return S.code=function(d,h,g){var b=(h||"").match(/\S*/)[0];if(this.options.highlight){var z=this.options.highlight(d,b);z!=null&&z!==d&&(g=!0,d=z)}return b?'<pre><code class="'+this.options.langPrefix+Ue(b,!0)+'">'+(g?d:Ue(d,!0))+`</code></pre>
|
|
`:"<pre><code>"+(g?d:Ue(d,!0))+`</code></pre>
|
|
`},S.blockquote=function(d){return`<blockquote>
|
|
`+d+`</blockquote>
|
|
`},S.html=function(d){return d},S.heading=function(d,h,g,b){return this.options.headerIds?"<h"+h+' id="'+this.options.headerPrefix+b.slug(g)+'">'+d+"</h"+h+`>
|
|
`:"<h"+h+">"+d+"</h"+h+`>
|
|
`},S.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},S.list=function(d,h,g){var b=h?"ol":"ul",z=h&&g!==1?' start="'+g+'"':"";return"<"+b+z+`>
|
|
`+d+"</"+b+`>
|
|
`},S.listitem=function(d){return"<li>"+d+`</li>
|
|
`},S.checkbox=function(d){return"<input "+(d?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},S.paragraph=function(d){return"<p>"+d+`</p>
|
|
`},S.table=function(d,h){return h&&(h="<tbody>"+h+"</tbody>"),`<table>
|
|
<thead>
|
|
`+d+`</thead>
|
|
`+h+`</table>
|
|
`},S.tablerow=function(d){return`<tr>
|
|
`+d+`</tr>
|
|
`},S.tablecell=function(d,h){var g=h.header?"th":"td",b=h.align?"<"+g+' align="'+h.align+'">':"<"+g+">";return b+d+"</"+g+`>
|
|
`},S.strong=function(d){return"<strong>"+d+"</strong>"},S.em=function(d){return"<em>"+d+"</em>"},S.codespan=function(d){return"<code>"+d+"</code>"},S.br=function(){return this.options.xhtml?"<br/>":"<br>"},S.del=function(d){return"<del>"+d+"</del>"},S.link=function(d,h,g){if(d=He(this.options.sanitize,this.options.baseUrl,d),d===null)return g;var b='<a href="'+Ue(d)+'"';return h&&(b+=' title="'+h+'"'),b+=">"+g+"</a>",b},S.image=function(d,h,g){if(d=He(this.options.sanitize,this.options.baseUrl,d),d===null)return g;var b='<img src="'+d+'" alt="'+g+'"';return h&&(b+=' title="'+h+'"'),b+=this.options.xhtml?"/>":">",b},S.text=function(d){return d},w}(),Te=function(){function w(){}var S=w.prototype;return S.strong=function(d){return d},S.em=function(d){return d},S.codespan=function(d){return d},S.del=function(d){return d},S.html=function(d){return d},S.text=function(d){return d},S.link=function(d,h,g){return""+g},S.image=function(d,h,g){return""+g},S.br=function(){return""},w}(),at=function(){function w(){this.seen={}}var S=w.prototype;return S.slug=function(d){var h=d.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(h)){var g=h;do this.seen[g]++,h=g+"-"+this.seen[g];while(this.seen.hasOwnProperty(h))}return this.seen[h]=0,h},w}(),Qe=L.defaults,$e=me.unescape,ot=function(){function w(v){this.options=v||Qe,this.options.renderer=this.options.renderer||new Ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new at}w.parse=function(d,h){var g=new w(h);return g.parse(d)};var S=w.prototype;return S.parse=function(d,h){h===void 0&&(h=!0);var g="",b,z,Q,oe,Ye,Ve,Ke,pt,Tt,it,Dt,Et,It,Ot,dt,Pt,At,vt,st=d.length;for(b=0;b<st;b++){it=d[b];switch(it.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{g+=this.renderer.heading(this.parseInline(it.tokens),it.depth,$e(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{g+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(pt="",Ke="",oe=it.header.length,z=0;z<oe;z++)Ke+=this.renderer.tablecell(this.parseInline(it.tokens.header[z]),{header:!0,align:it.align[z]});for(pt+=this.renderer.tablerow(Ke),Tt="",oe=it.cells.length,z=0;z<oe;z++){for(Ve=it.tokens.cells[z],Ke="",Ye=Ve.length,Q=0;Q<Ye;Q++)Ke+=this.renderer.tablecell(this.parseInline(Ve[Q]),{header:!1,align:it.align[Q]});Tt+=this.renderer.tablerow(Ke)}g+=this.renderer.table(pt,Tt);continue}case"blockquote":{Tt=this.parse(it.tokens),g+=this.renderer.blockquote(Tt);continue}case"list":{for(Dt=it.ordered,Et=it.start,It=it.loose,oe=it.items.length,Tt="",z=0;z<oe;z++)dt=it.items[z],Pt=dt.checked,At=dt.task,Ot="",dt.task&&(vt=this.renderer.checkbox(Pt),It?dt.tokens.length>0&&dt.tokens[0].type==="text"?(dt.tokens[0].text=vt+" "+dt.tokens[0].text,dt.tokens[0].tokens&&dt.tokens[0].tokens.length>0&&dt.tokens[0].tokens[0].type==="text"&&(dt.tokens[0].tokens[0].text=vt+" "+dt.tokens[0].tokens[0].text)):dt.tokens.unshift({type:"text",text:vt}):Ot+=vt),Ot+=this.parse(dt.tokens,It),Tt+=this.renderer.listitem(Ot,At,Pt);g+=this.renderer.list(Tt,Dt,Et);continue}case"html":{g+=this.renderer.html(it.text);continue}case"paragraph":{g+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(Tt=it.tokens?this.parseInline(it.tokens):it.text;b+1<st&&d[b+1].type==="text";)it=d[++b],Tt+=`
|
|
`+(it.tokens?this.parseInline(it.tokens):it.text);g+=h?this.renderer.paragraph(Tt):Tt;continue}default:{var ut='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(ut);return}else throw new Error(ut)}}}return g},S.parseInline=function(d,h){h=h||this.renderer;var g="",b,z,Q=d.length;for(b=0;b<Q;b++){z=d[b];switch(z.type){case"escape":{g+=h.text(z.text);break}case"html":{g+=h.html(z.text);break}case"link":{g+=h.link(z.href,z.title,this.parseInline(z.tokens,h));break}case"image":{g+=h.image(z.href,z.title,z.text);break}case"strong":{g+=h.strong(this.parseInline(z.tokens,h));break}case"em":{g+=h.em(this.parseInline(z.tokens,h));break}case"codespan":{g+=h.codespan(z.text);break}case"br":{g+=h.br();break}case"del":{g+=h.del(this.parseInline(z.tokens,h));break}case"text":{g+=h.text(z.text);break}default:{var oe='Token with "'+z.type+'" type was not found.';if(this.options.silent){console.error(oe);return}else throw new Error(oe)}}}return g},w}(),yt=me.merge,ft=me.checkSanitizeDeprecation,Ze=me.escape,fe=L.getDefaults,ht=L.changeDefaults,tt=L.defaults;function ve(w,S,v){if(typeof w=="undefined"||w===null)throw new Error("marked(): input parameter is undefined or null");if(typeof w!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(w)+", string expected");if(typeof S=="function"&&(v=S,S=null),S=yt({},ve.defaults,S||{}),ft(S),v){var d=S.highlight,h;try{h=de.lex(w,S)}catch(Q){return v(Q)}var g=function(oe){var Ye;if(!oe)try{Ye=ot.parse(h,S)}catch(Ve){oe=Ve}return S.highlight=d,oe?v(oe):v(null,Ye)};if(!d||d.length<3)return g();if(delete S.highlight,!h.length)return g();var b=0;ve.walkTokens(h,function(Q){Q.type==="code"&&(b++,setTimeout(function(){d(Q.text,Q.lang,function(oe,Ye){if(oe)return g(oe);Ye!=null&&Ye!==Q.text&&(Q.text=Ye,Q.escaped=!0),b--,b===0&&g()})},0))}),b===0&&g();return}try{var z=de.lex(w,S);return S.walkTokens&&ve.walkTokens(z,S.walkTokens),ot.parse(z,S)}catch(Q){if(Q.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,S.silent)return"<p>An error occurred:</p><pre>"+Ze(Q.message+"",!0)+"</pre>";throw Q}}ve.options=ve.setOptions=function(w){return yt(ve.defaults,w),ht(ve.defaults),ve},ve.getDefaults=fe,ve.defaults=tt,ve.use=function(w){var S=yt({},w);if(w.renderer&&function(){var d=ve.defaults.renderer||new Ce,h=function(z){var Q=d[z];d[z]=function(){for(var oe=arguments.length,Ye=new Array(oe),Ve=0;Ve<oe;Ve++)Ye[Ve]=arguments[Ve];var Ke=w.renderer[z].apply(d,Ye);return Ke===!1&&(Ke=Q.apply(d,Ye)),Ke}};for(var g in w.renderer)h(g);S.renderer=d}(),w.tokenizer&&function(){var d=ve.defaults.tokenizer||new pe,h=function(z){var Q=d[z];d[z]=function(){for(var oe=arguments.length,Ye=new Array(oe),Ve=0;Ve<oe;Ve++)Ye[Ve]=arguments[Ve];var Ke=w.tokenizer[z].apply(d,Ye);return Ke===!1&&(Ke=Q.apply(d,Ye)),Ke}};for(var g in w.tokenizer)h(g);S.tokenizer=d}(),w.walkTokens){var v=ve.defaults.walkTokens;S.walkTokens=function(d){w.walkTokens(d),v&&v(d)}}ve.setOptions(S)},ve.walkTokens=function(w,S){for(var v=be(w),d;!(d=v()).done;){var h=d.value;S(h);switch(h.type){case"table":{for(var g=be(h.tokens.header),b;!(b=g()).done;){var z=b.value;ve.walkTokens(z,S)}for(var Q=be(h.tokens.cells),oe;!(oe=Q()).done;)for(var Ye=oe.value,Ve=be(Ye),Ke;!(Ke=Ve()).done;){var pt=Ke.value;ve.walkTokens(pt,S)}break}case"list":{ve.walkTokens(h.items,S);break}default:h.tokens&&ve.walkTokens(h.tokens,S)}}},ve.Parser=ot,ve.parser=ot.parse,ve.Renderer=Ce,ve.TextRenderer=Te,ve.Lexer=de,ve.lexer=de.lex,ve.Tokenizer=pe,ve.Slugger=at,ve.parse=ve;var Se=ve;return Se})},ELLl:function(bt,et,m){(function(F){F(m("VrN/"))})(function(F){var ke={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},q=F.Pos;F.defineOption("autoCloseBrackets",!1,function(I,N,M){M&&M!=F.Init&&(I.removeKeyMap(be),I.state.closeBrackets=null),N&&(ie(_e(N,"pairs")),I.state.closeBrackets=N,I.addKeyMap(be))});function _e(I,N){return N=="pairs"&&typeof I=="string"?I:typeof I=="object"&&I[N]!=null?I[N]:ke[N]}var be={Backspace:x,Enter:ne};function ie(I){for(var N=0;N<I.length;N++){var M=I.charAt(N),Z="'"+M+"'";be[Z]||(be[Z]=L(M))}}ie(ke.pairs+"`");function L(I){return function(N){return J(N,I)}}function R(I){var N=I.state.closeBrackets;if(!N||N.override)return N;var M=I.getModeAt(I.getCursor());return M.closeBrackets||N}function x(I){var N=R(I);if(!N||I.getOption("disableInput"))return F.Pass;for(var M=_e(N,"pairs"),Z=I.listSelections(),V=0;V<Z.length;V++){if(!Z[V].empty())return F.Pass;var te=he(I,Z[V].head);if(!te||M.indexOf(te)%2!=0)return F.Pass}for(var V=Z.length-1;V>=0;V--){var De=Z[V].head;I.replaceRange("",q(De.line,De.ch-1),q(De.line,De.ch+1),"+delete")}}function ne(I){var N=R(I),M=N&&_e(N,"explode");if(!M||I.getOption("disableInput"))return F.Pass;for(var Z=I.listSelections(),V=0;V<Z.length;V++){if(!Z[V].empty())return F.Pass;var te=he(I,Z[V].head);if(!te||M.indexOf(te)%2!=0)return F.Pass}I.operation(function(){var De=I.lineSeparator()||`
|
|
`;I.replaceSelection(De+De,null),I.execCommand("goCharLeft"),Z=I.listSelections();for(var Y=0;Y<Z.length;Y++){var G=Z[Y].head.line;I.indentLine(G,null,!0),I.indentLine(G+1,null,!0)}})}function H(I){var N=F.cmpPos(I.anchor,I.head)>0;return{anchor:new q(I.anchor.line,I.anchor.ch+(N?-1:1)),head:new q(I.head.line,I.head.ch+(N?1:-1))}}function J(I,N){var M=R(I);if(!M||I.getOption("disableInput"))return F.Pass;var Z=_e(M,"pairs"),V=Z.indexOf(N);if(V==-1)return F.Pass;for(var te=_e(M,"closeBefore"),De=_e(M,"triples"),Y=Z.charAt(V+1)==N,G=I.listSelections(),f=V%2==0,ee,U=0;U<G.length;U++){var ae=G[U],E=ae.head,p,O=I.getRange(E,q(E.line,E.ch+1));if(f&&!ae.empty())p="surround";else if((Y||!f)&&O==N)Y&&j(I,E)?p="both":De.indexOf(N)>=0&&I.getRange(E,q(E.line,E.ch+3))==N+N+N?p="skipThree":p="skip";else if(Y&&E.ch>1&&De.indexOf(N)>=0&&I.getRange(q(E.line,E.ch-2),E)==N+N){if(E.ch>2&&/\bstring/.test(I.getTokenTypeAt(q(E.line,E.ch-2))))return F.Pass;p="addFour"}else if(Y){var T=E.ch==0?" ":I.getRange(q(E.line,E.ch-1),E);if(!F.isWordChar(O)&&T!=N&&!F.isWordChar(T))p="both";else return F.Pass}else if(f&&(O.length===0||/\s/.test(O)||te.indexOf(O)>-1))p="both";else return F.Pass;if(!ee)ee=p;else if(ee!=p)return F.Pass}var y=V%2?Z.charAt(V-1):N,D=V%2?N:Z.charAt(V+1);I.operation(function(){if(ee=="skip")I.execCommand("goCharRight");else if(ee=="skipThree")for(var re=0;re<3;re++)I.execCommand("goCharRight");else if(ee=="surround"){for(var B=I.getSelections(),re=0;re<B.length;re++)B[re]=y+B[re]+D;I.replaceSelections(B,"around"),B=I.listSelections().slice();for(var re=0;re<B.length;re++)B[re]=H(B[re]);I.setSelections(B)}else ee=="both"?(I.replaceSelection(y+D,null),I.triggerElectric(y+D),I.execCommand("goCharLeft")):ee=="addFour"&&(I.replaceSelection(y+y+y+y,"before"),I.execCommand("goCharRight"))})}function he(I,N){var M=I.getRange(q(N.line,N.ch-1),q(N.line,N.ch+1));return M.length==2?M:null}function j(I,N){var M=I.getTokenAt(q(N.line,N.ch+1));return/\bstring/.test(M.type)&&M.start==N.ch&&(N.ch==0||!/\bstring/.test(I.getTokenTypeAt(N)))}})},FIWC:function(bt,et,m){bt.exports={flex_box_center:"flex_box_center___gdHkq",flex_space_between:"flex_space_between___lk_Gv",flex_box_vertical_center:"flex_box_vertical_center___2WNVo",flex_box_center_end:"flex_box_center_end___13O11",flex_box_column:"flex_box_column___kMb8L",wrap:"wrap___1y6rg",crumbs:"crumbs___1vKDo"}},Gytx:function(bt,et){bt.exports=function(F,ke,q,_e){var be=q?q.call(_e,F,ke):void 0;if(be!==void 0)return!!be;if(F===ke)return!0;if(typeof F!="object"||!F||typeof ke!="object"||!ke)return!1;var ie=Object.keys(F),L=Object.keys(ke);if(ie.length!==L.length)return!1;for(var R=Object.prototype.hasOwnProperty.bind(ke),x=0;x<ie.length;x++){var ne=ie[x];if(!R(ne))return!1;var H=F[ne],J=ke[ne];if(be=q?q.call(_e,H,J,ne):void 0,be===!1||be===void 0&&H!==J)return!1}return!0}},HmJG:function(bt,et,m){},LdHM:function(bt,et,m){"use strict";m.d(et,"b",function(){return te}),m.d(et,"a",function(){return Y});var F=m("1OyB"),ke=m("vuIU"),q=m("Ji7U"),_e=m("LK+K"),be=m("q1tI"),ie=m("rePB"),L=m("Ff2n"),R=m("ODXe"),x=m("4IlW"),ne=m("bX4T"),H=m("YrtM"),J=m("TSYQ"),he=m.n(J),j=m("+nKL"),I=m("8OUc"),N=function(P,ue){var le=P.prefixCls,Le=P.id,We=P.flattenOptions,pe=P.childrenAsData,Fe=P.values,Ee=P.searchValue,xe=P.multiple,K=P.defaultActiveFirstOption,A=P.height,Ae=P.itemHeight,rt=P.notFoundContent,Re=P.open,ce=P.menuItemSelectedIcon,Pe=P.virtual,ge=P.onSelect,de=P.onToggleOpen,Ne=P.onActiveValue,He=P.onScroll,Ue=P.onMouseEnter,Ce="".concat(le,"-item"),Te=Object(H.a)(function(){return We},[Re,We],function(Se,w){return w[0]&&Se[1]!==w[1]}),at=be.useRef(null),Qe=function(w){w.preventDefault()},$e=function(w){at.current&&at.current.scrollTo({index:w})},ot=function(w){for(var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,v=Te.length,d=0;d<v;d+=1){var h=(w+d*S+v)%v,g=Te[h],b=g.group,z=g.data;if(!b&&!z.disabled)return h}return-1},yt=be.useState(function(){return ot(0)}),ft=Object(R.a)(yt,2),Ze=ft[0],fe=ft[1],ht=function(w){fe(w);var S=Te[w];if(!S){Ne(null,-1);return}Ne(S.data.value,w)};be.useEffect(function(){ht(K!==!1?ot(0):-1)},[Te.length,Ee]),be.useEffect(function(){var Se=setTimeout(function(){if(!xe&&Re&&Fe.size===1){var w=Array.from(Fe)[0],S=Te.findIndex(function(v){var d=v.data;return d.value===w});ht(S),$e(S)}});return function(){return clearTimeout(Se)}},[Re]);var tt=function(w){w!==void 0&&ge(w,{selected:!Fe.has(w)}),xe||de(!1)};if(be.useImperativeHandle(ue,function(){return{onKeyDown:function(w){var S=w.which;switch(S){case x.a.UP:case x.a.DOWN:{var v=0;if(S===x.a.UP?v=-1:S===x.a.DOWN&&(v=1),v!==0){var d=ot(Ze+v,v);$e(d),ht(d)}break}case x.a.ENTER:{var h=Te[Ze];h&&!h.data.disabled?tt(h.data.value):tt(void 0),Re&&w.preventDefault();break}case x.a.ESC:de(!1)}},onKeyUp:function(){},scrollTo:function(w){$e(w)}}}),Te.length===0)return be.createElement("div",{role:"listbox",id:"".concat(Le,"_list"),className:"".concat(Ce,"-empty"),onMouseDown:Qe},rt);function ve(Se){var w=Te[Se];if(!w)return null;var S=w.data||{},v=S.value,d=S.label,h=S.children,g=Object(ne.a)(S,!0),b=pe?h:d;return w?be.createElement("div",Object.assign({"aria-label":typeof b=="string"?b:null},g,{key:Se,role:"option",id:"".concat(Le,"_list_").concat(Se),"aria-selected":Fe.has(v)}),v):null}return be.createElement(be.Fragment,null,be.createElement("div",{role:"listbox",id:"".concat(Le,"_list"),style:{height:0,width:0,overflow:"hidden"}},ve(Ze-1),ve(Ze),ve(Ze+1)),be.createElement(j.a,{itemKey:"key",ref:at,data:Te,height:A,itemHeight:Ae,fullHeight:!1,onMouseDown:Qe,onScroll:He,virtual:Pe,onMouseEnter:Ue},function(Se,w){var S,v=Se.group,d=Se.groupOption,h=Se.data,g=h.label,b=h.key;if(v)return be.createElement("div",{className:he()(Ce,"".concat(Ce,"-group"))},g!==void 0?g:b);var z=h.disabled,Q=h.value,oe=h.title,Ye=h.children,Ve=h.style,Ke=h.className,pt=Object(L.a)(h,["disabled","value","title","children","style","className"]),Tt=Fe.has(Q),it="".concat(Ce,"-option"),Dt=he()(Ce,it,Ke,(S={},Object(ie.a)(S,"".concat(it,"-grouped"),d),Object(ie.a)(S,"".concat(it,"-active"),Ze===w&&!z),Object(ie.a)(S,"".concat(it,"-disabled"),z),Object(ie.a)(S,"".concat(it,"-selected"),Tt),S)),Et=pe?Ye:g,It=!ce||typeof ce=="function"||Tt;return be.createElement("div",Object.assign({},pt,{"aria-selected":Tt,className:Dt,title:oe,onMouseMove:function(){if(Ze===w||z)return;ht(w)},onClick:function(){z||tt(Q)},style:Ve}),be.createElement("div",{className:"".concat(it,"-content")},Et||Q),be.isValidElement(ce)||Tt,It&&be.createElement(I.a,{className:"".concat(Ce,"-option-state"),customizeIcon:ce,customizeIconProps:{isSelected:Tt}},Tt?"\u2713":null))}))},M=be.forwardRef(N);M.displayName="OptionList";var Z=M,V=function(){return null};V.isSelectOption=!0;var te=V,De=function(){return null};De.isSelectOptGroup=!0;var Y=De,G=m("VTBJ"),f=m("Zm9Q");function ee(c){var P=c.key,ue=c.props,le=ue.children,Le=ue.value,We=Object(L.a)(ue,["children","value"]);return Object(G.a)({key:P,value:Le!==void 0?Le:P,children:le},We)}function U(c){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(f.a)(c).map(function(ue,le){if(!be.isValidElement(ue)||!ue.type)return null;var Le=ue.type.isSelectOptGroup,We=ue.key,pe=ue.props,Fe=pe.children,Ee=Object(L.a)(pe,["children"]);return P||!Le?ee(ue):Object(G.a)(Object(G.a)({key:"__RC_SELECT_GRP__".concat(We===null?le:We,"__"),label:We},Ee),{},{options:U(Fe)})}).filter(function(ue){return ue})}var ae=m("2Qr1"),E=m("qNPg"),p=m("U8pU"),O=m("Kwbf"),T=m("WKfj");function y(c){var P=c.mode,ue=c.options,le=c.children,Le=c.backfill,We=c.allowClear,pe=c.placeholder,Fe=c.getInputElement,Ee=c.showSearch,xe=c.onSearch,K=c.defaultOpen,A=c.autoFocus,Ae=c.labelInValue,rt=c.value,Re=c.inputValue,ce=c.optionLabelProp,Pe=P==="multiple"||P==="tags",ge=Ee!==void 0?Ee:Pe||P==="combobox",de=ue||U(le);if(Object(O.a)(P!=="tags"||de.every(function(Ce){return!Ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),P==="tags"||P==="combobox"){var Ne=de.some(function(Ce){return Ce.options?Ce.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in Ce?Ce.value:Ce.key)=="number"});Object(O.a)(!Ne,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(O.a)(P!=="combobox"||!ce,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(O.a)(P==="combobox"||!Le,"`backfill` only works with `combobox` mode."),Object(O.a)(P==="combobox"||!Fe,"`getInputElement` only work with `combobox` mode."),Object(O.b)(P!=="combobox"||!Fe||!We||!pe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xe&&!ge&&P!=="combobox"&&P!=="tags"&&Object(O.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(O.b)(!K||A,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),rt!=null){var He=Object(T.d)(rt);Object(O.a)(!Ae||He.every(function(Ce){return Object(p.a)(Ce)==="object"&&("key"in Ce||"value"in Ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(O.a)(!Pe||Array.isArray(rt),"`value` should be array when `mode` is `multiple` or `tags`")}if(le){var Ue=null;Object(f.a)(le).some(function(Ce){if(!be.isValidElement(Ce)||!Ce.type)return!1;var Te=Ce.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var at=Object(f.a)(Ce.props.children).every(function(Qe){return!be.isValidElement(Qe)||!Ce.type||Qe.type.isSelectOption?!0:(Ue=Qe.type,!1)});return!at}return Ue=Te,!0}),Ue&&Object(O.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ue.displayName||Ue.name||Ue,"`.")),Object(O.a)(Re===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var D=y,re=Object(E.a)({prefixCls:"rc-select",components:{optionList:Z},convertChildrenToData:U,flattenOptions:ae.d,getLabeledValue:ae.e,filterOptions:ae.b,isValueDisabled:ae.g,findValueOption:ae.c,warningProps:D,fillOptionsWithMissingValue:ae.a}),B=function(c){Object(q.a)(ue,c);var P=Object(_e.a)(ue);function ue(){var le;return Object(F.a)(this,ue),le=P.apply(this,arguments),le.selectRef=be.createRef(),le.focus=function(){le.selectRef.current.focus()},le.blur=function(){le.selectRef.current.blur()},le}return Object(ke.a)(ue,[{key:"render",value:function(){return be.createElement(re,Object.assign({ref:this.selectRef},this.props))}}]),ue}(be.Component);B.Option=te,B.OptGroup=Y;var me=B,_=et.c=me},M8RZ:function(bt,et,m){"use strict";m.d(et,"a",function(){return x});var F=m("fWQN"),ke=m("mtLc"),q=m("yKVA"),_e=m("879j"),be=m("q1tI"),ie=m.n(be),L=m("i8i4"),R=m.n(L),x=function(ne){Object(q.a)(J,ne);var H=Object(_e.a)(J);function J(he){var j;Object(F.a)(this,J),j=H.call(this,he);var I=window.document;return j.node=I.createElement("div"),I.body.appendChild(j.node),j}return Object(ke.a)(J,[{key:"render",value:function(){var j=this.props.children;return Object(L.createPortal)(j,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),J}(ie.a.Component)},O2Wb:function(bt,et,m){bt.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},OLES:function(bt,et,m){"use strict";var F=m("U8pU"),ke=m("VTBJ"),q=m("Ff2n"),_e=m("q1tI"),be=m("uciX"),ie=m("7ixt"),L=function(he){var j=he.overlay,I=he.prefixCls,N=he.id,M=he.overlayInnerStyle;return _e.createElement("div",{className:"".concat(I,"-inner"),id:N,role:"tooltip",style:M},typeof j=="function"?j():j)},R=L,x=function(he,j){var I=he.overlayClassName,N=he.trigger,M=N===void 0?["hover"]:N,Z=he.mouseEnterDelay,V=Z===void 0?0:Z,te=he.mouseLeaveDelay,De=te===void 0?.1:te,Y=he.overlayStyle,G=he.prefixCls,f=G===void 0?"rc-tooltip":G,ee=he.children,U=he.onVisibleChange,ae=he.afterVisibleChange,E=he.transitionName,p=he.animation,O=he.placement,T=O===void 0?"right":O,y=he.align,D=y===void 0?{}:y,re=he.destroyTooltipOnHide,B=re===void 0?!1:re,me=he.defaultVisible,_=he.getTooltipContainer,c=he.overlayInnerStyle,P=Object(q.a)(he,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ue=Object(_e.useRef)(null);Object(_e.useImperativeHandle)(j,function(){return ue.current});var le=Object(ke.a)({},P);"visible"in he&&(le.popupVisible=he.visible);var Le=function(){var xe=he.arrowContent,K=xe===void 0?null:xe,A=he.overlay,Ae=he.id;return[_e.createElement("div",{className:"".concat(f,"-arrow"),key:"arrow"},K),_e.createElement(R,{key:"content",prefixCls:f,id:Ae,overlay:A,overlayInnerStyle:c})]},We=!1,pe=!1;if(typeof B=="boolean")We=B;else if(B&&Object(F.a)(B)==="object"){var Fe=B.keepParent;We=Fe===!0,pe=Fe===!1}return _e.createElement(be.a,Object.assign({popupClassName:I,prefixCls:f,popup:Le,action:M,builtinPlacements:ie.a,popupPlacement:T,ref:ue,popupAlign:D,getPopupContainer:_,onPopupVisibleChange:U,afterPopupVisibleChange:ae,popupTransitionName:E,popupAnimation:p,defaultPopupVisible:me,destroyPopupOnHide:We,autoDestroy:pe,mouseLeaveDelay:De,popupStyle:Y,mouseEnterDelay:V},le),ee)},ne=Object(_e.forwardRef)(x),H=et.a=ne},Ot1p:function(bt,et,m){"use strict";var F=m("2qtc"),ke=m("kLXV"),q=m("rAM+"),_e=m("miYZ"),be=m("tsqr"),ie=m("tJVT"),L=m("jrin"),R=m("q1tI"),x=m.n(R),ne=m("VrN/"),H=m.n(ne),J=m("bdgK"),he=m("p77/"),j=m("Bd2K"),I=m("ELLl"),N=m("19Vz"),M=m("lZu9"),Z=m("+NIl"),V=m("kSUc"),te=m("9Bee"),De=function(v){var d=v.value,h=d===void 0?"":d,g=v.className,b=v.showTextOnly,z=v.showLines,Q=v.style,oe=Q===void 0?{}:Q,Ye=Object(R.useMemo)(function(){return""},[h]);return x.a.createElement(x.a.Fragment,null,x.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ye}}))},Y=m("0Owb"),G=m("dejd"),f=m("C+DQ"),ee=[{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(v){var d=v.onActionCallback,h=v.title,g=v.icon,b=v.actionName,z=v.className,Q=z===void 0?"":z,oe=v.children;function Ye(){d(b)}return x.a.createElement("a",{title:h,className:Q,onClick:Ye},x.a.createElement("i",{className:"md-iconfont ".concat(g)}),oe)}var ae=function(v){var d=v.watch,h=v.showNullButton,g=v.onActionCallback,b=v.fullScreen,z=v.insertTemp,Q=v.hidetoolBar,oe=[].concat(ee,[{title:"".concat(d?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(d?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return x.a.createElement("ul",{className:"markdown-toolbar-container"},!Q&&oe.map(function(Ye,Ve){return x.a.createElement("li",{key:Ve},Ye.actionName?x.a.createElement(U,Object(Y.a)({},Ye,{onActionCallback:g})):x.a.createElement("span",{className:"v-line"}))}),h?x.a.createElement("li",null,x.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:g},x.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,z&&x.a.createElement("li",null,x.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(z),onActionCallback:g},x.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),x.a.createElement("li",{className:"btn-full-screen"},x.a.createElement(U,{icon:"".concat(b?"icon-shrink":"icon-enlarge"),title:b?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:g})))},E=m("M8RZ"),p=m("+L6B"),O=m("2/Rp"),T=m("y8nQ"),y=m("Vl3Y"),D=m("5NDa"),re=m("5rEg"),B={labelCol:{span:4},wrapperCol:{span:20}},me=function(v){var d=v.callback,h=v.onCancel;function g(b){d(b)}return x.a.createElement(y.a,Object(Y.a)({},B,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:g}),x.a.createElement(y.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},x.a.createElement(re.a,null)),x.a.createElement(y.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},x.a.createElement(re.a,null)),x.a.createElement("div",{className:"flex-container flex-end"},x.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(O.a,{type:"ghost",onClick:h},"\u53D6\u6D88")))},_=m("7ahc"),c=m("HmJG"),P=m("BjJ7"),ue=y.a.useForm,le={width:280,marginRight:10},Le={labelCol:{span:5},wrapperCol:{span:19}},We=function(v){var d=v.callback,h=v.onCancel,g=ue(),b=Object(ie.a)(g,1),z=b[0];function Q(Ve){d(Ve)}function oe(Ve,Ke){z.setFieldsValue({src:"/api/attachments/".concat(Ve.id),type:Ke.type})}function Ye(Ve){var Ke=Ve.target.files[0];Fe(Ke,oe)}return x.a.createElement(y.a,Object(Y.a)({form:z},Le,{className:"upload-image-panel",onFinish:Q}),x.a.createElement(y.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},x.a.createElement("div",{className:"flex-container"},x.a.createElement(y.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},x.a.createElement(re.a,{style:le})),x.a.createElement(pe,{onFileChange:Ye}))),x.a.createElement(y.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},x.a.createElement(re.a,{style:{width:264}})),x.a.createElement(y.a.Item,{style:{textAlign:"right"}},x.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(O.a,{type:"ghost",onClick:h},"\u53D6\u6D88")))};function pe(v){var d=v.onFileChange;return x.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",x.a.createElement("input",{type:"file",onChange:d}))}function Fe(v,d){if(!v)throw new String("\u6CA1\u6709\u6587\u4EF6");var h=new FormData;h.append("editormd-image-file",v),h.append("file_param_name","editormd-image-file"),h.append("byxhr","true");var g=new window.XMLHttpRequest;g.withCredentials=!0,g.addEventListener("load",function(b){d(JSON.parse(b.target.responseText),v)},!1),g.addEventListener("error",function(b){console.error(b)},!1),g.open("POST","".concat(P.a,"/api/attachments.json")),g.send(h)}var Ee=m("giR+"),xe=m("fyUT"),K=m("7Kak"),A=m("9yH6"),Ae=A.a.Group,rt={margin:"0 8px"},Re=function(v){var d=v.callback,h=v.onCancel;function g(b){d(b)}return x.a.createElement(y.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:g},x.a.createElement("div",{className:"flex-container"},x.a.createElement("span",{style:rt},"\u5355\u5143\u683C\u6570\uFF1A"),x.a.createElement("span",{style:rt},"\u884C\u6570"),x.a.createElement(y.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},x.a.createElement(xe.a,null)),x.a.createElement("span",{style:rt},"\u5217\u6570"),x.a.createElement(y.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},x.a.createElement(xe.a,null))),x.a.createElement("div",{className:"flex-container",style:{marginTop:12}},x.a.createElement("span",{style:rt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),x.a.createElement(y.a.Item,{name:"align"},x.a.createElement(Ae,null,x.a.createElement(A.a,{value:"default"},x.a.createElement("i",{className:"fa fa-align-justify"})),x.a.createElement(A.a,{value:"left"},x.a.createElement("i",{className:"fa fa-align-left"})),x.a.createElement(A.a,{value:"center"},x.a.createElement("i",{className:"fa fa-align-center"})),x.a.createElement(A.a,{value:"right"},x.a.createElement("i",{className:"fa fa-align-right"}))))),x.a.createElement("div",{className:"flex-container flex-end"},x.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(O.a,{type:"ghost",onClick:h},"\u53D6\u6D88")))},ce=m("m3rI"),Pe=m("wMS7"),ge=m.n(Pe),de="link",Ne="upload-image",He="code-block",Ue="add-table",Ce="------------",Te={default:Ce,left:":".concat(Ce),center:":".concat(Ce,":"),right:"".concat(Ce,":")},at=m("9VGf"),Qe,$e;function ot(){}var yt=0,ft=1e4,Ze="\u2581",fe=`
|
|
**\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 ht(v){return/^\d+$/.test(v)?"".concat(v,"px"):v}var tt=navigator.platform.toUpperCase().indexOf("MAC")>=0,ve=tt?"Cmd":"Ctrl",Se=(Qe={},Object(L.a)(Qe,ve+"-B","bold"),Object(L.a)(Qe,ve+"-I","italic"),Qe),w=($e={},Object(L.a)($e,de,"\u6DFB\u52A0\u94FE\u63A5"),Object(L.a)($e,He,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(L.a)($e,Ne,"\u6DFB\u52A0\u56FE\u7247"),Object(L.a)($e,Ue,"\u6DFB\u52A0\u8868\u683C"),$e),S=et.a=function(v){var d=v.defaultValue,h=d===void 0?"":d,g=v.onChange,b=v.width,z=b===void 0?"100%":b,Q=v.height,oe=Q===void 0?400:Q,Ye=v.miniToolbar,Ve=Ye===void 0?!1:Ye,Ke=v.isFocus,pt=Ke===void 0?!1:Ke,Tt=v.watch,it=v.insertTemp,Dt=v.mode,Et=Dt===void 0?"markdown":Dt,It=v.id,Ot=It===void 0?"markdown-editor-id":It,dt=v.showResizeBar,Pt=dt===void 0?!1:dt,At=v.noStorage,vt=At===void 0?!1:At,st=v.showNullButton,ut=st===void 0?!1:st,xt=v.hidetoolBar,zt=xt===void 0?!1:xt,Ut=v.fullScreen,Vt=Ut===void 0?!1:Ut,Bt=v.onBlur,nt=v.onCMBeforeChange,Ft=v.onFullScreen,_t=v.className,Kt=_t===void 0?"":_t,St=v.disablePaste,nn=St===void 0?!1:St,Un=v.placeholder,Rn=Un===void 0?"":Un,Oe=v.values,Ge=Oe===void 0?"":Oe,Xt=Object(R.useState)(null),$t=Object(ie.a)(Xt,2),je=$t[0],rn=$t[1],qn=Object(R.useState)(h),kt=Object(ie.a)(qn,2),dn=kt[0],Xn=kt[1],Jn=Object(R.useState)(Tt),wn=Object(ie.a)(Jn,2),zn=wn[0],wt=wn[1],se=Object(R.useState)(Vt),ct=Object(ie.a)(se,2),we=ct[0],W=ct[1],Ie=Object(R.useState)(""),mt=Object(ie.a)(Ie,2),Xe=mt[0],ze=mt[1],Lt=Object(R.useState)(0),Ht=Object(ie.a)(Lt,2),qt=Ht[0],Yt=Ht[1],un=Object(R.useState)(oe),Pn=Object(ie.a)(un,2),fn=Pn[0],kn=Pn[1],fr=Object(R.useState)(!1),Ln=Object(ie.a)(fr,2),Mn=Ln[0],ar=Ln[1],Gn=Object(R.useRef)(),Nr=Object(R.useRef)(),Ur=Object(R.useRef)(),wr=Object(R.useRef)();Object(R.useEffect)(function(){Xn(Ge),je==null||je.setValue(Ge)},[Ge]),Object(R.useEffect)(function(){Ft==null||Ft(we)},[we]),Object(R.useEffect)(function(){if(Gn.current){var Mt=H.a.fromTextArea(Gn.current,{mode:Et,lineNumbers:!Ve,lineWrapping:!0,value:h,autoCloseTags:!0,autoCloseBrackets:!0});pt&&Mt.focus();function Nt(jt,Gt){if(nn){Gt.preventDefault();return}var Qt=Gt.clipboardData;if(Qt){var tn=Qt.types.toString(),sn=Qt.items,vn=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];if(tn==="Files"||Qt.types.indexOf("Files")>-1){if(Gt.preventDefault(),Et=="stex")return;try{var bn,or=sn[1];((bn=sn[0])===null||bn===void 0?void 0:bn.kind)==="file"&&(or=sn[0]);var hn=or.getAsFile(),pr=hn.name.split(".").pop();Fe(hn,function(Tn){if(Tn.id){var sr,lr,aa;(hn==null||((sr=hn.type)===null||sr===void 0)?void 0:sr.indexOf("image"))>-1?Mt.replaceSelection(".concat(Tn.content_type,")")):(hn==null||((lr=hn.type)===null||lr===void 0)?void 0:lr.indexOf("video"))>-1?Mt.replaceSelection('<video width="100%" controls src="'.concat(ce.a.API_SERVER,"/api/attachments/").concat(Tn.id,'"></video>')):(hn==null||((aa=hn.type)===null||aa===void 0)?void 0:aa.indexOf("pdf"))>-1?Mt.replaceSelection('<a href="'.concat(ce.a.API_SERVER,"/api/attachments/").concat(Tn.id,"?type=").concat(hn.type,'&disposition=inline" target="_blank">').concat(hn.name,"</a>")):vn.includes(pr)?Mt.replaceSelection('<a href="'.concat(ce.a.API_SERVER,"/api/attachments/").concat(Tn.id,'?type=office&disposition=inline" target="_blank">').concat(hn.name,"</a>")):Mt.replaceSelection("[".concat(hn.name,"](").concat(ce.a.API_SERVER,"/api/attachments/").concat(Tn.id,"?type=").concat(Tn.content_type,")"))}else(Tn==null?void 0:Tn.status)===401&&(document.location.href="/user/login")})}catch(Tn){be.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Mt.on("paste",Nt),rn(Mt),function(){Mt.off("paste",Nt)}}},[]);var na=Object(R.useCallback)(function(){if(Nr.current)try{}catch(Mt){console.log(Mt,"---- to set md editor body height")}},[fn,Nr,we]);Object(R.useEffect)(function(){function Mt(){var jt=new J.default(function(Gt){var Qt=Object(q.a)(Gt),tn;try{for(Qt.s();!(tn=Qt.n()).done;){var sn=tn.value;(sn.target.offsetHeight>0||sn.target.offsetWidth>0)&&(na(),je.setSize("100%","100%"),je.refresh())}}catch(vn){Qt.e(vn)}finally{Qt.f()}});return jt.observe(Gn.current.parentElement),jt}if(je){var Nt=Mt();return function(){Nt.unobserve(Gn.current.parentElement)}}},[je,na]),Object(R.useEffect)(function(){if(je){for(var Mt=[],Nt=function(){var sn=Gt[jt];Qt=Object(ie.a)(sn,2);var vn=Qt[0],bn=Qt[1],or=Object(L.a)({},vn,function(){Cr(bn)});Mt.push(or),je.addKeyMap(or)},jt=0,Gt=Object.entries(Se);jt<Gt.length;jt++){var Qt;Nt()}return function(){var tn=Object(q.a)(Mt),sn;try{for(tn.s();!(sn=tn.n()).done;){var vn=sn.value;je.removeKeyMap(vn)}}catch(bn){tn.e(bn)}finally{tn.f()}}}},[je]),Object(R.useEffect)(function(){Vt!==we&&W(Vt)},[Vt]),Object(at.a)(function(){if(!vt&&qt>0){var Mt=new Date().getTime(),Nt=window.sessionStorage.getItem(Ot);Mt>=qt+ft&&(!Nt||Nt!==dn)&&(window.sessionStorage.setItem(Ot,dn),ar(!0))}},ft),Object(R.useEffect)(function(){wt(Tt)},[je,Tt]),Object(R.useEffect)(function(){je&&(pt&&je.focus())},[je,pt]),Object(R.useEffect)(function(){if(zn&&je){var Mt=je.getScrollerElement();function Nt(jt){var Gt=jt.target;if(wr.current){var Qt=Gt.scrollTop/Gt.scrollHeight;wr.current.scrollTop=wr.current.scrollHeight*Qt}}return Mt.addEventListener("scroll",Nt),function(){Mt.removeEventListener("scroll",Nt)}}},[je,zn]),Object(R.useEffect)(function(){if(je&&nt){function Mt(Nt,jt){nt(Nt,jt)}return je.on("beforeChange",Mt),function(){je.off("beforeChange",Mt)}}},[je,nt]),Object(R.useEffect)(function(){if(je&&Bt){function Mt(){Bt(je.getValue())}return je.on("blur",Mt),function(){je.off("blur",Mt)}}},[je,Bt]),Object(R.useEffect)(function(){if(je){function Mt(Nt){var jt=ge.a.sanitize(Nt.getValue());Xn(jt),Yt(new Date().getTime()),Nt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),g&&g(jt)}return je.on("change",Mt),function(){je.off("change",Mt)}}},[je,g]),Object(R.useEffect)(function(){je&&(h==null?(je.setValue(""),Xn("")):h!==je.getValue()&&(je.setValue(h),Xn(h),je.setCursor(je.lineCount(),0)))},[je,h]);var Cr=Object(R.useCallback)(function(Mt){var Nt=je.getCursor(),jt=je.getSelection(),Gt=jt.split(`
|
|
`);switch(Mt){case"bold":return je.replaceSelection("**"+jt+"**"),jt===""&&je.setCursor(Nt.line,Nt.ch+2),je.focus();case"italic":return je.replaceSelection("*"+jt+"*"),jt===""&&je.setCursor(Nt.line,Nt.ch+1),je.focus();case"code":return je.replaceSelection("`"+jt+"`"),jt===""&&je.setCursor(Nt.line,Nt.ch+1),je.focus();case"inline-latex":return je.replaceSelection("`$$"+jt+"$$`"),jt===""&&je.setCursor(Nt.line,Nt.ch+3),je.focus();case"latex":return je.replaceSelection("```latex\n"+jt+"\n```"),je.setCursor(Nt.line+1,jt.length+1),je.focus();case"line-break":return je.replaceSelection(`<br/>
|
|
`),je.focus();case"list-ul":return jt===""?je.replaceSelection("- "+jt):je.replaceSelection(Gt.map(function(Qt){return Qt===""?"":"- ".concat(Qt)}).join(`
|
|
`)),je.focus();case"list-ol":return jt===""?je.replaceSelection("1. "+jt):je.replaceSelection(Gt.map(function(Qt,tn){return Qt===""?"":"".concat(tn+1,". ").concat(Qt)}).join(`
|
|
`)),je.focus();case"add-null-ch":return jt===""&&je.setCursor(Nt.line,Nt.ch+1),je.replaceSelection(Ze),je.focus();case"inster-template-1":return jt===""&&je.setCursor(Nt.line,Nt.ch),je.replaceSelection(fe),je.focus();case"eraser":return je.setValue(""),je.focus();case"trigger-watch":return wt(!zn),je.focus();case"trigger-full-screen":return W(!we),je.focus();case de:ze(de);return;case He:ze(He);return;case Ne:ze(Ne);return;case Ue:ze(Ue);return;default:throw new Error}},[je,zn,we]),ir=Object(R.useCallback)(function(Mt){ze("");switch(Xe){case de:var Nt=Mt.title,jt=Mt.link;return je.replaceSelection("[".concat(Nt,"](").concat(jt,")")),je.focus();case He:var Gt=Mt.language,Qt=Mt.content;return je.replaceSelection(["```"+Gt,Qt,"```"].join(`
|
|
`)),je.focus();case Ne:var tn=Mt.src,sn=Mt.alt;return je.replaceSelection(".concat(tn,' "').concat(sn,'" )')),je.focus();case Ue:for(var vn=Mt.row,bn=Mt.col,or=Mt.align,hn=`
|
|
`,pr=0;pr<vn;pr++){for(var Tn=[],sr=[],lr=0;lr<bn;lr++)pr===1&&sr.push(Te[or]),Tn.push(" ");pr===1&&(hn+="| ".concat(sr.join(" | "),` |
|
|
`)),hn+="| ".concat(Tn.join(bn===1?"":" | "),` |
|
|
`)}return je.replaceSelection(hn+`
|
|
`),je.focus();default:throw new Error}},[je,Xe]),ra=Object(R.useMemo)(function(){switch(Xe){case de:return x.a.createElement(me,{callback:ir,onCancel:hr});case He:return x.a.createElement(_.b,{callback:ir,onCancel:hr});case Ne:return x.a.createElement(We,{callback:ir,onCancel:hr});case Ue:return x.a.createElement(Re,{callback:ir,onCancel:hr});default:return null}},[Xe]);function hr(){ze("")}Object(R.useEffect)(function(){if(Ur.current){var Mt=Ur.current,Nt=!1,jt=0;function Gt(sn){Nt=!0,jt=sn.pageY}function Qt(){Nt=!1}function tn(sn){if(Nt){var vn=sn.pageY-jt;vn<0&&(vn=0),vn>300&&(vn=300);var bn=oe+vn+"px";kn(bn)}}return Mt.addEventListener("mousedown",Gt),document.addEventListener("mousemove",tn),document.addEventListener("mouseup",Qt),function(){Mt.removeEventListener("mousedown",Gt),document.removeEventListener("mousemove",tn),document.removeEventListener("mouseup",Qt)}}},[je,Ur]),Object(R.useEffect)(function(){kn(oe)},[oe]);var Ra=ht(z),jr=ht(fn),ei={width:Ra,height:jr},ti=Object(R.useMemo)(function(){if(qt){var Mt=new Date(qt),Nt=Mt.getHours(),jt=Mt.getMinutes(),Gt=Mt.getSeconds();return Nt=Nt<10?"0"+Nt:Nt,jt=jt<10?"0"+jt:jt,Gt=Gt<10?"0"+Gt:Gt,"".concat(Nt,":").concat(jt,":").concat(Gt)}return 0},[qt]);function Yn(){window.sessionStorage.removeItem(Ot),ar(!1),Yt(0)}function Bi(){ar(!1),Yt(0),je.setValue(window.sessionStorage.getItem(Ot))}return x.a.createElement(R.Fragment,null,x.a.createElement("div",{className:"markdown-editor-wrapper",ref:Nr},x.a.createElement("div",{className:"markdown-editor-container ".concat(Kt," ").concat(zn?"on-preview":""," ").concat(Ve?"mini":""," ").concat(we?"full-screen":""),style:ei},x.a.createElement(ae,{insertTemp:it,watch:zn,fullScreen:we,showNullButton:ut,onActionCallback:Cr,hidetoolBar:zt}),x.a.createElement("div",{className:"markdown-editor-body"},x.a.createElement("div",{className:"codemirror-container"},x.a.createElement("textarea",{ref:Gn,placeholder:Rn})),zn?x.a.createElement("div",{ref:wr,className:"preview-container"},Et==="stex"&&x.a.createElement(De,{value:dn}),Et!=="stex"&&x.a.createElement(te.a,{value:dn})):null))),Pt?x.a.createElement("a",{ref:Ur,className:"editor-resize"}):null,x.a.createElement(E.a,null,w[Xe]?x.a.createElement(ke.a,{centered:!0,title:w[Xe],visible:!0,onCancel:hr,footer:null},ra):null))}},PGNT:function(bt,et,m){bt.exports={wrap:"wrap___orWmH",modal:"modal___142IN",titleWrap:"titleWrap___2UWGN",required:"required___lXOtq",title:"title___2wqMf",colorGray:"colorGray___3FkLm",choiceWrap:"choiceWrap___3pbic",answer:"answer___30LSv",activeAnswer:"activeAnswer___3ayAN",deleteIcon:"deleteIcon___2HHly",addIcon:"addIcon___29vcx",editorWrap:"editorWrap___ANVP6",htmlWrap:"htmlWrap___38sLf",radio:"radio___15wok",color333:"color333___sNPjh",color999:"color999___1ofkl",fold:"fold___6rnoE",head:"head___2muph"}},PsQE:function(bt,et,m){bt.exports={flex_box_center:"flex_box_center___2PkN_",flex_space_between:"flex_space_between___36cDA",flex_box_vertical_center:"flex_box_vertical_center___2c88u",flex_box_center_end:"flex_box_center_end___14cXO",flex_box_column:"flex_box_column___3nalt",wrap:"wrap___3xZrs",left:"left___19hOK",title:"title___3Ti2k",total:"total___3MRC5",list:"list___3pdfL",name:"name___2IcTs",b:"b___2W0Sn",r:"r___2Tpj8",l:"l___1rMKQ",tag:"tag___jj2X5",right:"right___16831",examName:"examName___2TmgX",t:"t___1CJZd",num:"num___1qX6C",topWarp:"topWarp___3WuSr",head:"head___3z9Hq",so:"so___m2B6Z",btn:"btn___20VL7",content:"content___2tTuo",titleWrap:"titleWrap___1cYdQ",single:"single___1BKtz",analysis:"analysis___1qm4Y",text:"text___1JQUf",btnsElse:"btnsElse___2IzAs",btnsWrap:"btnsWrap___3ib37",btns:"btns___2DbBT",modalColumn:"modalColumn___1zs36",modalRow:"modalRow___14b2N",sup:"sup___1CIjI",popover:"popover___Mmcvb"}},"RZ/O":function(bt,et,m){bt.exports=m.p+"static/bi.9c9b0364.svg"},SJMd:function(bt,et){/**
|
|
* @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,ke,q=!1,_e,be;window.PR_SHOULD_USE_CONTINUATION=!0;var ie,L;(function(){var R=window,x=["break,continue,do,else,for,if,return,while"],ne=[x,"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"],H=[ne,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[H,"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"],he=[H,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],j=[H,"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"],I="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",N=[H,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],M="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",Z=[x,"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"],V=[x,"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"],te=[x,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],De=[J,j,he,N,M,Z,V,te],Y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,G="str",f="kwd",ee="com",U="typ",ae="lit",E="pun",p="pln",O="tag",T="dec",y="src",D="atn",re="atv",B="nocode",me="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function _(ge){for(var de=0,Ne=!1,He=!1,Ue=0,Ce=ge.length;Ue<Ce;++Ue){var Te=ge[Ue];if(Te.ignoreCase)He=!0;else if(/[a-z]/i.test(Te.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ne=!0,He=!1;break}}var at={b:8,t:9,n:10,v:11,f:12,r:13};function Qe(Ze){var fe=Ze.charCodeAt(0);if(fe!==92)return fe;var ht=Ze.charAt(1);return fe=at[ht],fe||("0"<=ht&&ht<="7"?parseInt(Ze.substring(1),8):ht==="u"||ht==="x"?parseInt(Ze.substring(2),16):Ze.charCodeAt(1))}function $e(Ze){if(Ze<32)return(Ze<16?"\\x0":"\\x")+Ze.toString(16);var fe=String.fromCharCode(Ze);return fe==="\\"||fe==="-"||fe==="]"||fe==="^"?"\\"+fe:fe}function ot(Ze){var fe=Ze.substring(1,Ze.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")),ht=[],tt=fe[0]==="^",ve=["["];tt&&ve.push("^");for(var Se=tt?1:0,w=fe.length;Se<w;++Se){var S=fe[Se];if(/\\[bdsw]/i.test(S))ve.push(S);else{var v=Qe(S),d;Se+2<w&&fe[Se+1]==="-"?(d=Qe(fe[Se+2]),Se+=2):d=v,ht.push([v,d]),d<65||v>122||(d<65||v>90||ht.push([Math.max(65,v)|32,Math.min(d,90)|32]),d<97||v>122||ht.push([Math.max(97,v)&~32,Math.min(d,122)&~32]))}}ht.sort(function(z,Q){return z[0]-Q[0]||Q[1]-z[1]});for(var h=[],g=[],Se=0;Se<ht.length;++Se){var b=ht[Se];b[0]<=g[1]+1?g[1]=Math.max(g[1],b[1]):h.push(g=b)}for(var Se=0;Se<h.length;++Se){var b=h[Se];ve.push($e(b[0])),b[1]>b[0]&&(b[1]+1>b[0]&&ve.push("-"),ve.push($e(b[1])))}return ve.push("]"),ve.join("")}function yt(Ze){for(var fe=Ze.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")),ht=fe.length,tt=[],ve=0,Se=0;ve<ht;++ve){var w=fe[ve];if(w==="(")++Se;else if(w.charAt(0)==="\\"){var S=+w.substring(1);S&&(S<=Se?tt[S]=-1:fe[ve]=$e(S))}}for(var ve=1;ve<tt.length;++ve)tt[ve]===-1&&(tt[ve]=++de);for(var ve=0,Se=0;ve<ht;++ve){var w=fe[ve];if(w==="(")++Se,tt[Se]||(fe[ve]="(?:");else if(w.charAt(0)==="\\"){var S=+w.substring(1);S&&S<=Se&&(fe[ve]="\\"+tt[S])}}for(var ve=0;ve<ht;++ve)fe[ve]==="^"&&fe[ve+1]!=="^"&&(fe[ve]="");if(Ze.ignoreCase&&Ne)for(var ve=0;ve<ht;++ve){var w=fe[ve],v=w.charAt(0);w.length>=2&&v==="["?fe[ve]=ot(w):v!=="\\"&&(fe[ve]=w.replace(/[a-zA-Z]/g,function(g){var b=g.charCodeAt(0);return"["+String.fromCharCode(b&~32,b|32)+"]"}))}return fe.join("")}for(var ft=[],Ue=0,Ce=ge.length;Ue<Ce;++Ue){var Te=ge[Ue];if(Te.global||Te.multiline)throw new Error(""+Te);ft.push("(?:"+yt(Te)+")")}return new RegExp(ft.join("|"),He?"gi":"g")}function c(ge,de){var Ne=/(?:^|\s)nocode(?:\s|$)/,He=[],Ue=0,Ce=[],Te=0;function at(Qe){var $e=Qe.nodeType;if($e==1){if(Ne.test(Qe.className))return;for(var ot=Qe.firstChild;ot;ot=ot.nextSibling)at(ot);var yt=Qe.nodeName.toLowerCase();(yt==="br"||yt==="li")&&(He[Te]=`
|
|
`,Ce[Te<<1]=Ue++,Ce[Te++<<1|1]=Qe)}else if($e==3||$e==4){var ft=Qe.nodeValue;ft.length&&(de?ft=ft.replace(/\r\n?/g,`
|
|
`):ft=ft.replace(/[ \t\r\n]+/g," "),He[Te]=ft,Ce[Te<<1]=Ue,Ue+=ft.length,Ce[Te++<<1|1]=Qe)}}return at(ge),{sourceCode:He.join("").replace(/\n$/,""),spans:Ce}}function P(ge,de,Ne,He,Ue){if(!Ne)return;var Ce={sourceNode:ge,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:de,decorations:null};He(Ce),Ue.push.apply(Ue,Ce.decorations)}var ue=/\S/;function le(ge){for(var de=void 0,Ne=ge.firstChild;Ne;Ne=Ne.nextSibling){var He=Ne.nodeType;de=He===1?de?ge:Ne:He===3&&ue.test(Ne.nodeValue)?ge:de}return de===ge?void 0:de}function Le(ge,de){var Ne={},He;(function(){for(var Te=ge.concat(de),at=[],Qe={},$e=0,ot=Te.length;$e<ot;++$e){var yt=Te[$e],ft=yt[3];if(ft)for(var Ze=ft.length;--Ze>=0;)Ne[ft.charAt(Ze)]=yt;var fe=yt[1],ht=""+fe;Qe.hasOwnProperty(ht)||(at.push(fe),Qe[ht]=null)}at.push(/[\0-\uffff]/),He=_(at)})();var Ue=de.length,Ce=function(Te){for(var at=Te.sourceCode,Qe=Te.basePos,$e=Te.sourceNode,ot=[Qe,p],yt=0,ft=at.match(He)||[],Ze={},fe=0,ht=ft.length;fe<ht;++fe){var tt=ft[fe],ve=Ze[tt],Se=void 0,w;if(typeof ve=="string")w=!1;else{var S=Ne[tt.charAt(0)];if(S)Se=tt.match(S[1]),ve=S[0];else{for(var v=0;v<Ue;++v)if(S=de[v],Se=tt.match(S[1]),Se){ve=S[0];break}Se||(ve=p)}w=ve.length>=5&&ve.substring(0,5)==="lang-",w&&!(Se&&typeof Se[1]=="string")&&(w=!1,ve=y),w||(Ze[tt]=ve)}var d=yt;if(yt+=tt.length,!w)ot.push(Qe+d,ve);else{var h=Se[1],g=tt.indexOf(h),b=g+h.length;Se[2]&&(b=tt.length-Se[2].length,g=b-h.length);var z=ve.substring(5);P($e,Qe+d,tt.substring(0,g),Ce,ot),P($e,Qe+d+g,h,A(z,h),ot),P($e,Qe+d+b,tt.substring(b),Ce,ot)}}Te.decorations=ot};return Ce}function We(ge){var de=[],Ne=[];ge.tripleQuotedStrings?de.push([G,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ge.multiLineStrings?de.push([G,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):de.push([G,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ge.verbatimStrings&&Ne.push([G,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var He=ge.hashComments;He&&(ge.cStyleComments?(He>1?de.push([ee,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):de.push([ee,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ne.push([G,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):de.push([ee,/^#[^\r\n]*/,null,"#"])),ge.cStyleComments&&(Ne.push([ee,/^\/\/[^\r\n]*/,null]),Ne.push([ee,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ue=ge.regexLiterals;if(Ue){var Ce=Ue>1?"":`
|
|
\r`,Te=Ce?".":"[\\S\\s]",at="/(?=[^/*"+Ce+"])(?:[^/\\x5B\\x5C"+Ce+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+Ce+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+me+"("+at+")")])}var Qe=ge.types;Qe&&Ne.push([U,Qe]);var $e=(""+ge.keywords).replace(/^ | $/g,"");$e.length&&Ne.push([f,new RegExp("^(?:"+$e.replace(/[\s,]+/g,"|")+")\\b"),null]),de.push([p,/^\s+/,null,` \r
|
|
\xA0`]);var ot="^.[^\\s\\w.$@'\"`/\\\\]*";return ge.regexLiterals&&(ot+="(?!s*/)"),Ne.push([ae,/^@[a-z_$][a-z_$@0-9]*/i,null],[U,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[p,/^[a-z_$][a-z_$@0-9]*/i,null],[ae,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[p,/^\\[\s\S]?/,null],[E,new RegExp(ot),null]),Le(de,Ne)}var pe=We({keywords:De,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Fe(ge,de,Ne){for(var He=/(?:^|\s)nocode(?:\s|$)/,Ue=/\r\n?|\n/,Ce=ge.ownerDocument,Te=Ce.createElement("li");ge.firstChild;)Te.appendChild(ge.firstChild);var at=[Te];function Qe(fe){var ht=fe.nodeType;if(ht==1&&!He.test(fe.className))if(fe.nodeName==="br")$e(fe),fe.parentNode&&fe.parentNode.removeChild(fe);else for(var tt=fe.firstChild;tt;tt=tt.nextSibling)Qe(tt);else if((ht==3||ht==4)&&Ne){var ve=fe.nodeValue,Se=ve.match(Ue);if(Se){var w=ve.substring(0,Se.index);fe.nodeValue=w;var S=ve.substring(Se.index+Se[0].length);if(S){var v=fe.parentNode;v.insertBefore(Ce.createTextNode(S),fe.nextSibling)}$e(fe),w||fe.parentNode.removeChild(fe)}}}function $e(fe){for(;!fe.nextSibling;)if(fe=fe.parentNode,!fe)return;function ht(Se,w){var S=w?Se.cloneNode(!1):Se,v=Se.parentNode;if(v){var d=ht(v,1),h=Se.nextSibling;d.appendChild(S);for(var g=h;g;g=h)h=g.nextSibling,d.appendChild(g)}return S}for(var tt=ht(fe.nextSibling,0),ve;(ve=tt.parentNode)&&ve.nodeType===1;)tt=ve;at.push(tt)}for(var ot=0;ot<at.length;++ot)Qe(at[ot]);de===(de|0)&&at[0].setAttribute("value",de);var yt=Ce.createElement("ol");yt.className="linenums";for(var ft=Math.max(0,de-1|0)||0,ot=0,Ze=at.length;ot<Ze;++ot)Te=at[ot],Te.className="L"+(ot+ft)%10,Te.firstChild||Te.appendChild(Ce.createTextNode("\xA0")),yt.appendChild(Te);ge.appendChild(yt)}function Ee(ge){var de=/\bMSIE\s(\d+)/.exec(navigator.userAgent);de=de&&+de[1]<=8;var Ne=/\n/g,He=ge.sourceCode,Ue=He.length,Ce=0,Te=ge.spans,at=Te.length,Qe=0,$e=ge.decorations,ot=$e.length,yt=0;$e[ot]=Ue;var ft,Ze;for(Ze=ft=0;Ze<ot;)$e[Ze]!==$e[Ze+2]?($e[ft++]=$e[Ze++],$e[ft++]=$e[Ze++]):Ze+=2;for(ot=ft,Ze=ft=0;Ze<ot;){for(var fe=$e[Ze],ht=$e[Ze+1],tt=Ze+2;tt+2<=ot&&$e[tt+1]===ht;)tt+=2;$e[ft++]=fe,$e[ft++]=ht,Ze=tt}ot=$e.length=ft;var ve=ge.sourceNode,Se="";ve&&(Se=ve.style.display,ve.style.display="none");try{for(var w=null;Qe<at;){var S=Te[Qe],v=Te[Qe+2]||Ue,d=$e[yt+2]||Ue,tt=Math.min(v,d),h=Te[Qe+1],g;if(h.nodeType!==1&&(g=He.substring(Ce,tt))){de&&(g=g.replace(Ne,"\r")),h.nodeValue=g;var b=h.ownerDocument,z=b.createElement("span");z.className=$e[yt+1];var Q=h.parentNode;Q.replaceChild(z,h),z.appendChild(h),Ce<v&&(Te[Qe+1]=h=b.createTextNode(He.substring(tt,v)),Q.insertBefore(h,z.nextSibling))}Ce=tt,Ce>=v&&(Qe+=2),Ce>=d&&(yt+=2)}}finally{ve&&(ve.style.display=Se)}}var xe={};function K(ge,de){for(var Ne=de.length;--Ne>=0;){var He=de[Ne];xe.hasOwnProperty(He)?R.console&&console.warn("cannot override language handler %s",He):xe[He]=ge}}function A(ge,de){return ge&&xe.hasOwnProperty(ge)||(ge=/^\s*</.test(de)?"default-markup":"default-code"),xe[ge]}K(pe,["default-code"]),K(Le([],[[p,/^[^<?]+/],[T,/^<!\w[^>]*(?:>|$)/],[ee,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["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"]),K(Le([[p,/^[\s]+/,null,` \r
|
|
`],[re,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[O,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[D,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["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"]),K(Le([],[[re,/^[\s\S]+/]]),["uq.val"]),K(We({keywords:J,hashComments:!0,cStyleComments:!0,types:Y}),["c","cc","cpp","cxx","cyc","m"]),K(We({keywords:"null,true,false"}),["json"]),K(We({keywords:j,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Y}),["cs"]),K(We({keywords:he,cStyleComments:!0}),["java"]),K(We({keywords:te,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),K(We({keywords:Z,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),K(We({keywords:M,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),K(We({keywords:V,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),K(We({keywords:N,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),K(We({keywords:I,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),K(Le([],[[G,/^[\s\S]+/]]),["regex"]);function Ae(ge){var de=ge.langExtension;try{var Ne=c(ge.sourceNode,ge.pre),He=Ne.sourceCode;ge.sourceCode=He,ge.spans=Ne.spans,ge.basePos=0,A(de,He)(ge),Ee(ge)}catch(Ue){R.console&&console.log(Ue&&Ue.stack||Ue)}}function rt(ge,de,Ne){var He=Ne||!1,Ue=de||null,Ce=document.createElement("div");Ce.innerHTML="<pre>"+ge+"</pre>",Ce=Ce.firstChild,He&&Fe(Ce,He,!0);var Te={langExtension:Ue,numberLines:He,sourceNode:Ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ae(Te),Ce.innerHTML}function Re(ge,de){var Ne=de||document.body,He=Ne.ownerDocument||document;function Ue(S){return Ne.getElementsByTagName(S)}for(var Ce=[Ue("pre"),Ue("code"),Ue("xmp")],Te=[],at=0;at<Ce.length;++at)for(var Qe=0,$e=Ce[at].length;Qe<$e;++Qe)Te.push(Ce[at][Qe]);Ce=null;var ot=Date;ot.now||(ot={now:function(){return+new Date}});var yt=0,ft=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ze=/\bprettyprint\b/,fe=/\bprettyprinted\b/,ht=/pre|xmp/i,tt=/^code$/i,ve=/^(?:pre|code|xmp)$/i,Se={};function w(){for(var S=R.PR_SHOULD_USE_CONTINUATION?ot.now()+250:Infinity;yt<Te.length&&ot.now()<S;yt++){for(var v=Te[yt],d=Se,h=v;h=h.previousSibling;){var g=h.nodeType,b=(g===7||g===8)&&h.nodeValue;if(b?!/^\??prettify\b/.test(b):g!==3||/\S/.test(h.nodeValue))break;if(b){d={},b.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ot,dt,Pt){d[dt]=Pt});break}}var z=v.className;if((d!==Se||Ze.test(z))&&!fe.test(z)){for(var Q=!1,oe=v.parentNode;oe;oe=oe.parentNode){var Ye=oe.tagName;if(ve.test(Ye)&&oe.className&&Ze.test(oe.className)){Q=!0;break}}if(!Q){v.className+=" prettyprinted";var Ve=d.lang;if(!Ve){Ve=z.match(ft);var Ke;!Ve&&(Ke=le(v))&&tt.test(Ke.tagName)&&(Ve=Ke.className.match(ft)),Ve&&(Ve=Ve[1])}var pt;if(ht.test(v.tagName))pt=1;else{var Tt=v.currentStyle,it=He.defaultView,Dt=Tt?Tt.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(v,null).getPropertyValue("white-space"):0;pt=Dt&&Dt.substring(0,3)==="pre"}var Et=d.linenums;(Et=Et==="true"||+Et)||(Et=z.match(/\blinenums\b(?::(\d+))?/),Et=Et?Et[1]&&Et[1].length?+Et[1]:!0:!1),Et&&Fe(v,Et,pt);var It={langExtension:Ve,sourceNode:v,numberLines:Et,pre:pt,sourceCode:null,basePos:null,spans:null,decorations:null};Ae(It)}}}yt<Te.length?R.setTimeout(w,250):typeof ge=="function"&&ge()}w()}var ce=R.PR={createSimpleLexer:Le,registerLangHandler:K,sourceDecorator:We,PR_ATTRIB_NAME:D,PR_ATTRIB_VALUE:re,PR_COMMENT:ee,PR_DECLARATION:T,PR_KEYWORD:f,PR_LITERAL:ae,PR_NOCODE:B,PR_PLAIN:p,PR_PUNCTUATION:E,PR_SOURCE:y,PR_STRING:G,PR_TAG:O,PR_TYPE:U,prettyPrintOne:q?R.prettyPrintOne=rt:ie=rt,prettyPrint:L=q?R.prettyPrint=Re:L=Re},Pe=R.define;typeof Pe=="function"&&Pe.amd&&Pe("google-code-prettify",[],function(){return ce})})()},"VrN/":function(bt,et,m){(function(F,ke){bt.exports=ke()})(this,function(){"use strict";var F=navigator.userAgent,ke=navigator.platform,q=/gecko\/\d/i.test(F),_e=/MSIE \d/.test(F),be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(F),ie=/Edge\/(\d+)/.exec(F),L=_e||be||ie,R=L&&(_e?document.documentMode||6:+(ie||be)[1]),x=!ie&&/WebKit\//.test(F),ne=x&&/Qt\/\d+\.\d+/.test(F),H=!ie&&/Chrome\//.test(F),J=/Opera\//.test(F),he=/Apple Computer/.test(navigator.vendor),j=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(F),I=/PhantomJS/.test(F),N=!ie&&/AppleWebKit/.test(F)&&/Mobile\/\w+/.test(F),M=/Android/.test(F),Z=N||M||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(F),V=N||/Mac/.test(ke),te=/\bCrOS\b/.test(F),De=/win/i.test(ke),Y=J&&F.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(J=!1,x=!0);var G=V&&(ne||J&&(Y==null||Y<12.11)),f=q||L&&R>=9;function ee(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var U=function(e,t){var r=e.className,n=ee(t).exec(r);if(n){var a=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(a?n[1]+a:"")}};function ae(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return ae(e).appendChild(t)}function p(e,t,r,n){var a=document.createElement(e);if(r&&(a.className=r),n&&(a.style.cssText=n),typeof t=="string")a.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)a.appendChild(t[i]);return a}function O(e,t,r,n){var a=p(e,t,r,n);return a.setAttribute("role","presentation"),a}var T;document.createRange?T=function(e,t,r,n){var a=document.createRange();return a.setEnd(n||e,r),a.setStart(e,t),a}:T=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(a){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function y(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 D(){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 re(e,t){var r=e.className;ee(t).test(r)||(e.className+=(r?" ":"")+t)}function B(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!ee(r[n]).test(t)&&(t+=" "+r[n]);return t}var me=function(e){e.select()};N?me=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:L&&(me=function(e){try{e.select()}catch(t){}});function _(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function P(e,t,r,n,a){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var i=n||0,o=a||0;;){var s=e.indexOf(" ",i);if(s<0||s>=t)return o+(t-i);o+=s-i,o+=r-o%r,i=s+1}}var ue=function(){this.id=null,this.f=null,this.time=0,this.handler=_(this.onTimeout,this)};ue.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ue.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function le(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Le=50,We={toString:function(){return"CodeMirror.Pass"}},pe={scroll:!1},Fe={origin:"*mouse"},Ee={origin:"+move"};function xe(e,t,r){for(var n=0,a=0;;){var i=e.indexOf(" ",n);i==-1&&(i=e.length);var o=i-n;if(i==e.length||a+o>=t)return n+Math.min(o,t-a);if(a+=i-n,a+=r-a%r,n=i+1,a>=t)return n}}var K=[""];function A(e){for(;K.length<=e;)K.push(Ae(K)+" ");return K[e]}function Ae(e){return e[e.length-1]}function rt(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Re(e,t,r){for(var n=0,a=r(t);n<e.length&&r(e[n])<=a;)n++;e.splice(n,0,t)}function ce(){}function Pe(e,t){var r;return Object.create?r=Object.create(e):(ce.prototype=e,r=new ce),t&&c(t,r),r}var ge=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function de(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ge.test(e))}function Ne(e,t){return t?t.source.indexOf("\\w")>-1&&de(e)?!0:t.test(e):de(e)}function He(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ue=/[\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 Ce(e){return e.charCodeAt(0)>=768&&Ue.test(e)}function Te(e,t,r){for(;(r<0?t>0:t<e.length)&&Ce(e.charAt(t));)t+=r;return t}function at(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var a=(t+r)/2,i=n<0?Math.ceil(a):Math.floor(a);if(i==t)return e(i)?t:r;e(i)?r=i:t=i+n}}function Qe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var a=!1,i=0;i<e.length;++i){var o=e[i];(o.from<r&&o.to>t||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",i),a=!0)}a||n(t,r,"ltr")}var $e=null;function ot(e,t,r){var n;$e=null;for(var a=0;a<e.length;++a){var i=e[a];if(i.from<t&&i.to>t)return a;i.to==t&&(i.from!=i.to&&r=="before"?n=a:$e=a),i.from==t&&(i.from!=i.to&&r!="before"?n=a:$e=a)}return n!=null?n:$e}var yt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function l(u,C,k){this.level=u,this.from=C,this.to=k}return function(u,C){var k=C=="ltr"?"L":"R";if(u.length==0||C=="ltr"&&!n.test(u))return!1;for(var $=u.length,X=[],ye=0;ye<$;++ye)X.push(r(u.charCodeAt(ye)));for(var Me=0,Be=k;Me<$;++Me){var qe=X[Me];qe=="m"?X[Me]=Be:Be=qe}for(var lt=0,Je=k;lt<$;++lt){var gt=X[lt];gt=="1"&&Je=="r"?X[lt]="n":i.test(gt)&&(Je=gt,gt=="r"&&(X[lt]="R"))}for(var Rt=1,Ct=X[0];Rt<$-1;++Rt){var Wt=X[Rt];Wt=="+"&&Ct=="1"&&X[Rt+1]=="1"?X[Rt]="1":Wt==","&&Ct==X[Rt+1]&&(Ct=="1"||Ct=="n")&&(X[Rt]=Ct),Ct=Wt}for(var en=0;en<$;++en){var En=X[en];if(En==",")X[en]="N";else if(En=="%"){var on=void 0;for(on=en+1;on<$&&X[on]=="%";++on);for(var Kn=en&&X[en-1]=="!"||on<$&&X[on]=="1"?"1":"N",Fn=en;Fn<on;++Fn)X[Fn]=Kn;en=on-1}}for(var pn=0,Bn=k;pn<$;++pn){var Sn=X[pn];Bn=="L"&&Sn=="1"?X[pn]="L":i.test(Sn)&&(Bn=Sn)}for(var gn=0;gn<$;++gn)if(a.test(X[gn])){var mn=void 0;for(mn=gn+1;mn<$&&a.test(X[mn]);++mn);for(var ln=(gn?X[gn-1]:k)=="L",Wn=(mn<$?X[mn]:k)=="L",ea=ln==Wn?ln?"L":"R":k,xr=gn;xr<mn;++xr)X[xr]=ea;gn=mn-1}for(var An=[],rr,xn=0;xn<$;)if(o.test(X[xn])){var Ii=xn;for(++xn;xn<$&&o.test(X[xn]);++xn);An.push(new l(0,Ii,xn))}else{var dr=xn,Mr=An.length,Dr=C=="rtl"?1:0;for(++xn;xn<$&&X[xn]!="L";++xn);for(var Nn=dr;Nn<xn;)if(s.test(X[Nn])){dr<Nn&&(An.splice(Mr,0,new l(1,dr,Nn)),Mr+=Dr);var ta=Nn;for(++Nn;Nn<xn&&s.test(X[Nn]);++Nn);An.splice(Mr,0,new l(2,ta,Nn)),Mr+=Dr,dr=Nn}else++Nn;dr<xn&&An.splice(Mr,0,new l(1,dr,xn))}return C=="ltr"&&(An[0].level==1&&(rr=u.match(/^\s+/))&&(An[0].from=rr[0].length,An.unshift(new l(0,0,rr[0].length))),Ae(An).level==1&&(rr=u.match(/\s+$/))&&(Ae(An).to-=rr[0].length,An.push(new l(0,$-rr[0].length,$)))),C=="rtl"?An.reverse():An}}();function ft(e,t){var r=e.order;return r==null&&(r=e.order=yt(e.text,t)),r}var Ze=[],fe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ze).concat(r)}};function ht(e,t){return e._handlers&&e._handlers[t]||Ze}function tt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,a=n&&n[t];if(a){var i=le(a,r);i>-1&&(n[t]=a.slice(0,i).concat(a.slice(i+1)))}}}function ve(e,t){var r=ht(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),a=0;a<r.length;++a)r[a].apply(null,n)}function Se(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,r||t.type,e,t),g(t)||t.codemirrorIgnore}function w(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)le(r,t[n])==-1&&r.push(t[n])}function S(e,t){return ht(e,t).length>0}function v(e){e.prototype.on=function(t,r){fe(this,t,r)},e.prototype.off=function(t,r){tt(this,t,r)}}function d(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function h(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function g(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function b(e){d(e),h(e)}function z(e){return e.target||e.srcElement}function Q(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),V&&e.ctrlKey&&t==1&&(t=3),t}var oe=function(){if(L&&R<9)return!1;var e=p("div");return"draggable"in e||"dragDrop"in e}(),Ye;function Ve(e){if(Ye==null){var t=p("span","\u200B");E(e,p("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ye=t.offsetWidth<=1&&t.offsetHeight>2&&!(L&&R<8))}var r=Ye?p("span","\u200B"):p("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Ke;function pt(e){if(Ke!=null)return Ke;var t=E(e,document.createTextNode("A\u062EA")),r=T(t,0,1).getBoundingClientRect(),n=T(t,1,2).getBoundingClientRect();return ae(e),!r||r.left==r.right?!1:Ke=n.right-r.right<3}var Tt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var a=e.indexOf(`
|
|
`,t);a==-1&&(a=e.length);var i=e.slice(t,e.charAt(a-1)=="\r"?a-1:a),o=i.indexOf("\r");o!=-1?(r.push(i.slice(0,o)),t+=o+1):(r.push(i),t=a+1)}return r}:function(e){return e.split(/\r\n?|\n/)},it=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Dt=function(){var e=p("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Et=null;function It(e){if(Et!=null)return Et;var t=E(e,p("span","x")),r=t.getBoundingClientRect(),n=T(t,0,1).getBoundingClientRect();return Et=Math.abs(r.left-n.left)>1}var Ot={},dt={};function Pt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ot[e]=t}function At(e,t){dt[e]=t}function vt(e){if(typeof e=="string"&&dt.hasOwnProperty(e))e=dt[e];else if(e&&typeof e.name=="string"&&dt.hasOwnProperty(e.name)){var t=dt[e.name];typeof t=="string"&&(t={name:t}),e=Pe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return vt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return vt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function st(e,t){t=vt(t);var r=Ot[t.name];if(!r)return st(e,"text/plain");var n=r(e,t);if(ut.hasOwnProperty(t.name)){var a=ut[t.name];for(var i in a){if(!a.hasOwnProperty(i))continue;n.hasOwnProperty(i)&&(n["_"+i]=n[i]),n[i]=a[i]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)n[o]=t.modeProps[o];return n}var ut={};function xt(e,t){var r=ut.hasOwnProperty(e)?ut[e]:ut[e]={};c(t,r)}function zt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var a=t[n];a instanceof Array&&(a=a.concat([])),r[n]=a}return r}function Ut(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Vt(e,t,r){return e.startState?e.startState(t,r):!0}var Bt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Bt.prototype.eol=function(){return this.pos>=this.string.length},Bt.prototype.sol=function(){return this.pos==this.lineStart},Bt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Bt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Bt.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},Bt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Bt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Bt.prototype.skipToEnd=function(){this.pos=this.string.length},Bt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Bt.prototype.backUp=function(e){this.pos-=e},Bt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=P(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?P(this.string,this.lineStart,this.tabSize):0)},Bt.prototype.indentation=function(){return P(this.string,null,this.tabSize)-(this.lineStart?P(this.string,this.lineStart,this.tabSize):0)},Bt.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(o){return r?o.toLowerCase():o},a=this.string.substr(this.pos,e.length);if(n(a)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}},Bt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Bt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Bt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Bt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function nt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var a=r.children[n],i=a.chunkSize();if(t<i){r=a;break}t-=i}return r.lines[t]}function Ft(e,t,r){var n=[],a=t.line;return e.iter(t.line,r.line+1,function(i){var o=i.text;a==r.line&&(o=o.slice(0,r.ch)),a==t.line&&(o=o.slice(t.ch)),n.push(o),++a}),n}function _t(e,t,r){var n=[];return e.iter(t,r,function(a){n.push(a.text)}),n}function Kt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function St(e){if(e.parent==null)return null;for(var t=e.parent,r=le(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var a=0;!(n.children[a]==t);++a)r+=n.children[a].chunkSize();return r+t.first}function nn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var a=e.children[n],i=a.height;if(t<i){e=a;continue e}t-=i,r+=a.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o],l=s.height;if(t<l)break;t-=l}return r+o}function Un(e,t){return t>=e.first&&t<e.first+e.size}function Rn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Oe(e,t,r){if(r===void 0&&(r=null),!(this instanceof Oe))return new Oe(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Ge(e,t){return e.line-t.line||e.ch-t.ch}function Xt(e,t){return e.sticky==t.sticky&&Ge(e,t)==0}function $t(e){return Oe(e.line,e.ch)}function je(e,t){return Ge(e,t)<0?t:e}function rn(e,t){return Ge(e,t)<0?e:t}function qn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function kt(e,t){if(t.line<e.first)return Oe(e.first,0);var r=e.first+e.size-1;return t.line>r?Oe(r,nt(e,r).text.length):dn(t,nt(e,t.line).text.length)}function dn(e,t){var r=e.ch;return r==null||r>t?Oe(e.line,t):r<0?Oe(e.line,0):e}function Xn(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=kt(e,t[n]);return r}var Jn=function(e,t){this.state=e,this.lookAhead=t},wn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};wn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wn.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}},wn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wn.fromSaved=function(e,t,r){return t instanceof Jn?new wn(e,zt(e.mode,t.state),r,t.lookAhead):new wn(e,zt(e.mode,t),r)},wn.prototype.save=function(e){var t=e!==!1?zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Jn(t,this.maxLookAhead):t};function zn(e,t,r,n){var a=[e.state.modeGen],i={};ze(e,t.text,e.doc.mode,r,function(u,C){return a.push(u,C)},i,n);for(var o=r.state,s=function(u){r.baseTokens=a;var C=e.state.overlays[u],k=1,$=0;r.state=!0,ze(e,t.text,C.mode,r,function(X,ye){for(var Me=k;$<X;){var Be=a[k];Be>X&&a.splice(k,1,X,a[k+1],Be),k+=2,$=Math.min(X,Be)}if(!ye)return;if(C.opaque)a.splice(Me,k-Me,X,"overlay "+ye),k=Me+2;else for(;Me<k;Me+=2){var qe=a[Me+1];a[Me+1]=(qe?qe+" ":"")+"overlay "+ye}},i),r.state=o,r.baseTokens=null,r.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:a,classes:i.bgClass||i.textClass?i:null}}function wt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=se(e,St(t)),a=t.text.length>e.options.maxHighlightLength&&zt(e.doc.mode,n.state),i=zn(e,t,n);a&&(n.state=a),t.stateAfter=n.save(!a),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function se(e,t,r){var n=e.doc,a=e.display;if(!n.mode.startState)return new wn(n,!0,t);var i=Lt(e,t,r),o=i>n.first&&nt(n,i-1).stateAfter,s=o?wn.fromSaved(n,o,i):new wn(n,Vt(n.mode),i);return n.iter(i,t,function(l){ct(e,l.text,s);var u=s.line;l.stateAfter=u==t-1||u%5==0||u>=a.viewFrom&&u<a.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function ct(e,t,r,n){var a=e.doc.mode,i=new Bt(t,e.options.tabSize,r);for(i.start=i.pos=n||0,t==""&&we(a,r.state);!i.eol();)W(a,i,r.state),i.start=i.pos}function we(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Ut(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function W(e,t,r,n){for(var a=0;a<10;a++){n&&(n[0]=Ut(e,r).mode);var i=e.token(t,r);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ie=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function mt(e,t,r,n){var a=e.doc,i=a.mode,o;t=kt(a,t);var s=nt(a,t.line),l=se(e,t.line,r),u=new Bt(s.text,e.options.tabSize,l),C;for(n&&(C=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=W(i,u,l.state),n&&C.push(new Ie(u,o,zt(a.mode,l.state)));return n?C:new Ie(u,o,l.state)}function Xe(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function ze(e,t,r,n,a,i,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var l=0,u=null,C=new Bt(t,e.options.tabSize,n),k,$=e.options.addModeClass&&[null];for(t==""&&Xe(we(r,n.state),i);!C.eol();){if(C.pos>e.options.maxHighlightLength?(s=!1,o&&ct(e,t,n,C.pos),C.pos=t.length,k=null):k=Xe(W(r,C,n.state,$),i),$){var X=$[0].name;X&&(k="m-"+(k?X+" "+k:X))}if(!s||u!=k){for(;l<C.start;)l=Math.min(C.start,l+5e3),a(l,u);u=k}C.start=C.pos}for(;l<C.pos;){var ye=Math.min(C.pos,l+5e3);a(ye,u),l=ye}}function Lt(e,t,r){for(var n,a,i=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=i.first)return i.first;var l=nt(i,s-1),u=l.stateAfter;if(u&&(!r||s+(u instanceof Jn?u.lookAhead:0)<=i.modeFrontier))return s;var C=P(l.text,null,e.options.tabSize);(a==null||n>C)&&(a=s-1,n=C)}return a}function Ht(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var a=nt(e,n).stateAfter;if(a&&(!(a instanceof Jn)||n+a.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var qt=!1,Yt=!1;function un(){qt=!0}function Pn(){Yt=!0}function fn(e,t,r){this.marker=e,this.from=t,this.to=r}function kn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function fr(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ln(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Mn(e,t,r){var n;if(e)for(var a=0;a<e.length;++a){var i=e[a],o=i.marker,s=i.from==null||(o.inclusiveLeft?i.from<=t:i.from<t);if(s||i.from==t&&o.type=="bookmark"&&(!r||!i.marker.insertLeft)){var l=i.to==null||(o.inclusiveRight?i.to>=t:i.to>t);(n||(n=[])).push(new fn(o,i.from,l?null:i.to))}}return n}function ar(e,t,r){var n;if(e)for(var a=0;a<e.length;++a){var i=e[a],o=i.marker,s=i.to==null||(o.inclusiveRight?i.to>=t:i.to>t);if(s||i.from==t&&o.type=="bookmark"&&(!r||i.marker.insertLeft)){var l=i.from==null||(o.inclusiveLeft?i.from<=t:i.from<t);(n||(n=[])).push(new fn(o,l?null:i.from-t,i.to==null?null:i.to-t))}}return n}function Gn(e,t){if(t.full)return null;var r=Un(e,t.from.line)&&nt(e,t.from.line).markedSpans,n=Un(e,t.to.line)&&nt(e,t.to.line).markedSpans;if(!r&&!n)return null;var a=t.from.ch,i=t.to.ch,o=Ge(t.from,t.to)==0,s=Mn(r,a,o),l=ar(n,i,o),u=t.text.length==1,C=Ae(t.text).length+(u?a:0);if(s)for(var k=0;k<s.length;++k){var $=s[k];if($.to==null){var X=kn(l,$.marker);X?u&&($.to=X.to==null?null:X.to+C):$.to=a}}if(l)for(var ye=0;ye<l.length;++ye){var Me=l[ye];if(Me.to!=null&&(Me.to+=C),Me.from==null){var Be=kn(s,Me.marker);Be||(Me.from=C,u&&(s||(s=[])).push(Me))}else Me.from+=C,u&&(s||(s=[])).push(Me)}s&&(s=Nr(s)),l&&l!=s&&(l=Nr(l));var qe=[s];if(!u){var lt=t.text.length-2,Je;if(lt>0&&s)for(var gt=0;gt<s.length;++gt)s[gt].to==null&&(Je||(Je=[])).push(new fn(s[gt].marker,null,null));for(var Rt=0;Rt<lt;++Rt)qe.push(Je);qe.push(l)}return qe}function Nr(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ur(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(X){if(X.markedSpans)for(var ye=0;ye<X.markedSpans.length;++ye){var Me=X.markedSpans[ye].marker;Me.readOnly&&(!n||le(n,Me)==-1)&&(n||(n=[])).push(Me)}}),!n)return null;for(var a=[{from:t,to:r}],i=0;i<n.length;++i)for(var o=n[i],s=o.find(0),l=0;l<a.length;++l){var u=a[l];if(Ge(u.to,s.from)<0||Ge(u.from,s.to)>0)continue;var C=[l,1],k=Ge(u.from,s.from),$=Ge(u.to,s.to);(k<0||!o.inclusiveLeft&&!k)&&C.push({from:u.from,to:s.from}),($>0||!o.inclusiveRight&&!$)&&C.push({from:s.to,to:u.to}),a.splice.apply(a,C),l+=C.length-3}return a}function wr(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function na(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function Cr(e){return e.inclusiveLeft?-1:0}function ir(e){return e.inclusiveRight?1:0}function ra(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),a=t.find(),i=Ge(n.from,a.from)||Cr(e)-Cr(t);if(i)return-i;var o=Ge(n.to,a.to)||ir(e)-ir(t);return o||t.id-e.id}function hr(e,t){var r=Yt&&e.markedSpans,n;if(r)for(var a=void 0,i=0;i<r.length;++i)a=r[i],a.marker.collapsed&&(t?a.from:a.to)==null&&(!n||ra(n,a.marker)<0)&&(n=a.marker);return n}function Ra(e){return hr(e,!0)}function jr(e){return hr(e,!1)}function ei(e,t){var r=Yt&&e.markedSpans,n;if(r)for(var a=0;a<r.length;++a){var i=r[a];i.marker.collapsed&&(i.from==null||i.from<t)&&(i.to==null||i.to>t)&&(!n||ra(n,i.marker)<0)&&(n=i.marker)}return n}function ti(e,t,r,n,a){var i=nt(e,t),o=Yt&&i.markedSpans;if(o)for(var s=0;s<o.length;++s){var l=o[s];if(!l.marker.collapsed)continue;var u=l.marker.find(0),C=Ge(u.from,r)||Cr(l.marker)-Cr(a),k=Ge(u.to,n)||ir(l.marker)-ir(a);if(C>=0&&k<=0||C<=0&&k>=0)continue;if(C<=0&&(l.marker.inclusiveRight&&a.inclusiveLeft?Ge(u.to,r)>=0:Ge(u.to,r)>0)||C>=0&&(l.marker.inclusiveRight&&a.inclusiveLeft?Ge(u.from,n)<=0:Ge(u.from,n)<0))return!0}}function Yn(e){for(var t;t=Ra(e);)e=t.find(-1,!0).line;return e}function Bi(e){for(var t;t=jr(e);)e=t.find(1,!0).line;return e}function Mt(e){for(var t,r;t=jr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Nt(e,t){var r=nt(e,t),n=Yn(r);return r==n?t:St(n)}function jt(e,t){if(t>e.lastLine())return t;var r=nt(e,t),n;if(!Gt(e,r))return t;for(;n=jr(r);)r=n.find(1,!0).line;return St(r)+1}function Gt(e,t){var r=Yt&&t.markedSpans;if(r)for(var n=void 0,a=0;a<r.length;++a){if(n=r[a],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&Qt(e,t,n))return!0}}function Qt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Qt(e,n.line,kn(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var a=void 0,i=0;i<t.markedSpans.length;++i)if(a=t.markedSpans[i],a.marker.collapsed&&!a.marker.widgetNode&&a.from==r.to&&(a.to==null||a.to!=r.from)&&(a.marker.inclusiveLeft||r.marker.inclusiveRight)&&Qt(e,t,a))return!0}function tn(e){e=Yn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var a=r.lines[n];if(a==e)break;t+=a.height}for(var i=r.parent;i;r=i,i=r.parent)for(var o=0;o<i.children.length;++o){var s=i.children[o];if(s==r)break;t+=s.height}return t}function sn(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ra(n);){var a=r.find(0,!0);n=a.from.line,t+=a.from.ch-a.to.ch}for(n=e;r=jr(n);){var i=r.find(0,!0);t-=n.text.length-i.from.ch,n=i.to.line,t+=n.text.length-i.to.ch}return t}function vn(e){var t=e.display,r=e.doc;t.maxLine=nt(r,r.first),t.maxLineLength=sn(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var a=sn(n);a>t.maxLineLength&&(t.maxLineLength=a,t.maxLine=n)})}var bn=function(e,t,r){this.text=e,na(this,t),this.height=r?r(this):1};bn.prototype.lineNo=function(){return St(this)},v(bn);function or(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),wr(e),na(e,r);var a=n?n(e):1;a!=e.height&&Kt(e,a)}function hn(e){e.parent=null,wr(e)}var pr={},Tn={};function sr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Tn:pr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function lr(e,t){var r=O("span",null,null,x?"padding-right: .1px":null),n={pre:O("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var a=0;a<=(t.rest?t.rest.length:0);a++){var i=a?t.rest[a-1]:t.line,o=void 0;n.pos=0,n.addToken=Ss,pt(e.display.measure)&&(o=ft(i,e.doc.direction))&&(n.addToken=Ts(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&St(i);Os(i,n,wt(e,i,s)),i.styleClasses&&(i.styleClasses.bgClass&&(n.bgClass=B(i.styleClasses.bgClass,n.bgClass||"")),i.styleClasses.textClass&&(n.textClass=B(i.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Ve(e.display.measure))),a==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(x){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=B(n.pre.className,n.textClass||"")),n}function aa(e){var t=p("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ss(e,t,r,n,a,i,o){if(!t)return;var s=e.splitSpaces?ks(t,e.trailingSpace):t,l=e.cm.state.specialChars,u=!1,C;if(!l.test(t))e.col+=t.length,C=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,C),L&&R<9&&(u=!0),e.pos+=t.length;else{C=document.createDocumentFragment();for(var k=0;;){l.lastIndex=k;var $=l.exec(t),X=$?$.index-k:t.length-k;if(X){var ye=document.createTextNode(s.slice(k,k+X));L&&R<9?C.appendChild(p("span",[ye])):C.appendChild(ye),e.map.push(e.pos,e.pos+X,ye),e.col+=X,e.pos+=X}if(!$)break;k+=X+1;var Me=void 0;if($[0]==" "){var Be=e.cm.options.tabSize,qe=Be-e.col%Be;Me=C.appendChild(p("span",A(qe),"cm-tab")),Me.setAttribute("role","presentation"),Me.setAttribute("cm-text"," "),e.col+=qe}else $[0]=="\r"||$[0]==`
|
|
`?(Me=C.appendChild(p("span",$[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Me.setAttribute("cm-text",$[0]),e.col+=1):(Me=e.cm.options.specialCharPlaceholder($[0]),Me.setAttribute("cm-text",$[0]),L&&R<9?C.appendChild(p("span",[Me])):C.appendChild(Me),e.col+=1);e.map.push(e.pos,e.pos+1,Me),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||a||u||i||o){var lt=r||"";n&&(lt+=n),a&&(lt+=a);var Je=p("span",[C],lt,i);if(o)for(var gt in o)o.hasOwnProperty(gt)&>!="style"&>!="class"&&Je.setAttribute(gt,o[gt]);return e.content.appendChild(Je)}e.content.appendChild(C)}function ks(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",a=0;a<e.length;a++){var i=e.charAt(a);i==" "&&r&&(a==e.length-1||e.charCodeAt(a+1)==32)&&(i="\xA0"),n+=i,r=i==" "}return n}function Ts(e,t){return function(r,n,a,i,o,s,l){a=a?a+" cm-force-border":"cm-force-border";for(var u=r.pos,C=u+n.length;;){for(var k=void 0,$=0;$<t.length&&!(k=t[$],k.to>u&&k.from<=u);$++);if(k.to>=C)return e(r,n,a,i,o,s,l);e(r,n.slice(0,k.to-u),a,i,null,s,l),i=null,n=n.slice(k.to-u),u=k.to}}}function Wi(e,t,r,n){var a=!n&&r.widgetNode;a&&e.map.push(e.pos,e.pos+t,a),!n&&e.cm.display.input.needsContentAttribute&&(a||(a=e.content.appendChild(document.createElement("span"))),a.setAttribute("cm-marker",r.id)),a&&(e.cm.display.input.setUneditable(a),e.content.appendChild(a)),e.pos+=t,e.trailingSpace=!1}function Os(e,t,r){var n=e.markedSpans,a=e.text,i=0;if(!n){for(var o=1;o<r.length;o+=2)t.addToken(t,a.slice(i,i=r[o]),sr(r[o+1],t.cm.options));return}for(var s=a.length,l=0,u=1,C="",k,$,X=0,ye,Me,Be,qe,lt;;){if(X==l){ye=Me=Be=$="",lt=null,qe=null,X=Infinity;for(var Je=[],gt=void 0,Rt=0;Rt<n.length;++Rt){var Ct=n[Rt],Wt=Ct.marker;if(Wt.type=="bookmark"&&Ct.from==l&&Wt.widgetNode)Je.push(Wt);else if(Ct.from<=l&&(Ct.to==null||Ct.to>l||Wt.collapsed&&Ct.to==l&&Ct.from==l)){if(Ct.to!=null&&Ct.to!=l&&X>Ct.to&&(X=Ct.to,Me=""),Wt.className&&(ye+=" "+Wt.className),Wt.css&&($=($?$+";":"")+Wt.css),Wt.startStyle&&Ct.from==l&&(Be+=" "+Wt.startStyle),Wt.endStyle&&Ct.to==X&&(gt||(gt=[])).push(Wt.endStyle,Ct.to),Wt.title&&((lt||(lt={})).title=Wt.title),Wt.attributes)for(var en in Wt.attributes)(lt||(lt={}))[en]=Wt.attributes[en];Wt.collapsed&&(!qe||ra(qe.marker,Wt)<0)&&(qe=Ct)}else Ct.from>l&&X>Ct.from&&(X=Ct.from)}if(gt)for(var En=0;En<gt.length;En+=2)gt[En+1]==X&&(Me+=" "+gt[En]);if(!qe||qe.from==l)for(var on=0;on<Je.length;++on)Wi(t,0,Je[on]);if(qe&&(qe.from||0)==l){if(Wi(t,(qe.to==null?s+1:qe.to)-l,qe.marker,qe.from==null),qe.to==null)return;qe.to==l&&(qe=!1)}}if(l>=s)break;for(var Kn=Math.min(s,X);;){if(C){var Fn=l+C.length;if(!qe){var pn=Fn>Kn?C.slice(0,Kn-l):C;t.addToken(t,pn,k?k+ye:ye,Be,l+pn.length==X?Me:"",$,lt)}if(Fn>=Kn){C=C.slice(Kn-l),l=Kn;break}l=Fn,Be=""}C=a.slice(i,i=r[u++]),k=sr(r[u++],t.cm.options)}}}function zi(e,t,r){this.line=t,this.rest=Mt(t),this.size=this.rest?St(Ae(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Gt(e,t)}function Pa(e,t,r){for(var n=[],a,i=t;i<r;i=a){var o=new zi(e.doc,nt(e.doc,i),i);a=i+o.size,n.push(o)}return n}var Ir=null;function As(e){Ir?Ir.ops.push(e):e.ownsGroup=Ir={ops:[e],delayedCallbacks:[]}}function Rs(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var a=e.ops[n];if(a.cursorActivityHandlers)for(;a.cursorActivityCalled<a.cursorActivityHandlers.length;)a.cursorActivityHandlers[a.cursorActivityCalled++].call(null,a.cm)}}while(r<t.length)}function Ps(e,t){var r=e.ownsGroup;if(!r)return;try{Rs(r)}finally{Ir=null,t(r)}}var ia=null;function Cn(e,t){var r=ht(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),a;Ir?a=Ir.delayedCallbacks:ia?a=ia:(a=ia=[],setTimeout(Ls,0));for(var i=function(s){a.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)i(o)}function Ls(){var e=ia;ia=null;for(var t=0;t<e.length;++t)e[t]()}function Hi(e,t,r,n){for(var a=0;a<t.changes.length;a++){var i=t.changes[a];i=="text"?Ds(e,t):i=="gutter"?Xi(e,t,r,n):i=="class"?ni(e,t):i=="widget"&&Ns(e,t,n)}t.changes=null}function oa(e){return e.node==e.text&&(e.node=p("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),L&&R<8&&(e.node.style.zIndex=2)),e.node}function Ms(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=oa(t);t.background=n.insertBefore(p("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ki(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):lr(e,t)}function Ds(e,t){var r=t.text.className,n=Ki(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,ni(e,t)):r&&(t.text.className=r)}function ni(e,t){Ms(e,t),t.line.wrapClass?oa(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Xi(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var a=oa(t);t.gutterBackground=p("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),a.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=oa(t),s=t.gutter=p("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!i||!i["CodeMirror-linenumbers"])&&(t.lineNumber=s.appendChild(p("div",Rn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var l=0;l<e.display.gutterSpecs.length;++l){var u=e.display.gutterSpecs[l].className,C=i.hasOwnProperty(u)&&i[u];C&&s.appendChild(p("div",[C],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Ns(e,t,r){t.alignable&&(t.alignable=null);for(var n=ee("CodeMirror-linewidget"),a=t.node.firstChild,i=void 0;a;a=i)i=a.nextSibling,n.test(a.className)&&t.node.removeChild(a);Gi(e,t,r)}function Us(e,t,r,n){var a=Ki(e,t);return t.text=t.node=a.pre,a.bgClass&&(t.bgClass=a.bgClass),a.textClass&&(t.textClass=a.textClass),ni(e,t),Xi(e,t,r,n),Gi(e,t,n),t.node}function Gi(e,t,r){if(Vi(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Vi(e,t.rest[n],t,r,!1)}function Vi(e,t,r,n,a){if(!t.widgets)return;for(var i=oa(r),o=0,s=t.widgets;o<s.length;++o){var l=s[o],u=p("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),js(l,u,r,n),e.display.input.setUneditable(u),a&&l.above?i.insertBefore(u,r.gutter||r.text):i.appendChild(u),Cn(l,"redraw")}}function js(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var a=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(a-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=a+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function sa(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!y(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),E(t.display.measure,p("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function ur(e,t){for(var r=z(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function La(e){return e.lineSpace.offsetTop}function ri(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function $i(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=E(e.measure,p("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function tr(e){return Le-e.display.nativeBarWidth}function Sr(e){return e.display.scroller.clientWidth-tr(e)-e.display.barWidth}function ai(e){return e.display.scroller.clientHeight-tr(e)-e.display.barHeight}function Is(e,t,r){var n=e.options.lineWrapping,a=n&&Sr(e);if(!t.measure.heights||n&&t.measure.width!=a){var i=t.measure.heights=[];if(n){t.measure.width=a;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var l=o[s],u=o[s+1];Math.abs(l.bottom-u.bottom)>2&&i.push((l.bottom+u.top)/2-r.top)}}i.push(r.bottom-r.top)}}function qi(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var a=0;a<e.rest.length;a++)if(St(e.rest[a])>r)return{map:e.measure.maps[a],cache:e.measure.caches[a],before:!0}}function Fs(e,t){t=Yn(t);var r=St(t),n=e.display.externalMeasured=new zi(e.doc,t,r);n.lineN=r;var a=n.built=lr(e,n);return n.text=a.pre,E(e.display.lineMeasure,a.pre),n}function Ji(e,t,r,n){return nr(e,Fr(e,t),r,n)}function ii(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Or(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Fr(e,t){var r=St(t),n=ii(e,r);n&&!n.text?n=null:n&&n.changes&&(Hi(e,n,r,di(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var a=qi(n,t,r);return{line:t,view:n,rect:null,map:a.map,cache:a.cache,before:a.before,hasHeights:!1}}function nr(e,t,r,n,a){t.before&&(r=-1);var i=r+(n||""),o;return t.cache.hasOwnProperty(i)?o=t.cache[i]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Is(e,t.view,t.rect),t.hasHeights=!0),o=Ws(e,t,r,n),o.bogus||(t.cache[i]=o)),{left:o.left,right:o.right,top:a?o.rtop:o.top,bottom:a?o.rbottom:o.bottom}}var Yi={left:0,right:0,top:0,bottom:0};function Qi(e,t,r){for(var n,a,i,o,s,l,u=0;u<e.length;u+=3)if(s=e[u],l=e[u+1],t<s?(a=0,i=1,o="left"):t<l?(a=t-s,i=a+1):(u==e.length-3||t==l&&e[u+3]>t)&&(i=l-s,a=i-1,t>=l&&(o="right")),a!=null){if(n=e[u+2],s==l&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&a==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],o="left";if(r=="right"&&a==l-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],o="right";break}return{node:n,start:a,end:i,collapse:o,coverStart:s,coverEnd:l}}function Bs(e,t){var r=Yi;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var a=e.length-1;a>=0&&!((r=e[a]).left!=r.right);a--);return r}function Ws(e,t,r,n){var a=Qi(t.map,r,n),i=a.node,o=a.start,s=a.end,l=a.collapse,u;if(i.nodeType==3){for(var C=0;C<4;C++){for(;o&&Ce(t.line.text.charAt(a.coverStart+o));)--o;for(;a.coverStart+s<a.coverEnd&&Ce(t.line.text.charAt(a.coverStart+s));)++s;if(L&&R<9&&o==0&&s==a.coverEnd-a.coverStart?u=i.parentNode.getBoundingClientRect():u=Bs(T(i,o,s).getClientRects(),n),u.left||u.right||o==0)break;s=o,o=o-1,l="right"}L&&R<11&&(u=zs(e.display.measure,u))}else{o>0&&(l=n="right");var k;e.options.lineWrapping&&(k=i.getClientRects()).length>1?u=k[n=="right"?k.length-1:0]:u=i.getBoundingClientRect()}if(L&&R<9&&!o&&(!u||!u.left&&!u.right)){var $=i.parentNode.getClientRects()[0];$?u={left:$.left,right:$.left+Wr(e.display),top:$.top,bottom:$.bottom}:u=Yi}for(var X=u.top-t.rect.top,ye=u.bottom-t.rect.top,Me=(X+ye)/2,Be=t.view.measure.heights,qe=0;qe<Be.length-1&&!(Me<Be[qe]);qe++);var lt=qe?Be[qe-1]:0,Je=Be[qe],gt={left:(l=="right"?u.right:u.left)-t.rect.left,right:(l=="left"?u.left:u.right)-t.rect.left,top:lt,bottom:Je};return!u.left&&!u.right&&(gt.bogus=!0),e.options.singleCursorHeightPerLine||(gt.rtop=X,gt.rbottom=ye),gt}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!It(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Zi(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function eo(e){e.display.externalMeasure=null,ae(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Zi(e.display.view[t])}function la(e){eo(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function to(){return H&&M?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function no(){return H&&M?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function oi(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=sa(e.widgets[r]));return t}function Ma(e,t,r,n,a){if(!a){var i=oi(t);r.top+=i,r.bottom+=i}if(n=="line")return r;n||(n="local");var o=tn(t);if(n=="local"?o+=La(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:no());var l=s.left+(n=="window"?0:to());r.left+=l,r.right+=l}return r.top+=o,r.bottom+=o,r}function ro(e,t,r){if(r=="div")return t;var n=t.left,a=t.top;if(r=="page")n-=to(),a-=no();else if(r=="local"||!r){var i=e.display.sizer.getBoundingClientRect();n+=i.left,a+=i.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:a-o.top}}function si(e,t,r,n,a){return n||(n=nt(e.doc,t.line)),Ma(e,n,Ji(e,n,t.ch,a),r)}function Qn(e,t,r,n,a,i){n=n||nt(e.doc,t.line),a||(a=Fr(e,n));function o(ye,Me){var Be=nr(e,a,ye,Me?"right":"left",i);return Me?Be.left=Be.right:Be.right=Be.left,Ma(e,n,Be,r)}var s=ft(n,e.doc.direction),l=t.ch,u=t.sticky;if(l>=n.text.length?(l=n.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return o(u=="before"?l-1:l,u=="before");function C(ye,Me,Be){var qe=s[Me],lt=qe.level==1;return o(Be?ye-1:ye,lt!=Be)}var k=ot(s,l,u),$=$e,X=C(l,k,u=="before");return $!=null&&(X.other=C(l,$,u!="before")),X}function ao(e,t){var r=0;t=kt(e.doc,t),e.options.lineWrapping||(r=Wr(e.display)*t.ch);var n=nt(e.doc,t.line),a=tn(n)+La(e.display);return{left:r,right:r,top:a,bottom:a+n.height}}function li(e,t,r,n,a){var i=Oe(e,t,r);return i.xRel=a,n&&(i.outside=n),i}function ui(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return li(n.first,0,null,-1,-1);var a=nn(n,r),i=n.first+n.size-1;if(a>i)return li(n.first+n.size-1,nt(n,i).text.length,null,1,1);t<0&&(t=0);for(var o=nt(n,a);;){var s=Hs(e,o,a,t,r),l=ei(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==a)return u;o=nt(n,a=u.line)}}function io(e,t,r,n){n-=oi(t);var a=t.text.length,i=at(function(o){return nr(e,r,o-1).bottom<=n},a,0);return a=at(function(o){return nr(e,r,o).top>n},i,a),{begin:i,end:a}}function oo(e,t,r,n){r||(r=Fr(e,t));var a=Ma(e,t,nr(e,r,n),"line").top;return io(e,t,r,a)}function ci(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Hs(e,t,r,n,a){a-=tn(t);var i=Fr(e,t),o=oi(t),s=0,l=t.text.length,u=!0,C=ft(t,e.doc.direction);if(C){var k=(e.options.lineWrapping?Xs:Ks)(e,t,r,i,C,n,a);u=k.level!=1,s=u?k.from:k.to-1,l=u?k.to:k.from-1}var $=null,X=null,ye=at(function(Rt){var Ct=nr(e,i,Rt);return Ct.top+=o,Ct.bottom+=o,ci(Ct,n,a,!1)?(Ct.top<=a&&Ct.left<=n&&($=Rt,X=Ct),!0):!1},s,l),Me,Be,qe=!1;if(X){var lt=n-X.left<X.right-n,Je=lt==u;ye=$+(Je?0:1),Be=Je?"after":"before",Me=lt?X.left:X.right}else{!u&&(ye==l||ye==s)&&ye++,Be=ye==0?"after":ye==t.text.length?"before":nr(e,i,ye-(u?1:0)).bottom+o<=a==u?"after":"before";var gt=Qn(e,Oe(r,ye,Be),"line",t,i);Me=gt.left,qe=a<gt.top?-1:a>=gt.bottom?1:0}return ye=Te(t.text,ye,1),li(r,ye,Be,qe,n-Me)}function Ks(e,t,r,n,a,i,o){var s=at(function(k){var $=a[k],X=$.level!=1;return ci(Qn(e,Oe(r,X?$.to:$.from,X?"before":"after"),"line",t,n),i,o,!0)},0,a.length-1),l=a[s];if(s>0){var u=l.level!=1,C=Qn(e,Oe(r,u?l.from:l.to,u?"after":"before"),"line",t,n);ci(C,i,o,!0)&&C.top>o&&(l=a[s-1])}return l}function Xs(e,t,r,n,a,i,o){var s=io(e,t,n,o),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var C=null,k=null,$=0;$<a.length;$++){var X=a[$];if(X.from>=u||X.to<=l)continue;var ye=X.level!=1,Me=nr(e,n,ye?Math.min(u,X.to)-1:Math.max(l,X.from)).right,Be=Me<i?i-Me+1e9:Me-i;(!C||k>Be)&&(C=X,k=Be)}return C||(C=a[a.length-1]),C.from<l&&(C={from:l,to:C.to,level:C.level}),C.to>u&&(C={from:C.from,to:u,level:C.level}),C}var kr;function Br(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(kr==null){kr=p("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)kr.appendChild(document.createTextNode("x")),kr.appendChild(p("br"));kr.appendChild(document.createTextNode("x"))}E(e.measure,kr);var r=kr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),ae(e.measure),r||1}function Wr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=p("span","xxxxxxxxxx"),r=p("pre",[t],"CodeMirror-line-like");E(e.measure,r);var n=t.getBoundingClientRect(),a=(n.right-n.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function di(e){for(var t=e.display,r={},n={},a=t.gutters.clientLeft,i=t.gutters.firstChild,o=0;i;i=i.nextSibling,++o){var s=e.display.gutterSpecs[o].className;r[s]=i.offsetLeft+i.clientLeft+a,n[s]=i.clientWidth}return{fixedPos:fi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function fi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function so(e){var t=Br(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Wr(e.display)-3);return function(a){if(Gt(e.doc,a))return 0;var i=0;if(a.widgets)for(var o=0;o<a.widgets.length;o++)a.widgets[o].height&&(i+=a.widgets[o].height);return r?i+(Math.ceil(a.text.length/n)||1)*t:i+t}}function hi(e){var t=e.doc,r=so(e);t.iter(function(n){var a=r(n);a!=n.height&&Kt(n,a)})}function Tr(e,t,r,n){var a=e.display;if(!r&&z(t).getAttribute("cm-not-content")=="true")return null;var i,o,s=a.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,o=t.clientY-s.top}catch(k){return null}var l=ui(e,i,o),u;if(n&&l.xRel>0&&(u=nt(e.doc,l.line).text).length==l.ch){var C=P(u,u.length,e.options.tabSize)-u.length;l=Oe(l.line,Math.max(0,Math.round((i-$i(e.display).left)/Wr(e.display))-C))}return l}function Or(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function jn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var a=e.display;if(n&&r<a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>t)&&(a.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=a.viewTo)Yt&&Nt(e.doc,t)<a.viewTo&&gr(e);else if(r<=a.viewFrom)Yt&&jt(e.doc,r+n)>a.viewFrom?gr(e):(a.viewFrom+=n,a.viewTo+=n);else if(t<=a.viewFrom&&r>=a.viewTo)gr(e);else if(t<=a.viewFrom){var i=Da(e,r,r+n,1);i?(a.view=a.view.slice(i.index),a.viewFrom=i.lineN,a.viewTo+=n):gr(e)}else if(r>=a.viewTo){var o=Da(e,t,t,-1);o?(a.view=a.view.slice(0,o.index),a.viewTo=o.lineN):gr(e)}else{var s=Da(e,t,t,-1),l=Da(e,r,r+n,1);s&&l?(a.view=a.view.slice(0,s.index).concat(Pa(e,s.lineN,l.lineN)).concat(a.view.slice(l.index)),a.viewTo+=n):gr(e)}var u=a.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(a.externalMeasured=null))}function mr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,a=e.display.externalMeasured;if(a&&t>=a.lineN&&t<a.lineN+a.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var i=n.view[Or(e,t)];if(i.node==null)return;var o=i.changes||(i.changes=[]);le(o,r)==-1&&o.push(r)}function gr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Da(e,t,r,n){var a=Or(e,t),i,o=e.display.view;if(!Yt||r==e.doc.first+e.doc.size)return{index:a,lineN:r};for(var s=e.display.viewFrom,l=0;l<a;l++)s+=o[l].size;if(s!=t){if(n>0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,r+=i}for(;Nt(e.doc,r)!=r;){if(a==(n<0?0:o.length-1))return null;r+=n*o[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:r}}function Gs(e,t,r){var n=e.display,a=n.view;a.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Pa(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Pa(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Or(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Pa(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Or(e,r)))),n.viewTo=r}function lo(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var a=t[n];!a.hidden&&(!a.node||a.changes)&&++r}return r}function ua(e){e.display.input.showSelection(e.display.input.prepareSelection())}function uo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},a=n.cursors=document.createDocumentFragment(),i=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var s=r.sel.ranges[o];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)continue;var l=s.empty();(l||e.options.showCursorWhenSelecting)&&co(e,s.head,a),l||Vs(e,s,i)}return n}function co(e,t,r){var n=Qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),a=r.appendChild(p("div","\xA0","CodeMirror-cursor"));if(a.style.left=n.left+"px",a.style.top=n.top+"px",a.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var i=r.appendChild(p("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=n.other.left+"px",i.style.top=n.other.top+"px",i.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Na(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,r){var n=e.display,a=e.doc,i=document.createDocumentFragment(),o=$i(e.display),s=o.left,l=Math.max(n.sizerWidth,Sr(e)-n.sizer.offsetLeft)-o.right,u=a.direction=="ltr";function C(Je,gt,Rt,Ct){gt<0&&(gt=0),gt=Math.round(gt),Ct=Math.round(Ct),i.appendChild(p("div",null,"CodeMirror-selected","position: absolute; left: "+Je+`px;
|
|
top: `+gt+"px; width: "+(Rt==null?l-Je:Rt)+`px;
|
|
height: `+(Ct-gt)+"px"))}function k(Je,gt,Rt){var Ct=nt(a,Je),Wt=Ct.text.length,en,En;function on(pn,Bn){return si(e,Oe(Je,pn),"div",Ct,Bn)}function Kn(pn,Bn,Sn){var gn=oo(e,Ct,null,pn),mn=Bn=="ltr"==(Sn=="after")?"left":"right",ln=Sn=="after"?gn.begin:gn.end-(/\s/.test(Ct.text.charAt(gn.end-1))?2:1);return on(ln,mn)[mn]}var Fn=ft(Ct,a.direction);return Qe(Fn,gt||0,Rt==null?Wt:Rt,function(pn,Bn,Sn,gn){var mn=Sn=="ltr",ln=on(pn,mn?"left":"right"),Wn=on(Bn-1,mn?"right":"left"),ea=gt==null&&pn==0,xr=Rt==null&&Bn==Wt,An=gn==0,rr=!Fn||gn==Fn.length-1;if(Wn.top-ln.top<=3){var xn=(u?ea:xr)&&An,Ii=(u?xr:ea)&&rr,dr=xn?s:(mn?ln:Wn).left,Mr=Ii?l:(mn?Wn:ln).right;C(dr,ln.top,Mr-dr,ln.bottom)}else{var Dr,Nn,ta,Fi;mn?(Dr=u&&ea&&An?s:ln.left,Nn=u?l:Kn(pn,Sn,"before"),ta=u?s:Kn(Bn,Sn,"after"),Fi=u&&xr&&rr?l:Wn.right):(Dr=u?Kn(pn,Sn,"before"):s,Nn=!u&&ea&&An?l:ln.right,ta=!u&&xr&&rr?s:Wn.left,Fi=u?Kn(Bn,Sn,"after"):l),C(Dr,ln.top,Nn-Dr,ln.bottom),ln.bottom<Wn.top&&C(s,ln.bottom,null,Wn.top),C(ta,Wn.top,Fi-ta,Wn.bottom)}(!en||Na(ln,en)<0)&&(en=ln),Na(Wn,en)<0&&(en=Wn),(!En||Na(ln,En)<0)&&(En=ln),Na(Wn,En)<0&&(En=Wn)}),{start:en,end:En}}var $=t.from(),X=t.to();if($.line==X.line)k($.line,$.ch,X.ch);else{var ye=nt(a,$.line),Me=nt(a,X.line),Be=Yn(ye)==Yn(Me),qe=k($.line,$.ch,Be?ye.text.length+1:null).end,lt=k(X.line,Be?0:null,X.ch).start;Be&&(qe.top<lt.top-2?(C(qe.right,qe.top,null,qe.bottom),C(s,lt.top,lt.left,lt.bottom)):C(qe.right,qe.top,lt.left-qe.right,qe.bottom)),qe.bottom<lt.top&&C(s,qe.bottom,null,lt.top)}r.appendChild(i)}function pi(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||zr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function fo(e){e.state.focused||(e.display.input.focus(),mi(e))}function ho(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,zr(e))},100)}function mi(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,re(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),x&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),pi(e)}function zr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,U(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ua(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var a=t.view[n],i=e.options.lineWrapping,o=void 0,s=0;if(a.hidden)continue;if(L&&R<8){var l=a.node.offsetTop+a.node.offsetHeight;o=l-r,r=l}else{var u=a.node.getBoundingClientRect();o=u.bottom-u.top,!i&&a.text.firstChild&&(s=a.text.firstChild.getBoundingClientRect().right-u.left-1)}var C=a.line.height-o;if((C>.005||C<-.005)&&(Kt(a.line,o),po(a.line),a.rest))for(var k=0;k<a.rest.length;k++)po(a.rest[k]);if(s>e.display.sizerWidth){var $=Math.ceil(s/Wr(e.display));$>e.display.maxLineLength&&(e.display.maxLineLength=$,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}function po(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function ja(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-La(e));var a=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,i=nn(t,n),o=nn(t,a);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<i?(i=s,o=nn(t,tn(nt(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(i=nn(t,tn(nt(t,l))-e.wrapper.clientHeight),o=l)}return{from:i,to:Math.max(o,i+1)}}function $s(e,t){if(Se(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),a=null;if(t.top+n.top<0?a=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(a=!1),a!=null&&!I){var i=p("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-La(e.display))+`px;
|
|
height: `+(t.bottom-t.top+tr(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(a),e.display.lineSpace.removeChild(i)}}function qs(e,t,r,n){n==null&&(n=0);var a;!e.options.lineWrapping&&t==r&&(t=t.ch?Oe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Oe(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var o=!1,s=Qn(e,t),l=!r||r==t?s:Qn(e,r);a={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n};var u=gi(e,a),C=e.doc.scrollTop,k=e.doc.scrollLeft;if(u.scrollTop!=null&&(da(e,u.scrollTop),Math.abs(e.doc.scrollTop-C)>1&&(o=!0)),u.scrollLeft!=null&&(Ar(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-k)>1&&(o=!0)),!o)break}return a}function Js(e,t){var r=gi(e,t);r.scrollTop!=null&&da(e,r.scrollTop),r.scrollLeft!=null&&Ar(e,r.scrollLeft)}function gi(e,t){var r=e.display,n=Br(e.display);t.top<0&&(t.top=0);var a=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,i=ai(e),o={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+ri(r),l=t.top<n,u=t.bottom>s-n;if(t.top<a)o.scrollTop=l?0:t.top;else if(t.bottom>a+i){var C=Math.min(t.top,(u?s:t.bottom)-i);C!=a&&(o.scrollTop=C)}var k=e.options.fixedGutter?0:r.gutters.offsetWidth,$=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-k,X=Sr(e)-r.gutters.offsetWidth,ye=t.right-t.left>X;return ye&&(t.right=t.left+X),t.left<10?o.scrollLeft=0:t.left<$?o.scrollLeft=Math.max(0,t.left+k-(ye?0:10)):t.right>X+$-3&&(o.scrollLeft=t.right+(ye?0:10)-X),o}function vi(e,t){if(t==null)return;Ia(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Hr(e){Ia(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ca(e,t,r){(t!=null||r!=null)&&Ia(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Ys(e,t){Ia(e),e.curOp.scrollToPos=t}function Ia(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=ao(e,t.from),n=ao(e,t.to);mo(e,r,n,t.margin)}}function mo(e,t,r,n){var a=gi(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});ca(e,a.scrollLeft,a.scrollTop)}function da(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;q||yi(e,{top:t}),go(e,t,!0),q&&yi(e),pa(e,100)}function go(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Ar(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Eo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function fa(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ri(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Rr=function(e,t,r){this.cm=r;var n=this.vert=p("div",[p("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=p("div",[p("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=a.tabIndex=-1,e(n),e(a),fe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),fe(a,"scroll",function(){a.clientWidth&&t(a.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,L&&R<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Rr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var a=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+a)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Rr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Rr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Rr.prototype.zeroWidthHack=function(){var e=V&&!j?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ue,this.disableVert=new ue},Rr.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var a=e.getBoundingClientRect(),i=r=="vert"?document.elementFromPoint(a.right-1,(a.top+a.bottom)/2):document.elementFromPoint((a.right+a.left)/2,a.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Rr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ha=function(){};ha.prototype.update=function(){return{bottom:0,right:0}},ha.prototype.setScrollLeft=function(){},ha.prototype.setScrollTop=function(){},ha.prototype.clear=function(){};function Kr(e,t){t||(t=fa(e));var r=e.display.barWidth,n=e.display.barHeight;vo(e,t);for(var a=0;a<4&&r!=e.display.barWidth||n!=e.display.barHeight;a++)r!=e.display.barWidth&&e.options.lineWrapping&&Ua(e),vo(e,fa(e)),r=e.display.barWidth,n=e.display.barHeight}function vo(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var bo={native:Rr,null:ha};function yo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&U(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?Ar(e,t):da(e,t)},e),e.display.scrollbars.addClass&&re(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function Pr(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},As(e.curOp)}function Lr(e){var t=e.curOp;t&&Ps(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Zs(r)})}function Zs(e){for(var t=e.ops,r=0;r<t.length;r++)el(t[r]);for(var n=0;n<t.length;n++)tl(t[n]);for(var a=0;a<t.length;a++)nl(t[a]);for(var i=0;i<t.length;i++)rl(t[i]);for(var o=0;o<t.length;o++)al(t[o])}function el(e){var t=e.cm,r=t.display;ol(t),e.updateMaxLine&&vn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Fa(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&bi(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Ua(t),e.barMeasure=fa(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ji(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Sr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ar(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Kr(t,e.barMeasure),e.updatedDisplay&&Ei(t,e.barMeasure),e.selectionChanged&&pi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&fo(e.cm)}function al(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&_o(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&go(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ar(t,e.scrollLeft,!0,!0),e.scrollToPos){var a=qs(t,kt(n,e.scrollToPos.from),kt(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,a)}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var s=0;s<i.length;++s)i[s].lines.length||ve(i[s],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&ve(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Hn(e,t){if(e.curOp)return t();Pr(e);try{return t()}finally{Lr(e)}}function yn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Pr(e);try{return t.apply(e,arguments)}finally{Lr(e)}}}function Dn(e){return function(){if(this.curOp)return e.apply(this,arguments);Pr(this);try{return e.apply(this,arguments)}finally{Lr(this)}}}function _n(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Pr(t);try{return e.apply(this,arguments)}finally{Lr(t)}}}function pa(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,_(il,e))}function il(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=se(e,t.highlightFrontier),a=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(n.line>=e.display.viewFrom){var o=i.styles,s=i.text.length>e.options.maxHighlightLength?zt(t.mode,n.state):null,l=zn(e,i,n,!0);s&&(n.state=s),i.styles=l.styles;var u=i.styleClasses,C=l.classes;C?i.styleClasses=C:u&&(i.styleClasses=null);for(var k=!o||o.length!=i.styles.length||u!=C&&(!u||!C||u.bgClass!=C.bgClass||u.textClass!=C.textClass),$=0;!k&&$<o.length;++$)k=o[$]!=i.styles[$];k&&a.push(n.line),i.stateAfter=n.save(),n.nextLine()}else i.text.length<=e.options.maxHighlightLength&&ct(e,i.text,n),i.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return pa(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),a.length&&Hn(e,function(){for(var i=0;i<a.length;i++)mr(e,a[i],"text")})}var Fa=function(e,t,r){var n=e.display;this.viewport=t,this.visible=ja(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Sr(e),this.force=r,this.dims=di(e),this.events=[]};Fa.prototype.signal=function(e,t){S(e,t)&&this.events.push(arguments)},Fa.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};function ol(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=tr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=tr(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=D();if(!t||!y(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&y(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ll(e){if(!e||!e.activeElt||e.activeElt==D())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&y(document.body,e.anchorNode)&&y(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function bi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return gr(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&lo(e)==0)return!1;xo(e)&&(gr(e),t.dims=di(e));var a=n.first+n.size,i=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(a,t.visible.to+e.options.viewportMargin);r.viewFrom<i&&i-r.viewFrom<20&&(i=Math.max(n.first,r.viewFrom)),r.viewTo>o&&r.viewTo-o<20&&(o=Math.min(a,r.viewTo)),Yt&&(i=Nt(e.doc,i),o=jt(e.doc,o));var s=i!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Gs(e,i,o),r.viewOffset=tn(nt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=lo(e);if(!s&&l==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=sl(e);return l>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(u),ae(r.cursorDiv),ae(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,pa(e,400)),r.updateLineNumbers=null,!0}function _o(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Sr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ri(e.display)-ai(e),r.top)}),t.visible=ja(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=ja(e.display,e.doc,r));if(!bi(e,t))break;Ua(e);var a=fa(e);ua(e),Kr(e,a),Ei(e,a),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 yi(e,t){var r=new Fa(e,t);if(bi(e,r)){Ua(e),_o(e,r);var n=fa(e);ua(e),Kr(e,n),Ei(e,n),r.finish()}}function ul(e,t,r){var n=e.display,a=e.options.lineNumbers,i=n.lineDiv,o=i.firstChild;function s(ye){var Me=ye.nextSibling;return x&&V&&e.display.currentWheelTarget==ye?ye.style.display="none":ye.parentNode.removeChild(ye),Me}for(var l=n.view,u=n.viewFrom,C=0;C<l.length;C++){var k=l[C];if(!k.hidden)if(!k.node||k.node.parentNode!=i){var $=Us(e,k,u,r);i.insertBefore($,o)}else{for(;o!=k.node;)o=s(o);var X=a&&t!=null&&t<=u&&k.lineNumber;k.changes&&(le(k.changes,"gutter")>-1&&(X=!1),Hi(e,k,u,r)),X&&(ae(k.lineNumber),k.lineNumber.appendChild(document.createTextNode(Rn(e.options,u)))),o=k.node.nextSibling}u+=k.size}for(;o;)o=s(o)}function _i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ei(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+tr(e)+"px"}function Eo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=fi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,a=t.gutters.offsetWidth,i=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=i),r[o].gutterBackground&&(r[o].gutterBackground.style.left=i));var s=r[o].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=n+a+"px")}function xo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Rn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var a=n.measure.appendChild(p("div",[p("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=a.firstChild.offsetWidth,o=a.offsetWidth-i;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(i,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",_i(e.display),!0}return!1}function xi(e,t){for(var r=[],n=!1,a=0;a<e.length;a++){var i=e[a],o=null;if(typeof i!="string"&&(o=i.style,i=i.className),i=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:i,style:o})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function wo(e){var t=e.gutters,r=e.gutterSpecs;ae(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var a=r[n],i=a.className,o=a.style,s=t.appendChild(p("div",null,"CodeMirror-gutter "+i));o&&(s.style.cssText=o),i=="CodeMirror-linenumbers"&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",_i(e)}function ma(e){wo(e.display),jn(e),Eo(e)}function cl(e,t,r,n){var a=this;this.input=r,a.scrollbarFiller=p("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=p("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=O("div",null,"CodeMirror-code"),a.selectionDiv=p("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=p("div",null,"CodeMirror-cursors"),a.measure=p("div",null,"CodeMirror-measure"),a.lineMeasure=p("div",null,"CodeMirror-measure"),a.lineSpace=O("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var i=O("div",[a.lineSpace],"CodeMirror-lines");a.mover=p("div",[i],null,"position: relative"),a.sizer=p("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=p("div",null,null,"position: absolute; height: "+Le+"px; width: 1px;"),a.gutters=p("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=p("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=p("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),L&&R<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!x&&!(q&&Z)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=xi(n.gutters,n.lineNumbers),wo(a),r.init(a)}var Ba=0,Vn=null;L?Vn=-.53:q?Vn=15:H?Vn=-.7:he&&(Vn=-1/3);function Co(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function dl(e){var t=Co(e);return t.x*=Vn,t.y*=Vn,t}function So(e,t){var r=Co(t),n=r.x,a=r.y,i=e.display,o=i.scroller,s=o.scrollWidth>o.clientWidth,l=o.scrollHeight>o.clientHeight;if(!(n&&s||a&&l))return;if(a&&V&&x){e:for(var u=t.target,C=i.view;u!=o;u=u.parentNode)for(var k=0;k<C.length;k++)if(C[k].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!q&&!J&&Vn!=null){a&&l&&da(e,Math.max(0,o.scrollTop+a*Vn)),Ar(e,Math.max(0,o.scrollLeft+n*Vn)),(!a||a&&l)&&d(t),i.wheelStartX=null;return}if(a&&Vn!=null){var $=a*Vn,X=e.doc.scrollTop,ye=X+i.wrapper.clientHeight;$<0?X=Math.max(0,X+$-50):ye=Math.min(e.doc.height,ye+$+50),yi(e,{top:X,bottom:ye})}Ba<20&&(i.wheelStartX==null?(i.wheelStartX=o.scrollLeft,i.wheelStartY=o.scrollTop,i.wheelDX=n,i.wheelDY=a,setTimeout(function(){if(i.wheelStartX==null)return;var Me=o.scrollLeft-i.wheelStartX,Be=o.scrollTop-i.wheelStartY,qe=Be&&i.wheelDY&&Be/i.wheelDY||Me&&i.wheelDX&&Me/i.wheelDX;if(i.wheelStartX=i.wheelStartY=null,!qe)return;Vn=(Vn*Ba+qe)/(Ba+1),++Ba},200)):(i.wheelDX+=n,i.wheelDY+=a))}var $n=function(e,t){this.ranges=e,this.primIndex=t};$n.prototype.primary=function(){return this.ranges[this.primIndex]},$n.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Xt(r.anchor,n.anchor)||!Xt(r.head,n.head))return!1}return!0},$n.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Jt($t(this.ranges[t].anchor),$t(this.ranges[t].head));return new $n(e,this.primIndex)},$n.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},$n.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Ge(t,n.from())>=0&&Ge(e,n.to())<=0)return r}return-1};var Jt=function(e,t){this.anchor=e,this.head=t};Jt.prototype.from=function(){return rn(this.anchor,this.head)},Jt.prototype.to=function(){return je(this.anchor,this.head)},Jt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Zn(e,t,r){var n=e&&e.options.selectionsMayTouch,a=t[r];t.sort(function($,X){return Ge($.from(),X.from())}),r=le(t,a);for(var i=1;i<t.length;i++){var o=t[i],s=t[i-1],l=Ge(s.to(),o.from());if(n&&!o.empty()?l>0:l>=0){var u=rn(s.from(),o.from()),C=je(s.to(),o.to()),k=s.empty()?o.from()==o.head:s.from()==s.head;i<=r&&--r,t.splice(--i,2,new Jt(k?C:u,k?u:C))}}return new $n(t,r)}function vr(e,t){return new $n([new Jt(e,t||e)],0)}function br(e){return e.text?Oe(e.from.line+e.text.length-1,Ae(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ko(e,t){if(Ge(e,t.from)<0)return e;if(Ge(e,t.to)<=0)return br(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=br(t).ch-t.to.ch),Oe(r,n)}function wi(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var a=e.sel.ranges[n];r.push(new Jt(ko(a.anchor,t),ko(a.head,t)))}return Zn(e.cm,r,e.sel.primIndex)}function To(e,t,r){return e.line==t.line?Oe(r.line,e.ch-t.ch+r.ch):Oe(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],a=Oe(e.first,0),i=a,o=0;o<t.length;o++){var s=t[o],l=To(s.from,a,i),u=To(br(s),a,i);if(a=s.to,i=u,r=="around"){var C=e.sel.ranges[o],k=Ge(C.head,C.anchor)<0;n[o]=new Jt(k?u:l,k?l:u)}else n[o]=new Jt(l,l)}return new $n(n,e.sel.primIndex)}function Ci(e){e.doc.mode=st(e.options,e.doc.modeOption),ga(e)}function ga(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,pa(e,100),e.state.modeGen++,e.curOp&&jn(e)}function Oo(e,t){return t.from.ch==0&&t.to.ch==0&&Ae(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Si(e,t,r,n){function a(lt){return r?r[lt]:null}function i(lt,Je,gt){or(lt,Je,gt,n),Cn(lt,"change",lt,t)}function o(lt,Je){for(var gt=[],Rt=lt;Rt<Je;++Rt)gt.push(new bn(u[Rt],a(Rt),n));return gt}var s=t.from,l=t.to,u=t.text,C=nt(e,s.line),k=nt(e,l.line),$=Ae(u),X=a(u.length-1),ye=l.line-s.line;if(t.full)e.insert(0,o(0,u.length)),e.remove(u.length,e.size-u.length);else if(Oo(e,t)){var Me=o(0,u.length-1);i(k,k.text,X),ye&&e.remove(s.line,ye),Me.length&&e.insert(s.line,Me)}else if(C==k)if(u.length==1)i(C,C.text.slice(0,s.ch)+$+C.text.slice(l.ch),X);else{var Be=o(1,u.length-1);Be.push(new bn($+C.text.slice(l.ch),X,n)),i(C,C.text.slice(0,s.ch)+u[0],a(0)),e.insert(s.line+1,Be)}else if(u.length==1)i(C,C.text.slice(0,s.ch)+u[0]+k.text.slice(l.ch),a(0)),e.remove(s.line+1,ye);else{i(C,C.text.slice(0,s.ch)+u[0],a(0)),i(k,$+k.text.slice(l.ch),X);var qe=o(1,u.length-1);ye>1&&e.remove(s.line+1,ye-1),e.insert(s.line+1,qe)}Cn(e,"change",e,t)}function yr(e,t,r){function n(a,i,o){if(a.linked)for(var s=0;s<a.linked.length;++s){var l=a.linked[s];if(l.doc==i)continue;var u=o&&l.sharedHist;if(r&&!u)continue;t(l.doc,u),n(l.doc,a,u)}}n(e,null,!0)}function Ao(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,hi(e),Ci(e),Ro(e),e.options.lineWrapping||vn(e),e.options.mode=t.modeOption,jn(e)}function Ro(e){(e.doc.direction=="rtl"?re:U)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){Hn(e,function(){Ro(e),jn(e)})}function Wa(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 ki(e,t){var r={from:$t(t.from),to:br(t),text:Ft(e,t.from,t.to)};return Mo(e,r,t.from.line,t.to.line+1),yr(e,function(n){return Mo(n,r,t.from.line,t.to.line+1)},!0),r}function Po(e){for(;e.length;){var t=Ae(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Po(e.done),Ae(e.done);if(e.done.length&&!Ae(e.done).ranges)return Ae(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ae(e.done)}function Lo(e,t,r,n){var a=e.history;a.undone.length=0;var i=+new Date,o,s;if((a.lastOp==n||a.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&a.lastModTime>i-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(a,a.lastOp==n)))s=Ae(o.changes),Ge(t.from,t.to)==0&&Ge(t.from,s.to)==0?s.to=br(t):o.changes.push(ki(e,t));else{var l=Ae(a.done);for((!l||!l.ranges)&&za(e.sel,a.done),o={changes:[ki(e,t)],generation:a.generation},a.done.push(o);a.done.length>a.undoDepth;)a.done.shift(),a.done[0].ranges||a.done.shift()}a.done.push(r),a.generation=++a.maxGeneration,a.lastModTime=a.lastSelTime=i,a.lastOp=a.lastSelOp=n,a.lastOrigin=a.lastSelOrigin=t.origin,s||ve(e,"historyAdded")}function ml(e,t,r,n){var a=t.charAt(0);return a=="*"||a=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var a=e.history,i=n&&n.origin;r==a.lastSelOp||i&&a.lastSelOrigin==i&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==i||ml(e,i,Ae(a.done),t))?a.done[a.done.length-1]=t:za(t,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=i,a.lastSelOp=r,n&&n.clearRedo!==!1&&Po(a.undone)}function za(e,t){var r=Ae(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Mo(e,t,r,n){var a=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((a||(a=t["spans_"+e.id]={}))[i]=o.markedSpans),++i})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],a=0;a<t.text.length;++a)n.push(vl(r[a]));return n}function Do(e,t){var r=bl(e,t),n=Gn(e,t);if(!r)return n;if(!n)return r;for(var a=0;a<r.length;++a){var i=r[a],o=n[a];if(i&&o){e:for(var s=0;s<o.length;++s){for(var l=o[s],u=0;u<i.length;++u)if(i[u].marker==l.marker)continue e;i.push(l)}}else o&&(r[a]=o)}return r}function Xr(e,t,r){for(var n=[],a=0;a<e.length;++a){var i=e[a];if(i.ranges){n.push(r?$n.prototype.deepCopy.call(i):i);continue}var o=i.changes,s=[];n.push({changes:s});for(var l=0;l<o.length;++l){var u=o[l],C=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var k in u)(C=k.match(/^spans_(\d+)$/))&&(le(t,Number(C[1]))>-1&&(Ae(s)[k]=u[k],delete u[k]))}}return n}function Ti(e,t,r,n){if(n){var a=e.anchor;if(r){var i=Ge(t,a)<0;i!=Ge(r,a)<0?(a=t,t=r):i!=Ge(t,r)<0&&(t=r)}return new Jt(a,t)}else return new Jt(r||t,t)}function Ha(e,t,r,n,a){a==null&&(a=e.cm&&(e.cm.display.shift||e.extend)),On(e,new $n([Ti(e.sel.primary(),t,r,a)],0),n)}function No(e,t,r){for(var n=[],a=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)n[i]=Ti(e.sel.ranges[i],t[i],null,a);var o=Zn(e.cm,n,e.sel.primIndex);On(e,o,r)}function Oi(e,t,r,n){var a=e.sel.ranges.slice(0);a[t]=r,On(e,Zn(e.cm,a,e.sel.primIndex),n)}function Uo(e,t,r,n){On(e,vr(t,r),n)}function yl(e,t,r){var n={ranges:t.ranges,update:function(a){this.ranges=[];for(var i=0;i<a.length;i++)this.ranges[i]=new Jt(kt(e,a[i].anchor),kt(e,a[i].head))},origin:r&&r.origin};return ve(e,"beforeSelectionChange",e,n),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Zn(e.cm,n.ranges,n.ranges.length-1):t}function jo(e,t,r){var n=e.history.done,a=Ae(n);a&&a.ranges?(n[n.length-1]=t,Ka(e,t,r)):On(e,t,r)}function On(e,t,r){Ka(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Ka(e,t,r){(S(e,"beforeSelectionChange")||e.cm&&S(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(Ge(t.primary().head,e.sel.primary().head)<0?-1:1);Io(e,Bo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Hr(e.cm)}function Io(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,w(e.cm)),Cn(e,"cursorActivity",e)}function Fo(e){Io(e,Bo(e,e.sel,null,!1))}function Bo(e,t,r,n){for(var a,i=0;i<t.ranges.length;i++){var o=t.ranges[i],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],l=Xa(e,o.anchor,s&&s.anchor,r,n),u=Xa(e,o.head,s&&s.head,r,n);(a||l!=o.anchor||u!=o.head)&&(a||(a=t.ranges.slice(0,i)),a[i]=new Jt(l,u))}return a?Zn(e.cm,a,t.primIndex):t}function Gr(e,t,r,n,a){var i=nt(e,t.line);if(i.markedSpans)for(var o=0;o<i.markedSpans.length;++o){var s=i.markedSpans[o],l=s.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,C="selectRight"in l?!l.selectRight:l.inclusiveRight;if((s.from==null||(u?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(C?s.to>=t.ch:s.to>t.ch))){if(a&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared))if(i.markedSpans){--o;continue}else break;if(!l.atomic)continue;if(r){var k=l.find(n<0?1:-1),$=void 0;if((n<0?C:u)&&(k=Wo(e,k,-n,k&&k.line==t.line?i:null)),k&&k.line==t.line&&($=Ge(k,r))&&(n<0?$<0:$>0))return Gr(e,k,t,n,a)}var X=l.find(n<0?-1:1);return(n<0?u:C)&&(X=Wo(e,X,n,X.line==t.line?i:null)),X?Gr(e,X,t,n,a):null}}return t}function Xa(e,t,r,n,a){var i=n||1,o=Gr(e,t,r,i,a)||!a&&Gr(e,t,r,i,!0)||Gr(e,t,r,-i,a)||!a&&Gr(e,t,r,-i,!0);return o||(e.cantEdit=!0,Oe(e.first,0))}function Wo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?kt(e,Oe(t.line-1)):null:r>0&&t.ch==(n||nt(e,t.line)).text.length?t.line<e.first+e.size-1?Oe(t.line+1,0):null:new Oe(t.line,t.ch+r)}function zo(e){e.setSelection(Oe(e.firstLine(),0),Oe(e.lastLine()),pe)}function Ho(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(a,i,o,s){a&&(n.from=kt(e,a)),i&&(n.to=kt(e,i)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),ve(e,"beforeChange",e,n),e.cm&&ve(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 Vr(e,t,r){if(e.cm){if(!e.cm.curOp)return yn(e.cm,Vr)(e,t,r);if(e.cm.state.suppressEdits)return}if((S(e,"beforeChange")||e.cm&&S(e.cm,"beforeChange"))&&(t=Ho(e,t,!0),!t))return;var n=qt&&!r&&Ur(e,t.from,t.to);if(n)for(var a=n.length-1;a>=0;--a)Ko(e,{from:n[a].from,to:n[a].to,text:a?[""]:t.text,origin:t.origin});else Ko(e,t)}function Ko(e,t){if(t.text.length==1&&t.text[0]==""&&Ge(t.from,t.to)==0)return;var r=wi(e,t);Lo(e,t,r,e.cm?e.cm.curOp.id:NaN),va(e,t,r,Gn(e,t));var n=[];yr(e,function(a,i){!i&&le(n,a.history)==-1&&($o(a.history,t),n.push(a.history)),va(a,t,null,Gn(a,t))})}function Ga(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var a=e.history,i,o=e.sel,s=t=="undo"?a.done:a.undone,l=t=="undo"?a.undone:a.done,u=0;u<s.length&&!(i=s[u],r?i.ranges&&!i.equals(e.sel):!i.ranges);u++);if(u==s.length)return;for(a.lastOrigin=a.lastSelOrigin=null;;)if(i=s.pop(),i.ranges){if(za(i,l),r&&!i.equals(e.sel)){On(e,i,{clearRedo:!1});return}o=i}else if(n){s.push(i);return}else break;var C=[];za(o,l),l.push({changes:C,generation:a.generation}),a.generation=i.generation||++a.maxGeneration;for(var k=S(e,"beforeChange")||e.cm&&S(e.cm,"beforeChange"),$=function(Me){var Be=i.changes[Me];if(Be.origin=t,k&&!Ho(e,Be,!1))return s.length=0,{};C.push(ki(e,Be));var qe=Me?wi(e,Be):Ae(s);va(e,Be,qe,Do(e,Be)),!Me&&e.cm&&e.cm.scrollIntoView({from:Be.from,to:br(Be)});var lt=[];yr(e,function(Je,gt){!gt&&le(lt,Je.history)==-1&&($o(Je.history,Be),lt.push(Je.history)),va(Je,Be,null,Do(Je,Be))})},X=i.changes.length-1;X>=0;--X){var ye=$(X);if(ye)return ye.v}}function Xo(e,t){if(t==0)return;if(e.first+=t,e.sel=new $n(rt(e.sel.ranges,function(a){return new Jt(Oe(a.anchor.line+t,a.anchor.ch),Oe(a.head.line+t,a.head.ch))}),e.sel.primIndex),e.cm){jn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)mr(e.cm,n,"gutter")}}function va(e,t,r,n){if(e.cm&&!e.cm.curOp)return yn(e.cm,va)(e,t,r,n);if(t.to.line<e.first){Xo(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var a=t.text.length-1-(e.first-t.from.line);Xo(e,a),t={from:Oe(e.first,0),to:Oe(t.to.line+a,t.to.ch),text:[Ae(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:Oe(i,nt(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ft(e,t.from,t.to),r||(r=wi(e,t)),e.cm?_l(e.cm,t,n):Si(e,t,n),Ka(e,r,pe),e.cantEdit&&Xa(e,Oe(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,r){var n=e.doc,a=e.display,i=t.from,o=t.to,s=!1,l=i.line;e.options.lineWrapping||(l=St(Yn(nt(n,i.line))),n.iter(l,o.line+1,function(X){if(X==a.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&w(e),Si(n,t,r,so(e)),e.options.lineWrapping||(n.iter(l,i.line+t.text.length,function(X){var ye=sn(X);ye>a.maxLineLength&&(a.maxLine=X,a.maxLineLength=ye,a.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Ht(n,i.line),pa(e,400);var u=t.text.length-(o.line-i.line)-1;t.full?jn(e):i.line==o.line&&t.text.length==1&&!Oo(e.doc,t)?mr(e,i.line,"text"):jn(e,i.line,o.line+1,u);var C=S(e,"changes"),k=S(e,"change");if(k||C){var $={from:i,to:o,text:t.text,removed:t.removed,origin:t.origin};k&&Cn(e,"change",e,$),C&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push($)}e.display.selForContextMenu=null}function $r(e,t,r,n,a){var i;n||(n=r),Ge(n,r)<0&&(i=[n,r],r=i[0],n=i[1]),typeof t=="string"&&(t=e.splitLines(t)),Vr(e,{from:r,to:n,text:t,origin:a})}function Go(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Vo(e,t,r,n){for(var a=0;a<e.length;++a){var i=e[a],o=!0;if(i.ranges){i.copied||(i=e[a]=i.deepCopy(),i.copied=!0);for(var s=0;s<i.ranges.length;s++)Go(i.ranges[s].anchor,t,r,n),Go(i.ranges[s].head,t,r,n);continue}for(var l=0;l<i.changes.length;++l){var u=i.changes[l];if(r<u.from.line)u.from=Oe(u.from.line+n,u.from.ch),u.to=Oe(u.to.line+n,u.to.ch);else if(t<=u.to.line){o=!1;break}}o||(e.splice(0,a+1),a=0)}}function $o(e,t){var r=t.from.line,n=t.to.line,a=t.text.length-(n-r)-1;Vo(e.done,r,n,a),Vo(e.undone,r,n,a)}function ba(e,t,r,n){var a=t,i=t;return typeof t=="number"?i=nt(e,qn(e,t)):a=St(t),a==null?null:(n(i,a)&&e.cm&&mr(e.cm,a,r),i)}function ya(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}ya.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var a=this.lines[r];this.height-=a.height,hn(a),Cn(a,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function _a(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var a=e[n];t+=a.chunkSize(),r+=a.height,a.parent=this}this.size=t,this.height=r,this.parent=null}_a.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],a=n.chunkSize();if(e<a){var i=Math.min(t,a-e),o=n.height;if(n.removeInner(e,i),this.height-=o-n.height,a==i&&(this.children.splice(r--,1),n.parent=null),(t-=i)==0)break;e=0}else e-=a}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ya))){var s=[];this.collapse(s),this.children=[new ya(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var a=this.children[n],i=a.chunkSize();if(e<=i){if(a.insertInner(e,t,r),a.lines&&a.lines.length>50){for(var o=a.lines.length%25+25,s=o;s<a.lines.length;){var l=new ya(a.lines.slice(s,s+=25));a.height-=l.height,this.children.splice(++n,0,l),l.parent=this}a.lines=a.lines.slice(0,o),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new _a(t);if(e.parent){e.size-=r.size,e.height-=r.height;var a=le(e.parent.children,e);e.parent.children.splice(a+1,0,r)}else{var n=new _a(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var a=this.children[n],i=a.chunkSize();if(e<i){var o=Math.min(t,i-e);if(a.iterN(e,o,r))return!0;if((t-=o)==0)break;e=0}else e-=i}}};var Ea=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};Ea.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=St(r);if(n==null||!t)return;for(var a=0;a<t.length;++a)t[a]==this&&t.splice(a--,1);t.length||(r.widgets=null);var i=sa(this);Kt(r,Math.max(0,r.height-i)),e&&(Hn(e,function(){qo(e,r,-i),mr(e,n,"widget")}),Cn(e,"lineWidgetCleared",e,this,n))},Ea.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var a=sa(this)-t;if(!a)return;Gt(this.doc,n)||Kt(n,n.height+a),r&&Hn(r,function(){r.curOp.forceUpdate=!0,qo(r,n,a),Cn(r,"lineWidgetChanged",r,e,St(n))})},v(Ea);function qo(e,t,r){tn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&vi(e,r)}function El(e,t,r,n){var a=new Ea(e,r,n),i=e.cm;return i&&a.noHScroll&&(i.display.alignWidgets=!0),ba(e,t,"widget",function(o){var s=o.widgets||(o.widgets=[]);if(a.insertAt==null?s.push(a):s.splice(Math.min(s.length-1,Math.max(0,a.insertAt)),0,a),a.line=o,i&&!Gt(e,o)){var l=tn(o)<e.scrollTop;Kt(o,o.height+sa(a)),l&&vi(i,a.height),i.curOp.forceUpdate=!0}return!0}),i&&Cn(i,"lineWidgetAdded",i,a,typeof t=="number"?t:St(t)),a}var Jo=0,_r=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Jo};_r.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Pr(e),S(this,"clear")){var r=this.find();r&&Cn(this,"clear",r.from,r.to)}for(var n=null,a=null,i=0;i<this.lines.length;++i){var o=this.lines[i],s=kn(o.markedSpans,this);e&&!this.collapsed?mr(e,St(o),"text"):e&&(s.to!=null&&(a=St(o)),s.from!=null&&(n=St(o))),o.markedSpans=fr(o.markedSpans,s),s.from==null&&this.collapsed&&!Gt(this.doc,o)&&e&&Kt(o,Br(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=Yn(this.lines[l]),C=sn(u);C>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=C,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&jn(e,n,a+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Fo(e.doc)),e&&Cn(e,"markerCleared",e,this,n,a),t&&Lr(e),this.parent&&this.parent.clear()},_r.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,a=0;a<this.lines.length;++a){var i=this.lines[a],o=kn(i.markedSpans,this);if(o.from!=null&&(r=Oe(t?i:St(i),o.from),e==-1))return r;if(o.to!=null&&(n=Oe(t?i:St(i),o.to),e==1))return n}return r&&{from:r,to:n}},_r.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;Hn(n,function(){var a=t.line,i=St(t.line),o=ii(n,i);if(o&&(Zi(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Gt(r.doc,a)&&r.height!=null){var s=r.height;r.height=null;var l=sa(r)-s;l&&Kt(a,a.height+l)}Cn(n,"markerChanged",n,e)})},_r.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||le(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},_r.prototype.detachLine=function(e){if(this.lines.splice(le(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},v(_r);function qr(e,t,r,n,a){if(n&&n.shared)return xl(e,t,r,n,a);if(e.cm&&!e.cm.curOp)return yn(e.cm,qr)(e,t,r,n,a);var i=new _r(e,a),o=Ge(t,r);if(n&&c(n,i,!1),o>0||o==0&&i.clearWhenEmpty!==!1)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=O("span",[i.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(ti(e,t.line,t,r,i)||t.line!=r.line&&ti(e,r.line,t,r,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pn()}i.addToHistory&&Lo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,l=e.cm,u;if(e.iter(s,r.line+1,function(k){l&&i.collapsed&&!l.options.lineWrapping&&Yn(k)==l.display.maxLine&&(u=!0),i.collapsed&&s!=t.line&&Kt(k,0),Ln(k,new fn(i,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),i.collapsed&&e.iter(t.line,r.line+1,function(k){Gt(e,k)&&Kt(k,0)}),i.clearOnEnter&&fe(i,"beforeCursorEnter",function(){return i.clear()}),i.readOnly&&(un(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Jo,i.atomic=!0),l){if(u&&(l.curOp.updateMaxLine=!0),i.collapsed)jn(l,t.line,r.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var C=t.line;C<=r.line;C++)mr(l,C,"text");i.atomic&&Fo(l.doc),Cn(l,"markerAdded",l,i)}return i}var xa=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};xa.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Cn(this,"clear")},xa.prototype.find=function(e,t){return this.primary.find(e,t)},v(xa);function xl(e,t,r,n,a){n=c(n),n.shared=!1;var i=[qr(e,t,r,n,a)],o=i[0],s=n.widgetNode;return yr(e,function(l){s&&(n.widgetNode=s.cloneNode(!0)),i.push(qr(l,kt(l,t),kt(l,r),n,a));for(var u=0;u<l.linked.length;++u)if(l.linked[u].isParent)return;o=Ae(i)}),new xa(i,o)}function Yo(e){return e.findMarks(Oe(e.first,0),e.clipPos(Oe(e.lastLine())),function(t){return t.parent})}function wl(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=n.find(),i=e.clipPos(a.from),o=e.clipPos(a.to);if(Ge(i,o)){var s=qr(e,i,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Cl(e){for(var t=function(n){var a=e[n],i=[a.primary.doc];yr(a.primary.doc,function(l){return i.push(l)});for(var o=0;o<a.markers.length;o++){var s=a.markers[o];le(i,s.doc)==-1&&(s.parent=null,a.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,In=function(e,t,r,n,a){if(!(this instanceof In))return new In(e,t,r,n,a);r==null&&(r=0),_a.call(this,[new ya([new bn("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var i=Oe(r,0);this.sel=vr(i),this.history=new Wa(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=a=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Si(this,{from:i,to:i,text:e}),On(this,vr(i),pe)};In.prototype=Pe(_a.prototype,{constructor:In,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=_t(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:_n(function(e){var t=Oe(this.first,0),r=this.first+this.size-1;Vr(this,{from:t,to:Oe(r,nt(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ca(this.cm,0,0),On(this,vr(t),pe)}),replaceRange:function(e,t,r,n){t=kt(this,t),r=r?kt(this,r):t,$r(this,e,t,r,n)},getRange:function(e,t,r){var n=Ft(this,kt(this,e),kt(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Un(this,e))return nt(this,e)},getLineNumber:function(e){return St(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=nt(this,e)),Yn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return kt(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:_n(function(e,t,r){Uo(this,kt(this,typeof e=="number"?Oe(e,t||0):e),null,r)}),setSelection:_n(function(e,t,r){Uo(this,kt(this,e),kt(this,t||e),r)}),extendSelection:_n(function(e,t,r){Ha(this,kt(this,e),t&&kt(this,t),r)}),extendSelections:_n(function(e,t){No(this,Xn(this,e),t)}),extendSelectionsBy:_n(function(e,t){var r=rt(this.sel.ranges,e);No(this,Xn(this,r),t)}),setSelections:_n(function(e,t,r){if(!e.length)return;for(var n=[],a=0;a<e.length;a++)n[a]=new Jt(kt(this,e[a].anchor),kt(this,e[a].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),On(this,Zn(this.cm,n,t),r)}),addSelection:_n(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Jt(kt(this,e),kt(this,t||e))),On(this,Zn(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var a=Ft(this,t[n].from(),t[n].to());r=r?r.concat(a):a}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var a=Ft(this,r[n].from(),r[n].to());e!==!1&&(a=a.join(e||this.lineSeparator())),t[n]=a}return t},replaceSelection:function(e,t,r){for(var n=[],a=0;a<this.sel.ranges.length;a++)n[a]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:_n(function(e,t,r){for(var n=[],a=this.sel,i=0;i<a.ranges.length;i++){var o=a.ranges[i];n[i]={from:o.from(),to:o.to(),text:this.splitLines(e[i]),origin:r}}for(var s=t&&t!="end"&&fl(this,n,t),l=n.length-1;l>=0;l--)Vr(this,n[l]);s?jo(this,s):this.cm&&Hr(this.cm)}),undo:_n(function(){Ga(this,"undo")}),redo:_n(function(){Ga(this,"redo")}),undoSelection:_n(function(){Ga(this,"undo",!0)}),redoSelection:_n(function(){Ga(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var a=0;a<e.undone.length;a++)e.undone[a].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Wa(this.history.maxGeneration),yr(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:Xr(this.history.done),undone:Xr(this.history.undone)}},setHistory:function(e){var t=this.history=new Wa(this.history.maxGeneration);t.done=Xr(e.done.slice(0),null,!0),t.undone=Xr(e.undone.slice(0),null,!0)},setGutterMarker:_n(function(e,t,r){return ba(this,e,"gutter",function(n){var a=n.gutterMarkers||(n.gutterMarkers={});return a[t]=r,!r&&He(a)&&(n.gutterMarkers=null),!0})}),clearGutter:_n(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&ba(t,r,"gutter",function(){return r.gutterMarkers[e]=null,He(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Un(this,e))return null;if(t=e,e=nt(this,e),!e)return null}else if(t=St(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:_n(function(e,t,r){return ba(this,e,t=="gutter"?"gutter":"class",function(n){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[a])n[a]=r;else{if(ee(r).test(n[a]))return!1;n[a]+=" "+r}return!0})}),removeLineClass:_n(function(e,t,r){return ba(this,e,t=="gutter"?"gutter":"class",function(n){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",i=n[a];if(i)if(r==null)n[a]=null;else{var o=i.match(ee(r));if(!o)return!1;var s=o.index+o[0].length;n[a]=i.slice(0,o.index)+(!o.index||s==i.length?"":" ")+i.slice(s)||null}else return!1;return!0})}),addLineWidget:_n(function(e,t,r){return El(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return qr(this,kt(this,e),kt(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=kt(this,e),qr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=kt(this,e);var t=[],r=nt(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var a=r[n];(a.from==null||a.from<=e.ch)&&(a.to==null||a.to>=e.ch)&&t.push(a.marker.parent||a.marker)}return t},findMarks:function(e,t,r){e=kt(this,e),t=kt(this,t);var n=[],a=e.line;return this.iter(e.line,t.line+1,function(i){var o=i.markedSpans;if(o)for(var s=0;s<o.length;s++){var l=o[s];!(l.to!=null&&a==e.line&&e.ch>=l.to||l.from==null&&a!=e.line||l.from!=null&&a==t.line&&l.from>=t.ch)&&(!r||r(l.marker))&&n.push(l.marker.parent||l.marker)}++a}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(a){var i=a.text.length+n;if(i>e)return t=e,!0;e-=i,++r}),kt(this,Oe(r,t))},indexFromPos:function(e){e=kt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new In(_t(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new In(_t(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(n,Yo(this)),n},unlinkDoc:function(e){if(e instanceof an&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Cl(Yo(this));break}if(e.history==this.history){var n=[e.id];yr(e,function(a){return n.push(a.id)},!0),e.history=new Wa(null),e.history.done=Xr(this.history.done,n),e.history.undone=Xr(this.history.undone,n)}},iterLinkedDocs:function(e){yr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Tt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:_n(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&hl(this.cm)})}),In.prototype.eachLine=In.prototype.iter;var Qo=0;function kl(e){var t=this;if(Zo(t),Se(t,e)||ur(t.display,e))return;d(e),L&&(Qo=+new Date);var r=Tr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var a=n.length,i=Array(a),o=0,s=function(){++o==a&&yn(t,function(){r=kt(t.doc,r);var X={from:r,to:r,text:t.doc.splitLines(i.filter(function(ye){return ye!=null}).join(t.doc.lineSeparator())),origin:"paste"};Vr(t.doc,X),jo(t.doc,vr(kt(t.doc,r),kt(t.doc,br(X))))})()},l=function(X,ye){if(t.options.allowDropFileTypes&&le(t.options.allowDropFileTypes,X.type)==-1){s();return}var Me=new FileReader;Me.onerror=function(){return s()},Me.onload=function(){var Be=Me.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Be)){s();return}i[ye]=Be,s()},Me.readAsText(X)},u=0;u<n.length;u++)l(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var C=e.dataTransfer.getData("Text");if(C){var k;if(t.state.draggingText&&!t.state.draggingText.copy&&(k=t.listSelections()),Ka(t.doc,vr(r,r)),k)for(var $=0;$<k.length;++$)$r(t.doc,"",k[$].anchor,k[$].head,"drag");t.replaceSelection(C,"around","paste"),t.display.input.focus()}}catch(X){}}}function Tl(e,t){if(L&&(!e.state.draggingText||+new Date-Qo<100)){b(t);return}if(Se(e,t)||ur(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!he){var r=p("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",J&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),J&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=Tr(e,t);if(!r)return;var n=document.createDocumentFragment();co(e,r,n),e.display.dragCursor||(e.display.dragCursor=p("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,n)}function Zo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function es(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var a=t[n].CodeMirror;a&&r.push(a)}r.length&&r[0].operation(function(){for(var i=0;i<r.length;i++)e(r[i])})}var ts=!1;function Al(){if(ts)return;Rl(),ts=!0}function Rl(){var e;fe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,es(Pl)},100))}),fe(window,"blur",function(){return es(zr)})}function Pl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Er={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"},wa=0;wa<10;wa++)Er[wa+48]=Er[wa+96]=String(wa);for(var Va=65;Va<=90;Va++)Er[Va]=String.fromCharCode(Va);for(var Ca=1;Ca<=12;Ca++)Er[Ca+111]=Er[Ca+63235]="F"+Ca;var cr={};cr.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"},cr.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"},cr.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"},cr.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"]},cr.default=V?cr.macDefault:cr.pcDefault;function Ll(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,a,i,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))a=!0;else throw new Error("Unrecognized modifier name: "+s)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),a&&(e="Shift-"+e),e}function Ml(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var a=rt(r.split(" "),Ll),i=0;i<a.length;i++){var o=void 0,s=void 0;i==a.length-1?(s=a.join(" "),o=n):(s=a.slice(0,i+1).join(" "),o="...");var l=t[s];if(!l)t[s]=o;else if(l!=o)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var u in t)e[u]=t[u];return e}function Jr(e,t,r,n){t=$a(t);var a=t.call?t.call(e,n):t[e];if(a===!1)return"nothing";if(a==="...")return"multi";if(a!=null&&r(a))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Jr(e,t.fallthrough,r,n);for(var i=0;i<t.fallthrough.length;i++){var o=Jr(e,t.fallthrough[i],r,n);if(o)return o}}}function ns(e){var t=typeof e=="string"?e:Er[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function rs(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(G?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(G?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function as(e,t){if(J&&e.keyCode==34&&e.char)return!1;var r=Er[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),rs(r,e,t))}function $a(e){return typeof e=="string"?cr[e]:e}function Yr(e,t){for(var r=e.doc.sel.ranges,n=[],a=0;a<r.length;a++){for(var i=t(r[a]);n.length&&Ge(i.from,Ae(n).to)<=0;){var o=n.pop();if(Ge(o.from,i.from)<0){i.from=o.from;break}}n.push(i)}Hn(e,function(){for(var s=n.length-1;s>=0;s--)$r(e.doc,"",n[s].from,n[s].to,"+delete");Hr(e)})}function Ai(e,t,r){var n=Te(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ri(e,t,r){var n=Ai(e,t.ch,r);return n==null?null:new Oe(t.line,n,r<0?"after":"before")}function Pi(e,t,r,n,a){if(e){t.doc.direction=="rtl"&&(a=-a);var i=ft(r,t.doc.direction);if(i){var o=a<0?Ae(i):i[0],s=a<0==(o.level==1),l=s?"after":"before",u;if(o.level>0||t.doc.direction=="rtl"){var C=Fr(t,r);u=a<0?r.text.length-1:0;var k=nr(t,C,u).top;u=at(function($){return nr(t,C,$).top==k},a<0==(o.level==1)?o.from:o.to-1,u),l=="before"&&(u=Ai(r,u,1))}else u=a<0?o.to:o.from;return new Oe(n,u,l)}}return new Oe(n,a<0?r.text.length:0,a<0?"before":"after")}function Dl(e,t,r,n){var a=ft(t,e.doc.direction);if(!a)return Ri(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var i=ot(a,r.ch,r.sticky),o=a[i];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from<r.ch))return Ri(t,r,n);var s=function(qe,lt){return Ai(t,qe instanceof Oe?qe.ch:qe,lt)},l,u=function(qe){return e.options.lineWrapping?(l=l||Fr(e,t),oo(e,t,l,qe)):{begin:0,end:t.text.length}},C=u(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var k=o.level==1==n<0,$=s(r,k?1:-1);if($!=null&&(k?$<=o.to&&$<=C.end:$>=o.from&&$>=C.begin)){var X=k?"before":"after";return new Oe(r.line,$,X)}}var ye=function(qe,lt,Je){for(var gt=function(en,En){return En?new Oe(r.line,s(en,1),"before"):new Oe(r.line,en,"after")};qe>=0&&qe<a.length;qe+=lt){var Rt=a[qe],Ct=lt>0==(Rt.level!=1),Wt=Ct?Je.begin:s(Je.end,-1);if(Rt.from<=Wt&&Wt<Rt.to)return gt(Wt,Ct);if(Wt=Ct?Rt.from:s(Rt.to,-1),Je.begin<=Wt&&Wt<Je.end)return gt(Wt,Ct)}},Me=ye(i+n,n,C);if(Me)return Me;var Be=n>0?C.end:s(C.begin,-1);return Be!=null&&!(n>0&&Be==t.text.length)&&(Me=ye(n>0?0:a.length-1,n,u(Be)),Me)?Me:null}var Sa={selectAll:zo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),pe)},killLine:function(e){return Yr(e,function(t){if(t.empty()){var r=nt(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Oe(t.head.line+1,0)}:{from:t.head,to:Oe(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Yr(e,function(t){return{from:Oe(t.from().line,0),to:kt(e.doc,Oe(t.to().line+1,0))}})},delLineLeft:function(e){return Yr(e,function(t){return{from:Oe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Yr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Yr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Oe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Oe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return os(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Ee)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Ee)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?os(e,t.head):n},Ee)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,a=0;a<r.length;a++){var i=r[a].from(),o=P(e.getLine(i.line),i.ch,n);t.push(A(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Hn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var a=t[n].head,i=nt(e.doc,a.line).text;if(i){if(a.ch==i.length&&(a=new Oe(a.line,a.ch-1)),a.ch>0)a=new Oe(a.line,a.ch+1),e.replaceRange(i.charAt(a.ch-1)+i.charAt(a.ch-2),Oe(a.line,a.ch-2),a,"+transpose");else if(a.line>e.doc.first){var o=nt(e.doc,a.line-1).text;o&&(a=new Oe(a.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Oe(a.line-1,o.length-1),a,"+transpose"))}}r.push(new Jt(a,a))}e.setSelections(r)})},newlineAndIndent:function(e){return Hn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Hr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var r=nt(e.doc,t),n=Yn(r);return n!=r&&(t=St(n)),Pi(!0,e,n,t,1)}function Nl(e,t){var r=nt(e.doc,t),n=Bi(r);return n!=r&&(t=St(n)),Pi(!0,e,r,t,-1)}function os(e,t){var r=is(e,t.line),n=nt(e.doc,r.line),a=ft(n,e.doc.direction);if(!a||a[0].level==0){var i=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=i&&t.ch;return Oe(r.line,o?0:i,r.sticky)}return r}function qa(e,t,r){if(typeof t=="string"&&(t=Sa[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),a=t(e)!=We}finally{e.display.shift=n,e.state.suppressEdits=!1}return a}function Ul(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var a=Jr(t,e.state.keyMaps[n],r,e);if(a)return a}return e.options.extraKeys&&Jr(t,e.options.extraKeys,r,e)||Jr(t,e.options.keyMap,r,e)}var jl=new ue;function ka(e,t,r,n){var a=e.state.keySeq;if(a){if(ns(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==a&&(e.state.keySeq=null,e.display.input.reset())}),ss(e,a+" "+t,r,n))return!0}return ss(e,t,r,n)}function ss(e,t,r,n){var a=Ul(e,t,n);return a=="multi"&&(e.state.keySeq=t),a=="handled"&&Cn(e,"keyHandled",e,t,r),(a=="handled"||a=="multi")&&(d(r),pi(e)),!!a}function ls(e,t){var r=as(t,!0);return r?t.shiftKey&&!e.state.keySeq?ka(e,"Shift-"+r,t,function(n){return qa(e,n,!0)})||ka(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return qa(e,n)}):ka(e,r,t,function(n){return qa(e,n)}):!1}function Il(e,t,r){return ka(e,"'"+r+"'",t,function(n){return qa(e,n,!0)})}var Li=null;function us(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=D(),Se(t,e))return;L&&R<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ls(t,e);J&&(Li=n?r:null,!n&&r==88&&!Dt&&(V?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),q&&!V&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;re(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(U(t,"CodeMirror-crosshair"),tt(document,"keyup",r),tt(document,"mouseover",r))}fe(document,"keyup",r),fe(document,"mouseover",r)}function cs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Se(this,e)}function ds(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(ur(t.display,e)||Se(t,e)||e.ctrlKey&&!e.altKey||V&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(J&&r==Li){Li=null,d(e);return}if(J&&(!e.which||e.which<10)&&ls(t,e))return;var a=String.fromCharCode(n==null?r:n);if(a=="\b")return;if(Il(t,e,a))return;t.display.input.onKeyPress(e)}var Bl=400,Mi=function(e,t,r){this.time=e,this.pos=t,this.button=r};Mi.prototype.compare=function(e,t,r){return this.time+Bl>e&&Ge(t,this.pos)==0&&r==this.button};var Ta,Oa;function Wl(e,t){var r=+new Date;return Oa&&Oa.compare(r,e,t)?(Ta=Oa=null,"triple"):Ta&&Ta.compare(r,e,t)?(Oa=new Mi(r,e,t),Ta=null,"double"):(Ta=new Mi(r,e,t),Oa=null,"single")}function fs(e){var t=this,r=t.display;if(Se(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,ur(r,e)){x||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Di(t,e))return;var n=Tr(t,e),a=Q(e),i=n?Wl(n,a):"single";if(window.focus(),a==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,a,n,i,e))return;a==1?n?Kl(t,n,i,e):z(e)==r.scroller&&d(e):a==2?(n&&Ha(t.doc,n),setTimeout(function(){return r.input.focus()},20)):a==3&&(f?t.display.input.onContextMenu(e):ho(t))}function zl(e,t,r,n,a){var i="Click";return n=="double"?i="Double"+i:n=="triple"&&(i="Triple"+i),i=(t==1?"Left":t==2?"Middle":"Right")+i,ka(e,rs(i,a),a,function(o){if(typeof o=="string"&&(o=Sa[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=We}finally{e.state.suppressEdits=!1}return s})}function Hl(e,t,r){var n=e.getOption("configureMouse"),a=n?n(e,t,r):{};if(a.unit==null){var i=te?r.shiftKey&&r.metaKey:r.altKey;a.unit=i?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(a.extend==null||e.doc.extend)&&(a.extend=e.doc.extend||r.shiftKey),a.addNew==null&&(a.addNew=V?r.metaKey:r.ctrlKey),a.moveOnDrag==null&&(a.moveOnDrag=!(V?r.altKey:r.ctrlKey)),a}function Kl(e,t,r,n){L?setTimeout(_(fo,e),0):e.curOp.focus=D();var a=Hl(e,r,n),i=e.doc.sel,o;e.options.dragDrop&&oe&&!e.isReadOnly()&&r=="single"&&(o=i.contains(t))>-1&&(Ge((o=i.ranges[o]).from(),t)<0||t.xRel>0)&&(Ge(o.to(),t)>0||t.xRel<0)?Xl(e,n,t,a):Gl(e,n,t,a)}function Xl(e,t,r,n){var a=e.display,i=!1,o=yn(e,function(u){x&&(a.scroller.draggable=!1),e.state.draggingText=!1,tt(a.wrapper.ownerDocument,"mouseup",o),tt(a.wrapper.ownerDocument,"mousemove",s),tt(a.scroller,"dragstart",l),tt(a.scroller,"drop",o),i||(d(u),n.addNew||Ha(e.doc,r,null,null,n.extend),x&&!he||L&&R==9?setTimeout(function(){a.wrapper.ownerDocument.body.focus({preventScroll:!0}),a.input.focus()},20):a.input.focus())}),s=function(u){i=i||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},l=function(){return i=!0};x&&(a.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,a.scroller.dragDrop&&a.scroller.dragDrop(),fe(a.wrapper.ownerDocument,"mouseup",o),fe(a.wrapper.ownerDocument,"mousemove",s),fe(a.scroller,"dragstart",l),fe(a.scroller,"drop",o),ho(e),setTimeout(function(){return a.input.focus()},20)}function hs(e,t,r){if(r=="char")return new Jt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Jt(Oe(t.line,0),kt(e.doc,Oe(t.line+1,0)));var n=r(e,t);return new Jt(n.from,n.to)}function Gl(e,t,r,n){var a=e.display,i=e.doc;d(t);var o,s,l=i.sel,u=l.ranges;if(n.addNew&&!n.extend?(s=i.sel.contains(r),s>-1?o=u[s]:o=new Jt(r,r)):(o=i.sel.primary(),s=i.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new Jt(r,r)),r=Tr(e,t,!0,!0),s=-1;else{var C=hs(e,r,n.unit);n.extend?o=Ti(o,C.anchor,C.head,n.extend):o=C}n.addNew?s==-1?(s=u.length,On(i,Zn(e,u.concat([o]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&n.unit=="char"&&!n.extend?(On(i,Zn(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=i.sel):Oi(i,s,o,Fe):(s=0,On(i,new $n([o],0),Fe),l=i.sel);var k=r;function $(Je){if(Ge(k,Je)==0)return;if(k=Je,n.unit=="rectangle"){for(var gt=[],Rt=e.options.tabSize,Ct=P(nt(i,r.line).text,r.ch,Rt),Wt=P(nt(i,Je.line).text,Je.ch,Rt),en=Math.min(Ct,Wt),En=Math.max(Ct,Wt),on=Math.min(r.line,Je.line),Kn=Math.min(e.lastLine(),Math.max(r.line,Je.line));on<=Kn;on++){var Fn=nt(i,on).text,pn=xe(Fn,en,Rt);en==En?gt.push(new Jt(Oe(on,pn),Oe(on,pn))):Fn.length>pn&>.push(new Jt(Oe(on,pn),Oe(on,xe(Fn,En,Rt))))}gt.length||gt.push(new Jt(r,r)),On(i,Zn(e,l.ranges.slice(0,s).concat(gt),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Je)}else{var Bn=o,Sn=hs(e,Je,n.unit),gn=Bn.anchor,mn;Ge(Sn.anchor,gn)>0?(mn=Sn.head,gn=rn(Bn.from(),Sn.anchor)):(mn=Sn.anchor,gn=je(Bn.to(),Sn.head));var ln=l.ranges.slice(0);ln[s]=Vl(e,new Jt(kt(i,gn),mn)),On(i,Zn(e,ln,s),Fe)}}var X=a.wrapper.getBoundingClientRect(),ye=0;function Me(Je){var gt=++ye,Rt=Tr(e,Je,!0,n.unit=="rectangle");if(!Rt)return;if(Ge(Rt,k)!=0){e.curOp.focus=D(),$(Rt);var Ct=ja(a,i);(Rt.line>=Ct.to||Rt.line<Ct.from)&&setTimeout(yn(e,function(){ye==gt&&Me(Je)}),150)}else{var Wt=Je.clientY<X.top?-20:Je.clientY>X.bottom?20:0;Wt&&setTimeout(yn(e,function(){if(ye!=gt)return;a.scroller.scrollTop+=Wt,Me(Je)}),50)}}function Be(Je){e.state.selectingText=!1,ye=Infinity,Je&&(d(Je),a.input.focus()),tt(a.wrapper.ownerDocument,"mousemove",qe),tt(a.wrapper.ownerDocument,"mouseup",lt),i.history.lastSelOrigin=null}var qe=yn(e,function(Je){Je.buttons===0||!Q(Je)?Be(Je):Me(Je)}),lt=yn(e,Be);e.state.selectingText=lt,fe(a.wrapper.ownerDocument,"mousemove",qe),fe(a.wrapper.ownerDocument,"mouseup",lt)}function Vl(e,t){var r=t.anchor,n=t.head,a=nt(e.doc,r.line);if(Ge(r,n)==0&&r.sticky==n.sticky)return t;var i=ft(a);if(!i)return t;var o=ot(i,r.ch,r.sticky),s=i[o];if(s.from!=r.ch&&s.to!=r.ch)return t;var l=o+(s.from==r.ch==(s.level!=1)?0:1);if(l==0||l==i.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var C=ot(i,n.ch,n.sticky),k=C-o||(n.ch-r.ch)*(s.level==1?-1:1);C==l-1||C==l?u=k<0:u=k>0}var $=i[l+(u?-1:0)],X=u==($.level==1),ye=X?$.from:$.to,Me=X?"after":"before";return r.ch==ye&&r.sticky==Me?t:new Jt(new Oe(r.line,ye,Me),n)}function ps(e,t,r,n){var a,i;if(t.touches)a=t.touches[0].clientX,i=t.touches[0].clientY;else try{a=t.clientX,i=t.clientY}catch($){return!1}if(a>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&d(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(i>s.bottom||!S(e,r))return g(t);i-=s.top-o.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var u=o.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=a){var C=nn(e.doc,i),k=e.display.gutterSpecs[l];return ve(e,r,e,C,k.className,t),g(t)}}}function Di(e,t){return ps(e,t,"gutterClick",!0)}function ms(e,t){if(ur(e.display,t)||$l(e,t))return;if(Se(e,t,"contextmenu"))return;f||e.display.input.onContextMenu(t)}function $l(e,t){return S(e,"gutterContextMenu")?ps(e,t,"gutterContextMenu",!1):!1}function gs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),la(e)}var Qr={toString:function(){return"CodeMirror.Init"}},vs={},Ja={};function ql(e){var t=e.optionHandlers;function r(n,a,i,o){e.defaults[n]=a,i&&(t[n]=o?function(s,l,u){u!=Qr&&i(s,l,u)}:i)}e.defineOption=r,e.Init=Qr,r("value","",function(n,a){return n.setValue(a)},!0),r("mode",null,function(n,a){n.doc.modeOption=a,Ci(n)},!0),r("indentUnit",2,Ci,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){ga(n),la(n),jn(n)},!0),r("lineSeparator",null,function(n,a){if(n.doc.lineSep=a,!a)return;var i=[],o=n.doc.first;n.doc.iter(function(l){for(var u=0;;){var C=l.text.indexOf(a,u);if(C==-1)break;u=C+a.length,i.push(Oe(o,C))}o++});for(var s=i.length-1;s>=0;s--)$r(n.doc,a,i[s],Oe(i[s].line,i[s].ch+a.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,a,i){n.state.specialChars=new RegExp(a.source+(a.test(" ")?"":"| "),"g"),i!=Qr&&n.refresh()}),r("specialCharPlaceholder",aa,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",Z?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,a){return n.getInputField().spellcheck=a},!0),r("autocorrect",!1,function(n,a){return n.getInputField().autocorrect=a},!0),r("autocapitalize",!1,function(n,a){return n.getInputField().autocapitalize=a},!0),r("rtlMoveVisually",!De),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){gs(n),ma(n)},!0),r("keyMap","default",function(n,a,i){var o=$a(a),s=i!=Qr&&$a(i);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Yl,!0),r("gutters",[],function(n,a){n.display.gutterSpecs=xi(a,n.options.lineNumbers),ma(n)},!0),r("fixedGutter",!0,function(n,a){n.display.gutters.style.left=a?fi(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Kr(n)},!0),r("scrollbarStyle","native",function(n){yo(n),Kr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,a){n.display.gutterSpecs=xi(n.options.gutters,a),ma(n)},!0),r("firstLineNumber",1,ma,!0),r("lineNumberFormatter",function(n){return n},ma,!0),r("showCursorWhenSelecting",!1,ua,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,a){a=="nocursor"&&(zr(n),n.display.input.blur()),n.display.input.readOnlyChanged(a)}),r("screenReaderLabel",null,function(n,a){a=a===""?null:a,n.display.input.screenReaderLabelChanged(a)}),r("disableInput",!1,function(n,a){a||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,ua,!0),r("singleCursorHeightPerLine",!0,ua,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ga,!0),r("addModeClass",!1,ga,!0),r("pollInterval",100),r("undoDepth",200,function(n,a){return n.doc.history.undoDepth=a}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,ga,!0),r("moveInputWithCursor",!0,function(n,a){a||n.display.input.resetPosition()}),r("tabindex",null,function(n,a){return n.display.input.getField().tabIndex=a||""}),r("autofocus",null),r("direction","ltr",function(n,a){return n.doc.setDirection(a)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=Qr;if(!t!=!n){var a=e.display.dragFunctions,i=t?fe:tt;i(e.display.scroller,"dragstart",a.start),i(e.display.scroller,"dragenter",a.enter),i(e.display.scroller,"dragover",a.over),i(e.display.scroller,"dragleave",a.leave),i(e.display.scroller,"drop",a.drop)}}function Yl(e){e.options.lineWrapping?(re(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(U(e.display.wrapper,"CodeMirror-wrap"),vn(e)),hi(e),jn(e),la(e),setTimeout(function(){return Kr(e)},100)}function an(e,t){var r=this;if(!(this instanceof an))return new an(e,t);this.options=t=t?c(t):{},c(vs,t,!1);var n=t.value;typeof n=="string"?n=new In(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var a=new an.inputStyles[t.inputStyle](this),i=this.display=new cl(e,n,a,t);i.wrapper.CodeMirror=this,gs(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),yo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ue,keySeq:null,specialChars:null},t.autofocus&&!Z&&i.input.focus(),L&&R<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ql(this),Al(),Pr(this),this.curOp.forceUpdate=!0,Ao(this,n),t.autofocus&&!Z||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&mi(r)},20):zr(this);for(var o in Ja)Ja.hasOwnProperty(o)&&Ja[o](this,t[o],Qr);xo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Ni.length;++s)Ni[s](this);Lr(this),x&&t.lineWrapping&&getComputedStyle(i.lineDiv).textRendering=="optimizelegibility"&&(i.lineDiv.style.textRendering="auto")}an.defaults=vs,an.optionHandlers=Ja;function Ql(e){var t=e.display;fe(t.scroller,"mousedown",yn(e,fs)),L&&R<11?fe(t.scroller,"dblclick",yn(e,function(l){if(Se(e,l))return;var u=Tr(e,l);if(!u||Di(e,l)||ur(e.display,l))return;d(l);var C=e.findWordAt(u);Ha(e.doc,C.anchor,C.head)})):fe(t.scroller,"dblclick",function(l){return Se(e,l)||d(l)}),fe(t.scroller,"contextmenu",function(l){return ms(e,l)}),fe(t.input.getField(),"contextmenu",function(l){t.scroller.contains(l.target)||ms(e,l)});var r,n={end:0};function a(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function i(l){if(l.touches.length!=1)return!1;var u=l.touches[0];return u.radiusX<=1&&u.radiusY<=1}function o(l,u){if(u.left==null)return!0;var C=u.left-l.left,k=u.top-l.top;return C*C+k*k>20*20}fe(t.scroller,"touchstart",function(l){if(!Se(e,l)&&!i(l)&&!Di(e,l)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},l.touches.length==1&&(t.activeTouch.left=l.touches[0].pageX,t.activeTouch.top=l.touches[0].pageY)}}),fe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),fe(t.scroller,"touchend",function(l){var u=t.activeTouch;if(u&&!ur(t,l)&&u.left!=null&&!u.moved&&new Date-u.start<300){var C=e.coordsChar(t.activeTouch,"page"),k;!u.prev||o(u,u.prev)?k=new Jt(C,C):!u.prev.prev||o(u,u.prev.prev)?k=e.findWordAt(C):k=new Jt(Oe(C.line,0),kt(e.doc,Oe(C.line+1,0))),e.setSelection(k.anchor,k.head),e.focus(),d(l)}a()}),fe(t.scroller,"touchcancel",a),fe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(da(e,t.scroller.scrollTop),Ar(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))}),fe(t.scroller,"mousewheel",function(l){return So(e,l)}),fe(t.scroller,"DOMMouseScroll",function(l){return So(e,l)}),fe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(l){Se(e,l)||b(l)},over:function(l){Se(e,l)||(Ol(e,l),b(l))},start:function(l){return Tl(e,l)},drop:yn(e,kl),leave:function(l){Se(e,l)||Zo(e)}};var s=t.input.getField();fe(s,"keyup",function(l){return cs.call(e,l)}),fe(s,"keydown",yn(e,us)),fe(s,"keypress",yn(e,ds)),fe(s,"focus",function(l){return mi(e,l)}),fe(s,"blur",function(l){return zr(e,l)})}var Ni=[];an.defineInitHook=function(e){return Ni.push(e)};function Aa(e,t,r,n){var a=e.doc,i;r==null&&(r="add"),r=="smart"&&(a.mode.indent?i=se(e,t).state:r="prev");var o=e.options.tabSize,s=nt(a,t),l=P(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var u=s.text.match(/^\s*/)[0],C;if(!n&&!/\S/.test(s.text))C=0,r="not";else if(r=="smart"&&(C=a.mode.indent(i,s.text.slice(u.length),s.text),C==We||C>150)){if(!n)return;r="prev"}r=="prev"?t>a.first?C=P(nt(a,t-1).text,null,o):C=0:r=="add"?C=l+e.options.indentUnit:r=="subtract"?C=l-e.options.indentUnit:typeof r=="number"&&(C=l+r),C=Math.max(0,C);var k="",$=0;if(e.options.indentWithTabs)for(var X=Math.floor(C/o);X;--X)$+=o,k+=" ";if($<C&&(k+=A(C-$)),k!=u)return $r(a,k,Oe(t,0),Oe(t,u.length),"+input"),s.stateAfter=null,!0;for(var ye=0;ye<a.sel.ranges.length;ye++){var Me=a.sel.ranges[ye];if(Me.head.line==t&&Me.head.ch<u.length){var Be=Oe(t,u.length);Oi(a,ye,new Jt(Be,Be));break}}}var er=null;function Ya(e){er=e}function Ui(e,t,r,n,a){var i=e.doc;e.display.shift=!1,n||(n=i.sel);var o=+new Date-200,s=a=="paste"||e.state.pasteIncoming>o,l=Tt(t),u=null;if(s&&n.ranges.length>1)if(er&&er.text.join(`
|
|
`)==t){if(n.ranges.length%er.text.length==0){u=[];for(var C=0;C<er.text.length;C++)u.push(i.splitLines(er.text[C]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=rt(l,function(qe){return[qe]}));for(var k=e.curOp.updateInput,$=n.ranges.length-1;$>=0;$--){var X=n.ranges[$],ye=X.from(),Me=X.to();X.empty()&&(r&&r>0?ye=Oe(ye.line,ye.ch-r):e.state.overwrite&&!s?Me=Oe(Me.line,Math.min(nt(i,Me.line).text.length,Me.ch+Ae(l).length)):s&&er&&er.lineWise&&er.text.join(`
|
|
`)==l.join(`
|
|
`)&&(ye=Me=Oe(ye.line,0)));var Be={from:ye,to:Me,text:u?u[$%u.length]:l,origin:a||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Vr(e.doc,Be),Cn(e,"inputRead",e,Be)}t&&!s&&ys(e,t),Hr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=k),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function bs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Hn(t,function(){return Ui(t,r,0,null,"paste")}),!0}function ys(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var a=r.ranges[n];if(a.head.ch>100||n&&r.ranges[n-1].head.line==a.head.line)continue;var i=e.getModeAt(a.head),o=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(t.indexOf(i.electricChars.charAt(s))>-1){o=Aa(e,a.head.line,"smart");break}}else i.electricInput&&(i.electricInput.test(nt(e.doc,a.head.line).text.slice(0,a.head.ch))&&(o=Aa(e,a.head.line,"smart")));o&&Cn(e,"electricInput",e,a.head.line)}}function _s(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var a=e.doc.sel.ranges[n].head.line,i={anchor:Oe(a,0),head:Oe(a+1,0)};r.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:r}}function Es(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function xs(){var e=p("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=p("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return x?e.style.width="1000px":e.setAttribute("wrap","off"),N&&(e.style.border="1px solid black"),Es(e),t}function Zl(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,a){var i=this.options,o=i[n];if(i[n]==a&&n!="mode")return;i[n]=a,t.hasOwnProperty(n)&&yn(this,t[n])(this,a,o),ve(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,a){this.state.keyMaps[a?"push":"unshift"]($a(n))},removeKeyMap:function(n){for(var a=this.state.keyMaps,i=0;i<a.length;++i)if(a[i]==n||a[i].name==n)return a.splice(i,1),!0},addOverlay:Dn(function(n,a){var i=n.token?n:e.getMode(this.options,n);if(i.startState)throw new Error("Overlays may not be stateful.");Re(this.state.overlays,{mode:i,modeSpec:n,opaque:a&&a.opaque,priority:a&&a.priority||0},function(o){return o.priority}),this.state.modeGen++,jn(this)}),removeOverlay:Dn(function(n){for(var a=this.state.overlays,i=0;i<a.length;++i){var o=a[i].modeSpec;if(o==n||typeof n=="string"&&o.name==n){a.splice(i,1),this.state.modeGen++,jn(this);return}}}),indentLine:Dn(function(n,a,i){typeof a!="string"&&typeof a!="number"&&(a==null?a=this.options.smartIndent?"smart":"prev":a=a?"add":"subtract"),Un(this.doc,n)&&Aa(this,n,a,i)}),indentSelection:Dn(function(n){for(var a=this.doc.sel.ranges,i=-1,o=0;o<a.length;o++){var s=a[o];if(s.empty())s.head.line>i&&(Aa(this,s.head.line,n,!0),i=s.head.line,o==this.doc.sel.primIndex&&Hr(this));else{var l=s.from(),u=s.to(),C=Math.max(i,l.line);i=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var k=C;k<i;++k)Aa(this,k,n);var $=this.doc.sel.ranges;l.ch==0&&a.length==$.length&&$[o].from().ch>0&&Oi(this.doc,o,new Jt(l,$[o].to()),pe)}}}),getTokenAt:function(n,a){return mt(this,n,a)},getLineTokens:function(n,a){return mt(this,Oe(n),a,!0)},getTokenTypeAt:function(n){n=kt(this.doc,n);var a=wt(this,nt(this.doc,n.line)),i=0,o=(a.length-1)/2,s=n.ch,l;if(s==0)l=a[2];else for(;;){var u=i+o>>1;if((u?a[u*2-1]:0)>=s)o=u;else if(a[u*2+1]<s)i=u+1;else{l=a[u*2+2];break}}var C=l?l.indexOf("overlay "):-1;return C<0?l:C==0?null:l.slice(0,C-1)},getModeAt:function(n){var a=this.doc.mode;return a.innerMode?e.innerMode(a,this.getTokenAt(n).state).mode:a},getHelper:function(n,a){return this.getHelpers(n,a)[0]},getHelpers:function(n,a){var i=[];if(!r.hasOwnProperty(a))return i;var o=r[a],s=this.getModeAt(n);if(typeof s[a]=="string")o[s[a]]&&i.push(o[s[a]]);else if(s[a])for(var l=0;l<s[a].length;l++){var u=o[s[a][l]];u&&i.push(u)}else s.helperType&&o[s.helperType]?i.push(o[s.helperType]):o[s.name]&&i.push(o[s.name]);for(var C=0;C<o._global.length;C++){var k=o._global[C];k.pred(s,this)&&le(i,k.val)==-1&&i.push(k.val)}return i},getStateAfter:function(n,a){var i=this.doc;return n=qn(i,n==null?i.first+i.size-1:n),se(this,n+1,a).state},cursorCoords:function(n,a){var i,o=this.doc.sel.primary();return n==null?i=o.head:typeof n=="object"?i=kt(this.doc,n):i=n?o.from():o.to(),Qn(this,i,a||"page")},charCoords:function(n,a){return si(this,kt(this.doc,n),a||"page")},coordsChar:function(n,a){return n=ro(this,n,a||"page"),ui(this,n.left,n.top)},lineAtHeight:function(n,a){return n=ro(this,{top:n,left:0},a||"page").top,nn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,a,i){var o=!1,s;if(typeof n=="number"){var l=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>l&&(n=l,o=!0),s=nt(this.doc,n)}else s=n;return Ma(this,s,{top:0,left:0},a||"page",i||o).top+(o?this.doc.height-tn(s):0)},defaultTextHeight:function(){return Br(this.display)},defaultCharWidth:function(){return Wr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,a,i,o,s){var l=this.display;n=Qn(this,kt(this.doc,n));var u=n.bottom,C=n.left;if(a.style.position="absolute",a.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(a),l.sizer.appendChild(a),o=="over")u=n.top;else if(o=="above"||o=="near"){var k=Math.max(l.wrapper.clientHeight,this.doc.height),$=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);(o=="above"||n.bottom+a.offsetHeight>k)&&n.top>a.offsetHeight?u=n.top-a.offsetHeight:n.bottom+a.offsetHeight<=k&&(u=n.bottom),C+a.offsetWidth>$&&(C=$-a.offsetWidth)}a.style.top=u+"px",a.style.left=a.style.right="",s=="right"?(C=l.sizer.clientWidth-a.offsetWidth,a.style.right="0px"):(s=="left"?C=0:s=="middle"&&(C=(l.sizer.clientWidth-a.offsetWidth)/2),a.style.left=C+"px"),i&&Js(this,{left:C,top:u,right:C+a.offsetWidth,bottom:u+a.offsetHeight})},triggerOnKeyDown:Dn(us),triggerOnKeyPress:Dn(ds),triggerOnKeyUp:cs,triggerOnMouseDown:Dn(fs),execCommand:function(n){if(Sa.hasOwnProperty(n))return Sa[n].call(null,this)},triggerElectric:Dn(function(n){ys(this,n)}),findPosH:function(n,a,i,o){var s=1;a<0&&(s=-1,a=-a);for(var l=kt(this.doc,n),u=0;u<a&&!(l=ji(this.doc,l,s,i,o),l.hitSide);++u);return l},moveH:Dn(function(n,a){var i=this;this.extendSelectionsBy(function(o){return i.display.shift||i.doc.extend||o.empty()?ji(i.doc,o.head,n,a,i.options.rtlMoveVisually):n<0?o.from():o.to()},Ee)}),deleteH:Dn(function(n,a){var i=this.doc.sel,o=this.doc;i.somethingSelected()?o.replaceSelection("",null,"+delete"):Yr(this,function(s){var l=ji(o,s.head,n,a,!1);return n<0?{from:l,to:s.head}:{from:s.head,to:l}})}),findPosV:function(n,a,i,o){var s=1,l=o;a<0&&(s=-1,a=-a);for(var u=kt(this.doc,n),C=0;C<a;++C){var k=Qn(this,u,"div");if(l==null?l=k.left:k.left=l,u=ws(this,k,s,i),u.hitSide)break}return u},moveV:Dn(function(n,a){var i=this,o=this.doc,s=[],l=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(C){if(l)return n<0?C.from():C.to();var k=Qn(i,C.head,"div");C.goalColumn!=null&&(k.left=C.goalColumn),s.push(k.left);var $=ws(i,k,n,a);return a=="page"&&C==o.sel.primary()&&vi(i,si(i,$,"div").top-k.top),$},Ee),s.length)for(var u=0;u<o.sel.ranges.length;u++)o.sel.ranges[u].goalColumn=s[u]}),findWordAt:function(n){var a=this.doc,i=nt(a,n.line).text,o=n.ch,s=n.ch;if(i){var l=this.getHelper(n,"wordChars");(n.sticky=="before"||s==i.length)&&o?--o:++s;for(var u=i.charAt(o),C=Ne(u,l)?function(k){return Ne(k,l)}:/\s/.test(u)?function(k){return/\s/.test(k)}:function(k){return!/\s/.test(k)&&!Ne(k)};o>0&&C(i.charAt(o-1));)--o;for(;s<i.length&&C(i.charAt(s));)++s}return new Jt(Oe(n.line,o),Oe(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?re(this.display.cursorDiv,"CodeMirror-overwrite"):U(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Dn(function(n,a){ca(this,n,a)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-tr(this)-this.display.barHeight,width:n.scrollWidth-tr(this)-this.display.barWidth,clientHeight:ai(this),clientWidth:Sr(this)}},scrollIntoView:Dn(function(n,a){n==null?(n={from:this.doc.sel.primary().head,to:null},a==null&&(a=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Oe(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=a||0,n.from.line!=null?Ys(this,n):mo(this,n.from,n.to,n.margin)}),setSize:Dn(function(n,a){var i=this,o=function(l){return typeof l=="number"||/^\d+$/.test(String(l))?l+"px":l};n!=null&&(this.display.wrapper.style.width=o(n)),a!=null&&(this.display.wrapper.style.height=o(a)),this.options.lineWrapping&&eo(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(l){if(l.widgets){for(var u=0;u<l.widgets.length;u++)if(l.widgets[u].noHScroll){mr(i,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,ve(this,"refresh",this)}),operation:function(n){return Hn(this,n)},startOperation:function(){return Pr(this)},endOperation:function(){return Lr(this)},refresh:Dn(function(){var n=this.display.cachedTextHeight;jn(this),this.curOp.forceUpdate=!0,la(this),ca(this,this.doc.scrollLeft,this.doc.scrollTop),_i(this.display),(n==null||Math.abs(n-Br(this.display))>.5||this.options.lineWrapping)&&hi(this),ve(this,"refresh",this)}),swapDoc:Dn(function(n){var a=this.doc;return a.cm=null,this.state.selectingText&&this.state.selectingText(),Ao(this,n),la(this),this.display.input.reset(),ca(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Cn(this,"swapDoc",this,a),a}),phrase:function(n){var a=this.options.phrases;return a&&Object.prototype.hasOwnProperty.call(a,n)?a[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}},v(e),e.registerHelper=function(n,a,i){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][a]=i},e.registerGlobalHelper=function(n,a,i,o){e.registerHelper(n,a,o),r[n]._global.push({pred:i,val:o})}}function ji(e,t,r,n,a){var i=t,o=r,s=nt(e,t.line),l=a&&e.direction=="rtl"?-r:r;function u(){var lt=t.line+l;return lt<e.first||lt>=e.first+e.size?!1:(t=new Oe(lt,t.ch,t.sticky),s=nt(e,lt))}function C(lt){var Je;if(n=="codepoint"){var gt=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(gt)?Je=null:Je=new Oe(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(gt>=55296&><56320?2:1))),-r)}else a?Je=Dl(e.cm,s,t,r):Je=Ri(s,t,r);if(Je==null)if(!lt&&u())t=Pi(a,e.cm,s,t.line,l);else return!1;else t=Je;return!0}if(n=="char"||n=="codepoint")C();else if(n=="column")C(!0);else if(n=="word"||n=="group")for(var k=null,$=n=="group",X=e.cm&&e.cm.getHelper(t,"wordChars"),ye=!0;!(r<0&&!C(!ye));ye=!1){var Me=s.text.charAt(t.ch)||`
|
|
`,Be=Ne(Me,X)?"w":$&&Me==`
|
|
`?"n":!$||/\s/.test(Me)?null:"p";if($&&!ye&&!Be&&(Be="s"),k&&k!=Be){r<0&&(r=1,C(),t.sticky="after");break}if(Be&&(k=Be),r>0&&!C(!ye))break}var qe=Xa(e,t,i,o,!0);return Xt(i,qe)&&(qe.hitSide=!0),qe}function ws(e,t,r,n){var a=e.doc,i=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*Br(e.display),3);o=(r>0?t.bottom:t.top)+r*l}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var u;!(u=ui(e,i,o),!u.outside);){if(r<0?o<=0:o>=a.height){u.hitSide=!0;break}o+=r*5}return u}var Zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Zt.prototype.init=function(e){var t=this,r=this,n=r.cm,a=r.div=e.lineDiv;Es(a,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function i(s){for(var l=s.target;l;l=l.parentNode){if(l==a)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(l.className))break}return!1}fe(a,"paste",function(s){if(!i(s)||Se(n,s)||bs(s,n))return;R<=11&&setTimeout(yn(n,function(){return t.updateFromDOM()}),20)}),fe(a,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),fe(a,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),fe(a,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),fe(a,"touchstart",function(){return r.forceCompositionEnd()}),fe(a,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!i(s)||Se(n,s))return;if(n.somethingSelected())Ya({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var l=_s(n);Ya({lineWise:!0,text:l.text}),s.type=="cut"&&n.operation(function(){n.setSelections(l.ranges,0,pe),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var u=er.text.join(`
|
|
`);if(s.clipboardData.setData("Text",u),s.clipboardData.getData("Text")==u){s.preventDefault();return}}var C=xs(),k=C.firstChild;n.display.lineSpace.insertBefore(C,n.display.lineSpace.firstChild),k.value=er.text.join(`
|
|
`);var $=document.activeElement;me(k),setTimeout(function(){n.display.lineSpace.removeChild(C),$.focus(),$==a&&r.showPrimarySelection()},50)}fe(a,"copy",o),fe(a,"cut",o)},Zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Zt.prototype.prepareSelection=function(){var e=uo(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,r=t.doc.sel.primary(),n=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var i=Qa(t,e.anchorNode,e.anchorOffset),o=Qa(t,e.focusNode,e.focusOffset);if(i&&!i.bad&&o&&!o.bad&&Ge(rn(i,o),n)==0&&Ge(je(i,o),a)==0)return;var s=t.display.view,l=n.line>=t.display.viewFrom&&Cs(t,n)||{node:s[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&Cs(t,a);if(!u){var C=s[s.length-1].measure,k=C.maps?C.maps[C.maps.length-1]:C.map;u={node:k[k.length-1],offset:k[k.length-2]-k[k.length-3]}}if(!l||!u){e.removeAllRanges();return}var $=e.rangeCount&&e.getRangeAt(0),X;try{X=T(l.node,l.offset,u.offset,u.node)}catch(ye){}X&&(!q&&t.state.focused?(e.collapse(l.node,l.offset),X.collapsed||(e.removeAllRanges(),e.addRange(X))):(e.removeAllRanges(),e.addRange(X)),$&&e.anchorNode==null?e.addRange($):q&&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){E(this.cm.display.cursorDiv,e.cursors),E(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 y(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():Hn(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(M&&H&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var r=Qa(t,e.anchorNode,e.anchorOffset),n=Qa(t,e.focusNode,e.focusOffset);r&&n&&Hn(t,function(){On(t.doc,vr(r,n),pe),(r.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,r=e.doc.sel.primary(),n=r.from(),a=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Oe(n.line-1,nt(e.doc,n.line-1).length)),a.ch==nt(e.doc,a.line).text.length&&a.line<e.lastLine()&&(a=Oe(a.line+1,0)),n.line<t.viewFrom||a.line>t.viewTo-1)return!1;var i,o,s;n.line==t.viewFrom||(i=Or(e,n.line))==0?(o=St(t.view[0].line),s=t.view[0].node):(o=St(t.view[i].line),s=t.view[i-1].node.nextSibling);var l=Or(e,a.line),u,C;if(l==t.view.length-1?(u=t.viewTo-1,C=t.lineDiv.lastChild):(u=St(t.view[l+1].line)-1,C=t.view[l+1].node.previousSibling),!s)return!1;for(var k=e.doc.splitLines(tu(e,s,C,o,u)),$=Ft(e.doc,Oe(o,0),Oe(u,nt(e.doc,u).text.length));k.length>1&&$.length>1;)if(Ae(k)==Ae($))k.pop(),$.pop(),u--;else if(k[0]==$[0])k.shift(),$.shift(),o++;else break;for(var X=0,ye=0,Me=k[0],Be=$[0],qe=Math.min(Me.length,Be.length);X<qe&&Me.charCodeAt(X)==Be.charCodeAt(X);)++X;for(var lt=Ae(k),Je=Ae($),gt=Math.min(lt.length-(k.length==1?X:0),Je.length-($.length==1?X:0));ye<gt&<.charCodeAt(lt.length-ye-1)==Je.charCodeAt(Je.length-ye-1);)++ye;if(k.length==1&&$.length==1&&o==n.line)for(;X&&X>n.ch&<.charCodeAt(lt.length-ye-1)==Je.charCodeAt(Je.length-ye-1);)X--,ye++;k[k.length-1]=lt.slice(0,lt.length-ye).replace(/^\u200b+/,""),k[0]=k[0].slice(X).replace(/\u200b+$/,"");var Rt=Oe(o,X),Ct=Oe(u,$.length?Ae($).length-ye:0);if(k.length>1||k[0]||Ge(Rt,Ct))return $r(e.doc,k,Rt,Ct,"+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())&&Hn(this.cm,function(){return jn(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()||yn(this.cm,Ui)(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 Cs(e,t){var r=ii(e,t.line);if(!r||r.hidden)return null;var n=nt(e.doc,t.line),a=qi(r,n,t.line),i=ft(n,e.doc.direction),o="left";if(i){var s=ot(i,t.ch);o=s%2?"right":"left"}var l=Qi(a.map,t.ch,o);return l.offset=l.collapse=="right"?l.end:l.start,l}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Zr(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,a){var i="",o=!1,s=e.doc.lineSeparator(),l=!1;function u(X){return function(ye){return ye.id==X}}function C(){o&&(i+=s,l&&(i+=s),o=l=!1)}function k(X){X&&(C(),i+=X)}function $(X){if(X.nodeType==1){var ye=X.getAttribute("cm-text");if(ye){k(ye);return}var Me=X.getAttribute("cm-marker"),Be;if(Me){var qe=e.findMarks(Oe(n,0),Oe(a+1,0),u(+Me));qe.length&&(Be=qe[0].find(0))&&k(Ft(e.doc,Be.from,Be.to).join(s));return}if(X.getAttribute("contenteditable")=="false")return;var lt=/^(pre|div|p|li|table|br)$/i.test(X.nodeName);if(!/^br$/i.test(X.nodeName)&&X.textContent.length==0)return;lt&&C();for(var Je=0;Je<X.childNodes.length;Je++)$(X.childNodes[Je]);/^(pre|p)$/i.test(X.nodeName)&&(l=!0),lt&&(o=!0)}else X.nodeType==3&&k(X.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!($(t),t==r);)t=t.nextSibling,l=!1;return i}function Qa(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Zr(e.clipPos(Oe(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var a=0;a<e.display.view.length;a++){var i=e.display.view[a];if(i.node==n)return nu(i,t,r)}}function nu(e,t,r){var n=e.text.firstChild,a=!1;if(!t||!y(n,t))return Zr(Oe(St(e.line),0),!0);if(t==n&&(a=!0,t=n.childNodes[r],r=0,!t)){var i=e.rest?Ae(e.rest):e.line;return Zr(Oe(St(i),i.text.length),a)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var l=e.measure,u=l.maps;function C(Be,qe,lt){for(var Je=-1;Je<(u?u.length:0);Je++)for(var gt=Je<0?l.map:u[Je],Rt=0;Rt<gt.length;Rt+=3){var Ct=gt[Rt+2];if(Ct==Be||Ct==qe){var Wt=St(Je<0?e.line:e.rest[Je]),en=gt[Rt]+lt;return(lt<0||Ct!=Be)&&(en=gt[Rt+(lt?1:0)]),Oe(Wt,en)}}}var k=C(o,s,r);if(k)return Zr(k,a);for(var $=s.nextSibling,X=o?o.nodeValue.length-r:0;$;$=$.nextSibling){if(k=C($,$.firstChild,0),k)return Zr(Oe(k.line,k.ch-X),a);X+=$.textContent.length}for(var ye=s.previousSibling,Me=r;ye;ye=ye.previousSibling){if(k=C(ye,ye.firstChild,-1),k)return Zr(Oe(k.line,k.ch+Me),a);Me+=ye.textContent.length}}var cn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ue,this.hasSelection=!1,this.composing=null};cn.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var a=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),N&&(a.style.width="0px"),fe(a,"input",function(){L&&R>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),fe(a,"paste",function(o){if(Se(n,o)||bs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function i(o){if(Se(n,o))return;if(n.somethingSelected())Ya({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=_s(n);Ya({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,pe):(r.prevInput="",a.value=s.text.join(`
|
|
`),me(a))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}fe(a,"cut",i),fe(a,"copy",i),fe(e.scroller,"paste",function(o){if(ur(e,o)||Se(n,o))return;if(!a.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,a.dispatchEvent(s)}),fe(e.lineSpace,"selectstart",function(o){ur(e,o)||d(o)}),fe(a,"compositionstart",function(){var o=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:o,range:n.markText(o,n.getCursor("to"),{className:"CodeMirror-composing"})}}),fe(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},cn.prototype.createField=function(e){this.wrapper=xs(),this.textarea=this.wrapper.firstChild},cn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},cn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=uo(e);if(e.options.moveInputWithCursor){var a=Qn(e,r.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,a.top+o.top-i.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,a.left+o.left-i.left))}return n},cn.prototype.showSelection=function(e){var t=this.cm,r=t.display;E(r.cursorDiv,e.cursors),E(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},cn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&me(this.textarea),L&&R>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",L&&R>=9&&(this.hasSelection=null))},cn.prototype.getField=function(){return this.textarea},cn.prototype.supportsTouch=function(){return!1},cn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Z||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},cn.prototype.blur=function(){this.textarea.blur()},cn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cn.prototype.receivedFocus=function(){this.slowPoll()},cn.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()})},cn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},cn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||it(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var a=r.value;if(a==n&&!t.somethingSelected())return!1;if(L&&R>=9&&this.hasSelection===a||V&&/[\uf700-\uf7ff]/.test(a))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=a.charCodeAt(0);if(i==8203&&!n&&(n="\u200B"),i==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,a.length);o<s&&n.charCodeAt(o)==a.charCodeAt(o);)++o;return Hn(t,function(){Ui(t,a.slice(o),n.length-o,null,e.composing?"*compose":null),a.length>1e3||a.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=a,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},cn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cn.prototype.onKeyPress=function(){L&&R>=9&&(this.hasSelection=null),this.fastPoll()},cn.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,a=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=Tr(r,e),o=n.scroller.scrollTop;if(!i||J)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(i)==-1&&yn(r,On)(r.doc,vr(i),pe);var l=a.style.cssText,u=t.wrapper.style.cssText,C=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",a.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-C.top-5)+"px; left: "+(e.clientX-C.left-5)+`px;
|
|
z-index: 1000; background: `+(L?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var k;x&&(k=window.scrollY),n.input.focus(),x&&window.scrollTo(null,k),n.input.reset(),r.somethingSelected()||(a.value=t.prevInput=" "),t.contextMenuPending=X,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function $(){if(a.selectionStart!=null){var Me=r.somethingSelected(),Be="\u200B"+(Me?a.value:"");a.value="\u21DA",a.value=Be,t.prevInput=Me?"":"\u200B",a.selectionStart=1,a.selectionEnd=Be.length,n.selForContextMenu=r.doc.sel}}function X(){if(t.contextMenuPending!=X)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=u,a.style.cssText=l,L&&R<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),a.selectionStart!=null){(!L||L&&R<9)&&$();var Me=0,Be=function(){n.selForContextMenu==r.doc.sel&&a.selectionStart==0&&a.selectionEnd>0&&t.prevInput=="\u200B"?yn(r,zo)(r):Me++<10?n.detectingSelectAll=setTimeout(Be,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Be,200)}}if(L&&R>=9&&$(),f){b(e);var ye=function(){tt(window,"mouseup",ye),setTimeout(X,20)};fe(window,"mouseup",ye)}else setTimeout(X,50)},cn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},cn.prototype.setUneditable=function(){},cn.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?c(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=D();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var a;if(e.form&&(fe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;a=i.submit;try{var o=i.submit=function(){n(),i.submit=a,i.submit(),i.submit=o}}catch(l){}}t.finishInit=function(l){l.save=n,l.getTextArea=function(){return e},l.toTextArea=function(){l.toTextArea=isNaN,n(),e.parentNode.removeChild(l.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=a))}},e.style.display="none";var s=an(function(l){return e.parentNode.insertBefore(l,e.nextSibling)},t);return s}function au(e){e.off=tt,e.on=fe,e.wheelEventPixels=dl,e.Doc=In,e.splitLines=Tt,e.countColumn=P,e.findColumn=xe,e.isWordChar=de,e.Pass=We,e.signal=ve,e.Line=bn,e.changeEnd=br,e.scrollbarModel=bo,e.Pos=Oe,e.cmpPos=Ge,e.modes=Ot,e.mimeModes=dt,e.resolveMode=vt,e.getMode=st,e.modeExtensions=ut,e.extendMode=xt,e.copyState=zt,e.startState=Vt,e.innerMode=Ut,e.commands=Sa,e.keyMap=cr,e.keyName=as,e.isModifierKey=ns,e.lookupKey=Jr,e.normalizeKeyMap=Ml,e.StringStream=Bt,e.SharedTextMarker=xa,e.TextMarker=_r,e.LineWidget=Ea,e.e_preventDefault=d,e.e_stopPropagation=h,e.e_stop=b,e.addClass=re,e.contains=y,e.rmClass=U,e.keyNames=Er}ql(an),Zl(an);var iu="iter insert remove copy getEditor constructor".split(" ");for(var Za in In.prototype)In.prototype.hasOwnProperty(Za)&&le(iu,Za)<0&&(an.prototype[Za]=function(e){return function(){return e.apply(this.doc,arguments)}}(In.prototype[Za]));return v(In),an.inputStyles={textarea:cn,contenteditable:Zt},an.defineMode=function(e){!an.defaults.mode&&e!="null"&&(an.defaults.mode=e),Pt.apply(this,arguments)},an.defineMIME=At,an.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),an.defineMIME("text/plain","null"),an.defineExtension=function(e,t){an.prototype[e]=t},an.defineDocExtension=function(e,t){In.prototype[e]=t},an.fromTextArea=ru,au(an),an.version="5.58.2",an})},Y1PL:function(bt,et,m){"use strict";m.r(et),m.d(et,"ResizableTextArea",function(){return le});var F=m("wx14"),ke=m("1OyB"),q=m("vuIU"),_e=m("Ji7U"),be=m("LK+K"),ie=m("q1tI"),L=m("VTBJ"),R=m("rePB"),x=m("Zm9Q"),ne=m("Kwbf"),H=m("c+Xe"),J=m("m+aA"),he=m("bdgK"),j=new Map;function I(pe){pe.forEach(function(Fe){var Ee,xe=Fe.target;(Ee=j.get(xe))===null||Ee===void 0||Ee.forEach(function(K){return K(xe)})})}var N=new he.default(I),M=null,Z=null;function V(pe,Fe){j.has(pe)||(j.set(pe,new Set),N.observe(pe)),j.get(pe).add(Fe)}function te(pe,Fe){j.has(pe)&&(j.get(pe).delete(Fe),j.get(pe).size||(N.unobserve(pe),j.delete(pe)))}var De=function(pe){Object(_e.a)(Ee,pe);var Fe=Object(be.a)(Ee);function Ee(){return Object(ke.a)(this,Ee),Fe.apply(this,arguments)}return Object(q.a)(Ee,[{key:"render",value:function(){return this.props.children}}]),Ee}(ie.Component),Y=ie.createContext(null);function G(pe){var Fe=pe.children,Ee=pe.onBatchResize,xe=ie.useRef(0),K=ie.useRef([]),A=ie.useContext(Y),Ae=ie.useCallback(function(rt,Re,ce){xe.current+=1;var Pe=xe.current;K.current.push({size:rt,element:Re,data:ce}),Promise.resolve().then(function(){Pe===xe.current&&(Ee==null||Ee(K.current),K.current=[])}),A==null||A(rt,Re,ce)},[Ee,A]);return ie.createElement(Y.Provider,{value:Ae},Fe)}function f(pe){var Fe=pe.children,Ee=pe.disabled,xe=ie.useRef(null),K=ie.useRef(null),A=ie.useContext(Y),Ae=ie.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),rt=ie.isValidElement(Fe)&&Object(H.c)(Fe),Re=rt?Fe.ref:null,ce=ie.useMemo(function(){return Object(H.a)(Re,xe)},[Re,xe]),Pe=ie.useRef(pe);Pe.current=pe;var ge=ie.useCallback(function(de){var Ne=Pe.current,He=Ne.onResize,Ue=Ne.data,Ce=de.getBoundingClientRect(),Te=Ce.width,at=Ce.height,Qe=de.offsetWidth,$e=de.offsetHeight,ot=Math.floor(Te),yt=Math.floor(at);if(Ae.current.width!==ot||Ae.current.height!==yt||Ae.current.offsetWidth!==Qe||Ae.current.offsetHeight!==$e){var ft={width:ot,height:yt,offsetWidth:Qe,offsetHeight:$e};Ae.current=ft;var Ze=Qe===Math.round(Te)?Te:Qe,fe=$e===Math.round(at)?at:$e,ht=Object(L.a)(Object(L.a)({},ft),{},{offsetWidth:Ze,offsetHeight:fe});A==null||A(ht,de,Ue),He&&Promise.resolve().then(function(){He(ht,de)})}},[]);return ie.useEffect(function(){var de=Object(J.a)(xe.current)||Object(J.a)(K.current);return de&&!Ee&&V(de,ge),function(){return te(de,ge)}},[xe.current,Ee]),ie.createElement(De,{ref:K},rt?ie.cloneElement(Fe,{ref:ce}):Fe)}var ee="rc-observer-key";function U(pe){var Fe=pe.children,Ee=Object(x.a)(Fe);return Ee.map(function(xe,K){var A=(xe==null?void 0:xe.key)||"".concat(ee,"-").concat(K);return ie.createElement(f,Object(F.a)({},pe,{key:A}),xe)})}U.Collection=G;var ae=U,E=m("bT9E"),p=m("TSYQ"),O=m.n(p),T=`
|
|
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
|
|
`,y=["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"],D={},re;function B(pe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ee=pe.getAttribute("id")||pe.getAttribute("data-reactid")||pe.getAttribute("name");if(Fe&&D[Ee])return D[Ee];var xe=window.getComputedStyle(pe),K=xe.getPropertyValue("box-sizing")||xe.getPropertyValue("-moz-box-sizing")||xe.getPropertyValue("-webkit-box-sizing"),A=parseFloat(xe.getPropertyValue("padding-bottom"))+parseFloat(xe.getPropertyValue("padding-top")),Ae=parseFloat(xe.getPropertyValue("border-bottom-width"))+parseFloat(xe.getPropertyValue("border-top-width")),rt=y.map(function(ce){return"".concat(ce,":").concat(xe.getPropertyValue(ce))}).join(";"),Re={sizingStyle:rt,paddingSize:A,borderSize:Ae,boxSizing:K};return Fe&&Ee&&(D[Ee]=Re),Re}function me(pe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;re||(re=document.createElement("textarea"),re.setAttribute("tab-index","-1"),re.setAttribute("aria-hidden","true"),document.body.appendChild(re)),pe.getAttribute("wrap")?re.setAttribute("wrap",pe.getAttribute("wrap")):re.removeAttribute("wrap");var K=B(pe,Fe),A=K.paddingSize,Ae=K.borderSize,rt=K.boxSizing,Re=K.sizingStyle;re.setAttribute("style","".concat(Re,";").concat(T)),re.value=pe.value||pe.placeholder||"";var ce=Number.MIN_SAFE_INTEGER,Pe=Number.MAX_SAFE_INTEGER,ge=re.scrollHeight,de;if(rt==="border-box"?ge+=Ae:rt==="content-box"&&(ge-=A),Ee!==null||xe!==null){re.value=" ";var Ne=re.scrollHeight-A;Ee!==null&&(ce=Ne*Ee,rt==="border-box"&&(ce=ce+A+Ae),ge=Math.max(ce,ge)),xe!==null&&(Pe=Ne*xe,rt==="border-box"&&(Pe=Pe+A+Ae),de=ge>Pe?"":"hidden",ge=Math.min(Pe,ge))}return{height:ge,minHeight:ce,maxHeight:Pe,overflowY:de,resize:"none"}}var _=m("Gytx"),c=m.n(_),P;(function(pe){pe[pe.NONE=0]="NONE",pe[pe.RESIZING=1]="RESIZING",pe[pe.RESIZED=2]="RESIZED"})(P||(P={}));var ue=function(pe){Object(_e.a)(Ee,pe);var Fe=Object(be.a)(Ee);function Ee(xe){var K;return Object(ke.a)(this,Ee),K=Fe.call(this,xe),K.nextFrameActionId=void 0,K.resizeFrameId=void 0,K.textArea=void 0,K.saveTextArea=function(A){K.textArea=A},K.handleResize=function(A){var Ae=K.state.resizeStatus,rt=K.props,Re=rt.autoSize,ce=rt.onResize;if(Ae!==P.NONE)return;typeof ce=="function"&&ce(A),Re&&K.resizeOnNextFrame()},K.resizeOnNextFrame=function(){cancelAnimationFrame(K.nextFrameActionId),K.nextFrameActionId=requestAnimationFrame(K.resizeTextarea)},K.resizeTextarea=function(){var A=K.props.autoSize;if(!A||!K.textArea)return;var Ae=A.minRows,rt=A.maxRows,Re=me(K.textArea,!1,Ae,rt);K.setState({textareaStyles:Re,resizeStatus:P.RESIZING},function(){cancelAnimationFrame(K.resizeFrameId),K.resizeFrameId=requestAnimationFrame(function(){K.setState({resizeStatus:P.RESIZED},function(){K.resizeFrameId=requestAnimationFrame(function(){K.setState({resizeStatus:P.NONE}),K.fixFirefoxAutoScroll()})})})})},K.renderTextArea=function(){var A=K.props,Ae=A.prefixCls,rt=Ae===void 0?"rc-textarea":Ae,Re=A.autoSize,ce=A.onResize,Pe=A.className,ge=A.disabled,de=K.state,Ne=de.textareaStyles,He=de.resizeStatus,Ue=Object(E.a)(K.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ce=O()(rt,Pe,Object(R.a)({},"".concat(rt,"-disabled"),ge));"value"in Ue&&(Ue.value=Ue.value||"");var Te=Object(L.a)(Object(L.a)(Object(L.a)({},K.props.style),Ne),He===P.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ie.createElement(ae,{onResize:K.handleResize,disabled:!(Re||ce)},ie.createElement("textarea",Object(F.a)({},Ue,{className:Ce,style:Te,ref:K.saveTextArea})))},K.state={textareaStyles:{},resizeStatus:P.NONE},K}return Object(q.a)(Ee,[{key:"componentDidUpdate",value:function(K){(K.value!==this.props.value||!c()(K.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 K=this.textArea.selectionStart,A=this.textArea.selectionEnd;this.textArea.setSelectionRange(K,A)}}catch(Ae){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ee}(ie.Component),le=ue,Le=function(pe){Object(_e.a)(Ee,pe);var Fe=Object(be.a)(Ee);function Ee(xe){var K;Object(ke.a)(this,Ee),K=Fe.call(this,xe),K.resizableTextArea=void 0,K.focus=function(){K.resizableTextArea.textArea.focus()},K.saveTextArea=function(Ae){K.resizableTextArea=Ae},K.handleChange=function(Ae){var rt=K.props.onChange;K.setValue(Ae.target.value,function(){K.resizableTextArea.resizeTextarea()}),rt&&rt(Ae)},K.handleKeyDown=function(Ae){var rt=K.props,Re=rt.onPressEnter,ce=rt.onKeyDown;Ae.keyCode===13&&Re&&Re(Ae),ce&&ce(Ae)};var A=typeof xe.value=="undefined"||xe.value===null?xe.defaultValue:xe.value;return K.state={value:A},K}return Object(q.a)(Ee,[{key:"setValue",value:function(K,A){"value"in this.props||this.setState({value:K},A)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ie.createElement(le,Object(F.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(K){return"value"in K?{value:K.value}:null}}]),Ee}(ie.Component),We=et.default=Le},ZW9T:function(bt,et,m){"use strict";m.d(et,"a",function(){return De});var F=m("k1fw"),ke=m("miYZ"),q=m("tsqr"),_e=m("rAM+"),be=m("tJVT"),ie=m("PpiC"),L=m("q1tI"),R=m.n(L),x=m("bdgK");function ne(Y,G,f,ee,U){var ae=G.getWordUntilPosition(f),E={startLineNumber:f.lineNumber,endLineNumber:f.lineNumber,startColumn:ae.startColumn,endColumn:ae.endColumn},p=ee.map(function(O){return{label:O,kind:Y.languages.CompletionItemKind.Keyword,insertText:O,insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:E}});return U.map(function(O){p.push(Object(F.a)(Object(F.a)({},O),{},{range:E}))}),p}var H=function(Y){var G={label:"ifelse",kind:Y.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet},f=["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"];Y.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(E,p){var O=ne(Y,E,p,f,[G]);return{suggestions:O}}});var ee=["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"];Y.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(E,p){var O=[{label:"print",kind:Y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],T=ne(Y,E,p,ee,O);return{suggestions:T}}});var U=["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"];Y.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(E,p){var O=[G,{label:"main",kind:Y.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:Y.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],T=ne(Y,E,p,U,O);return{suggestions:T}}})},J="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",he=m("LvDl");function j(Y){return/^\d+$/.test(Y)?"".concat(Y,"px"):Y}function I(){}var N=!1,M={"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 Z(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],G=Y;if(Array.isArray(Y)){for(var f=0;f<Y.length;f++){var ee=M[Y[f]];if(ee)return ee}return G[0]}return M[G]||G}var V=null,te=et.b=function(Y){var G=Y.width,f=G===void 0?"100%":G,ee=Y.height,U=ee===void 0?"100%":ee,ae=Y.value,E=Y.language,p=E===void 0?"javascript":E,O=Y.style,T=O===void 0?{}:O,y=Y.options,D=y===void 0?{}:y,re=Y.overrideServices,B=re===void 0?{}:re,me=Y.theme,_=me===void 0?"vs-dark":me,c=Y.onEditBlur,P=Y.onSave,ue=Y.autoHeight,le=ue===void 0?!1:ue,Le=Y.forbidCopy,We=Le===void 0?!1:Le,pe=Y.onChange,Fe=pe===void 0?I:pe,Ee=Y.editorDidMount,xe=Ee===void 0?I:Ee,K=Y.onFocus,A=K===void 0?I:K,Ae=Y.filename,rt=Ae===void 0?"educoder.txt":Ae,Re=Object(ie.a)(Y,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),ce=Object(L.useRef)(),Pe=Object(L.useRef)({}),ge=Object(L.useRef)(),de=Object(L.useRef)(!1),Ne=Object(L.useRef)(),He=Object(L.useState)(!1),Ue=Object(be.a)(He,2),Ce=Ue[0],Te=Ue[1];function at(){var g;return ce.current&&(g=new x.default(function(b){var z=Object(_e.a)(b),Q;try{for(z.s();!(Q=z.n()).done;){var oe=Q.value;(oe.target.offsetHeight>0||oe.target.offsetWidth>0)&&Pe.current.instance.layout()}}catch(Ye){z.e(Ye)}finally{z.f()}}),g.observe(ce.current)),g}function Qe(){q.b.warn(decodeURIComponent(J))}var $e=function(){var b=Pe.current.instance;if(ae!=null&&b&&Ce){var z=b.getModel();z&&ae!==z.getValue()&&(N=!0,z.setValue(ae),b.layout(),N=!1)}};Object(L.useEffect)(function(){ge.current&&clearTimeout(ge.current),ge.current=setTimeout(function(){$e()},500)},[ae,Ce,Pe.current]);function ot(){var g=Pe.current.instance;if(g){var b=g.getSelection(),z=Pe.current.pastePos||{},Q=new V.Range(z.startLineNumber||b.endLineNumber,z.startColumn||b.endColumn,z.endLineNumber||b.endLineNumber,z.endColumn||b.endColumn);setTimeout(function(){g.executeEdits("",[{range:Q,text:""}])},300)}}function yt(g){(window.navigator.platform.match("Mac")?g.metaKey:g.ctrlKey)&&g.keyCode==83&&(g.preventDefault(),P())}var ft=function(){if(le&&Pe.current.instance){var b=Pe.current.instance.getContentHeight();d(b<U?U:b)}else d(U)};function Ze(g){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent(b)}function fe(g,b){var z=window.URL||window.webkitURL||window,Q=new Blob([b]),oe=document.createElementNS("http://www.w3.org/1999/xhtml","a");oe.href=z.createObjectURL(Q),oe.download=g,Ze(oe)}Object(L.useEffect)(function(){ft()},[ft]),Object(L.useEffect)(function(){ce.current&&!Ce&&m.e(26).then(m.t.bind(null,"M/lh",7)).then(function(g){try{V=g,Pe.current.instance=V.editor.create(ce.current,{value:ae,language:Z(p),theme:_,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},B);var b=Pe.current.instance;if(xe(b,V),setTimeout(function(){ft(),Pe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){fe(rt||"educoder.txt",b.getValue())}})},500),Pe.current.subscription=b.onDidChangeModelContent(function(Q){de.current?clearTimeout(Ne.current):(ft(),Fe(b.getValue(),Q)),Ne.current=setTimeout(function(){de.current=!1},500)}),window.Monaco||H(V),We&&(b.addCommand(V.KeyMod.CtrlCmd|V.KeyMod.Shift|V.KeyCode.KEY_V,function(){return Qe(),null}),b.addCommand(V.KeyMod.CtrlCmd|V.KeyCode.KEY_C,function(){return Qe(),null})),window.Monaco=V,c&&b.onDidBlurEditorWidget(function(){c(b.getValue())}),A&&b.onDidFocusEditorText(function(){A(b.getValue())}),We){b.addCommand(V.KeyMod.CtrlCmd|V.KeyCode.KEY_V,function(){return Qe(),null}),b.onDidPaste(function(Q){Pe.current.pastePos=Q});try{window.addEventListener("paste",ot)}catch(Q){}}var z=at();return Te(!0),function(){var Q=Pe.current.instance;Q.dispose();var oe=Q.getModel();oe&&oe.dispose(),Pe.current.subscription&&Pe.current.subscription.dispose(),We&&window.removeEventListener("paste",ot),z.unobserve(ce.current)}}catch(Q){}})},[]),Object(L.useEffect)(function(){var g=Pe.current.instance;if(g&&Ce)return document.addEventListener("keydown",yt,!1),function(){document.removeEventListener("keydown",yt)}},[P,Ce]),Object(L.useEffect)(function(){var g=Pe.current.instance;if(g&&Ce){var b=Z(p);V.editor.setModelLanguage(g.getModel(),b),console.log("language:",p,g.getModel(),b)}},[p,Ce]),Object(L.useEffect)(function(){var g=Pe.current.instance;g&&Ce&&V.editor.setTheme(_)},[_,Ce]),Object(L.useEffect)(function(){var g=Pe.current.instance;g&&Ce&&(g.updateOptions(Object(F.a)({},D)),setTimeout(function(){g.getModel().updateOptions(Object(F.a)({},D))},200))},[JSON.stringify(D),Ce]),Object(L.useEffect)(function(){var g=Pe.current.instance;g&&Ce&&g.layout()},[f,U,Ce]);var ht=Object(L.useState)(j(f)),tt=Object(be.a)(ht,2),ve=tt[0],Se=tt[1],w=Object(L.useState)(j(U)),S=Object(be.a)(w,2),v=S[0],d=S[1],h=Object(F.a)(Object(F.a)({},T),{},{width:ve,height:v});return R.a.createElement("div",{className:"my-monaco-editor",ref:ce,style:h})};function De(Y){var G=Y.width,f=G===void 0?"100%":G,ee=Y.height,U=ee===void 0?"100%":ee,ae=Y.original,E=Y.modified,p=Y.language,O=Y.options,T=O===void 0?{}:O,y=Object(L.useRef)(),D=Object(L.useState)(null),re=Object(be.a)(D,2),B=re[0],me=re[1];function _(le){var Le;return y.current&&(Le=new x.default(function(We){var pe=Object(_e.a)(We),Fe;try{for(pe.s();!(Fe=pe.n()).done;){var Ee=Fe.value;(Ee.target.offsetHeight>0||Ee.target.offsetWidth>0)&&le.layout()}}catch(xe){pe.e(xe)}finally{pe.f()}}),Le.observe(y.current)),Le}Object(L.useEffect)(function(){y.current&&m.e(26).then(m.t.bind(null,"M/lh",7)).then(function(le){V=le;var Le=V.editor.createDiffEditor(y.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},T),{},{wordWrap:!0}));me(Le);var We=_(Le);return function(){Le.dispose();var pe=Le.getModel();pe&&pe.dispose(),We.unobserve(y.current)}})},[]),Object(L.useEffect)(function(){B&&B.setModel({original:V.editor.createModel(ae,p),modified:V.editor.createModel(E,p)})},[ae,E,p,B]);var c=j(f),P=j(U),ue={width:c,height:P};return R.a.createElement("div",{className:"my-diff-editor",ref:y,style:ue})}},ZpRC:function(bt,et,m){"use strict";function F(H){return typeof H=="object"&&H!=null&&H.nodeType===1}function ke(H,J){return(!J||H!=="hidden")&&H!=="visible"&&H!=="clip"}function q(H,J){if(H.clientHeight<H.scrollHeight||H.clientWidth<H.scrollWidth){var he=getComputedStyle(H,null);return ke(he.overflowY,J)||ke(he.overflowX,J)||function(j){var I=function(N){if(!N.ownerDocument||!N.ownerDocument.defaultView)return null;try{return N.ownerDocument.defaultView.frameElement}catch(M){return null}}(j);return!!I&&(I.clientHeight<j.scrollHeight||I.clientWidth<j.scrollWidth)}(H)}return!1}function _e(H,J,he,j,I,N,M,Z){return N<H&&M>J||N>H&&M<J?0:N<=H&&Z<=he||M>=J&&Z>=he?N-H-j:M>J&&Z<he||N<H&&Z>he?M-J+I:0}var be=function(H,J){var he=window,j=J.scrollMode,I=J.block,N=J.inline,M=J.boundary,Z=J.skipOverflowHiddenElements,V=typeof M=="function"?M:function(Ne){return Ne!==M};if(!F(H))throw new TypeError("Invalid target");for(var te=document.scrollingElement||document.documentElement,De=[],Y=H;F(Y)&&V(Y);){if((Y=Y.parentElement)===te){De.push(Y);break}Y!=null&&Y===document.body&&q(Y)&&!q(document.documentElement)||Y!=null&&q(Y,Z)&&De.push(Y)}for(var G=he.visualViewport?he.visualViewport.width:innerWidth,f=he.visualViewport?he.visualViewport.height:innerHeight,ee=window.scrollX||pageXOffset,U=window.scrollY||pageYOffset,ae=H.getBoundingClientRect(),E=ae.height,p=ae.width,O=ae.top,T=ae.right,y=ae.bottom,D=ae.left,re=I==="start"||I==="nearest"?O:I==="end"?y:O+E/2,B=N==="center"?D+p/2:N==="end"?T:D,me=[],_=0;_<De.length;_++){var c=De[_],P=c.getBoundingClientRect(),ue=P.height,le=P.width,Le=P.top,We=P.right,pe=P.bottom,Fe=P.left;if(j==="if-needed"&&O>=0&&D>=0&&y<=f&&T<=G&&O>=Le&&y<=pe&&D>=Fe&&T<=We)return me;var Ee=getComputedStyle(c),xe=parseInt(Ee.borderLeftWidth,10),K=parseInt(Ee.borderTopWidth,10),A=parseInt(Ee.borderRightWidth,10),Ae=parseInt(Ee.borderBottomWidth,10),rt=0,Re=0,ce="offsetWidth"in c?c.offsetWidth-c.clientWidth-xe-A:0,Pe="offsetHeight"in c?c.offsetHeight-c.clientHeight-K-Ae:0;if(te===c)rt=I==="start"?re:I==="end"?re-f:I==="nearest"?_e(U,U+f,f,K,Ae,U+re,U+re+E,E):re-f/2,Re=N==="start"?B:N==="center"?B-G/2:N==="end"?B-G:_e(ee,ee+G,G,xe,A,ee+B,ee+B+p,p),rt=Math.max(0,rt+U),Re=Math.max(0,Re+ee);else{rt=I==="start"?re-Le-K:I==="end"?re-pe+Ae+Pe:I==="nearest"?_e(Le,pe,ue,K,Ae+Pe,re,re+E,E):re-(Le+ue/2)+Pe/2,Re=N==="start"?B-Fe-xe:N==="center"?B-(Fe+le/2)+ce/2:N==="end"?B-We+A+ce:_e(Fe,We,le,xe,A+ce,B,B+p,p);var ge=c.scrollLeft,de=c.scrollTop;re+=de-(rt=Math.max(0,Math.min(de+rt,c.scrollHeight-ue+Pe))),B+=ge-(Re=Math.max(0,Math.min(ge+Re,c.scrollWidth-le+ce)))}me.push({el:c,top:rt,left:Re})}return me};function ie(H){return H===Object(H)&&Object.keys(H).length!==0}function L(H,J){J===void 0&&(J="auto");var he="scrollBehavior"in document.body.style;H.forEach(function(j){var I=j.el,N=j.top,M=j.left;I.scroll&&he?I.scroll({top:N,left:M,behavior:J}):(I.scrollTop=N,I.scrollLeft=M)})}function R(H){return H===!1?{block:"end",inline:"nearest"}:ie(H)?H:{block:"start",inline:"nearest"}}function x(H,J){var he=!H.ownerDocument.documentElement.contains(H);if(ie(J)&&typeof J.behavior=="function")return J.behavior(he?[]:be(H,J));if(he)return;var j=R(J);return L(be(H,j),j.behavior)}var ne=et.a=x},bT9E:function(bt,et,m){"use strict";m.d(et,"a",function(){return ke});var F=m("VTBJ");function ke(q,_e){var be=Object(F.a)({},q);return Array.isArray(_e)&&_e.forEach(function(ie){delete be[ie]}),be}},c5Ni:function(bt,et,m){},dejd:function(bt,et,m){},dmUQ:function(bt,et,m){"use strict";var F=m("Ff2n"),ke=m("rePB"),q=m("1OyB"),_e=m("vuIU"),be=m("Ji7U"),ie=m("md7G"),L=m("foSv"),R=m("q1tI"),x=m.n(R),ne=m("TSYQ"),H=m.n(ne),J=m("4IlW");function he(E,p){var O=Object.keys(E);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(E);p&&(T=T.filter(function(y){return Object.getOwnPropertyDescriptor(E,y).enumerable})),O.push.apply(O,T)}return O}function j(E){for(var p=1;p<arguments.length;p++){var O=arguments[p]!=null?arguments[p]:{};p%2?he(Object(O),!0).forEach(function(T){Object(ke.a)(E,T,O[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):he(Object(O)).forEach(function(T){Object.defineProperty(E,T,Object.getOwnPropertyDescriptor(O,T))})}return E}function I(E){var p=N();return function(){var T=Object(L.a)(E),y;if(p){var D=Object(L.a)(this).constructor;y=Reflect.construct(T,arguments,D)}else y=T.apply(this,arguments);return Object(ie.a)(this,y)}}function N(){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(E){return!1}}function M(){}function Z(E){E.preventDefault()}var V=function(p){return p.replace(/[^\w.-]+/g,"")},te=200,De=600,Y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,G=function(p){return p!=null},f=function(p,O){return O===p||typeof O=="number"&&typeof p=="number"&&isNaN(O)&&isNaN(p)},ee=function(E){Object(be.a)(O,E);var p=I(O);function O(T){var y;Object(q.a)(this,O),y=p.call(this,T),y.onKeyDown=function(B){var me=y.props,_=me.onKeyDown,c=me.onPressEnter;if(B.keyCode===J.a.UP){var P=y.getRatio(B);y.up(B,P,null),y.stop()}else if(B.keyCode===J.a.DOWN){var ue=y.getRatio(B);y.down(B,ue,null),y.stop()}else B.keyCode===J.a.ENTER&&c&&c(B);if(y.recordCursorPosition(),y.lastKeyCode=B.keyCode,_){for(var le=arguments.length,Le=new Array(le>1?le-1:0),We=1;We<le;We++)Le[We-1]=arguments[We];_.apply(void 0,[B].concat(Le))}},y.onKeyUp=function(B){var me=y.props.onKeyUp;if(y.stop(),y.recordCursorPosition(),me){for(var _=arguments.length,c=new Array(_>1?_-1:0),P=1;P<_;P++)c[P-1]=arguments[P];me.apply(void 0,[B].concat(c))}},y.onChange=function(B){var me=y.props.onChange;y.state.focused&&(y.inputting=!0),y.rawInput=y.props.parser(y.getValueFromEvent(B)),y.setState({inputValue:y.rawInput}),me(y.toNumber(y.rawInput))},y.onMouseUp=function(){var B=y.props.onMouseUp;y.recordCursorPosition(),B&&B.apply(void 0,arguments)},y.onFocus=function(){var B;y.setState({focused:!0}),(B=y.props).onFocus.apply(B,arguments)},y.onBlur=function(){var B=y.props.onBlur;y.inputting=!1,y.setState({focused:!1});var me=y.getCurrentValidValue(y.state.inputValue),_=y.setValue(me,M);if(B){var c=y.input.value,P=y.getInputDisplayValue({focus:!1,value:_});y.input.value=P&&Number(P),B.apply(void 0,arguments),y.input.value=c}},y.getRatio=function(B){var me=1;return B.metaKey||B.ctrlKey?me=.1:B.shiftKey&&(me=10),me},y.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},y.getPrecision=function(B){if(G(y.props.precision))return y.props.precision;var me=String(B);if(me.indexOf("e-")>=0)return parseInt(me.slice(me.indexOf("e-")+2),10);var _=0;return me.indexOf(".")>=0&&(_=me.length-me.indexOf(".")-1),_},y.getInputDisplayValue=function(B){var me=B||y.state,_=me.focused,c=me.inputValue,P=me.value,ue;_?ue=c:ue=y.toPrecisionAsStep(P),ue==null&&(ue="");var le=y.formatWrapper(ue);return G(y.props.decimalSeparator)&&(le=le.toString().replace(".",y.props.decimalSeparator)),le},y.recordCursorPosition=function(){try{y.cursorStart=y.input.selectionStart,y.cursorEnd=y.input.selectionEnd,y.currentValue=y.input.value,y.cursorBefore=y.input.value.substring(0,y.cursorStart),y.cursorAfter=y.input.value.substring(y.cursorEnd)}catch(B){}},y.restoreByAfter=function(B){if(B===void 0)return!1;var me=y.input.value,_=me.lastIndexOf(B);if(_===-1)return!1;var c=y.cursorBefore.length;return y.lastKeyCode===J.a.DELETE&&y.cursorBefore.charAt(c-1)===B[0]?(y.fixCaret(c,c),!0):_+B.length===me.length?(y.fixCaret(_,_),!0):!1},y.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(me,_){var c=B.substring(_);return y.restoreByAfter(c)})},y.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},y.stop=function(){y.autoStepTimer&&clearTimeout(y.autoStepTimer)},y.down=function(B,me,_){y.pressingUpOrDown=!0,y.step("down",B,me,_)},y.up=function(B,me,_){y.pressingUpOrDown=!0,y.step("up",B,me,_)},y.saveInput=function(B){y.input=B};var D=T.value;D===void 0&&(D=T.defaultValue),y.state={focused:T.autoFocus};var re=y.getValidValue(y.toNumber(D));return y.state=j(j({},y.state),{},{inputValue:y.toPrecisionAsStep(re),value:re}),y}return Object(_e.a)(O,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(y){var D=this.props,re=D.value,B=D.onChange,me=D.max,_=D.min,c=this.state.focused;if(y){if(!f(y.value,re)||!f(y.max,me)||!f(y.min,_)){var P=c?re:this.getValidValue(re),ue;this.pressingUpOrDown?ue=P:this.inputting?ue=this.rawInput:ue=this.toPrecisionAsStep(P),this.setState({value:P,inputValue:ue})}var le="value"in this.props?re:this.state.value;"max"in this.props&&y.max!==me&&typeof le=="number"&&le>me&&B&&B(me),"min"in this.props&&y.min!==_&&typeof le=="number"&&le<_&&B&&B(_)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Le=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===J.a.BACKSPACE?Le=this.cursorStart-1:this.lastKeyCode===J.a.DELETE&&(Le=this.cursorStart):Le=this.input.value.length,this.fixCaret(Le,Le)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case J.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case J.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(We){}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(y){var D=y;return D===""?D="":this.isNotCompleteNumber(parseFloat(D))?D=this.state.value:D=this.getValidValue(D),this.toNumber(D)}},{key:"getValueFromEvent",value:function(y){var D=y.target.value.trim().replace(/。/g,".");return G(this.props.decimalSeparator)&&(D=D.replace(this.props.decimalSeparator,".")),D}},{key:"getValidValue",value:function(y){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(y);return isNaN(B)?y:(B<D&&(B=D),B>re&&(B=re),B)}},{key:"setValue",value:function(y,D){var re=this.props.precision,B=this.isNotCompleteNumber(parseFloat(y))?null:parseFloat(y),me=this.state.value,_=me===void 0?null:me,c=this.state.inputValue,P=c===void 0?null:c,ue=typeof B=="number"?B.toFixed(re):"".concat(B),le=B!==_||ue!=="".concat(P);return"value"in this.props?(P=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:P},D)):this.setState({value:B,inputValue:this.toPrecisionAsStep(y)},D),le&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(y){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,re=this.props,B=re.precision,me=re.step;if(G(B))return B;var _=this.getPrecision(D),c=this.getPrecision(me),P=this.getPrecision(y);return y?Math.max(P,_+c):_+c}},{key:"getPrecisionFactor",value:function(y){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,re=this.getMaxPrecision(y,D);return Math.pow(10,re)}},{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(y){return this.props.formatter?this.props.formatter(y):y}},{key:"toPrecisionAsStep",value:function(y){if(this.isNotCompleteNumber(y)||y==="")return y;var D=Math.abs(this.getMaxPrecision(y));return isNaN(D)?y.toString():Number(y).toFixed(D)}},{key:"toNumber",value:function(y){var D=this.props.precision,re=this.state.focused,B=y&&y.length>16&&re;return this.isNotCompleteNumber(y)||B?y:G(D)?Math.round(y*Math.pow(10,D))/Math.pow(10,D):Number(y)}},{key:"upStep",value:function(y,D){var re=this.props.step,B=this.getPrecisionFactor(y,D),me=Math.abs(this.getMaxPrecision(y,D)),_=((B*y+B*re*D)/B).toFixed(me);return this.toNumber(_)}},{key:"downStep",value:function(y,D){var re=this.props.step,B=this.getPrecisionFactor(y,D),me=Math.abs(this.getMaxPrecision(y,D)),_=((B*y-B*re*D)/B).toFixed(me);return this.toNumber(_)}},{key:"step",value:function(y,D){var re=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,me=arguments.length>3?arguments[3]:void 0;this.stop(),D&&(D.persist(),D.preventDefault());var _=this.props;if(_.disabled)return;var c=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(c))return;var P=this["".concat(y,"Step")](c,B),ue=P>_.max||P<_.min;if(P>_.max?P=_.max:P<_.min&&(P=_.min),this.setValue(P,null),this.setState({focused:!0},function(){re.pressingUpOrDown=!1}),ue)return;this.autoStepTimer=setTimeout(function(){re[y](D,B,!0)},me?te:De)}},{key:"fixCaret",value:function(y,D){if(y===void 0||D===void 0||!this.input||!this.input.value)return;try{var re=this.input.selectionStart,B=this.input.selectionEnd;(y!==re||D!==B)&&this.input.setSelectionRange(y,D)}catch(me){}}},{key:"render",value:function(){var y,D=this.props,re=D.prefixCls,B=D.disabled,me=D.readOnly,_=D.useTouch,c=D.autoComplete,P=D.upHandler,ue=D.downHandler,le=D.className,Le=D.max,We=D.min,pe=D.style,Fe=D.title,Ee=D.onMouseEnter,xe=D.onMouseLeave,K=D.onMouseOver,A=D.onMouseOut,Ae=D.required,rt=D.onClick,Re=D.tabIndex,ce=D.type,Pe=D.placeholder,ge=D.id,de=D.inputMode,Ne=D.pattern,He=D.step,Ue=D.maxLength,Ce=D.autoFocus,Te=D.name,at=D.onPaste,Qe=D.onInput,$e=Object(F.a)(D,["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"]),ot=this.state,yt=ot.value,ft=ot.focused,Ze=H()(re,(y={},Object(ke.a)(y,le,!!le),Object(ke.a)(y,"".concat(re,"-disabled"),B),Object(ke.a)(y,"".concat(re,"-focused"),ft),y)),fe={};Object.keys($e).forEach(function(b){(b.substr(0,5)==="data-"||b.substr(0,5)==="aria-"||b==="role")&&(fe[b]=$e[b])});var ht=!me&&!B,tt=this.getInputDisplayValue(null),ve=(yt||yt===0)&&(isNaN(yt)||Number(yt)>=Le),Se=(yt||yt===0)&&(isNaN(yt)||Number(yt)<=We),w=ve||B||me,S=Se||B||me,v=H()("".concat(re,"-handler"),"".concat(re,"-handler-up"),Object(ke.a)({},"".concat(re,"-handler-up-disabled"),w)),d=H()("".concat(re,"-handler"),"".concat(re,"-handler-down"),Object(ke.a)({},"".concat(re,"-handler-down-disabled"),S)),h=_?{onTouchStart:w?M:this.up,onTouchEnd:this.stop}:{onMouseDown:w?M:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},g=_?{onTouchStart:S?M:this.down,onTouchEnd:this.stop}:{onMouseDown:S?M:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return x.a.createElement("div",{className:Ze,style:pe,title:Fe,onMouseEnter:Ee,onMouseLeave:xe,onMouseOver:K,onMouseOut:A,onFocus:function(){return null},onBlur:function(){return null}},x.a.createElement("div",{className:"".concat(re,"-handler-wrap")},x.a.createElement("span",Object.assign({unselectable:"on"},h,{role:"button","aria-label":"Increase Value","aria-disabled":w,className:v}),P||x.a.createElement("span",{unselectable:"on",className:"".concat(re,"-handler-up-inner"),onClick:Z})),x.a.createElement("span",Object.assign({unselectable:"on"},g,{role:"button","aria-label":"Decrease Value","aria-disabled":S,className:d}),ue||x.a.createElement("span",{unselectable:"on",className:"".concat(re,"-handler-down-inner"),onClick:Z}))),x.a.createElement("div",{className:"".concat(re,"-input-wrap")},x.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":We,"aria-valuemax":Le,"aria-valuenow":yt,required:Ae,type:ce,placeholder:Pe,onPaste:at,onClick:rt,onMouseUp:this.onMouseUp,className:"".concat(re,"-input"),tabIndex:Re,autoComplete:c,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ht?this.onKeyDown:M,onKeyUp:ht?this.onKeyUp:M,autoFocus:Ce,maxLength:Ue,readOnly:me,disabled:B,max:Le,min:We,step:He,name:Te,title:Fe,id:ge,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:Ne,inputMode:de,onInput:Qe},fe))))}}]),O}(x.a.Component);ee.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Y,min:-Y,step:1,style:{},onChange:M,onKeyDown:M,onPressEnter:M,onFocus:M,onBlur:M,parser:V,required:!1,autoComplete:"off"};var U=ee,ae=et.a=U},kSUc:function(bt,et,m){},kqOp:function(bt,et,m){"use strict";m.d(et,"a",function(){return ne});var F=m("0Owb"),ke=m("fWQN"),q=m("mtLc"),_e=m("yKVA"),be=m("879j"),ie=m("q1tI"),L=m.n(ie),R=m("Ot1p"),x="\u2581",ne=function(H){Object(_e.a)(he,H);var J=Object(be.a)(he);function he(){var j;Object(ke.a)(this,he);for(var I=arguments.length,N=new Array(I),M=0;M<I;M++)N[M]=arguments[M];return j=J.call.apply(J,[this].concat(N)),j.getChCountBeforeCursor=function(Z,V){for(var te=V.line,De=0,Y=0;Y<te;Y++)De+=Z.getLine(Y).split(x).length-1;var G=Z.getLine(te).substring(0,V.ch);return De+=G.split(x).length-1,De},j.onCMBeforeChange=function(Z,V){var te=Z.getRange(V.from,V.to),De=0;if(V.text.forEach(function(ee){De+=ee.split(x).length-1}),te&&te.indexOf(x)!=-1){var Y=te.split(x).length-1,G=j.getChCountBeforeCursor(Z,V.from);console.log("\u5220\u9664".concat(Y,"\u4E2A\uFF0C \u4E4B\u524D\u6709").concat(G,"\u4E2A\uFF0C\u65B0\u589E").concat(De,"\u4E2A")),j.props.deleteEmptyDisabled?V.cancel():j.props.onPlaceholderChange&&j.props.onPlaceholderChange(G,Y,De)}else if(De){var f=j.getChCountBeforeCursor(Z,V.from);console.log("\u65B0\u589E".concat(De,"\u4E2A\uFF0C\u4E4B\u524D\u6709").concat(f,"\u4E2A")),j.props.onPlaceholderChange&&j.props.onPlaceholderChange(f,0,De)}},j}return Object(q.a)(he,[{key:"render",value:function(){return L.a.createElement(R.a,Object(F.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),he}(ie.Component)},lZu9:function(bt,et,m){(function(F){F(m("VrN/"),m("1eCo"),m("8EBN"))})(function(F){"use strict";F.defineMode("markdown",function(ke,q){var _e=F.getMode(ke,"text/html"),be=_e.name=="null";function ie(_){if(F.findModeByName){var c=F.findModeByName(_);c&&(_=c.mime||c.mimes[0])}var P=F.getMode(ke,_);return P.name=="null"?null:P}q.highlightFormatting===void 0&&(q.highlightFormatting=!1),q.maxBlockquoteDepth===void 0&&(q.maxBlockquoteDepth=0),q.taskLists===void 0&&(q.taskLists=!1),q.strikethrough===void 0&&(q.strikethrough=!1),q.emoji===void 0&&(q.emoji=!1),q.fencedCodeBlockHighlighting===void 0&&(q.fencedCodeBlockHighlighting=!0),q.fencedCodeBlockDefaultMode===void 0&&(q.fencedCodeBlockDefaultMode="text/plain"),q.xml===void 0&&(q.xml=!0),q.tokenTypeOverrides===void 0&&(q.tokenTypeOverrides={});var L={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var R in L)L.hasOwnProperty(R)&&q.tokenTypeOverrides[R]&&(L[R]=q.tokenTypeOverrides[R]);var x=/^([*\-_])(?:\s*\1){2,}\s*$/,ne=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,H=/^\[(x| )\](?=\s)/i,J=q.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,he=/^ {0,3}(?:\={1,}|-{2,})\s*$/,j=/^[^#!\[\]*_\\<>` "'(~:]+/,I=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,N=/^\s*\[[^\]]+?\]:.*$/,M=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Z=" ";function V(_,c,P){return c.f=c.inline=P,P(_,c)}function te(_,c,P){return c.f=c.block=P,P(_,c)}function De(_){return!_||!/\S/.test(_.string)}function Y(_){if(_.linkTitle=!1,_.linkHref=!1,_.linkText=!1,_.em=!1,_.strong=!1,_.strikethrough=!1,_.quote=0,_.indentedCode=!1,_.f==f){var c=be;if(!c){var P=F.innerMode(_e,_.htmlState);c=P.mode.name=="xml"&&P.state.tagStart===null&&!P.state.context&&P.state.tokenize.isInText}c&&(_.f=E,_.block=G,_.htmlState=null)}return _.trailingSpace=0,_.trailingSpaceNewLine=!1,_.prevLine=_.thisLine,_.thisLine={stream:null},null}function G(_,c){var P=_.column()===c.indentation,ue=De(c.prevLine.stream),le=c.indentedCode,Le=c.prevLine.hr,We=c.list!==!1,pe=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var Fe=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,We)){for(c.list=null;Fe<c.listStack[c.listStack.length-1];)c.listStack.pop(),c.listStack.length?c.indentation=c.listStack[c.listStack.length-1]:c.list=!1;c.list!==!1&&(c.indentationDiff=Fe-c.listStack[c.listStack.length-1])}var Ee=!ue&&!Le&&!c.prevLine.header&&(!We||!le)&&!c.prevLine.fencedCodeEnd,xe=(c.list===!1||Le||ue)&&c.indentation<=pe&&_.match(x),K=null;if(c.indentationDiff>=4&&(le||c.prevLine.fencedCodeEnd||c.prevLine.header||ue))return _.skipToEnd(),c.indentedCode=!0,L.code;if(_.eatSpace())return null;if(P&&c.indentation<=pe&&(K=_.match(J))&&K[1].length<=6)return c.quote=0,c.header=K[1].length,c.thisLine.header=!0,q.highlightFormatting&&(c.formatting="header"),c.f=c.inline,U(c);if(c.indentation<=pe&&_.eat(">"))return c.quote=P?1:c.quote+1,q.highlightFormatting&&(c.formatting="quote"),_.eatSpace(),U(c);if(!xe&&!c.setext&&P&&c.indentation<=pe&&(K=_.match(ne))){var A=K[1]?"ol":"ul";return c.indentation=Fe+_.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,q.taskLists&&_.match(H,!1)&&(c.taskList=!0),c.f=c.inline,q.highlightFormatting&&(c.formatting=["list","list-"+A]),U(c)}else{if(P&&c.indentation<=pe&&(K=_.match(I,!0)))return c.quote=0,c.fencedEndRE=new RegExp(K[1]+"+ *$"),c.localMode=q.fencedCodeBlockHighlighting&&ie(K[2]||q.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=F.startState(c.localMode)),c.f=c.block=ee,q.highlightFormatting&&(c.formatting="code-block"),c.code=-1,U(c);if(c.setext||(!Ee||!We)&&!c.quote&&c.list===!1&&!c.code&&!xe&&!N.test(_.string)&&(K=_.lookAhead(1))&&(K=K.match(he)))return c.setext?(c.header=c.setext,c.setext=0,_.skipToEnd(),q.highlightFormatting&&(c.formatting="header")):(c.header=K[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,U(c);if(xe)return _.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,L.hr;if(_.peek()==="[")return V(_,c,D)}return V(_,c,c.inline)}function f(_,c){var P=_e.token(_,c.htmlState);if(!be){var ue=F.innerMode(_e,c.htmlState);(ue.mode.name=="xml"&&ue.state.tagStart===null&&!ue.state.context&&ue.state.tokenize.isInText||c.md_inside&&_.current().indexOf(">")>-1)&&(c.f=E,c.block=G,c.htmlState=null)}return P}function ee(_,c){var P=c.listStack[c.listStack.length-1]||0,ue=c.indentation<P,le=P+3;if(c.fencedEndRE&&c.indentation<=le&&(ue||_.match(c.fencedEndRE))){q.highlightFormatting&&(c.formatting="code-block");var Le;return ue||(Le=U(c)),c.localMode=c.localState=null,c.block=G,c.f=E,c.fencedEndRE=null,c.code=0,c.thisLine.fencedCodeEnd=!0,ue?te(_,c,c.block):Le}else return c.localMode?c.localMode.token(_,c.localState):(_.skipToEnd(),L.code)}function U(_){var c=[];if(_.formatting){c.push(L.formatting),typeof _.formatting=="string"&&(_.formatting=[_.formatting]);for(var P=0;P<_.formatting.length;P++)c.push(L.formatting+"-"+_.formatting[P]),_.formatting[P]==="header"&&c.push(L.formatting+"-"+_.formatting[P]+"-"+_.header),_.formatting[P]==="quote"&&(!q.maxBlockquoteDepth||q.maxBlockquoteDepth>=_.quote?c.push(L.formatting+"-"+_.formatting[P]+"-"+_.quote):c.push("error"))}if(_.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(_.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(_.linkHref?c.push(L.linkHref,"url"):(_.strong&&c.push(L.strong),_.em&&c.push(L.em),_.strikethrough&&c.push(L.strikethrough),_.emoji&&c.push(L.emoji),_.linkText&&c.push(L.linkText),_.code&&c.push(L.code),_.image&&c.push(L.image),_.imageAltText&&c.push(L.imageAltText,"link"),_.imageMarker&&c.push(L.imageMarker)),_.header&&c.push(L.header,L.header+"-"+_.header),_.quote&&(c.push(L.quote),!q.maxBlockquoteDepth||q.maxBlockquoteDepth>=_.quote?c.push(L.quote+"-"+_.quote):c.push(L.quote+"-"+q.maxBlockquoteDepth)),_.list!==!1){var ue=(_.listStack.length-1)%3;ue?ue===1?c.push(L.list2):c.push(L.list3):c.push(L.list1)}return _.trailingSpaceNewLine?c.push("trailing-space-new-line"):_.trailingSpace&&c.push("trailing-space-"+(_.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function ae(_,c){return _.match(j,!0)?U(c):void 0}function E(_,c){var P=c.text(_,c);if(typeof P!="undefined")return P;if(c.list)return c.list=null,U(c);if(c.taskList){var ue=_.match(H,!0)[1]===" ";return ue?c.taskOpen=!0:c.taskClosed=!0,q.highlightFormatting&&(c.formatting="task"),c.taskList=!1,U(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&_.match(/^#+$/,!0))return q.highlightFormatting&&(c.formatting="header"),U(c);var le=_.next();if(c.linkTitle){c.linkTitle=!1;var Le=le;le==="("&&(Le=")"),Le=(Le+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var We="^\\s*(?:[^"+Le+"\\\\]+|\\\\\\\\|\\\\.)"+Le;if(_.match(new RegExp(We),!0))return L.linkHref}if(le==="`"){var pe=c.formatting;q.highlightFormatting&&(c.formatting="code"),_.eatWhile("`");var Fe=_.current().length;if(c.code==0&&(!c.quote||Fe==1))return c.code=Fe,U(c);if(Fe==c.code){var Ee=U(c);return c.code=0,Ee}else return c.formatting=pe,U(c)}else if(c.code)return U(c);if(le==="\\"&&(_.next(),q.highlightFormatting)){var xe=U(c),K=L.formatting+"-escape";return xe?xe+" "+K:K}if(le==="!"&&_.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,q.highlightFormatting&&(c.formatting="image"),U(c);if(le==="["&&c.imageMarker&&_.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,q.highlightFormatting&&(c.formatting="image"),U(c);if(le==="]"&&c.imageAltText){q.highlightFormatting&&(c.formatting="image");var xe=U(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=O,xe}if(le==="["&&!c.image)return c.linkText&&_.match(/^.*?\]/)||(c.linkText=!0,q.highlightFormatting&&(c.formatting="link")),U(c);if(le==="]"&&c.linkText){q.highlightFormatting&&(c.formatting="link");var xe=U(c);return c.linkText=!1,c.inline=c.f=_.match(/\(.*?\)| ?\[.*?\]/,!1)?O:E,xe}if(le==="<"&&_.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=p,q.highlightFormatting&&(c.formatting="link");var xe=U(c);return xe?xe+=" ":xe="",xe+L.linkInline}if(le==="<"&&_.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=p,q.highlightFormatting&&(c.formatting="link");var xe=U(c);return xe?xe+=" ":xe="",xe+L.linkEmail}if(q.xml&&le==="<"&&_.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var A=_.string.indexOf(">",_.pos);if(A!=-1){var Ae=_.string.substring(_.start,A);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ae)&&(c.md_inside=!0)}return _.backUp(1),c.htmlState=F.startState(_e),te(_,c,f)}if(q.xml&&le==="<"&&_.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(le==="*"||le==="_"){for(var rt=1,Re=_.pos==1?" ":_.string.charAt(_.pos-2);rt<3&&_.eat(le);)rt++;var ce=_.peek()||" ",Pe=!/\s/.test(ce)&&(!M.test(ce)||/\s/.test(Re)||M.test(Re)),ge=!/\s/.test(Re)&&(!M.test(Re)||/\s/.test(ce)||M.test(ce)),de=null,Ne=null;if(rt%2&&(!c.em&&Pe&&(le==="*"||!ge||M.test(Re))?de=!0:c.em==le&&ge&&(le==="*"||!Pe||M.test(ce))&&(de=!1)),rt>1&&(!c.strong&&Pe&&(le==="*"||!ge||M.test(Re))?Ne=!0:c.strong==le&&ge&&(le==="*"||!Pe||M.test(ce))&&(Ne=!1)),Ne!=null||de!=null){q.highlightFormatting&&(c.formatting=de==null?"strong":Ne==null?"em":"strong em"),de===!0&&(c.em=le),Ne===!0&&(c.strong=le);var Ee=U(c);return de===!1&&(c.em=!1),Ne===!1&&(c.strong=!1),Ee}}else if(le===" "&&(_.eat("*")||_.eat("_"))){if(_.peek()===" ")return U(c);_.backUp(1)}if(q.strikethrough){if(le==="~"&&_.eatWhile(le)){if(c.strikethrough){q.highlightFormatting&&(c.formatting="strikethrough");var Ee=U(c);return c.strikethrough=!1,Ee}else if(_.match(/^[^\s]/,!1))return c.strikethrough=!0,q.highlightFormatting&&(c.formatting="strikethrough"),U(c)}else if(le===" "&&_.match(/^~~/,!0)){if(_.peek()===" ")return U(c);_.backUp(2)}}if(q.emoji&&le===":"&&_.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,q.highlightFormatting&&(c.formatting="emoji");var He=U(c);return c.emoji=!1,He}return le===" "&&(_.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),U(c)}function p(_,c){var P=_.next();if(P===">"){c.f=c.inline=E,q.highlightFormatting&&(c.formatting="link");var ue=U(c);return ue?ue+=" ":ue="",ue+L.linkInline}return _.match(/^[^>]+/,!0),L.linkInline}function O(_,c){if(_.eatSpace())return null;var P=_.next();return P==="("||P==="["?(c.f=c.inline=y(P==="("?")":"]"),q.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,U(c)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function y(_){return function(c,P){var ue=c.next();if(ue===_){P.f=P.inline=E,q.highlightFormatting&&(P.formatting="link-string");var le=U(P);return P.linkHref=!1,le}return c.match(T[_]),P.linkHref=!0,U(P)}}function D(_,c){return _.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=re,_.next(),q.highlightFormatting&&(c.formatting="link"),c.linkText=!0,U(c)):V(_,c,E)}function re(_,c){if(_.match(/^\]:/,!0)){c.f=c.inline=B,q.highlightFormatting&&(c.formatting="link");var P=U(c);return c.linkText=!1,P}return _.match(/^([^\]\\]|\\.)+/,!0),L.linkText}function B(_,c){return _.eatSpace()?null:(_.match(/^[^\s]+/,!0),_.peek()===void 0?c.linkTitle=!0:_.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),c.f=c.inline=E,L.linkHref+" url")}var me={startState:function(){return{f:G,prevLine:{stream:null},thisLine:{stream:null},block:G,htmlState:null,indentation:0,inline:E,text:ae,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(_){return{f:_.f,prevLine:_.prevLine,thisLine:_.thisLine,block:_.block,htmlState:_.htmlState&&F.copyState(_e,_.htmlState),indentation:_.indentation,localMode:_.localMode,localState:_.localMode?F.copyState(_.localMode,_.localState):null,inline:_.inline,text:_.text,formatting:!1,linkText:_.linkText,linkTitle:_.linkTitle,linkHref:_.linkHref,code:_.code,em:_.em,strong:_.strong,strikethrough:_.strikethrough,emoji:_.emoji,header:_.header,setext:_.setext,hr:_.hr,taskList:_.taskList,list:_.list,listStack:_.listStack.slice(0),quote:_.quote,indentedCode:_.indentedCode,trailingSpace:_.trailingSpace,trailingSpaceNewLine:_.trailingSpaceNewLine,md_inside:_.md_inside,fencedEndRE:_.fencedEndRE}},token:function(_,c){if(c.formatting=!1,_!=c.thisLine.stream){if(c.header=0,c.hr=!1,_.match(/^\s*$/,!0))return Y(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:_},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=f)){var P=_.match(/^\s*/,!0)[0].replace(/\t/g,Z).length;if(c.indentation=P,c.indentationDiff=null,P>0)return null}}return c.f(_,c)},innerMode:function(_){return _.block==f?{state:_.htmlState,mode:_e}:_.localState?{state:_.localState,mode:_.localMode}:{state:_,mode:me}},indent:function(_,c,P){return _.block==f&&_e.indent?_e.indent(_.htmlState,c,P):_.localState&&_.localMode.indent?_.localMode.indent(_.localState,c,P):F.Pass},blankLine:Y,getType:U,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return me},"xml"),F.defineMIME("text/markdown","markdown"),F.defineMIME("text/x-markdown","markdown")})},osHv:function(bt,et,m){(function(F){F(m("VrN/"))})(function(F){"use strict";var ke=F.Pos;function q(M,Z){return M.line-Z.line||M.ch-Z.ch}var _e="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",be=_e+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ie=new RegExp("<(/?)(["+_e+"]["+be+"]*)","g");function L(M,Z,V,te){this.line=Z,this.ch=V,this.cm=M,this.text=M.getLine(Z),this.min=te?Math.max(te.from,M.firstLine()):M.firstLine(),this.max=te?Math.min(te.to-1,M.lastLine()):M.lastLine()}function R(M,Z){var V=M.cm.getTokenTypeAt(ke(M.line,Z));return V&&/\btag\b/.test(V)}function x(M){return M.line>=M.max?void 0:(M.ch=0,M.text=M.cm.getLine(++M.line),!0)}function ne(M){return M.line<=M.min?void 0:(M.text=M.cm.getLine(--M.line),M.ch=M.text.length,!0)}function H(M){for(;;){var Z=M.text.indexOf(">",M.ch);if(Z==-1){if(x(M))continue;return}if(!R(M,Z+1)){M.ch=Z+1;continue}var V=M.text.lastIndexOf("/",Z),te=V>-1&&!/\S/.test(M.text.slice(V+1,Z));return M.ch=Z+1,te?"selfClose":"regular"}}function J(M){for(;;){var Z=M.ch?M.text.lastIndexOf("<",M.ch-1):-1;if(Z==-1){if(ne(M))continue;return}if(!R(M,Z+1)){M.ch=Z;continue}ie.lastIndex=Z,M.ch=Z;var V=ie.exec(M.text);if(V&&V.index==Z)return V}}function he(M){for(;;){ie.lastIndex=M.ch;var Z=ie.exec(M.text);if(!Z){if(x(M))continue;return}if(!R(M,Z.index+1)){M.ch=Z.index+1;continue}return M.ch=Z.index+Z[0].length,Z}}function j(M){for(;;){var Z=M.ch?M.text.lastIndexOf(">",M.ch-1):-1;if(Z==-1){if(ne(M))continue;return}if(!R(M,Z+1)){M.ch=Z;continue}var V=M.text.lastIndexOf("/",Z),te=V>-1&&!/\S/.test(M.text.slice(V+1,Z));return M.ch=Z+1,te?"selfClose":"regular"}}function I(M,Z){for(var V=[];;){var te=he(M),De,Y=M.line,G=M.ch-(te?te[0].length:0);if(!te||!(De=H(M)))return;if(De=="selfClose")continue;if(te[1]){for(var f=V.length-1;f>=0;--f)if(V[f]==te[2]){V.length=f;break}if(f<0&&(!Z||Z==te[2]))return{tag:te[2],from:ke(Y,G),to:ke(M.line,M.ch)}}else V.push(te[2])}}function N(M,Z){for(var V=[];;){var te=j(M);if(!te)return;if(te=="selfClose"){J(M);continue}var De=M.line,Y=M.ch,G=J(M);if(!G)return;if(G[1])V.push(G[2]);else{for(var f=V.length-1;f>=0;--f)if(V[f]==G[2]){V.length=f;break}if(f<0&&(!Z||Z==G[2]))return{tag:G[2],from:ke(M.line,M.ch),to:ke(De,Y)}}}}F.registerHelper("fold","xml",function(M,Z){for(var V=new L(M,Z.line,0);;){var te=he(V);if(!te||V.line!=Z.line)return;var De=H(V);if(!De)return;if(!te[1]&&De!="selfClose"){var Y=ke(V.line,V.ch),G=I(V,te[2]);return G&&q(G.from,Y)>0?{from:Y,to:G.from}:null}}}),F.findMatchingTag=function(M,Z,V){var te=new L(M,Z.line,Z.ch,V);if(te.text.indexOf(">")==-1&&te.text.indexOf("<")==-1)return;var De=H(te),Y=De&&ke(te.line,te.ch),G=De&&J(te);if(!De||!G||q(te,Z)>0)return;var f={from:ke(te.line,te.ch),to:Y,tag:G[2]};return De=="selfClose"?{open:f,close:null,at:"open"}:G[1]?{open:N(te,G[2]),close:f,at:"close"}:(te=new L(M,Y.line,Y.ch,V),{open:f,close:I(te,G[2]),at:"open"})},F.findEnclosingTag=function(M,Z,V,te){for(var De=new L(M,Z.line,Z.ch,V);;){var Y=N(De,te);if(!Y)break;var G=new L(M,Z.line,Z.ch,V),f=I(G,Y.tag);if(f)return{open:Y,close:f}}},F.scanForClosingTag=function(M,Z,V,te){var De=new L(M,Z.line,Z.ch,te?{from:0,to:te}:null);return I(De,V)}})},p5ED:function(bt,et,m){"use strict";var F=m("+L6B"),ke=m("2/Rp"),q=m("5Dmo"),_e=m("3S7+"),be=m("k1fw"),ie=m("tJVT"),L=m("q1tI"),R=m.n(L),x=m("vHTk"),ne=m.n(x),H=m("yEEn"),J=m("ZW9T"),he=m("1vsH");et.a=function(j){var I=j.name,N=j.data,M=j.theme,Z=j.type,V=j.filename,te=j.monacoEditor,De=j.className,Y=j.style,G=j.close,f=j.onClose,ee=j.hasMask,U=Object(L.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ae=Object(ie.a)(U,2),E=ae[0],p=ae[1],O=Object(L.useState)(""),T=Object(ie.a)(O,2),y=T[0],D=T[1],re=Object(L.useRef)();V&&(te.filename=V),Object(L.useEffect)(function(){var _,c,P=(_=document.cookie)===null||_===void 0||((c=_.replace(/\s/g,""))===null||c===void 0)?void 0:c.split(";");P==null||P.map(function(ue){var le=ue.split("=");le[0]==="_educoder_session"&&D(le[1])})},[]);var B=function(){if(N.startsWith("http")||N.startsWith("/")){me();return}Object(he.y)(V||"educoder",N,V)},me=function(){Object(he.w)(V||I,N)};return console.log("data:",N,"fileanme:",V," name:",I),R.a.createElement("div",{style:Object(be.a)({},Y||{}),className:"".concat(ee&&ne.a.bgBlack," ").concat(Z?ne.a.wrp:"hide")},G&&R.a.createElement("div",{className:ne.a.close,ref:re},R.a.createElement(_e.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return re.current}},R.a.createElement("span",{onClick:me},R.a.createElement("i",{className:"icon-quxiaozhiding"}))),R.a.createElement(_e.a,{title:"\u5173\u95ED",getPopupContainer:function(){return re.current}},R.a.createElement("span",{className:"",onClick:f},R.a.createElement("i",{className:"icon-guanbi1"})))),R.a.createElement("div",{className:"".concat(ne.a[De]," ").concat(De," ").concat(ne.a.monaco," ").concat(Z==="txt"?"show":"hide")},Z==="txt"&&R.a.createElement(J.b,te)),Z==="audio"&&R.a.createElement("audio",{src:"".concat(N!=null&&N.startsWith("/")||(N==null?void 0:N.indexOf("https://"))>-1?N:"data:audio/mp3;base64,").concat(N),autoPlay:!0}),Z==="video"&&R.a.createElement(R.a.Fragment,null,N!=null&&N.startsWith("/")?R.a.createElement("video",{controls:!0,src:"".concat(N),autoPlay:!0}):R.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(N),autoPlay:!0})),Z==="pdf"&&R.a.createElement("embed",{className:ne.a.embed,src:N}),Z==="image"&&R.a.createElement(R.a.Fragment,null,R.a.createElement("img",{src:"".concat(N!=null&&N.startsWith("/")||(N==null?void 0:N.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(N)})),Z==="other"&&R.a.createElement("div",null,R.a.createElement(ke.a,{type:"primary",size:"large",onClick:B},R.a.createElement(H.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(Z==="download"||Z==="office")&&R.a.createElement(ke.a,{type:"primary",size:"large",onClick:B},R.a.createElement(H.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(bt,et,m){},"rAM+":function(bt,et,m){"use strict";m.d(et,"a",function(){return ke});var F=m("Qw5x");function ke(q,_e){var be;if(typeof Symbol=="undefined"||q[Symbol.iterator]==null){if(Array.isArray(q)||(be=Object(F.a)(q))||_e&&q&&typeof q.length=="number"){be&&(q=be);var ie=0,L=function(){};return{s:L,n:function(){return ie>=q.length?{done:!0}:{done:!1,value:q[ie++]}},e:function(J){throw J},f:L}}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 R=!0,x=!1,ne;return{s:function(){be=q[Symbol.iterator]()},n:function(){var J=be.next();return R=J.done,J},e:function(J){x=!0,ne=J},f:function(){try{!R&&be.return!=null&&be.return()}finally{if(x)throw ne}}}}},rUJ1:function(bt,et){const m=/[&<>"']/,F=/[&<>"']/g,ke=/[<>"']|&(?!#?\w+;)/,q=/[<>"']|&(?!#?\w+;)/g,_e={"&":"&","<":"<",">":">",'"':""","'":"'"},be=ee=>_e[ee];function ie(ee,U){if(U){if(m.test(ee))return ee.replace(F,be)}else if(ke.test(ee))return ee.replace(q,be);return ee}const L=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function R(ee){return ee.replace(L,(U,ae)=>(ae=ae.toLowerCase(),ae==="colon"?":":ae.charAt(0)==="#"?ae.charAt(1)==="x"?String.fromCharCode(parseInt(ae.substring(2),16)):String.fromCharCode(+ae.substring(1)):""))}const x=/(^|[^\[])\^/g;function ne(ee,U){ee=ee.source||ee,U=U||"";const ae={replace:(E,p)=>(p=p.source||p,p=p.replace(x,"$1"),ee=ee.replace(E,p),ae),getRegex:()=>new RegExp(ee,U)};return ae}const H=/[^\w:]/g,J=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function he(ee,U,ae){if(ee){let E;try{E=decodeURIComponent(R(ae)).replace(H,"").toLowerCase()}catch(p){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}U&&!J.test(ae)&&(ae=Z(U,ae));try{ae=encodeURI(ae).replace(/%25/g,"%")}catch(E){return null}return ae}const j={},I=/^[^:]+:\/*[^/]*$/,N=/^([^:]+:)[\s\S]*$/,M=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Z(ee,U){j[" "+ee]||(I.test(ee)?j[" "+ee]=ee+"/":j[" "+ee]=Y(ee,"/",!0)),ee=j[" "+ee];const ae=ee.indexOf(":")===-1;return U.substring(0,2)==="//"?ae?U:ee.replace(N,"$1")+U:U.charAt(0)==="/"?ae?U:ee.replace(M,"$1")+U:ee+U}const V={exec:function(){}};function te(ee){let U=1,ae,E;for(;U<arguments.length;U++){ae=arguments[U];for(E in ae)Object.prototype.hasOwnProperty.call(ae,E)&&(ee[E]=ae[E])}return ee}function De(ee,U){const ae=ee.replace(/\|/g,(O,T,y)=>{let D=!1,re=T;for(;--re>=0&&y[re]==="\\";)D=!D;return D?"|":" |"}),E=ae.split(/ \|/);let p=0;if(E.length>U)E.splice(U);else for(;E.length<U;)E.push("");for(;p<E.length;p++)E[p]=E[p].trim().replace(/\\\|/g,"|");return E}function Y(ee,U,ae){const E=ee.length;if(E===0)return"";let p=0;for(;p<E;){const O=ee.charAt(E-p-1);if(O===U&&!ae)p++;else if(O!==U&&ae)p++;else break}return ee.substr(0,E-p)}function G(ee,U){if(ee.indexOf(U[1])===-1)return-1;const ae=ee.length;let E=0,p=0;for(;p<ae;p++)if(ee[p]==="\\")p++;else if(ee[p]===U[0])E++;else if(ee[p]===U[1]&&(E--,E<0))return p;return-1}function f(ee){ee&&ee.sanitize&&!ee.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")}bt.exports={escape:ie,unescape:R,edit:ne,cleanUrl:he,resolveUrl:Z,noopTest:V,merge:te,splitCells:De,rtrim:Y,findClosingBracket:G,checkSanitizeDeprecation:f}},sDPU:function(bt,et,m){"use strict";m.r(et);var F=m("cWXX"),ke=m("/ezw"),q=m("k1fw"),_e=m("9og8"),be=m("tJVT"),ie=m("WmNS"),L=m.n(ie),R=m("q1tI"),x=m.n(R),ne=m("Ty5D"),H=m("9kvl"),J=m("FIWC"),he=m.n(J),j=m("sbIO"),I=m("ErOA"),N=m("LvDl"),M=m.n(N),Z=function(te){var De,Y,G,f,ee=te.paperlibrary,U=te.user,ae=te.globalSetting,E=te.dispatch,p=te.location,O=(p==null||((De=p.query)===null||De===void 0)?void 0:De.select)||0,T=Object(R.useState)(!1),y=Object(be.a)(T,2),D=y[0],re=y[1],B=Object(R.useState)(!0),me=Object(be.a)(B,2),_=me[0],c=me[1],P=Object(R.useState)(Number(O)),ue=Object(be.a)(P,2),le=ue[0],Le=ue[1],We=Object(R.useState)({}),pe=Object(be.a)(We,2),Fe=pe[0],Ee=pe[1],xe=Object(ne.i)(),K=U.userInfo;Object(R.useEffect)(function(){return E({type:"globalSetting/footerToggle",payload:!1}),function(){E({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(R.useEffect)(function(){return E({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),E({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),function(){E({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),E({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}},[]),Object(R.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]),Object(R.useEffect)(function(){A(le)},[]);var A=function(){var ge=Object(_e.a)(L.a.mark(function de(){var Ne,He,Ue=arguments;return L.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return Ne=Ue.length>0&&Ue[0]!==void 0?Ue[0]:0,console.log(xe),Te.next=4,Object(I.a)("/api/exercises/".concat(xe.categoryId,"/preview_random_exercise.json"),{method:"get",params:{num:Ne}});case 4:He=Te.sent,c(!1),Ee(Ae(He));case 7:case"end":return Te.stop()}},de)}));return function(){return ge.apply(this,arguments)}}(),Ae=function(de){var Ne={1:"\u4E00",2:"\u4E8C",3:"\u4E09",4:"\u56DB",5:"\u4E94",6:"\u516D",7:"\u4E03"};if(!de)return;var He=de||{},Ue=He.exam,Ce=He.single_questions,Te=He.multiple_questions,at=He.judgement_questions,Qe=He.program_questions,$e=He.completion_questions,ot=He.subjective_questions,yt=He.practical_questions,ft=He.combination_questions,Ze=[Object(q.a)({type:"SINGLE",name:"\u5355\u9009\u9898"},Ce),Object(q.a)({type:"MULTIPLE",name:"\u591A\u9009\u9898"},Te),Object(q.a)({type:"COMPLETION",name:"\u586B\u7A7A\u9898"},$e),Object(q.a)({type:"JUDGMENT",name:"\u5224\u65AD\u9898"},at),Object(q.a)({type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},ot),Object(q.a)({type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},Qe),Object(q.a)({type:"PRACTICAL",name:"\u5B9E\u8BAD\u9898"},yt),Object(q.a)({type:"COMBINATION",name:"\u7EC4\u5408\u9898"},ft)],fe=[],ht=0,tt=0,ve=Ze.filter(function(Se){return Se.questions_count>0}).map(function(Se,w){var S;return(S=Se.questions)===null||S===void 0||S.forEach(function(v){fe.push(v.id),ht=ht+v.score,tt=tt+1}),Object(q.a)(Object(q.a)({},Se),{number:Ne[w+1]})});return{all_questions_count:tt,all_score:ht,questionList:ve,ids:fe,exam:Ue}},rt=function(){H.d.push("/classrooms/".concat(xe.coursesId,"/exercise"))},Re=function(){alert("\u4FDD\u5B58")},ce=function(){var ge=Object(_e.a)(L.a.mark(function de(Ne,He){var Ue,Ce,Te;return L.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Object(I.a)("/api/exercises/".concat(xe.categoryId,"/toggle_random_question.json"),{method:"post",body:{question_id:Ne==null?void 0:Ne.single_question_id}});case 2:Ue=Qe.sent,Ue!=null&&Ue.question&&(Te=Object(N.cloneDeep)(Fe),Te.questionList=Te==null||((Ce=Te.questionList)===null||Ce===void 0)?void 0:Ce.map(function($e){if($e.type===He.type){var ot=Object(N.cloneDeep)($e==null?void 0:$e.questions);return ot.splice(He.index,1,Ue==null?void 0:Ue.question),Object(q.a)(Object(q.a)({},$e),{},{questions:ot})}return $e}),Ee(Te));case 4:case"end":return Qe.stop()}},de)}));return function(Ne,He){return ge.apply(this,arguments)}}(),Pe=function(){var ge=Object(_e.a)(L.a.mark(function de(Ne){return L.a.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:document.body.scrollIntoView(),A(Ne),Le(Ne);case 3:case"end":return Ue.stop()}},de)}));return function(Ne){return ge.apply(this,arguments)}}();return console.log(Object(ne.h)(),"location333"),x.a.createElement("section",{className:he.a.wrap},x.a.createElement(ke.a,{loading:_,active:!0,paragraph:{rows:5}},((Y=Object(ne.h)())===null||Y===void 0||((G=Y.pathname)===null||G===void 0)?void 0:G.includes("preview"))&&x.a.createElement("div",{className:he.a.crumbs},x.a.createElement("b",null),x.a.createElement("span",{className:"current",onClick:function(){return H.d.push("/classrooms/".concat(xe.coursesId,"/exercise"))}},"".concat(K==null||((f=K.course)===null||f===void 0)?void 0:f.course_name,">")),x.a.createElement("span",{className:"current",onClick:function(){return H.d.push("/classrooms/".concat(xe.coursesId,"/exercise"))}},"\u8BD5\u5377\u5217\u8868>"),x.a.createElement("span",{style:{color:"#bebebe"}},"\u9884\u89C8")),x.a.createElement(j.a,{loading:D,submit:Re,goBack:rt,data:Fe,selectValue:le,editPreview:!0,onExchange:ce,onSkipExamination:Pe})))};et.default=Object(H.a)(function(V){var te=V.paperlibrary,De=V.user,Y=V.globalSetting;return{paperlibrary:te,user:De,globalSetting:Y}})(Z)},sbIO:function(bt,et,m){"use strict";var F=m("DjyN"),ke=m("NUBc"),q=m("5Dmo"),_e=m("3S7+"),be=m("/zsF"),ie=m("PArb"),L=m("Q9mQ"),R=m("diRs"),x=m("+L6B"),ne=m("2/Rp"),H=m("5NDa"),J=m("5rEg"),he=m("miYZ"),j=m("tsqr"),I=m("9og8"),N=m("giR+"),M=m("fyUT"),Z=m("2qtc"),V=m("kLXV"),te=m("tJVT"),De=m("WmNS"),Y=m.n(De),G=m("q1tI"),f=m.n(G),ee=m("PsQE"),U=m.n(ee),ae=m("0eGx"),E=m.n(ae),p=m("9Bee"),O=m("Ty5D"),T=m("9kvl"),y=m("ErOA"),D=m("+yhJ"),re=m.n(D),B=m("RZ/O"),me=m.n(B),_=m("LvDl"),c=m("6K3P"),P=m.n(c),ue=m("sRBo"),le=m("kaz8"),Le=m("oBTY"),We=m("PpiC"),pe=m("Ot1p"),Fe=m("kqOp"),Ee=m("7qnI"),xe=m("1vsH"),K=m("PGNT"),A=m.n(K),Ae=["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"],rt=function(w,S){var v=w.globalSetting,d=w.loading,h=w.dispatch,g=w.isEdit,b=w.editData,z=Object(We.a)(w,["globalSetting","loading","dispatch","isEdit","editData"]),Q=Object(G.useState)(""),oe=Object(te.a)(Q,2),Ye=oe[0],Ve=oe[1],Ke=Object(G.useState)(""),pt=Object(te.a)(Ke,2),Tt=pt[0],it=pt[1],Dt=Object(G.useState)([]),Et=Object(te.a)(Dt,2),It=Et[0],Ot=Et[1],dt=Object(G.useState)(""),Pt=Object(te.a)(dt,2),At=Pt[0],vt=Pt[1],st=Object(G.useState)(),ut=Object(te.a)(st,2),xt=ut[0],zt=ut[1],Ut=Object(G.useState)(!1),Vt=Object(te.a)(Ut,2),Bt=Vt[0],nt=Vt[1];Object(G.useEffect)(function(){if(!b||!g)return;Ve(b==null?void 0:b.name),it(b==null?void 0:b.analysis),zt(b==null?void 0:b.is_ordered),nt(!0)},[b]),Object(G.useEffect)(function(){if(!Bt)return;var Oe=b==null?void 0:b.standard_answer.map(function(Ge){return Ge.answer_text});Ot(Oe),nt(!1)},[Bt]),Object(G.useImperativeHandle)(S,function(){return{onSave:Ft,Clear:_t}});var Ft=function(){var Ge=[],Xt=!1;return Ye?(It.forEach(function($t,je){Ge.push({position:je+1,answer_text:[]}),$t.forEach(function(rn,qn){Ge[je].answer_text.push(rn),(!rn||!Object(xe.db)(rn,1e4))&&(vt("".concat(je,"-").concat(qn)),j.b.info(rn?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Xt=!0)})}),Xt?!1:(Ge==null?void 0:Ge.length)>20?(j.b.warn("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Ye,analysis:Tt,standard_answers:Ge,is_ordered:xt}):(j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},_t=function(){Ve(""),it(""),Ot([]),zt(!1)},Kt=function(Ge,Xt,$t){var je=It.slice();if(Xt&&je.splice(Ge,Xt),$t)for(var rn=0;rn<$t;rn++)je.splice(Ge+rn,0,[""]);Ot(je)},St=function(Ge,Xt,$t){vt("");var je=It.slice();je[Ge][Xt]=$t,Ot(je)},nn=function(Ge){var Xt=It.slice();Xt[Ge]=[].concat(Object(Le.a)(Xt[Ge]),[""]),Ot(Xt)},Un=function(Ge,Xt){var $t=It.slice();if(!$t[Ge][Xt]){$t[Ge]=$t[Ge].filter(function(je,rn){return rn!==Xt}),Ot($t);return}V.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:A.a.modal,onOk:function(){$t[Ge]=$t[Ge].filter(function(rn,qn){return qn!==Xt}),Ot($t)}})},Rn=function(Ge){V.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:A.a.modal,onOk:function(){var $t=It.slice();$t=It.filter(function(je,rn){return Ge!==rn}),Ot($t)}})};return f.a.createElement("section",{className:A.a.wrap},f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u9898\u5E72\uFF1A")),f.a.createElement("div",null,f.a.createElement(Fe.a,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Ye,onChange:function(Ge){return Ve(Ge)},showNullButton:!0,onPlaceholderChange:Kt})),f.a.createElement("div",{className:"mt20"},It.map(function(Oe,Ge){return f.a.createElement(Ee.a,{key:Ge,answers:Oe,index:Ge,flex:1,is_md:!0,activeOptionErrorIndex:At,onAnswerChange:St,addChildAnswer:nn,deleteChildAnswer:Un,deleteChildAnswermain:Rn})})),f.a.createElement("div",{className:"mt20"},It.length>1&&f.a.createElement("span",null,f.a.createElement(le.a,{checked:xt,onChange:function(Ge){return zt(Ge.target.checked)},className:"".concat(A.a.color333," font14")},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),f.a.createElement("span",{className:"".concat(A.a.color999," font12")},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),f.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Tt,onChange:function(Ge){return it(Ge)}}))},Re=Object(T.a)(function(Se){var w=Se.loading,S=Se.globalSetting;return{globalSetting:S,loading:w.effects}},null,null,{forwardRef:!0})(Object(G.forwardRef)(rt)),ce=m("7Kak"),Pe=m("9yH6"),ge=["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"],de=function(w,S){var v=w.globalSetting,d=w.loading,h=w.editData,g=w.dispatch,b=w.onRef,z=b===void 0?function(){}:b,Q=w.isEdit,oe=Object(We.a)(w,["globalSetting","loading","editData","dispatch","onRef","isEdit"]),Ye=Object(G.useState)(),Ve=Object(te.a)(Ye,2),Ke=Ve[0],pt=Ve[1],Tt=Object(G.useState)(""),it=Object(te.a)(Tt,2),Dt=it[0],Et=it[1],It=Object(G.useState)(""),Ot=Object(te.a)(It,2),dt=Ot[0],Pt=Ot[1];Object(G.useEffect)(function(){if(!h||!Q)return;Et(h==null?void 0:h.name),Pt(h==null?void 0:h.analysis);var st=h==null?void 0:h.choices.find(function(ut){return ut.is_answer});pt(st.choice_text==="\u6B63\u786E"?"0":"1")},[h]),Object(G.useImperativeHandle)(S,function(){return{onSave:At,Clear:vt}});var At=function(){if(!Dt)return j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!Ke)return j.b.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;var ut=[{choice_text:"\u6B63\u786E",is_answer:Ke==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Ke==="1"?1:0}];return{name:Dt,choices:ut,analysis:dt}},vt=function(){Et(""),Pt(""),pt("")};return f.a.createElement("section",{className:A.a.wrap},f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u9898\u5E72\uFF1A")),f.a.createElement(pe.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Dt,onChange:function(ut){return Et(ut)}}),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",f.a.createElement("span",{className:A.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),f.a.createElement(Pe.a.Group,{buttonStyle:"solid",value:Ke,onChange:function(ut){return pt(ut.target.value)}},f.a.createElement(Pe.a.Button,{value:"0",className:"".concat(A.a.radio," mr40")},"\u6B63\u786E"),f.a.createElement(Pe.a.Button,{value:"1",className:A.a.radio},"\u9519\u8BEF")),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),f.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:dt,onChange:function(ut){return Pt(ut)}}))},Ne=Object(T.a)(function(Se){var w=Se.loading,S=Se.globalSetting;return{globalSetting:S,loading:w.effects}},null,null,{forwardRef:!0})(Object(G.forwardRef)(de)),He=["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"],Ue=function(w,S){var v=w.editData,d=w.globalSetting,h=w.loading,g=w.dispatch,b=w.onRef,z=b===void 0?function(){}:b,Q=w.isEdit,oe=Object(We.a)(w,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Ye=Object(G.useState)([]),Ve=Object(te.a)(Ye,2),Ke=Ve[0],pt=Ve[1],Tt=Object(G.useState)(),it=Object(te.a)(Tt,2),Dt=it[0],Et=it[1],It=Object(G.useState)([]),Ot=Object(te.a)(It,2),dt=Ot[0],Pt=Ot[1],At=Object(G.useState)(""),vt=Object(te.a)(At,2),st=vt[0],ut=vt[1],xt=Object(G.useState)(""),zt=Object(te.a)(xt,2),Ut=zt[0],Vt=zt[1];Object(G.useEffect)(function(){pt(["","","",""])},[]),Object(G.useEffect)(function(){if(!v||!Q)return;ut(v==null?void 0:v.name),Vt(v==null?void 0:v.analysis),pt(v==null?void 0:v.choices.map(function(_t){return _t.choice_text}));var Ft=[];v==null||v.choices.map(function(_t,Kt){_t.is_answer&&Ft.push(Kt)}),Pt(Ft)},[v]),Object(G.useImperativeHandle)(S,function(){return{onSave:Bt,Clear:nt}});var Bt=function(){if(!st)return j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var _t=Ke.findIndex(function(St){return!St});if(_t>-1)return j.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(He[_t]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(!dt.length)return j.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(dt.length<2)return j.b.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;var Kt=Ke.map(function(St,nn){return{choice_text:St,is_answer:dt.includes(nn)?1:0}});return{name:st,choices:Kt,analysis:Ut}},nt=function(){pt(["","","",""]),ut(""),Vt(""),Pt("")};return f.a.createElement("section",{className:A.a.wrap},f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u9898\u5E72\uFF1A")),f.a.createElement(pe.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:st,onChange:function(_t){return ut(_t)}}),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",f.a.createElement("span",{className:A.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Ke.map(function(Ft,_t){return f.a.createElement("div",{className:A.a.choiceWrap,key:_t},f.a.createElement(_e.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},f.a.createElement("div",{className:"".concat(A.a.answer," ").concat(dt.includes(_t)?A.a.activeAnswer:""),onClick:function(){dt.includes(_t)?Pt(dt.filter(function(St){return St!==_t})):Pt([].concat(Object(Le.a)(dt),[_t]))}},He[_t])),f.a.createElement("div",{className:A.a.editorWrap},Dt===_t?f.a.createElement(pe.a,{id:"single-question-option-".concat(_t),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ft,onChange:function(St){Ke[_t]=St,pt(Ke)}}):f.a.createElement("div",{className:A.a.htmlWrap,onClick:function(){return Et(_t)}},f.a.createElement(p.a,{value:Ft}))),_t>1&&f.a.createElement(_e.a,{title:"\u5220\u9664"},f.a.createElement("i",{className:"".concat(A.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){pt(Ke.filter(function(St,nn){return nn!==_t})),dt.includes(_t)?Pt(dt.filter(function(St){return St!==_t})):Pt([].concat(Object(Le.a)(dt),[_t]))}})),_t<7&&_t===Ke.length-1&&f.a.createElement(_e.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},f.a.createElement("i",{className:"".concat(A.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return pt([].concat(Object(Le.a)(Ke),[""]))}})))}),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),f.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ut,onChange:function(_t){return Vt(_t)}}))},Ce=Object(T.a)(function(Se){var w=Se.loading,S=Se.globalSetting;return{globalSetting:S,loading:w.effects}},null,null,{forwardRef:!0})(Object(G.forwardRef)(Ue)),Te=["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"],at=function(w,S){var v=w.editData,d=w.globalSetting,h=w.loading,g=w.dispatch,b=w.onRef,z=b===void 0?function(){}:b,Q=w.isEdit,oe=Object(We.a)(w,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Ye=Object(G.useState)([]),Ve=Object(te.a)(Ye,2),Ke=Ve[0],pt=Ve[1],Tt=Object(G.useState)(),it=Object(te.a)(Tt,2),Dt=it[0],Et=it[1],It=Object(G.useState)(),Ot=Object(te.a)(It,2),dt=Ot[0],Pt=Ot[1],At=Object(G.useState)(""),vt=Object(te.a)(At,2),st=vt[0],ut=vt[1],xt=Object(G.useState)(""),zt=Object(te.a)(xt,2),Ut=zt[0],Vt=zt[1];Object(G.useEffect)(function(){pt(["","","",""])},[]),Object(G.useEffect)(function(){if(!v||!Q)return;ut(v==null?void 0:v.name),Vt(v==null?void 0:v.analysis),pt(v==null?void 0:v.choices.map(function(Ft){return Ft.choice_text})),Pt(v==null?void 0:v.choices.findIndex(function(Ft){return Ft.is_answer}))},[v]),Object(G.useImperativeHandle)(S,function(){return{onSave:Bt,Clear:nt}});var Bt=function(){if(!st)return j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var _t=Ke.findIndex(function(St){return!St});if(_t>-1)return j.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(Te[_t]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(console.log("activeAnswer: ",dt),!(typeof dt=="number"))return j.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;var Kt=Ke.map(function(St,nn){return{choice_text:St,is_answer:dt===nn?1:0}});return{name:st,choices:Kt,analysis:Ut}},nt=function(){pt(["","","",""]),ut(""),Vt(""),Pt("")};return f.a.createElement("section",{className:A.a.wrap},f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u9898\u5E72\uFF1A")),f.a.createElement(pe.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:st,onChange:function(_t){return ut(_t)}}),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",f.a.createElement("span",{className:A.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Ke.map(function(Ft,_t){return f.a.createElement("div",{className:A.a.choiceWrap,key:_t},f.a.createElement(_e.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},f.a.createElement("div",{className:"".concat(A.a.answer," ").concat(dt===_t?A.a.activeAnswer:""),onClick:function(){return Pt(_t)}},Te[_t])),f.a.createElement("div",{className:A.a.editorWrap},Dt===_t?f.a.createElement(pe.a,{id:"single-question-option-".concat(_t),watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ft,onChange:function(St){Ke[_t]=St,pt(Ke)}}):f.a.createElement("div",{className:A.a.htmlWrap,onClick:function(){return Et(_t)}},f.a.createElement(p.a,{value:Ft}))),_t>1&&f.a.createElement(_e.a,{title:"\u5220\u9664"},f.a.createElement("i",{className:"".concat(A.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){pt(Ke.filter(function(St,nn){return nn!==_t})),_t===dt&&Pt(null)}})),_t<7&&_t===Ke.length-1&&f.a.createElement(_e.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},f.a.createElement("i",{className:"".concat(A.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return pt([].concat(Object(Le.a)(Ke),[""]))}})))}),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),f.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ut,onChange:function(_t){return Vt(_t)}}))},Qe=Object(T.a)(function(Se){var w=Se.loading,S=Se.globalSetting;return{globalSetting:S,loading:w.effects}},null,null,{forwardRef:!0})(Object(G.forwardRef)(at)),$e=["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"],ot=function(w,S){var v=w.editData,d=w.globalSetting,h=w.loading,g=w.dispatch,b=w.onRef,z=b===void 0?function(){}:b,Q=w.isEdit,oe=Object(We.a)(w,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Ye=Object(G.useState)(""),Ve=Object(te.a)(Ye,2),Ke=Ve[0],pt=Ve[1],Tt=Object(G.useState)(""),it=Object(te.a)(Tt,2),Dt=it[0],Et=it[1],It=Object(G.useState)(""),Ot=Object(te.a)(It,2),dt=Ot[0],Pt=Ot[1];Object(G.useEffect)(function(){var st;if(!v||!Q)return;pt(v==null?void 0:v.name),Et(v==null?void 0:v.analysis),Pt(v==null||((st=v.answer_texts)===null||st===void 0)?void 0:st[0])},[v]),Object(G.useImperativeHandle)(S,function(){return{onSave:At,Clear:vt}});var At=function(){return Ke?dt?{name:Ke,answer_texts:[dt],analysis:Dt}:(j.b.info("\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848"),!1):(j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},vt=function(){pt(""),Et(""),Pt("")};return f.a.createElement("section",{className:A.a.wrap},f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u9898\u5E72\uFF1A")),f.a.createElement(pe.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ke,onChange:function(ut){return pt(ut)}}),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),f.a.createElement(pe.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:dt,onChange:function(ut){return Pt(ut)}}),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),f.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Dt,onChange:function(ut){return Et(ut)}}))},yt=Object(T.a)(function(Se){var w=Se.loading,S=Se.globalSetting;return{globalSetting:S,loading:w.effects}},null,null,{forwardRef:!0})(Object(G.forwardRef)(ot)),ft=m("k1fw"),Ze=["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"],fe=function(w,S){var v=w.globalSetting,d=w.loading,h=w.dispatch,g=w.editData,b=w.onRef,z=b===void 0?function(){}:b,Q=w.isEdit,oe=Object(We.a)(w,["globalSetting","loading","dispatch","editData","onRef","isEdit"]),Ye=Object(G.useState)(""),Ve=Object(te.a)(Ye,2),Ke=Ve[0],pt=Ve[1],Tt=Object(G.useState)([]),it=Object(te.a)(Tt,2),Dt=it[0],Et=it[1];console.log(Dt),Object(G.useEffect)(function(){var At;if(!g||!Q)return;pt(g==null?void 0:g.name);var vt=g==null||((At=g.sub_item_banks)===null||At===void 0)?void 0:At.map(function(st){var ut,xt,zt;return Object(ft.a)(Object(ft.a)({},st),{},{id:st.id,open:!1,qusList:st==null||((ut=st.choices)===null||ut===void 0)?void 0:ut.map(function(Ut){return Ut.choice_text}),activeQusEditor:null,qusAnswer:(xt=[st==null||((zt=st.choices)===null||zt===void 0)?void 0:zt.findIndex(function(Ut){return Ut.is_answer})])===null||xt===void 0?void 0:xt.filter(function(Ut){return Ut!==-1})})});Et(vt)},[g]),Object(G.useImperativeHandle)(S,function(){return{onSave:It,Clear:Ot}});var It=function(){if(!Ke)return j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(Dt.length===0)return j.b.info("\u8BF7\u60A8\u6DFB\u52A0\u5C0F\u9898"),!1;for(var vt=0;vt<Dt.length;vt++){var st,ut=Dt[vt];if(!(ut!=null&&ut.name))return j.b.info("\u8BF7\u60A8\u8F93\u5165\u7B2C".concat(vt+1,"\u5C0F\u9898\u9898\u5E72")),!1;var xt=ut==null||((st=ut.qusList)===null||st===void 0)?void 0:st.findIndex(function(Ut){return!Ut});if(xt>-1)return j.b.info("\u8BF7\u5148\u8F93\u5165\u7B2C".concat(vt+1,"\u5C0F\u9898").concat(Ze[xt],"\u9009\u9879\u7684\u5185\u5BB9")),!1;if(!(ut!=null&&ut.qusAnswer.length))return j.b.info("\u8BF7\u8BBE\u7F6E\u7B2C".concat(vt+1,"\u5C0F\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E")),!1}var zt=Dt.map(function(Ut){return{id:Ut.id>1?Ut.id:null,name:Ut.name,item_type:Ut.item_type,analysis:Ut.analysis,choices:Ut.qusList.map(function(Vt,Bt){return{choice_text:Vt,is_answer:Ut.qusAnswer[0]===Bt?1:0}})}});return{name:Ke,sub_item_banks:zt}},Ot=function(){pt(""),Et([])},dt=function(){var vt={id:Math.random(),item_type:"SINGLE",open:!1,name:"",qusList:["","","",""],activeQusEditor:null,qusAnswer:[],analysis:""};Et(Dt.concat(vt))},Pt=function(vt,st,ut){var xt=Object(_.cloneDeep)(Dt);if(vt==="open"&&(xt[st].open=!xt[st].open),vt==="delete"&&xt.splice(st,1),vt==="value"&&(xt[st].name=ut),vt==="answer"&&(xt[st].qusAnswer=[ut]),vt==="edit"&&(xt[st].activeQusEditor=ut),vt==="details"&&(xt[st].qusList[xt[st].activeQusEditor]=ut),vt==="addQus"&&(xt[st].qusList=xt[st].qusList.concat("")),vt==="deleteQus"){var zt;xt[st].qusList=xt[st].qusList.filter(function(Ut,Vt){return Vt!==ut}),xt[st].qusAnswer=(zt=xt[st].qusAnswer)===null||zt===void 0?void 0:zt.filter(function(Ut){return Ut!==ut})}vt==="analysis"&&(xt[st].analysis=ut),Et(xt)};return f.a.createElement("section",{className:A.a.wrap},f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u9898\u5E72\uFF1A")),f.a.createElement(pe.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ke,onChange:function(vt){return pt(vt)}}),Dt==null?void 0:Dt.map(function(At,vt){var st;return f.a.createElement("div",{className:A.a.fold,key:At.id},f.a.createElement("div",{onClick:function(){return Pt("open",vt)},className:A.a.head},f.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:At.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),f.a.createElement("span",null,"\u7B2C",vt+1,"\u5C0F\u9898\uFF08\u5355\u9009\u9898\uFF09"),f.a.createElement("b",{style:{visibility:"hidden"},onClick:function(xt){xt.stopPropagation(),Pt("delete",vt)},className:"iconfont icon-shanchu8"})),f.a.createElement("div",{className:"mb10",style:{display:At.open?"block":"none"}},f.a.createElement(pe.a,{watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:At==null?void 0:At.name,onChange:function(xt){return Pt("value",vt,xt)}}),f.a.createElement("p",{className:A.a.titleWrap},f.a.createElement("span",{className:A.a.required},"*"),f.a.createElement("span",{className:A.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",f.a.createElement("span",{className:A.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),At==null||((st=At.qusList)===null||st===void 0)?void 0:st.map(function(ut,xt){var zt,Ut;return f.a.createElement("div",{className:A.a.choiceWrap,key:xt},f.a.createElement(_e.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},f.a.createElement("div",{className:"".concat(A.a.answer," ").concat(At!=null&&(zt=At.qusAnswer)!==null&&zt!==void 0&&zt.includes(xt)?A.a.activeAnswer:""),onClick:function(){return Pt("answer",vt,xt)}},Ze[xt])),f.a.createElement("div",{className:A.a.editorWrap},(At==null?void 0:At.activeQusEditor)===xt?f.a.createElement(pe.a,{id:"single-question-option-".concat(xt),watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:ut,onChange:function(Bt){return Pt("details",vt,Bt)}}):f.a.createElement("div",{className:A.a.htmlWrap,onClick:function(){return Pt("edit",vt,xt)}},f.a.createElement(p.a,{value:ut}))),xt>1&&f.a.createElement(_e.a,{title:"\u5220\u9664"},f.a.createElement("i",{className:"".concat(A.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return Pt("deleteQus",vt,xt)}})),xt<7&&xt===(At==null||((Ut=At.qusList)===null||Ut===void 0)?void 0:Ut.length)-1&&f.a.createElement(_e.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},f.a.createElement("i",{className:"".concat(A.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Pt("addQus",vt)}})))}),f.a.createElement("p",{className:"mb10 mt10"},f.a.createElement("span",{className:A.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),f.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:At.analysis,onChange:function(xt){return Pt("analysis",vt,xt)}})))}))},ht=Object(T.a)(function(Se){var w=Se.loading,S=Se.globalSetting;return{globalSetting:S,loading:w.effects}},null,null,{forwardRef:!0})(Object(G.forwardRef)(fe)),tt=function(w){var S,v,d,h,g,b,z,Q,oe=w.data,Ye=w.submit,Ve=w.goBack,Ke=w.loading,pt=w.onTypeScore,Tt=w.editPreview,it=Tt===void 0?!1:Tt,Dt=w.onSkipExamination,Et=w.selectValue,It=w.onExchange,Ot=Object(G.useRef)(),dt=Object(G.useRef)(Object(_.debounce)(function(){return Kt()},100,{leading:!0,trailing:!0})),Pt=Object(G.useState)(null),At=Object(te.a)(Pt,2),vt=At[0],st=At[1],ut=Object(G.useState)(!1),xt=Object(te.a)(ut,2),zt=xt[0],Ut=xt[1],Vt=Object(O.i)();Object(G.useEffect)(function(){return window.addEventListener("scroll",dt==null?void 0:dt.current),function(){window.removeEventListener("scroll",dt==null?void 0:dt.current)}},[]),Object(G.useEffect)(function(){Ut(!0)},[]),Object(G.useEffect)(function(){var we,W,Ie,mt,Xe=(we=document.getElementById("examName"))===null||we===void 0||((W=we.getElementsByClassName("ant-pagination-options-quick-jumper"))===null||W===void 0||((Ie=W[0])===null||Ie===void 0||((mt=Ie.childNodes)===null||mt===void 0)))?void 0:mt[2];Xe&&(Xe.nodeValue="\u4EFD")},[oe]);var Bt=function(W){var Ie=parseInt(W);return isNaN(Ie)?"":Ie};function nt(){var we=0,W=0,Ie=0;return document.body&&(W=document.body.scrollTop),document.documentElement&&(Ie=document.documentElement.scrollTop),we=W-Ie>0?W:Ie,we}function Ft(){var we=0,W=0,Ie=0;return document.body&&(W=document.body.scrollHeight),document.documentElement&&(Ie=document.documentElement.scrollHeight),we=W-Ie>0?W:Ie,we}function _t(){var we=0;return document.compatMode=="CSS1Compat"?we=document.documentElement.clientHeight:we=document.body.clientHeight,we}var Kt=function(){var W=document.getElementById("preview_btns"),Ie=document.getElementById("preview_btns_else");nt()+_t()>=Ft()-68?(W.style.visibility="hidden",Ie.style.visibility="visible"):(W.style.visibility="visible",Ie.style.visibility="hidden")},St=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],nn=function(W){var Ie,mt=[];return f.a.createElement(f.a.Fragment,null,f.a.createElement("aside",{className:U.a.single},W==null||((Ie=W.choices)===null||Ie===void 0)?void 0:Ie.map(function(Xe,ze){return Xe.is_answer&&mt.push(Xt[ze]),f.a.createElement("ul",{key:ze},f.a.createElement("li",null,Xt[ze],"\u3001"),f.a.createElement("li",null,f.a.createElement(p.a,{value:Xe.choice_text})))})),f.a.createElement("div",{className:U.a.analysis},f.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",mt.join(""),f.a.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",St[W.difficulty])),f.a.createElement("aside",null,f.a.createElement("span",{className:U.a.text},"\u89E3\u6790:"),f.a.createElement(p.a,{value:W.analysis?W.analysis:"\u6682\u65E0\u89E3\u6790"})),f.a.createElement("ul",null,f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat(W==null?void 0:W.discipline_name,"/").concat(W==null?void 0:W.sub_discipline_name)),f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),W==null?void 0:W.tag_discipline_name))))},Un=function(W){var Ie,mt=W==null||((Ie=W.standard_answer)===null||Ie===void 0)?void 0:Ie.map(function(Xe){var ze;return"\u7B54\u6848\uFF08\u586B\u7A7A".concat(Xe.position,"\uFF09\uFF1A").concat(Xe==null||((ze=Xe.answer_text)===null||ze===void 0)?void 0:ze.join("\u3001"))});return f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{className:U.a.analysis},f.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",mt),f.a.createElement("aside",null,f.a.createElement("span",{className:U.a.text},"\u89E3\u6790:"),f.a.createElement(p.a,{value:W.analysis?W.analysis:"\u6682\u65E0\u89E3\u6790"})),f.a.createElement("ul",null,f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat(W==null?void 0:W.discipline_name,"/").concat(W==null?void 0:W.sub_discipline_name)),f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),W==null?void 0:W.tag_discipline_name))))},Rn=function(W){var Ie;return f.a.createElement("div",{className:U.a.analysis},f.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",W==null||((Ie=W.answer_texts)===null||Ie===void 0)?void 0:Ie[0]),f.a.createElement("aside",null,f.a.createElement("span",{className:U.a.text},"\u89E3\u6790:"),f.a.createElement(p.a,{value:W.analysis?W.analysis:"\u6682\u65E0\u89E3\u6790"})),f.a.createElement("ul",null,f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat(W==null?void 0:W.discipline_name,"/").concat(W==null?void 0:W.sub_discipline_name)),f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),W==null?void 0:W.tag_discipline_name)))},Oe=function(W){var Ie;return f.a.createElement("div",{className:U.a.analysis},f.a.createElement("aside",null,f.a.createElement("span",{className:U.a.text},"\u9884\u671F\u8F93\u51FA:"),f.a.createElement(p.a,{value:W==null||((Ie=W.program_attr)===null||Ie===void 0)?void 0:Ie.description})),f.a.createElement("ul",null,f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat(W==null?void 0:W.discipline_name,"/").concat(W==null?void 0:W.sub_discipline_name)),f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),W==null?void 0:W.tag_discipline_name)))},Ge=function(W,Ie){var mt;return f.a.createElement("div",null,W==null||((mt=W.sub_item_banks)===null||mt===void 0)?void 0:mt.map(function(Xe,ze){var Lt,Ht=[];return f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333"}},Ie+1+"."+(ze+1),"\uFF08\u5355\u9009\u9898\uFF09",Xe.name),f.a.createElement("aside",{className:U.a.single},Xe==null||((Lt=Xe.choices)===null||Lt===void 0)?void 0:Lt.map(function(qt,Yt){return qt.is_answer&&Ht.push(Xt[Yt]),f.a.createElement("ul",{key:Yt},f.a.createElement("li",null,Xt[Yt],"\u3001"),f.a.createElement("li",null,f.a.createElement(p.a,{value:qt.choice_text})))})),f.a.createElement("div",{className:U.a.analysis},f.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Ht.join(""),f.a.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",St[Xe.difficulty])),f.a.createElement("aside",null,f.a.createElement("span",{className:U.a.text},"\u89E3\u6790:"),f.a.createElement(p.a,{value:Xe.analysis?Xe.analysis:"\u6682\u65E0\u89E3\u6790"})),f.a.createElement("ul",null,f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat(W==null?void 0:W.discipline_name,"/").concat(W==null?void 0:W.sub_discipline_name)),f.a.createElement("li",null,f.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),W==null?void 0:W.tag_discipline_name))))}))},Xt=["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"],$t=function(W){console.log("---",W);var Ie=[];W.questions.map(function(Xe){return Xe==null?void 0:Xe.sub_item_banks.map(function(ze){Ie.push(ze)})});var mt=0;W.type==="COMBINATION"?mt=W.questions_score/Ie.length:mt=W.questions_score/W.questions_count,V.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:f.a.createElement("div",{className:U.a.modalColumn},f.a.createElement("div",{className:U.a.modalRow,style:{justifyContent:"flex-start"}},f.a.createElement("sup",{className:U.a.sup},"*"),f.a.createElement("span",null,W==null?void 0:W.name,(W==null?void 0:W.type)==="COMBINATION"&&"\u4E2D\u7684\u6BCF\u5C0F\u9898","\uFF1A"),f.a.createElement(M.a,{min:1,parser:Bt,defaultValue:mt,onChange:function(ze){mt=ze}}),f.a.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Xe=Object(I.a)(Y.a.mark(function Lt(){var Ht,qt;return Y.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:if(mt){un.next=3;break}return j.b.warn("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),un.abrupt("return",Promise.reject());case 3:W.type==="COMBINATION"?(Ht={type:W==null?void 0:W.type,score:mt,scoreTotal:mt*(Ie==null?void 0:Ie.length)},pt(Ht)):(qt={type:W==null?void 0:W.type,score:mt,scoreTotal:mt*W.questions_count},pt(qt));case 4:case"end":return un.stop()}},Lt)}));function ze(){return Xe.apply(this,arguments)}return ze}()})},je=function(){var W="";V.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:f.a.createElement("div",{className:U.a.modalColumn},f.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20"},f.a.createElement("img",{style:{marginRight:5},src:P.a}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),f.a.createElement("div",{className:U.a.modalRow,style:{marginTop:20}},f.a.createElement("sup",{className:U.a.sup},"*"),f.a.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),f.a.createElement(J.a,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:W,onChange:function(mt){W=mt.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ie=Object(I.a)(Y.a.mark(function Xe(){var ze,Lt,Ht,qt,Yt;return Y.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:if(W){Pn.next=3;break}return j.b.warn("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Pn.abrupt("return",Promise.reject());case 3:return Lt=[],Ht=[],qt=[],oe==null||((ze=oe.questionList)===null||ze===void 0)||ze.forEach(function(fn){var kn;(kn=fn.questions)===null||kn===void 0||kn.forEach(function(fr){Lt.push(fr.id),Ht.push(fn.questions_score/fn.questions_count),fn.type==="COMBINATION"&&qt.push({id:fr.id,sub_item_bank_ids:fr.sub_item_banks.map(function(Ln){return Ln.id})})})}),console.log("-----",qt),Yt={item_bank_ids:Lt,item_bank_scores:Ht,name:W,combination_item_banks:qt},Pn.next=11,Ye(Yt);case 11:case"end":return Pn.stop()}},Xe)}));function mt(){return Ie.apply(this,arguments)}return mt}()})},rn=function(W,Ie,mt,Xe){var ze,Lt=(ze=Xe.questions)===null||ze===void 0?void 0:ze.map(function(qt){return qt.id}),Ht=V.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u8981\u66F4\u6362\u8BE5\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var qt=Object(I.a)(Y.a.mark(function un(){return Y.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:return Ht.update({cancelButtonProps:{disabled:!0}}),fn.next=3,It({single_question_id:W,seleted_item_bank_ids:Lt},{type:Ie,index:mt});case 3:Ht.update({cancelButtonProps:{disabled:!1}}),j.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898");case 5:case"end":return fn.stop()}},un)}));function Yt(){return qt.apply(this,arguments)}return Yt}()})},qn=function(W){var Ie,mt=(Ie=W.questions)===null||Ie===void 0?void 0:Ie.map(function(Lt){return Lt.id}),Xe=W.name,ze=V.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362".concat(Xe,"\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Lt=Object(I.a)(Y.a.mark(function qt(){return Y.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return ze.update({cancelButtonProps:{disabled:!0}}),un.next=3,It({seleted_item_bank_ids:mt},{type:W.type});case 3:ze.update({cancelButtonProps:{disabled:!1}}),j.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210".concat(Xe,"\u8BD5\u9898"));case 5:case"end":return un.stop()}},qt)}));function Ht(){return Lt.apply(this,arguments)}return Ht}()})},kt=function(){var W=V.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362\u9884\u89C8\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ie=Object(I.a)(Y.a.mark(function Xe(){return Y.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return W.update({cancelButtonProps:{disabled:!0}}),Lt.next=3,It();case 3:W.update({cancelButtonProps:{disabled:!1}}),j.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898");case 5:case"end":return Lt.stop()}},Xe)}));function mt(){return Ie.apply(this,arguments)}return mt}()})},dn=function(W){console.log(W,"key"),Dt(W-1)},Xn=function(){return f.a.createElement(f.a.Fragment,null,f.a.createElement(R.a,{color:"#55575D",overlayClassName:U.a.popover,visible:zt,getPopupContainer:function(Ie){return Ie==null?void 0:Ie.parentNode},content:"\u5982\u60A8\u5BF9\u6B64\u4EFD\u8BD5\u9898\u6EE1\u610F\uFF0C\u53EF\u5C06\u6B64\u4EFD\u8BD5\u9898\u4FDD\u5B58\u4E3A\u56FA\u5B9A\u8BD5\u5377"},f.a.createElement(ne.a,{onMouseEnter:function(){return Ut(!0)},onMouseLeave:function(){return Ut(!1)},onClick:function(){je()}},"\u4FDD\u5B58")),f.a.createElement(ne.a,{onClick:function(){document.body.scrollIntoView(),Ve()}},"\u8FD4\u56DE"),f.a.createElement(ne.a,{loading:Ke,onClick:function(){return Ye()},type:"primary"},"\u63D0\u4EA4"))},Jn=function(){var W;return f.a.createElement(f.a.Fragment,null,f.a.createElement(ne.a,{onClick:Ve},"\u8FD4\u56DE"),Et>0&&f.a.createElement(ne.a,{onClick:function(){return dn(Et)},type:"primary"},"\u4E0A\u4E00\u4EFD"),Et<(oe==null||((W=oe.exam)===null||W===void 0)?void 0:W.total_num)-1&&f.a.createElement(ne.a,{onClick:function(){return dn(Et+2)}},"\u4E0B\u4E00\u4EFD"))},wn=function(W,Ie){if(console.log(W,222),Ie==="SINGLE")return f.a.createElement(f.a.Fragment,null,f.a.createElement(Qe,{ref:Ot,editData:W,isEdit:!0}),f.a.createElement(ie.a,null));if(Ie==="MULTIPLE")return f.a.createElement(f.a.Fragment,null,f.a.createElement(Ce,{ref:Ot,editData:W,isEdit:!0}),f.a.createElement(ie.a,null));if(Ie==="JUDGMENT")return f.a.createElement(f.a.Fragment,null,f.a.createElement(Ne,{ref:Ot,editData:W,isEdit:!0}),f.a.createElement(ie.a,null));if(Ie==="COMPLETION")return f.a.createElement(f.a.Fragment,null,f.a.createElement(Re,{ref:Ot,editData:W,isEdit:!0}),f.a.createElement(ie.a,null));if(Ie==="SUBJECTIVE")return f.a.createElement(f.a.Fragment,null,f.a.createElement(yt,{ref:Ot,editData:W,isEdit:!0}),f.a.createElement(ie.a,null));if(Ie==="COMBINATION")return f.a.createElement(f.a.Fragment,null,f.a.createElement(ht,{ref:Ot,editData:W,isEdit:!0}),f.a.createElement(ie.a,null));if(Ie==="PROGRAM"){var mt;T.d.push("/problems/".concat(W==null||((mt=W.program_attr)===null||mt===void 0)?void 0:mt.identifier,"/edit?type=exercises&express_id=").concat(Vt.categoryId,"&question_id=").concat(W==null?void 0:W.id,"&score=").concat(W==null?void 0:W.score,"&callback_url=").concat(location.pathname,"&select=").concat(Et,"&exercise=true"))}},zn=function(){var we=Object(I.a)(Y.a.mark(function W(Ie,mt){var Xe,ze,Lt,Ht,qt,Yt,un,Pn,fn,kn;return Y.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,(Xe=Ot.current)===null||Xe===void 0?void 0:Xe.onSave();case 2:if(ze=Ln.sent,ze){Ln.next=5;break}return Ln.abrupt("return");case 5:return Lt={question_score:mt.score,analysis:ze.analysis},console.log(ze,"editorData"),(Ie==="SINGLE"||Ie==="MULTIPLE"||Ie==="JUDGMENT")&&(qt=[],Yt=[],Lt.question_type=Ie==="JUDGMENT"?2:1,Lt.question_title=ze==null?void 0:ze.name,ze==null||((Ht=ze.choices)===null||Ht===void 0)||Ht.forEach(function(Mn,ar){qt.push(Mn.choice_text),Mn!=null&&Mn.is_answer&&Yt.push(ar+1)}),Lt.question_choices=qt,Lt.standard_answers=Yt),Ie==="COMPLETION"&&(Lt.is_ordered=ze.is_ordered,Lt.question_title=ze==null?void 0:ze.name,Lt.question_type=3,Pn=[],ze==null||((un=ze.standard_answers)===null||un===void 0)||un.forEach(function(Mn,ar){Pn.push({choice_id:Mn.position,answer_text:Mn.answer_text})}),Lt.standard_answers=Pn),Ie==="SUBJECTIVE"&&(Lt.question_title=ze==null?void 0:ze.name,Lt.question_type=3,Lt.standard_answers=ze==null?void 0:ze.answer_texts),Ie==="COMBINATION"&&(Lt.question_title=ze==null?void 0:ze.name,Lt.question_type=7,Lt.sub_questions=ze==null||((fn=ze.sub_item_banks)===null||fn===void 0)?void 0:fn.map(function(Mn,ar){return{id:Mn.id,question_title:Mn.name,question_type:1,question_choices:Mn.choices.map(function(Gn){return Gn.choice_text}),standard_answers:[Mn.choices.findIndex(function(Gn){return Gn.is_answer})+1],analysis:Mn.analysis}}),delete Lt.analysis),Ln.next=13,Object(y.a)("/api/exercise_questions/".concat(mt.id,".json"),{method:"put",body:Lt});case 13:kn=Ln.sent,(kn==null?void 0:kn.status)===0&&(j.b.success("\u7F16\u8F91\u6210\u529F"),dn(Et+1)),st(null);case 16:case"end":return Ln.stop()}},W)}));return function(Ie,mt){return we.apply(this,arguments)}}(),wt=function(){for(var W=[],Ie=0;Ie<(oe==null||((mt=oe.exam)===null||mt===void 0)?void 0:mt.total_num);Ie++){var mt;W.push({})}return W};console.log(wt(),"data");var se=oe==null||((S=oe.questionList)===null||S===void 0)?void 0:S.reduce(function(we,W){return we+W.questions_score},0),ct=it&&(oe==null||((v=oe.exam)===null||v===void 0)?void 0:v.exercise_status)!==1;return f.a.createElement("section",{className:U.a.wrap},f.a.createElement("div",{id:"id_left_preview",className:U.a.left,onMouseEnter:function(W){var Ie=document.getElementById("id_left_preview");Ie.style.overflowY="auto"},onMouseLeave:function(W){var Ie=document.getElementById("id_left_preview");Ie.style.overflowY="hidden"}},f.a.createElement("div",{className:U.a.title},f.a.createElement("div",null,f.a.createElement("b",null),f.a.createElement("span",null,"\u7B54\u9898\u5361"))),f.a.createElement("div",{className:U.a.total},f.a.createElement("div",null,f.a.createElement("img",{src:re.a}),f.a.createElement("span",null,"\u9898\u6570(\u9053)"),f.a.createElement("aside",null,oe==null?void 0:oe.all_questions_count)),f.a.createElement("div",{className:"mr30 ml30"},f.a.createElement("img",{src:me.a}),f.a.createElement("span",null,"\u603B\u5206(\u5206)"),f.a.createElement("aside",null,se)),f.a.createElement("div",null,f.a.createElement("img",{src:E.a}),f.a.createElement("span",null,"\u65F6\u957F(\u5206)"),f.a.createElement("aside",null,oe==null||((d=oe.exam)===null||d===void 0)?void 0:d.time))),oe==null||((h=oe.questionList)===null||h===void 0)?void 0:h.map(function(we,W){var Ie;return f.a.createElement("div",{className:U.a.list,key:W},f.a.createElement("div",{className:U.a.name},f.a.createElement("b",null),f.a.createElement("span",null,we.name)),f.a.createElement("aside",null,f.a.createElement("div",null,"\u5171",f.a.createElement("span",{className:U.a.b},we.questions_count),"\u9898 ",f.a.createElement("span",{className:U.a.l},"|"),"\u5171",f.a.createElement("span",{className:U.a.r},we.questions_score),"\u5206"),f.a.createElement("div",{className:U.a.answerSheet},we==null||((Ie=we.questions)===null||Ie===void 0)?void 0:Ie.map(function(mt,Xe){return f.a.createElement("div",{onClick:function(){var Lt="Anchor_".concat(mt.id),Ht=document.getElementById(Lt);Ht&&setTimeout(function(){return Ht.scrollIntoView({block:"center",behavior:"smooth"})})},key:mt.id,className:U.a.tag},Xe+1)}))))})),f.a.createElement("div",{className:U.a.right},f.a.createElement("div",{className:U.a.examName,id:"examName"},f.a.createElement("div",{className:U.a.name},f.a.createElement(_e.a,{title:oe==null||((g=oe.exam)===null||g===void 0)?void 0:g.name,getPopupContainer:function(W){return W.parentNode}},f.a.createElement("span",{className:U.a.t},oe==null||((b=oe.exam)===null||b===void 0)?void 0:b.name))),it?f.a.createElement(ke.a,{showTotal:function(W){return f.a.createElement("span",{style:{color:"#656F87",fontSize:14}},"\u5171\u8BA1",f.a.createElement("span",{className:"c-light-primary"},W),"\u4EFD\u8BD5\u5377")},total:oe==null||((z=oe.exam)===null||z===void 0)?void 0:z.total_num,pageSize:1,current:Et+1,showSizeChanger:!1,onChange:dn,showQuickJumper:!0,hideOnSinglePage:!1}):f.a.createElement(ne.a,{onClick:kt,type:"primary"},"\u968F\u673A\u66F4\u6362")),f.a.createElement("div",{className:U.a.topWarp},oe==null||((Q=oe.questionList)===null||Q===void 0)?void 0:Q.map(function(we,W){var Ie,mt;return f.a.createElement(f.a.Fragment,{key:W},f.a.createElement("div",{className:U.a.head,style:W===0?{border:0,marginTop:-16}:{}},f.a.createElement("div",{className:U.a.name},f.a.createElement("b",null),f.a.createElement("span",null,we.name)),f.a.createElement("div",{className:U.a.so},"\u5171",f.a.createElement("span",{className:U.a.b},we.questions_count," "),"\u9898 ",we.type==="COMBINATION"&&"\uFF08\u5305\u542B".concat(we==null||((Ie=we.questions)===null||Ie===void 0)?void 0:Ie.map(function(Xe){var ze;return Xe==null||((ze=Xe.sub_item_banks)===null||ze===void 0)?void 0:ze.length}).reduce(function(Xe,ze){return Xe+ze}),"\u5C0F\u9898\uFF09"),f.a.createElement("span",{className:U.a.l},"|"),"\u5171",f.a.createElement("span",{className:U.a.r},we.questions_score),"\u5206"),!it&&f.a.createElement("div",{className:U.a.btn},f.a.createElement(ne.a,{onClick:function(){$t(we)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),f.a.createElement(ne.a,{onClick:function(){return qn(we)},type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),we==null||((mt=we.questions)===null||mt===void 0)?void 0:mt.map(function(Xe,ze){return vt===Xe.id?f.a.createElement("div",{id:"Anchor_".concat(Xe.id),className:U.a.content,style:{padding:0,marginTop:10},key:Xe.id},f.a.createElement("div",{style:{float:"right",marginTop:-6}},f.a.createElement(ne.a,{onClick:function(){return st(null)},className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),f.a.createElement(ne.a,{onClick:function(){return zn(we==null?void 0:we.type,Xe)},type:"primary"},"\u4FDD\u5B58")),wn(Xe,we.type)):f.a.createElement("div",{id:"Anchor_".concat(Xe.id),className:U.a.content,key:Xe.id},f.a.createElement("div",{className:U.a.titleWrap},f.a.createElement(p.a,{style:{paddingRight:10},className:U.a.titleHtml,value:ze+1+"\u3001"+"".concat((Xe==null?void 0:Xe.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+Xe.name}),it&&f.a.createElement(ne.a,{disabled:ct,onClick:function(){if(vt){j.b.warn("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}st(Xe.id)},type:"primary",className:"mr20",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),f.a.createElement(ne.a,{disabled:ct,onClick:function(){return rn(Xe.id,we.type,ze,we)},type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(we.type==="SINGLE"||we.type==="JUDGMENT"||we.type==="MULTIPLE")&&nn(Xe),we.type==="COMPLETION"&&Un(Xe),we.type==="SUBJECTIVE"&&Rn(Xe),we.type==="PROGRAM"&&Oe(Xe),we.type==="COMBINATION"&&Ge(Xe,ze),f.a.createElement("div",null))}))})),f.a.createElement("div",{className:U.a.btnsElse,id:"preview_btns_else"},it?Jn():Xn()),f.a.createElement("div",{className:U.a.btnsWrap,id:"preview_btns"},f.a.createElement("div",{className:U.a.btns},it?Jn():Xn()))))},ve=et.a=tt},vHTk:function(bt,et,m){bt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wMS7:function(bt,et,m){/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */(function(F,ke){bt.exports=ke()})(this,function(){"use strict";function F(Re){if(Array.isArray(Re)){for(var ce=0,Pe=Array(Re.length);ce<Re.length;ce++)Pe[ce]=Re[ce];return Pe}else return Array.from(Re)}var ke=Object.hasOwnProperty,q=Object.setPrototypeOf,_e=Object.isFrozen,be=Object.keys,ie=Object.freeze,L=Object.seal,R=Object.create,x=typeof Reflect!="undefined"&&Reflect,ne=x.apply,H=x.construct;ne||(ne=function(ce,Pe,ge){return ce.apply(Pe,ge)}),ie||(ie=function(ce){return ce}),L||(L=function(ce){return ce}),H||(H=function(ce,Pe){return new(Function.prototype.bind.apply(ce,[null].concat(F(Pe))))});var J=U(Array.prototype.forEach),he=U(Array.prototype.indexOf),j=U(Array.prototype.join),I=U(Array.prototype.pop),N=U(Array.prototype.push),M=U(Array.prototype.slice),Z=U(String.prototype.toLowerCase),V=U(String.prototype.match),te=U(String.prototype.replace),De=U(String.prototype.indexOf),Y=U(String.prototype.trim),G=U(RegExp.prototype.test),f=ae(RegExp),ee=ae(TypeError);function U(Re){return function(ce){for(var Pe=arguments.length,ge=Array(Pe>1?Pe-1:0),de=1;de<Pe;de++)ge[de-1]=arguments[de];return ne(Re,ce,ge)}}function ae(Re){return function(){for(var ce=arguments.length,Pe=Array(ce),ge=0;ge<ce;ge++)Pe[ge]=arguments[ge];return H(Re,Pe)}}function E(Re,ce){q&&q(Re,null);for(var Pe=ce.length;Pe--;){var ge=ce[Pe];if(typeof ge=="string"){var de=Z(ge);de!==ge&&(_e(ce)||(ce[Pe]=de),ge=de)}Re[ge]=!0}return Re}function p(Re){var ce=R(null),Pe=void 0;for(Pe in Re)ne(ke,Re,[Pe])&&(ce[Pe]=Re[Pe]);return ce}var O=ie(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),T=ie(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),y=ie(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=ie(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),re=ie(["#text"]),B=ie(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),me=ie(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_=ie(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),c=ie(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=L(/\{\{[\s\S]*|[\s\S]*\}\}/gm),ue=L(/<%[\s\S]*|[\s\S]*%>/gm),le=L(/^data-[\-\w.\u00B7-\uFFFF]/),Le=L(/^aria-[\-\w]+$/),We=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pe=L(/^(?:\w+script|data):/i),Fe=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Re){return typeof Re}:function(Re){return Re&&typeof Symbol=="function"&&Re.constructor===Symbol&&Re!==Symbol.prototype?"symbol":typeof Re};function xe(Re){if(Array.isArray(Re)){for(var ce=0,Pe=Array(Re.length);ce<Re.length;ce++)Pe[ce]=Re[ce];return Pe}else return Array.from(Re)}var K=function(){return typeof window=="undefined"?null:window},A=function(ce,Pe){if((typeof ce=="undefined"?"undefined":Ee(ce))!=="object"||typeof ce.createPolicy!="function")return null;var ge=null,de="data-tt-policy-suffix";Pe.currentScript&&Pe.currentScript.hasAttribute(de)&&(ge=Pe.currentScript.getAttribute(de));var Ne="dompurify"+(ge?"#"+ge:"");try{return ce.createPolicy(Ne,{createHTML:function(Ue){return Ue}})}catch(He){return console.warn("TrustedTypes policy "+Ne+" could not be created."),null}};function Ae(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:K(),ce=function(se){return Ae(se)};if(ce.version="2.0.15",ce.removed=[],!Re||!Re.document||Re.document.nodeType!==9)return ce.isSupported=!1,ce;var Pe=Re.document,ge=!1,de=Re.document,Ne=Re.DocumentFragment,He=Re.HTMLTemplateElement,Ue=Re.Node,Ce=Re.NodeFilter,Te=Re.NamedNodeMap,at=Te===void 0?Re.NamedNodeMap||Re.MozNamedAttrMap:Te,Qe=Re.Text,$e=Re.Comment,ot=Re.DOMParser,yt=Re.trustedTypes;if(typeof He=="function"){var ft=de.createElement("template");ft.content&&ft.content.ownerDocument&&(de=ft.content.ownerDocument)}var Ze=A(yt,Pe),fe=Ze&&Ut?Ze.createHTML(""):"",ht=de,tt=ht.implementation,ve=ht.createNodeIterator,Se=ht.getElementsByTagName,w=ht.createDocumentFragment,S=Pe.importNode,v=p(de).documentMode?de.documentMode:{},d={};ce.isSupported=tt&&typeof tt.createHTMLDocument!="undefined"&&v!==9;var h=P,g=ue,b=le,z=Le,Q=pe,oe=Fe,Ye=We,Ve=null,Ke=E({},[].concat(xe(O),xe(T),xe(y),xe(D),xe(re))),pt=null,Tt=E({},[].concat(xe(B),xe(me),xe(_),xe(c))),it=null,Dt=null,Et=!0,It=!0,Ot=!1,dt=!1,Pt=!1,At=!1,vt=!1,st=!1,ut=!1,xt=!1,zt=!1,Ut=!1,Vt=!0,Bt=!0,nt=!1,Ft={},_t=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),Kt=null,St=E({},["audio","video","img","source","image","track"]),nn=null,Un=E({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Rn=null,Oe=de.createElement("form"),Ge=function(se){if(Rn&&Rn===se)return;(!se||(typeof se=="undefined"?"undefined":Ee(se))!=="object")&&(se={}),se=p(se),Ve="ALLOWED_TAGS"in se?E({},se.ALLOWED_TAGS):Ke,pt="ALLOWED_ATTR"in se?E({},se.ALLOWED_ATTR):Tt,nn="ADD_URI_SAFE_ATTR"in se?E(p(Un),se.ADD_URI_SAFE_ATTR):Un,Kt="ADD_DATA_URI_TAGS"in se?E(p(St),se.ADD_DATA_URI_TAGS):St,it="FORBID_TAGS"in se?E({},se.FORBID_TAGS):{},Dt="FORBID_ATTR"in se?E({},se.FORBID_ATTR):{},Ft="USE_PROFILES"in se?se.USE_PROFILES:!1,Et=se.ALLOW_ARIA_ATTR!==!1,It=se.ALLOW_DATA_ATTR!==!1,Ot=se.ALLOW_UNKNOWN_PROTOCOLS||!1,dt=se.SAFE_FOR_JQUERY||!1,Pt=se.SAFE_FOR_TEMPLATES||!1,At=se.WHOLE_DOCUMENT||!1,ut=se.RETURN_DOM||!1,xt=se.RETURN_DOM_FRAGMENT||!1,zt=se.RETURN_DOM_IMPORT||!1,Ut=se.RETURN_TRUSTED_TYPE||!1,st=se.FORCE_BODY||!1,Vt=se.SANITIZE_DOM!==!1,Bt=se.KEEP_CONTENT!==!1,nt=se.IN_PLACE||!1,Ye=se.ALLOWED_URI_REGEXP||Ye,Pt&&(It=!1),xt&&(ut=!0),Ft&&(Ve=E({},[].concat(xe(re))),pt=[],Ft.html===!0&&(E(Ve,O),E(pt,B)),Ft.svg===!0&&(E(Ve,T),E(pt,me),E(pt,c)),Ft.svgFilters===!0&&(E(Ve,y),E(pt,me),E(pt,c)),Ft.mathMl===!0&&(E(Ve,D),E(pt,_),E(pt,c))),se.ADD_TAGS&&(Ve===Ke&&(Ve=p(Ve)),E(Ve,se.ADD_TAGS)),se.ADD_ATTR&&(pt===Tt&&(pt=p(pt)),E(pt,se.ADD_ATTR)),se.ADD_URI_SAFE_ATTR&&E(nn,se.ADD_URI_SAFE_ATTR),Bt&&(Ve["#text"]=!0),At&&E(Ve,["html","head","body"]),Ve.table&&(E(Ve,["tbody"]),delete it.tbody),ie&&ie(se),Rn=se},Xt=function(se){N(ce.removed,{element:se});try{se.parentNode.removeChild(se)}catch(ct){se.outerHTML=fe}},$t=function(se,ct){try{N(ce.removed,{attribute:ct.getAttributeNode(se),from:ct})}catch(we){N(ce.removed,{attribute:null,from:ct})}ct.removeAttribute(se)},je=function(se){var ct=void 0,we=void 0;if(st)se="<remove></remove>"+se;else{var W=V(se,/^[\r\n\t ]+/);we=W&&W[0]}var Ie=Ze?Ze.createHTML(se):se;try{ct=new ot().parseFromString(Ie,"text/html")}catch(ze){}if(ge&&E(it,["title"]),!ct||!ct.documentElement){ct=tt.createHTMLDocument("");var mt=ct,Xe=mt.body;Xe.parentNode.removeChild(Xe.parentNode.firstElementChild),Xe.outerHTML=Ie}return se&&we&&ct.body.insertBefore(de.createTextNode(we),ct.body.childNodes[0]||null),Se.call(ct,At?"html":"body")[0]};ce.isSupported&&function(){try{var wt=je("<x/><title></title><img>");G(/<\/title/,wt.querySelector("title").innerHTML)&&(ge=!0)}catch(se){}}();var rn=function(se){return ve.call(se.ownerDocument||se,se,Ce.SHOW_ELEMENT|Ce.SHOW_COMMENT|Ce.SHOW_TEXT,function(){return Ce.FILTER_ACCEPT},!1)},qn=function(se){return se instanceof Qe||se instanceof $e?!1:typeof se.nodeName!="string"||typeof se.textContent!="string"||typeof se.removeChild!="function"||!(se.attributes instanceof at)||typeof se.removeAttribute!="function"||typeof se.setAttribute!="function"||typeof se.namespaceURI!="string"},kt=function(se){return(typeof Ue=="undefined"?"undefined":Ee(Ue))==="object"?se instanceof Ue:se&&(typeof se=="undefined"?"undefined":Ee(se))==="object"&&typeof se.nodeType=="number"&&typeof se.nodeName=="string"},dn=function(se,ct,we){if(!d[se])return;J(d[se],function(W){W.call(ce,ct,we,Rn)})},Xn=function(se){var ct=void 0;if(dn("beforeSanitizeElements",se,null),qn(se))return Xt(se),!0;if(V(se.nodeName,/[\u0080-\uFFFF]/))return Xt(se),!0;var we=Z(se.nodeName);if(dn("uponSanitizeElement",se,{tagName:we,allowedTags:Ve}),(we==="svg"||we==="math")&&se.querySelectorAll("p, br").length!==0)return Xt(se),!0;if(!Ve[we]||it[we]){if(Bt&&!_t[we]&&typeof se.insertAdjacentHTML=="function")try{var W=se.innerHTML;se.insertAdjacentHTML("AfterEnd",Ze?Ze.createHTML(W):W)}catch(Ie){}return Xt(se),!0}return we==="noscript"&&G(/<\/noscript/i,se.innerHTML)||we==="noembed"&&G(/<\/noembed/i,se.innerHTML)?(Xt(se),!0):(dt&&!kt(se.firstElementChild)&&(!kt(se.content)||!kt(se.content.firstElementChild))&&G(/</g,se.textContent)&&(N(ce.removed,{element:se.cloneNode()}),se.innerHTML?se.innerHTML=te(se.innerHTML,/</g,"<"):se.innerHTML=te(se.textContent,/</g,"<")),Pt&&se.nodeType===3&&(ct=se.textContent,ct=te(ct,h," "),ct=te(ct,g," "),se.textContent!==ct&&(N(ce.removed,{element:se.cloneNode()}),se.textContent=ct)),dn("afterSanitizeElements",se,null),!1)},Jn=function(se,ct,we){if(Vt&&(ct==="id"||ct==="name")&&(we in de||we in Oe))return!1;if(!(It&&G(b,ct))){if(!(Et&&G(z,ct))){if(!pt[ct]||Dt[ct])return!1;if(!nn[ct]){if(!G(Ye,te(we,oe,""))){if(!((ct==="src"||ct==="xlink:href"||ct==="href")&&se!=="script"&&De(we,"data:")===0&&Kt[se])){if(!(Ot&&!G(Q,te(we,oe,"")))){if(we)return!1}}}}}}return!0},wn=function(se){var ct=void 0,we=void 0,W=void 0,Ie=void 0,mt=void 0;dn("beforeSanitizeAttributes",se,null);var Xe=se.attributes;if(!Xe)return;var ze={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:pt};for(mt=Xe.length;mt--;){ct=Xe[mt];var Lt=ct,Ht=Lt.name,qt=Lt.namespaceURI;if(we=Y(ct.value),W=Z(Ht),ze.attrName=W,ze.attrValue=we,ze.keepAttr=!0,ze.forceKeepAttr=void 0,dn("uponSanitizeAttribute",se,ze),we=ze.attrValue,ze.forceKeepAttr)continue;if(W==="name"&&se.nodeName==="IMG"&&Xe.id)Ie=Xe.id,Xe=M(Xe,[]),$t("id",se),$t(Ht,se),he(Xe,Ie)>mt&&se.setAttribute("id",Ie.value);else{if(se.nodeName==="INPUT"&&W==="type"&&we==="file"&&ze.keepAttr&&(pt[W]||!Dt[W]))continue;Ht==="id"&&se.setAttribute(Ht,""),$t(Ht,se)}if(!ze.keepAttr)continue;if(dt&&G(/\/>/i,we)){$t(Ht,se);continue}if(G(/svg|math/i,se.namespaceURI)&&G(f("</("+j(be(_t),"|")+")","i"),we)){$t(Ht,se);continue}Pt&&(we=te(we,h," "),we=te(we,g," "));var Yt=se.nodeName.toLowerCase();if(!Jn(Yt,W,we))continue;try{qt?se.setAttributeNS(qt,Ht,we):se.setAttribute(Ht,we),I(ce.removed)}catch(un){}}dn("afterSanitizeAttributes",se,null)},zn=function wt(se){var ct=void 0,we=rn(se);for(dn("beforeSanitizeShadowDOM",se,null);ct=we.nextNode();){if(dn("uponSanitizeShadowNode",ct,null),Xn(ct))continue;ct.content instanceof Ne&&wt(ct.content),wn(ct)}dn("afterSanitizeShadowDOM",se,null)};return ce.sanitize=function(wt,se){var ct=void 0,we=void 0,W=void 0,Ie=void 0,mt=void 0;if(wt||(wt="<!-->"),typeof wt!="string"&&!kt(wt)){if(typeof wt.toString!="function")throw ee("toString is not a function");if(wt=wt.toString(),typeof wt!="string")throw ee("dirty is not a string, aborting")}if(!ce.isSupported){if(Ee(Re.toStaticHTML)==="object"||typeof Re.toStaticHTML=="function"){if(typeof wt=="string")return Re.toStaticHTML(wt);if(kt(wt))return Re.toStaticHTML(wt.outerHTML)}return wt}if(vt||Ge(se),ce.removed=[],typeof wt=="string"&&(nt=!1),!nt)if(wt instanceof Ue)ct=je("<!-->"),we=ct.ownerDocument.importNode(wt,!0),we.nodeType===1&&we.nodeName==="BODY"||we.nodeName==="HTML"?ct=we:ct.appendChild(we);else{if(!ut&&!Pt&&!At&&wt.indexOf("<")===-1)return Ze&&Ut?Ze.createHTML(wt):wt;if(ct=je(wt),!ct)return ut?null:fe}ct&&st&&Xt(ct.firstChild);for(var Xe=rn(nt?wt:ct);W=Xe.nextNode();){if(W.nodeType===3&&W===Ie)continue;if(Xn(W))continue;W.content instanceof Ne&&zn(W.content),wn(W),Ie=W}if(Ie=null,nt)return wt;if(ut){if(xt)for(mt=w.call(ct.ownerDocument);ct.firstChild;)mt.appendChild(ct.firstChild);else mt=ct;return zt&&(mt=S.call(Pe,mt,!0)),mt}var ze=At?ct.outerHTML:ct.innerHTML;return Pt&&(ze=te(ze,h," "),ze=te(ze,g," ")),Ze&&Ut?Ze.createHTML(ze):ze},ce.setConfig=function(wt){Ge(wt),vt=!0},ce.clearConfig=function(){Rn=null,vt=!1},ce.isValidAttribute=function(wt,se,ct){Rn||Ge({});var we=Z(wt),W=Z(se);return Jn(we,W,ct)},ce.addHook=function(wt,se){if(typeof se!="function")return;d[wt]=d[wt]||[],N(d[wt],se)},ce.removeHook=function(wt){d[wt]&&I(d[wt])},ce.removeHooks=function(wt){d[wt]&&(d[wt]=[])},ce.removeAllHooks=function(){d={}},ce}var rt=Ae();return rt})}}]);
|