dootask/public/js/build/codemirror.8cc0d7e8.js
2024-12-09 07:39:56 +08:00

28 lines
267 KiB
JavaScript
Vendored

import{c as cu}from"./@babel.f9bcab46.js";var Lt={exports:{}};(function(Tt,Ft){(function(b,me){Tt.exports=me()})(cu,function(){var b=navigator.userAgent,me=navigator.platform,O=/gecko\/\d/i.test(b),te=/MSIE \d/.test(b),j=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),J=/Edge\/(\d+)/.exec(b),C=te||j||J,F=C&&(te?document.documentMode||6:+(J||j)[1]),k=!J&&/WebKit\//.test(b),K=k&&/Qt\/\d+\.\d+/.test(b),S=!J&&/Chrome\/(\d+)/.exec(b),_=S&&+S[1],G=/Opera\//.test(b),de=/Apple Computer/.test(navigator.vendor),ae=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(b),D=/PhantomJS/.test(b),m=de&&(/Mobile\/\w+/.test(b)||navigator.maxTouchPoints>2),E=/Android/.test(b),H=m||E||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(b),z=m||/Mac/.test(me),ee=/\bCrOS\b/.test(b),fe=/win/i.test(me),ne=G&&b.match(/Version\/(\d*\.\d*)/);ne&&(ne=Number(ne[1])),ne&&ne>=15&&(G=!1,k=!0);var pe=z&&(K||G&&(ne==null||ne<12.11)),ce=O||C&&F>=9;function B(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=B(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 A(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function X(e,t){return A(e).appendChild(t)}function c(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.length;++o)i.appendChild(t[o]);return i}function U(e,t,n,r){var i=c(e,t,n,r);return i.setAttribute("role","presentation"),i}var W;document.createRange?W=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:W=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function le(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function Le(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function Oe(e,t){var n=e.className;B(t).test(n)||(e.className+=(n?" ":"")+t)}function Re(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!B(n[r]).test(t)&&(t+=" "+n[r]);return t}var g=function(e){e.select()};m?g=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:C&&(g=function(e){try{e.select()}catch{}});function h(e){return e.display.wrapper.ownerDocument}function ie(e){return ye(e.display.wrapper)}function ye(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function Y(e){return h(e).defaultView}function ue(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function be(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function we(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var xe=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};xe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},xe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function oe(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Te=50,We={toString:function(){return"CodeMirror.Pass"}},Je={scroll:!1},pt={origin:"*mouse"},De={origin:"+move"};function ze(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function ot(e){for(;Ue.length<=e;)Ue.push(Se(Ue)+" ");return Ue[e]}function Se(e){return e[e.length-1]}function Fe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function w(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function I(){}function M(e,t){var n;return Object.create?n=Object.create(e):(I.prototype=e,n=new I),t&&be(t,n),n}var Me=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function at(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Me.test(e))}function Xt(e,t){return t?t.source.indexOf("\\w")>-1&&at(e)?!0:t.test(e):at(e)}function zn(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Yt=/[\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 Ye(e){return e.charCodeAt(0)>=768&&Yt.test(e)}function nr(e,t,n){for(;(n<0?t>0:t<e.length)&&Ye(e.charAt(t));)t+=n;return t}function qt(e,t,n){for(var r=t>n?-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 ir(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var yr=null;function or(e,t,n){var r;yr=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:yr=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:yr=i)}return r!=null?r:yr}var gi=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]/,l=/[Lb1n]/,a=/[1n]/;function s(u,d,v){this.level=u,this.from=d,this.to=v}return function(u,d){var v=d=="ltr"?"L":"R";if(u.length==0||d=="ltr"&&!r.test(u))return!1;for(var y=u.length,x=[],T=0;T<y;++T)x.push(n(u.charCodeAt(T)));for(var P=0,q=v;P<y;++P){var Z=x[P];Z=="m"?x[P]=q:q=Z}for(var $=0,Q=v;$<y;++$){var re=x[$];re=="1"&&Q=="r"?x[$]="n":o.test(re)&&(Q=re,re=="r"&&(x[$]="R"))}for(var ge=1,he=x[0];ge<y-1;++ge){var Ce=x[ge];Ce=="+"&&he=="1"&&x[ge+1]=="1"?x[ge]="1":Ce==","&&he==x[ge+1]&&(he=="1"||he=="n")&&(x[ge]=he),he=Ce}for(var Be=0;Be<y;++Be){var nt=x[Be];if(nt==",")x[Be]="N";else if(nt=="%"){var qe=void 0;for(qe=Be+1;qe<y&&x[qe]=="%";++qe);for(var Ct=Be&&x[Be-1]=="!"||qe<y&&x[qe]=="1"?"1":"N",yt=Be;yt<qe;++yt)x[yt]=Ct;Be=qe-1}}for(var Ze=0,bt=v;Ze<y;++Ze){var lt=x[Ze];bt=="L"&&lt=="1"?x[Ze]="L":o.test(lt)&&(bt=lt)}for(var Ve=0;Ve<y;++Ve)if(i.test(x[Ve])){var Qe=void 0;for(Qe=Ve+1;Qe<y&&i.test(x[Qe]);++Qe);for(var Ge=(Ve?x[Ve-1]:v)=="L",kt=(Qe<y?x[Qe]:v)=="L",rn=Ge==kt?Ge?"L":"R":v,xr=Ve;xr<Qe;++xr)x[xr]=rn;Ve=Qe-1}for(var ct=[],Ut,it=0;it<y;)if(l.test(x[it])){var fo=it;for(++it;it<y&&l.test(x[it]);++it);ct.push(new s(0,fo,it))}else{var rr=it,Fr=ct.length,Mr=d=="rtl"?1:0;for(++it;it<y&&x[it]!="L";++it);for(var dt=rr;dt<it;)if(a.test(x[dt])){rr<dt&&(ct.splice(Fr,0,new s(1,rr,dt)),Fr+=Mr);var nn=dt;for(++dt;dt<it&&a.test(x[dt]);++dt);ct.splice(Fr,0,new s(2,nn,dt)),Fr+=Mr,rr=dt}else++dt;rr<it&&ct.splice(Fr,0,new s(1,rr,it))}return d=="ltr"&&(ct[0].level==1&&(Ut=u.match(/^\s+/))&&(ct[0].from=Ut[0].length,ct.unshift(new s(0,0,Ut[0].length))),Se(ct).level==1&&(Ut=u.match(/\s+$/))&&(Se(ct).to-=Ut[0].length,ct.push(new s(0,y-Ut[0].length,y)))),d=="rtl"?ct.reverse():ct}}();function Ae(e,t){var n=e.order;return n==null&&(n=e.order=gi(e.text,t)),n}var Bn=[],ve=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Bn).concat(n)}};function Zt(e,t){return e._handlers&&e._handlers[t]||Bn}function st(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=oe(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function _e(e,t){var n=Zt(e,t);if(!!n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function je(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),_e(e,n||t.type,e,t),vt(t)||t.codemirrorIgnore}function Mt(e){var t=e._handlers&&e._handlers.cursorActivity;if(!!t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)oe(n,t[r])==-1&&n.push(t[r])}function wt(e,t){return Zt(e,t).length>0}function Ot(e){e.prototype.on=function(t,n){ve(this,t,n)},e.prototype.off=function(t,n){st(this,t,n)}}function ut(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Er(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function vt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function lr(e){ut(e),Er(e)}function on(e){return e.target||e.srcElement}function Nt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),z&&e.ctrlKey&&t==1&&(t=3),t}var mi=function(){if(C&&F<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),Or;function Wn(e){if(Or==null){var t=c("span","\u200B");X(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(C&&F<8))}var n=Or?c("span","\u200B"):c("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var ln;function ar(e){if(ln!=null)return ln;var t=X(e,document.createTextNode("A\u062EA")),n=W(t,0,1).getBoundingClientRect(),r=W(t,1,2).getBoundingClientRect();return A(e),!n||n.left==n.right?!1:ln=r.right-n.right<3}var Et=`
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),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},sr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},In=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Pt=null;function xi(e){if(Pt!=null)return Pt;var t=X(e,c("span","x")),n=t.getBoundingClientRect(),r=W(t,0,1).getBoundingClientRect();return Pt=Math.abs(n.left-r.left)>1}var Nr={},Ht={};function zt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Nr[e]=t}function br(e,t){Ht[e]=t}function Pr(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=M(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Pr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Pr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Hr(e,t){t=Pr(t);var n=Nr[t.name];if(!n)return Hr(e,"text/plain");var r=n(e,t);if(ur.hasOwnProperty(t.name)){var i=ur[t.name];for(var o in i)!i.hasOwnProperty(o)||(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 l in t.modeProps)r[l]=t.modeProps[l];return r}var ur={};function zr(e,t){var n=ur.hasOwnProperty(e)?ur[e]:ur[e]={};be(t,n)}function _t(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 an(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 Br(e,t,n){return e.startState?e.startState(t,n):!0}var Ke=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};Ke.prototype.eol=function(){return this.pos>=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ke.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Ke.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=we(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?we(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.indentation=function(){return we(this.string,null,this.tabSize)-(this.lineStart?we(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function se(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<o){n=i;break}t-=o}return n.lines[t]}function Qt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var l=o.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function sn(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Dt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function f(e){if(e.parent==null)return null;for(var t=e.parent,n=oe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function p(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l],s=a.height;if(t<s)break;t-=s}return n+l}function N(e,t){return t>=e.first&&t<e.first+e.size}function R(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function L(e,t,n){if(n===void 0&&(n=null),!(this instanceof L))return new L(e,t,n);this.line=e,this.ch=t,this.sticky=n}function V(e,t){return e.line-t.line||e.ch-t.ch}function Ne(e,t){return e.sticky==t.sticky&&V(e,t)==0}function $e(e){return L(e.line,e.ch)}function gt(e,t){return V(e,t)<0?t:e}function Wr(e,t){return V(e,t)<0?e:t}function ho(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ke(e,t){if(t.line<e.first)return L(e.first,0);var n=e.first+e.size-1;return t.line>n?L(n,se(e,n).text.length):ha(t,se(e,t.line).text.length)}function ha(e,t){var n=e.ch;return n==null||n>t?L(e.line,t):n<0?L(e.line,0):e}function po(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ke(e,t[r]);return n}var Rn=function(e,t){this.state=e,this.lookAhead=t},jt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};jt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},jt.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}},jt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},jt.fromSaved=function(e,t,n){return t instanceof Rn?new jt(e,_t(e.mode,t.state),n,t.lookAhead):new jt(e,_t(e.mode,t),n)},jt.prototype.save=function(e){var t=e!==!1?_t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Rn(t,this.maxLookAhead):t};function vo(e,t,n,r){var i=[e.state.modeGen],o={};ko(e,t.text,e.doc.mode,n,function(u,d){return i.push(u,d)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var d=e.state.overlays[u],v=1,y=0;n.state=!0,ko(e,t.text,d.mode,n,function(x,T){for(var P=v;y<x;){var q=i[v];q>x&&i.splice(v,1,x,i[v+1],q),v+=2,y=Math.min(x,q)}if(!!T)if(d.opaque)i.splice(P,v-P,x,"overlay "+T),v=P+2;else for(;P<v;P+=2){var Z=i[P+1];i[P+1]=(Z?Z+" ":"")+"overlay "+T}},o),n.state=l,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)a(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function go(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=un(e,f(t)),i=t.text.length>e.options.maxHighlightLength&&_t(e.doc.mode,r.state),o=vo(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 un(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new jt(r,!0,t);var o=da(e,t,n),l=o>r.first&&se(r,o-1).stateAfter,a=l?jt.fromSaved(r,l,o):new jt(r,Br(r.mode),o);return r.iter(o,t,function(s){yi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?a.save():null,a.nextLine()}),n&&(r.modeFrontier=a.line),a}function yi(e,t,n,r){var i=e.doc.mode,o=new Ke(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&mo(i,n.state);!o.eol();)bi(i,o,n.state),o.start=o.pos}function mo(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var n=an(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function bi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=an(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var xo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yo(e,t,n,r){var i=e.doc,o=i.mode,l;t=ke(i,t);var a=se(i,t.line),s=un(e,t.line,n),u=new Ke(a.text,e.options.tabSize,s),d;for(r&&(d=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,l=bi(o,u,s.state),r&&d.push(new xo(u,l,_t(i.mode,s.state)));return r?d:new xo(u,l,s.state)}function bo(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function ko(e,t,n,r,i,o,l){var a=n.flattenSpans;a==null&&(a=e.options.flattenSpans);var s=0,u=null,d=new Ke(t,e.options.tabSize,r),v,y=e.options.addModeClass&&[null];for(t==""&&bo(mo(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(a=!1,l&&yi(e,t,r,d.pos),d.pos=t.length,v=null):v=bo(bi(n,d,r.state,y),o),y){var x=y[0].name;x&&(v="m-"+(v?x+" "+v:x))}if(!a||u!=v){for(;s<d.start;)s=Math.min(d.start,s+5e3),i(s,u);u=v}d.start=d.pos}for(;s<d.pos;){var T=Math.min(d.pos,s+5e3);i(T,u),s=T}}function da(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=se(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof Rn?u.lookAhead:0)<=o.modeFrontier))return a;var d=we(s.text,null,e.options.tabSize);(i==null||r>d)&&(i=a-1,r=d)}return i}function pa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=se(e,r).stateAfter;if(i&&(!(i instanceof Rn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var wo=!1,Jt=!1;function va(){wo=!0}function ga(){Jt=!0}function qn(e,t,n){this.marker=e,this.from=t,this.to=n}function fn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function ma(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function xa(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function ya(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,a=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&l.type=="bookmark"&&(!n||!o.marker.insertLeft)){var s=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new qn(l,o.from,s?null:o.to))}}return r}function ba(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,a=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new qn(l,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function ki(e,t){if(t.full)return null;var n=N(e,t.from.line)&&se(e,t.from.line).markedSpans,r=N(e,t.to.line)&&se(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=V(t.from,t.to)==0,a=ya(n,i,l),s=ba(r,o,l),u=t.text.length==1,d=Se(t.text).length+(u?i:0);if(a)for(var v=0;v<a.length;++v){var y=a[v];if(y.to==null){var x=fn(s,y.marker);x?u&&(y.to=x.to==null?null:x.to+d):y.to=i}}if(s)for(var T=0;T<s.length;++T){var P=s[T];if(P.to!=null&&(P.to+=d),P.from==null){var q=fn(a,P.marker);q||(P.from=d,u&&(a||(a=[])).push(P))}else P.from+=d,u&&(a||(a=[])).push(P)}a&&(a=So(a)),s&&s!=a&&(s=So(s));var Z=[a];if(!u){var $=t.text.length-2,Q;if($>0&&a)for(var re=0;re<a.length;++re)a[re].to==null&&(Q||(Q=[])).push(new qn(a[re].marker,null,null));for(var ge=0;ge<$;++ge)Z.push(Q);Z.push(s)}return Z}function So(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ka(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(x){if(x.markedSpans)for(var T=0;T<x.markedSpans.length;++T){var P=x.markedSpans[T].marker;P.readOnly&&(!r||oe(r,P)==-1)&&(r||(r=[])).push(P)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<i.length;++s){var u=i[s];if(!(V(u.to,a.from)<0||V(u.from,a.to)>0)){var d=[s,1],v=V(u.from,a.from),y=V(u.to,a.to);(v<0||!l.inclusiveLeft&&!v)&&d.push({from:u.from,to:a.from}),(y>0||!l.inclusiveRight&&!y)&&d.push({from:a.to,to:u.to}),i.splice.apply(i,d),s+=d.length-3}}return i}function Co(e){var t=e.markedSpans;if(!!t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Lo(e,t){if(!!t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function _n(e){return e.inclusiveLeft?-1:0}function jn(e){return e.inclusiveRight?1:0}function wi(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=V(r.from,i.from)||_n(e)-_n(t);if(o)return-o;var l=V(r.to,i.to)||jn(e)-jn(t);return l||t.id-e.id}function To(e,t){var n=Jt&&e.markedSpans,r;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||wi(r,i.marker)<0)&&(r=i.marker);return r}function Do(e){return To(e,!0)}function Kn(e){return To(e,!1)}function wa(e,t){var n=Jt&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||wi(r,o.marker)<0)&&(r=o.marker)}return r}function Ao(e,t,n,r,i){var o=se(e,t),l=Jt&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(!!s.marker.collapsed){var u=s.marker.find(0),d=V(u.from,n)||_n(s.marker)-_n(i),v=V(u.to,r)||jn(s.marker)-jn(i);if(!(d>=0&&v<=0||d<=0&&v>=0)&&(d<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?V(u.to,n)>=0:V(u.to,n)>0)||d>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?V(u.from,r)<=0:V(u.from,r)<0)))return!0}}}function Bt(e){for(var t;t=Do(e);)e=t.find(-1,!0).line;return e}function Sa(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function Ca(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Si(e,t){var n=se(e,t),r=Bt(n);return n==r?t:f(r)}function Fo(e,t){if(t>e.lastLine())return t;var n=se(e,t),r;if(!fr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function fr(e,t){var n=Jt&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Ci(e,t,r))return!0}}}function Ci(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Ci(e,r.line,fn(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ci(e,t,i))return!0}function Vt(e){e=Bt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==n)break;t+=a.height}return t}function Gn(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Do(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=Kn(r);){var o=n.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}function Li(e){var t=e.display,n=e.doc;t.maxLine=se(n,n.first),t.maxLineLength=Gn(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=Gn(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Ir=function(e,t,n){this.text=e,Lo(this,t),this.height=n?n(this):1};Ir.prototype.lineNo=function(){return f(this)},Ot(Ir);function La(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),Lo(e,n);var i=r?r(e):1;i!=e.height&&Dt(e,i)}function Ta(e){e.parent=null,Co(e)}var Da={},Aa={};function Mo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Aa:Da;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Eo(e,t){var n=U("span",null,null,k?"padding-right: .1px":null),r={pre:U("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,l=void 0;r.pos=0,r.addToken=Ma,ar(e.display.measure)&&(l=Ae(o,e.doc.direction))&&(r.addToken=Oa(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);Na(o,r,go(e,o,a)),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(Wn(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(k){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return _e(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Re(r.pre.className,r.textClass||"")),r}function Fa(e){var t=c("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ma(e,t,n,r,i,o,l){if(!!t){var a=e.splitSpaces?Ea(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,d;if(!s.test(t))e.col+=t.length,d=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,d),C&&F<9&&(u=!0),e.pos+=t.length;else{d=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var y=s.exec(t),x=y?y.index-v:t.length-v;if(x){var T=document.createTextNode(a.slice(v,v+x));C&&F<9?d.appendChild(c("span",[T])):d.appendChild(T),e.map.push(e.pos,e.pos+x,T),e.col+=x,e.pos+=x}if(!y)break;v+=x+1;var P=void 0;if(y[0]==" "){var q=e.cm.options.tabSize,Z=q-e.col%q;P=d.appendChild(c("span",ot(Z),"cm-tab")),P.setAttribute("role","presentation"),P.setAttribute("cm-text"," "),e.col+=Z}else y[0]=="\r"||y[0]==`
`?(P=d.appendChild(c("span",y[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),P.setAttribute("cm-text",y[0]),e.col+=1):(P=e.cm.options.specialCharPlaceholder(y[0]),P.setAttribute("cm-text",y[0]),C&&F<9?d.appendChild(c("span",[P])):d.appendChild(P),e.col+=1);e.map.push(e.pos,e.pos+1,P),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var $=n||"";r&&($+=r),i&&($+=i);var Q=c("span",[d],$,o);if(l)for(var re in l)l.hasOwnProperty(re)&&re!="style"&&re!="class"&&Q.setAttribute(re,l[re]);return e.content.appendChild(Q)}e.content.appendChild(d)}}function Ea(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),r+=o,n=o==" "}return r}function Oa(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,d=u+r.length;;){for(var v=void 0,y=0;y<t.length&&(v=t[y],!(v.to>u&&v.from<=u));y++);if(v.to>=d)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Oo(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 Na(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(o,o=n[l]),Mo(n[l+1],t.cm.options));return}for(var a=i.length,s=0,u=1,d="",v,y,x=0,T,P,q,Z,$;;){if(x==s){T=P=q=y="",$=null,Z=null,x=1/0;for(var Q=[],re=void 0,ge=0;ge<r.length;++ge){var he=r[ge],Ce=he.marker;if(Ce.type=="bookmark"&&he.from==s&&Ce.widgetNode)Q.push(Ce);else if(he.from<=s&&(he.to==null||he.to>s||Ce.collapsed&&he.to==s&&he.from==s)){if(he.to!=null&&he.to!=s&&x>he.to&&(x=he.to,P=""),Ce.className&&(T+=" "+Ce.className),Ce.css&&(y=(y?y+";":"")+Ce.css),Ce.startStyle&&he.from==s&&(q+=" "+Ce.startStyle),Ce.endStyle&&he.to==x&&(re||(re=[])).push(Ce.endStyle,he.to),Ce.title&&(($||($={})).title=Ce.title),Ce.attributes)for(var Be in Ce.attributes)($||($={}))[Be]=Ce.attributes[Be];Ce.collapsed&&(!Z||wi(Z.marker,Ce)<0)&&(Z=he)}else he.from>s&&x>he.from&&(x=he.from)}if(re)for(var nt=0;nt<re.length;nt+=2)re[nt+1]==x&&(P+=" "+re[nt]);if(!Z||Z.from==s)for(var qe=0;qe<Q.length;++qe)Oo(t,0,Q[qe]);if(Z&&(Z.from||0)==s){if(Oo(t,(Z.to==null?a+1:Z.to)-s,Z.marker,Z.from==null),Z.to==null)return;Z.to==s&&(Z=!1)}}if(s>=a)break;for(var Ct=Math.min(a,x);;){if(d){var yt=s+d.length;if(!Z){var Ze=yt>Ct?d.slice(0,Ct-s):d;t.addToken(t,Ze,v?v+T:T,q,s+Ze.length==x?P:"",y,$)}if(yt>=Ct){d=d.slice(Ct-s),s=Ct;break}s=yt,q=""}d=i.slice(o,o=n[u++]),v=Mo(n[u++],t.cm.options)}}}function No(e,t,n){this.line=t,this.rest=Ca(t),this.size=this.rest?f(Se(this.rest))-n+1:1,this.node=this.text=null,this.hidden=fr(e,t)}function Un(e,t,n){for(var r=[],i,o=t;o<n;o=i){var l=new No(e.doc,se(e.doc,o),o);i=o+l.size,r.push(l)}return r}var Rr=null;function Pa(e){Rr?Rr.ops.push(e):e.ownsGroup=Rr={ops:[e],delayedCallbacks:[]}}function Ha(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function za(e,t){var n=e.ownsGroup;if(!!n)try{Ha(n)}finally{Rr=null,t(n)}}var cn=null;function et(e,t){var n=Zt(e,t);if(!!n.length){var r=Array.prototype.slice.call(arguments,2),i;Rr?i=Rr.delayedCallbacks:cn?i=cn:(i=cn=[],setTimeout(Ba,0));for(var o=function(a){i.push(function(){return n[a].apply(null,r)})},l=0;l<n.length;++l)o(l)}}function Ba(){var e=cn;cn=null;for(var t=0;t<e.length;++t)e[t]()}function Po(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Ia(e,t):o=="gutter"?zo(e,t,n,r):o=="class"?Ti(e,t):o=="widget"&&Ra(e,t,r)}t.changes=null}function hn(e){return e.node==e.text&&(e.node=c("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),C&&F<8&&(e.node.style.zIndex=2)),e.node}function Wa(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=hn(t);t.background=r.insertBefore(c("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Ho(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Eo(e,t)}function Ia(e,t){var n=t.text.className,r=Ho(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Ti(e,t)):n&&(t.text.className=n)}function Ti(e,t){Wa(e,t),t.line.wrapClass?hn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function zo(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=hn(t);t.gutterBackground=c("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=hn(t),a=t.gutter=c("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),e.display.input.setUneditable(a),l.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=a.appendChild(c("div",R(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,d=o.hasOwnProperty(u)&&o[u];d&&a.appendChild(c("div",[d],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function Ra(e,t,n){t.alignable&&(t.alignable=null);for(var r=B("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Bo(e,t,n)}function qa(e,t,n,r){var i=Ho(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Ti(e,t),zo(e,t,n,r),Bo(e,t,r),t.node}function Bo(e,t,n){if(Wo(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Wo(e,t.rest[r],t,n,!1)}function Wo(e,t,n,r,i){if(!!t.widgets)for(var o=hn(n),l=0,a=t.widgets;l<a.length;++l){var s=a[l],u=c("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),_a(s,u,n,r),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),et(s,"redraw")}}function _a(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function dn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!le(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),X(t.display.measure,c("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function $t(e,t){for(var n=on(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function Xn(e){return e.lineSpace.offsetTop}function Di(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Io(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=X(e.measure,c("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function Kt(e){return Te-e.display.nativeBarWidth}function kr(e){return e.display.scroller.clientWidth-Kt(e)-e.display.barWidth}function Ai(e){return e.display.scroller.clientHeight-Kt(e)-e.display.barHeight}function ja(e,t,n){var r=e.options.lineWrapping,i=r&&kr(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),a=0;a<l.length-1;a++){var s=l[a],u=l[a+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ro(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(f(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Ka(e,t){t=Bt(t);var n=f(t),r=e.display.externalMeasured=new No(e.doc,t,n);r.lineN=n;var i=r.built=Eo(e,r);return r.text=i.pre,X(e.display.lineMeasure,i.pre),r}function qo(e,t,n,r){return Gt(e,qr(e,t),n,r)}function Fi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Cr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function qr(e,t){var n=f(t),r=Fi(e,n);r&&!r.text?r=null:r&&r.changes&&(Po(e,r,n,Pi(e)),e.curOp.forceUpdate=!0),r||(r=Ka(e,t));var i=Ro(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Gt(e,t,n,r,i){t.before&&(n=-1);var o=n+(r||""),l;return t.cache.hasOwnProperty(o)?l=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(ja(e,t.view,t.rect),t.hasHeights=!0),l=Ua(e,t,n,r),l.bogus||(t.cache[o]=l)),{left:l.left,right:l.right,top:i?l.rtop:l.top,bottom:i?l.rbottom:l.bottom}}var _o={left:0,right:0,top:0,bottom:0};function jo(e,t,n){for(var r,i,o,l,a,s,u=0;u<e.length;u+=3)if(a=e[u],s=e[u+1],t<a?(i=0,o=1,l="left"):t<s?(i=t-a,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-a,i=o-1,t>=s&&(l="right")),i!=null){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(n=="right"&&i==s-a)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],l="right";break}return{node:r,start:i,end:o,collapse:l,coverStart:a,coverEnd:s}}function Ga(e,t){var n=_o;if(t=="left")for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Ua(e,t,n,r){var i=jo(t.map,n,r),o=i.node,l=i.start,a=i.end,s=i.collapse,u;if(o.nodeType==3){for(var d=0;d<4;d++){for(;l&&Ye(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+a<i.coverEnd&&Ye(t.line.text.charAt(i.coverStart+a));)++a;if(C&&F<9&&l==0&&a==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Ga(W(o,l,a).getClientRects(),r),u.left||u.right||l==0)break;a=l,l=l-1,s="right"}C&&F<11&&(u=Xa(e.display.measure,u))}else{l>0&&(s=r="right");var v;e.options.lineWrapping&&(v=o.getClientRects()).length>1?u=v[r=="right"?v.length-1:0]:u=o.getBoundingClientRect()}if(C&&F<9&&!l&&(!u||!u.left&&!u.right)){var y=o.parentNode.getClientRects()[0];y?u={left:y.left,right:y.left+jr(e.display),top:y.top,bottom:y.bottom}:u=_o}for(var x=u.top-t.rect.top,T=u.bottom-t.rect.top,P=(x+T)/2,q=t.view.measure.heights,Z=0;Z<q.length-1&&!(P<q[Z]);Z++);var $=Z?q[Z-1]:0,Q=q[Z],re={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:$,bottom:Q};return!u.left&&!u.right&&(re.bogus=!0),e.options.singleCursorHeightPerLine||(re.rtop=x,re.rbottom=T),re}function Xa(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!xi(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function Ko(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Go(e){e.display.externalMeasure=null,A(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Ko(e.display.view[t])}function pn(e){Go(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Uo(e){return S&&E?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Xo(e){return S&&E?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Mi(e){var t=Bt(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=dn(n[i]));return r}function Yn(e,t,n,r,i){if(!i){var o=Mi(t);n.top+=o,n.bottom+=o}if(r=="line")return n;r||(r="local");var l=Vt(t);if(r=="local"?l+=Xn(e.display):l-=e.display.viewOffset,r=="page"||r=="window"){var a=e.display.lineSpace.getBoundingClientRect();l+=a.top+(r=="window"?0:Xo(h(e)));var s=a.left+(r=="window"?0:Uo(h(e)));n.left+=s,n.right+=s}return n.top+=l,n.bottom+=l,n}function Yo(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=Uo(h(e)),i-=Xo(h(e));else if(n=="local"||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:r-l.left,top:i-l.top}}function Zn(e,t,n,r,i){return r||(r=se(e.doc,t.line)),Yn(e,r,qo(e,r,t.ch,i),n)}function Wt(e,t,n,r,i,o){r=r||se(e.doc,t.line),i||(i=qr(e,r));function l(T,P){var q=Gt(e,i,T,P?"right":"left",o);return P?q.left=q.right:q.right=q.left,Yn(e,r,q,n)}var a=Ae(r,e.doc.direction),s=t.ch,u=t.sticky;if(s>=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function d(T,P,q){var Z=a[P],$=Z.level==1;return l(q?T-1:T,$!=q)}var v=or(a,s,u),y=yr,x=d(s,v,u=="before");return y!=null&&(x.other=d(s,y,u!="before")),x}function Zo(e,t){var n=0;t=ke(e.doc,t),e.options.lineWrapping||(n=jr(e.display)*t.ch);var r=se(e.doc,t.line),i=Vt(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ei(e,t,n,r,i){var o=L(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Oi(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ei(r.first,0,null,-1,-1);var i=p(r,n),o=r.first+r.size-1;if(i>o)return Ei(r.first+r.size-1,se(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=se(r,i);;){var a=Ya(e,l,i,t,n),s=wa(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=se(r,i=u.line)}}function Qo(e,t,n,r){r-=Mi(t);var i=t.text.length,o=qt(function(l){return Gt(e,n,l-1).bottom<=r},i,0);return i=qt(function(l){return Gt(e,n,l).top>r},o,i),{begin:o,end:i}}function Jo(e,t,n,r){n||(n=qr(e,t));var i=Yn(e,t,Gt(e,n,r),"line").top;return Qo(e,t,n,i)}function Ni(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Ya(e,t,n,r,i){i-=Vt(t);var o=qr(e,t),l=Mi(t),a=0,s=t.text.length,u=!0,d=Ae(t,e.doc.direction);if(d){var v=(e.options.lineWrapping?Qa:Za)(e,t,n,o,d,r,i);u=v.level!=1,a=u?v.from:v.to-1,s=u?v.to:v.from-1}var y=null,x=null,T=qt(function(ge){var he=Gt(e,o,ge);return he.top+=l,he.bottom+=l,Ni(he,r,i,!1)?(he.top<=i&&he.left<=r&&(y=ge,x=he),!0):!1},a,s),P,q,Z=!1;if(x){var $=r-x.left<x.right-r,Q=$==u;T=y+(Q?0:1),q=Q?"after":"before",P=$?x.left:x.right}else{!u&&(T==s||T==a)&&T++,q=T==0?"after":T==t.text.length?"before":Gt(e,o,T-(u?1:0)).bottom+l<=i==u?"after":"before";var re=Wt(e,L(n,T,q),"line",t,o);P=re.left,Z=i<re.top?-1:i>=re.bottom?1:0}return T=nr(t.text,T,1),Ei(n,T,q,Z,r-P)}function Za(e,t,n,r,i,o,l){var a=qt(function(v){var y=i[v],x=y.level!=1;return Ni(Wt(e,L(n,x?y.to:y.from,x?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=s.level!=1,d=Wt(e,L(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Ni(d,o,l,!0)&&d.top>l&&(s=i[a-1])}return s}function Qa(e,t,n,r,i,o,l){var a=Qo(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var d=null,v=null,y=0;y<i.length;y++){var x=i[y];if(!(x.from>=u||x.to<=s)){var T=x.level!=1,P=Gt(e,r,T?Math.min(u,x.to)-1:Math.max(s,x.from)).right,q=P<o?o-P+1e9:P-o;(!d||v>q)&&(d=x,v=q)}}return d||(d=i[i.length-1]),d.from<s&&(d={from:s,to:d.to,level:d.level}),d.to>u&&(d={from:d.from,to:u,level:d.level}),d}var wr;function _r(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(wr==null){wr=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)wr.appendChild(document.createTextNode("x")),wr.appendChild(c("br"));wr.appendChild(document.createTextNode("x"))}X(e.measure,wr);var n=wr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),A(e.measure),n||1}function jr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),n=c("pre",[t],"CodeMirror-line-like");X(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Pi(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Hi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Hi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Vo(e){var t=_r(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/jr(e.display)-3);return function(i){if(fr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function zi(e){var t=e.doc,n=Vo(e);t.iter(function(r){var i=n(r);i!=r.height&&Dt(r,i)})}function Sr(e,t,n,r){var i=e.display;if(!n&&on(t).getAttribute("cm-not-content")=="true")return null;var o,l,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,l=t.clientY-a.top}catch{return null}var s=Oi(e,o,l),u;if(r&&s.xRel>0&&(u=se(e.doc,s.line).text).length==s.ch){var d=we(u,u.length,e.options.tabSize)-u.length;s=L(s.line,Math.max(0,Math.round((o-Io(e.display).left)/jr(e.display))-d))}return s}function Cr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function mt(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Jt&&Si(e.doc,t)<i.viewTo&&hr(e);else if(n<=i.viewFrom)Jt&&Fo(e.doc,n+r)>i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=Qn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=Qn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var a=Qn(e,t,t,-1),s=Qn(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Un(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function cr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Cr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);oe(l,n)==-1&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Qn(e,t,n,r){var i=Cr(e,t),o,l=e.display.view;if(!Jt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var a=e.display.viewFrom,s=0;s<i;s++)a+=l[s].size;if(a!=t){if(r>0){if(i==l.length-1)return null;o=a+l[i].size-t,i++}else o=a-t;t+=o,n+=o}for(;Si(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Ja(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Un(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Un(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Cr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Un(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Cr(e,n)))),r.viewTo=n}function $o(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function vn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function el(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),l=e.options.$customCursor;l&&(t=!0);for(var a=0;a<n.sel.ranges.length;a++)if(!(!t&&a==n.sel.primIndex)){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var u=s.empty();if(l){var d=l(e,s);d&&Bi(e,d,i)}else(u||e.options.showCursorWhenSelecting)&&Bi(e,s.head,i);u||Va(e,s,o)}}return r}function Bi(e,t,n){var r=Wt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(c("div","\xA0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=Zn(e,t,"div",null,null),l=o.right-o.left;i.style.width=(l>0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(c("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Jn(e,t){return e.top-t.top||e.left-t.left}function Va(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=Io(e.display),a=l.left,s=Math.max(r.sizerWidth,kr(e)-r.sizer.offsetLeft)-l.right,u=i.direction=="ltr";function d(Q,re,ge,he){re<0&&(re=0),re=Math.round(re),he=Math.round(he),o.appendChild(c("div",null,"CodeMirror-selected","position: absolute; left: "+Q+`px;
top: `+re+"px; width: "+(ge==null?s-Q:ge)+`px;
height: `+(he-re)+"px"))}function v(Q,re,ge){var he=se(i,Q),Ce=he.text.length,Be,nt;function qe(Ze,bt){return Zn(e,L(Q,Ze),"div",he,bt)}function Ct(Ze,bt,lt){var Ve=Jo(e,he,null,Ze),Qe=bt=="ltr"==(lt=="after")?"left":"right",Ge=lt=="after"?Ve.begin:Ve.end-(/\s/.test(he.text.charAt(Ve.end-1))?2:1);return qe(Ge,Qe)[Qe]}var yt=Ae(he,i.direction);return ir(yt,re||0,ge==null?Ce:ge,function(Ze,bt,lt,Ve){var Qe=lt=="ltr",Ge=qe(Ze,Qe?"left":"right"),kt=qe(bt-1,Qe?"right":"left"),rn=re==null&&Ze==0,xr=ge==null&&bt==Ce,ct=Ve==0,Ut=!yt||Ve==yt.length-1;if(kt.top-Ge.top<=3){var it=(u?rn:xr)&&ct,fo=(u?xr:rn)&&Ut,rr=it?a:(Qe?Ge:kt).left,Fr=fo?s:(Qe?kt:Ge).right;d(rr,Ge.top,Fr-rr,Ge.bottom)}else{var Mr,dt,nn,co;Qe?(Mr=u&&rn&&ct?a:Ge.left,dt=u?s:Ct(Ze,lt,"before"),nn=u?a:Ct(bt,lt,"after"),co=u&&xr&&Ut?s:kt.right):(Mr=u?Ct(Ze,lt,"before"):a,dt=!u&&rn&&ct?s:Ge.right,nn=!u&&xr&&Ut?a:kt.left,co=u?Ct(bt,lt,"after"):s),d(Mr,Ge.top,dt-Mr,Ge.bottom),Ge.bottom<kt.top&&d(a,Ge.bottom,null,kt.top),d(nn,kt.top,co-nn,kt.bottom)}(!Be||Jn(Ge,Be)<0)&&(Be=Ge),Jn(kt,Be)<0&&(Be=kt),(!nt||Jn(Ge,nt)<0)&&(nt=Ge),Jn(kt,nt)<0&&(nt=kt)}),{start:Be,end:nt}}var y=t.from(),x=t.to();if(y.line==x.line)v(y.line,y.ch,x.ch);else{var T=se(i,y.line),P=se(i,x.line),q=Bt(T)==Bt(P),Z=v(y.line,y.ch,q?T.text.length+1:null).end,$=v(x.line,q?0:null,x.ch).start;q&&(Z.top<$.top-2?(d(Z.right,Z.top,null,Z.bottom),d(a,$.top,$.left,$.bottom)):d(Z.right,Z.top,$.left-Z.right,Z.bottom)),Z.bottom<$.top&&d(a,Z.bottom,null,$.top)}n.appendChild(o)}function Wi(e){if(!!e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?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 tl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ri(e))}function Ii(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Kr(e))},100)}function Ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(_e(e,"focus",e,t),e.state.focused=!0,Oe(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),k&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wi(e))}function Kr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(_e(e,"blur",e,t),e.state.focused=!1,Ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var a=t.view[l],s=e.options.lineWrapping,u=void 0,d=0;if(!a.hidden){if(i+=a.line.height,C&&F<8){var v=a.node.offsetTop+a.node.offsetHeight;u=v-n,n=v}else{var y=a.node.getBoundingClientRect();u=y.bottom-y.top,!s&&a.text.firstChild&&(d=a.text.firstChild.getBoundingClientRect().right-y.left-1)}var x=a.line.height-u;if((x>.005||x<-.005)&&(i<r&&(o-=x),Dt(a.line,u),rl(a.line),a.rest))for(var T=0;T<a.rest.length;T++)rl(a.rest[T]);if(d>e.display.sizerWidth){var P=Math.ceil(d/jr(e.display));P>e.display.maxLineLength&&(e.display.maxLineLength=P,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function rl(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function $n(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=p(t,r),l=p(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=p(t,Vt(se(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=p(t,Vt(se(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function $a(e,t){if(!je(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!D){var l=c("div","\u200B",null,`position: absolute;
top: `+(t.top-n.viewOffset-Xn(e.display))+`px;
height: `+(t.bottom-t.top+Kt(e)+n.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function es(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?L(t.line,t.ch+1,"before"):t,t=t.ch?L(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=Wt(e,t),s=!n||n==t?a:Wt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qi(e,i),d=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(mn(e,u.scrollTop),Math.abs(e.doc.scrollTop-d)>1&&(l=!0)),u.scrollLeft!=null&&(Lr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function ts(e,t){var n=qi(e,t);n.scrollTop!=null&&mn(e,n.scrollTop),n.scrollLeft!=null&&Lr(e,n.scrollLeft)}function qi(e,t){var n=e.display,r=_r(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Ai(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Di(n),s=t.top<r,u=t.bottom>a-r;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var d=Math.min(t.top,(u?a:t.bottom)-o);d!=i&&(l.scrollTop=d)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,y=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,x=kr(e)-n.gutters.offsetWidth,T=t.right-t.left>x;return T&&(t.right=t.left+x),t.left<10?l.scrollLeft=0:t.left<y?l.scrollLeft=Math.max(0,t.left+v-(T?0:10)):t.right>x+y-3&&(l.scrollLeft=t.right+(T?0:10)-x),l}function _i(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function gn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function rs(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Zo(e,t.from),r=Zo(e,t.to);nl(e,n,r,t.margin)}}function nl(e,t,n,r){var i=qi(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});gn(e,i.scrollLeft,i.scrollTop)}function mn(e,t){Math.abs(e.doc.scrollTop-t)<2||(O||Ki(e,{top:t}),il(e,t,!0),O&&Ki(e),bn(e,100))}function il(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Lr(e,t,n,r){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)&&(e.doc.scrollLeft=t,ul(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Di(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+Kt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Tr=function(e,t,n){this.cm=n;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&F<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Tr.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.scrollTop=0,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}},Tr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Tr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Tr.prototype.zeroWidthHack=function(){var e=z&&!ae?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new xe,this.disableVert=new xe},Tr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";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.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Tr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var yn=function(){};yn.prototype.update=function(){return{bottom:0,right:0}},yn.prototype.setScrollLeft=function(){},yn.prototype.setScrollTop=function(){},yn.prototype.clear=function(){};function Ur(e,t){t||(t=xn(e));var n=e.display.barWidth,r=e.display.barHeight;ol(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Vn(e),ol(e,xn(e)),n=e.display.barWidth,r=e.display.barHeight}function ol(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 ll={native:Tr,null:yn};function al(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ee(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ll[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ve(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"?Lr(e,t):mn(e,t)},e),e.display.scrollbars.addClass&&Oe(e.display.wrapper,e.display.scrollbars.addClass)}var ns=0;function Dr(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:++ns,markArrays:null},Pa(e.curOp)}function Ar(e){var t=e.curOp;t&&za(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;is(n)})}function is(e){for(var t=e.ops,n=0;n<t.length;n++)os(t[n]);for(var r=0;r<t.length;r++)ls(t[r]);for(var i=0;i<t.length;i++)as(t[i]);for(var o=0;o<t.length;o++)ss(t[o]);for(var l=0;l<t.length;l++)us(t[l])}function os(e){var t=e.cm,n=t.display;cs(t),e.updateMaxLine&&Li(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ti(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ls(e){e.updatedDisplay=e.mustUpdate&&ji(e.cm,e.update)}function as(e){var t=e.cm,n=t.display;e.updatedDisplay&&Vn(t),e.barMeasure=xn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=qo(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+Kt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-kr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ss(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Lr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==Le(ie(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&Ui(t,e.barMeasure),e.selectionChanged&&Wi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&tl(e.cm)}function us(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&sl(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&il(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Lr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=es(t,ke(r,e.scrollToPos.from),ke(r,e.scrollToPos.to),e.scrollToPos.margin);$a(t,i)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||_e(o[a],"hide");if(l)for(var s=0;s<l.length;++s)l[s].lines.length&&_e(l[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&_e(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function St(e,t){if(e.curOp)return t();Dr(e);try{return t()}finally{Ar(e)}}function tt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Dr(e);try{return t.apply(e,arguments)}finally{Ar(e)}}}function ht(e){return function(){if(this.curOp)return e.apply(this,arguments);Dr(this);try{return e.apply(this,arguments)}finally{Ar(this)}}}function rt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Dr(t);try{return e.apply(this,arguments)}finally{Ar(t)}}}function bn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,ue(fs,e))}function fs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=un(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 l=o.styles,a=o.text.length>e.options.maxHighlightLength?_t(t.mode,r.state):null,s=vo(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,d=s.classes;d?o.styleClasses=d:u&&(o.styleClasses=null);for(var v=!l||l.length!=o.styles.length||u!=d&&(!u||!d||u.bgClass!=d.bgClass||u.textClass!=d.textClass),y=0;!v&&y<l.length;++y)v=l[y]!=o.styles[y];v&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&yi(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return bn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&St(e,function(){for(var o=0;o<i.length;o++)cr(e,i[o],"text")})}}var ti=function(e,t,n){var r=e.display;this.viewport=t,this.visible=$n(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=kr(e),this.force=n,this.dims=Pi(e),this.events=[]};ti.prototype.signal=function(e,t){wt(e,t)&&this.events.push(arguments)},ti.prototype.finish=function(){for(var e=0;e<this.events.length;e++)_e.apply(null,this.events[e])};function cs(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Kt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Kt(e)+"px",t.scrollbarsClipped=!0)}function hs(e){if(e.hasFocus())return null;var t=Le(ie(e));if(!t||!le(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=Y(e).getSelection();r.anchorNode&&r.extend&&le(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function ds(e){if(!(!e||!e.activeElt||e.activeElt==Le(ye(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&le(document.body,e.anchorNode)&&le(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function ji(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return hr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&$o(e)==0)return!1;fl(e)&&(hr(e),t.dims=Pi(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),Jt&&(o=Si(e.doc,o),l=Fo(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ja(e,o,l),n.viewOffset=Vt(se(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=$o(e);if(!a&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=hs(e);return s>4&&(n.lineDiv.style.display="none"),ps(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ds(u),A(n.cursorDiv),A(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,bn(e,400)),n.updateLineNumbers=null,!0}function sl(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==kr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Di(e.display)-Ai(e),n.top)}),t.visible=$n(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=$n(e.display,e.doc,n));if(!ji(e,t))break;Vn(e);var i=xn(e);vn(e),Ur(e,i),Ui(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 Ki(e,t){var n=new ti(e,t);if(ji(e,n)){Vn(e),sl(e,n);var r=xn(e);vn(e),Ur(e,r),Ui(e,r),n.finish()}}function ps(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(T){var P=T.nextSibling;return k&&z&&e.display.currentWheelTarget==T?T.style.display="none":T.parentNode.removeChild(T),P}for(var s=r.view,u=r.viewFrom,d=0;d<s.length;d++){var v=s[d];if(!v.hidden)if(!v.node||v.node.parentNode!=o){var y=qa(e,v,u,n);o.insertBefore(y,l)}else{for(;l!=v.node;)l=a(l);var x=i&&t!=null&&t<=u&&v.lineNumber;v.changes&&(oe(v.changes,"gutter")>-1&&(x=!1),Po(e,v,u,n)),x&&(A(v.lineNumber),v.lineNumber.appendChild(document.createTextNode(R(e.options,u)))),l=v.node.nextSibling}u+=v.size}for(;l;)l=a(l)}function Gi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",et(e,"gutterChanged",e)}function Ui(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+Kt(e)+"px"}function ul(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Hi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l<n.length;l++)if(!n[l].hidden){e.options.fixedGutter&&(n[l].gutter&&(n[l].gutter.style.left=o),n[l].gutterBackground&&(n[l].gutterBackground.style.left=o));var a=n[l].alignable;if(a)for(var s=0;s<a.length;s++)a[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function fl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=R(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(c("div",[c("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-l)+1,r.lineNumWidth=r.lineNumInnerWidth+l,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Gi(e.display),!0}return!1}function Xi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],l=null;if(typeof o!="string"&&(l=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:o,style:l})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function cl(e){var t=e.gutters,n=e.gutterSpecs;A(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,l=i.style,a=t.appendChild(c("div",null,"CodeMirror-gutter "+o));l&&(a.style.cssText=l),o=="CodeMirror-linenumbers"&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Gi(e)}function kn(e){cl(e.display),mt(e),ul(e)}function vs(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=c("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=c("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=U("div",null,"CodeMirror-code"),i.selectionDiv=c("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=c("div",null,"CodeMirror-cursors"),i.measure=c("div",null,"CodeMirror-measure"),i.lineMeasure=c("div",null,"CodeMirror-measure"),i.lineSpace=U("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=U("div",[i.lineSpace],"CodeMirror-lines");i.mover=c("div",[o],null,"position: relative"),i.sizer=c("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=c("div",null,null,"position: absolute; height: "+Te+"px; width: 1px;"),i.gutters=c("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=c("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=c("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),S&&_>=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),C&&F<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!k&&!(O&&H)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Xi(r.gutters,r.lineNumbers),cl(i),n.init(i)}var ri=0,er=null;C?er=-.53:O?er=15:S?er=-.7:de&&(er=-1/3);function hl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function gs(e){var t=hl(e);return t.x*=er,t.y*=er,t}function dl(e,t){S&&_==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=hl(t),r=n.x,i=n.y,o=er;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(!!(r&&s||i&&u)){if(i&&z&&k){e:for(var d=t.target,v=l.view;d!=a;d=d.parentNode)for(var y=0;y<v.length;y++)if(v[y].node==d){e.display.currentWheelTarget=d;break e}}if(r&&!O&&!G&&o!=null){i&&u&&mn(e,Math.max(0,a.scrollTop+i*o)),Lr(e,Math.max(0,a.scrollLeft+r*o)),(!i||i&&u)&&ut(t),l.wheelStartX=null;return}if(i&&o!=null){var x=i*o,T=e.doc.scrollTop,P=T+l.wrapper.clientHeight;x<0?T=Math.max(0,T+x-50):P=Math.min(e.doc.height,P+x+50),Ki(e,{top:T,bottom:P})}ri<20&&t.deltaMode!==0&&(l.wheelStartX==null?(l.wheelStartX=a.scrollLeft,l.wheelStartY=a.scrollTop,l.wheelDX=r,l.wheelDY=i,setTimeout(function(){if(l.wheelStartX!=null){var q=a.scrollLeft-l.wheelStartX,Z=a.scrollTop-l.wheelStartY,$=Z&&l.wheelDY&&Z/l.wheelDY||q&&l.wheelDX&&q/l.wheelDX;l.wheelStartX=l.wheelStartY=null,$&&(er=(er*ri+$)/(ri+1),++ri)}},200)):(l.wheelDX+=r,l.wheelDY+=i))}}var At=function(e,t){this.ranges=e,this.primIndex=t};At.prototype.primary=function(){return this.ranges[this.primIndex]},At.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!Ne(n.anchor,r.anchor)||!Ne(n.head,r.head))return!1}return!0},At.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Pe($e(this.ranges[t].anchor),$e(this.ranges[t].head));return new At(e,this.primIndex)},At.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},At.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(V(t,r.from())>=0&&V(e,r.to())<=0)return n}return-1};var Pe=function(e,t){this.anchor=e,this.head=t};Pe.prototype.from=function(){return Wr(this.anchor,this.head)},Pe.prototype.to=function(){return gt(this.anchor,this.head)},Pe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function It(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(y,x){return V(y.from(),x.from())}),n=oe(t,i);for(var o=1;o<t.length;o++){var l=t[o],a=t[o-1],s=V(a.to(),l.from());if(r&&!l.empty()?s>0:s>=0){var u=Wr(a.from(),l.from()),d=gt(a.to(),l.to()),v=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new Pe(v?d:u,v?u:d))}}return new At(t,n)}function dr(e,t){return new At([new Pe(e,t||e)],0)}function pr(e){return e.text?L(e.from.line+e.text.length-1,Se(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function pl(e,t){if(V(e,t.from)<0)return e;if(V(e,t.to)<=0)return pr(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+=pr(t).ch-t.to.ch),L(n,r)}function Yi(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Pe(pl(i.anchor,t),pl(i.head,t)))}return It(e.cm,n,e.sel.primIndex)}function vl(e,t,n){return e.line==t.line?L(n.line,e.ch-t.ch+n.ch):L(n.line+(e.line-t.line),e.ch)}function ms(e,t,n){for(var r=[],i=L(e.first,0),o=i,l=0;l<t.length;l++){var a=t[l],s=vl(a.from,i,o),u=vl(pr(a),i,o);if(i=a.to,o=u,n=="around"){var d=e.sel.ranges[l],v=V(d.head,d.anchor)<0;r[l]=new Pe(v?u:s,v?s:u)}else r[l]=new Pe(s,s)}return new At(r,e.sel.primIndex)}function Zi(e){e.doc.mode=Hr(e.options,e.doc.modeOption),wn(e)}function wn(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,bn(e,100),e.state.modeGen++,e.curOp&&mt(e)}function gl(e,t){return t.from.ch==0&&t.to.ch==0&&Se(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Qi(e,t,n,r){function i($){return n?n[$]:null}function o($,Q,re){La($,Q,re,r),et($,"change",$,t)}function l($,Q){for(var re=[],ge=$;ge<Q;++ge)re.push(new Ir(u[ge],i(ge),r));return re}var a=t.from,s=t.to,u=t.text,d=se(e,a.line),v=se(e,s.line),y=Se(u),x=i(u.length-1),T=s.line-a.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(gl(e,t)){var P=l(0,u.length-1);o(v,v.text,x),T&&e.remove(a.line,T),P.length&&e.insert(a.line,P)}else if(d==v)if(u.length==1)o(d,d.text.slice(0,a.ch)+y+d.text.slice(s.ch),x);else{var q=l(1,u.length-1);q.push(new Ir(y+d.text.slice(s.ch),x,r)),o(d,d.text.slice(0,a.ch)+u[0],i(0)),e.insert(a.line+1,q)}else if(u.length==1)o(d,d.text.slice(0,a.ch)+u[0]+v.text.slice(s.ch),i(0)),e.remove(a.line+1,T);else{o(d,d.text.slice(0,a.ch)+u[0],i(0)),o(v,y+v.text.slice(s.ch),x);var Z=l(1,u.length-1);T>1&&e.remove(a.line+1,T-1),e.insert(a.line+1,Z)}et(e,"change",e,t)}function vr(e,t,n){function r(i,o,l){if(i.linked)for(var a=0;a<i.linked.length;++a){var s=i.linked[a];if(s.doc!=o){var u=l&&s.sharedHist;n&&!u||(t(s.doc,u),r(s.doc,i,u))}}}r(e,null,!0)}function ml(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,zi(e),Zi(e),xl(e),e.options.direction=t.direction,e.options.lineWrapping||Li(e),e.options.mode=t.modeOption,mt(e)}function xl(e){(e.doc.direction=="rtl"?Oe:Ee)(e.display.lineDiv,"CodeMirror-rtl")}function xs(e){St(e,function(){xl(e),mt(e)})}function ni(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Ji(e,t){var n={from:$e(t.from),to:pr(t),text:Qt(e,t.from,t.to)};return kl(e,n,t.from.line,t.to.line+1),vr(e,function(r){return kl(r,n,t.from.line,t.to.line+1)},!0),n}function yl(e){for(;e.length;){var t=Se(e);if(t.ranges)e.pop();else break}}function ys(e,t){if(t)return yl(e.done),Se(e.done);if(e.done.length&&!Se(e.done).ranges)return Se(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Se(e.done)}function bl(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,l,a;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)=="*"))&&(l=ys(i,i.lastOp==r)))a=Se(l.changes),V(t.from,t.to)==0&&V(t.from,a.to)==0?a.to=pr(t):l.changes.push(Ji(e,t));else{var s=Se(i.done);for((!s||!s.ranges)&&ii(e.sel,i.done),l={changes:[Ji(e,t)],generation:i.generation},i.done.push(l);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,a||_e(e,"historyAdded")}function bs(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 ks(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||bs(e,o,Se(i.done),t))?i.done[i.done.length-1]=t:ii(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&yl(i.undone)}function ii(e,t){var n=Se(t);n&&n.ranges&&n.equals(e)||t.push(e)}function kl(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(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function ws(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Ss(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(ws(n[i]));return r}function wl(e,t){var n=Ss(e,t),r=ki(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],l=r[i];if(o&&l){e:for(var a=0;a<l.length;++a){for(var s=l[a],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}}else l&&(n[i]=l)}return n}function Xr(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){r.push(n?At.prototype.deepCopy.call(o):o);continue}var l=o.changes,a=[];r.push({changes:a});for(var s=0;s<l.length;++s){var u=l[s],d=void 0;if(a.push({from:u.from,to:u.to,text:u.text}),t)for(var v in u)(d=v.match(/^spans_(\d+)$/))&&oe(t,Number(d[1]))>-1&&(Se(a)[v]=u[v],delete u[v])}}return r}function Vi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=V(t,i)<0;o!=V(n,i)<0?(i=t,t=n):o!=V(t,n)<0&&(t=n)}return new Pe(i,t)}else return new Pe(n||t,t)}function oi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),ft(e,new At([Vi(e.sel.primary(),t,n,i)],0),r)}function Sl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Vi(e.sel.ranges[o],t[o],null,i);var l=It(e.cm,r,e.sel.primIndex);ft(e,l,n)}function $i(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,ft(e,It(e.cm,i,e.sel.primIndex),r)}function Cl(e,t,n,r){ft(e,dr(t,n),r)}function Cs(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new Pe(ke(e,i[o].anchor),ke(e,i[o].head))},origin:n&&n.origin};return _e(e,"beforeSelectionChange",e,r),e.cm&&_e(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?It(e.cm,r.ranges,r.ranges.length-1):t}function Ll(e,t,n){var r=e.history.done,i=Se(r);i&&i.ranges?(r[r.length-1]=t,li(e,t,n)):ft(e,t,n)}function ft(e,t,n){li(e,t,n),ks(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function li(e,t,n){(wt(e,"beforeSelectionChange")||e.cm&&wt(e.cm,"beforeSelectionChange"))&&(t=Cs(e,t,n));var r=n&&n.bias||(V(t.primary().head,e.sel.primary().head)<0?-1:1);Tl(e,Al(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Gr(e.cm)}function Tl(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Mt(e.cm)),et(e,"cursorActivity",e))}function Dl(e){Tl(e,Al(e,e.sel,null,!1))}function Al(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=ai(e,l.anchor,a&&a.anchor,n,r),u=l.head==l.anchor?s:ai(e,l.head,a&&a.head,n,r);(i||s!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Pe(s,u))}return i?It(e.cm,i,t.primIndex):t}function Yr(e,t,n,r,i){var o=se(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var a=o.markedSpans[l],s=a.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,d="selectRight"in s?!s.selectRight:s.inclusiveRight;if((a.from==null||(u?a.from<=t.ch:a.from<t.ch))&&(a.to==null||(d?a.to>=t.ch:a.to>t.ch))){if(i&&(_e(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(n){var v=s.find(r<0?1:-1),y=void 0;if((r<0?d:u)&&(v=Fl(e,v,-r,v&&v.line==t.line?o:null)),v&&v.line==t.line&&(y=V(v,n))&&(r<0?y<0:y>0))return Yr(e,v,t,r,i)}var x=s.find(r<0?-1:1);return(r<0?u:d)&&(x=Fl(e,x,r,x.line==t.line?o:null)),x?Yr(e,x,t,r,i):null}}return t}function ai(e,t,n,r,i){var o=r||1,l=Yr(e,t,n,o,i)||!i&&Yr(e,t,n,o,!0)||Yr(e,t,n,-o,i)||!i&&Yr(e,t,n,-o,!0);return l||(e.cantEdit=!0,L(e.first,0))}function Fl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?ke(e,L(t.line-1)):null:n>0&&t.ch==(r||se(e,t.line)).text.length?t.line<e.first+e.size-1?L(t.line+1,0):null:new L(t.line,t.ch+n)}function Ml(e){e.setSelection(L(e.firstLine(),0),L(e.lastLine()),Je)}function El(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(i,o,l,a){i&&(r.from=ke(e,i)),o&&(r.to=ke(e,o)),l&&(r.text=l),a!==void 0&&(r.origin=a)}),_e(e,"beforeChange",e,r),e.cm&&_e(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Zr(e,t,n){if(e.cm){if(!e.cm.curOp)return tt(e.cm,Zr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((wt(e,"beforeChange")||e.cm&&wt(e.cm,"beforeChange"))&&(t=El(e,t,!0),!t))){var r=wo&&!n&&ka(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Ol(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Ol(e,t)}}function Ol(e,t){if(!(t.text.length==1&&t.text[0]==""&&V(t.from,t.to)==0)){var n=Yi(e,t);bl(e,t,n,e.cm?e.cm.curOp.id:NaN),Sn(e,t,n,ki(e,t));var r=[];vr(e,function(i,o){!o&&oe(r,i.history)==-1&&(zl(i.history,t),r.push(i.history)),Sn(i,t,null,ki(i,t))})}}function si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,l=e.sel,a=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u<a.length&&(o=a[u],!(n?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=a.pop(),o.ranges){if(ii(o,s),n&&!o.equals(e.sel)){ft(e,o,{clearRedo:!1});return}l=o}else if(r){a.push(o);return}else break;var d=[];ii(l,s),s.push({changes:d,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var v=wt(e,"beforeChange")||e.cm&&wt(e.cm,"beforeChange"),y=function(P){var q=o.changes[P];if(q.origin=t,v&&!El(e,q,!1))return a.length=0,{};d.push(Ji(e,q));var Z=P?Yi(e,q):Se(a);Sn(e,q,Z,wl(e,q)),!P&&e.cm&&e.cm.scrollIntoView({from:q.from,to:pr(q)});var $=[];vr(e,function(Q,re){!re&&oe($,Q.history)==-1&&(zl(Q.history,q),$.push(Q.history)),Sn(Q,q,null,wl(Q,q))})},x=o.changes.length-1;x>=0;--x){var T=y(x);if(T)return T.v}}}}function Nl(e,t){if(t!=0&&(e.first+=t,e.sel=new At(Fe(e.sel.ranges,function(i){return new Pe(L(i.anchor.line+t,i.anchor.ch),L(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){mt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)cr(e.cm,r,"gutter")}}function Sn(e,t,n,r){if(e.cm&&!e.cm.curOp)return tt(e.cm,Sn)(e,t,n,r);if(t.to.line<e.first){Nl(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Nl(e,i),t={from:L(e.first,0),to:L(t.to.line+i,t.to.ch),text:[Se(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:L(o,se(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qt(e,t.from,t.to),n||(n=Yi(e,t)),e.cm?Ls(e.cm,t,r):Qi(e,t,r),li(e,n,Je),e.cantEdit&&ai(e,L(e.firstLine(),0))&&(e.cantEdit=!1)}}function Ls(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(Bt(se(r,o.line))),r.iter(s,l.line+1,function(x){if(x==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Mt(e),Qi(r,t,n,Vo(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(x){var T=Gn(x);T>i.maxLineLength&&(i.maxLine=x,i.maxLineLength=T,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),pa(r,o.line),bn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?mt(e):o.line==l.line&&t.text.length==1&&!gl(e.doc,t)?cr(e,o.line,"text"):mt(e,o.line,l.line+1,u);var d=wt(e,"changes"),v=wt(e,"change");if(v||d){var y={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};v&&et(e,"change",e,y),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(y)}e.display.selForContextMenu=null}function Qr(e,t,n,r,i){var o;r||(r=n),V(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Zr(e,{from:n,to:r,text:t,origin:i})}function Pl(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Hl(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var a=0;a<o.ranges.length;a++)Pl(o.ranges[a].anchor,t,n,r),Pl(o.ranges[a].head,t,n,r);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(n<u.from.line)u.from=L(u.from.line+r,u.from.ch),u.to=L(u.to.line+r,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}function zl(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Hl(e.done,n,r,i),Hl(e.undone,n,r,i)}function Cn(e,t,n,r){var i=t,o=t;return typeof t=="number"?o=se(e,ho(e,t)):i=f(t),i==null?null:(r(o,i)&&e.cm&&cr(e.cm,i,n),o)}function Ln(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}Ln.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Ta(i),et(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function Tn(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Tn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),l=r.height;if(r.removeInner(e,o),this.height-=l-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ln))){var a=[];this.collapse(a),this.children=[new Ln(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,a=l;a<i.lines.length;){var s=new Ln(i.lines.slice(a,a+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Tn(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=oe(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new Tn(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,n))return!0;if((t-=l)==0)break;e=0}else e-=o}}};var Dn=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Dn.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=f(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=dn(this);Dt(n,Math.max(0,n.height-o)),e&&(St(e,function(){Bl(e,n,-o),cr(e,r,"widget")}),et(e,"lineWidgetCleared",e,this,r))}},Dn.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=dn(this)-t;!i||(fr(this.doc,r)||Dt(r,r.height+i),n&&St(n,function(){n.curOp.forceUpdate=!0,Bl(n,r,i),et(n,"lineWidgetChanged",n,e,f(r))}))},Ot(Dn);function Bl(e,t,n){Vt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&_i(e,n)}function Ts(e,t,n,r){var i=new Dn(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Cn(e,t,"widget",function(l){var a=l.widgets||(l.widgets=[]);if(i.insertAt==null?a.push(i):a.splice(Math.min(a.length,Math.max(0,i.insertAt)),0,i),i.line=l,o&&!fr(e,l)){var s=Vt(l)<e.scrollTop;Dt(l,l.height+dn(i)),s&&_i(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&et(o,"lineWidgetAdded",o,i,typeof t=="number"?t:f(t)),i}var Wl=0,gr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Wl};gr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Dr(e),wt(this,"clear")){var n=this.find();n&&et(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],a=fn(l.markedSpans,this);e&&!this.collapsed?cr(e,f(l),"text"):e&&(a.to!=null&&(i=f(l)),a.from!=null&&(r=f(l))),l.markedSpans=ma(l.markedSpans,a),a.from==null&&this.collapsed&&!fr(this.doc,l)&&e&&Dt(l,_r(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=Bt(this.lines[s]),d=Gn(u);d>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=d,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&mt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Dl(e.doc)),e&&et(e,"markerCleared",e,this,r,i),t&&Ar(e),this.parent&&this.parent.clear()}},gr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],l=fn(o.markedSpans,this);if(l.from!=null&&(n=L(t?o:f(o),l.from),e==-1))return n;if(l.to!=null&&(r=L(t?o:f(o),l.to),e==1))return r}return n&&{from:n,to:r}},gr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||St(r,function(){var i=t.line,o=f(t.line),l=Fi(r,o);if(l&&(Ko(l),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!fr(n.doc,i)&&n.height!=null){var a=n.height;n.height=null;var s=dn(n)-a;s&&Dt(i,i.height+s)}et(r,"markerChanged",r,e)})},gr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||oe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},gr.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ot(gr);function Jr(e,t,n,r,i){if(r&&r.shared)return Ds(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return tt(e.cm,Jr)(e,t,n,r,i);var o=new gr(e,i),l=V(t,n);if(r&&be(r,o,!1),l>0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=U("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ao(e,t.line,t,n,o)||t.line!=n.line&&Ao(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");ga()}o.addToHistory&&bl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,n.line+1,function(v){s&&o.collapsed&&!s.options.lineWrapping&&Bt(v)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Dt(v,0),xa(v,new qn(o,a==t.line?t.ch:null,a==n.line?n.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,n.line+1,function(v){fr(e,v)&&Dt(v,0)}),o.clearOnEnter&&ve(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(va(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Wl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)mt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var d=t.line;d<=n.line;d++)cr(s,d,"text");o.atomic&&Dl(s.doc),et(s,"markerAdded",s,o)}return o}var An=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};An.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();et(this,"clear")}},An.prototype.find=function(e,t){return this.primary.find(e,t)},Ot(An);function Ds(e,t,n,r,i){r=be(r),r.shared=!1;var o=[Jr(e,t,n,r,i)],l=o[0],a=r.widgetNode;return vr(e,function(s){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Jr(s,ke(s,t),ke(s,n),r,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;l=Se(o)}),new An(o,l)}function Il(e){return e.findMarks(L(e.first,0),e.clipPos(L(e.lastLine())),function(t){return t.parent})}function As(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(V(o,l)){var a=Jr(e,o,l,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}function Fs(e){for(var t=function(r){var i=e[r],o=[i.primary.doc];vr(i.primary.doc,function(s){return o.push(s)});for(var l=0;l<i.markers.length;l++){var a=i.markers[l];oe(o,a.doc)==-1&&(a.parent=null,i.markers.splice(l--,1))}},n=0;n<e.length;n++)t(n)}var Ms=0,xt=function(e,t,n,r,i){if(!(this instanceof xt))return new xt(e,t,n,r,i);n==null&&(n=0),Tn.call(this,[new Ln([new Ir("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=L(n,0);this.sel=dr(o),this.history=new ni(null),this.id=++Ms,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Qi(this,{from:o,to:o,text:e}),ft(this,dr(o),Je)};xt.prototype=M(Tn.prototype,{constructor:xt,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=sn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:rt(function(e){var t=L(this.first,0),n=this.first+this.size-1;Zr(this,{from:t,to:L(n,se(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&gn(this.cm,0,0),ft(this,dr(t),Je)}),replaceRange:function(e,t,n,r){t=ke(this,t),n=n?ke(this,n):t,Qr(this,e,t,n,r)},getRange:function(e,t,n){var r=Qt(this,ke(this,e),ke(this,t));return n===!1?r:n===""?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(N(this,e))return se(this,e)},getLineNumber:function(e){return f(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=se(this,e)),Bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ke(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:rt(function(e,t,n){Cl(this,ke(this,typeof e=="number"?L(e,t||0):e),null,n)}),setSelection:rt(function(e,t,n){Cl(this,ke(this,e),ke(this,t||e),n)}),extendSelection:rt(function(e,t,n){oi(this,ke(this,e),t&&ke(this,t),n)}),extendSelections:rt(function(e,t){Sl(this,po(this,e),t)}),extendSelectionsBy:rt(function(e,t){var n=Fe(this.sel.ranges,e);Sl(this,po(this,n),t)}),setSelections:rt(function(e,t,n){if(!!e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Pe(ke(this,e[i].anchor),ke(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),ft(this,It(this.cm,r,t),n)}}),addSelection:rt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Pe(ke(this,e),ke(this,t||e))),ft(this,It(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=Qt(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Qt(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:rt(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];r[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&t!="end"&&ms(this,r,t),s=r.length-1;s>=0;s--)Zr(this,r[s]);a?Ll(this,a):this.cm&&Gr(this.cm)}),undo:rt(function(){si(this,"undo")}),redo:rt(function(){si(this,"redo")}),undoSelection:rt(function(){si(this,"undo",!0)}),redoSelection:rt(function(){si(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.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new ni(this.history),vr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Xr(this.history.done),undone:Xr(this.history.undone)}},setHistory:function(e){var t=this.history=new ni(this.history);t.done=Xr(e.done.slice(0),null,!0),t.undone=Xr(e.undone.slice(0),null,!0)},setGutterMarker:rt(function(e,t,n){return Cn(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&zn(i)&&(r.gutterMarkers=null),!0})}),clearGutter:rt(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Cn(t,n,"gutter",function(){return n.gutterMarkers[e]=null,zn(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!N(this,e)||(t=e,e=se(this,e),!e))return null}else if(t=f(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:rt(function(e,t,n){return Cn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(B(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:rt(function(e,t,n){return Cn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=r[i];if(o)if(n==null)r[i]=null;else{var l=o.match(B(n));if(!l)return!1;var a=l.index+l[0].length;r[i]=o.slice(0,l.index)+(!l.index||a==o.length?"":" ")+o.slice(a)||null}else return!1;return!0})}),addLineWidget:rt(function(e,t,n){return Ts(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Jr(this,ke(this,e),ke(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ke(this,e),Jr(this,e,e,n,"bookmark")},findMarksAt:function(e){e=ke(this,e);var t=[],n=se(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ke(this,e),t=ke(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a<l.length;a++){var s=l[a];!(s.to!=null&&i==e.line&&e.ch>=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),ke(this,L(n,t))},indexFromPos:function(e){e=ke(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+n}),t},copy:function(e){var t=new xt(sn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new xt(sn(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],As(r,Il(this)),r},unlinkDoc:function(e){if(e instanceof Ie&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Fs(Il(this));break}}if(e.history==this.history){var r=[e.id];vr(e,function(i){return r.push(i.id)},!0),e.history=new ni(null),e.history.done=Xr(this.history.done,r),e.history.undone=Xr(this.history.undone,r)}},iterLinkedDocs:function(e){vr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Et(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:rt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&xs(this.cm))})}),xt.prototype.eachLine=xt.prototype.iter;var Rl=0;function Es(e){var t=this;if(ql(t),!(je(t,e)||$t(t.display,e))){ut(e),C&&(Rl=+new Date);var n=Sr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,a=function(){++l==i&&tt(t,function(){n=ke(t.doc,n);var x={from:n,to:n,text:t.doc.splitLines(o.filter(function(T){return T!=null}).join(t.doc.lineSeparator())),origin:"paste"};Zr(t.doc,x),Ll(t.doc,dr(ke(t.doc,n),ke(t.doc,pr(x))))})()},s=function(x,T){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,x.type)==-1){a();return}var P=new FileReader;P.onerror=function(){return a()},P.onload=function(){var q=P.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(q)){a();return}o[T]=q,a()},P.readAsText(x)},u=0;u<r.length;u++)s(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var d=e.dataTransfer.getData("Text");if(d){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,dr(n,n)),v)for(var y=0;y<v.length;++y)Qr(t.doc,"",v[y].anchor,v[y].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch{}}}}function Os(e,t){if(C&&(!e.state.draggingText||+new Date-Rl<100)){lr(t);return}if(!(je(e,t)||$t(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!de)){var n=c("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",G&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),G&&n.parentNode.removeChild(n)}}function Ns(e,t){var n=Sr(e,t);if(!!n){var r=document.createDocumentFragment();Bi(e,n,r),e.display.dragCursor||(e.display.dragCursor=c("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),X(e.display.dragCursor,r)}}function ql(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function _l(e){if(!!document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var o=0;o<n.length;o++)e(n[o])})}}var jl=!1;function Ps(){jl||(Hs(),jl=!0)}function Hs(){var e;ve(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,_l(zs)},100))}),ve(window,"blur",function(){return _l(Kr)})}function zs(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var mr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Fn=0;Fn<10;Fn++)mr[Fn+48]=mr[Fn+96]=String(Fn);for(var ui=65;ui<=90;ui++)mr[ui]=String.fromCharCode(ui);for(var Mn=1;Mn<=12;Mn++)mr[Mn+111]=mr[Mn+63235]="F"+Mn;var tr={};tr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},tr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},tr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},tr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},tr.default=z?tr.macDefault:tr.pcDefault;function Bs(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,l=0;l<t.length-1;l++){var a=t[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else if(/^s(hift)?$/i.test(a))i=!0;else throw new Error("Unrecognized modifier name: "+a)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Ws(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r=="..."){delete e[n];continue}for(var i=Fe(n.split(" "),Bs),o=0;o<i.length;o++){var l=void 0,a=void 0;o==i.length-1?(a=i.join(" "),l=r):(a=i.slice(0,o+1).join(" "),l="...");var s=t[a];if(!s)t[a]=l;else if(s!=l)throw new Error("Inconsistent bindings for "+a)}delete e[n]}for(var u in t)e[u]=t[u];return e}function Vr(e,t,n,r){t=fi(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&n(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Vr(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var l=Vr(e,t.fallthrough[o],n,r);if(l)return l}}}function Kl(e){var t=typeof e=="string"?e:mr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Gl(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(pe?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(pe?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function Ul(e,t){if(G&&e.keyCode==34&&e.char)return!1;var n=mr[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),Gl(n,e,t))}function fi(e){return typeof e=="string"?tr[e]:e}function $r(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&V(o.from,Se(r).to)<=0;){var l=r.pop();if(V(l.from,o.from)<0){o.from=l.from;break}}r.push(o)}St(e,function(){for(var a=r.length-1;a>=0;a--)Qr(e.doc,"",r[a].from,r[a].to,"+delete");Gr(e)})}function eo(e,t,n){var r=nr(e.text,t+n,n);return r<0||r>e.text.length?null:r}function to(e,t,n){var r=eo(e,t.ch,n);return r==null?null:new L(t.line,r,n<0?"after":"before")}function ro(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Ae(n,t.doc.direction);if(o){var l=i<0?Se(o):o[0],a=i<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var d=qr(t,n);u=i<0?n.text.length-1:0;var v=Gt(t,d,u).top;u=qt(function(y){return Gt(t,d,y).top==v},i<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=eo(n,u,1))}else u=i<0?l.to:l.from;return new L(r,u,s)}}return new L(r,i<0?n.text.length:0,i<0?"before":"after")}function Is(e,t,n,r){var i=Ae(t,e.doc.direction);if(!i)return to(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=or(i,n.ch,n.sticky),l=i[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from<n.ch))return to(t,n,r);var a=function(Z,$){return eo(t,Z instanceof L?Z.ch:Z,$)},s,u=function(Z){return e.options.lineWrapping?(s=s||qr(e,t),Jo(e,t,s,Z)):{begin:0,end:t.text.length}},d=u(n.sticky=="before"?a(n,-1):n.ch);if(e.doc.direction=="rtl"||l.level==1){var v=l.level==1==r<0,y=a(n,v?1:-1);if(y!=null&&(v?y<=l.to&&y<=d.end:y>=l.from&&y>=d.begin)){var x=v?"before":"after";return new L(n.line,y,x)}}var T=function(Z,$,Q){for(var re=function(Be,nt){return nt?new L(n.line,a(Be,1),"before"):new L(n.line,Be,"after")};Z>=0&&Z<i.length;Z+=$){var ge=i[Z],he=$>0==(ge.level!=1),Ce=he?Q.begin:a(Q.end,-1);if(ge.from<=Ce&&Ce<ge.to||(Ce=he?ge.from:a(ge.to,-1),Q.begin<=Ce&&Ce<Q.end))return re(Ce,he)}},P=T(o+r,r,d);if(P)return P;var q=r>0?d.end:a(d.begin,-1);return q!=null&&!(r>0&&q==t.text.length)&&(P=T(r>0?0:i.length-1,r,u(q)),P)?P:null}var En={selectAll:Ml,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Je)},killLine:function(e){return $r(e,function(t){if(t.empty()){var n=se(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:L(t.head.line+1,0)}:{from:t.head,to:L(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return $r(e,function(t){return{from:L(t.from().line,0),to:ke(e.doc,L(t.to().line+1,0))}})},delLineLeft:function(e){return $r(e,function(t){return{from:L(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return $r(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return $r(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(L(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(L(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Xl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Yl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Rs(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},De)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},De)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Yl(e,t.head):r},De)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),l=we(e.getLine(o.line),o.ch,r);t.push(ot(r-l%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return St(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(!!t[r].empty()){var i=t[r].head,o=se(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new L(i.line,i.ch-1)),i.ch>0)i=new L(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),L(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=se(e.doc,i.line-1).text;l&&(i=new L(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),L(i.line-1,l.length-1),i,"+transpose"))}}n.push(new Pe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return St(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;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Gr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xl(e,t){var n=se(e.doc,t),r=Bt(n);return r!=n&&(t=f(r)),ro(!0,e,r,t,1)}function Rs(e,t){var n=se(e.doc,t),r=Sa(n);return r!=n&&(t=f(r)),ro(!0,e,n,t,-1)}function Yl(e,t){var n=Xl(e,t.line),r=se(e.doc,n.line),i=Ae(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return L(n.line,l?0:o,n.sticky)}return n}function ci(e,t,n){if(typeof t=="string"&&(t=En[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=We}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function qs(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Vr(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Vr(t,e.options.extraKeys,n,e)||Vr(t,e.options.keyMap,n,e)}var _s=new xe;function On(e,t,n,r){var i=e.state.keySeq;if(i){if(Kl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:_s.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Zl(e,i+" "+t,n,r))return!0}return Zl(e,t,n,r)}function Zl(e,t,n,r){var i=qs(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&et(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(ut(n),Wi(e)),!!i}function Ql(e,t){var n=Ul(t,!0);return n?t.shiftKey&&!e.state.keySeq?On(e,"Shift-"+n,t,function(r){return ci(e,r,!0)})||On(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ci(e,r)}):On(e,n,t,function(r){return ci(e,r)}):!1}function js(e,t,n){return On(e,"'"+n+"'",t,function(r){return ci(e,r,!0)})}var no=null;function Jl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=Le(ie(t)),!je(t,e))){C&&F<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Ql(t,e);G&&(no=r?n:null,!r&&n==88&&!In&&(z?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),O&&!z&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ks(t)}}function Ks(e){var t=e.display.lineDiv;Oe(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(Ee(t,"CodeMirror-crosshair"),st(document,"keyup",n),st(document,"mouseover",n))}ve(document,"keyup",n),ve(document,"mouseover",n)}function Vl(e){e.keyCode==16&&(this.doc.sel.shift=!1),je(this,e)}function $l(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!($t(t.display,e)||je(t,e)||e.ctrlKey&&!e.altKey||z&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(G&&n==no){no=null,ut(e);return}if(!(G&&(!e.which||e.which<10)&&Ql(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(js(t,e,i)||t.display.input.onKeyPress(e))}}}var Gs=400,io=function(e,t,n){this.time=e,this.pos=t,this.button=n};io.prototype.compare=function(e,t,n){return this.time+Gs>e&&V(t,this.pos)==0&&n==this.button};var Nn,Pn;function Us(e,t){var n=+new Date;return Pn&&Pn.compare(n,e,t)?(Nn=Pn=null,"triple"):Nn&&Nn.compare(n,e,t)?(Pn=new io(n,e,t),Nn=null,"double"):(Nn=new io(n,e,t),Pn=null,"single")}function ea(e){var t=this,n=t.display;if(!(je(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,$t(n,e)){k||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!oo(t,e)){var r=Sr(t,e),i=Nt(e),o=r?Us(r,i):"single";Y(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Xs(t,i,r,o,e))&&(i==1?r?Zs(t,r,o,e):on(e)==n.scroller&&ut(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(ce?t.display.input.onContextMenu(e):Ii(t)))}}}function Xs(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,On(e,Gl(o,i),i,function(l){if(typeof l=="string"&&(l=En[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=We}finally{e.state.suppressEdits=!1}return a})}function Ys(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=ee?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=z?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(z?n.altKey:n.ctrlKey)),i}function Zs(e,t,n,r){C?setTimeout(ue(tl,e),0):e.curOp.focus=Le(ie(e));var i=Ys(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&mi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(V((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(V(l.to(),t)>0||t.xRel<0)?Qs(e,r,t,i):Js(e,r,t,i)}function Qs(e,t,n,r){var i=e.display,o=!1,l=tt(e,function(u){k&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Ii(e)),st(i.wrapper.ownerDocument,"mouseup",l),st(i.wrapper.ownerDocument,"mousemove",a),st(i.scroller,"dragstart",s),st(i.scroller,"drop",l),o||(ut(u),r.addNew||oi(e.doc,n,null,null,r.extend),k&&!de||C&&F==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};k&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,ve(i.wrapper.ownerDocument,"mouseup",l),ve(i.wrapper.ownerDocument,"mousemove",a),ve(i.scroller,"dragstart",s),ve(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ta(e,t,n){if(n=="char")return new Pe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Pe(L(t.line,0),ke(e.doc,L(t.line+1,0)));var r=n(e,t);return new Pe(r.from,r.to)}function Js(e,t,n,r){C&&Ii(e);var i=e.display,o=e.doc;ut(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(n),a>-1?l=u[a]:l=new Pe(n,n)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new Pe(n,n)),n=Sr(e,t,!0,!0),a=-1;else{var d=ta(e,n,r.unit);r.extend?l=Vi(l,d.anchor,d.head,r.extend):l=d}r.addNew?a==-1?(a=u.length,ft(o,It(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(ft(o,It(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):$i(o,a,l,pt):(a=0,ft(o,new At([l],0),pt),s=o.sel);var v=n;function y(Q){if(V(v,Q)!=0)if(v=Q,r.unit=="rectangle"){for(var re=[],ge=e.options.tabSize,he=we(se(o,n.line).text,n.ch,ge),Ce=we(se(o,Q.line).text,Q.ch,ge),Be=Math.min(he,Ce),nt=Math.max(he,Ce),qe=Math.min(n.line,Q.line),Ct=Math.min(e.lastLine(),Math.max(n.line,Q.line));qe<=Ct;qe++){var yt=se(o,qe).text,Ze=ze(yt,Be,ge);Be==nt?re.push(new Pe(L(qe,Ze),L(qe,Ze))):yt.length>Ze&&re.push(new Pe(L(qe,Ze),L(qe,ze(yt,nt,ge))))}re.length||re.push(new Pe(n,n)),ft(o,It(e,s.ranges.slice(0,a).concat(re),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Q)}else{var bt=l,lt=ta(e,Q,r.unit),Ve=bt.anchor,Qe;V(lt.anchor,Ve)>0?(Qe=lt.head,Ve=Wr(bt.from(),lt.anchor)):(Qe=lt.anchor,Ve=gt(bt.to(),lt.head));var Ge=s.ranges.slice(0);Ge[a]=Vs(e,new Pe(ke(o,Ve),Qe)),ft(o,It(e,Ge,a),pt)}}var x=i.wrapper.getBoundingClientRect(),T=0;function P(Q){var re=++T,ge=Sr(e,Q,!0,r.unit=="rectangle");if(!!ge)if(V(ge,v)!=0){e.curOp.focus=Le(ie(e)),y(ge);var he=$n(i,o);(ge.line>=he.to||ge.line<he.from)&&setTimeout(tt(e,function(){T==re&&P(Q)}),150)}else{var Ce=Q.clientY<x.top?-20:Q.clientY>x.bottom?20:0;Ce&&setTimeout(tt(e,function(){T==re&&(i.scroller.scrollTop+=Ce,P(Q))}),50)}}function q(Q){e.state.selectingText=!1,T=1/0,Q&&(ut(Q),i.input.focus()),st(i.wrapper.ownerDocument,"mousemove",Z),st(i.wrapper.ownerDocument,"mouseup",$),o.history.lastSelOrigin=null}var Z=tt(e,function(Q){Q.buttons===0||!Nt(Q)?q(Q):P(Q)}),$=tt(e,q);e.state.selectingText=$,ve(i.wrapper.ownerDocument,"mousemove",Z),ve(i.wrapper.ownerDocument,"mouseup",$)}function Vs(e,t){var n=t.anchor,r=t.head,i=se(e.doc,n.line);if(V(n,r)==0&&n.sticky==r.sticky)return t;var o=Ae(i);if(!o)return t;var l=or(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s=l+(a.from==n.ch==(a.level!=1)?0:1);if(s==0||s==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 d=or(o,r.ch,r.sticky),v=d-l||(r.ch-n.ch)*(a.level==1?-1:1);d==s-1||d==s?u=v<0:u=v>0}var y=o[s+(u?-1:0)],x=u==(y.level==1),T=x?y.from:y.to,P=x?"after":"before";return n.ch==T&&n.sticky==P?t:new Pe(new L(n.line,T,P),r)}function ra(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{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ut(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!wt(e,n))return vt(t);o-=a.top-l.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=l.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var d=p(e.doc,o),v=e.display.gutterSpecs[s];return _e(e,n,e,d,v.className,t),vt(t)}}}function oo(e,t){return ra(e,t,"gutterClick",!0)}function na(e,t){$t(e.display,t)||$s(e,t)||je(e,t,"contextmenu")||ce||e.display.input.onContextMenu(t)}function $s(e,t){return wt(e,"gutterContextMenu")?ra(e,t,"gutterContextMenu",!1):!1}function ia(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pn(e)}var en={toString:function(){return"CodeMirror.Init"}},oa={},hi={};function eu(e){var t=e.optionHandlers;function n(r,i,o,l){e.defaults[r]=i,o&&(t[r]=l?function(a,s,u){u!=en&&o(a,s,u)}:o)}e.defineOption=n,e.Init=en,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Zi(r)},!0),n("indentUnit",2,Zi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){wn(r),pn(r),mt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var d=s.text.indexOf(i,u);if(d==-1)break;u=d+i.length,o.push(L(l,d))}l++});for(var a=o.length-1;a>=0;a--)Qr(r.doc,i,o[a],L(o[a].line,o[a].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=en&&r.refresh()}),n("specialCharPlaceholder",Fa,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",H?"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",!fe),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){ia(r),kn(r)},!0),n("keyMap","default",function(r,i,o){var l=fi(i),a=o!=en&&fi(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ru,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Xi(i,r.options.lineNumbers),kn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Hi(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Ur(r)},!0),n("scrollbarStyle","native",function(r){al(r),Ur(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=Xi(r.options.gutters,i),kn(r)},!0),n("firstLineNumber",1,kn,!0),n("lineNumberFormatter",function(r){return r},kn,!0),n("showCursorWhenSelecting",!1,vn,!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,tu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vn,!0),n("singleCursorHeightPerLine",!0,vn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,wn,!0),n("addModeClass",!1,wn,!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,wn,!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 tu(e,t,n){var r=n&&n!=en;if(!t!=!r){var i=e.display.dragFunctions,o=t?ve:st;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 ru(e){e.options.lineWrapping?(Oe(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ee(e.display.wrapper,"CodeMirror-wrap"),Li(e)),zi(e),mt(e),pn(e),setTimeout(function(){return Ur(e)},100)}function Ie(e,t){var n=this;if(!(this instanceof Ie))return new Ie(e,t);this.options=t=t?be(t):{},be(oa,t,!1);var r=t.value;typeof r=="string"?r=new xt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ie.inputStyles[t.inputStyle](this),o=this.display=new vs(e,r,i,t);o.wrapper.CodeMirror=this,ia(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),al(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 xe,keySeq:null,specialChars:null},t.autofocus&&!H&&o.input.focus(),C&&F<11&&setTimeout(function(){return n.display.input.reset(!0)},20),nu(this),Ps(),Dr(this),this.curOp.forceUpdate=!0,ml(this,r),t.autofocus&&!H||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Ri(n)},20):Kr(this);for(var l in hi)hi.hasOwnProperty(l)&&hi[l](this,t[l],en);fl(this),t.finishInit&&t.finishInit(this);for(var a=0;a<lo.length;++a)lo[a](this);Ar(this),k&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Ie.defaults=oa,Ie.optionHandlers=hi;function nu(e){var t=e.display;ve(t.scroller,"mousedown",tt(e,ea)),C&&F<11?ve(t.scroller,"dblclick",tt(e,function(s){if(!je(e,s)){var u=Sr(e,s);if(!(!u||oo(e,s)||$t(e.display,s))){ut(s);var d=e.findWordAt(u);oi(e.doc,d.anchor,d.head)}}})):ve(t.scroller,"dblclick",function(s){return je(e,s)||ut(s)}),ve(t.scroller,"contextmenu",function(s){return na(e,s)}),ve(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||na(e,s)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function o(s){if(s.touches.length!=1)return!1;var u=s.touches[0];return u.radiusX<=1&&u.radiusY<=1}function l(s,u){if(u.left==null)return!0;var d=u.left-s.left,v=u.top-s.top;return d*d+v*v>20*20}ve(t.scroller,"touchstart",function(s){if(!je(e,s)&&!o(s)&&!oo(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),ve(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ve(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!$t(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var d=e.coordsChar(t.activeTouch,"page"),v;!u.prev||l(u,u.prev)?v=new Pe(d,d):!u.prev.prev||l(u,u.prev.prev)?v=e.findWordAt(d):v=new Pe(L(d.line,0),ke(e.doc,L(d.line+1,0))),e.setSelection(v.anchor,v.head),e.focus(),ut(s)}i()}),ve(t.scroller,"touchcancel",i),ve(t.scroller,"scroll",function(){t.scroller.clientHeight&&(mn(e,t.scroller.scrollTop),Lr(e,t.scroller.scrollLeft,!0),_e(e,"scroll",e))}),ve(t.scroller,"mousewheel",function(s){return dl(e,s)}),ve(t.scroller,"DOMMouseScroll",function(s){return dl(e,s)}),ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){je(e,s)||lr(s)},over:function(s){je(e,s)||(Ns(e,s),lr(s))},start:function(s){return Os(e,s)},drop:tt(e,Es),leave:function(s){je(e,s)||ql(e)}};var a=t.input.getField();ve(a,"keyup",function(s){return Vl.call(e,s)}),ve(a,"keydown",tt(e,Jl)),ve(a,"keypress",tt(e,$l)),ve(a,"focus",function(s){return Ri(e,s)}),ve(a,"blur",function(s){return Kr(e,s)})}var lo=[];Ie.defineInitHook=function(e){return lo.push(e)};function Hn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=un(e,t).state:n="prev");var l=e.options.tabSize,a=se(i,t),s=we(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],d;if(!r&&!/\S/.test(a.text))d=0,n="not";else if(n=="smart"&&(d=i.mode.indent(o,a.text.slice(u.length),a.text),d==We||d>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?d=we(se(i,t-1).text,null,l):d=0:n=="add"?d=s+e.options.indentUnit:n=="subtract"?d=s-e.options.indentUnit:typeof n=="number"&&(d=s+n),d=Math.max(0,d);var v="",y=0;if(e.options.indentWithTabs)for(var x=Math.floor(d/l);x;--x)y+=l,v+=" ";if(y<d&&(v+=ot(d-y)),v!=u)return Qr(i,v,L(t,0),L(t,u.length),"+input"),a.stateAfter=null,!0;for(var T=0;T<i.sel.ranges.length;T++){var P=i.sel.ranges[T];if(P.head.line==t&&P.head.ch<u.length){var q=L(t,u.length);$i(i,T,new Pe(q,q));break}}}var Rt=null;function di(e){Rt=e}function ao(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var l=+new Date-200,a=i=="paste"||e.state.pasteIncoming>l,s=Et(t),u=null;if(a&&r.ranges.length>1)if(Rt&&Rt.text.join(`
`)==t){if(r.ranges.length%Rt.text.length==0){u=[];for(var d=0;d<Rt.text.length;d++)u.push(o.splitLines(Rt.text[d]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Fe(s,function(Z){return[Z]}));for(var v=e.curOp.updateInput,y=r.ranges.length-1;y>=0;y--){var x=r.ranges[y],T=x.from(),P=x.to();x.empty()&&(n&&n>0?T=L(T.line,T.ch-n):e.state.overwrite&&!a?P=L(P.line,Math.min(se(o,P.line).text.length,P.ch+Se(s).length)):a&&Rt&&Rt.lineWise&&Rt.text.join(`
`)==s.join(`
`)&&(T=P=L(T.line,0)));var q={from:T,to:P,text:u?u[y%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Zr(e.doc,q),et(e,"inputRead",e,q)}t&&!a&&aa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function la(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&St(t,function(){return ao(t,n,0,null,"paste")}),!0}function aa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))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)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=Hn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(se(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Hn(e,i.head.line,"smart"));l&&et(e,"electricInput",e,i.head.line)}}}function sa(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:L(i,0),head:L(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function so(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function ua(){var e=c("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=c("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return k?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),t}function iu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){Y(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,l=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&&tt(this,t[r])(this,i,l),_e(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](fi(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:ht(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");w(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,mt(this)}),removeOverlay:ht(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var l=i[o].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(o,1),this.state.modeGen++,mt(this);return}}}),indentLine:ht(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),N(this.doc,r)&&Hn(this,r,i,o)}),indentSelection:ht(function(r){for(var i=this.doc.sel.ranges,o=-1,l=0;l<i.length;l++){var a=i[l];if(a.empty())a.head.line>o&&(Hn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),d=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=d;v<o;++v)Hn(this,v,r);var y=this.doc.sel.ranges;s.ch==0&&i.length==y.length&&y[l].from().ch>0&&$i(this.doc,l,new Pe(s,y[l].to()),Je)}}}),getTokenAt:function(r,i){return yo(this,r,i)},getLineTokens:function(r,i){return yo(this,L(r),i,!0)},getTokenTypeAt:function(r){r=ke(this.doc,r);var i=go(this,se(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]<a)o=u+1;else{s=i[u*2+2];break}}var d=s?s.indexOf("overlay "):-1;return d<0?s:d==0?null:s.slice(0,d-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var l=n[i],a=this.getModeAt(r);if(typeof a[i]=="string")l[a[i]]&&o.push(l[a[i]]);else if(a[i])for(var s=0;s<a[i].length;s++){var u=l[a[i][s]];u&&o.push(u)}else a.helperType&&l[a.helperType]?o.push(l[a.helperType]):l[a.name]&&o.push(l[a.name]);for(var d=0;d<l._global.length;d++){var v=l._global[d];v.pred(a,this)&&oe(o,v.val)==-1&&o.push(v.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=ho(o,r==null?o.first+o.size-1:r),un(this,r+1,i).state},cursorCoords:function(r,i){var o,l=this.doc.sel.primary();return r==null?o=l.head:typeof r=="object"?o=ke(this.doc,r):o=r?l.from():l.to(),Wt(this,o,i||"page")},charCoords:function(r,i){return Zn(this,ke(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Yo(this,r,i||"page"),Oi(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Yo(this,{top:r,left:0},i||"page").top,p(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,o){var l=!1,a;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>s&&(r=s,l=!0),a=se(this.doc,r)}else a=r;return Yn(this,a,{top:0,left:0},i||"page",o||l).top+(l?this.doc.height-Vt(a):0)},defaultTextHeight:function(){return _r(this.display)},defaultCharWidth:function(){return jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,l,a){var s=this.display;r=Wt(this,ke(this.doc,r));var u=r.bottom,d=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),l=="over")u=r.top;else if(l=="above"||l=="near"){var v=Math.max(s.wrapper.clientHeight,this.doc.height),y=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>v)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=v&&(u=r.bottom),d+i.offsetWidth>y&&(d=y-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",a=="right"?(d=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(a=="left"?d=0:a=="middle"&&(d=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=d+"px"),o&&ts(this,{left:d,top:u,right:d+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:ht(Jl),triggerOnKeyPress:ht($l),triggerOnKeyUp:Vl,triggerOnMouseDown:ht(ea),execCommand:function(r){if(En.hasOwnProperty(r))return En[r].call(null,this)},triggerElectric:ht(function(r){aa(this,r)}),findPosH:function(r,i,o,l){var a=1;i<0&&(a=-1,i=-i);for(var s=ke(this.doc,r),u=0;u<i&&(s=uo(this.doc,s,a,o,l),!s.hitSide);++u);return s},moveH:ht(function(r,i){var o=this;this.extendSelectionsBy(function(l){return o.display.shift||o.doc.extend||l.empty()?uo(o.doc,l.head,r,i,o.options.rtlMoveVisually):r<0?l.from():l.to()},De)}),deleteH:ht(function(r,i){var o=this.doc.sel,l=this.doc;o.somethingSelected()?l.replaceSelection("",null,"+delete"):$r(this,function(a){var s=uo(l,a.head,r,i,!1);return r<0?{from:s,to:a.head}:{from:a.head,to:s}})}),findPosV:function(r,i,o,l){var a=1,s=l;i<0&&(a=-1,i=-i);for(var u=ke(this.doc,r),d=0;d<i;++d){var v=Wt(this,u,"div");if(s==null?s=v.left:v.left=s,u=fa(this,v,a,o),u.hitSide)break}return u},moveV:ht(function(r,i){var o=this,l=this.doc,a=[],s=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(d){if(s)return r<0?d.from():d.to();var v=Wt(o,d.head,"div");d.goalColumn!=null&&(v.left=d.goalColumn),a.push(v.left);var y=fa(o,v,r,i);return i=="page"&&d==l.sel.primary()&&_i(o,Zn(o,y,"div").top-v.top),y},De),a.length)for(var u=0;u<l.sel.ranges.length;u++)l.sel.ranges[u].goalColumn=a[u]}),findWordAt:function(r){var i=this.doc,o=se(i,r.line).text,l=r.ch,a=r.ch;if(o){var s=this.getHelper(r,"wordChars");(r.sticky=="before"||a==o.length)&&l?--l:++a;for(var u=o.charAt(l),d=Xt(u,s)?function(v){return Xt(v,s)}:/\s/.test(u)?function(v){return/\s/.test(v)}:function(v){return!/\s/.test(v)&&!Xt(v)};l>0&&d(o.charAt(l-1));)--l;for(;a<o.length&&d(o.charAt(a));)++a}return new Pe(L(r.line,l),L(r.line,a))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Oe(this.display.cursorDiv,"CodeMirror-overwrite"):Ee(this.display.cursorDiv,"CodeMirror-overwrite"),_e(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Le(ie(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ht(function(r,i){gn(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-Kt(this)-this.display.barHeight,width:r.scrollWidth-Kt(this)-this.display.barWidth,clientHeight:Ai(this),clientWidth:kr(this)}},scrollIntoView:ht(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:L(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=i||0,r.from.line!=null?rs(this,r):nl(this,r.from,r.to,r.margin)}),setSize:ht(function(r,i){var o=this,l=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=l(r)),i!=null&&(this.display.wrapper.style.height=l(i)),this.options.lineWrapping&&Go(this);var a=this.display.viewFrom;this.doc.iter(a,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){cr(o,a,"widget");break}}++a}),this.curOp.forceUpdate=!0,_e(this,"refresh",this)}),operation:function(r){return St(this,r)},startOperation:function(){return Dr(this)},endOperation:function(){return Ar(this)},refresh:ht(function(){var r=this.display.cachedTextHeight;mt(this),this.curOp.forceUpdate=!0,pn(this),gn(this,this.doc.scrollLeft,this.doc.scrollTop),Gi(this.display),(r==null||Math.abs(r-_r(this.display))>.5||this.options.lineWrapping)&&zi(this),_e(this,"refresh",this)}),swapDoc:ht(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ml(this,r),pn(this),this.display.input.reset(),gn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,et(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}},Ot(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,l){e.registerHelper(r,i,l),n[r]._global.push({pred:o,val:l})}}function uo(e,t,n,r,i){var o=t,l=n,a=se(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var $=t.line+s;return $<e.first||$>=e.first+e.size?!1:(t=new L($,t.ch,t.sticky),a=se(e,$))}function d($){var Q;if(r=="codepoint"){var re=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(re))Q=null;else{var ge=n>0?re>=55296&&re<56320:re>=56320&&re<57343;Q=new L(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(ge?2:1))),-n)}}else i?Q=Is(e.cm,a,t,n):Q=to(a,t,n);if(Q==null)if(!$&&u())t=ro(i,e.cm,a,t.line,s);else return!1;else t=Q;return!0}if(r=="char"||r=="codepoint")d();else if(r=="column")d(!0);else if(r=="word"||r=="group")for(var v=null,y=r=="group",x=e.cm&&e.cm.getHelper(t,"wordChars"),T=!0;!(n<0&&!d(!T));T=!1){var P=a.text.charAt(t.ch)||`
`,q=Xt(P,x)?"w":y&&P==`
`?"n":!y||/\s/.test(P)?null:"p";if(y&&!T&&!q&&(q="s"),v&&v!=q){n<0&&(n=1,d(),t.sticky="after");break}if(q&&(v=q),n>0&&!d(!T))break}var Z=ai(e,t,o,l,!0);return Ne(o,Z)&&(Z.hitSide=!0),Z}function fa(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,Y(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*_r(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Oi(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var He=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new xe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};He.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,so(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ve(i,"paste",function(a){!o(a)||je(r,a)||la(a,r)||F<=11&&setTimeout(tt(r,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ve(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ve(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return n.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||je(r,a))){if(r.somethingSelected())di({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=sa(r);di({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Je),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Rt.text.join(`
`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var d=ua(),v=d.firstChild;so(v),r.display.lineSpace.insertBefore(d,r.display.lineSpace.firstChild),v.value=Rt.text.join(`
`);var y=Le(ye(i));g(v),setTimeout(function(){r.display.lineSpace.removeChild(d),y.focus(),y==i&&n.showPrimarySelection()},50)}}ve(i,"copy",l),ve(i,"cut",l)},He.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},He.prototype.prepareSelection=function(){var e=el(this.cm,!1);return e.focus=Le(ye(this.div))==this.div,e},He.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},He.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},He.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){e.removeAllRanges();return}var o=pi(t,e.anchorNode,e.anchorOffset),l=pi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&l&&!l.bad&&V(Wr(o,l),r)==0&&V(gt(o,l),i)==0)){var a=t.display.view,s=r.line>=t.display.viewFrom&&ca(t,r)||{node:a[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&ca(t,i);if(!u){var d=a[a.length-1].measure,v=d.maps?d.maps[d.maps.length-1]:d.map;u={node:v[v.length-1],offset:v[v.length-2]-v[v.length-3]}}if(!s||!u){e.removeAllRanges();return}var y=e.rangeCount&&e.getRangeAt(0),x;try{x=W(s.node,s.offset,u.offset,u.node)}catch{}x&&(!O&&t.state.focused?(e.collapse(s.node,s.offset),x.collapsed||(e.removeAllRanges(),e.addRange(x))):(e.removeAllRanges(),e.addRange(x)),y&&e.anchorNode==null?e.addRange(y):O&&this.startGracePeriod()),this.rememberSelection()}},He.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},He.prototype.showMultipleSelections=function(e){X(this.cm.display.cursorDiv,e.cursors),X(this.cm.display.selectionDiv,e.selection)},He.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},He.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return le(this.div,t)},He.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Le(ye(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},He.prototype.blur=function(){this.div.blur()},He.prototype.getField=function(){return this.div},He.prototype.supportsTouch=function(){return!0},He.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):St(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},He.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},He.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(E&&S&&this.cm.display.gutterSpecs.length&&ou(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=pi(t,e.anchorNode,e.anchorOffset),r=pi(t,e.focusNode,e.focusOffset);n&&r&&St(t,function(){ft(t.doc,dr(n,r),Je),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},He.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=L(r.line-1,se(e.doc,r.line-1).length)),i.ch==se(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=L(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Cr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Cr(e,i.line),u,d;if(s==t.view.length-1?(u=t.viewTo-1,d=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,d=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(lu(e,a,d,l,u)),y=Qt(e.doc,L(l,0),L(u,se(e.doc,u).text.length));v.length>1&&y.length>1;)if(Se(v)==Se(y))v.pop(),y.pop(),u--;else if(v[0]==y[0])v.shift(),y.shift(),l++;else break;for(var x=0,T=0,P=v[0],q=y[0],Z=Math.min(P.length,q.length);x<Z&&P.charCodeAt(x)==q.charCodeAt(x);)++x;for(var $=Se(v),Q=Se(y),re=Math.min($.length-(v.length==1?x:0),Q.length-(y.length==1?x:0));T<re&&$.charCodeAt($.length-T-1)==Q.charCodeAt(Q.length-T-1);)++T;if(v.length==1&&y.length==1&&l==r.line)for(;x&&x>r.ch&&$.charCodeAt($.length-T-1)==Q.charCodeAt(Q.length-T-1);)x--,T++;v[v.length-1]=$.slice(0,$.length-T).replace(/^\u200b+/,""),v[0]=v[0].slice(x).replace(/\u200b+$/,"");var ge=L(l,x),he=L(u,y.length?Se(y).length-T:0);if(v.length>1||v[0]||V(ge,he))return Qr(e.doc,v,ge,he,"+input"),!0},He.prototype.ensurePolled=function(){this.forceCompositionEnd()},He.prototype.reset=function(){this.forceCompositionEnd()},He.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},He.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},He.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&St(this.cm,function(){return mt(e.cm)})},He.prototype.setUneditable=function(e){e.contentEditable="false"},He.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||tt(this.cm,ao)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},He.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},He.prototype.onContextMenu=function(){},He.prototype.resetPosition=function(){},He.prototype.needsContentAttribute=!0;function ca(e,t){var n=Fi(e,t.line);if(!n||n.hidden)return null;var r=se(e.doc,t.line),i=Ro(n,r,t.line),o=Ae(r,e.doc.direction),l="left";if(o){var a=or(o,t.ch);l=a%2?"right":"left"}var s=jo(i.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function ou(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function tn(e,t){return t&&(e.bad=!0),e}function lu(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(x){return function(T){return T.id==x}}function d(){l&&(o+=a,s&&(o+=a),l=s=!1)}function v(x){x&&(d(),o+=x)}function y(x){if(x.nodeType==1){var T=x.getAttribute("cm-text");if(T){v(T);return}var P=x.getAttribute("cm-marker"),q;if(P){var Z=e.findMarks(L(r,0),L(i+1,0),u(+P));Z.length&&(q=Z[0].find(0))&&v(Qt(e.doc,q.from,q.to).join(a));return}if(x.getAttribute("contenteditable")=="false")return;var $=/^(pre|div|p|li|table|br)$/i.test(x.nodeName);if(!/^br$/i.test(x.nodeName)&&x.textContent.length==0)return;$&&d();for(var Q=0;Q<x.childNodes.length;Q++)y(x.childNodes[Q]);/^(pre|p)$/i.test(x.nodeName)&&(s=!0),$&&(l=!0)}else x.nodeType==3&&v(x.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;y(t),t!=n;)t=t.nextSibling,s=!1;return o}function pi(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return tn(e.clipPos(L(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return au(o,t,n)}}function au(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!le(r,t))return tn(L(f(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?Se(e.rest):e.line;return tn(L(f(o),o.text.length),i)}var l=t.nodeType==3?t:null,a=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,n&&(n=l.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var s=e.measure,u=s.maps;function d(q,Z,$){for(var Q=-1;Q<(u?u.length:0);Q++)for(var re=Q<0?s.map:u[Q],ge=0;ge<re.length;ge+=3){var he=re[ge+2];if(he==q||he==Z){var Ce=f(Q<0?e.line:e.rest[Q]),Be=re[ge]+$;return($<0||he!=q)&&(Be=re[ge+($?1:0)]),L(Ce,Be)}}}var v=d(l,a,n);if(v)return tn(v,i);for(var y=a.nextSibling,x=l?l.nodeValue.length-n:0;y;y=y.nextSibling){if(v=d(y,y.firstChild,0),v)return tn(L(v.line,v.ch-x),i);x+=y.textContent.length}for(var T=a.previousSibling,P=n;T;T=T.previousSibling){if(v=d(T,T.firstChild,-1),v)return tn(L(v.line,v.ch+P),i);P+=T.textContent.length}}var Xe=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new xe,this.hasSelection=!1,this.composing=null,this.resetting=!1};Xe.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),ve(i,"input",function(){C&&F>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),ve(i,"paste",function(l){je(r,l)||la(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(l){if(!je(r,l)){if(r.somethingSelected())di({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=sa(r);di({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Je):(n.prevInput="",i.value=a.text.join(`
`),g(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ve(i,"cut",o),ve(i,"copy",o),ve(e.scroller,"paste",function(l){if(!($t(e,l)||je(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ve(e.lineSpace,"selectstart",function(l){$t(e,l)||ut(l)}),ve(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Xe.prototype.createField=function(e){this.wrapper=ua(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;so(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Xe.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Xe.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=el(e);if(e.options.moveInputWithCursor){var i=Wt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},Xe.prototype.showSelection=function(e){var t=this.cm,n=t.display;X(n.cursorDiv,e.cursors),X(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Xe.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&g(this.textarea),C&&F>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",C&&F>=9&&(this.hasSelection=null));this.resetting=!1}},Xe.prototype.getField=function(){return this.textarea},Xe.prototype.supportsTouch=function(){return!1},Xe.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!H||Le(ye(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},Xe.prototype.blur=function(){this.textarea.blur()},Xe.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xe.prototype.receivedFocus=function(){this.slowPoll()},Xe.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Xe.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)},Xe.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||sr(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(C&&F>=9&&this.hasSelection===i||z&&/[\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 l=0,a=Math.min(r.length,i.length);l<a&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return St(t,function(){ao(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||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},Xe.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xe.prototype.onKeyPress=function(){C&&F>=9&&(this.hasSelection=null),this.fastPoll()},Xe.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Sr(n,e),l=r.scroller.scrollTop;if(!o||G)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&&tt(n,ft)(n.doc,dr(o),Je);var s=i.style.cssText,u=t.wrapper.style.cssText,d=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+`px;
z-index: 1000; background: `+(C?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;k&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),k&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=x,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function y(){if(i.selectionStart!=null){var P=n.somethingSelected(),q="\u200B"+(P?i.value:"");i.value="\u21DA",i.value=q,t.prevInput=P?"":"\u200B",i.selectionStart=1,i.selectionEnd=q.length,r.selForContextMenu=n.doc.sel}}function x(){if(t.contextMenuPending==x&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,C&&F<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!C||C&&F<9)&&y();var P=0,q=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?tt(n,Ml)(n):P++<10?r.detectingSelectAll=setTimeout(q,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(q,200)}}if(C&&F>=9&&y(),ce){lr(e);var T=function(){st(window,"mouseup",T),setTimeout(x,20)};ve(window,"mouseup",T)}else setTimeout(x,50)},Xe.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Xe.prototype.setUneditable=function(){},Xe.prototype.needsContentAttribute=!1;function su(e,t){if(t=t?be(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=Le(ye(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ve(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(st(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ie(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function uu(e){e.off=st,e.on=ve,e.wheelEventPixels=gs,e.Doc=xt,e.splitLines=Et,e.countColumn=we,e.findColumn=ze,e.isWordChar=at,e.Pass=We,e.signal=_e,e.Line=Ir,e.changeEnd=pr,e.scrollbarModel=ll,e.Pos=L,e.cmpPos=V,e.modes=Nr,e.mimeModes=Ht,e.resolveMode=Pr,e.getMode=Hr,e.modeExtensions=ur,e.extendMode=zr,e.copyState=_t,e.startState=Br,e.innerMode=an,e.commands=En,e.keyMap=tr,e.keyName=Ul,e.isModifierKey=Kl,e.lookupKey=Vr,e.normalizeKeyMap=Ws,e.StringStream=Ke,e.SharedTextMarker=An,e.TextMarker=gr,e.LineWidget=Dn,e.e_preventDefault=ut,e.e_stopPropagation=Er,e.e_stop=lr,e.addClass=Oe,e.contains=le,e.rmClass=Ee,e.keyNames=mr}eu(Ie),iu(Ie);var fu="iter insert remove copy getEditor constructor".split(" ");for(var vi in xt.prototype)xt.prototype.hasOwnProperty(vi)&&oe(fu,vi)<0&&(Ie.prototype[vi]=function(e){return function(){return e.apply(this.doc,arguments)}}(xt.prototype[vi]));return Ot(xt),Ie.inputStyles={textarea:Xe,contenteditable:He},Ie.defineMode=function(e){!Ie.defaults.mode&&e!="null"&&(Ie.defaults.mode=e),zt.apply(this,arguments)},Ie.defineMIME=br,Ie.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ie.defineMIME("text/plain","null"),Ie.defineExtension=function(e,t){Ie.prototype[e]=t},Ie.defineDocExtension=function(e,t){xt.prototype[e]=t},Ie.fromTextArea=su,uu(Ie),Ie.version="5.65.18",Ie})})(Lt);var gu=Lt.exports,hu={exports:{}};(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){var me={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};b.defineMode("xml",function(te,j){var J=te.indentUnit,C={},F=j.htmlMode?me:O;for(var k in F)C[k]=F[k];for(var k in j)C[k]=j[k];var K,S;function _(c,U){function W(Oe){return U.tokenize=Oe,Oe(c,U)}var le=c.next();if(le=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?W(ae("atom","]]>")):null:c.match("--")?W(ae("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),W(D(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),U.tokenize=ae("meta","?>"),"meta"):(K=c.eat("/")?"closeTag":"openTag",U.tokenize=G,"tag bracket");if(le=="&"){var Le;return c.eat("#")?c.eat("x")?Le=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):Le=c.eatWhile(/[\d]/)&&c.eat(";"):Le=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),Le?"atom":"error"}else return c.eatWhile(/[^&<]/),null}_.isInText=!0;function G(c,U){var W=c.next();if(W==">"||W=="/"&&c.eat(">"))return U.tokenize=_,K=W==">"?"endTag":"selfcloseTag","tag bracket";if(W=="=")return K="equals",null;if(W=="<"){U.tokenize=_,U.state=ee,U.tagName=U.tagStart=null;var le=U.tokenize(c,U);return le?le+" tag error":"tag error"}else return/[\'\"]/.test(W)?(U.tokenize=de(W),U.stringStartCol=c.column(),U.tokenize(c,U)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function de(c){var U=function(W,le){for(;!W.eol();)if(W.next()==c){le.tokenize=G;break}return"string"};return U.isInAttribute=!0,U}function ae(c,U){return function(W,le){for(;!W.eol();){if(W.match(U)){le.tokenize=_;break}W.next()}return c}}function D(c){return function(U,W){for(var le;(le=U.next())!=null;){if(le=="<")return W.tokenize=D(c+1),W.tokenize(U,W);if(le==">")if(c==1){W.tokenize=_;break}else return W.tokenize=D(c-1),W.tokenize(U,W)}return"meta"}}function m(c){return c&&c.toLowerCase()}function E(c,U,W){this.prev=c.context,this.tagName=U||"",this.indent=c.indented,this.startOfLine=W,(C.doNotIndent.hasOwnProperty(U)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function H(c){c.context&&(c.context=c.context.prev)}function z(c,U){for(var W;;){if(!c.context||(W=c.context.tagName,!C.contextGrabbers.hasOwnProperty(m(W))||!C.contextGrabbers[m(W)].hasOwnProperty(m(U))))return;H(c)}}function ee(c,U,W){return c=="openTag"?(W.tagStart=U.column(),fe):c=="closeTag"?ne:ee}function fe(c,U,W){return c=="word"?(W.tagName=U.current(),S="tag",B):C.allowMissingTagName&&c=="endTag"?(S="tag bracket",B(c,U,W)):(S="error",fe)}function ne(c,U,W){if(c=="word"){var le=U.current();return W.context&&W.context.tagName!=le&&C.implicitlyClosed.hasOwnProperty(m(W.context.tagName))&&H(W),W.context&&W.context.tagName==le||C.matchClosing===!1?(S="tag",pe):(S="tag error",ce)}else return C.allowMissingTagName&&c=="endTag"?(S="tag bracket",pe(c,U,W)):(S="error",ce)}function pe(c,U,W){return c!="endTag"?(S="error",pe):(H(W),ee)}function ce(c,U,W){return S="error",pe(c,U,W)}function B(c,U,W){if(c=="word")return S="attribute",Ee;if(c=="endTag"||c=="selfcloseTag"){var le=W.tagName,Le=W.tagStart;return W.tagName=W.tagStart=null,c=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(m(le))?z(W,le):(z(W,le),W.context=new E(W,le,Le==W.indented)),ee}return S="error",B}function Ee(c,U,W){return c=="equals"?A:(C.allowMissing||(S="error"),B(c,U,W))}function A(c,U,W){return c=="string"?X:c=="word"&&C.allowUnquoted?(S="string",B):(S="error",B(c,U,W))}function X(c,U,W){return c=="string"?X:B(c,U,W)}return{startState:function(c){var U={tokenize:_,state:ee,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(U.baseIndent=c),U},token:function(c,U){if(!U.tagName&&c.sol()&&(U.indented=c.indentation()),c.eatSpace())return null;K=null;var W=U.tokenize(c,U);return(W||K)&&W!="comment"&&(S=null,U.state=U.state(K||W,c,U),S&&(W=S=="error"?W+" error":S)),W},indent:function(c,U,W){var le=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+J;if(le&&le.noIndent)return b.Pass;if(c.tokenize!=G&&c.tokenize!=_)return W?W.match(/^(\s*)/)[0].length:0;if(c.tagName)return C.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+J*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(U))return 0;var Le=U&&/^<(\/)?([\w_:\.-]*)/.exec(U);if(Le&&Le[1])for(;le;)if(le.tagName==Le[2]){le=le.prev;break}else if(C.implicitlyClosed.hasOwnProperty(m(le.tagName)))le=le.prev;else break;else if(Le)for(;le;){var Oe=C.contextGrabbers[m(le.tagName)];if(Oe&&Oe.hasOwnProperty(m(Le[2])))le=le.prev;else break}for(;le&&le.prev&&!le.startOfLine;)le=le.prev;return le?le.indent+J:c.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(c){c.state==A&&(c.state=B)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var U=[],W=c.context;W;W=W.prev)U.push(W.tagName);return U.reverse()}}}),b.defineMIME("text/xml","xml"),b.defineMIME("application/xml","xml"),b.mimeModes.hasOwnProperty("text/html")||b.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();var du={exports:{}};(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){b.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var me=0;me<b.modeInfo.length;me++){var O=b.modeInfo[me];O.mimes&&(O.mime=O.mimes[0])}b.findModeByMIME=function(te){te=te.toLowerCase();for(var j=0;j<b.modeInfo.length;j++){var J=b.modeInfo[j];if(J.mime==te)return J;if(J.mimes){for(var C=0;C<J.mimes.length;C++)if(J.mimes[C]==te)return J}}if(/\+xml$/.test(te))return b.findModeByMIME("application/xml");if(/\+json$/.test(te))return b.findModeByMIME("application/json")},b.findModeByExtension=function(te){te=te.toLowerCase();for(var j=0;j<b.modeInfo.length;j++){var J=b.modeInfo[j];if(J.ext){for(var C=0;C<J.ext.length;C++)if(J.ext[C]==te)return J}}},b.findModeByFileName=function(te){for(var j=0;j<b.modeInfo.length;j++){var J=b.modeInfo[j];if(J.file&&J.file.test(te))return J}var C=te.lastIndexOf("."),F=C>-1&&te.substring(C+1,te.length);if(F)return b.findModeByExtension(F)},b.findModeByName=function(te){te=te.toLowerCase();for(var j=0;j<b.modeInfo.length;j++){var J=b.modeInfo[j];if(J.name.toLowerCase()==te)return J;if(J.alias){for(var C=0;C<J.alias.length;C++)if(J.alias[C].toLowerCase()==te)return J}}}})})();(function(Tt,Ft){(function(b){b(Lt.exports,hu.exports,du.exports)})(function(b){b.defineMode("markdown",function(me,O){var te=b.getMode(me,"text/html"),j=te.name=="null";function J(g){if(b.findModeByName){var h=b.findModeByName(g);h&&(g=h.mime||h.mimes[0])}var ie=b.getMode(me,g);return ie.name=="null"?null:ie}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.tokenTypeOverrides={});var C={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var F in C)C.hasOwnProperty(F)&&O.tokenTypeOverrides[F]&&(C[F]=O.tokenTypeOverrides[F]);var k=/^([*\-_])(?:\s*\1){2,}\s*$/,K=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,S=/^\[(x| )\](?=\s)/i,_=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,G=/^ {0,3}(?:\={1,}|-{2,})\s*$/,de=/^[^#!\[\]*_\\<>` "'(~:]+/,ae=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,D=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,E=" ";function H(g,h,ie){return h.f=h.inline=ie,ie(g,h)}function z(g,h,ie){return h.f=h.block=ie,ie(g,h)}function ee(g){return!g||!/\S/.test(g.string)}function fe(g){if(g.linkTitle=!1,g.linkHref=!1,g.linkText=!1,g.em=!1,g.strong=!1,g.strikethrough=!1,g.quote=0,g.indentedCode=!1,g.f==pe){var h=j;if(!h){var ie=b.innerMode(te,g.htmlState);h=ie.mode.name=="xml"&&ie.state.tagStart===null&&!ie.state.context&&ie.state.tokenize.isInText}h&&(g.f=A,g.block=ne,g.htmlState=null)}return g.trailingSpace=0,g.trailingSpaceNewLine=!1,g.prevLine=g.thisLine,g.thisLine={stream:null},null}function ne(g,h){var ie=g.column()===h.indentation,ye=ee(h.prevLine.stream),Y=h.indentedCode,ue=h.prevLine.hr,be=h.list!==!1,we=(h.listStack[h.listStack.length-1]||0)+3;h.indentedCode=!1;var xe=h.indentation;if(h.indentationDiff===null&&(h.indentationDiff=h.indentation,be)){for(h.list=null;xe<h.listStack[h.listStack.length-1];)h.listStack.pop(),h.listStack.length?h.indentation=h.listStack[h.listStack.length-1]:h.list=!1;h.list!==!1&&(h.indentationDiff=xe-h.listStack[h.listStack.length-1])}var oe=!ye&&!ue&&!h.prevLine.header&&(!be||!Y)&&!h.prevLine.fencedCodeEnd,Te=(h.list===!1||ue||ye)&&h.indentation<=we&&g.match(k),We=null;if(h.indentationDiff>=4&&(Y||h.prevLine.fencedCodeEnd||h.prevLine.header||ye))return g.skipToEnd(),h.indentedCode=!0,C.code;if(g.eatSpace())return null;if(ie&&h.indentation<=we&&(We=g.match(_))&&We[1].length<=6)return h.quote=0,h.header=We[1].length,h.thisLine.header=!0,O.highlightFormatting&&(h.formatting="header"),h.f=h.inline,B(h);if(h.indentation<=we&&g.eat(">"))return h.quote=ie?1:h.quote+1,O.highlightFormatting&&(h.formatting="quote"),g.eatSpace(),B(h);if(!Te&&!h.setext&&ie&&h.indentation<=we&&(We=g.match(K))){var Je=We[1]?"ol":"ul";return h.indentation=xe+g.current().length,h.list=!0,h.quote=0,h.listStack.push(h.indentation),h.em=!1,h.strong=!1,h.code=!1,h.strikethrough=!1,O.taskLists&&g.match(S,!1)&&(h.taskList=!0),h.f=h.inline,O.highlightFormatting&&(h.formatting=["list","list-"+Je]),B(h)}else{if(ie&&h.indentation<=we&&(We=g.match(ae,!0)))return h.quote=0,h.fencedEndRE=new RegExp(We[1]+"+ *$"),h.localMode=O.fencedCodeBlockHighlighting&&J(We[2]||O.fencedCodeBlockDefaultMode),h.localMode&&(h.localState=b.startState(h.localMode)),h.f=h.block=ce,O.highlightFormatting&&(h.formatting="code-block"),h.code=-1,B(h);if(h.setext||(!oe||!be)&&!h.quote&&h.list===!1&&!h.code&&!Te&&!D.test(g.string)&&(We=g.lookAhead(1))&&(We=We.match(G)))return h.setext?(h.header=h.setext,h.setext=0,g.skipToEnd(),O.highlightFormatting&&(h.formatting="header")):(h.header=We[0].charAt(0)=="="?1:2,h.setext=h.header),h.thisLine.header=!0,h.f=h.inline,B(h);if(Te)return g.skipToEnd(),h.hr=!0,h.thisLine.hr=!0,C.hr;if(g.peek()==="[")return H(g,h,le)}return H(g,h,h.inline)}function pe(g,h){var ie=te.token(g,h.htmlState);if(!j){var ye=b.innerMode(te,h.htmlState);(ye.mode.name=="xml"&&ye.state.tagStart===null&&!ye.state.context&&ye.state.tokenize.isInText||h.md_inside&&g.current().indexOf(">")>-1)&&(h.f=A,h.block=ne,h.htmlState=null)}return ie}function ce(g,h){var ie=h.listStack[h.listStack.length-1]||0,ye=h.indentation<ie,Y=ie+3;if(h.fencedEndRE&&h.indentation<=Y&&(ye||g.match(h.fencedEndRE))){O.highlightFormatting&&(h.formatting="code-block");var ue;return ye||(ue=B(h)),h.localMode=h.localState=null,h.block=ne,h.f=A,h.fencedEndRE=null,h.code=0,h.thisLine.fencedCodeEnd=!0,ye?z(g,h,h.block):ue}else return h.localMode?h.localMode.token(g,h.localState):(g.skipToEnd(),C.code)}function B(g){var h=[];if(g.formatting){h.push(C.formatting),typeof g.formatting=="string"&&(g.formatting=[g.formatting]);for(var ie=0;ie<g.formatting.length;ie++)h.push(C.formatting+"-"+g.formatting[ie]),g.formatting[ie]==="header"&&h.push(C.formatting+"-"+g.formatting[ie]+"-"+g.header),g.formatting[ie]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=g.quote?h.push(C.formatting+"-"+g.formatting[ie]+"-"+g.quote):h.push("error"))}if(g.taskOpen)return h.push("meta"),h.length?h.join(" "):null;if(g.taskClosed)return h.push("property"),h.length?h.join(" "):null;if(g.linkHref?h.push(C.linkHref,"url"):(g.strong&&h.push(C.strong),g.em&&h.push(C.em),g.strikethrough&&h.push(C.strikethrough),g.emoji&&h.push(C.emoji),g.linkText&&h.push(C.linkText),g.code&&h.push(C.code),g.image&&h.push(C.image),g.imageAltText&&h.push(C.imageAltText,"link"),g.imageMarker&&h.push(C.imageMarker)),g.header&&h.push(C.header,C.header+"-"+g.header),g.quote&&(h.push(C.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=g.quote?h.push(C.quote+"-"+g.quote):h.push(C.quote+"-"+O.maxBlockquoteDepth)),g.list!==!1){var ye=(g.listStack.length-1)%3;ye?ye===1?h.push(C.list2):h.push(C.list3):h.push(C.list1)}return g.trailingSpaceNewLine?h.push("trailing-space-new-line"):g.trailingSpace&&h.push("trailing-space-"+(g.trailingSpace%2?"a":"b")),h.length?h.join(" "):null}function Ee(g,h){if(g.match(de,!0))return B(h)}function A(g,h){var ie=h.text(g,h);if(typeof ie!="undefined")return ie;if(h.list)return h.list=null,B(h);if(h.taskList){var ye=g.match(S,!0)[1]===" ";return ye?h.taskOpen=!0:h.taskClosed=!0,O.highlightFormatting&&(h.formatting="task"),h.taskList=!1,B(h)}if(h.taskOpen=!1,h.taskClosed=!1,h.header&&g.match(/^#+$/,!0))return O.highlightFormatting&&(h.formatting="header"),B(h);var Y=g.next();if(h.linkTitle){h.linkTitle=!1;var ue=Y;Y==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var be="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(g.match(new RegExp(be),!0))return C.linkHref}if(Y==="`"){var we=h.formatting;O.highlightFormatting&&(h.formatting="code"),g.eatWhile("`");var xe=g.current().length;if(h.code==0&&(!h.quote||xe==1))return h.code=xe,B(h);if(xe==h.code){var oe=B(h);return h.code=0,oe}else return h.formatting=we,B(h)}else if(h.code)return B(h);if(Y==="\\"&&(g.next(),O.highlightFormatting)){var Te=B(h),We=C.formatting+"-escape";return Te?Te+" "+We:We}if(Y==="!"&&g.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return h.imageMarker=!0,h.image=!0,O.highlightFormatting&&(h.formatting="image"),B(h);if(Y==="["&&h.imageMarker&&g.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return h.imageMarker=!1,h.imageAltText=!0,O.highlightFormatting&&(h.formatting="image"),B(h);if(Y==="]"&&h.imageAltText){O.highlightFormatting&&(h.formatting="image");var Te=B(h);return h.imageAltText=!1,h.image=!1,h.inline=h.f=c,Te}if(Y==="["&&!h.image)return h.linkText&&g.match(/^.*?\]/)||(h.linkText=!0,O.highlightFormatting&&(h.formatting="link")),B(h);if(Y==="]"&&h.linkText){O.highlightFormatting&&(h.formatting="link");var Te=B(h);return h.linkText=!1,h.inline=h.f=g.match(/\(.*?\)| ?\[.*?\]/,!1)?c:A,Te}if(Y==="<"&&g.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=X,O.highlightFormatting&&(h.formatting="link");var Te=B(h);return Te?Te+=" ":Te="",Te+C.linkInline}if(Y==="<"&&g.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=X,O.highlightFormatting&&(h.formatting="link");var Te=B(h);return Te?Te+=" ":Te="",Te+C.linkEmail}if(O.xml&&Y==="<"&&g.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Je=g.string.indexOf(">",g.pos);if(Je!=-1){var pt=g.string.substring(g.start,Je);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(pt)&&(h.md_inside=!0)}return g.backUp(1),h.htmlState=b.startState(te),z(g,h,pe)}if(O.xml&&Y==="<"&&g.match(/^\/\w*?>/))return h.md_inside=!1,"tag";if(Y==="*"||Y==="_"){for(var De=1,ze=g.pos==1?" ":g.string.charAt(g.pos-2);De<3&&g.eat(Y);)De++;var Ue=g.peek()||" ",ot=!/\s/.test(Ue)&&(!m.test(Ue)||/\s/.test(ze)||m.test(ze)),Se=!/\s/.test(ze)&&(!m.test(ze)||/\s/.test(Ue)||m.test(Ue)),Fe=null,w=null;if(De%2&&(!h.em&&ot&&(Y==="*"||!Se||m.test(ze))?Fe=!0:h.em==Y&&Se&&(Y==="*"||!ot||m.test(Ue))&&(Fe=!1)),De>1&&(!h.strong&&ot&&(Y==="*"||!Se||m.test(ze))?w=!0:h.strong==Y&&Se&&(Y==="*"||!ot||m.test(Ue))&&(w=!1)),w!=null||Fe!=null){O.highlightFormatting&&(h.formatting=Fe==null?"strong":w==null?"em":"strong em"),Fe===!0&&(h.em=Y),w===!0&&(h.strong=Y);var oe=B(h);return Fe===!1&&(h.em=!1),w===!1&&(h.strong=!1),oe}}else if(Y===" "&&(g.eat("*")||g.eat("_"))){if(g.peek()===" ")return B(h);g.backUp(1)}if(O.strikethrough){if(Y==="~"&&g.eatWhile(Y)){if(h.strikethrough){O.highlightFormatting&&(h.formatting="strikethrough");var oe=B(h);return h.strikethrough=!1,oe}else if(g.match(/^[^\s]/,!1))return h.strikethrough=!0,O.highlightFormatting&&(h.formatting="strikethrough"),B(h)}else if(Y===" "&&g.match("~~",!0)){if(g.peek()===" ")return B(h);g.backUp(2)}}if(O.emoji&&Y===":"&&g.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){h.emoji=!0,O.highlightFormatting&&(h.formatting="emoji");var I=B(h);return h.emoji=!1,I}return Y===" "&&(g.match(/^ +$/,!1)?h.trailingSpace++:h.trailingSpace&&(h.trailingSpaceNewLine=!0)),B(h)}function X(g,h){var ie=g.next();if(ie===">"){h.f=h.inline=A,O.highlightFormatting&&(h.formatting="link");var ye=B(h);return ye?ye+=" ":ye="",ye+C.linkInline}return g.match(/^[^>]+/,!0),C.linkInline}function c(g,h){if(g.eatSpace())return null;var ie=g.next();return ie==="("||ie==="["?(h.f=h.inline=W(ie==="("?")":"]"),O.highlightFormatting&&(h.formatting="link-string"),h.linkHref=!0,B(h)):"error"}var U={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function W(g){return function(h,ie){var ye=h.next();if(ye===g){ie.f=ie.inline=A,O.highlightFormatting&&(ie.formatting="link-string");var Y=B(ie);return ie.linkHref=!1,Y}return h.match(U[g]),ie.linkHref=!0,B(ie)}}function le(g,h){return g.match(/^([^\]\\]|\\.)*\]:/,!1)?(h.f=Le,g.next(),O.highlightFormatting&&(h.formatting="link"),h.linkText=!0,B(h)):H(g,h,A)}function Le(g,h){if(g.match("]:",!0)){h.f=h.inline=Oe,O.highlightFormatting&&(h.formatting="link");var ie=B(h);return h.linkText=!1,ie}return g.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function Oe(g,h){return g.eatSpace()?null:(g.match(/^[^\s]+/,!0),g.peek()===void 0?h.linkTitle=!0:g.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),h.f=h.inline=A,C.linkHref+" url")}var Re={startState:function(){return{f:ne,prevLine:{stream:null},thisLine:{stream:null},block:ne,htmlState:null,indentation:0,inline:A,text:Ee,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(g){return{f:g.f,prevLine:g.prevLine,thisLine:g.thisLine,block:g.block,htmlState:g.htmlState&&b.copyState(te,g.htmlState),indentation:g.indentation,localMode:g.localMode,localState:g.localMode?b.copyState(g.localMode,g.localState):null,inline:g.inline,text:g.text,formatting:!1,linkText:g.linkText,linkTitle:g.linkTitle,linkHref:g.linkHref,code:g.code,em:g.em,strong:g.strong,strikethrough:g.strikethrough,emoji:g.emoji,header:g.header,setext:g.setext,hr:g.hr,taskList:g.taskList,list:g.list,listStack:g.listStack.slice(0),quote:g.quote,indentedCode:g.indentedCode,trailingSpace:g.trailingSpace,trailingSpaceNewLine:g.trailingSpaceNewLine,md_inside:g.md_inside,fencedEndRE:g.fencedEndRE}},token:function(g,h){if(h.formatting=!1,g!=h.thisLine.stream){if(h.header=0,h.hr=!1,g.match(/^\s*$/,!0))return fe(h),null;if(h.prevLine=h.thisLine,h.thisLine={stream:g},h.taskList=!1,h.trailingSpace=0,h.trailingSpaceNewLine=!1,!h.localState&&(h.f=h.block,h.f!=pe)){var ie=g.match(/^\s*/,!0)[0].replace(/\t/g,E).length;if(h.indentation=ie,h.indentationDiff=null,ie>0)return null}}return h.f(g,h)},innerMode:function(g){return g.block==pe?{state:g.htmlState,mode:te}:g.localState?{state:g.localState,mode:g.localMode}:{state:g,mode:Re}},indent:function(g,h,ie){return g.block==pe&&te.indent?te.indent(g.htmlState,h,ie):g.localState&&g.localMode.indent?g.localMode.indent(g.localState,h,ie):b.Pass},blankLine:fe,getType:B,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Re},"xml"),b.defineMIME("text/markdown","markdown"),b.defineMIME("text/x-markdown","markdown")})})();(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){b.defineMode("javascript",function(me,O){var te=me.indentUnit,j=O.statementIndent,J=O.jsonld,C=O.json||J,F=O.trackScope!==!1,k=O.typescript,K=O.wordCharacters||/[\w$\xa1-\uffff]/,S=function(){function f($e){return{type:$e,style:"keyword"}}var p=f("keyword a"),N=f("keyword b"),R=f("keyword c"),L=f("keyword d"),V=f("operator"),Ne={type:"atom",style:"atom"};return{if:f("if"),while:p,with:p,else:N,do:N,try:N,finally:N,return:L,break:L,continue:L,new:f("new"),delete:R,void:R,throw:R,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:V,typeof:V,instanceof:V,true:Ne,false:Ne,null:Ne,undefined:Ne,NaN:Ne,Infinity:Ne,this:f("this"),class:f("class"),super:f("atom"),yield:R,export:f("export"),import:f("import"),extends:R,await:R}}(),_=/[+\-*&%=<>!?|~^@]/,G=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function de(f){for(var p=!1,N,R=!1;(N=f.next())!=null;){if(!p){if(N=="/"&&!R)return;N=="["?R=!0:R&&N=="]"&&(R=!1)}p=!p&&N=="\\"}}var ae,D;function m(f,p,N){return ae=f,D=N,p}function E(f,p){var N=f.next();if(N=='"'||N=="'")return p.tokenize=H(N),p.tokenize(f,p);if(N=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if(N=="."&&f.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(N))return m(N);if(N=="="&&f.eat(">"))return m("=>","operator");if(N=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(N))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if(N=="/")return f.eat("*")?(p.tokenize=z,z(f,p)):f.eat("/")?(f.skipToEnd(),m("comment","comment")):Dt(f,p,1)?(de(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(f.eat("="),m("operator","operator",f.current()));if(N=="`")return p.tokenize=ee,ee(f,p);if(N=="#"&&f.peek()=="!")return f.skipToEnd(),m("meta","meta");if(N=="#"&&f.eatWhile(K))return m("variable","property");if(N=="<"&&f.match("!--")||N=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),m("comment","comment");if(_.test(N))return(N!=">"||!p.lexical||p.lexical.type!=">")&&(f.eat("=")?(N=="!"||N=="=")&&f.eat("="):/[<>*+\-|&?]/.test(N)&&(f.eat(N),N==">"&&f.eat(N))),N=="?"&&f.eat(".")?m("."):m("operator","operator",f.current());if(K.test(N)){f.eatWhile(K);var R=f.current();if(p.lastType!="."){if(S.propertyIsEnumerable(R)){var L=S[R];return m(L.type,L.style,R)}if(R=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",R)}return m("variable","variable",R)}}function H(f){return function(p,N){var R=!1,L;if(J&&p.peek()=="@"&&p.match(G))return N.tokenize=E,m("jsonld-keyword","meta");for(;(L=p.next())!=null&&!(L==f&&!R);)R=!R&&L=="\\";return R||(N.tokenize=E),m("string","string")}}function z(f,p){for(var N=!1,R;R=f.next();){if(R=="/"&&N){p.tokenize=E;break}N=R=="*"}return m("comment","comment")}function ee(f,p){for(var N=!1,R;(R=f.next())!=null;){if(!N&&(R=="`"||R=="$"&&f.eat("{"))){p.tokenize=E;break}N=!N&&R=="\\"}return m("quasi","string-2",f.current())}var fe="([{}])";function ne(f,p){p.fatArrowAt&&(p.fatArrowAt=null);var N=f.string.indexOf("=>",f.start);if(!(N<0)){if(k){var R=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,N));R&&(N=R.index)}for(var L=0,V=!1,Ne=N-1;Ne>=0;--Ne){var $e=f.string.charAt(Ne),gt=fe.indexOf($e);if(gt>=0&&gt<3){if(!L){++Ne;break}if(--L==0){$e=="("&&(V=!0);break}}else if(gt>=3&&gt<6)++L;else if(K.test($e))V=!0;else if(/["'\/`]/.test($e))for(;;--Ne){if(Ne==0)return;var Wr=f.string.charAt(Ne-1);if(Wr==$e&&f.string.charAt(Ne-2)!="\\"){Ne--;break}}else if(V&&!L){++Ne;break}}V&&!L&&(p.fatArrowAt=Ne)}}var pe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function ce(f,p,N,R,L,V){this.indented=f,this.column=p,this.type=N,this.prev=L,this.info=V,R!=null&&(this.align=R)}function B(f,p){if(!F)return!1;for(var N=f.localVars;N;N=N.next)if(N.name==p)return!0;for(var R=f.context;R;R=R.prev)for(var N=R.vars;N;N=N.next)if(N.name==p)return!0}function Ee(f,p,N,R,L){var V=f.cc;for(A.state=f,A.stream=L,A.marked=null,A.cc=V,A.style=p,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var Ne=V.length?V.pop():C?oe:we;if(Ne(N,R)){for(;V.length&&V[V.length-1].lex;)V.pop()();return A.marked?A.marked:N=="variable"&&B(f,R)?"variable-2":p}}}var A={state:null,column:null,marked:null,cc:null};function X(){for(var f=arguments.length-1;f>=0;f--)A.cc.push(arguments[f])}function c(){return X.apply(null,arguments),!0}function U(f,p){for(var N=p;N;N=N.next)if(N.name==f)return!0;return!1}function W(f){var p=A.state;if(A.marked="def",!!F){if(p.context){if(p.lexical.info=="var"&&p.context&&p.context.block){var N=le(f,p.context);if(N!=null){p.context=N;return}}else if(!U(f,p.localVars)){p.localVars=new Re(f,p.localVars);return}}O.globalVars&&!U(f,p.globalVars)&&(p.globalVars=new Re(f,p.globalVars))}}function le(f,p){if(p)if(p.block){var N=le(f,p.prev);return N?N==p.prev?p:new Oe(N,p.vars,!0):null}else return U(f,p.vars)?p:new Oe(p.prev,new Re(f,p.vars),!1);else return null}function Le(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function Oe(f,p,N){this.prev=f,this.vars=p,this.block=N}function Re(f,p){this.name=f,this.next=p}var g=new Re("this",new Re("arguments",null));function h(){A.state.context=new Oe(A.state.context,A.state.localVars,!1),A.state.localVars=g}function ie(){A.state.context=new Oe(A.state.context,A.state.localVars,!0),A.state.localVars=null}h.lex=ie.lex=!0;function ye(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}ye.lex=!0;function Y(f,p){var N=function(){var R=A.state,L=R.indented;if(R.lexical.type=="stat")L=R.lexical.indented;else for(var V=R.lexical;V&&V.type==")"&&V.align;V=V.prev)L=V.indented;R.lexical=new ce(L,A.stream.column(),f,null,R.lexical,p)};return N.lex=!0,N}function ue(){var f=A.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}ue.lex=!0;function be(f){function p(N){return N==f?c():f==";"||N=="}"||N==")"||N=="]"?X():c(p)}return p}function we(f,p){return f=="var"?c(Y("vardef",p),Er,be(";"),ue):f=="keyword a"?c(Y("form"),We,we,ue):f=="keyword b"?c(Y("form"),we,ue):f=="keyword d"?A.stream.match(/^\s*$/,!1)?c():c(Y("stat"),pt,be(";"),ue):f=="debugger"?c(be(";")):f=="{"?c(Y("}"),ie,qt,ue,ye):f==";"?c():f=="if"?(A.state.lexical.info=="else"&&A.state.cc[A.state.cc.length-1]==ue&&A.state.cc.pop()(),c(Y("form"),We,we,ue,Or)):f=="function"?c(Et):f=="for"?c(Y("form"),ie,Wn,we,ye,ue):f=="class"||k&&p=="interface"?(A.marked="keyword",c(Y("form",f=="class"?f:p),Nr,ue)):f=="variable"?k&&p=="declare"?(A.marked="keyword",c(we)):k&&(p=="module"||p=="enum"||p=="type")&&A.stream.match(/^\s*\w/,!1)?(A.marked="keyword",p=="enum"?c(se):p=="type"?c(In,be("operator"),Ae,be(";")):c(Y("form"),vt,be("{"),Y("}"),qt,ue,ue)):k&&p=="namespace"?(A.marked="keyword",c(Y("form"),oe,we,ue)):k&&p=="abstract"?(A.marked="keyword",c(we)):c(Y("stat"),Me):f=="switch"?c(Y("form"),We,be("{"),Y("}","switch"),ie,qt,ue,ue,ye):f=="case"?c(oe,be(":")):f=="default"?c(be(":")):f=="catch"?c(Y("form"),h,xe,we,ue,ye):f=="export"?c(Y("stat"),Pr,ue):f=="import"?c(Y("stat"),ur,ue):f=="async"?c(we):p=="@"?c(oe,we):X(Y("stat"),oe,be(";"),ue)}function xe(f){if(f=="(")return c(Pt,be(")"))}function oe(f,p){return Je(f,p,!1)}function Te(f,p){return Je(f,p,!0)}function We(f){return f!="("?X():c(Y(")"),pt,be(")"),ue)}function Je(f,p,N){if(A.state.fatArrowAt==A.stream.start){var R=N?Fe:Se;if(f=="(")return c(h,Y(")"),Ye(Pt,")"),ue,be("=>"),R,ye);if(f=="variable")return X(h,vt,be("=>"),R,ye)}var L=N?ze:De;return pe.hasOwnProperty(f)?c(L):f=="function"?c(Et,L):f=="class"||k&&p=="interface"?(A.marked="keyword",c(Y("form"),xi,ue)):f=="keyword c"||f=="async"?c(N?Te:oe):f=="("?c(Y(")"),pt,be(")"),ue,L):f=="operator"||f=="spread"?c(N?Te:oe):f=="["?c(Y("]"),Ke,ue,L):f=="{"?nr(Xt,"}",null,L):f=="quasi"?X(Ue,L):f=="new"?c(w(N)):c()}function pt(f){return f.match(/[;\}\)\],]/)?X():X(oe)}function De(f,p){return f==","?c(pt):ze(f,p,!1)}function ze(f,p,N){var R=N==!1?De:ze,L=N==!1?oe:Te;if(f=="=>")return c(h,N?Fe:Se,ye);if(f=="operator")return/\+\+|--/.test(p)||k&&p=="!"?c(R):k&&p=="<"&&A.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?c(Y(">"),Ye(Ae,">"),ue,R):p=="?"?c(oe,be(":"),L):c(L);if(f=="quasi")return X(Ue,R);if(f!=";"){if(f=="(")return nr(Te,")","call",R);if(f==".")return c(at,R);if(f=="[")return c(Y("]"),pt,be("]"),ue,R);if(k&&p=="as")return A.marked="keyword",c(Ae,R);if(f=="regexp")return A.state.lastType=A.marked="operator",A.stream.backUp(A.stream.pos-A.stream.start-1),c(L)}}function Ue(f,p){return f!="quasi"?X():p.slice(p.length-2)!="${"?c(Ue):c(pt,ot)}function ot(f){if(f=="}")return A.marked="string-2",A.state.tokenize=ee,c(Ue)}function Se(f){return ne(A.stream,A.state),X(f=="{"?we:oe)}function Fe(f){return ne(A.stream,A.state),X(f=="{"?we:Te)}function w(f){return function(p){return p=="."?c(f?M:I):p=="variable"&&k?c(wt,f?ze:De):X(f?Te:oe)}}function I(f,p){if(p=="target")return A.marked="keyword",c(De)}function M(f,p){if(p=="target")return A.marked="keyword",c(ze)}function Me(f){return f==":"?c(ue,we):X(De,be(";"),ue)}function at(f){if(f=="variable")return A.marked="property",c()}function Xt(f,p){if(f=="async")return A.marked="property",c(Xt);if(f=="variable"||A.style=="keyword"){if(A.marked="property",p=="get"||p=="set")return c(zn);var N;return k&&A.state.fatArrowAt==A.stream.start&&(N=A.stream.match(/^\s*:\s*/,!1))&&(A.state.fatArrowAt=A.stream.pos+N[0].length),c(Yt)}else{if(f=="number"||f=="string")return A.marked=J?"property":A.style+" property",c(Yt);if(f=="jsonld-keyword")return c(Yt);if(k&&Le(p))return A.marked="keyword",c(Xt);if(f=="[")return c(oe,ir,be("]"),Yt);if(f=="spread")return c(Te,Yt);if(p=="*")return A.marked="keyword",c(Xt);if(f==":")return X(Yt)}}function zn(f){return f!="variable"?X(Yt):(A.marked="property",c(Et))}function Yt(f){if(f==":")return c(Te);if(f=="(")return X(Et)}function Ye(f,p,N){function R(L,V){if(N?N.indexOf(L)>-1:L==","){var Ne=A.state.lexical;return Ne.info=="call"&&(Ne.pos=(Ne.pos||0)+1),c(function($e,gt){return $e==p||gt==p?X():X(f)},R)}return L==p||V==p?c():N&&N.indexOf(";")>-1?X(f):c(be(p))}return function(L,V){return L==p||V==p?c():X(f,R)}}function nr(f,p,N){for(var R=3;R<arguments.length;R++)A.cc.push(arguments[R]);return c(Y(p,N),Ye(f,p),ue)}function qt(f){return f=="}"?c():X(we,qt)}function ir(f,p){if(k){if(f==":")return c(Ae);if(p=="?")return c(ir)}}function yr(f,p){if(k&&(f==":"||p=="in"))return c(Ae)}function or(f){if(k&&f==":")return A.stream.match(/^\s*\w+\s+is\b/,!1)?c(oe,gi,Ae):c(Ae)}function gi(f,p){if(p=="is")return A.marked="keyword",c()}function Ae(f,p){if(p=="keyof"||p=="typeof"||p=="infer"||p=="readonly")return A.marked="keyword",c(p=="typeof"?Te:Ae);if(f=="variable"||p=="void")return A.marked="type",c(Mt);if(p=="|"||p=="&")return c(Ae);if(f=="string"||f=="number"||f=="atom")return c(Mt);if(f=="[")return c(Y("]"),Ye(Ae,"]",","),ue,Mt);if(f=="{")return c(Y("}"),ve,ue,Mt);if(f=="(")return c(Ye(je,")"),Bn,Mt);if(f=="<")return c(Ye(Ae,">"),Ae);if(f=="quasi")return X(st,Mt)}function Bn(f){if(f=="=>")return c(Ae)}function ve(f){return f.match(/[\}\)\]]/)?c():f==","||f==";"?c(ve):X(Zt,ve)}function Zt(f,p){if(f=="variable"||A.style=="keyword")return A.marked="property",c(Zt);if(p=="?"||f=="number"||f=="string")return c(Zt);if(f==":")return c(Ae);if(f=="[")return c(be("variable"),yr,be("]"),Zt);if(f=="(")return X(sr,Zt);if(!f.match(/[;\}\)\],]/))return c()}function st(f,p){return f!="quasi"?X():p.slice(p.length-2)!="${"?c(st):c(Ae,_e)}function _e(f){if(f=="}")return A.marked="string-2",A.state.tokenize=ee,c(st)}function je(f,p){return f=="variable"&&A.stream.match(/^\s*[?:]/,!1)||p=="?"?c(je):f==":"?c(Ae):f=="spread"?c(je):X(Ae)}function Mt(f,p){if(p=="<")return c(Y(">"),Ye(Ae,">"),ue,Mt);if(p=="|"||f=="."||p=="&")return c(Ae);if(f=="[")return c(Ae,be("]"),Mt);if(p=="extends"||p=="implements")return A.marked="keyword",c(Ae);if(p=="?")return c(Ae,be(":"),Ae)}function wt(f,p){if(p=="<")return c(Y(">"),Ye(Ae,">"),ue,Mt)}function Ot(){return X(Ae,ut)}function ut(f,p){if(p=="=")return c(Ae)}function Er(f,p){return p=="enum"?(A.marked="keyword",c(se)):X(vt,ir,Nt,mi)}function vt(f,p){if(k&&Le(p))return A.marked="keyword",c(vt);if(f=="variable")return W(p),c();if(f=="spread")return c(vt);if(f=="[")return nr(on,"]");if(f=="{")return nr(lr,"}")}function lr(f,p){return f=="variable"&&!A.stream.match(/^\s*:/,!1)?(W(p),c(Nt)):(f=="variable"&&(A.marked="property"),f=="spread"?c(vt):f=="}"?X():f=="["?c(oe,be("]"),be(":"),lr):c(be(":"),vt,Nt))}function on(){return X(vt,Nt)}function Nt(f,p){if(p=="=")return c(Te)}function mi(f){if(f==",")return c(Er)}function Or(f,p){if(f=="keyword b"&&p=="else")return c(Y("form","else"),we,ue)}function Wn(f,p){if(p=="await")return c(Wn);if(f=="(")return c(Y(")"),ln,ue)}function ln(f){return f=="var"?c(Er,ar):f=="variable"?c(ar):X(ar)}function ar(f,p){return f==")"?c():f==";"?c(ar):p=="in"||p=="of"?(A.marked="keyword",c(oe,ar)):X(oe,ar)}function Et(f,p){if(p=="*")return A.marked="keyword",c(Et);if(f=="variable")return W(p),c(Et);if(f=="(")return c(h,Y(")"),Ye(Pt,")"),ue,or,we,ye);if(k&&p=="<")return c(Y(">"),Ye(Ot,">"),ue,Et)}function sr(f,p){if(p=="*")return A.marked="keyword",c(sr);if(f=="variable")return W(p),c(sr);if(f=="(")return c(h,Y(")"),Ye(Pt,")"),ue,or,ye);if(k&&p=="<")return c(Y(">"),Ye(Ot,">"),ue,sr)}function In(f,p){if(f=="keyword"||f=="variable")return A.marked="type",c(In);if(p=="<")return c(Y(">"),Ye(Ot,">"),ue)}function Pt(f,p){return p=="@"&&c(oe,Pt),f=="spread"?c(Pt):k&&Le(p)?(A.marked="keyword",c(Pt)):k&&f=="this"?c(ir,Nt):X(vt,ir,Nt)}function xi(f,p){return f=="variable"?Nr(f,p):Ht(f,p)}function Nr(f,p){if(f=="variable")return W(p),c(Ht)}function Ht(f,p){if(p=="<")return c(Y(">"),Ye(Ot,">"),ue,Ht);if(p=="extends"||p=="implements"||k&&f==",")return p=="implements"&&(A.marked="keyword"),c(k?Ae:oe,Ht);if(f=="{")return c(Y("}"),zt,ue)}function zt(f,p){if(f=="async"||f=="variable"&&(p=="static"||p=="get"||p=="set"||k&&Le(p))&&A.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return A.marked="keyword",c(zt);if(f=="variable"||A.style=="keyword")return A.marked="property",c(br,zt);if(f=="number"||f=="string")return c(br,zt);if(f=="[")return c(oe,ir,be("]"),br,zt);if(p=="*")return A.marked="keyword",c(zt);if(k&&f=="(")return X(sr,zt);if(f==";"||f==",")return c(zt);if(f=="}")return c();if(p=="@")return c(oe,zt)}function br(f,p){if(p=="!"||p=="?")return c(br);if(f==":")return c(Ae,Nt);if(p=="=")return c(Te);var N=A.state.lexical.prev,R=N&&N.info=="interface";return X(R?sr:Et)}function Pr(f,p){return p=="*"?(A.marked="keyword",c(Br,be(";"))):p=="default"?(A.marked="keyword",c(oe,be(";"))):f=="{"?c(Ye(Hr,"}"),Br,be(";")):X(we)}function Hr(f,p){if(p=="as")return A.marked="keyword",c(be("variable"));if(f=="variable")return X(Te,Hr)}function ur(f){return f=="string"?c():f=="("?X(oe):f=="."?X(De):X(zr,_t,Br)}function zr(f,p){return f=="{"?nr(zr,"}"):(f=="variable"&&W(p),p=="*"&&(A.marked="keyword"),c(an))}function _t(f){if(f==",")return c(zr,_t)}function an(f,p){if(p=="as")return A.marked="keyword",c(zr)}function Br(f,p){if(p=="from")return A.marked="keyword",c(oe)}function Ke(f){return f=="]"?c():X(Ye(Te,"]"))}function se(){return X(Y("form"),vt,be("{"),Y("}"),Ye(Qt,"}"),ue,ue)}function Qt(){return X(vt,Nt)}function sn(f,p){return f.lastType=="operator"||f.lastType==","||_.test(p.charAt(0))||/[,.]/.test(p.charAt(0))}function Dt(f,p,N){return p.tokenize==E&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(p.lastType)||p.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(N||0)))}return{startState:function(f){var p={tokenize:E,lastType:"sof",cc:[],lexical:new ce((f||0)-te,0,"block",!1),localVars:O.localVars,context:O.localVars&&new Oe(null,null,!1),indented:f||0};return O.globalVars&&typeof O.globalVars=="object"&&(p.globalVars=O.globalVars),p},token:function(f,p){if(f.sol()&&(p.lexical.hasOwnProperty("align")||(p.lexical.align=!1),p.indented=f.indentation(),ne(f,p)),p.tokenize!=z&&f.eatSpace())return null;var N=p.tokenize(f,p);return ae=="comment"?N:(p.lastType=ae=="operator"&&(D=="++"||D=="--")?"incdec":ae,Ee(p,N,ae,D,f))},indent:function(f,p){if(f.tokenize==z||f.tokenize==ee)return b.Pass;if(f.tokenize!=E)return 0;var N=p&&p.charAt(0),R=f.lexical,L;if(!/^\s*else\b/.test(p))for(var V=f.cc.length-1;V>=0;--V){var Ne=f.cc[V];if(Ne==ue)R=R.prev;else if(Ne!=Or&&Ne!=ye)break}for(;(R.type=="stat"||R.type=="form")&&(N=="}"||(L=f.cc[f.cc.length-1])&&(L==De||L==ze)&&!/^[,\.=+\-*:?[\(]/.test(p));)R=R.prev;j&&R.type==")"&&R.prev.type=="stat"&&(R=R.prev);var $e=R.type,gt=N==$e;return $e=="vardef"?R.indented+(f.lastType=="operator"||f.lastType==","?R.info.length+1:0):$e=="form"&&N=="{"?R.indented:$e=="form"?R.indented+te:$e=="stat"?R.indented+(sn(f,p)?j||te:0):R.info=="switch"&&!gt&&O.doubleIndentSwitch!=!1?R.indented+(/^(?:case|default)\b/.test(p)?te:2*te):R.align?R.column+(gt?0:1):R.indented+(gt?0:te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:C?null:"/*",blockCommentEnd:C?null:"*/",blockCommentContinue:C?null:" * ",lineComment:C?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:C?"json":"javascript",jsonldMode:J,jsonMode:C,expressionAllowed:Dt,skipExpression:function(f){Ee(f,"atom","atom","true",new b.StringStream("",2,null))}}}),b.registerHelper("wordChars","javascript",/[\w$]/),b.defineMIME("text/javascript","javascript"),b.defineMIME("text/ecmascript","javascript"),b.defineMIME("application/javascript","javascript"),b.defineMIME("application/x-javascript","javascript"),b.defineMIME("application/ecmascript","javascript"),b.defineMIME("application/json",{name:"javascript",json:!0}),b.defineMIME("application/x-json",{name:"javascript",json:!0}),b.defineMIME("application/manifest+json",{name:"javascript",json:!0}),b.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),b.defineMIME("text/typescript",{name:"javascript",typescript:!0}),b.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){b.defineMode("css",function(ce,B){var Ee=B.inline;B.propertyKeywords||(B=b.resolveMode("text/css"));var A=ce.indentUnit,X=B.tokenHooks,c=B.documentTypes||{},U=B.mediaTypes||{},W=B.mediaFeatures||{},le=B.mediaValueKeywords||{},Le=B.propertyKeywords||{},Oe=B.nonStandardPropertyKeywords||{},Re=B.fontProperties||{},g=B.counterDescriptors||{},h=B.colorKeywords||{},ie=B.valueKeywords||{},ye=B.allowNested,Y=B.lineComment,ue=B.supportsAtComponent===!0,be=ce.highlightNonStandardPropertyKeywords!==!1,we,xe;function oe(w,I){return we=I,w}function Te(w,I){var M=w.next();if(X[M]){var Me=X[M](w,I);if(Me!==!1)return Me}if(M=="@")return w.eatWhile(/[\w\\\-]/),oe("def",w.current());if(M=="="||(M=="~"||M=="|")&&w.eat("="))return oe(null,"compare");if(M=='"'||M=="'")return I.tokenize=We(M),I.tokenize(w,I);if(M=="#")return w.eatWhile(/[\w\\\-]/),oe("atom","hash");if(M=="!")return w.match(/^\s*\w*/),oe("keyword","important");if(/\d/.test(M)||M=="."&&w.eat(/\d/))return w.eatWhile(/[\w.%]/),oe("number","unit");if(M==="-"){if(/[\d.]/.test(w.peek()))return w.eatWhile(/[\w.%]/),oe("number","unit");if(w.match(/^-[\w\\\-]*/))return w.eatWhile(/[\w\\\-]/),w.match(/^\s*:/,!1)?oe("variable-2","variable-definition"):oe("variable-2","variable");if(w.match(/^\w+-/))return oe("meta","meta")}else return/[,+>*\/]/.test(M)?oe(null,"select-op"):M=="."&&w.match(/^-?[_a-z][_a-z0-9-]*/i)?oe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(M)?oe(null,M):w.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(w.current())&&(I.tokenize=Je),oe("variable callee","variable")):/[\w\\\-]/.test(M)?(w.eatWhile(/[\w\\\-]/),oe("property","word")):oe(null,null)}function We(w){return function(I,M){for(var Me=!1,at;(at=I.next())!=null;){if(at==w&&!Me){w==")"&&I.backUp(1);break}Me=!Me&&at=="\\"}return(at==w||!Me&&w!=")")&&(M.tokenize=null),oe("string","string")}}function Je(w,I){return w.next(),w.match(/^\s*[\"\')]/,!1)?I.tokenize=null:I.tokenize=We(")"),oe(null,"(")}function pt(w,I,M){this.type=w,this.indent=I,this.prev=M}function De(w,I,M,Me){return w.context=new pt(M,I.indentation()+(Me===!1?0:A),w.context),M}function ze(w){return w.context.prev&&(w.context=w.context.prev),w.context.type}function Ue(w,I,M){return Fe[M.context.type](w,I,M)}function ot(w,I,M,Me){for(var at=Me||1;at>0;at--)M.context=M.context.prev;return Ue(w,I,M)}function Se(w){var I=w.current().toLowerCase();ie.hasOwnProperty(I)?xe="atom":h.hasOwnProperty(I)?xe="keyword":xe="variable"}var Fe={};return Fe.top=function(w,I,M){if(w=="{")return De(M,I,"block");if(w=="}"&&M.context.prev)return ze(M);if(ue&&/@component/i.test(w))return De(M,I,"atComponentBlock");if(/^@(-moz-)?document$/i.test(w))return De(M,I,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(w))return De(M,I,"atBlock");if(/^@(font-face|counter-style)/i.test(w))return M.stateArg=w,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(w))return"keyframes";if(w&&w.charAt(0)=="@")return De(M,I,"at");if(w=="hash")xe="builtin";else if(w=="word")xe="tag";else{if(w=="variable-definition")return"maybeprop";if(w=="interpolation")return De(M,I,"interpolation");if(w==":")return"pseudo";if(ye&&w=="(")return De(M,I,"parens")}return M.context.type},Fe.block=function(w,I,M){if(w=="word"){var Me=I.current().toLowerCase();return Le.hasOwnProperty(Me)?(xe="property","maybeprop"):Oe.hasOwnProperty(Me)?(xe=be?"string-2":"property","maybeprop"):ye?(xe=I.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(xe+=" error","maybeprop")}else return w=="meta"?"block":!ye&&(w=="hash"||w=="qualifier")?(xe="error","block"):Fe.top(w,I,M)},Fe.maybeprop=function(w,I,M){return w==":"?De(M,I,"prop"):Ue(w,I,M)},Fe.prop=function(w,I,M){if(w==";")return ze(M);if(w=="{"&&ye)return De(M,I,"propBlock");if(w=="}"||w=="{")return ot(w,I,M);if(w=="(")return De(M,I,"parens");if(w=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(I.current()))xe+=" error";else if(w=="word")Se(I);else if(w=="interpolation")return De(M,I,"interpolation");return"prop"},Fe.propBlock=function(w,I,M){return w=="}"?ze(M):w=="word"?(xe="property","maybeprop"):M.context.type},Fe.parens=function(w,I,M){return w=="{"||w=="}"?ot(w,I,M):w==")"?ze(M):w=="("?De(M,I,"parens"):w=="interpolation"?De(M,I,"interpolation"):(w=="word"&&Se(I),"parens")},Fe.pseudo=function(w,I,M){return w=="meta"?"pseudo":w=="word"?(xe="variable-3",M.context.type):Ue(w,I,M)},Fe.documentTypes=function(w,I,M){return w=="word"&&c.hasOwnProperty(I.current())?(xe="tag",M.context.type):Fe.atBlock(w,I,M)},Fe.atBlock=function(w,I,M){if(w=="(")return De(M,I,"atBlock_parens");if(w=="}"||w==";")return ot(w,I,M);if(w=="{")return ze(M)&&De(M,I,ye?"block":"top");if(w=="interpolation")return De(M,I,"interpolation");if(w=="word"){var Me=I.current().toLowerCase();Me=="only"||Me=="not"||Me=="and"||Me=="or"?xe="keyword":U.hasOwnProperty(Me)?xe="attribute":W.hasOwnProperty(Me)?xe="property":le.hasOwnProperty(Me)?xe="keyword":Le.hasOwnProperty(Me)?xe="property":Oe.hasOwnProperty(Me)?xe=be?"string-2":"property":ie.hasOwnProperty(Me)?xe="atom":h.hasOwnProperty(Me)?xe="keyword":xe="error"}return M.context.type},Fe.atComponentBlock=function(w,I,M){return w=="}"?ot(w,I,M):w=="{"?ze(M)&&De(M,I,ye?"block":"top",!1):(w=="word"&&(xe="error"),M.context.type)},Fe.atBlock_parens=function(w,I,M){return w==")"?ze(M):w=="{"||w=="}"?ot(w,I,M,2):Fe.atBlock(w,I,M)},Fe.restricted_atBlock_before=function(w,I,M){return w=="{"?De(M,I,"restricted_atBlock"):w=="word"&&M.stateArg=="@counter-style"?(xe="variable","restricted_atBlock_before"):Ue(w,I,M)},Fe.restricted_atBlock=function(w,I,M){return w=="}"?(M.stateArg=null,ze(M)):w=="word"?(M.stateArg=="@font-face"&&!Re.hasOwnProperty(I.current().toLowerCase())||M.stateArg=="@counter-style"&&!g.hasOwnProperty(I.current().toLowerCase())?xe="error":xe="property","maybeprop"):"restricted_atBlock"},Fe.keyframes=function(w,I,M){return w=="word"?(xe="variable","keyframes"):w=="{"?De(M,I,"top"):Ue(w,I,M)},Fe.at=function(w,I,M){return w==";"?ze(M):w=="{"||w=="}"?ot(w,I,M):(w=="word"?xe="tag":w=="hash"&&(xe="builtin"),"at")},Fe.interpolation=function(w,I,M){return w=="}"?ze(M):w=="{"||w==";"?ot(w,I,M):(w=="word"?xe="variable":w!="variable"&&w!="("&&w!=")"&&(xe="error"),"interpolation")},{startState:function(w){return{tokenize:null,state:Ee?"block":"top",stateArg:null,context:new pt(Ee?"block":"top",w||0,null)}},token:function(w,I){if(!I.tokenize&&w.eatSpace())return null;var M=(I.tokenize||Te)(w,I);return M&&typeof M=="object"&&(we=M[1],M=M[0]),xe=M,we!="comment"&&(I.state=Fe[I.state](we,w,I)),xe},indent:function(w,I){var M=w.context,Me=I&&I.charAt(0),at=M.indent;return M.type=="prop"&&(Me=="}"||Me==")")&&(M=M.prev),M.prev&&(Me=="}"&&(M.type=="block"||M.type=="top"||M.type=="interpolation"||M.type=="restricted_atBlock")?(M=M.prev,at=M.indent):(Me==")"&&(M.type=="parens"||M.type=="atBlock_parens")||Me=="{"&&(M.type=="at"||M.type=="atBlock"))&&(at=Math.max(0,M.indent-A))),at},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Y,fold:"brace"}});function me(ce){for(var B={},Ee=0;Ee<ce.length;++Ee)B[ce[Ee].toLowerCase()]=!0;return B}var O=["domain","regexp","url","url-prefix"],te=me(O),j=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],J=me(j),C=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],F=me(C),k=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],K=me(k),S=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],_=me(S),G=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],de=me(G),ae=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],D=me(ae),m=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],E=me(m),H=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],z=me(H),ee=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],fe=me(ee),ne=O.concat(j).concat(C).concat(k).concat(S).concat(G).concat(H).concat(ee);b.registerHelper("hintWords","css",ne);function pe(ce,B){for(var Ee=!1,A;(A=ce.next())!=null;){if(Ee&&A=="/"){B.tokenize=null;break}Ee=A=="*"}return["comment","comment"]}b.defineMIME("text/css",{documentTypes:te,mediaTypes:J,mediaFeatures:F,mediaValueKeywords:K,propertyKeywords:_,nonStandardPropertyKeywords:de,fontProperties:D,counterDescriptors:E,colorKeywords:z,valueKeywords:fe,tokenHooks:{"/":function(ce,B){return ce.eat("*")?(B.tokenize=pe,pe(ce,B)):!1}},name:"css"}),b.defineMIME("text/x-scss",{mediaTypes:J,mediaFeatures:F,mediaValueKeywords:K,propertyKeywords:_,nonStandardPropertyKeywords:de,colorKeywords:z,valueKeywords:fe,fontProperties:D,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ce,B){return ce.eat("/")?(ce.skipToEnd(),["comment","comment"]):ce.eat("*")?(B.tokenize=pe,pe(ce,B)):["operator","operator"]},":":function(ce){return ce.match(/^\s*\{/,!1)?[null,null]:!1},$:function(ce){return ce.match(/^[\w-]+/),ce.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(ce){return ce.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),b.defineMIME("text/x-less",{mediaTypes:J,mediaFeatures:F,mediaValueKeywords:K,propertyKeywords:_,nonStandardPropertyKeywords:de,colorKeywords:z,valueKeywords:fe,fontProperties:D,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ce,B){return ce.eat("/")?(ce.skipToEnd(),["comment","comment"]):ce.eat("*")?(B.tokenize=pe,pe(ce,B)):["operator","operator"]},"@":function(ce){return ce.eat("{")?[null,"interpolation"]:ce.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(ce.eatWhile(/[\w\\\-]/),ce.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),b.defineMIME("text/x-gss",{documentTypes:te,mediaTypes:J,mediaFeatures:F,propertyKeywords:_,nonStandardPropertyKeywords:de,fontProperties:D,counterDescriptors:E,colorKeywords:z,valueKeywords:fe,supportsAtComponent:!0,tokenHooks:{"/":function(ce,B){return ce.eat("*")?(B.tokenize=pe,pe(ce,B)):!1}},name:"css",helperType:"gss"})})})();(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){var me={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=b.Pos;b.defineOption("autoCloseBrackets",!1,function(D,m,E){E&&E!=b.Init&&(D.removeKeyMap(j),D.state.closeBrackets=null),m&&(J(te(m,"pairs")),D.state.closeBrackets=m,D.addKeyMap(j))});function te(D,m){return m=="pairs"&&typeof D=="string"?D:typeof D=="object"&&D[m]!=null?D[m]:me[m]}var j={Backspace:k,Enter:K};function J(D){for(var m=0;m<D.length;m++){var E=D.charAt(m),H="'"+E+"'";j[H]||(j[H]=C(E))}}J(me.pairs+"`");function C(D){return function(m){return G(m,D)}}function F(D){var m=D.state.closeBrackets;if(!m||m.override)return m;var E=D.getModeAt(D.getCursor());return E.closeBrackets||m}function k(D){var m=F(D);if(!m||D.getOption("disableInput"))return b.Pass;for(var E=te(m,"pairs"),H=D.listSelections(),z=0;z<H.length;z++){if(!H[z].empty())return b.Pass;var ee=de(D,H[z].head);if(!ee||E.indexOf(ee)%2!=0)return b.Pass}for(var z=H.length-1;z>=0;z--){var fe=H[z].head;D.replaceRange("",O(fe.line,fe.ch-1),O(fe.line,fe.ch+1),"+delete")}}function K(D){var m=F(D),E=m&&te(m,"explode");if(!E||D.getOption("disableInput"))return b.Pass;for(var H=D.listSelections(),z=0;z<H.length;z++){if(!H[z].empty())return b.Pass;var ee=de(D,H[z].head);if(!ee||E.indexOf(ee)%2!=0)return b.Pass}D.operation(function(){var fe=D.lineSeparator()||`
`;D.replaceSelection(fe+fe,null),S(D,-1),H=D.listSelections();for(var ne=0;ne<H.length;ne++){var pe=H[ne].head.line;D.indentLine(pe,null,!0),D.indentLine(pe+1,null,!0)}})}function S(D,m){for(var E=[],H=D.listSelections(),z=0,ee=0;ee<H.length;ee++){var fe=H[ee];fe.head==D.getCursor()&&(z=ee);var ne=fe.head.ch||m>0?{line:fe.head.line,ch:fe.head.ch+m}:{line:fe.head.line-1};E.push({anchor:ne,head:ne})}D.setSelections(E,z)}function _(D){var m=b.cmpPos(D.anchor,D.head)>0;return{anchor:new O(D.anchor.line,D.anchor.ch+(m?-1:1)),head:new O(D.head.line,D.head.ch+(m?1:-1))}}function G(D,m){var E=F(D);if(!E||D.getOption("disableInput"))return b.Pass;var H=te(E,"pairs"),z=H.indexOf(m);if(z==-1)return b.Pass;for(var ee=te(E,"closeBefore"),fe=te(E,"triples"),ne=H.charAt(z+1)==m,pe=D.listSelections(),ce=z%2==0,B,Ee=0;Ee<pe.length;Ee++){var A=pe[Ee],X=A.head,c,U=D.getRange(X,O(X.line,X.ch+1));if(ce&&!A.empty())c="surround";else if((ne||!ce)&&U==m)ne&&ae(D,X)?c="both":fe.indexOf(m)>=0&&D.getRange(X,O(X.line,X.ch+3))==m+m+m?c="skipThree":c="skip";else if(ne&&X.ch>1&&fe.indexOf(m)>=0&&D.getRange(O(X.line,X.ch-2),X)==m+m){if(X.ch>2&&/\bstring/.test(D.getTokenTypeAt(O(X.line,X.ch-2))))return b.Pass;c="addFour"}else if(ne){var W=X.ch==0?" ":D.getRange(O(X.line,X.ch-1),X);if(!b.isWordChar(U)&&W!=m&&!b.isWordChar(W))c="both";else return b.Pass}else if(ce&&(U.length===0||/\s/.test(U)||ee.indexOf(U)>-1))c="both";else return b.Pass;if(!B)B=c;else if(B!=c)return b.Pass}var le=z%2?H.charAt(z-1):m,Le=z%2?m:H.charAt(z+1);D.operation(function(){if(B=="skip")S(D,1);else if(B=="skipThree")S(D,3);else if(B=="surround"){for(var Oe=D.getSelections(),Re=0;Re<Oe.length;Re++)Oe[Re]=le+Oe[Re]+Le;D.replaceSelections(Oe,"around"),Oe=D.listSelections().slice();for(var Re=0;Re<Oe.length;Re++)Oe[Re]=_(Oe[Re]);D.setSelections(Oe)}else B=="both"?(D.replaceSelection(le+Le,null),D.triggerElectric(le+Le),S(D,-1)):B=="addFour"&&(D.replaceSelection(le+le+le+le,"before"),S(D,1))})}function de(D,m){var E=D.getRange(O(m.line,m.ch-1),O(m.line,m.ch+1));return E.length==2?E:null}function ae(D,m){var E=D.getTokenAt(O(m.line,m.ch+1));return/\bstring/.test(E.type)&&E.start==m.ch&&(m.ch==0||!/\bstring/.test(D.getTokenTypeAt(m)))}})})();var pu={exports:{}};(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){var me=b.Pos;function O(m,E){return m.line-E.line||m.ch-E.ch}var te="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",j=te+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",J=new RegExp("<(/?)(["+te+"]["+j+"]*)","g");function C(m,E,H,z){this.line=E,this.ch=H,this.cm=m,this.text=m.getLine(E),this.min=z?Math.max(z.from,m.firstLine()):m.firstLine(),this.max=z?Math.min(z.to-1,m.lastLine()):m.lastLine()}function F(m,E){var H=m.cm.getTokenTypeAt(me(m.line,E));return H&&/\btag\b/.test(H)}function k(m){if(!(m.line>=m.max))return m.ch=0,m.text=m.cm.getLine(++m.line),!0}function K(m){if(!(m.line<=m.min))return m.text=m.cm.getLine(--m.line),m.ch=m.text.length,!0}function S(m){for(;;){var E=m.text.indexOf(">",m.ch);if(E==-1){if(k(m))continue;return}if(!F(m,E+1)){m.ch=E+1;continue}var H=m.text.lastIndexOf("/",E),z=H>-1&&!/\S/.test(m.text.slice(H+1,E));return m.ch=E+1,z?"selfClose":"regular"}}function _(m){for(;;){var E=m.ch?m.text.lastIndexOf("<",m.ch-1):-1;if(E==-1){if(K(m))continue;return}if(!F(m,E+1)){m.ch=E;continue}J.lastIndex=E,m.ch=E;var H=J.exec(m.text);if(H&&H.index==E)return H}}function G(m){for(;;){J.lastIndex=m.ch;var E=J.exec(m.text);if(!E){if(k(m))continue;return}if(!F(m,E.index+1)){m.ch=E.index+1;continue}return m.ch=E.index+E[0].length,E}}function de(m){for(;;){var E=m.ch?m.text.lastIndexOf(">",m.ch-1):-1;if(E==-1){if(K(m))continue;return}if(!F(m,E+1)){m.ch=E;continue}var H=m.text.lastIndexOf("/",E),z=H>-1&&!/\S/.test(m.text.slice(H+1,E));return m.ch=E+1,z?"selfClose":"regular"}}function ae(m,E){for(var H=[];;){var z=G(m),ee,fe=m.line,ne=m.ch-(z?z[0].length:0);if(!z||!(ee=S(m)))return;if(ee!="selfClose")if(z[1]){for(var pe=H.length-1;pe>=0;--pe)if(H[pe]==z[2]){H.length=pe;break}if(pe<0&&(!E||E==z[2]))return{tag:z[2],from:me(fe,ne),to:me(m.line,m.ch)}}else H.push(z[2])}}function D(m,E){for(var H=[];;){var z=de(m);if(!z)return;if(z=="selfClose"){_(m);continue}var ee=m.line,fe=m.ch,ne=_(m);if(!ne)return;if(ne[1])H.push(ne[2]);else{for(var pe=H.length-1;pe>=0;--pe)if(H[pe]==ne[2]){H.length=pe;break}if(pe<0&&(!E||E==ne[2]))return{tag:ne[2],from:me(m.line,m.ch),to:me(ee,fe)}}}}b.registerHelper("fold","xml",function(m,E){for(var H=new C(m,E.line,0);;){var z=G(H);if(!z||H.line!=E.line)return;var ee=S(H);if(!ee)return;if(!z[1]&&ee!="selfClose"){var fe=me(H.line,H.ch),ne=ae(H,z[2]);return ne&&O(ne.from,fe)>0?{from:fe,to:ne.from}:null}}}),b.findMatchingTag=function(m,E,H){var z=new C(m,E.line,E.ch,H);if(!(z.text.indexOf(">")==-1&&z.text.indexOf("<")==-1)){var ee=S(z),fe=ee&&me(z.line,z.ch),ne=ee&&_(z);if(!(!ee||!ne||O(z,E)>0)){var pe={from:me(z.line,z.ch),to:fe,tag:ne[2]};return ee=="selfClose"?{open:pe,close:null,at:"open"}:ne[1]?{open:D(z,ne[2]),close:pe,at:"close"}:(z=new C(m,fe.line,fe.ch,H),{open:pe,close:ae(z,ne[2]),at:"open"})}}},b.findEnclosingTag=function(m,E,H,z){for(var ee=new C(m,E.line,E.ch,H);;){var fe=D(ee,z);if(!fe)break;var ne=new C(m,E.line,E.ch,H),pe=ae(ne,fe.tag);if(pe)return{open:fe,close:pe}}},b.scanForClosingTag=function(m,E,H,z){var ee=new C(m,E.line,E.ch,z?{from:0,to:z}:null);return ae(ee,H)}})})();(function(Tt,Ft){(function(b){b(Lt.exports,pu.exports)})(function(b){b.defineOption("autoCloseTags",!1,function(k,K,S){if(S!=b.Init&&S&&k.removeKeyMap("autoCloseTags"),!!K){var _={name:"autoCloseTags"};(typeof K!="object"||K.whenClosing!==!1)&&(_["'/'"]=function(G){return J(G)}),(typeof K!="object"||K.whenOpening!==!1)&&(_["'>'"]=function(G){return te(G)}),k.addKeyMap(_)}});var me=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function te(k){if(k.getOption("disableInput"))return b.Pass;for(var K=k.listSelections(),S=[],_=k.getOption("autoCloseTags"),G=0;G<K.length;G++){if(!K[G].empty())return b.Pass;var de=K[G].head,ae=k.getTokenAt(de),D=b.innerMode(k.getMode(),ae.state),m=D.state,E=D.mode.xmlCurrentTag&&D.mode.xmlCurrentTag(m),H=E&&E.name;if(!H)return b.Pass;var z=D.mode.configuration=="html",ee=typeof _=="object"&&_.dontCloseTags||z&&me,fe=typeof _=="object"&&_.indentTags||z&&O;ae.end>de.ch&&(H=H.slice(0,H.length-ae.end+de.ch));var ne=H.toLowerCase();if(!H||ae.type=="string"&&(ae.end!=de.ch||!/[\"\']/.test(ae.string.charAt(ae.string.length-1))||ae.string.length==1)||ae.type=="tag"&&E.close||ae.string.indexOf("/")==de.ch-ae.start-1||ee&&C(ee,ne)>-1||F(k,D.mode.xmlCurrentContext&&D.mode.xmlCurrentContext(m)||[],H,de,!0))return b.Pass;var pe=typeof _=="object"&&_.emptyTags;if(pe&&C(pe,H)>-1){S[G]={text:"/>",newPos:b.Pos(de.line,de.ch+2)};continue}var ce=fe&&C(fe,ne)>-1;S[G]={indent:ce,text:">"+(ce?`
`:"")+"</"+H+">",newPos:ce?b.Pos(de.line+1,0):b.Pos(de.line,de.ch+1)}}for(var B=typeof _=="object"&&_.dontIndentOnAutoClose,G=K.length-1;G>=0;G--){var Ee=S[G];k.replaceRange(Ee.text,K[G].head,K[G].anchor,"+insert");var A=k.listSelections().slice(0);A[G]={head:Ee.newPos,anchor:Ee.newPos},k.setSelections(A),!B&&Ee.indent&&(k.indentLine(Ee.newPos.line,null,!0),k.indentLine(Ee.newPos.line+1,null,!0))}}function j(k,K){for(var S=k.listSelections(),_=[],G=K?"/":"</",de=k.getOption("autoCloseTags"),ae=typeof de=="object"&&de.dontIndentOnSlash,D=0;D<S.length;D++){if(!S[D].empty())return b.Pass;var m=S[D].head,E=k.getTokenAt(m),H=b.innerMode(k.getMode(),E.state),z=H.state;if(K&&(E.type=="string"||E.string.charAt(0)!="<"||E.start!=m.ch-1))return b.Pass;var ee,fe=H.mode.name!="xml"&&k.getMode().name=="htmlmixed";if(fe&&H.mode.name=="javascript")ee=G+"script";else if(fe&&H.mode.name=="css")ee=G+"style";else{var ne=H.mode.xmlCurrentContext&&H.mode.xmlCurrentContext(z),pe=ne.length?ne[ne.length-1]:"";if(!ne||ne.length&&F(k,ne,pe,m))return b.Pass;ee=G+pe}k.getLine(m.line).charAt(E.end)!=">"&&(ee+=">"),_[D]=ee}if(k.replaceSelections(_),S=k.listSelections(),!ae)for(var D=0;D<S.length;D++)(D==S.length-1||S[D].head.line<S[D+1].head.line)&&k.indentLine(S[D].head.line)}function J(k){return k.getOption("disableInput")?b.Pass:j(k,!0)}b.commands.closeTag=function(k){return j(k)};function C(k,K){if(k.indexOf)return k.indexOf(K);for(var S=0,_=k.length;S<_;++S)if(k[S]==K)return S;return-1}function F(k,K,S,_,G){if(!b.scanForClosingTag)return!1;var de=Math.min(k.lastLine()+1,_.line+500),ae=b.scanForClosingTag(k,_,null,de);if(!ae||ae.tag!=S)return!1;for(var D=G?1:0,m=K.length-1;m>=0&&K[m]==S;m--)++D;_=ae.to;for(var m=1;m<D;m++){var E=b.scanForClosingTag(k,_,null,de);if(!E||E.tag!=S)return!1;_=E.to}return!0}})})();(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){var me=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),O=b.Pos,te={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function j(S){return S&&S.bracketRegex||/[(){}[\]]/}function J(S,_,G){var de=S.getLineHandle(_.line),ae=_.ch-1,D=G&&G.afterCursor;D==null&&(D=/(^| )cm-fat-cursor($| )/.test(S.getWrapperElement().className));var m=j(G),E=!D&&ae>=0&&m.test(de.text.charAt(ae))&&te[de.text.charAt(ae)]||m.test(de.text.charAt(ae+1))&&te[de.text.charAt(++ae)];if(!E)return null;var H=E.charAt(1)==">"?1:-1;if(G&&G.strict&&H>0!=(ae==_.ch))return null;var z=S.getTokenTypeAt(O(_.line,ae+1)),ee=C(S,O(_.line,ae+(H>0?1:0)),H,z,G);return ee==null?null:{from:O(_.line,ae),to:ee&&ee.pos,match:ee&&ee.ch==E.charAt(0),forward:H>0}}function C(S,_,G,de,ae){for(var D=ae&&ae.maxScanLineLength||1e4,m=ae&&ae.maxScanLines||1e3,E=[],H=j(ae),z=G>0?Math.min(_.line+m,S.lastLine()+1):Math.max(S.firstLine()-1,_.line-m),ee=_.line;ee!=z;ee+=G){var fe=S.getLine(ee);if(!!fe){var ne=G>0?0:fe.length-1,pe=G>0?fe.length:-1;if(!(fe.length>D))for(ee==_.line&&(ne=_.ch-(G<0?1:0));ne!=pe;ne+=G){var ce=fe.charAt(ne);if(H.test(ce)&&(de===void 0||(S.getTokenTypeAt(O(ee,ne+1))||"")==(de||""))){var B=te[ce];if(B&&B.charAt(1)==">"==G>0)E.push(ce);else if(E.length)E.pop();else return{pos:O(ee,ne),ch:ce}}}}}return ee-G==(G>0?S.lastLine():S.firstLine())?!1:null}function F(S,_,G){for(var de=S.state.matchBrackets.maxHighlightLineLength||1e3,ae=G&&G.highlightNonMatching,D=[],m=S.listSelections(),E=0;E<m.length;E++){var H=m[E].empty()&&J(S,m[E].head,G);if(H&&(H.match||ae!==!1)&&S.getLine(H.from.line).length<=de){var z=H.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";D.push(S.markText(H.from,O(H.from.line,H.from.ch+1),{className:z})),H.to&&S.getLine(H.to.line).length<=de&&D.push(S.markText(H.to,O(H.to.line,H.to.ch+1),{className:z}))}}if(D.length){me&&S.state.focused&&S.focus();var ee=function(){S.operation(function(){for(var fe=0;fe<D.length;fe++)D[fe].clear()})};if(_)setTimeout(ee,800);else return ee}}function k(S){S.operation(function(){S.state.matchBrackets.currentlyHighlighted&&(S.state.matchBrackets.currentlyHighlighted(),S.state.matchBrackets.currentlyHighlighted=null),S.state.matchBrackets.currentlyHighlighted=F(S,!1,S.state.matchBrackets)})}function K(S){S.state.matchBrackets&&S.state.matchBrackets.currentlyHighlighted&&(S.state.matchBrackets.currentlyHighlighted(),S.state.matchBrackets.currentlyHighlighted=null)}b.defineOption("matchBrackets",!1,function(S,_,G){G&&G!=b.Init&&(S.off("cursorActivity",k),S.off("focus",k),S.off("blur",K),K(S)),_&&(S.state.matchBrackets=typeof _=="object"?_:{},S.on("cursorActivity",k),S.on("focus",k),S.on("blur",K))}),b.defineExtension("matchBrackets",function(){F(this,!0)}),b.defineExtension("findMatchingBracket",function(S,_,G){return(G||typeof _=="boolean")&&(G?(G.strict=_,_=G):_=_?{strict:!0}:null),J(this,S,_)}),b.defineExtension("scanForBracket",function(S,_,G,de){return C(this,S,_,G,de)})})})();(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){b.defineOption("placeholder","",function(F,k,K){var S=K&&K!=b.Init;if(k&&!S)F.on("blur",j),F.on("change",J),F.on("swapDoc",J),b.on(F.getInputField(),"compositionupdate",F.state.placeholderCompose=function(){te(F)}),J(F);else if(!k&&S){F.off("blur",j),F.off("change",J),F.off("swapDoc",J),b.off(F.getInputField(),"compositionupdate",F.state.placeholderCompose),me(F);var _=F.getWrapperElement();_.className=_.className.replace(" CodeMirror-empty","")}k&&!F.hasFocus()&&j(F)});function me(F){F.state.placeholder&&(F.state.placeholder.parentNode.removeChild(F.state.placeholder),F.state.placeholder=null)}function O(F){me(F);var k=F.state.placeholder=document.createElement("pre");k.style.cssText="height: 0; overflow: visible",k.style.direction=F.getOption("direction"),k.className="CodeMirror-placeholder CodeMirror-line-like";var K=F.getOption("placeholder");typeof K=="string"&&(K=document.createTextNode(K)),k.appendChild(K),F.display.lineSpace.insertBefore(k,F.display.lineSpace.firstChild)}function te(F){setTimeout(function(){var k=!1;if(F.lineCount()==1){var K=F.getInputField();k=K.nodeName=="TEXTAREA"?!F.getLine(0).length:!/[^\u200b]/.test(K.querySelector(".CodeMirror-line").textContent)}k?O(F):me(F)},20)}function j(F){C(F)&&O(F)}function J(F){var k=F.getWrapperElement(),K=C(F);k.className=k.className.replace(" CodeMirror-empty","")+(K?" CodeMirror-empty":""),K?O(F):me(F)}function C(F){return F.lineCount()===1&&F.getLine(0)===""}})})();(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){var me="CodeMirror-activeline",O="CodeMirror-activeline-background",te="CodeMirror-activeline-gutter";b.defineOption("styleActiveLine",!1,function(k,K,S){var _=S==b.Init?!1:S;K!=_&&(_&&(k.off("beforeSelectionChange",F),j(k),delete k.state.activeLines),K&&(k.state.activeLines=[],C(k,k.listSelections()),k.on("beforeSelectionChange",F)))});function j(k){for(var K=0;K<k.state.activeLines.length;K++)k.removeLineClass(k.state.activeLines[K],"wrap",me),k.removeLineClass(k.state.activeLines[K],"background",O),k.removeLineClass(k.state.activeLines[K],"gutter",te)}function J(k,K){if(k.length!=K.length)return!1;for(var S=0;S<k.length;S++)if(k[S]!=K[S])return!1;return!0}function C(k,K){for(var S=[],_=0;_<K.length;_++){var G=K[_],de=k.getOption("styleActiveLine");if(!(typeof de=="object"&&de.nonEmpty?G.anchor.line!=G.head.line:!G.empty())){var ae=k.getLineHandleVisualStart(G.head.line);S[S.length-1]!=ae&&S.push(ae)}}J(k.state.activeLines,S)||k.operation(function(){j(k);for(var D=0;D<S.length;D++)k.addLineClass(S[D],"wrap",me),k.addLineClass(S[D],"background",O),k.addLineClass(S[D],"gutter",te);k.state.activeLines=S})}function F(k,K){C(k,K.ranges)}})})();(function(Tt,Ft){(function(b){b(Lt.exports)})(function(b){function me(j,J,C){this.orientation=J,this.scroll=C,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=j+"-"+J,this.inner=this.node.appendChild(document.createElement("div"));var F=this;b.on(this.inner,"mousedown",function(K){if(K.which!=1)return;b.e_preventDefault(K);var S=F.orientation=="horizontal"?"pageX":"pageY",_=K[S],G=F.pos;function de(){b.off(document,"mousemove",ae),b.off(document,"mouseup",de)}function ae(D){if(D.which!=1)return de();F.moveTo(G+(D[S]-_)*(F.total/F.size))}b.on(document,"mousemove",ae),b.on(document,"mouseup",de)}),b.on(this.node,"click",function(K){b.e_preventDefault(K);var S=F.inner.getBoundingClientRect(),_;F.orientation=="horizontal"?_=K.clientX<S.left?-1:K.clientX>S.right?1:0:_=K.clientY<S.top?-1:K.clientY>S.bottom?1:0,F.moveTo(F.pos+_*F.screen)});function k(K){var S=b.wheelEventPixels(K)[F.orientation=="horizontal"?"x":"y"],_=F.pos;F.moveTo(F.pos+S),F.pos!=_&&b.e_preventDefault(K)}b.on(this.node,"mousewheel",k),b.on(this.node,"DOMMouseScroll",k)}me.prototype.setPos=function(j,J){return j<0&&(j=0),j>this.total-this.screen&&(j=this.total-this.screen),!J&&j==this.pos?!1:(this.pos=j,this.inner.style[this.orientation=="horizontal"?"left":"top"]=j*(this.size/this.total)+"px",!0)},me.prototype.moveTo=function(j){this.setPos(j)&&this.scroll(j,this.orientation)};var O=10;me.prototype.update=function(j,J,C){var F=this.screen!=J||this.total!=j||this.size!=C;F&&(this.screen=J,this.total=j,this.size=C);var k=this.screen*(this.size/this.total);k<O&&(this.size-=O-k,k=O),this.inner.style[this.orientation=="horizontal"?"width":"height"]=k+"px",this.setPos(this.pos,F)};function te(j,J,C){this.addClass=j,this.horiz=new me(j,"horizontal",C),J(this.horiz.node),this.vert=new me(j,"vertical",C),J(this.vert.node),this.width=null}te.prototype.update=function(j){if(this.width==null){var J=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;J&&(this.width=parseInt(J.height))}var C=this.width||0,F=j.scrollWidth>j.clientWidth+1,k=j.scrollHeight>j.clientHeight+1;return this.vert.node.style.display=k?"block":"none",this.horiz.node.style.display=F?"block":"none",k&&(this.vert.update(j.scrollHeight,j.clientHeight,j.viewHeight-(F?C:0)),this.vert.node.style.bottom=F?C+"px":"0"),F&&(this.horiz.update(j.scrollWidth,j.clientWidth,j.viewWidth-(k?C:0)-j.barLeft),this.horiz.node.style.right=k?C+"px":"0",this.horiz.node.style.left=j.barLeft+"px"),{right:k?C:0,bottom:F?C:0}},te.prototype.setScrollTop=function(j){this.vert.setPos(j)},te.prototype.setScrollLeft=function(j){this.horiz.setPos(j)},te.prototype.clear=function(){var j=this.horiz.node.parentNode;j.removeChild(this.horiz.node),j.removeChild(this.vert.node)},b.scrollbarModel.simple=function(j,J){return new te("CodeMirror-simplescroll",j,J)},b.scrollbarModel.overlay=function(j,J){return new te("CodeMirror-overlayscroll",j,J)}})})();export{gu as C};