From db24d216210e0038f92e634de1ab8a46fbce4632 Mon Sep 17 00:00:00 2001 From: Tara Rostami <132676256+TaraRostami@users.noreply.github.com> Date: Sat, 20 Apr 2024 22:15:36 +0330 Subject: UI Improvements (#2228) * UI Improvements Better Table Update QR Code Modal Better Info Modal Compression HTML files Better Dropdown Menu Better Calendar and more .. Remove files Minor Fixes --- web/assets/codemirror/codemirror.min.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 web/assets/codemirror/codemirror.min.js (limited to 'web/assets/codemirror/codemirror.min.js') diff --git a/web/assets/codemirror/codemirror.min.js b/web/assets/codemirror/codemirror.min.js new file mode 100644 index 00000000..3581ef2b --- /dev/null +++ b/web/assets/codemirror/codemirror.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).CodeMirror=t()}(this,function(){"use strict";var e,t,r,n,i,o,l,s,a,u,c=navigator.userAgent,f=navigator.platform,h=/gecko\/\d/i.test(c),d=/MSIE \d/.test(c),p=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(c),g=/Edge\/(\d+)/.exec(c),v=d||p||g,m=v&&(d?document.documentMode||6:+(g||p)[1]),$=!g&&/WebKit\//.test(c),y=$&&/Qt\/\d+\.\d+/.test(c),_=!g&&/Chrome\/(\d+)/.exec(c),b=_&&+_[1],x=/Opera\//.test(c),w=/Apple Computer/.test(navigator.vendor),C=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(c),S=/PhantomJS/.test(c),L=w&&(/Mobile\/\w+/.test(c)||navigator.maxTouchPoints>2),k=/Android/.test(c),T=L||k||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(c),N=L||/Mac/.test(f),O=/\bCrOS\b/.test(c),M=/win/i.test(f),A=x&&c.match(/Version\/(\d*\.\d*)/);A&&(A=Number(A[1])),A&&A>=15&&(x=!1,$=!0);var D=N&&(y||x&&(null==A||A<12.11)),W=h||v&&m>=9;function H(e){return RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var F=function(e,t){var r=e.className,n=H(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function P(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return P(e).appendChild(t)}function z(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}L?V=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:v&&(V=function(e){try{e.select()}catch(t){}});var Z=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function Q(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var ei=[""];function eo(e){for(;ei.length<=e;)ei.push(el(ei)+" ");return ei[e]}function el(e){return e[e.length-1]}function es(e,t){for(var r=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ec.test(e))}function eh(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ef(e))||t.test(e):ef(e)}function ed(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ep=/[\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 eg(e){return e.charCodeAt(0)>=768&&ep.test(e)}function ev(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}var e$=null;function ey(e,t,r){var n;e$=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:e$=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:e$=i)}return null!=n?n:e$}var e_=function(){function e(e){if(e<=247)return"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(e);if(1424<=e&&e<=1524)return"R";if(1536<=e&&e<=1785)return"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(e-1536);if(1774<=e&&e<=2220)return"r";if(8192<=e&&e<=8203)return"w";else if(8204==e)return"b";else return"L"}var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,n=/[LRr]/,i=/[Lb1n]/,o=/[1n]/;function l(e,t,r){this.level=e,this.from=t,this.to=r}return function(s,a){var u="ltr"==a?"L":"R";if(0==s.length||"ltr"==a&&!t.test(s))return!1;for(var c=s.length,f=[],h=0;h-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function eL(e,t){var r=eC(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function eO(e){e.prototype.on=function(e,t){ew(this,e,t)},e.prototype.off=function(e,t){eS(this,e,t)}}function eM(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function eA(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function e0(e){return null!=e.defaultPrevented?e.defaultPrevented:!1==e.returnValue}function eD(e){eM(e),eA(e)}function eW(e){return e.target||e.srcElement}function eH(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),N&&e.ctrlKey&&1==t&&(t=3),t}var eF=function(){if(v&&m<9)return!1;var e=z("div");return"draggable"in e||"dragDrop"in e}();function eP(e){if(null==o){var t=z("span","​");E(e,z("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(o=t.offsetWidth<=1&&t.offsetHeight>2&&!(v&&m<8))}var r=o?z("span","​"):z("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function e1(e){if(null!=l)return l;var t=E(e,document.createTextNode("AخA")),r=i(t,0,1).getBoundingClientRect(),n=i(t,1,2).getBoundingClientRect();return P(e),!!r&&r.left!=r.right&&(l=n.right-r.right<3)}var eE,ez=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},eR=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!!t&&t.parentElement()==e&&0!=t.compareEndPoints("StartToEnd",t)},eI="oncopy"in(eE=z("div"))||(eE.setAttribute("oncopy","return;"),"function"==typeof eE.oncopy),e3=null,eB={},e7={};function e4(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),eB[e]=t}function e6(e,t){e7[e]=t}function e5(e){if("string"==typeof e&&e7.hasOwnProperty(e))e=e7[e];else if(e&&"string"==typeof e.name&&e7.hasOwnProperty(e.name)){var t=e7[e.name];"string"==typeof t&&(t={name:t}),(e=eu(t,e)).name=t.name}else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return e5("application/xml");else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return e5("application/json");return"string"==typeof e?{name:e}:e||{name:"null"}}function e2(e,t){var r=eB[(t=e5(t)).name];if(!r)return e2(e,"text/plain");var n=r(e,t);if(eG.hasOwnProperty(t.name)){var i=eG[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var eG={};function eU(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function eV(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function eK(e,t,r){return!e.startState||e.startState(t,r)}var eX=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function ej(e,t){if((t-=e.first)<0||t>=e.size)throw Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&ttt(e,t)?t:e}function to(e,t){return 0>tt(e,t)?e:t}function tl(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ts(e,t){if(t.lineo?te(o,ej(e,o).text.length):(r=t,n=ej(e,t.line).text.length,i=r.ch,null==i||i>n?te(r.line,n):i<0?te(r.line,0):r)}function ta(e,t){for(var r=[],n=0;n=this.string.length},eX.prototype.sol=function(){return this.pos==this.lineStart},eX.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},eX.prototype.next=function(){if(this.post},eX.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},eX.prototype.skipToEnd=function(){this.pos=this.string.length},eX.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},eX.prototype.backUp=function(e){this.pos-=e},eX.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}},eX.prototype.current=function(){return this.string.slice(this.start,this.pos)},eX.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},eX.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},eX.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var tu=function(e,t){this.state=e,this.lookAhead=t},tc=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function tf(e,t,r,n){var i=[e.state.modeGen],o={};t_(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=0;se&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t){if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&eU(e.doc.mode,n.state),o=tf(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function td(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new tc(n,!0,t);var o=function e(t,r,n){for(var i,o,l=t.doc,s=n?-1:r-(t.doc.mode.innerMode?1e3:100),a=r;a>s;--a){if(a<=l.first)return l.first;var u=ej(l,a-1),c=u.stateAfter;if(c&&(!n||a+(c instanceof tu?c.lookAhead:0)<=l.modeFrontier))return a;var f=q(u.text,null,t.options.tabSize);(null==o||i>f)&&(o=a-1,i=f)}return o}(e,t,r),l=o>n.first&&ej(n,o-1).stateAfter,s=l?tc.fromSaved(n,l,o):new tc(n,eK(n.mode),o);return n.iter(o,t,function(r){tp(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw Error("Mode "+e.name+" failed to advance stream.")}tc.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},tc.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}},tc.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},tc.fromSaved=function(e,t,r){return t instanceof tu?new tc(e,eU(e.mode,t.state),r,t.lookAhead):new tc(e,eU(e.mode,t),r)},tc.prototype.save=function(e){var t=!1!==e?eU(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new tu(t,this.maxLookAhead):t};var tm=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function t$(e,t,r,n){var i,o=e.doc,l=o.mode;t=ts(o,t);var s,a=ej(o,t.line),u=td(e,t.line,r),c=new eX(a.text,e.options.tabSize,u);for(n&&(s=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&&tp(e,t,n,f.pos),f.pos=t.length,a=null):a=ty(tv(r,f,n.state,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u=r:l.to>r);(i||(i=[])).push(new tw(s,l.from,a?null:l.to))}}return i}(r,i,l),a=function e(t,r,n){var i;if(t)for(var o=0;o=r:l.to>r)||l.from==r&&"bookmark"==s.type&&(!n||l.marker.insertLeft)){var a=null==l.from||(s.inclusiveLeft?l.from<=r:l.from0&&s)for(var y=0;ytA(r,i.marker))&&(r=i.marker);return r}function tD(e){return t0(e,!0)}function tW(e){return t0(e,!1)}function tH(e,t){var r,n=tx&&e.markedSpans;if(n)for(var i=0;it)&&(!r||0>tA(r,o.marker))&&(r=o.marker)}return r}function tF(e,t,r,n,i){var o=ej(e,t),l=tx&&o.markedSpans;if(l)for(var s=0;s=0)||!(f<=0))&&(!(c<=0)||!(f>=0))&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?tt(u.to,r)>=0:tt(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?0>=tt(u.from,n):0>tt(u.from,n))))return!0}}}function tP(e){for(var t;t=tD(e);)e=t.find(-1,!0).line;return e}function t1(e,t){var r=ej(e,t),n=tP(r);return r==n?t:eq(n)}function tE(e,t){if(t>e.lastLine())return t;var r,n=ej(e,t);if(!tz(e,n))return t;for(;r=tW(n);)n=r.find(1,!0).line;return eq(n)+1}function tz(e,t){var r=tx&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var t7=function(e,t,r){this.text=e,tN(this,t),this.height=r?r(this):1};function t4(e){e.parent=null,tT(e)}t7.prototype.lineNo=function(){return eq(this)},eO(t7);var t6={},t5={};function t2(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?t5:t6;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function tG(e,t){var r=R("span",null,null,$?"padding-right: .1px":null),n={pre:R("pre",[r],"CodeMirror-line Line-Hover"),content:r,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;n.pos=0,n.addToken=tV,e1(e.display.measure)&&(l=eb(o,e.doc.direction))&&(n.addToken=tK(n.addToken,l)),n.map=[];var s=t!=e.display.externalMeasured&&eq(o);tj(o,n,th(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=U(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=U(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(eP(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if($){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return eL(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=U(n.pre.className,n.textClass||"")),n}function tU(e){var t=z("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function tV(e,t,r,n,i,o,l){if(t){var s,a=e.splitSpaces?function e(t,r){if(t.length>1&&!/ /.test(t))return t;for(var n=r,i="",o=0;ou)||!(f.from<=u));h++);if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function tX(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function tj(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var l=1;lg||w.collapsed&&x.to==g&&x.from==g)){if(null!=x.to&&x.to!=g&&$>x.to&&($=x.to,c=""),w.className&&(u+=" "+w.className),w.css&&(a=(a?a+";":"")+w.css),w.startStyle&&x.from==g&&(f+=" "+w.startStyle),w.endStyle&&x.to==$&&(_||(_=[])).push(w.endStyle,x.to),w.title&&((d||(d={})).title=w.title),w.attributes)for(var C in w.attributes)(d||(d={}))[C]=w.attributes[C];w.collapsed&&(!h||0>tA(h.marker,w))&&(h=x)}else x.from>g&&$>x.from&&($=x.from)}if(_)for(var S=0;S<_.length;S+=2)_[S+1]==$&&(c+=" "+_[S]);if(!h||h.from==g)for(var L=0;L=p)break;for(var k=Math.min(p,$);;){if(m){var T=g+m.length;if(!h){var N=T>k?m.slice(0,k-g):m;t.addToken(t,N,s?s+u:u,f,g+N.length==$?c:"",a,d)}if(T>=k){m=m.slice(k-g),g=k;break}g=T,f=""}m=i.slice(o,o=r[v++]),s=t2(r[v++],t.cm.options)}}}function tY(e,t,r){this.line=t,this.rest=function e(t){for(var r,n;r=tW(t);)t=r.find(1,!0).line,(n||(n=[])).push(t);return n}(t),this.size=this.rest?eq(el(this.rest))-r+1:1,this.node=this.text=null,this.hidden=tz(e,t)}function t8(e,t,r){for(var n,i=[],o=t;or)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function ry(e,t,r,n){return rx(e,rb(e,t),r,n)}function r_(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&l.push((u.bottom+c.top)/2-n.top)}}l.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(l=function e(t,r,n,o){var l,s,a=rC(r.map,n,o),u=a.node,c=a.start,f=a.end,h=a.collapse;if(3==u.nodeType){for(var d=0;d<4;d++){for(;c&&eg(r.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+f1}(t))return r;var n=screen.logicalXDPI/screen.deviceXDPI,o=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*n,right:r.right*n,top:r.top*o,bottom:r.bottom*o}}(t.display.measure,l))}else c>0&&(h=o="right"),l=t.options.lineWrapping&&(s=u.getClientRects()).length>1?s["right"==o?s.length-1:0]:u.getBoundingClientRect();if(v&&m<9&&!c&&(!l||!l.left&&!l.right)){var p=u.parentNode.getClientRects()[0];l=p?{left:p.left,right:p.left+r7(t.display),top:p.top,bottom:p.bottom}:rw}for(var g=l.top-r.rect.top,$=l.bottom-r.rect.top,y=(g+$)/2,_=r.view.measure.heights,b=0;b<_.length-1&&!(y<_[b]);b++);var x=b?_[b-1]:0,w=_[b],C={left:("right"==h?l.right:l.left)-r.rect.left,right:("left"==h?l.left:l.right)-r.rect.left,top:x,bottom:w};return l.left||l.right||(C.bogus=!0),t.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=$),C}(e,t,r,n)).bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:o?l.rtop:l.top,bottom:o?l.rbottom:l.bottom}}var rw={left:0,right:0,top:0,bottom:0};function rC(e,t,r){for(var n,i,o,l,s,a,u=0;ut)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function rL(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var f=ey(s,a,u),h=e$,d=c(a,f,"before"==u);return null!=h&&(d.other=c(a,h,"before"!=u)),d}function rH(e,t){var r=0;t=ts(e.doc,t),e.options.lineWrapping||(r=r7(e.display)*t.ch);var n=ej(e.doc,t.line),i=tI(n)+rh(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function rF(e,t,r,n,i){var o=te(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function rP(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return rF(n.first,0,null,-1,-1);var i=eZ(n,r),o=n.first+n.size-1;if(i>o)return rF(n.first+n.size-1,ej(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=ej(n,i);;){var s=rR(e,l,i,t,r),a=tH(l,s.ch+(s.xRel>0||s.outside>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=ej(n,i=u.line)}}function r1(e,t,r,n){n-=rM(t);var i=t.text.length,o=em(function(t){return rx(e,r,t-1).bottom<=n},i,0);return i=em(function(t){return rx(e,r,t).top>n},o,i),{begin:o,end:i}}function rE(e,t,r,n){r||(r=rb(e,t));var i=rA(e,t,rx(e,r,n),"line").top;return r1(e,t,r,i)}function rz(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function rR(e,t,r,n,i){i-=tI(t);var o=rb(e,t),l=rM(t),s=0,a=t.text.length,u=!0,c=eb(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?r3:rI)(e,t,r,o,c,n,i);s=(u=1!=f.level)?f.from:f.to-1,a=u?f.to:f.from-1}var h,d,p=null,g=null,v=em(function(t){var r=rx(e,o,t);return r.top+=l,r.bottom+=l,!!rz(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var $=n-g.left=_.bottom?1:0}return v=ev(t.text,v,1),rF(r,v,d,m,n-h)}function rI(e,t,r,n,i,o,l){var s=em(function(s){var a=i[s],u=1!=a.level;return rz(rW(e,te(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=rW(e,te(r,u?a.from:a.to,u?"after":"before"),"line",t,n);rz(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a}function r3(e,t,r,n,i,o,l){var s=r1(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,h=0;h=u)&&!(d.to<=a)){var p=rx(e,n,1!=d.level?Math.min(u,d.to)-1:Math.max(a,d.from)).right,g=pg)&&(c=d,f=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function rB(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==s){s=z("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)s.appendChild(document.createTextNode("x")),s.appendChild(z("br"));s.appendChild(document.createTextNode("x"))}E(e.measure,s);var r=s.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),P(e.measure),r||1}function r7(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=z("span","xxxxxxxxxx"),r=z("pre",[t],"CodeMirror-line-like");E(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function r4(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var s=e.display.gutterSpecs[l].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:r6(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function r6(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function r5(e){var t=rB(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/r7(e.display)-3);return function(i){if(tz(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(u=ej(e.doc,c.line).text).length==c.ch){var f=q(u,u.length,e.options.tabSize)-u.length;c=te(c.line,Math.max(0,Math.round((o-rp(e.display).left)/r7(e.display))-f))}return c}function rU(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)tx&&t1(e.doc,t)i.viewFrom?rX(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)rX(e);else if(t<=i.viewFrom){var o=rj(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):rX(e)}else if(r>=i.viewTo){var l=rj(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):rX(e)}else{var s=rj(e,t,t,-1),a=rj(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(t8(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):rX(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[rU(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==Q(l,r)&&l.push(r)}}}function rX(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function rj(e,t,r,n){var i,o=rU(e,t),l=e.display.view;if(!tx||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;t1(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function rY(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo)&&!(a.to().line0?l:e.defaultCharWidth())+"px"}if(n.other){var s=r.appendChild(z("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function rZ(e,t){return e.top-t.top||e.left-t.left}function rQ(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=rp(e.display),s=l.left,a=Math.max(n.sizerWidth,rv(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(z("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?a-e:r)+"px;\n height: "+(n-t)+"px"))}function f(t,r,n){var o,l,f=ej(i,t),h=f.text.length;function d(r,n){return rD(e,te(t,r),"div",f,n)}function p(t,r,n){var i=rE(e,f,null,t),o="ltr"==r==("after"==n)?"left":"right";return d("after"==n?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=eb(f,i.direction);return!function e(t,r,n,i){if(!t)return i(r,n,"ltr",0);for(var o=!1,l=0;lr||r==n&&s.to==r)&&(i(Math.max(s.from,r),Math.min(s.to,n),1==s.level?"rtl":"ltr",l),o=!0)}o||i(r,n,"ltr")}(g,r||0,null==n?h:n,function(e,t,i,f){var v,m,$,y,_="ltr"==i,b=d(e,_?"left":"right"),x=d(t-1,_?"right":"left"),w=null==r&&0==e,C=null==n&&t==h,S=0==f,L=!g||f==g.length-1;if(x.top-b.top<=3){var k=(u?w:C)&&S?s:(_?b:x).left,T=(u?C:w)&&L?a:(_?x:b).right;c(k,b.top,T-k,b.bottom)}else _?(v=u&&w&&S?s:b.left,m=u?a:p(e,i,"before"),$=u?s:p(t,i,"after"),y=u&&C&&L?a:x.right):(v=u?p(e,i,"before"):s,m=!u&&w&&S?a:b.right,$=!u&&C&&L?s:x.left,y=u?p(t,i,"after"):a),c(v,b.top,m-v,b.bottom),b.bottomrZ(b,o))&&(o=b),0>rZ(x,o)&&(o=x),(!l||0>rZ(b,l))&&(l=b),0>rZ(x,l)&&(l=x)}),{start:o,end:l}}var h=t.from(),d=t.to();if(h.line==d.line)f(h.line,h.ch,d.ch);else{var p=ej(i,h.line),g=ej(i,d.line),v=tP(p)==tP(g),m=f(h.line,h.ch,v?p.text.length+1:null).end,$=f(d.line,v?0:null,d.ch).start;v&&(m.top<$.top-2?(c(m.right,m.top,null,m.bottom),c(s,$.top,$.left,$.bottom)):c(m.right,m.top,$.left-m.right,m.bottom)),m.bottom<$.top&&c(s,m.bottom,null,$.top)}r.appendChild(o)}function rJ(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||nn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ne(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||nr(e))}function nt(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&nn(e))},100)}function nr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(eL(e,"focus",e,t),e.state.focused=!0,G(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),$&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),rJ(e))}function nn(e,t){!e.state.delayingBlurEvent&&(e.state.focused&&(eL(e,"blur",e,t),e.state.focused=!1,F(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ni(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||d<-.005)&&(ie.display.sizerWidth){var g=Math.ceil(c/r7(e.display));g>e.display.maxLineLength&&(e.display.maxLineLength=g,e.display.maxLine=s.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function no(e){if(e.widgets)for(var t=0;t=l&&(o=eZ(t,tI(ej(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function ns(e,t){var r=e.display,n=rB(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=rm(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+rd(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,d=rv(e)-r.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.leftd+h-3&&(l.scrollLeft=t.right+(p?0:10)-d),l}function na(e,t){null!=t&&(nf(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function nu(e){nf(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function nc(e,t,r){(null!=t||null!=r)&&nf(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function nf(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=rH(e,t.from),n=rH(e,t.to);nh(e,r,n,t.margin)}}function nh(e,t,r,n){var i=ns(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});nc(e,i.scrollLeft,i.scrollTop)}function nd(e,t){!(2>Math.abs(e.doc.scrollTop-t))&&(h||nE(e,{top:t}),np(e,t,!0),h&&nE(e),nW(e,100))}function np(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function ng(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),((r?t!=e.doc.scrollLeft:!(2>Math.abs(e.doc.scrollLeft-t)))||n)&&(e.doc.scrollLeft=t,nI(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function nv(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+rd(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+rg(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var nm=function(e,t,r){this.cm=r;var n=this.vert=z("div",[z("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=z("div",[z("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),ew(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ew(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,v&&m<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};nm.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},nm.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},nm.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},nm.prototype.zeroWidthHack=function(){this.horiz.style.height=this.vert.style.width=N&&!C?"12px":"18px",this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Z,this.disableVert=new Z},nm.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,n)}e.style.visibility="",t.set(1e3,n)},nm.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var n$=function(){};function ny(e,t){t||(t=nv(e));var r=e.display.barWidth,n=e.display.barHeight;n_(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&ni(e),n_(e,nv(e)),r=e.display.barWidth,n=e.display.barHeight}function n_(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}n$.prototype.update=function(){return{bottom:0,right:0}},n$.prototype.setScrollLeft=function(){},n$.prototype.setScrollTop=function(){},n$.prototype.clear=function(){};var nb={native:nm,null:n$};function nx(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new nb[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ew(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?ng(e,t):nd(e,t)},e),e.display.scrollbars.addClass&&G(e.display.wrapper,e.display.scrollbars.addClass)}var nw=0;function nC(e){var t;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:++nw,markArrays:null},t=e.curOp,t9?t9.ops.push(t):t.ownsGroup=t9={ops:[t],delayedCallbacks:[]}}function nS(e){var t=e.curOp;t&&function e(t,r){var n=t.ownsGroup;if(n)try{!function e(t){var r=t.delayedCallbacks,n=0;do{for(;n=i.viewTo)||i.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new nF(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function nk(e){e.updatedDisplay=e.mustUpdate&&nP(e.cm,e.update)}function nT(e){var t=e.cm,r=t.display;e.updatedDisplay&&ni(t),e.barMeasure=nv(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ry(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+rg(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-rv(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function nN(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft1&&(s=!0)),null!=c.scroll