UNPKG

@rero/sonar-ui

Version:

User interface for SONAR.

1 lines 2.73 MB
var xee=Object.create,lA=Object.freeze,tb=Object.defineProperty,Cee=Object.defineProperties,wee=Object.getOwnPropertyDescriptor,See=Object.getOwnPropertyDescriptors,Dee=Object.getOwnPropertyNames,eb=Object.getOwnPropertySymbols,Tee=Object.getPrototypeOf,wT=Object.prototype.hasOwnProperty,cA=Object.prototype.propertyIsEnumerable;var CT=(e,t,n)=>t in e?tb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q=(e,t)=>{for(var n in t||(t={}))wT.call(t,n)&&CT(e,n,t[n]);if(eb)for(var n of eb(t))cA.call(t,n)&&CT(e,n,t[n]);return e},$e=(e,t)=>Cee(e,See(t));var nb=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ib=e=>typeof e=="symbol"?e:e+"",Ho=(e,t)=>{var n={};for(var i in e)wT.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&eb)for(var i of eb(e))t.indexOf(i)<0&&cA.call(e,i)&&(n[i]=e[i]);return n};var Gt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var kee=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Dee(t))!wT.call(e,o)&&o!==n&&tb(e,o,{get:()=>t[o],enumerable:!(i=wee(t,o))||i.enumerable});return e};var uA=(e,t,n)=>(n=e!=null?xee(Tee(e)):{},kee(t||!e||!e.__esModule?tb(n,"default",{value:e,enumerable:!0}):n,e));var l=(e,t,n)=>CT(e,typeof t!="symbol"?t+"":t,n);var xh=(e,t)=>lA(tb(e,"raw",{value:lA(t||e.slice())}));var Ua=Gt((Q5,Z5)=>{(function(e,t){typeof Q5=="object"&&typeof Z5<"u"?Z5.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(Q5,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),i=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),r=/Edge\/(\d+)/.exec(e),a=i||o||r,s=a&&(i?document.documentMode||6:+(r||o)[1]),c=!r&&/WebKit\//.test(e),d=c&&/Qt\/\d+\.\d+/.test(e),f=!r&&/Chrome\/(\d+)/.exec(e),g=f&&+f[1],v=/Opera\//.test(e),b=/Apple Computer/.test(navigator.vendor),C=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),T=/PhantomJS/.test(e),D=b&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),k=/Android/.test(e),I=D||k||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),B=D||/Mac/.test(t),V=/\bCrOS\b/.test(e),j=/win/i.test(t),Y=v&&e.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(v=!1,c=!0);var re=B&&(d||v&&(Y==null||Y<12.11)),ye=n||a&&s>=9;function ae(u){return new RegExp("(^|\\s)"+u+"(?:$|\\s)\\s*")}var Ae=function(u,p){var m=u.className,h=ae(p).exec(m);if(h){var y=m.slice(h.index+h[0].length);u.className=m.slice(0,h.index)+(y?h[1]+y:"")}};function fe(u){for(var p=u.childNodes.length;p>0;--p)u.removeChild(u.firstChild);return u}function Se(u,p){return fe(u).appendChild(p)}function X(u,p,m,h){var y=document.createElement(u);if(m&&(y.className=m),h&&(y.style.cssText=h),typeof p=="string")y.appendChild(document.createTextNode(p));else if(p)for(var w=0;w<p.length;++w)y.appendChild(p[w]);return y}function ce(u,p,m,h){var y=X(u,p,m,h);return y.setAttribute("role","presentation"),y}var ke;document.createRange?ke=function(u,p,m,h){var y=document.createRange();return y.setEnd(h||u,m),y.setStart(u,p),y}:ke=function(u,p,m){var h=document.body.createTextRange();try{h.moveToElementText(u.parentNode)}catch(y){return h}return h.collapse(!0),h.moveEnd("character",m),h.moveStart("character",p),h};function Re(u,p){if(p.nodeType==3&&(p=p.parentNode),u.contains)return u.contains(p);do if(p.nodeType==11&&(p=p.host),p==u)return!0;while(p=p.parentNode)}function tt(u){var p=u.ownerDocument||u,m;try{m=u.activeElement}catch(h){m=p.body||null}for(;m&&m.shadowRoot&&m.shadowRoot.activeElement;)m=m.shadowRoot.activeElement;return m}function It(u,p){var m=u.className;ae(p).test(m)||(u.className+=(m?" ":"")+p)}function Ve(u,p){for(var m=u.split(" "),h=0;h<m.length;h++)m[h]&&!ae(m[h]).test(p)&&(p+=" "+m[h]);return p}var Q=function(u){u.select()};D?Q=function(u){u.selectionStart=0,u.selectionEnd=u.value.length}:a&&(Q=function(u){try{u.select()}catch(p){}});function z(u){return u.display.wrapper.ownerDocument}function Te(u){return Tt(u.display.wrapper)}function Tt(u){return u.getRootNode?u.getRootNode():u.ownerDocument}function _t(u){return z(u).defaultView}function Bn(u){var p=Array.prototype.slice.call(arguments,1);return function(){return u.apply(null,p)}}function Ht(u,p,m){p||(p={});for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(m!==!1||!Object.prototype.hasOwnProperty.call(p,h))&&(p[h]=u[h]);return p}function $n(u,p,m,h,y){p==null&&(p=u.search(/[^\s\u00a0]/),p==-1&&(p=u.length));for(var w=h||0,E=y||0;;){var A=u.indexOf(" ",w);if(A<0||A>=p)return E+(p-w);E+=A-w,E+=m-E%m,w=A+1}}var Ci=function(){this.id=null,this.f=null,this.time=0,this.handler=Bn(this.onTimeout,this)};Ci.prototype.onTimeout=function(u){u.id=0,u.time<=+new Date?u.f():setTimeout(u.handler,u.time-+new Date)},Ci.prototype.set=function(u,p){this.f=p;var m=+new Date+u;(!this.id||m<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,u),this.time=m)};function On(u,p){for(var m=0;m<u.length;++m)if(u[m]==p)return m;return-1}var jn=50,Rn={toString:function(){return"CodeMirror.Pass"}},Un={scroll:!1},Do={origin:"*mouse"},pr={origin:"+move"};function Gr(u,p,m){for(var h=0,y=0;;){var w=u.indexOf(" ",h);w==-1&&(w=u.length);var E=w-h;if(w==u.length||y+E>=p)return h+Math.min(E,p-y);if(y+=w-h,y+=m-y%m,h=w+1,y>=p)return h}}var kr=[""];function Po(u){for(;kr.length<=u;)kr.push(dn(kr)+" ");return kr[u]}function dn(u){return u[u.length-1]}function wi(u,p){for(var m=[],h=0;h<u.length;h++)m[h]=p(u[h],h);return m}function Si(u,p,m){for(var h=0,y=m(p);h<u.length&&m(u[h])<=y;)h++;u.splice(h,0,p)}function To(){}function Zs(u,p){var m;return Object.create?m=Object.create(u):(To.prototype=u,m=new To),p&&Ht(p,m),m}var jl=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ea(u){return/\w/.test(u)||u>"\x80"&&(u.toUpperCase()!=u.toLowerCase()||jl.test(u))}function Ka(u,p){return p?p.source.indexOf("\\w")>-1&&ea(u)?!0:p.test(u):ea(u)}function Kf(u){for(var p in u)if(u.hasOwnProperty(p)&&u[p])return!1;return!0}var Yf=/[\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 Xs(u){return u.charCodeAt(0)>=768&&Yf.test(u)}function Ta(u,p,m){for(;(m<0?p>0:p<u.length)&&Xs(u.charAt(p));)p+=m;return p}function Js(u,p,m){for(var h=p>m?-1:1;;){if(p==m)return p;var y=(p+m)/2,w=h<0?Math.ceil(y):Math.floor(y);if(w==p)return u(w)?p:m;u(w)?m=w:p=w+h}}function gD(u,p,m,h){if(!u)return h(p,m,"ltr",0);for(var y=!1,w=0;w<u.length;++w){var E=u[w];(E.from<m&&E.to>p||p==m&&E.to==p)&&(h(Math.max(E.from,p),Math.min(E.to,m),E.level==1?"rtl":"ltr",w),y=!0)}y||h(p,m,"ltr")}var Ru=null;function Lu(u,p,m){var h;Ru=null;for(var y=0;y<u.length;++y){var w=u[y];if(w.from<p&&w.to>p)return y;w.to==p&&(w.from!=w.to&&m=="before"?h=y:Ru=y),w.from==p&&(w.from!=w.to&&m!="before"?h=y:Ru=y)}return h!=null?h:Ru}var vD=(function(){var u="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",p="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function m($){return $<=247?u.charAt($):1424<=$&&$<=1524?"R":1536<=$&&$<=1785?p.charAt($-1536):1774<=$&&$<=2220?"r":8192<=$&&$<=8203?"w":$==8204?"b":"L"}var h=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,y=/[stwN]/,w=/[LRr]/,E=/[Lb1n]/,A=/[1n]/;function N($,Z,ne){this.level=$,this.from=Z,this.to=ne}return function($,Z){var ne=Z=="ltr"?"L":"R";if($.length==0||Z=="ltr"&&!h.test($))return!1;for(var Ce=$.length,ge=[],Le=0;Le<Ce;++Le)ge.push(m($.charCodeAt(Le)));for(var Ue=0,Ze=ne;Ue<Ce;++Ue){var ot=ge[Ue];ot=="m"?ge[Ue]=Ze:Ze=ot}for(var gt=0,at=ne;gt<Ce;++gt){var St=ge[gt];St=="1"&&at=="r"?ge[gt]="n":w.test(St)&&(at=St,St=="r"&&(ge[gt]="R"))}for(var jt=1,Bt=ge[0];jt<Ce-1;++jt){var kn=ge[jt];kn=="+"&&Bt=="1"&&ge[jt+1]=="1"?ge[jt]="1":kn==","&&Bt==ge[jt+1]&&(Bt=="1"||Bt=="n")&&(ge[jt]=Bt),Bt=kn}for(var Di=0;Di<Ce;++Di){var Zr=ge[Di];if(Zr==",")ge[Di]="N";else if(Zr=="%"){var or=void 0;for(or=Di+1;or<Ce&&ge[or]=="%";++or);for(var Ia=Di&&ge[Di-1]=="!"||or<Ce&&ge[or]=="1"?"1":"N",ra=Di;ra<or;++ra)ge[ra]=Ia;Di=or-1}}for(var Mr=0,oa=ne;Mr<Ce;++Mr){var fo=ge[Mr];oa=="L"&&fo=="1"?ge[Mr]="L":w.test(fo)&&(oa=fo)}for(var Nr=0;Nr<Ce;++Nr)if(y.test(ge[Nr])){var Ar=void 0;for(Ar=Nr+1;Ar<Ce&&y.test(ge[Ar]);++Ar);for(var fr=(Nr?ge[Nr-1]:ne)=="L",aa=(Ar<Ce?ge[Ar]:ne)=="L",bh=fr==aa?fr?"L":"R":ne,qu=Nr;qu<Ar;++qu)ge[qu]=bh;Nr=Ar-1}for(var Io=[],Yl,Xr=0;Xr<Ce;)if(E.test(ge[Xr])){var _T=Xr;for(++Xr;Xr<Ce&&E.test(ge[Xr]);++Xr);Io.push(new N(0,_T,Xr))}else{var $c=Xr,Cp=Io.length,wp=Z=="rtl"?1:0;for(++Xr;Xr<Ce&&ge[Xr]!="L";++Xr);for(var zo=$c;zo<Xr;)if(A.test(ge[zo])){$c<zo&&(Io.splice(Cp,0,new N(1,$c,zo)),Cp+=wp);var _h=zo;for(++zo;zo<Xr&&A.test(ge[zo]);++zo);Io.splice(Cp,0,new N(2,_h,zo)),Cp+=wp,$c=zo}else++zo;$c<Xr&&Io.splice(Cp,0,new N(1,$c,Xr))}return Z=="ltr"&&(Io[0].level==1&&(Yl=$.match(/^\s+/))&&(Io[0].from=Yl[0].length,Io.unshift(new N(0,0,Yl[0].length))),dn(Io).level==1&&(Yl=$.match(/\s+$/))&&(dn(Io).to-=Yl[0].length,Io.push(new N(0,Ce-Yl[0].length,Ce)))),Z=="rtl"?Io.reverse():Io}})();function el(u,p){var m=u.order;return m==null&&(m=u.order=vD(u.text,p)),m}var Hm=[],Wt=function(u,p,m){if(u.addEventListener)u.addEventListener(p,m,!1);else if(u.attachEvent)u.attachEvent("on"+p,m);else{var h=u._handlers||(u._handlers={});h[p]=(h[p]||Hm).concat(m)}};function Qf(u,p){return u._handlers&&u._handlers[p]||Hm}function ta(u,p,m){if(u.removeEventListener)u.removeEventListener(p,m,!1);else if(u.detachEvent)u.detachEvent("on"+p,m);else{var h=u._handlers,y=h&&h[p];if(y){var w=On(y,m);w>-1&&(h[p]=y.slice(0,w).concat(y.slice(w+1)))}}}function rr(u,p){var m=Qf(u,p);if(m.length)for(var h=Array.prototype.slice.call(arguments,2),y=0;y<m.length;++y)m[y].apply(null,h)}function Er(u,p,m){return typeof p=="string"&&(p={type:p,preventDefault:function(){this.defaultPrevented=!0}}),rr(u,m||p.type,u,p),Zf(p)||p.codemirrorIgnore}function by(u){var p=u._handlers&&u._handlers.cursorActivity;if(p)for(var m=u.curOp.cursorActivityHandlers||(u.curOp.cursorActivityHandlers=[]),h=0;h<p.length;++h)On(m,p[h])==-1&&m.push(p[h])}function ka(u,p){return Qf(u,p).length>0}function Nc(u){u.prototype.on=function(p,m){Wt(this,p,m)},u.prototype.off=function(p,m){ta(this,p,m)}}function ko(u){u.preventDefault?u.preventDefault():u.returnValue=!1}function _y(u){u.stopPropagation?u.stopPropagation():u.cancelBubble=!0}function Zf(u){return u.defaultPrevented!=null?u.defaultPrevented:u.returnValue==!1}function up(u){ko(u),_y(u)}function Xf(u){return u.target||u.srcElement}function Vo(u){var p=u.which;return p==null&&(u.button&1?p=1:u.button&2?p=3:u.button&4&&(p=2)),B&&u.ctrlKey&&p==1&&(p=3),p}var Ul=(function(){if(a&&s<9)return!1;var u=X("div");return"draggable"in u||"dragDrop"in u})(),Jf;function yD(u){if(Jf==null){var p=X("span","\u200B");Se(u,X("span",[p,document.createTextNode("x")])),u.firstChild.offsetHeight!=0&&(Jf=p.offsetWidth<=1&&p.offsetHeight>2&&!(a&&s<8))}var m=Jf?X("span","\u200B"):X("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return m.setAttribute("cm-text",""),m}var bD;function mX(u){if(bD!=null)return bD;var p=Se(u,document.createTextNode("A\u062EA")),m=ke(p,0,1).getBoundingClientRect(),h=ke(p,1,2).getBoundingClientRect();return fe(u),!m||m.left==m.right?!1:bD=h.right-m.right<3}var _D="\n\nb".split(/\n/).length!=3?function(u){for(var p=0,m=[],h=u.length;p<=h;){var y=u.indexOf("\n",p);y==-1&&(y=u.length);var w=u.slice(p,u.charAt(y-1)=="\r"?y-1:y),E=w.indexOf("\r");E!=-1?(m.push(w.slice(0,E)),p+=E+1):(m.push(w),p=y+1)}return m}:function(u){return u.split(/\r\n?|\n/)},gX=window.getSelection?function(u){try{return u.selectionStart!=u.selectionEnd}catch(p){return!1}}:function(u){var p;try{p=u.ownerDocument.selection.createRange()}catch(m){}return!p||p.parentElement()!=u?!1:p.compareEndPoints("StartToEnd",p)!=0},vX=(function(){var u=X("div");return"oncopy"in u?!0:(u.setAttribute("oncopy","return;"),typeof u.oncopy=="function")})(),xD=null;function yX(u){if(xD!=null)return xD;var p=Se(u,X("span","x")),m=p.getBoundingClientRect(),h=ke(p,0,1).getBoundingClientRect();return xD=Math.abs(m.left-h.left)>1}var CD={},eh={};function bX(u,p){arguments.length>2&&(p.dependencies=Array.prototype.slice.call(arguments,2)),CD[u]=p}function _X(u,p){eh[u]=p}function xy(u){if(typeof u=="string"&&eh.hasOwnProperty(u))u=eh[u];else if(u&&typeof u.name=="string"&&eh.hasOwnProperty(u.name)){var p=eh[u.name];typeof p=="string"&&(p={name:p}),u=Zs(p,u),u.name=p.name}else{if(typeof u=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(u))return xy("application/xml");if(typeof u=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(u))return xy("application/json")}return typeof u=="string"?{name:u}:u||{name:"null"}}function wD(u,p){p=xy(p);var m=CD[p.name];if(!m)return wD(u,"text/plain");var h=m(u,p);if(th.hasOwnProperty(p.name)){var y=th[p.name];for(var w in y)y.hasOwnProperty(w)&&(h.hasOwnProperty(w)&&(h["_"+w]=h[w]),h[w]=y[w])}if(h.name=p.name,p.helperType&&(h.helperType=p.helperType),p.modeProps)for(var E in p.modeProps)h[E]=p.modeProps[E];return h}var th={};function xX(u,p){var m=th.hasOwnProperty(u)?th[u]:th[u]={};Ht(p,m)}function dp(u,p){if(p===!0)return p;if(u.copyState)return u.copyState(p);var m={};for(var h in p){var y=p[h];y instanceof Array&&(y=y.concat([])),m[h]=y}return m}function SD(u,p){for(var m;u.innerMode&&(m=u.innerMode(p),!(!m||m.mode==u));)p=m.state,u=m.mode;return m||{mode:u,state:p}}function l8(u,p,m){return u.startState?u.startState(p,m):!0}var Ir=function(u,p,m){this.pos=this.start=0,this.string=u,this.tabSize=p||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=m};Ir.prototype.eol=function(){return this.pos>=this.string.length},Ir.prototype.sol=function(){return this.pos==this.lineStart},Ir.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ir.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ir.prototype.eat=function(u){var p=this.string.charAt(this.pos),m;if(typeof u=="string"?m=p==u:m=p&&(u.test?u.test(p):u(p)),m)return++this.pos,p},Ir.prototype.eatWhile=function(u){for(var p=this.pos;this.eat(u););return this.pos>p},Ir.prototype.eatSpace=function(){for(var u=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>u},Ir.prototype.skipToEnd=function(){this.pos=this.string.length},Ir.prototype.skipTo=function(u){var p=this.string.indexOf(u,this.pos);if(p>-1)return this.pos=p,!0},Ir.prototype.backUp=function(u){this.pos-=u},Ir.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=$n(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?$n(this.string,this.lineStart,this.tabSize):0)},Ir.prototype.indentation=function(){return $n(this.string,null,this.tabSize)-(this.lineStart?$n(this.string,this.lineStart,this.tabSize):0)},Ir.prototype.match=function(u,p,m){if(typeof u=="string"){var h=function(E){return m?E.toLowerCase():E},y=this.string.substr(this.pos,u.length);if(h(y)==h(u))return p!==!1&&(this.pos+=u.length),!0}else{var w=this.string.slice(this.pos).match(u);return w&&w.index>0?null:(w&&p!==!1&&(this.pos+=w[0].length),w)}},Ir.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ir.prototype.hideFirstChars=function(u,p){this.lineStart+=u;try{return p()}finally{this.lineStart-=u}},Ir.prototype.lookAhead=function(u){var p=this.lineOracle;return p&&p.lookAhead(u)},Ir.prototype.baseToken=function(){var u=this.lineOracle;return u&&u.baseToken(this.pos)};function Lt(u,p){if(p-=u.first,p<0||p>=u.size)throw new Error("There is no line "+(p+u.first)+" in the document.");for(var m=u;!m.lines;)for(var h=0;;++h){var y=m.children[h],w=y.chunkSize();if(p<w){m=y;break}p-=w}return m.lines[p]}function pp(u,p,m){var h=[],y=p.line;return u.iter(p.line,m.line+1,function(w){var E=w.text;y==m.line&&(E=E.slice(0,m.ch)),y==p.line&&(E=E.slice(p.ch)),h.push(E),++y}),h}function DD(u,p,m){var h=[];return u.iter(p,m,function(y){h.push(y.text)}),h}function ql(u,p){var m=p-u.height;if(m)for(var h=u;h;h=h.parent)h.height+=m}function ci(u){if(u.parent==null)return null;for(var p=u.parent,m=On(p.lines,u),h=p.parent;h;p=h,h=h.parent)for(var y=0;h.children[y]!=p;++y)m+=h.children[y].chunkSize();return m+p.first}function fp(u,p){var m=u.first;e:do{for(var h=0;h<u.children.length;++h){var y=u.children[h],w=y.height;if(p<w){u=y;continue e}p-=w,m+=y.chunkSize()}return m}while(!u.lines);for(var E=0;E<u.lines.length;++E){var A=u.lines[E],N=A.height;if(p<N)break;p-=N}return m+E}function jm(u,p){return p>=u.first&&p<u.first+u.size}function TD(u,p){return String(u.lineNumberFormatter(p+u.firstLineNumber))}function Ye(u,p,m){if(m===void 0&&(m=null),!(this instanceof Ye))return new Ye(u,p,m);this.line=u,this.ch=p,this.sticky=m}function pn(u,p){return u.line-p.line||u.ch-p.ch}function kD(u,p){return u.sticky==p.sticky&&pn(u,p)==0}function ED(u){return Ye(u.line,u.ch)}function Cy(u,p){return pn(u,p)<0?p:u}function wy(u,p){return pn(u,p)<0?u:p}function c8(u,p){return Math.max(u.first,Math.min(p,u.first+u.size-1))}function fn(u,p){if(p.line<u.first)return Ye(u.first,0);var m=u.first+u.size-1;return p.line>m?Ye(m,Lt(u,m).text.length):CX(p,Lt(u,p.line).text.length)}function CX(u,p){var m=u.ch;return m==null||m>p?Ye(u.line,p):m<0?Ye(u.line,0):u}function u8(u,p){for(var m=[],h=0;h<p.length;h++)m[h]=fn(u,p[h]);return m}var Sy=function(u,p){this.state=u,this.lookAhead=p},Wl=function(u,p,m,h){this.state=p,this.doc=u,this.line=m,this.maxLookAhead=h||0,this.baseTokens=null,this.baseTokenPos=1};Wl.prototype.lookAhead=function(u){var p=this.doc.getLine(this.line+u);return p!=null&&u>this.maxLookAhead&&(this.maxLookAhead=u),p},Wl.prototype.baseToken=function(u){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=u;)this.baseTokenPos+=2;var p=this.baseTokens[this.baseTokenPos+1];return{type:p&&p.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-u}},Wl.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Wl.fromSaved=function(u,p,m){return p instanceof Sy?new Wl(u,dp(u.mode,p.state),m,p.lookAhead):new Wl(u,dp(u.mode,p),m)},Wl.prototype.save=function(u){var p=u!==!1?dp(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Sy(p,this.maxLookAhead):p};function d8(u,p,m,h){var y=[u.state.modeGen],w={};v8(u,p.text,u.doc.mode,m,function($,Z){return y.push($,Z)},w,h);for(var E=m.state,A=function($){m.baseTokens=y;var Z=u.state.overlays[$],ne=1,Ce=0;m.state=!0,v8(u,p.text,Z.mode,m,function(ge,Le){for(var Ue=ne;Ce<ge;){var Ze=y[ne];Ze>ge&&y.splice(ne,1,ge,y[ne+1],Ze),ne+=2,Ce=Math.min(ge,Ze)}if(Le)if(Z.opaque)y.splice(Ue,ne-Ue,ge,"overlay "+Le),ne=Ue+2;else for(;Ue<ne;Ue+=2){var ot=y[Ue+1];y[Ue+1]=(ot?ot+" ":"")+"overlay "+Le}},w),m.state=E,m.baseTokens=null,m.baseTokenPos=1},N=0;N<u.state.overlays.length;++N)A(N);return{styles:y,classes:w.bgClass||w.textClass?w:null}}function p8(u,p,m){if(!p.styles||p.styles[0]!=u.state.modeGen){var h=Um(u,ci(p)),y=p.text.length>u.options.maxHighlightLength&&dp(u.doc.mode,h.state),w=d8(u,p,h);y&&(h.state=y),p.stateAfter=h.save(!y),p.styles=w.styles,w.classes?p.styleClasses=w.classes:p.styleClasses&&(p.styleClasses=null),m===u.doc.highlightFrontier&&(u.doc.modeFrontier=Math.max(u.doc.modeFrontier,++u.doc.highlightFrontier))}return p.styles}function Um(u,p,m){var h=u.doc,y=u.display;if(!h.mode.startState)return new Wl(h,!0,p);var w=wX(u,p,m),E=w>h.first&&Lt(h,w-1).stateAfter,A=E?Wl.fromSaved(h,E,w):new Wl(h,l8(h.mode),w);return h.iter(w,p,function(N){ID(u,N.text,A);var $=A.line;N.stateAfter=$==p-1||$%5==0||$>=y.viewFrom&&$<y.viewTo?A.save():null,A.nextLine()}),m&&(h.modeFrontier=A.line),A}function ID(u,p,m,h){var y=u.doc.mode,w=new Ir(p,u.options.tabSize,m);for(w.start=w.pos=h||0,p==""&&f8(y,m.state);!w.eol();)MD(y,w,m.state),w.start=w.pos}function f8(u,p){if(u.blankLine)return u.blankLine(p);if(u.innerMode){var m=SD(u,p);if(m.mode.blankLine)return m.mode.blankLine(m.state)}}function MD(u,p,m,h){for(var y=0;y<10;y++){h&&(h[0]=SD(u,m).mode);var w=u.token(p,m);if(p.pos>p.start)return w}throw new Error("Mode "+u.name+" failed to advance stream.")}var h8=function(u,p,m){this.start=u.start,this.end=u.pos,this.string=u.current(),this.type=p||null,this.state=m};function m8(u,p,m,h){var y=u.doc,w=y.mode,E;p=fn(y,p);var A=Lt(y,p.line),N=Um(u,p.line,m),$=new Ir(A.text,u.options.tabSize,N),Z;for(h&&(Z=[]);(h||$.pos<p.ch)&&!$.eol();)$.start=$.pos,E=MD(w,$,N.state),h&&Z.push(new h8($,E,dp(y.mode,N.state)));return h?Z:new h8($,E,N.state)}function g8(u,p){if(u)for(;;){var m=u.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!m)break;u=u.slice(0,m.index)+u.slice(m.index+m[0].length);var h=m[1]?"bgClass":"textClass";p[h]==null?p[h]=m[2]:new RegExp("(?:^|\\s)"+m[2]+"(?:$|\\s)").test(p[h])||(p[h]+=" "+m[2])}return u}function v8(u,p,m,h,y,w,E){var A=m.flattenSpans;A==null&&(A=u.options.flattenSpans);var N=0,$=null,Z=new Ir(p,u.options.tabSize,h),ne,Ce=u.options.addModeClass&&[null];for(p==""&&g8(f8(m,h.state),w);!Z.eol();){if(Z.pos>u.options.maxHighlightLength?(A=!1,E&&ID(u,p,h,Z.pos),Z.pos=p.length,ne=null):ne=g8(MD(m,Z,h.state,Ce),w),Ce){var ge=Ce[0].name;ge&&(ne="m-"+(ne?ge+" "+ne:ge))}if(!A||$!=ne){for(;N<Z.start;)N=Math.min(Z.start,N+5e3),y(N,$);$=ne}Z.start=Z.pos}for(;N<Z.pos;){var Le=Math.min(Z.pos,N+5e3);y(Le,$),N=Le}}function wX(u,p,m){for(var h,y,w=u.doc,E=m?-1:p-(u.doc.mode.innerMode?1e3:100),A=p;A>E;--A){if(A<=w.first)return w.first;var N=Lt(w,A-1),$=N.stateAfter;if($&&(!m||A+($ instanceof Sy?$.lookAhead:0)<=w.modeFrontier))return A;var Z=$n(N.text,null,u.options.tabSize);(y==null||h>Z)&&(y=A-1,h=Z)}return y}function SX(u,p){if(u.modeFrontier=Math.min(u.modeFrontier,p),!(u.highlightFrontier<p-10)){for(var m=u.first,h=p-1;h>m;h--){var y=Lt(u,h).stateAfter;if(y&&(!(y instanceof Sy)||h+y.lookAhead<p)){m=h+1;break}}u.highlightFrontier=Math.min(u.highlightFrontier,m)}}var y8=!1,Rc=!1;function DX(){y8=!0}function TX(){Rc=!0}function Dy(u,p,m){this.marker=u,this.from=p,this.to=m}function qm(u,p){if(u)for(var m=0;m<u.length;++m){var h=u[m];if(h.marker==p)return h}}function kX(u,p){for(var m,h=0;h<u.length;++h)u[h]!=p&&(m||(m=[])).push(u[h]);return m}function EX(u,p,m){var h=m&&window.WeakSet&&(m.markedSpans||(m.markedSpans=new WeakSet));h&&u.markedSpans&&h.has(u.markedSpans)?u.markedSpans.push(p):(u.markedSpans=u.markedSpans?u.markedSpans.concat([p]):[p],h&&h.add(u.markedSpans)),p.marker.attachLine(u)}function IX(u,p,m){var h;if(u)for(var y=0;y<u.length;++y){var w=u[y],E=w.marker,A=w.from==null||(E.inclusiveLeft?w.from<=p:w.from<p);if(A||w.from==p&&E.type=="bookmark"&&(!m||!w.marker.insertLeft)){var N=w.to==null||(E.inclusiveRight?w.to>=p:w.to>p);(h||(h=[])).push(new Dy(E,w.from,N?null:w.to))}}return h}function MX(u,p,m){var h;if(u)for(var y=0;y<u.length;++y){var w=u[y],E=w.marker,A=w.to==null||(E.inclusiveRight?w.to>=p:w.to>p);if(A||w.from==p&&E.type=="bookmark"&&(!m||w.marker.insertLeft)){var N=w.from==null||(E.inclusiveLeft?w.from<=p:w.from<p);(h||(h=[])).push(new Dy(E,N?null:w.from-p,w.to==null?null:w.to-p))}}return h}function AD(u,p){if(p.full)return null;var m=jm(u,p.from.line)&&Lt(u,p.from.line).markedSpans,h=jm(u,p.to.line)&&Lt(u,p.to.line).markedSpans;if(!m&&!h)return null;var y=p.from.ch,w=p.to.ch,E=pn(p.from,p.to)==0,A=IX(m,y,E),N=MX(h,w,E),$=p.text.length==1,Z=dn(p.text).length+($?y:0);if(A)for(var ne=0;ne<A.length;++ne){var Ce=A[ne];if(Ce.to==null){var ge=qm(N,Ce.marker);ge?$&&(Ce.to=ge.to==null?null:ge.to+Z):Ce.to=y}}if(N)for(var Le=0;Le<N.length;++Le){var Ue=N[Le];if(Ue.to!=null&&(Ue.to+=Z),Ue.from==null){var Ze=qm(A,Ue.marker);Ze||(Ue.from=Z,$&&(A||(A=[])).push(Ue))}else Ue.from+=Z,$&&(A||(A=[])).push(Ue)}A&&(A=b8(A)),N&&N!=A&&(N=b8(N));var ot=[A];if(!$){var gt=p.text.length-2,at;if(gt>0&&A)for(var St=0;St<A.length;++St)A[St].to==null&&(at||(at=[])).push(new Dy(A[St].marker,null,null));for(var jt=0;jt<gt;++jt)ot.push(at);ot.push(N)}return ot}function b8(u){for(var p=0;p<u.length;++p){var m=u[p];m.from!=null&&m.from==m.to&&m.marker.clearWhenEmpty!==!1&&u.splice(p--,1)}return u.length?u:null}function AX(u,p,m){var h=null;if(u.iter(p.line,m.line+1,function(ge){if(ge.markedSpans)for(var Le=0;Le<ge.markedSpans.length;++Le){var Ue=ge.markedSpans[Le].marker;Ue.readOnly&&(!h||On(h,Ue)==-1)&&(h||(h=[])).push(Ue)}}),!h)return null;for(var y=[{from:p,to:m}],w=0;w<h.length;++w)for(var E=h[w],A=E.find(0),N=0;N<y.length;++N){var $=y[N];if(!(pn($.to,A.from)<0||pn($.from,A.to)>0)){var Z=[N,1],ne=pn($.from,A.from),Ce=pn($.to,A.to);(ne<0||!E.inclusiveLeft&&!ne)&&Z.push({from:$.from,to:A.from}),(Ce>0||!E.inclusiveRight&&!Ce)&&Z.push({from:A.to,to:$.to}),y.splice.apply(y,Z),N+=Z.length-3}}return y}function _8(u){var p=u.markedSpans;if(p){for(var m=0;m<p.length;++m)p[m].marker.detachLine(u);u.markedSpans=null}}function x8(u,p){if(p){for(var m=0;m<p.length;++m)p[m].marker.attachLine(u);u.markedSpans=p}}function Ty(u){return u.inclusiveLeft?-1:0}function ky(u){return u.inclusiveRight?1:0}function OD(u,p){var m=u.lines.length-p.lines.length;if(m!=0)return m;var h=u.find(),y=p.find(),w=pn(h.from,y.from)||Ty(u)-Ty(p);if(w)return-w;var E=pn(h.to,y.to)||ky(u)-ky(p);return E||p.id-u.id}function C8(u,p){var m=Rc&&u.markedSpans,h;if(m)for(var y=void 0,w=0;w<m.length;++w)y=m[w],y.marker.collapsed&&(p?y.from:y.to)==null&&(!h||OD(h,y.marker)<0)&&(h=y.marker);return h}function w8(u){return C8(u,!0)}function Ey(u){return C8(u,!1)}function OX(u,p){var m=Rc&&u.markedSpans,h;if(m)for(var y=0;y<m.length;++y){var w=m[y];w.marker.collapsed&&(w.from==null||w.from<p)&&(w.to==null||w.to>p)&&(!h||OD(h,w.marker)<0)&&(h=w.marker)}return h}function S8(u,p,m,h,y){var w=Lt(u,p),E=Rc&&w.markedSpans;if(E)for(var A=0;A<E.length;++A){var N=E[A];if(N.marker.collapsed){var $=N.marker.find(0),Z=pn($.from,m)||Ty(N.marker)-Ty(y),ne=pn($.to,h)||ky(N.marker)-ky(y);if(!(Z>=0&&ne<=0||Z<=0&&ne>=0)&&(Z<=0&&(N.marker.inclusiveRight&&y.inclusiveLeft?pn($.to,m)>=0:pn($.to,m)>0)||Z>=0&&(N.marker.inclusiveRight&&y.inclusiveLeft?pn($.from,h)<=0:pn($.from,h)<0)))return!0}}}function tl(u){for(var p;p=w8(u);)u=p.find(-1,!0).line;return u}function FX(u){for(var p;p=Ey(u);)u=p.find(1,!0).line;return u}function NX(u){for(var p,m;p=Ey(u);)u=p.find(1,!0).line,(m||(m=[])).push(u);return m}function FD(u,p){var m=Lt(u,p),h=tl(m);return m==h?p:ci(h)}function D8(u,p){if(p>u.lastLine())return p;var m=Lt(u,p),h;if(!Bu(u,m))return p;for(;h=Ey(m);)m=h.find(1,!0).line;return ci(m)+1}function Bu(u,p){var m=Rc&&p.markedSpans;if(m){for(var h=void 0,y=0;y<m.length;++y)if(h=m[y],!!h.marker.collapsed){if(h.from==null)return!0;if(!h.marker.widgetNode&&h.from==0&&h.marker.inclusiveLeft&&ND(u,p,h))return!0}}}function ND(u,p,m){if(m.to==null){var h=m.marker.find(1,!0);return ND(u,h.line,qm(h.line.markedSpans,m.marker))}if(m.marker.inclusiveRight&&m.to==p.text.length)return!0;for(var y=void 0,w=0;w<p.markedSpans.length;++w)if(y=p.markedSpans[w],y.marker.collapsed&&!y.marker.widgetNode&&y.from==m.to&&(y.to==null||y.to!=m.from)&&(y.marker.inclusiveLeft||m.marker.inclusiveRight)&&ND(u,p,y))return!0}function Lc(u){u=tl(u);for(var p=0,m=u.parent,h=0;h<m.lines.length;++h){var y=m.lines[h];if(y==u)break;p+=y.height}for(var w=m.parent;w;m=w,w=m.parent)for(var E=0;E<w.children.length;++E){var A=w.children[E];if(A==m)break;p+=A.height}return p}function Iy(u){if(u.height==0)return 0;for(var p=u.text.length,m,h=u;m=w8(h);){var y=m.find(0,!0);h=y.from.line,p+=y.from.ch-y.to.ch}for(h=u;m=Ey(h);){var w=m.find(0,!0);p-=h.text.length-w.from.ch,h=w.to.line,p+=h.text.length-w.to.ch}return p}function RD(u){var p=u.display,m=u.doc;p.maxLine=Lt(m,m.first),p.maxLineLength=Iy(p.maxLine),p.maxLineChanged=!0,m.iter(function(h){var y=Iy(h);y>p.maxLineLength&&(p.maxLineLength=y,p.maxLine=h)})}var nh=function(u,p,m){this.text=u,x8(this,p),this.height=m?m(this):1};nh.prototype.lineNo=function(){return ci(this)},Nc(nh);function RX(u,p,m,h){u.text=p,u.stateAfter&&(u.stateAfter=null),u.styles&&(u.styles=null),u.order!=null&&(u.order=null),_8(u),x8(u,m);var y=h?h(u):1;y!=u.height&&ql(u,y)}function LX(u){u.parent=null,_8(u)}var BX={},PX={};function T8(u,p){if(!u||/^\s*$/.test(u))return null;var m=p.addModeClass?PX:BX;return m[u]||(m[u]=u.replace(/\S+/g,"cm-$&"))}function k8(u,p){var m=ce("span",null,null,c?"padding-right: .1px":null),h={pre:ce("pre",[m],"CodeMirror-line"),content:m,col:0,pos:0,cm:u,trailingSpace:!1,splitSpaces:u.getOption("lineWrapping")};p.measure={};for(var y=0;y<=(p.rest?p.rest.length:0);y++){var w=y?p.rest[y-1]:p.line,E=void 0;h.pos=0,h.addToken=$X,mX(u.display.measure)&&(E=el(w,u.doc.direction))&&(h.addToken=HX(h.addToken,E)),h.map=[];var A=p!=u.display.externalMeasured&&ci(w);jX(w,h,p8(u,w,A)),w.styleClasses&&(w.styleClasses.bgClass&&(h.bgClass=Ve(w.styleClasses.bgClass,h.bgClass||"")),w.styleClasses.textClass&&(h.textClass=Ve(w.styleClasses.textClass,h.textClass||""))),h.map.length==0&&h.map.push(0,0,h.content.appendChild(yD(u.display.measure))),y==0?(p.measure.map=h.map,p.measure.cache={}):((p.measure.maps||(p.measure.maps=[])).push(h.map),(p.measure.caches||(p.measure.caches=[])).push({}))}if(c){var N=h.content.lastChild;(/\bcm-tab\b/.test(N.className)||N.querySelector&&N.querySelector(".cm-tab"))&&(h.content.className="cm-tab-wrap-hack")}return rr(u,"renderLine",u,p.line,h.pre),h.pre.className&&(h.textClass=Ve(h.pre.className,h.textClass||"")),h}function VX(u){var p=X("span","\u2022","cm-invalidchar");return p.title="\\u"+u.charCodeAt(0).toString(16),p.setAttribute("aria-label",p.title),p}function $X(u,p,m,h,y,w,E){if(p){var A=u.splitSpaces?zX(p,u.trailingSpace):p,N=u.cm.state.specialChars,$=!1,Z;if(!N.test(p))u.col+=p.length,Z=document.createTextNode(A),u.map.push(u.pos,u.pos+p.length,Z),a&&s<9&&($=!0),u.pos+=p.length;else{Z=document.createDocumentFragment();for(var ne=0;;){N.lastIndex=ne;var Ce=N.exec(p),ge=Ce?Ce.index-ne:p.length-ne;if(ge){var Le=document.createTextNode(A.slice(ne,ne+ge));a&&s<9?Z.appendChild(X("span",[Le])):Z.appendChild(Le),u.map.push(u.pos,u.pos+ge,Le),u.col+=ge,u.pos+=ge}if(!Ce)break;ne+=ge+1;var Ue=void 0;if(Ce[0]==" "){var Ze=u.cm.options.tabSize,ot=Ze-u.col%Ze;Ue=Z.appendChild(X("span",Po(ot),"cm-tab")),Ue.setAttribute("role","presentation"),Ue.setAttribute("cm-text"," "),u.col+=ot}else Ce[0]=="\r"||Ce[0]=="\n"?(Ue=Z.appendChild(X("span",Ce[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ue.setAttribute("cm-text",Ce[0]),u.col+=1):(Ue=u.cm.options.specialCharPlaceholder(Ce[0]),Ue.setAttribute("cm-text",Ce[0]),a&&s<9?Z.appendChild(X("span",[Ue])):Z.appendChild(Ue),u.col+=1);u.map.push(u.pos,u.pos+1,Ue),u.pos++}}if(u.trailingSpace=A.charCodeAt(p.length-1)==32,m||h||y||$||w||E){var gt=m||"";h&&(gt+=h),y&&(gt+=y);var at=X("span",[Z],gt,w);if(E)for(var St in E)E.hasOwnProperty(St)&&St!="style"&&St!="class"&&at.setAttribute(St,E[St]);return u.content.appendChild(at)}u.content.appendChild(Z)}}function zX(u,p){if(u.length>1&&!/ /.test(u))return u;for(var m=p,h="",y=0;y<u.length;y++){var w=u.charAt(y);w==" "&&m&&(y==u.length-1||u.charCodeAt(y+1)==32)&&(w="\xA0"),h+=w,m=w==" "}return h}function HX(u,p){return function(m,h,y,w,E,A,N){y=y?y+" cm-force-border":"cm-force-border";for(var $=m.pos,Z=$+h.length;;){for(var ne=void 0,Ce=0;Ce<p.length&&(ne=p[Ce],!(ne.to>$&&ne.from<=$));Ce++);if(ne.to>=Z)return u(m,h,y,w,E,A,N);u(m,h.slice(0,ne.to-$),y,w,null,A,N),w=null,h=h.slice(ne.to-$),$=ne.to}}}function E8(u,p,m,h){var y=!h&&m.widgetNode;y&&u.map.push(u.pos,u.pos+p,y),!h&&u.cm.display.input.needsContentAttribute&&(y||(y=u.content.appendChild(document.createElement("span"))),y.setAttribute("cm-marker",m.id)),y&&(u.cm.display.input.setUneditable(y),u.content.appendChild(y)),u.pos+=p,u.trailingSpace=!1}function jX(u,p,m){var h=u.markedSpans,y=u.text,w=0;if(!h){for(var E=1;E<m.length;E+=2)p.addToken(p,y.slice(w,w=m[E]),T8(m[E+1],p.cm.options));return}for(var A=y.length,N=0,$=1,Z="",ne,Ce,ge=0,Le,Ue,Ze,ot,gt;;){if(ge==N){Le=Ue=Ze=Ce="",gt=null,ot=null,ge=1/0;for(var at=[],St=void 0,jt=0;jt<h.length;++jt){var Bt=h[jt],kn=Bt.marker;if(kn.type=="bookmark"&&Bt.from==N&&kn.widgetNode)at.push(kn);else if(Bt.from<=N&&(Bt.to==null||Bt.to>N||kn.collapsed&&Bt.to==N&&Bt.from==N)){if(Bt.to!=null&&Bt.to!=N&&ge>Bt.to&&(ge=Bt.to,Ue=""),kn.className&&(Le+=" "+kn.className),kn.css&&(Ce=(Ce?Ce+";":"")+kn.css),kn.startStyle&&Bt.from==N&&(Ze+=" "+kn.startStyle),kn.endStyle&&Bt.to==ge&&(St||(St=[])).push(kn.endStyle,Bt.to),kn.title&&((gt||(gt={})).title=kn.title),kn.attributes)for(var Di in kn.attributes)(gt||(gt={}))[Di]=kn.attributes[Di];kn.collapsed&&(!ot||OD(ot.marker,kn)<0)&&(ot=Bt)}else Bt.from>N&&ge>Bt.from&&(ge=Bt.from)}if(St)for(var Zr=0;Zr<St.length;Zr+=2)St[Zr+1]==ge&&(Ue+=" "+St[Zr]);if(!ot||ot.from==N)for(var or=0;or<at.length;++or)E8(p,0,at[or]);if(ot&&(ot.from||0)==N){if(E8(p,(ot.to==null?A+1:ot.to)-N,ot.marker,ot.from==null),ot.to==null)return;ot.to==N&&(ot=!1)}}if(N>=A)break;for(var Ia=Math.min(A,ge);;){if(Z){var ra=N+Z.length;if(!ot){var Mr=ra>Ia?Z.slice(0,Ia-N):Z;p.addToken(p,Mr,ne?ne+Le:Le,Ze,N+Mr.length==ge?Ue:"",Ce,gt)}if(ra>=Ia){Z=Z.slice(Ia-N),N=Ia;break}N=ra,Ze=""}Z=y.slice(w,w=m[$++]),ne=T8(m[$++],p.cm.options)}}}function I8(u,p,m){this.line=p,this.rest=NX(p),this.size=this.rest?ci(dn(this.rest))-m+1:1,this.node=this.text=null,this.hidden=Bu(u,p)}function My(u,p,m){for(var h=[],y,w=p;w<m;w=y){var E=new I8(u.doc,Lt(u.doc,w),w);y=w+E.size,h.push(E)}return h}var ih=null;function UX(u){ih?ih.ops.push(u):u.ownsGroup=ih={ops:[u],delayedCallbacks:[]}}function qX(u){var p=u.delayedCallbacks,m=0;do{for(;m<p.length;m++)p[m].call(null);for(var h=0;h<u.ops.length;h++){var y=u.ops[h];if(y.cursorActivityHandlers)for(;y.cursorActivityCalled<y.cursorActivityHandlers.length;)y.cursorActivityHandlers[y.cursorActivityCalled++].call(null,y.cm)}}while(m<p.length)}function WX(u,p){var m=u.ownsGroup;if(m)try{qX(m)}finally{ih=null,p(m)}}var Wm=null;function Kr(u,p){var m=Qf(u,p);if(m.length){var h=Array.prototype.slice.call(arguments,2),y;ih?y=ih.delayedCallbacks:Wm?y=Wm:(y=Wm=[],setTimeout(GX,0));for(var w=function(A){y.push(function(){return m[A].apply(null,h)})},E=0;E<m.length;++E)w(E)}}function GX(){var u=Wm;Wm=null;for(var p=0;p<u.length;++p)u[p]()}function M8(u,p,m,h){for(var y=0;y<p.changes.length;y++){var w=p.changes[y];w=="text"?YX(u,p):w=="gutter"?O8(u,p,m,h):w=="class"?LD(u,p):w=="widget"&&QX(u,p,h)}p.changes=null}function Gm(u){return u.node==u.text&&(u.node=X("div",null,null,"position: relative"),u.text.parentNode&&u.text.parentNode.replaceChild(u.node,u.text),u.node.appendChild(u.text),a&&s<8&&(u.node.style.zIndex=2)),u.node}function KX(u,p){var m=p.bgClass?p.bgClass+" "+(p.line.bgClass||""):p.line.bgClass;if(m&&(m+=" CodeMirror-linebackground"),p.background)m?p.background.className=m:(p.background.parentNode.removeChild(p.background),p.background=null);else if(m){var h=Gm(p);p.background=h.insertBefore(X("div",null,m),h.firstChild),u.display.input.setUneditable(p.background)}}function A8(u,p){var m=u.display.externalMeasured;return m&&m.line==p.line?(u.display.externalMeasured=null,p.measure=m.measure,m.built):k8(u,p)}function YX(u,p){var m=p.text.className,h=A8(u,p);p.text==p.node&&(p.node=h.pre),p.text.parentNode.replaceChild(h.pre,p.text),p.text=h.pre,h.bgClass!=p.bgClass||h.textClass!=p.textClass?(p.bgClass=h.bgClass,p.textClass=h.textClass,LD(u,p)):m&&(p.text.className=m)}function LD(u,p){KX(u,p),p.line.wrapClass?Gm(p).className=p.line.wrapClass:p.node!=p.text&&(p.node.className="");var m=p.textClass?p.textClass+" "+(p.line.textClass||""):p.line.textClass;p.text.className=m||""}function O8(u,p,m,h){if(p.gutter&&(p.node.removeChild(p.gutter),p.gutter=null),p.gutterBackground&&(p.node.removeChild(p.gutterBackground),p.gutterBackground=null),p.line.gutterClass){var y=Gm(p);p.gutterBackground=X("div",null,"CodeMirror-gutter-background "+p.line.gutterClass,"left: "+(u.options.fixedGutter?h.fixedPos:-h.gutterTotalWidth)+"px; width: "+h.gutterTotalWidth+"px"),u.display.input.setUneditable(p.gutterBackground),y.insertBefore(p.gutterBackground,p.text)}var w=p.line.gutterMarkers;if(u.options.lineNumbers||w){var E=Gm(p),A=p.gutter=X("div",null,"CodeMirror-gutter-wrapper","left: "+(u.options.fixedGutter?h.fixedPos:-h.gutterTotalWidth)+"px");if(A.setAttribute("aria-hidden","true"),u.display.input.setUneditable(A),E.insertBefore(A,p.text),p.line.gutterClass&&(A.className+=" "+p.line.gutterClass),u.options.lineNumbers&&(!w||!w["CodeMirror-linenumbers"])&&(p.lineNumber=A.appendChild(X("div",TD(u.options,m),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+h.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+u.display.lineNumInnerWidth+"px"))),w)for(var N=0;N<u.display.gutterSpecs.length;++N){var $=u.display.gutterSpecs[N].className,Z=w.hasOwnProperty($)&&w[$];Z&&A.appendChild(X("div",[Z],"CodeMirror-gutter-elt","left: "+h.gutterLeft[$]+"px; width: "+h.gutterWidth[$]+"px"))}}}function QX(u,p,m){p.alignable&&(p.alignable=null);for(var h=ae("CodeMirror-linewidget"),y=p.node.firstChild,w=void 0;y;y=w)w=y.nextSibling,h.test(y.className)&&p.node.removeChild(y);F8(u,p,m)}function ZX(u,p,m,h){var y=A8(u,p);return p.text=p.node=y.pre,y.bgClass&&(p.bgClass=y.bgClass),y.textClass&&(p.textClass=y.textClass),LD(u,p),O8(u,p,m,h),F8(u,p,h),p.node}function F8(u,p,m){if(N8(u,p.line,p,m,!0),p.rest)for(var h=0;h<p.rest.length;h++)N8(u,p.rest[h],p,m,!1)}function N8(u,p,m,h,y){if(p.widgets)for(var w=Gm(m),E=0,A=p.widgets;E<A.length;++E){var N=A[E],$=X("div",[N.node],"CodeMirror-linewidget"+(N.className?" "+N.className:""));N.handleMouseEvents||$.setAttribute("cm-ignore-events","true"),XX(N,$,m,h),u.display.input.setUneditable($),y&&N.above?w.insertBefore($,m.gutter||m.text):w.appendChild($),Kr(N,"redraw")}}function XX(u,p,m,h){if(u.noHScroll){(m.alignable||(m.alignable=[])).push(p);var y=h.wrapperWidth;p.style.left=h.fixedPos+"px",u.coverGutter||(y-=h.gutterTotalWidth,p.style.paddingLeft=h.gutterTotalWidth+"px"),p.style.width=y+"px"}u.coverGutter&&(p.style.zIndex=5,p.style.position="relative",u.noHScroll||(p.style.marginLeft=-h.gutterTotalWidth+"px"))}function Km(u){if(u.height!=null)return u.height;var p=u.doc.cm;if(!p)return 0;if(!Re(document.body,u.node)){var m="position: relative;";u.coverGutter&&(m+="margin-left: -"+p.display.gutters.offsetWidth+"px;"),u.noHScroll&&(m+="width: "+p.display.wrapper.clientWidth+"px;"),Se(p.display.measure,X("div",[u.node],null,m))}return u.height=u.node.parentNode.offsetHeight}function Bc(u,p){for(var m=Xf(p);m!=u.wrapper;m=m.parentNode)if(!m||m.nodeType==1&&m.getAttribute("cm-ignore-events")=="true"||m.parentNode==u.sizer&&m!=u.mover)return!0}function Ay(u){return u.lineSpace.offsetTop}function BD(u){return u.mover.offsetHeight-u.lineSpace.offsetHeight}function R8(u){if(u.cachedPaddingH)return u.cachedPaddingH;var p=Se(u.measure,X("pre","x","CodeMirror-line-like")),m=window.getComputedStyle?window.getComputedStyle(p):p.currentStyle,h={left:parseInt(m.paddingLeft),right:parseInt(m.paddingRight)};return!isNaN(h.left)&&!isNaN(h.right)&&(u.cachedPaddingH=h),h}function Gl(u){return jn-u.display.nativeBarWidth}function hp(u){return u.display.scroller.clientWidth-Gl(u)-u.display.barWidth}function PD(u){return u.display.scroller.clientHeight-Gl(u)-u.display.barHeight}function JX(u,p,m){var h=u.options.lineWrapping,y=h&&hp(u);if(!p.measure.heights||h&&p.measure.width!=y){var w=p.measure.heights=[];if(h){p.measure.width=y;for(var E=p.text.firstChild.getClientRects(),A=0;A<E.length-1;A++){var N=E[A],$=E[A+1];Math.abs(N.bottom-$.bottom)>2&&w.push((N.bottom+$.top)/2-m.top)}}w.push(m.bottom-m.top)}}function L8(u,p,m){if(u.line==p)return{map:u.measure.map,cache:u.measure.cache};if(u.rest){for(var h=0;h<u.rest.length;h++)if(u.rest[h]==p)return{map:u.measure.maps[h],cache:u.measure.caches[h]};for(var y=0;y<u.rest.length;y++)if(ci(u.rest[y])>m)return{map:u.measure.maps[y],cache:u.measure.caches[y],before:!0}}}function eJ(u,p){p=tl(p);var m=ci(p),h=u.display.externalMeasured=new I8(u.doc,p,m);h.lineN=m;var y=h.built=k8(u,h);return h.text=y.pre,Se(u.display.lineMeasure,y.pre),h}function B8(u,p,m,h){return Kl(u,rh(u,p),m,h)}function VD(u,p){if(p>=u.display.viewFrom&&p<u.display.viewTo)return u.display.view[vp(u,p)];var m=u.display.externalMeasured;if(m&&p>=m.lineN&&p<m.lineN+m.size)return m}function rh(u,p){var m=ci(p),h=VD(u,m);h&&!h.text?h=null:h&&h.changes&&(M8(u,h,m,UD(u)),u.curOp.forceUpdate=!0),h||(h=eJ(u,p));var y=L8(h,p,m);return{line:p,view:h,rect:null,map:y.map,cache:y.cache,before:y.before,hasHeights:!1}}function Kl(u,p,m,h,y){p.before&&(m=-1);var w=m+(h||""),E;return p.cache.hasOwnProperty(w)?E=p.cache[w]:(p.rect||(p.rect=p.view.text.getBoundingClientRect()),p.hasHeights||(JX(u,p.view,p.rect),p.hasHeights=!0),E=nJ(u,p,m,h),E.bogus||(p.cache[w]=E)),{left:E.left,right:E.right,top:y?E.rtop:E.top,bottom:y?E.rbottom:E.bottom}}var P8={left:0,right:0,top:0,bottom:0};function V8(u,p,m){for(var h,y,w,E,A,N,$=0;$<u.length;$+=3)if(A=u[$],N=u[$+1],p<A?(y=0,w=1,E="left"):p<N?(y=p-A,w=y+1):($==u.length-3||p==N&&u[$+3]>p)&&(w=N-A,y=w-1,p>=N&&(E="right")),y!=null){if(h=u[$+2],A==N&&m==(h.insertLeft?"left":"right")&&(E=m),m=="left"&&y==0)for(;$&&u[$-2]==u[$-3]&&u[$-1].insertLeft;)h=u[($-=3)+2],E="left";if(m=="right"&&y==N-A)for(;$<u.length-3&&u[$+3]==u[$+4]&&!u[$+5].insertLeft;)h=u[($+=3)+2],E="right";break}return{node:h,start:y,end:w,collapse:E,coverStart:A,coverEnd:N}}function tJ(u,p){var m=P8;if(p=="left")for(var h=0;h<u.length&&(m=u[h]).left==m.right;h++);else for(var y=u.length-1;y>=0&&(m=u[y]).left==m.right;y--);return m}function nJ(u,p,m,h){var y=V8(p.map,m,h),w=y.node,E=y.start,A=y.end,N=y.collapse,$;if(w.nodeType==3){for(var Z=0;Z<4;Z++){for(;E&&Xs(p.line.text.charAt(y.coverStart+E));)--E;for(;y.coverStart+A<y.coverEnd&&Xs(p.line.text.charAt(y.coverStart+A));)++A;if(a&&s<9&&E==0&&A==y.coverEnd-y.coverStart?$=w.parentNode.getBoundingClientRect():$=tJ(ke(w,E,A).getClientRects(),h),$.left||$.right||E==0)break;A=E,E=E-1,N="right"}a&&s<11&&($=iJ(u.display.measure,$))}else{E>0&&(N=h="right");var ne;u.options.lineWrapping&&(ne=w.getClientRects()).length>1?$=ne[h=="right"?ne.length-1:0]:$=w.getBoundingClientRect()}if(a&&s<9&&!E&&(!$||!$.left&&!$.right)){var Ce=w.parentNode.getClientRects()[0];Ce?$={left:Ce.left,right:Ce.left+ah(u.display),top:Ce.top,bottom:Ce.bottom}:$=P8}for(var ge=$.top-p.rect.top,Le=$.bottom-p.rect.top,Ue=(ge+Le)/2,Ze=p.view.measure.heights,ot=0;ot<Ze.length-1&&!(Ue<Ze[ot]);ot++);var gt=ot?Ze[ot-1]:0,at=Ze[ot],St={left:(N=="right"?$.right:$.left)-p.rect.left,right:(N=="left"?$.left:$.right)-p.rect.left,top:gt,bottom:at};return!$.left&&!$.right&&(St.bogus=!0),u.options.singleCursorHeightPerLine||(St.rtop=ge,St.rbottom=Le),St}function iJ(u,p){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!yX(u))return p;var m=screen.logicalXDPI/screen.deviceXDPI,h=screen.logicalYDPI/screen.deviceYDPI;return{left:p.left*m,right:p.right*m,top:p.top*h,bottom:p.bottom*h}}function $8(u){if(u.measure&&(u.measure.cache={},u.measure.heights=null,u.rest))for(var p=0;p<u.rest.length;p++)u.measure.caches[p]={}}function z8(u){u.display.externalMeasure=null,fe(u.display.lineMeasure);for(var p=0;p<u.display.view.length;p++)$8(u.display.view[p])}function Ym(u){z8(u),u.display.cachedCharWidth=u.display.cachedTextHeight=u.display.cachedPaddingH=null,u.options.lineWrapping||(u.display.maxLineChanged=!0),u.display.lineNumChars=null}function H8(u){return f&&k?-(u.body.getBoundingClientRect().left-parseInt(getComputedStyle(u.body).marginLeft)):u.defaultView.pageXOffset||(u.documentElement||u.body).scrollLeft}function j8(u){return f&&k?-(u.body.getBoundingClientRect().top-parseInt(getComputedStyle(u.body).marginTop)):u.defaultView.pageYOffset||(u.documentElement||u.body).scrollTop}function $D(u){var p=tl(u),m=p.widgets,h=0;if(m)for(var y=0;y<m.length;++y)m[y].above&&(h+=Km(m[y]));return h}function Oy(u,p,m,h,y){if(!y){var w=$D(p);m.top+=w,m.bottom+=w}if(h=="line")return m;h||(h="local");var E=Lc(p);if(h=="local"?E+=Ay(u.display):E-=u.display.viewOffset,h=="page"||h=="window"){var A=u.display.lineSpace.getBoundingClientRect();E+=A.top+(h=="window"?0:j8(z(u)));var N=A.left+(h=="window"?0:H8(z(u)));m.left+=N,m.right+=N}return m.top+=E,m.bottom+=E,m}function U8(u,p,m){if(m=="div")return p;var h=p.left,y=p.top;if(m=="page")h-=H8(z(u)),y-=j8(z(u));else if(m=="local"||!m){var w=u.display.sizer.getBoundingClientRect();h+=w.left,y+=w.top}var E=u.display.lineSpace.getBoundingClientRect();return{left:h-E.left,top:y-E.top}}function Fy(u,p,m,h,y){return h||(h=Lt(u.doc,p.line)),Oy(u,h,B8(u,h,p.ch,y),m)}function nl(u,p,m,h,y,w){h=h||Lt(u.doc,p.line),y||(y=rh(u,h));function E(Le,Ue){var Ze=Kl(u,y,Le,Ue?"right":"left",w);return Ue?Ze.left=Ze.right:Ze.right=Ze.left,Oy(u,h,Ze,m)}var A=el(h,u.doc.direction),N=p.ch,$=p.sticky;if(N>=h.text.length?(N=h.text.length,$="before"):N<=0&&(N=0,$="after"),!A)return E($=="before"?N-1:N,$=="before");function Z(Le,Ue,Ze){var ot=A[Ue],gt=ot.level==1;return E(Ze?Le-1:Le,gt!=Ze)}var ne=Lu(A,N,$),Ce=Ru,ge=Z(N,ne,$=="before");return Ce!=null&&(ge.other=Z(N,Ce,$!="before")),ge}function q8(u,p){var m=0;p=fn(u.doc,p),u.options.lineWrapping||(m=ah(u.display)*p.ch);var h=Lt(u.doc,p.line),y=Lc(h)+Ay(u.display);return{left:m,right:m,top:y,bottom:y+h.height}}function zD(u,p,m,h,y){var w=Ye(u,p,m);return w.xRel=y,h&&(w.outside=h),w}function HD(u,p,m){var h=u.doc;if(m+=u.display.viewOffset,m<0)return zD(h.first,0,null,-1,-1);var y=fp(h,m),w=h.first+h.size-1;if(y>w)return zD(h.first+h.size-1,Lt(h,w).text.length,null,1,1);p<0&&(p=0);for(var E=Lt(h,y);;){var A=rJ(u,E,y,p,m),N=OX(E,A.ch+(A.xRel>0||A.outside>0?1:0));if(!N)return A;var $=N.find(1);if($.line==y)return $;E=Lt(h,y=$.line)}}function W8(u,p,m,h){h-=$D(p);var y=p.text.length,w=Js(function(E){return Kl(u,m,E-1).bottom<=h},y,0);return y=Js(function(E){return Kl(u,m,E).top>h},w,y),{begin:w,end:y}}function G8(u,p,m,h){m||(m=rh(u,p));var y=Oy(u,p,Kl(u,m,h),"line").top;return W8(u,p,m,y)}function jD(u,p,m,h){return u.bottom<=m?!1:u.top>m?!0:(h?u.left:u.right)>p}function rJ(u,p,m,h,y){y-=Lc(p);var w=rh(u,p),E=$D(p),A=0,N=p.text.length,$=!0,Z=el(p,u.doc.direction);if(Z){var ne=(u.options.lineWrapping?aJ:oJ)(u,p,m,w,Z,h,y);$=ne.level!=1,A=$?ne.from:ne.to-1,N=$?ne.to:ne.from-1}var Ce=null,ge=null,Le=Js(function(jt){var Bt=Kl(u,w,jt);return Bt.top+=E,Bt.bottom+=E,jD(Bt,h,y,!1)?(Bt.top<=y&&Bt.left<=h&&(Ce=jt,ge=Bt),!0):!1},A,N),Ue,Ze,ot=!1;if(ge){var gt=h-ge.left<ge.right-h,at=gt==$;Le=Ce+(at?0:1),Ze=at?"after":"before",Ue=gt?ge.left:ge.right}else{!$&&(Le==N||Le==A)&&Le++,Ze=Le==0?"after":Le==p.text.length?"before":Kl(u,w,Le-($?1:0)).bottom+E<=y==$?"after":"before";var St=nl(u,Ye(m,Le,Ze),"line",p,w);Ue=St.left,ot=y<St.top?-1:y>=St.bottom?1:0}return Le=Ta(p.text,Le,1),zD(m,Le,Ze,ot,h-Ue)}function oJ(u,p,m,h,y,w,E){var A=Js(function(ne){var Ce=y[ne],ge=Ce.level!=1;return jD(nl(u,Ye(m,ge?Ce.to:Ce.from,ge?"before":"after"),"line",p,h),w,E,!0)},0,y.length-1),N=y[A];if(A>0){var $=N.level!=1,Z=nl(u,Ye(m,$?N.from:N.to,$?"after":"before"),"line",p,h);jD(Z,w,E,!0)&&Z.top>E&&(N=y[A-1])}return N}function aJ(u,p,m,h,y,w,E){var A=W8(u,p,h,E),N=A.begin,$=A.end;/\s/.test(p.text.charAt($-1))&&$--;for(var Z=null,ne=null,Ce=0;Ce<y.length;Ce++){var ge=y[Ce];if(!(ge.from>=$||ge.to<=N)){var Le=ge.level!=1,Ue=Kl(u,h,Le?Math.min($,ge.to)-1:Math.max(N,ge.from)).right,Ze=Ue<w?w-Ue+1e9:Ue-w;(!Z||ne>Ze)&&(Z=ge,ne=Ze)}}return Z||(Z=y[y.length-1]),Z.from<N&&(Z={from:N,to:Z.to,level:Z.level}),Z.to>$&&(Z={from:Z.from,to:$,level:Z.level}),Z}var mp;function oh(u){if(u.cachedTextHeight!=null)return u.cachedTextHeight;if(mp==null){mp=X("pre",null,"CodeMirror-line-like");for(var p=0;p<49;++p)mp.appendChild(document.createTextNode("x")),mp.appendChild(X("br"));mp.appendChild(document.crea