(window.webpackJsonp=window.webpackJsonp||[]).push([[234],{"7ahc":function(ut,De,g){"use strict";g.d(De,"a",function(){return ke});var J=g("k1fw"),ye=g("0Owb"),fe=g("+L6B"),Le=g("2/Rp"),B=g("y8nQ"),W=g("Vl3Y"),P=g("tJVT"),Q=g("OaEy"),$=g("2fM7"),We=g("q1tI"),L=g.n(We),E=g("VrN/"),ue=g.n(E),ae=g("p77/"),de=g.n(ae),ee=g("c5Ni"),we=g.n(ee),Ie=$.a.Option,Te={labelCol:{span:4},wrapperCol:{span:20}},Ge={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"]};De.b=function(V){var Ee=V.callback,Me=V.onCancel,Oe=Object(We.useState)("python"),ce=Object(P.a)(Oe,2),pe=ce[0],re=ce[1];function _(te){re(Ge[te][1])}function se(te){Ee(te)}return L.a.createElement(W.a,Object(ye.a)({},Te,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:se}),L.a.createElement(W.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},L.a.createElement($.a,{onChange:_},Object.keys(Ge).map(function(te){return L.a.createElement(Ie,{key:te,value:te},Ge[te][0])}))),L.a.createElement(W.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},L.a.createElement(ke,{mode:pe})),L.a.createElement("div",{className:"flex-container flex-end"},L.a.createElement(Le.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(Le.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))};function ke(V){var Ee=V.value,Me=V.onChange,Oe=V.mode,ce=V.options,pe=ce===void 0?{}:ce,re=Object(We.useRef)(),_=Object(We.useState)(),se=Object(P.a)(_,2),te=se[0],Qe=se[1];return Object(We.useEffect)(function(){if(te){function be(Y){var Re=Y.getValue();Me&&Me(Re)}return te.on("change",be),function(){te.off("change",be)}}},[te,Me]),Object(We.useEffect)(function(){te&&te.setOption("mode",Oe)},[te,Oe]),Object(We.useEffect)(function(){te&&((Ee!==te.getValue()||Ee==="")&&setTimeout(function(){te.setValue(Ee||" ")},300))},[te,Ee]),Object(We.useEffect)(function(){if(re.current&&!te){var be=ue.a.fromTextArea(re.current,Object(J.a)({mode:Oe,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},pe));Qe(be)}},[re.current,te]),L.a.createElement("div",{className:"my-codemirror-container"},L.a.createElement("textarea",{ref:re}))}},"9ZNV":function(ut,De,g){"use strict";g.d(De,"a",function(){return We});var J=g("0Owb"),ye=g("+L6B"),fe=g("2/Rp"),Le=g("q1tI"),B=g.n(Le),W=g("UUDw"),P=g.n(W),Q=g("TSYQ"),$=g.n(Q),We=function(E){var ue=E.cancelText,ae=ue===void 0?"\u53D6\u6D88":ue,de=E.okText,ee=de===void 0?"\u786E\u5B9A":de,we=E.loading,Ie=we===void 0?!1:we,Te=E.hasOkBtn,Ge=Te===void 0?!0:Te,ke=E.okButtonProps,V=ke===void 0?{}:ke,Ee=E.onCancel,Me=Ee===void 0?function(){}:Ee,Oe=E.onOk,ce=Oe===void 0?function(){}:Oe,pe=E.className,re=pe===void 0?"":pe;return B.a.createElement("div",{className:$()(P.a.buttonFixed,re)},B.a.createElement("div",{className:P.a.buttonWrap},B.a.createElement(fe.a,{size:"large",className:"".concat(P.a.button," mr20"),onClick:Me},ae),Ge&&B.a.createElement(fe.a,Object(J.a)({size:"large",type:"primary",className:"".concat(P.a.button," mr20"),loading:Ie,onClick:ce},V),ee)))}},Gytx:function(ut,De){ut.exports=function(J,ye,fe,Le){var B=fe?fe.call(Le,J,ye):void 0;if(B!==void 0)return!!B;if(J===ye)return!0;if(typeof J!="object"||!J||typeof ye!="object"||!ye)return!1;var W=Object.keys(J),P=Object.keys(ye);if(W.length!==P.length)return!1;for(var Q=Object.prototype.hasOwnProperty.bind(ye),$=0;$1&&arguments[1]!==void 0?arguments[1]:1,Ue=Ae.length,Ce=0;Ce1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Me.a)(z).map(function(G,X){if(!B.isValidElement(G)||!G.type)return null;var He=G.type.isSelectOptGroup,Be=G.key,C=G.props,D=C.children,T=Object(P.a)(C,["children"]);return M||!He?Oe(G):Object(Ee.a)(Object(Ee.a)({key:"__RC_SELECT_GRP__".concat(Be===null?X:Be,"__"),label:Be},T),{},{options:ce(D)})}).filter(function(G){return G})}var pe=g("2Qr1"),re=g("qNPg"),_=g("U8pU"),se=g("Kwbf"),te=g("WKfj");function Qe(z){var M=z.mode,G=z.options,X=z.children,He=z.backfill,Be=z.allowClear,C=z.placeholder,D=z.getInputElement,T=z.showSearch,A=z.onSearch,b=z.defaultOpen,U=z.autoFocus,k=z.labelInValue,H=z.value,ne=z.inputValue,ie=z.optionLabelProp,_e=M==="multiple"||M==="tags",je=T!==void 0?T:_e||M==="combobox",xe=G||ce(X);if(Object(se.a)(M!=="tags"||xe.every(function(he){return!he.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),M==="tags"||M==="combobox"){var qe=xe.some(function(he){return he.options?he.options.some(function(Ae){return typeof("value"in Ae?Ae.value:Ae.key)=="number"}):typeof("value"in he?he.value:he.key)=="number"});Object(se.a)(!qe,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(se.a)(M!=="combobox"||!ie,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(se.a)(M==="combobox"||!He,"`backfill` only works with `combobox` mode."),Object(se.a)(M==="combobox"||!D,"`getInputElement` only work with `combobox` mode."),Object(se.b)(M!=="combobox"||!D||!Be||!C,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),A&&!je&&M!=="combobox"&&M!=="tags"&&Object(se.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(se.b)(!b||U,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),H!=null){var At=Object(te.d)(H);Object(se.a)(!k||At.every(function(he){return Object(_.a)(he)==="object"&&("key"in he||"value"in he)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(se.a)(!_e||Array.isArray(H),"`value` should be array when `mode` is `multiple` or `tags`")}if(X){var ot=null;Object(Me.a)(X).some(function(he){if(!B.isValidElement(he)||!he.type)return!1;var Ae=he.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var ct=Object(Me.a)(he.props.children).every(function(Et){return!B.isValidElement(Et)||!he.type||Et.type.isSelectOption?!0:(ot=Et.type,!1)});return!ct}return ot=Ae,!0}),ot&&Object(se.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ot.displayName||ot.name||ot,"`.")),Object(se.a)(ne===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var be=Qe,Y=Object(re.a)({prefixCls:"rc-select",components:{optionList:Ie},convertChildrenToData:ce,flattenOptions:pe.d,getLabeledValue:pe.e,filterOptions:pe.b,isValueDisabled:pe.g,findValueOption:pe.c,warningProps:be,fillOptionsWithMissingValue:pe.a}),Re=function(z){Object(fe.a)(G,z);var M=Object(Le.a)(G);function G(){var X;return Object(J.a)(this,G),X=M.apply(this,arguments),X.selectRef=B.createRef(),X.focus=function(){X.selectRef.current.focus()},X.blur=function(){X.selectRef.current.blur()},X}return Object(ye.a)(G,[{key:"render",value:function(){return B.createElement(Y,Object.assign({ref:this.selectRef},this.props))}}]),G}(B.Component);Re.Option=Ge,Re.OptGroup=V;var dt=Re,St=De.c=dt},UUDw:function(ut,De,g){ut.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},"VrN/":function(ut,De,g){(function(J,ye){ut.exports=ye()})(this,function(){"use strict";var J=navigator.userAgent,ye=navigator.platform,fe=/gecko\/\d/i.test(J),Le=/MSIE \d/.test(J),B=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(J),W=/Edge\/(\d+)/.exec(J),P=Le||B||W,Q=P&&(Le?document.documentMode||6:+(W||B)[1]),$=!W&&/WebKit\//.test(J),We=$&&/Qt\/\d+\.\d+/.test(J),L=!W&&/Chrome\//.test(J),E=/Opera\//.test(J),ue=/Apple Computer/.test(navigator.vendor),ae=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(J),de=/PhantomJS/.test(J),ee=!W&&/AppleWebKit/.test(J)&&/Mobile\/\w+/.test(J),we=/Android/.test(J),Ie=ee||we||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(J),Te=ee||/Mac/.test(ye),Ge=/\bCrOS\b/.test(J),ke=/win/i.test(ye),V=E&&J.match(/Version\/(\d*\.\d*)/);V&&(V=Number(V[1])),V&&V>=15&&(E=!1,$=!0);var Ee=Te&&(We||E&&(V==null||V<12.11)),Me=fe||P&&Q>=9;function Oe(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ce=function(e,t){var n=e.className,r=Oe(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function pe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function re(e,t){return pe(e).appendChild(t)}function _(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}var G=function(){this.id=null,this.f=null,this.time=0,this.handler=St(this.onTimeout,this)};G.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},G.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var b=[""];function U(e){for(;b.length<=e;)b.push(k(b)+" ");return b[e]}function k(e){return e[e.length-1]}function H(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||je.test(e))}function qe(e,t){return t?t.source.indexOf("\\w")>-1&&xe(e)?!0:t.test(e):xe(e)}function At(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ot=/[\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 he(e){return e.charCodeAt(0)>=768&&ot.test(e)}function Ae(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function Et(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),a.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var wt=null;function kt(e,t,n){var r;wt=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:wt=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:wt=i)}return r!=null?r:wt}var yr=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(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 r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(u,h,f){this.level=u,this.from=h,this.to=f}return function(u,h){var f=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var c=u.length,d=[],p=0;p-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ne(e,t){var n=Dt(e,t);if(!n.length)return;for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Ue(e){e.prototype.on=function(t,n){I(this,t,n)},e.prototype.off=function(t,n){at(this,t,n)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ot(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function _t(e){Ce(e),Xe(e)}function Wt(e){return e.target||e.srcElement}function br(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Te&&e.ctrlKey&&t==1&&(t=3),t}var qn=function(){if(P&&Q<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),Hr;function $n(e){if(Hr==null){var t=_("span","\u200B");re(e,_("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Hr=t.offsetWidth<=1&&t.offsetHeight>2&&!(P&&Q<8))}var n=Hr?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var Br;function ei(e){if(Br!=null)return Br;var t=re(e,document.createTextNode("A\u062EA")),n=te(t,0,1).getBoundingClientRect(),r=te(t,1,2).getBoundingClientRect();return pe(e),!n||n.left==n.right?!1:Br=r.right-n.right<3}var It=` b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` `,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Jt=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(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ti=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),jr=null;function ri(e){if(jr!=null)return jr;var t=re(e,_("span","x")),n=t.getBoundingClientRect(),r=te(t,0,1).getBoundingClientRect();return jr=Math.abs(n.left-r.left)>1}var Kr={},wr={};function is(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Kr[e]=t}function os(e,t){wr[e]=t}function wn(e){if(typeof e=="string"&&wr.hasOwnProperty(e))e=wr[e];else if(e&&typeof e.name=="string"&&wr.hasOwnProperty(e.name)){var t=wr[e.name];typeof t=="string"&&(t={name:t}),e=_e(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return wn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return wn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function ni(e,t){t=wn(t);var n=Kr[t.name];if(!n)return ni(e,"text/plain");var r=n(e,t);if(xr.hasOwnProperty(t.name)){var i=xr[t.name];for(var o in i){if(!i.hasOwnProperty(o))continue;r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var xr={};function as(e,t){var n=xr.hasOwnProperty(e)?xr[e]:xr[e]={};z(t,n)}function or(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function ii(e,t){for(var n;e.innerMode&&!(n=e.innerMode(t),!n||n.mode==e);)t=n.state,e=n.mode;return n||{mode:e,state:t}}function eo(e,t,n){return e.startState?e.startState(t,n):!0}var Ye=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Ye.prototype.eol=function(){return this.pos>=this.string.length},Ye.prototype.sol=function(){return this.pos==this.lineStart},Ye.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ye.prototype.next=function(){if(this.post},Ye.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ye.prototype.skipToEnd=function(){this.pos=this.string.length},Ye.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ye.prototype.backUp=function(e){this.pos-=e},Ye.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Ye.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ye.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ye.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ye.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function R(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 n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?m(n,R(e,n).text.length):ss(t,R(e,t.line).text.length)}function ss(e,t){var n=e.ch;return n==null||n>t?m(e.line,t):n<0?m(e.line,0):e}function ro(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Ut.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}},Ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ut.fromSaved=function(e,t,n){return t instanceof Sn?new Ut(e,or(e.mode,t.state),n,t.lookAhead):new Ut(e,or(e.mode,t),n)},Ut.prototype.save=function(e){var t=e!==!1?or(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Sn(t,this.maxLookAhead):t};function no(e,t,n,r){var i=[e.state.modeGen],o={};uo(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var a=n.state,s=function(u){n.baseTokens=i;var h=e.state.overlays[u],f=1,c=0;n.state=!0,uo(e,t.text,h.mode,n,function(d,p){for(var v=f;cd&&i.splice(f,1,d,i[f+1],y),f+=2,c=Math.min(d,y)}if(!p)return;if(h.opaque)i.splice(v,f-v,d,"overlay "+p),f=v+2;else for(;ve.options.maxHighlightLength&&or(e.doc.mode,r.state),o=no(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Xr(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Ut(r,!0,t);var o=ls(e,t,n),a=o>r.first&&R(r,o-1).stateAfter,s=a?Ut.fromSaved(r,a,o):new Ut(r,eo(r.mode),o);return r.iter(o,t,function(l){ui(e,l.text,s);var u=s.line;l.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var ao=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function so(e,t,n,r){var i=e.doc,o=i.mode,a;t=K(i,t);var s=R(i,t.line),l=Xr(e,t.line,n),u=new Ye(s.text,e.options.tabSize,l),h;for(r&&(h=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&ui(e,t,r,h.pos),h.pos=t.length,f=null):f=lo(hi(n,h,r.state,c),o),c){var d=c[0].name;d&&(f="m-"+(f?d+" "+f:d))}if(!s||u!=f){for(;la;--s){if(s<=o.first)return o.first;var l=R(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof Sn?u.lookAhead:0)<=o.modeFrontier))return s;var h=M(l.text,null,e.options.tabSize);(i==null||r>h)&&(i=s-1,r=h)}return i}function us(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontiern;r--){var i=R(e,r).stateAfter;if(i&&(!(i instanceof Sn)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new En(a,o.from,l?null:o.to))}}return r}function vs(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&a.type=="bookmark"&&(!n||o.marker.insertLeft)){var l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var O=0;O0)continue;var h=[l,1],f=j(u.from,s.from),c=j(u.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&h.push({from:u.from,to:s.from}),(c>0||!a.inclusiveRight&&!c)&&h.push({from:s.to,to:u.to}),i.splice.apply(i,h),l+=h.length-3}return i}function co(e){var t=e.markedSpans;if(!t)return;for(var n=0;nt)&&(!r||di(r,o.marker)<0)&&(r=o.marker)}return r}function mo(e,t,n,r,i){var o=R(e,t),a=Kt&&o.markedSpans;if(a)for(var s=0;s=0&&f<=0||h<=0&&f>=0)continue;if(h<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?j(u.to,n)>=0:j(u.to,n)>0)||h>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?j(u.from,r)<=0:j(u.from,r)<0))return!0}}function zt(e){for(var t;t=go(e);)e=t.find(-1,!0).line;return e}function ys(e){for(var t;t=kn(e);)e=t.find(1,!0).line;return e}function bs(e){for(var t,n;t=kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ci(e,t){var n=R(e,t),r=zt(n);return n==r?t:ge(r)}function yo(e,t){if(t>e.lastLine())return t;var n=R(e,t),r;if(!Qt(e,n))return t;for(;r=kn(n);)n=r.find(1,!0).line;return ge(n)+1}function Qt(e,t){var n=Kt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Cr=function(e,t,n){this.text=e,po(this,t),this.height=n?n(this):1};Cr.prototype.lineNo=function(){return ge(this)},Ue(Cr);function ws(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),co(e),po(e,n);var i=r?r(e):1;i!=e.height&&Ft(e,i)}function xs(e){e.parent=null,co(e)}var Cs={},Ss={};function bo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Ss:Cs;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function wo(e,t){var n=se("span",null,null,$?"padding-right: .1px":null),r={pre:se("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Ls,ei(e.display.measure)&&(a=pt(o,e.doc.direction))&&(r.addToken=ks(r.addToken,a)),r.map=[];var s=t!=e.display.externalMeasured&&ge(o);Ms(o,r,io(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=Re(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=Re(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild($n(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if($){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ne(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Re(r.pre.className,r.textClass||"")),r}function Es(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ls(e,t,n,r,i,o,a){if(!t)return;var s=e.splitSpaces?Ts(t,e.trailingSpace):t,l=e.cm.state.specialChars,u=!1,h;if(!l.test(t))e.col+=t.length,h=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,h),P&&Q<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var f=0;;){l.lastIndex=f;var c=l.exec(t),d=c?c.index-f:t.length-f;if(d){var p=document.createTextNode(s.slice(f,f+d));P&&Q<9?h.appendChild(_("span",[p])):h.appendChild(p),e.map.push(e.pos,e.pos+d,p),e.col+=d,e.pos+=d}if(!c)break;f+=d+1;var v=void 0;if(c[0]==" "){var y=e.cm.options.tabSize,w=y-e.col%y;v=h.appendChild(_("span",U(w),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text"," "),e.col+=w}else c[0]=="\r"||c[0]==` `?(v=h.appendChild(_("span",c[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),v.setAttribute("cm-text",c[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(c[0]),v.setAttribute("cm-text",c[0]),P&&Q<9?h.appendChild(_("span",[v])):h.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,n||r||i||u||o||a){var S=n||"";r&&(S+=r),i&&(S+=i);var x=_("span",[h],S,o);if(a)for(var O in a)a.hasOwnProperty(O)&&O!="style"&&O!="class"&&x.setAttribute(O,a[O]);return e.content.appendChild(x)}e.content.appendChild(h)}function Ts(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&f.from<=u);c++);if(f.to>=h)return e(n,r,i,o,a,s,l);e(n,r.slice(0,f.to-u),i,o,null,s,l),o=null,r=r.slice(f.to-u),u=f.to}}}function xo(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ms(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var a=1;al||Z.collapsed&&N.to==l&&N.from==l)){if(N.to!=null&&N.to!=l&&d>N.to&&(d=N.to,v=""),Z.className&&(p+=" "+Z.className),Z.css&&(c=(c?c+";":"")+Z.css),Z.startStyle&&N.from==l&&(y+=" "+Z.startStyle),Z.endStyle&&N.to==d&&(O||(O=[])).push(Z.endStyle,N.to),Z.title&&((S||(S={})).title=Z.title),Z.attributes)for(var Se in Z.attributes)(S||(S={}))[Se]=Z.attributes[Se];Z.collapsed&&(!w||di(w.marker,Z)<0)&&(w=N)}else N.from>l&&d>N.from&&(d=N.from)}if(O)for(var tt=0;tt=s)break;for(var Ct=Math.min(s,d);;){if(h){var mt=l+h.length;if(!w){var Ze=mt>Ct?h.slice(0,Ct-l):h;t.addToken(t,Ze,f?f+p:p,y,l+Ze.length==d?v:"",c,S)}if(mt>=Ct){h=h.slice(Ct-l),l=Ct;break}l=mt,y=""}h=i.slice(o,o=n[u++]),f=bo(n[u++],t.cm.options)}}}function Co(e,t,n){this.line=t,this.rest=bs(t),this.size=this.rest?ge(k(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Qt(e,t)}function On(e,t,n){for(var r=[],i,o=t;o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Oo(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Us(e,t){t=zt(t);var n=ge(t),r=e.display.externalMeasured=new Co(e.doc,t,n);r.lineN=n;var i=r.built=wo(e,r);return r.text=i.pre,re(e.display.lineMeasure,i.pre),r}function _o(e,t,n,r){return Bt(e,Er(e,t),n,r)}function bi(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=l-s,i=o-1,t>=l&&(a="right")),i!=null){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],a="left";if(n=="right"&&i==l-s)for(;u=0&&!((n=e[i]).left!=n.right);i--);return n}function Hs(e,t,n,r){var i=Do(t.map,n,r),o=i.node,a=i.start,s=i.end,l=i.collapse,u;if(o.nodeType==3){for(var h=0;h<4;h++){for(;a&&he(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+s0&&(l=r="right");var f;e.options.lineWrapping&&(f=o.getClientRects()).length>1?u=f[r=="right"?f.length-1:0]:u=o.getBoundingClientRect()}if(P&&Q<9&&!a&&(!u||!u.left&&!u.right)){var c=o.parentNode.getClientRects()[0];c?u={left:c.left,right:c.left+Tr(e.display),top:c.top,bottom:c.bottom}:u=Ao}for(var d=u.top-t.rect.top,p=u.bottom-t.rect.top,v=(d+p)/2,y=t.view.measure.heights,w=0;w=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a(u=="before"?l-1:l,u=="before");function h(p,v,y){var w=s[v],S=w.level==1;return a(y?p-1:p,S!=y)}var f=kt(s,l,u),c=wt,d=h(l,f,u=="before");return c!=null&&(d.other=h(l,c,u!="before")),d}function Fo(e,t){var n=0;t=K(e.doc,t),e.options.lineWrapping||(n=Tr(e.display)*t.ch);var r=R(e.doc,t.line),i=Gt(r)+_n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ci(e,t,n,r,i){var o=m(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Si(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ci(r.first,0,null,-1,-1);var i=sr(r,n),o=r.first+r.size-1;if(i>o)return Ci(r.first+r.size-1,R(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=R(r,i);;){var s=js(e,a,i,t,n),l=ms(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;a=R(r,i=u.line)}}function Uo(e,t,n,r){r-=wi(t);var i=t.text.length,o=ct(function(a){return Bt(e,n,a-1).bottom<=r},i,0);return i=ct(function(a){return Bt(e,n,a).top>r},o,i),{begin:o,end:i}}function zo(e,t,n,r){n||(n=Er(e,t));var i=An(e,t,Bt(e,n,r),"line").top;return Uo(e,t,n,i)}function Ei(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function js(e,t,n,r,i){i-=Gt(t);var o=Er(e,t),a=wi(t),s=0,l=t.text.length,u=!0,h=pt(t,e.doc.direction);if(h){var f=(e.options.lineWrapping?Gs:Ks)(e,t,n,o,h,r,i);u=f.level!=1,s=u?f.from:f.to-1,l=u?f.to:f.from-1}var c=null,d=null,p=ct(function(F){var N=Bt(e,o,F);return N.top+=a,N.bottom+=a,Ei(N,r,i,!1)?(N.top<=i&&N.left<=r&&(c=F,d=N),!0):!1},s,l),v,y,w=!1;if(d){var S=r-d.left=O.bottom?1:0}return p=Ae(t.text,p,1),Ci(n,p,y,w,r-v)}function Ks(e,t,n,r,i,o,a){var s=ct(function(f){var c=i[f],d=c.level!=1;return Ei(Rt(e,m(n,d?c.to:c.from,d?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),l=i[s];if(s>0){var u=l.level!=1,h=Rt(e,m(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Ei(h,o,a,!0)&&h.top>a&&(l=i[s-1])}return l}function Gs(e,t,n,r,i,o,a){var s=Uo(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var h=null,f=null,c=0;c=u||d.to<=l)continue;var p=d.level!=1,v=Bt(e,r,p?Math.min(u,d.to)-1:Math.max(l,d.from)).right,y=vy)&&(h=d,f=y)}return h||(h=i[i.length-1]),h.fromu&&(h={from:h.from,to:u,level:h.level}),h}var ur;function Lr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ur==null){ur=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ur.appendChild(document.createTextNode("x")),ur.appendChild(_("br"));ur.appendChild(document.createTextNode("x"))}re(e.measure,ur);var n=ur.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),pe(e.measure),n||1}function Tr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),n=_("pre",[t],"CodeMirror-line-like");re(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Li(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:Ti(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ti(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ho(e){var t=Lr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Tr(e.display)-3);return function(i){if(Qt(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(u=R(e.doc,l.line).text).length==l.ch){var h=M(u,u.length,e.options.tabSize)-u.length;l=m(l.line,Math.max(0,Math.round((o-Mo(e.display).left)/Tr(e.display))-h))}return l}function fr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Kt&&ci(e.doc,t)i.viewFrom?qt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)qt(e);else if(t<=i.viewFrom){var o=Dn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):qt(e)}else if(n>=i.viewTo){var a=Dn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):qt(e)}else{var s=Dn(e,t,t,-1),l=Dn(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(On(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):qt(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)return;var o=r.view[fr(e,t)];if(o.node==null)return;var a=o.changes||(o.changes=[]);X(a,n)==-1&&a.push(n)}function qt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Dn(e,t,n,r){var i=fr(e,t),o,a=e.display.view;if(!Kt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,n+=o}for(;ci(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Xs(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=On(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=On(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,fr(e,n)))),r.viewTo=n}function Bo(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?t.blinker=setInterval(function(){e.hasFocus()||kr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Go(e){e.state.focused||(e.display.input.focus(),Oi(e))}function Xo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,kr(e))},100)}function Oi(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ne(e,"focus",e,t),e.state.focused=!0,Y(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),$&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Mi(e)}function kr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ne(e,"blur",e,t),e.state.focused=!1,ce(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Nn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||h<-.005)&&(Ft(i.line,a),Yo(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var c=Math.ceil(s/Tr(e.display));c>e.display.maxLineLength&&(e.display.maxLineLength=c,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function Yo(e){if(e.widgets)for(var t=0;t=a&&(o=sr(t,Gt(R(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Zs(e,t){if(q(e,"scrollCursorIntoView"))return;var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!de){var o=_("div","\u200B",null,`position: absolute; top: `+(t.top-n.viewOffset-_n(e.display))+`px; height: `+(t.bottom-t.top+Ht(e)+n.barHeight)+`px; left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}function Js(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(t=t.ch?m(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,n=t.sticky=="before"?m(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Rt(e,t),l=!n||n==t?s:Rt(e,n);i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r};var u=_i(e,i),h=e.doc.scrollTop,f=e.doc.scrollLeft;if(u.scrollTop!=null&&(en(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(a=!0)),u.scrollLeft!=null&&(dr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}function Qs(e,t){var n=_i(e,t);n.scrollTop!=null&&en(e,n.scrollTop),n.scrollLeft!=null&&dr(e,n.scrollLeft)}function _i(e,t){var n=e.display,r=Lr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=yi(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+mi(n),l=t.tops-r;if(t.topi+o){var h=Math.min(t.top,(u?s:t.bottom)-o);h!=i&&(a.scrollTop=h)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,c=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-f,d=lr(e)-n.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.leftd+c-3&&(a.scrollLeft=t.right+(p?0:10)-d),a}function Ai(e,t){if(t==null)return;Wn(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Mr(e){Wn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function $r(e,t,n){(t!=null||n!=null)&&Wn(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Vs(e,t){Wn(e),e.curOp.scrollToPos=t}function Wn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Fo(e,t.from),r=Fo(e,t.to);Zo(e,n,r,t.margin)}}function Zo(e,t,n,r){var i=_i(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});$r(e,i.scrollLeft,i.scrollTop)}function en(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;fe||Ri(e,{top:t}),Jo(e,t,!0),fe&&Ri(e),nn(e,100)}function Jo(e,t,n){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!n)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function dr(e,t,n,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)return;e.doc.scrollLeft=t,ea(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function tn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+mi(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?n:0,docHeight:r,scrollHeight:r+Ht(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var cr=function(e,t,n){this.cm=n;var r=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),I(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),I(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,P&&Q<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};cr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},cr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},cr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},cr.prototype.zeroWidthHack=function(){var e=Te&&!ae?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new G,this.disableVert=new G},cr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},cr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var rn=function(){};rn.prototype.update=function(){return{bottom:0,right:0}},rn.prototype.setScrollLeft=function(){},rn.prototype.setScrollTop=function(){},rn.prototype.clear=function(){};function Or(e,t){t||(t=tn(e));var n=e.display.barWidth,r=e.display.barHeight;Qo(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Nn(e),Qo(e,tn(e)),n=e.display.barWidth,r=e.display.barHeight}function Qo(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var Vo={native:cr,null:rn};function qo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ce(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Vo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),I(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?dr(e,t):en(e,t)},e),e.display.scrollbars.addClass&&Y(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},Os(e.curOp)}function vr(e){var t=e.curOp;t&&As(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new In(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Di(e.cm,e.update)}function rl(e){var t=e.cm,n=t.display;e.updatedDisplay&&Nn(t),e.barMeasure=tn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_o(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ht(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-lr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function nl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var n=+new Date+e.options.workTime,r=Xr(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?or(t.mode,r.state):null,l=no(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var u=o.styleClasses,h=l.classes;h?o.styleClasses=h:u&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),c=0;!f&&cn)return nn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&xt(e,function(){for(var o=0;o=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Bo(e)==0)return!1;ta(e)&&(qt(e),t.dims=Li(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Kt&&(o=ci(e.doc,o),a=yo(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Xs(e,o,a),n.viewOffset=Gt(R(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Bo(e);if(!s&&l==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=sl(e);return l>4&&(n.lineDiv.style.display="none"),ul(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ll(u),pe(n.cursorDiv),pe(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,nn(e,400)),n.updateLineNumbers=null,!0}function $o(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==lr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+mi(e.display)-yi(e),n.top)}),t.visible=Pn(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Pn(e.display,e.doc,n));if(!Di(e,t))break;Nn(e);var i=tn(e);qr(e),Or(e,i),Pi(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ri(e,t){var n=new In(e,t);if(Di(e,n)){Nn(e),$o(e,n);var r=tn(e);qr(e),Or(e,r),Pi(e,r),n.finish()}}function ul(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(p){var v=p.nextSibling;return $&&Te&&e.display.currentWheelTarget==p?p.style.display="none":p.parentNode.removeChild(p),v}for(var l=r.view,u=r.viewFrom,h=0;h-1&&(d=!1),So(e,f,u,n)),d&&(pe(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ai(e.options,u)))),a=f.node.nextSibling}u+=f.size}for(;a;)a=s(a)}function Ni(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Pi(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+Ht(e)+"px"}function ea(e){var t=e.display,n=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=Ti(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;aa.clientWidth,l=a.scrollHeight>a.clientHeight;if(!(r&&s||i&&l))return;if(i&&Te&&$){e:for(var u=t.target,h=o.view;u!=a;u=u.parentNode)for(var f=0;f=0&&j(e,r.to())<=0)return n}return-1};var ve=function(e,t){this.anchor=e,this.head=t};ve.prototype.from=function(){return Cn(this.anchor,this.head)},ve.prototype.to=function(){return xn(this.anchor,this.head)},ve.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Nt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(c,d){return j(c.from(),d.from())}),n=X(t,i);for(var o=1;o0:l>=0){var u=Cn(s.from(),a.from()),h=xn(s.to(),a.to()),f=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new ve(f?h:u,f?u:h))}}return new Tt(t,n)}function $t(e,t){return new Tt([new ve(e,t||e)],0)}function er(e){return e.text?m(e.from.line+e.text.length-1,k(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function oa(e,t){if(j(e,t.from)<0)return e;if(j(e,t.to)<=0)return er(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=er(t).ch-t.to.ch),m(n,r)}function Ii(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,w)}nt(e,"change",e,t)}function tr(e,t,n){function r(i,o,a){if(i.linked)for(var s=0;s1&&!e.done[e.done.length-2].ranges)return e.done.pop(),k(e.done)}function fa(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,a,s;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(a=pl(i,i.lastOp==r)))s=k(a.changes),j(t.from,t.to)==0&&j(t.from,s.to)==0?s.to=er(t):a.changes.push(zi(e,t));else{var l=k(i.done);for((!l||!l.ranges)&&zn(e.sel,i.done),a={changes:[zi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Ne(e,"historyAdded")}function vl(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||vl(e,o,k(i.done),t))?i.done[i.done.length-1]=t:zn(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ha(i.undone)}function zn(e,t){var n=k(t);n&&n.ranges&&n.equals(e)||t.push(e)}function da(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function ml(e){if(!e)return null;for(var t,n=0;n-1&&(k(s)[f]=u[f],delete u[f]))}}return r}function Hi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=j(t,i)<0;o!=j(n,i)<0?(i=t,t=n):o!=j(t,n)<0&&(t=n)}return new ve(i,t)}else return new ve(n||t,t)}function Hn(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),st(e,new Tt([Hi(e.sel.primary(),t,n,i)],0),r)}function pa(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(Ne(l,"beforeCursorEnter"),l.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!l.atomic)continue;if(n){var f=l.find(r<0?1:-1),c=void 0;if((r<0?h:u)&&(f=wa(e,f,-r,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(c=j(f,n))&&(r<0?c<0:c>0))return Ar(e,f,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?u:h)&&(d=wa(e,d,r,d.line==t.line?o:null)),d?Ar(e,d,t,r,i):null}}return t}function jn(e,t,n,r,i){var o=r||1,a=Ar(e,t,n,o,i)||!i&&Ar(e,t,n,o,!0)||Ar(e,t,n,-o,i)||!i&&Ar(e,t,n,-o,!0);return a||(e.cantEdit=!0,m(e.first,0))}function wa(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?K(e,m(t.line-1)):null:n>0&&t.ch==(r||R(e,t.line)).text.length?t.line=0;--i)Sa(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Sa(e,t)}function Sa(e,t){if(t.text.length==1&&t.text[0]==""&&j(t.from,t.to)==0)return;var n=Ii(e,t);fa(e,t,n,e.cm?e.cm.curOp.id:NaN),sn(e,t,n,fi(e,t));var r=[];tr(e,function(i,o){!o&&X(r,i.history)==-1&&(ka(i.history,t),r.push(i.history)),sn(i,t,null,fi(i,t))})}function Kn(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!n)return;for(var i=e.history,o,a=e.sel,s=t=="undo"?i.done:i.undone,l=t=="undo"?i.undone:i.done,u=0;u=0;--d){var p=c(d);if(p)return p.v}}function Ea(e,t){if(t==0)return;if(e.first+=t,e.sel=new Tt(H(e.sel.ranges,function(i){return new ve(m(i.anchor.line+t,i.anchor.ch),m(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){vt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())return;if(t.from.lineo&&(t={from:t.from,to:m(o,R(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ar(e,t.from,t.to),n||(n=Ii(e,t)),e.cm?wl(e.cm,t,r):Ui(e,t,r),Bn(e,n,C),e.cantEdit&&jn(e,m(e.firstLine(),0))&&(e.cantEdit=!1)}function wl(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=ge(zt(R(r,o.line))),r.iter(l,a.line+1,function(d){if(d==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&le(e),Ui(r,t,n,Ho(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(d){var p=Mn(d);p>i.maxLineLength&&(i.maxLine=d,i.maxLineLength=p,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),us(r,o.line),nn(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?vt(e):o.line==a.line&&t.text.length==1&&!sa(e.doc,t)?Vt(e,o.line,"text"):vt(e,o.line,a.line+1,u);var h=oe(e,"changes"),f=oe(e,"change");if(f||h){var c={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&nt(e,"change",e,c),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(c)}e.display.selForContextMenu=null}function Rr(e,t,n,r,i){var o;r||(r=n),j(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Dr(e,{from:n,to:r,text:t,origin:i})}function La(e,t,n,r){n1||!(this.children[0]instanceof un))){var s=[];this.collapse(s),this.children=[new un(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&vt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ya(e.doc)),e&&nt(e,"markerCleared",e,this,r,i),t&&vr(e),this.parent&&this.parent.clear()},rr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=se("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(mo(e,t.line,t,n,o)||t.line!=n.line&&mo(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");fs()}o.addToHistory&&fa(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s=t.line,l=e.cm,u;if(e.iter(s,n.line+1,function(f){l&&o.collapsed&&!l.options.lineWrapping&&zt(f)==l.display.maxLine&&(u=!0),o.collapsed&&s!=t.line&&Ft(f,0),cs(f,new En(o,s==t.line?t.ch:null,s==n.line?n.ch:null)),++s}),o.collapsed&&e.iter(t.line,n.line+1,function(f){Qt(e,f)&&Ft(f,0)}),o.clearOnEnter&&I(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(hs(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Oa,o.atomic=!0),l){if(u&&(l.curOp.updateMaxLine=!0),o.collapsed)vt(l,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=n.line;h++)Vt(l,h,"text");o.atomic&&ya(l.doc),nt(l,"markerAdded",l,o)}return o}var dn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;l--)Dr(this,r[l]);s?ga(this,s):this.cm&&Mr(this.cm)}),undo:et(function(){Kn(this,"undo")}),redo:et(function(){Kn(this,"redo")}),undoSelection:et(function(){Kn(this,"undo",!0)}),redoSelection:et(function(){Kn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=K(this,e),t=K(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||l.from==null&&i!=e.line||l.from!=null&&i==t.line&&l.from>=t.ch)&&(!n||n(l.marker))&&r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),K(this,m(n,t))},indexFromPos:function(e){e=K(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Bn(t.doc,$t(n,n)),f)for(var c=0;c=0;s--)Rr(e.doc,"",r[s].from,r[s].to,"+delete");Mr(e)})}function ji(e,t,n){var r=Ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ki(e,t,n){var r=ji(e,t.ch,n);return r==null?null:new m(t.line,r,n<0?"after":"before")}function Gi(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=pt(n,t.doc.direction);if(o){var a=i<0?k(o):o[0],s=i<0==(a.level==1),l=s?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var h=Er(t,n);u=i<0?n.text.length-1:0;var f=Bt(t,h,u).top;u=ct(function(c){return Bt(t,h,c).top==f},i<0==(a.level==1)?a.from:a.to-1,u),l=="before"&&(u=ji(n,u,1))}else u=i<0?a.to:a.from;return new m(r,u,l)}}return new m(r,i<0?n.text.length:0,i<0?"before":"after")}function Nl(e,t,n,r){var i=pt(t,e.doc.direction);if(!i)return Ki(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=kt(i,n.ch,n.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&c>=h.begin)){var d=f?"before":"after";return new m(n.line,c,d)}}var p=function(w,S,x){for(var O=function(Se,tt){return tt?new m(n.line,s(Se,1),"before"):new m(n.line,Se,"after")};w>=0&&w0==(F.level!=1),Z=N?x.begin:s(x.end,-1);if(F.from<=Z&&Z0?h.end:s(h.begin,-1);return y!=null&&!(r>0&&y==t.text.length)&&(v=p(r>0?0:i.length-1,r,u(y)),v)?v:null}var vn={selectAll:xa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),C)},killLine:function(e){return Wr(e,function(t){if(t.empty()){var n=R(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new m(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),m(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=R(e.doc,i.line-1).text;a&&(i=new m(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),m(i.line-1,a.length-1),i,"+transpose"))}}n.push(new ve(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return xt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&j(t,this.pos)==0&&n==this.button};var mn,yn;function Hl(e,t){var n=+new Date;return yn&&yn.compare(n,e,t)?(mn=yn=null,"triple"):mn&&mn.compare(n,e,t)?(yn=new Yi(n,e,t),mn=null,"double"):(mn=new Yi(n,e,t),yn=null,"single")}function Ga(e){var t=this,n=t.display;if(q(t,e)||n.activeTouch&&n.input.supportsTouch())return;if(n.input.ensurePolled(),n.shift=e.shiftKey,Xt(n,e)){$||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(Zi(t,e))return;var r=hr(t,e),i=br(e),o=r?Hl(r,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),r&&Bl(t,i,r,o,e))return;i==1?r?Kl(t,r,o,e):Wt(e)==n.scroller&&Ce(e):i==2?(r&&Hn(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(Me?t.display.input.onContextMenu(e):Xo(t))}function Bl(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,gn(e,Wa(o,i),i,function(a){if(typeof a=="string"&&(a=vn[a]),!a)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=a(e,n)!=Be}finally{e.state.suppressEdits=!1}return s})}function jl(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ge?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=Te?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(Te?n.altKey:n.ctrlKey)),i}function Kl(e,t,n,r){P?setTimeout(St(Go,e),0):e.curOp.focus=be();var i=jl(e,n,r),o=e.doc.sel,a;e.options.dragDrop&&qn&&!e.isReadOnly()&&n=="single"&&(a=o.contains(t))>-1&&(j((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(j(a.to(),t)>0||t.xRel<0)?Gl(e,r,t,i):Xl(e,r,t,i)}function Gl(e,t,n,r){var i=e.display,o=!1,a=$e(e,function(u){$&&(i.scroller.draggable=!1),e.state.draggingText=!1,at(i.wrapper.ownerDocument,"mouseup",a),at(i.wrapper.ownerDocument,"mousemove",s),at(i.scroller,"dragstart",l),at(i.scroller,"drop",a),o||(Ce(u),r.addNew||Hn(e.doc,n,null,null,r.extend),$&&!ue||P&&Q==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},l=function(){return o=!0};$&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),I(i.wrapper.ownerDocument,"mouseup",a),I(i.wrapper.ownerDocument,"mousemove",s),I(i.scroller,"dragstart",l),I(i.scroller,"drop",a),Xo(e),setTimeout(function(){return i.input.focus()},20)}function Xa(e,t,n){if(n=="char")return new ve(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new ve(m(t.line,0),K(e.doc,m(t.line+1,0)));var r=n(e,t);return new ve(r.from,r.to)}function Xl(e,t,n,r){var i=e.display,o=e.doc;Ce(t);var a,s,l=o.sel,u=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),s>-1?a=u[s]:a=new ve(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),r.unit=="rectangle")r.addNew||(a=new ve(n,n)),n=hr(e,t,!0,!0),s=-1;else{var h=Xa(e,n,r.unit);r.extend?a=Hi(a,h.anchor,h.head,r.extend):a=h}r.addNew?s==-1?(s=u.length,st(o,Nt(e,u.concat([a]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&r.unit=="char"&&!r.extend?(st(o,Nt(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Bi(o,s,a,D):(s=0,st(o,new Tt([a],0),D),l=o.sel);var f=n;function c(x){if(j(f,x)==0)return;if(f=x,r.unit=="rectangle"){for(var O=[],F=e.options.tabSize,N=M(R(o,n.line).text,n.ch,F),Z=M(R(o,x.line).text,x.ch,F),Se=Math.min(N,Z),tt=Math.max(N,Z),Fe=Math.min(n.line,x.line),Ct=Math.min(e.lastLine(),Math.max(n.line,x.line));Fe<=Ct;Fe++){var mt=R(o,Fe).text,Ze=A(mt,Se,F);Se==tt?O.push(new ve(m(Fe,Ze),m(Fe,Ze))):mt.length>Ze&&O.push(new ve(m(Fe,Ze),m(Fe,A(mt,tt,F))))}O.length||O.push(new ve(n,n)),st(o,Nt(e,l.ranges.slice(0,s).concat(O),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(x)}else{var yt=a,it=Xa(e,x,r.unit),Ve=yt.anchor,Je;j(it.anchor,Ve)>0?(Je=it.head,Ve=Cn(yt.from(),it.anchor)):(Je=it.anchor,Ve=xn(yt.to(),it.head));var ze=l.ranges.slice(0);ze[s]=Yl(e,new ve(K(o,Ve),Je)),st(o,Nt(e,ze,s),D)}}var d=i.wrapper.getBoundingClientRect(),p=0;function v(x){var O=++p,F=hr(e,x,!0,r.unit=="rectangle");if(!F)return;if(j(F,f)!=0){e.curOp.focus=be(),c(F);var N=Pn(i,o);(F.line>=N.to||F.lined.bottom?20:0;Z&&setTimeout($e(e,function(){if(p!=O)return;i.scroller.scrollTop+=Z,v(x)}),50)}}function y(x){e.state.selectingText=!1,p=Infinity,x&&(Ce(x),i.input.focus()),at(i.wrapper.ownerDocument,"mousemove",w),at(i.wrapper.ownerDocument,"mouseup",S),o.history.lastSelOrigin=null}var w=$e(e,function(x){x.buttons===0||!br(x)?y(x):v(x)}),S=$e(e,y);e.state.selectingText=S,I(i.wrapper.ownerDocument,"mousemove",w),I(i.wrapper.ownerDocument,"mouseup",S)}function Yl(e,t){var n=t.anchor,r=t.head,i=R(e.doc,n.line);if(j(n,r)==0&&n.sticky==r.sticky)return t;var o=pt(i);if(!o)return t;var a=kt(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l=a+(s.from==n.ch==(s.level!=1)?0:1);if(l==0||l==o.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=kt(o,r.ch,r.sticky),f=h-a||(r.ch-n.ch)*(s.level==1?-1:1);h==l-1||h==l?u=f<0:u=f>0}var c=o[l+(u?-1:0)],d=u==(c.level==1),p=d?c.from:c.to,v=d?"after":"before";return n.ch==p&&n.sticky==v?t:new ve(new m(n.line,p,v),r)}function Ya(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(c){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ce(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!oe(e,n))return Ot(t);o-=s.top-a.viewOffset;for(var l=0;l=i){var h=sr(e.doc,o),f=e.display.gutterSpecs[l];return Ne(e,n,e,h,f.className,t),Ot(t)}}}function Zi(e,t){return Ya(e,t,"gutterClick",!0)}function Za(e,t){if(Xt(e.display,t)||Zl(e,t))return;if(q(e,t,"contextmenu"))return;Me||e.display.input.onContextMenu(t)}function Zl(e,t){return oe(e,"gutterContextMenu")?Ya(e,t,"gutterContextMenu",!1):!1}function Ja(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vr(e)}var Ir={toString:function(){return"CodeMirror.Init"}},Qa={},Zn={};function Jl(e){var t=e.optionHandlers;function n(r,i,o,a){e.defaults[r]=i,o&&(t[r]=a?function(s,l,u){u!=Ir&&o(s,l,u)}:o)}e.defineOption=n,e.Init=Ir,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Fi(r)},!0),n("indentUnit",2,Fi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){an(r),Vr(r),vt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!i)return;var o=[],a=r.doc.first;r.doc.iter(function(l){for(var u=0;;){var h=l.text.indexOf(i,u);if(h==-1)break;u=h+i.length,o.push(m(a,h))}a++});for(var s=o.length-1;s>=0;s--)Rr(r.doc,i,o[s],m(o[s].line,o[s].ch+i.length))}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=Ir&&r.refresh()}),n("specialCharPlaceholder",Es,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",Ie?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!ke),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){Ja(r),on(r)},!0),n("keyMap","default",function(r,i,o){var a=Xn(i),s=o!=Ir&&Xn(o);s&&s.detach&&s.detach(r,a),a.attach&&a.attach(r,s||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Vl,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Wi(i,r.options.lineNumbers),on(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Ti(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Or(r)},!0),n("scrollbarStyle","native",function(r){qo(r),Or(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Wi(r.options.gutters,i),on(r)},!0),n("firstLineNumber",1,on,!0),n("lineNumberFormatter",function(r){return r},on,!0),n("showCursorWhenSelecting",!1,qr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(kr(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Ql),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,qr,!0),n("singleCursorHeightPerLine",!0,qr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,an,!0),n("addModeClass",!1,an,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,an,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Ql(e,t,n){var r=n&&n!=Ir;if(!t!=!r){var i=e.display.dragFunctions,o=t?I:at;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Vl(e){e.options.lineWrapping?(Y(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ce(e.display.wrapper,"CodeMirror-wrap"),vi(e)),ki(e),vt(e),Vr(e),setTimeout(function(){return Or(e)},100)}function Pe(e,t){var n=this;if(!(this instanceof Pe))return new Pe(e,t);this.options=t=t?z(t):{},z(Qa,t,!1);var r=t.value;typeof r=="string"?r=new gt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Pe.inputStyles[t.inputStyle](this),o=this.display=new hl(e,r,i,t);o.wrapper.CodeMirror=this,Ja(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),qo(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 G,keySeq:null,specialChars:null},t.autofocus&&!Ie&&o.input.focus(),P&&Q<11&&setTimeout(function(){return n.display.input.reset(!0)},20),ql(this),Ol(),pr(this),this.curOp.forceUpdate=!0,la(this,r),t.autofocus&&!Ie||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Oi(n)},20):kr(this);for(var a in Zn)Zn.hasOwnProperty(a)&&Zn[a](this,t[a],Ir);ta(this),t.finishInit&&t.finishInit(this);for(var s=0;s20*20}I(t.scroller,"touchstart",function(l){if(!q(e,l)&&!o(l)&&!Zi(e,l)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},l.touches.length==1&&(t.activeTouch.left=l.touches[0].pageX,t.activeTouch.top=l.touches[0].pageY)}}),I(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),I(t.scroller,"touchend",function(l){var u=t.activeTouch;if(u&&!Xt(t,l)&&u.left!=null&&!u.moved&&new Date-u.start<300){var h=e.coordsChar(t.activeTouch,"page"),f;!u.prev||a(u,u.prev)?f=new ve(h,h):!u.prev.prev||a(u,u.prev.prev)?f=e.findWordAt(h):f=new ve(m(h.line,0),K(e.doc,m(h.line+1,0))),e.setSelection(f.anchor,f.head),e.focus(),Ce(l)}i()}),I(t.scroller,"touchcancel",i),I(t.scroller,"scroll",function(){t.scroller.clientHeight&&(en(e,t.scroller.scrollTop),dr(e,t.scroller.scrollLeft,!0),Ne(e,"scroll",e))}),I(t.scroller,"mousewheel",function(l){return ia(e,l)}),I(t.scroller,"DOMMouseScroll",function(l){return ia(e,l)}),I(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(l){q(e,l)||_t(l)},over:function(l){q(e,l)||(Ml(e,l),_t(l))},start:function(l){return kl(e,l)},drop:$e(e,Tl),leave:function(l){q(e,l)||Da(e)}};var s=t.input.getField();I(s,"keyup",function(l){return ja.call(e,l)}),I(s,"keydown",$e(e,Ba)),I(s,"keypress",$e(e,Ka)),I(s,"focus",function(l){return Oi(e,l)}),I(s,"blur",function(l){return kr(e,l)})}var Ji=[];Pe.defineInitHook=function(e){return Ji.push(e)};function bn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=Xr(e,t).state:n="prev");var a=e.options.tabSize,s=R(i,t),l=M(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u=s.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(s.text))h=0,n="not";else if(n=="smart"&&(h=i.mode.indent(o,s.text.slice(u.length),s.text),h==Be||h>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?h=M(R(i,t-1).text,null,a):h=0:n=="add"?h=l+e.options.indentUnit:n=="subtract"?h=l-e.options.indentUnit:typeof n=="number"&&(h=l+n),h=Math.max(0,h);var f="",c=0;if(e.options.indentWithTabs)for(var d=Math.floor(h/a);d;--d)c+=a,f+=" ";if(ca,l=It(t),u=null;if(s&&r.ranges.length>1)if(Pt&&Pt.text.join(` `)==t){if(r.ranges.length%Pt.text.length==0){u=[];for(var h=0;h=0;c--){var d=r.ranges[c],p=d.from(),v=d.to();d.empty()&&(n&&n>0?p=m(p.line,p.ch-n):e.state.overwrite&&!s?v=m(v.line,Math.min(R(o,v.line).text.length,v.ch+k(l).length)):s&&Pt&&Pt.lineWise&&Pt.text.join(` `)==l.join(` `)&&(p=v=m(p.line,0)));var y={from:p,to:v,text:u?u[c%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Dr(e.doc,y),nt(e,"inputRead",e,y)}t&&!s&&qa(e,t),Mr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Va(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&xt(t,function(){return Qi(t,n,0,null,"paste")}),!0}function qa(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)continue;var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=bn(e,i.head.line,"smart");break}}else o.electricInput&&(o.electricInput.test(R(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=bn(e,i.head.line,"smart")));a&&nt(e,"electricInput",e,i.head.line)}}function $a(e){for(var t=[],n=[],r=0;ro&&(bn(this,s.head.line,r,!0),o=s.head.line,a==this.doc.sel.primIndex&&Mr(this));else{var l=s.from(),u=s.to(),h=Math.max(o,l.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var f=h;f0&&Bi(this.doc,a,new ve(l,c[a].to()),C)}}}),getTokenAt:function(r,i){return so(this,r,i)},getLineTokens:function(r,i){return so(this,m(r),i,!0)},getTokenTypeAt:function(r){r=K(this.doc,r);var i=io(this,R(this.doc,r.line)),o=0,a=(i.length-1)/2,s=r.ch,l;if(s==0)l=i[2];else for(;;){var u=o+a>>1;if((u?i[u*2-1]:0)>=s)a=u;else if(i[u*2+1]l&&(r=l,a=!0),s=R(this.doc,r)}else s=r;return An(this,s,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Gt(s):0)},defaultTextHeight:function(){return Lr(this.display)},defaultCharWidth:function(){return Tr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,a,s){var l=this.display;r=Rt(this,K(this.doc,r));var u=r.bottom,h=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),l.sizer.appendChild(i),a=="over")u=r.top;else if(a=="above"||a=="near"){var f=Math.max(l.wrapper.clientHeight,this.doc.height),c=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);(a=="above"||r.bottom+i.offsetHeight>f)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=f&&(u=r.bottom),h+i.offsetWidth>c&&(h=c-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",s=="right"?(h=l.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?h=0:s=="middle"&&(h=(l.sizer.clientWidth-i.offsetWidth)/2),i.style.left=h+"px"),o&&Qs(this,{left:h,top:u,right:h+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:ht(Ba),triggerOnKeyPress:ht(Ka),triggerOnKeyUp:ja,triggerOnMouseDown:ht(Ga),execCommand:function(r){if(vn.hasOwnProperty(r))return vn[r].call(null,this)},triggerElectric:ht(function(r){qa(this,r)}),findPosH:function(r,i,o,a){var s=1;i<0&&(s=-1,i=-i);for(var l=K(this.doc,r),u=0;u0&&h(o.charAt(a-1));)--a;for(;s.5||this.options.lineWrapping)&&ki(this),Ne(this,"refresh",this)}),swapDoc:ht(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),la(this,r),Vr(this),this.display.input.reset(),$r(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,nt(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},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}},Ue(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,a){e.registerHelper(r,i,a),n[r]._global.push({pred:o,val:a})}}function Vi(e,t,n,r,i){var o=t,a=n,s=R(e,t.line),l=i&&e.direction=="rtl"?-n:n;function u(){var S=t.line+l;return S=e.first+e.size?!1:(t=new m(S,t.ch,t.sticky),s=R(e,S))}function h(S){var x;if(r=="codepoint"){var O=s.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(O)?x=null:x=new m(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(O>=55296&&O<56320?2:1))),-n)}else i?x=Nl(e.cm,s,t,n):x=Ki(s,t,n);if(x==null)if(!S&&u())t=Gi(i,e.cm,s,t.line,l);else return!1;else t=x;return!0}if(r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var f=null,c=r=="group",d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0&&!h(!p));p=!1){var v=s.text.charAt(t.ch)||` `,y=qe(v,d)?"w":c&&v==` `?"n":!c||/\s/.test(v)?null:"p";if(c&&!p&&!y&&(y="s"),f&&f!=y){n<0&&(n=1,h(),t.sticky="after");break}if(y&&(f=y),n>0&&!h(!p))break}var w=jn(e,t,o,a,!0);return si(o,w)&&(w.hitSide=!0),w}function rs(e,t,n,r){var i=e.doc,o=t.left,a;if(r=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*Lr(e.display),3);a=(n>0?t.bottom:t.top)+n*l}else r=="line"&&(a=n>0?t.bottom+3:t.top-3);for(var u;!(u=Si(e,o,a),!u.outside);){if(n<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=n*5}return u}var me=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new G,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};me.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;es(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(s){for(var l=s.target;l;l=l.parentNode){if(l==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(l.className))break}return!1}I(i,"paste",function(s){if(!o(s)||q(r,s)||Va(s,r))return;Q<=11&&setTimeout($e(r,function(){return t.updateFromDOM()}),20)}),I(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),I(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),I(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),I(i,"touchstart",function(){return n.forceCompositionEnd()}),I(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(s){if(!o(s)||q(r,s))return;if(r.somethingSelected())Jn({lineWise:!1,text:r.getSelections()}),s.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var l=$a(r);Jn({lineWise:!0,text:l.text}),s.type=="cut"&&r.operation(function(){r.setSelections(l.ranges,0,C),r.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var u=Pt.text.join(` `);if(s.clipboardData.setData("Text",u),s.clipboardData.getData("Text")==u){s.preventDefault();return}}var h=ts(),f=h.firstChild;r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),f.value=Pt.text.join(` `);var c=document.activeElement;dt(f),setTimeout(function(){r.display.lineSpace.removeChild(h),c.focus(),c==i&&n.showPrimarySelection()},50)}I(i,"copy",a),I(i,"cut",a)},me.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},me.prototype.prepareSelection=function(){var e=jo(this.cm,!1);return e.focus=document.activeElement==this.div,e},me.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},me.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},me.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ns(t,r)||{node:s[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(r=m(r.line-1,R(e.doc,r.line-1).length)),i.ch==R(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,a,s;r.line==t.viewFrom||(o=fr(e,r.line))==0?(a=ge(t.view[0].line),s=t.view[0].node):(a=ge(t.view[o].line),s=t.view[o-1].node.nextSibling);var l=fr(e,i.line),u,h;if(l==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=ge(t.view[l+1].line)-1,h=t.view[l+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(tu(e,s,h,a,u)),c=ar(e.doc,m(a,0),m(u,R(e.doc,u).text.length));f.length>1&&c.length>1;)if(k(f)==k(c))f.pop(),c.pop(),u--;else if(f[0]==c[0])f.shift(),c.shift(),a++;else break;for(var d=0,p=0,v=f[0],y=c[0],w=Math.min(v.length,y.length);dr.ch&&S.charCodeAt(S.length-p-1)==x.charCodeAt(x.length-p-1);)d--,p++;f[f.length-1]=S.slice(0,S.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var F=m(a,d),N=m(u,c.length?k(c).length-p:0);if(f.length>1||f[0]||j(F,N))return Rr(e.doc,f,F,N,"+input"),!0},me.prototype.ensurePolled=function(){this.forceCompositionEnd()},me.prototype.reset=function(){this.forceCompositionEnd()},me.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},me.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)},me.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&xt(this.cm,function(){return vt(e.cm)})},me.prototype.setUneditable=function(e){e.contentEditable="false"},me.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||$e(this.cm,Qi)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},me.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},me.prototype.onContextMenu=function(){},me.prototype.resetPosition=function(){},me.prototype.needsContentAttribute=!0;function ns(e,t){var n=bi(e,t.line);if(!n||n.hidden)return null;var r=R(e.doc,t.line),i=Oo(n,r,t.line),o=pt(r,e.doc.direction),a="left";if(o){var s=kt(o,t.ch);a=s%2?"right":"left"}var l=Do(i.map,t.ch,a);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 Fr(e,t){return t&&(e.bad=!0),e}function tu(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function u(d){return function(p){return p.id==d}}function h(){a&&(o+=s,l&&(o+=s),a=l=!1)}function f(d){d&&(h(),o+=d)}function c(d){if(d.nodeType==1){var p=d.getAttribute("cm-text");if(p){f(p);return}var v=d.getAttribute("cm-marker"),y;if(v){var w=e.findMarks(m(r,0),m(i+1,0),u(+v));w.length&&(y=w[0].find(0))&&f(ar(e.doc,y.from,y.to).join(s));return}if(d.getAttribute("contenteditable")=="false")return;var S=/^(pre|div|p|li|table|br)$/i.test(d.nodeName);if(!/^br$/i.test(d.nodeName)&&d.textContent.length==0)return;S&&h();for(var x=0;x=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),I(i,"paste",function(a){if(q(r,a)||Va(a,r))return;r.state.pasteIncoming=+new Date,n.fastPoll()});function o(a){if(q(r,a))return;if(r.somethingSelected())Jn({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var s=$a(r);Jn({lineWise:!0,text:s.text}),a.type=="cut"?r.setSelections(s.ranges,null,C):(n.prevInput="",i.value=s.text.join(` `),dt(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}I(i,"cut",o),I(i,"copy",o),I(e.scroller,"paste",function(a){if(Xt(e,a)||q(r,a))return;if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var s=new Event("paste");s.clipboardData=a.clipboardData,i.dispatchEvent(s)}),I(e.lineSpace,"selectstart",function(a){Xt(e,a)||Ce(a)}),I(i,"compositionstart",function(){var a=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:a,range:r.markText(a,r.getCursor("to"),{className:"CodeMirror-composing"})}}),I(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ke.prototype.createField=function(e){this.wrapper=ts(),this.textarea=this.wrapper.firstChild},Ke.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ke.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=jo(e);if(e.options.moveInputWithCursor){var i=Rt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ke.prototype.showSelection=function(e){var t=this.cm,n=t.display;re(n.cursorDiv,e.cursors),re(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ke.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&dt(this.textarea),P&&Q>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",P&&Q>=9&&(this.hasSelection=null))},Ke.prototype.getField=function(){return this.textarea},Ke.prototype.supportsTouch=function(){return!1},Ke.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ie||be()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ke.prototype.blur=function(){this.textarea.blur()},Ke.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ke.prototype.receivedFocus=function(){this.slowPoll()},Ke.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()})},Ke.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},Ke.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Jt(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(P&&Q>=9&&this.hasSelection===i||Te&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,i.length);a1e3||i.indexOf(` `)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ke.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ke.prototype.onKeyPress=function(){P&&Q>=9&&(this.hasSelection=null),this.fastPoll()},Ke.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=hr(n,e),a=r.scroller.scrollTop;if(!o||E)return;var s=n.options.resetSelectionOnContextMenu;s&&n.doc.sel.contains(o)==-1&&$e(n,st)(n.doc,$t(o),C);var l=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px; z-index: 1000; background: `+(P?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var f;$&&(f=window.scrollY),r.input.focus(),$&&window.scrollTo(null,f),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=d,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function c(){if(i.selectionStart!=null){var v=n.somethingSelected(),y="\u200B"+(v?i.value:"");i.value="\u21DA",i.value=y,t.prevInput=v?"":"\u200B",i.selectionStart=1,i.selectionEnd=y.length,r.selForContextMenu=n.doc.sel}}function d(){if(t.contextMenuPending!=d)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=l,P&&Q<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null){(!P||P&&Q<9)&&c();var v=0,y=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?$e(n,xa)(n):v++<10?r.detectingSelectAll=setTimeout(y,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(y,200)}}if(P&&Q>=9&&c(),Me){_t(e);var p=function(){at(window,"mouseup",p),setTimeout(d,20)};I(window,"mouseup",p)}else setTimeout(d,50)},Ke.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ke.prototype.setUneditable=function(){},Ke.prototype.needsContentAttribute=!1;function nu(e,t){if(t=t?z(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 n=be();t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(I(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(l){}}t.finishInit=function(l){l.save=r,l.getTextArea=function(){return e},l.toTextArea=function(){l.toTextArea=isNaN,r(),e.parentNode.removeChild(l.getWrapperElement()),e.style.display="",e.form&&(at(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=Pe(function(l){return e.parentNode.insertBefore(l,e.nextSibling)},t);return s}function iu(e){e.off=at,e.on=I,e.wheelEventPixels=fl,e.Doc=gt,e.splitLines=It,e.countColumn=M,e.findColumn=A,e.isWordChar=xe,e.Pass=Be,e.signal=Ne,e.Line=Cr,e.changeEnd=er,e.scrollbarModel=Vo,e.Pos=m,e.cmpPos=j,e.modes=Kr,e.mimeModes=wr,e.resolveMode=wn,e.getMode=ni,e.modeExtensions=xr,e.extendMode=as,e.copyState=or,e.startState=eo,e.innerMode=ii,e.commands=vn,e.keyMap=Yt,e.keyName=Ia,e.isModifierKey=Pa,e.lookupKey=Pr,e.normalizeKeyMap=Rl,e.StringStream=Ye,e.SharedTextMarker=dn,e.TextMarker=rr,e.LineWidget=fn,e.e_preventDefault=Ce,e.e_stopPropagation=Xe,e.e_stop=_t,e.addClass=Y,e.contains=Qe,e.rmClass=ce,e.keyNames=nr}Jl(Pe),$l(Pe);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Vn in gt.prototype)gt.prototype.hasOwnProperty(Vn)&&X(ou,Vn)<0&&(Pe.prototype[Vn]=function(e){return function(){return e.apply(this.doc,arguments)}}(gt.prototype[Vn]));return Ue(gt),Pe.inputStyles={textarea:Ke,contenteditable:me},Pe.defineMode=function(e){!Pe.defaults.mode&&e!="null"&&(Pe.defaults.mode=e),is.apply(this,arguments)},Pe.defineMIME=os,Pe.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Pe.defineMIME("text/plain","null"),Pe.defineExtension=function(e,t){Pe.prototype[e]=t},Pe.defineDocExtension=function(e,t){gt.prototype[e]=t},Pe.fromTextArea=nu,iu(Pe),Pe.version="5.58.2",Pe})},Y1PL:function(ut,De,g){"use strict";g.r(De),g.d(De,"ResizableTextArea",function(){return X});var J=g("wx14"),ye=g("1OyB"),fe=g("vuIU"),Le=g("Ji7U"),B=g("LK+K"),W=g("q1tI"),P=g("VTBJ"),Q=g("rePB"),$=g("Zm9Q"),We=g("Kwbf"),L=g("c+Xe"),E=g("m+aA"),ue=g("bdgK"),ae=new Map;function de(C){C.forEach(function(D){var T,A=D.target;(T=ae.get(A))===null||T===void 0||T.forEach(function(b){return b(A)})})}var ee=new ue.default(de),we=null,Ie=null;function Te(C,D){ae.has(C)||(ae.set(C,new Set),ee.observe(C)),ae.get(C).add(D)}function Ge(C,D){ae.has(C)&&(ae.get(C).delete(D),ae.get(C).size||(ee.unobserve(C),ae.delete(C)))}var ke=function(C){Object(Le.a)(T,C);var D=Object(B.a)(T);function T(){return Object(ye.a)(this,T),D.apply(this,arguments)}return Object(fe.a)(T,[{key:"render",value:function(){return this.props.children}}]),T}(W.Component),V=W.createContext(null);function Ee(C){var D=C.children,T=C.onBatchResize,A=W.useRef(0),b=W.useRef([]),U=W.useContext(V),k=W.useCallback(function(H,ne,ie){A.current+=1;var _e=A.current;b.current.push({size:H,element:ne,data:ie}),Promise.resolve().then(function(){_e===A.current&&(T==null||T(b.current),b.current=[])}),U==null||U(H,ne,ie)},[T,U]);return W.createElement(V.Provider,{value:k},D)}function Me(C){var D=C.children,T=C.disabled,A=W.useRef(null),b=W.useRef(null),U=W.useContext(V),k=W.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),H=W.isValidElement(D)&&Object(L.c)(D),ne=H?D.ref:null,ie=W.useMemo(function(){return Object(L.a)(ne,A)},[ne,A]),_e=W.useRef(C);_e.current=C;var je=W.useCallback(function(xe){var qe=_e.current,At=qe.onResize,ot=qe.data,he=xe.getBoundingClientRect(),Ae=he.width,ct=he.height,Et=xe.offsetWidth,wt=xe.offsetHeight,kt=Math.floor(Ae),yr=Math.floor(ct);if(k.current.width!==kt||k.current.height!==yr||k.current.offsetWidth!==Et||k.current.offsetHeight!==wt){var pt={width:kt,height:yr,offsetWidth:Et,offsetHeight:wt};k.current=pt;var Mt=Et===Math.round(Ae)?Ae:Et,I=wt===Math.round(ct)?ct:wt,Dt=Object(P.a)(Object(P.a)({},pt),{},{offsetWidth:Mt,offsetHeight:I});U==null||U(Dt,xe,ot),At&&Promise.resolve().then(function(){At(Dt,xe)})}},[]);return W.useEffect(function(){var xe=Object(E.a)(A.current)||Object(E.a)(b.current);return xe&&!T&&Te(xe,je),function(){return Ge(xe,je)}},[A.current,T]),W.createElement(ke,{ref:b},H?W.cloneElement(D,{ref:ie}):D)}var Oe="rc-observer-key";function ce(C){var D=C.children,T=Object($.a)(D);return T.map(function(A,b){var U=(A==null?void 0:A.key)||"".concat(Oe,"-").concat(b);return W.createElement(Me,Object(J.a)({},C,{key:U}),A)})}ce.Collection=Ee;var pe=ce,re=g("bT9E"),_=g("TSYQ"),se=g.n(_),te=` 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 `,Qe=["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"],be={},Y;function Re(C){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=C.getAttribute("id")||C.getAttribute("data-reactid")||C.getAttribute("name");if(D&&be[T])return be[T];var A=window.getComputedStyle(C),b=A.getPropertyValue("box-sizing")||A.getPropertyValue("-moz-box-sizing")||A.getPropertyValue("-webkit-box-sizing"),U=parseFloat(A.getPropertyValue("padding-bottom"))+parseFloat(A.getPropertyValue("padding-top")),k=parseFloat(A.getPropertyValue("border-bottom-width"))+parseFloat(A.getPropertyValue("border-top-width")),H=Qe.map(function(ie){return"".concat(ie,":").concat(A.getPropertyValue(ie))}).join(";"),ne={sizingStyle:H,paddingSize:U,borderSize:k,boxSizing:b};return D&&T&&(be[T]=ne),ne}function dt(C){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Y||(Y=document.createElement("textarea"),Y.setAttribute("tab-index","-1"),Y.setAttribute("aria-hidden","true"),document.body.appendChild(Y)),C.getAttribute("wrap")?Y.setAttribute("wrap",C.getAttribute("wrap")):Y.removeAttribute("wrap");var b=Re(C,D),U=b.paddingSize,k=b.borderSize,H=b.boxSizing,ne=b.sizingStyle;Y.setAttribute("style","".concat(ne,";").concat(te)),Y.value=C.value||C.placeholder||"";var ie=Number.MIN_SAFE_INTEGER,_e=Number.MAX_SAFE_INTEGER,je=Y.scrollHeight,xe;if(H==="border-box"?je+=k:H==="content-box"&&(je-=U),T!==null||A!==null){Y.value=" ";var qe=Y.scrollHeight-U;T!==null&&(ie=qe*T,H==="border-box"&&(ie=ie+U+k),je=Math.max(ie,je)),A!==null&&(_e=qe*A,H==="border-box"&&(_e=_e+U+k),xe=je>_e?"":"hidden",je=Math.min(_e,je))}return{height:je,minHeight:ie,maxHeight:_e,overflowY:xe,resize:"none"}}var St=g("Gytx"),z=g.n(St),M;(function(C){C[C.NONE=0]="NONE",C[C.RESIZING=1]="RESIZING",C[C.RESIZED=2]="RESIZED"})(M||(M={}));var G=function(C){Object(Le.a)(T,C);var D=Object(B.a)(T);function T(A){var b;return Object(ye.a)(this,T),b=D.call(this,A),b.nextFrameActionId=void 0,b.resizeFrameId=void 0,b.textArea=void 0,b.saveTextArea=function(U){b.textArea=U},b.handleResize=function(U){var k=b.state.resizeStatus,H=b.props,ne=H.autoSize,ie=H.onResize;if(k!==M.NONE)return;typeof ie=="function"&&ie(U),ne&&b.resizeOnNextFrame()},b.resizeOnNextFrame=function(){cancelAnimationFrame(b.nextFrameActionId),b.nextFrameActionId=requestAnimationFrame(b.resizeTextarea)},b.resizeTextarea=function(){var U=b.props.autoSize;if(!U||!b.textArea)return;var k=U.minRows,H=U.maxRows,ne=dt(b.textArea,!1,k,H);b.setState({textareaStyles:ne,resizeStatus:M.RESIZING},function(){cancelAnimationFrame(b.resizeFrameId),b.resizeFrameId=requestAnimationFrame(function(){b.setState({resizeStatus:M.RESIZED},function(){b.resizeFrameId=requestAnimationFrame(function(){b.setState({resizeStatus:M.NONE}),b.fixFirefoxAutoScroll()})})})})},b.renderTextArea=function(){var U=b.props,k=U.prefixCls,H=k===void 0?"rc-textarea":k,ne=U.autoSize,ie=U.onResize,_e=U.className,je=U.disabled,xe=b.state,qe=xe.textareaStyles,At=xe.resizeStatus,ot=Object(re.a)(b.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),he=se()(H,_e,Object(Q.a)({},"".concat(H,"-disabled"),je));"value"in ot&&(ot.value=ot.value||"");var Ae=Object(P.a)(Object(P.a)(Object(P.a)({},b.props.style),qe),At===M.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return W.createElement(pe,{onResize:b.handleResize,disabled:!(ne||ie)},W.createElement("textarea",Object(J.a)({},ot,{className:he,style:Ae,ref:b.saveTextArea})))},b.state={textareaStyles:{},resizeStatus:M.NONE},b}return Object(fe.a)(T,[{key:"componentDidUpdate",value:function(b){(b.value!==this.props.value||!z()(b.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 b=this.textArea.selectionStart,U=this.textArea.selectionEnd;this.textArea.setSelectionRange(b,U)}}catch(k){}}},{key:"render",value:function(){return this.renderTextArea()}}]),T}(W.Component),X=G,He=function(C){Object(Le.a)(T,C);var D=Object(B.a)(T);function T(A){var b;Object(ye.a)(this,T),b=D.call(this,A),b.resizableTextArea=void 0,b.focus=function(){b.resizableTextArea.textArea.focus()},b.saveTextArea=function(k){b.resizableTextArea=k},b.handleChange=function(k){var H=b.props.onChange;b.setValue(k.target.value,function(){b.resizableTextArea.resizeTextarea()}),H&&H(k)},b.handleKeyDown=function(k){var H=b.props,ne=H.onPressEnter,ie=H.onKeyDown;k.keyCode===13&&ne&&ne(k),ie&&ie(k)};var U=typeof A.value=="undefined"||A.value===null?A.defaultValue:A.value;return b.state={value:U},b}return Object(fe.a)(T,[{key:"setValue",value:function(b,U){"value"in this.props||this.setState({value:b},U)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return W.createElement(X,Object(J.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(b){return"value"in b?{value:b.value}:null}}]),T}(W.Component),Be=De.default=He},ZpRC:function(ut,De,g){"use strict";function J(L){return typeof L=="object"&&L!=null&&L.nodeType===1}function ye(L,E){return(!E||L!=="hidden")&&L!=="visible"&&L!=="clip"}function fe(L,E){if(L.clientHeightE||ee>L&&we=E&&Ie>=ue?ee-L-ae:we>E&&Ieue?we-E+de:0}var B=function(L,E){var ue=window,ae=E.scrollMode,de=E.block,ee=E.inline,we=E.boundary,Ie=E.skipOverflowHiddenElements,Te=typeof we=="function"?we:function(qe){return qe!==we};if(!J(L))throw new TypeError("Invalid target");for(var Ge=document.scrollingElement||document.documentElement,ke=[],V=L;J(V)&&Te(V);){if((V=V.parentElement)===Ge){ke.push(V);break}V!=null&&V===document.body&&fe(V)&&!fe(document.documentElement)||V!=null&&fe(V,Ie)&&ke.push(V)}for(var Ee=ue.visualViewport?ue.visualViewport.width:innerWidth,Me=ue.visualViewport?ue.visualViewport.height:innerHeight,Oe=window.scrollX||pageXOffset,ce=window.scrollY||pageYOffset,pe=L.getBoundingClientRect(),re=pe.height,_=pe.width,se=pe.top,te=pe.right,Qe=pe.bottom,be=pe.left,Y=de==="start"||de==="nearest"?se:de==="end"?Qe:se+re/2,Re=ee==="center"?be+_/2:ee==="end"?te:be,dt=[],St=0;St=0&&be>=0&&Qe<=Me&&te<=Ee&&se>=He&&Qe<=C&&be>=D&&te<=Be)return dt;var T=getComputedStyle(z),A=parseInt(T.borderLeftWidth,10),b=parseInt(T.borderTopWidth,10),U=parseInt(T.borderRightWidth,10),k=parseInt(T.borderBottomWidth,10),H=0,ne=0,ie="offsetWidth"in z?z.offsetWidth-z.clientWidth-A-U:0,_e="offsetHeight"in z?z.offsetHeight-z.clientHeight-b-k:0;if(Ge===z)H=de==="start"?Y:de==="end"?Y-Me:de==="nearest"?Le(ce,ce+Me,Me,b,k,ce+Y,ce+Y+re,re):Y-Me/2,ne=ee==="start"?Re:ee==="center"?Re-Ee/2:ee==="end"?Re-Ee:Le(Oe,Oe+Ee,Ee,A,U,Oe+Re,Oe+Re+_,_),H=Math.max(0,H+ce),ne=Math.max(0,ne+Oe);else{H=de==="start"?Y-He-b:de==="end"?Y-C+k+_e:de==="nearest"?Le(He,C,G,b,k+_e,Y,Y+re,re):Y-(He+G/2)+_e/2,ne=ee==="start"?Re-D-A:ee==="center"?Re-(D+X/2)+ie/2:ee==="end"?Re-Be+U+ie:Le(D,Be,X,A,U+ie,Re,Re+_,_);var je=z.scrollLeft,xe=z.scrollTop;Y+=xe-(H=Math.max(0,Math.min(xe+H,z.scrollHeight-G+_e))),Re+=je-(ne=Math.max(0,Math.min(je+ne,z.scrollWidth-X+ie)))}dt.push({el:z,top:H,left:ne})}return dt};function W(L){return L===Object(L)&&Object.keys(L).length!==0}function P(L,E){E===void 0&&(E="auto");var ue="scrollBehavior"in document.body.style;L.forEach(function(ae){var de=ae.el,ee=ae.top,we=ae.left;de.scroll&&ue?de.scroll({top:ee,left:we,behavior:E}):(de.scrollTop=ee,de.scrollLeft=we)})}function Q(L){return L===!1?{block:"end",inline:"nearest"}:W(L)?L:{block:"start",inline:"nearest"}}function $(L,E){var ue=!L.ownerDocument.documentElement.contains(L);if(W(E)&&typeof E.behavior=="function")return E.behavior(ue?[]:B(L,E));if(ue)return;var ae=Q(E);return P(B(L,ae),ae.behavior)}var We=De.a=$},bT9E:function(ut,De,g){"use strict";g.d(De,"a",function(){return ye});var J=g("VTBJ");function ye(fe,Le){var B=Object(J.a)({},fe);return Array.isArray(Le)&&Le.forEach(function(W){delete B[W]}),B}},baNF:function(ut,De,g){"use strict";g.r(De);var J=g("5NDa"),ye=g("5rEg"),fe=g("k1fw"),Le=g("9og8"),B=g("y8nQ"),W=g("Vl3Y"),P=g("tJVT"),Q=g("PpiC"),$=g("WmNS"),We=g.n($),L=g("q1tI"),E=g.n(L),ue=g("Ty5D"),ae=g("9kvl"),de=g("7ahc"),ee=g("9ZNV"),we=g("y37m"),Ie=g.n(we),Te=function(ke){var V=ke.shixunsDetail,Ee=ke.globalSetting,Me=ke.loading,Oe=ke.user,ce=ke.dispatch,pe=Object(Q.a)(ke,["shixunsDetail","globalSetting","loading","user","dispatch"]),re=Object(ue.h)(),_=Object(L.useState)({}),se=Object(P.a)(_,2),te=se[0],Qe=se[1],be=Object(L.useRef)(),Y=Object(L.useRef)(),Re=W.a.useForm(),dt=Object(P.a)(Re,1),St=dt[0],z=Object(L.useState)(""),M=Object(P.a)(z,2),G=M[0],X=M[1];Object(L.useEffect)(function(){return ce({type:"globalSetting/footerToggle",payload:!1}),function(){ce({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(L.useEffect)(function(){var C=sessionStorage.getItem("pathArray");if(C){var D=C.split(",").join("/"),T=D.indexOf("/")===0?D.substr(1):D;X(T)}},[]),Object(L.useEffect)(function(){var C,D,T,A;Y.current=(C=re.pathname)===null||C===void 0||((D=C.split("/"))===null||D===void 0)?void 0:D[2],be.current=((T=re.pathname)===null||T===void 0||((A=T.split("/"))===null||A===void 0)?void 0:A[3])==="repository"},[]);var He=function(){var C=Object(Le.a)(We.a.mark(function D(){var T,A,b,U=arguments;return We.a.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return T=U.length>0&&U[0]!==void 0?U[0]:{},H.next=3,ce({type:"shixunsDetail/addRepositoryFile",payload:{id:Y.current,message:T.commitMessage,content:T.codeMirror,path:"".concat(G?"".concat(G,"/"):"").concat(T.path||""),secret_repository:be.current?void 0:!0}});case 3:A=H.sent,A&&(b=be.current?"/shixuns/".concat(Y.current,"/repository").concat(G?"/master/shixun_show/".concat(G):""):"/shixuns/".concat(Y.current,"/secret_repository"),ae.d.replace(b));case 5:case"end":return H.stop()}},D)}));return function(){return C.apply(this,arguments)}}(),Be=function(){var D,T;ae.d.push("/shixuns/".concat(Y.current,"/").concat((D=re.pathname)===null||D===void 0||((T=D.split("/"))===null||T===void 0)?void 0:T[3]).concat(G?"/master/shixun_show/".concat(G):""))};return E.a.createElement("section",{className:Ie.a.bg},E.a.createElement("div",{className:Ie.a.wrap},E.a.createElement("div",{className:Ie.a.title},"\u65B0\u5EFA\u6587\u4EF6"),E.a.createElement(W.a,{className:"mt10",form:St,scrollToFirstError:!0,layout:"vertical",onFinish:He,onValuesChange:function(){return Qe(Object(fe.a)({},St.getFieldsValue()))}},E.a.createElement(W.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},E.a.createElement(W.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},E.a.createElement("span",null,E.a.createElement("span",{className:"mr5"},G?"".concat(G,"/"):""),E.a.createElement(ye.a,{className:Ie.a.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),E.a.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),E.a.createElement(W.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},E.a.createElement(ye.a,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),E.a.createElement("div",{className:"mt10 mb20"},E.a.createElement(W.a.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},E.a.createElement(de.a,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),E.a.createElement(W.a.Item,{noStyle:!0},E.a.createElement(ee.a,{okButtonProps:{htmlType:"submit"},onCancel:Be})))))};De.default=Object(ae.a)(function(Ge){var ke=Ge.shixunsDetail,V=Ge.loading,Ee=Ge.globalSetting,Me=Ge.user;return{shixunsDetail:ke,globalSetting:Ee,user:Me,loading:V.models.index}})(Te)},c5Ni:function(ut,De,g){},"p77/":function(ut,De,g){},y37m:function(ut,De,g){ut.exports={bg:"bg___3LF6r",wrap:"wrap___2G3Cw",title:"title___1RMLx",path:"path___25SE5",colorBlue:"colorBlue___1sALU",width240:"width240___3YXUs"}}}]);