All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.primefaces-extensions.codemirror.lib.codemirror.js Maven / Gradle / Ivy

There is a newer version: 14.0.7.1
Show newest version
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function d(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function p(e){for(;Sa.length<=e;)Sa.push(m(Sa)+" ");return Sa[e]}function m(e){return e[e.length-1]}function h(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Ca.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&y(e))||t.test(e):y(e)}function k(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function w(e){return e.charCodeAt(0)>=768&&Ea.test(e)}function _(e,t,n){for(;(n<0?t>0:t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?R(n,E(e,n).text.length):W(t,E(e,t.line).text.length)}function W(e,t){var n=e.ch;return null==n||n>t?R(e.line,t):n<0?R(e.line,0):e}function U(e,t){for(var n=[],r=0;r=t:o.to>t);(r||(r=[])).push(new G(a,o.from,l?null:o.to))}}return r}function Y(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var k=0;k0)){var u=[l,1],f=N(c.from,s.from),p=N(c.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-1}}return i}function te(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?N(c.to,n)>=0:N(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?N(c.from,r)<=0:N(c.from,r)<0)))return!0}}}function ue(e){for(var t;t=se(e);)e=t.find(-1,!0).line;return e}function de(e){for(var t;t=le(e);)e=t.find(1,!0).line;return e}function fe(e){for(var t,n;t=le(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function pe(e,t){var n=E(e,t),r=ue(n);return n==r?t:L(r)}function me(e,t){if(t>e.lastLine())return t;var n,r=E(e,t);if(!he(e,r))return t;for(;n=le(r);)r=n.find(1,!0).line;return L(r)+1}function he(e,t){var n=Ma&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function xe(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function ke(e,t,n){var r;Aa=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Aa=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Aa=i)}return null!=r?r:Aa}function we(e){var t=e.order;return null==t&&(t=e.order=La(e.text)),t}function _e(e,t,n){var r=_(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Se(e,t,n){var r=_e(e,t.ch,n);return null==r?null:new R(t.line,r,n<0?"after":"before")}function Ce(e,t,n,r,i){if(e){var o=we(n);if(o){var a,s=i<0?m(o):o[0],l=i<0==(1==s.level),c=l?"after":"before";if(s.level>0){var u=Zt(t,n);a=i<0?n.text.length-1:0;var d=Xt(t,u,a).top;a=S(function(e){return Xt(t,u,e).top==d},i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=_e(n,a,1,!0))}else a=i<0?s.to:s.from;return new R(r,a,c)}}return new R(r,i<0?n.text.length:0,i<0?"before":"after")}function Ee(e,t,n,r){var i=we(t);if(!i)return Se(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=ke(i,n.ch,n.sticky),a=i[o];if(a.level%2==0&&(r>0?a.to>n.ch:a.from0?d>=a.from&&d>=u.begin:d<=a.to&&d<=u.end)){var f=r<0?"before":"after";return new R(n.line,d,f)}}var p=function(e,t,r){for(var o=function(e,t){return t?new R(n.line,l(e,1),"before"):new R(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==h||r>0&&h==t.text.length||!(m=p(r>0?0:i.length-1,r,c(h)))?null:m}function Te(e,t){return e._handlers&&e._handlers[t]||Ia}function Me(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=d(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ae(e,t){var n=Te(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ze(e){e.prototype.on=function(e,t){Oa(this,e,t)},e.prototype.off=function(e,t){Me(this,e,t)}}function Re(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Pe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function De(e){Re(e),Ne(e)}function qe(e){return e.target||e.srcElement}function $e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),sa&&e.ctrlKey&&1==t&&(t=3),t}function je(e){if(null==va){var t=r("span","​");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(va=t.offsetWidth<=1&&t.offsetHeight>2&&!(Xo&&Yo<8))}var i=va?r("span","​"):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Fe(e){if(null!=ba)return ba;var r=n(e,document.createTextNode("AخA")),i=da(r,0,1).getBoundingClientRect(),o=da(r,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(ba=o.right-i.right<3)}function We(e){if(null!=Da)return Da;var t=n(e,r("span","x")),i=t.getBoundingClientRect(),o=da(t,0,1).getBoundingClientRect();return Da=Math.abs(i.left-o.left)>1}function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),qa[e]=t}function Be(e,t){$a[e]=t}function He(e){if("string"==typeof e&&$a.hasOwnProperty(e))e=$a[e];else if(e&&"string"==typeof e.name&&$a.hasOwnProperty(e.name)){var t=$a[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return He("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return He("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=He(t);var n=qa[t.name];if(!n)return Ge(e,"text/plain");var r=n(e,t);if(ja.hasOwnProperty(t.name)){var i=ja[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 a in t.modeProps)r[a]=t.modeProps[a];return r}function Ve(e,t){var n=ja.hasOwnProperty(e)?ja[e]:ja[e]={};c(t,n)}function Ke(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 Ze(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 Xe(e,t,n){return!e.startState||e.startState(t,n)}function Ye(e,t,n,r){var i=[e.state.modeGen],o={};ot(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=function(n){var r=e.state.overlays[n],a=1,s=0;ot(e,t.text,r.mode,!0,function(e,t){for(var n=a;se&&i.splice(a,1,e,i[a+1],o),a+=2,s=Math.min(e,o)}if(t)if(r.opaque)i.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;ne.options.maxHighlightLength?Ke(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Qe(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=at(e,t,n),a=o>r.first&&E(r,o-1).stateAfter;return a=a?Ke(r.mode,a):Xe(r.mode),r.iter(o,t,function(n){et(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&ot.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function rt(e,t,n,r){var i,o=function(e){return{start:d.start,end:d.pos,string:d.current(),type:i||null,state:e?Ke(a.mode,u):u}},a=e.doc,s=a.mode;t=F(a,t);var l,c=E(a,t.line),u=Qe(e,t.line,n),d=new Fa(c.text,e.options.tabSize);for(r&&(l=[]);(r||d.pose.options.maxHighlightLength?(s=!1,a&&et(e,t,r,d.pos),d.pos=t.length,l=null):l=it(nt(n,d,r,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;ca;--s){if(s<=o.first)return o.first;var l=E(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var c=u(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}function st(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),te(e),ne(e,n);var i=r?r(e):1;i!=e.height&&A(e,i)}function lt(e){e.parent=null,te(e)}function ct(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Ha:Ba;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function ut(e,t){var n=r("span",null,null,Jo?"padding-right: .1px":null),i={pre:r("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(Xo||Jo)&&e.getOption("lineWrapping")};n.setAttribute("role","presentation"),i.pre.setAttribute("role","presentation"),t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,l=void 0;i.pos=0,i.addToken=ft,Fe(e.display.measure)&&(l=we(a))&&(i.addToken=mt(i.addToken,l)),i.map=[];var c=t!=e.display.externalMeasured&&L(a);gt(a,i,Je(e,a,c)),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=s(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=s(a.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(je(e.display.measure))),0==o?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Jo){var u=i.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Ae(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=s(i.pre.className,i.textClass||"")),i}function dt(e){var t=r("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ft(e,t,n,i,o,a,s){if(t){var l,c=e.splitSpaces?pt(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){l=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var m=u.exec(t),h=m?m.index-f:t.length-f;if(h){var g=document.createTextNode(c.slice(f,f+h));Xo&&Yo<9?l.appendChild(r("span",[g])):l.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!m)break;f+=h+1;var v=void 0;if("\t"==m[0]){var b=e.cm.options.tabSize,y=b-e.col%b;v=l.appendChild(r("span",p(y),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==m[0]||"\n"==m[0]?(v=l.appendChild(r("span","\r"==m[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",m[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(m[0]),v.setAttribute("cm-text",m[0]),Xo&&Yo<9?l.appendChild(r("span",[v])):l.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,l=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,l),Xo&&Yo<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||i||o||d||s){var x=n||"";i&&(x+=i),o&&(x+=o);var k=r("span",[l],x,s);return a&&(k.title=a),e.content.appendChild(k)}e.content.appendChild(l)}}function pt(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;ic&&d.from<=c));f++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function ht(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 gt(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,f,p=i.length,m=0,h=1,g="",v=0;;){if(v==m){l=c=u=d=s="",f=null,v=1/0;for(var b=[],y=void 0,x=0;xm||w.collapsed&&k.to==m&&k.from==m)?(null!=k.to&&k.to!=m&&v>k.to&&(v=k.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&k.from==m&&(u+=" "+w.startStyle),w.endStyle&&k.to==v&&(y||(y=[])).push(w.endStyle,k.to),w.title&&!d&&(d=w.title),w.collapsed&&(!f||oe(f.marker,w)<0)&&(f=k)):k.from>m&&v>k.from&&(v=k.from)}if(y)for(var _=0;_=p)break;for(var C=Math.min(p,v);;){if(g){var E=m+g.length;if(!f){var T=E>C?g.slice(0,C-m):g;t.addToken(t,T,a?a+l:l,u,m+T.length==v?c:"",d,s)}if(E>=C){g=g.slice(C-m),m=C;break}m=E,u=""}g=i.slice(o,o=n[h++]),a=ct(n[h++],t.cm.options)}}else for(var M=1;M2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ht(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Gt(e,t){t=ue(t);var r=L(t),i=e.display.externalMeasured=new vt(e.doc,t,r);i.lineN=r;var o=i.built=ut(e,i);return i.text=o.pre,n(e.display.lineMeasure,o.pre),i}function Vt(e,t,n,r){return Xt(e,Zt(e,t),n,r)}function Kt(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=l-s,i=o-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[(c-=3)+2],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Qt(e,t,n,r){var i,o=Yt(t.map,n,r),a=o.node,s=o.start,l=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;s&&w(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l0&&(c=r="right");var d;i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==r?d.length-1:0]:a.getBoundingClientRect()}if(Xo&&Yo<9&&!s&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+bn(e.display),top:f.top,bottom:f.bottom}:Ka}for(var p=i.top-t.rect.top,m=i.bottom-t.rect.top,h=(p+m)/2,g=t.view.measure.heights,v=0;v=r.text.length?(c=r.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return a("before"==u?c-1:c,"before"==u);var d=ke(l,c,u),f=Aa,p=s(c,d,"before"==u);return null!=f&&(p.other=s(c,f,"before"!=u)),p}function dn(e,t){var n=0;t=F(e.doc,t),e.options.lineWrapping||(n=bn(e.display)*t.ch);var r=E(e.doc,t.line),i=ve(r)+qt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function fn(e,t,n,r,i){var o=R(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function pn(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return fn(r.first,0,null,!0,-1);var i=I(r,n),o=r.first+r.size-1;if(i>o)return fn(r.first+r.size-1,E(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=E(r,i);;){var s=gn(e,a,i,t,n),l=le(a),c=l&&l.find(0,!0);if(!l||!(s.ch>c.from.ch||s.ch==c.from.ch&&s.xRel>0))return s;i=L(a=c.to.line)}}function mn(e,t,n,r){var i=function(r){return sn(e,t,Xt(e,n,r),"line")},o=t.text.length,a=S(function(e){return i(e-1).bottom<=r},o,0);return o=S(function(e){return i(e).top>r},a,o),{begin:a,end:o}}function hn(e,t,n,r){var i=sn(e,t,Xt(e,n,r),"line").top;return mn(e,t,n,i)}function gn(e,t,n,r,i){i-=ve(t);var o,a=0,s=t.text.length,l=Zt(e,t),c=we(t);if(c){if(e.options.lineWrapping){var u;u=mn(e,t,l,i),a=u.begin,s=u.end}o=new R(n,a);var d,f,p=un(e,o,"line",t,l).left,m=pMath.abs(d)){if(h<0==d<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=f}}else{var g=S(function(n){var o=sn(e,t,Xt(e,l,n),"line");return o.top>i?(s=Math.min(n,s),!0):!(o.bottom<=i)&&(o.left>r||!(o.rightv.right?1:0,o}function vn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ua){Ua=r("pre");for(var i=0;i<49;++i)Ua.appendChild(document.createTextNode("x")),Ua.appendChild(r("br"));Ua.appendChild(document.createTextNode("x"))}n(e.measure,Ua);var o=Ua.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function bn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),i=r("pre",[t]);n(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function yn(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:xn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function xn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function kn(e){var t=vn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/bn(e.display)-3);return function(i){if(he(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().line3&&(i(p,h.top,null,h.bottom),p=u,h.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),p0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ln(e){e.state.focused||(e.display.input.focus(),On(e))}function In(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,zn(e))},100)}function On(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ae(e,"focus",e,t),e.state.focused=!0,a(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Jo&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),An(e))}function zn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ae(e,"blur",e,t),e.state.focused=!1,ma(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Rn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=xn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a.001||l<-.001)&&(A(i.line,o),Dn(i.line),i.rest))for(var c=0;c=a&&(o=I(t,ve(E(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function $n(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,Go||Sr(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),Go&&Sr(e),yr(e,100))}function jn(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,Rn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fn(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Wn(e){var t=Fn(e);return t.x*=Xa,t.y*=Xa,t}function Un(e,t){var n=Fn(t),r=n.x,i=n.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(r&&s||i&&l){if(i&&sa&&Jo)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!ia){var a=r("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-qt(e.display))+"px;\n                         height: "+(t.bottom-t.top+Ft(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function Zn(e,t,n,r){null==r&&(r=0);for(var i,o=0;o<5;o++){var a=!1;i=un(e,t);var s=n&&n!=t?un(e,n):i,l=Yn(e,Math.min(i.left,s.left),Math.min(i.top,s.top)-r,Math.max(i.left,s.left),Math.max(i.bottom,s.bottom)+r),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=l.scrollTop&&($n(e,l.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=l.scrollLeft&&(jn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(a=!0)),!a)break}return i}function Xn(e,t,n,r,i){var o=Yn(e,t,n,r,i);null!=o.scrollTop&&$n(e,o.scrollTop),null!=o.scrollLeft&&jn(e,o.scrollLeft)}function Yn(e,t,n,r,i){var o=e.display,a=vn(e.display);n<0&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Ut(e),c={};i-n>l&&(i=n+l);var u=e.doc.height+$t(o),d=nu-a;if(ns+l){var p=Math.min(n,(f?u:i)-l);p!=s&&(c.scrollTop=p)}var m=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,h=Wt(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),g=r-t>h;return g&&(r=t+h),t<10?c.scrollLeft=0:th+m-3&&(c.scrollLeft=r+(g?0:10)-h),c}function Jn(e,t,n){null==t&&null==n||er(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Qn(e){er(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?R(t.line,t.ch-1):t,r=R(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function er(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dn(e,t.from),r=dn(e,t.to),i=Yn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function tr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++es},yt(e.curOp)}function nr(e){var t=e.curOp;kt(t,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ts(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function or(e){e.updatedDisplay=e.mustUpdate&&wr(e.cm,e.update)}function ar(e){var t=e.cm,n=t.display;e.updatedDisplay&&Pn(t),e.barMeasure=Bn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Vt(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+Ft(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Wt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function sr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ma&&pe(e.doc,t)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=gr(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 a=gr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):hr(e)}else{var s=gr(e,t,t,-1),l=gr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(bt(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):hr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Sn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);d(a,n)==-1&&a.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function gr(e,t,n,r){var i,o=Sn(e,t),a=e.display.view;if(!Ma||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;pe(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function vr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=bt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=bt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Sn(e,n)))),r.viewTo=n}function br(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Ke(t.mode,Qe(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength,l=Ye(e,o,s?Ke(t.mode,r):r,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&fn)return yr(e,e.options.workDelay),!0}),i.length&&cr(e,function(){for(var t=0;t=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==br(e))return!1;Nn(e)&&(hr(e),n.dims=yn(e));var a=i.first+i.size,s=Math.max(n.visible.from-e.options.viewportMargin,i.first),l=Math.min(a,n.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(a,r.viewTo)),Ma&&(s=pe(e.doc,s),l=me(e.doc,l));var c=s!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;vr(e,s,l),r.viewOffset=ve(E(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=br(e);if(!c&&0==u&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var d=o();return u>4&&(r.lineDiv.style.display="none"),Cr(e,r.updateLineNumbers,n.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,d&&o()!=d&&d.offsetHeight&&d.focus(),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,c&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,yr(e,400)),r.updateLineNumbers=null,!0}function _r(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Wt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+$t(e.display)-Ut(e),n.top)}),t.visible=qn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&wr(e,t);r=!1){Pn(e);var i=Bn(e);Cn(e),Hn(e,i),Tr(e,i)}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 Sr(e,t){var n=new ts(e,t);if(wr(e,n)){Pn(e),_r(e,n);var r=Bn(e);Cn(e),Hn(e,r),Tr(e,r),n.finish()}}function Cr(e,n,r){function i(t){var n=t.nextSibling;return Jo&&sa&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,a=e.options.lineNumbers,s=o.lineDiv,l=s.firstChild,c=o.view,u=o.viewFrom,f=0;f-1&&(m=!1),St(e,p,u,r)),m&&(t(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(z(e.options,u)))),l=p.node.nextSibling}else{var h=Ot(e,p,u,r);s.insertBefore(h,l)}u+=p.size}for(;l;)l=i(l)}function Er(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Tr(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+Ft(e)+"px"}function Mr(e){var n=e.display.gutters,i=e.options.gutters;t(n);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Lr(e,t){var n=e[t];e.sort(function(e,t){return N(e.from(),t.from())}),t=d(e,n);for(var r=1;r=0){var a=$(o.from(),i.from()),s=q(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new rs(l?s:a,l?a:s))}}return new ns(e,t)}function Ir(e,t){return new ns([new rs(e,t||e)],0)}function Or(e){return e.text?R(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function zr(e,t){if(N(e,t.from)<0)return e;if(N(e,t.to)<=0)return Or(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+=Or(t).ch-t.to.ch),R(n,r)}function Rr(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,b)}wt(e,"change",e,t)}function Fr(e,t,n){
function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}function Vr(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=Gr(i,i.lastOp==r)))a=m(o.changes),0==N(t.from,t.to)&&0==N(t.from,a.to)?a.to=Or(t):o.changes.push(Br(e,t));else{var l=m(i.done);for(l&&l.ranges||Xr(e.sel,i.done),o={changes:[Br(e,t)],generation:i.generation},i.done.push(o);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=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ae(e,"historyAdded")}function Kr(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 Zr(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||Kr(e,o,m(i.done),t))?i.done[i.done.length-1]=t:Xr(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&Hr(i.undone)}function Xr(e,t){var n=m(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Yr(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(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Jr(e){if(!e)return null;for(var t,n=0;n-1&&(m(s)[f]=c[f],delete c[f])}}}return r}function ni(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=N(n,i)<0;o!=N(r,i)<0?(i=n,n=r):o!=N(n,r)<0&&(n=r)}return new rs(i,n)}return new rs(r||n,n)}function ri(e,t,n,r){ci(e,new ns([ni(e,e.sel.primary(),t,n)],0),r)}function ii(e,t,n){for(var r=[],i=0;i=t.ch:s.to>t.ch))){if(i&&(Ae(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=gi(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=N(c,n))&&(r<0?u<0:u>0))return mi(e,c,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=gi(e,d,r,d.line==t.line?o:null)),d?mi(e,d,t,r,i):null}}return t}function hi(e,t,n,r,i){var o=r||1,a=mi(e,t,n,o,i)||!i&&mi(e,t,n,o,!0)||mi(e,t,n,-o,i)||!i&&mi(e,t,n,-o,!0);return a?a:(e.cantEdit=!0,R(e.first,0))}function gi(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?F(e,R(t.line-1)):null:n>0&&t.ch==(r||E(e,t.line)).text.length?t.line=0;--i)xi(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else xi(e,t)}}function xi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=N(t.from,t.to)){var n=Rr(e,t);Vr(e,t,n,e.cm?e.cm.curOp.id:NaN),_i(e,t,n,J(e,t));var r=[];Fr(e,function(e,n){n||d(r,e.history)!=-1||(Mi(e.history,t),r.push(e.history)),_i(e,t,null,J(e,t))})}}function ki(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--p){var h=f(p);if(h)return h.v}}}}function wi(e,t){if(0!=t&&(e.first+=t,e.sel=new ns(h(e.sel.ranges,function(e){return new rs(R(e.anchor.line+t,e.anchor.ch),R(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){pr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:R(o,E(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),n||(n=Rr(e,t)),e.cm?Si(e.cm,t,r):jr(e,t,r),ui(e,n,ka)}}function Si(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=L(ue(E(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ie(e),jr(r,t,n,kn(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,o.line),yr(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?pr(e):o.line!=a.line||1!=t.text.length||$r(e.doc,t)?pr(e,o.line,a.line+1,c):mr(e,o.line,"text");var u=Oe(e,"changes"),d=Oe(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&wt(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function Ci(e,t,n,r,i){if(r||(r=n),N(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),yi(e,{from:n,to:r,text:t,origin:i})}function Ei(e,t,n,r){n0||0==s&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=r("span",[a.replacedWith],"CodeMirror-widget"),a.widgetNode.setAttribute("role","presentation"),i.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ce(e,t.line,t,n,a)||t.line!=n.line&&ce(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");H()}a.addToHistory&&Vr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,d=e.cm;if(e.iter(u,n.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&ue(e)==d.display.maxLine&&(l=!0),a.collapsed&&u!=t.line&&A(e,0),Z(e,new G(a,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(t){he(e,t)&&A(t,0)}),a.clearOnEnter&&Oa(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(B(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ss,a.atomic=!0),d){if(l&&(d.curOp.updateMaxLine=!0),a.collapsed)pr(d,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var f=t.line;f<=n.line;f++)mr(d,f,"text");a.atomic&&fi(d.doc),wt(d,"markerAdded",d,a)}return a}function zi(e,t,n,r,i){r=c(r),r.shared=!1;var o=[Oi(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Fr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Oi(e,F(e,t),F(e,n),r,i));for(var l=0;l-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),ui(t.doc,Ir(n,n)),u)for(var f=0;f=0;t--)Ci(e.doc,"",r[t].from,r[t].to,"+delete");Qn(e)})}function Ji(e,t){var n=E(e.doc,t),r=ue(n);return r!=n&&(t=L(r)),Ce(!0,e,r,t,1)}function Qi(e,t){var n=E(e.doc,t),r=de(n);return r!=n&&(t=L(r)),Ce(!0,e,n,t,-1)}function eo(e,t){var n=Ji(e,t.line),r=E(e.doc,n.line),i=we(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return R(n.line,a?0:o,n.sticky)}return n}function to(e,t,n){if("string"==typeof t&&(t=ks[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)!=xa}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function no(e,t,n){for(var r=0;ri-400&&0==N(xs.pos,n)?r="triple":ys&&ys.time>i-400&&0==N(ys.pos,n)?(r="double",xs={time:i,pos:n}):(r="single",ys={time:i,pos:n});var a,s=e.doc.sel,c=sa?t.metaKey:t.ctrlKey;e.options.dragDrop&&za&&!e.isReadOnly()&&"single"==r&&(a=s.contains(n))>-1&&(N((a=s.ranges[a]).from(),n)<0||n.xRel>0)&&(N(a.to(),n)>0||n.xRel<0)?po(e,t,n,c):mo(e,t,n,r,c)}function po(e,t,n,r){var i=e.display,o=+new Date,a=ur(e,function(s){Jo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Me(document,"mouseup",a),Me(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Re(s),!r&&+new Date-200x&&i.push(new rs(R(g,x),R(g,f(b,c,o))))}i.length||i.push(new rs(n,n)),ci(d,Lr(h.ranges.slice(0,m).concat(i),m),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var k=p,w=k.anchor,_=t;if("single"!=r){var S;S="double"==r?e.findWordAt(t):new rs(R(t.line,0),F(d,R(t.line+1,0))),N(S.anchor,w)>0?(_=S.head,w=$(k.from(),S.anchor)):(_=S.anchor,w=q(k.to(),S.head))}var C=h.ranges.slice(0);C[m]=new rs(F(d,w),_),ci(d,Lr(C,m),wa)}}function s(t){var n=++k,i=_n(e,t,!0,"rect"==r);if(i)if(0!=N(i,y)){e.curOp.focus=o(),a(i);var l=qn(c,d);(i.line>=l.to||i.linex.bottom?20:0;u&&setTimeout(ur(e,function(){k==n&&(c.scroller.scrollTop+=u,s(t))}),50)}}function l(t){e.state.selectingText=!1,k=1/0,Re(t),c.input.focus(),Me(document,"mousemove",w),Me(document,"mouseup",_),d.history.lastSelOrigin=null}var c=e.display,d=e.doc;Re(t);var p,m,h=d.sel,g=h.ranges;if(i&&!t.shiftKey?(m=d.sel.contains(n),p=m>-1?g[m]:new rs(n,n)):(p=d.sel.primary(),m=d.sel.primIndex),la?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(p=new rs(n,n)),n=_n(e,t,!0,!0),m=-1;else if("double"==r){var v=e.findWordAt(n);p=e.display.shift||d.extend?ni(d,p,v.anchor,v.head):v}else if("triple"==r){var b=new rs(R(n.line,0),F(d,R(n.line+1,0)));p=e.display.shift||d.extend?ni(d,p,b.anchor,b.head):b}else p=ni(d,p,n);i?m==-1?(m=g.length,ci(d,Lr(g.concat([p]),m),{scroll:!1,origin:"*mouse"})):g.length>1&&g[m].empty()&&"single"==r&&!t.shiftKey?(ci(d,Lr(g.slice(0,m).concat(g.slice(m+1)),0),{scroll:!1,origin:"*mouse"}),h=d.sel):oi(d,m,p,wa):(m=0,ci(d,new ns([p],0),wa),h=d.sel);var y=n,x=c.wrapper.getBoundingClientRect(),k=0,w=ur(e,function(e){$e(e)?s(e):l(e)}),_=ur(e,l);e.state.selectingText=_,Oa(document,"mousemove",w),Oa(document,"mouseup",_)}function ho(e,t,n,r){var i,o;try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Re(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Oe(e,n))return Pe(t);o-=s.top-a.viewOffset;for(var l=0;l=i){var u=I(e.doc,o),d=e.options.gutters[l];return Ae(e,n,e,u,d,t),Pe(t)}}}function go(e,t){return ho(e,t,"gutterClick",!0)}function vo(e,t){Dt(e.display,t)||bo(e,t)||Le(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function bo(e,t){return!!Oe(e,"gutterContextMenu")&&ho(e,t,"gutterContextMenu",!1)}function yo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),rn(e)}function xo(e){function t(t,r,i,o){e.defaults[t]=r,i&&(n[t]=o?function(e,t,n){n!=Ss&&i(e,t,n)}:i)}var n=e.optionHandlers;e.defineOption=t,e.Init=Ss,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Dr(e)},!0),t("indentUnit",2,Dr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){qr(e),rn(e),pr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,n.push(R(r,o))}r++});for(var i=n.length-1;i>=0;i--)Ci(e.doc,t,n[i],R(n[i].line,n[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ss&&e.refresh()}),t("specialCharPlaceholder",dt,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",aa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!ca),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){yo(e),ko(e)},!0),t("keyMap","default",function(e,t,n){var r=Xi(t),i=n!=Ss&&Xi(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),t("extraKeys",null),t("lineWrapping",!1,_o,!0),t("gutters",[],function(e){Ar(e.options),ko(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return Hn(e)},!0),t("scrollbarStyle","native",function(e){Vn(e),Hn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Ar(e.options),ko(e)},!0),t("firstLineNumber",1,ko,!0),t("lineNumberFormatter",function(e){return e},ko,!0),t("showCursorWhenSelecting",!1,Cn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("readOnly",!1,function(e,t){"nocursor"==t?(zn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,wo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Cn,!0),t("singleCursorHeightPerLine",!0,Cn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,qr,!0),t("addModeClass",!1,qr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,qr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null)}function ko(e){Mr(e),pr(e),Rn(e)}function wo(e,t,n){var r=n&&n!=Ss;if(!t!=!r){var i=e.display.dragFunctions,o=t?Oa:Me;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 _o(e){e.options.lineWrapping?(a(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ma(e.display.wrapper,"CodeMirror-wrap"),ye(e)),wn(e),pr(e),rn(e),setTimeout(function(){return Hn(e)},100)}function So(e,t){var n=this;if(!(this instanceof So))return new So(e,t);this.options=t=t?c(t):{},c(Cs,t,!1),Ar(t);var r=t.value;"string"==typeof r&&(r=new ds(r,t.mode,null,t.lineSeparator)),this.doc=r;var i=new So.inputStyles[t.inputStyle](this),o=this.display=new C(e,r,i);o.wrapper.CodeMirror=this,Mr(this),yo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vn(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 ga,keySeq:null,specialChars:null},t.autofocus&&!aa&&o.input.focus(),Xo&&Yo<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Co(this),Wi(),tr(this),this.curOp.forceUpdate=!0,Wr(this,r),t.autofocus&&!aa||this.hasFocus()?setTimeout(l(On,this),20):zn(this);for(var a in Es)Es.hasOwnProperty(a)&&Es[a](n,t[a],Ss);Nn(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var i=e.display;Oa(i.scroller,"mousedown",ur(e,uo)),Xo&&Yo<11?Oa(i.scroller,"dblclick",ur(e,function(t){if(!Le(e,t)){var n=_n(e,t);if(n&&!go(e,t)&&!Dt(e.display,t)){Re(t);var r=e.findWordAt(n);ri(e.doc,r.anchor,r.head)}}})):Oa(i.scroller,"dblclick",function(t){return Le(e,t)||Re(t)}),pa||Oa(i.scroller,"contextmenu",function(t){return vo(e,t)});var o,a={end:0};Oa(i.scroller,"touchstart",function(t){if(!Le(e,t)&&!n(t)){i.input.ensurePolled(),clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Oa(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Oa(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Dt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new rs(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new rs(R(s.line,0),F(e.doc,R(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Re(n)}t()}),Oa(i.scroller,"touchcancel",t),Oa(i.scroller,"scroll",function(){i.scroller.clientHeight&&($n(e,i.scroller.scrollTop),jn(e,i.scroller.scrollLeft,!0),Ae(e,"scroll",e))}),Oa(i.scroller,"mousewheel",function(t){return Un(e,t)}),Oa(i.scroller,"DOMMouseScroll",function(t){return Un(e,t)}),Oa(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Le(e,t)||De(t)},over:function(t){Le(e,t)||($i(e,t),De(t))},start:function(t){return qi(e,t)},drop:ur(e,Di),leave:function(t){Le(e,t)||ji(e)}};var s=i.input.getField();Oa(s,"keyup",function(t){return lo.call(e,t)}),Oa(s,"keydown",ur(e,ao)),Oa(s,"keypress",ur(e,co)),Oa(s,"focus",function(t){return On(e,t)}),Oa(s,"blur",function(t){return zn(e,t)})}function Eo(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Qe(e,t):n="prev");var a=e.options.tabSize,s=E(o,t),l=u(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,d=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(c=o.mode.indent(i,s.text.slice(d.length),s.text),c==xa||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?u(E(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var f="",m=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)m+=a,f+="\t";if(m1)if(Ms&&Ms.text.join("\n")==t){if(r.ranges.length%Ms.text.length==0){l=[];for(var c=0;c=0;d--){var f=r.ranges[d],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=R(p.line,p.ch-n):e.state.overwrite&&!a?g=R(g.line,Math.min(E(o,g.line).text.length,g.ch+m(s).length)):Ms&&Ms.lineWise&&Ms.text.join("\n")==t&&(p=g=R(p.line,0))),u=e.curOp.updateInput;var v={from:p,to:g,text:l?l[d%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};yi(e.doc,v),wt(e,"inputRead",e,v)}t&&!a&&Lo(e,t),Qn(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ao(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||cr(t,function(){return Mo(t,n,0,null,"paste")}),!0}function Lo(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),a=!1;if(o.electricChars){for(var s=0;s-1){a=Eo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Eo(e,i.head.line,"smart"));a&&wt(e,"electricInput",e,i.head.line)}}}function Io(e){for(var t=[],n=[],r=0;rr&&(Eo(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&Qn(t));else{var a=o.from(),s=o.to(),l=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var c=l;c0&&oi(t.doc,i,new rs(a,u[i].to()),ka)}}}),getTokenAt:function(e,t){return rt(this,e,t)},getLineTokens:function(e,t){return rt(this,R(e),t,!0)},getTokenTypeAt:function(e){e=F(this.doc,e);var t,n=Je(this,E(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=E(this.doc,e)}else r=e;return sn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-ve(r):0)},defaultTextHeight:function(){return vn(this.display)},defaultCharWidth:function(){return bn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=un(this,F(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Xn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:dr(ao),triggerOnKeyPress:dr(co),triggerOnKeyUp:lo,execCommand:function(e){if(ks.hasOwnProperty(e))return ks[e].call(null,this)},triggerElectric:dr(function(e){Lo(this,e)}),findPosH:function(e,t,n,r){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=F(this.doc,e),s=0;s0&&s(n.charAt(r-1));)--r;for(;i.5)&&wn(this),Ae(this,"refresh",this)}),swapDoc:dr(function(e){var t=this.doc;return t.cm=null,Wr(this,e),rn(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wt(this,"swapDoc",this,t),t}),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}},ze(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function No(e,t,n,r,i){function o(){var r=t.line+n;return!(r=e.first+e.size)&&(t=new R(r,t.ch,t.sticky),c=E(e,r))}function a(r){var a;if(a=i?Ee(e.cm,c,t,n):Se(c,t,n),null==a){if(r||!o())return!1;t=Ce(i,e.cm,c,t.line,n)}else t=a;return!0}var s=t,l=n,c=E(e,t.line);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||a(!p);p=!1){var m=c.text.charAt(t.ch)||"\n",h=x(m,f)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||p||h||(h="s"),u&&u!=h){n<0&&(n=1,a(),t.sticky="after");break}if(h&&(u=h),n>0&&!a(!p))break}var g=hi(e,t,s,l,!0);return P(s,g)&&(g.hitSide=!0),g}function Po(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*vn(e.display),3);i=(n>0?t.bottom:t.top)+n*l}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(var c;c=pn(e,a,i),c.outside;){if(n<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*n}return c}function Do(e,t){var n=Kt(e,t.line);if(!n||n.hidden)return null;var r=E(e.doc,t.line),i=Ht(n,r,t.line),o=we(r),a="left";if(o){var s=ke(o,t.ch);a=s%2?"right":"left"}var l=Yt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function qo(e,t){return t&&(e.bad=!0),e}function $o(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void(s+=""==n?t.textContent.replace(/\u200b/g,""):n);var u,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(R(r,0),R(i+1,0),o(+d));return void(f.length&&(u=f[0].find())&&(s+=T(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var p=0;p=15&&(ta=!1,Jo=!0);var da,fa=sa&&(Qo||ta&&(null==ua||ua<12.11)),pa=Go||Xo&&Yo>=9,ma=function(t,n){var r=t.className,i=e(n).exec(r);if(i){var o=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(o?i[1]+o:"")}};da=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var ha=function(e){e.select()};oa?ha=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Xo&&(ha=function(e){try{e.select()}catch(e){}});var ga=function(){this.id=null};ga.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var va,ba,ya=30,xa={toString:function(){return"CodeMirror.Pass"}},ka={scroll:!1},wa={origin:"*mouse"},_a={origin:"+move"},Sa=[""],Ca=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ea=/[\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]/,Ta=!1,Ma=!1,Aa=null,La=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,c="L";return function(n){if(!i.test(n))return!1;for(var r=n.length,u=[],d=0;d=this.string.length},Fa.prototype.sol=function(){return this.pos==this.lineStart},Fa.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Fa.prototype.next=function(){if(this.post},Fa.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},Fa.prototype.skipToEnd=function(){this.pos=this.string.length},Fa.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Fa.prototype.backUp=function(e){this.pos-=e},Fa.prototype.column=function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return t!==!1&&(this.pos+=e.length),!0},Fa.prototype.current=function(){return this.string.slice(this.start,this.pos)},Fa.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}};var Wa=function(e,t,n){this.text=e,ne(this,t),this.height=n?n(this):1};Wa.prototype.lineNo=function(){return L(this)},ze(Wa);var Ua,Ba={},Ha={},Ga=null,Va=null,Ka={left:0,right:0,top:0,bottom:0},Za=0,Xa=null;Xo?Xa=-.53:Go?Xa=15:ea?Xa=-.7:na&&(Xa=-1/3);var Ya=function(e,t,n){this.cm=n;var i=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Oa(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Oa(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Xo&&Yo<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ya.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ya.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},Ya.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},Ya.prototype.zeroWidthHack=function(){var e=sa&&!ra?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ga,this.disableVert=new ga},Ya.prototype.enableZeroWidthBar=function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},Ya.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ja=function(){};Ja.prototype.update=function(){return{bottom:0,right:0}},Ja.prototype.setScrollLeft=function(){},Ja.prototype.setScrollTop=function(){},Ja.prototype.clear=function(){};var Qa={native:Ya,null:Ja},es=0,ts=function(e,t,n){var r=e.display;this.viewport=t,this.visible=qn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Wt(e),this.force=n,this.dims=yn(e),this.events=[]};ts.prototype.signal=function(e,t){Oe(e,t)&&this.events.push(arguments)},ts.prototype.finish=function(){for(var e=this,t=0;t=0&&N(e,i.to())<=0)return r}return-1};var rs=function(e,t){this.anchor=e,this.head=t};rs.prototype.from=function(){return $(this.anchor,this.head)},rs.prototype.to=function(){return q(this.anchor,this.head)},rs.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};var is=function(e){var t=this;this.lines=e,this.parent=null;for(var n=0,r=0;r1||!(this.children[0]instanceof is))){var l=[];this.collapse(l),this.children=[new is(l)],this.children[0].parent=this}},os.prototype.collapse=function(e){for(var t=this,n=0;n50){for(var s=o.lines.length%25+25,l=s;l10);e.parent.maybeSpill()}},os.prototype.iterN=function(e,t,n){for(var r=this,i=0;it.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&pr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&fi(t.doc)),t&&wt(t,"markerCleared",t,this),n&&nr(t),this.parent&&this.parent.clear()}},ls.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r,i,o=0;o=0;c--)yi(r,i[c]);l?li(this,l):this.cm&&Qn(this.cm)}),undo:fr(function(){ki(this,"undo")}),redo:fr(function(){ki(this,"redo")}),undoSelection:fr(function(){ki(this,"undo",!0)}),redoSelection:fr(function(){ki(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=F(this,e),t=F(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=o,void++n)}),F(this,R(n,t))},indexFromPos:function(e){e=F(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new R(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),R(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=E(e.doc,i.line-1).text;a&&(i=new R(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),R(i.line-1,a.length-1),i,"+transpose"))}n.push(new rs(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return cr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re.firstLine()&&(r=R(r.line-1,E(e.doc,r.line-1).length)),i.ch==E(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,a,s;r.line==t.viewFrom||0==(o=Sn(e,r.line))?(a=L(t.view[0].line),s=t.view[0].node):(a=L(t.view[o].line),s=t.view[o-1].node.nextSibling);var l,c,u=Sn(e,i.line);if(u==t.view.length-1?(l=t.viewTo-1,c=t.lineDiv.lastChild):(l=L(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines($o(e,s,c,a,l)),f=T(e.doc,R(a,0),R(l,E(e.doc,l).text.length));d.length>1&&f.length>1;)if(m(d)==m(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),a++}for(var p=0,h=0,g=d[0],v=f[0],b=Math.min(g.length,v.length);p1||d[0]||N(w,_)?(Ci(e.doc,d,w,_,"+input"),!0):void 0},As.prototype.ensurePolled=function(){this.forceCompositionEnd()},As.prototype.reset=function(){this.forceCompositionEnd()},As.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.pollContent()||pr(this.cm),this.div.blur(),this.div.focus())},As.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}!e.cm.isReadOnly()&&e.pollContent()||cr(e.cm,function(){return pr(e.cm)})},80))},As.prototype.setUneditable=function(e){e.contentEditable="false"},As.prototype.onKeyPress=function(e){e.preventDefault(),this.cm.isReadOnly()||ur(this.cm,Mo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},As.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},As.prototype.onContextMenu=function(){},As.prototype.resetPosition=function(){},As.prototype.needsContentAttribute=!0;var Ls=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ga,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};Ls.prototype.init=function(e){function t(e){if(!Le(i,e)){if(i.somethingSelected())To({lineWise:!1,text:i.getSelections()}),r.inaccurateSelection&&(r.prevInput="",r.inaccurateSelection=!1,a.value=Ms.text.join("\n"),ha(a));else{if(!i.options.lineWiseCopyCut)return;var t=Io(i);To({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,ka):(r.prevInput="",a.value=t.text.join("\n"),ha(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var n=this,r=this,i=this.cm,o=this.wrapper=zo(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),oa&&(a.style.width="0px"),Oa(a,"input",function(){Xo&&Yo>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),Oa(a,"paste",function(e){Le(i,e)||Ao(e,i)||(i.state.pasteIncoming=!0,r.fastPoll())}),Oa(a,"cut",t),Oa(a,"copy",t),Oa(e.scroller,"paste",function(t){Dt(e,t)||Le(i,t)||(i.state.pasteIncoming=!0,r.focus())}),Oa(e.lineSpace,"selectstart",function(t){Dt(e,t)||Re(t)}),Oa(a,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Oa(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Ls.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=En(e);if(e.options.moveInputWithCursor){var i=un(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ls.prototype.showSelection=function(e){var t=this.cm,r=t.display;n(r.cursorDiv,e.cursors),n(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ls.prototype.reset=function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Pa&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&ha(this.textarea),Xo&&Yo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",Xo&&Yo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},Ls.prototype.getField=function(){return this.textarea},Ls.prototype.supportsTouch=function(){return!1},Ls.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!aa||o()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ls.prototype.blur=function(){this.textarea.blur()},Ls.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ls.prototype.receivedFocus=function(){this.slowPoll()},Ls.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ls.prototype.fastPoll=function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},Ls.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Na(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(Xo&&Yo>=9&&this.hasSelection===i||sa&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,i.length);a1e3||i.indexOf("\n")>-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},Ls.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ls.prototype.onKeyPress=function(){Xo&&Yo>=9&&(this.hasSelection=null),this.fastPoll()},Ls.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=d,a.style.cssText=u,Xo&&Yo<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!Xo||Xo&&Yo<9)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?ur(i,vi)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=_n(i,e),l=o.scroller.scrollTop;if(s&&!ta){var c=i.options.resetSelectionOnContextMenu;c&&i.doc.sel.contains(s)==-1&&ur(i,ci)(i.doc,Ir(s),ka);var u=a.style.cssText,d=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var f=r.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n      z-index: 1000; background: "+(Xo?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(Jo&&(p=window.scrollY),o.input.focus(),Jo&&window.scrollTo(null,p),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Xo&&Yo>=9&&t(),pa){De(e);var m=function(){Me(window,"mouseup",m),setTimeout(n,20)};Oa(window,"mouseup",m)}else setTimeout(n,50)}},Ls.prototype.readOnlyChanged=function(e){e||this.reset()},Ls.prototype.setUneditable=function(){},Ls.prototype.needsContentAttribute=!1,xo(So),Ro(So);var Is="iter insert remove copy getEditor constructor".split(" ");for(var Os in ds.prototype)ds.prototype.hasOwnProperty(Os)&&d(Is,Os)<0&&(So.prototype[Os]=function(e){return function(){return e.apply(this.doc,arguments)}}(ds.prototype[Os]));return ze(ds),So.inputStyles={textarea:Ls,contenteditable:As},So.defineMode=function(e){So.defaults.mode||"null"==e||(So.defaults.mode=e),
Ue.apply(this,arguments)},So.defineMIME=Be,So.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),So.defineMIME("text/plain","null"),So.defineExtension=function(e,t){So.prototype[e]=t},So.defineDocExtension=function(e,t){ds.prototype[e]=t},So.fromTextArea=Wo,Uo(So),So.version="5.23.0",So}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){var t=e.search(o);return t==-1?0:t}function n(e,t,n){return/\bstring\b/.test(e.getTokenTypeAt(a(t.line,0)))&&!/^[\'\"`]/.test(n)}function r(e,t){var n=e.getMode();return n.useInnerComments!==!1&&n.innerMode?e.getModeAt(t):n}var i={},o=/[^\s\u00a0]/,a=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=i);for(var t=this,n=1/0,r=this.listSelections(),o=null,s=r.length-1;s>=0;s--){var l=r[s].from(),c=r[s].to();l.line>=n||(c.line>=n&&(c=a(n,0)),n=l.line,null==o?t.uncomment(l,c,e)?o="un":(t.lineComment(l,c,e),o="line"):"un"==o?t.uncomment(l,c,e):t.lineComment(l,c,e))}}),e.defineExtension("lineComment",function(e,s,l){l||(l=i);var c=this,u=r(c,e),d=c.getLine(e.line);if(null!=d&&!n(c,e,d)){var f=l.lineComment||u.lineComment;if(!f)return void((l.blockCommentStart||u.blockCommentStart)&&(l.fullLines=!0,c.blockComment(e,s,l)));var p=Math.min(0!=s.ch||s.line==e.line?s.line+1:s.line,c.lastLine()+1),m=null==l.padding?" ":l.padding,h=l.commentBlankLines||e.line==s.line;c.operation(function(){if(l.indent){for(var n=null,r=e.line;rs.length)&&(n=s)}for(var r=e.line;rd||s.operation(function(){if(0!=n.fullLines){var r=o.test(s.getLine(d));s.replaceRange(f+u,a(d)),s.replaceRange(c+f,a(e.line,0));var i=n.blockCommentLead||l.blockCommentLead;if(null!=i)for(var p=e.line+1;p<=d;++p)(p!=d||r)&&s.replaceRange(i+f,a(p,0))}else s.replaceRange(u,t),s.replaceRange(c,e)})}}),e.defineExtension("uncomment",function(e,t,n){n||(n=i);var s,l=this,c=r(l,e),u=Math.min(0!=t.ch||t.line==e.line?t.line:t.line-1,l.lastLine()),d=Math.min(e.line,u),f=n.lineComment||c.lineComment,p=[],m=null==n.padding?" ":n.padding;e:if(f){for(var h=d;h<=u;++h){var g=l.getLine(h),v=g.indexOf(f);if(v>-1&&!/comment/.test(l.getTokenTypeAt(a(h,v+1)))&&(v=-1),v==-1&&o.test(g))break e;if(v>-1&&o.test(g.slice(0,v)))break e;p.push(g)}if(l.operation(function(){for(var e=d;e<=u;++e){var t=p[e-d],n=t.indexOf(f),r=n+f.length;n<0||(t.slice(r,r+m.length)==m&&(r+=m.length),s=!0,l.replaceRange("",a(e,n),a(e,r)))}}),s)return!0}var b=n.blockCommentStart||c.blockCommentStart,y=n.blockCommentEnd||c.blockCommentEnd;if(!b||!y)return!1;var x=n.blockCommentLead||c.blockCommentLead,k=l.getLine(d),w=k.indexOf(b);if(w==-1)return!1;var _=u==d?k:l.getLine(u),S=_.indexOf(y,u==d?w+b.length:0);if(S==-1&&d!=u&&(_=l.getLine(--u),S=_.indexOf(y)),S==-1||!/comment/.test(l.getTokenTypeAt(a(d,w+1)))||!/comment/.test(l.getTokenTypeAt(a(u,S+1))))return!1;var C=k.lastIndexOf(b,e.ch),E=C==-1?-1:k.slice(0,e.ch).indexOf(y,C+b.length);if(C!=-1&&E!=-1&&E+y.length!=e.ch)return!1;E=_.indexOf(y,t.ch);var T=_.slice(t.ch).lastIndexOf(b,E-t.ch);return C=E==-1||T==-1?-1:t.ch+T,(E==-1||C==-1||C==t.ch)&&(l.operation(function(){l.replaceRange("",a(u,S-(m&&_.slice(S-m.length,S)==m?m.length:0)),a(u,S+y.length));var e=w+b.length;if(m&&k.slice(e,e+m.length)==m&&(e+=m.length),l.replaceRange("",a(d,w),a(d,e)),x)for(var t=d+1;t<=u;++t){var n=l.getLine(t),r=n.indexOf(x);if(r!=-1&&!o.test(n.slice(0,r))){var i=r+x.length;m&&n.slice(i,i+m.length)==m&&(i+=m.length),l.replaceRange("",a(t,r),a(t,i))}}}),!0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var r,i=t.listSelections(),o=[],a=0;a=f);else if(0==l.string.indexOf(r.blockCommentStart)){if(u=p.slice(0,l.start),!/^\s*$/.test(u)){u="";for(var m=0;ml.start&&/^\s*$/.test(p.slice(0,d))&&(u=p.slice(0,d));null!=u&&(u+=r.blockCommentContinue)}if(null==u&&r.lineComment&&n(t)){var h=t.getLine(s.line),d=h.indexOf(r.lineComment);d>-1&&(u=h.slice(0,d),/\S/.test(u)?u=null:u+=r.lineComment+h.slice(d+r.lineComment.length).match(/^\s*/)[0])}if(null==u)return e.Pass;o[a]="\n"+u}t.operation(function(){for(var e=i.length-1;e>=0;e--)t.replaceRange(o[e],i[e].from(),i[e].to(),"+insert")})}function n(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||t.continueLineComment!==!1}for(var r=["clike","css","javascript"],i=0;i=0;s--){var u=a[s].head;n.replaceRange("",p(u.line,u.ch-1),p(u.line,u.ch+1),"+delete")}}function o(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),s=0;s0;return{anchor:new p(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new p(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var o=r(n);if(!o||n.getOption("disableInput"))return e.Pass;var s=t(o,"pairs"),c=s.indexOf(i);if(c==-1)return e.Pass;for(var f,m=t(o,"triples"),h=s.charAt(c+1)==i,g=n.listSelections(),v=c%2==0,b=0;b1&&m.indexOf(i)>=0&&n.getRange(p(k.line,k.ch-2),k)==i+i&&(k.ch<=2||n.getRange(p(k.line,k.ch-3),p(k.line,k.ch-2))!=i))y="addFour";else if(h){if(e.isWordChar(w)||!u(n,k,i))return e.Pass;y="both"}else{if(!v||n.getLine(k.line).length!=k.ch&&!l(w,s)&&!/\s/.test(w))return e.Pass;y="both"}else y=h&&d(n,k)?"both":m.indexOf(i)>=0&&n.getRange(k,p(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(f){if(f!=y)return e.Pass}else f=y}var _=c%2?s.charAt(c-1):i,S=c%2?i:s.charAt(c+1);n.operation(function(){if("skip"==f)n.execCommand("goCharRight");else if("skipThree"==f)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==f){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function c(e,t){var n=e.getRange(p(t.line,t.ch-1),p(t.line,t.ch+1));return 2==n.length?n:null}function u(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type)||d(t,n))return!1;var a=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(a.pos=a.start=o.start;;){var s=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(s);a.start=a.pos}}function d(e,t){var n=e.getTokenAt(p(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch}var f={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},p=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(h),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(h))});for(var m=f.pairs+"`",h={Backspace:i,Enter:o},g=0;gc.ch&&(v=v.slice(0,v.length-u.end+c.ch));var b=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==f.type||u.string.indexOf("/")==u.string.length-1||h&&i(h,b)>-1||o(t,v,c,f,!0))return e.Pass;var y=g&&i(g,b)>-1;r[l]={indent:y,text:">"+(y?"\n\n":"")+"",newPos:y?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var l=n.length-1;l>=0;l--){var x=r[l];t.replaceRange(x.text,n[l].head,n[l].anchor,"+insert");var k=t.listSelections().slice(0);k[l]={head:x.newPos,anchor:x.newPos},t.setSelections(k),x.indent&&(t.indentLine(x.newPos.line,null,!0),t.indentLine(x.newPos.line+1,null,!0))}}function n(t,n){for(var r=t.listSelections(),i=[],a=n?"/":""!=t.getLine(l.line).charAt(c.end)&&(f+=">"),i[s]=f}t.replaceSelections(i),r=t.listSelections();for(var s=0;s'"]=function(e){return t(e)}),n.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],s=["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"];e.commands.closeTag=function(e){return n(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t=/^(\s*)(>[> ]*|- \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|- \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(i){if(i.getOption("disableInput"))return e.Pass;for(var o=i.listSelections(),a=[],s=0;s\s*$/.test(f)||i.replaceRange("",{line:l.line,ch:0},{line:l.line,ch:l.ch+1}),a[s]="\n";else{var m=p[1],h=p[5],g=r.test(p[2])||p[2].indexOf(">")>=0?p[2].replace("x"," "):parseInt(p[3],10)+1+p[4];a[s]="\n"+m+g+h}}i.replaceSelections(a)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,r,i){var o=e.getLineHandle(t.line),l=t.ch-1,c=l>=0&&s[o.text.charAt(l)]||s[o.text.charAt(++l)];if(!c)return null;var u=">"==c.charAt(1)?1:-1;if(r&&u>0!=(l==t.ch))return null;var d=e.getTokenTypeAt(a(t.line,l+1)),f=n(e,a(t.line,l+(u>0?1:0)),u,d||null,i);return null==f?null:{from:a(t.line,l),to:f&&f.pos,match:f&&f.ch==c.charAt(0),forward:u>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,c=[],u=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,d=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),f=t.line;f!=d;f+=n){var p=e.getLine(f);if(p){var m=n>0?0:p.length-1,h=n>0?p.length:-1;if(!(p.length>o))for(f==t.line&&(m=t.ch-(n<0?1:0));m!=h;m+=n){var g=p.charAt(m);if(u.test(g)&&(void 0===r||e.getTokenTypeAt(a(f,m+1))==r)){var v=s[g];if(">"==v.charAt(1)==n>0)c.push(g);else{if(!c.length)return{pos:a(f,m),ch:g};c.pop()}}}}}return f-n!=(n>0?e.lastLine():e.firstLine())&&null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),c=0;c",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",i),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var r=n.getCursor(),i=n.getViewport();i.from=Math.min(i.from,r.line),i.to=Math.max(r.line+1,i.to);var o=e.findMatchingTag(n,r,i);if(o){if(n.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var s="close"==o.at?o.open:o.close;s?n.state.tagOther=n.markText(s.from,s.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function r(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",n),i.off("viewportChange",r),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",n),i.on("viewportChange",r),n(i))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var r="close"==n.at?n.open:n.close;r&&t.extendSelection(r.to,r.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineOption("showTrailingSpace",!1,function(t,n,r){r==e.Init&&(r=!1),r&&!n?t.removeOverlay("trailingspace"):!r&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function r(r){for(var s=n.ch,l=0;;){var c=s<=0?-1:a.lastIndexOf(r,s-1);if(c!=-1){if(1==l&&ct.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i),s=a.indexOf(";");if(s!=-1)return{startCh:r.end,end:e.Pos(i,s)}}}var i,o=n.line,a=r(o);if(!a||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var s=a.end;;){var l=r(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:s}}),e.registerHelper("fold","include",function(t,n){function r(n){if(nt.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var a=i;;){var s=r(a+1);if(null==s)break;++a}return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(a))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var r=t.getModeAt(n),i=r.blockCommentStart,o=r.blockCommentEnd;if(i&&o){for(var a,s=n.line,l=t.getLine(s),c=n.ch,u=0;;){var d=c<=0?-1:l.lastIndexOf(i,c-1);if(d!=-1){if(1==u&&dt.firstLine();)i=e.Pos(i.line-1,0),u=s(!1);if(u&&!u.cleared&&"unfold"!==a){var d=n(t,o);e.on(d,"mousedown",function(t){f.clear(),e.e_preventDefault(t)});var f=t.markText(u.from,u.to,{replacedWith:d,clearOnEnter:r(t,o,"clearOnEnter"),__isFold:!0});f.on("clear",function(n,r){e.signal(t,"unfold",t,n,r)}),e.signal(t,"fold",t,u.from,u.to)}}function n(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);n=document.createElement("span"),n.appendChild(i),n.className="CodeMirror-foldmarker"}return n}function r(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:i[n]}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,r){t(this,e,n,r)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n=s&&(n=i(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n),++a})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){o(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function s(e,t,n){var i=e.state.foldGutter;if(i){var o=i.options;if(n==o.gutter){var a=r(e,t);a?a.clear():e.foldCode(d(t,0),o.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation(function(){n.fromt.to&&(o(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function u(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&ri))break;o=a}}return o?{from:e.Pos(r.line,n.getLine(r.line).length),to:e.Pos(o,n.getLine(o).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","markdown",function(t,n){function r(n){var r=t.getTokenTypeAt(e.Pos(n,0));return r&&/\bheader\b/.test(r)}function i(e,t,n){var i=t&&t.match(/^#+/);return i&&r(e)?i[0].length:(i=n&&n.match(/^[=\-]+\s*$/),i&&r(e+1)?"="==n[0]?1:2:o)}var o=100,a=t.getLine(n.line),s=t.getLine(n.line+1),l=i(n.line,a,s);if(l!==o){for(var c=t.lastLine(),u=n.line,d=t.getLine(u+2);u=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(t==-1){if(i(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function s(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(t==-1){if(o(e))continue;return}if(r(e,t+1)){h.lastIndex=t,e.ch=t;var n=h.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){h.lastIndex=e.ch;var t=h.exec(e.text);if(!t){if(i(e))continue;return}{if(r(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(t==-1){if(o(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var n=[];;){var r,i=l(e),o=e.line,s=e.ch-(i?i[0].length:0);if(!i||!(r=a(e)))return;if("selfClose"!=r)if(i[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==i[2]){n.length=c;break}if(c<0&&(!t||t==i[2]))return{tag:i[2],from:f(o,s),to:f(e.line,e.ch)}}else n.push(i[2])}}function d(e,t){for(var n=[];;){var r=c(e);if(!r)return;if("selfClose"!=r){var i=e.line,o=e.ch,a=s(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==a[2]){n.length=l;break}if(l<0&&(!t||t==a[2]))return{tag:a[2],from:f(e.line,e.ch),to:f(i,o)}}}else s(e)}}var f=e.Pos,p="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",m=p+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",h=new RegExp("<(/?)(["+p+"]["+m+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var r=new n(e,t.line,0);;){var i,o=l(r);if(!o||r.line!=t.line||!(i=a(r)))return;if(!o[1]&&"selfClose"!=i){var s=f(r.line,r.ch),c=u(r,o[2]);return c&&{from:s,to:c.from}}}}),e.findMatchingTag=function(e,r,i){var o=new n(e,r.line,r.ch,i);if(o.text.indexOf(">")!=-1||o.text.indexOf("<")!=-1){var l=a(o),c=l&&f(o.line,o.ch),p=l&&s(o);if(l&&p&&!(t(o,r)>0)){var m={from:f(o.line,o.ch),to:c,tag:p[2]};return"selfClose"==l?{open:m,close:null,at:"open"}:p[1]?{open:d(o,p[2]),close:m,at:"close"}:(o=new n(e,c.line,c.ch,i),{open:m,close:u(o,p[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,r){for(var i=new n(e,t.line,t.ch,r);;){var o=d(i);if(!o)break;var a=new n(e,t.line,t.ch,r),s=u(a,o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,r,i){var o=new n(e,t.line,t.ch,i?{from:0,to:i}:null);return u(o,r)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t=/[\w$]+/,n=500;e.registerHelper("hint","anyword",function(r,i){for(var o=i&&i.word||t,a=i&&i.range||n,s=r.getCursor(),l=r.getLine(s.line),c=s.ch,u=c;u&&o.test(l.charAt(u-1));)--u;for(var d=u!=c&&l.slice(u,c),f=i&&i.list||[],p={},m=new RegExp(o.source,"g"),h=-1;h<=1;h+=2)for(var g=s.line,v=Math.min(Math.max(g+h*a,r.firstLine()),r.lastLine())+h;g!=v;g+=h)for(var b,y=r.getLine(g);b=m.exec(y);)g==s.line&&b[0]===d||d&&0!=b[0].lastIndexOf(d,0)||Object.prototype.hasOwnProperty.call(p,b[0])||(p[b[0]]=!0,f.push(b[0]));return{list:f,from:e.Pos(s.line,u),to:e.Pos(s.line,c)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],e):e(CodeMirror)}(function(e){"use strict";var t={link:1,visited:1,active:1,hover:1,focus:1,"first-letter":1,"first-line":1,"first-child":1,before:1,after:1,lang:1};e.registerHelper("hint","css",function(n){function r(e){for(var t in e)c&&0!=t.lastIndexOf(c,0)||d.push(t)}var i=n.getCursor(),o=n.getTokenAt(i),a=e.innerMode(n.getMode(),o.state);if("css"==a.mode.name){if("keyword"==o.type&&0=="!important".indexOf(o.string))return{list:["!important"],from:e.Pos(i.line,o.start),to:e.Pos(i.line,o.end)};var s=o.start,l=i.ch,c=o.string.slice(0,l-s);/[^\w$_-]/.test(c)&&(c="",s=l=i.ch);var u=e.resolveMode("text/css"),d=[],f=a.state.state;return"pseudo"==f||"variable-3"==o.type?r(t):"block"==f||"maybeprop"==f?r(u.propertyKeywords):"prop"==f||"parens"==f||"at"==f||"params"==f?(r(u.valueKeywords),r(u.colorKeywords)):"media"!=f&&"media_parens"!=f||(r(u.mediaTypes),r(u.mediaFeatures)),d.length?{list:d,from:e.Pos(i.line,s),to:e.Pos(i.line,l)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t in d)d.hasOwnProperty(t)&&(e.attrs[t]=d[t])}function n(t,n){var r={schemaInfo:u};if(n)for(var i in n)r[i]=n[i];return e.hint.xml(t,r)}var r="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),i=["_blank","_self","_top","_parent"],o=["ascii","utf-8","utf-16","latin1","latin1"],a=["get","post","put","delete"],s=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],l=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],c={attrs:{}},u={a:{attrs:{href:null,ping:null,type:null,media:l,target:i,hreflang:r}},abbr:c,acronym:c,address:c,applet:c,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:l,hreflang:r,type:null,shape:["default","rect","circle","poly"]}},article:c,aside:c,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:c,base:{attrs:{href:null,target:i}},basefont:c,bdi:c,bdo:c,big:c,blockquote:{attrs:{cite:null}},body:c,br:c,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:s,formmethod:a,formnovalidate:["","novalidate"],formtarget:i,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:c,center:c,cite:c,code:c,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:c,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:c,dir:c,div:c,dl:c,dt:c,em:c,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:c,figure:c,font:c,footer:c,form:{attrs:{action:null,name:null,"accept-charset":o,autocomplete:["on","off"],enctype:s,method:a,novalidate:["","novalidate"],target:i}},frame:c,frameset:c,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:c,hgroup:c,hr:c,html:{attrs:{manifest:null},children:["head","body"]},i:c,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:s,formmethod:a,formnovalidate:["","novalidate"],formtarget:i,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:c,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:c,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:r,media:l,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:c,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:o,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:c,noframes:c,noscript:c,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:c,param:{attrs:{name:null,value:null}},pre:c,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:c,rt:c,ruby:c,s:c,samp:c,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:o}},section:c,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:c,source:{attrs:{src:null,type:null,media:null}},span:c,strike:c,strong:c,style:{attrs:{type:["text/css"],media:l,scoped:null}},sub:c,summary:c,sup:c,table:c,tbody:c,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:c,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:c,time:{attrs:{datetime:null}},title:c,tr:c,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:r}},tt:c,u:c,ul:c,var:c,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:c},d={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};t(c);for(var f in u)u.hasOwnProperty(f)&&u[f]!=c&&t(u[f]);e.htmlSchema=u,e.registerHelper("hint","html",n)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){for(var n=0,r=e.length;no.ch&&(a.end=o.ch,a.string=a.string.slice(0,o.ch-a.start)):a={start:o.ch,end:o.ch,string:"",state:a.state,type:"."==a.string?"property":null};for(var s=a;"property"==s.type;){if(s=r(t,c(o.line,s.start)),"."!=s.string)return;if(s=r(t,c(o.line,s.start)),!u)var u=[];u.push(s)}return{list:l(a,u,n,i),from:c(o.line,a.start),to:c(o.line,a.end)}}}function i(e,t){return r(e,p,function(e,t){return e.getTokenAt(t)},t)}function o(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function a(e,t){return r(e,m,o,t)}function s(e,t){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var n=e;n;n=Object.getPrototypeOf(n))Object.getOwnPropertyNames(n).forEach(t);else for(var r in e)t(r)}function l(e,r,i,o){function a(e){0!=e.lastIndexOf(p,0)||n(c,e)||c.push(e)}function l(e){"string"==typeof e?t(u,a):e instanceof Array?t(d,a):e instanceof Function&&t(f,a),s(e,a)}var c=[],p=e.string,m=o&&o.globalScope||window;if(r&&r.length){var h,g=r.pop();for(g.type&&0===g.type.indexOf("variable")?(o&&o.additionalContext&&(h=o.additionalContext[g.string]),o&&o.useGlobalScope===!1||(h=h||m[g.string])):"string"==g.type?h="":"atom"==g.type?h=1:"function"==g.type&&(null==m.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof m.jQuery?null!=m._&&"_"==g.string&&"function"==typeof m._&&(h=m._()):h=m.jQuery());null!=h&&r.length;)h=h[r.pop().string];null!=h&&l(h)}else{for(var v=e.state.localVars;v;v=v.next)a(v.name);for(var v=e.state.globalVars;v;v=v.next)a(v.name);o&&o.useGlobalScope===!1||l(m),t(i,a)}return c}var c=e.Pos;e.registerHelper("hint","javascript",i),e.registerHelper("hint","coffeescript",a);var u="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),d="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),f="prototype apply call bind".split(" "),p="break case catch continue debugger default delete do else false finally for function if in instanceof new null return switch throw true try typeof var void while with".split(" "),m="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}function n(t,n){var r=e.cmpPos(n.from,t.from);return r>0&&t.to.ch-t.from.ch!=n.to.ch-n.from.ch}function r(e,t,n){var r=e.options.hintOptions,i={};for(var o in h)i[o]=h[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}function i(e){return"string"==typeof e?e:e.text}function o(e,t){function n(e,n){var i;i="string"!=typeof n?function(e){return n(e,t)}:r.hasOwnProperty(n)?r[n]:n,o[e]=i}var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},i=e.options.customKeys,o=i?{}:r;if(i)for(var a in i)i.hasOwnProperty(a)&&n(a,i[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&n(a,s[a]);return o}function a(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function s(t,n){this.completion=t,this.data=n,this.picked=!1;var r=this,s=t.cm,l=this.hints=document.createElement("ul");l.className="CodeMirror-hints",this.selectedHint=n.selectedHint||0;for(var c=n.list,u=0;ul.clientHeight+1,C=s.getScrollInfo();if(_>0){var E=w.bottom-w.top,T=g.top-(g.bottom-w.top);if(T-E>0)l.style.top=(b=g.top-E)+"px",y=!1;else if(E>k){l.style.height=k-5+"px",l.style.top=(b=g.bottom-w.top)+"px";var M=s.getCursor();n.from.ch!=M.ch&&(g=s.cursorCoords(M),l.style.left=(v=g.left)+"px",w=l.getBoundingClientRect())}}var A=w.right-x;if(A>0&&(w.right-w.left>x&&(l.style.width=x-5+"px",A-=w.right-w.left-x),l.style.left=(v=g.left-A)+"px"),S)for(var L=l.firstChild;L;L=L.nextSibling)L.style.paddingRight=s.display.nativeBarWidth+"px";if(s.addKeyMap(this.keyMap=o(t,{moveFocus:function(e,t){r.changeActive(r.selectedHint+e,t)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:c.length,close:function(){t.close()},pick:function(){r.pick()},data:n})),t.options.closeOnUnfocus){var I;s.on("blur",this.onBlur=function(){I=setTimeout(function(){t.close()},100)}),s.on("focus",this.onFocus=function(){clearTimeout(I)})}return s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),n=s.getWrapperElement().getBoundingClientRect(),r=b+C.top-e.top,i=r-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return y||(i+=l.offsetHeight),i<=n.top||i>=n.bottom?t.close():(l.style.top=r+"px",void(l.style.left=v+C.left-e.left+"px"))}),e.on(l,"dblclick",function(e){var t=a(l,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())}),e.on(l,"click",function(e){var n=a(l,e.target||e.srcElement);n&&null!=n.hintId&&(r.changeActive(n.hintId),t.options.completeOnSingleClick&&r.pick())}),e.on(l,"mousedown",function(){setTimeout(function(){s.focus()},20)}),e.signal(n,"select",c[0],l.firstChild),!0}function l(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):r(i+1)})}var o=l(e,i);r(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}var d="CodeMirror-hint",f="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",function(n){n=r(this,this.getCursor("start"),n);var i=this.listSelections();if(!(i.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var o=0;o=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r.className=r.className.replace(" "+f,""),r=this.hints.childNodes[this.selectedHint=t],r.className+=" "+f,r.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:u}),e.registerHelper("hint","fromList",function(t,n){var r=t.getCursor(),i=t.getTokenAt(r),o=e.Pos(r.line,i.end);if(i.string&&/\w/.test(i.string[i.string.length-1]))var a=i.string,s=e.Pos(r.line,i.start);else var a="",s=o;for(var l=[],c=0;c,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return"[object Array]"==Object.prototype.toString.call(e)}function n(t){var n=t.doc.modeOption;return"sql"===n&&(n="text/x-sql"),e.resolveMode(n).keywords}function r(e){return"string"==typeof e?e:e.text}function i(e,n){return t(n)&&(n={columns:n}),n.text||(n.text=e),n}function o(e){var n={};if(t(e))for(var o=e.length-1;o>=0;o--){var a=e[o];n[r(a).toUpperCase()]=i(r(a),a)}else if(e)for(var s in e)n[s.toUpperCase()]=i(s,e[s]);return n}function a(e){return h[e.toUpperCase()]}function s(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function l(e,t){var n=e.length,i=r(t).substr(0,n);return e.toUpperCase()===i.toUpperCase()}function c(e,n,r,i){if(t(r))for(var o=0;o0)&&x(f,l[m])<=0){c={start:d,end:l[m]};break}d=l[m]}for(var h=n.getRange(c.start,c.end,!1),m=0;md.ch&&(b.end=d.ch,b.string=b.string.slice(0,d.ch-b.start)),b.string.match(/^[.`\w@]\w*$/)?(u=b.string,s=b.start,l=b.end):(s=l=d.ch,u=""),"."==u.charAt(0)||"`"==u.charAt(0)?s=f(d,b,p,e):(c(p,u,h,function(e){return e}),c(p,u,g,function(e){return e}),i||c(p,u,v,function(e){
return e.toUpperCase()})),{list:p,from:y(d.line,s),to:y(d.line,l)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,r){var i=r&&r.schemaInfo,o=r&&r.quoteChar||'"';if(i){var a=t.getCursor(),s=t.getTokenAt(a);s.end>a.ch&&(s.end=a.ch,s.string=s.string.slice(0,a.ch-s.start));var l=e.innerMode(t.getMode(),s.state);if("xml"==l.mode.name){var c,u,d=[],f=!1,p=/\btag\b/.test(s.type)&&!/>$/.test(s.string),m=p&&/^\w/.test(s.string);if(m){var h=t.getLine(a.line).slice(Math.max(0,s.start-2),s.start),g=/<\/$/.test(h)?"close":/<$/.test(h)?"open":null;g&&(u=s.start-("close"==g?2:1))}else p&&"<"==s.string?g="open":p&&"")}else{var b=i[l.state.tagName],w=b&&b.attrs,_=i["!attrs"];if(!w&&!_)return;if(w){if(_){var S={};for(var C in _)_.hasOwnProperty(C)&&(S[C]=_[C]);for(var C in w)w.hasOwnProperty(C)&&(S[C]=w[C]);w=S}}else w=_;if("string"==s.type||"="==s.string){var E,h=t.getRange(n(a.line,Math.max(0,a.ch-60)),n(a.line,"string"==s.type?s.start:s.end)),T=h.match(/([^\s\u00a0=<>\"\']+)=$/);if(!T||!w.hasOwnProperty(T[1])||!(E=w[T[1]]))return;if("function"==typeof E&&(E=E.call(this,t)),"string"==s.type){c=s.string;var M=0;/['"]/.test(s.string.charAt(0))&&(o=s.string.charAt(0),c=s.string.slice(1),M++);var A=s.string.length;/['"]/.test(s.string.charAt(A-1))&&(o=s.string.charAt(A-1),c=s.string.substr(M,A-2)),f=!0}for(var x=0;x0){var u=o.character;l.forEach(function(e){u>e&&(u-=1)}),o.character=u}}var d=o.character-1,f=d+1;o.evidence&&(s=o.evidence.substring(d).search(/.\b/),s>-1&&(f+=s)),o.description=o.reason,o.start=o.character,o.end=f,o=n(o),o&&r.push({message:o.description,severity:o.severity,from:e.Pos(o.line-1,d),to:e.Pos(o.line-1,f)})}}}var a=["Dangerous comment"],s=[["Expected '{'","Statement body should be inside '{ }' braces."]],l=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];e.registerHelper("lint","javascript",t)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("lint","json",function(t){var n=[];jsonlint.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{jsonlint.parse(t)}catch(e){}return n})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n){function r(t){return i.parentNode?(i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",void(i.style.left=t.clientX+5+"px")):e.off(document,"mousemove",r)}var i=document.createElement("div");return i.className="CodeMirror-lint-tooltip",i.appendChild(n.cloneNode(!0)),document.body.appendChild(i),e.on(document,"mousemove",r),r(t),null!=i.style.opacity&&(i.style.opacity=1),i}function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(e){e.parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout(function(){n(e)},600))}function i(n,i,o){function a(){e.off(o,"mouseout",a),s&&(r(s),s=null)}var s=t(n,i),l=setInterval(function(){if(s)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){a();break}}if(!s)return clearInterval(l)},400);e.on(o,"mouseout",a)}function o(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){v(e,t)},this.waitingFor=0}function a(e,t){return t instanceof Function?{getAnnotations:t}:(t&&t!==!0||(t={}),t)}function s(e){var t=e.state.lint;t.hasGutter&&e.clearGutter(b);for(var n=0;n1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function h(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){p(e)},t.options.delay||500))}function g(e,t){for(var n=t.target||t.srcElement,r=document.createDocumentFragment(),o=0;o-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}var r=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(i,o){if(o.innerActive){var a=o.innerActive,s=i.string;if(!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);var l=a.close?n(s,a.close,i.pos,a.parseDelimiters):-1;if(l==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";l>-1&&(i.string=s.slice(0,l));var c=a.mode.token(i,o.inner);return l>-1&&(i.string=s),l==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var u=1/0,s=i.string,d=0;d2){r.pending=[];for(var f=2;f-1)return e.Pass;var a=r.indent.length-1,s=t[r.state];e:for(;;){for(var c=0;cs)return n.charCoords(e,"local")[t?"top":"bottom"];var r=n.heightAtLine(c,"local");return r+(t?0:c.height)}e!==!1&&this.computeScale();var n=this.cm,r=this.hScale,i=document.createDocumentFragment(),o=this.annotations,a=n.getOption("lineWrapping"),s=a&&1.5*n.defaultTextHeight(),l=null,c=null,u=n.lastLine();if(n.display.barWidth)for(var d,f=0;fu)){for(var m=d||t(p.from,!0)*r,h=t(p.to,!1)*r;fu)&&(d=t(o[f+1].from,!0)*r,!(d>h+.9));)p=o[++f],h=t(p.to,!1)*r;if(h!=m){var g=Math.max(h-m,3),v=i.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(n.display.barWidth-1,2)+"px; top: "+(m+this.buttonHeight)+"px; height: "+g+"px",v.className=this.options.className,p.id&&v.setAttribute("annotation-id",p.id)}}}this.div.textContent="",this.div.appendChild(i)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,r){e.changeEnd(r).line==t.lastLine()&&n(t)}function n(e){var t="";if(e.lineCount()>1){var r=e.display.scroller.clientHeight-30,i=e.getLineHandle(e.lastLine()).height;t=r-i+"px"}e.state.scrollPastEndPadding!=t&&(e.state.scrollPastEndPadding=t,e.display.lineSpace.parentNode.style.paddingBottom=t,e.off("refresh",n),e.setSize(),e.on("refresh",n))}e.defineOption("scrollPastEnd",!1,function(r,i,o){o&&o!=e.Init&&(r.off("change",t),r.off("refresh",n),r.display.lineSpace.parentNode.style.paddingBottom="",r.state.scrollPastEndPadding=null),i&&(r.on("change",t),r.on("refresh",n),n(r))})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n,r){function i(t){var n=e.wheelEventPixels(t)["horizontal"==o.orientation?"x":"y"],r=o.pos;o.moveTo(o.pos+n),o.pos!=r&&e.e_preventDefault(t)}this.orientation=n,this.scroll=r,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=t+"-"+n,this.inner=this.node.appendChild(document.createElement("div"));var o=this;e.on(this.inner,"mousedown",function(t){function n(){e.off(document,"mousemove",r),e.off(document,"mouseup",n)}function r(e){return 1!=e.which?n():void o.moveTo(s+(e[i]-a)*(o.total/o.size))}if(1==t.which){e.e_preventDefault(t);var i="horizontal"==o.orientation?"pageX":"pageY",a=t[i],s=o.pos;e.on(document,"mousemove",r),e.on(document,"mouseup",n)}}),e.on(this.node,"click",function(t){e.e_preventDefault(t);var n,r=o.inner.getBoundingClientRect();n="horizontal"==o.orientation?t.clientXr.right?1:0:t.clientYr.bottom?1:0,o.moveTo(o.pos+n*o.screen)}),e.on(this.node,"mousewheel",i),e.on(this.node,"DOMMouseScroll",i)}function n(e,n,r){this.addClass=e,this.horiz=new t(e,"horizontal",r),n(this.horiz.node),this.vert=new t(e,"vertical",r),n(this.vert.node),this.width=null}t.prototype.setPos=function(e,t){return e<0&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),!(!t&&e==this.pos)&&(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",!0)},t.prototype.moveTo=function(e){this.setPos(e)&&this.scroll(e,this.orientation)};var r=10;t.prototype.update=function(e,t,n){var i=this.screen!=t||this.total!=e||this.size!=n;i&&(this.screen=t,this.total=e,this.size=n);var o=this.screen*(this.size/this.total);oe.clientWidth+1,i=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=i?"block":"none",this.horiz.node.style.display=r?"block":"none",i&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(r?n:0)),this.vert.node.style.bottom=r?n+"px":"0"),r&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(i?n:0)-e.barLeft),this.horiz.node.style.right=i?n+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:i?n:0,bottom:r?n:0}},n.prototype.setScrollTop=function(e){this.vert.setPos(e)},n.prototype.setScrollLeft=function(e){this.horiz.setPos(e)},n.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},e.scrollbarModel.simple=function(e,t){return new n("CodeMirror-simplescroll",e,t)},e.scrollbarModel.overlay=function(e,t){return new n("CodeMirror-overlayscroll",e,t)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0}):i(prompt(n,r))}function n(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}var r='Jump to line:  (Use line:column or scroll% syntax)';e.commands.jumpToLine=function(e){var i=e.getCursor();t(e,r,"Jump to line:",i.line+1+":"+i.ch,function(t){if(t){var r;if(r=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(n(e,r[1]),Number(r[2]));else if(r=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var o=Math.round(e.lineCount()*Number(r[1])/100);/^[-+]/.test(r[1])&&(o=i.line+o+1),e.setCursor(o-1,i.ch)}else(r=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(n(e,r[1]),i.ch)}})},e.keyMap.default["Alt-G"]="jumpToLine"}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e){this.options={};for(var t in d)this.options[t]=(e&&e.hasOwnProperty(t)?e:d)[t];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function n(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&i(e,t)}function r(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,i(e,t))}function i(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(function(){s(e)},t.options.delay)}function o(e,t,n,r){var i=e.state.matchHighlighter;if(e.addOverlay(i.overlay=u(t,n,r)),i.options.annotateScrollbar&&e.showMatchesOnScrollbar){var o=n?new RegExp("\\b"+t+"\\b"):t;i.matchesonscroll=e.showMatchesOnScrollbar(o,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function a(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function s(e){e.operation(function(){var t=e.state.matchHighlighter;if(a(e),!e.somethingSelected()&&t.options.showToken){for(var n=t.options.showToken===!0?/[\w$]/:t.options.showToken,r=e.getCursor(),i=e.getLine(r.line),s=r.ch,c=s;s&&n.test(i.charAt(s-1));)--s;for(;c=t.options.minChars&&o(e,f,!1,t.options.style)}})}function l(e,t,n){var r=e.getRange(t,n);if(null!==r.match(/^\w+$/)){if(t.ch>0){var i={line:t.line,ch:t.ch-1},o=e.getRange(i,t);if(null===o.match(/\W/))return!1}if(n.ch=this.gap.to)break;n.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var i=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),this.caseFold),o=this.options&&this.options.maxMatches||r;i.findNext();){var n={from:i.from(),to:i.to()};if(n.from.line>=this.gap.to)break;if(this.matches.splice(t++,0,n),this.matches.length>o)break}this.gap=null}},t.prototype.onChange=function(t){var r=t.from.line,i=e.changeEnd(t).line,o=i-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,r,o),t.from.line),this.gap.to=Math.max(n(this.gap.to,r,o),t.from.line)):this.gap={from:t.from.line,to:i+1},o)for(var a=0;at.cursorCoords(n,"window").top&&((u=r).style.opacity=.4)}))};a(t,v,c,f,function(n,i){var o=e.keyName(n),a=e.keyMap[t.getOption("keyMap")][o];a||(a=t.getOption("extraKeys")[o]),"findNext"==a||"findPrev"==a||"findPersistentNext"==a||"findPersistentPrev"==a?(e.e_stop(n),d(t,r(t),i),t.execCommand(a)):"find"!=a&&"findPersistent"!=a||(e.e_stop(n),f(i,n))}),o&&c&&(d(t,l,c),p(t,n))}else s(t,v,"Search for:",c,function(e){e&&!l.query&&t.operation(function(){d(t,l,e),l.posFrom=l.posTo=t.getCursor(),p(t,n)})})}function p(t,n,i){t.operation(function(){var a=r(t),s=o(t,a.query,n?a.posFrom:a.posTo);(s.find(n)||(s=o(t,a.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),s.find(n)))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),i&&i(s.from(),s.to()))})}function m(e){e.operation(function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function h(e,t,n){e.operation(function(){for(var r=o(e,t);r.findNext();)if("string"!=typeof t){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return i[t]}))}else r.replace(n)})}function g(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,i=t?"Replace all:":"Replace:";s(e,i+b,i,n,function(n){n&&(n=u(n),s(e,y,"Replace with:","",function(r){if(r=c(r),t)h(e,n,r);else{m(e);var i=o(e,n,e.getCursor("from")),a=function(){var t,c=i.from();!(t=i.findNext())&&(i=o(e,n),!(t=i.findNext())||c&&i.from().line==c.line&&i.from().ch==c.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),l(e,x,"Replace?",[function(){s(t)},a,function(){h(e,n,r)}]))},s=function(e){i.replace("string"==typeof n?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),a()};a()}}))})}}var v='Search:  (Use /re/ syntax for regexp search)',b='  (Use /re/ syntax for regexp search)',y='With: ',x="Replace?    ";e.commands.find=function(e){m(e),f(e)},e.commands.findPersistent=function(e){m(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=m,e.commands.replace=g,e.commands.replaceAll=function(e){g(e,!0)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,i,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),i=i?e.clipPos(i):r(0,0),this.pos={from:i,to:i},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,i){if(n){t.lastIndex=0;for(var o,a,s=e.getLine(i.line).slice(0,i.ch),l=0;;){t.lastIndex=l;var c=t.exec(s);if(!c)break;if(o=c,a=o.index,l=o.index+(o[0].length||1),l==s.length)break}var u=o&&o[0].length||0;u||(0==a&&0==s.length?o=void 0:a!=e.getLine(i.line).length&&u++)}else{t.lastIndex=i.ch;var s=e.getLine(i.line),o=t.exec(s),u=o&&o[0].length||0,a=o&&o.index;a+u==s.length||u||(u=1)}if(o&&u)return{from:r(i.line,a),to:r(i.line,a+u),match:o}};else{var a=t;o&&(t=t.toLowerCase());var s=o?function(e){return e.toLowerCase()}:function(e){return e},l=t.split("\n");if(1==l.length)t.length?this.matches=function(i,o){if(i){var l=e.getLine(o.line).slice(0,o.ch),c=s(l),u=c.lastIndexOf(t);if(u>-1)return u=n(l,c,u),{from:r(o.line,u),to:r(o.line,u+a.length)}}else{var l=e.getLine(o.line).slice(o.ch),c=s(l),u=c.indexOf(t);if(u>-1)return u=n(l,c,u)+o.ch,{from:r(o.line,u),to:r(o.line,u+a.length)}}}:this.matches=function(){};else{var c=a.split("\n");this.matches=function(t,n){var i=l.length-1;if(t){if(n.line-(l.length-1)=1;--u,--a)if(l[u]!=s(e.getLine(a)))return;var d=e.getLine(a),f=d.length-c[0].length;if(s(d.slice(f))!=l[0])return;return{from:r(a,f),to:o}}if(!(n.line+(l.length-1)>e.lastLine())){var d=e.getLine(n.line),f=d.length-c[0].length;if(s(d.slice(f))==l[0]){for(var p=r(n.line,f),a=n.line+1,u=1;un))return r;--r}}}var r=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=r(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,i=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,i))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!i.line)return t(0);i=r(i.line-1,this.doc.getLine(i.line-1).length)}else{var o=this.doc.lineCount();if(i.line==o-1)return t(o);i=r(i.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,r){return new t(this.doc,e,n,r)}),e.defineDocExtension("getSearchCursor",function(e,n,r){return new t(this,e,n,r)}),e.defineExtension("selectMatches",function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t=n.line,p=f?n:l(d,0),m=e.markText(u,p,{className:o});if(null==r?i.push(m):i.splice(r++,0,m),f)break;a=d}}function i(e){for(var t=e.state.markedSelection,n=0;n1)return o(e);var t=e.getCursor("start"),n=e.getCursor("end"),a=e.state.markedSelection;if(!a.length)return r(e,t,n);var l=a[0].find(),u=a[a.length-1].find();if(!l||!u||n.line-t.line=0||c(n,l.from)<=0)return o(e);for(;c(t,l.from)>0;)a.shift().clear(),l=a[0].find();for(c(t,l.from)<0&&(l.to.line-t.line0&&(n.line-u.from.line=t.mouseX&&o.top<=t.mouseY&&o.bottom>=t.mouseY&&(r=!0)}var a=r?t.value:"";e.display.lineDiv.style.cursor!=a&&(e.display.lineDiv.style.cursor=a)}}e.defineOption("selectionPointer",!1,function(i,o){var a=i.state.selectionPointer;a&&(e.off(i.getWrapperElement(),"mousemove",a.mousemove),e.off(i.getWrapperElement(),"mouseout",a.mouseout),e.off(window,"scroll",a.windowScroll),i.off("cursorActivity",r),i.off("scroll",r),i.state.selectionPointer=null,i.display.lineDiv.style.cursor=""),o&&(a=i.state.selectionPointer={value:"string"==typeof o?o:"default",mousemove:function(e){t(i,e)},mouseout:function(e){n(i,e)},windowScroll:function(){r(i)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},e.on(i.getWrapperElement(),"mousemove",a.mousemove),e.on(i.getWrapperElement(),"mouseout",a.mouseout),e.on(window,"scroll",a.windowScroll),i.on("cursorActivity",r),i.on("scroll",r))})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n){for(var r=n.paragraphStart||e.getHelper(t,"paragraphStart"),i=t.line,o=e.firstLine();i>o;--i){var a=e.getLine(i);if(r&&r.test(a))break;if(!/\S/.test(a)){++i;break}}for(var s=n.paragraphEnd||e.getHelper(t,"paragraphEnd"),l=t.line+1,c=e.lastLine();l<=c;++l){var a=e.getLine(l);if(s&&s.test(a)){++l;break}if(!/\S/.test(a))break}return{from:i,to:l}}function n(e,t,n,r){for(var i=t;i0&&!n.test(e.slice(i-1,i+1));--i);for(var o=!0;;o=!1){var a=i;if(r)for(;" "==e.charAt(a-1);)--a;if(0!=a||!o)return{from:a,to:i};i=t}}function r(t,r,o,a){r=t.clipPos(r),o=t.clipPos(o);var s=a.column||80,l=a.wrapOn||/\s\S|-[^\.\d]/,c=a.killTrailingSpace!==!1,u=[],d="",f=r.line,p=t.getRange(r,o,!1);if(!p.length)return null;for(var m=p[0].match(/^[ \t]*/)[0],h=0;hs&&m==y&&n(d,s,l,c);x&&x.from==v&&x.to==v+b?(d=m+g,++f):u.push({text:[b?" ":""],from:i(f,v),to:i(f+1,y.length)})}for(;d.length>s;){var k=n(d,s,l,c);u.push({text:["",m],from:i(f,k.from),to:i(f,k.to)}),d=m+d.slice(k.to),++f}}return u.length&&t.operation(function(){for(var n=0;n=0;a--){var s,l=n[a];if(l.empty()){var c=t(e,l.head,{});s={from:i(c.from,0),to:i(c.to-1)}}else s={from:l.from(),to:l.to()};s.to.line>=o||(o=s.from.line,r(e,s.from,s.to,{}))}})},e.defineExtension("wrapRange",function(e,t,n){return r(this,e,t,n||{})}),e.defineExtension("wrapParagraphsInRange",function(e,n,o){o=o||{};for(var a=this,s=[],l=e.line;l<=n.line;){var c=t(a,i(l,0),o);s.push(c),l=c.to}var u=!1;return s.length&&a.operation(function(){for(var e=s.length-1;e>=0;--e)u=u||r(a,i(s[e].from,0),i(s[e].to-1),o)}),u})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("apl",function(){var e={".":"innerProduct","\\":"scan","/":"reduce","⌿":"reduce1Axis","⍀":"scan1Axis","¨":"each","⍣":"power"},t={"+":["conjugate","add"],"−":["negate","subtract"],"×":["signOf","multiply"],"÷":["reciprocal","divide"],"⌈":["ceiling","greaterOf"],"⌊":["floor","lesserOf"],"∣":["absolute","residue"],"⍳":["indexGenerate","indexOf"],"?":["roll","deal"],"⋆":["exponentiate","toThePowerOf"],"⍟":["naturalLog","logToTheBase"],"○":["piTimes","circularFuncs"],"!":["factorial","binomial"],"⌹":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"≤":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"≥":[null,"greaterThanOrEqual"],"≠":[null,"notEqual"],"≡":["depth","match"],"≢":[null,"notMatch"],"∈":["enlist","membership"],"⍷":[null,"find"],"∪":["unique","union"],"∩":[null,"intersection"],"∼":["not","without"],"∨":[null,"or"],"∧":[null,"and"],"⍱":[null,"nor"],"⍲":[null,"nand"],"⍴":["shapeOf","reshape"],",":["ravel","catenate"],"⍪":[null,"firstAxisCatenate"],"⌽":["reverse","rotate"],"⊖":["axis1Reverse","axis1Rotate"],"⍉":["transpose",null],"↑":["first","take"],"↓":[null,"drop"],"⊂":["enclose","partitionWithAxis"],"⊃":["diclose","pick"],"⌷":[null,"index"],"⍋":["gradeUp",null],"⍒":["gradeDown",null],"⊤":["encode",null],"⊥":["decode",null],"⍕":["format","formatByExample"],"⍎":["execute",null],"⊣":["stop","left"],"⊢":["pass","right"]},n=/[\.\/⌿⍀¨⍣]/,r=/⍬/,i=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,o=/←/,a=/[⍝#].*$/,s=function(e){var t;return t=!1,function(n){return t=n,n!==e||"\\"===t}};return{startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(l,c){var u,d;return l.eatSpace()?null:(u=l.next(),'"'===u||"'"===u?(l.eatWhile(s(u)),l.next(),c.prev=!0,"string"):/[\[{\(]/.test(u)?(c.prev=!1,null):/[\]}\)]/.test(u)?(c.prev=!0,null):r.test(u)?(c.prev=!1,"niladic"):/[¯\d]/.test(u)?(c.func?(c.func=!1,c.prev=!1):c.prev=!0,l.eatWhile(/[\w\.]/),"number"):n.test(u)?"operator apl-"+e[u]:o.test(u)?"apl-arrow":i.test(u)?(d="apl-",null!=t[u]&&(d+=c.prev?t[u][1]:t[u][0]),c.func=!0,c.prev=!1,"function "+d):a.test(u)?(l.skipToEnd(),"comment"):"∘"===u&&"."===l.peek()?(l.next(),"function jot-dot"):(l.eatWhile(/[\w\$_]/),c.prev=!0,"keyword"))}}}),e.defineMIME("text/apl","apl")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?"error":null}e.defineMode("asciiarmor",function(){return{token:function(e,n){var r;if("top"==n.state)return e.sol()&&(r=e.match(/^-----BEGIN (.*)?-----\s*$/))?(n.state="headers",n.type=r[1],"tag"):t(e);if("headers"==n.state){if(e.sol()&&e.match(/^\w+:/))return n.state="header","atom";var i=t(e);return i&&(n.state="body"),i}return"header"==n.state?(e.skipToEnd(),n.state="headers","string"):"body"==n.state?e.sol()&&(r=e.match(/^-----END (.*)?-----\s*$/))?r[1]!=n.type?"error":(n.state="end","tag"):e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error"):"end"==n.state?t(e):void 0},blankLine:function(e){"headers"==e.state&&(e.state="body")},startState:function(){return{state:"top",type:null}}}}),e.defineMIME("application/pgp","asciiarmor"),e.defineMIME("application/pgp-keys","asciiarmor"),e.defineMIME("application/pgp-signature","asciiarmor")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r?$/.test(i)?(n.extenExten=!0,n.extenStart=!1,"strong"):(n.extenStart=!1,t.skipToEnd(),"error")):n.extenExten?(n.extenExten=!1,n.extenPriority=!0,t.eatWhile(/[^,]/),n.extenInclude&&(t.skipToEnd(),n.extenPriority=!1,n.extenInclude=!1),n.extenSame&&(n.extenPriority=!1,n.extenSame=!1,n.extenApplication=!0),"tag"):n.extenPriority?(n.extenPriority=!1,n.extenApplication=!0,t.next(),n.extenSame?null:(t.eatWhile(/[^,]/),"number")):n.extenApplication?(t.eatWhile(/,/),i=t.current(),","===i?null:(t.eatWhile(/\w/),i=t.current().toLowerCase(),n.extenApplication=!1,r.indexOf(i)!==-1?"def strong":null)):e(t,n)}}}),e.defineMIME("text/x-asterisk","asterisk")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t="><+-.,[]".split("");e.defineMode("brainfuck",function(){return{startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(e,n){if(e.eatSpace())return null;e.sol()&&(n.commentLine=!1);var r=e.next().toString();return t.indexOf(r)===-1?(n.commentLine=!0,e.eol()&&(n.commentLine=!1),"comment"):n.commentLine===!0?(e.eol()&&(n.commentLine=!1),"comment"):"]"===r||"["===r?("["===r?n.left++:n.right++,"bracket"):"+"===r||"-"===r?"keyword":"<"===r||">"===r?"atom":"."===r||","===r?"def":void(e.eol()&&(n.commentLine=!1))}}}),e.defineMIME("text/x-brainfuck","brainfuck")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=o}function n(e,n,r,i){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(o=e.context.indented),e.context=new t(o,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"variable-3"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function a(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-h,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var a=t.context;if(e.sol()&&(null==a.align&&(a.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return f(e,t),null;p=m=null;var s=(t.tokenize||c)(e,t);if("comment"==s||"meta"==s)return s;if(null==a.align&&(a.align=!0),";"==p||":"==p||","==p&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==p)n(t,e.column(),"}");else if("["==p)n(t,e.column(),"]");else if("("==p)n(t,e.column(),")");else if("}"==p){for(;"statement"==a.type;)a=r(t);for("}"==a.type&&(a=r(t));"statement"==a.type;)a=r(t)}else p==a.type?r(t):E&&(("}"==a.type||"top"==a.type)&&";"!=p||"statement"==a.type&&"newstatement"==p)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),S.token){var u=S.token(e,t,s);void 0!==u&&(s=u)}return"def"==s&&l.styleDefs===!1&&(s="variable"),t.startOfLine=!1,t.prevToken=m?"def":s||p,f(e,t),s},indent:function(t,n){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,i=n&&n.charAt(0);if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(S.indent){var o=S.indent(t,r,n);if("number"==typeof o)return o}var a=i==r.type,s=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:g):!r.align||v&&")"==r.type?")"!=r.type||a?r.indented+(a?0:h)+(a||!s||/^(?:case|default)\b/.test(n)?0:h):r.indented+g:r.column+(a?0:1)},electricInput:T?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var y="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",x="int long char short double float unsigned signed void size_t ptrdiff_t";h(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(y),types:a(x+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:a("case do else for if switch while struct"),defKeywords:a("struct"),typeFirstDefinitions:!0,atoms:a("null true false"),hooks:{"#":l,"*":c},modeProps:{fold:["brace","include"]}}),h(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(y+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:a(x+" bool wchar_t"),blockKeywords:a("catch class do else finally for if struct switch try while"),defKeywords:a("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:a("true false null"),dontIndentStatements:/^template$/,hooks:{"#":l,"*":c,u:d,U:d,L:d,R:d,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&f(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),h("text/x-java",{name:"clike",keywords:a("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:a("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:a("catch class do else finally for if switch try while"),defKeywords:a("class interface package enum @interface"),typeFirstDefinitions:!0,atoms:a("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),h("text/x-csharp",{name:"clike",keywords:a("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:a("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:a("catch class do else finally for foreach if struct switch try while"),defKeywords:a("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=p,p(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),h("text/x-scala",{name:"clike",keywords:a("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:a("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:a("catch class do else finally for forSome if match switch try while"),defKeywords:a("class def object package trait type val var"),atoms:a("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=g,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")}},modeProps:{closeBrackets:{triples:'"'}}}),h("text/x-kotlin",{name:"clike",keywords:a("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix"),types:a("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,blockKeywords:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object package interface fun"),atoms:a("true false null this"),hooks:{'"':function(e,t){return t.tokenize=v(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),h(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":l},modeProps:{fold:["brace","include"]}}),h("text/x-nesc",{name:"clike",keywords:a(y+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:a(x),blockKeywords:a("case do else for if switch while struct"),atoms:a("null true false"),hooks:{"#":l},modeProps:{fold:["brace","include"]}}),h("text/x-objectivec",{name:"clike",keywords:a(y+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:a(x),atoms:a("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":l,indent:function(e,t,n){if("statement"==t.type&&/^@\w/.test(n))return t.indented}},modeProps:{fold:"brace"}}),h("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:a(x),blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":l},modeProps:{fold:["brace","include"]}});var k=null;h("text/x-ceylon",{name:"clike",keywords:a("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=b(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!k||!e.match("`"))&&(t.tokenize=k,k=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"variable-3"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("clojure",function(e){function t(e){for(var t={},n=e.split(" "),r=0;r ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle"),x=t("* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cat cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement completing concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare dedupe default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while eduction empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth random-sample range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transduce transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? volatile! volatile? vreset! vswap! when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>"),k=t("ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch let letfn binding loop for doseq dotimes when-let if-let defstruct struct-map assoc testing deftest handler-case handle dotrace deftrace"),w={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,symbol:/[\w*+!\-\._?:<>\/\xa1-\uffff]/,block_indent:/^(?:def|with)[^\/]+$|\/(?:def|with)/};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(e,t){if(null==t.indentStack&&e.sol()&&(t.indentation=e.indentation()),"string"!=t.mode&&e.eatSpace())return null;var n=null;switch(t.mode){case"string":for(var _,S=!1;null!=(_=e.next());){if('"'==_&&!S){t.mode=!1;break}S=!S&&"\\"==_}n=c;break;default:var C=e.next();if('"'==C)t.mode="string",n=c;else if("\\"==C)a(e),n=u;else if("'"!=C||w.digit_or_colon.test(e.peek()))if(";"==C)e.skipToEnd(),n=l;else if(o(C,e))n=f;else if("("==C||"["==C||"{"==C){var E,T="",M=e.column();if("("==C)for(;null!=(E=e.eat(w.keyword_char));)T+=E;T.length>0&&(k.propertyIsEnumerable(T)||w.block_indent.test(T))?r(t,M+g,C):(e.eatSpace(),e.eol()||";"==e.peek()?r(t,M+v,C):r(t,M+e.current().length,C)),e.backUp(e.current().length-1),n=p}else if(")"==C||"]"==C||"}"==C)n=p,null!=t.indentStack&&t.indentStack.type==(")"==C?"(":"]"==C?"[":"{")&&i(t);else{if(":"==C)return e.eatWhile(w.symbol),d;e.eatWhile(w.symbol),n=y&&y.propertyIsEnumerable(e.current())?m:x&&x.propertyIsEnumerable(e.current())?s:b&&b.propertyIsEnumerable(e.current())?d:h}else n=d}return n},indent:function(e){return null==e.indentStack?e.indentation:e.indentStack.indent},closeBrackets:{pairs:'()[]{}""'},lineComment:";;"}}),e.defineMIME("text/x-clojure","clojure"),e.defineMIME("text/x-clojurescript","clojure"),e.defineMIME("application/edn","clojure")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("cmake",function(){function e(e,t){for(var n,r,i=!1;!e.eol()&&(n=e.next())!=t.pending;){if("$"===n&&"\\"!=r&&'"'==t.pending){i=!0;break}r=n}return i&&e.backUp(1),n==t.pending?t.continueString=!1:t.continueString=!0,"string"}function t(t,r){var i=t.next();return"$"===i?t.match(n)?"variable-2":"variable":r.continueString?(t.backUp(1),e(t,r)):t.match(/(\s+)?\w+\(/)||t.match(/(\s+)?\w+\ \(/)?(t.backUp(1),"def"):"#"==i?(t.skipToEnd(),"comment"):"'"==i||'"'==i?(r.pending=i,e(t,r)):"("==i||")"==i?"bracket":i.match(/[0-9]/)?"number":(t.eatWhile(/[\w-]/),null)}var n=/({)?[a-zA-Z0-9_]+(})?/;return{startState:function(){var e={};return e.inDefinition=!1,e.inInclude=!1,e.continueString=!1,e.pending=!1,e},token:function(e,n){return e.eatSpace()?null:t(e,n)}}}),e.defineMIME("text/x-cmake","cmake")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("cobol",function(){function e(e){for(var t={},n=e.split(" "),r=0;r >= "),m={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,symbol:/[\w*+\-]/};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(e,h){if(null==h.indentStack&&e.sol()&&(h.indentation=6),e.eatSpace())return null;var g=null;switch(h.mode){case"string":for(var v=!1;null!=(v=e.next());)if('"'==v||"'"==v){h.mode=!1;break}g=i;break;default:var b=e.next(),y=e.column();if(y>=0&&y<=5)g=c;else if(y>=72&&y<=79)e.skipToEnd(),g=l;else if("*"==b&&6==y)e.skipToEnd(),g=r;else if('"'==b||"'"==b)h.mode="string",g=i;else if("'"!=b||m.digit_or_colon.test(e.peek()))if("."==b)g=u;else if(t(b,e))g=a;else{if(e.current().match(m.symbol))for(;y<71&&void 0!==e.eat(m.symbol);)y++;g=f&&f.propertyIsEnumerable(e.current().toUpperCase())?s:p&&p.propertyIsEnumerable(e.current().toUpperCase())?n:d&&d.propertyIsEnumerable(e.current().toUpperCase())?o:null}else g=o}return g},indent:function(e){return null==e.indentStack?e.indentation:e.indentStack.indent}}}),e.defineMIME("text/x-cobol","cobol")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("coffeescript",function(e,t){function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function r(e,t){if(e.sol()){null===t.scope.align&&(t.scope.align=!1);var n=t.scope.offset;if(e.eatSpace()){var r=e.indentation();return r>n&&"coffee"==t.scope.type?"indent":r0&&s(e,t)}if(e.eatSpace())return null;var a=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=o,t.tokenize(e,t);if("#"===a)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){
var l=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(l=!0),e.match(/^-?\d+\.\d*/)&&(l=!0),e.match(/^-?\.\d+/)&&(l=!0),l)return"."==e.peek()&&e.backUp(1),"number";var h=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(h=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(h=!0),e.match(/^-?0(?![\dx])/i)&&(h=!0),h)return"number"}if(e.match(b))return t.tokenize=i(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(y)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=i(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(u)||e.match(m)?"operator":e.match(d)?"punctuation":e.match(k)?"atom":e.match(p)||t.prop&&e.match(f)?"property":e.match(v)?"keyword":e.match(f)?"variable":(e.next(),c)}function i(e,n,i){return function(o,a){for(;!o.eol();)if(o.eatWhile(/[^'"\/\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return i}else{if(o.match(e))return a.tokenize=r,i;o.eat(/['"\/]/)}return n&&(t.singleLineStringErrors?i=c:a.tokenize=r),i}}function o(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=r;break}e.eatWhile("#")}return"comment"}function a(t,n,r){r=r||"coffee";for(var i=0,o=!1,a=null,s=n.scope;s;s=s.prev)if("coffee"===s.type||"}"==s.type){i=s.offset+e.indentUnit;break}"coffee"!==r?(o=null,a=t.column()+t.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:i,type:r,prev:n.scope,align:o,alignOffset:a}}function s(e,t){if(t.scope.prev){if("coffee"===t.scope.type){for(var n=e.indentation(),r=!1,i=t.scope;i;i=i.prev)if(n===i.offset){r=!0;break}if(!r)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}return t.scope=t.scope.prev,!1}}function l(e,t){var n=t.tokenize(e,t),r=e.current();"return"===r&&(t.dedent=!0),(("->"===r||"=>"===r)&&e.eol()||"indent"===n)&&a(e,t);var i="[({".indexOf(r);if(i!==-1&&a(e,t,"])}".slice(i,i+1)),h.exec(r)&&a(e,t),"then"==r&&s(e,t),"dedent"===n&&s(e,t))return c;if(i="])}".indexOf(r),i!==-1){for(;"coffee"==t.scope.type&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==r&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&("coffee"==t.scope.type&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),n}var c="error",u=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,d=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,f=/^[_A-Za-z$][_A-Za-z$0-9]*/,p=/^@[_A-Za-z$][_A-Za-z$0-9]*/,m=n(["and","or","not","is","isnt","in","instanceof","typeof"]),h=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],g=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],v=n(h.concat(g));h=n(h);var b=/^('{3}|\"{3}|['\"])/,y=/^(\/{3}|\/)/,x=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],k=n(x),w={startState:function(e){return{tokenize:r,scope:{offset:e||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var n=null===t.scope.align&&t.scope;n&&e.sol()&&(n.align=!1);var r=l(e,t);return r&&"comment"!=r&&(n&&(n.align=!0),t.prop="punctuation"==r&&"."==e.current()),r},indent:function(e,t){if(e.tokenize!=r)return 0;var n=e.scope,i=t&&"])}".indexOf(t.charAt(0))>-1;if(i)for(;"coffee"==n.type&&n.prev;)n=n.prev;var o=i&&n.type===t.charAt(0);return n.align?n.alignOffset-(o?1:0):(o?n.prev:n).offset},lineComment:"#",fold:"indent"};return w}),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("commonlisp",function(e){function t(e){for(var t;t=e.next();)if("\\"==t)e.next();else if(!c.test(t)){e.backUp(1);break}return e.current()}function n(e,n){if(e.eatSpace())return o="ws",null;if(e.match(l))return"number";var c=e.next();if("\\"==c&&(c=e.next()),'"'==c)return(n.tokenize=r)(e,n);if("("==c)return o="open","bracket";if(")"==c||"]"==c)return o="close","bracket";if(";"==c)return e.skipToEnd(),o="ws","comment";if(/['`,@]/.test(c))return null;if("|"==c)return e.skipTo("|")?(e.next(),"symbol"):(e.skipToEnd(),"error");if("#"==c){var c=e.next();return"("==c?(o="open","bracket"):/[+\-=\.']/.test(c)?null:/\d/.test(c)&&e.match(/^\d*#/)?null:"|"==c?(n.tokenize=i)(e,n):":"==c?(t(e),"meta"):"\\"==c?(e.next(),t(e),"string-2"):"error"}var u=t(e);return"."==u?null:(o="symbol","nil"==u||"t"==u||":"==u.charAt(0)?"atom":"open"==n.lastType&&(a.test(u)||s.test(u))?"keyword":"&"==u.charAt(0)?"variable-2":"variable")}function r(e,t){for(var r,i=!1;r=e.next();){if('"'==r&&!i){t.tokenize=n;break}i=!i&&"\\"==r}return"string"}function i(e,t){for(var r,i;r=e.next();){if("#"==r&&"|"==i){t.tokenize=n;break}i=r}return o="ws","comment"}var o,a=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,s=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,l=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,c=/[^\s'`,@()\[\]";]/;return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:n}},token:function(t,n){t.sol()&&"number"!=typeof n.ctx.indentTo&&(n.ctx.indentTo=n.ctx.start+1),o=null;var r=n.tokenize(t,n);return"ws"!=o&&(null==n.ctx.indentTo?"symbol"==o&&s.test(t.current())?n.ctx.indentTo=n.ctx.start+e.indentUnit:n.ctx.indentTo="next":"next"==n.ctx.indentTo&&(n.ctx.indentTo=t.column()),n.lastType=o),"open"==o?n.ctx={prev:n.ctx,start:t.column(),indentTo:null}:"close"==o&&(n.ctx=n.ctx.prev||n.ctx),r},indent:function(e,t){var n=e.ctx.indentTo;return"number"==typeof n?n:e.ctx.start+1},closeBrackets:{pairs:'()[]{}""'},lineComment:";;",blockCommentStart:"#|",blockCommentEnd:"|#"}}),e.defineMIME("text/x-common-lisp","commonlisp")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("crystal",function(e){function t(e,t){return new RegExp((t?"":"^")+"(?:"+e.join("|")+")"+(t?"$":"\\b"))}function n(e,t,n){return n.tokenize.push(e),e(t,n)}function r(e,t){if(e.eatSpace())return null;if("\\"!=t.lastToken&&e.match("{%",!1))return n(o("%","%"),e,t);if("\\"!=t.lastToken&&e.match("{{",!1))return n(o("{","}"),e,t);if("#"==e.peek())return e.skipToEnd(),"comment";var r;if(e.match(h))return e.eat(/[?!]/),r=e.current(),e.eat(":")?"atom":"."==t.lastToken?"property":v.test(r)?(x.test(r)?"fun"==r&&t.blocks.indexOf("lib")>=0||"def"==r&&"abstract"==t.lastToken||(t.blocks.push(r),t.currentIndent+=1):"operator"!=t.lastStyle&&t.lastStyle||!w.test(r)?"end"==r&&(t.blocks.pop(),t.currentIndent-=1):(t.blocks.push(r),t.currentIndent+=1),T.hasOwnProperty(r)&&t.tokenize.push(T[r]),"keyword"):b.test(r)?"atom":"variable";if(e.eat("@"))return"["==e.peek()?n(i("[","]","meta"),e,t):(e.eat("@"),e.match(h)||e.match(g),"variable-2");if(e.match(g))return"tag";if(e.eat(":"))return e.eat('"')?n(c('"',"atom",!1),e,t):e.match(h)||e.match(g)||e.match(d)||e.match(f)||e.match(p)?"atom":(e.eat(":"),"operator");if(e.eat('"'))return n(c('"',"string",!0),e,t);if("%"==e.peek()){var a,s="string",l=!0;if(e.match("%r"))s="string-2",a=e.next();else if(e.match("%w"))l=!1,a=e.next();else if(e.match("%q"))l=!1,a=e.next();else{if(!(a=e.match(/^%([^\w\s=])/)))return e.match(/^%[a-zA-Z0-9_\u009F-\uFFFF]*/)?"meta":"operator";a=a[1]}return M.hasOwnProperty(a)&&(a=M[a]),n(c(a,s,l),e,t)}return(r=e.match(/^<<-('?)([A-Z]\w*)\1/))?n(u(r[2],!r[1]),e,t):e.eat("'")?(e.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),e.eat("'"),"atom"):e.eat("0")?(e.eat("x")?e.match(/^[0-9a-fA-F]+/):e.eat("o")?e.match(/^[0-7]+/):e.eat("b")&&e.match(/^[01]+/),"number"):e.eat(/^\d/)?(e.match(/^\d*(?:\.\d+)?(?:[eE][+-]?\d+)?/),"number"):e.match(d)?(e.eat("="),"operator"):e.match(f)||e.match(m)?"operator":(r=e.match(/[({[]/,!1))?(r=r[0],n(i(r,M[r],null),e,t)):e.eat("\\")?(e.next(),"meta"):(e.next(),null)}function i(e,t,n,o){return function(a,s){if(!o&&a.match(e))return s.tokenize[s.tokenize.length-1]=i(e,t,n,!0),s.currentIndent+=1,n;var l=r(a,s);return a.current()===t&&(s.tokenize.pop(),s.currentIndent-=1,l=n),l}}function o(e,t,n){return function(i,a){return!n&&i.match("{"+e)?(a.currentIndent+=1,a.tokenize[a.tokenize.length-1]=o(e,t,!0),"meta"):i.match(t+"}")?(a.currentIndent-=1,a.tokenize.pop(),"meta"):r(i,a)}}function a(e,t){if(e.eatSpace())return null;var n;if(n=e.match(h)){if("def"==n)return"keyword";e.eat(/[?!]/)}return t.tokenize.pop(),"def"}function s(e,t){return e.eatSpace()?null:(e.match(h)?e.eat(/[!?]/):e.match(d)||e.match(f)||e.match(p),t.tokenize.pop(),"def")}function l(e,t){return e.eatSpace()?null:(e.match(g),t.tokenize.pop(),"def")}function c(e,t,n){return function(r,a){for(var s=!1;r.peek();)if(s)r.next(),s=!1;else{if(r.match("{%",!1))return a.tokenize.push(o("%","%")),t;if(r.match("{{",!1))return a.tokenize.push(o("{","}")),t;if(n&&r.match("#{",!1))return a.tokenize.push(i("#{","}","meta")),t;var l=r.next();if(l==e)return a.tokenize.pop(),t;s=n&&"\\"==l}return t}}function u(e,t){return function(n,r){if(n.sol()&&(n.eatSpace(),n.match(e)))return r.tokenize.pop(),"string";for(var a=!1;n.peek();)if(a)n.next(),a=!1;else{if(n.match("{%",!1))return r.tokenize.push(o("%","%")),"string";if(n.match("{{",!1))return r.tokenize.push(o("{","}")),"string";if(t&&n.match("#{",!1))return r.tokenize.push(i("#{","}","meta")),"string";a=t&&"\\"==n.next()}return"string"}}var d=/^(?:[-+\/%|&^]|\*\*?|[<>]{2})/,f=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,p=/^(?:\[\][?=]?)/,m=/^(?:\.(?:\.{2})?|->|[?:])/,h=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,g=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,v=t(["abstract","alias","as","asm","begin","break","case","class","def","do","else","elsif","end","ensure","enum","extend","for","fun","if","include","instance_sizeof","lib","macro","module","next","of","out","pointerof","private","protected","rescue","return","require","select","sizeof","struct","super","then","type","typeof","uninitialized","union","unless","until","when","while","with","yield","__DIR__","__END_LINE__","__FILE__","__LINE__"]),b=t(["true","false","nil","self"]),y=["def","fun","macro","class","module","struct","lib","enum","union","do","for"],x=t(y),k=["if","unless","case","while","until","begin","then"],w=t(k),_=["end","else","elsif","rescue","ensure"],S=t(_),C=["\\)","\\}","\\]"],E=new RegExp("^(?:"+C.join("|")+")$"),T={def:s,fun:s,macro:a,class:l,module:l,struct:l,lib:l,enum:l,union:l},M={"[":"]","{":"}","(":")","<":">"};return{startState:function(){return{tokenize:[r],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(e,t){var n=t.tokenize[t.tokenize.length-1](e,t),r=e.current();return n&&"comment"!=n&&(t.lastToken=r,t.lastStyle=n),n},indent:function(t,n){return n=n.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),S.test(n)||E.test(n)?e.indentUnit*(t.currentIndent-1):e.indentUnit*t.currentIndent},fold:"indent",electricInput:t(C.concat(_),!0),lineComment:"#"}}),e.defineMIME("text/x-crystal","crystal")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=0;n*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):"u"==n&&e.match(/rl(-prefix)?\(/)||"d"==n&&e.match("omain(")||"r"==n&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,r("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),r("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?r("variable-2","variable-definition"):r("variable-2","variable")):e.match(/^\w+-/)?r("meta","meta"):void 0}function o(e){return function(t,n){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(n.tokenize=null),r("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),r(null,"(")}function s(e,t,n){this.type=e,this.indent=t,this.prev=n}function l(e,t,n,r){return e.context=new s(n,t.indentation()+(r===!1?0:g),e.context),n}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,n){return I[n.context.type](e,t,n)}function d(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return u(e,t,n)}function f(e){var t=e.current().toLowerCase();h=T.hasOwnProperty(t)?"atom":E.hasOwnProperty(t)?"keyword":"variable"}var p=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var m,h,g=t.indentUnit,v=n.tokenHooks,b=n.documentTypes||{},y=n.mediaTypes||{},x=n.mediaFeatures||{},k=n.mediaValueKeywords||{},w=n.propertyKeywords||{},_=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},C=n.counterDescriptors||{},E=n.colorKeywords||{},T=n.valueKeywords||{},M=n.allowNested,A=n.lineComment,L=n.supportsAtComponent===!0,I={};return I.top=function(e,t,n){if("{"==e)return l(n,t,"block");if("}"==e&&n.context.prev)return c(n);if(L&&/@component/.test(e))return l(n,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return l(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return l(n,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(n,t,"at");if("hash"==e)h="builtin";else if("word"==e)h="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(n,t,"interpolation");if(":"==e)return"pseudo";if(M&&"("==e)return l(n,t,"parens")}return n.context.type},I.block=function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return w.hasOwnProperty(r)?(h="property","maybeprop"):_.hasOwnProperty(r)?(h="string-2","maybeprop"):M?(h=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(h+=" error","maybeprop")}return"meta"==e?"block":M||"hash"!=e&&"qualifier"!=e?I.top(e,t,n):(h="error","block")},I.maybeprop=function(e,t,n){return":"==e?l(n,t,"prop"):u(e,t,n)},I.prop=function(e,t,n){if(";"==e)return c(n);if("{"==e&&M)return l(n,t,"propBlock");if("}"==e||"{"==e)return d(e,t,n);if("("==e)return l(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)f(t);else if("interpolation"==e)return l(n,t,"interpolation")}else h+=" error";return"prop"},I.propBlock=function(e,t,n){return"}"==e?c(n):"word"==e?(h="property","maybeprop"):n.context.type},I.parens=function(e,t,n){return"{"==e||"}"==e?d(e,t,n):")"==e?c(n):"("==e?l(n,t,"parens"):"interpolation"==e?l(n,t,"interpolation"):("word"==e&&f(t),"parens")},I.pseudo=function(e,t,n){return"meta"==e?"pseudo":"word"==e?(h="variable-3",n.context.type):u(e,t,n)},I.documentTypes=function(e,t,n){return"word"==e&&b.hasOwnProperty(t.current())?(h="tag",n.context.type):I.atBlock(e,t,n)},I.atBlock=function(e,t,n){if("("==e)return l(n,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,n);if("{"==e)return c(n)&&l(n,t,M?"block":"top");if("interpolation"==e)return l(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();h="only"==r||"not"==r||"and"==r||"or"==r?"keyword":y.hasOwnProperty(r)?"attribute":x.hasOwnProperty(r)?"property":k.hasOwnProperty(r)?"keyword":w.hasOwnProperty(r)?"property":_.hasOwnProperty(r)?"string-2":T.hasOwnProperty(r)?"atom":E.hasOwnProperty(r)?"keyword":"error"}return n.context.type},I.atComponentBlock=function(e,t,n){return"}"==e?d(e,t,n):"{"==e?c(n)&&l(n,t,M?"block":"top",!1):("word"==e&&(h="error"),n.context.type)},I.atBlock_parens=function(e,t,n){return")"==e?c(n):"{"==e||"}"==e?d(e,t,n,2):I.atBlock(e,t,n)},I.restricted_atBlock_before=function(e,t,n){return"{"==e?l(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(h="variable","restricted_atBlock_before"):u(e,t,n)},I.restricted_atBlock=function(e,t,n){return"}"==e?(n.stateArg=null,c(n)):"word"==e?(h="@font-face"==n.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!C.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},I.keyframes=function(e,t,n){return"word"==e?(h="variable","keyframes"):"{"==e?l(n,t,"top"):u(e,t,n)},I.at=function(e,t,n){return";"==e?c(n):"{"==e||"}"==e?d(e,t,n):("word"==e?h="tag":"hash"==e&&(h="builtin"),"at")},I.interpolation=function(e,t,n){return"}"==e?c(n):"{"==e||";"==e?d(e,t,n):("word"==e?h="variable":"variable"!=e&&"("!=e&&")"!=e&&(h="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:p?"block":"top",stateArg:null,context:new s(p?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||i)(e,t);return n&&"object"==typeof n&&(m=n[1],n=n[0]),h=n,t.state=I[t.state](m,e,t),h},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-g),n=n.prev):(n=n.prev,i=n.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var r=["domain","regexp","url","url-prefix"],i=t(r),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),s=["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"],l=t(s),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","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","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","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","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","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-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","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-weight","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","justify-content","left","letter-spacing","line-break","line-height","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","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","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","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","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","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-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","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","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","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"],f=t(d),p=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],m=t(p),h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(h),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],b=t(v),y=["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","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","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","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","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","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],x=t(y),k=["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","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","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","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","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","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","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","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","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","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","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","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","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","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","semi-condensed","semi-expanded","separate","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","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","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","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","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"],w=t(k),_=r.concat(o).concat(s).concat(c).concat(d).concat(p).concat(y).concat(k);
e.registerHelper("hintWords","css",_),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:m,fontProperties:g,counterDescriptors:b,colorKeywords:x,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n,n(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:m,colorKeywords:x,valueKeywords:w,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/)&&[null,"{"]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:m,colorKeywords:x,valueKeywords:w,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:l,propertyKeywords:f,nonStandardPropertyKeywords:m,fontProperties:g,counterDescriptors:b,colorKeywords:x,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n,n(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t=function(e){return new RegExp("^(?:"+e.join("|")+")$","i")};e.defineMode("cypher",function(n){var r,i=function(e){var t=e.next();if('"'===t)return e.match(/.*?"/),"string";if("'"===t)return e.match(/.*?'/),"string";if(/[{}\(\),\.;\[\]]/.test(t))return r=t,"node";if("/"===t&&e.eat("/"))return e.skipToEnd(),"comment";if(d.test(t))return e.eatWhile(d),null;if(e.eatWhile(/[_\w\d]/),e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var n=e.current();return l.test(n)?"builtin":c.test(n)?"def":u.test(n)?"keyword":"variable"},o=function(e,t,n){return e.context={prev:e.context,indent:e.indent,col:n,type:t}},a=function(e){return e.indent=e.context.indent,e.context=e.context.prev},s=n.indentUnit,l=t(["abs","acos","allShortestPaths","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endnode","exp","extract","filter","floor","haversin","head","id","keys","labels","last","left","length","log","log10","lower","ltrim","max","min","node","nodes","percentileCont","percentileDisc","pi","radians","rand","range","reduce","rel","relationship","relationships","replace","reverse","right","round","rtrim","shortestPath","sign","sin","size","split","sqrt","startnode","stdev","stdevp","str","substring","sum","tail","tan","timestamp","toFloat","toInt","toString","trim","type","upper"]),c=t(["all","and","any","contains","exists","has","in","none","not","or","single","xor"]),u=t(["as","asc","ascending","assert","by","case","commit","constraint","create","csv","cypher","delete","desc","descending","detach","distinct","drop","else","end","ends","explain","false","fieldterminator","foreach","from","headers","in","index","is","join","limit","load","match","merge","null","on","optional","order","periodic","profile","remove","return","scan","set","skip","start","starts","then","true","union","unique","unwind","using","when","where","with","call","yield"]),d=/[*+\-<>=&|~%^]/;return{startState:function(){return{tokenize:i,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&null==t.context.align&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"!==n&&t.context&&null==t.context.align&&"pattern"!==t.context.type&&(t.context.align=!0),"("===r)o(t,")",e.column());else if("["===r)o(t,"]",e.column());else if("{"===r)o(t,"}",e.column());else if(/[\]\}\)]/.test(r)){for(;t.context&&"pattern"===t.context.type;)a(t);t.context&&r===t.context.type&&a(t)}else"."===r&&t.context&&"pattern"===t.context.type?a(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?o(t,"pattern",e.column()):"pattern"!==t.context.type||t.context.align||(t.context.align=!0,t.context.col=e.column()));return n},indent:function(t,n){var r=n&&n.charAt(0),i=t.context;if(/[\]\}]/.test(r))for(;i&&"pattern"===i.type;)i=i.prev;var o=i&&r===i.type;return i?"keywords"===i.type?e.commands.newlineAndIndent:i.align?i.col+(o?0:1):i.indent+(o?0:s):0}}}),e.modeExtensions.cypher={autoFormatLineBreaks:function(e){for(var t,n,r,n=e.split("\n"),r=/\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g,t=0;t!?|\/]/;return{startState:function(e){return{tokenize:null,context:new s((e||0)-d,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;u=null;var i=(t.tokenize||r)(e,t);if("comment"==i||"meta"==i)return i;if(null==n.align&&(n.align=!0),";"!=u&&":"!=u&&","!=u||"statement"!=n.type)if("{"==u)l(t,e.column(),"}");else if("["==u)l(t,e.column(),"]");else if("("==u)l(t,e.column(),")");else if("}"==u){for(;"statement"==n.type;)n=c(t);for("}"==n.type&&(n=c(t));"statement"==n.type;)n=c(t)}else u==n.type?c(t):(("}"==n.type||"top"==n.type)&&";"!=u||"statement"==n.type&&"newstatement"==u)&&l(t,e.column(),"statement");else c(t);return t.startOfLine=!1,i},indent:function(t,n){if(t.tokenize!=r&&null!=t.tokenize)return e.Pass;var i=t.context,o=n&&n.charAt(0);"statement"==i.type&&"}"==o&&(i=i.prev);var a=o==i.type;return"statement"==i.type?i.indented+("{"==o?0:f):i.align?i.column+(a?0:1):i.indented+(a?0:d)},electricChars:"{}"}});var n="body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with";e.defineMIME("text/x-d",{name:"d",keywords:t("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters "+n),blockKeywords:t(n),builtin:t("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t"),atoms:t("exit failure success true false null"),hooks:{"@":function(e,t){return e.eatWhile(/[\w\$_]/),"meta"}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("diff",function(){var e={"+":"positive","-":"negative","@":"meta"};return{token:function(t){var n=t.string.search(/[\t ]+?$/);if(!t.sol()||0===n)return t.skipToEnd(),("error "+(e[t.string.charAt(0)]||"")).replace(/ $/,"");var r=e[t.peek()]||t.skipToEnd();return n===-1?t.skipToEnd():t.pos=n,r}}}),e.defineMIME("text/x-diff","diff")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}(function(e){"use strict";var t=["from","maintainer","run","cmd","expose","env","add","copy","entrypoint","volume","user","workdir","onbuild"],n="("+t.join("|")+")",r=new RegExp(n+"\\s*$","i"),i=new RegExp(n+"(\\s+)","i");e.defineSimpleMode("dockerfile",{start:[{regex:/#.*$/,token:"comment"},{regex:r,token:"variable-2"},{regex:i,token:["variable-2",null],next:"arguments"},{regex:/./,token:null}],arguments:[{regex:/#.*$/,token:"error",next:"start"},{regex:/[^#]+\\$/,token:null},{regex:/[^#]+/,token:null,next:"start"},{regex:/$/,token:null,next:"start"},{token:null,next:"start"}],meta:{lineComment:"#"}}),e.defineMIME("text/x-dockerfile","dockerfile")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("dtd",function(e){function t(e,t){return a=t,e}function n(e,n){var a=e.next();if("<"!=a||!e.eat("!")){if("<"==a&&e.eat("?"))return n.tokenize=o("meta","?>"),t("meta",a);if("#"==a&&e.eatWhile(/[\w]/))return t("atom","tag");if("|"==a)return t("keyword","seperator");if(a.match(/[\(\)\[\]\-\.,\+\?>]/))return t(null,a);if(a.match(/[\[\]]/))return t("rule",a);if('"'==a||"'"==a)return n.tokenize=i(a),n.tokenize(e,n);if(e.eatWhile(/[a-zA-Z\?\+\d]/)){var s=e.current();return null!==s.substr(s.length-1,s.length).match(/\?|\+/)&&e.backUp(1),t("tag","tag")}return"%"==a||"*"==a?t("number","number"):(e.eatWhile(/[\w\\\-_%.{,]/),t(null,null))}return e.eatWhile(/[\-]/)?(n.tokenize=r,r(e,n)):e.eatWhile(/[\w]/)?t("keyword","doindent"):void 0}function r(e,r){for(var i,o=0;null!=(i=e.next());){if(o>=2&&">"==i){r.tokenize=n;break}o="-"==i?o+1:0}return t("comment","comment")}function i(e){return function(r,i){for(var o,a=!1;null!=(o=r.next());){if(o==e&&!a){i.tokenize=n;break}a=!a&&"\\"==o}return t("string","tag")}}function o(e,t){return function(r,i){for(;!r.eol();){if(r.match(t)){i.tokenize=n;break}r.next()}return e}}var a,s=e.indentUnit;return{startState:function(e){return{tokenize:n,baseIndent:e||0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t),r=t.stack[t.stack.length-1];return"["==e.current()||"doindent"===a||"["==a?t.stack.push("rule"):"endtag"===a?t.stack[t.stack.length-1]="endtag":"]"==e.current()||"]"==a||">"==a&&"rule"==r?t.stack.pop():"["==a&&t.stack.push("["),n},indent:function(e,t){var n=e.stack.length;return t.match(/\]\s+|\]/)?n-=1:">"===t.substr(t.length-1,t.length)&&("<"===t.substr(0,1)||"doindent"==a&&t.length>1||("doindent"==a?n--:">"==a&&t.length>1||"tag"==a&&">"!==t||("tag"==a&&"rule"==e.stack[e.stack.length-1]?n--:"tag"==a?n++:">"===t&&"rule"==e.stack[e.stack.length-1]&&">"===a?n--:">"===t&&"rule"==e.stack[e.stack.length-1]||("<"!==t.substr(0,1)&&">"===t.substr(0,1)?n-=1:">"===t||(n-=1)))),null!=a&&"]"!=a||n--),e.baseIndent+n*s},electricChars:"]>"}}),e.defineMIME("application/xml-dtd","dtd")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){for(var n=0;n&|]/.test(i)?(e.next(),"operator"):e.match("define")?"def":(e.eatWhile(/[\w\-]/),m.hasOwnProperty(e.current())?h[e.current()]:e.current().match(c)?"variable":(e.next(),"variable-2"))}function o(e,t){for(var n,r=!1,o=!1,a=0;n=e.next();){if("/"==n&&r){if(!(a>0)){t.tokenize=i;break}a--}else"*"==n&&o&&a++;r="*"==n,o="/"==n}return"comment"}function a(e,t){return function(n,r){for(var o,a=!1,s=!1;null!=(o=n.next());){if(o==e&&!a){s=!0;break}a=!a&&"\\"==o}return!s&&a||(r.tokenize=i),t}}var s={unnamedDefinition:["interface"],namedDefinition:["module","library","macro","C-struct","C-union","C-function","C-callable-wrapper"],typeParameterizedDefinition:["class","C-subtype","C-mapped-subtype"],otherParameterizedDefinition:["method","function","C-variable","C-address"],constantSimpleDefinition:["constant"],variableSimpleDefinition:["variable"],otherSimpleDefinition:["generic","domain","C-pointer-type","table"],statement:["if","block","begin","method","case","for","select","when","unless","until","while","iterate","profiling","dynamic-bind"],separator:["finally","exception","cleanup","else","elseif","afterwards"],other:["above","below","by","from","handler","in","instance","let","local","otherwise","slot","subclass","then","to","keyed-by","virtual"],signalingCalls:["signal","error","cerror","break","check-type","abort"]};s.otherDefinition=s.unnamedDefinition.concat(s.namedDefinition).concat(s.otherParameterizedDefinition),s.definition=s.typeParameterizedDefinition.concat(s.otherDefinition),s.parameterizedDefinition=s.typeParameterizedDefinition.concat(s.otherParameterizedDefinition),s.simpleDefinition=s.constantSimpleDefinition.concat(s.variableSimpleDefinition).concat(s.otherSimpleDefinition),s.keyword=s.statement.concat(s.separator).concat(s.other);var l="[-_a-zA-Z?!*@<>$%]+",c=new RegExp("^"+l),u={symbolKeyword:l+":",symbolClass:"<"+l+">",symbolGlobal:"\\*"+l+"\\*",symbolConstant:"\\$"+l},d={symbolKeyword:"atom",symbolClass:"tag",symbolGlobal:"variable-2",symbolConstant:"variable-3"};for(var f in u)u.hasOwnProperty(f)&&(u[f]=new RegExp("^"+u[f]));u.keyword=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var p={};p.keyword="keyword",p.definition="def",p.simpleDefinition="def",p.signalingCalls="builtin";var m={},h={};return t(["keyword","definition","simpleDefinition","signalingCalls"],function(e){t(s[e],function(t){m[t]=e,h[t]=p[e]})}),{startState:function(){return{tokenize:i,currentIndent:0}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n},blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-dylan","dylan")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("ecl",function(e){function t(e){for(var t={},n=e.split(" "),r=0;r=0&&(!isNaN(a[s])||"_"==a[s]);)--s;if(s>0){var l=a.substr(0,s+1);if(m.propertyIsEnumerable(l))return g.propertyIsEnumerable(l)&&(c="newstatement"),"variable-3"}return v.propertyIsEnumerable(a)?"atom":null}function i(e){return function(t,n){for(var i,o=!1,a=!1;null!=(i=t.next());){if(i==e&&!o){a=!0;break}o=!o&&"\\"==i}return!a&&o||(n.tokenize=r),"string"}}function o(e,t){for(var n,i=!1;n=e.next();){if("/"==n&&i){t.tokenize=r;break}i="*"==n}return"comment"}function a(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function s(e,t,n){return e.context=new a(e.indented,t,n,null,e.context)}function l(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}var c,u=e.indentUnit,d=t("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"),f=t("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),p=t("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"),m=t("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),h=t("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),g=t("catch class do else finally for if switch try while"),v=t("true false null"),b={"#":n},y=/[+\-*&%=<>!?|\/]/;return{startState:function(e){return{tokenize:null,context:new a((e||0)-u,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;c=null;var i=(t.tokenize||r)(e,t);if("comment"==i||"meta"==i)return i;if(null==n.align&&(n.align=!0),";"!=c&&":"!=c||"statement"!=n.type)if("{"==c)s(t,e.column(),"}");else if("["==c)s(t,e.column(),"]");else if("("==c)s(t,e.column(),")");else if("}"==c){for(;"statement"==n.type;)n=l(t);for("}"==n.type&&(n=l(t));"statement"==n.type;)n=l(t)}else c==n.type?l(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==c)&&s(t,e.column(),"statement");else l(t);return t.startOfLine=!1,i},indent:function(e,t){if(e.tokenize!=r&&null!=e.tokenize)return 0;var n=e.context,i=t&&t.charAt(0);"statement"==n.type&&"}"==i&&(n=n.prev);var o=i==n.type;return"statement"==n.type?n.indented+("{"==i?0:u):n.align?n.column+(o?0:1):n.indented+(o?0:u)},electricChars:"{}"}}),e.defineMIME("text/x-ecl","ecl")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("eiffel",function(){function e(e){for(var t={},n=0,r=e.length;n~]/.test(i)?(e.eatWhile(/[=+\-\/*^%<>~]/),"operator"):null}function r(e,t,n){return function(r,i){for(var o,a=!1;null!=(o=r.next());){if(o==e&&(n||!a)){i.tokenize.pop();break}a=!a&&"%"==o}return t}}var i=e(["note","across","when","variant","until","unique","undefine","then","strip","select","retry","rescue","require","rename","reference","redefine","prefix","once","old","obsolete","loop","local","like","is","inspect","infix","include","if","frozen","from","external","export","ensure","end","elseif","else","do","creation","create","check","alias","agent","separate","invariant","inherit","indexing","feature","expanded","deferred","class","Void","True","Result","Precursor","False","Current","create","attached","detachable","as","and","implies","not","or"]),o=e([":=","and then","and","or","<<",">>"]);return{startState:function(){return{tokenize:[n]}},token:function(e,t){var n=t.tokenize[t.tokenize.length-1](e,t);if("ident"==n){var r=e.current();n=i.propertyIsEnumerable(e.current())?"keyword":o.propertyIsEnumerable(e.current())?"operator":/^[A-Z][A-Z_0-9]*$/g.test(r)?"tag":/^0[bB][0-1]+$/g.test(r)?"number":/^0[cC][0-7]+$/g.test(r)?"number":/^0[xX][a-fA-F0-9]+$/g.test(r)?"number":/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(r)?"number":/^[0-9]+$/g.test(r)?"number":"variable"}return n},lineComment:"--"}}),e.defineMIME("text/x-eiffel","eiffel")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("elm",function(){function e(e,t,n){return t(n),n(e,t)}function t(){return function(t,i){if(t.eatWhile(p))return null;var m=t.next();if(f.test(m)){if("{"==m&&t.eat("-")){var h="comment";return t.eat("#")&&(h="meta"),e(t,i,n(h,1))}return null}if("'"==m)return t.eat("\\")?t.next():t.next(),t.eat("'")?"string":"error";if('"'==m)return e(t,i,r);if(a.test(m))return t.eatWhile(u),t.eat(".")?"qualifier":"variable-2";if(o.test(m)){var g=1===t.pos;return t.eatWhile(u),g?"variable-3":"variable"}if(s.test(m)){if("0"==m){if(t.eat(/[xX]/))return t.eatWhile(l),"integer";if(t.eat(/[oO]/))return t.eatWhile(c),"number"}t.eatWhile(s);var h="number";return t.eat(".")&&(h="number",t.eatWhile(s)),t.eat(/[eE]/)&&(h="number",t.eat(/[-+]/),t.eatWhile(s)),h}return d.test(m)?"-"==m&&t.eat(/-/)&&(t.eatWhile(/-/),!t.eat(d))?(t.skipToEnd(),"comment"):(t.eatWhile(d),"builtin"):"error"}}function n(e,r){return 0==r?t():function(i,o){for(var a=r;!i.eol();){var s=i.next();if("{"==s&&i.eat("-"))++a;else if("-"==s&&i.eat("}")&&(--a,0==a))return o(t()),e}return o(n(e,a)),e}}function r(e,n){for(;!e.eol();){var r=e.next();if('"'==r)return n(t()),"string";if("\\"==r){if(e.eol()||e.eat(p))return n(i),"string";e.eat("&")||e.next()}}return n(t()),"error"}function i(n,i){return n.eat("\\")?e(n,i,r):(n.next(),i(t()),"error")}var o=/[a-z_]/,a=/[A-Z]/,s=/[0-9]/,l=/[0-9A-Fa-f]/,c=/[0-7]/,u=/[a-z_A-Z0-9\']/,d=/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]/,f=/[(),;[\]`{}]/,p=/[ \t\v\f]/,m=function(){for(var e={},t=["case","of","as","if","then","else","let","in","infix","infixl","infixr","type","alias","input","output","foreign","loopback","module","where","import","exposing","_","..","|",":","=","\\",'"',"->","<-"],n=t.length;n--;)e[t[n]]="keyword";return e}();return{startState:function(){return{f:t()}},copyState:function(e){return{f:e.f}},token:function(e,t){var n=t.f(e,function(e){t.f=e}),r=e.current();return m.hasOwnProperty(r)?m[r]:n}}}),e.defineMIME("text/x-elm","elm")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMIME("text/x-erlang","erlang"),e.defineMode("erlang",function(t){function n(e,t){if(t.in_string)return t.in_string=!o(e),u(t,e,"string");if(t.in_atom)return t.in_atom=!a(e),u(t,e,"atom");if(e.eatSpace())return u(t,e,"whitespace");if(!m(t)&&e.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return c(e.current(),E)?u(t,e,"type"):u(t,e,"attribute");var n=e.next();if("%"==n)return e.skipToEnd(),u(t,e,"comment");if(":"==n)return u(t,e,"colon");if("?"==n)return e.eatSpace(),e.eatWhile($),u(t,e,"macro");if("#"==n)return e.eatSpace(),e.eatWhile($),u(t,e,"record");if("$"==n)return"\\"!=e.next()||e.match(j)?u(t,e,"number"):u(t,e,"error");if("."==n)return u(t,e,"dot");if("'"==n){if(!(t.in_atom=!a(e))){if(e.match(/\s*\/\s*[0-9]/,!1))return e.match(/\s*\/\s*[0-9]/,!0),u(t,e,"fun");if(e.match(/\s*\(/,!1)||e.match(/\s*:/,!1))return u(t,e,"function")}return u(t,e,"atom")}if('"'==n)return t.in_string=!o(e),u(t,e,"string");if(/[A-Z_Ø-ÞÀ-Ö]/.test(n))return e.eatWhile($),u(t,e,"variable");if(/[a-z_ß-öø-ÿ]/.test(n)){if(e.eatWhile($),e.match(/\s*\/\s*[0-9]/,!1))return e.match(/\s*\/\s*[0-9]/,!0),u(t,e,"fun");var s=e.current();return c(s,T)?u(t,e,"keyword"):c(s,L)?u(t,e,"operator"):e.match(/\s*\(/,!1)?!c(s,q)||":"==m(t).token&&"erlang"!=m(t,2).token?c(s,D)?u(t,e,"guard"):u(t,e,"function"):u(t,e,"builtin"):":"==l(e)?"erlang"==s?u(t,e,"builtin"):u(t,e,"function"):c(s,["true","false"])?u(t,e,"boolean"):u(t,e,"atom")}var d=/[0-9]/,f=/[0-9a-zA-Z]/;return d.test(n)?(e.eatWhile(d),e.eat("#")?e.eatWhile(f)||e.backUp(1):e.eat(".")&&(e.eatWhile(d)?e.eat(/[eE]/)&&(e.eat(/[-+]/)?e.eatWhile(d)||e.backUp(2):e.eatWhile(d)||e.backUp(1)):e.backUp(1)),u(t,e,"number")):r(e,z,R)?u(t,e,"open_paren"):r(e,N,P)?u(t,e,"close_paren"):i(e,M,A)?u(t,e,"separator"):i(e,I,O)?u(t,e,"operator"):u(t,e,null)}function r(e,t,n){if(1==e.current().length&&t.test(e.current())){for(e.backUp(1);t.test(e.peek());)if(e.next(),c(e.current(),n))return!0;e.backUp(e.current().length-1)}return!1}function i(e,t,n){if(1==e.current().length&&t.test(e.current())){for(;t.test(e.peek());)e.next();for(;01&&"fun"===e[t].type&&"fun"===e[t-1].token)return e.slice(0,t-1);switch(e[t].token){case"}":return b(e,{g:["{"]});case"]":return b(e,{i:["["]});case")":return b(e,{i:["("]});case">>":return b(e,{i:["<<"]});case"end":return b(e,{i:["begin","case","fun","if","receive","try"]});case",":return b(e,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return b(e,{r:["when"],m:["try","if","case","receive"]});case";":return b(e,{E:["case","fun","if","receive","try","when"]});case"catch":return b(e,{e:["try"]});case"of":return b(e,{e:["case"]});case"after":return b(e,{e:["receive","try"]});default:return e}}function b(e,t){for(var n in t)for(var r=e.length-1,i=t[n],o=r-1;-1"==s.token?c(l.token,["receive","case","if","try"])?l.column+o+o:l.column+o:c(s.token,R)?s.column+s.token.length:(i=w(n),C(i)?i.column+o:0):0}function x(e){var t=e.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return C(t)&&0===t.index?t[0]:""}function k(e){var t=e.tokenStack.slice(0,-1),n=S(t,"type",["open_paren"]);return!!C(t[n])&&t[n]}function w(e){var t=e.tokenStack,n=S(t,"type",["open_paren","separator","keyword"]),r=S(t,"type",["operator"]);return C(n)&&C(r)&&n,;]/,A=["->",";",","],L=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],I=/[\+\-\*\/<>=\|:!]/,O=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],z=/[<\(\[\{]/,R=["<<","(","[","{"],N=/[>\)\]\}]/,P=["}","]",")",">>"],D=["is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_record","is_reference","is_tuple","atom","binary","bitstring","boolean","function","integer","list","number","pid","port","record","reference","tuple"],q=["abs","adler32","adler32_combine","alive","apply","atom_to_binary","atom_to_list","binary_to_atom","binary_to_existing_atom","binary_to_list","binary_to_term","bit_size","bitstring_to_list","byte_size","check_process_code","contact_binary","crc32","crc32_combine","date","decode_packet","delete_module","disconnect_node","element","erase","exit","float","float_to_list","garbage_collect","get","get_keys","group_leader","halt","hd","integer_to_list","internal_bif","iolist_size","iolist_to_binary","is_alive","is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_process_alive","is_record","is_reference","is_tuple","length","link","list_to_atom","list_to_binary","list_to_bitstring","list_to_existing_atom","list_to_float","list_to_integer","list_to_pid","list_to_tuple","load_module","make_ref","module_loaded","monitor_node","node","node_link","node_unlink","nodes","notalive","now","open_port","pid_to_list","port_close","port_command","port_connect","port_control","pre_loaded","process_flag","process_info","processes","purge_module","put","register","registered","round","self","setelement","size","spawn","spawn_link","spawn_monitor","spawn_opt","split_binary","statistics","term_to_binary","time","throw","tl","trunc","tuple_size","tuple_to_list","unlink","unregister","whereis"],$=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,j=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;return{startState:function(){return{tokenStack:[],in_string:!1,in_atom:!1}},token:function(e,t){return n(e,t)},indent:function(e,t){return y(e,t)},lineComment:"%"}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}(function(e){"use strict";e.defineSimpleMode("factor",{start:[{regex:/#?!.*/,token:"comment"},{regex:/"""/,token:"string",next:"string3"},{regex:/"/,token:"string",next:"string"},{regex:/(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/,token:"number"},{regex:/(\:)(\s+)(\S+)(\s+)(\()/,token:["keyword",null,"def",null,"keyword"],next:"stack"},{regex:/USING\:/,token:"keyword",next:"vocabulary"},{regex:/(USE\:|IN\:)(\s+)(\S+)/,token:["keyword",null,"variable-2"]},{regex:/<\S+>/,token:"builtin"},{regex:/;|t|f|if|\.|\[|\]|\{|\}|MAIN:/,token:"keyword"},{regex:/\S+/,token:"variable"},{regex:/./,token:null}],vocabulary:[{regex:/;/,token:"keyword",next:"start"},{regex:/\S+/,token:"variable-2"},{regex:/./,token:null}],string:[{regex:/(?:[^\\]|\\.)*?"/,token:"string",next:"start"},{regex:/.*/,token:"string"}],string3:[{regex:/(?:[^\\]|\\.)*?"""/,token:"string",next:"start"},{regex:/.*/,token:"string"}],stack:[{regex:/\)/,token:"meta",next:"start"},{regex:/--/,token:"meta"},{regex:/\S+/,token:"variable-3"},{regex:/./,token:null}],meta:{dontIndentStates:["start","vocabulary","string","string3","stack"],lineComment:["!","#!"]}}),e.defineMIME("text/x-factor","factor")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("fcl",function(e){function t(e,t){var r=e.next();if(/[\d\.]/.test(r))return"."==r?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==r?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if("/"==r||"("==r){if(e.eat("*"))return t.tokenize=n,n(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(d.test(r))return e.eatWhile(d),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var i=e.current().toLowerCase();return s.propertyIsEnumerable(i)||l.propertyIsEnumerable(i)||c.propertyIsEnumerable(i)?"keyword":u.propertyIsEnumerable(i)?"atom":"variable"}function n(e,n){for(var r,i=!1;r=e.next();){if(("/"==r||")"==r)&&i){n.tokenize=t;break}i="*"==r}return"comment"}function r(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function i(e,t,n){return e.context=new r(e.indented,t,n,null,e.context)}function o(e){if(e.context.prev){var t=e.context.type;return"end_block"==t&&(e.indented=e.context.indented),e.context=e.context.prev}}var a=e.indentUnit,s={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},l={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},c={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},u={true:!0,false:!0,nan:!0,real:!0,min:!0,max:!0,cog:!0,cogs:!0},d=/[+\-*&^%:=<>!|\/]/;return{startState:function(e){return{tokenize:null,context:new r((e||0)-a,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var r=n.context;if(e.sol()&&(null==r.align&&(r.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;var a=(n.tokenize||t)(e,n);if("comment"==a)return a;null==r.align&&(r.align=!0);var s=e.current().toLowerCase();return l.propertyIsEnumerable(s)?i(n,e.column(),"end_block"):c.propertyIsEnumerable(s)&&o(n),n.startOfLine=!1,a},indent:function(e,n){if(e.tokenize!=t&&null!=e.tokenize)return 0;var r=e.context,i=c.propertyIsEnumerable(n);return r.align?r.column+(i?0:1):r.indented+(i?0:a)},electricChars:"ryk",fold:"brace",blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:"//"}}),e.defineMIME("text/x-fcl","fcl")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){var t=[];return e.split(" ").forEach(function(e){t.push({name:e})}),t}var n=t("INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL"),r=t("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");e.defineMode("forth",function(){function e(e,t){var n;for(n=e.length-1;n>=0;n--)if(e[n].name===t.toUpperCase())return e[n]}return{startState:function(){return{state:"",base:10,coreWordList:n,immediateWordList:r,wordList:[]}},token:function(t,n){var r;if(t.eatSpace())return null;if(""===n.state){if(t.match(/^(\]|:NONAME)(\s|$)/i))return n.state=" compilation","builtin compilation";if(r=t.match(/^(\:)\s+(\S+)(\s|$)+/))return n.wordList.push({name:r[2].toUpperCase()}),n.state=" compilation","def"+n.state;if(r=t.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i))return n.wordList.push({name:r[2].toUpperCase()}),"def"+n.state;if(r=t.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/))return"builtin"+n.state}else{if(t.match(/^(\;|\[)(\s)/))return n.state="",t.backUp(1),"builtin compilation";if(t.match(/^(\;|\[)($)/))return n.state="","builtin compilation";if(t.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}return r=t.match(/^(\S+)(\s+|$)/),r?void 0!==e(n.wordList,r[1])?"variable"+n.state:"\\"===r[1]?(t.skipToEnd(),"comment"+n.state):void 0!==e(n.coreWordList,r[1])?"builtin"+n.state:void 0!==e(n.immediateWordList,r[1])?"keyword"+n.state:"("===r[1]?(t.eatWhile(function(e){return")"!==e}),t.eat(")"),"comment"+n.state):".("===r[1]?(t.eatWhile(function(e){return")"!==e}),t.eat(")"),"string"+n.state):'S"'===r[1]||'."'===r[1]||'C"'===r[1]?(t.eatWhile(function(e){return'"'!==e}),t.eat('"'),"string"+n.state):r[1]-68719476735?"number"+n.state:"atom"+n.state:void 0}}}),e.defineMIME("text/x-forth","forth")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("fortran",function(){function e(e){for(var t={},n=0;n\/\:]/,s=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");return{startState:function(){return{tokenize:null}},token:function(e,n){if(e.eatSpace())return null;var r=(n.tokenize||t)(e,n);return"comment"==r||"meta"==r?r:r}}}),e.defineMIME("text/x-fortran","fortran")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("gas",function(e,t){function n(e){s="#",c.ax="variable",c.eax="variable-2",c.rax="variable-3",c.bx="variable",c.ebx="variable-2",c.rbx="variable-3",c.cx="variable",c.ecx="variable-2",c.rcx="variable-3",c.dx="variable",c.edx="variable-2",c.rdx="variable-3",c.si="variable",c.esi="variable-2",c.rsi="variable-3",c.di="variable",c.edi="variable-2",c.rdi="variable-3",c.sp="variable",c.esp="variable-2",c.rsp="variable-3",c.bp="variable",c.ebp="variable-2",c.rbp="variable-3",c.ip="variable",c.eip="variable-2",c.rip="variable-3",c.cs="keyword",c.ds="keyword",c.ss="keyword",c.es="keyword",c.fs="keyword",c.gs="keyword"}function r(e){s="@",l.syntax="builtin",c.r0="variable",c.r1="variable",c.r2="variable",c.r3="variable",c.r4="variable",c.r5="variable",c.r6="variable",c.r7="variable",c.r8="variable",c.r9="variable",c.r10="variable",c.r11="variable",c.r12="variable",c.sp="variable-2",c.lr="variable-2",c.pc="variable-2",c.r13=c.sp,c.r14=c.lr,c.r15=c.pc,a.push(function(e,t){if("#"===e)return t.eatWhile(/\w/),"number"})}function i(e,t){for(var n,r=!1;null!=(n=e.next());){if(n===t&&!r)return!1;r=!r&&"\\"===n}return r}function o(e,t){for(var n,r=!1;null!=(n=e.next());){if("/"===n&&r){t.tokenize=null;break}r="*"===n}return"comment"}var a=[],s="",l={".abort":"builtin",".align":"builtin",".altmacro":"builtin",".ascii":"builtin",".asciz":"builtin",".balign":"builtin",".balignw":"builtin",".balignl":"builtin",".bundle_align_mode":"builtin",".bundle_lock":"builtin",".bundle_unlock":"builtin",".byte":"builtin",".cfi_startproc":"builtin",".comm":"builtin",".data":"builtin",".def":"builtin",".desc":"builtin",".dim":"builtin",".double":"builtin",".eject":"builtin",".else":"builtin",".elseif":"builtin",".end":"builtin",".endef":"builtin",".endfunc":"builtin",".endif":"builtin",".equ":"builtin",".equiv":"builtin",".eqv":"builtin",".err":"builtin",".error":"builtin",".exitm":"builtin",".extern":"builtin",".fail":"builtin",".file":"builtin",".fill":"builtin",".float":"builtin",".func":"builtin",".global":"builtin",".gnu_attribute":"builtin",".hidden":"builtin",".hword":"builtin",".ident":"builtin",".if":"builtin",".incbin":"builtin",".include":"builtin",".int":"builtin",".internal":"builtin",".irp":"builtin",".irpc":"builtin",".lcomm":"builtin",".lflags":"builtin",".line":"builtin",".linkonce":"builtin",".list":"builtin",".ln":"builtin",".loc":"builtin",".loc_mark_labels":"builtin",".local":"builtin",".long":"builtin",".macro":"builtin",".mri":"builtin",".noaltmacro":"builtin",".nolist":"builtin",".octa":"builtin",".offset":"builtin",".org":"builtin",".p2align":"builtin",".popsection":"builtin",".previous":"builtin",".print":"builtin",".protected":"builtin",".psize":"builtin",".purgem":"builtin",".pushsection":"builtin",".quad":"builtin",".reloc":"builtin",".rept":"builtin",".sbttl":"builtin",".scl":"builtin",".section":"builtin",".set":"builtin",".short":"builtin",".single":"builtin",".size":"builtin",".skip":"builtin",".sleb128":"builtin",".space":"builtin",".stab":"builtin",".string":"builtin",".struct":"builtin",".subsection":"builtin",".symver":"builtin",".tag":"builtin",".text":"builtin",".title":"builtin",".type":"builtin",".uleb128":"builtin",".val":"builtin",".version":"builtin",".vtable_entry":"builtin",".vtable_inherit":"builtin",".warning":"builtin",".weak":"builtin",".weakref":"builtin",".word":"builtin"},c={},u=(t.architecture||"x86").toLowerCase();return"x86"===u?n(t):"arm"!==u&&"armv6"!==u||r(t),{startState:function(){return{tokenize:null}},token:function(e,t){if(t.tokenize)return t.tokenize(e,t);if(e.eatSpace())return null;var n,r,u=e.next();if("/"===u&&e.eat("*"))return t.tokenize=o,o(e,t);if(u===s)return e.skipToEnd(),"comment";if('"'===u)return i(e,'"'),"string";if("."===u)return e.eatWhile(/\w/),r=e.current().toLowerCase(),n=l[r],n||null;if("="===u)return e.eatWhile(/\w/),"tag";if("{"===u)return"braket";if("}"===u)return"braket";if(/\d/.test(u))return"0"===u&&e.eat("x")?(e.eatWhile(/[0-9a-fA-F]/),"number"):(e.eatWhile(/\d/),"number");if(/\w/.test(u))return e.eatWhile(/\w/),e.eat(":")?"tag":(r=e.current().toLowerCase(),n=c[r],n||null);for(var d=0;d]*>?/)?"variable":(e.next(),e.eatWhile(/[^@"<#]/),null)}}}),e.defineMIME("text/x-feature","gherkin")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("go",function(e){function t(e,t){var i=e.next();if('"'==i||"'"==i||"`"==i)return t.tokenize=n(i),t.tokenize(e,t);if(/[\d\.]/.test(i))return"."==i?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==i?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(i))return s=i,null;if("/"==i){if(e.eat("*"))return t.tokenize=r,r(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(d.test(i))return e.eatWhile(d),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var o=e.current();return c.propertyIsEnumerable(o)?("case"!=o&&"default"!=o||(s="case"),"keyword"):u.propertyIsEnumerable(o)?"atom":"variable"}function n(e){return function(n,r){for(var i,o=!1,a=!1;null!=(i=n.next());){if(i==e&&!o){a=!0;break}o=!o&&"`"!=e&&"\\"==i}return(a||!o&&"`"!=e)&&(r.tokenize=t),"string"}}function r(e,n){for(var r,i=!1;r=e.next();){if("/"==r&&i){n.tokenize=t;break}i="*"==r}return"comment"}function i(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function o(e,t,n){return e.context=new i(e.indented,t,n,null,e.context)}function a(e){if(e.context.prev){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}}var s,l=e.indentUnit,c={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},u={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},d=/[+\-*&^%:=<>!|\/]/;return{startState:function(e){return{tokenize:null,context:new i((e||0)-l,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var r=n.context;if(e.sol()&&(null==r.align&&(r.align=!1),n.indented=e.indentation(),n.startOfLine=!0,"case"==r.type&&(r.type="}")),e.eatSpace())return null;s=null;var i=(n.tokenize||t)(e,n);return"comment"==i?i:(null==r.align&&(r.align=!0),"{"==s?o(n,e.column(),"}"):"["==s?o(n,e.column(),"]"):"("==s?o(n,e.column(),")"):"case"==s?r.type="case":"}"==s&&"}"==r.type?r=a(n):s==r.type&&a(n),n.startOfLine=!1,i)},indent:function(e,n){if(e.tokenize!=t&&null!=e.tokenize)return 0;var r=e.context,i=n&&n.charAt(0);if("case"==r.type&&/^(?:case|default)\b/.test(n))return e.context.type="}",r.indented;var o=i==r.type;return r.align?r.column+(o?0:1):r.indented+(o?0:l)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),e.defineMIME("text/x-go","go")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("groovy",function(t){function n(e){for(var t={},n=e.split(" "),r=0;r"))return d="->",null;if(/[+\-*&%=<>!?|\/~]/.test(n))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),"@"==n)return e.eatWhile(/[\w\$_\.]/),"meta";if("."==t.lastToken)return"property";if(e.eat(":"))return d="proplabel","property";var r=e.current();return h.propertyIsEnumerable(r)?"atom":f.propertyIsEnumerable(r)?(p.propertyIsEnumerable(r)?d="newstatement":m.propertyIsEnumerable(r)&&(d="standalone"),"keyword"):"variable"}function i(e,t,n){function r(t,n){for(var r,a=!1,s=!i;null!=(r=t.next());){if(r==e&&!a){if(!i)break;if(t.match(e+e)){s=!0;break}}if('"'==e&&"$"==r&&!a&&t.eat("{"))return n.tokenize.push(o()),"string";a=!a&&"\\"==r}return s&&n.tokenize.pop(),"string"}var i=!1;if("/"!=e&&t.eat(e)){if(!t.eat(e))return"string";i=!0}return n.tokenize.push(r),
r(t,n)}function o(){function e(e,n){if("}"==e.peek()){if(t--,0==t)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](e,n)}else"{"==e.peek()&&t++;return r(e,n)}var t=1;return e.isBase=!0,e}function a(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize.pop();break}r="*"==n}return"comment"}function s(e,t){return!e||"operator"==e||"->"==e||/[\.\[\{\(,;:]/.test(e)||"newstatement"==e||"keyword"==e||"proplabel"==e||"standalone"==e&&!t}function l(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function c(e,t,n){return e.context=new l(e.indented,t,n,null,e.context)}function u(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}var d,f=n("abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws transient try void volatile while"),p=n("catch class do else finally for if switch try while enum interface def"),m=n("return break continue"),h=n("null true false this");return r.isBase=!0,{startState:function(e){return{tokenize:[r],context:new l((e||0)-t.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,"statement"!=n.type||s(t.lastToken,!0)||(u(t),n=t.context)),e.eatSpace())return null;d=null;var r=t.tokenize[t.tokenize.length-1](e,t);if("comment"==r)return r;if(null==n.align&&(n.align=!0),";"!=d&&":"!=d||"statement"!=n.type)if("->"==d&&"statement"==n.type&&"}"==n.prev.type)u(t),t.context.align=!1;else if("{"==d)c(t,e.column(),"}");else if("["==d)c(t,e.column(),"]");else if("("==d)c(t,e.column(),")");else if("}"==d){for(;"statement"==n.type;)n=u(t);for("}"==n.type&&(n=u(t));"statement"==n.type;)n=u(t)}else d==n.type?u(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==d)&&c(t,e.column(),"statement");else u(t);return t.startOfLine=!1,t.lastToken=d||r,r},indent:function(n,r){if(!n.tokenize[n.tokenize.length-1].isBase)return e.Pass;var i=r&&r.charAt(0),o=n.context;"statement"!=o.type||s(n.lastToken,!0)||(o=o.prev);var a=i==o.type;return"statement"==o.type?o.indented+("{"==i?0:t.indentUnit):o.align?o.column+(a?0:1):o.indented+(a?0:t.indentUnit)},electricChars:"{}",closeBrackets:{triples:"'\""},fold:"brace"}}),e.defineMIME("text/x-groovy","groovy")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("haskell",function(e,t){function n(e,t,n){return t(n),n(e,t)}function r(e,t){if(e.eatWhile(h))return null;var r=e.next();if(m.test(r)){if("{"==r&&e.eat("-")){var a="comment";return e.eat("#")&&(a="meta"),n(e,t,i(a,1))}return null}if("'"==r)return e.eat("\\")?e.next():e.next(),e.eat("'")?"string":"string error";if('"'==r)return n(e,t,o);if(l.test(r))return e.eatWhile(f),e.eat(".")?"qualifier":"variable-2";if(s.test(r))return e.eatWhile(f),"variable";if(c.test(r)){if("0"==r){if(e.eat(/[xX]/))return e.eatWhile(u),"integer";if(e.eat(/[oO]/))return e.eatWhile(d),"number"}e.eatWhile(c);var a="number";return e.match(/^\.\d+/)&&(a="number"),e.eat(/[eE]/)&&(a="number",e.eat(/[-+]/),e.eatWhile(c)),a}if("."==r&&e.eat("."))return"keyword";if(p.test(r)){if("-"==r&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(p)))return e.skipToEnd(),"comment";var a="variable";return":"==r&&(a="variable-2"),e.eatWhile(p),a}return"error"}function i(e,t){return 0==t?r:function(n,o){for(var a=t;!n.eol();){var s=n.next();if("{"==s&&n.eat("-"))++a;else if("-"==s&&n.eat("}")&&(--a,0==a))return o(r),e}return o(i(e,a)),e}}function o(e,t){for(;!e.eol();){var n=e.next();if('"'==n)return t(r),"string";if("\\"==n){if(e.eol()||e.eat(h))return t(a),"string";e.eat("&")||e.next()}}return t(r),"string error"}function a(e,t){return e.eat("\\")?n(e,t,o):(e.next(),t(r),"error")}var s=/[a-z_]/,l=/[A-Z]/,c=/\d/,u=/[0-9A-Fa-f]/,d=/[0-7]/,f=/[a-z_A-Z0-9'\xa1-\uffff]/,p=/[-!#$%&*+.\/<=>?@\\^|~:]/,m=/[(),;[\]`{}]/,h=/[ \t\v\f]/,g=function(){function e(e){return function(){for(var t=0;t","@","~","=>"),e("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<=","=<<","==",">",">=",">>",">>=","^","^^","||","*","**"),e("builtin")("Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),e("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var r=t.overrideKeywords;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);return n}();return{startState:function(){return{f:r}},copyState:function(e){return{f:e.f}},token:function(e,t){var n=t.f(e,function(e){t.f=e}),r=e.current();return g.hasOwnProperty(r)?g[r]:n},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),e.defineMIME("text/x-haskell","haskell")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("haxe",function(e,t){function n(e){return{type:e,style:"keyword"}}function r(e,t,n){return t.tokenize=n,n(e,t)}function i(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==t&&!r)return!0;r=!r&&"\\"==n}}function o(e,t,n){return G=e,V=n,t}function a(e,t){var n=e.next();if('"'==n||"'"==n)return r(e,t,s(n));if(/[\[\]{}\(\),;\:\.]/.test(n))return o(n);if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if(/\d/.test(n)||"-"==n&&e.eat(/\d/))return e.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/),o("number","number");if(t.reAllowed&&"~"==n&&e.eat(/\//))return i(e,"/"),e.eatWhile(/[gimsu]/),o("regexp","string-2");if("/"==n)return e.eat("*")?r(e,t,l):e.eat("/")?(e.skipToEnd(),o("comment","comment")):(e.eatWhile(ne),o("operator",null,e.current()));if("#"==n)return e.skipToEnd(),o("conditional","meta");if("@"==n)return e.eat(/:/),e.eatWhile(/[\w_]/),o("metadata","meta");if(ne.test(n))return e.eatWhile(ne),o("operator",null,e.current());var a;if(/[A-Z]/.test(n))return e.eatWhile(/[\w_<>]/),a=e.current(),o("type","variable-3",a);e.eatWhile(/[\w_]/);var a=e.current(),c=te.propertyIsEnumerable(a)&&te[a];return c&&t.kwAllowed?o(c.type,c.style,a):o("variable","variable",a)}function s(e){return function(t,n){return i(t,e)&&(n.tokenize=a),o("string","string")}}function l(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=a;break}r="*"==n}return o("comment","comment")}function c(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function u(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;for(ie.state=e,ie.stream=i,ie.marked=null,ie.cc=o,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():_;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return ie.marked?ie.marked:"variable"==n&&u(e,r)?"variable-2":"variable"==n&&f(e,r)?"variable-3":t}}}function f(e,t){if(/[a-z]/.test(t.charAt(0)))return!1;for(var n=e.importedtypes.length,r=0;r=0;e--)ie.cc.push(arguments[e])}function h(){return m.apply(null,arguments),!0}function g(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function v(e){var t=ie.state;if(t.context){if(ie.marked="def",g(e,t.localVars))return;t.localVars={name:e,next:t.localVars}}else if(t.globalVars){if(g(e,t.globalVars))return;t.globalVars={name:e,next:t.globalVars}}}function b(){ie.state.context||(ie.state.localVars=oe),ie.state.context={prev:ie.state.context,vars:ie.state.localVars}}function y(){ie.state.localVars=ie.state.context.vars,ie.state.context=ie.state.context.prev}function x(e,t){var n=function(){var n=ie.state;n.lexical=new c(n.indented,ie.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function k(){var e=ie.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?h():";"==e?m():h(t)}return t}function _(e){return"@"==e?h(M):"var"==e?h(x("vardef"),D,w(";"),k):"keyword a"==e?h(x("form"),S,_,k):"keyword b"==e?h(x("form"),_,k):"{"==e?h(x("}"),b,P,k,y):";"==e?h():"attribute"==e?h(T):"function"==e?h(F):"for"==e?h(x("form"),w("("),x(")"),$,w(")"),k,_,k):"variable"==e?h(x("stat"),O):"switch"==e?h(x("form"),S,x("}","switch"),w("{"),P,k,k):"case"==e?h(S,w(":")):"default"==e?h(w(":")):"catch"==e?h(x("form"),b,w("("),H,w(")"),_,k,y):"import"==e?h(L,w(";")):"typedef"==e?h(I):m(x("stat"),S,w(";"),k)}function S(e){return re.hasOwnProperty(e)?h(E):"type"==e?h(E):"function"==e?h(F):"keyword c"==e?h(C):"("==e?h(x(")"),C,w(")"),k,E):"operator"==e?h(S):"["==e?h(x("]"),N(C,"]"),k,E):"{"==e?h(x("}"),N(R,"}"),k,E):h()}function C(e){return e.match(/[;\}\)\],]/)?m():m(S)}function E(e,t){if("operator"==e&&/\+\+|--/.test(t))return h(E);if("operator"==e||":"==e)return h(S);if(";"!=e)return"("==e?h(x(")"),N(S,")"),k,E):"."==e?h(z,E):"["==e?h(x("]"),S,w("]"),k,E):void 0}function T(e){return"attribute"==e?h(T):"function"==e?h(F):"var"==e?h(D):void 0}function M(e){return":"==e?h(M):"variable"==e?h(M):"("==e?h(x(")"),N(A,")"),k,_):void 0}function A(e){if("variable"==e)return h()}function L(e,t){return"variable"==e&&/[A-Z]/.test(t.charAt(0))?(p(t),h()):"variable"==e||"property"==e||"."==e||"*"==t?h(L):void 0}function I(e,t){return"variable"==e&&/[A-Z]/.test(t.charAt(0))?(p(t),h()):"type"==e&&/[A-Z]/.test(t.charAt(0))?h():void 0}function O(e){return":"==e?h(k,_):m(E,w(";"),k)}function z(e){if("variable"==e)return ie.marked="property",h()}function R(e){if("variable"==e&&(ie.marked="property"),re.hasOwnProperty(e))return h(w(":"),S)}function N(e,t){function n(r){return","==r?h(e,n):r==t?h():h(w(t))}return function(r){return r==t?h():m(e,n)}}function P(e){return"}"==e?h():m(_,P)}function D(e,t){return"variable"==e?(v(t),h(W,q)):h()}function q(e,t){return"="==t?h(S,q):","==e?h(D):void 0}function $(e,t){return"variable"==e?(v(t),h(j,S)):m()}function j(e,t){if("in"==t)return h()}function F(e,t){return"variable"==e||"type"==e?(v(t),h(F)):"new"==t?h(F):"("==e?h(x(")"),b,N(H,")"),k,W,_,y):void 0}function W(e){if(":"==e)return h(U)}function U(e){return"type"==e?h():"variable"==e?h():"{"==e?h(x("}"),N(B,"}"),k):void 0}function B(e){if("variable"==e)return h(W)}function H(e,t){if("variable"==e)return v(t),h(W)}var G,V,K=e.indentUnit,Z=n("keyword a"),X=n("keyword b"),Y=n("keyword c"),J=n("operator"),Q={type:"atom",style:"atom"},ee={type:"attribute",style:"attribute"},G=n("typedef"),te={if:Z,while:Z,else:X,do:X,try:X,return:Y,break:Y,continue:Y,new:Y,throw:Y,var:n("var"),inline:ee,static:ee,using:n("import"),public:ee,private:ee,cast:n("cast"),import:n("import"),macro:n("macro"),function:n("function"),catch:n("catch"),untyped:n("untyped"),callback:n("cb"),for:n("for"),switch:n("switch"),case:n("case"),default:n("default"),in:J,never:n("property_access"),trace:n("trace"),class:G,abstract:G,enum:G,interface:G,typedef:G,extends:G,implements:G,dynamic:G,true:Q,false:Q,null:Q},ne=/[+\-*&%=<>!?|]/,re={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},ie={state:null,column:null,marked:null,cc:null},oe={name:"this",next:null};return y.lex=!0,k.lex=!0,{startState:function(e){var n=["Int","Float","String","Void","Std","Bool","Dynamic","Array"],r={tokenize:a,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new c((e||0)-K,0,"block",!1),localVars:t.localVars,importedtypes:n,context:t.localVars&&{vars:t.localVars},indented:0};return t.globalVars&&"object"==typeof t.globalVars&&(r.globalVars=t.globalVars),r},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==G?n:(t.reAllowed=!("operator"!=G&&"keyword c"!=G&&!G.match(/^[\[{}\(,;:]$/)),t.kwAllowed="."!=G,d(t,n,G,V,e))},indent:function(e,t){if(e.tokenize!=a)return 0;var n=t&&t.charAt(0),r=e.lexical;"stat"==r.type&&"}"==n&&(r=r.prev);var i=r.type,o=n==i;return"vardef"==i?r.indented+4:"form"==i&&"{"==n?r.indented:"stat"==i||"form"==i?r.indented+K:"switch"!=r.info||o?r.align?r.column+(o?0:1):r.indented+(o?0:K):r.indented+(/^(?:case|default)\b/.test(t)?K:2*K)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),e.defineMIME("text/x-haxe","haxe"),e.defineMode("hxml",function(){return{startState:function(){return{define:!1,inString:!1}},token:function(e,t){var n=e.peek(),r=e.sol();if("#"==n)return e.skipToEnd(),"comment";if(r&&"-"==n){var i="variable-2";return e.eat(/-/),"-"==e.peek()&&(e.eat(/-/),i="keyword a"),"D"==e.peek()&&(e.eat(/[D]/),i="keyword c",t.define=!0),e.eatWhile(/[A-Z]/i),i}var n=e.peek();return 0==t.inString&&"'"==n&&(t.inString=!0,n=e.next()),1==t.inString?(e.skipTo("'")||e.skipToEnd(),"'"==e.peek()&&(e.next(),t.inString=!1),"string"):(e.next(),null)},lineComment:"#"}}),e.defineMIME("text/x-hxml","hxml")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("http",function(){function e(e,t){return e.skipToEnd(),t.cur=a,"error"}function t(t,r){return t.match(/^HTTP\/\d\.\d/)?(r.cur=n,"keyword"):t.match(/^[A-Z]+/)&&/[ \t]/.test(t.peek())?(r.cur=i,"keyword"):e(t,r)}function n(t,n){var i=t.match(/^\d+/);if(!i)return e(t,n);n.cur=r;var o=Number(i[0]);return o>=100&&o<200?"positive informational":o>=200&&o<300?"positive success":o>=300&&o<400?"positive redirect":o>=400&&o<500?"negative client-error":o>=500&&o<600?"negative server-error":"error"}function r(e,t){return e.skipToEnd(),t.cur=a,null}function i(e,t){return e.eatWhile(/\S/),t.cur=o,"string-2"}function o(t,n){return t.match(/^HTTP\/\d\.\d$/)?(n.cur=a,"keyword"):e(t,n)}function a(e){return e.sol()&&!e.eat(/[ \t]/)?e.match(/^.*?:/)?"atom":(e.skipToEnd(),"error"):(e.skipToEnd(),"string")}function s(e){return e.skipToEnd(),null}return{token:function(e,t){var n=t.cur;return n!=a&&n!=s&&e.eatSpace()?null:n(e,t)},blankLine:function(e){e.cur=s},startState:function(){return{cur:t}}}}),e.defineMIME("message/http","http")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function n(e){if(e.eatSpace())return null;if(e.match(";"))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return e.match(/^"([^"]|(""))*"/)?"string":e.match(/^'([^']|(''))*'/)?"string":e.match(a)?"keyword":e.match(i)?"builtin":e.match(s)?"variable":e.match(l)||e.match(c)?"operator":(e.next(),null)}var r=["a_correlate","abs","acos","adapt_hist_equal","alog","alog2","alog10","amoeba","annotate","app_user_dir","app_user_dir_query","arg_present","array_equal","array_indices","arrow","ascii_template","asin","assoc","atan","axis","axis","bandpass_filter","bandreject_filter","barplot","bar_plot","beseli","beselj","beselk","besely","beta","biginteger","bilinear","bin_date","binary_template","bindgen","binomial","bit_ffs","bit_population","blas_axpy","blk_con","boolarr","boolean","boxplot","box_cursor","breakpoint","broyden","bubbleplot","butterworth","bytarr","byte","byteorder","bytscl","c_correlate","calendar","caldat","call_external","call_function","call_method","call_procedure","canny","catch","cd","cdf","ceil","chebyshev","check_math","chisqr_cvf","chisqr_pdf","choldc","cholsol","cindgen","cir_3pnt","clipboard","close","clust_wts","cluster","cluster_tree","cmyk_convert","code_coverage","color_convert","color_exchange","color_quan","color_range_map","colorbar","colorize_sample","colormap_applicable","colormap_gradient","colormap_rotation","colortable","comfit","command_line_args","common","compile_opt","complex","complexarr","complexround","compute_mesh_normals","cond","congrid","conj","constrained_min","contour","contour","convert_coord","convol","convol_fft","coord2to3","copy_lun","correlate","cos","cosh","cpu","cramer","createboxplotdata","create_cursor","create_struct","create_view","crossp","crvlength","ct_luminance","cti_test","cursor","curvefit","cv_coord","cvttobm","cw_animate","cw_animate_getp","cw_animate_load","cw_animate_run","cw_arcball","cw_bgroup","cw_clr_index","cw_colorsel","cw_defroi","cw_field","cw_filesel","cw_form","cw_fslider","cw_light_editor","cw_light_editor_get","cw_light_editor_set","cw_orient","cw_palette_editor","cw_palette_editor_get","cw_palette_editor_set","cw_pdmenu","cw_rgbslider","cw_tmpl","cw_zoom","db_exists","dblarr","dcindgen","dcomplex","dcomplexarr","define_key","define_msgblk","define_msgblk_from_file","defroi","defsysv","delvar","dendro_plot","dendrogram","deriv","derivsig","determ","device","dfpmin","diag_matrix","dialog_dbconnect","dialog_message","dialog_pickfile","dialog_printersetup","dialog_printjob","dialog_read_image","dialog_write_image","dictionary","digital_filter","dilate","dindgen","dissolve","dist","distance_measure","dlm_load","dlm_register","doc_library","double","draw_roi","edge_dog","efont","eigenql","eigenvec","ellipse","elmhes","emboss","empty","enable_sysrtn","eof","eos","erase","erf","erfc","erfcx","erode","errorplot","errplot","estimator_filter","execute","exit","exp","expand","expand_path","expint","extrac","extract_slice","f_cvf","f_pdf","factorial","fft","file_basename","file_chmod","file_copy","file_delete","file_dirname","file_expand_path","file_gunzip","file_gzip","file_info","file_lines","file_link","file_mkdir","file_move","file_poll_input","file_readlink","file_same","file_search","file_tar","file_test","file_untar","file_unzip","file_which","file_zip","filepath","findgen","finite","fix","flick","float","floor","flow3","fltarr","flush","format_axis_values","forward_function","free_lun","fstat","fulstr","funct","function","fv_test","fx_root","fz_roots","gamma","gamma_ct","gauss_cvf","gauss_pdf","gauss_smooth","gauss2dfit","gaussfit","gaussian_function","gaussint","get_drive_list","get_dxf_objects","get_kbrd","get_login_info","get_lun","get_screen_size","getenv","getwindows","greg2jul","grib","grid_input","grid_tps","grid3","griddata","gs_iter","h_eq_ct","h_eq_int","hanning","hash","hdf","hdf5","heap_free","heap_gc","heap_nosave","heap_refcount","heap_save","help","hilbert","hist_2d","hist_equal","histogram","hls","hough","hqr","hsv","i18n_multibytetoutf8","i18n_multibytetowidechar","i18n_utf8tomultibyte","i18n_widechartomultibyte","ibeta","icontour","iconvertcoord","idelete","identity","idl_base64","idl_container","idl_validname","idlexbr_assistant","idlitsys_createtool","idlunit","iellipse","igamma","igetcurrent","igetdata","igetid","igetproperty","iimage","image","image_cont","image_statistics","image_threshold","imaginary","imap","indgen","int_2d","int_3d","int_tabulated","intarr","interpol","interpolate","interval_volume","invert","ioctl","iopen","ir_filter","iplot","ipolygon","ipolyline","iputdata","iregister","ireset","iresolve","irotate","isa","isave","iscale","isetcurrent","isetproperty","ishft","isocontour","isosurface","isurface","itext","itranslate","ivector","ivolume","izoom","journal","json_parse","json_serialize","jul2greg","julday","keyword_set","krig2d","kurtosis","kw_test","l64indgen","la_choldc","la_cholmprove","la_cholsol","la_determ","la_eigenproblem","la_eigenql","la_eigenvec","la_elmhes","la_gm_linear_model","la_hqr","la_invert","la_least_square_equality","la_least_squares","la_linear_equation","la_ludc","la_lumprove","la_lusol","la_svd","la_tridc","la_trimprove","la_triql","la_trired","la_trisol","label_date","label_region","ladfit","laguerre","lambda","lambdap","lambertw","laplacian","least_squares_filter","leefilt","legend","legendre","linbcg","lindgen","linfit","linkimage","list","ll_arc_distance","lmfit","lmgr","lngamma","lnp_test","loadct","locale_get","logical_and","logical_or","logical_true","lon64arr","lonarr","long","long64","lsode","lu_complex","ludc","lumprove","lusol","m_correlate","machar","make_array","make_dll","make_rt","map","mapcontinents","mapgrid","map_2points","map_continents","map_grid","map_image","map_patch","map_proj_forward","map_proj_image","map_proj_info","map_proj_init","map_proj_inverse","map_set","matrix_multiply","matrix_power","max","md_test","mean","meanabsdev","mean_filter","median","memory","mesh_clip","mesh_decimate","mesh_issolid","mesh_merge","mesh_numtriangles","mesh_obj","mesh_smooth","mesh_surfacearea","mesh_validate","mesh_volume","message","min","min_curve_surf","mk_html_help","modifyct","moment","morph_close","morph_distance","morph_gradient","morph_hitormiss","morph_open","morph_thin","morph_tophat","multi","n_elements","n_params","n_tags","ncdf","newton","noise_hurl","noise_pick","noise_scatter","noise_slur","norm","obj_class","obj_destroy","obj_hasmethod","obj_isa","obj_new","obj_valid","objarr","on_error","on_ioerror","online_help","openr","openu","openw","oplot","oploterr","orderedhash","p_correlate","parse_url","particle_trace","path_cache","path_sep","pcomp","plot","plot3d","plot","plot_3dbox","plot_field","ploterr","plots","polar_contour","polar_surface","polyfill","polyshade","pnt_line","point_lun","polarplot","poly","poly_2d","poly_area","poly_fit","polyfillv","polygon","polyline","polywarp","popd","powell","pref_commit","pref_get","pref_set","prewitt","primes","print","printf","printd","pro","product","profile","profiler","profiles","project_vol","ps_show_fonts","psafm","pseudo","ptr_free","ptr_new","ptr_valid","ptrarr","pushd","qgrid3","qhull","qromb","qromo","qsimp","query_*","query_ascii","query_bmp","query_csv","query_dicom","query_gif","query_image","query_jpeg","query_jpeg2000","query_mrsid","query_pict","query_png","query_ppm","query_srf","query_tiff","query_video","query_wav","r_correlate","r_test","radon","randomn","randomu","ranks","rdpix","read","readf","read_ascii","read_binary","read_bmp","read_csv","read_dicom","read_gif","read_image","read_interfile","read_jpeg","read_jpeg2000","read_mrsid","read_pict","read_png","read_ppm","read_spr","read_srf","read_sylk","read_tiff","read_video","read_wav","read_wave","read_x11_bitmap","read_xwd","reads","readu","real_part","rebin","recall_commands","recon3","reduce_colors","reform","region_grow","register_cursor","regress","replicate","replicate_inplace","resolve_all","resolve_routine","restore","retall","return","reverse","rk4","roberts","rot","rotate","round","routine_filepath","routine_info","rs_test","s_test","save","savgol","scale3","scale3d","scatterplot","scatterplot3d","scope_level","scope_traceback","scope_varfetch","scope_varname","search2d","search3d","sem_create","sem_delete","sem_lock","sem_release","set_plot","set_shading","setenv","sfit","shade_surf","shade_surf_irr","shade_volume","shift","shift_diff","shmdebug","shmmap","shmunmap","shmvar","show3","showfont","signum","simplex","sin","sindgen","sinh","size","skewness","skip_lun","slicer3","slide_image","smooth","sobel","socket","sort","spawn","sph_4pnt","sph_scat","spher_harm","spl_init","spl_interp","spline","spline_p","sprsab","sprsax","sprsin","sprstp","sqrt","standardize","stddev","stop","strarr","strcmp","strcompress","streamline","streamline","stregex","stretch","string","strjoin","strlen","strlowcase","strmatch","strmessage","strmid","strpos","strput","strsplit","strtrim","struct_assign","struct_hide","strupcase","surface","surface","surfr","svdc","svdfit","svsol","swap_endian","swap_endian_inplace","symbol","systime","t_cvf","t_pdf","t3d","tag_names","tan","tanh","tek_color","temporary","terminal_size","tetra_clip","tetra_surface","tetra_volume","text","thin","thread","threed","tic","time_test2","timegen","timer","timestamp","timestamptovalues","tm_test","toc","total","trace","transpose","tri_surf","triangulate","trigrid","triql","trired","trisol","truncate_lun","ts_coef","ts_diff","ts_fcast","ts_smooth","tv","tvcrs","tvlct","tvrd","tvscl","typename","uindgen","uint","uintarr","ul64indgen","ulindgen","ulon64arr","ulonarr","ulong","ulong64","uniq","unsharp_mask","usersym","value_locate","variance","vector","vector_field","vel","velovect","vert_t3d","voigt","volume","voronoi","voxel_proj","wait","warp_tri","watershed","wdelete","wf_draw","where","widget_base","widget_button","widget_combobox","widget_control","widget_displaycontextmenu","widget_draw","widget_droplist","widget_event","widget_info","widget_label","widget_list","widget_propertysheet","widget_slider","widget_tab","widget_table","widget_text","widget_tree","widget_tree_move","widget_window","wiener_filter","window","window","write_bmp","write_csv","write_gif","write_image","write_jpeg","write_jpeg2000","write_nrif","write_pict","write_png","write_ppm","write_spr","write_srf","write_sylk","write_tiff","write_video","write_wav","write_wave","writeu","wset","wshow","wtn","wv_applet","wv_cwt","wv_cw_wavelet","wv_denoise","wv_dwt","wv_fn_coiflet","wv_fn_daubechies","wv_fn_gaussian","wv_fn_haar","wv_fn_morlet","wv_fn_paul","wv_fn_symlet","wv_import_data","wv_import_wavelet","wv_plot3d_wps","wv_plot_multires","wv_pwt","wv_tool_denoise","xbm_edit","xdisplayfile","xdxf","xfont","xinteranimate","xloadct","xmanager","xmng_tmpl","xmtool","xobjview","xobjview_rotate","xobjview_write_image","xpalette","xpcolor","xplot3d","xregistered","xroi","xsq_test","xsurface","xvaredit","xvolume","xvolume_rotate","xvolume_write_image","xyouts","zlib_compress","zlib_uncompress","zoom","zoom_24"],i=t(r),o=["begin","end","endcase","endfor","endwhile","endif","endrep","endforeach","break","case","continue","for","foreach","goto","if","then","else","repeat","until","switch","while","do","pro","function"],a=t(o);e.registerHelper("hintWords","idl",r.concat(o));var s=new RegExp("^[_a-z¡-￿][_a-z0-9¡-￿]*","i"),l=/[+\-*&=<>\/@#~$]/,c=new RegExp("(and|or|eq|lt|le|gt|ge|ne|not)","i");e.defineMode("idl",function(){return{token:function(e){return n(e)}}}),e.defineMIME("text/x-idl","idl")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(n,r){function i(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function o(e,t,n){return Ce=e,Ee=n,t}function a(e,n){var r=e.next();if('"'==r||"'"==r)return n.tokenize=s(r),n.tokenize(e,n);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(n.tokenize=l,l(e,n)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,n,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Re),o("operator","operator",e.current()));if("`"==r)return n.tokenize=c,c(e,n);if("#"==r)return e.skipToEnd(),o("error","error");if(Re.test(r))return">"==r&&n.lexical&&">"==n.lexical.type||e.eatWhile(Re),o("operator","operator",e.current());if(Oe.test(r)){e.eatWhile(Oe);var a=e.current(),u=ze.propertyIsEnumerable(a)&&ze[a];return u&&"."!=n.lastType?o(u.type,u.style,a):o("variable","variable",a)}}function s(e){return function(t,n){var r,i=!1;if(Ae&&"@"==t.peek()&&t.match(Ne))return n.tokenize=a,o("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=a),o("string","string")}}function l(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=a;break}r="*"==n}return o("comment","comment")}function c(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=a;break}r=!r&&"\\"==n}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(Ie){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=Pe.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(Oe.test(s))o=!0;else{if(/["'\/]/.test(s))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function d(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function p(e,t,n,r,i){var o=e.cc;for(qe.state=e,qe.stream=i,qe.marked=null,qe.cc=o,qe.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():Le?_:w;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return qe.marked?qe.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)qe.cc.push(arguments[e])}function h(){return m.apply(null,arguments),!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;
return!1}var n=qe.state;if(qe.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function v(){qe.state.context={prev:qe.state.context,vars:qe.state.localVars},qe.state.localVars=$e}function b(){qe.state.localVars=qe.state.context.vars,qe.state.context=qe.state.context.prev}function y(e,t){var n=function(){var n=qe.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new d(r,qe.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function x(){var e=qe.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function k(e){function t(n){return n==e?h():";"==e?m():h(t)}return t}function w(e,t){return"var"==e?h(y("vardef",t.length),J,k(";"),x):"keyword a"==e?h(y("form"),C,w,x):"keyword b"==e?h(y("form"),w,x):"{"==e?h(y("}"),H,x):";"==e?h():"if"==e?("else"==qe.state.lexical.info&&qe.state.cc[qe.state.cc.length-1]==x&&qe.state.cc.pop()(),h(y("form"),C,w,x,re)):"function"==e?h(ce):"for"==e?h(y("form"),ie,w,x):"variable"==e?h(y("stat"),q):"switch"==e?h(y("form"),C,y("}","switch"),k("{"),H,x,x):"case"==e?h(_,k(":")):"default"==e?h(k(":")):"catch"==e?h(y("form"),v,k("("),ue,k(")"),w,x,b):"class"==e?h(y("form"),fe,x):"export"==e?h(y("stat"),ge,x):"import"==e?h(y("stat"),be,x):"module"==e?h(y("form"),Q,y("}"),k("{"),H,x,x):"type"==e?h(V,k("operator"),V,k(";")):"async"==e?h(w):m(y("stat"),_,k(";"),x)}function _(e){return E(e,!1)}function S(e){return E(e,!0)}function C(e){return"("!=e?m():h(y(")"),_,k(")"),x)}function E(e,t){if(qe.state.fatArrowAt==qe.stream.start){var n=t?R:z;if("("==e)return h(v,y(")"),U(Q,")"),x,k("=>"),n,b);if("variable"==e)return m(v,Q,k("=>"),n,b)}var r=t?L:A;return De.hasOwnProperty(e)?h(r):"function"==e?h(ce,r):"class"==e?h(y("form"),de,x):"keyword c"==e||"async"==e?h(t?M:T):"("==e?h(y(")"),T,k(")"),x,r):"operator"==e||"spread"==e?h(t?S:_):"["==e?h(y("]"),_e,x,r):"{"==e?B(j,"}",null,r):"quasi"==e?m(I,r):"new"==e?h(N(t)):h()}function T(e){return e.match(/[;\}\)\],]/)?m():m(_)}function M(e){return e.match(/[;\}\)\],]/)?m():m(S)}function A(e,t){return","==e?h(_):L(e,t,!1)}function L(e,t,n){var r=0==n?A:L,i=0==n?_:S;return"=>"==e?h(v,n?R:z,b):"operator"==e?/\+\+|--/.test(t)?h(r):"?"==t?h(_,k(":"),i):h(i):"quasi"==e?m(I,r):";"!=e?"("==e?B(S,")","call",r):"."==e?h($,r):"["==e?h(y("]"),T,k("]"),x,r):void 0:void 0}function I(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?h(I):h(_,O)}function O(e){if("}"==e)return qe.marked="string-2",qe.state.tokenize=c,h(I)}function z(e){return u(qe.stream,qe.state),m("{"==e?w:_)}function R(e){return u(qe.stream,qe.state),m("{"==e?w:S)}function N(e){return function(t){return"."==t?h(e?D:P):m(e?S:_)}}function P(e,t){if("target"==t)return qe.marked="keyword",h(A)}function D(e,t){if("target"==t)return qe.marked="keyword",h(L)}function q(e){return":"==e?h(x,w):m(A,k(";"),x)}function $(e){if("variable"==e)return qe.marked="property",h()}function j(e,t){return"async"==e?(qe.marked="property",h(j)):"variable"==e||"keyword"==qe.style?(qe.marked="property",h("get"==t||"set"==t?F:W)):"number"==e||"string"==e?(qe.marked=Ae?"property":qe.style+" property",h(W)):"jsonld-keyword"==e?h(W):"modifier"==e?h(j):"["==e?h(_,k("]"),W):"spread"==e?h(_):":"==e?m(W):void 0}function F(e){return"variable"!=e?m(W):(qe.marked="property",h(ce))}function W(e){return":"==e?h(S):"("==e?m(ce):void 0}function U(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=qe.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),h(function(n,r){return n==t||r==t?m():m(e)},r)}return i==t||o==t?h():h(k(t))}return function(n,i){return n==t||i==t?h():m(e,r)}}function B(e,t,n){for(var r=3;r"==e)return h(V)}function Z(e,t){return"variable"==e||"keyword"==qe.style?(qe.marked="property",h(Z)):"?"==t?h(Z):":"==e?h(V):void 0}function X(e){return"variable"==e?h(X):":"==e?h(V):void 0}function Y(e,t){return"<"==t?h(y(">"),U(V,">"),x,Y):"|"==t||"."==e?h(V):"["==e?h(k("]"),Y):void 0}function J(){return m(Q,G,te,ne)}function Q(e,t){return"modifier"==e?h(Q):"variable"==e?(g(t),h()):"spread"==e?h(Q):"["==e?B(Q,"]"):"{"==e?B(ee,"}"):void 0}function ee(e,t){return"variable"!=e||qe.stream.match(/^\s*:/,!1)?("variable"==e&&(qe.marked="property"),"spread"==e?h(Q):"}"==e?m():h(k(":"),Q,te)):(g(t),h(te))}function te(e,t){if("="==t)return h(S)}function ne(e){if(","==e)return h(J)}function re(e,t){if("keyword b"==e&&"else"==t)return h(y("form","else"),w,x)}function ie(e){if("("==e)return h(y(")"),oe,k(")"),x)}function oe(e){return"var"==e?h(J,k(";"),se):";"==e?h(se):"variable"==e?h(ae):m(_,k(";"),se)}function ae(e,t){return"in"==t||"of"==t?(qe.marked="keyword",h(_)):h(A,se)}function se(e,t){return";"==e?h(le):"in"==t||"of"==t?(qe.marked="keyword",h(_)):m(_,k(";"),le)}function le(e){")"!=e&&h(_)}function ce(e,t){return"*"==t?(qe.marked="keyword",h(ce)):"variable"==e?(g(t),h(ce)):"("==e?h(v,y(")"),U(ue,")"),x,G,w,b):void 0}function ue(e){return"spread"==e?h(ue):m(Q,G,te)}function de(e,t){return"variable"==e?fe(e,t):pe(e,t)}function fe(e,t){if("variable"==e)return g(t),h(pe)}function pe(e,t){return"<"==t?h(y(">"),U(V,">"),x,pe):"extends"==t||"implements"==t||Ie&&","==e?h(Ie?V:_,pe):"{"==e?h(y("}"),me,x):void 0}function me(e,t){return"variable"==e||"keyword"==qe.style?("async"==t||"static"==t||"get"==t||"set"==t||Ie&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&qe.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(qe.marked="keyword",h(me)):(qe.marked="property",h(Ie?he:ce,me)):"["==e?h(_,k("]"),Ie?he:ce,me):"*"==t?(qe.marked="keyword",h(me)):";"==e?h(me):"}"==e?h():void 0}function he(e,t){return"?"==t?h(he):":"==e?h(V,te):m(ce)}function ge(e,t){return"*"==t?(qe.marked="keyword",h(we,k(";"))):"default"==t?(qe.marked="keyword",h(_,k(";"))):"{"==e?h(U(ve,"}"),we,k(";")):m(w)}function ve(e,t){return"as"==t?(qe.marked="keyword",h(k("variable"))):"variable"==e?m(S,ve):void 0}function be(e){return"string"==e?h():m(ye,xe,we)}function ye(e,t){return"{"==e?B(ye,"}"):("variable"==e&&g(t),"*"==t&&(qe.marked="keyword"),h(ke))}function xe(e){if(","==e)return h(ye,xe)}function ke(e,t){if("as"==t)return qe.marked="keyword",h(ye)}function we(e,t){if("from"==t)return qe.marked="keyword",h(_)}function _e(e){return"]"==e?h():m(U(S,"]"))}function Se(e,t){return"operator"==e.lastType||","==e.lastType||Re.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Ce,Ee,Te=n.indentUnit,Me=r.statementIndent,Ae=r.jsonld,Le=r.json||Ae,Ie=r.typescript,Oe=r.wordCharacters||/[\w$\xa1-\uffff]/,ze=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:e("new"),delete:r,throw:r,debugger:r,var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r,async:e("async")};if(Ie){var s={type:"variable",style:"variable-3"},l={interface:e("class"),implements:r,namespace:r,module:e("module"),enum:e("module"),type:e("type"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),as:i,string:s,number:s,boolean:s,any:s};for(var c in l)a[c]=l[c]}return a}(),Re=/[+\-*&%=<>!?|~^]/,Ne=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Pe="([{}])",De={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},qe={state:null,column:null,marked:null,cc:null},$e={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-Te,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==Ce?n:(t.lastType="operator"!=Ce||"++"!=Ee&&"--"!=Ee?Ce:"incdec",p(t,n,Ce,Ee,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=a)return 0;var i,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==x)s=s.prev;else if(u!=re)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==A||i==L)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Me&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,f=o==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==o?s.indented:"form"==d?s.indented+Te:"stat"==d?s.indented+(Se(t,n)?Me||Te:0):"switch"!=s.info||f||0==r.doubleIndentSwitch?s.align?s.column+(f?0:1):s.indented+(f?0:Te):s.indented+(/^(?:case|default)\b/.test(n)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Le?null:"/*",blockCommentEnd:Le?null:"*/",lineComment:Le?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Le?"json":"javascript",jsonldMode:Ae,jsonMode:Le,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=_&&t!=S||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("jinja2",function(){function e(e,a){var s=e.peek();if(a.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,e.match(i))return"atom";if(e.match(o))return"number"}if(a.sign){if(a.sign=!1,e.match(i))return"atom";if(e.match(o))return"number"}if(a.instring)return s==a.instring&&(a.instring=!1),e.next(),"string";if("'"==s||'"'==s)return a.instring=s,e.next(),"string";if(e.match(a.intag+"}")||e.eat("-")&&e.match(a.intag+"}"))return a.intag=!1,"tag";if(e.match(n))return a.operator=!0,"operator";if(e.match(r))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(t))return"keyword";if(e.match(i))return"atom";if(e.match(o))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(s=e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(s=e.eat(/\{|%/))return a.intag=s,"{"==s&&(a.intag="}"),e.eat("-"),"tag"}e.next()}var t=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","plural"],n=/^[+\-*&%=<>!?|~^]/,r=/^[:\[\(\{]/,i=["true","false"],o=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return t=new RegExp("(("+t.join(")|(")+"))\\b"),i=new RegExp("(("+i.join(")|(")+"))\\b"),{startState:function(){return{tokenize:e}},token:function(e,t){return t.tokenize(e,t)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("julia",function(e,t){function n(e,t){return"undefined"==typeof t&&(t="\\b"),new RegExp("^(("+e.join(")|(")+"))"+t)}function r(e){return i(e,"[")}function i(e,t){var n=o(e),r=o(e,1);return"undefined"==typeof t&&(t="("),n===t||r===t&&"for"===n}function o(e,t){return"undefined"==typeof t&&(t=0),e.scopes.length<=t?null:e.scopes[e.scopes.length-(t+1)]}function a(e,t){if(e.match(/^#=/,!1))return t.tokenize=c,t.tokenize(e,t);var n=t.leavingExpr;if(e.sol()&&(n=!1),t.leavingExpr=!1,n&&e.match(/^'+/))return"operator";if(e.match(/^\.{2,3}/))return"operator";if(e.eatSpace())return null;var a=e.peek();if("#"===a)return e.skipToEnd(),"comment";"["===a&&t.scopes.push("["),"("===a&&t.scopes.push("(");var f=o(t);r(t)&&"]"===a&&("for"===f&&t.scopes.pop(),t.scopes.pop(),t.leavingExpr=!0),i(t)&&")"===a&&("for"===f&&t.scopes.pop(),t.scopes.pop(),t.leavingExpr=!0);var p;if((p=e.match(x,!1))&&t.scopes.push(p[0]),e.match(k,!1)&&t.scopes.pop(),r(t)){if("end"==t.lastToken&&e.match(/^:/))return"operator";if(e.match(/^end/))return"number"}if(e.match(/^::(?![:\$])/))return t.tokenize=l,t.tokenize(e,t);if(!n&&e.match(C)||e.match(/:\./))return"builtin";if(e.match(/^{[^}]*}(?=\()/))return"builtin";if(e.match(g))return"operator";if(e.match(/^[0-9\.]/,!1)){var m=RegExp(/^im\b/),h=!1;if(e.match(/^\d*\.(?!\.)\d*([Eef][\+\-]?\d+)?/i)&&(h=!0),e.match(/^\d+\.(?!\.)\d*/)&&(h=!0),e.match(/^\.\d+/)&&(h=!0),e.match(/^0x\.[0-9a-f]+p[\+\-]?\d+/i)&&(h=!0),e.match(/^0x[0-9a-f]+/i)&&(h=!0),e.match(/^0b[01]+/i)&&(h=!0),e.match(/^0o[0-7]+/i)&&(h=!0),e.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(h=!0),e.match(/^0(?![\dx])/i)&&(h=!0),h)return e.match(m),t.leavingExpr=!0,"number"}if(e.match(/^'/))return t.tokenize=u,t.tokenize(e,t);if(e.match(E))return t.tokenize=d(e.current()),t.tokenize(e,t);if(e.match(S))return"meta";if(e.match(v))return null;if(e.match(w))return"keyword";if(e.match(_))return"builtin";var y=t.isDefinition||"function"==t.lastToken||"macro"==t.lastToken||"type"==t.lastToken||"immutable"==t.lastToken;return e.match(b)?y?"."===e.peek()?(t.isDefinition=!0,"variable"):(t.isDefinition=!1,"def"):e.match(/^({[^}]*})*\(/,!1)?s(e,t):(t.leavingExpr=!0,"variable"):(e.next(),"error")}function s(e,t){var n=e.match(/^(\(\s*)/);if(n&&(t.firstParenPos<0&&(t.firstParenPos=t.scopes.length),t.scopes.push("("),t.charsAdvanced+=n[1].length),"("==o(t)&&e.match(/^\)/)&&(t.scopes.pop(),t.charsAdvanced+=1,t.scopes.length<=t.firstParenPos)){var r=e.match(/^\s*?=(?!=)/,!1);return e.backUp(t.charsAdvanced),t.firstParenPos=-1,t.charsAdvanced=0,r?"def":"builtin"}if(e.match(/^$/g,!1)){for(e.backUp(t.charsAdvanced);t.scopes.length>t.firstParenPos;)t.scopes.pop();return t.firstParenPos=-1,t.charsAdvanced=0,"builtin"}return t.charsAdvanced+=e.match(/^([^()]*)/)[1].length,s(e,t)}function l(e,t){return e.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),e.match(/^{/)?t.nestedLevels++:e.match(/^}/)&&t.nestedLevels--,t.nestedLevels>0?e.match(/.*?(?={|})/):0==t.nestedLevels&&(t.tokenize=a),"builtin"}function c(e,t){return e.match(/^#=/)&&t.nestedLevels++,e.match(/.*?(?=(#=|=#))/)||e.skipToEnd(),e.match(/^=#/)&&(t.nestedLevels--,0==t.nestedLevels&&(t.tokenize=a)),"comment"}function u(e,t){var n,r=!1;if(e.match(y))r=!0;else if(n=e.match(/\\u([a-f0-9]{1,4})(?=')/i)){var i=parseInt(n[1],16);(i<=55295||i>=57344)&&(r=!0,e.next())}else if(n=e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var i=parseInt(n[1],16);i<=1114111&&(r=!0,e.next())}return r?(t.leavingExpr=!0,t.tokenize=a,"string"):(e.match(/^[^']+(?=')/)||e.skipToEnd(),e.match(/^'/)&&(t.tokenize=a),"error")}function d(e){function t(t,n){if(t.eat("\\"))t.next();else{if(t.match(e))return n.tokenize=a,n.leavingExpr=!0,"string";t.eat(/[`"]/)}return t.eatWhile(/[^\\`"]/),"string"}return e="`"===e||'"""'===e?e:'"',t}var f="\\\\[0-7]{1,3}",p="\\\\x[A-Fa-f0-9]{1,2}",m="\\\\[abefnrtv0%?'\"\\\\]",h="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",g=t.operators||n(["\\.?[\\\\%*+\\-<>!=\\/^]=?","\\.?[|&\\u00F7\\u2260\\u2264\\u2265]","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2229","\\u222A","\\u2286","\\u2288","\\u228A","\\u22c5","\\?","~",":","\\$","\\.[<>]","<<=?",">>>?=?","\\.[<>=]=","->?","\\/\\/","=>","<:","\\bin\\b(?!\\()"],""),v=t.delimiters||/^[;,()[\]{}]/,b=t.identifiers||/^[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,y=n([f,p,m,h],"'"),x=n(["begin","function","type","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),k=n(["end","else","elseif","catch","finally"]),w=n(["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","macro","module","baremodule","type","immutable","quote","typealias","abstract","bitstype"]),_=n(["true","false","nothing","NaN","Inf"]),S=/^@[_A-Za-z][\w]*/,C=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,E=/^(`|"{3}|([_A-Za-z\u00A1-\uFFFF]*"))/,T={startState:function(){return{tokenize:a,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedLevels:0,charsAdvanced:0,firstParenPos:-1}},token:function(e,t){var n=t.tokenize(e,t),r=e.current();return r&&n&&(t.lastToken=r),"."===r&&(n=e.match(b,!1)||e.match(S,!1)||e.match(/\(/,!1)?"operator":"error"),n},indent:function(t,n){var r=0;return"]"!==n&&")"!==n&&"end"!==n&&"else"!==n&&"catch"!==n&&"elseif"!==n&&"finally"!==n||(r=-1),(t.scopes.length+r)*e.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",fold:"indent"};return T}),e.defineMIME("text/x-julia","julia")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("livescript",function(){var e=function(e,t){var n=t.next||"start";if(n){t.next=t.next;var r=o[n];if(r.splice){for(var i=0;i|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+t+")?))\\s*$"),r="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",i={token:"string",regex:".+"},o={start:[{token:"comment.doc",regex:"/\\*",next:"comment"},{token:"comment",regex:"#.*"},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)"+r},{token:"constant.language",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+r},{token:"invalid.illegal",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+r},{token:"language.support.class",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+r},{token:"language.support.function",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+r},{token:"variable.language",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+r},{token:"identifier",regex:t+"\\s*:(?![:=])"},{token:"variable",regex:t},{token:"keyword.operator",regex:"(?:\\.{3}|\\s+\\?)"},{token:"keyword.variable",regex:"(?:@+|::|\\.\\.)",next:"key"},{token:"keyword.operator",regex:"\\.\\s*",next:"key"},{token:"string",regex:"\\\\\\S[^\\s,;)}\\]]*"},{token:"string.doc",regex:"'''",next:"qdoc"},{token:"string.doc",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string",regex:"<\\[",next:"words"},{token:"string.regex",regex:"//",next:"heregex"},{token:"string.regex",regex:"\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",next:"key"},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"},{token:"lparen",regex:"[({[]"},{token:"rparen",regex:"[)}\\]]",next:"key"},{token:"keyword.operator",regex:"\\S+"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?//[gimy$?]{0,4}",next:"start"},{token:"string.regex",regex:"\\s*#{"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],key:[{token:"keyword.operator",regex:"[.?@!]+"},{token:"identifier",regex:t,next:"start"},{token:"text",regex:"",next:"start"}],comment:[{token:"comment.doc",regex:".*?\\*/",next:"start"},{token:"comment.doc",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},i],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},i],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},i],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},i],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},i],words:[{token:"string",regex:".*?\\]>",next:"key"},i]};for(var a in o){var s=o[a];if(s.splice)for(var l=0,c=s.length;l~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)?"variable-2":e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variable-2":e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)?"variable-2":e.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variable-2":e.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)?"variable-3":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)?"variable-2":e.match(f,!0,!1)?"keyword":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(e.next(),"error"))}function r(e,t){for(var r,i=!1,o=!1;null!=(r=e.next());){if('"'===r&&!o){i=!0;break}o=!o&&"\\"===r}return i&&!o&&(t.tokenize=n),"string"}function i(e,t){for(var r,i;t.commentLevel>0&&null!=(i=e.next());)"("===r&&"*"===i&&t.commentLevel++,"*"===r&&")"===i&&t.commentLevel--,r=i;return t.commentLevel<=0&&(t.tokenize=n),"comment"}var o="[a-zA-Z\\$][a-zA-Z0-9\\$]*",a="(?:\\d+)",s="(?:\\.\\d+|\\d+\\.\\d*|\\d+)",l="(?:\\.\\w+|\\w+\\.\\w*|\\w+)",c="(?:`(?:`?"+s+")?)",u=new RegExp("(?:"+a+"(?:\\^\\^"+l+c+"?(?:\\*\\^[+-]?\\d+)?))"),d=new RegExp("(?:"+s+c+"?(?:\\*\\^[+-]?\\d+)?)"),f=new RegExp("(?:`?)(?:"+o+")(?:`(?:"+o+"))*(?:`?)");return{startState:function(){return{tokenize:n,commentLevel:0}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"(*",blockCommentEnd:"*)"}}),e.defineMIME("text/x-mathematica",{name:"mathematica"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return"Subject"===e?"header":"string"}function n(e,n){if(e.sol()){if(n.inSeparator=!1,n.inHeader&&e.match(o))return null;if(n.inHeader=!1,n.header=null,e.match(a))return n.inHeaders=!0,n.inSeparator=!0,"atom";var r,i=!1;return(r=e.match(l))||(i=!0)&&(r=e.match(s))?(n.inHeaders=!0,n.inHeader=!0,n.emailPermitted=i,n.header=r[1],"atom"):n.inHeaders&&(r=e.match(c))?(n.inHeader=!0,n.emailPermitted=!0,n.header=r[1],"atom"):(n.inHeaders=!1,e.skipToEnd(),null)}if(n.inSeparator)return e.match(u)?"link":e.match(d)?"atom":(e.skipToEnd(),"atom");if(n.inHeader){var m=t(n.header);if(n.emailPermitted){if(e.match(f))return m+" link";if(e.match(p))return m}return e.skipToEnd(),m}return e.skipToEnd(),null}var r=["From","Sender","Reply-To","To","Cc","Bcc","Message-ID","In-Reply-To","References","Resent-From","Resent-Sender","Resent-To","Resent-Cc","Resent-Bcc","Resent-Message-ID","Return-Path","Received"],i=["Date","Subject","Comments","Keywords","Resent-Date"];e.registerHelper("hintWords","mbox",r.concat(i));var o=/^[ \t]/,a=/^From /,s=new RegExp("^("+r.join("|")+"): "),l=new RegExp("^("+i.join("|")+"): "),c=/^[^:]+:/,u=/^[^ ]+@[^ ]+/,d=/^.*?(?=[^ ]+?@[^ ]+)/,f=/^<.*?>/,p=/^.*?(?=<.*>)/;e.defineMode("mbox",function(){return{startState:function(){return{inSeparator:!1,inHeader:!1,emailPermitted:!1,header:null,inHeaders:!1}},token:n,blankLine:function(e){e.inHeaders=e.inSeparator=e.inHeader=!1}}}),e.defineMIME("application/mbox","mbox")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMIME("text/mirc","mirc"),e.defineMode("mirc",function(){function e(e){for(var t={},n=e.split(" "),r=0;r!?^\/\|]/;
return{startState:function(){return{tokenize:n,beforeParams:!1,inParams:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("mllike",function(e,t){function n(e,n){var a=e.next();if('"'===a)return n.tokenize=r,n.tokenize(e,n);if("("===a&&e.eat("*"))return n.commentLevel++,n.tokenize=i,n.tokenize(e,n);if("~"===a)return e.eatWhile(/\w/),"variable-2";if("`"===a)return e.eatWhile(/\w/),"quote";if("/"===a&&t.slashComments&&e.eat("/"))return e.skipToEnd(),"comment";if(/\d/.test(a))return e.eatWhile(/[\d]/),e.eat(".")&&e.eatWhile(/[\d]/),"number";if(/[+\-*&%=<>!?|]/.test(a))return"operator";if(/[\w\xa1-\uffff]/.test(a)){e.eatWhile(/[\w\xa1-\uffff]/);var s=e.current();return o.hasOwnProperty(s)?o[s]:"variable"}return null}function r(e,t){for(var r,i=!1,o=!1;null!=(r=e.next());){if('"'===r&&!o){i=!0;break}o=!o&&"\\"===r}return i&&!o&&(t.tokenize=n),"string"}function i(e,t){for(var r,i;t.commentLevel>0&&null!=(i=e.next());)"("===r&&"*"===i&&t.commentLevel++,"*"===r&&")"===i&&t.commentLevel--,r=i;return t.commentLevel<=0&&(t.tokenize=n),"comment"}var o={let:"keyword",rec:"keyword",in:"keyword",of:"keyword",and:"keyword",if:"keyword",then:"keyword",else:"keyword",for:"keyword",to:"keyword",while:"keyword",do:"keyword",done:"keyword",fun:"keyword",function:"keyword",val:"keyword",type:"keyword",mutable:"keyword",match:"keyword",with:"keyword",try:"keyword",open:"builtin",ignore:"builtin",begin:"keyword",end:"keyword"},a=t.extraWords||{};for(var s in a)a.hasOwnProperty(s)&&(o[s]=t.extraWords[s]);return{startState:function(){return{tokenize:n,commentLevel:0}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:t.slashComments?"//":null}}),e.defineMIME("text/x-ocaml",{name:"mllike",extraWords:{succ:"keyword",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",true:"atom",false:"atom",raise:"keyword"}}),e.defineMIME("text/x-fsharp",{name:"mllike",extraWords:{abstract:"keyword",as:"keyword",assert:"keyword",base:"keyword",class:"keyword",default:"keyword",delegate:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",exception:"keyword",extern:"keyword",finally:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",member:"keyword",module:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword",return:"keyword","return!":"keyword",select:"keyword",static:"keyword",struct:"keyword",upcast:"keyword",use:"keyword","use!":"keyword",val:"keyword",when:"keyword",yield:"keyword","yield!":"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",int:"builtin",string:"builtin",raise:"builtin",failwith:"builtin",not:"builtin",true:"builtin",false:"builtin"},slashComments:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r0&&t.level--:t.level++,t.tokenize=null,t.sol=!1,u.propertyIsEnumerable(n)?"keyword":d.propertyIsEnumerable(n)?"builtin":f.propertyIsEnumerable(n)?"atom":"variable"}function s(e,t){for(;e.eat(/[^']/););return t.tokenize=null,t.sol=!1,e.eat("'")?"variable":"error"}function l(e,t){return e.eatWhile(h),e.eat(".")&&e.eatWhile(h),(e.eat("e")||e.eat("E"))&&(e.eat("-")||e.eat("+"),e.eatWhile(h)),t.tokenize=null,t.sol=!1,"number"}var c=t.indentUnit,u=n.keywords||{},d=n.builtin||{},f=n.atoms||{},p=/[;=\(:\),{}.*<>+\-\/^\[\]]/,m=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,h=/[0-9]/,g=/[_a-zA-Z]/;return{startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(e,t){if(null!=t.tokenize)return t.tokenize(e,t);if(e.sol()&&(t.sol=!0),e.eatSpace())return t.tokenize=null,null;var n=e.next();if("/"==n&&e.eat("/"))t.tokenize=r;else if("/"==n&&e.eat("*"))t.tokenize=i;else{if(m.test(n+e.peek()))return e.next(),t.tokenize=null,"operator";if(p.test(n))return t.tokenize=null,"operator";if(g.test(n))t.tokenize=a;else if("'"==n&&e.peek()&&"'"!=e.peek())t.tokenize=s;else if('"'==n)t.tokenize=o;else{if(!h.test(n))return t.tokenize=null,"error";t.tokenize=l}}return t.tokenize(e,t)},indent:function(t,n){if(null!=t.tokenize)return e.Pass;var r=t.level;return/(algorithm)/.test(n)&&r--,/(equation)/.test(n)&&r--,/(initial algorithm)/.test(n)&&r--,/(initial equation)/.test(n)&&r--,/(end)/.test(n)&&r--,r>0?c*r:0},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}});var r="algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within",i="abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh",o="Real Boolean Integer String";n(["text/x-modelica"],{name:"modelica",keywords:t(r),builtin:t(i),atoms:t(o)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("\\b("+e.join("|")+")\\b","i")}function n(e){return new RegExp("("+e.join("|")+")","i")}function r(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}}function i(e){return{inComment:e.inComment,inString:e.inString,inAttributeList:e.inAttributeList,inScript:e.inScript}}function o(e){return function(r,i){if(r.match(n(e.brackets),!0,!0))return"bracket";if(!i.inComment){if(r.match(/\/\*[^\*\/]*/,!0,!0))return i.inComment=!0,"comment";if(r.match(n(e.singlecomment),!0,!0))return r.skipToEnd(),"comment"}if(i.inComment)return r.match(/[^\*\/]*\*\//,!0,!0)?i.inComment=!1:r.skipToEnd(),"comment";if(!i.inString&&r.match(/\"(\\\"|[^\"])*/,!0,!0))return i.inString=!0,"string";if(i.inString)return r.match(/[^\"]*\"/,!0,!0)?i.inString=!1:r.skipToEnd(),"string";if(e.keywords&&r.match(t(e.keywords),!0,!0))return"keyword";if(r.match(t(e.options),!0,!0))return"keyword";if(r.match(t(e.arcsWords),!0,!0))return"keyword";if(r.match(n(e.arcsOthers),!0,!0))return"keyword";if(e.operators&&r.match(n(e.operators),!0,!0))return"operator";if(e.constants&&r.match(n(e.constants),!0,!0))return"variable";if(!e.inAttributeList&&e.attributes&&r.match(/\[/,!0,!0))return e.inAttributeList=!0,"bracket";if(e.inAttributeList){if(null!==e.attributes&&r.match(t(e.attributes),!0,!0))return"attribute";if(r.match(/]/,!0,!0))return e.inAttributeList=!1,"bracket"}return r.next(),"base"}}var a={mscgen:{keywords:["msc"],options:["hscale","width","arcgradient","wordwraparcs"],constants:["true","false","on","off"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]},xu:{keywords:["msc","xu"],options:["hscale","width","arcgradient","wordwraparcs","watermark"],constants:["true","false","on","off","auto"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]},msgenny:{keywords:null,options:["hscale","width","arcgradient","wordwraparcs","watermark"],constants:["true","false","on","off","auto"],attributes:null,brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}};e.defineMode("mscgen",function(e,t){var n=a[t&&t.language||"mscgen"];return{startState:r,copyState:i,token:o(n),lineComment:"#",blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-mscgen","mscgen"),e.defineMIME("text/x-xu",{name:"mscgen",language:"xu"}),e.defineMIME("text/x-msgenny",{name:"mscgen",language:"msgenny"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("mumps",function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function t(e,t){e.sol()&&(t.label=!0,t.commandMode=0);var s=e.peek();return" "==s||"\t"==s?(t.label=!1,0==t.commandMode?t.commandMode=1:(t.commandMode<0||2==t.commandMode)&&(t.commandMode=0)):"."!=s&&t.commandMode>0&&(":"==s?t.commandMode=-1:t.commandMode=2),"("!==s&&"\t"!==s||(t.label=!1),";"===s?(e.skipToEnd(),"comment"):e.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":'"'==s?e.skipTo('"')?(e.next(),"string"):(e.skipToEnd(),"error"):e.match(r)||e.match(n)?"operator":e.match(i)?null:o.test(s)?(e.next(),"bracket"):t.commandMode>0&&e.match(u)?"variable-2":e.match(c)?"builtin":e.match(a)?"variable":"$"===s||"^"===s?(e.next(),"builtin"):"@"===s?(e.next(),"string-2"):/[\w%]/.test(s)?(e.eatWhile(/[\w%]/),"variable"):(e.next(),"error")}var n=new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),r=new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),i=new RegExp("^[\\.,:]"),o=new RegExp("[()]"),a=new RegExp("^[%A-Za-z][A-Za-z0-9]*"),s=["break","close","do","else","for","goto","halt","hang","if","job","kill","lock","merge","new","open","quit","read","set","tcommit","trollback","tstart","use","view","write","xecute","b","c","d","e","f","g","h","i","j","k","l","m","n","o","q","r","s","tc","tro","ts","u","v","w","x"],l=["\\$ascii","\\$char","\\$data","\\$ecode","\\$estack","\\$etrap","\\$extract","\\$find","\\$fnumber","\\$get","\\$horolog","\\$io","\\$increment","\\$job","\\$justify","\\$length","\\$name","\\$next","\\$order","\\$piece","\\$qlength","\\$qsubscript","\\$query","\\$quit","\\$random","\\$reverse","\\$select","\\$stack","\\$test","\\$text","\\$translate","\\$view","\\$x","\\$y","\\$a","\\$c","\\$d","\\$e","\\$ec","\\$es","\\$et","\\$f","\\$fn","\\$g","\\$h","\\$i","\\$j","\\$l","\\$n","\\$na","\\$o","\\$p","\\$q","\\$ql","\\$qs","\\$r","\\$re","\\$s","\\$st","\\$t","\\$tr","\\$v","\\$z"],c=e(l),u=e(s);return{startState:function(){return{label:!1,commandMode:0}},token:function(e,n){var r=t(e,n);return n.label?"tag":r}}}),e.defineMIME("text/x-mumps","mumps")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("nginx",function(e){function t(e){for(var t={},n=e.split(" "),r=0;r*\/]/.test(s)?n(null,"select-op"):/[;{}:\[\]]/.test(s)?n(null,s):(e.eatWhile(/[\w\\\-]/),n("variable","variable")):n(null,"compare"):void n(null,"compare")}function i(e,t){for(var i,o=!1;null!=(i=e.next());){if(o&&"/"==i){t.tokenize=r;break}o="*"==i}return n("comment","comment")}function o(e,t){for(var i,o=0;null!=(i=e.next());){if(o>=2&&">"==i){t.tokenize=r;break}o="-"==i?o+1:0}return n("comment","comment")}function a(e){return function(t,i){for(var o,a=!1;null!=(o=t.next())&&(o!=e||a);)a=!a&&"\\"==o;return a||(i.tokenize=r),n("string","string")}}var s,l=t("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),c=t("http mail events server types location upstream charset_map limit_except if geo map"),u=t("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),d=e.indentUnit;return{startState:function(e){return{tokenize:r,baseIndent:e||0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;s=null;var n=t.tokenize(e,t),r=t.stack[t.stack.length-1];return"hash"==s&&"rule"==r?n="atom":"variable"==n&&("rule"==r?n="number":r&&"@media{"!=r||(n="tag")),"rule"==r&&/^[\{\};]$/.test(s)&&t.stack.pop(),"{"==s?"@media"==r?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):"}"==s?t.stack.pop():"@media"==s?t.stack.push("@media"):"{"==r&&"comment"!=s&&t.stack.push("rule"),n},indent:function(e,t){var n=e.stack.length;return/^\}/.test(t)&&(n-="rule"==e.stack[e.stack.length-1]?2:1),e.baseIndent+n*d},electricChars:"}"}}),e.defineMIME("text/x-nginx-conf","nginx")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}(function(e){"use strict";e.defineSimpleMode("nsis",{start:[{regex:/(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/,token:"number"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/`(?:[^\\`]|\\.)*`?/,token:"string"},{regex:/^\s*(?:\!(include|addincludedir|addplugindir|appendfile|cd|delfile|echo|error|execute|packhdr|finalize|getdllversion|system|tempfile|warning|verbose|define|undef|insertmacro|makensis|searchparse|searchreplace))\b/,token:"keyword"},{regex:/^\s*(?:\!(if(?:n?def)?|ifmacron?def|macro))\b/,token:"keyword",indent:!0},{regex:/^\s*(?:\!(else|endif|macroend))\b/,token:"keyword",dedent:!0},{regex:/^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetLabelAddress|GetTempFileName|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|IntCmp|IntCmpU|IntFmt|IntOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegStr|WriteUninstaller|XPStyle)\b/,token:"keyword"},{regex:/^\s*(?:Function|PageEx|Section(?:Group)?)\b/,token:"keyword",indent:!0},{regex:/^\s*(?:(Function|PageEx|Section(?:Group)?)End)\b/,token:"keyword",dedent:!0},{regex:/\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/,token:"atom"},{regex:/\b(?:admin|all|auto|both|bottom|bzip2|components|current|custom|directory|force|hide|highest|ifdiff|ifnewer|instfiles|lastused|leave|left|license|listonly|lzma|nevershow|none|normal|notset|right|show|silent|silentlog|textonly|top|try|un\.components|un\.custom|un\.directory|un\.instfiles|un\.license|uninstConfirm|user|Win10|Win7|Win8|WinVista|zlib)\b/,token:"builtin"},{regex:/\$\{(?:And(?:If(?:Not)?|Unless)|Break|Case(?:Else)?|Continue|Default|Do(?:Until|While)?|Else(?:If(?:Not)?|Unless)?|End(?:If|Select|Switch)|Exit(?:Do|For|While)|For(?:Each)?|If(?:Cmd|Not(?:Then)?|Then)?|Loop(?:Until|While)?|Or(?:If(?:Not)?|Unless)|Select|Switch|Unless|While)\}/,token:"variable-2",indent:!0},{regex:/\$\{(?:BannerTrimPath|DirState|DriveSpace|Get(BaseName|Drives|ExeName|ExePath|FileAttributes|FileExt|FileName|FileVersion|Options|OptionsS|Parameters|Parent|Root|Size|Time)|Locate|RefreshShellIcons)\}/,token:"variable-2",dedent:!0},{regex:/\$\{(?:Memento(?:Section(?:Done|End|Restore|Save)?|UnselectedSection))\}/,token:"variable-2",dedent:!0},{regex:/\$\{(?:Config(?:Read|ReadS|Write|WriteS)|File(?:Join|ReadFromEnd|Recode)|Line(?:Find|Read|Sum)|Text(?:Compare|CompareS)|TrimNewLines)\}/,token:"variable-2",dedent:!0},{regex:/\$\{(?:(?:At(?:Least|Most)|Is)(?:ServicePack|Win(?:7|8|10|95|98|200(?:0|3|8(?:R2)?)|ME|NT4|Vista|XP))|Is(?:NT|Server))\}/,token:"variable",dedent:!0},{regex:/\$\{(?:StrFilterS?|Version(?:Compare|Convert)|Word(?:AddS?|Find(?:(?:2|3)X)?S?|InsertS?|ReplaceS?))\}/,token:"variable-2",dedent:!0},{regex:/\$\{(?:RunningX64)\}/,token:"variable",dedent:!0},{regex:/\$\{(?:Disable|Enable)X64FSRedirection\}/,token:"variable-2",dedent:!0},{regex:/(#|;).*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/\$\w+/,token:"variable"},{regex:/\${[\w\.:-]+}/,token:"variable-2"},{regex:/\$\([\w\.:-]+\)/,token:"variable-3"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{electricInput:/^\s*((Function|PageEx|Section|Section(Group)?)End|(\!(endif|macroend))|\$\{(End(If|Unless|While)|Loop(Until)|Next)\})$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:["#",";"]}}),e.defineMIME("text/x-nsis","nsis")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("ntriples",function(){function e(e,n){var r,i=e.location;r=i==t.PRE_SUBJECT&&"<"==n?t.WRITING_SUB_URI:i==t.PRE_SUBJECT&&"_"==n?t.WRITING_BNODE_URI:i==t.PRE_PRED&&"<"==n?t.WRITING_PRED_URI:i==t.PRE_OBJ&&"<"==n?t.WRITING_OBJ_URI:i==t.PRE_OBJ&&"_"==n?t.WRITING_OBJ_BNODE:i==t.PRE_OBJ&&'"'==n?t.WRITING_OBJ_LITERAL:i==t.WRITING_SUB_URI&&">"==n?t.PRE_PRED:i==t.WRITING_BNODE_URI&&" "==n?t.PRE_PRED:i==t.WRITING_PRED_URI&&">"==n?t.PRE_OBJ:i==t.WRITING_OBJ_URI&&">"==n?t.POST_OBJ:i==t.WRITING_OBJ_BNODE&&" "==n?t.POST_OBJ:i==t.WRITING_OBJ_LITERAL&&'"'==n?t.POST_OBJ:i==t.WRITING_LIT_LANG&&" "==n?t.POST_OBJ:i==t.WRITING_LIT_TYPE&&">"==n?t.POST_OBJ:i==t.WRITING_OBJ_LITERAL&&"@"==n?t.WRITING_LIT_LANG:i==t.WRITING_OBJ_LITERAL&&"^"==n?t.WRITING_LIT_TYPE:" "!=n||i!=t.PRE_SUBJECT&&i!=t.PRE_PRED&&i!=t.PRE_OBJ&&i!=t.POST_OBJ?i==t.POST_OBJ&&"."==n?t.PRE_SUBJECT:t.ERROR:i,e.location=r}var t={PRE_SUBJECT:0,WRITING_SUB_URI:1,WRITING_BNODE_URI:2,PRE_PRED:3,WRITING_PRED_URI:4,PRE_OBJ:5,WRITING_OBJ_URI:6,WRITING_OBJ_BNODE:7,WRITING_OBJ_LITERAL:8,WRITING_LIT_LANG:9,WRITING_LIT_TYPE:10,POST_OBJ:11,ERROR:12};return{startState:function(){return{location:t.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(t,n){var r=t.next();if("<"==r){e(n,r);var i="";return t.eatWhile(function(e){return"#"!=e&&">"!=e&&(i+=e,!0)}),n.uris.push(i),t.match("#",!1)?"variable":(t.next(),e(n,">"),"variable")}if("#"==r){var o="";return t.eatWhile(function(e){return">"!=e&&" "!=e&&(o+=e,!0)}),n.anchors.push(o),"variable-2"}if(">"==r)return e(n,">"),"variable";if("_"==r){e(n,r);var a="";return t.eatWhile(function(e){return" "!=e&&(a+=e,!0)}),n.bnodes.push(a),t.next(),e(n," "),"builtin"}if('"'==r)return e(n,r),t.eatWhile(function(e){return'"'!=e}),t.next(),"@"!=t.peek()&&"^"!=t.peek()&&e(n,'"'),"string";if("@"==r){e(n,"@");var s="";return t.eatWhile(function(e){return" "!=e&&(s+=e,!0)}),n.langs.push(s),t.next(),e(n," "),"string-2"}if("^"==r){t.next(),e(n,"^");var l="";return t.eatWhile(function(e){return">"!=e&&(l+=e,!0)}),n.types.push(l),t.next(),e(n,">"),"variable"}" "==r&&e(n,r),"."==r&&e(n,r)}}}),e.defineMIME("text/n-triples","ntriples")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("octave",function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function t(e,t){return e.sol()||"'"!==e.peek()?(t.tokenize=r,r(e,t)):(e.next(),t.tokenize=r,"operator")}function n(e,t){return e.match(/^.*%}/)?(t.tokenize=r,"comment"):(e.skipToEnd(),"comment")}function r(p,m){if(p.eatSpace())return null;if(p.match("%{"))return m.tokenize=n,p.skipToEnd(),"comment";if(p.match(/^[%#]/))return p.skipToEnd(),"comment";if(p.match(/^[0-9\.+-]/,!1)){if(p.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return p.tokenize=r,"number";if(p.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/))return"number";if(p.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}return p.match(e(["nan","NaN","inf","Inf"]))?"number":p.match(/^"([^"]|(""))*"/)?"string":p.match(/^'([^']|(''))*'/)?"string":p.match(f)?"keyword":p.match(d)?"builtin":p.match(u)?"variable":p.match(i)||p.match(a)?"operator":p.match(o)||p.match(s)||p.match(l)?null:p.match(c)?(m.tokenize=t,null):(p.next(),"error")}var i=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),o=new RegExp("^[\\(\\[\\{\\},:=;]"),a=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),s=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),l=new RegExp("^((>>=)|(<<=))"),c=new RegExp("^[\\]\\)]"),u=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*"),d=e(["error","eval","function","abs","acos","atan","asin","cos","cosh","exp","log","prod","sum","log10","max","min","sign","sin","sinh","sqrt","tan","reshape","break","zeros","default","margin","round","ones","rand","syn","ceil","floor","size","clear","zeros","eye","mean","std","cov","det","eig","inv","norm","rank","trace","expm","logm","sqrtm","linspace","plot","title","xlabel","ylabel","legend","text","grid","meshgrid","mesh","num2str","fft","ifft","arrayfun","cellfun","input","fliplr","flipud","ismember"]),f=e(["return","case","switch","else","elseif","end","endif","endfunction","if","otherwise","do","for","while","try","catch","classdef","properties","events","methods","global","persistent","endfor","endwhile","printf","sprintf","disp","until","continue","pkg"]);return{startState:function(){return{tokenize:r}},token:function(e,n){var r=n.tokenize(e,n);return"number"!==r&&"variable"!==r||(n.tokenize=t),r},lineComment:"%",fold:"indent"}}),e.defineMIME("text/x-octave","octave")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("oz",function(e){function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function n(e,t){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match(/(\[])/))return"keyword";if(e.match(d)||e.match(u))return"operator";
if(e.match(m))return"atom";var n=e.match(g);if(n)return t.doInCurrentLine?t.doInCurrentLine=!1:t.currentIndent++,"proc"==n[0]||"fun"==n[0]?t.tokenize=o:"class"==n[0]?t.tokenize=r:"meth"==n[0]&&(t.tokenize=i),"keyword";if(e.match(v)||e.match(h))return"keyword";if(e.match(b))return t.currentIndent--,"keyword";var l=e.next();if('"'==l||"'"==l)return t.tokenize=s(l),t.tokenize(e,t);if(/[~\d]/.test(l)){if("~"==l){if(!/^[0-9]/.test(e.peek()))return null;if("0"==e.next()&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}return"0"==l&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return"%"==l?(e.skipToEnd(),"comment"):"/"==l&&e.eat("*")?(t.tokenize=a,a(e,t)):c.test(l)?"operator":(e.eatWhile(/\w/),"variable")}function r(e,t){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=n,"variable-3")}function i(e,t){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=n,"def")}function o(e,t){return e.eatSpace()?null:!t.hasPassedFirstStage&&e.eat("{")?(t.hasPassedFirstStage=!0,"bracket"):t.hasPassedFirstStage?(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),t.hasPassedFirstStage=!1,t.tokenize=n,"def"):(t.tokenize=n,null)}function a(e,t){for(var r,i=!1;r=e.next();){if("/"==r&&i){t.tokenize=n;break}i="*"==r}return"comment"}function s(e){return function(t,r){for(var i,o=!1,a=!1;null!=(i=t.next());){if(i==e&&!o){a=!0;break}o=!o&&"\\"==i}return!a&&o||(r.tokenize=n),"string"}}function l(){var e=f.concat(p);return new RegExp("[\\[\\]]|("+e.join("|")+")$")}var c=/[\^@!\|<>#~\.\*\-\+\\/,=]/,u=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,d=/(:::)|(\.\.\.)|(=<:)|(>=:)/,f=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],p=["end"],m=t(["true","false","nil","unit"]),h=t(["andthen","at","attr","declare","feat","from","lex","mod","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),g=t(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),v=t(f),b=t(p);return{startState:function(){return{tokenize:n,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,t){return e.sol()&&(t.doInCurrentLine=0),t.tokenize(e,t)},indent:function(t,n){var r=n.replace(/^\s+|\s+$/g,"");return r.match(b)||r.match(v)||r.match(/(\[])/)?e.indentUnit*(t.currentIndent-1):t.currentIndent<0?0:t.currentIndent*e.indentUnit},fold:"indent",electricInput:l(),lineComment:"%",blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-oz","oz")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("pascal",function(){function e(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/;return{startState:function(){return{tokenize:null}},token:function(e,n){if(e.eatSpace())return null;var r=(n.tokenize||t)(e,n);return"comment"==r||"meta"==r?r:r},electricChars:"{}"}}),e.defineMIME("text/x-pascal","pascal")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.string.charAt(e.pos+(t||0))}function n(e,t){if(t){var n=e.pos-t;return e.string.substr(n>=0?n:0,t)}return e.string.substr(0,e.pos-1)}function r(e,t){var n=e.string.length,r=n-e.pos+1;return e.string.substr(e.pos,t&&t=(n=e.string.length-1)?e.pos=n:e.pos=r}e.defineMode("perl",function(){function e(e,t,n,r,i){return t.chain=null,t.style=null,t.tail=null,t.tokenize=function(e,t){for(var o,s=!1,l=0;o=e.next();){if(o===n[l]&&!s)return void 0!==n[++l]?(t.chain=n[l],t.style=r,t.tail=i):i&&e.eatWhile(i),t.tokenize=a,r;s=!s&&"\\"==o}return r},t.tokenize(e,t)}function o(e,t,n){return t.tokenize=function(e,t){return e.string==n&&(t.tokenize=a),e.skipToEnd(),"string"},t.tokenize(e,t)}function a(a,u){if(a.eatSpace())return null;if(u.chain)return e(a,u,u.chain,u.style,u.tail);if(a.match(/^\-?[\d\.]/,!1)&&a.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(a.match(/^<<(?=\w)/))return a.eatWhile(/\w/),o(a,u,a.current().substr(2));if(a.sol()&&a.match(/^\=item(?!\w)/))return o(a,u,"=cut");var d=a.next();if('"'==d||"'"==d){if(n(a,3)=="<<"+d){var f=a.pos;a.eatWhile(/\w/);var p=a.current().substr(1);if(p&&a.eat(d))return o(a,u,p);a.pos=f}return e(a,u,[d],"string")}if("q"==d){var m=t(a,-2);if(!m||!/\w/.test(m))if(m=t(a,0),"x"==m){if(m=t(a,1),"("==m)return i(a,2),e(a,u,[")"],l,c);if("["==m)return i(a,2),e(a,u,["]"],l,c);if("{"==m)return i(a,2),e(a,u,["}"],l,c);if("<"==m)return i(a,2),e(a,u,[">"],l,c);if(/[\^'"!~\/]/.test(m))return i(a,1),e(a,u,[a.eat(m)],l,c)}else if("q"==m){if(m=t(a,1),"("==m)return i(a,2),e(a,u,[")"],"string");if("["==m)return i(a,2),e(a,u,["]"],"string");if("{"==m)return i(a,2),e(a,u,["}"],"string");if("<"==m)return i(a,2),e(a,u,[">"],"string");if(/[\^'"!~\/]/.test(m))return i(a,1),e(a,u,[a.eat(m)],"string")}else if("w"==m){if(m=t(a,1),"("==m)return i(a,2),e(a,u,[")"],"bracket");if("["==m)return i(a,2),e(a,u,["]"],"bracket");if("{"==m)return i(a,2),e(a,u,["}"],"bracket");if("<"==m)return i(a,2),e(a,u,[">"],"bracket");if(/[\^'"!~\/]/.test(m))return i(a,1),e(a,u,[a.eat(m)],"bracket")}else if("r"==m){if(m=t(a,1),"("==m)return i(a,2),e(a,u,[")"],l,c);if("["==m)return i(a,2),e(a,u,["]"],l,c);if("{"==m)return i(a,2),e(a,u,["}"],l,c);if("<"==m)return i(a,2),e(a,u,[">"],l,c);if(/[\^'"!~\/]/.test(m))return i(a,1),e(a,u,[a.eat(m)],l,c)}else if(/[\^'"!~\/(\[{<]/.test(m)){if("("==m)return i(a,1),e(a,u,[")"],"string");if("["==m)return i(a,1),e(a,u,["]"],"string");if("{"==m)return i(a,1),e(a,u,["}"],"string");if("<"==m)return i(a,1),e(a,u,[">"],"string");if(/[\^'"!~\/]/.test(m))return e(a,u,[a.eat(m)],"string")}}if("m"==d){var m=t(a,-2);if((!m||!/\w/.test(m))&&(m=a.eat(/[(\[{<\^'"!~\/]/))){if(/[\^'"!~\/]/.test(m))return e(a,u,[m],l,c);if("("==m)return e(a,u,[")"],l,c);if("["==m)return e(a,u,["]"],l,c);if("{"==m)return e(a,u,["}"],l,c);if("<"==m)return e(a,u,[">"],l,c)}}if("s"==d){var m=/[\/>\]})\w]/.test(t(a,-2));if(!m&&(m=a.eat(/[(\[{<\^'"!~\/]/)))return"["==m?e(a,u,["]","]"],l,c):"{"==m?e(a,u,["}","}"],l,c):"<"==m?e(a,u,[">",">"],l,c):"("==m?e(a,u,[")",")"],l,c):e(a,u,[m,m],l,c)}if("y"==d){var m=/[\/>\]})\w]/.test(t(a,-2));if(!m&&(m=a.eat(/[(\[{<\^'"!~\/]/)))return"["==m?e(a,u,["]","]"],l,c):"{"==m?e(a,u,["}","}"],l,c):"<"==m?e(a,u,[">",">"],l,c):"("==m?e(a,u,[")",")"],l,c):e(a,u,[m,m],l,c)}if("t"==d){var m=/[\/>\]})\w]/.test(t(a,-2));if(!m&&(m=a.eat("r"),m&&(m=a.eat(/[(\[{<\^'"!~\/]/))))return"["==m?e(a,u,["]","]"],l,c):"{"==m?e(a,u,["}","}"],l,c):"<"==m?e(a,u,[">",">"],l,c):"("==m?e(a,u,[")",")"],l,c):e(a,u,[m,m],l,c)}if("`"==d)return e(a,u,[d],"variable-2");if("/"==d)return/~\s*$/.test(n(a))?e(a,u,[d],l,c):"operator";if("$"==d){var f=a.pos;if(a.eatWhile(/\d/)||a.eat("{")&&a.eatWhile(/\d/)&&a.eat("}"))return"variable-2";a.pos=f}if(/[$@%]/.test(d)){var f=a.pos;if(a.eat("^")&&a.eat(/[A-Z]/)||!/[@$%&]/.test(t(a,-2))&&a.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var m=a.current();if(s[m])return"variable-2"}a.pos=f}if(/[$@%&]/.test(d)&&(a.eatWhile(/[\w$\[\]]/)||a.eat("{")&&a.eatWhile(/[\w$\[\]]/)&&a.eat("}"))){var m=a.current();return s[m]?"variable-2":"variable"}if("#"==d&&"$"!=t(a,-2))return a.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(d)){var f=a.pos;if(a.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),s[a.current()])return"operator";a.pos=f}if("_"==d&&1==a.pos){if("_END__"==r(a,6))return e(a,u,["\0"],"comment");if("_DATA__"==r(a,7))return e(a,u,["\0"],"variable-2");if("_C__"==r(a,7))return e(a,u,["\0"],"string")}if(/\w/.test(d)){var f=a.pos;if("{"==t(a,-2)&&("}"==t(a,0)||a.eatWhile(/\w/)&&"}"==t(a,0)))return"string";a.pos=f}if(/[A-Z]/.test(d)){var h=t(a,-2),f=a.pos;if(a.eatWhile(/[A-Z_]/),!/[\da-z]/.test(t(a,0))){var m=s[a.current()];return m?(m[1]&&(m=m[0]),":"!=h?1==m?"keyword":2==m?"def":3==m?"atom":4==m?"operator":5==m?"variable-2":"meta":"meta"):"meta"}a.pos=f}if(/[a-zA-Z_]/.test(d)){var h=t(a,-2);a.eatWhile(/\w/);var m=s[a.current()];return m?(m[1]&&(m=m[0]),":"!=h?1==m?"keyword":2==m?"def":3==m?"atom":4==m?"operator":5==m?"variable-2":"meta":"meta"):"meta"}return null}var s={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},l="string-2",c=/[goseximacplud]/;return{startState:function(){return{tokenize:a,chain:null,style:null,tail:null}},token:function(e,t){return(t.tokenize||a)(e,t)},lineComment:"#"}}),e.registerHelper("wordChars","perl",/[\w$]/),e.defineMIME("text/x-perl","perl")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("pig",function(e,t){function n(e,t,n){return t.tokenize=n,n(e,t)}function r(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return"comment"}function i(e){return function(t,n){for(var r,i=!1,a=!1;null!=(r=t.next());){if(r==e&&!i){a=!0;break}i=!i&&"\\"==r}return(a||!i&&!c)&&(n.tokenize=o),"error"}}function o(e,t){var o=e.next();return'"'==o||"'"==o?n(e,t,i(o)):/[\[\]{}\(\),;\.]/.test(o)?null:/\d/.test(o)?(e.eatWhile(/[\w\.]/),"number"):"/"==o?e.eat("*")?n(e,t,r):(e.eatWhile(u),"operator"):"-"==o?e.eat("-")?(e.skipToEnd(),"comment"):(e.eatWhile(u),"operator"):u.test(o)?(e.eatWhile(u),"operator"):(e.eatWhile(/[\w\$_]/),a&&a.propertyIsEnumerable(e.current().toUpperCase())&&!e.eat(")")&&!e.eat(".")?"keyword":s&&s.propertyIsEnumerable(e.current().toUpperCase())?"variable-2":l&&l.propertyIsEnumerable(e.current().toUpperCase())?"variable-3":"variable")}var a=t.keywords,s=t.builtins,l=t.types,c=t.multiLineStrings,u=/[*+\-%<>=&?:\/!|]/;return{startState:function(){return{tokenize:o,startOfLine:!0}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n}}}),function(){function t(e){for(var t={},n=e.split(" "),r=0;r"==r){n.tokenize=t;break}i="#"===r}return"comment"}function c(e,n){var r=e.peek();return e.eat("{")?(n.tokenize=u,u(e,n)):void 0!=r&&r.match(p)?(e.eatWhile(p),n.tokenize=t,"variable-2"):(n.tokenize=t,"error")}function u(e,n){for(var r;null!=(r=e.next());)if("}"===r){n.tokenize=t;break}return"variable-2"}function d(e,n){var r=n.startQuote;if(e.sol()&&e.match(new RegExp(r+"@")))n.tokenize=t;else if('"'===r)for(;!e.eol();){var i=e.peek();if("$"===i)return n.tokenize=a,"string";e.next(),"`"===i&&e.next()}else e.skipToEnd();return"string"}var f="(?=[^A-Za-z\\d\\-_]|$)",p=/[\w\-:]/,m=e([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:f}),h=/[\[\]{},;`\.]|@[({]/,g=e(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),v=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,b=e([g,v],{suffix:""}),y=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,x=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,k=/[A-Z]:|%|\?/i,w=e([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),_=e([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),S=e([k,w,_],{suffix:f}),C={keyword:m,number:y,operator:b,builtin:S,punctuation:h,identifier:x},E={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:t}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return E}),e.defineMIME("application/x-powershell","powershell")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("properties",function(){return{token:function(e,t){var n=e.sol()||t.afterSection,r=e.eol();if(t.afterSection=!1,n&&(t.nextMultiline?(t.inMultiline=!0,t.nextMultiline=!1):t.position="def"),r&&!t.nextMultiline&&(t.inMultiline=!1,t.position="def"),n)for(;e.eatSpace(););var i=e.next();return!n||"#"!==i&&"!"!==i&&";"!==i?n&&"["===i?(t.afterSection=!0,e.skipTo("]"),e.eat("]"),"header"):"="===i||":"===i?(t.position="quote",null):("\\"===i&&"quote"===t.position&&e.eol()&&(t.nextMultiline=!0),t.position):(t.position="comment",e.skipToEnd(),"comment")},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),e.defineMIME("text/x-properties","properties"),e.defineMIME("text/x-ini","properties")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function n(e){if(e.eatSpace())return null;if(e.match("//"))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return e.match(/^"([^"]|(""))*"/)?"string":e.match(/^'([^']|(''))*'/)?"string":e.match(i)?"keyword":e.match(o)?"variable":(e.next(),null)}var r=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64"],i=t(r);e.registerHelper("hintWords","protobuf",r);var o=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*");e.defineMode("protobuf",function(){return{token:n}}),e.defineMIME("text/x-protobuf","protobuf")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("puppet",function(){function e(e,t){for(var n=t.split(" "),i=0;i.*/,!1),s=e.match(/(\s+)?[\w:_]+(\s+)?{/,!1),l=e.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),c=e.next();if("$"===c)return e.match(i)?n.continueString?"variable-2":"variable":"error";if(n.continueString)return e.backUp(1),t(e,n);if(n.inDefinition){if(e.match(/(\s+)?[\w:_]+(\s+)?/))return"def";e.match(/\s+{/),n.inDefinition=!1}return n.inInclude?(e.match(/(\s+)?\S+(\s+)?/),n.inInclude=!1,"def"):e.match(/(\s+)?\w+\(/)?(e.backUp(1),"def"):a?(e.match(/(\s+)?\w+/),"tag"):o&&r.hasOwnProperty(o)?(e.backUp(1),e.match(/[\w]+/),e.match(/\s+\S+\s+{/,!1)&&(n.inDefinition=!0),"include"==o&&(n.inInclude=!0),r[o]):/(^|\s+)[A-Z][\w:_]+/.test(o)?(e.backUp(1),e.match(/(^|\s+)[A-Z][\w:_]+/),"def"):s?(e.match(/(\s+)?[\w:_]+/),"def"):l?(e.match(/(\s+)?[@]{1,2}/),"special"):"#"==c?(e.skipToEnd(),"comment"):"'"==c||'"'==c?(n.pending=c,t(e,n)):"{"==c||"}"==c?"bracket":"/"==c?(e.match(/.*?\//),"variable-3"):c.match(/[0-9]/)?(e.eatWhile(/[0-9]+/),"number"):"="==c?(">"==e.peek()&&e.next(),"operator"):(e.eatWhile(/[\w-]/),null)}var r={},i=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;return e("keyword","class define site node include import inherits"),e("keyword","case if else in and elsif default or"),e("atom","false true running present absent file directory undef"),e("builtin","action augeas burst chain computer cron destination dport exec file filebucket group host icmp iniface interface jump k5login limit log_level log_prefix macauthorization mailalias maillist mcx mount nagios_command nagios_contact nagios_contactgroup nagios_host nagios_hostdependency nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo nagios_servicegroup nagios_timeperiod name notify outiface package proto reject resources router schedule scheduled_task selboolean selmodule service source sport ssh_authorized_key sshkey stage state table tidy todest toports tosource user vlan yumrepo zfs zone zpool"),{startState:function(){var e={};return e.inDefinition=!1,e.inInclude=!1,e.continueString=!1,e.pending=!1,e},token:function(e,t){return e.eatSpace()?null:n(e,t)}}}),e.defineMIME("text/x-puppet","puppet")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function n(e){return e.scopes[e.scopes.length-1]}var r=t(["and","or","not","is"]),i=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],o=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];e.registerHelper("hintWords","python",i.concat(o)),e.defineMode("python",function(a,s){function l(e,t){if(e.sol()&&(t.indent=e.indentation()),e.sol()&&"py"==n(t).type){var r=n(t).offset;if(e.eatSpace()){var i=e.indentation();return i>r?d(t):i0&&p(e,t)&&(o+=" "+h),o}return c(e,t)}function c(e,t){if(e.eatSpace())return null;var n=e.peek();if("#"==n)return e.skipToEnd(),"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),
o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}return e.match(E)?(t.tokenize=u(e.current()),t.tokenize(e,t)):e.match(y)||e.match(b)?"punctuation":e.match(v)||e.match(S)?"operator":e.match(g)?"punctuation":"."==t.lastToken&&e.match(C)?"property":e.match(T)||e.match(r)?"keyword":e.match(M)?"builtin":e.match(/^(self|cls)\b/)?"variable-2":e.match(C)?"def"==t.lastToken||"class"==t.lastToken?"def":"variable":(e.next(),h)}function u(e){function t(t,i){for(;!t.eol();)if(t.eatWhile(/[^'"\\]/),t.eat("\\")){if(t.next(),n&&t.eol())return r}else{if(t.match(e))return i.tokenize=l,r;t.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return h;i.tokenize=l}return r}for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";return t.isString=!0,t}function d(e){for(;"py"!=n(e).type;)e.scopes.pop();e.scopes.push({offset:n(e).offset+a.indentUnit,type:"py",align:null})}function f(e,t,n){var r=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+x,type:n,align:r})}function p(e,t){for(var r=e.indentation();t.scopes.length>1&&n(t).offset>r;){if("py"!=n(t).type)return!0;t.scopes.pop()}return n(t).offset!=r}function m(e,t){e.sol()&&(t.beginningOfLine=!0);var r=t.tokenize(e,t),i=e.current();if(t.beginningOfLine&&"@"==i)return e.match(C,!1)?"meta":_?"operator":h;/\S/.test(i)&&(t.beginningOfLine=!1),"variable"!=r&&"builtin"!=r||"meta"!=t.lastToken||(r="meta"),"pass"!=i&&"return"!=i||(t.dedent+=1),"lambda"==i&&(t.lambda=!0),":"!=i||t.lambda||"py"!=n(t).type||d(t);var o=1==i.length?"[({".indexOf(i):-1;if(o!=-1&&f(e,t,"])}".slice(o,o+1)),o="])}".indexOf(i),o!=-1){if(n(t).type!=i)return h;t.indent=t.scopes.pop().offset-x}return t.dedent>0&&e.eol()&&"py"==n(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),r}var h="error",g=s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.]/,v=s.doubleOperators||/^([!<>]==|<>|<<|>>|\/\/|\*\*)/,b=s.doubleDelimiters||/^(\+=|\-=|\*=|%=|\/=|&=|\|=|\^=)/,y=s.tripleDelimiters||/^(\/\/=|>>=|<<=|\*\*=)/,x=s.hangingIndent||a.indentUnit,k=i,w=o;void 0!=s.extra_keywords&&(k=k.concat(s.extra_keywords)),void 0!=s.extra_builtins&&(w=w.concat(s.extra_builtins));var _=!(s.version&&Number(s.version)<3);if(_){var S=s.singleOperators||/^[\+\-\*\/%&|\^~<>!@]/,C=s.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;k=k.concat(["nonlocal","False","True","None","async","await"]),w=w.concat(["ascii","bytes","exec","print"]);var E=new RegExp("^(([rbuf]|(br))?('{3}|\"{3}|['\"]))","i")}else{var S=s.singleOperators||/^[\+\-\*\/%&|\^~<>!]/,C=s.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;k=k.concat(["exec","print"]),w=w.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"]);var E=new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var T=t(k),M=t(w),A={startState:function(e){return{tokenize:l,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=m(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+h:r},indent:function(t,r){if(t.tokenize!=l)return t.tokenize.isString?e.Pass:0;var i=n(t),o=i.type==r.charAt(0);return null!=i.align?i.align-(o?1:0):i.offset-(o?x:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return A}),e.defineMIME("text/x-python","python");var a=function(e){return e.split(" ")};e.defineMIME("text/x-cython",{name:"python",extra_keywords:a("by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE")})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("q",function(e){function t(e){return new RegExp("^("+e.join("|")+")$")}function n(e,t){var i=e.sol(),s=e.next();if(c=null,i){if("/"==s)return(t.tokenize=r)(e,t);if("\\"==s)return e.eol()||/\s/.test(e.peek())?(e.skipToEnd(),/^\\\s*$/.test(e.current())?(t.tokenize=o)(e,t):t.tokenize=n,"comment"):(t.tokenize=n,"builtin")}if(/\s/.test(s))return"/"==e.peek()?(e.skipToEnd(),"comment"):"whitespace";if('"'==s)return(t.tokenize=a)(e,t);if("`"==s)return e.eatWhile(/[A-Z|a-z|\d|_|:|\/|\.]/),"symbol";if("."==s&&/\d/.test(e.peek())||/\d/.test(s)){var l=null;return e.backUp(1),e.match(/^\d{4}\.\d{2}(m|\.\d{2}([D|T](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||e.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||e.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||e.match(/^\d+[ptuv]{1}/)?l="temporal":(e.match(/^0[NwW]{1}/)||e.match(/^0x[\d|a-f|A-F]*/)||e.match(/^[0|1]+[b]{1}/)||e.match(/^\d+[chijn]{1}/)||e.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(l="number"),!l||(s=e.peek())&&!f.test(s)?(e.next(),"error"):l}return/[A-Z|a-z]|\./.test(s)?(e.eatWhile(/[A-Z|a-z|\.|_|\d]/),d.test(e.current())?"keyword":"variable"):/[|\/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(s)?null:/[{}\(\[\]\)]/.test(s)?null:"error"}function r(e,t){return e.skipToEnd(),/\/\s*$/.test(e.current())?(t.tokenize=i)(e,t):t.tokenize=n,"comment"}function i(e,t){var r=e.sol()&&"\\"==e.peek();return e.skipToEnd(),r&&/^\\\s*$/.test(e.current())&&(t.tokenize=n),"comment"}function o(e){return e.skipToEnd(),"comment"}function a(e,t){for(var r,i=!1,o=!1;r=e.next();){if('"'==r&&!i){o=!0;break}i=!i&&"\\"==r}return o&&(t.tokenize=n),"string"}function s(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function l(e){e.indent=e.context.indent,e.context=e.context.prev}var c,u=e.indentUnit,d=t(["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"]),f=/[|\/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;return{startState:function(){return{tokenize:n,context:null,indent:0,col:0}},token:function(e,t){e.sol()&&(t.context&&null==t.context.align&&(t.context.align=!1),t.indent=e.indentation());var n=t.tokenize(e,t);if("comment"!=n&&t.context&&null==t.context.align&&"pattern"!=t.context.type&&(t.context.align=!0),"("==c)s(t,")",e.column());else if("["==c)s(t,"]",e.column());else if("{"==c)s(t,"}",e.column());else if(/[\]\}\)]/.test(c)){for(;t.context&&"pattern"==t.context.type;)l(t);t.context&&c==t.context.type&&l(t)}else"."==c&&t.context&&"pattern"==t.context.type?l(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?s(t,"pattern",e.column()):"pattern"!=t.context.type||t.context.align||(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t){var n=t&&t.charAt(0),r=e.context;if(/[\]\}]/.test(n))for(;r&&"pattern"==r.type;)r=r.prev;var i=r&&n==r.type;return r?"pattern"==r.type?r.col:r.align?r.col+(i?0:1):r.indent+(i?0:u):0}}}),e.defineMIME("text/x-q","q")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("wordChars","r",/[\w.]/),e.defineMode("r",function(e){function t(e){for(var t=e.split(" "),n={},r=0;r>?/)?"operator arrow":"="==n&&t.ctx.argList?"arg-is":d.test(n)?"$"==n?"operator dollar":(e.eatWhile(d),"operator"):/[\(\){}\[\];]/.test(n)?(a=n,";"==n?"semi":null):null}function r(e){return function(t,r){if(t.eat("\\")){var i=t.next();return"x"==i?t.match(/^[a-f0-9]{2}/i):("u"==i||"U"==i)&&t.eat("{")&&t.skipTo("}")?t.next():"u"==i?t.match(/^[a-f0-9]{4}/i):"U"==i?t.match(/^[a-f0-9]{8}/i):/[0-7]/.test(i)&&t.match(/^[0-7]{1,2}/),"string-2"}for(var o;null!=(o=t.next());){if(o==e){r.tokenize=n;break}if("\\"==o){t.backUp(1);break}}return"string"}}function i(e,t,n){e.ctx={type:t,indent:e.indent,align:null,column:n.column(),prev:e.ctx}}function o(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}var a,s=t("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"),l=t("list quote bquote eval return call parse deparse"),c=t("if else repeat while function for in next break"),u=t("if else repeat while function for"),d=/[+\-*\/^<>=!&|~$:]/;return{startState:function(){return{tokenize:n,ctx:{type:"top",indent:-e.indentUnit,align:!1},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(null==t.ctx.align&&(t.ctx.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);"comment"!=n&&null==t.ctx.align&&(t.ctx.align=!0);var r=t.ctx.type;return";"!=a&&"{"!=a&&"}"!=a||"block"!=r||o(t),"{"==a?i(t,"}",e):"("==a?(i(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==a?i(t,"]",e):"block"==a?i(t,"block",e):a==r&&o(t),t.afterIdent="variable"==n||"keyword"==n,n},indent:function(t,r){if(t.tokenize!=n)return 0;var i=r&&r.charAt(0),o=t.ctx,a=i==o.type;return"block"==o.type?o.indent+("{"==i?0:e.indentUnit):o.align?o.column+(a?0:1):o.indent+(a?0:e.indentUnit)},lineComment:"#"}}),e.defineMIME("text/x-rsrc","r")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("rpm-changes",function(){var e=/^-+$/,t=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,n=/^[\w+.-]+@[\w.-]+/;return{token:function(r){if(r.sol()){if(r.match(e))return"tag";if(r.match(t))return"tag"}return r.match(n)?"string":(r.next(),null)}}}),e.defineMIME("text/x-rpm-changes","rpm-changes"),e.defineMode("rpm-spec",function(){var e=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,t=/^[a-zA-Z0-9()]+:/,n=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,r=/^%(ifnarch|ifarch|if)/,i=/^%(else|endif)/,o=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(a,s){var l=a.peek();if("#"==l)return a.skipToEnd(),"comment";if(a.sol()){if(a.match(t))return"header";if(a.match(n))return"atom"}if(a.match(/^\$\w+/))return"def";if(a.match(/^\$\{\w+\}/))return"def";if(a.match(i))return"keyword";if(a.match(r))return s.controlFlow=!0,"keyword";if(s.controlFlow){if(a.match(o))return"operator";if(a.match(/^(\d+)/))return"number";a.eol()&&(s.controlFlow=!1)}if(a.match(e))return a.eol()&&(s.controlFlow=!1),"number";if(a.match(/^%[\w]+/))return a.match(/^\(/)&&(s.macroParameters=!0),"keyword";if(s.macroParameters){if(a.match(/^\d+/))return"number";if(a.match(/^\)/))return s.macroParameters=!1,"keyword"}return a.match(/^%\{\??[\w \-\:\!]+\}/)?(a.eol()&&(s.controlFlow=!1),"def"):(a.next(),null)}}}),e.defineMIME("text/x-rpm-spec","rpm-spec")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("ruby",function(e){function t(e){for(var t={},n=0,r=e.length;n]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if("@"==i&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==i)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(i))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"ident";if("|"!=i||!t.varList&&"{"!=t.lastTok&&"do"!=t.lastTok){if(/[\(\)\[\]{}\\;]/.test(i))return c=i,null;if("-"==i&&e.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(i)){var v=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=i||v||(c="."),"operator"}return null}return c="|",null}function i(e){return e||(e=1),function(t,n){if("}"==t.peek()){if(1==e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=i(e-1)}else"{"==t.peek()&&(n.tokenize[n.tokenize.length-1]=i(e+1));return r(t,n)}}function o(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,r(t,n))}}function a(e,t,n,r){return function(a,s){var l,c=!1;for("read-quoted-paused"===s.context.type&&(s.context=s.context.prev,a.eat("}"));null!=(l=a.next());){if(l==e&&(r||!c)){s.tokenize.pop();break}if(n&&"#"==l&&!c){if(a.eat("{")){"}"==e&&(s.context={prev:s.context,type:"read-quoted-paused"}),s.tokenize.push(i());break}if(/[@\$]/.test(a.peek())){s.tokenize.push(o());break}}c=!c&&"\\"==l}return t}}function s(e){return function(t,n){return t.match(e)?n.tokenize.pop():t.skipToEnd(),"string"}}function l(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}var c,u=t(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"]),d=t(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),f=t(["end","until"]),p={"[":"]","{":"}","(":")"};return{startState:function(){return{tokenize:[r],indented:0,context:{type:"top",indented:-e.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){c=null,e.sol()&&(t.indented=e.indentation());var n,r=t.tokenize[t.tokenize.length-1](e,t),i=c;if("ident"==r){var o=e.current();r="."==t.lastTok?"property":u.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(o)?"tag":"def"==t.lastTok||"class"==t.lastTok||t.varList?"def":"variable","keyword"==r&&(i=o,d.propertyIsEnumerable(o)?n="indent":f.propertyIsEnumerable(o)?n="dedent":"if"!=o&&"unless"!=o||e.column()!=e.indentation()?"do"==o&&t.context.indented!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),e.defineMIME("text/x-rustsrc","rust")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sas",function(){function e(e,t,r){if(r)for(var i=t.split(" "),o=0;o=|!=|<>)/,o=/[=\(:\),{}.*<>+\-\/^\[\]]/;return e("def","stack pgm view source debug nesting nolist",["inDataStep"]),e("def","if while until for do do; end end; then else cancel",["inDataStep"]),e("def","label format _n_ _error_",["inDataStep"]),e("def","ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME",["inDataStep"]),e("def","filevar finfo finv fipname fipnamel fipstate first firstobs floor",["inDataStep"]),e("def","varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday",["inDataStep"]),e("def","zipfips zipname zipnamel zipstate",["inDataStep"]),e("def","put putc putn",["inDataStep"]),e("builtin","data run",["inDataStep"]),e("def","data",["inProc"]),e("def","%if %end %end; %else %else; %do %do; %then",["inMacro"]),e("builtin","proc run; quit; libname filename %macro %mend option options",["ALL"]),e("def","footnote title libname ods",["ALL"]),e("def","%let %put %global %sysfunc %eval ",["ALL"]),e("variable","&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext",["ALL"]),e("def","source2 nosource2 page pageno pagesize",["ALL"]),e("def","_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref  fmterr fmtsearch fnonct fnote font fontalias  fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib  library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit  nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs  on open     order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2  paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps  pw pwreq qtr quote r ranbin rancau ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni read recfm register regr remote remove rename repeat replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex  spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv  tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var  weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq  min max",["inDataStep","inProc"]),e("operator","and not ",["inDataStep","inProc"]),{startState:function(){return{inDataStep:!1,inProc:!1,inMacro:!1,nextword:!1,continueString:null,continueComment:!1}},token:function(e,n){return e.eatSpace()?null:t(e,n)},blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-sas","sas")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../css/css"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sass",function(t){function n(e){return new RegExp("^"+e.join("|"))}function r(e){return!e.peek()||e.match(/\s+$/,!1)}function i(e,t){var n=e.peek();return")"===n?(e.next(),t.tokenizer=u,"operator"):"("===n?(e.next(),e.eatSpace(),"operator"):"'"===n||'"'===n?(t.tokenizer=a(e.next()),"string"):(t.tokenizer=a(")",!1),"string")}function o(e,t){return function(n,r){return n.sol()&&n.indentation()<=e?(r.tokenizer=u,u(n,r)):(t&&n.skipTo("*/")?(n.next(),n.next(),r.tokenizer=u):n.skipToEnd(),"comment")}}function a(e,t){function n(i,o){var a=i.next(),l=i.peek(),c=i.string.charAt(i.pos-2),d="\\"!==a&&l===e||a===e&&"\\"!==c;return d?(a!==e&&t&&i.next(),r(i)&&(o.cursorHalf=0),o.tokenizer=u,"string"):"#"===a&&"{"===l?(o.tokenizer=s(n),i.next(),"operator"):"string"}return null==t&&(t=!0),n}function s(e){return function(t,n){return"}"===t.peek()?(t.next(),n.tokenizer=e,"operator"):u(t,n)}}function l(e){if(0==e.indentCount){e.indentCount++;var n=e.scopes[0].offset,r=n+t.indentUnit;e.scopes.unshift({offset:r})}}function c(e){1!=e.scopes.length&&e.scopes.shift()}function u(e,t){var n=e.peek();if(e.match("/*"))return t.tokenizer=o(e.indentation(),!0),t.tokenizer(e,t);if(e.match("//"))return t.tokenizer=o(e.indentation(),!1),t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=s(u),"operator";if('"'===n||"'"===n)return e.next(),t.tokenizer=a(n),"string";if(t.cursorHalf){if("#"===n&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return r(e)&&(t.cursorHalf=0),
"number";if(e.match(/^-?[0-9\.]+/))return r(e)&&(t.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return r(e)&&(t.cursorHalf=0),"unit";if(e.match(y))return r(e)&&(t.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=i,r(e)&&(t.cursorHalf=0),"atom";if("$"===n)return e.next(),e.eatWhile(/[\w-]/),r(e)&&(t.cursorHalf=0),"variable-2";if("!"===n)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(k))return r(e)&&(t.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return r(e)&&(t.cursorHalf=0),f=e.current().toLowerCase(),g.hasOwnProperty(f)?"atom":h.hasOwnProperty(f)?"keyword":m.hasOwnProperty(f)?(t.prevProp=e.current().toLowerCase(),"property"):"tag";if(r(e))return t.cursorHalf=0,null}else{if("-"===n&&e.match(/^-\w+-/))return"meta";if("."===n){if(e.next(),e.match(/^[\w-]+/))return l(t),"qualifier";if("#"===e.peek())return l(t),"tag"}if("#"===n){if(e.next(),e.match(/^[\w-]+/))return l(t),"builtin";if("#"===e.peek())return l(t),"tag"}if("$"===n)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(y))return"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=i,"atom";if("="===n&&e.match(/^=[\w-]+/))return l(t),"meta";if("+"===n&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===n&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||c(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return l(t),"def";if("@"===n)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){f=e.current().toLowerCase();var d=t.prevProp+"-"+f;return m.hasOwnProperty(d)?"property":m.hasOwnProperty(f)?(t.prevProp=f,"property"):v.hasOwnProperty(f)?"property":"tag"}return e.match(/ *:/,!1)?(l(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),"property"):e.match(/ *,/,!1)?"tag":(l(t),"tag")}if(":"===n)return e.match(w)?"variable-3":(e.next(),t.cursorHalf=1,"operator")}return e.match(k)?"operator":(e.next(),null)}function d(e,n){e.sol()&&(n.indentCount=0);var r=n.tokenizer(e,n),i=e.current();if("@return"!==i&&"}"!==i||c(n),null!==r){for(var o=e.pos-i.length,a=o+t.indentUnit*n.indentCount,s=[],l=0;l","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],k=n(x),w=/^::?[a-zA-Z_][\w\-]*/;return{startState:function(){return{tokenizer:u,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=d(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e){return e.scopes[0].offset}}}),e.defineMIME("text/x-sass","sass")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("scheme",function(){function e(e){for(var t={},n=e.split(" "),r=0;rinteger char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),g=e("define let letrec let* lambda"),v=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),b=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),y=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),x=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);return{startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1}},token:function(e,t){if(null==t.indentStack&&e.sol()&&(t.indentation=e.indentation()),e.eatSpace())return null;var v=null;switch(t.mode){case"string":for(var b,y=!1;null!=(b=e.next());){if('"'==b&&!y){t.mode=!1;break}y=!y&&"\\"==b}v=u;break;case"comment":for(var b,x=!1;null!=(b=e.next());){if("#"==b&&x){t.mode=!1;break}x="|"==b}v=c;break;case"s-expr-comment":if(t.mode=!1,"("!=e.peek()&&"["!=e.peek()){e.eatWhile(/[^\/s]/),v=c;break}t.sExprComment=0;default:var k=e.next();if('"'==k)t.mode="string",v=u;else if("'"==k)v=d;else if("#"==k)if(e.eat("|"))t.mode="comment",v=c;else if(e.eat(/[tf]/i))v=d;else if(e.eat(";"))t.mode="s-expr-comment",v=c;else{var w=null,_=!1,S=!0;e.eat(/[ei]/i)?_=!0:e.backUp(1),e.match(/^#b/i)?w=i:e.match(/^#o/i)?w=o:e.match(/^#x/i)?w=s:e.match(/^#d/i)?w=a:e.match(/^[-+0-9.]/,!1)?(S=!1,w=a):_||e.eat("#"),null!=w&&(S&&!_&&e.match(/^#[ei]/i),w(e)&&(v=f))}else if(/^[-+0-9.]/.test(k)&&a(e,!0))v=f;else if(";"==k)e.skipToEnd(),v=c;else if("("==k||"["==k){for(var C,E="",T=e.column();null!=(C=e.eat(/[^\s\(\[\;\)\]]/));)E+=C;E.length>0&&g.propertyIsEnumerable(E)?n(t,T+m,k):(e.eatSpace(),e.eol()||";"==e.peek()?n(t,T+1,k):n(t,T+e.current().length,k)),e.backUp(e.current().length-1),"number"==typeof t.sExprComment&&t.sExprComment++,v=p}else")"==k||"]"==k?(v=p,null!=t.indentStack&&t.indentStack.type==(")"==k?"(":"[")&&(r(t),"number"==typeof t.sExprComment&&0==--t.sExprComment&&(v=c,t.sExprComment=!1))):(e.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/),v=h&&h.propertyIsEnumerable(e.current())?l:"variable")}return"number"==typeof t.sExprComment?c:v},indent:function(e){return null==e.indentStack?e.indentation:e.indentStack.indent},closeBrackets:{pairs:'()[]{}""'},lineComment:";;"}}),e.defineMIME("text/x-scheme","scheme")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("shell",function(){function e(e,t){for(var n=t.split(" "),r=0;r1&&e.eat("$");var i=e.next(),o=/\w/;return"{"===i&&(o=/[^}]/),/['"(]/.test(i)?(t.tokens[0]=n(i,"("==i?"quote":"string"),r(e,t)):(/\d/.test(i)||(e.eatWhile(o),e.eat("}")),t.tokens.shift(),"def")};return{startState:function(){return{tokens:[]}},token:function(e,t){return r(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),e.defineMIME("text/x-sh","shell")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sieve",function(e){function t(e){for(var t={},n=e.split(" "),r=0;r=@%|&?!.,:;^]/,n=/true|false|nil|self|super|thisContext/,r=function(e,t){this.next=e,this.parent=t},i=function(e,t,n){this.name=e,this.context=t,this.eos=n},o=function(){this.context=new r(a,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};o.prototype.userIndent=function(t){this.userIndentationDelta=t>0?t/e.indentUnit-this.indentation:0};var a=function(e,o,a){var d=new i(null,o,!1),f=e.next();return'"'===f?d=s(e,new r(s,o)):"'"===f?d=l(e,new r(l,o)):"#"===f?"'"===e.peek()?(e.next(),d=c(e,new r(c,o))):e.eatWhile(/[^\s.{}\[\]()]/)?d.name="string-2":d.name="meta":"$"===f?("<"===e.next()&&(e.eatWhile(/[^\s>]/),e.next()),d.name="string-2"):"|"===f&&a.expectVariable?d.context=new r(u,o):/[\[\]{}()]/.test(f)?(d.name="bracket",d.eos=/[\[{(]/.test(f),"["===f?a.indentation++:"]"===f&&(a.indentation=Math.max(0,a.indentation-1))):t.test(f)?(e.eatWhile(t),d.name="operator",d.eos=";"!==f):/\d/.test(f)?(e.eatWhile(/[\w\d]/),d.name="number"):/[\w_]/.test(f)?(e.eatWhile(/[\w\d_]/),d.name=a.expectVariable?n.test(e.current())?"keyword":"variable":null):d.eos=a.expectVariable,d},s=function(e,t){return e.eatWhile(/[^"]/),new i("comment",e.eat('"')?t.parent:t,!0)},l=function(e,t){return e.eatWhile(/[^']/),new i("string",e.eat("'")?t.parent:t,!1)},c=function(e,t){return e.eatWhile(/[^']/),new i("string-2",e.eat("'")?t.parent:t,!1)},u=function(e,t){var n=new i(null,t,!1),r=e.next();return"|"===r?(n.context=t.parent,n.eos=!0):(e.eatWhile(/[^|]/),n.name="variable"),n};return{startState:function(){return new o},token:function(e,t){if(t.userIndent(e.indentation()),e.eatSpace())return null;var n=t.context.next(e,t.context,t);return t.context=n.context,t.expectVariable=n.eos,n.name},blankLine:function(e){e.userIndent(0)},indent:function(t,n){var r=t.context.next===a&&n&&"]"===n.charAt(0)?-1:t.userIndentationDelta;return(t.indentation+r)*e.indentUnit},electricChars:"]"}}),e.defineMIME("text/x-stsrc",{name:"smalltalk"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("solr",function(){function e(e){return parseFloat(e,10).toString()===e}function t(e){return function(t,n){for(var r,o=!1;null!=(r=t.next())&&(r!=e||o);)o=!o&&"\\"==r;return o||(n.tokenize=i),"string"}}function n(e){return function(t,n){var r="operator";return"+"==e?r+=" positive":"-"==e?r+=" negative":"|"==e?t.eat(/\|/):"&"==e?t.eat(/\&/):"^"==e&&(r+=" boost"),n.tokenize=i,r}}function r(t){return function(n,r){for(var a=t;(t=n.peek())&&null!=t.match(o);)a+=n.next();return r.tokenize=i,s.test(a)?"operator":e(a)?"number":":"==n.peek()?"field":"string"}}function i(e,s){var l=e.next();return'"'==l?s.tokenize=t(l):a.test(l)?s.tokenize=n(l):o.test(l)&&(s.tokenize=r(l)),s.tokenize!=i?s.tokenize(e,s):null}var o=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\^\"\\]/,a=/[\|\!\+\-\*\?\~\^\&]/,s=/^(OR|AND|NOT|TO)$/i;return{startState:function(){return{tokenize:i}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),e.defineMIME("text/x-solr","solr")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sparql",function(e){function t(e){return new RegExp("^(?:"+e.join("|")+")$","i")}function n(e,t){var n=e.next();if(a=null,"$"==n||"?"==n)return"?"==n&&e.match(/\s/,!1)?"operator":(e.match(/^[\w\d]*/),"variable-2");if("<"!=n||e.match(/^[\s\u00a0=]/,!1)){if('"'==n||"'"==n)return t.tokenize=r(n),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(n))return a=n,"bracket";if("#"==n)return e.skipToEnd(),"comment";if(u.test(n))return e.eatWhile(u),"operator";if(":"==n)return e.eatWhile(/[\w\d\._\-]/),"atom";if("@"==n)return e.eatWhile(/[a-z\d\-]/i),"meta";if(e.eatWhile(/[_\w\d]/),e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var i=e.current();return l.test(i)?"builtin":c.test(i)?"keyword":"variable"}return e.match(/^[^\s\u00a0>]*>?/),"atom"}function r(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){r.tokenize=n;break}o=!o&&"\\"==i}return"string"}}function i(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function o(e){e.indent=e.context.indent,e.context=e.context.prev}var a,s=e.indentUnit,l=t(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","iri","uri","bnode","count","sum","min","max","avg","sample","group_concat","rand","abs","ceil","floor","round","concat","substr","strlen","replace","ucase","lcase","encode_for_uri","contains","strstarts","strends","strbefore","strafter","year","month","day","hours","minutes","seconds","timezone","tz","now","uuid","struuid","md5","sha1","sha256","sha384","sha512","coalesce","if","strlang","strdt","isnumeric","regex","exists","isblank","isliteral","a","bind"]),c=t(["base","prefix","select","distinct","reduced","construct","describe","ask","from","named","where","order","limit","offset","filter","optional","graph","by","asc","desc","as","having","undef","values","group","minus","in","not","service","silent","using","insert","delete","union","true","false","with","data","copy","to","move","add","create","drop","clear","load"]),u=/[*+\-<>=&|\^\/!\?]/;return{startState:function(){return{tokenize:n,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&null==t.context.align&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"!=n&&t.context&&null==t.context.align&&"pattern"!=t.context.type&&(t.context.align=!0),"("==a)i(t,")",e.column());else if("["==a)i(t,"]",e.column());else if("{"==a)i(t,"}",e.column());else if(/[\]\}\)]/.test(a)){for(;t.context&&"pattern"==t.context.type;)o(t);t.context&&a==t.context.type&&(o(t),"}"==a&&t.context&&"pattern"==t.context.type&&o(t))}else"."==a&&t.context&&"pattern"==t.context.type?o(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?i(t,"pattern",e.column()):"pattern"!=t.context.type||t.context.align||(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t){var n=t&&t.charAt(0),r=e.context;if(/[\]\}]/.test(n))for(;r&&"pattern"==r.type;)r=r.prev;var i=r&&n==r.type;return r?"pattern"==r.type?r.col:r.align?r.col+(i?0:1):r.indent+(i?0:s):0},lineComment:"#"}}),e.defineMIME("application/sparql-query","sparql")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("spreadsheet",function(){return{startState:function(){return{stringType:null,stack:[]}},token:function(e,t){if(e){switch(0===t.stack.length&&('"'!=e.peek()&&"'"!=e.peek()||(t.stringType=e.peek(),e.next(),t.stack.unshift("string"))),t.stack[0]){case"string":for(;"string"===t.stack[0]&&!e.eol();)e.peek()===t.stringType?(e.next(),t.stack.shift()):"\\"===e.peek()?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return"string";case"characterClass":for(;"characterClass"===t.stack[0]&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(/^\\./)||t.stack.shift();return"operator"}var n=e.peek();switch(n){case"[":return e.next(),t.stack.unshift("characterClass"),"bracket";case":":return e.next(),"operator";case"\\":return e.match(/\\[a-z]+/)?"string-2":(e.next(),"atom");case".":case",":case";":case"*":case"-":case"+":case"^":case"<":case"/":case"=":return e.next(),"atom";case"$":return e.next(),"builtin"}return e.match(/\d+/)?e.match(/^\w+/)?"error":"number":e.match(/^[a-zA-Z_]\w*/)?e.match(/(?=[\(.])/,!1)?"keyword":"variable-2":["[","]","(",")","{","}"].indexOf(n)!=-1?(e.next(),"bracket"):(e.eatSpace()||e.next(),null)}}}}),e.defineMIME("text/x-spreadsheet","spreadsheet")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sql",function(t,n){function r(e,t){var n=e.next();if(m[n]){var r=m[n](e,t);if(r!==!1)return r}if(p.hexNumber&&("0"==n&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==n||"X"==n)&&e.match(/^'[0-9a-fA-F]+'/)))return"number";if(p.binaryNumber&&(("b"==n||"B"==n)&&e.match(/^'[01]+'/)||"0"==n&&e.match(/^b[01]+/)))return"number";if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return e.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/),p.decimallessFloat&&e.eat("."),"number";if("?"==n&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==n||'"'==n&&p.doubleQuote)return t.tokenize=i(n),t.tokenize(e,t);if((p.nCharCast&&("n"==n||"N"==n)||p.charsetCast&&"_"==n&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(n))return null;if(p.commentSlashSlash&&"/"==n&&e.eat("/"))return e.skipToEnd(),"comment";if(p.commentHash&&"#"==n||"-"==n&&e.eat("-")&&(!p.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==n&&e.eat("*"))return t.tokenize=o,t.tokenize(e,t);if("."!=n){if(f.test(n))return e.eatWhile(f),null;if("{"==n&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var a=e.current().toLowerCase();return h.hasOwnProperty(a)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":c.hasOwnProperty(a)?"atom":u.hasOwnProperty(a)?"builtin":d.hasOwnProperty(a)?"keyword":l.hasOwnProperty(a)?"string-2":null}return p.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":p.ODBCdotTable&&e.match(/^[a-zA-Z_]+/)?"variable-2":void 0}function i(e){return function(t,n){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){n.tokenize=r;break}o=!o&&"\\"==i}return"string"}}function o(e,t){for(;;){if(!e.skipTo("*")){e.skipToEnd();break}if(e.next(),e.eat("/")){t.tokenize=r;break}}return"comment"}function a(e,t,n){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:n}}function s(e){e.indent=e.context.indent,e.context=e.context.prev}var l=n.client||{},c=n.atoms||{false:!0,true:!0,null:!0},u=n.builtin||{},d=n.keywords||{},f=n.operatorChars||/^[*+\-%<>!=&|~^]/,p=n.support||{},m=n.hooks||{},h=n.dateSQL||{date:!0,time:!0,timestamp:!0};return{startState:function(){return{tokenize:r,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==n)return n;t.context&&null==t.context.align&&(t.context.align=!0);var r=e.current();return"("==r?a(e,t,")"):"["==r?a(e,t,"]"):t.context&&t.context.type==r&&s(t),n},indent:function(n,r){var i=n.context;if(!i)return e.Pass;var o=r.charAt(0)==i.type;return i.align?i.col+(o?0:1):i.indent+(o?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:p.commentSlashSlash?"//":p.commentHash?"#":null}}),function(){function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function n(e){return e.eat("@")&&(e.match(/^session\./),e.match(/^local\./),e.match(/^global\./)),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function r(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}function i(e){for(var t={},n=e.split(" "),r=0;r!=]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-mssql",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(o+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec"),builtin:i("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:i("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":n}}),e.defineMIME("text/x-mysql",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(o+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":n,"`":t,"\\":r}}),e.defineMIME("text/x-mariadb",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(o+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),
builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":n,"`":t,"\\":r}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:i("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:i("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:i("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:i("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:i("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:i("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:i("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*+\-%<>!=~]/,dateSQL:i("date time timestamp"),support:i("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:i("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external false fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger true unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with"),builtin:i("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:i("date timestamp"),support:i("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:i("source"),keywords:i(o+"a abort abs absent absolute access according action ada add admin after aggregate all allocate also always analyse analyze any are array array_agg array_max_cardinality asensitive assertion assignment asymmetric at atomic attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli binary bit_length blob blocked bom both breadth c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain characteristics characters character_length character_set_catalog character_set_name character_set_schema char_length check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column columns column_name command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constraint constraints constraint_catalog constraint_name constraint_schema constructor contains content continue control conversion convert copy corr corresponding cost covar_pop covar_samp cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datetime_interval_code datetime_interval_precision day db deallocate dec declare default defaults deferrable deferred defined definer degree delimiter delimiters dense_rank depth deref derived describe descriptor deterministic diagnostics dictionary disable discard disconnect dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain dynamic dynamic_function dynamic_function_code each element else empty enable encoding encrypted end end-exec end_frame end_partition enforced enum equals escape event every except exception exclude excluding exclusive exec execute exists exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreign fortran forward found frame_row free freeze fs full function functions fusion g general generated get global go goto grant granted greatest grouping groups handler header hex hierarchy hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import including increment indent index indexes indicator inherit inherits initially inline inner inout input insensitive instance instantiable instead integrity intersect intersection invoker isnull isolation k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like_regex link listen ln load local localtime localtimestamp location locator lock locked logged lower m map mapping match matched materialized max maxvalue max_cardinality member merge message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized nothing notify notnull nowait nth_value ntile null nullable nullif nulls number object occurrences_regex octets octet_length of off offset oids old only open operator option options ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password percent percentile_cont percentile_disc percent_rank period permission placing plans pli policy portion position position_regex power precedes preceding prepare prepared preserve primary prior privileges procedural procedure program public quote range rank read reads reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns revoke right role rollback rollup routine routine_catalog routine_name routine_schema row rows row_count row_number rule savepoint scale schema schema_name scope scope_catalog scope_name scope_schema scroll search second section security selective self sensitive sequence sequences serializable server server_name session session_user setof sets share show similar simple size skip snapshot some source space specific specifictype specific_name sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset substring substring_regex succeeds sum symmetric sysid system system_time system_user t tables tablesample tablespace table_name temp template temporary then ties timezone_hour timezone_minute to token top_level_count trailing transaction transactions_committed transactions_rolled_back transaction_active transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted unique unknown unlink unlisten unlogged unnamed unnest until untyped upper uri usage user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of varbinary variadic var_pop var_samp verbose version versioning view views volatile when whenever whitespace width_bucket window within work wrapper write xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes loop repeat"),builtin:i("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-gql",{name:"sql",keywords:i("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:i("false true"),builtin:i("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/})}()}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("stex",function(){function e(e,t){e.cmdState.push(t)}function t(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function n(e){var t=e.cmdState.pop();t&&t.closeBracket()}function r(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}function o(e,t){e.f=t}function a(n,i){var a;if(n.match(/^\\[a-zA-Z@]+/)){var u=n.current().slice(1);return a=c[u]||c.DEFAULT,a=new a,e(i,a),o(i,l),a.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return o(i,function(e,t){return s(e,t,"\\]")}),"keyword";if(n.match("$$"))return o(i,function(e,t){return s(e,t,"$$")}),"keyword";if(n.match("$"))return o(i,function(e,t){return s(e,t,"$")}),"keyword";var d=n.next();return"%"==d?(n.skipToEnd(),"comment"):"}"==d||"]"==d?(a=t(i))?(a.closeBracket(d),o(i,l),"bracket"):"error":"{"==d||"["==d?(a=c.DEFAULT,a=new a,e(i,a),"bracket"):/\d/.test(d)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),a=r(i),"begin"==a.name&&(a.argument=n.current()),a.styleIdentifier())}function s(e,t,n){if(e.eatSpace())return null;if(e.match(n))return o(t,a),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function l(e,r){var i,s=e.peek();return"{"==s||"["==s?(i=t(r),i.openBracket(s),e.eat(s),o(r,a),"bracket"):/[ \t\r]/.test(s)?(e.eat(s),null):(o(r,a),n(r),a(e,r))}var c={};return c.importmodule=i("importmodule","tag",["string","builtin"]),c.documentclass=i("documentclass","tag",["","atom"]),c.usepackage=i("usepackage","tag",["atom"]),c.begin=i("begin","tag",["atom"]),c.end=i("end","tag",["atom"]),c.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:a}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=a,e.cmdState.length=0},lineComment:"%"}}),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return e=e.sort(function(e,t){return t>e}),new RegExp("^(("+e.join(")|(")+"))\\b")}function n(e){for(var t={},n=0;n|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=re?re[0].replace(/^\s*/,""):"",t.context.line.indent=e.indentation(),P=e.peek(),e.match("//"))return e.skipToEnd(),["comment","comment"];if(e.match("/*"))return t.tokenize=v,v(e,t);if('"'==P||"'"==P)return e.next(),t.tokenize=b(P),t.tokenize(e,t);if("@"==P)return e.next(),e.eatWhile(/[\w\\-]/),["def",e.current()];if("#"==P){if(e.next(),e.match(/^[0-9a-f]{6}|[0-9a-f]{3}/i))return["atom","atom"];if(e.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return e.match(te)?["meta","vendor-prefixes"]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),["number","unit"]):"!"==P?(e.next(),[e.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==P&&e.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:e.match(K)?("("==e.peek()&&(t.tokenize=y),["property","word"]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","mixin"]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","block-mixin"]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),["variable-3","reference"]):e.match(/^&{1}\s*$/)?["variable-3","reference"]:e.match(Q)?["operator","operator"]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!C(e.current())?(e.match(/\./),["variable-2","variable-name"]):["variable-2","word"]:e.match(J)?["operator",e.current()]:/[:;,{}\[\]\(\)]/.test(P)?(e.next(),[null,P]):(e.next(),[null,null])}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}function b(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),["string","string"]}}function y(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=b(")"),[null,"("]}function x(e,t,n,r){this.type=e,this.indent=t,this.prev=n,this.line=r||{firstWord:"",indent:0}}function k(e,t,n,r){return r=r>=0?r:j,e.context=new x(n,t.indentation()+r,e.context),n}function w(e,t){var n=e.context.indent-j;return t=t||!1,e.context=e.context.prev,t&&(e.context.indent=n),e.context.type}function _(e,t,n){return ie[n.context.type](e,t,n)}function S(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return _(e,t,n)}function C(e){return e.toLowerCase()in F}function E(e){return e=e.toLowerCase(),e in U||e in Y}function T(e){return e.toLowerCase()in ee}function M(e){return e.toLowerCase().match(te)}function A(e){var t=e.toLowerCase(),n="variable-2";return C(e)?n="tag":T(e)?n="block-keyword":E(e)?n="property":t in H||t in ne?n="atom":"return"==t||t in G?n="keyword":e.match(/^[A-Z]/)&&(n="string"),n}function L(e,t){return R(t)&&("{"==e||"]"==e||"hash"==e||"qualifier"==e)||"block-mixin"==e}function I(e,t){return"{"==e&&t.match(/^\s*\$?[\w-]+/i,!1)}function O(e,t){return":"==e&&t.match(/^[a-z-]+/,!1)}function z(e){return e.sol()||e.string.match(new RegExp("^\\s*"+r(e.current())))}function R(e){return e.eol()||e.match(/^\s*$/,!1)}function N(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,n="string"==typeof e?e.match(t):e.string.match(t);return n?n[0].replace(/^\s*/,""):""}var P,D,q,$,j=e.indentUnit,F=n(i),W=/^(a|b|i|s|col|em)$/i,U=n(l),B=n(c),H=n(f),G=n(d),V=n(o),K=t(o),Z=n(s),X=n(a),Y=n(u),J=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,Q=t(p),ee=n(m),te=new RegExp(/^\-(moz|ms|o|webkit)-/i),ne=n(h),re="",ie={};return ie.block=function(e,t,n){if("comment"==e&&z(t)||","==e&&R(t)||"mixin"==e)return k(n,t,"block",0);if(I(e,t))return k(n,t,"interpolation");if(R(t)&&"]"==e&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!C(N(t)))return k(n,t,"block",0);if(L(e,t,n))return k(n,t,"block");if("}"==e&&R(t))return k(n,t,"block",0);if("variable-name"==e)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||T(N(t))?k(n,t,"variableName"):k(n,t,"variableName",0);if("="==e)return R(t)||T(N(t))?k(n,t,"block"):k(n,t,"block",0);if("*"==e&&(R(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return $="tag",k(n,t,"block");if(O(e,t))return k(n,t,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return k(n,t,R(t)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return k(n,t,"keyframes");if(/@extends?/.test(e))return k(n,t,"extend",0);if(e&&"@"==e.charAt(0))return t.indentation()>0&&E(t.current().slice(1))?($="variable-2","block"):/(@import|@require|@charset)/.test(e)?k(n,t,"block",0):k(n,t,"block");if("reference"==e&&R(t))return k(n,t,"block");if("("==e)return k(n,t,"parens");if("vendor-prefixes"==e)return k(n,t,"vendorPrefixes");if("word"==e){var r=t.current();if($=A(r),"property"==$)return z(t)?k(n,t,"block",0):($="atom","block");if("tag"==$){if(/embed|menu|pre|progress|sub|table/.test(r)&&E(N(t)))return $="atom","block";if(t.string.match(new RegExp("\\[\\s*"+r+"|"+r+"\\s*\\]")))return $="atom","block";if(W.test(r)&&(z(t)&&t.string.match(/=/)||!z(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!C(N(t))))return $="variable-2",T(N(t))?"block":k(n,t,"block",0);if(R(t))return k(n,t,"block")}if("block-keyword"==$)return $="keyword",t.current(/(if|unless)/)&&!z(t)?"block":k(n,t,"block");if("return"==r)return k(n,t,"block",0);if("variable-2"==$&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return k(n,t,"block")}return n.context.type},ie.parens=function(e,t,n){if("("==e)return k(n,t,"parens");if(")"==e)return"parens"==n.context.prev.type?w(n):t.string.match(/^[a-z][\w-]*\(/i)&&R(t)||T(N(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(N(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&C(N(t))?k(n,t,"block"):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?k(n,t,"block",0):R(t)?k(n,t,"block"):k(n,t,"block",0);if(e&&"@"==e.charAt(0)&&E(t.current().slice(1))&&($="variable-2"),"word"==e){var r=t.current();$=A(r),"tag"==$&&W.test(r)&&($="variable-2"),"property"!=$&&"to"!=r||($="atom")}return"variable-name"==e?k(n,t,"variableName"):O(e,t)?k(n,t,"pseudo"):n.context.type},ie.vendorPrefixes=function(e,t,n){return"word"==e?($="property",k(n,t,"block",0)):w(n)},ie.pseudo=function(e,t,n){return E(N(t.string))?S(e,t,n):(t.match(/^[a-z-]+/),$="variable-3",R(t)?k(n,t,"block"):w(n))},ie.atBlock=function(e,t,n){if("("==e)return k(n,t,"atBlock_parens");if(L(e,t,n))return k(n,t,"block");if(I(e,t))return k(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();if($=/^(only|not|and|or)$/.test(r)?"keyword":V.hasOwnProperty(r)?"tag":X.hasOwnProperty(r)?"attribute":Z.hasOwnProperty(r)?"property":B.hasOwnProperty(r)?"string-2":A(t.current()),"tag"==$&&R(t))return k(n,t,"block")}return"operator"==e&&/^(not|and|or)$/.test(t.current())&&($="keyword"),n.context.type},ie.atBlock_parens=function(e,t,n){if("{"==e||"}"==e)return n.context.type;if(")"==e)return R(t)?k(n,t,"block"):k(n,t,"atBlock");if("word"==e){var r=t.current().toLowerCase();return $=A(r),/^(max|min)/.test(r)&&($="property"),"tag"==$&&($=W.test(r)?"variable-2":"atom"),n.context.type}return ie.atBlock(e,t,n)},ie.keyframes=function(e,t,n){return"0"==t.indentation()&&("}"==e&&z(t)||"]"==e||"hash"==e||"qualifier"==e||C(t.current()))?S(e,t,n):"{"==e?k(n,t,"keyframes"):"}"==e?z(t)?w(n,!0):k(n,t,"keyframes"):"unit"==e&&/^[0-9]+\%$/.test(t.current())?k(n,t,"keyframes"):"word"==e&&($=A(t.current()),"block-keyword"==$)?($="keyword",k(n,t,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(e)?k(n,t,R(t)?"block":"atBlock"):"mixin"==e?k(n,t,"block",0):n.context.type},ie.interpolation=function(e,t,n){return"{"==e&&w(n)&&k(n,t,"block"),"}"==e?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&C(N(t))?k(n,t,"block"):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?k(n,t,"block",0):k(n,t,"block"):"variable-name"==e?k(n,t,"variableName",0):("word"==e&&($=A(t.current()),"tag"==$&&($="atom")),n.context.type)},ie.extend=function(e,t,n){return"["==e||"="==e?"extend":"]"==e?w(n):"word"==e?($=A(t.current()),"extend"):w(n)},ie.variableName=function(e,t,n){return"string"==e||"["==e||"]"==e||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&($="variable-2"),"variableName"):S(e,t,n)},{startState:function(e){return{tokenize:null,state:"block",context:new x("block",e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:(D=(t.tokenize||g)(e,t),D&&"object"==typeof D&&(q=D[1],D=D[0]),$=D,t.state=ie[t.state](q,e,t),$)},indent:function(e,t,n){var r=e.context,i=t&&t.charAt(0),o=r.indent,a=N(t),s=n.length-n.replace(/^\s*/,"").length,l=e.context.prev?e.context.prev.line.firstWord:"",c=e.context.prev?e.context.prev.line.indent:s;return r.prev&&("}"==i&&("block"==r.type||"atBlock"==r.type||"keyframes"==r.type)||")"==i&&("parens"==r.type||"atBlock_parens"==r.type)||"{"==i&&"at"==r.type)?(o=r.indent-j,r=r.prev):/(\})/.test(i)||(/@|\$|\d/.test(i)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(l)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||T(a)?o=s:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(i)||C(a)?o=/\,\s*$/.test(l)?c:/^\s+/.test(n)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(l)||C(l))?s<=c?c:c+j:s:/,\s*$/.test(n)||!M(a)&&!E(a)||(o=T(l)?s<=c?c:c+j:/^\{/.test(l)?s<=c?s:c+j:M(l)||E(l)?s>=c?c:s:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(l)||/=\s*$/.test(l)||C(l)||/^\$[\w-\.\[\]\'\"]/.test(l)?c+j:s)),o},electricChars:"}",lineComment:"//",fold:"indent"}});var i=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],o=["domain","regexp","url","url-prefix"],a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=["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"],l=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","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","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","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","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","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-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","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-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","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","justify-content","left","letter-spacing","line-break","line-height","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","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","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","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","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","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-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","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","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","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","font-smoothing","osx-font-smoothing"],c=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],u=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],d=["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","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","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","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","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","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],f=["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","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","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","column","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","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","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","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","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","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","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","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","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","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","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","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","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","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],p=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],m=["for","if","else","unless","from","to"],h=["null","true","false","href","title","type","not-allowed","readonly","disabled"],g=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],v=i.concat(o,a,s,l,c,d,f,u,p,m,h,g);
e.registerHelper("hintWords","stylus",v),e.defineMIME("text/x-styl","stylus")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=0;n-1)return e.next(),"operator";if(m.indexOf(r)>-1)return e.next(),e.match(".."),"punctuation";if('"'==r||"'"==r){e.next();var a=i(r);return t.tokenize.push(a),a(e,t)}if(e.match(y)){var s=e.current();return f.hasOwnProperty(s)?"variable-2":d.hasOwnProperty(s)?"atom":c.hasOwnProperty(s)?(u.hasOwnProperty(s)&&(t.prev="define"),"keyword"):"define"==n?"def":"variable"}return e.next(),null}function r(){var e=0;return function(t,r,i){var o=n(t,r,i);if("punctuation"==o)if("("==t.current())++e;else if(")"==t.current()){if(0==e)return t.backUp(1),r.tokenize.pop(),r.tokenize[r.tokenize.length-1](t,r);--e}return o}}function i(e){return function(t,n){for(var i,o=!1;i=t.next();)if(o){if("("==i)return n.tokenize.push(r()),"string";o=!1}else{if(i==e)break;o="\\"==i}return n.tokenize.pop(),"string"}}function o(e,t){return e.match(/^(?:[^*]|\*(?!\/))*/),e.match("*/")&&t.tokenize.pop(),"comment"}function a(e,t,n){this.prev=e,this.align=t,this.indented=n}function s(e,t){var n=t.match(/^\s*($|\/[\/\*])/,!1)?null:t.column()+1;e.context=new a(e.context,n,e.indented)}function l(e){e.context&&(e.indented=e.context.indented,e.context=e.context.prev)}var c=t(["_","var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super","convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is","break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while","defer","return","inout","mutating","nonmutating","catch","do","rethrows","throw","throws","try","didSet","get","set","willSet","assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right","Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"]),u=t(["var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),d=t(["true","false","nil","self","super","_"]),f=t(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String","UInt8","UInt16","UInt32","UInt64","Void"]),p="+-/*%=|&<>~^?!",m=":;,.(){}[]",h=/^\-?0b[01][01_]*/,g=/^\-?0o[0-7][0-7_]*/,v=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,b=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,y=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,x=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,k=/^\#[A-Za-z]+/,w=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;e.defineMode("swift",function(e){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(e,t){var r=t.prev;t.prev=null;var i=t.tokenize[t.tokenize.length-1]||n,o=i(e,t,r);if(o&&"comment"!=o?t.prev||(t.prev=o):t.prev=r,"punctuation"==o){var a=/[\(\[\{]|([\]\)\}])/.exec(e.current());a&&(a[1]?l:s)(t,e)}return o},indent:function(t,n){var r=t.context;if(!r)return 0;var i=/^[\]\}\)]/.test(n);return null!=r.align?r.align-(i?1:0):r.indented+(i?0:e.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace",closeBrackets:"()[]{}''\"\"``"}}),e.defineMIME("text/x-swift","swift")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("tcl",function(){function e(e){for(var t={},n=e.split(" "),r=0;r!?^\/\|]/;return{startState:function(){return{tokenize:n,beforeParams:!1,inParams:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),e.defineMIME("text/x-tcl","tcl")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){t.mode=f.newLayout,t.tableHeading=!1,"definitionList"===t.layoutType&&t.spanningLayout&&e.match(c("definitionListEnd"),!1)&&(t.spanningLayout=!1)}function n(e,t,n){if("_"===n)return e.eat("_")?r(e,t,"italic",/__/,2):r(e,t,"em",/_/,1);if("*"===n)return e.eat("*")?r(e,t,"bold",/\*\*/,2):r(e,t,"strong",/\*/,1);if("["===n)return e.match(/\d+\]/)&&(t.footCite=!0),i(t);if("("===n){var o=e.match(/^(r|tm|c)\)/);if(o)return a(t,u.specialChar)}if("<"===n&&e.match(/(\w+)[^>]+>[^<]+<\/\1>/))return a(t,u.html);if("?"===n&&e.eat("?"))return r(e,t,"cite",/\?\?/,2);if("="===n&&e.eat("="))return r(e,t,"notextile",/==/,2);if("-"===n&&!e.eat("-"))return r(e,t,"deletion",/-/,1);if("+"===n)return r(e,t,"addition",/\+/,1);if("~"===n)return r(e,t,"sub",/~/,1);if("^"===n)return r(e,t,"sup",/\^/,1);if("%"===n)return r(e,t,"span",/%/,1);if("@"===n)return r(e,t,"code",/@/,1);if("!"===n){var s=r(e,t,"image",/(?:\([^\)]+\))?!/,1);return e.match(/^:\S+/),s}return i(t)}function r(e,t,n,r,o){var a=e.pos>o?e.string.charAt(e.pos-o-1):null,s=e.peek();if(t[n]){if((!s||/\W/.test(s))&&a&&/\S/.test(a)){var l=i(t);return t[n]=!1,l}}else(!a||/\W/.test(a))&&s&&/\S/.test(s)&&e.match(new RegExp("^.*\\S"+r.source+"(?:\\W|$)"),!1)&&(t[n]=!0,t.mode=f.attributes);return i(t)}function i(e){var t=o(e);if(t)return t;var n=[];return e.layoutType&&n.push(u[e.layoutType]),n=n.concat(s(e,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),"header"===e.layoutType&&n.push(u.header+"-"+e.header),n.length?n.join(" "):null}function o(e){var t=e.layoutType;switch(t){case"notextile":case"code":case"pre":return u[t];default:return e.notextile?u.notextile+(t?" "+u[t]:""):null}}function a(e,t){var n=o(e);if(n)return n;var r=i(e);return t?r?r+" "+t:t:r}function s(e){for(var t=[],n=1;n]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(e){switch(e){case"drawTable":return d.makeRe("^",d.single.drawTable,"$");case"html":return d.makeRe("^",d.single.html,"(?:",d.single.html,")*","$");case"linkDefinition":return d.makeRe("^",d.single.linkDefinition,"$");case"listLayout":return d.makeRe("^",d.single.list,c("allAttributes"),"*\\s+");case"tableCellAttributes":return d.makeRe("^",d.choiceRe(d.single.tableCellAttributes,c("allAttributes")),"+\\.");case"type":return d.makeRe("^",c("allTypes"));case"typeLayout":return d.makeRe("^",c("allTypes"),c("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return d.makeRe("^",c("allAttributes"),"+");case"allTypes":return d.choiceRe(d.single.div,d.single.foot,d.single.header,d.single.bc,d.single.bq,d.single.notextile,d.single.pre,d.single.table,d.single.para);case"allAttributes":return d.choiceRe(d.attributes.selector,d.attributes.css,d.attributes.lang,d.attributes.align,d.attributes.pad);default:return d.makeRe("^",d.single[e])}},makeRe:function(){for(var e="",t=0;t|]/.test(w)){if("!"==w)return t.skipToEnd(),"header";if("*"==w)return t.eatWhile("*"),"comment";if("#"==w)return t.eatWhile("#"),"comment";if(";"==w)return t.eatWhile(";"),"comment";if(":"==w)return t.eatWhile(":"),"comment";if(">"==w)return t.eatWhile(">"),"quote";if("|"==w)return"header"}if("{"==w&&t.match(/\{\{/))return e(t,u,i);if(/[hf]/i.test(w)&&/[ti]/i.test(t.peek())&&t.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if('"'==w)return"string";if("~"==w)return"brace";if(/[\[\]]/.test(w)&&t.match(w))return"brace";if("@"==w)return t.eatWhile(d),"link";if(/\d/.test(w))return t.eatWhile(/\d/),"number";if("/"==w){if(t.eat("%"))return e(t,u,n);if(t.eat("/"))return e(t,u,o)}if("_"==w&&t.eat("_"))return e(t,u,a);if("-"==w&&t.eat("-")){if(" "!=t.peek())return e(t,u,s);if(" "==t.peek())return"brace"}return"'"==w&&t.eat("'")?e(t,u,r):"<"==w&&t.eat("<")?e(t,u,l):(t.eatWhile(/[\w\$_]/),c.propertyIsEnumerable(t.current())?"keyword":null)}function n(e,n){for(var r,i=!1;r=e.next();){if("/"==r&&i){n.tokenize=t;break}i="%"==r}return"comment"}function r(e,n){for(var r,i=!1;r=e.next();){if("'"==r&&i){n.tokenize=t;break}i="'"==r}return"strong"}function i(e,n){var r=n.block;return r&&e.current()?"comment":!r&&e.match(w)?(n.tokenize=t,"comment"):r&&e.sol()&&e.match(k)?(n.tokenize=t,"comment"):(e.next(),"comment")}function o(e,n){for(var r,i=!1;r=e.next();){if("/"==r&&i){n.tokenize=t;break}i="/"==r}return"em"}function a(e,n){for(var r,i=!1;r=e.next();){if("_"==r&&i){n.tokenize=t;break}i="_"==r}return"underlined"}function s(e,n){for(var r,i=!1;r=e.next();){if("-"==r&&i){n.tokenize=t;break}i="-"==r}return"strikethrough"}function l(e,n){if("<<"==e.current())return"macro";var r=e.next();return r?">"==r&&">"==e.peek()?(e.next(),n.tokenize=t,"macro"):(e.eatWhile(/[\w\$_]/),u.propertyIsEnumerable(e.current())?"keyword":null):(n.tokenize=t,null)}var c={},u={allTags:!0,closeAll:!0,list:!0,newJournal:!0,newTiddler:!0,permaview:!0,saveChanges:!0,search:!0,slider:!0,tabs:!0,tag:!0,tagging:!0,tags:!0,tiddler:!0,timeline:!0,today:!0,version:!0,option:!0,with:!0,filter:!0},d=/[\w_\-]/i,f=/^\-\-\-\-+$/,p=/^\/\*\*\*$/,m=/^\*\*\*\/$/,h=/^<<<$/,g=/^\/\/\{\{\{$/,v=/^\/\/\}\}\}$/,b=/^$/,y=/^$/,x=/^\{\{\{$/,k=/^\}\}\}$/,w=/.*?\}\}\}/;return{startState:function(){return{tokenize:t}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n}}}),e.defineMIME("text/x-tiddlywiki","tiddlywiki")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("tiki",function(e){function t(e,t,n){return function(i,o){for(;!i.eol();){if(i.match(t)){o.tokenize=r;break}i.next()}return n&&(o.tokenize=n),e}}function n(e){return function(t,n){for(;!t.eol();)t.next();return n.tokenize=r,e}}function r(e,o){function a(t){return o.tokenize=t,t(e,o)}var s=e.sol(),l=e.next();switch(l){case"{":return e.eat("/"),e.eatSpace(),e.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),o.tokenize=i,"tag";case"_":if(e.eat("_"))return a(t("strong","__",r));break;case"'":if(e.eat("'"))return a(t("em","''",r));break;case"(":if(e.eat("("))return a(t("variable-2","))",r));break;case"[":return a(t("variable-3","]",r));case"|":if(e.eat("|"))return a(t("comment","||"));break;case"-":if(e.eat("="))return a(t("header string","=-",r));if(e.eat("-"))return a(t("error tw-deleted","--",r));break;case"=":if(e.match("=="))return a(t("tw-underline","===",r));break;case":":if(e.eat(":"))return a(t("comment","::"));break;case"^":return a(t("tw-box","^"));case"~":if(e.match("np~"))return a(t("meta","~/np~"))}if(s)switch(l){case"!":return a(e.match("!!!!!")?n("header string"):e.match("!!!!")?n("header string"):e.match("!!!")?n("header string"):e.match("!!")?n("header string"):n("header string"));case"*":case"#":case"+":return a(n("tw-listitem bracket"))}return null}function i(e,t){var n=e.next(),i=e.peek();return"}"==n?(t.tokenize=r,"tag"):"("==n||")"==n?"bracket":"="==n?(b="equals",">"==i&&(n=e.next(),i=e.peek()),/[\'\"]/.test(i)||(t.tokenize=a()),"operator"):/[\'\"]/.test(n)?(t.tokenize=o(n),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function o(e){return function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=i;break}return"string"}}function a(){return function(e,t){for(;!e.eol();){var n=e.next(),r=e.peek();if(" "==n||","==n||/[ )}]/.test(r)){t.tokenize=i;break}}return"string"}}function s(){for(var e=arguments.length-1;e>=0;e--)y.cc.push(arguments[e])}function l(){return s.apply(null,arguments),!0}function c(e,t){var n=y.context&&y.context.noIndent;y.context={prev:y.context,pluginName:e,indent:y.indented,startOfLine:t,noIndent:n}}function u(){y.context&&(y.context=y.context.prev)}function d(e){if("openPlugin"==e)return y.pluginName=v,l(m,f(y.startOfLine));if("closePlugin"==e){var t=!1;return y.context?(t=y.context.pluginName!=v,u()):t=!0,t&&(x="error"),l(p(t))}return"string"==e?(y.context&&"!cdata"==y.context.name||c("!cdata"),y.tokenize==r&&u(),l()):l()}function f(e){return function(t){return"selfclosePlugin"==t||"endPlugin"==t?l():"endPlugin"==t?(c(y.pluginName,e),l()):l()}}function p(e){return function(t){return e&&(x="error"),"endPlugin"==t?l():s()}}function m(e){return"keyword"==e?(x="attribute",l(m)):"equals"==e?l(h,m):s()}function h(e){return"keyword"==e?(x="string",l()):"string"==e?l(g):s()}function g(e){return"string"==e?l(g):s()}var v,b,y,x,k=e.indentUnit;return{startState:function(){return{tokenize:r,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,t){if(e.sol()&&(t.startOfLine=!0,t.indented=e.indentation()),e.eatSpace())return null;x=b=v=null;var n=t.tokenize(e,t);if((n||b)&&"comment"!=n)for(y=t;;){var r=t.cc.pop()||d;if(r(b||n))break}return t.startOfLine=!1,x||n},indent:function(e,t){var n=e.context;if(n&&n.noIndent)return 0;for(n&&/^{\//.test(t)&&(n=n.prev);n&&!n.startOfLine;)n=n.prev;return n?n.indent+k:0},electricChars:"/"}}),e.defineMIME("text/tiki","tiki")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(e,t){if(t.inString||'"'!=e.peek()&&"'"!=e.peek()||(t.stringType=e.peek(),e.next(),t.inString=!0),e.sol()&&0===t.inArray&&(t.lhs=!0),t.inString){for(;t.inString&&!e.eol();)e.peek()===t.stringType?(e.next(),t.inString=!1):"\\"===e.peek()?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return t.lhs?"property string":"string"}return t.inArray&&"]"===e.peek()?(e.next(),t.inArray--,"bracket"):t.lhs&&"["===e.peek()&&e.skipTo("]")?(e.next(),"]"===e.peek()&&e.next(),"atom"):"#"===e.peek()?(e.skipToEnd(),"comment"):e.eatSpace()?null:t.lhs&&e.eatWhile(function(e){return"="!=e&&" "!=e})?"property":t.lhs&&"="===e.peek()?(e.next(),t.lhs=!1,null):!t.lhs&&e.match(/^\d\d\d\d[\d\-\:\.T]*Z/)?"atom":t.lhs||!e.match("true")&&!e.match("false")?t.lhs||"["!==e.peek()?!t.lhs&&e.match(/^\-?\d+(?:\.\d+)?/)?"number":(e.eatSpace()||e.next(),null):(t.inArray++,e.next(),"bracket"):"atom"}}}),e.defineMIME("text/x-toml","toml")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("troff",function(){function e(e){if(e.eatSpace())return null;var t=e.sol(),r=e.next();if("\\"===r)return e.match("fB")||e.match("fR")||e.match("fI")||e.match("u")||e.match("d")||e.match("%")||e.match("&")?"string":e.match("m[")?(e.skipTo("]"),e.next(),"string"):e.match("s+")||e.match("s-")?(e.eatWhile(/[\d-]/),"string"):e.match("(")||e.match("*(")?(e.eatWhile(/[\w-]/),"string"):"string";if(t&&("."===r||"'"===r)&&e.eat("\\")&&e.eat('"'))return e.skipToEnd(),"comment";if(t&&"."===r){if(e.match("B ")||e.match("I ")||e.match("R "))return"attribute";if(e.match("TH ")||e.match("SH ")||e.match("SS ")||e.match("HP "))return e.skipToEnd(),"quote";if(e.match(/[A-Z]/)&&e.match(/[A-Z]/)||e.match(/[a-z]/)&&e.match(/[a-z]/))return"attribute"}e.eatWhile(/[\w-]/);var i=e.current();return n.hasOwnProperty(i)?n[i]:null}function t(t,n){return(n.tokens[0]||e)(t,n)}var n={};return{startState:function(){return{tokens:[]}},token:function(e,n){return t(e,n)}}}),e.defineMIME("text/troff","troff"),e.defineMIME("text/x-troff","troff"),e.defineMIME("application/x-troff","troff")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r!\/]/;return{startState:function(e){return{tokenize:null,context:new o((e||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var r=t.context;if(e.sol()&&(null==r.align&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;l=null;var i=(t.tokenize||n)(e,t);if("comment"==i)return i;if(null==r.align&&(r.align=!0),";"!=l&&":"!=l&&","!=l||"statement"!=r.type)if("{"==l)a(t,e.column(),"}");else if("["==l)a(t,e.column(),"]");else if("("==l)a(t,e.column(),")");else if("}"==l){for(;"statement"==r.type;)r=s(t);for("}"==r.type&&(r=s(t));"statement"==r.type;)r=s(t)}else l==r.type?s(t):C&&(("}"==r.type||"top"==r.type)&&";"!=l||"statement"==r.type&&"newstatement"==l)&&a(t,e.column(),"statement");else s(t);return t.startOfLine=!1,i},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),n(["text/x-ttcn","text/x-ttcn3","text/x-ttcnpp"],{name:"ttcn",keywords:t("activate address alive all alt altstep and and4b any break case component const continue control deactivate display do else encode enumerated except exception execute extends extension external for from function goto group if import in infinity inout interleave label language length log match message mixed mod modifies module modulepar mtc noblock not not4b nowait of on optional or or4b out override param pattern port procedure record recursive rem repeat return runs select self sender set signature system template testcase to type union value valueof var variant while with xor xor4b"),builtin:t("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue decomp decvalue float2int float2str hex2bit hex2int hex2oct hex2str int2bit int2char int2float int2hex int2oct int2str int2unichar isbound ischosen ispresent isvalue lengthof log2str oct2bit oct2char oct2hex oct2int oct2str regexp replace rnd sizeof str2bit str2float str2hex str2int str2oct substr unichar2int unichar2char enum2int"),types:t("anytype bitstring boolean char charstring default float hexstring integer objid octetstring universal verdicttype timer"),timerOps:t("read running start stop timeout"),portOps:t("call catch check clear getcall getreply halt raise receive reply send trigger"),configOps:t("create connect disconnect done kill killed map unmap"),verdictOps:t("getverdict setverdict"),sutOps:t("action"),functionOps:t("apply derefers refers"),verdictConsts:t("error fail inconc none pass"),booleanConsts:t("true false"),otherConsts:t("null NULL omit"),visibilityModifiers:t("private public friend"),templateMatch:t("complement ifpresent subset superset permutation"),multiLineStrings:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r]*>?/),"atom";if('"'==n||"'"==n)return t.tokenize=r(n),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(n))return a=n,null;if("#"==n)return e.skipToEnd(),"comment";if(c.test(n))return e.eatWhile(c),null;if(":"==n)return"operator";if(e.eatWhile(/[_\w\d]/),":"==e.peek())return"variable-3";var i=e.current();return l.test(i)?"meta":n>="A"&&n<="Z"?"comment":"keyword";var i}function r(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){r.tokenize=n;break}o=!o&&"\\"==i}return"string"}}function i(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function o(e){e.indent=e.context.indent,e.context=e.context.prev}var a,s=e.indentUnit,l=(t([]),t(["@prefix","@base","a"])),c=/[*+\-<>=&|]/;return{startState:function(){return{tokenize:n,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&null==t.context.align&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"!=n&&t.context&&null==t.context.align&&"pattern"!=t.context.type&&(t.context.align=!0),"("==a)i(t,")",e.column());else if("["==a)i(t,"]",e.column());else if("{"==a)i(t,"}",e.column());else if(/[\]\}\)]/.test(a)){for(;t.context&&"pattern"==t.context.type;)o(t);t.context&&a==t.context.type&&o(t)}else"."==a&&t.context&&"pattern"==t.context.type?o(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?i(t,"pattern",e.column()):"pattern"!=t.context.type||t.context.align||(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t){var n=t&&t.charAt(0),r=e.context;if(/[\]\}]/.test(n))for(;r&&"pattern"==r.type;)r=r.prev;var i=r&&n==r.type;return r?"pattern"==r.type?r.col:r.align?r.col+(i?0:1):r.indent+(i?0:s):0},lineComment:"#"}}),e.defineMIME("text/turtle","turtle")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("vb",function(t,n){function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function i(e,t){t.currentIndent++}function o(e,t){t.currentIndent--}function a(e,t){if(e.eatSpace())return null;var n=e.peek();if("'"===n)return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var r=!1;if(e.match(/^\d*\.\d+F?/i)?r=!0:e.match(/^\d+\.\d*F?/)?r=!0:e.match(/^\.\d+F?/)&&(r=!0),r)return e.eat(/J/i),"number";var a=!1;if(e.match(/^&H[0-9a-f]+/i)?a=!0:e.match(/^&O[0-7]+/i)?a=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),a=!0):e.match(/^0(?![\dx])/i)&&(a=!0),a)return e.eat(/L/i),"number"}return e.match(C)?(t.tokenize=s(e.current()),t.tokenize(e,t)):e.match(m)||e.match(p)?null:e.match(f)||e.match(u)||e.match(x)?"operator":e.match(d)?null:e.match(L)?(i(e,t),t.doInCurrentLine=!0,"keyword"):e.match(E)?(t.doInCurrentLine?t.doInCurrentLine=!1:i(e,t),"keyword"):e.match(T)?"keyword":e.match(A)?(o(e,t),o(e,t),"keyword"):e.match(M)?(o(e,t),"keyword"):e.match(S)?"keyword":e.match(_)?"keyword":e.match(h)?"variable":(e.next(),c)}function s(e){var t=1==e.length,r="string";return function(i,o){for(;!i.eol();){if(i.eatWhile(/[^'"]/),i.match(e))return o.tokenize=a,r;i.eat(/['"]/)}if(t){if(n.singleLineStringErrors)return c;o.tokenize=a}return r}}function l(e,t){var n=t.tokenize(e,t),r=e.current();if("."===r)return n=t.tokenize(e,t),r=e.current(),"variable"===n?"variable":c;var a="[({".indexOf(r);return a!==-1&&i(e,t),"dedent"===I&&o(e,t)?c:(a="])}".indexOf(r),a!==-1&&o(e,t)?c:n)}var c="error",u=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),d=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),f=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),p=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),m=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),h=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),g=["class","module","sub","enum","select","while","if","function","get","set","property","try"],v=["else","elseif","case","catch"],b=["next","loop"],y=["and","or","not","xor","in"],x=r(y),k=["as","dim","break","continue","optional","then","until","goto","byval","byref","new","handles","property","return","const","private","protected","friend","public","shared","static","true","false"],w=["integer","string","double","decimal","boolean","short","char","float","single"],_=r(k),S=r(w),C='"',E=r(g),T=r(v),M=r(b),A=r(["end"]),L=r(["do"]),I=null;e.registerHelper("hintWords","vb",g.concat(v).concat(b).concat(y).concat(k).concat(w));var O={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:a,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=l(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e,n){var r=n.replace(/^\s+|\s+$/g,"");return r.match(M)||r.match(A)||r.match(T)?t.indentUnit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*t.indentUnit},lineComment:"'"};return O}),e.defineMIME("text/x-vb","vb")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("vbscript",function(e,t){function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function r(e,t){t.currentIndent++}function i(e,t){t.currentIndent--}function o(e,t){if(e.eatSpace())return"space";var n=e.peek();if("'"===n)return e.skipToEnd(),"comment";if(e.match(F))return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var o=!1;if(e.match(/^\d*\.\d+/i)?o=!0:e.match(/^\d+\.\d*/)?o=!0:e.match(/^\.\d+/)&&(o=!0),o)return e.eat(/J/i),"number";var s=!1;if(e.match(/^&H[0-9a-f]+/i)?s=!0:e.match(/^&O[0-7]+/i)?s=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),s=!0):e.match(/^0(?![\dx])/i)&&(s=!0),s)return e.eat(/L/i),"number"}return e.match(R)?(t.tokenize=a(e.current()),t.tokenize(e,t)):e.match(u)||e.match(c)||e.match(v)?"operator":e.match(d)?null:e.match(f)?"bracket":e.match(j)?(t.doInCurrentLine=!0,"keyword"):e.match($)?(r(e,t),t.doInCurrentLine=!0,"keyword"):e.match(N)?(t.doInCurrentLine?t.doInCurrentLine=!1:r(e,t),"keyword"):e.match(P)?"keyword":e.match(q)?(i(e,t),i(e,t),"keyword"):e.match(D)?(t.doInCurrentLine?t.doInCurrentLine=!1:i(e,t),"keyword"):e.match(A)?"keyword":e.match(L)?"atom":e.match(z)?"variable-2":e.match(I)?"builtin":e.match(O)?"variable-2":e.match(p)?"variable":(e.next(),l)}function a(e){var n=1==e.length,r="string";return function(i,a){for(;!i.eol();){if(i.eatWhile(/[^'"]/),i.match(e))return a.tokenize=o,r;i.eat(/['"]/)}if(n){if(t.singleLineStringErrors)return l;a.tokenize=o}return r}}function s(e,t){var n=t.tokenize(e,t),r=e.current();return"."===r?(n=t.tokenize(e,t),r=e.current(),!n||"variable"!==n.substr(0,8)&&"builtin"!==n&&"keyword"!==n?l:("builtin"!==n&&"keyword"!==n||(n="variable"),M.indexOf(r.substr(1))>-1&&(n="variable-2"),n)):n}var l="error",c=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),u=new RegExp("^((<>)|(<=)|(>=))"),d=new RegExp("^[\\.,]"),f=new RegExp("^[\\(\\)]"),p=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),m=["class","sub","select","while","if","function","property","with","for"],h=["else","elseif","case"],g=["next","loop","wend"],v=n(["and","or","not","xor","is","mod","eqv","imp"]),b=["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"],y=["true","false","nothing","empty","null"],x=["abs","array","asc","atn","cbool","cbyte","ccur","cdate","cdbl","chr","cint","clng","cos","csng","cstr","date","dateadd","datediff","datepart","dateserial","datevalue","day","escape","eval","execute","exp","filter","formatcurrency","formatdatetime","formatnumber","formatpercent","getlocale","getobject","getref","hex","hour","inputbox","instr","instrrev","int","fix","isarray","isdate","isempty","isnull","isnumeric","isobject","join","lbound","lcase","left","len","loadpicture","log","ltrim","rtrim","trim","maths","mid","minute","month","monthname","msgbox","now","oct","replace","rgb","right","rnd","round","scriptengine","scriptenginebuildversion","scriptenginemajorversion","scriptengineminorversion","second","setlocale","sgn","sin","space","split","sqr","strcomp","string","strreverse","tan","time","timer","timeserial","timevalue","typename","ubound","ucase","unescape","vartype","weekday","weekdayname","year"],k=["vbBlack","vbRed","vbGreen","vbYellow","vbBlue","vbMagenta","vbCyan","vbWhite","vbBinaryCompare","vbTextCompare","vbSunday","vbMonday","vbTuesday","vbWednesday","vbThursday","vbFriday","vbSaturday","vbUseSystemDayOfWeek","vbFirstJan1","vbFirstFourDays","vbFirstFullWeek","vbGeneralDate","vbLongDate","vbShortDate","vbLongTime","vbShortTime","vbObjectError","vbOKOnly","vbOKCancel","vbAbortRetryIgnore","vbYesNoCancel","vbYesNo","vbRetryCancel","vbCritical","vbQuestion","vbExclamation","vbInformation","vbDefaultButton1","vbDefaultButton2","vbDefaultButton3","vbDefaultButton4","vbApplicationModal","vbSystemModal","vbOK","vbCancel","vbAbort","vbRetry","vbIgnore","vbYes","vbNo","vbCr","VbCrLf","vbFormFeed","vbLf","vbNewLine","vbNullChar","vbNullString","vbTab","vbVerticalTab","vbUseDefault","vbTrue","vbFalse","vbEmpty","vbNull","vbInteger","vbLong","vbSingle","vbDouble","vbCurrency","vbDate","vbString","vbObject","vbError","vbBoolean","vbVariant","vbDataObject","vbDecimal","vbByte","vbArray"],w=["WScript","err","debug","RegExp"],_=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],S=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],C=["server","response","request","session","application"],E=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],T=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],M=S.concat(_);w=w.concat(k),e.isASP&&(w=w.concat(C),M=M.concat(T,E));var A=n(b),L=n(y),I=n(x),O=n(w),z=n(M),R='"',N=n(m),P=n(h),D=n(g),q=n(["end"]),$=n(["do"]),j=n(["on error resume next","exit"]),F=n(["rem"]),W={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:o,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=s(e,t);return t.lastToken={style:n,content:e.current()},"space"===n&&(n=null),n},indent:function(t,n){var r=n.replace(/^\s+|\s+$/g,"");return r.match(D)||r.match(q)||r.match(P)?e.indentUnit*(t.currentIndent-1):t.currentIndent<0?0:t.currentIndent*e.indentUnit}};return W}),e.defineMIME("text/vbscript","vbscript")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("velocity",function(){function e(e){for(var t={},n=e.split(" "),r=0;rf.length&&"."==e.string.charAt(e.pos-f.length-1)&&n.lastTokenWasBuiltin?"builtin":(n.lastTokenWasBuiltin=!1,null)}return n.lastTokenWasBuiltin=!1,n.inString?(n.inString=!1,"string"):n.inParams?t(e,n,r(d)):void 0}function r(e){return function(t,r){for(var i,o=!1,a=!1;null!=(i=t.next());){if(i==e&&!o){a=!0;break}if('"'==e&&"$"==t.peek()&&!o){r.inString=!0,a=!0;break}o=!o&&"\\"==i}return a&&(r.tokenize=n),"string"}}function i(e,t){for(var r,i=!1;r=e.next();){if("#"==r&&i){t.tokenize=n;break}i="*"==r}return"comment"}function o(e,t){for(var r,i=0;r=e.next();){if("#"==r&&2==i){t.tokenize=n;break}"]"==r?i++:" "!=r&&(i=0)}return"meta"}var a=e("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),s=e("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),l=e("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"),c=/[+\-*&%=<>!?:\/|]/;return{startState:function(){return{tokenize:n,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"#*",blockCommentEnd:"*#",lineComment:"##",fold:"velocity"}}),e.defineMIME("text/velocity","velocity")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n){var r=t/o;return"tlv-"+e.tlvIndentationStyle[r]+"-"+n}function n(e){var t;return(t=e.match(s,!1))&&t[2].length>0}e.defineMode("verilog",function(t,n){function r(e){for(var t={},n=e.split(" "),r=0;r=0)return r}var o=t.context,a=n&&n.charAt(0);"statement"==o.type&&"}"==a&&(o=o.prev);var s=!1,l=n.match(A);return l&&(s=u(l[0],o.type)),"statement"==o.type?o.indented+("{"==a?0:h):L.test(o.type)&&o.align&&!g?o.column+(s?0:1):")"!=o.type||s?o.indented+(s?0:m):o.indented+h},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),e.defineMIME("text/x-verilog",{name:"verilog"}),e.defineMIME("text/x-systemverilog",{name:"verilog"});var r={"|":"link",">":"property",$:"variable",$$:"variable","?$":"qualifier","?*":"qualifier","-":"hr","/":"property","/-":"property","@":"variable-3","@-":"variable-3","@++":"variable-3","@+=":"variable-3","@+=-":"variable-3","@--":"variable-3","@-=":"variable-3","%+":"tag","%-":"tag","%":"tag",">>":"tag","<<":"tag","<>":"tag","#":"tag","^":"attribute","^^":"attribute","^!":"attribute","*":"variable-2","**":"variable-2","\\":"keyword",'"':"comment"},i={"/":"beh-hier",">":"beh-hier","-":"phys-hier","|":"pipe","?":"when","@":"stage","\\":"keyword"},o=3,a=!1,s=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,l=/^[! ]  /,c=/^[! ] */,u=/^\/[\/\*]/;e.defineMIME("text/x-tlv",{name:"verilog",hooks:{electricInput:!1,token:function(e,d){var f,p=void 0;if(e.sol()&&!d.tlvInBlockComment){"\\"==e.peek()&&(p="def",e.skipToEnd(),e.string.match(/\\SV/)?d.tlvCodeActive=!1:e.string.match(/\\TLV/)&&(d.tlvCodeActive=!0)),d.tlvCodeActive&&0==e.pos&&0==d.indented&&(f=e.match(c,!1))&&(d.indented=f[0].length);var m=d.indented,h=m/o;if(h<=d.tlvIndentationStyle.length){var g=e.string.length==m,v=h*o;if(v0||(d.tlvIndentationStyle[h]=i[y],a&&(d.statementComment=!1),h++))}if(!g)for(;d.tlvIndentationStyle.length>h;)d.tlvIndentationStyle.pop()}d.tlvNextIndent=m}if(d.tlvCodeActive){var x=!1;a&&(x=" "!=e.peek()&&void 0===p&&!d.tlvInBlockComment&&e.column()==d.tlvIndentationStyle.length*o,x&&(d.statementComment&&(x=!1),d.statementComment=e.match(u,!1)));var f;if(void 0!==p)p+=" "+t(d,0,"scope-ident");else if(e.pos/o0||e.eol())?(p=r[k],e.column()==d.indented&&(p+=" "+t(d,e.column(),"scope-ident"))):(e.backUp(e.current().length-1),p="tlv-default")}else e.match(/^\t+/)?p="tlv-tab":e.match(/^[\[\]{}\(\);\:]+/)?p="meta":(f=e.match(/^[mM]4([\+_])?[\w\d_]*/))?p="+"==f[1]?"tlv-m4-plus":"tlv-m4":e.match(/^ +/)?p=e.eol()?"error":"tlv-default":e.match(/^[\w\d_]+/)?p="number":(e.next(),p="tlv-default");x&&(p+=" tlv-statement")}else e.match(/^[mM]4([\w\d_]*)/)&&(p="tlv-m4");return p},indent:function(e){return 1==e.tlvCodeActive?e.tlvNextIndent:-1},startState:function(e){e.tlvIndentationStyle=[],e.tlvCodeActive=!0,e.tlvNextIndent=-1,e.tlvInBlockComment=!1,a&&(e.statementComment=!1)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=e.split(","),r=0;r?]/,g=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,v=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,b=/^_?[A-Za-z][0-9A-Z_a-z-]*/,y=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,x=/^"[^"]*"/,k=/^\/\*.*?\*\//,w=/^\/\*.*/,_=/^.*?\*\//;e.defineMode("webidl",function(){return{startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(e,t){var r=n(e,t);if(r){var i=e.current();t.lastToken=i,"keyword"===r?(t.startDef=f.test(i),t.endDef=t.endDef||m.test(i)):t.startDef=!1}return r}}}),e.defineMIME("text/x-webidl","webidl")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(r,i){function o(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(l("atom","]]>")):null:e.match("--")?n(l("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(E=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();
if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,E=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return E="equals",null;if("<"==n){t.tokenize=o,t.state=p,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=s(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function l(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(_.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!_.contextGrabbers.hasOwnProperty(n)||!_.contextGrabbers[n].hasOwnProperty(t))return;d(e)}}function p(e,t,n){return"openTag"==e?(n.tagStart=t.column(),m):"closeTag"==e?h:p}function m(e,t,n){return"word"==e?(n.tagName=t.current(),T="tag",b):(T="error",m)}function h(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&_.implicitlyClosed.hasOwnProperty(n.context.tagName)&&d(n),n.context&&n.context.tagName==r||_.matchClosing===!1?(T="tag",g):(T="tag error",v)}return T="error",v}function g(e,t,n){return"endTag"!=e?(T="error",g):(d(n),p)}function v(e,t,n){return T="error",g(e,t,n)}function b(e,t,n){if("word"==e)return T="attribute",y;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||_.autoSelfClosers.hasOwnProperty(r)?f(n,r):(f(n,r),n.context=new u(n,r,i==n.indented)),p}return T="error",b}function y(e,t,n){return"equals"==e?x:(_.allowMissing||(T="error"),b(e,t,n))}function x(e,t,n){return"string"==e?k:"word"==e&&_.allowUnquoted?(T="string",b):(T="error",b(e,t,n))}function k(e,t,n){return"string"==e?k:b(e,t,n)}var w=r.indentUnit,_={},S=i.htmlMode?t:n;for(var C in S)_[C]=S[C];for(var C in i)_[C]=i[C];var E,T;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;E=null;var n=t.tokenize(e,t);return(n||E)&&"comment"!=n&&(T=null,t.state=t.state(E||n,e,t),T&&(n="error"==T?n+" error":T)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return _.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+w*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/$/,blockCommentStart:"",configuration:_.htmlMode?"html":"xml",helperType:_.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=b)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("xquery",function(){function e(e,t,n){return t.tokenize=n,n(e,t)}function t(t,a){var d=t.next(),p=!1,h=m(t);if("<"==d){if(t.match("!--",!0))return e(t,a,s);if(t.match("![CDATA",!1))return a.tokenize=l,"tag";if(t.match("?",!1))return e(t,a,c);var y=t.eat("/");t.eatSpace();for(var x,k="";x=t.eat(/[^\s\u00a0=<>\"\'\/?]/);)k+=x;return e(t,a,o(k,y))}if("{"==d)return g(a,{type:"codeblock"}),null;if("}"==d)return v(a),null;if(u(a))return">"==d?"tag":"/"==d&&t.eat(">")?(v(a),"tag"):"variable";if(/\d/.test(d))return t.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if("("===d&&t.eat(":"))return g(a,{type:"comment"}),e(t,a,n);if(h||'"'!==d&&"'"!==d){if("$"===d)return e(t,a,i);if(":"===d&&t.eat("="))return"keyword";if("("===d)return g(a,{type:"paren"}),null;if(")"===d)return v(a),null;if("["===d)return g(a,{type:"bracket"}),null;if("]"===d)return v(a),null;var w=b.propertyIsEnumerable(d)&&b[d];if(h&&'"'===d)for(;'"'!==t.next(););if(h&&"'"===d)for(;"'"!==t.next(););w||t.eatWhile(/[\w\$_-]/);var _=t.eat(":");!t.eat(":")&&_&&t.eatWhile(/[\w\$_-]/),t.match(/^[ \t]*\(/,!1)&&(p=!0);var S=t.current();return w=b.propertyIsEnumerable(S)&&b[S],p&&!w&&(w={type:"function_call",style:"variable def"}),f(a)?(v(a),"variable"):("element"!=S&&"attribute"!=S&&"axis_specifier"!=w.type||g(a,{type:"xmlconstructor"}),w?w.style:"variable")}return e(t,a,r(d))}function n(e,t){for(var n,r=!1,i=!1,o=0;n=e.next();){if(")"==n&&r){if(!(o>0)){v(t);break}o--}else":"==n&&i&&o++;r=":"==n,i="("==n}return"comment"}function r(e,n){return function(i,o){var a;if(p(o)&&i.current()==e)return v(o),n&&(o.tokenize=n),"string";if(g(o,{type:"string",name:e,tokenize:r(e,n)}),i.match("{",!1)&&d(o))return o.tokenize=t,"string";for(;a=i.next();){if(a==e){v(o),n&&(o.tokenize=n);break}if(i.match("{",!1)&&d(o))return o.tokenize=t,"string"}return"string"}}function i(e,n){var r=/[\w\$_-]/;if(e.eat('"')){for(;'"'!==e.next(););e.eat(":")}else e.eatWhile(r),e.match(":=",!1)||e.eat(":");return e.eatWhile(r),n.tokenize=t,"variable"}function o(e,n){return function(r,i){return r.eatSpace(),n&&r.eat(">")?(v(i),i.tokenize=t,"tag"):(r.eat("/")||g(i,{type:"tag",name:e,tokenize:t}),r.eat(">")?(i.tokenize=t,"tag"):(i.tokenize=a,"tag"))}}function a(n,i){var o=n.next();return"/"==o&&n.eat(">")?(d(i)&&v(i),u(i)&&v(i),"tag"):">"==o?(d(i)&&v(i),"tag"):"="==o?null:'"'==o||"'"==o?e(n,i,r(o,a)):(d(i)||g(i,{type:"attribute",tokenize:a}),n.eat(/[a-zA-Z_:]/),n.eatWhile(/[-a-zA-Z0-9_:.]/),n.eatSpace(),(n.match(">",!1)||n.match("/",!1))&&(v(i),i.tokenize=t),"attribute")}function s(e,n){for(var r;r=e.next();)if("-"==r&&e.match("->",!0))return n.tokenize=t,"comment"}function l(e,n){for(var r;r=e.next();)if("]"==r&&e.match("]",!0))return n.tokenize=t,"comment"}function c(e,n){for(var r;r=e.next();)if("?"==r&&e.match(">",!0))return n.tokenize=t,"comment meta"}function u(e){return h(e,"tag")}function d(e){return h(e,"attribute")}function f(e){return h(e,"xmlconstructor")}function p(e){return h(e,"string")}function m(e){return'"'===e.current()?e.match(/^[^\"]+\"\:/,!1):"'"===e.current()&&e.match(/^[^\"]+\'\:/,!1)}function h(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function g(e,t){e.stack.push(t)}function v(e){e.stack.pop();var n=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=n||t}var b=function(){function e(e){return{type:e,style:"keyword"}}for(var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={type:"punctuation",style:null},s={type:"axis_specifier",style:"qualifier"},l={if:t,switch:t,while:t,for:t,else:n,then:n,try:n,finally:n,catch:n,element:r,attribute:r,let:r,implements:r,import:r,module:r,namespace:r,return:r,super:r,this:r,throws:r,where:r,private:r,",":a,null:o,"fn:false()":o,"fn:true()":o},c=["after","ancestor","ancestor-or-self","and","as","ascending","assert","attribute","before","by","case","cast","child","comment","declare","default","define","descendant","descendant-or-self","descending","document","document-node","element","else","eq","every","except","external","following","following-sibling","follows","for","function","if","import","in","instance","intersect","item","let","module","namespace","node","node","of","only","or","order","parent","precedes","preceding","preceding-sibling","processing-instruction","ref","return","returns","satisfies","schema","schema-element","self","some","sortby","stable","text","then","to","treat","typeswitch","union","variable","version","where","xquery","empty-sequence"],u=0,d=c.length;u",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"],u=0,d=p.length;u|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":"error"}function o(e,t){for(var n,r=!1,o=!1;null!=(n=e.next());){if('"'===n&&!o){r=!0;break}o=!o&&"\\"===n}return r&&!o&&(t.tokenize=i),"string"}function a(e,t){for(var n,r;null!=(r=e.next());){if("*"===n&&"/"===r){t.tokenize=i;break}n=r}return"comment"}function s(e){var t=null;return e.scopes.length>0&&(t=e.scopes[e.scopes.length-1]),t}var l=r("Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While"),c="(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)",u="(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)",d=new RegExp(c),f=new RegExp(u),p=new RegExp(u+"?_"+u),m=new RegExp(u+"\\s*\\(");return{startState:function(){return{tokenize:i,scopes:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},indent:function(n,r){if(n.tokenize!==i&&null!==n.tokenize)return e.Pass;var o=0;return"]"!==r&&"];"!==r&&"}"!==r&&"};"!==r&&");"!==r||(o=-1),(n.scopes.length+o)*t.indentUnit},electricChars:"{}[]();",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),e.defineMIME("text/x-yacas",{name:"yacas"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("yaml",function(){var e=["true","false","on","off","yes","no"],t=new RegExp("\\b(("+e.join(")|(")+"))$","i");return{token:function(e,n){var r=e.peek(),i=n.escaped;if(n.escaped=!1,"#"==r&&(0==e.pos||/\s/.test(e.string.charAt(e.pos-1))))return e.skipToEnd(),"comment";if(e.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&e.indentation()>n.keyCol)return e.skipToEnd(),"string";if(n.literal&&(n.literal=!1),e.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return e.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,e.next(),"meta";if(n.pairStart){if(e.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(t))return"keyword"}return!n.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=e.indentation(),"atom"):n.pair&&e.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("z80",function(e,t){var n,r,i=t.ez80;i?(n=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,r=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(n=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,r=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var o=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,a=/^(n?[zc]|p[oe]?|m)\b/i,s=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,l=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{startState:function(){return{context:0}},token:function(e,t){if(e.column()||(t.context=0),e.eatSpace())return null;var c;if(e.eatWhile(/\w/)){if(i&&e.eat(".")&&e.eatWhile(/\w/),c=e.current(),!e.indentation())return e.match(l)?"number":null;if((1==t.context||4==t.context)&&o.test(c))return t.context=4,"var2";if(2==t.context&&a.test(c))return t.context=4,"var3";if(n.test(c))return t.context=1,"keyword";if(r.test(c))return t.context=2,"keyword";if(4==t.context&&l.test(c))return"number";if(s.test(c))return"error"}else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(c=e.next())&&'"'!=c;)"\\"==c&&e.next();return"string"}if(e.eat("'")){if(e.match(/\\?.'/))return"number"}else if(e.eat(".")||e.sol()&&e.eat("#")){if(t.context=5,e.eatWhile(/\w/))return"def"}else if(e.eat("$")){if(e.eatWhile(/[\da-f]/i))return"number"}else if(e.eat("%")){if(e.eatWhile(/[01]/))return"number"}else e.next()}return null}}}),e.defineMIME("text/x-z80","z80"),e.defineMIME("text/x-ez80",{name:"z80",ez80:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{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"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{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",mime:"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:"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"]},{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"],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:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{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",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","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",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","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:"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",mime:"text/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:"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:"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"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{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:"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"]}];for(var t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n0&&(t.tokenize=r(t),null)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=l(1),t.tokenize(e,t))}}}),e.registerHelper("hintWords","application/dart",c.concat(d).concat(f)),e.defineMode("dart",function(t){return e.getMode(t,"application/dart")},"clike")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("django:inner",function(){function e(e,t){if(e.match("{{"))return t.tokenize=n,"tag";if(e.match("{%"))return t.tokenize=r,"tag";if(e.match("{#"))return t.tokenize=i,"comment";for(;null!=e.next()&&!e.match(/\{[{%#]/,!1););return null}function t(e,t){return function(n,r){if(!r.escapeNext&&n.eat(e))r.tokenize=t;else{r.escapeNext&&(r.escapeNext=!1);var i=n.next();"\\"==i&&(r.escapeNext=!0)}return"string"}}function n(n,r){if(r.waitDot){if(r.waitDot=!1,"."!=n.peek())return"null";if(n.match(/\.\W+/))return"error";if(n.eat("."))return r.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(r.waitPipe){if(r.waitPipe=!1,"|"!=n.peek())return"null";if(n.match(/\.\W+/))return"error";if(n.eat("|"))return r.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}return r.waitProperty&&(r.waitProperty=!1,n.match(/\b(\w+)\b/))?(r.waitDot=!0,r.waitPipe=!0,"property"):r.waitFilter&&(r.waitFilter=!1,n.match(s))?"variable-2":n.eatSpace()?(r.waitProperty=!1,"null"):n.match(/\b\d+(\.\d+)?\b/)?"number":n.match("'")?(r.tokenize=t("'",r.tokenize),"string"):n.match('"')?(r.tokenize=t('"',r.tokenize),"string"):n.match(/\b(\w+)\b/)&&!r.foundVariable?(r.waitDot=!0,r.waitPipe=!0,"variable"):n.match("}}")?(r.waitProperty=null,r.waitFilter=null,r.waitDot=null,r.waitPipe=null,r.tokenize=e,"tag"):(n.next(),"null")}function r(n,r){if(r.waitDot){if(r.waitDot=!1,"."!=n.peek())return"null";if(n.match(/\.\W+/))return"error";if(n.eat("."))return r.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(r.waitPipe){if(r.waitPipe=!1,"|"!=n.peek())return"null";if(n.match(/\.\W+/))return"error";
if(n.eat("|"))return r.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}if(r.waitProperty&&(r.waitProperty=!1,n.match(/\b(\w+)\b/)))return r.waitDot=!0,r.waitPipe=!0,"property";if(r.waitFilter&&(r.waitFilter=!1,n.match(s)))return"variable-2";if(n.eatSpace())return r.waitProperty=!1,"null";if(n.match(/\b\d+(\.\d+)?\b/))return"number";if(n.match("'"))return r.tokenize=t("'",r.tokenize),"string";if(n.match('"'))return r.tokenize=t('"',r.tokenize),"string";if(n.match(l))return"operator";if(n.match(c))return"keyword";var i=n.match(a);return i?("comment"==i[0]&&(r.blockCommentTag=!0),"keyword"):n.match(/\b(\w+)\b/)?(r.waitDot=!0,r.waitPipe=!0,"variable"):n.match("%}")?(r.waitProperty=null,r.waitFilter=null,r.waitDot=null,r.waitPipe=null,r.blockCommentTag?(r.blockCommentTag=!1,r.tokenize=o):r.tokenize=e,"tag"):(n.next(),"null")}function i(t,n){return t.match(/^.*?#\}/)?n.tokenize=e:t.skipToEnd(),"comment"}function o(e,t){return e.match(/\{%\s*endcomment\s*%\}/,!1)?(t.tokenize=r,e.match("{%"),"tag"):(e.next(),"comment")}var a=["block","endblock","for","endfor","true","false","filter","endfilter","loop","none","self","super","if","elif","endif","as","else","import","with","endwith","without","context","ifequal","endifequal","ifnotequal","endifnotequal","extends","include","load","comment","endcomment","empty","url","static","trans","blocktrans","endblocktrans","now","regroup","lorem","ifchanged","endifchanged","firstof","debug","cycle","csrf_token","autoescape","endautoescape","spaceless","endspaceless","ssi","templatetag","verbatim","endverbatim","widthratio"],s=["add","addslashes","capfirst","center","cut","date","default","default_if_none","dictsort","dictsortreversed","divisibleby","escape","escapejs","filesizeformat","first","floatformat","force_escape","get_digit","iriencode","join","last","length","length_is","linebreaks","linebreaksbr","linenumbers","ljust","lower","make_list","phone2numeric","pluralize","pprint","random","removetags","rjust","safe","safeseq","slice","slugify","stringformat","striptags","time","timesince","timeuntil","title","truncatechars","truncatechars_html","truncatewords","truncatewords_html","unordered_list","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap","yesno"],l=["==","!=","<",">","<=",">="],c=["in","not","or","and"];return a=new RegExp("^\\b("+a.join("|")+")\\b"),s=new RegExp("^\\b("+s.join("|")+")\\b"),l=new RegExp("^\\b("+l.join("|")+")\\b"),c=new RegExp("^\\b("+c.join("|")+")\\b"),{startState:function(){return{tokenize:e}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:"{% comment %}",blockCommentEnd:"{% endcomment %}"}}),e.defineMode("django",function(t){var n=e.getMode(t,"text/html"),r=e.getMode(t,"django:inner");return e.overlayMode(n,r)}),e.defineMIME("text/x-django","django")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("ebnf",function(t){var n={slash:0,parenthesis:1},r={comment:0,_string:1,characterClass:2},i=null;return t.bracesMode&&(i=e.getMode(t,t.bracesMode)),{startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(t,o){if(t){switch(0===o.stack.length&&('"'==t.peek()||"'"==t.peek()?(o.stringType=t.peek(),t.next(),o.stack.unshift(r._string)):t.match(/^\/\*/)?(o.stack.unshift(r.comment),o.commentType=n.slash):t.match(/^\(\*/)&&(o.stack.unshift(r.comment),o.commentType=n.parenthesis)),o.stack[0]){case r._string:for(;o.stack[0]===r._string&&!t.eol();)t.peek()===o.stringType?(t.next(),o.stack.shift()):"\\"===t.peek()?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return o.lhs?"property string":"string";case r.comment:for(;o.stack[0]===r.comment&&!t.eol();)o.commentType===n.slash&&t.match(/\*\//)?(o.stack.shift(),o.commentType=null):o.commentType===n.parenthesis&&t.match(/\*\)/)?(o.stack.shift(),o.commentType=null):t.match(/^.[^\*]*/);return"comment";case r.characterClass:for(;o.stack[0]===r.characterClass&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(/^\\./)||o.stack.shift();return"operator"}var a=t.peek();if(null!==i&&(o.braced||"{"===a)){null===o.localState&&(o.localState=e.startState(i));var s=i.token(t,o.localState),l=t.current();if(!s)for(var c=0;c>/))return"builtin"}return t.match(/^\/\//)?(t.skipToEnd(),"comment"):t.match(/return/)?"operator":t.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?t.match(/(?=[\(.])/)?"variable":t.match(/(?=[\s\n]*[:=])/)?"def":"variable-2":["[","]","(",")"].indexOf(t.peek())!=-1?(t.next(),"bracket"):(t.eatSpace()||t.next(),null)}}}}),e.defineMIME("text/x-ebnf","ebnf")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../markdown/markdown"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],e):e(CodeMirror)}(function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",function(n,r){function i(e){return e.code=!1,null}var o=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var i=e.pos;e.eatWhile("`");var a=1+e.pos-i;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,r.gitHubSpice!==!1)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:i},s={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var l in r)s[l]=r[l];return s.name="markdown",e.overlayMode(e.getMode(n,s),a)},"markdown"),e.defineMIME("text/x-gfm","gfm")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("haml",function(t){function n(e){return function(t,n){var o=t.peek();return o==e&&1==n.rubyState.tokenize.length?(t.next(),n.tokenize=i,"closeAttributeTag"):r(t,n)}}function r(e,t){return e.match("-#")?(e.skipToEnd(),"comment"):a.token(e,t.rubyState)}function i(e,t){var i=e.peek();if("comment"==t.previousToken.style&&t.indented>t.previousToken.indented)return e.skipToEnd(),"commentLine";if(t.startOfLine){if("!"==i&&e.match("!!"))return e.skipToEnd(),"tag";if(e.match(/^%[\w:#\.]+=/))return t.tokenize=r,"hamlTag";if(e.match(/^%[\w:]+/))return"hamlTag";if("/"==i)return e.skipToEnd(),"comment"}if((t.startOfLine||"hamlTag"==t.previousToken.style)&&("#"==i||"."==i))return e.match(/[\w-#\.]*/),"hamlAttribute";if(t.startOfLine&&!e.match("-->",!1)&&("="==i||"-"==i))return t.tokenize=r,t.tokenize(e,t);if("hamlTag"==t.previousToken.style||"closeAttributeTag"==t.previousToken.style||"hamlAttribute"==t.previousToken.style){if("("==i)return t.tokenize=n(")"),t.tokenize(e,t);if("{"==i&&!e.match(/^\{%.*/))return t.tokenize=n("}"),t.tokenize(e,t)}return o.token(e,t.htmlState)}var o=e.getMode(t,{name:"htmlmixed"}),a=e.getMode(t,"ruby");return{startState:function(){var t=e.startState(o),n=e.startState(a);return{htmlState:t,rubyState:n,indented:0,previousToken:{style:null,indented:0},tokenize:i}},copyState:function(t){return{htmlState:e.copyState(o,t.htmlState),rubyState:e.copyState(a,t.rubyState),indented:t.indented,previousToken:t.previousToken,tokenize:t.tokenize}},token:function(e,t){if(e.sol()&&(t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;var n=t.tokenize(e,t);if(t.startOfLine=!1,n&&"commentLine"!=n&&(t.previousToken={style:n,indented:t.indented}),e.eol()&&t.tokenize==r){e.backUp(1);var o=e.peek();e.next(),o&&","!=o&&(t.tokenize=i)}return"hamlTag"==n?n="tag":"commentLine"==n?n="comment":"hamlAttribute"==n?n="attribute":"closeAttributeTag"==n&&(n=null),n}}},"htmlmixed","ruby"),e.defineMIME("text/x-haml","haml")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}]}),e.defineMode("handlebars",function(t,n){var r=e.getMode(t,"handlebars-tags");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:"{{",close:"}}",mode:r,parseDelimiters:!0}):r}),e.defineMIME("text/x-handlebars-template","handlebars")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../haskell/haskell")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../haskell/haskell"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("haskell-literate",function(t,n){var r=e.getMode(t,n&&n.base||"haskell");return{startState:function(){return{inCode:!1,baseState:e.startState(r)}},token:function(e,t){return e.sol()&&(t.inCode=e.eat(">"))?"meta":t.inCode?r.token(e,t.baseState):(e.skipToEnd(),"comment")},innerMode:function(e){return e.inCode?{state:e.baseState,mode:r}:null}}},"haskell"),e.defineMIME("text/x-literate-haskell","haskell-literate")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("htmlembedded",function(t,n){return e.multiplexingMode(e.getMode(t,"htmlmixed"),{open:n.open||n.scriptStartRegex||"<%",close:n.close||n.scriptEndRegex||"%>",mode:e.getMode(t,n.scriptingModeSpec)})},"htmlmixed"),e.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),e.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),e.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),e.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}function n(e){var t=l[e];return t?t:l[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function r(e,t){var r=e.match(n(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"","i")}function o(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}function a(e,t){for(var n=0;n\s\/]/.test(r.current())&&(s=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(s))o.inTag=s+" ";else if(o.inTag&&f&&/>$/.test(r.current())){var p=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var m=">"==r.current()&&a(u[p[1]],p[2]),h=e.getMode(n,m),g=i(p[1],!0),v=i(p[1],!1);o.token=function(e,n){return e.match(g,!1)?(n.token=l,n.localState=n.localMode=null,null):t(e,v,n.localMode.token(e,n.localState))},o.localMode=h,o.localState=e.startState(h,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=r.current(),r.eol()&&(o.inTag+=" "));return d}var c=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag}),u={},d=r&&r.tags,f=r&&r.scriptTypes;if(o(s,u),d&&o(d,u),f)for(var p=f.length-1;p>=0;p--)u.script.unshift(["type",f[p].matches,f[p].mode]);return{startState:function(){var t=e.startState(c);return{token:l,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n){return!t.localMode||/^\s*<\//.test(n)?c.indent(t.htmlState,n):t.localMode.indent?t.localMode.indent(t.localState,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,r){this.state=e,this.mode=t,this.depth=n,this.prev=r}function n(r){return new t(e.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}e.defineMode("jsx",function(r,i){function o(e){var t=e.tagName;e.tagName=null;var n=c.indent(e,"");return e.tagName=t,n}function a(e,t){return t.context.mode==c?s(e,t,t.context):l(e,t,t.context)}function s(n,i,s){if(2==s.depth)return n.match(/^.*?\*\//)?s.depth=1:n.skipToEnd(),"comment";if("{"==n.peek()){c.skipAttribute(s.state);var l=o(s.state),d=s.state.context;if(d&&n.match(/^[^>]*>\s*$/,!1)){for(;d.prev&&!d.startOfLine;)d=d.prev;d.startOfLine?l-=r.indentUnit:s.prev.state.lexical&&(l=s.prev.state.lexical.indented)}else 1==s.depth&&(l+=r.indentUnit);return i.context=new t(e.startState(u,l),u,0,i.context),null}if(1==s.depth){if("<"==n.peek())return c.skipAttribute(s.state),i.context=new t(e.startState(c,o(s.state)),c,0,i.context),null;if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return s.depth=2,a(n,i)}var f,p=c.token(n,s.state),m=n.current();return/\btag\b/.test(p)?/>$/.test(m)?s.state.context?s.depth=0:i.context=i.context.prev:/^-1&&n.backUp(m.length-f),p}function l(n,r,i){if("<"==n.peek()&&u.expressionAllowed(n,i.state))return u.skipExpression(i.state),r.context=new t(e.startState(c,u.indent(i.state,"")),c,0,r.context),null;var o=u.token(n,i.state);if(!o&&null!=i.depth){var a=n.current();"{"==a?i.depth++:"}"==a&&0==--i.depth&&(r.context=r.context.prev)}return o}var c=e.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1}),u=e.getMode(r,i&&i.base||"javascript");return{startState:function(){return{context:new t(e.startState(u),u)}},copyState:function(e){return{context:n(e.context)}},token:a,indent:function(e,t,n){return e.context.mode.indent(e.context.state,t,n)},innerMode:function(e){return e.context}}},"xml","javascript"),e.defineMIME("text/jsx","jsx"),e.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../meta")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("markdown",function(t,n){function r(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}function i(e,t,n){return t.f=t.inline=n,n(e,t)}function o(e,t,n){return t.f=t.block=n,n(e,t)}function a(e){return!e||!/\S/.test(e.string)}function s(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,w&&e.f==c&&(e.f=m,e.block=l),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine=null,null}function l(t,o){var s=t.sol(),l=o.list!==!1,c=o.indentedCode;o.indentedCode=!1,l&&(o.indentationDiff>=0?(o.indentationDiff<4&&(o.indentation-=o.indentationDiff),o.list=null):o.indentation>0?o.list=null:o.list=!1);var d=null;if(o.indentationDiff>=4)return t.skipToEnd(),c||a(o.prevLine)?(o.indentation-=4,o.indentedCode=!0,_.code):null;if(t.eatSpace())return null;if((d=t.match(M))&&d[1].length<=6)return o.header=d[1].length,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,f(o);if(!(a(o.prevLine)||o.quote||l||c)&&(d=t.match(A)))return o.header="="==d[0].charAt(0)?1:2,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,f(o);if(t.eat(">"))return o.quote=s?1:o.quote+1,n.highlightFormatting&&(o.formatting="quote"),t.eatSpace(),f(o);if("["===t.peek())return i(t,o,b);if(t.match(C,!0))return o.hr=!0,_.hr;if(d=t.match(E)){var p=d[1]?"ol":"ul";for(o.indentation=t.column()+t.current().length,o.list=!0;o.listStack&&t.column()")>-1)&&(n.f=m,n.block=l,n.htmlState=null)}return r}function u(e,t){return t.fencedChars&&e.match(t.fencedChars)?(n.highlightFormatting&&(t.formatting="code-block"),t.localMode=t.localState=null,t.f=t.block=d,f(t)):t.fencedChars&&e.skipTo(t.fencedChars)?"comment":t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),_.code)}function d(e,t){e.match(t.fencedChars),t.block=l,t.f=m,t.fencedChars=null,n.highlightFormatting&&(t.formatting="code-block"),t.code=1;var r=f(t);return t.code=0,r}function f(e){var t=[];if(e.formatting){t.push(_.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r=e.quote?t.push(_.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(_.linkHref,"url"):(e.strong&&t.push(_.strong),e.em&&t.push(_.em),e.strikethrough&&t.push(_.strikethrough),e.linkText&&t.push(_.linkText),e.code&&t.push(_.code),e.image&&t.push(_.image),e.imageAltText&&t.push(_.imageAltText,"link"),e.imageMarker&&t.push(_.imageMarker)),e.header&&t.push(_.header,_.header+"-"+e.header),e.quote&&(t.push(_.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(_.quote+"-"+e.quote):t.push(_.quote+"-"+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listStack.length-1)%3;i?1===i?t.push(_.list2):t.push(_.list3):t.push(_.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function p(e,t){if(e.match(L,!0))return f(t)}function m(t,r){var i=r.text(t,r);if("undefined"!=typeof i)return i;if(r.list)return r.list=null,f(r);if(r.taskList){var a="x"!==t.match(T,!0)[1];return a?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,f(r)}if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),f(r);var s=t.sol(),l=t.next();if(r.linkTitle){r.linkTitle=!1;var u=l;"("===l&&(u=")"),u=(u+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var d="^\\s*(?:[^"+u+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(t.match(new RegExp(d),!0))return _.linkHref}if("`"===l){var p=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var m=t.current().length;if(0==r.code)return r.code=m,f(r);if(m==r.code){var v=f(r);return r.code=0,v}return r.formatting=p,f(r)}if(r.code)return f(r);if("\\"===l&&(t.next(),n.highlightFormatting)){var b=f(r),y=_.formatting+"-escape";return b?b+" "+y:y}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),f(r);if("["===l&&r.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),f(r);if("]"===l&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var b=f(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=g,b}if("["===l&&t.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1)&&!r.image)return r.linkText=!0,n.highlightFormatting&&(r.formatting="link"),f(r);if("]"===l&&r.linkText&&t.match(/\(.*?\)| ?\[.*?\]/,!1)){n.highlightFormatting&&(r.formatting="link");var b=f(r);return r.linkText=!1,r.inline=r.f=g,b}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=h,n.highlightFormatting&&(r.formatting="link");var b=f(r);return b?b+=" ":b="",b+_.linkInline}if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=h,n.highlightFormatting&&(r.formatting="link");var b=f(r);return b?b+=" ":b="",b+_.linkEmail}if("<"===l&&t.match(/^(!--|[a-z]+(?:\s+[a-z_:.\-]+(?:\s*=\s*[^ >]+)?)*\s*>)/i,!1)){var x=t.string.indexOf(">",t.pos);if(x!=-1){var w=t.string.substring(t.start,x);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(w)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(k),o(t,r,c)}if("<"===l&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";var S=!1;if(!n.underscoresBreakWords&&"_"===l&&"_"!==t.peek()&&t.match(/(\w)/,!1)){var C=t.pos-2;if(C>=0){var E=t.string.charAt(C);"_"!==E&&E.match(/(\w)/,!1)&&(S=!0)}}if("*"===l||"_"===l&&!S)if(s&&" "===t.peek());else{if(r.strong===l&&t.eat(l)){n.highlightFormatting&&(r.formatting="strong");var v=f(r);return r.strong=!1,v}if(!r.strong&&t.eat(l))return r.strong=l,n.highlightFormatting&&(r.formatting="strong"),f(r);if(r.em===l){n.highlightFormatting&&(r.formatting="em");var v=f(r);return r.em=!1,v}if(!r.em)return r.em=l,n.highlightFormatting&&(r.formatting="em"),f(r)}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return f(r);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(r.strikethrough){n.highlightFormatting&&(r.formatting="strikethrough");var v=f(r);return r.strikethrough=!1,v}if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),f(r)}else if(" "===l&&t.match(/^~~/,!0)){if(" "===t.peek())return f(r);t.backUp(2)}return" "===l&&(t.match(/ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),f(r)}function h(e,t){var r=e.next();if(">"===r){t.f=t.inline=m,n.highlightFormatting&&(t.formatting="link");var i=f(t);return i?i+=" ":i="",i+_.linkInline}return e.match(/^[^>]+/,!0),_.linkInline}function g(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=v("("===r?")":"]",0),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,f(t)):"error"}function v(e){return function(t,r){var i=t.next();if(i===e){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link-string");var o=f(r);return r.linkHref=!1,o}return t.match(O[e]),r.linkHref=!0,f(r)}}function b(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=y,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,f(t)):i(e,t,m)}function y(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=x,n.highlightFormatting&&(t.formatting="link");var r=f(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),_.linkText}function x(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=m,_.linkHref+" url")}var k=e.getMode(t,"text/html"),w="null"==k.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var _={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"};for(var S in _)_.hasOwnProperty(S)&&n.tokenTypeOverrides[S]&&(_[S]=n.tokenTypeOverrides[S]);var C=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,T=/^\[(x| )\](?=\s)/,M=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,A=/^ *(?:\={1,}|-{1,})\s*$/,L=/^[^#!\[\]*_\\<>` "'(~]+/,I=new RegExp("^("+(n.fencedCodeBlocks===!0?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},z={startState:function(){return{f:l,prevLine:null,thisLine:null,block:l,htmlState:null,indentation:0,inline:m,text:p,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(k,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkTitle:t.linkTitle,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,header:t.header,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedChars:t.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(s(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var r=e.match(/^\s*/,!0)[0].replace(/\t/g,"    ").length;if(t.indentationDiff=Math.min(r-t.indentation,4),t.indentation=t.indentation+t.indentationDiff,r>0)return null}return t.f(e,t)},innerMode:function(e){return e.block==c?{state:e.htmlState,mode:k}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:z}},blankLine:s,getType:f,closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),e.defineMIME("text/x-markdown","markdown")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../javascript/javascript")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../javascript/javascript"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("pegjs",function(t){function n(e){return e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)}var r=e.getMode(t,"javascript");return{startState:function(){return{inString:!1,stringType:null,inComment:!1,inCharacterClass:!1,braced:0,lhs:!0,localState:null}},token:function(t,i){if(t&&(i.inString||i.inComment||'"'!=t.peek()&&"'"!=t.peek()||(i.stringType=t.peek(),t.next(),i.inString=!0)),i.inString||i.inComment||!t.match(/^\/\*/)||(i.inComment=!0),i.inString){for(;i.inString&&!t.eol();)t.peek()===i.stringType?(t.next(),i.inString=!1):"\\"===t.peek()?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return i.lhs?"property string":"string"}if(i.inComment){for(;i.inComment&&!t.eol();)t.match(/\*\//)?i.inComment=!1:t.match(/^.[^\*]*/);return"comment"}if(i.inCharacterClass)for(;i.inCharacterClass&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(/^\\./)||(i.inCharacterClass=!1);else{if("["===t.peek())return t.next(),i.inCharacterClass=!0,"bracket";if(t.match(/^\/\//))return t.skipToEnd(),"comment";if(i.braced||"{"===t.peek()){null===i.localState&&(i.localState=e.startState(r));var o=r.token(t,i.localState),a=t.current();if(!o)for(var s=0;s\w/,!1)&&(t.tokenize=n([[["->",null]],[[/[\w]+/,"variable"]]],r,i)),"variable-2";for(var o=!1;!e.eol()&&(o||i===!1||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!o&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}o="\\"==e.next()&&!o}return"string"}var o="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",a="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",s="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[o,a,s].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var l={name:"clike",helperType:"php",keywords:t(o),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(a),builtin:t(s),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var n;if(n=e.match(/<<\s*/)){var i=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var o=e.current().slice(n[0].length+(i?2:1));if(i&&e.eat(i),o)return(t.tokStack||(t.tokStack=[])).push(o,0),t.tokenize=r(o,"'"!=i),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=r('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=r(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,n){function r(t,n){var r=n.curMode==o;if(t.sol()&&n.pending&&'"'!=n.pending&&"'"!=n.pending&&(n.pending=null),r)return r&&null==n.php.tokenize&&t.match("?>")?(n.curMode=i,n.curState=n.html,n.php.context.prev||(n.php=null),"meta"):o.token(t,n.curState);if(t.match(/^<\?\w*/))return n.curMode=o,n.php||(n.php=e.startState(o,i.indent(n.html,""))),n.curState=n.php,"meta";if('"'==n.pending||"'"==n.pending){for(;!t.eol()&&t.next()!=n.pending;);var a="string"}else if(n.pending&&t.pos/.test(l)?n.pending=s[0]:n.pending={end:t.pos,style:a},t.backUp(l.length-c)),a}var i=e.getMode(t,"text/html"),o=e.getMode(t,l);return{startState:function(){var t=e.startState(i),r=n.startOpen?e.startState(o):null;return{html:t,php:r,curMode:n.startOpen?o:i,curState:n.startOpen?r:t,pending:null}},copyState:function(t){var n,r=t.html,a=e.copyState(i,r),s=t.php,l=s&&e.copyState(o,s);return n=t.curMode==i?a:l,{html:a,php:l,curMode:t.curMode,curState:n,pending:t.pending}},token:r,indent:function(e,t){return e.curMode!=o&&/^\s*<\//.test(t)||e.curMode==o&&/^\?>/.test(t)?i.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",l)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../javascript/javascript"),require("../css/css"),require("../htmlmixed/htmlmixed")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../javascript/javascript","../css/css","../htmlmixed/htmlmixed"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("pug",function(t){function n(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=e.startState(Y),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}function r(e,t){if(e.sol()&&(t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1),t.javaScriptLine){if(t.javaScriptLineExcludesColon&&":"===e.peek())return t.javaScriptLine=!1,void(t.javaScriptLineExcludesColon=!1);var n=Y.token(e,t.jsState);return e.eol()&&(t.javaScriptLine=!1),n||!0}}function i(e,t){if(t.javaScriptArguments){if(0===t.javaScriptArgumentsDepth&&"("!==e.peek())return void(t.javaScriptArguments=!1);if("("===e.peek()?t.javaScriptArgumentsDepth++:")"===e.peek()&&t.javaScriptArgumentsDepth--,0===t.javaScriptArgumentsDepth)return void(t.javaScriptArguments=!1);var n=Y.token(e,t.jsState);return n||!0}}function o(e){if(e.match(/^yield\b/))return"keyword"}function a(e){if(e.match(/^(?:doctype) *([^\n]+)?/))return V}function s(e,t){if(e.match("#{"))return t.isInterpolating=!0,t.interpolationNesting=0,"punctuation"}function l(e,t){if(t.isInterpolating){if("}"===e.peek()){if(t.interpolationNesting--,t.interpolationNesting<0)return e.next(),t.isInterpolating=!1,"punctuation"}else"{"===e.peek()&&t.interpolationNesting++;return Y.token(e,t.jsState)||!0}}function c(e,t){if(e.match(/^case\b/))return t.javaScriptLine=!0,G}function u(e,t){if(e.match(/^when\b/))return t.javaScriptLine=!0,t.javaScriptLineExcludesColon=!0,G}function d(e){if(e.match(/^default\b/))return G}function f(e,t){if(e.match(/^extends?\b/))return t.restOfLine="string",G}function p(e,t){if(e.match(/^append\b/))return t.restOfLine="variable",G}function m(e,t){if(e.match(/^prepend\b/))return t.restOfLine="variable",G}function h(e,t){if(e.match(/^block\b *(?:(prepend|append)\b)?/))return t.restOfLine="variable",G}function g(e,t){if(e.match(/^include\b/))return t.restOfLine="string",G}function v(e,t){if(e.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&e.match("include"))return t.isIncludeFiltered=!0,G}function b(e,t){if(t.isIncludeFiltered){var n=T(e,t);return t.isIncludeFiltered=!1,t.restOfLine="string",n}}function y(e,t){if(e.match(/^mixin\b/))return t.javaScriptLine=!0,G}function x(e,t){return e.match(/^\+([-\w]+)/)?(e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),"variable"):e.match(/^\+#{/,!1)?(e.next(),t.mixinCallAfter=!0,s(e,t)):void 0}function k(e,t){if(t.mixinCallAfter)return t.mixinCallAfter=!1,e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),!0}function w(e,t){if(e.match(/^(if|unless|else if|else)\b/))return t.javaScriptLine=!0,G}function _(e,t){if(e.match(/^(- *)?(each|for)\b/))return t.isEach=!0,G}function S(e,t){if(t.isEach){if(e.match(/^ in\b/))return t.javaScriptLine=!0,t.isEach=!1,G;if(e.sol()||e.eol())t.isEach=!1;else if(e.next()){for(;!e.match(/^ in\b/,!1)&&e.next(););return"variable"}}}function C(e,t){if(e.match(/^while\b/))return t.javaScriptLine=!0,G}function E(e,t){var n;if(n=e.match(/^(\w(?:[-:\w]*\w)?)\/?/))return t.lastTag=n[1].toLowerCase(),"script"===t.lastTag&&(t.scriptType="application/javascript"),"tag"}function T(n,r){if(n.match(/^:([\w\-]+)/)){var i;return t&&t.innerModes&&(i=t.innerModes(n.current().substring(1))),i||(i=n.current().substring(1)),"string"==typeof i&&(i=e.getMode(t,i)),j(n,r,i),"atom"}}function M(e,t){if(e.match(/^(!?=|-)/))return t.javaScriptLine=!0,"punctuation"}function A(e){if(e.match(/^#([\w-]+)/))return K}function L(e){if(e.match(/^\.([\w-]+)/))return Z}function I(e,t){if("("==e.peek())return e.next(),t.isAttrs=!0,t.attrsNest=[],t.inAttributeName=!0,t.attrValue="",t.attributeIsType=!1,"punctuation"}function O(t,n){if(n.isAttrs){if(X[t.peek()]&&n.attrsNest.push(X[t.peek()]),n.attrsNest[n.attrsNest.length-1]===t.peek())n.attrsNest.pop();else if(t.eat(")"))return n.isAttrs=!1,"punctuation";if(n.inAttributeName&&t.match(/^[^=,\)!]+/))return"="!==t.peek()&&"!"!==t.peek()||(n.inAttributeName=!1,n.jsState=e.startState(Y),"script"===n.lastTag&&"type"===t.current().trim().toLowerCase()?n.attributeIsType=!0:n.attributeIsType=!1),"attribute";var r=Y.token(t,n.jsState);if(n.attributeIsType&&"string"===r&&(n.scriptType=t.current().toString()),0===n.attrsNest.length&&("string"===r||"variable"===r||"keyword"===r))try{return Function("","var x "+n.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),n.inAttributeName=!0,n.attrValue="",t.backUp(t.current().length),O(t,n)}catch(e){}return n.attrValue+=t.current(),r||!0}}function z(e,t){if(e.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,"keyword"}function R(e){if(e.sol()&&e.eatSpace())return"indent"}function N(e,t){if(e.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=e.indentation(),t.indentToken="comment","comment"}function P(e){if(e.match(/^: */))return"colon"}function D(e,t){return e.match(/^(?:\| ?| )([^\n]+)/)?"string":e.match(/^(<[^\n]*)/,!1)?(j(e,t,"htmlmixed"),t.innerModeForLine=!0,F(e,t,!0)):void 0}function q(e,t){if(e.eat(".")){var n=null;return"script"===t.lastTag&&t.scriptType.toLowerCase().indexOf("javascript")!=-1?n=t.scriptType.toLowerCase().replace(/"|'/g,""):"style"===t.lastTag&&(n="css"),j(e,t,n),"dot"}}function $(e){return e.next(),null}function j(n,r,i){i=e.mimeModes[i]||i,i=t.innerModes?t.innerModes(i)||i:i,i=e.mimeModes[i]||i,i=e.getMode(t,i),r.indentOf=n.indentation(),i&&"null"!==i.name?r.innerMode=i:r.indentToken="string"}function F(t,n,r){return t.indentation()>n.indentOf||n.innerModeForLine&&!t.sol()||r?n.innerMode?(n.innerState||(n.innerState=n.innerMode.startState?e.startState(n.innerMode,t.indentation()):{}),t.hideFirstChars(n.indentOf+2,function(){return n.innerMode.token(t,n.innerState)||!0})):(t.skipToEnd(),n.indentToken):void(t.sol()&&(n.indentOf=1/0,n.indentToken=null,n.innerMode=null,n.innerState=null))}function W(e,t){if(e.sol()&&(t.restOfLine=""),t.restOfLine){e.skipToEnd();var n=t.restOfLine;return t.restOfLine="",n}}function U(){return new n}function B(e){return e.copy()}function H(e,t){var n=F(e,t)||W(e,t)||l(e,t)||b(e,t)||S(e,t)||O(e,t)||r(e,t)||i(e,t)||k(e,t)||o(e,t)||a(e,t)||s(e,t)||c(e,t)||u(e,t)||d(e,t)||f(e,t)||p(e,t)||m(e,t)||h(e,t)||g(e,t)||v(e,t)||y(e,t)||x(e,t)||w(e,t)||_(e,t)||C(e,t)||E(e,t)||T(e,t)||M(e,t)||A(e,t)||L(e,t)||I(e,t)||z(e,t)||R(e,t)||D(e,t)||N(e,t)||P(e,t)||q(e,t)||$(e,t);return n===!0?null:n}var G="keyword",V="meta",K="builtin",Z="qualifier",X={"{":"}","(":")","[":"]"},Y=e.getMode(t,"javascript");return n.prototype.copy=function(){var t=new n;return t.javaScriptLine=this.javaScriptLine,t.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,t.javaScriptArguments=this.javaScriptArguments,t.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,t.isInterpolating=this.isInterpolating,t.interpolationNesting=this.interpolationNesting,t.jsState=e.copyState(Y,this.jsState),t.innerMode=this.innerMode,this.innerMode&&this.innerState&&(t.innerState=e.copyState(this.innerMode,this.innerState)),t.restOfLine=this.restOfLine,t.isIncludeFiltered=this.isIncludeFiltered,t.isEach=this.isEach,t.lastTag=this.lastTag,t.scriptType=this.scriptType,t.isAttrs=this.isAttrs,t.attrsNest=this.attrsNest.slice(),t.inAttributeName=this.inAttributeName,t.attributeIsType=this.attributeIsType,t.attrValue=this.attrValue,t.indentOf=this.indentOf,t.indentToken=this.indentToken,t.innerModeForLine=this.innerModeForLine,t},{startState:U,copyState:B,token:H}},"javascript","css","htmlmixed"),e.defineMIME("text/x-pug","pug"),e.defineMIME("text/x-jade","pug")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../python/python"),require("../stex/stex"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../python/python","../stex/stex","../../addon/mode/overlay"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("rst",function(t,n){var r=/^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/,i=/^\*[^\*\s](?:[^\*]*[^\*\s])?\*/,o=/^``[^`\s](?:[^`]*[^`\s])``/,a=/^(?:[\d]+(?:[\.,]\d+)*)/,s=/^(?:\s\+[\d]+(?:[\.,]\d+)*)/,l=/^(?:\s\-[\d]+(?:[\.,]\d+)*)/,c="[Hh][Tt][Tt][Pp][Ss]?://",u="(?:[\\d\\w.-]+)\\.(?:\\w{2,6})",d="(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*",f=new RegExp("^"+c+u+d),p={token:function(e){if(e.match(r)&&e.match(/\W+|$/,!1))return"strong";if(e.match(i)&&e.match(/\W+|$/,!1))return"em";if(e.match(o)&&e.match(/\W+|$/,!1))return"string-2";if(e.match(a))return"number";if(e.match(s))return"positive";if(e.match(l))return"negative";if(e.match(f))return"link";for(;!(null==e.next()||e.match(r,!1)||e.match(i,!1)||e.match(o,!1)||e.match(a,!1)||e.match(s,!1)||e.match(l,!1)||e.match(f,!1)););return null}},m=e.getMode(t,n.backdrop||"rst-base");return e.overlayMode(m,p,!0)},"python","stex"),e.defineMode("rst-base",function(t){function n(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,n){return"undefined"!=typeof t[n]?t[n]:e})}function r(t,n){var o=null;if(t.sol()&&t.match(X,!1))u(n,l,{mode:p,local:e.startState(p)});else if(t.sol()&&t.match(E))u(n,i),o="meta";else if(t.sol()&&t.match(C))u(n,r),o="header";else if(f(n)==D||t.match(D,!1))switch(d(n)){case 0:u(n,r,c(D,1)),t.match(/^:/),o="meta";break;case 1:u(n,r,c(D,2)),t.match(y),o="keyword",t.current().match(/^(?:math|latex)/)&&(n.tmp_stex=!0);break;case 2:u(n,r,c(D,3)),t.match(/^:`/),o="meta";break;case 3:if(n.tmp_stex&&(n.tmp_stex=void 0,n.tmp={mode:m,local:e.startState(m)}),n.tmp){if("`"==t.peek()){u(n,r,c(D,4)),n.tmp=void 0;break}o=n.tmp.mode.token(t,n.tmp.local);break}u(n,r,c(D,4)),t.match(S),o="string";break;case 4:u(n,r,c(D,5)),t.match(/^`/),o="meta";break;case 5:u(n,r,c(D,6)),t.match(v);break;default:u(n,r)}else if(f(n)==q||t.match(q,!1))switch(d(n)){case 0:u(n,r,c(q,1)),t.match(/^`/),o="meta";break;case 1:u(n,r,c(q,2)),t.match(S),o="string";break;case 2:u(n,r,c(q,3)),t.match(/^`:/),o="meta";break;case 3:u(n,r,c(q,4)),t.match(y),o="keyword";break;case 4:u(n,r,c(q,5)),t.match(/^:/),o="meta";break;case 5:u(n,r,c(q,6)),t.match(v);break;default:u(n,r)}else if(f(n)==$||t.match($,!1))switch(d(n)){case 0:u(n,r,c($,1)),t.match(/^:/),o="meta";break;case 1:u(n,r,c($,2)),t.match(y),o="keyword";break;case 2:u(n,r,c($,3)),t.match(/^:/),o="meta";break;case 3:u(n,r,c($,4)),t.match(v);break;default:u(n,r)}else if(f(n)==O||t.match(O,!1))switch(d(n)){case 0:u(n,r,c(O,1)),t.match(W),o="variable-2";break;case 1:u(n,r,c(O,2)),t.match(/^_?_?/)&&(o="link");break;default:u(n,r)}else if(t.match(z))u(n,r),o="quote";else if(t.match(R))u(n,r),o="quote";else if(t.match(N))u(n,r),t.peek()&&!t.peek().match(/^\W$/)||(o="link");else if(f(n)==P||t.match(P,!1))switch(d(n)){case 0:!t.peek()||t.peek().match(/^\W$/)?u(n,r,c(P,1)):t.match(P);break;case 1:u(n,r,c(P,2)),t.match(/^`/),o="link";break;case 2:u(n,r,c(P,3)),t.match(S);break;case 3:u(n,r,c(P,4)),t.match(/^`_/),o="link";break;default:u(n,r)}else t.match(Z)?u(n,a):t.next()&&u(n,r);return o}function i(t,n){var a=null;if(f(n)==A||t.match(A,!1))switch(d(n)){case 0:u(n,i,c(A,1)),t.match(W),a="variable-2";break;case 1:u(n,i,c(A,2)),t.match(U);break;case 2:u(n,i,c(A,3)),t.match(B),a="keyword";break;case 3:u(n,i,c(A,4)),t.match(H),a="meta";break;default:u(n,r)}else if(f(n)==M||t.match(M,!1))switch(d(n)){case 0:u(n,i,c(M,1)),t.match(j),a="keyword",t.current().match(/^(?:math|latex)/)?n.tmp_stex=!0:t.current().match(/^python/)&&(n.tmp_py=!0);break;case 1:u(n,i,c(M,2)),t.match(F),a="meta",(t.match(/^latex\s*$/)||n.tmp_stex)&&(n.tmp_stex=void 0,u(n,l,{mode:m,local:e.startState(m)}));break;case 2:u(n,i,c(M,3)),(t.match(/^python\s*$/)||n.tmp_py)&&(n.tmp_py=void 0,u(n,l,{mode:p,local:e.startState(p)}));break;default:u(n,r)}else if(f(n)==T||t.match(T,!1))switch(d(n)){case 0:u(n,i,c(T,1)),t.match(G),t.match(V),a="link";break;case 1:u(n,i,c(T,2)),t.match(K),a="meta";break;default:u(n,r)}else t.match(L)?(u(n,r),a="quote"):t.match(I)?(u(n,r),a="quote"):(t.eatSpace(),t.eol()?u(n,r):(t.skipToEnd(),u(n,o),a="comment"));return a}function o(e,t){return s(e,t,"comment")}function a(e,t){return s(e,t,"meta")}function s(e,t,n){return e.eol()||e.eatSpace()?(e.skipToEnd(),n):(u(t,r),null)}function l(e,t){return t.ctx.mode&&t.ctx.local?e.sol()?(e.eatSpace()||u(t,r),null):t.ctx.mode.token(e,t.ctx.local):(u(t,r),null)}function c(e,t,n,r){return{phase:e,stage:t,mode:n,local:r}}function u(e,t,n){e.tok=t,e.ctx=n||{}}function d(e){return e.ctx.stage||0}function f(e){return e.ctx.phase}var p=e.getMode(t,"python"),m=e.getMode(t,"stex"),h="\\s+",g="(?:\\s*|\\W|$)",v=new RegExp(n("^{0}",g)),b="(?:[^\\W\\d_](?:[\\w!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)",y=new RegExp(n("^{0}",b)),x="(?:[^\\W\\d_](?:[\\w\\s!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)",k=n("(?:{0}|`{1}`)",b,x),w="(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)",_="(?:[^\\`]+)",S=new RegExp(n("^{0}",_)),C=new RegExp("^([!'#$%&\"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$"),E=new RegExp(n("^\\.\\.{0}",h)),T=new RegExp(n("^_{0}:{1}|^__:{1}",k,g)),M=new RegExp(n("^{0}::{1}",k,g)),A=new RegExp(n("^\\|{0}\\|{1}{2}::{3}",w,h,k,g)),L=new RegExp(n("^\\[(?:\\d+|#{0}?|\\*)]{1}",k,g)),I=new RegExp(n("^\\[{0}\\]{1}",k,g)),O=new RegExp(n("^\\|{0}\\|",w)),z=new RegExp(n("^\\[(?:\\d+|#{0}?|\\*)]_",k)),R=new RegExp(n("^\\[{0}\\]_",k)),N=new RegExp(n("^{0}__?",k)),P=new RegExp(n("^`{0}`_",_)),D=new RegExp(n("^:{0}:`{1}`{2}",b,_,g)),q=new RegExp(n("^`{1}`:{0}:{2}",b,_,g)),$=new RegExp(n("^:{0}:{1}",b,g)),j=new RegExp(n("^{0}",k)),F=new RegExp(n("^::{0}",g)),W=new RegExp(n("^\\|{0}\\|",w)),U=new RegExp(n("^{0}",h)),B=new RegExp(n("^{0}",k)),H=new RegExp(n("^::{0}",g)),G=new RegExp("^_"),V=new RegExp(n("^{0}|_",k)),K=new RegExp(n("^:{0}",g)),Z=new RegExp("^::\\s*$"),X=new RegExp("^\\s+(?:>>>|In \\[\\d+\\]:)\\s");return{startState:function(){return{tok:r,ctx:c(void 0,0)}},copyState:function(t){var n=t.ctx,r=t.tmp;return n.local&&(n={mode:n.mode,local:e.copyState(n.mode,n.local)}),r&&(r={mode:r.mode,local:e.copyState(r.mode,r.local)}),{tok:t.tok,ctx:n,tmp:r}},innerMode:function(e){return e.tmp?{state:e.tmp.local,mode:e.tmp.mode}:e.ctx.mode?{state:e.ctx.local,mode:e.ctx.mode}:null},token:function(e,t){return t.tok(e,t)}}},"python","stex"),e.defineMIME("text/x-rst","rst")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("slim",function(t){function n(e,t,n){var r=function(r,i){return i.tokenize=t,r.pos-1&&(t.tokenize=n(e.pos,t.tokenize,o),e.backUp(a.length-s-i)),o}function i(e,t){e.stack={parent:e.stack,style:"continuation",indented:t,tokenize:e.line},e.line=e.tokenize}function o(e){e.line==e.tokenize&&(e.line=e.stack.tokenize,e.stack=e.stack.parent)}function a(e,t){return function(n,r){if(o(r),n.match(/^\\$/))return i(r,e),"lineContinuation";var a=t(n,r);return n.eol()&&n.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)&&n.backUp(1),a}}function s(e,t){return function(n,r){o(r);var a=t(n,r);return n.eol()&&n.current().match(/,$/)&&i(r,e),a}}function l(e,t){return function(n,r){var i=n.peek();return i==e&&1==r.rubyState.tokenize.length?(n.next(),r.tokenize=t,"closeAttributeTag"):u(n,r)}}function c(t){var n,r=function(e,r){if(1==r.rubyState.tokenize.length&&!r.rubyState.context.prev){if(e.backUp(1),e.eatSpace())return r.rubyState=n,r.tokenize=t,t(e,r);e.next()}return u(e,r)};return function(t,i){return n=i.rubyState,i.rubyState=e.startState($),i.tokenize=r,u(t,i)}}function u(e,t){return $.token(e,t.rubyState)}function d(e,t){return e.match(/^\\$/)?"lineContinuation":f(e,t)}function f(e,t){return e.match(/^#\{/)?(t.tokenize=l("}",t.tokenize),null):r(e,t,/[^\\]#\{/,1,q.token(e,t.htmlState))}function p(e){return function(t,n){var r=d(t,n);return t.eol()&&(n.tokenize=e),r}}function m(e,t,n){return t.stack={parent:t.stack,style:"html",indented:e.column()+n,tokenize:t.line},t.line=t.tokenize=f,null}function h(e,t){return e.skipToEnd(),t.stack.style}function g(e,t){return t.stack={parent:t.stack,style:"comment",indented:t.indented+1,tokenize:t.line},t.line=h,h(e,t)}function v(e,t){return e.eat(t.stack.endQuote)?(t.line=t.stack.line,t.tokenize=t.stack.tokenize,t.stack=t.stack.parent,null):e.match(Z)?(t.tokenize=b,"slimAttribute"):(e.next(),null)}function b(e,t){return e.match(/^==?/)?(t.tokenize=y,null):v(e,t)}function y(e,t){var n=e.peek();return'"'==n||"'"==n?(t.tokenize=P(n,"string",!0,!1,v),e.next(),t.tokenize(e,t)):"["==n?c(v)(e,t):e.match(/^(true|false|nil)\b/)?(t.tokenize=v,"keyword"):c(v)(e,t)}function x(e,t,n){return e.stack={parent:e.stack,style:"wrapper",indented:e.indented+1,tokenize:n,line:e.line,endQuote:t},e.line=e.tokenize=v,null}function k(t,n){if(t.match(/^#\{/))return n.tokenize=l("}",n.tokenize),null;var r=new e.StringStream(t.string.slice(n.stack.indented),t.tabSize);r.pos=t.pos-n.stack.indented,r.start=t.start-n.stack.indented,r.lastColumnPos=t.lastColumnPos-n.stack.indented,r.lastColumnValue=t.lastColumnValue-n.stack.indented;var i=n.subMode.token(r,n.subState);return t.pos=r.pos+n.stack.indented,i}function w(e,t){return t.stack.indented=e.column(),t.line=t.tokenize=k,t.tokenize(e,t)}function _(n){var r=F[n],i=e.mimeModes[r];if(i)return e.getMode(t,i);var o=e.modes[r];return o?o(t,{name:r}):e.getMode(t,"null")}function S(e){return j.hasOwnProperty(e)?j[e]:j[e]=_(e)}function C(t,n){var r=S(t),i=e.startState(r);return n.subMode=r,n.subState=i,n.stack={parent:n.stack,style:"sub",indented:n.indented+1,tokenize:n.line},n.line=n.tokenize=w,
"slimSubmode"}function E(e,t){return e.skipToEnd(),"slimDoctype"}function T(e,t){var n=e.peek();if("<"==n)return(t.tokenize=p(t.tokenize))(e,t);if(e.match(/^[|']/))return m(e,t,1);if(e.match(/^\/(!|\[\w+])?/))return g(e,t);if(e.match(/^(-|==?[<>]?)/))return t.tokenize=a(e.column(),s(e.column(),u)),"slimSwitch";if(e.match(/^doctype\b/))return t.tokenize=E,"keyword";var r=e.match(W);return r?C(r[1],t):A(e,t)}function M(e,t){return t.startOfLine?T(e,t):A(e,t)}function A(e,t){return e.eat("*")?(t.tokenize=c(L),null):e.match(V)?(t.tokenize=L,"slimTag"):I(e,t)}function L(e,t){return e.match(/^(<>?|>t.indented&&"slimSubmode"!=t.last;)t.line=t.tokenize=t.stack.tokenize,t.stack=t.stack.parent,t.subMode=null,t.subState=null;if(e.eatSpace())return null;var n=t.tokenize(e,t);return t.startOfLine=!1,n&&(t.last=n),U.hasOwnProperty(n)?U[n]:n},blankLine:function(e){if(e.subMode&&e.subMode.blankLine)return e.subMode.blankLine(e.subState)},innerMode:function(e){return e.subMode?{state:e.subState,mode:e.subMode}:{state:e,mode:J}}};return J},"htmlmixed","ruby"),e.defineMIME("text/x-slim","slim"),e.defineMIME("application/x-slim","slim")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("smarty",function(t,n){function r(e,t){return u=t,e}function i(e,t,n){return t.tokenize=n,n(e,t)}function o(e,t){return null==t&&(t=e.pos),3===p&&"{"==f&&(t==e.string.length||/\s/.test(e.string.charAt(t)))}function a(e,t){for(var n=e.string,r=e.pos;;){var a=n.indexOf(f,r);if(r=a+f.length,a==-1||!o(e,a+f.length))break}if(a==e.pos)return e.match(f),e.eat("*")?i(e,t,c("comment","*"+d)):(t.depth++,t.tokenize=s,u="startTag","tag");a>-1&&(e.string=n.slice(0,a));var l=m.token(e,t.base);return a>-1&&(e.string=n),l}function s(e,t){if(e.match(d,!0))return 3===p?(t.depth--,t.depth<=0&&(t.tokenize=a)):t.tokenize=a,r("tag",null);if(e.match(f,!0))return t.depth++,r("tag","startTag");var n=e.next();if("$"==n)return e.eatWhile(g.validIdentifier),r("variable-2","variable");if("|"==n)return r("operator","pipe");if("."==n)return r("operator","property");if(g.stringChar.test(n))return t.tokenize=l(n),r("string","string");if(g.operatorChars.test(n))return e.eatWhile(g.operatorChars),r("operator","operator");if("["==n||"]"==n)return r("bracket","bracket");if("("==n||")"==n)return r("bracket","operator");if(/\d/.test(n))return e.eatWhile(/\d/),r("number","number");if("variable"==t.last){if("@"==n)return e.eatWhile(g.validIdentifier),r("property","property");if("|"==n)return e.eatWhile(g.validIdentifier),r("qualifier","modifier")}else{if("pipe"==t.last)return e.eatWhile(g.validIdentifier),r("qualifier","modifier");if("whitespace"==t.last)return e.eatWhile(g.validIdentifier),r("attribute","modifier")}if("property"==t.last)return e.eatWhile(g.validIdentifier),r("property",null);if(/\s/.test(n))return u="whitespace",null;var i="";"/"!=n&&(i+=n);for(var o=null;o=e.eat(g.validIdentifier);)i+=o;for(var s=0,c=h.length;s!?]/,validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/};return{startState:function(){return{base:e.startState(m),tokenize:a,last:null,depth:0}},copyState:function(t){return{base:e.copyState(m,t.base),tokenize:t.tokenize,last:t.last,depth:t.depth}},innerMode:function(e){if(e.tokenize==a)return{mode:m,state:e.base}},token:function(e,t){var n=t.tokenize(e,t);return t.last=u,n},indent:function(t,n){return t.tokenize==a&&m.indent?m.indent(t.base,n):e.Pass},blockCommentStart:f+"*",blockCommentEnd:"*"+d}}),e.defineMIME("text/x-smarty","smarty")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed"],e):e(CodeMirror)}(function(e){"use strict";var t=["template","literal","msg","fallbackmsg","let","if","elseif","else","switch","case","default","foreach","ifempty","for","call","param","deltemplate","delcall","log"];e.defineMode("soy",function(n){function r(e){return e[e.length-1]}function i(e,t,n){var r=e.string,i=n.exec(r.substr(e.pos));i&&(e.string=r.substr(0,e.pos+i.index));var o=e.hideFirstChars(t.indent,function(){return t.localMode.token(e,t.localState)});return e.string=r,o}function o(e,t){for(;e;){if(e.element===t)return!0;e=e.next}return!1}function a(e,t){return{element:t,next:e}}function s(e,t,n){return o(e,t)?"variable-2":n?"variable":"variable-2 error"}function l(e){e.scopes&&(e.variables=e.scopes.element,e.scopes=e.scopes.next)}var c=e.getMode(n,"text/plain"),u={html:e.getMode(n,{name:"text/html",multilineTagIndentFactor:2,multilineTagIndentPastTag:!1}),attributes:c,text:c,uri:c,css:e.getMode(n,"text/css"),js:e.getMode(n,{name:"text/javascript",statementIndent:2*n.indentUnit})};return{startState:function(){return{kind:[],kindTag:[],soyState:[],templates:null,variables:null,scopes:null,indent:0,localMode:u.html,localState:e.startState(u.html)}},copyState:function(t){return{tag:t.tag,kind:t.kind.concat([]),kindTag:t.kindTag.concat([]),soyState:t.soyState.concat([]),templates:t.templates,variables:t.variables,scopes:t.scopes,indent:t.indent,localMode:t.localMode,localState:e.copyState(t.localMode,t.localState)}},token:function(o,c){var d;switch(r(c.soyState)){case"comment":return o.match(/^.*?\*\//)?c.soyState.pop():o.skipToEnd(),"comment";case"templ-def":return(d=o.match(/^\.?([\w]+(?!\.[\w]+)*)/))?(c.templates=a(c.templates,d[1]),c.scopes=a(c.scopes,c.variables),c.soyState.pop(),"def"):(o.next(),null);case"templ-ref":return(d=o.match(/^\.?([\w]+)/))?(c.soyState.pop(),"."==d[0][0]?s(c.templates,d[1],!0):"variable"):(o.next(),null);case"param-def":return(d=o.match(/^([\w]+)(?=:)/))?(c.variables=a(c.variables,d[1]),c.soyState.pop(),c.soyState.push("param-type"),"def"):(o.next(),null);case"param-type":return"}"==o.peek()?(c.soyState.pop(),null):o.eatWhile(/^[\w]+/)?"variable-3":(o.next(),null);case"var-def":return(d=o.match(/^\$([\w]+)/))?(c.variables=a(c.variables,d[1]),c.soyState.pop(),"def"):(o.next(),null);case"tag":if(o.match(/^\/?}/))return"/template"==c.tag||"/deltemplate"==c.tag?(l(c),c.indent=0):("/for"!=c.tag&&"/foreach"!=c.tag||l(c),c.indent-=n.indentUnit*("/}"==o.current()||t.indexOf(c.tag)==-1?2:1)),c.soyState.pop(),"keyword";if(o.match(/^([\w?]+)(?==)/)){if("kind"==o.current()&&(d=o.match(/^="([^"]+)/,!1))){var f=d[1];c.kind.push(f),c.kindTag.push(c.tag),c.localMode=u[f]||u.html,c.localState=e.startState(c.localMode)}return"attribute"}return o.match(/^"/)?(c.soyState.push("string"),"string"):(d=o.match(/^\$([\w]+)/))?s(c.variables,d[1]):(d=o.match(/^\w+/))?/^(?:as|and|or|not|in)$/.test(d[0])?"keyword":null:(o.next(),null);case"literal":return o.match(/^(?=\{\/literal})/)?(c.indent-=n.indentUnit,c.soyState.pop(),this.token(o,c)):i(o,c,/\{\/literal}/);case"string":var d=o.match(/^.*?("|\\[\s\S])/);return d?'"'==d[1]&&c.soyState.pop():o.skipToEnd(),"string"}return o.match(/^\/\*/)?(c.soyState.push("comment"),"comment"):o.match(o.sol()?/^\s*\/\/.*/:/^\s+\/\/.*/)?"comment":o.match(/^\{literal}/)?(c.indent+=n.indentUnit,c.soyState.push("literal"),"keyword"):(d=o.match(/^\{([\/@\\]?[\w?]*)/))?("/switch"!=d[1]&&(c.indent+=(/^(\/|(else|elseif|ifempty|case|default)$)/.test(d[1])&&"switch"!=c.tag?1:2)*n.indentUnit),c.tag=d[1],c.tag=="/"+r(c.kindTag)&&(c.kind.pop(),c.kindTag.pop(),c.localMode=u[r(c.kind)]||u.html,c.localState=e.startState(c.localMode)),c.soyState.push("tag"),"template"!=c.tag&&"deltemplate"!=c.tag||c.soyState.push("templ-def"),"call"!=c.tag&&"delcall"!=c.tag||c.soyState.push("templ-ref"),"let"==c.tag&&c.soyState.push("var-def"),"for"!=c.tag&&"foreach"!=c.tag||(c.scopes=a(c.scopes,c.variables),c.soyState.push("var-def")),c.tag.match(/^@param\??/)&&c.soyState.push("param-def"),"keyword"):i(o,c,/\{|\s+\/\/|\/\*/)},indent:function(t,i){var o=t.indent,a=r(t.soyState);if("comment"==a)return e.Pass;if("literal"==a)/^\{\/literal}/.test(i)&&(o-=n.indentUnit);else{if(/^\s*\{\/(template|deltemplate)\b/.test(i))return 0;/^\{(\/|(fallbackmsg|elseif|else|ifempty)\b)/.test(i)&&(o-=n.indentUnit),"switch"!=t.tag&&/^\{(case|default)\b/.test(i)&&(o-=n.indentUnit),/^\{\/switch\b/.test(i)&&(o-=n.indentUnit)}return o&&t.localMode.indent&&(o+=t.localMode.indent(t.localState,i)),o},innerMode:function(e){return e.soyState.length&&"literal"!=r(e.soyState)?null:{state:e.localState,mode:e.localMode}},electricInput:/^\s*\{(\/|\/template|\/deltemplate|\/switch|fallbackmsg|elseif|else|case|default|ifempty|\/literal\})$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",useInnerComments:!1,fold:"indent"}},"htmlmixed"),e.registerHelper("hintWords","soy",t.concat(["delpackage","namespace","alias","print","css","debugger"])),e.defineMIME("text/x-soy","soy")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("tornado:inner",function(){function e(e,n){e.eatWhile(/[^\{]/);var r=e.next();if("{"==r&&(r=e.eat(/\{|%|#/)))return n.tokenize=t(r),"tag"}function t(t){return"{"==t&&(t="}"),function(r,i){var o=r.next();return o==t&&r.eat("}")?(i.tokenize=e,"tag"):r.match(n)?"keyword":"#"==t?"comment":"string"}}var n=["and","as","assert","autoescape","block","break","class","comment","context","continue","datetime","def","del","elif","else","end","escape","except","exec","extends","false","finally","for","from","global","if","import","in","include","is","json_encode","lambda","length","linkify","load","module","none","not","or","pass","print","put","raise","raw","return","self","set","squeeze","super","true","try","url_escape","while","with","without","xhtml_escape","yield"];return n=new RegExp("^(("+n.join(")|(")+"))\\b"),{startState:function(){return{tokenize:e}},token:function(e,t){return t.tokenize(e,t)}}}),e.defineMode("tornado",function(t){var n=e.getMode(t,"text/html"),r=e.getMode(t,"tornado:inner");return e.overlayMode(n,r)}),e.defineMIME("text/x-tornado","tornado")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("twig:inner",function(){function e(e,a){var s=e.peek();if(a.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,e.match(i))return"atom";if(e.match(o))return"number"}if(a.sign){if(a.sign=!1,e.match(i))return"atom";if(e.match(o))return"number"}if(a.instring)return s==a.instring&&(a.instring=!1),e.next(),"string";if("'"==s||'"'==s)return a.instring=s,e.next(),"string";if(e.match(a.intag+"}")||e.eat("-")&&e.match(a.intag+"}"))return a.intag=!1,"tag";if(e.match(n))return a.operator=!0,"operator";if(e.match(r))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(t))return"keyword";if(e.match(i))return"atom";if(e.match(o))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(s=e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(s=e.eat(/\{|%/))return a.intag=s,"{"==s&&(a.intag="}"),e.eat("-"),"tag"}e.next()}var t=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],n=/^[+\-*&%=<>!?|~^]/,r=/^[:\[\(\{]/,i=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],o=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return t=new RegExp("(("+t.join(")|(")+"))\\b"),i=new RegExp("(("+i.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(t,n){return e(t,n)}}}),e.defineMode("twig",function(t,n){var r=e.getMode(t,"twig:inner");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:r,parseDelimiters:!0}):r}),e.defineMIME("text/x-twig","twig")}),function(e){"use strict";"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/overlay"),require("../xml/xml"),require("../javascript/javascript"),require("../coffeescript/coffeescript"),require("../css/css"),require("../sass/sass"),require("../stylus/stylus"),require("../pug/pug"),require("../handlebars/handlebars")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],e):e(CodeMirror)}(function(e){var t={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};e.defineMode("vue-template",function(t,n){var r={token:function(e){if(e.match(/^\{\{.*?\}\}/))return"meta mustache";for(;e.next()&&!e.match("{{",!1););return null}};return e.overlayMode(e.getMode(t,n.backdrop||"text/html"),r)}),e.defineMode("vue",function(n){return e.getMode(n,{name:"htmlmixed",tags:t})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),e.defineMIME("script/x-vue","vue"),e.defineMIME("text/x-vue","vue")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../yaml/yaml")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../yaml/yaml"],e):e(CodeMirror)}(function(e){var t=0,n=1,r=2;e.defineMode("yaml-frontmatter",function(i,o){function a(e){return e.state==r?l:s}var s=e.getMode(i,"yaml"),l=e.getMode(i,o&&o.base||"gfm");return{startState:function(){return{state:t,inner:e.startState(s)}},copyState:function(t){return{state:t.state,inner:e.copyState(a(t),t.inner)}},token:function(i,o){if(o.state==t)return i.match(/---/,!1)?(o.state=n,s.token(i,o.inner)):(o.state=r,o.inner=e.startState(l),l.token(i,o.inner));if(o.state==n){var a=i.sol()&&i.match(/---/,!1),c=s.token(i,o.inner);return a&&(o.state=r,o.inner=e.startState(l)),c}return l.token(i,o.inner)},innerMode:function(e){return{mode:a(e),state:e.inner}},blankLine:function(e){var t=a(e);if(t.blankLine)return t.blankLine(e.inner)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=e.split(/\s+/),r=0;r!\?.&:,;]/,o=" if switch macro function list noparse compress escape noescape attempt recurse fallback ",a=" else elseif case default break return nested assign include import global local setting flush stop ftl t lt rt nt recover visit recure ",s="substring cap_first uncap_first capitalize chop_linebreak date time datetime ends_with html group index_of j_string js_string js_string length lower_case left_pad right_pad contains matches number replace rtf url split starts_with string trim upper_case word_list xhtml xml c round floor ceiling short medium long full first last seq_contains seq_index_of seq_last_index_of reverse size sort sort_by chunk keys byte double float int eval has_content interpret is_string is_number is_boolean is_date is_method is_transform is_macro is_hash is_hash_ex is_sequence is_collection is_enumerable is_indexable is_directive is_node namespace new",l="as in true false using gt gte lt lte";e.defineMode("ftl:inner",function(t,o){function a(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function s(e,t,n,r){return e.context=new a(e.indented,t,n,r,e.context)}function l(e){if(e.context.prev){e.context.type;return e.indented=e.context.indented,e.context=e.context.prev}}function c(e,t){for(;!e.eol();){if(e.match("-->")){t.tokenize=null;break}e.next()}return"comment"}function u(e,t,a){function c(a,c){var u=a.next();if('"'==u||"'"==u){var f=c.tokenize;return c.tokenize=d(u,f),c.tokenize(a,c)}if(/\d/.test(u))return a.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\)]/.test(u)){if("{"==u)s(c,a.column(),"}");else if("["==u)s(c,a.column(),"]");else if("("==u)s(c,a.column(),")");else{if(u===c.context.type)return l(c),"bracket";if(u===e)return c.tokenize=null,t}return"bracket"}if(i.test(u))return">"==u&&">"==e?(c.tokenize=null,t):("&"==u&&a.match(/gt;|lt;/),"/"==u&&">"==e&&a.peek()==e?(a.next(),c.tokenize=null,t):"operator");a.eatWhile(r);var p=a.current();return"?"==n&&o.builtin.propertyIsEnumerable(p)?"builtin":o.atoms.propertyIsEnumerable(p)?"atom":"variable"}return function(e,t){var n=c(e,t),r=e.current();return"function"==typeof a&&(n=a(n,r,e,t)),n}}function d(e,t){return function(n,r){for(var i,o=!1,a=!1;null!=(i=n.next());){if(i==e&&!o){a=!0;break}o=!o&&"\\"==i}return a&&(r.tokenize=t),"string"}}function f(e,t){e.eatWhile(r);var n,i=e.current();n=o.directive.propertyIsEnumerable(i)?"keyword":"keyword error",s(t,e.column(),i);var a,l;return"function"!=i&&"macro"!=i||(l=!0,a=function(e,t,n,r){return l?(l=!1,"variable"!=e?"error":"def"):e}),t.tokenize=u(">","tag bracket",a),n}function p(e,t){if(e.eat(">"))return t.tokenize=null,"tag bracket";e.eatWhile(/[^\>]/);var n,r=e.current();if(o.directive.propertyIsEnumerable(r)){for(n="keyword";r!=t.context.type&&o.selfCloseDirective.propertyIsEnumerable(t.context.type);)l(t);r==t.context.type?l(t):n+=" error"}else n="error";return n}function m(e,t){var n,r=!0,i=function(e,t,i,o){return r&&"variable"==e?(r=!1,n=t,"variable-3"):("tag bracket"==e&&">"==t&&s(o,i.column(),"@"+n),e)};return t.tokenize=u(">","tag bracket",i),"tag bracket"}function h(e,t){if(e.eat(">"))return t.tokenize=null,"tag bracket";e.eatWhile(/[^\>]/);var n="@"+e.current();return n!=t.context.type?"error":(l(t),"variable-3")}return{startState:function(){return{tokenize:null,advancing:!0,context:new a(0,0,"top",!1),indented:0}},token:function(e,t){if(e.eatSpace())return null;if(t.indented=e.indentation(),t.tokenize){var r=t.tokenize(e,t);return n=e.current(),r}for(;t.context.type.match(/[\)\]\}]/);)l(t);return e.match("${")?(t.tokenize=u("}","bracket"),"bracket"):e.match("<#")?e.match("--")?(t.tokenize=c,"comment"):(t.tokenize=f,"tag bracket"):e.match("<@")?(t.tokenize=m,"tag bracket"):e.match("=0?/^\s*<(#else|\/#if)/.test(r):"case default".indexOf(i.type)>=0?/^\s*<#(case|default)/.test(r):!!o.selfCloseDirective.propertyIsEnumerable(i.type)||/^\s*\<\/\#/.test(r)),i.align?i.column+(s?0:1):i.indented+(s?0:t.indentUnit)},blockCommentStart:"<#--",blockCommentEnd:"-->",electricInput:/<\/[\#\@][\s\w\.]+>$/,fold:["comment","xml","brace"]}}),e.defineMode("freemarker",function(n){function r(e,t){var n=t.curMode===c;if(n){if(n&&!t.ftl.advancing)return t.curMode=i,t.curState=t.html,t.curState.htmlState.indented=e.indentation(),null}else if(e.match(/^(<\/?\#)|(<\/?\@)|(\$\{)/,!1))return t.curMode=c,t.curState=t.ftl,t.curState.advancing=!0,t.curState.indented=e.indentation(),null;return t.curMode.token(e,t.curState)}var i=e.getMode(n,"text/html"),c=e.getMode(n,{name:"ftl:inner",directive:t(o+a),selfCloseDirective:t(a),builtin:t(s),atoms:t(l)});return{startState:function(){var t=e.startState(i),n=e.startState(c);return{html:t,ftl:n,curMode:c,curState:n,pending:null}},copyState:function(t){var n,r=t.html,o=e.copyState(i,r),a=t.ftl,s=e.copyState(c,a);return n=t.curMode==i?o:s,{html:o,ftl:s,curMode:t.curMode,curState:n,pending:t.pending}},token:r,indent:function(e,t){if(e.curMode!=c&&/^\s*<\/?[\#\@]/.test(t))return c.indent(e.ftl,t);var n=e.curMode.indent(e.curState,t);return e.curMode==i&&e.html.htmlState&&e.html.htmlState.context&&0==n&&(n=e.html.htmlState.context.indent),n},innerMode:function(e){return{state:e.curState,mode:e.curMode}}}}),e.defineMIME("text/x-freemarker","freemarker")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line==t.line&&e.ch==t.ch}function n(e){R.push(e),R.length>50&&R.shift()}function r(e){return R.length?void(R[R.length-1]+=e):n(e)}function i(e){return R[R.length-(e?Math.min(e,1):1)]||""}function o(){return R.length>1&&R.pop(),i()}function a(e,i,o,a,s){null==s&&(s=e.getRange(i,o)),a&&N&&N.cm==e&&t(i,N.pos)&&e.isClean(N.gen)?r(s):n(s),e.replaceRange("",i,o,"+delete"),N=a?{cm:e,pos:i,gen:e.changeGeneration()}:null}function s(e,t,n){return e.findPosH(t,n,"char",!0)}function l(e,t,n){return e.findPosH(t,n,"word",!0)}function c(e,t,n){return e.findPosV(t,n,"line",e.doc.sel.goalColumn)}function u(e,t,n){return e.findPosV(t,n,"page",e.doc.sel.goalColumn)}function d(e,t,n){for(var r=t.line,i=e.getLine(r),o=/\S/.test(n<0?i.slice(0,t.ch):i.slice(t.ch)),a=e.firstLine(),s=e.lastLine();;){if(r+=n,rs)return e.clipPos(z(r-n,n<0?0:null));i=e.getLine(r);var l=/\S/.test(i);if(l)o=!0;else if(o)return z(r,0)}}function f(e,t,n){for(var r=t.line,i=t.ch,o=e.getLine(t.line),a=!1;;){var s=o.charAt(i+(n<0?-1:0));if(s){if(a&&/[!?.]/.test(s))return z(r,i+(n>0?1:0));a||(a=/\w/.test(s)),i+=n}else{if(r==(n<0?e.firstLine():e.lastLine()))return z(r,i);if(o=e.getLine(r+n),!/\S/.test(o))return z(r,i);r+=n,i=n<0?o.length:0}}}function p(e,n,r){var i;if(e.findMatchingBracket&&(i=e.findMatchingBracket(n,!0))&&i.match&&(i.forward?1:-1)==r)return r>0?z(i.to.line,i.to.ch+1):i.to;for(var o=!0;;o=!1){var a=e.getTokenAt(n),s=z(n.line,r<0?a.start:a.end);if(!(o&&r>0&&a.end==n.ch)&&/\w/.test(a.string))return s;var l=e.findPosH(s,r,"char");if(t(s,l))return n;n=l}}function m(e,t){var n=e.state.emacsPrefix;return n?(w(e),"-"==n?-1:Number(n)):t?null:1}function h(e){var t="string"==typeof e?function(t){t.execCommand(e)}:e;return function(e){var n=m(e);t(e);for(var r=1;r1&&"+input"==t.origin){for(var r=t.text.join("\n"),i="",o=1;o',n,{bottom:!0}):n(prompt(t,""))}function A(e,t){var n=e.getCursor(),r=e.findPosH(n,1,"word");e.replaceRange(t(e.getRange(n,r)),n,r),e.setCursor(r)}function L(e){for(var t=e.getCursor(),n=t.line,r=t.ch,i=[];n>=e.firstLine();){for(var o=e.getLine(n),a=null==r?o.length:r;a>0;){var r=o.charAt(--a);if(")"==r)i.push("(");else if("]"==r)i.push("[");else if("}"==r)i.push("{");else if(/[\(\{\[]/.test(r)&&(!i.length||i.pop()!=r))return e.extendSelection(z(n,a))}--n,r=null}}function I(e){e.execCommand("clearSearch"),T(e)}function O(e){q[e]=function(t){x(t,e)},D["Ctrl-"+e]=function(t){x(t,e)},P["Ctrl-"+e]=!0}var z=e.Pos,R=[],N=null,P={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};e.emacs={kill:a,killRegion:y,repeated:h};for(var D=e.keyMap.emacs=e.normalizeKeyMap({"Ctrl-W":function(e){a(e,e.getCursor("start"),e.getCursor("end"))},"Ctrl-K":h(function(e){var t=e.getCursor(),n=e.clipPos(z(t.line)),r=e.getRange(t,n);/\S/.test(r)||(r+="\n",n=z(t.line+1,0)),a(e,t,n,!0,r)}),"Alt-W":function(e){n(e.getSelection()),T(e)},"Ctrl-Y":function(e){var t=e.getCursor();e.replaceRange(i(m(e)),t,t,"paste"),e.setSelection(t,e.getCursor())},"Alt-Y":function(e){e.replaceSelection(o(),"around","paste")},"Ctrl-Space":E,"Ctrl-Shift-2":E,"Ctrl-F":v(s,1),"Ctrl-B":v(s,-1),Right:v(s,1),Left:v(s,-1),"Ctrl-D":function(e){b(e,s,1)},Delete:function(e){y(e)||b(e,s,1)},"Ctrl-H":function(e){b(e,s,-1)},Backspace:function(e){y(e)||b(e,s,-1)},"Alt-F":v(l,1),"Alt-B":v(l,-1),"Alt-D":function(e){b(e,l,1)},"Alt-Backspace":function(e){b(e,l,-1)},"Ctrl-N":v(c,1),"Ctrl-P":v(c,-1),Down:v(c,1),Up:v(c,-1),"Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":v(u,-1),"Ctrl-V":v(u,1),PageUp:v(u,-1),PageDown:v(u,1),"Ctrl-Up":v(d,-1),"Ctrl-Down":v(d,1),"Alt-A":v(f,-1),"Alt-E":v(f,1),"Alt-K":function(e){b(e,f,1)},"Ctrl-Alt-K":function(e){b(e,p,1)},"Ctrl-Alt-Backspace":function(e){b(e,p,-1)},"Ctrl-Alt-F":v(p,1),"Ctrl-Alt-B":v(p,-1),"Shift-Ctrl-Alt-2":function(e){var t=e.getCursor();e.setSelection(g(e,t,p,1),t)},"Ctrl-Alt-T":function(e){var t=p(e,e.getCursor(),-1),n=p(e,t,1),r=p(e,n,1),i=p(e,r,-1);e.replaceRange(e.getRange(i,r)+e.getRange(n,i)+e.getRange(t,n),t,r)},"Ctrl-Alt-U":h(L),"Alt-Space":function(e){for(var t=e.getCursor(),n=t.ch,r=t.ch,i=e.getLine(t.line);n&&/\s/.test(i.charAt(n-1));)--n;for(;r0?e.setCursor(t-1):void M(e,"Goto line",function(t){var n;t&&!isNaN(n=Number(t))&&n==(0|n)&&n>0&&e.setCursor(n-1)})},"Ctrl-X Tab":function(e){e.indentSelection(m(e,!0)||e.getOption("indentUnit"))},"Ctrl-X Ctrl-X":function(e){e.setSelection(e.getCursor("head"),e.getCursor("anchor"))},"Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X U":h("undo"),"Ctrl-X K":"close","Ctrl-X Delete":function(e){a(e,e.getCursor(),f(e,e.getCursor(),1),!0)},"Ctrl-X H":"selectAll","Ctrl-Q Tab":h("insertTab"),"Ctrl-U":S}),q={"Ctrl-G":w},$=0;$<10;++$)O(String($));O("-")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n,r){if(r<0&&0==n.ch)return t.clipPos(p(n.line-1));var i=t.getLine(n.line);if(r>0&&n.ch>=i.length)return t.clipPos(p(n.line+1,0));for(var o,a="start",s=n.ch,l=r<0?0:i.length,c=0;s!=l;s+=r,
c++){var u=i.charAt(r<0?s-1:s),d="_"!=u&&e.isWordChar(u)?"w":"o";if("w"==d&&u.toUpperCase()==u&&(d="W"),"start"==a)"o"!=d&&(a="in",o=d);else if("in"==a&&o!=d){if("w"==o&&"W"==d&&r<0&&s--,"W"==o&&"w"==d&&r>0){o="w";continue}break}}return p(n.line,s)}function n(e,n){e.extendSelectionsBy(function(r){return e.display.shift||e.doc.extend||r.empty()?t(e.doc,r.head,n):n<0?r.from():r.to()})}function r(t,n){return t.isReadOnly()?e.Pass:(t.operation(function(){for(var e=t.listSelections().length,r=[],i=-1,o=0;o=0;s--){var l=r[o[s]];if(!(c&&e.cmpPos(l.head,c)>0)){var u=i(t,l.head);c=u.from,t.replaceRange(n(u.word),u.from,u.to)}}})}function c(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var o=i(t,n);if(!o.word)return;n=o.from,r=o.to}return{from:n,to:r,query:t.getRange(n,r),word:o}}function u(e,t){var n=c(e);if(n){var r=n.query,i=e.getSearchCursor(r,t?n.to:n.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(r,t?p(e.firstLine(),0):e.clipPos(p(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):n.word&&e.setSelection(n.from,n.to))}}var d=e.keyMap.sublime={fallthrough:"default"},f=e.commands,p=e.Pos,m=e.keyMap.default==e.keyMap.macDefault,h=m?"Cmd-":"Ctrl-",g=m?"Ctrl-":"Alt-";f[d[g+"Left"]="goSubwordLeft"]=function(e){n(e,-1)},f[d[g+"Right"]="goSubwordRight"]=function(e){n(e,1)},m&&(d["Cmd-Left"]="goLineStartSmart");var v=m?"Ctrl-Alt-":"Ctrl-";f[d[v+"Up"]="scrollLineUp"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},f[d[v+"Down"]="scrollLineDown"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},f[d["Shift-"+h+"L"]="splitSelectionByLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;ri.line&&a==o.line&&0==o.ch||n.push({anchor:a==i.line?i:p(a,0),head:a==o.line?o:p(a)});e.setSelections(n,0)},d["Shift-Tab"]="indentLess",f[d.Esc="singleSelectionTop"]=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},f[d[h+"L"]="selectLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;ri?r.push(l,c):r.length&&(r[r.length-1]=c),i=c}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+a,p(t.lastLine()),null,"+swapLine"):t.replaceRange(a+"\n",p(i,0),null,"+swapLine")}t.setSelections(o),t.scrollIntoView()})},f[d[y+"Down"]="swapLineDown"]=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],i=t.lastLine()+1,o=n.length-1;o>=0;o--){var a=n[o],s=a.to().line+1,l=a.from().line;0!=a.to().ch||a.empty()||s--,s=0;e-=2){var n=r[e],i=r[e+1],o=t.getLine(n);n==t.lastLine()?t.replaceRange("",p(n-1),p(n),"+swapLine"):t.replaceRange("",p(n,0),p(n+1,0),"+swapLine"),t.replaceRange(o+"\n",p(i,0),null,"+swapLine")}t.scrollIntoView()})},f[d[h+"/"]="toggleCommentIndented"]=function(e){e.toggleComment({indent:!0})},f[d[h+"J"]="joinLines"]=function(e){for(var t=e.listSelections(),n=[],r=0;r=0;i--){var o=n[i].head,a=t.getRange({line:o.line,ch:0},o),s=e.countColumn(a,null,t.getOption("tabSize")),l=t.findPosH(o,-1,"char",!1);if(a&&!/\S/.test(a)&&s%r==0){var c=new p(o.line,e.findColumn(a,s-r,r));c.ch!=o.ch&&(l=c)}t.replaceRange("",l,o,"+delete")}})},f[d[x+h+"K"]="delLineRight"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,p(t[n].to().line),"+delete");e.scrollIntoView()})},f[d[x+h+"U"]="upcaseAtCursor"]=function(e){l(e,function(e){return e.toUpperCase()})},f[d[x+h+"L"]="downcaseAtCursor"]=function(e){l(e,function(e){return e.toLowerCase()})},f[d[x+h+"Space"]="setSublimeMark"]=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},f[d[x+h+"A"]="selectToSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},f[d[x+h+"W"]="deleteToSublimeMark"]=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},f[d[x+h+"X"]="swapWithSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},f[d[x+h+"Y"]="sublimeYank"]=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},d[x+h+"G"]="clearBookmarks",f[d[x+h+"C"]="showInCenter"]=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)};var k=m?"Ctrl-Shift-":"Ctrl-Alt-";f[d[k+"Up"]="selectLinesUpward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;ne.firstLine()&&e.addSelection(p(r.head.line-1,r.head.ch))}})},f[d[k+"Down"]="selectLinesDownward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;n",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],n=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],r=e.Pos,i=function(){function i(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",et),_(t),e.on(t.getInputField(),"paste",u(t))}function o(t){t.setOption("disableInput",!1),t.off("cursorActivity",et),e.off(t.getInputField(),"paste",u(t)),t.state.vim=null}function a(t,n){this==e.keyMap.vim&&e.rmClass(t.getWrapperElement(),"cm-fat-cursor"),n&&n.attach==s||o(t,!1)}function s(t,n){this==e.keyMap.vim&&e.addClass(t.getWrapperElement(),"cm-fat-cursor"),n&&n.attach==s||i(t)}function l(t,n){if(n){if(this[t])return this[t];var r=c(t);if(!r)return!1;var i=e.Vim.findKey(n,r);return"function"==typeof i&&e.signal(n,"vim-keypress",r),i}}function c(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var r=!1,i=0;i")}function u(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(D(e.getCursor(),0,1)),Et.enterInsertMode(e,{},t))}),t.onPasteFn}function d(e,t){for(var n=[],r=e;r=e.firstLine()&&t<=e.lastLine()}function p(e){return/^[a-z]$/.test(e)}function m(e){return"()[]{}".indexOf(e)!=-1}function h(e){return ct.test(e)}function g(e){return/^[A-Z]$/.test(e)}function v(e){return/^\s*$/.test(e)}function b(e,t){for(var n=0;n"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),i=t.slice(0,n);return r==i&&e.length>n?"full":0==i.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function F(e){var t=/^.*(<[\w\-]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" "}return n}function W(e,t,n){return function(){for(var r=0;r2&&(t=G.apply(void 0,Array.prototype.slice.call(arguments,1))),H(e,t)?e:t}function V(e,t){return arguments.length>2&&(t=V.apply(void 0,Array.prototype.slice.call(arguments,1))),H(e,t)?t:e}function K(e,t,n){var r=H(e,t),i=H(t,n);return r&&i}function Z(e,t){return e.getLine(t).length}function X(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function J(e,t,n){var i=Z(e,t),o=new Array(n-i+1).join(" ");e.setCursor(r(t,i)),e.replaceRange(o,e.getCursor())}function Q(e,t){var n=[],i=e.listSelections(),o=U(e.clipPos(t)),a=!B(t,o),s=e.getCursor("head"),l=te(i,s),c=B(i[l].head,i[l].anchor),u=i.length-1,d=u-l>l?u:0,f=i[d].anchor,p=Math.min(f.line,o.line),m=Math.max(f.line,o.line),h=f.ch,g=o.ch,v=i[d].head.ch-h,b=g-h;v>0&&b<=0?(h++,a||g--):v<0&&b>=0?(h--,c||g++):v<0&&b==-1&&(h--,g++);for(var y=p;y<=m;y++){var x={anchor:new r(y,h),head:new r(y,g)};n.push(x)}return l=o.line==m?n.length-1:0,e.setSelections(n),t.ch=g,f.ch=h,f}function ee(e,t,n){for(var r=[],i=0;ic&&(o.line=c),o.ch=Z(e,o.line)}return{ranges:[{anchor:a,head:o}],primary:0}}if("block"==n){for(var u=Math.min(a.line,o.line),d=Math.min(a.ch,o.ch),f=Math.max(a.line,o.line),p=Math.max(a.ch,o.ch)+1,m=f-u+1,h=o.line==u?0:m-1,g=[],v=0;v0&&o&&v(o);o=i.pop())n.line--,n.ch=0;o?(n.line--,n.ch=Z(e,n.line)):n.ch=0}}function ue(e,t,n){t.ch=0,n.ch=0,n.line++}function de(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function fe(e,t,n,i,o){for(var a=se(e),s=e.getLine(a.line),l=a.ch,c=o?ut[0]:dt[0];!c(s.charAt(l));)if(l++,l>=s.length)return null;i?c=dt[0]:(c=ut[0],c(s.charAt(l))||(c=ut[1]));for(var u=l,d=l;c(s.charAt(u))&&u=0;)d--;if(d++,t){for(var f=u;/\s/.test(s.charAt(u))&&u0;)d--;d||(d=p)}}return{start:r(a.line,d),end:r(a.line,u)}}function pe(e,t,n){B(t,n)||xt.jumpList.add(e,t,n)}function me(e,t){xt.lastCharacterSearch.increment=e,xt.lastCharacterSearch.forward=t.forward,xt.lastCharacterSearch.selectedCharacter=t.selectedCharacter}function he(e,t,n,i){var o=U(e.getCursor()),a=n?1:-1,s=n?e.lineCount():-1,l=o.ch,c=o.line,u=e.getLine(c),d={lineText:u,nextCh:u.charAt(l),lastCh:null,index:l,symb:i,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[i],forward:n,depth:0,curMoveThrough:!1},f=Tt[i];if(!f)return o;var p=Mt[f].init,m=Mt[f].isComplete;for(p&&p(d);c!==s&&t;){if(d.index+=a,d.nextCh=d.lineText.charAt(d.index),!d.nextCh){if(c+=a,d.lineText=e.getLine(c)||"",a>0)d.index=0;else{var h=d.lineText.length;d.index=h>0?h-1:0}d.nextCh=d.lineText.charAt(d.index)}m(d)&&(o.line=c,o.ch=d.index,t--)}return d.nextCh||d.curMoveThrough?r(c,d.index):o}function ge(e,t,n,r,i){var o=t.line,a=t.ch,s=e.getLine(o),l=n?1:-1,c=r?dt:ut;if(i&&""==s){if(o+=l,s=e.getLine(o),!f(e,o))return null;a=n?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var u=l>0?s.length:-1,d=u,p=u;a!=u;){for(var m=!1,h=0;h0?0:s.length}}function ve(e,t,n,i,o,a){var s=U(t),l=[];(i&&!o||!i&&o)&&n++;for(var c=!(i&&o),u=0;u0;)s(p,i)&&n--,p+=i;return new r(p,0)}var m=e.state.vim;if(m.visualLine&&s(u,1,!0)){var h=m.sel.anchor;s(h.line,-1,!0)&&(o&&h.line==u||(u+=1))}var g=a(u);for(p=u;p<=f&&n;p++)s(p,1,!0)&&(o&&a(p)==g||n--);for(c=new r(p,0),p>f&&!g?g=!0:o=!1,p=u;p>d&&(o&&a(p)!=g&&p!=u||!s(p,-1,!0));p--);return l=new r(p,0),{start:l,end:c}}function _e(e,t,n,i){var o,a,s=t,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[n],u=e.getLine(s.line).charAt(s.ch),d=u===c?1:0;if(o=e.scanForBracket(r(s.line,s.ch+d),-1,null,{bracketRegex:l}),a=e.scanForBracket(r(s.line,s.ch+d),1,null,{bracketRegex:l}),!o||!a)return{start:s,end:s};if(o=o.pos,a=a.pos,o.line==a.line&&o.ch>a.ch||o.line>a.line){var f=o;o=a,a=f}return i?a.ch+=1:o.ch+=1,{start:o,end:a}}function Se(e,t,n,i){var o,a,s,l,c=U(t),u=e.getLine(c.line),d=u.split(""),f=d.indexOf(n);if(c.ch-1&&!o;s--)d[s]==n&&(o=s+1);else o=c.ch+1;if(o&&!a)for(s=o,l=d.length;s'+t+"",{bottom:!0,duration:5e3}):alert(t)}function Ne(e,t){var n=''+(e||"")+'';return t&&(n+=' '+t+""),n}function Pe(e,t){var n=(t.prefix||"")+" "+(t.desc||""),r=Ne(t.prefix,t.desc);Te(e,r,n,t.onClose,t)}function De(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r=t&&e<=n:e==t}function Be(e){var t=e.getScrollInfo(),n=6,r=10,i=e.coordsChar({left:0,top:n+t.top},"local"),o=t.clientHeight-r+t.top,a=e.coordsChar({left:0,top:o},"local");return{top:i.line,bottom:a.line}}function He(t,n,r,i,o,a,s,l,c){function u(){t.operation(function(){for(;!h;)d(),f();p()})}function d(){var e=t.getRange(a.from(),a.to()),n=e.replace(s,l);a.replace(n)}function f(){for(;a.findNext()&&Ue(a.from(),i,o);)if(r||!g||a.from().line!=g.line)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),g=a.from(),void(h=!1);h=!0}function p(e){if(e&&e(),t.focus(),g){t.setCursor(g);var n=t.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=g.ch}c&&c()}function m(n,r,i){e.e_stop(n);var o=e.keyName(n);switch(o){case"Y":d(),f();break;case"N":f();break;case"A":var a=c;c=void 0,t.operation(u),c=a;break;case"L":d();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":p(i)}return h&&p(i),!0}t.state.vim.exMode=!0;var h=!1,g=a.from();return f(),h?void Re(t,"No matches for "+s.source):n?void Pe(t,{prefix:"replace with "+l+" (y/n/a/q/l)",onKeyDown:m}):(u(),void(c&&c()))}function Ge(t){var n=t.state.vim,r=xt.macroModeState,i=xt.registerController.getRegister("."),o=r.isPlaying,a=r.lastInsertModeChanges,s=[];if(!o){for(var l=a.inVisualBlock?n.lastSelection.visualBlock.height:1,c=a.changes,s=[],u=0;u1&&(ot(t,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&Ye(r)}function Ve(e){t.unshift(e)}function Ke(e,t,n,r,i){var o={keys:e,type:t};o[t]=n,o[t+"Args"]=r;for(var a in i)o[a]=i[a];Ve(o)}function Ze(t,n,r,i){var o=xt.registerController.getRegister(i);if(":"==i)return o.keyBuffer[0]&&Rt.processCommand(t,o.keyBuffer[0]),void(r.isPlaying=!1);var a=o.keyBuffer,s=0;r.isPlaying=!0,r.replaySearchQueries=o.searchQueries.slice(0);for(var l=0;l|<\w+>|./.exec(d),u=c[0],d=d.substring(c.index+u.length),e.Vim.handleKey(t,u,"macro"),n.insertMode){var f=o.insertModeChanges[s++].changes;xt.macroModeState.lastInsertModeChanges.changes=f,at(t,f,1),Ge(t)}r.isPlaying=!1}function Xe(e,t){if(!e.isPlaying){var n=e.latestRegister,r=xt.registerController.getRegister(n);r&&r.pushText(t)}}function Ye(e){if(!e.isPlaying){var t=e.latestRegister,n=xt.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function Je(e,t){if(!e.isPlaying){var n=e.latestRegister,r=xt.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}function Qe(e,t){var n=xt.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),r.changes.push(i)}t=t.next}}function et(e){var t=e.state.vim;if(t.insertMode){var n=xt.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||nt(e,t);t.visualMode&&tt(e)}function tt(e){var t=e.state.vim,n=N(e,U(t.sel.head)),r=D(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function nt(t,n){var r=t.getCursor("anchor"),i=t.getCursor("head");if(n.visualMode&&!t.somethingSelected()?le(t,!1):n.visualMode||n.insertMode||!t.somethingSelected()||(n.visualMode=!0,n.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),n.visualMode){var o=H(i,r)?0:-1,a=H(i,r)?-1:0;i=D(i,0,o),r=D(r,0,a),n.sel={anchor:r,head:i},xe(t,n,"<",G(i,r)),xe(t,n,">",V(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}function rt(e){this.keyName=e}function it(t){function n(){return i.maybeReset&&(i.changes=[],i.maybeReset=!1),i.changes.push(new rt(o)),!0}var r=xt.macroModeState,i=r.lastInsertModeChanges,o=e.keyName(t);o&&(o.indexOf("Delete")==-1&&o.indexOf("Backspace")==-1||e.lookupKey(o,"vim-insert",n))}function ot(e,t,n,r){function i(){s?_t.processAction(e,t,t.lastEditActionCommand):_t.evalInput(e,t)}function o(n){if(a.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=a.lastInsertModeChanges;at(e,r.changes,n)}}var a=xt.macroModeState;a.isPlaying=!0;var s=!!t.lastEditActionCommand,l=t.inputState;if(t.inputState=t.lastEditInputState,s&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c"]),gt=[].concat(ft,pt,mt,["-",'"',".",":","/"]),vt={};y("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e){var n=t.getOption("mode");return"null"==n?"":n}var n=""==e?"null":e;t.setOption("mode",n)}});var bt=function(){function e(e,t,s){function l(t){var i=++r%n,o=a[i];o&&o.clear(),a[i]=e.setBookmark(t)}var c=r%n,u=a[c];if(u){var d=u.find();d&&!B(d,t)&&l(t)}else l(t);l(s),i=r,o=r-n+1,o<0&&(o=0)}function t(e,t){r+=t,r>i?r=i:r0?1:-1,u=e.getCursor();do if(r+=c,s=a[(n+r)%n],s&&(l=s.find())&&!B(u,l))break;while(ro)}return s}var n=100,r=-1,i=0,o=0,a=new Array(n);return{cachedCursor:void 0,add:e,move:t}},yt=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};w.prototype={exitMacroRecordMode:function(){var e=xt.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=xt.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var xt,kt,wt={buildKeyMap:function(){},getRegisterController:function(){return xt.registerController},resetVimGlobalState_:S,getVimGlobalState_:function(){return xt},maybeInitVimState_:_,suppressErrorLogging:!1,InsertModeKey:rt,map:function(e,t,n){Rt.map(e,t,n)},unmap:function(e,t){Rt.unmap(e,t)},setOption:x,getOption:k,defineOption:y,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;zt[e]=n,Rt.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},findKey:function(n,r,i){function o(){var e=xt.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),E(n),!0;"mapping"!=i&&Xe(e,r)}}function a(){if(""==r)return E(n),d.visualMode?le(n):d.insertMode&&Ge(n),!0}function s(t){for(var i;t;)i=/<\w+-.+?>|<\w+>|./.exec(t),r=i[0],t=t.substring(i.index+r.length),e.Vim.handleKey(n,r,"mapping")}function l(){if(a())return!0;for(var e=d.inputState.keyBuffer=d.inputState.keyBuffer+r,i=1==r.length,o=_t.matchCommand(e,t,d.inputState,"insert");e.length>1&&"full"!=o.type;){var e=d.inputState.keyBuffer=e.slice(1),s=_t.matchCommand(e,t,d.inputState,"insert");"none"!=s.type&&(o=s)}if("none"==o.type)return E(n),!1;if("partial"==o.type)return kt&&window.clearTimeout(kt),kt=window.setTimeout(function(){d.insertMode&&d.inputState.keyBuffer&&E(n)},k("insertModeEscKeysTimeout")),!i;if(kt&&window.clearTimeout(kt),i){for(var l=n.listSelections(),c=0;c0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},T.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(yt(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},A.prototype={pushText:function(e,t,n,r,i){r&&"\n"==n.charAt(0)&&(n=n.slice(1)+"\n"),r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(!o){switch(t){case"yank":this.registers[0]=new T(n,r,i);break;case"delete":case"change":n.indexOf("\n")==-1?this.registers["-"]=new T(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new T(n,r))}return void this.unnamedRegister.setText(n,r,i)}var a=g(e);a?o.pushText(n,r):o.setText(n,r,i),this.unnamedRegister.setText(o.toString(),r)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new T),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&b(e,gt)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},L.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i=n.length?(this.iterator=n.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var _t={matchCommand:function(e,t,n,r){var i=$(e,t,r,n);if(!i.full&&!i.partial)return{type:"none"};if(!i.full&&i.partial)return{type:"partial"};for(var o,a=0;a"==o.keys.slice(-11)&&(n.selectedCharacter=F(e)),{type:"full",command:o}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=P(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);E(e)}r.operator=n.operator,r.operatorArgs=P(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=P(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),o=!!i,a=P(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=r.registerName,E(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),Et[n.action](e,a,t)},processSearch:function(t,n,r){function i(e,i,o){xt.searchHistoryController.pushInput(e),xt.searchHistoryController.reset();try{qe(t,e,i,o)}catch(n){return Re(t,"Invalid regex: "+e),void E(t)}_t.processMotion(t,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function o(e){t.scrollTo(f.left,f.top),i(e,!0,!0);var n=xt.macroModeState;n.isRecording&&Je(n,e)}function a(n,r,i){var o,a,s=e.keyName(n);"Up"==s||"Down"==s?(o="Up"==s,a=n.target?n.target.selectionEnd:0,r=xt.searchHistoryController.nextMatch(r,o)||"",i(r),a&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(a,n.target.value.length))):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&xt.searchHistoryController.reset();var c;try{c=qe(t,r,!0,!0)}catch(e){}c?t.scrollIntoView(Fe(t,!l,c),30):(We(t),t.scrollTo(f.left,f.top))}function s(n,r,i){var o=e.keyName(n);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==r?(xt.searchHistoryController.pushInput(r),xt.searchHistoryController.reset(),qe(t,d),We(t),t.scrollTo(f.left,f.top),e.e_stop(n),E(t),i(),t.focus()):"Up"==o||"Down"==o?e.e_stop(n):"Ctrl-U"==o&&(e.e_stop(n),i(""))}if(t.getSearchCursor){var l=r.searchArgs.forward,c=r.searchArgs.wholeWordOnly;Ee(t).setReversed(!l);var u=l?"/":"?",d=Ee(t).getQuery(),f=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var p=xt.macroModeState;if(p.isPlaying){var m=p.replaySearchQueries.shift();i(m,!0,!1)}else Pe(t,{onClose:o,prefix:u,desc:It,onKeyUp:a,onKeyDown:s});break;case"wordUnderCursor":var h=fe(t,!1,!0,!1,!0),g=!0;if(h||(h=fe(t,!1,!0,!1,!1),g=!1),!h)return;var m=t.getLine(h.start.line).substring(h.start.ch,h.end.ch);m=g&&c?"\\b"+m+"\\b":Y(m),xt.jumpList.cachedCursor=t.getCursor(),t.setCursor(h.start),i(m,!0,!1)}}},processEx:function(t,n,r){function i(e){xt.exCommandHistoryController.pushInput(e),xt.exCommandHistoryController.reset(),Rt.processCommand(t,e)}function o(n,r,i){var o,a,s=e.keyName(n);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==r)&&(xt.exCommandHistoryController.pushInput(r),xt.exCommandHistoryController.reset(),e.e_stop(n),E(t),i(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(n),o="Up"==s,a=n.target?n.target.selectionEnd:0,r=xt.exCommandHistoryController.nextMatch(r,o)||"",i(r),a&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(a,n.target.value.length))):"Ctrl-U"==s?(e.e_stop(n),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&xt.exCommandHistoryController.reset()}"keyToEx"==r.type?Rt.processCommand(t,r.exArgs.input):n.visualMode?Pe(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o}):Pe(t,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,t){var n,i,o,a=t.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},d=a.registerName,f=t.sel,p=U(t.visualMode?N(e,f.head):e.getCursor("head")),m=U(t.visualMode?N(e,f.anchor):e.getCursor("anchor")),h=U(p),g=U(m);if(c&&this.recordLastEdit(t,a),o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat(),o>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===o)&&(o=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=o,E(e),s){var v=St[s](e,p,l,t);if(t.lastMotion=St[s],!v)return;if(l.toJumplist){var b=xt.jumpList,y=b.cachedCursor;y?(pe(e,y,v),delete b.cachedCursor):pe(e,p,v)}v instanceof Array?(i=v[0],n=v[1]):n=v,n||(n=U(p)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=N(e,n,t.visualBlock)),i&&(i=N(e,i,!0)),i=i||g,f.anchor=i,f.head=n,oe(e),xe(e,t,"<",H(i,n)?i:n),xe(e,t,">",H(i,n)?n:i)):c||(n=N(e,n),e.setCursor(n.line,n.ch))}if(c){if(u.lastSel){i=g;var x=u.lastSel,k=Math.abs(x.head.line-x.anchor.line),w=Math.abs(x.head.ch-x.anchor.ch);n=x.visualLine?r(g.line+k,g.ch):x.visualBlock?r(g.line+k,g.ch+w):x.head.line==x.anchor.line?r(g.line,g.ch+w):r(g.line+k,g.ch),t.visualMode=!0,t.visualLine=x.visualLine,t.visualBlock=x.visualBlock,f=t.sel={anchor:i,head:n},oe(e)}else t.visualMode&&(u.lastSel={anchor:U(f.anchor),head:U(f.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var _,S,C,T,M;if(t.visualMode){if(_=G(f.head,f.anchor),S=V(f.head,f.anchor),C=t.visualLine||u.linewise,T=t.visualBlock?"block":C?"line":"char",M=ae(e,{anchor:_,head:S},T),C){var A=M.ranges;if("block"==T)for(var L=0;Lu&&o.line==u?this.moveToEol(e,t,n,i):(n.toFirstChar&&(a=de(e.getLine(l)),i.lastHPos=a),i.lastHSPos=e.charCoords(r(l,a),"div").left,r(l,a))},moveByDisplayLines:function(e,t,n,i){var o=t;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var a=n.repeat,s=e.findPosV(o,n.forward?a:-a,"line",i.lastHSPos);if(s.hitSide)if(n.forward)var l=e.charCoords(s,"div"),c={top:l.top+8,left:i.lastHSPos},s=e.coordsChar(c,"div");else{var u=e.charCoords(r(e.firstLine(),0),"div");u.left=i.lastHSPos,s=e.coordsChar(u,"div")}return i.lastHPos=s.ch,s},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return we(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),o=null,a=n.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");n.repeat=a;var o=St.moveByDisplayLines(e,t,n,r);if(!o)return null;var l=e.charCoords(o,"local");return e.scrollTo(null,i.top+l.top-s.top),o},moveByWords:function(e,t,n){return ve(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=n.repeat,i=be(e,r,n.forward,n.selectedCharacter),o=n.forward?-1:1;return me(o,n),i?(i.ch+=o,i):null},moveToCharacter:function(e,t,n){var r=n.repeat;return me(0,n),be(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){var r=n.repeat;return he(e,r,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var i=n.repeat;return r.lastHPos=i-1,r.lastHSPos=e.charCoords(t,"div").left,ye(e,i)},moveToEol:function(e,t,n,i){var o=t;i.lastHPos=1/0;var a=r(o.line+n.repeat-1,1/0),s=e.clipPos(a);return s.ch--,i.lastHSPos=e.charCoords(s,"div").left,a},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return r(n.line,de(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n,i=t,o=i.line,a=i.ch,s=e.getLine(o);do if(n=s.charAt(a++),n&&m(n)){var l=e.getTokenTypeAt(r(o,a));if("string"!==l&&"comment"!==l)break}while(n);if(n){var c=e.findMatchingBracket(r(o,a));return c.to}return i},moveToStartOfLine:function(e,t){return r(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var i=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(i=n.repeat-e.getOption("firstLineNumber")),
r(i,de(e.getLine(i)))},textObjectManipulation:function(e,t,n,r){var i={"(":")",")":"(","{":"}","}":"{","[":"]","]":"["},o={"'":!0,'"':!0},a=n.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!n.textObjectInner;if(i[a])s=_e(e,t,a,l);else if(o[a])s=Se(e,t,a,l);else if("W"===a)s=fe(e,l,!0,!0);else if("w"===a)s=fe(e,l,!0,!1);else{if("p"!==a)return null;if(s=we(e,t,n.repeat,0,l),n.linewise=!0,r.visualMode)r.visualLine||(r.visualLine=!0);else{var c=r.inputState.operatorArgs;c&&(c.linewise=!0),s.end.line--}}return e.state.vim.visualMode?ie(e,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,n){var r=xt.lastCharacterSearch,i=n.repeat,o=n.forward===r.forward,a=(r.increment?1:0)*(o?-1:1);e.moveH(-a,"char"),n.inclusive=!!o;var s=be(e,i,o,r.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}},Ct={change:function(t,n,i){var o,a,s=t.state.vim;if(xt.macroModeState.lastInsertModeChanges.inVisualBlock=s.visualBlock,s.visualMode){a=t.getSelection();var l=O("",i.length);t.replaceSelections(l),o=G(i[0].head,i[0].anchor)}else{var c=i[0].anchor,u=i[0].head;a=t.getRange(c,u);var d=s.lastEditInputState||{};if("moveByWords"==d.motion&&!v(a)){var f=/\s+$/.exec(a);f&&d.motionArgs&&d.motionArgs.forward&&(u=D(u,0,-f[0].length),a=a.slice(0,-f[0].length))}var p=new r(c.line-1,Number.MAX_VALUE),m=t.firstLine()==t.lastLine();u.line>t.lastLine()&&n.linewise&&!m?t.replaceRange("",p,u):t.replaceRange("",c,u),n.linewise&&(m||(t.setCursor(p),e.commands.newlineAndIndent(t)),c.ch=Number.MAX_VALUE),o=c}xt.registerController.pushText(n.registerName,"change",a,n.linewise,i.length>1),Et.enterInsertMode(t,{head:o},t.state.vim)},delete:function(e,t,n){var i,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var s=O("",n.length);e.replaceSelections(s),i=n[0].anchor}else{var l=n[0].anchor,c=n[0].head;t.linewise&&c.line!=e.firstLine()&&l.line==e.lastLine()&&l.line==c.line-1&&(l.line==e.firstLine()?l.ch=0:l=r(l.line-1,Z(e,l.line-1))),o=e.getRange(l,c),e.replaceRange("",l,c),i=l,t.linewise&&(i=St.moveToFirstNonWhiteSpaceCharacter(e,l))}return xt.registerController.pushText(t.registerName,"delete",o,t.linewise,a.visualBlock),N(e,i)},indent:function(e,t,n){var r=e.state.vim,i=n[0].anchor.line,o=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,a=r.visualMode?t.repeat:1;t.linewise&&o--;for(var s=i;s<=o;s++)for(var l=0;lc.top?(l.line+=(s-c.top)/i,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u=a.anchor.line?D(a.head,0,1):r(a.anchor.line,0);else if("inplace"==o&&i.visualMode)return;t.setOption("disableInput",!1),n&&n.replace?(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"})):(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})),xt.macroModeState.isPlaying||(t.on("change",Qe),e.on(t.getInputField(),"keydown",it)),i.visualMode&&le(t),ee(t,s,l)}},toggleVisualMode:function(t,n,i){var o,a=n.repeat,s=t.getCursor();i.visualMode?i.visualLine^n.linewise||i.visualBlock^n.blockwise?(i.visualLine=!!n.linewise,i.visualBlock=!!n.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),oe(t)):le(t):(i.visualMode=!0,i.visualLine=!!n.linewise,i.visualBlock=!!n.blockwise,o=N(t,r(s.line,s.ch+a-1),!0),i.sel={anchor:s,head:o},e.signal(t,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),oe(t),xe(t,i,"<",G(s,o)),xe(t,i,">",V(s,o)))},reselectLastSelection:function(t,n,r){var i=r.lastSelection;if(r.visualMode&&re(t,r),i){var o=i.anchorMark.find(),a=i.headMark.find();if(!o||!a)return;r.sel={anchor:o,head:a},r.visualMode=!0,r.visualLine=i.visualLine,r.visualBlock=i.visualBlock,oe(t),xe(t,r,"<",G(o,a)),xe(t,r,">",V(o,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var i,o;if(n.visualMode){if(i=e.getCursor("anchor"),o=e.getCursor("head"),H(o,i)){var a=o;o=i,i=a}o.ch=Z(e,o.line)-1}else{var s=Math.max(t.repeat,2);i=e.getCursor(),o=N(e,r(i.line+s-1,1/0))}for(var l=0,c=i.line;c1)var a=Array(t.repeat+1).join(a);var m=o.linewise,h=o.blockwise;if(m)n.visualMode?a=n.visualLine?a.slice(0,-1):"\n"+a.slice(0,a.length-1)+"\n":t.after?(a="\n"+a.slice(0,a.length-1),i.ch=Z(e,i.line)):i.ch=0;else{if(h){a=a.split("\n");for(var g=0;ge.lastLine()&&e.replaceRange("\n",r(E,0));var T=Z(e,E);Tu.length&&(o=u.length),a=r(l.line,o)}if("\n"==s)i.visualMode||t.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var d=t.getRange(l,a);if(d=d.replace(/[^\n]/g,s),i.visualBlock){var f=new Array(t.getOption("tabSize")+1).join(" ");d=t.getSelection(),d=d.replace(/\t/g,f).replace(/[^\n]/g,s).split("\n"),t.replaceSelections(d)}else t.replaceRange(d,l,a);i.visualMode?(l=H(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(l),le(t,!1)):t.setCursor(D(a,0,-1))}},incrementNumberToken:function(e,t){for(var n,i,o,a,s,l=e.getCursor(),c=e.getLine(l.line),u=/-?\d+/g;null!==(n=u.exec(c))&&(s=n[0],i=n.index,o=i+s.length,!(l.ch=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};y("pcre",!0,"boolean"),Ce.prototype={getQuery:function(){return xt.query},setQuery:function(e){xt.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return xt.isReversed},setReversed:function(e){xt.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var At={"\\n":"\n","\\r":"\r","\\t":"\t"},Lt={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"},It="(Javascript regexp)",Ot=function(){this.buildCommandMap_()};Ot.prototype={processCommand:function(e,t,n){var r=this;e.operation(function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)})},_processCommand:function(t,n,r){var i=t.state.vim,o=xt.registerController.getRegister(":"),a=o.toString();i.visualMode&&le(t);var s=new e.StringStream(n);o.setText(n);var l=r||{};l.input=n;try{this.parseInput_(t,s,l)}catch(e){throw Re(t,e),e}var c,u;if(l.commandName){if(c=this.matchCommand_(l.commandName)){if(u=c.name,c.excludeFromCommandHistory&&o.setText(a),this.parseCommandArgs_(s,l,c),"exToKey"==c.type){for(var d=0;d0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e
";if(n){var o;n=n.join("");for(var a=0;a"}}else for(var o in r){var l=r[o].toString();l.length&&(i+='"'+o+" "+l+"
")}Re(e,i)},sort:function(t,n){function i(){if(n.argString){var t=new e.StringStream(n.argString);if(t.eat("!")&&(s=!0),t.eol())return;if(!t.eatSpace())return"Invalid arguments";var r=t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!r&&!t.eol())return"Invalid arguments";if(r[1]){l=r[1].indexOf("i")!=-1,c=r[1].indexOf("u")!=-1;var i=r[1].indexOf("d")!=-1||r[1].indexOf("n")!=-1&&1,o=r[1].indexOf("x")!=-1&&1,a=r[1].indexOf("o")!=-1&&1;if(i+o+a>1)return"Invalid arguments";u=i&&"decimal"||o&&"hex"||a&&"octal"}r[2]&&(d=new RegExp(r[2].substr(1,r[2].length-2),l?"i":""))}}function o(e,t){if(s){var n;n=e,e=t,t=n}l&&(e=e.toLowerCase(),t=t.toLowerCase());var r=u&&b.exec(e),i=u&&b.exec(t);return r?(r=parseInt((r[1]+r[2]).toLowerCase(),y),i=parseInt((i[1]+i[2]).toLowerCase(),y),r-i):e")}if(!r)return void Re(e,u);var p=0,m=function(){if(p=u)return void Re(t,"Invalid argument: "+n.argString.substring(o));for(var d=0;d<=u-c;d++){var f=String.fromCharCode(c+d);delete r.marks[f]}}else delete r.marks[a]}}},Rt=new Ot;return e.keyMap.vim={attach:s,detach:a,call:l},y("insertModeEscKeysTimeout",200,"number"),e.keyMap["vim-insert"]={fallthrough:["default"],attach:s,detach:a,call:l},e.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:s,detach:a,call:l},S(),wt};e.Vim=i()});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy